OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
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 "SkAndroidCodec.h" | 8 #include "SkAndroidCodec.h" |
9 #include "SkBitmapRegionCodec.h" | 9 #include "SkBitmapRegionCodec.h" |
10 #include "SkBitmapRegionDecoderPriv.h" | 10 #include "SkBitmapRegionDecoderPriv.h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 | 128 |
129 // Intialize the color table | 129 // Intialize the color table |
130 if (kIndex_8_SkColorType == dstColorType) { | 130 if (kIndex_8_SkColorType == dstColorType) { |
131 colorTable->dangerous_overwriteColors(colors, maxColors); | 131 colorTable->dangerous_overwriteColors(colors, maxColors); |
132 } | 132 } |
133 | 133 |
134 return true; | 134 return true; |
135 } | 135 } |
136 | 136 |
137 bool SkBitmapRegionCodec::conversionSupported(SkColorType colorType) { | 137 bool SkBitmapRegionCodec::conversionSupported(SkColorType colorType) { |
138 return conversion_possible(fCodec->getInfo().makeColorType(colorType), fCode
c->getInfo()); | 138 // Enable legacy behavior. |
| 139 sk_sp<SkColorSpace> colorSpace = nullptr; |
| 140 SkImageInfo dstInfo = fCodec->getInfo().makeColorType(colorType).makeColorSp
ace(colorSpace); |
| 141 return conversion_possible_ignore_color_space(dstInfo, fCodec->getInfo()); |
139 } | 142 } |
OLD | NEW |