| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #include "SkSpriteBlitter.h" | 10 #include "SkSpriteBlitter.h" |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 return NULL; | 318 return NULL; |
| 319 } | 319 } |
| 320 if (paint.getColorFilter() != NULL) { // may add cases for this | 320 if (paint.getColorFilter() != NULL) { // may add cases for this |
| 321 return NULL; | 321 return NULL; |
| 322 } | 322 } |
| 323 | 323 |
| 324 SkSpriteBlitter* blitter = NULL; | 324 SkSpriteBlitter* blitter = NULL; |
| 325 unsigned alpha = paint.getAlpha(); | 325 unsigned alpha = paint.getAlpha(); |
| 326 | 326 |
| 327 switch (source.colorType()) { | 327 switch (source.colorType()) { |
| 328 case kN32_SkColorType: { | 328 case kPMColor_SkColorType: { |
| 329 blitter = allocator->createT<Sprite_D16_S32_BlitRowProc>(source); | 329 blitter = allocator->createT<Sprite_D16_S32_BlitRowProc>(source); |
| 330 break; | 330 break; |
| 331 } | 331 } |
| 332 case kARGB_4444_SkColorType: | 332 case kARGB_4444_SkColorType: |
| 333 if (255 == alpha) { | 333 if (255 == alpha) { |
| 334 blitter = allocator->createT<Sprite_D16_S4444_Opaque>(source); | 334 blitter = allocator->createT<Sprite_D16_S4444_Opaque>(source); |
| 335 } else { | 335 } else { |
| 336 blitter = allocator->createT<Sprite_D16_S4444_Blend>(source, alp
ha >> 4); | 336 blitter = allocator->createT<Sprite_D16_S4444_Blend>(source, alp
ha >> 4); |
| 337 } | 337 } |
| 338 break; | 338 break; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 360 } else { | 360 } else { |
| 361 blitter = allocator->createT<Sprite_D16_SIndex8A_Blend>(sour
ce, alpha); | 361 blitter = allocator->createT<Sprite_D16_SIndex8A_Blend>(sour
ce, alpha); |
| 362 } | 362 } |
| 363 } | 363 } |
| 364 break; | 364 break; |
| 365 default: | 365 default: |
| 366 break; | 366 break; |
| 367 } | 367 } |
| 368 return blitter; | 368 return blitter; |
| 369 } | 369 } |
| OLD | NEW |