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 "SkBlitter.h" | 8 #include "SkBlitter.h" |
9 #include "SkAntiRun.h" | 9 #include "SkAntiRun.h" |
10 #include "SkColor.h" | 10 #include "SkColor.h" |
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
931 blitter = allocator->createT<SkARGB32_Black_Blitter>(device,
*paint); | 931 blitter = allocator->createT<SkARGB32_Black_Blitter>(device,
*paint); |
932 } else if (paint->getAlpha() == 0xFF) { | 932 } else if (paint->getAlpha() == 0xFF) { |
933 blitter = allocator->createT<SkARGB32_Opaque_Blitter>(device
, *paint); | 933 blitter = allocator->createT<SkARGB32_Opaque_Blitter>(device
, *paint); |
934 } else { | 934 } else { |
935 blitter = allocator->createT<SkARGB32_Blitter>(device, *pain
t); | 935 blitter = allocator->createT<SkARGB32_Blitter>(device, *pain
t); |
936 } | 936 } |
937 } | 937 } |
938 break; | 938 break; |
939 | 939 |
940 case kRGBA_F16_SkColorType: | 940 case kRGBA_F16_SkColorType: |
941 // kU16_SkColorType: | 941 blitter = SkBlitter_F16_Create(device, *paint, shaderContext, alloca
tor); |
942 blitter = SkBlitter_ARGB64_Create(device, *paint, shaderContext, all
ocator); | |
943 break; | 942 break; |
944 | 943 |
945 default: | 944 default: |
946 break; | 945 break; |
947 } | 946 } |
948 | 947 |
949 if (!blitter) { | 948 if (!blitter) { |
950 blitter = allocator->createT<SkNullBlitter>(); | 949 blitter = allocator->createT<SkNullBlitter>(); |
951 } | 950 } |
952 | 951 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1003 fShaderContext->~Context(); | 1002 fShaderContext->~Context(); |
1004 SkShader::Context* ctx = fShader->createContext(rec, (void*)fShaderContext); | 1003 SkShader::Context* ctx = fShader->createContext(rec, (void*)fShaderContext); |
1005 if (nullptr == ctx) { | 1004 if (nullptr == ctx) { |
1006 // Need a valid context in fShaderContext's storage, so we can later (or
our caller) call | 1005 // Need a valid context in fShaderContext's storage, so we can later (or
our caller) call |
1007 // the in-place destructor. | 1006 // the in-place destructor. |
1008 new (fShaderContext) SkZeroShaderContext(*fShader, rec); | 1007 new (fShaderContext) SkZeroShaderContext(*fShader, rec); |
1009 return false; | 1008 return false; |
1010 } | 1009 } |
1011 return true; | 1010 return true; |
1012 } | 1011 } |
OLD | NEW |