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

Side by Side Diff: core/fxge/ge/cfx_renderdevice.cpp

Issue 2491693002: Create a subset of skia support for paths only (Closed)
Patch Set: fix wayward preprocessor defines Created 4 years, 1 month 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
« no previous file with comments | « core/fxge/apple/fx_quartz_device.cpp ('k') | core/fxge/skia/fx_skia_device.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « core/fxge/apple/fx_quartz_device.cpp ('k') | core/fxge/skia/fx_skia_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698