| 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 #ifndef CORE_FXGE_SKIA_FX_SKIA_DEVICE_H_ | 5 #ifndef CORE_FXGE_SKIA_FX_SKIA_DEVICE_H_ |
| 6 #define CORE_FXGE_SKIA_FX_SKIA_DEVICE_H_ | 6 #define CORE_FXGE_SKIA_FX_SKIA_DEVICE_H_ |
| 7 | 7 |
| 8 #if defined(_SKIA_SUPPORT_) | 8 #if defined(_SKIA_SUPPORT_) |
| 9 | 9 |
| 10 class SkCanvas; | 10 class SkCanvas; |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 107 |
| 108 FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, | 108 FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, |
| 109 int bitmap_alpha, | 109 int bitmap_alpha, |
| 110 uint32_t color, | 110 uint32_t color, |
| 111 const CFX_Matrix* pMatrix, | 111 const CFX_Matrix* pMatrix, |
| 112 uint32_t flags, | 112 uint32_t flags, |
| 113 void*& handle, | 113 void*& handle, |
| 114 int alpha_flag = 0, | 114 int alpha_flag = 0, |
| 115 void* pIccTransform = NULL, | 115 void* pIccTransform = NULL, |
| 116 int blend_type = FXDIB_BLEND_NORMAL) override; | 116 int blend_type = FXDIB_BLEND_NORMAL) override; |
| 117 FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause) override; | 117 |
| 118 void CancelDIBits(void* handle) override; | 118 FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause) override { |
| 119 return FALSE; |
| 120 } |
| 121 |
| 122 void CancelDIBits(void* handle) override {} |
| 119 | 123 |
| 120 FX_BOOL DrawDeviceText(int nChars, | 124 FX_BOOL DrawDeviceText(int nChars, |
| 121 const FXTEXT_CHARPOS* pCharPos, | 125 const FXTEXT_CHARPOS* pCharPos, |
| 122 CFX_Font* pFont, | 126 CFX_Font* pFont, |
| 123 CFX_FontCache* pCache, | 127 CFX_FontCache* pCache, |
| 124 const CFX_Matrix* pObject2Device, | 128 const CFX_Matrix* pObject2Device, |
| 125 FX_FLOAT font_size, | 129 FX_FLOAT font_size, |
| 126 uint32_t color, | 130 uint32_t color, |
| 127 int alpha_flag = 0, | 131 int alpha_flag = 0, |
| 128 void* pIccTransform = NULL) override; | 132 void* pIccTransform = NULL) override; |
| 129 | 133 |
| 130 FX_BOOL DrawShading(const CPDF_ShadingPattern* pPattern, | 134 FX_BOOL DrawShading(const CPDF_ShadingPattern* pPattern, |
| 131 const CFX_Matrix* pMatrix, | 135 const CFX_Matrix* pMatrix, |
| 132 const FX_RECT& clip_rect, | 136 const FX_RECT& clip_rect, |
| 133 int alpha, | 137 int alpha, |
| 134 FX_BOOL bAlphaMode) override; | 138 FX_BOOL bAlphaMode) override; |
| 135 | 139 |
| 136 virtual uint8_t* GetBuffer() const { return m_pBitmap->GetBuffer(); } | 140 virtual uint8_t* GetBuffer() const { return m_pBitmap->GetBuffer(); } |
| 137 void PaintStroke(SkPaint* spaint, | 141 void PaintStroke(SkPaint* spaint, |
| 138 const CFX_GraphStateData* pGraphState, | 142 const CFX_GraphStateData* pGraphState, |
| 139 const SkMatrix& matrix); | 143 const SkMatrix& matrix); |
| 140 SkPictureRecorder* GetRecorder() const { return m_pRecorder; } | 144 SkPictureRecorder* GetRecorder() const { return m_pRecorder; } |
| 145 void PreMultiply(); |
| 141 | 146 |
| 142 private: | 147 private: |
| 143 CFX_DIBitmap* m_pBitmap; | 148 CFX_DIBitmap* m_pBitmap; |
| 144 CFX_DIBitmap* m_pOriDevice; | 149 CFX_DIBitmap* m_pOriDevice; |
| 145 SkCanvas* m_pCanvas; | 150 SkCanvas* m_pCanvas; |
| 146 SkPictureRecorder* const m_pRecorder; | 151 SkPictureRecorder* const m_pRecorder; |
| 147 FX_BOOL m_bRgbByteOrder; | 152 FX_BOOL m_bRgbByteOrder; |
| 148 FX_BOOL m_bGroupKnockout; | 153 FX_BOOL m_bGroupKnockout; |
| 149 }; | 154 }; |
| 150 #endif // defined(_SKIA_SUPPORT_) | 155 #endif // defined(_SKIA_SUPPORT_) |
| 151 | 156 |
| 152 #endif // CORE_FXGE_SKIA_FX_SKIA_DEVICE_H_ | 157 #endif // CORE_FXGE_SKIA_FX_SKIA_DEVICE_H_ |
| OLD | NEW |