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

Unified Diff: src/effects/SkLightingImageFilter.cpp

Issue 35703002: Lighting filter uses input on raster path (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 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 | « no previous file | no next file » | 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 f81cc1c914b7b426e0fe586319ea2d64f2c2593e..4f05d2569e23b023d27feef227873e9a331ce0d2 100644
--- a/src/effects/SkLightingImageFilter.cpp
+++ b/src/effects/SkLightingImageFilter.cpp
@@ -910,11 +910,17 @@ void SkDiffuseLightingImageFilter::flatten(SkFlattenableWriteBuffer& buffer) con
buffer.writeScalar(fKD);
}
-bool SkDiffuseLightingImageFilter::onFilterImage(Proxy*,
- const SkBitmap& src,
+bool SkDiffuseLightingImageFilter::onFilterImage(Proxy* proxy,
+ const SkBitmap& source,
const SkMatrix& ctm,
SkBitmap* dst,
SkIPoint* offset) {
+ SkImageFilter* input = getInput(0);
+ SkBitmap src = source;
+ if (input && !input->filterImage(proxy, source, ctm, &src, offset)) {
+ return false;
+ }
+
if (src.config() != SkBitmap::kARGB_8888_Config) {
return false;
}
@@ -988,11 +994,17 @@ void SkSpecularLightingImageFilter::flatten(SkFlattenableWriteBuffer& buffer) co
buffer.writeScalar(fShininess);
}
-bool SkSpecularLightingImageFilter::onFilterImage(Proxy*,
- const SkBitmap& src,
+bool SkSpecularLightingImageFilter::onFilterImage(Proxy* proxy,
+ const SkBitmap& source,
const SkMatrix& ctm,
SkBitmap* dst,
SkIPoint* offset) {
+ SkImageFilter* input = getInput(0);
+ SkBitmap src = source;
+ if (input && !input->filterImage(proxy, source, ctm, &src, offset)) {
+ return false;
+ }
+
if (src.config() != SkBitmap::kARGB_8888_Config) {
return false;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698