aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/effects/SkMagnifierImageFilter.h
diff options
context:
space:
mode:
authorGravatar senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-27 21:37:01 +0000
committerGravatar senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-27 21:37:01 +0000
commitfbaea5336690ffc4fd9ee695608e9457da10eeab (patch)
tree1839224ddda0af4fcfd29e42738d90b0f9ed3127 /include/effects/SkMagnifierImageFilter.h
parent9d54db045b7fc605b200a84629f3d57a212203d5 (diff)
In image filters, apply the CTM and offset to the crop rect. This is necessary to compensate for both clipping applied by the compositor (communicated via the CTM) and for cropping applied in upstream image filters (communicated via the offset). This requires a few ugly conversions, since the crop rect is an SkIRect, and the ctm is an SkMatrix.
I also had to offset the matrix passed to filter evaluation by drawSprite() and internalDrawBitmap() by the primitive position. This is the same offset that is applied when drawing the primitive, to compensate for the internal saveLayer(). Also apply the total matrix to the filter params in asNewEffect(), so that (for example) lighting params are offset by both the compositor clipping and upstream crop rects. R=reed@google.com Review URL: https://codereview.chromium.org/23295017 git-svn-id: http://skia.googlecode.com/svn/trunk@10961 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/effects/SkMagnifierImageFilter.h')
-rw-r--r--include/effects/SkMagnifierImageFilter.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/effects/SkMagnifierImageFilter.h b/include/effects/SkMagnifierImageFilter.h
index b5cbd74ab1..31b446f6a5 100644
--- a/include/effects/SkMagnifierImageFilter.h
+++ b/include/effects/SkMagnifierImageFilter.h
@@ -17,7 +17,7 @@ public:
SkMagnifierImageFilter(SkRect srcRect, SkScalar inset);
#if SK_SUPPORT_GPU
- virtual bool asNewEffect(GrEffectRef** effect, GrTexture* texture, const SkIPoint& offset) const SK_OVERRIDE;
+ virtual bool asNewEffect(GrEffectRef** effect, GrTexture* texture, const SkMatrix& matrix) const SK_OVERRIDE;
#endif
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMagnifierImageFilter)