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

Unified Diff: src/images/SkImageDecoder_libgif.cpp

Issue 322963002: hide SkBitmap::setConfig (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/images/SkImageDecoder_libbmp.cpp ('k') | src/images/SkImageDecoder_libico.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/images/SkImageDecoder_libgif.cpp
diff --git a/src/images/SkImageDecoder_libgif.cpp b/src/images/SkImageDecoder_libgif.cpp
index a045c27e160799228f1f92dbe0ad791cd179d7e0..bbcd22316931b5f7b1cb481d2efd23542f6aed42 100644
--- a/src/images/SkImageDecoder_libgif.cpp
+++ b/src/images/SkImageDecoder_libgif.cpp
@@ -310,14 +310,14 @@ bool SkGIFImageDecoder::onDecode(SkStream* sk_stream, SkBitmap* bm, Mode mode) {
}
// FIXME: We could give the caller a choice of images or configs.
- if (!this->chooseFromOneChoice(SkBitmap::kIndex8_Config, width, height)) {
+ if (!this->chooseFromOneChoice(kIndex_8_SkColorType, width, height)) {
return error_return(*bm, "chooseFromOneChoice");
}
SkScaledBitmapSampler sampler(width, height, this->getSampleSize());
- bm->setConfig(SkBitmap::kIndex8_Config, sampler.scaledWidth(),
- sampler.scaledHeight());
+ bm->setInfo(SkImageInfo::Make(sampler.scaledWidth(), sampler.scaledHeight(),
+ kIndex_8_SkColorType, kPremul_SkAlphaType));
if (SkImageDecoder::kDecodeBounds_Mode == mode) {
return true;
« no previous file with comments | « src/images/SkImageDecoder_libbmp.cpp ('k') | src/images/SkImageDecoder_libico.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698