OLD | NEW |
1 | |
2 /* | 1 /* |
3 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
4 * | 3 * |
5 * 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 |
6 * found in the LICENSE file. | 5 * found in the LICENSE file. |
7 */ | 6 */ |
8 | 7 |
9 | |
10 #include "SkSpriteBlitter.h" | 8 #include "SkSpriteBlitter.h" |
11 #include "SkBlitRow.h" | 9 #include "SkBlitRow.h" |
12 #include "SkColorFilter.h" | 10 #include "SkColorFilter.h" |
13 #include "SkColorPriv.h" | 11 #include "SkColorPriv.h" |
14 #include "SkTemplates.h" | 12 #include "SkTemplates.h" |
15 #include "SkUtils.h" | 13 #include "SkUtils.h" |
16 #include "SkXfermode.h" | 14 #include "SkXfermode.h" |
17 | 15 |
18 /////////////////////////////////////////////////////////////////////////////// | 16 /////////////////////////////////////////////////////////////////////////////// |
19 | 17 |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 do { | 247 do { |
250 srcover_row(dst, src, width); | 248 srcover_row(dst, src, width); |
251 dst = (SkPMColor* SK_RESTRICT)((char*)dst + dstRB); | 249 dst = (SkPMColor* SK_RESTRICT)((char*)dst + dstRB); |
252 src = (const SkPMColor16* SK_RESTRICT)((const char*)src + srcRB); | 250 src = (const SkPMColor16* SK_RESTRICT)((const char*)src + srcRB); |
253 } while (--height != 0); | 251 } while (--height != 0); |
254 } | 252 } |
255 }; | 253 }; |
256 | 254 |
257 /////////////////////////////////////////////////////////////////////////////// | 255 /////////////////////////////////////////////////////////////////////////////// |
258 | 256 |
259 SkSpriteBlitter* SkSpriteBlitter::ChooseD32(const SkPixmap& source, const SkPain
t& paint, | 257 SkSpriteBlitter* SkSpriteBlitter::ChooseL32(const SkPixmap& source, const SkPain
t& paint, |
260 SkTBlitterAllocator* allocator) { | 258 SkTBlitterAllocator* allocator) { |
261 SkASSERT(allocator != nullptr); | 259 SkASSERT(allocator != nullptr); |
262 | 260 |
263 if (paint.getMaskFilter() != nullptr) { | 261 if (paint.getMaskFilter() != nullptr) { |
264 return nullptr; | 262 return nullptr; |
265 } | 263 } |
266 | 264 |
267 U8CPU alpha = paint.getAlpha(); | 265 U8CPU alpha = paint.getAlpha(); |
268 SkXfermode* xfermode = paint.getXfermode(); | 266 SkXfermode* xfermode = paint.getXfermode(); |
269 SkColorFilter* filter = paint.getColorFilter(); | 267 SkColorFilter* filter = paint.getColorFilter(); |
270 SkSpriteBlitter* blitter = nullptr; | 268 SkSpriteBlitter* blitter = nullptr; |
(...skipping 20 matching lines...) Expand all Loading... |
291 } else { | 289 } else { |
292 // this can handle alpha, but not xfermode or filter | 290 // this can handle alpha, but not xfermode or filter |
293 blitter = allocator->createT<Sprite_D32_S32>(source, alpha); | 291 blitter = allocator->createT<Sprite_D32_S32>(source, alpha); |
294 } | 292 } |
295 break; | 293 break; |
296 default: | 294 default: |
297 break; | 295 break; |
298 } | 296 } |
299 return blitter; | 297 return blitter; |
300 } | 298 } |
OLD | NEW |