| 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 "core/fpdfapi/fpdf_font/cpdf_type3char.h" | 9 #include "core/fpdfapi/fpdf_font/cpdf_type3char.h" |
| 10 #include "core/fpdfapi/fpdf_font/cpdf_type3font.h" | 10 #include "core/fpdfapi/fpdf_font/cpdf_type3font.h" |
| (...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 918 bStroke ? pSrcStates->m_ColorState.GetObject()->m_StrokeRGB | 918 bStroke ? pSrcStates->m_ColorState.GetObject()->m_StrokeRGB |
| 919 : pSrcStates->m_ColorState.GetObject()->m_FillRGB; | 919 : pSrcStates->m_ColorState.GetObject()->m_FillRGB; |
| 920 pColorData->m_StrokeRGB = pColorData->m_FillRGB; | 920 pColorData->m_StrokeRGB = pColorData->m_FillRGB; |
| 921 } | 921 } |
| 922 return pStates; | 922 return pStates; |
| 923 } | 923 } |
| 924 | 924 |
| 925 CPDF_RenderContext::CPDF_RenderContext(CPDF_Page* pPage) | 925 CPDF_RenderContext::CPDF_RenderContext(CPDF_Page* pPage) |
| 926 : m_pDocument(pPage->m_pDocument), | 926 : m_pDocument(pPage->m_pDocument), |
| 927 m_pPageResources(pPage->m_pPageResources), | 927 m_pPageResources(pPage->m_pPageResources), |
| 928 m_pPageCache(pPage->GetRenderCache()), | 928 m_pPageCache(pPage->GetRenderCache()) {} |
| 929 m_bFirstLayer(TRUE) {} | |
| 930 | 929 |
| 931 CPDF_RenderContext::CPDF_RenderContext(CPDF_Document* pDoc, | 930 CPDF_RenderContext::CPDF_RenderContext(CPDF_Document* pDoc, |
| 932 CPDF_PageRenderCache* pPageCache) | 931 CPDF_PageRenderCache* pPageCache) |
| 933 : m_pDocument(pDoc), | 932 : m_pDocument(pDoc), m_pPageResources(nullptr), m_pPageCache(pPageCache) {} |
| 934 m_pPageResources(nullptr), | |
| 935 m_pPageCache(pPageCache), | |
| 936 m_bFirstLayer(TRUE) {} | |
| 937 | 933 |
| 938 CPDF_RenderContext::~CPDF_RenderContext() {} | 934 CPDF_RenderContext::~CPDF_RenderContext() {} |
| 939 | 935 |
| 940 void CPDF_RenderContext::AppendLayer(CPDF_PageObjectHolder* pObjectHolder, | 936 void CPDF_RenderContext::AppendLayer(CPDF_PageObjectHolder* pObjectHolder, |
| 941 const CFX_Matrix* pObject2Device) { | 937 const CFX_Matrix* pObject2Device) { |
| 942 Layer* pLayer = m_Layers.AddSpace(); | 938 Layer* pLayer = m_Layers.AddSpace(); |
| 943 pLayer->m_pObjectHolder = pObjectHolder; | 939 pLayer->m_pObjectHolder = pObjectHolder; |
| 944 if (pObject2Device) { | 940 if (pObject2Device) { |
| 945 pLayer->m_Matrix = *pObject2Device; | 941 pLayer->m_Matrix = *pObject2Device; |
| 946 } else { | 942 } else { |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1293 m_pDevice->StretchDIBits(m_pBitmapDevice->GetBitmap(), m_Rect.left, | 1289 m_pDevice->StretchDIBits(m_pBitmapDevice->GetBitmap(), m_Rect.left, |
| 1294 m_Rect.top, m_Rect.Width(), m_Rect.Height()); | 1290 m_Rect.top, m_Rect.Width(), m_Rect.Height()); |
| 1295 } | 1291 } |
| 1296 } | 1292 } |
| 1297 | 1293 |
| 1298 #if defined _SKIA_SUPPORT_ | 1294 #if defined _SKIA_SUPPORT_ |
| 1299 void CPDF_RenderStatus::DebugVerifyDeviceIsPreMultiplied() const { | 1295 void CPDF_RenderStatus::DebugVerifyDeviceIsPreMultiplied() const { |
| 1300 m_pDevice->DebugVerifyBitmapIsPreMultiplied(); | 1296 m_pDevice->DebugVerifyBitmapIsPreMultiplied(); |
| 1301 } | 1297 } |
| 1302 #endif | 1298 #endif |
| OLD | NEW |