Loading libs/hwui/Outline.h +6 −0 Original line number Original line Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include <SkPath.h> #include <SkPath.h> #include "Rect.h" #include "Rect.h" #include "utils/MathUtils.h" namespace android { namespace android { namespace uirenderer { namespace uirenderer { Loading Loading @@ -85,6 +86,11 @@ public: return mShouldClip && (mType == kOutlineType_RoundRect); return mShouldClip && (mType == kOutlineType_RoundRect); } } bool willRoundRectClip() const { // only round rect outlines can be used for clipping return willClip() && MathUtils::isPositive(mRadius); } bool getAsRoundRect(Rect* outRect, float* outRadius) const { bool getAsRoundRect(Rect* outRect, float* outRadius) const { if (mType == kOutlineType_RoundRect) { if (mType == kOutlineType_RoundRect) { outRect->set(mBounds); outRect->set(mBounds); Loading libs/hwui/RenderProperties.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -169,7 +169,7 @@ public: bool functorsNeedLayer = ancestorDictatesFunctorsNeedLayer bool functorsNeedLayer = ancestorDictatesFunctorsNeedLayer // Round rect clipping forces layer for functors // Round rect clipping forces layer for functors || CC_UNLIKELY(getOutline().willClip()) || CC_UNLIKELY(getOutline().willRoundRectClip()) || CC_UNLIKELY(getRevealClip().willClip()) || CC_UNLIKELY(getRevealClip().willClip()) // Complex matrices forces layer, due to stencil clipping // Complex matrices forces layer, due to stencil clipping Loading Loading
libs/hwui/Outline.h +6 −0 Original line number Original line Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include <SkPath.h> #include <SkPath.h> #include "Rect.h" #include "Rect.h" #include "utils/MathUtils.h" namespace android { namespace android { namespace uirenderer { namespace uirenderer { Loading Loading @@ -85,6 +86,11 @@ public: return mShouldClip && (mType == kOutlineType_RoundRect); return mShouldClip && (mType == kOutlineType_RoundRect); } } bool willRoundRectClip() const { // only round rect outlines can be used for clipping return willClip() && MathUtils::isPositive(mRadius); } bool getAsRoundRect(Rect* outRect, float* outRadius) const { bool getAsRoundRect(Rect* outRect, float* outRadius) const { if (mType == kOutlineType_RoundRect) { if (mType == kOutlineType_RoundRect) { outRect->set(mBounds); outRect->set(mBounds); Loading
libs/hwui/RenderProperties.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -169,7 +169,7 @@ public: bool functorsNeedLayer = ancestorDictatesFunctorsNeedLayer bool functorsNeedLayer = ancestorDictatesFunctorsNeedLayer // Round rect clipping forces layer for functors // Round rect clipping forces layer for functors || CC_UNLIKELY(getOutline().willClip()) || CC_UNLIKELY(getOutline().willRoundRectClip()) || CC_UNLIKELY(getRevealClip().willClip()) || CC_UNLIKELY(getRevealClip().willClip()) // Complex matrices forces layer, due to stencil clipping // Complex matrices forces layer, due to stencil clipping Loading