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

Unified Diff: src/images/SkScaledBitmapSampler.cpp

Issue 338493005: stop using SkBitmap::Config (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
Index: src/images/SkScaledBitmapSampler.cpp
diff --git a/src/images/SkScaledBitmapSampler.cpp b/src/images/SkScaledBitmapSampler.cpp
index 7fd8718bebbc01705cbc800c938c4f16cfb68b38..d78502d2bbd6a3727de5081fcdf3652cfcd6ba45 100644
--- a/src/images/SkScaledBitmapSampler.cpp
+++ b/src/images/SkScaledBitmapSampler.cpp
@@ -696,20 +696,20 @@ bool SkScaledBitmapSampler::begin(SkBitmap* dst, SrcConfig sc,
return false;
}
- switch (dst->config()) {
- case SkBitmap::kARGB_8888_Config:
+ switch (dst->colorType()) {
+ case kN32_SkColorType:
index += 0 * gProcDstConfigSpan;
break;
- case SkBitmap::kRGB_565_Config:
+ case kRGB_565_SkColorType:
index += 1 * gProcDstConfigSpan;
break;
- case SkBitmap::kARGB_4444_Config:
+ case kARGB_4444_SkColorType:
index += 2 * gProcDstConfigSpan;
break;
- case SkBitmap::kIndex8_Config:
+ case kIndex_8_SkColorType:
index += 3 * gProcDstConfigSpan;
break;
- case SkBitmap::kA8_Config:
+ case kAlpha_8_SkColorType:
index += 4 * gProcDstConfigSpan;
break;
default:

Powered by Google App Engine
This is Rietveld 408576698