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