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

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

Issue 1252613002: FX_BOOL considered harmful. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Manual edits. Created 5 years, 5 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
« no previous file with comments | « core/src/fxge/skia/fx_skia_blitter_new.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 { 10 {
11 public: 11 public:
12 » CFX_SkiaDeviceDriver(CFX_DIBitmap* pBitmap, int dither_bits, FX_BOOL bRg bByteOrder, CFX_DIBitmap* pOriDevice, FX_BOOL bGroupKnockout); 12 » CFX_SkiaDeviceDriver(CFX_DIBitmap* pBitmap, int dither_bits, bool bRgbBy teOrder, CFX_DIBitmap* pOriDevice, bool bGroupKnockout);
13 virtual ~CFX_SkiaDeviceDriver(); 13 virtual ~CFX_SkiaDeviceDriver();
14 14
15 /** Options */ 15 /** Options */
16 virtual int GetDeviceCaps(int caps_id); 16 virtual int GetDeviceCaps(int caps_id);
17 17
18 /** Save and restore all graphic states */ 18 /** Save and restore all graphic states */
19 virtual void SaveState(); 19 virtual void SaveState();
20 » virtual void» » RestoreState(FX_BOOL bKeepSaved); 20 » virtual void» » RestoreState(bool bKeepSaved);
21 21
22 /** Set clipping path using filled region */ 22 /** Set clipping path using filled region */
23 » virtual FX_BOOL»» SetClip_PathFill(const CFX_PathData* pPathData,» // path info 23 » virtual bool» » SetClip_PathFill(const CFX_PathData* pPathData,» // path info
24 const CFX_AffineMatrix* pObject2Device, // optional transformation 24 const CFX_AffineMatrix* pObject2Device, // optional transformation
25 int fill_mode // fill mode, WINDING or ALTERNATE 25 int fill_mode // fill mode, WINDING or ALTERNATE
26 ); 26 );
27 27
28 /** Set clipping path using stroked region */ 28 /** Set clipping path using stroked region */
29 » virtual FX_BOOL»» SetClip_PathStroke(const CFX_PathData* pPathData ,» // path info 29 » virtual bool» » SetClip_PathStroke(const CFX_PathData* pPathData ,» // path info
30 const CFX_AffineMatrix* pObject2Device, // optional transformation 30 const CFX_AffineMatrix* pObject2Device, // optional transformation
31 const CFX_GraphStateData * pGraphState // graphic state, for pen attributes 31 const CFX_GraphStateData * pGraphState // graphic state, for pen attributes
32 ); 32 );
33 33
34 /** Draw a path */ 34 /** Draw a path */
35 » virtual FX_BOOL»» DrawPath(const CFX_PathData* pPathData, 35 » virtual bool» » DrawPath(const CFX_PathData* pPathData,
36 const CFX_AffineMatrix* pObject2 Device, 36 const CFX_AffineMatrix* pObject2 Device,
37 const CFX_GraphStateData* pGraph State, 37 const CFX_GraphStateData* pGraph State,
38 FX_DWORD fill_color, 38 FX_DWORD fill_color,
39 FX_DWORD stroke_color, 39 FX_DWORD stroke_color,
40 int fill_mode, 40 int fill_mode,
41 int alpha_flag = 0, 41 int alpha_flag = 0,
42 void* pIccTransform = NULL 42 void* pIccTransform = NULL
43 ); 43 );
44 44
45 » virtual FX_BOOL»» SetPixel(int x, int y, FX_DWORD color, 45 » virtual bool» » SetPixel(int x, int y, FX_DWORD color,
46 int alpha_flag = 0, void* pIccTr ansform = NULL); 46 int alpha_flag = 0, void* pIccTr ansform = NULL);
47 47
48 » virtual FX_BOOL»» FillRect(const FX_RECT* pRect, FX_DWORD fill_col or, 48 » virtual bool» » FillRect(const FX_RECT* pRect, FX_DWORD fill_col or,
49 int alpha_flag = 0, void* pIccTr ansform = NULL); 49 int alpha_flag = 0, void* pIccTr ansform = NULL);
50 50
51 /** Draw a single pixel (device dependant) line */ 51 /** Draw a single pixel (device dependant) line */
52 » virtual FX_BOOL»» DrawCosmeticLine(FX_FIXFLOAT x1, FX_FIXFLOAT y1, FX_FIXFLOAT x2, FX_FIXFLOAT y2, FX_DWORD color, 52 » virtual bool» » DrawCosmeticLine(FX_FIXFLOAT x1, FX_FIXFLOAT y1, FX_FIXFLOAT x2, FX_FIXFLOAT y2, FX_DWORD color,
53 » » » » » » » int alpha_flag, void* pI ccTransform, int blend_type) { return FALSE; } 53 » » » » » » » int alpha_flag, void* pI ccTransform, int blend_type) { return false; }
54 54
55 » virtual FX_BOOL»» GetClipBox(FX_RECT* pRect); 55 » virtual bool» » GetClipBox(FX_RECT* pRect);
56 56
57 /** Load device buffer into a DIB */ 57 /** Load device buffer into a DIB */
58 » virtual FX_BOOL»» GetDIBits(CFX_DIBitmap* pBitmap, int left, int t op, void* pIccTransform = NULL, FX_BOOL bDEdge = FALSE); 58 » virtual bool» » GetDIBits(CFX_DIBitmap* pBitmap, int left, int t op, void* pIccTransform = NULL, bool bDEdge = false);
59 59
60 virtual CFX_DIBitmap* GetBackDrop() { return m_pAggDriver->GetBackDrop (); } 60 virtual CFX_DIBitmap* GetBackDrop() { return m_pAggDriver->GetBackDrop (); }
61 61
62 » virtual FX_BOOL»» SetDIBits(const CFX_DIBSource* pBitmap, FX_DWORD color, const FX_RECT* pSrcRect, 62 » virtual bool» » SetDIBits(const CFX_DIBSource* pBitmap, FX_DWORD color, const FX_RECT* pSrcRect,
63 int dest_left, int dest_top, int blend_type, 63 int dest_left, int dest_top, int blend_type,
64 int alpha_flag = 0, void* pIccTr ansform = NULL); 64 int alpha_flag = 0, void* pIccTr ansform = NULL);
65 » virtual FX_BOOL»» StretchDIBits(const CFX_DIBSource* pBitmap, FX_D WORD color, int dest_left, int dest_top, 65 » virtual bool» » StretchDIBits(const CFX_DIBSource* pBitmap, FX_D WORD color, int dest_left, int dest_top,
66 int dest_width, int dest_height, const FX_RECT* pClipRect, FX_DWORD flags, 66 int dest_width, int dest_height, const FX_RECT* pClipRect, FX_DWORD flags,
67 int alpha_flag = 0, void* pIccTransform = NULL); 67 int alpha_flag = 0, void* pIccTransform = NULL);
68 68
69 » virtual FX_BOOL»» StartDIBits(const CFX_DIBSource* pBitmap, int bi tmap_alpha, FX_DWORD color, 69 » virtual bool» » StartDIBits(const CFX_DIBSource* pBitmap, int bi tmap_alpha, FX_DWORD color,
70 const CFX_AffineMatrix* pMatrix, FX_DWORD flags, void*& handle, 70 const CFX_AffineMatrix* pMatrix, FX_DWORD flags, void*& handle,
71 int alpha_flag = 0, void* pIccTransform = NULL); 71 int alpha_flag = 0, void* pIccTransform = NULL);
72 » virtual FX_BOOL»» ContinueDIBits(void* handle, IFX_Pause* pPause); 72 » virtual bool» » ContinueDIBits(void* handle, IFX_Pause* pPause);
73 virtual void CancelDIBits(void* handle); 73 virtual void CancelDIBits(void* handle);
74 74
75 » virtual FX_BOOL DrawDeviceText(int nChars, const FXTEXT_CHARPOS* pCh arPos, CFX_Font* pFont, 75 » virtual bool DrawDeviceText(int nChars, const FXTEXT_CHARPOS* pCharP os, CFX_Font* pFont,
76 CFX_FontCache* pCache, const CFX _AffineMatrix* pObject2Device, FX_FIXFLOAT font_size, FX_DWORD color, 76 CFX_FontCache* pCache, const CFX _AffineMatrix* pObject2Device, FX_FIXFLOAT font_size, FX_DWORD color,
77 int alpha_flag = 0, void* pIccTr ansform = NULL); 77 int alpha_flag = 0, void* pIccTr ansform = NULL);
78 78
79 » virtual FX_BOOL»» RenderRasterizer(rasterizer_scanline_aa& rasteri zer, FX_DWORD color, FX_BOOL bFullCover, FX_BOOL bGroupKnockout, 79 » virtual bool» » RenderRasterizer(rasterizer_scanline_aa& rasteri zer, FX_DWORD color, bool bFullCover, bool bGroupKnockout,
80 int alpha_flag, void* pI ccTransform); 80 int alpha_flag, void* pI ccTransform);
81 » virtual FX_BOOL»» RenderRasterizerSkia(SkPath& skPath, const SkPai nt& origPaint, SkIRect& rect, FX_DWORD color, FX_BOOL bFullCover, FX_BOOL bGroup Knockout, 81 » virtual bool» » RenderRasterizerSkia(SkPath& skPath, const SkPai nt& origPaint, SkIRect& rect, FX_DWORD color, bool bFullCover, bool bGroupKnocko ut,
82 » » » » » » » int alpha_flag, void* pI ccTransform, FX_BOOL bFill = TRUE); 82 » » » » » » » int alpha_flag, void* pI ccTransform, bool bFill = true);
83 void SetClipMask(rasterizer_scanline_aa& rast erizer); 83 void SetClipMask(rasterizer_scanline_aa& rast erizer);
84 void SetClipMask(SkPath& skPath, SkPaint* spa int); 84 void SetClipMask(SkPath& skPath, SkPaint* spa int);
85 virtual uint8_t* GetBuffer() const {return m_pAggDriver->GetBuffe r();} 85 virtual uint8_t* GetBuffer() const {return m_pAggDriver->GetBuffe r();}
86 86
87 CFX_AggDeviceDriver* m_pAggDriver; 87 CFX_AggDeviceDriver* m_pAggDriver;
88 }; 88 };
89 #endif // defined(_SKIA_SUPPORT_) 89 #endif // defined(_SKIA_SUPPORT_)
90 90
91 #endif // CORE_SRC_FXGE_SKIA_FX_SKIA_DEVICE_H_ 91 #endif // CORE_SRC_FXGE_SKIA_FX_SKIA_DEVICE_H_
OLDNEW
« no previous file with comments | « core/src/fxge/skia/fx_skia_blitter_new.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