| OLD | NEW |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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/fxge/cfx_renderdevice.h" | 7 #include "core/fxge/cfx_renderdevice.h" |
| 8 | 8 |
| 9 #include "core/fxcrt/fx_safe_types.h" | 9 #include "core/fxcrt/fx_safe_types.h" |
| 10 #include "core/fxge/cfx_facecache.h" | 10 #include "core/fxge/cfx_facecache.h" |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 bool CFX_RenderDevice::CreateCompatibleBitmap(CFX_DIBitmap* pDIB, | 396 bool CFX_RenderDevice::CreateCompatibleBitmap(CFX_DIBitmap* pDIB, |
| 397 int width, | 397 int width, |
| 398 int height) const { | 398 int height) const { |
| 399 if (m_RenderCaps & FXRC_CMYK_OUTPUT) { | 399 if (m_RenderCaps & FXRC_CMYK_OUTPUT) { |
| 400 return pDIB->Create(width, height, m_RenderCaps & FXRC_ALPHA_OUTPUT | 400 return pDIB->Create(width, height, m_RenderCaps & FXRC_ALPHA_OUTPUT |
| 401 ? FXDIB_Cmyka | 401 ? FXDIB_Cmyka |
| 402 : FXDIB_Cmyk); | 402 : FXDIB_Cmyk); |
| 403 } | 403 } |
| 404 if (m_RenderCaps & FXRC_BYTEMASK_OUTPUT) | 404 if (m_RenderCaps & FXRC_BYTEMASK_OUTPUT) |
| 405 return pDIB->Create(width, height, FXDIB_8bppMask); | 405 return pDIB->Create(width, height, FXDIB_8bppMask); |
| 406 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ | 406 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ || defined _SKIA_SUPPORT_PATHS_ |
| 407 return pDIB->Create(width, height, m_RenderCaps & FXRC_ALPHA_OUTPUT | 407 return pDIB->Create(width, height, m_RenderCaps & FXRC_ALPHA_OUTPUT |
| 408 ? FXDIB_Argb | 408 ? FXDIB_Argb |
| 409 : FXDIB_Rgb32); | 409 : FXDIB_Rgb32); |
| 410 #else | 410 #else |
| 411 return pDIB->Create( | 411 return pDIB->Create( |
| 412 width, height, m_RenderCaps & FXRC_ALPHA_OUTPUT ? FXDIB_Argb : FXDIB_Rgb); | 412 width, height, m_RenderCaps & FXRC_ALPHA_OUTPUT ? FXDIB_Argb : FXDIB_Rgb); |
| 413 #endif | 413 #endif |
| 414 } | 414 } |
| 415 | 415 |
| 416 bool CFX_RenderDevice::SetClip_PathFill(const CFX_PathData* pPathData, | 416 bool CFX_RenderDevice::SetClip_PathFill(const CFX_PathData* pPathData, |
| (...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1067 fill_color, stroke_color, fill_mode, | 1067 fill_color, stroke_color, fill_mode, |
| 1068 FXDIB_BLEND_NORMAL)) { | 1068 FXDIB_BLEND_NORMAL)) { |
| 1069 return false; | 1069 return false; |
| 1070 } | 1070 } |
| 1071 } | 1071 } |
| 1072 if (pClippingPath) | 1072 if (pClippingPath) |
| 1073 pClippingPath->Append(&TransformedPath, pUser2Device); | 1073 pClippingPath->Append(&TransformedPath, pUser2Device); |
| 1074 } | 1074 } |
| 1075 return true; | 1075 return true; |
| 1076 } | 1076 } |
| OLD | NEW |