Chromium Code Reviews| 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 struct SkIRect; | 17 struct SkIRect; |
| 18 class SkiaState; | |
|
dsinclair
2016/06/29 13:22:28
nit: Move this up with the other classes.
caryclark
2016/06/29 13:55:10
Done.
| |
| 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); |
| 27 ~CFX_SkiaDeviceDriver() override; | 28 ~CFX_SkiaDeviceDriver() override; |
| (...skipping 87 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(); | |
|
dsinclair
2016/06/29 13:22:28
const?
caryclark
2016/06/29 13:55:10
Done.
| |
| 127 | 131 |
| 128 private: | 132 private: |
| 129 CFX_DIBitmap* m_pBitmap; | 133 CFX_DIBitmap* m_pBitmap; |
| 130 CFX_DIBitmap* m_pOriDevice; | 134 CFX_DIBitmap* m_pOriDevice; |
| 131 SkCanvas* m_pCanvas; | 135 SkCanvas* m_pCanvas; |
| 132 SkPictureRecorder* const m_pRecorder; | 136 SkPictureRecorder* const m_pRecorder; |
| 137 SkiaState* m_pCache; | |
|
dsinclair
2016/06/29 13:22:28
std::unique_ptr
caryclark
2016/06/29 13:55:10
Done.
| |
| 133 FX_BOOL m_bRgbByteOrder; | 138 FX_BOOL m_bRgbByteOrder; |
| 134 FX_BOOL m_bGroupKnockout; | 139 FX_BOOL m_bGroupKnockout; |
| 140 | |
| 141 friend class SkiaState; | |
|
dsinclair
2016/06/29 13:22:28
nit: Move this up to just after the private:
caryclark
2016/06/29 13:55:10
Done.
| |
| 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 |