Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1888)

Unified Diff: core/fpdfapi/fpdf_render/fpdf_render_image.cpp

Issue 1879683002: Remove CPDF_Object::GetConstString and overrides (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Move bLuminosity down. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/fpdf_parser/include/cpdf_string.h ('k') | core/fpdfdoc/cpvt_generateap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_render/fpdf_render_image.cpp
diff --git a/core/fpdfapi/fpdf_render/fpdf_render_image.cpp b/core/fpdfapi/fpdf_render/fpdf_render_image.cpp
index 6aee8e75b6bbfc98bcec8313bbccd91375565814..55e97a9d81fb6b3c45707c93039e16ba4964e524 100644
--- a/core/fpdfapi/fpdf_render/fpdf_render_image.cpp
+++ b/core/fpdfapi/fpdf_render/fpdf_render_image.cpp
@@ -412,13 +412,13 @@ FX_BOOL CPDF_ImageRenderer::StartRenderDIBSource() {
"Filter");
if (pFilters) {
if (pFilters->IsName()) {
- CFX_ByteStringC bsDecodeType = pFilters->GetConstString();
+ CFX_ByteString bsDecodeType = pFilters->GetString();
if (bsDecodeType == "DCTDecode" || bsDecodeType == "JPXDecode") {
m_Flags |= FXRENDER_IMAGE_LOSSY;
}
} else if (CPDF_Array* pArray = pFilters->AsArray()) {
for (size_t i = 0; i < pArray->GetCount(); i++) {
- CFX_ByteStringC bsDecodeType = pArray->GetConstStringAt(i);
+ CFX_ByteString bsDecodeType = pArray->GetStringAt(i);
if (bsDecodeType == "DCTDecode" || bsDecodeType == "JPXDecode") {
m_Flags |= FXRENDER_IMAGE_LOSSY;
break;
@@ -880,10 +880,6 @@ CFX_DIBitmap* CPDF_RenderStatus::LoadSMask(CPDF_Dictionary* pSMaskDict,
if (!pSMaskDict) {
return NULL;
}
- int width = pClipRect->right - pClipRect->left;
- int height = pClipRect->bottom - pClipRect->top;
- FX_BOOL bLuminosity = FALSE;
- bLuminosity = pSMaskDict->GetConstStringBy("S") != "Alpha";
CPDF_Stream* pGroup = pSMaskDict->GetStreamBy("G");
if (!pGroup) {
return NULL;
@@ -895,10 +891,15 @@ CFX_DIBitmap* CPDF_RenderStatus::LoadSMask(CPDF_Dictionary* pSMaskDict,
CFX_Matrix matrix = *pMatrix;
matrix.TranslateI(-pClipRect->left, -pClipRect->top);
+
CPDF_Form form(m_pContext->GetDocument(), m_pContext->GetPageResources(),
pGroup);
form.ParseContent(NULL, NULL, NULL, NULL);
+
CFX_FxgeDevice bitmap_device;
+ FX_BOOL bLuminosity = pSMaskDict->GetStringBy("S") != "Alpha";
+ int width = pClipRect->right - pClipRect->left;
+ int height = pClipRect->bottom - pClipRect->top;
#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
if (!bitmap_device.Create(width, height,
bLuminosity ? FXDIB_Rgb32 : FXDIB_8bppMask)) {
« no previous file with comments | « core/fpdfapi/fpdf_parser/include/cpdf_string.h ('k') | core/fpdfdoc/cpvt_generateap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698