summaryrefslogtreecommitdiff
path: root/core/fpdfapi/edit
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-04-13 18:31:55 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-13 18:31:55 +0000
commitdc62019316b411c2e8fe1e9c1a3aa5fb89762cd4 (patch)
treed6d4fe77336ad2f92580a9f0e363837958cdcde0 /core/fpdfapi/edit
parent00e72c1d1787c71e08d42a06cca3a53419e369da (diff)
downloadpdfium-dc62019316b411c2e8fe1e9c1a3aa5fb89762cd4.tar.xz
Get rid of CPDF_Color::GetColorSpace().
Replace it with more narrowly focused methods to get specific bits from the colorspace. Change-Id: Ifd2980f0fd06230d4d94d28eddf72219d2e9e6eb Reviewed-on: https://pdfium-review.googlesource.com/30590 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/edit')
-rw-r--r--core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp
index 0584e7be48..2a59123344 100644
--- a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp
+++ b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp
@@ -37,8 +37,7 @@ std::ostream& operator<<(std::ostream& ar, const CFX_Matrix& matrix) {
bool GetColor(const CPDF_Color* pColor, float* rgb) {
int intRGB[3];
- if (!pColor ||
- pColor->GetColorSpace() != CPDF_ColorSpace::GetStockCS(PDFCS_DEVICERGB) ||
+ if (!pColor || !pColor->IsColorSpaceRGB() ||
!pColor->GetRGB(&intRGB[0], &intRGB[1], &intRGB[2])) {
return false;
}