Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(957)

Side by Side Diff: src/android/SkBitmapRegionCodec.cpp

Issue 2319293003: Checking for valid colorType, alphaType, colorSpace in SkCodec (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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;
scroggo 2016/09/08 16:33:11 This looks to be unused
msarett 2016/09/08 16:49:45 Ahh thanks.
140 SkImageInfo dstInfo = fCodec->getInfo().makeColorType(colorType).makeColorSp ace(nullptr);
141 return legacy_conversion_possible(dstInfo, fCodec->getInfo());
139 } 142 }
OLDNEW
« no previous file with comments | « dm/DMSrcSink.cpp ('k') | src/codec/SkBmpCodec.cpp » ('j') | src/codec/SkCodecPriv.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698