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

Side by Side Diff: core/src/fxge/agg/include/fx_agg_driver.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/fxcrt/xml_int.h ('k') | core/src/fxge/agg/src/fx_agg_driver.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 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef FX_AGG_DRIVER_H_ 7 #ifndef FX_AGG_DRIVER_H_
8 #define FX_AGG_DRIVER_H_ 8 #define FX_AGG_DRIVER_H_
9 9
10 #include "../../../../../third_party/agg23/agg_clip_liang_barsky.h" 10 #include "../../../../../third_party/agg23/agg_clip_liang_barsky.h"
11 #include "../../../../../third_party/agg23/agg_path_storage.h" 11 #include "../../../../../third_party/agg23/agg_path_storage.h"
12 #include "../../../../../third_party/agg23/agg_rasterizer_scanline_aa.h" 12 #include "../../../../../third_party/agg23/agg_rasterizer_scanline_aa.h"
13 13
14 class CAgg_PathData 14 class CAgg_PathData
15 { 15 {
16 public: 16 public:
17 CAgg_PathData() {} 17 CAgg_PathData() {}
18 ~CAgg_PathData() {} 18 ~CAgg_PathData() {}
19 FX_NAMESPACE_DECLARE(agg, path_storage) m_PathData; 19 FX_NAMESPACE_DECLARE(agg, path_storage) m_PathData;
20 void BuildPath(const CFX_PathData* pPathData, const C FX_AffineMatrix* pObject2Device); 20 void BuildPath(const CFX_PathData* pPathData, const C FX_AffineMatrix* pObject2Device);
21 }; 21 };
22 class CFX_AggDeviceDriver : public IFX_RenderDeviceDriver 22 class CFX_AggDeviceDriver : public IFX_RenderDeviceDriver
23 { 23 {
24 public: 24 public:
25 CFX_AggDeviceDriver(CFX_DIBitmap* pBitmap, int dither_bits, FX_BOOL bRgbByte Order, CFX_DIBitmap* pOriDevice, FX_BOOL bGroupKnockout); 25 CFX_AggDeviceDriver(CFX_DIBitmap* pBitmap, int dither_bits, bool bRgbByteOrd er, CFX_DIBitmap* pOriDevice, bool bGroupKnockout);
26 virtual ~CFX_AggDeviceDriver(); 26 virtual ~CFX_AggDeviceDriver();
27 void InitPlatform(); 27 void InitPlatform();
28 void DestroyPlatform(); 28 void DestroyPlatform();
29 29
30 30
31 virtual int GetDeviceCaps(int caps_id); 31 virtual int GetDeviceCaps(int caps_id);
32 32
33 33
34 virtual void SaveState(); 34 virtual void SaveState();
35 virtual void» » RestoreState(FX_BOOL bKeepSaved); 35 virtual void» » RestoreState(bool bKeepSaved);
36 36
37 37
38 virtual FX_BOOL» » SetClip_PathFill(const CFX_PathData* pPathData, 38 virtual bool» » SetClip_PathFill(const CFX_PathData* pPathData,
39 const CFX_AffineMatrix* pObject2Device, 39 const CFX_AffineMatrix* pObject2Device,
40 int fill_mode 40 int fill_mode
41 ); 41 );
42 42
43 43
44 virtual FX_BOOL» » SetClip_PathStroke(const CFX_PathData* pPathData , 44 virtual bool» » SetClip_PathStroke(const CFX_PathData* pPathData ,
45 const CFX_AffineMatrix* pObject2Devic e, 45 const CFX_AffineMatrix* pObject2Devic e,
46 const CFX_GraphStateData* pGraphState 46 const CFX_GraphStateData* pGraphState
47 ); 47 );
48 48
49 49
50 virtual FX_BOOL» » DrawPath(const CFX_PathData* pPathData, 50 virtual bool» » DrawPath(const CFX_PathData* pPathData,
51 const CFX_AffineMatrix* pObject2Device, 51 const CFX_AffineMatrix* pObject2Device,
52 const CFX_GraphStateData* pGraphState, 52 const CFX_GraphStateData* pGraphState,
53 FX_DWORD fill_color, 53 FX_DWORD fill_color,
54 FX_DWORD stroke_color, 54 FX_DWORD stroke_color,
55 int fill_mode, 55 int fill_mode,
56 int alpha_flag, 56 int alpha_flag,
57 void* pIccTransform, 57 void* pIccTransform,
58 int blend_type 58 int blend_type
59 ); 59 );
60 60
61 virtual FX_BOOL» » SetPixel(int x, int y, FX_DWORD color, 61 virtual bool» » SetPixel(int x, int y, FX_DWORD color,
62 int alpha_flag, void* pIccTransform); 62 int alpha_flag, void* pIccTransform);
63 63
64 virtual FX_BOOL» » FillRect(const FX_RECT* pRect, 64 virtual bool» » FillRect(const FX_RECT* pRect,
65 FX_DWORD fill_color, int alpha_flag, void* pIcc Transform, int blend_type); 65 FX_DWORD fill_color, int alpha_flag, void* pIcc Transform, int blend_type);
66 66
67 67
68 virtual FX_BOOL» » DrawCosmeticLine(FX_FLOAT x1, FX_FLOAT y1, FX_FL OAT x2, FX_FLOAT y2, FX_DWORD color, 68 virtual bool» » DrawCosmeticLine(FX_FLOAT x1, FX_FLOAT y1, FX_FL OAT x2, FX_FLOAT y2, FX_DWORD color,
69 int alpha_flag, void* pIccTransform, in t blend_type) 69 int alpha_flag, void* pIccTransform, in t blend_type)
70 { 70 {
71 return FALSE; 71 return false;
72 } 72 }
73 73
74 virtual FX_BOOL» » GetClipBox(FX_RECT* pRect); 74 virtual bool» » GetClipBox(FX_RECT* pRect);
75 75
76 76
77 virtual FX_BOOL» » GetDIBits(CFX_DIBitmap* pBitmap, int left, int t op, void* pIccTransform = NULL, FX_BOOL bDEdge = FALSE); 77 virtual bool» » GetDIBits(CFX_DIBitmap* pBitmap, int left, int t op, void* pIccTransform = NULL, bool bDEdge = false);
78 virtual CFX_DIBitmap* GetBackDrop() 78 virtual CFX_DIBitmap* GetBackDrop()
79 { 79 {
80 return m_pOriDevice; 80 return m_pOriDevice;
81 } 81 }
82 82
83 virtual FX_BOOL» » SetDIBits(const CFX_DIBSource* pBitmap, FX_DWORD color, const FX_RECT* pSrcRect, int left, int top, int blend_type, 83 virtual bool» » SetDIBits(const CFX_DIBSource* pBitmap, FX_DWORD color, const FX_RECT* pSrcRect, int left, int top, int blend_type,
84 int alpha_flag, void* pIccTransform); 84 int alpha_flag, void* pIccTransform);
85 virtual FX_BOOL» » StretchDIBits(const CFX_DIBSource* pBitmap, FX_D WORD color, int dest_left, int dest_top, 85 virtual bool» » StretchDIBits(const CFX_DIBSource* pBitmap, FX_D WORD color, int dest_left, int dest_top,
86 int dest_width, int dest_height, const FX_ RECT* pClipRect, FX_DWORD flags, 86 int dest_width, int dest_height, const FX_ RECT* pClipRect, FX_DWORD flags,
87 int alpha_flag, void* pIccTransform, int b lend_type); 87 int alpha_flag, void* pIccTransform, int b lend_type);
88 88
89 virtual FX_BOOL» » StartDIBits(const CFX_DIBSource* pBitmap, int bi tmap_alpha, FX_DWORD color, 89 virtual bool» » StartDIBits(const CFX_DIBSource* pBitmap, int bi tmap_alpha, FX_DWORD color,
90 const CFX_AffineMatrix* pMatrix, FX_DWORD fl ags, void*& handle, 90 const CFX_AffineMatrix* pMatrix, FX_DWORD fl ags, void*& handle,
91 int alpha_flag, void* pIccTransform, int ble nd_type); 91 int alpha_flag, void* pIccTransform, int ble nd_type);
92 virtual FX_BOOL» » ContinueDIBits(void* handle, IFX_Pause* pPause); 92 virtual bool» » ContinueDIBits(void* handle, IFX_Pause* pPause);
93 virtual void CancelDIBits(void* handle); 93 virtual void CancelDIBits(void* handle);
94 94
95 virtual FX_BOOL DrawDeviceText(int nChars, const FXTEXT_CHARPOS* pCharPo s, CFX_Font* pFont, 95 virtual bool DrawDeviceText(int nChars, const FXTEXT_CHARPOS* pCharPos, CFX_Font* pFont,
96 CFX_FontCache* pCache, const CFX_AffineMa trix* pObject2Device, FX_FLOAT font_size, FX_DWORD color, 96 CFX_FontCache* pCache, const CFX_AffineMa trix* pObject2Device, FX_FLOAT font_size, FX_DWORD color,
97 int alpha_flag, void* pIccTransform); 97 int alpha_flag, void* pIccTransform);
98 virtual FX_BOOL» » RenderRasterizer(FX_NAMESPACE_DECLARE(agg, raste rizer_scanline_aa)& rasterizer, FX_DWORD color, FX_BOOL bFullCover, FX_BOOL bGro upKnockout, 98 virtual bool» » RenderRasterizer(FX_NAMESPACE_DECLARE(agg, raste rizer_scanline_aa)& rasterizer, FX_DWORD color, bool bFullCover, bool bGroupKnoc kout,
99 int alpha_flag, void* pIccTransform); 99 int alpha_flag, void* pIccTransform);
100 100
101 void SetClipMask(FX_NAMESPACE_DECLARE(agg, ra sterizer_scanline_aa)& rasterizer); 101 void SetClipMask(FX_NAMESPACE_DECLARE(agg, ra sterizer_scanline_aa)& rasterizer);
102 102
103 virtual uint8_t* GetBuffer() const 103 virtual uint8_t* GetBuffer() const
104 { 104 {
105 return m_pBitmap->GetBuffer(); 105 return m_pBitmap->GetBuffer();
106 } 106 }
107 virtual int GetDriverType() 107 virtual int GetDriverType()
108 { 108 {
109 return 1; 109 return 1;
110 } 110 }
111 111
112 CFX_DIBitmap* m_pBitmap; 112 CFX_DIBitmap* m_pBitmap;
113 CFX_ClipRgn* m_pClipRgn; 113 CFX_ClipRgn* m_pClipRgn;
114 CFX_PtrArray m_StateStack; 114 CFX_PtrArray m_StateStack;
115 void* m_pPlatformGraphics; 115 void* m_pPlatformGraphics;
116 void* m_pPlatformBitmap; 116 void* m_pPlatformBitmap;
117 void* m_pDwRenderTartget; 117 void* m_pDwRenderTartget;
118 int m_FillFlags; 118 int m_FillFlags;
119 int m_DitherBits; 119 int m_DitherBits;
120 FX_BOOL» » » » m_bRgbByteOrder; 120 bool» » » » m_bRgbByteOrder;
121 CFX_DIBitmap* m_pOriDevice; 121 CFX_DIBitmap* m_pOriDevice;
122 FX_BOOL m_bGroupKnockout; 122 bool m_bGroupKnockout;
123 }; 123 };
124 124
125 #endif // FX_AGG_DRIVER_H_ 125 #endif // FX_AGG_DRIVER_H_
OLDNEW
« no previous file with comments | « core/src/fxcrt/xml_int.h ('k') | core/src/fxge/agg/src/fx_agg_driver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698