OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkCoreBlitters_DEFINED | 8 #ifndef SkCoreBlitters_DEFINED |
9 #define SkCoreBlitters_DEFINED | 9 #define SkCoreBlitters_DEFINED |
10 | 10 |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
163 class SkARGB32_Shader_Blitter : public SkShaderBlitter { | 163 class SkARGB32_Shader_Blitter : public SkShaderBlitter { |
164 public: | 164 public: |
165 SkARGB32_Shader_Blitter(const SkPixmap& device, const SkPaint& paint, | 165 SkARGB32_Shader_Blitter(const SkPixmap& device, const SkPaint& paint, |
166 SkShader::Context* shaderContext); | 166 SkShader::Context* shaderContext); |
167 virtual ~SkARGB32_Shader_Blitter(); | 167 virtual ~SkARGB32_Shader_Blitter(); |
168 void blitH(int x, int y, int width) override; | 168 void blitH(int x, int y, int width) override; |
169 void blitV(int x, int y, int height, SkAlpha alpha) override; | 169 void blitV(int x, int y, int height, SkAlpha alpha) override; |
170 void blitRect(int x, int y, int width, int height) override; | 170 void blitRect(int x, int y, int width, int height) override; |
171 void blitAntiH(int x, int y, const SkAlpha[], const int16_t[]) override; | 171 void blitAntiH(int x, int y, const SkAlpha[], const int16_t[]) override; |
172 void blitMask(const SkMask&, const SkIRect&) override; | 172 void blitMask(const SkMask&, const SkIRect&) override; |
173 | 173 |
174 private: | 174 private: |
175 SkXfermode* fXfermode; | 175 SkXfermode* fXfermode; |
176 SkPMColor* fBuffer; | 176 SkPMColor* fBuffer; |
177 SkBlitRow::Proc32 fProc32; | 177 SkBlitRow::Proc32 fProc32; |
178 SkBlitRow::Proc32 fProc32Blend; | 178 SkBlitRow::Proc32 fProc32Blend; |
179 bool fShadeDirectlyIntoDevice; | 179 bool fShadeDirectlyIntoDevice; |
180 bool fConstInY; | 180 bool fConstInY; |
181 | 181 |
182 // illegal | 182 // illegal |
183 SkARGB32_Shader_Blitter& operator=(const SkARGB32_Shader_Blitter&); | 183 SkARGB32_Shader_Blitter& operator=(const SkARGB32_Shader_Blitter&); |
184 | |
185 typedef SkShaderBlitter INHERITED; | |
186 }; | |
184 | 187 |
185 typedef SkShaderBlitter INHERITED; | 188 class SkARGB32_Shader4f_Blitter : public SkARGB32_Shader_Blitter { |
189 public: | |
190 SkARGB32_Shader4f_Blitter(const SkPixmap& device, const SkPaint& paint, | |
191 SkShader::Context* shaderContext); | |
192 virtual ~SkARGB32_Shader4f_Blitter(); | |
193 void blitH(int x, int y, int width) override; | |
194 void blitV(int x, int y, int height, SkAlpha alpha) override; | |
195 void blitRect(int x, int y, int width, int height) override; | |
196 void blitAntiH(int x, int y, const SkAlpha[], const int16_t[]) override; | |
197 void blitMask(const SkMask&, const SkIRect&) override; | |
198 | |
199 private: | |
200 SkXfermode::PM4fState fState; | |
201 SkXfermode::PM4fProc1 fProc1; | |
202 SkXfermode::PM4fProcN fProcN; | |
203 SkPM4f* fBuffer; | |
204 bool fConstInY; | |
205 | |
206 // illegal | |
207 SkARGB32_Shader4f_Blitter& operator=(const SkARGB32_Shader4f_Blitter&); | |
mtklein
2016/02/01 22:53:52
doesn't hurt to add "= delete" to these now.
reed1
2016/02/02 14:20:54
Clearly this was copy-paste from above. Is "= dele
| |
208 | |
209 typedef SkARGB32_Shader_Blitter INHERITED; | |
186 }; | 210 }; |
187 | 211 |
188 /////////////////////////////////////////////////////////////////////////////// | 212 /////////////////////////////////////////////////////////////////////////////// |
189 | 213 |
190 /* These return the correct subclass of blitter for their device config. | 214 /* These return the correct subclass of blitter for their device config. |
191 | 215 |
192 Currently, they make the following assumptions about the state of the | 216 Currently, they make the following assumptions about the state of the |
193 paint: | 217 paint: |
194 | 218 |
195 1. If there is an xfermode, there will also be a shader | 219 1. If there is an xfermode, there will also be a shader |
196 2. If there is a colorfilter, there will be a shader that itself handles | 220 2. If there is a colorfilter, there will be a shader that itself handles |
197 calling the filter, so the blitter can always ignore the colorfilter obj | 221 calling the filter, so the blitter can always ignore the colorfilter obj |
198 | 222 |
199 These pre-conditions must be handled by the caller, in our case | 223 These pre-conditions must be handled by the caller, in our case |
200 SkBlitter::Choose(...) | 224 SkBlitter::Choose(...) |
201 */ | 225 */ |
202 | 226 |
203 SkBlitter* SkBlitter_ChooseD565(const SkPixmap& device, const SkPaint& paint, | 227 SkBlitter* SkBlitter_ChooseD565(const SkPixmap& device, const SkPaint& paint, |
204 SkShader::Context* shaderContext, | 228 SkShader::Context* shaderContext, |
205 SkTBlitterAllocator* allocator); | 229 SkTBlitterAllocator* allocator); |
206 | 230 |
207 #endif | 231 #endif |
OLD | NEW |