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

Side by Side Diff: core/fpdfapi/fpdf_render/fpdf_render_image.cpp

Issue 2294553002: Revert "Use ->() in CPDF_ColorState" (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "core/fpdfapi/fpdf_render/render_int.h" 7 #include "core/fpdfapi/fpdf_render/render_int.h"
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 if (m_Loader.m_bCached && m_Loader.m_pMask) { 415 if (m_Loader.m_bCached && m_Loader.m_pMask) {
416 m_Loader.m_pMask = m_Loader.m_pMask->Clone(); 416 m_Loader.m_pMask = m_Loader.m_pMask->Clone();
417 } 417 }
418 m_Loader.m_bCached = FALSE; 418 m_Loader.m_bCached = FALSE;
419 } 419 }
420 } 420 }
421 m_FillArgb = 0; 421 m_FillArgb = 0;
422 m_bPatternColor = FALSE; 422 m_bPatternColor = FALSE;
423 m_pPattern = nullptr; 423 m_pPattern = nullptr;
424 if (m_pDIBSource->IsAlphaMask()) { 424 if (m_pDIBSource->IsAlphaMask()) {
425 const CPDF_Color* pColor = m_pImageObject->m_ColorState->GetFillColor(); 425 const CPDF_Color* pColor = m_pImageObject->m_ColorState.GetFillColor();
426 if (pColor && pColor->IsPattern()) { 426 if (pColor && pColor->IsPattern()) {
427 m_pPattern = pColor->GetPattern(); 427 m_pPattern = pColor->GetPattern();
428 if (m_pPattern) { 428 if (m_pPattern) {
429 m_bPatternColor = TRUE; 429 m_bPatternColor = TRUE;
430 } 430 }
431 } 431 }
432 m_FillArgb = m_pRenderStatus->GetFillArgb(m_pImageObject); 432 m_FillArgb = m_pRenderStatus->GetFillArgb(m_pImageObject);
433 } else if (m_pRenderStatus->m_Options.m_ColorMode == RENDER_COLOR_GRAY) { 433 } else if (m_pRenderStatus->m_Options.m_ColorMode == RENDER_COLOR_GRAY) {
434 m_pClone.reset(m_pDIBSource->Clone()); 434 m_pClone.reset(m_pDIBSource->Clone());
435 m_pClone->ConvertColorScale(m_pRenderStatus->m_Options.m_BackColor, 435 m_pClone->ConvertColorScale(m_pRenderStatus->m_Options.m_BackColor,
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 } else if (pFunc) { 1068 } else if (pFunc) {
1069 int size = dest_pitch * height; 1069 int size = dest_pitch * height;
1070 for (int i = 0; i < size; i++) { 1070 for (int i = 0; i < size; i++) {
1071 dest_buf[i] = transfers[src_buf[i]]; 1071 dest_buf[i] = transfers[src_buf[i]];
1072 } 1072 }
1073 } else { 1073 } else {
1074 FXSYS_memcpy(dest_buf, src_buf, dest_pitch * height); 1074 FXSYS_memcpy(dest_buf, src_buf, dest_pitch * height);
1075 } 1075 }
1076 return pMask.release(); 1076 return pMask.release();
1077 } 1077 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_render/fpdf_render.cpp ('k') | core/fpdfapi/fpdf_render/fpdf_render_pattern.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698