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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 | 113 |
114 class SkARGB32_Blitter : public SkRasterBlitter { | 114 class SkARGB32_Blitter : public SkRasterBlitter { |
115 public: | 115 public: |
116 SkARGB32_Blitter(const SkBitmap& device, const SkPaint& paint); | 116 SkARGB32_Blitter(const SkBitmap& device, const SkPaint& paint); |
117 virtual void blitH(int x, int y, int width); | 117 virtual void blitH(int x, int y, int width); |
118 virtual void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_
t runs[]); | 118 virtual void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_
t runs[]); |
119 virtual void blitV(int x, int y, int height, SkAlpha alpha); | 119 virtual void blitV(int x, int y, int height, SkAlpha alpha); |
120 virtual void blitRect(int x, int y, int width, int height); | 120 virtual void blitRect(int x, int y, int width, int height); |
121 virtual void blitMask(const SkMask&, const SkIRect&); | 121 virtual void blitMask(const SkMask&, const SkIRect&); |
122 virtual const SkBitmap* justAnOpaqueColor(uint32_t*); | 122 virtual const SkBitmap* justAnOpaqueColor(uint32_t*); |
123 #ifndef SK_SUPPORT_LEGACY_BLITANTIH2V2 | |
124 void blitAntiH2(int x, int y, U8CPU a0, U8CPU a1) override; | 123 void blitAntiH2(int x, int y, U8CPU a0, U8CPU a1) override; |
125 void blitAntiV2(int x, int y, U8CPU a0, U8CPU a1) override; | 124 void blitAntiV2(int x, int y, U8CPU a0, U8CPU a1) override; |
126 #endif | |
127 | 125 |
128 protected: | 126 protected: |
129 SkColor fColor; | 127 SkColor fColor; |
130 SkPMColor fPMColor; | 128 SkPMColor fPMColor; |
131 SkBlitRow::ColorProc fColor32Proc; | 129 SkBlitRow::ColorProc fColor32Proc; |
132 | 130 |
133 private: | 131 private: |
134 unsigned fSrcA, fSrcR, fSrcG, fSrcB; | 132 unsigned fSrcA, fSrcR, fSrcG, fSrcB; |
135 | 133 |
136 // illegal | 134 // illegal |
137 SkARGB32_Blitter& operator=(const SkARGB32_Blitter&); | 135 SkARGB32_Blitter& operator=(const SkARGB32_Blitter&); |
138 | 136 |
139 typedef SkRasterBlitter INHERITED; | 137 typedef SkRasterBlitter INHERITED; |
140 }; | 138 }; |
141 | 139 |
142 class SkARGB32_Opaque_Blitter : public SkARGB32_Blitter { | 140 class SkARGB32_Opaque_Blitter : public SkARGB32_Blitter { |
143 public: | 141 public: |
144 SkARGB32_Opaque_Blitter(const SkBitmap& device, const SkPaint& paint) | 142 SkARGB32_Opaque_Blitter(const SkBitmap& device, const SkPaint& paint) |
145 : INHERITED(device, paint) { SkASSERT(paint.getAlpha() == 0xFF); } | 143 : INHERITED(device, paint) { SkASSERT(paint.getAlpha() == 0xFF); } |
146 virtual void blitMask(const SkMask&, const SkIRect&); | 144 virtual void blitMask(const SkMask&, const SkIRect&); |
147 #ifndef SK_SUPPORT_LEGACY_BLITANTIH2V2 | |
148 void blitAntiH2(int x, int y, U8CPU a0, U8CPU a1) override; | 145 void blitAntiH2(int x, int y, U8CPU a0, U8CPU a1) override; |
149 void blitAntiV2(int x, int y, U8CPU a0, U8CPU a1) override; | 146 void blitAntiV2(int x, int y, U8CPU a0, U8CPU a1) override; |
150 #endif | |
151 | 147 |
152 private: | 148 private: |
153 typedef SkARGB32_Blitter INHERITED; | 149 typedef SkARGB32_Blitter INHERITED; |
154 }; | 150 }; |
155 | 151 |
156 class SkARGB32_Black_Blitter : public SkARGB32_Opaque_Blitter { | 152 class SkARGB32_Black_Blitter : public SkARGB32_Opaque_Blitter { |
157 public: | 153 public: |
158 SkARGB32_Black_Blitter(const SkBitmap& device, const SkPaint& paint) | 154 SkARGB32_Black_Blitter(const SkBitmap& device, const SkPaint& paint) |
159 : INHERITED(device, paint) {} | 155 : INHERITED(device, paint) {} |
160 virtual void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_
t runs[]); | 156 virtual void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_
t runs[]); |
161 #ifndef SK_SUPPORT_LEGACY_BLITANTIH2V2 | |
162 void blitAntiH2(int x, int y, U8CPU a0, U8CPU a1) override; | 157 void blitAntiH2(int x, int y, U8CPU a0, U8CPU a1) override; |
163 void blitAntiV2(int x, int y, U8CPU a0, U8CPU a1) override; | 158 void blitAntiV2(int x, int y, U8CPU a0, U8CPU a1) override; |
164 #endif | |
165 | 159 |
166 private: | 160 private: |
167 typedef SkARGB32_Opaque_Blitter INHERITED; | 161 typedef SkARGB32_Opaque_Blitter INHERITED; |
168 }; | 162 }; |
169 | 163 |
170 class SkARGB32_Shader_Blitter : public SkShaderBlitter { | 164 class SkARGB32_Shader_Blitter : public SkShaderBlitter { |
171 public: | 165 public: |
172 SkARGB32_Shader_Blitter(const SkBitmap& device, const SkPaint& paint, | 166 SkARGB32_Shader_Blitter(const SkBitmap& device, const SkPaint& paint, |
173 SkShader::Context* shaderContext); | 167 SkShader::Context* shaderContext); |
174 virtual ~SkARGB32_Shader_Blitter(); | 168 virtual ~SkARGB32_Shader_Blitter(); |
(...skipping 30 matching lines...) Expand all Loading... |
205 | 199 |
206 These pre-conditions must be handled by the caller, in our case | 200 These pre-conditions must be handled by the caller, in our case |
207 SkBlitter::Choose(...) | 201 SkBlitter::Choose(...) |
208 */ | 202 */ |
209 | 203 |
210 SkBlitter* SkBlitter_ChooseD565(const SkBitmap& device, const SkPaint& paint, | 204 SkBlitter* SkBlitter_ChooseD565(const SkBitmap& device, const SkPaint& paint, |
211 SkShader::Context* shaderContext, | 205 SkShader::Context* shaderContext, |
212 SkTBlitterAllocator* allocator); | 206 SkTBlitterAllocator* allocator); |
213 | 207 |
214 #endif | 208 #endif |
OLD | NEW |