| 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 #include "core/fxge/include/ifx_renderdevicedriver.h" | 10 #include "core/fxge/include/ifx_renderdevicedriver.h" |
| 11 | 11 |
| 12 class SkCanvas; | 12 class SkCanvas; |
| 13 class SkMatrix; | 13 class SkMatrix; |
| 14 class SkPaint; | 14 class SkPaint; |
| 15 class SkPath; | 15 class SkPath; |
| 16 class SkPictureRecorder; | 16 class SkPictureRecorder; |
| 17 class SkiaState; |
| 17 struct SkIRect; | 18 struct SkIRect; |
| 18 | 19 |
| 19 class CFX_SkiaDeviceDriver : public IFX_RenderDeviceDriver { | 20 class CFX_SkiaDeviceDriver : public IFX_RenderDeviceDriver { |
| 20 public: | 21 public: |
| 21 CFX_SkiaDeviceDriver(CFX_DIBitmap* pBitmap, | 22 CFX_SkiaDeviceDriver(CFX_DIBitmap* pBitmap, |
| 22 FX_BOOL bRgbByteOrder, | 23 FX_BOOL bRgbByteOrder, |
| 23 CFX_DIBitmap* pOriDevice, | 24 CFX_DIBitmap* pOriDevice, |
| 24 FX_BOOL bGroupKnockout); | 25 FX_BOOL bGroupKnockout); |
| 25 explicit CFX_SkiaDeviceDriver(SkPictureRecorder* recorder); | 26 explicit CFX_SkiaDeviceDriver(SkPictureRecorder* recorder); |
| 26 CFX_SkiaDeviceDriver(int size_x, int size_y); | 27 CFX_SkiaDeviceDriver(int size_x, int size_y); |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 const CFX_Matrix* pMatrix, | 116 const CFX_Matrix* pMatrix, |
| 116 const FX_RECT& clip_rect, | 117 const FX_RECT& clip_rect, |
| 117 int alpha, | 118 int alpha, |
| 118 FX_BOOL bAlphaMode) override; | 119 FX_BOOL bAlphaMode) override; |
| 119 | 120 |
| 120 virtual uint8_t* GetBuffer() const; | 121 virtual uint8_t* GetBuffer() const; |
| 121 | 122 |
| 122 void PaintStroke(SkPaint* spaint, | 123 void PaintStroke(SkPaint* spaint, |
| 123 const CFX_GraphStateData* pGraphState, | 124 const CFX_GraphStateData* pGraphState, |
| 124 const SkMatrix& matrix); | 125 const SkMatrix& matrix); |
| 126 void Flush(); |
| 125 SkPictureRecorder* GetRecorder() const { return m_pRecorder; } | 127 SkPictureRecorder* GetRecorder() const { return m_pRecorder; } |
| 126 void PreMultiply(); | 128 void PreMultiply(); |
| 129 SkCanvas* SkiaCanvas() { return m_pCanvas; } |
| 130 void Dump() const; |
| 127 | 131 |
| 128 private: | 132 private: |
| 133 friend class SkiaState; |
| 134 |
| 129 CFX_DIBitmap* m_pBitmap; | 135 CFX_DIBitmap* m_pBitmap; |
| 130 CFX_DIBitmap* m_pOriDevice; | 136 CFX_DIBitmap* m_pOriDevice; |
| 131 SkCanvas* m_pCanvas; | 137 SkCanvas* m_pCanvas; |
| 132 SkPictureRecorder* const m_pRecorder; | 138 SkPictureRecorder* const m_pRecorder; |
| 139 std::unique_ptr<SkiaState> m_pCache; |
| 133 FX_BOOL m_bRgbByteOrder; | 140 FX_BOOL m_bRgbByteOrder; |
| 134 FX_BOOL m_bGroupKnockout; | 141 FX_BOOL m_bGroupKnockout; |
| 135 }; | 142 }; |
| 136 #endif // defined(_SKIA_SUPPORT_) | 143 #endif // defined(_SKIA_SUPPORT_) |
| 137 | 144 |
| 138 #endif // CORE_FXGE_SKIA_FX_SKIA_DEVICE_H_ | 145 #endif // CORE_FXGE_SKIA_FX_SKIA_DEVICE_H_ |
| OLD | NEW |