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

Unified Diff: src/image/SkImagePriv.cpp

Issue 483593002: eliminate code related to SkBitmap::Config (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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/gpu/SkGr.cpp ('k') | src/images/SkImageDecoder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkImagePriv.cpp
diff --git a/src/image/SkImagePriv.cpp b/src/image/SkImagePriv.cpp
index f5b785877c7374f427b11c8a80e439195fa9462c..bde47e71eba07853b720d75be2ce6bae779d5cf8 100644
--- a/src/image/SkImagePriv.cpp
+++ b/src/image/SkImagePriv.cpp
@@ -9,45 +9,6 @@
#include "SkCanvas.h"
#include "SkPicture.h"
-#ifdef SK_SUPPORT_LEGACY_BITMAP_CONFIG
-SkBitmap::Config SkColorTypeToBitmapConfig(SkColorType colorType) {
- switch (colorType) {
- case kAlpha_8_SkColorType:
- return SkBitmap::kA8_Config;
-
- case kARGB_4444_SkColorType:
- return SkBitmap::kARGB_4444_Config;
-
- case kRGB_565_SkColorType:
- return SkBitmap::kRGB_565_Config;
-
- case kN32_SkColorType:
- return SkBitmap::kARGB_8888_Config;
-
- case kIndex_8_SkColorType:
- return SkBitmap::kIndex8_Config;
-
- default:
- // break for unsupported colortypes
- break;
- }
- return SkBitmap::kNo_Config;
-}
-
-SkColorType SkBitmapConfigToColorType(SkBitmap::Config config) {
- static const SkColorType gCT[] = {
- kUnknown_SkColorType, // kNo_Config
- kAlpha_8_SkColorType, // kA8_Config
- kIndex_8_SkColorType, // kIndex8_Config
- kRGB_565_SkColorType, // kRGB_565_Config
- kARGB_4444_SkColorType, // kARGB_4444_Config
- kN32_SkColorType, // kARGB_8888_Config
- };
- SkASSERT((unsigned)config < SK_ARRAY_COUNT(gCT));
- return gCT[config];
-}
-#endif
-
SkImage* SkNewImageFromBitmap(const SkBitmap& bm, bool canSharePixelRef) {
const SkImageInfo info = bm.info();
if (kUnknown_SkColorType == info.colorType()) {
« no previous file with comments | « src/gpu/SkGr.cpp ('k') | src/images/SkImageDecoder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698