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

Unified Diff: src/effects/SkMorphologyImageFilter.cpp

Issue 305133006: use colortype instead of config (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 7 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/effects/SkMorphologyImageFilter.cpp
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp
index 8803f8aae39706388f1a6bee6305d9f1c4f028d8..c736c1cdeced84ae0f25cd9cf48b7bb4e13bbcb7 100644
--- a/src/effects/SkMorphologyImageFilter.cpp
+++ b/src/effects/SkMorphologyImageFilter.cpp
@@ -163,9 +163,7 @@ bool SkMorphologyImageFilter::filterImageGeneric(SkMorphologyImageFilter::Proc p
return false;
}
- dst->setConfig(src.config(), bounds.width(), bounds.height());
- dst->allocPixels();
- if (!dst->getPixels()) {
+ if (!dst->allocPixels(src.info().makeWH(bounds.width(), bounds.height()))) {
return false;
}
@@ -190,8 +188,7 @@ bool SkMorphologyImageFilter::filterImageGeneric(SkMorphologyImageFilter::Proc p
}
SkBitmap temp;
robertphillips 2014/06/02 13:15:59 same
reed1 2014/06/02 19:43:06 Done.
- temp.setConfig(dst->config(), dst->width(), dst->height());
- if (!temp.allocPixels()) {
+ if (!temp.allocPixels(dst->info().makeWH(dst->width(), dst->height()))) {
return false;
}

Powered by Google App Engine
This is Rietveld 408576698