summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render/cpdf_renderstatus.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-03-15 15:06:11 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-03-15 15:06:11 +0000
commitc2d9e2d00ee871fa538bc46c8209e98ab9a30c44 (patch)
treee2d97c232971510f74bbf1a6d6e25045592c56b4 /core/fpdfapi/render/cpdf_renderstatus.cpp
parent9875889910585b08d2abd372ddc95469baf1a7e9 (diff)
downloadpdfium-c2d9e2d00ee871fa538bc46c8209e98ab9a30c44.tar.xz
Rename FX_COLORREF variables from "rgb" to "bgr".
FX_COLORREF should work like win32 COLORREF, which is BGR. Change-Id: I9f8bb3e2d30a64dc822ac6b8c46130358a03678a Reviewed-on: https://pdfium-review.googlesource.com/28574 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fpdfapi/render/cpdf_renderstatus.cpp')
-rw-r--r--core/fpdfapi/render/cpdf_renderstatus.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp
index 0022fb1bdb..1ded1ca496 100644
--- a/core/fpdfapi/render/cpdf_renderstatus.cpp
+++ b/core/fpdfapi/render/cpdf_renderstatus.cpp
@@ -1357,8 +1357,8 @@ FX_ARGB CPDF_RenderStatus::GetFillArgb(CPDF_PageObject* pObj,
if (MissingFillColor(pColorState))
pColorState = &m_InitialStates.m_ColorState;
- FX_COLORREF rgb = pColorState->GetFillRGB();
- if (rgb == (uint32_t)-1)
+ FX_COLORREF bgr = pColorState->GetFillRGB();
+ if (bgr == 0xFFFFFFFF)
return 0;
int32_t alpha =
@@ -1369,9 +1369,9 @@ FX_ARGB CPDF_RenderStatus::GetFillArgb(CPDF_PageObject* pObj,
GetTransferFunc(pObj->m_GeneralState.GetTR()));
}
if (pObj->m_GeneralState.GetTransferFunc())
- rgb = pObj->m_GeneralState.GetTransferFunc()->TranslateColor(rgb);
+ bgr = pObj->m_GeneralState.GetTransferFunc()->TranslateColor(bgr);
}
- return m_Options.TranslateColor(ArgbEncode(alpha, rgb));
+ return m_Options.TranslateColor(ArgbEncode(alpha, bgr));
}
FX_ARGB CPDF_RenderStatus::GetStrokeArgb(CPDF_PageObject* pObj) const {
@@ -1382,8 +1382,8 @@ FX_ARGB CPDF_RenderStatus::GetStrokeArgb(CPDF_PageObject* pObj) const {
if (MissingStrokeColor(pColorState))
pColorState = &m_InitialStates.m_ColorState;
- FX_COLORREF rgb = pColorState->GetStrokeRGB();
- if (rgb == (uint32_t)-1)
+ FX_COLORREF bgr = pColorState->GetStrokeRGB();
+ if (bgr == 0xFFFFFFFF)
return 0;
int32_t alpha = static_cast<int32_t>(pObj->m_GeneralState.GetStrokeAlpha() *
@@ -1394,9 +1394,9 @@ FX_ARGB CPDF_RenderStatus::GetStrokeArgb(CPDF_PageObject* pObj) const {
GetTransferFunc(pObj->m_GeneralState.GetTR()));
}
if (pObj->m_GeneralState.GetTransferFunc())
- rgb = pObj->m_GeneralState.GetTransferFunc()->TranslateColor(rgb);
+ bgr = pObj->m_GeneralState.GetTransferFunc()->TranslateColor(bgr);
}
- return m_Options.TranslateColor(ArgbEncode(alpha, rgb));
+ return m_Options.TranslateColor(ArgbEncode(alpha, bgr));
}
void CPDF_RenderStatus::ProcessClipPath(const CPDF_ClipPath& ClipPath,