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

Unified Diff: src/images/SkImageDecoder_ktx.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.cpp ('k') | src/images/SkImageDecoder_libbmp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/images/SkImageDecoder_ktx.cpp
diff --git a/src/images/SkImageDecoder_ktx.cpp b/src/images/SkImageDecoder_ktx.cpp
index 6ff245954008fed7845d651436157240ddc2870d..0dd987cef19e2e4986829afffbeba72453a5703d 100644
--- a/src/images/SkImageDecoder_ktx.cpp
+++ b/src/images/SkImageDecoder_ktx.cpp
@@ -63,7 +63,7 @@ bool SkKTXImageDecoder::onDecode(SkStream* stream, SkBitmap* bm, Mode mode) {
const unsigned short height = ktxFile.height();
// should we allow the Chooser (if present) to pick a config for us???
- if (!this->chooseFromOneChoice(SkBitmap::kARGB_8888_Config, width, height)) {
+ if (!this->chooseFromOneChoice(kN32_SkColorType, width, height)) {
return false;
}
@@ -71,10 +71,8 @@ bool SkKTXImageDecoder::onDecode(SkStream* stream, SkBitmap* bm, Mode mode) {
SkScaledBitmapSampler sampler(width, height, this->getSampleSize());
// Set the config...
- bm->setConfig(SkBitmap::kARGB_8888_Config,
- sampler.scaledWidth(), sampler.scaledHeight(),
- 0,
- ktxFile.isRGBA8()? kPremul_SkAlphaType : kOpaque_SkAlphaType);
+ bm->setInfo(SkImageInfo::MakeN32(sampler.scaledWidth(), sampler.scaledHeight(),
+ ktxFile.isRGBA8()? kPremul_SkAlphaType : kOpaque_SkAlphaType));
if (SkImageDecoder::kDecodeBounds_Mode == mode) {
return true;
}
« no previous file with comments | « src/images/SkImageDecoder.cpp ('k') | src/images/SkImageDecoder_libbmp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698