Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(655)

Side by Side Diff: core/src/fxge/skia/fx_skia_device.h

Issue 1776313002: Add bitmaps and skp output to Skia port (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: wip; add skp output to test framework Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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(int size_x,
24 int size_y,
25 void* recorder);
22 ~CFX_SkiaDeviceDriver() override; 26 ~CFX_SkiaDeviceDriver() override;
23 27
24 /** Options */ 28 /** Options */
25 virtual int GetDeviceCaps(int caps_id); 29 virtual int GetDeviceCaps(int caps_id);
26 30
27 /** Save and restore all graphic states */ 31 /** Save and restore all graphic states */
28 virtual void SaveState(); 32 virtual void SaveState();
29 virtual void RestoreState(FX_BOOL bKeepSaved); 33 virtual void RestoreState(FX_BOOL bKeepSaved);
30 34
31 /** Set clipping path using filled region */ 35 /** Set clipping path using filled region */
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 virtual FX_BOOL RenderRasterizer(agg::rasterizer_scanline_aa& rasterizer, 136 virtual FX_BOOL RenderRasterizer(agg::rasterizer_scanline_aa& rasterizer,
133 FX_DWORD color, 137 FX_DWORD color,
134 FX_BOOL bFullCover, 138 FX_BOOL bFullCover,
135 FX_BOOL bGroupKnockout, 139 FX_BOOL bGroupKnockout,
136 int alpha_flag, 140 int alpha_flag,
137 void* pIccTransform); 141 void* pIccTransform);
138 void SetClipMask(agg::rasterizer_scanline_aa& rasterizer); 142 void SetClipMask(agg::rasterizer_scanline_aa& rasterizer);
139 void SetClipMask(SkPath& skPath, SkPaint* spaint); 143 void SetClipMask(SkPath& skPath, SkPaint* spaint);
140 virtual uint8_t* GetBuffer() const { return m_pAggDriver->GetBuffer(); } 144 virtual uint8_t* GetBuffer() const { return m_pAggDriver->GetBuffer(); }
141 void PaintStroke(SkPaint* spaint, const CFX_GraphStateData* pGraphState); 145 void PaintStroke(SkPaint* spaint, const CFX_GraphStateData* pGraphState);
142 146 void* GetRecorder() const { return m_recorder; }
143 private: 147 private:
144 CFX_AggDeviceDriver* m_pAggDriver; 148 CFX_AggDeviceDriver* m_pAggDriver;
145 SkCanvas* m_canvas; 149 SkCanvas* m_canvas;
150 SkPictureRecorder* m_recorder;
dsinclair 2016/03/10 14:38:54 This should be named m_pRecorder. Can this be put
caryclark 2016/03/10 20:44:55 The lifetime of the recorder is similar to a bitma
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698