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

Unified Diff: src/effects/SkXfermodeImageFilter.cpp

Issue 189913021: Implement support for a Context parameter in image filters (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Revert all but the Context changes. Created 6 years, 9 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/SkTileImageFilter.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkXfermodeImageFilter.cpp
diff --git a/src/effects/SkXfermodeImageFilter.cpp b/src/effects/SkXfermodeImageFilter.cpp
index cdc026a654b0d0bb78a13932b21588e55a7cfcd1..ebfd16c4db31b1f7b4c4476ef625317a73f43672 100644
--- a/src/effects/SkXfermodeImageFilter.cpp
+++ b/src/effects/SkXfermodeImageFilter.cpp
@@ -44,7 +44,7 @@ void SkXfermodeImageFilter::flatten(SkWriteBuffer& buffer) const {
bool SkXfermodeImageFilter::onFilterImage(Proxy* proxy,
const SkBitmap& src,
- const SkMatrix& ctm,
+ const Context& ctx,
SkBitmap* dst,
SkIPoint* offset) const {
SkBitmap background = src, foreground = src;
@@ -52,12 +52,12 @@ bool SkXfermodeImageFilter::onFilterImage(Proxy* proxy,
SkImageFilter* foregroundInput = getInput(1);
SkIPoint backgroundOffset = SkIPoint::Make(0, 0);
if (backgroundInput &&
- !backgroundInput->filterImage(proxy, src, ctm, &background, &backgroundOffset)) {
+ !backgroundInput->filterImage(proxy, src, ctx, &background, &backgroundOffset)) {
return false;
}
SkIPoint foregroundOffset = SkIPoint::Make(0, 0);
if (foregroundInput &&
- !foregroundInput->filterImage(proxy, src, ctm, &foreground, &foregroundOffset)) {
+ !foregroundInput->filterImage(proxy, src, ctx, &foreground, &foregroundOffset)) {
return false;
}
@@ -67,7 +67,7 @@ bool SkXfermodeImageFilter::onFilterImage(Proxy* proxy,
foreground.getBounds(&foregroundBounds);
foregroundBounds.offset(foregroundOffset);
bounds.join(foregroundBounds);
- if (!applyCropRect(&bounds, ctm)) {
+ if (!applyCropRect(&bounds, ctx.ctm())) {
return false;
}
@@ -97,19 +97,19 @@ bool SkXfermodeImageFilter::onFilterImage(Proxy* proxy,
bool SkXfermodeImageFilter::filterImageGPU(Proxy* proxy,
const SkBitmap& src,
- const SkMatrix& ctm,
+ const Context& ctx,
SkBitmap* result,
SkIPoint* offset) const {
SkBitmap background = src;
SkIPoint backgroundOffset = SkIPoint::Make(0, 0);
- if (getInput(0) && !getInput(0)->getInputResultGPU(proxy, src, ctm, &background,
+ if (getInput(0) && !getInput(0)->getInputResultGPU(proxy, src, ctx, &background,
&backgroundOffset)) {
return false;
}
GrTexture* backgroundTex = background.getTexture();
SkBitmap foreground = src;
SkIPoint foregroundOffset = SkIPoint::Make(0, 0);
- if (getInput(1) && !getInput(1)->getInputResultGPU(proxy, src, ctm, &foreground,
+ if (getInput(1) && !getInput(1)->getInputResultGPU(proxy, src, ctx, &foreground,
&foregroundOffset)) {
return false;
}
« no previous file with comments | « src/effects/SkTileImageFilter.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698