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

Unified Diff: src/images/SkImageDecoder.cpp

Issue 332453002: remove GetDeviceConfig/SetDeviceConfig (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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 | « include/core/SkImageDecoder.h ('k') | src/ports/SkImageDecoder_empty.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/images/SkImageDecoder.cpp
diff --git a/src/images/SkImageDecoder.cpp b/src/images/SkImageDecoder.cpp
index 13e0c232dc134ba7c98f7d3b91597d8f621093ca..223ae152646ed09fe933c9754641067c6e907d97 100644
--- a/src/images/SkImageDecoder.cpp
+++ b/src/images/SkImageDecoder.cpp
@@ -14,20 +14,6 @@
#include "SkTemplates.h"
#include "SkCanvas.h"
-static SkBitmap::Config gDeviceConfig = SkBitmap::kNo_Config;
-
-SkBitmap::Config SkImageDecoder::GetDeviceConfig()
-{
- return gDeviceConfig;
-}
-
-void SkImageDecoder::SetDeviceConfig(SkBitmap::Config config)
-{
- gDeviceConfig = config;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-
SkImageDecoder::SkImageDecoder()
: fPeeker(NULL)
#ifdef SK_SUPPORT_LEGACY_IMAGEDECODER_CHOOSER
@@ -159,8 +145,7 @@ void SkImageDecoder::setPrefConfigTable(const PrefConfigTable& prefTable) {
fPrefTable = prefTable;
}
-// TODO: use colortype in fPrefTable, fDefaultPref and GetDeviceConfig()
-// so we can stop using SkBitmapConfigToColorType()
+// TODO: use colortype in fPrefTable, fDefaultPref so we can stop using SkBitmapConfigToColorType()
//
SkColorType SkImageDecoder::getPrefColorType(SrcDepth srcDepth, bool srcHasAlpha) const {
SkBitmap::Config config = SkBitmap::kNo_Config;
@@ -183,9 +168,6 @@ SkColorType SkImageDecoder::getPrefColorType(SrcDepth srcDepth, bool srcHasAlpha
config = fDefaultPref;
}
- if (SkBitmap::kNo_Config == config) {
- config = SkImageDecoder::GetDeviceConfig();
- }
return SkBitmapConfigToColorType(config);
}
« no previous file with comments | « include/core/SkImageDecoder.h ('k') | src/ports/SkImageDecoder_empty.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698