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

Unified Diff: src/effects/SkXfermodeImageFilter.cpp

Issue 1065683002: Switch textures created by DeviceImageFilterProxy to approx-match. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix trailing semicolon Created 5 years, 8 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') | 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 c3f8487ab6fe4f12718f6323675e6d7f924af331..6cd54372bf349a4e6b57d095a9c0d45730a18657 100644
--- a/src/effects/SkXfermodeImageFilter.cpp
+++ b/src/effects/SkXfermodeImageFilter.cpp
@@ -14,7 +14,7 @@
#include "SkXfermode.h"
#if SK_SUPPORT_GPU
#include "GrContext.h"
-#include "effects/GrSimpleTextureEffect.h"
+#include "effects/GrTextureDomain.h"
#include "SkGr.h"
#endif
@@ -169,7 +169,14 @@ bool SkXfermodeImageFilter::filterImageGPU(Proxy* proxy,
src.getBounds(&srcRect);
GrPaint paint;
- paint.addColorTextureProcessor(foregroundTex, foregroundMatrix);
+ SkAutoTUnref<GrFragmentProcessor> foregroundDomain(GrTextureDomainEffect::Create(
+ foregroundTex, foregroundMatrix,
+ GrTextureDomain::MakeTexelDomain(foregroundTex, foreground.bounds()),
+ GrTextureDomain::kDecal_Mode,
+ GrTextureParams::kNone_FilterMode)
+ );
+
+ paint.addColorProcessor(foregroundDomain.get());
paint.addColorProcessor(xferProcessor)->unref();
context->drawRect(dst->asRenderTarget(), GrClip::WideOpen(), paint, SkMatrix::I(), srcRect);
« no previous file with comments | « src/effects/SkDisplacementMapEffect.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698