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

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

Issue 1513363002: Remove CFX_AffineMatrix/CPDF_Matrix (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Nits Created 5 years 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
« no previous file with comments | « core/src/fxge/ge/fx_ge_text.cpp ('k') | core/src/fxge/skia/fx_skia_device.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 class CFX_SkiaDeviceDriver : public IFX_RenderDeviceDriver { 9 class CFX_SkiaDeviceDriver : public IFX_RenderDeviceDriver {
10 public: 10 public:
11 CFX_SkiaDeviceDriver(CFX_DIBitmap* pBitmap, 11 CFX_SkiaDeviceDriver(CFX_DIBitmap* pBitmap,
12 int dither_bits, 12 int dither_bits,
13 FX_BOOL bRgbByteOrder, 13 FX_BOOL bRgbByteOrder,
14 CFX_DIBitmap* pOriDevice, 14 CFX_DIBitmap* pOriDevice,
15 FX_BOOL bGroupKnockout); 15 FX_BOOL bGroupKnockout);
16 ~CFX_SkiaDeviceDriver() override; 16 ~CFX_SkiaDeviceDriver() override;
17 17
18 /** Options */ 18 /** Options */
19 virtual int GetDeviceCaps(int caps_id); 19 virtual int GetDeviceCaps(int caps_id);
20 20
21 /** Save and restore all graphic states */ 21 /** Save and restore all graphic states */
22 virtual void SaveState(); 22 virtual void SaveState();
23 virtual void RestoreState(FX_BOOL bKeepSaved); 23 virtual void RestoreState(FX_BOOL bKeepSaved);
24 24
25 /** Set clipping path using filled region */ 25 /** Set clipping path using filled region */
26 virtual FX_BOOL SetClip_PathFill( 26 virtual FX_BOOL SetClip_PathFill(
27 const CFX_PathData* pPathData, // path info 27 const CFX_PathData* pPathData, // path info
28 const CFX_AffineMatrix* pObject2Device, // optional transformation 28 const CFX_Matrix* pObject2Device, // optional transformation
29 int fill_mode // fill mode, WINDING or ALTERNATE 29 int fill_mode // fill mode, WINDING or ALTERNATE
30 ); 30 );
31 31
32 /** Set clipping path using stroked region */ 32 /** Set clipping path using stroked region */
33 virtual FX_BOOL SetClip_PathStroke( 33 virtual FX_BOOL SetClip_PathStroke(
34 const CFX_PathData* pPathData, // path info 34 const CFX_PathData* pPathData, // path info
35 const CFX_AffineMatrix* pObject2Device, // optional transformation 35 const CFX_Matrix* pObject2Device, // optional transformation
36 const CFX_GraphStateData* 36 const CFX_GraphStateData*
37 pGraphState // graphic state, for pen attributes 37 pGraphState // graphic state, for pen attributes
38 ); 38 );
39 39
40 /** Draw a path */ 40 /** Draw a path */
41 virtual FX_BOOL DrawPath(const CFX_PathData* pPathData, 41 virtual FX_BOOL DrawPath(const CFX_PathData* pPathData,
42 const CFX_AffineMatrix* pObject2Device, 42 const CFX_Matrix* pObject2Device,
43 const CFX_GraphStateData* pGraphState, 43 const CFX_GraphStateData* pGraphState,
44 FX_DWORD fill_color, 44 FX_DWORD fill_color,
45 FX_DWORD stroke_color, 45 FX_DWORD stroke_color,
46 int fill_mode, 46 int fill_mode,
47 int alpha_flag = 0, 47 int alpha_flag = 0,
48 void* pIccTransform = NULL); 48 void* pIccTransform = NULL);
49 49
50 virtual FX_BOOL SetPixel(int x, 50 virtual FX_BOOL SetPixel(int x,
51 int y, 51 int y,
52 FX_DWORD color, 52 FX_DWORD color,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 int dest_width, 96 int dest_width,
97 int dest_height, 97 int dest_height,
98 const FX_RECT* pClipRect, 98 const FX_RECT* pClipRect,
99 FX_DWORD flags, 99 FX_DWORD flags,
100 int alpha_flag = 0, 100 int alpha_flag = 0,
101 void* pIccTransform = NULL); 101 void* pIccTransform = NULL);
102 102
103 virtual FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, 103 virtual FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap,
104 int bitmap_alpha, 104 int bitmap_alpha,
105 FX_DWORD color, 105 FX_DWORD color,
106 const CFX_AffineMatrix* pMatrix, 106 const CFX_Matrix* pMatrix,
107 FX_DWORD flags, 107 FX_DWORD flags,
108 void*& handle, 108 void*& handle,
109 int alpha_flag = 0, 109 int alpha_flag = 0,
110 void* pIccTransform = NULL); 110 void* pIccTransform = NULL);
111 virtual FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause); 111 virtual FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause);
112 virtual void CancelDIBits(void* handle); 112 virtual void CancelDIBits(void* handle);
113 113
114 virtual FX_BOOL DrawDeviceText(int nChars, 114 virtual FX_BOOL DrawDeviceText(int nChars,
115 const FXTEXT_CHARPOS* pCharPos, 115 const FXTEXT_CHARPOS* pCharPos,
116 CFX_Font* pFont, 116 CFX_Font* pFont,
117 CFX_FontCache* pCache, 117 CFX_FontCache* pCache,
118 const CFX_AffineMatrix* pObject2Device, 118 const CFX_Matrix* pObject2Device,
119 FX_FIXFLOAT font_size, 119 FX_FIXFLOAT font_size,
120 FX_DWORD color, 120 FX_DWORD color,
121 int alpha_flag = 0, 121 int alpha_flag = 0,
122 void* pIccTransform = NULL); 122 void* pIccTransform = NULL);
123 123
124 virtual FX_BOOL RenderRasterizer(rasterizer_scanline_aa& rasterizer, 124 virtual FX_BOOL RenderRasterizer(rasterizer_scanline_aa& rasterizer,
125 FX_DWORD color, 125 FX_DWORD color,
126 FX_BOOL bFullCover, 126 FX_BOOL bFullCover,
127 FX_BOOL bGroupKnockout, 127 FX_BOOL bGroupKnockout,
128 int alpha_flag, 128 int alpha_flag,
129 void* pIccTransform); 129 void* pIccTransform);
130 virtual FX_BOOL RenderRasterizerSkia(SkPath& skPath, 130 virtual FX_BOOL RenderRasterizerSkia(SkPath& skPath,
131 const SkPaint& origPaint, 131 const SkPaint& origPaint,
132 SkIRect& rect, 132 SkIRect& rect,
133 FX_DWORD color, 133 FX_DWORD color,
134 FX_BOOL bFullCover, 134 FX_BOOL bFullCover,
135 FX_BOOL bGroupKnockout, 135 FX_BOOL bGroupKnockout,
136 int alpha_flag, 136 int alpha_flag,
137 void* pIccTransform, 137 void* pIccTransform,
138 FX_BOOL bFill = TRUE); 138 FX_BOOL bFill = TRUE);
139 void SetClipMask(rasterizer_scanline_aa& rasterizer); 139 void SetClipMask(rasterizer_scanline_aa& rasterizer);
140 void SetClipMask(SkPath& skPath, SkPaint* spaint); 140 void SetClipMask(SkPath& skPath, SkPaint* spaint);
141 virtual uint8_t* GetBuffer() const { return m_pAggDriver->GetBuffer(); } 141 virtual uint8_t* GetBuffer() const { return m_pAggDriver->GetBuffer(); }
142 142
143 CFX_AggDeviceDriver* m_pAggDriver; 143 CFX_AggDeviceDriver* m_pAggDriver;
144 }; 144 };
145 #endif // defined(_SKIA_SUPPORT_) 145 #endif // defined(_SKIA_SUPPORT_)
146 146
147 #endif // CORE_SRC_FXGE_SKIA_FX_SKIA_DEVICE_H_ 147 #endif // CORE_SRC_FXGE_SKIA_FX_SKIA_DEVICE_H_
OLDNEW
« no previous file with comments | « core/src/fxge/ge/fx_ge_text.cpp ('k') | core/src/fxge/skia/fx_skia_device.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698