| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |