| 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 "SkSmallAllocator.h" | 8 #include "SkSmallAllocator.h" |
| 9 #include "SkSpriteBlitter.h" | 9 #include "SkSpriteBlitter.h" |
| 10 | 10 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 (which does respect soft edges). | 60 (which does respect soft edges). |
| 61 */ | 61 */ |
| 62 SkASSERT(allocator != NULL); | 62 SkASSERT(allocator != NULL); |
| 63 | 63 |
| 64 SkSpriteBlitter* blitter; | 64 SkSpriteBlitter* blitter; |
| 65 | 65 |
| 66 switch (device.colorType()) { | 66 switch (device.colorType()) { |
| 67 case kRGB_565_SkColorType: | 67 case kRGB_565_SkColorType: |
| 68 blitter = SkSpriteBlitter::ChooseD16(source, paint, allocator); | 68 blitter = SkSpriteBlitter::ChooseD16(source, paint, allocator); |
| 69 break; | 69 break; |
| 70 case kN32_SkColorType: | 70 case kPMColor_SkColorType: |
| 71 blitter = SkSpriteBlitter::ChooseD32(source, paint, allocator); | 71 blitter = SkSpriteBlitter::ChooseD32(source, paint, allocator); |
| 72 break; | 72 break; |
| 73 default: | 73 default: |
| 74 blitter = NULL; | 74 blitter = NULL; |
| 75 break; | 75 break; |
| 76 } | 76 } |
| 77 | 77 |
| 78 if (blitter) { | 78 if (blitter) { |
| 79 blitter->setup(device, left, top, paint); | 79 blitter->setup(device, left, top, paint); |
| 80 } | 80 } |
| 81 return blitter; | 81 return blitter; |
| 82 } | 82 } |
| OLD | NEW |