diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-04-29 15:20:16 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-04-29 15:20:16 +0000 |
commit | daaafa6e81860e3dc52660ba019c336f0a43f1e7 (patch) | |
tree | 199564cb7bd593526b8df65d1a4ddd5112635f33 /include/effects | |
parent | ccb25c94c9d7eaff0c996c67fe27490e2574ba2c (diff) |
add asAShadowBlur for android to drawlooper
BUG=skia:
R=djsollen@google.com, scroggo@google.com
Review URL: https://codereview.chromium.org/253633003
git-svn-id: http://skia.googlecode.com/svn/trunk@14431 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/effects')
-rw-r--r-- | include/effects/SkBlurDrawLooper.h | 5 | ||||
-rw-r--r-- | include/effects/SkEmbossMaskFilter.h | 4 | ||||
-rw-r--r-- | include/effects/SkLayerDrawLooper.h | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/include/effects/SkBlurDrawLooper.h b/include/effects/SkBlurDrawLooper.h index fe945c3801..75ed80e679 100644 --- a/include/effects/SkBlurDrawLooper.h +++ b/include/effects/SkBlurDrawLooper.h @@ -61,10 +61,12 @@ protected: SkBlurDrawLooper(SkReadBuffer&); virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; + virtual bool asABlurShadow(BlurShadowRec*) const SK_OVERRIDE; + private: SkMaskFilter* fBlur; SkColorFilter* fColorFilter; - SkScalar fDx, fDy; + SkScalar fDx, fDy, fSigma; SkColor fBlurColor; uint32_t fBlurFlags; @@ -86,6 +88,7 @@ private: }; void init(SkScalar sigma, SkScalar dx, SkScalar dy, SkColor color, uint32_t flags); + void initEffects(); typedef SkDrawLooper INHERITED; }; diff --git a/include/effects/SkEmbossMaskFilter.h b/include/effects/SkEmbossMaskFilter.h index eb8f8117a4..65dbbe7a59 100644 --- a/include/effects/SkEmbossMaskFilter.h +++ b/include/effects/SkEmbossMaskFilter.h @@ -23,9 +23,7 @@ public: uint8_t fSpecular; // exponent, 4.4 right now }; - static SkEmbossMaskFilter* Create(SkScalar blurSigma, const Light& light) { - return SkNEW_ARGS(SkEmbossMaskFilter, (blurSigma, light)); - } + static SkEmbossMaskFilter* Create(SkScalar blurSigma, const Light& light); // overrides from SkMaskFilter // This method is not exported to java. diff --git a/include/effects/SkLayerDrawLooper.h b/include/effects/SkLayerDrawLooper.h index fe660a8aae..ac56e288dc 100644 --- a/include/effects/SkLayerDrawLooper.h +++ b/include/effects/SkLayerDrawLooper.h @@ -77,6 +77,8 @@ public: virtual size_t contextSize() const SK_OVERRIDE { return sizeof(LayerDrawLooperContext); } + virtual bool asABlurShadow(BlurShadowRec* rec) const SK_OVERRIDE; + SK_TO_STRING_OVERRIDE() /// Implements Flattenable. |