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

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

Issue 2504863003: fix corpus tests (Closed)
Patch Set: merge with tot Created 4 years, 1 month 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/fxge/ge/cfx_renderdevice.cpp ('k') | core/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_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_ || defined _SKIA_SUPPORT_PATHS_ 8 #if defined _SKIA_SUPPORT_ || defined _SKIA_SUPPORT_PATHS_
9 9
10 #include "core/fxge/cfx_pathdata.h" 10 #include "core/fxge/cfx_pathdata.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 int dest_left, 86 int dest_left,
87 int dest_top, 87 int dest_top,
88 int blend_type) override; 88 int blend_type) override;
89 #ifdef _SKIA_SUPPORT_ 89 #ifdef _SKIA_SUPPORT_
90 bool SetBitsWithMask(const CFX_DIBSource* pBitmap, 90 bool SetBitsWithMask(const CFX_DIBSource* pBitmap,
91 const CFX_DIBSource* pMask, 91 const CFX_DIBSource* pMask,
92 int dest_left, 92 int dest_left,
93 int dest_top, 93 int dest_top,
94 int bitmap_alpha, 94 int bitmap_alpha,
95 int blend_type) override; 95 int blend_type) override;
96 #else 96 #endif
97
98 #ifdef _SKIA_SUPPORT_PATHS_
97 void SetClipMask(const FX_RECT& clipBox, const SkPath& skClipPath); 99 void SetClipMask(const FX_RECT& clipBox, const SkPath& skClipPath);
98 #endif 100 #endif
99 101
100 bool StretchDIBits(const CFX_DIBSource* pBitmap, 102 bool StretchDIBits(const CFX_DIBSource* pBitmap,
101 uint32_t color, 103 uint32_t color,
102 int dest_left, 104 int dest_left,
103 int dest_top, 105 int dest_top,
104 int dest_width, 106 int dest_width,
105 int dest_height, 107 int dest_height,
106 const FX_RECT* pClipRect, 108 const FX_RECT* pClipRect,
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 144
143 virtual uint8_t* GetBuffer() const; 145 virtual uint8_t* GetBuffer() const;
144 146
145 void PaintStroke(SkPaint* spaint, 147 void PaintStroke(SkPaint* spaint,
146 const CFX_GraphStateData* pGraphState, 148 const CFX_GraphStateData* pGraphState,
147 const SkMatrix& matrix); 149 const SkMatrix& matrix);
148 void Clear(uint32_t color); 150 void Clear(uint32_t color);
149 void Flush(); 151 void Flush();
150 SkPictureRecorder* GetRecorder() const { return m_pRecorder; } 152 SkPictureRecorder* GetRecorder() const { return m_pRecorder; }
151 static void PreMultiply(CFX_DIBitmap* pDIBitmap); 153 static void PreMultiply(CFX_DIBitmap* pDIBitmap);
154 #ifdef _SKIA_SUPPORT_PATHS_
155 void UnPreMultiplyDevice();
156 void UnPreMultiply(CFX_DIBitmap* pDIBitmap);
157 #endif
152 SkCanvas* SkiaCanvas() { return m_pCanvas; } 158 SkCanvas* SkiaCanvas() { return m_pCanvas; }
153 void DebugVerifyBitmapIsPreMultiplied() const; 159 void DebugVerifyBitmapIsPreMultiplied() const;
154 void Dump() const; 160 void Dump() const;
155 161
156 private: 162 private:
157 friend class SkiaState; 163 friend class SkiaState;
158 164
159 CFX_DIBitmap* m_pBitmap; 165 CFX_DIBitmap* m_pBitmap;
160 CFX_DIBitmap* m_pOriDevice; 166 CFX_DIBitmap* m_pOriDevice;
161 SkCanvas* m_pCanvas; 167 SkCanvas* m_pCanvas;
162 SkPictureRecorder* const m_pRecorder; 168 SkPictureRecorder* const m_pRecorder;
163 std::unique_ptr<SkiaState> m_pCache; 169 std::unique_ptr<SkiaState> m_pCache;
164 #ifndef _SKIA_SUPPORT_ 170 #ifdef _SKIA_SUPPORT_PATHS_
165 std::unique_ptr<CFX_ClipRgn> m_pClipRgn; 171 std::unique_ptr<CFX_ClipRgn> m_pClipRgn;
166 std::vector<std::unique_ptr<CFX_ClipRgn>> m_StateStack; 172 std::vector<std::unique_ptr<CFX_ClipRgn>> m_StateStack;
167 int m_FillFlags; 173 int m_FillFlags;
168 bool m_bRgbByteOrder; 174 bool m_bRgbByteOrder;
169 #endif 175 #endif
170 bool m_bGroupKnockout; 176 bool m_bGroupKnockout;
171 }; 177 };
172 #endif // defined(_SKIA_SUPPORT_) 178 #endif // defined(_SKIA_SUPPORT_)
173 179
174 #endif // CORE_FXGE_SKIA_FX_SKIA_DEVICE_H_ 180 #endif // CORE_FXGE_SKIA_FX_SKIA_DEVICE_H_
OLDNEW
« no previous file with comments | « core/fxge/ge/cfx_renderdevice.cpp ('k') | core/fxge/skia/fx_skia_device.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698