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

Unified Diff: src/effects/SkLightingImageFilter.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/SkDisplacementMapEffect.cpp ('k') | src/effects/SkMagnifierImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkLightingImageFilter.cpp
diff --git a/src/effects/SkLightingImageFilter.cpp b/src/effects/SkLightingImageFilter.cpp
index 24fdd0e9fdd699140a1616a6e380a0c433116bc2..c0c605ca040b88216ccd3b4dbdf7785aa74cb04f 100644
--- a/src/effects/SkLightingImageFilter.cpp
+++ b/src/effects/SkLightingImageFilter.cpp
@@ -960,8 +960,7 @@ bool SkDiffuseLightingImageFilter::onFilterImage(Proxy* proxy,
return false;
}
- dst->setConfig(src.config(), bounds.width(), bounds.height());
- if (!dst->allocPixels()) {
+ if (!dst->allocPixels(src.info().makeWH(bounds.width(), bounds.height()))) {
return false;
}
@@ -1052,9 +1051,7 @@ bool SkSpecularLightingImageFilter::onFilterImage(Proxy* proxy,
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;
}
« no previous file with comments | « src/effects/SkDisplacementMapEffect.cpp ('k') | src/effects/SkMagnifierImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698