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_SRC_FXGE_SKIA_FX_SKIA_DEVICE_H_ | 5 #ifndef CORE_SRC_FXGE_SKIA_FX_SKIA_DEVICE_H_ |
| 6 #define CORE_SRC_FXGE_SKIA_FX_SKIA_DEVICE_H_ | 6 #define CORE_SRC_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; |
| 11 class SkPaint; | 11 class SkPaint; |
| 12 class SkPath; | 12 class SkPath; |
| 13 class SkPictureRecorder; | |
| 13 struct SkIRect; | 14 struct SkIRect; |
| 14 | 15 |
| 15 class CFX_SkiaDeviceDriver : public IFX_RenderDeviceDriver { | 16 class CFX_SkiaDeviceDriver : public IFX_RenderDeviceDriver { |
| 16 public: | 17 public: |
| 17 CFX_SkiaDeviceDriver(CFX_DIBitmap* pBitmap, | 18 CFX_SkiaDeviceDriver(CFX_DIBitmap* pBitmap, |
| 18 int dither_bits, | 19 int dither_bits, |
| 19 FX_BOOL bRgbByteOrder, | 20 FX_BOOL bRgbByteOrder, |
| 20 CFX_DIBitmap* pOriDevice, | 21 CFX_DIBitmap* pOriDevice, |
| 21 FX_BOOL bGroupKnockout); | 22 FX_BOOL bGroupKnockout); |
| 23 CFX_SkiaDeviceDriver(SkPictureRecorder* recorder); | |
|
dsinclair
2016/03/14 13:53:40
nit: explicit
| |
| 24 CFX_SkiaDeviceDriver(int size_x, int size_y); | |
| 22 ~CFX_SkiaDeviceDriver() override; | 25 ~CFX_SkiaDeviceDriver() override; |
| 23 | 26 |
| 24 /** Options */ | 27 /** Options */ |
| 25 virtual int GetDeviceCaps(int caps_id); | 28 virtual int GetDeviceCaps(int caps_id); |
| 26 | 29 |
| 27 /** Save and restore all graphic states */ | 30 /** Save and restore all graphic states */ |
| 28 virtual void SaveState(); | 31 virtual void SaveState(); |
| 29 virtual void RestoreState(FX_BOOL bKeepSaved); | 32 virtual void RestoreState(FX_BOOL bKeepSaved); |
| 30 | 33 |
| 31 /** Set clipping path using filled region */ | 34 /** Set clipping path using filled region */ |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 132 virtual FX_BOOL RenderRasterizer(agg::rasterizer_scanline_aa& rasterizer, | 135 virtual FX_BOOL RenderRasterizer(agg::rasterizer_scanline_aa& rasterizer, |
| 133 FX_DWORD color, | 136 FX_DWORD color, |
| 134 FX_BOOL bFullCover, | 137 FX_BOOL bFullCover, |
| 135 FX_BOOL bGroupKnockout, | 138 FX_BOOL bGroupKnockout, |
| 136 int alpha_flag, | 139 int alpha_flag, |
| 137 void* pIccTransform); | 140 void* pIccTransform); |
| 138 void SetClipMask(agg::rasterizer_scanline_aa& rasterizer); | 141 void SetClipMask(agg::rasterizer_scanline_aa& rasterizer); |
| 139 void SetClipMask(SkPath& skPath, SkPaint* spaint); | 142 void SetClipMask(SkPath& skPath, SkPaint* spaint); |
| 140 virtual uint8_t* GetBuffer() const { return m_pAggDriver->GetBuffer(); } | 143 virtual uint8_t* GetBuffer() const { return m_pAggDriver->GetBuffer(); } |
| 141 void PaintStroke(SkPaint* spaint, const CFX_GraphStateData* pGraphState); | 144 void PaintStroke(SkPaint* spaint, const CFX_GraphStateData* pGraphState); |
| 145 SkPictureRecorder* GetRecorder() const { return m_pRecorder; } | |
| 142 | 146 |
| 143 private: | 147 private: |
| 144 CFX_AggDeviceDriver* m_pAggDriver; | 148 CFX_AggDeviceDriver* m_pAggDriver; |
| 145 SkCanvas* m_canvas; | 149 SkCanvas* m_pCanvas; |
| 150 SkPictureRecorder* const m_pRecorder; | |
| 151 int m_ditherBits; | |
| 146 }; | 152 }; |
| 147 #endif // defined(_SKIA_SUPPORT_) | 153 #endif // defined(_SKIA_SUPPORT_) |
| 148 | 154 |
| 149 #endif // CORE_SRC_FXGE_SKIA_FX_SKIA_DEVICE_H_ | 155 #endif // CORE_SRC_FXGE_SKIA_FX_SKIA_DEVICE_H_ |
| OLD | NEW |