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

Unified Diff: src/effects/SkBlurImageFilter.cpp

Issue 301233011: use colortype instead of config (Closed) Base URL: https://skia.googlesource.com/skia.git@master
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
« no previous file with comments | « src/effects/SkBicubicImageFilter.cpp ('k') | src/effects/SkDisplacementMapEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkBlurImageFilter.cpp
diff --git a/src/effects/SkBlurImageFilter.cpp b/src/effects/SkBlurImageFilter.cpp
index 00064d4668e664b5b95246671e64041b9d9f2e8a..470dcac3c851e913dbc753727c15a42561af7dd5 100644
--- a/src/effects/SkBlurImageFilter.cpp
+++ b/src/effects/SkBlurImageFilter.cpp
@@ -163,11 +163,10 @@ bool SkBlurImageFilter::onFilterImage(Proxy* proxy,
return false;
}
- dst->setConfig(src.config(), srcBounds.width(), srcBounds.height());
- dst->getBounds(&dstBounds);
- if (!dst->allocPixels()) {
+ if (!dst->allocPixels(src.info().makeWH(srcBounds.width(), srcBounds.height()))) {
return false;
}
+ dst->getBounds(&dstBounds);
SkVector sigma = SkVector::Make(fSigma.width(), fSigma.height());
ctx.ctm().mapVectors(&sigma, 1);
@@ -191,8 +190,7 @@ bool SkBlurImageFilter::onFilterImage(Proxy* proxy,
}
SkBitmap temp;
- temp.setConfig(dst->config(), dst->width(), dst->height());
- if (!temp.allocPixels()) {
+ if (!temp.allocPixels(dst->info())) {
return false;
}
« no previous file with comments | « src/effects/SkBicubicImageFilter.cpp ('k') | src/effects/SkDisplacementMapEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698