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 "SkBlitter.h" | 10 #include "SkBlitter.h" |
(...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
916 blitter = allocator->createT<SkA8_Shader_Blitter>(device, *paint
); | 916 blitter = allocator->createT<SkA8_Shader_Blitter>(device, *paint
); |
917 } else { | 917 } else { |
918 blitter = allocator->createT<SkA8_Blitter>(device, *paint); | 918 blitter = allocator->createT<SkA8_Blitter>(device, *paint); |
919 } | 919 } |
920 break; | 920 break; |
921 | 921 |
922 case kRGB_565_SkColorType: | 922 case kRGB_565_SkColorType: |
923 blitter = SkBlitter_ChooseD565(device, *paint, allocator); | 923 blitter = SkBlitter_ChooseD565(device, *paint, allocator); |
924 break; | 924 break; |
925 | 925 |
926 case kPMColor_SkColorType: | 926 case kN32_SkColorType: |
927 if (shader) { | 927 if (shader) { |
928 blitter = allocator->createT<SkARGB32_Shader_Blitter>(device, *p
aint); | 928 blitter = allocator->createT<SkARGB32_Shader_Blitter>(device, *p
aint); |
929 } else if (paint->getColor() == SK_ColorBLACK) { | 929 } else if (paint->getColor() == SK_ColorBLACK) { |
930 blitter = allocator->createT<SkARGB32_Black_Blitter>(device, *pa
int); | 930 blitter = allocator->createT<SkARGB32_Black_Blitter>(device, *pa
int); |
931 } else if (paint->getAlpha() == 0xFF) { | 931 } else if (paint->getAlpha() == 0xFF) { |
932 blitter = allocator->createT<SkARGB32_Opaque_Blitter>(device, *p
aint); | 932 blitter = allocator->createT<SkARGB32_Opaque_Blitter>(device, *p
aint); |
933 } else { | 933 } else { |
934 blitter = allocator->createT<SkARGB32_Blitter>(device, *paint); | 934 blitter = allocator->createT<SkARGB32_Blitter>(device, *paint); |
935 } | 935 } |
936 break; | 936 break; |
(...skipping 27 matching lines...) Expand all Loading... |
964 | 964 |
965 fShader->ref(); | 965 fShader->ref(); |
966 fShaderFlags = fShader->getFlags(); | 966 fShaderFlags = fShader->getFlags(); |
967 } | 967 } |
968 | 968 |
969 SkShaderBlitter::~SkShaderBlitter() { | 969 SkShaderBlitter::~SkShaderBlitter() { |
970 SkASSERT(fShader->setContextHasBeenCalled()); | 970 SkASSERT(fShader->setContextHasBeenCalled()); |
971 fShader->endContext(); | 971 fShader->endContext(); |
972 fShader->unref(); | 972 fShader->unref(); |
973 } | 973 } |
OLD | NEW |