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

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

Issue 2032613003: Get rid of NULLs in core/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: s/NULL/nullptr/ Created 4 years, 6 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_FXGE_SKIA_FX_SKIA_DEVICE_H_ 5 #ifndef CORE_FXGE_SKIA_FX_SKIA_DEVICE_H_
6 #define CORE_FXGE_SKIA_FX_SKIA_DEVICE_H_ 6 #define CORE_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;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 override; 46 override;
47 47
48 /** Draw a path */ 48 /** Draw a path */
49 FX_BOOL DrawPath(const CFX_PathData* pPathData, 49 FX_BOOL DrawPath(const CFX_PathData* pPathData,
50 const CFX_Matrix* pObject2Device, 50 const CFX_Matrix* pObject2Device,
51 const CFX_GraphStateData* pGraphState, 51 const CFX_GraphStateData* pGraphState,
52 uint32_t fill_color, 52 uint32_t fill_color,
53 uint32_t stroke_color, 53 uint32_t stroke_color,
54 int fill_mode, 54 int fill_mode,
55 int alpha_flag = 0, 55 int alpha_flag = 0,
56 void* pIccTransform = NULL, 56 void* pIccTransform = nullptr,
57 int blend_type = FXDIB_BLEND_NORMAL) override; 57 int blend_type = FXDIB_BLEND_NORMAL) override;
58 58
59 FX_BOOL FillRect(const FX_RECT* pRect, 59 FX_BOOL FillRect(const FX_RECT* pRect,
60 uint32_t fill_color, 60 uint32_t fill_color,
61 int alpha_flag = 0, 61 int alpha_flag = 0,
62 void* pIccTransform = NULL, 62 void* pIccTransform = nullptr,
63 int blend_type = FXDIB_BLEND_NORMAL) override; 63 int blend_type = FXDIB_BLEND_NORMAL) override;
64 64
65 /** Draw a single pixel (device dependant) line */ 65 /** Draw a single pixel (device dependant) line */
66 FX_BOOL DrawCosmeticLine(FX_FLOAT x1, 66 FX_BOOL DrawCosmeticLine(FX_FLOAT x1,
67 FX_FLOAT y1, 67 FX_FLOAT y1,
68 FX_FLOAT x2, 68 FX_FLOAT x2,
69 FX_FLOAT y2, 69 FX_FLOAT y2,
70 uint32_t color, 70 uint32_t color,
71 int alpha_flag = 0, 71 int alpha_flag = 0,
72 void* pIccTransform = NULL, 72 void* pIccTransform = nullptr,
73 int blend_type = FXDIB_BLEND_NORMAL) override { 73 int blend_type = FXDIB_BLEND_NORMAL) override {
74 return FALSE; 74 return FALSE;
75 } 75 }
76 76
77 FX_BOOL GetClipBox(FX_RECT* pRect) override; 77 FX_BOOL GetClipBox(FX_RECT* pRect) override;
78 78
79 /** Load device buffer into a DIB */ 79 /** Load device buffer into a DIB */
80 FX_BOOL GetDIBits(CFX_DIBitmap* pBitmap, 80 FX_BOOL GetDIBits(CFX_DIBitmap* pBitmap,
81 int left, 81 int left,
82 int top, 82 int top,
83 void* pIccTransform = NULL, 83 void* pIccTransform = nullptr,
84 FX_BOOL bDEdge = FALSE) override; 84 FX_BOOL bDEdge = FALSE) override;
85 85
86 CFX_DIBitmap* GetBackDrop() override { return m_pOriDevice; } 86 CFX_DIBitmap* GetBackDrop() override { return m_pOriDevice; }
87 87
88 FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, 88 FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap,
89 uint32_t color, 89 uint32_t color,
90 const FX_RECT* pSrcRect, 90 const FX_RECT* pSrcRect,
91 int dest_left, 91 int dest_left,
92 int dest_top, 92 int dest_top,
93 int blend_type, 93 int blend_type,
94 int alpha_flag = 0, 94 int alpha_flag = 0,
95 void* pIccTransform = NULL) override; 95 void* pIccTransform = nullptr) override;
96 FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, 96 FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap,
97 uint32_t color, 97 uint32_t color,
98 int dest_left, 98 int dest_left,
99 int dest_top, 99 int dest_top,
100 int dest_width, 100 int dest_width,
101 int dest_height, 101 int dest_height,
102 const FX_RECT* pClipRect, 102 const FX_RECT* pClipRect,
103 uint32_t flags, 103 uint32_t flags,
104 int alpha_flag = 0, 104 int alpha_flag = 0,
105 void* pIccTransform = NULL, 105 void* pIccTransform = nullptr,
106 int blend_type = FXDIB_BLEND_NORMAL) override; 106 int blend_type = FXDIB_BLEND_NORMAL) override;
107 107
108 FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, 108 FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap,
109 int bitmap_alpha, 109 int bitmap_alpha,
110 uint32_t color, 110 uint32_t color,
111 const CFX_Matrix* pMatrix, 111 const CFX_Matrix* pMatrix,
112 uint32_t flags, 112 uint32_t flags,
113 void*& handle, 113 void*& handle,
114 int alpha_flag = 0, 114 int alpha_flag = 0,
115 void* pIccTransform = NULL, 115 void* pIccTransform = nullptr,
116 int blend_type = FXDIB_BLEND_NORMAL) override; 116 int blend_type = FXDIB_BLEND_NORMAL) override;
117 FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause) override; 117 FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause) override;
118 void CancelDIBits(void* handle) override; 118 void CancelDIBits(void* handle) override;
119 119
120 FX_BOOL DrawDeviceText(int nChars, 120 FX_BOOL DrawDeviceText(int nChars,
121 const FXTEXT_CHARPOS* pCharPos, 121 const FXTEXT_CHARPOS* pCharPos,
122 CFX_Font* pFont, 122 CFX_Font* pFont,
123 CFX_FontCache* pCache, 123 CFX_FontCache* pCache,
124 const CFX_Matrix* pObject2Device, 124 const CFX_Matrix* pObject2Device,
125 FX_FLOAT font_size, 125 FX_FLOAT font_size,
126 uint32_t color, 126 uint32_t color,
127 int alpha_flag = 0, 127 int alpha_flag = 0,
128 void* pIccTransform = NULL) override; 128 void* pIccTransform = nullptr) override;
129 129
130 FX_BOOL DrawShading(const CPDF_ShadingPattern* pPattern, 130 FX_BOOL DrawShading(const CPDF_ShadingPattern* pPattern,
131 const CFX_Matrix* pMatrix, 131 const CFX_Matrix* pMatrix,
132 const FX_RECT& clip_rect, 132 const FX_RECT& clip_rect,
133 int alpha, 133 int alpha,
134 FX_BOOL bAlphaMode) override; 134 FX_BOOL bAlphaMode) override;
135 135
136 virtual uint8_t* GetBuffer() const { return m_pBitmap->GetBuffer(); } 136 virtual uint8_t* GetBuffer() const { return m_pBitmap->GetBuffer(); }
137 void PaintStroke(SkPaint* spaint, 137 void PaintStroke(SkPaint* spaint,
138 const CFX_GraphStateData* pGraphState, 138 const CFX_GraphStateData* pGraphState,
139 const SkMatrix& matrix); 139 const SkMatrix& matrix);
140 SkPictureRecorder* GetRecorder() const { return m_pRecorder; } 140 SkPictureRecorder* GetRecorder() const { return m_pRecorder; }
141 141
142 private: 142 private:
143 CFX_DIBitmap* m_pBitmap; 143 CFX_DIBitmap* m_pBitmap;
144 CFX_DIBitmap* m_pOriDevice; 144 CFX_DIBitmap* m_pOriDevice;
145 SkCanvas* m_pCanvas; 145 SkCanvas* m_pCanvas;
146 SkPictureRecorder* const m_pRecorder; 146 SkPictureRecorder* const m_pRecorder;
147 FX_BOOL m_bRgbByteOrder; 147 FX_BOOL m_bRgbByteOrder;
148 FX_BOOL m_bGroupKnockout; 148 FX_BOOL m_bGroupKnockout;
149 }; 149 };
150 #endif // defined(_SKIA_SUPPORT_) 150 #endif // defined(_SKIA_SUPPORT_)
151 151
152 #endif // CORE_FXGE_SKIA_FX_SKIA_DEVICE_H_ 152 #endif // CORE_FXGE_SKIA_FX_SKIA_DEVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698