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 23 matching lines...) Expand all Loading... |
34 */ | 34 */ |
35 SkShaderBlitter(const SkBitmap& device, const SkPaint& paint, | 35 SkShaderBlitter(const SkBitmap& device, const SkPaint& paint, |
36 SkShader::Context* shaderContext); | 36 SkShader::Context* shaderContext); |
37 virtual ~SkShaderBlitter(); | 37 virtual ~SkShaderBlitter(); |
38 | 38 |
39 /** | 39 /** |
40 * Create a new shader context and uses it instead of the old one if succe
ssful. | 40 * Create a new shader context and uses it instead of the old one if succe
ssful. |
41 * Will create the context at the same location as the old one (this is sa
fe | 41 * Will create the context at the same location as the old one (this is sa
fe |
42 * because the shader itself is unchanged). | 42 * because the shader itself is unchanged). |
43 */ | 43 */ |
44 bool resetShaderContext(const SkShader::ContextRec&) SK_OVERRIDE; | 44 bool resetShaderContext(const SkShader::ContextRec&) override; |
45 | 45 |
46 SkShader::Context* getShaderContext() const SK_OVERRIDE { return fShaderCont
ext; } | 46 SkShader::Context* getShaderContext() const override { return fShaderContext
; } |
47 | 47 |
48 protected: | 48 protected: |
49 uint32_t fShaderFlags; | 49 uint32_t fShaderFlags; |
50 const SkShader* fShader; | 50 const SkShader* fShader; |
51 SkShader::Context* fShaderContext; | 51 SkShader::Context* fShaderContext; |
52 | 52 |
53 private: | 53 private: |
54 // illegal | 54 // illegal |
55 SkShaderBlitter& operator=(const SkShaderBlitter&); | 55 SkShaderBlitter& operator=(const SkShaderBlitter&); |
56 | 56 |
57 typedef SkRasterBlitter INHERITED; | 57 typedef SkRasterBlitter INHERITED; |
58 }; | 58 }; |
59 | 59 |
60 /////////////////////////////////////////////////////////////////////////////// | 60 /////////////////////////////////////////////////////////////////////////////// |
61 | 61 |
62 class SkA8_Coverage_Blitter : public SkRasterBlitter { | 62 class SkA8_Coverage_Blitter : public SkRasterBlitter { |
63 public: | 63 public: |
64 SkA8_Coverage_Blitter(const SkBitmap& device, const SkPaint& paint); | 64 SkA8_Coverage_Blitter(const SkBitmap& device, const SkPaint& paint); |
65 void blitH(int x, int y, int width) SK_OVERRIDE; | 65 void blitH(int x, int y, int width) override; |
66 void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_t runs[]
) SK_OVERRIDE; | 66 void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_t runs[]
) override; |
67 void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE; | 67 void blitV(int x, int y, int height, SkAlpha alpha) override; |
68 void blitRect(int x, int y, int width, int height) SK_OVERRIDE; | 68 void blitRect(int x, int y, int width, int height) override; |
69 void blitMask(const SkMask&, const SkIRect&) SK_OVERRIDE; | 69 void blitMask(const SkMask&, const SkIRect&) override; |
70 const SkBitmap* justAnOpaqueColor(uint32_t*) SK_OVERRIDE; | 70 const SkBitmap* justAnOpaqueColor(uint32_t*) override; |
71 }; | 71 }; |
72 | 72 |
73 class SkA8_Blitter : public SkRasterBlitter { | 73 class SkA8_Blitter : public SkRasterBlitter { |
74 public: | 74 public: |
75 SkA8_Blitter(const SkBitmap& device, const SkPaint& paint); | 75 SkA8_Blitter(const SkBitmap& device, const SkPaint& paint); |
76 virtual void blitH(int x, int y, int width); | 76 virtual void blitH(int x, int y, int width); |
77 virtual void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_
t runs[]); | 77 virtual void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_
t runs[]); |
78 virtual void blitV(int x, int y, int height, SkAlpha alpha); | 78 virtual void blitV(int x, int y, int height, SkAlpha alpha); |
79 virtual void blitRect(int x, int y, int width, int height); | 79 virtual void blitRect(int x, int y, int width, int height); |
80 virtual void blitMask(const SkMask&, const SkIRect&); | 80 virtual void blitMask(const SkMask&, const SkIRect&); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 | 153 |
154 private: | 154 private: |
155 typedef SkARGB32_Opaque_Blitter INHERITED; | 155 typedef SkARGB32_Opaque_Blitter INHERITED; |
156 }; | 156 }; |
157 | 157 |
158 class SkARGB32_Shader_Blitter : public SkShaderBlitter { | 158 class SkARGB32_Shader_Blitter : public SkShaderBlitter { |
159 public: | 159 public: |
160 SkARGB32_Shader_Blitter(const SkBitmap& device, const SkPaint& paint, | 160 SkARGB32_Shader_Blitter(const SkBitmap& device, const SkPaint& paint, |
161 SkShader::Context* shaderContext); | 161 SkShader::Context* shaderContext); |
162 virtual ~SkARGB32_Shader_Blitter(); | 162 virtual ~SkARGB32_Shader_Blitter(); |
163 void blitH(int x, int y, int width) SK_OVERRIDE; | 163 void blitH(int x, int y, int width) override; |
164 void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE; | 164 void blitV(int x, int y, int height, SkAlpha alpha) override; |
165 void blitRect(int x, int y, int width, int height) SK_OVERRIDE; | 165 void blitRect(int x, int y, int width, int height) override; |
166 void blitAntiH(int x, int y, const SkAlpha[], const int16_t[]) SK_OVERRIDE; | 166 void blitAntiH(int x, int y, const SkAlpha[], const int16_t[]) override; |
167 void blitMask(const SkMask&, const SkIRect&) SK_OVERRIDE; | 167 void blitMask(const SkMask&, const SkIRect&) override; |
168 | 168 |
169 private: | 169 private: |
170 SkXfermode* fXfermode; | 170 SkXfermode* fXfermode; |
171 SkPMColor* fBuffer; | 171 SkPMColor* fBuffer; |
172 SkBlitRow::Proc32 fProc32; | 172 SkBlitRow::Proc32 fProc32; |
173 SkBlitRow::Proc32 fProc32Blend; | 173 SkBlitRow::Proc32 fProc32Blend; |
174 bool fShadeDirectlyIntoDevice; | 174 bool fShadeDirectlyIntoDevice; |
175 bool fConstInY; | 175 bool fConstInY; |
176 | 176 |
177 // illegal | 177 // illegal |
(...skipping 15 matching lines...) Expand all Loading... |
193 | 193 |
194 These pre-conditions must be handled by the caller, in our case | 194 These pre-conditions must be handled by the caller, in our case |
195 SkBlitter::Choose(...) | 195 SkBlitter::Choose(...) |
196 */ | 196 */ |
197 | 197 |
198 SkBlitter* SkBlitter_ChooseD565(const SkBitmap& device, const SkPaint& paint, | 198 SkBlitter* SkBlitter_ChooseD565(const SkBitmap& device, const SkPaint& paint, |
199 SkShader::Context* shaderContext, | 199 SkShader::Context* shaderContext, |
200 SkTBlitterAllocator* allocator); | 200 SkTBlitterAllocator* allocator); |
201 | 201 |
202 #endif | 202 #endif |
OLD | NEW |