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

Unified Diff: src/effects/SkXfermodeImageFilter.cpp

Issue 1225923010: Refugee from Dead Machine 4: MDB Monster Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Last update from dead machine Created 4 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/SkTableColorFilter.cpp ('k') | src/effects/gradients/SkGradientShader.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 28d9a00c845a405f614cec5fab34e0b4e2287e6b..8f8eff56b51d211352397f616cd9f5d0d3e63a4b 100644
--- a/src/effects/SkXfermodeImageFilter.cpp
+++ b/src/effects/SkXfermodeImageFilter.cpp
@@ -120,14 +120,13 @@ void SkXfermodeImageFilter::toString(SkString* str) const {
#if SK_SUPPORT_GPU
bool SkXfermodeImageFilter::canFilterImageGPU() const {
- return fMode && fMode->asFragmentProcessor(nullptr, nullptr) && !cropRectIsSet();
+ return fMode && fMode->asFragmentProcessor(nullptr, nullptr, NULL) && !cropRectIsSet();
}
bool SkXfermodeImageFilter::filterImageGPU(Proxy* proxy,
const SkBitmap& src,
const Context& ctx,
- SkBitmap* result,
- SkIPoint* offset) const {
+ SkBitmap* result, SkIPoint* offset) const {
SkBitmap background = src;
SkIPoint backgroundOffset = SkIPoint::Make(0, 0);
if (!this->filterInputGPU(0, proxy, src, ctx, &background, &backgroundOffset)) {
@@ -165,8 +164,9 @@ bool SkXfermodeImageFilter::filterImageGPU(Proxy* proxy,
SkMatrix bgMatrix;
bgMatrix.setIDiv(backgroundTex->width(), backgroundTex->height());
SkAutoTUnref<const GrFragmentProcessor> bgFP(
- GrSimpleTextureEffect::Create(backgroundTex, bgMatrix));
- if (!fMode || !fMode->asFragmentProcessor(&xferFP, bgFP)) {
+ GrSimpleTextureEffect::Create(backgroundTex, bgMatrix,
+ kLocal_GrCoordSet, dst->asRenderTarget()));
+ if (!fMode || !fMode->asFragmentProcessor(&xferFP, bgFP, dst->asRenderTarget())) {
// canFilterImageGPU() should've taken care of this
SkASSERT(false);
return false;
@@ -184,8 +184,9 @@ bool SkXfermodeImageFilter::filterImageGPU(Proxy* proxy,
foregroundTex, foregroundMatrix,
GrTextureDomain::MakeTexelDomain(foregroundTex, foreground.bounds()),
GrTextureDomain::kDecal_Mode,
- GrTextureParams::kNone_FilterMode)
- );
+ GrTextureParams::kNone_FilterMode,
+ kLocal_GrCoordSet,
+ dst->asRenderTarget()));
paint.addColorFragmentProcessor(foregroundDomain.get());
if (xferFP) {
« no previous file with comments | « src/effects/SkTableColorFilter.cpp ('k') | src/effects/gradients/SkGradientShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698