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

Unified Diff: src/effects/SkXfermodeImageFilter.cpp

Issue 185973003: Cleanup patch to move all of SkImageFilterUtils into SkImageFilter. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Oh, the Rietveld suckage Created 6 years, 10 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/SkMorphologyImageFilter.cpp ('k') | no next file » | 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 d43699db6435eb938a91f2058d62b80f3ff793a3..cdc026a654b0d0bb78a13932b21588e55a7cfcd1 100644
--- a/src/effects/SkXfermodeImageFilter.cpp
+++ b/src/effects/SkXfermodeImageFilter.cpp
@@ -16,7 +16,6 @@
#include "GrContext.h"
#include "effects/GrSimpleTextureEffect.h"
#include "SkGr.h"
-#include "SkImageFilterUtils.h"
#endif
///////////////////////////////////////////////////////////////////////////////
@@ -101,17 +100,17 @@ bool SkXfermodeImageFilter::filterImageGPU(Proxy* proxy,
const SkMatrix& ctm,
SkBitmap* result,
SkIPoint* offset) const {
- SkBitmap background;
+ SkBitmap background = src;
SkIPoint backgroundOffset = SkIPoint::Make(0, 0);
- if (!SkImageFilterUtils::GetInputResultGPU(getInput(0), proxy, src, ctm, &background,
- &backgroundOffset)) {
+ if (getInput(0) && !getInput(0)->getInputResultGPU(proxy, src, ctm, &background,
+ &backgroundOffset)) {
return false;
}
GrTexture* backgroundTex = background.getTexture();
- SkBitmap foreground;
+ SkBitmap foreground = src;
SkIPoint foregroundOffset = SkIPoint::Make(0, 0);
- if (!SkImageFilterUtils::GetInputResultGPU(getInput(1), proxy, src, ctm, &foreground,
- &foregroundOffset)) {
+ if (getInput(1) && !getInput(1)->getInputResultGPU(proxy, src, ctm, &foreground,
+ &foregroundOffset)) {
return false;
}
GrTexture* foregroundTex = foreground.getTexture();
@@ -160,7 +159,8 @@ bool SkXfermodeImageFilter::filterImageGPU(Proxy* proxy,
}
offset->fX = backgroundOffset.fX;
offset->fY = backgroundOffset.fY;
- return SkImageFilterUtils::WrapTexture(dst, src.width(), src.height(), result);
+ WrapTexture(dst, src.width(), src.height(), result);
+ return true;
}
#endif
« no previous file with comments | « src/effects/SkMorphologyImageFilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698