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

Unified Diff: src/effects/SkXfermodeImageFilter.cpp

Issue 112803004: Make SkImageFilter crop rects relative to the primitive origin, instead of relative to their parent (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Updated to ToT Created 6 years, 12 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 4674ff44abaab59d1bd8193182bc02816c9bc6cf..beb1de211c242684fd949bb0064ce20b764138a1 100644
--- a/src/effects/SkXfermodeImageFilter.cpp
+++ b/src/effects/SkXfermodeImageFilter.cpp
@@ -88,8 +88,8 @@ bool SkXfermodeImageFilter::onFilterImage(Proxy* proxy,
paint.setColor(SK_ColorTRANSPARENT);
canvas.drawPaint(paint);
*dst = device->accessBitmap(false);
- offset->fX += bounds.left();
- offset->fY += bounds.top();
+ offset->fX = bounds.left();
+ offset->fY = bounds.top();
return true;
}
@@ -157,8 +157,8 @@ bool SkXfermodeImageFilter::filterImageGPU(Proxy* proxy,
foregroundPaint.addColorTextureEffect(foregroundTex, foregroundMatrix);
context->drawRect(foregroundPaint, srcRect);
}
- offset->fX += backgroundOffset.fX;
- offset->fY += backgroundOffset.fY;
+ offset->fX = backgroundOffset.fX;
+ offset->fY = backgroundOffset.fY;
return SkImageFilterUtils::WrapTexture(dst, src.width(), src.height(), result);
}
« 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