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 #include "SkSpriteBlitter.h" | 8 #include "SkSpriteBlitter.h" |
9 #include "SkBlitRow.h" | 9 #include "SkBlitRow.h" |
10 #include "SkColorFilter.h" | 10 #include "SkColorFilter.h" |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 do { | 247 do { |
248 srcover_row(dst, src, width); | 248 srcover_row(dst, src, width); |
249 dst = (SkPMColor* SK_RESTRICT)((char*)dst + dstRB); | 249 dst = (SkPMColor* SK_RESTRICT)((char*)dst + dstRB); |
250 src = (const SkPMColor16* SK_RESTRICT)((const char*)src + srcRB); | 250 src = (const SkPMColor16* SK_RESTRICT)((const char*)src + srcRB); |
251 } while (--height != 0); | 251 } while (--height != 0); |
252 } | 252 } |
253 }; | 253 }; |
254 | 254 |
255 /////////////////////////////////////////////////////////////////////////////// | 255 /////////////////////////////////////////////////////////////////////////////// |
256 | 256 |
257 SkSpriteBlitter* SkSpriteBlitter::ChooseLegacy32(const SkPixmap& source, const S
kPaint& paint, | 257 SkSpriteBlitter* SkSpriteBlitter::ChooseL32(const SkPixmap& source, const SkPain
t& paint, |
258 SkTBlitterAllocator* allocator)
{ | 258 SkTBlitterAllocator* allocator) { |
259 SkASSERT(allocator != nullptr); | 259 SkASSERT(allocator != nullptr); |
260 | 260 |
261 if (paint.getMaskFilter() != nullptr) { | 261 if (paint.getMaskFilter() != nullptr) { |
262 return nullptr; | 262 return nullptr; |
263 } | 263 } |
264 | 264 |
265 U8CPU alpha = paint.getAlpha(); | 265 U8CPU alpha = paint.getAlpha(); |
266 SkXfermode* xfermode = paint.getXfermode(); | 266 SkXfermode* xfermode = paint.getXfermode(); |
267 SkColorFilter* filter = paint.getColorFilter(); | 267 SkColorFilter* filter = paint.getColorFilter(); |
268 SkSpriteBlitter* blitter = nullptr; | 268 SkSpriteBlitter* blitter = nullptr; |
(...skipping 20 matching lines...) Expand all Loading... |
289 } else { | 289 } else { |
290 // this can handle alpha, but not xfermode or filter | 290 // this can handle alpha, but not xfermode or filter |
291 blitter = allocator->createT<Sprite_D32_S32>(source, alpha); | 291 blitter = allocator->createT<Sprite_D32_S32>(source, alpha); |
292 } | 292 } |
293 break; | 293 break; |
294 default: | 294 default: |
295 break; | 295 break; |
296 } | 296 } |
297 return blitter; | 297 return blitter; |
298 } | 298 } |
OLD | NEW |