aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-12-06 15:59:03 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-12-06 15:59:03 +0000
commit094147d52227a0b230d7a894a69bcfeebe58b2ab (patch)
tree8506b8a696bffba155f7d506abf8b191db79fe70 /include
parent80bd0c995d9ec6a70330d6dc3f2f8dd387701d1d (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. 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
Diffstat (limited to 'include')
-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;
};