diff options
author | 2014-01-27 22:41:45 +0000 | |
---|---|---|
committer | 2014-01-27 22:41:45 +0000 | |
commit | d1829151a5f5fb69faa50c326ed018376d117b3e (patch) | |
tree | e424d35b0b3d4be436b10ca361577e18a68702ef /include/core | |
parent | 01260b2dbcc070006c0b960015e44ef83dcbaa56 (diff) |
Perform the same analytic blur calculation on the GPU that we do on the CPU. Results in significant performance gains when using Ganesh to render drop shadows in Chrome.
BUG=
R=bsalomon@google.com, reed@google.com
Author: humper@google.com
Review URL: https://codereview.chromium.org/119343003
git-svn-id: http://skia.googlecode.com/svn/trunk@13210 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkMaskFilter.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/core/SkMaskFilter.h b/include/core/SkMaskFilter.h index ce0debd442..20dc379721 100644 --- a/include/core/SkMaskFilter.h +++ b/include/core/SkMaskFilter.h @@ -15,6 +15,7 @@ #include "SkPaint.h" class GrContext; +class GrPaint; class SkBitmap; class SkBlitter; class SkBounder; @@ -22,6 +23,7 @@ class SkMatrix; class SkPath; class SkRasterClip; class SkRRect; +class SkStrokeRec; /** \class SkMaskFilter @@ -94,6 +96,15 @@ public: SkRect* maskRect) const; /** + * Try to directly render the mask filter into the target. Returns + * true if drawing was successful. + */ + virtual bool directFilterMaskGPU(GrContext* context, + GrPaint* grp, + const SkStrokeRec& strokeRec, + const SkPath& path) const; + + /** * This function is used to implement filters that require an explicit src mask. It should only * be called if canFilterMaskGPU returned true and the maskRect param should be the output from * that call. canOverwriteSrc indicates whether the implementation may treat src as a scratch |