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

Unified Diff: src/core/SkBitmapScaler.cpp

Issue 173893002: use colortype instead of config (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 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/core/SkBitmapProcShader.cpp ('k') | src/core/SkBitmap_scroll.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmapScaler.cpp
diff --git a/src/core/SkBitmapScaler.cpp b/src/core/SkBitmapScaler.cpp
index dc50464e54c837220811a2c55dc91bd321ab16a3..a90be05d634ba7491a1dca22bc8acc1423a85788 100644
--- a/src/core/SkBitmapScaler.cpp
+++ b/src/core/SkBitmapScaler.cpp
@@ -275,7 +275,7 @@ bool SkBitmapScaler::Resize(SkBitmap* resultPtr,
SkAutoLockPixels locker(source);
if (!source.readyToDraw() ||
- source.config() != SkBitmap::kARGB_8888_Config) {
+ source.colorType() != kPMColor_SkColorType) {
return false;
}
@@ -290,9 +290,9 @@ bool SkBitmapScaler::Resize(SkBitmap* resultPtr,
// Convolve into the result.
SkBitmap result;
- result.setConfig(SkBitmap::kARGB_8888_Config,
- destSubset.width(), destSubset.height(), 0,
- source.alphaType());
+ result.setConfig(SkImageInfo::MakeN32(destSubset.width(),
+ destSubset.height(),
+ source.alphaType()));
result.allocPixels(allocator, NULL);
if (!result.readyToDraw()) {
return false;
« no previous file with comments | « src/core/SkBitmapProcShader.cpp ('k') | src/core/SkBitmap_scroll.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698