From 094147d52227a0b230d7a894a69bcfeebe58b2ab Mon Sep 17 00:00:00 2001 From: "commit-bot@chromium.org" Date: Fri, 6 Dec 2013 15:59:03 +0000 Subject: 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. R=reed@google.com Author: senorblanco@chromium.org Review URL: https://codereview.chromium.org/106933002 git-svn-id: http://skia.googlecode.com/svn/trunk@12528 2bbb7eff-a529-9590-31e7-b0007b416f81 --- include/effects/SkBitmapSource.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/effects') 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; }; -- cgit v1.2.3