aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/effects
diff options
context:
space:
mode:
authorGravatar senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-12-09 18:31:42 +0000
committerGravatar senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-12-09 18:31:42 +0000
commite93e1dbf0eced1e1b9aeed7c0c170961e2d61e32 (patch)
treeb0d4b72c85db74c4dcb18f5c72bf91e729854d62 /include/effects
parent907fbd53c5e5dd4cbde7b72f9242b51febd7ef95 (diff)
Implement srcRect and dstRect functionality in SkBitmapSource. This is required for the "preserveAspectRatio" options of SVG's feImage. Covered by new GM "bitmapsource".
This also includes some changes to the xfermodeimagefilter and tileimagefilter GMs to properly handle the CTM. This worked before only because SkBitmapSource was ignoring the CTM. Now that it respects it, we need to give the correct transform. This also means the GMs now work while zoomed. It also implements CTM support for SkTileImageFilter. NOTE: this will require rebaselining a number of imagefilter GMs on Nexus4, since they render in perspective (using the CTM). The changes to the results should all be improvements. R=reed@google.com, robertphillips@google.com Review URL: https://codereview.chromium.org/106933002 git-svn-id: http://skia.googlecode.com/svn/trunk@12571 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/effects')
-rw-r--r--include/effects/SkBitmapSource.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/effects/SkBitmapSource.h b/include/effects/SkBitmapSource.h
index 138987e701..699186e9f1 100644
--- a/include/effects/SkBitmapSource.h
+++ b/include/effects/SkBitmapSource.h
@@ -14,6 +14,7 @@
class SK_API SkBitmapSource : public SkImageFilter {
public:
explicit SkBitmapSource(const SkBitmap& bitmap);
+ SkBitmapSource(const SkBitmap& bitmap, const SkRect& srcRect, const SkRect& dstRect);
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBitmapSource)
@@ -25,6 +26,7 @@ protected:
private:
SkBitmap fBitmap;
+ SkRect fSrcRect, fDstRect;
typedef SkImageFilter INHERITED;
};