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

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

Issue 2504863003: fix corpus tests (Closed)
Patch Set: merge with tot 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/fx_dib.h ('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"
11 #include "core/fxge/cfx_fxgedevice.h" 11 #include "core/fxge/cfx_fxgedevice.h"
12 #include "core/fxge/cfx_graphstatedata.h" 12 #include "core/fxge/cfx_graphstatedata.h"
13 #include "core/fxge/cfx_pathdata.h" 13 #include "core/fxge/cfx_pathdata.h"
14 #include "core/fxge/ifx_renderdevicedriver.h" 14 #include "core/fxge/ifx_renderdevicedriver.h"
15 15
16 #if defined _SKIA_SUPPORT_ 16 #if defined _SKIA_SUPPORT_ || defined _SKIA_SUPPORT_PATHS_
17 #include "third_party/skia/include/core/SkTypes.h" 17 #include "third_party/skia/include/core/SkTypes.h"
18 #endif 18 #endif
19 19
20 namespace { 20 namespace {
21 21
22 void AdjustGlyphSpace(std::vector<FXTEXT_GLYPHPOS>* pGlyphAndPos) { 22 void AdjustGlyphSpace(std::vector<FXTEXT_GLYPHPOS>* pGlyphAndPos) {
23 ASSERT(pGlyphAndPos->size() > 1); 23 ASSERT(pGlyphAndPos->size() > 1);
24 std::vector<FXTEXT_GLYPHPOS>& glyphs = *pGlyphAndPos; 24 std::vector<FXTEXT_GLYPHPOS>& glyphs = *pGlyphAndPos;
25 bool bVertical = glyphs.back().m_OriginX == glyphs.front().m_OriginX; 25 bool bVertical = glyphs.back().m_OriginX == glyphs.front().m_OriginX;
26 if (!bVertical && (glyphs.back().m_OriginY != glyphs.front().m_OriginY)) 26 if (!bVertical && (glyphs.back().m_OriginY != glyphs.front().m_OriginY))
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 const CFX_DIBSource* pMask, 810 const CFX_DIBSource* pMask,
811 int left, 811 int left,
812 int top, 812 int top,
813 int bitmap_alpha, 813 int bitmap_alpha,
814 int blend_type) { 814 int blend_type) {
815 return m_pDeviceDriver->SetBitsWithMask(pBitmap, pMask, left, top, 815 return m_pDeviceDriver->SetBitsWithMask(pBitmap, pMask, left, top,
816 bitmap_alpha, blend_type); 816 bitmap_alpha, blend_type);
817 } 817 }
818 #endif 818 #endif
819 819
820 #ifdef _SKIA_SUPPORT_PATHS_
821 void CFX_RenderDevice::UnPreMultiplyDevice() {
822 SkASSERT(0);
823 }
824 #endif
825
820 bool CFX_RenderDevice::DrawNormalText(int nChars, 826 bool CFX_RenderDevice::DrawNormalText(int nChars,
821 const FXTEXT_CHARPOS* pCharPos, 827 const FXTEXT_CHARPOS* pCharPos,
822 CFX_Font* pFont, 828 CFX_Font* pFont,
823 FX_FLOAT font_size, 829 FX_FLOAT font_size,
824 const CFX_Matrix* pText2Device, 830 const CFX_Matrix* pText2Device,
825 uint32_t fill_color, 831 uint32_t fill_color,
826 uint32_t text_flags) { 832 uint32_t text_flags) {
827 int nativetext_flags = text_flags; 833 int nativetext_flags = text_flags;
828 if (m_DeviceClass != FXDC_DISPLAY) { 834 if (m_DeviceClass != FXDC_DISPLAY) {
829 if (!(text_flags & FXTEXT_PRINTGRAPHICTEXT)) { 835 if (!(text_flags & FXTEXT_PRINTGRAPHICTEXT)) {
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 fill_color, stroke_color, fill_mode, 1073 fill_color, stroke_color, fill_mode,
1068 FXDIB_BLEND_NORMAL)) { 1074 FXDIB_BLEND_NORMAL)) {
1069 return false; 1075 return false;
1070 } 1076 }
1071 } 1077 }
1072 if (pClippingPath) 1078 if (pClippingPath)
1073 pClippingPath->Append(&TransformedPath, pUser2Device); 1079 pClippingPath->Append(&TransformedPath, pUser2Device);
1074 } 1080 }
1075 return true; 1081 return true;
1076 } 1082 }
OLDNEW
« no previous file with comments | « core/fxge/fx_dib.h ('k') | core/fxge/skia/fx_skia_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698