diff options
author | John Reck <jreck@google.com> | 2017-11-13 16:47:35 -0800 |
---|---|---|
committer | John Reck <jreck@google.com> | 2017-11-13 16:53:48 -0800 |
commit | 3c0369bf0263b1b172932fdbc6a53efb01c965fc (patch) | |
tree | c95bab7d9c6bc49104b7ca30a2344ae4faeab2e7 /libs/hwui/RenderProperties.h | |
parent | ae5eb83a32a2005bd2c872bdf7b0621190ddb062 (diff) |
Create colored shadows demo
Test: HwAccelerationTest demo
Bug: 68211332
Change-Id: Ia53a6ac2854570d0495b355bbebee1dcec2f47ba
Diffstat (limited to 'libs/hwui/RenderProperties.h')
-rw-r--r-- | libs/hwui/RenderProperties.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/hwui/RenderProperties.h b/libs/hwui/RenderProperties.h index 837c4effea9f..3d2c2520624b 100644 --- a/libs/hwui/RenderProperties.h +++ b/libs/hwui/RenderProperties.h @@ -26,6 +26,7 @@ #include <SkBlendMode.h> #include <SkCamera.h> +#include <SkColor.h> #include <SkMatrix.h> #include <SkRegion.h> @@ -506,6 +507,14 @@ public: getOutline().getAlpha() != 0.0f; } + SkColor getShadowColor() const { + return mPrimitiveFields.mShadowColor; + } + + bool setShadowColor(SkColor shadowColor) { + return RP_SET(mPrimitiveFields.mShadowColor, shadowColor); + } + bool fitsOnLayer() const { const DeviceInfo* deviceInfo = DeviceInfo::get(); return mPrimitiveFields.mWidth <= deviceInfo->maxTextureSize() && @@ -529,6 +538,7 @@ private: int mLeft = 0, mTop = 0, mRight = 0, mBottom = 0; int mWidth = 0, mHeight = 0; int mClippingFlags = CLIP_TO_BOUNDS; + SkColor mShadowColor = SK_ColorBLACK; float mAlpha = 1; float mTranslationX = 0, mTranslationY = 0, mTranslationZ = 0; float mElevation = 0; |