Loading graphics/java/android/graphics/Outline.java +3 −3 Original line number Diff line number Diff line Loading @@ -118,13 +118,13 @@ public final class Outline { /** * Returns whether the outline can be used to clip a View. * <p> * Currently, only Outlines that can be represented as a rectangle, circle, * or round rect support clipping. * As of API 33, all Outline shapes support clipping. Prior to API 33, only Outlines that * could be represented as a rectangle, circle, or round rect supported clipping. * * @see android.view.View#setClipToOutline(boolean) */ public boolean canClip() { return mMode != MODE_PATH; return true; } /** Loading libs/hwui/Outline.h +3 −7 Original line number Diff line number Diff line Loading @@ -88,14 +88,10 @@ public: bool getShouldClip() const { return mShouldClip; } bool willClip() const { // only round rect outlines can be used for clipping return mShouldClip && (mType == Type::RoundRect); } bool willClip() const { return mShouldClip; } bool willRoundRectClip() const { // only round rect outlines can be used for clipping return willClip() && MathUtils::isPositive(mRadius); bool willComplexClip() const { return mShouldClip && (mType != Type::RoundRect || MathUtils::isPositive(mRadius)); } bool getAsRoundRect(Rect* outRect, float* outRadius) const { Loading libs/hwui/ProfileData.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -137,6 +137,7 @@ void ProfileData::dump(int fd) const { histogramGPUForEach([fd](HistogramEntry entry) { dprintf(fd, " %ums=%u", entry.renderTimeMs, entry.frameCount); }); dprintf(fd, "\n"); } uint32_t ProfileData::findPercentile(int percentile) const { Loading libs/hwui/RenderProperties.h +3 −3 Original line number Diff line number Diff line Loading @@ -165,11 +165,11 @@ public: bool prepareForFunctorPresence(bool willHaveFunctor, bool ancestorDictatesFunctorsNeedLayer) { // parent may have already dictated that a descendant layer is needed bool functorsNeedLayer = ancestorDictatesFunctorsNeedLayer || CC_UNLIKELY(isClipMayBeComplex()) ancestorDictatesFunctorsNeedLayer || CC_UNLIKELY(isClipMayBeComplex()) // Round rect clipping forces layer for functors || CC_UNLIKELY(getOutline().willRoundRectClip()) || || CC_UNLIKELY(getOutline().willComplexClip()) || CC_UNLIKELY(getRevealClip().willClip()) // Complex matrices forces layer, due to stencil clipping Loading libs/hwui/pipeline/skia/RenderNodeDrawable.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,10 @@ static void clipOutline(const Outline& outline, SkCanvas* canvas, const SkRect* if (pendingClip) { canvas->clipRect(*pendingClip); } const SkPath* path = outline.getPath(); if (path) { canvas->clipPath(*path, SkClipOp::kIntersect, true); } return; } Loading Loading
graphics/java/android/graphics/Outline.java +3 −3 Original line number Diff line number Diff line Loading @@ -118,13 +118,13 @@ public final class Outline { /** * Returns whether the outline can be used to clip a View. * <p> * Currently, only Outlines that can be represented as a rectangle, circle, * or round rect support clipping. * As of API 33, all Outline shapes support clipping. Prior to API 33, only Outlines that * could be represented as a rectangle, circle, or round rect supported clipping. * * @see android.view.View#setClipToOutline(boolean) */ public boolean canClip() { return mMode != MODE_PATH; return true; } /** Loading
libs/hwui/Outline.h +3 −7 Original line number Diff line number Diff line Loading @@ -88,14 +88,10 @@ public: bool getShouldClip() const { return mShouldClip; } bool willClip() const { // only round rect outlines can be used for clipping return mShouldClip && (mType == Type::RoundRect); } bool willClip() const { return mShouldClip; } bool willRoundRectClip() const { // only round rect outlines can be used for clipping return willClip() && MathUtils::isPositive(mRadius); bool willComplexClip() const { return mShouldClip && (mType != Type::RoundRect || MathUtils::isPositive(mRadius)); } bool getAsRoundRect(Rect* outRect, float* outRadius) const { Loading
libs/hwui/ProfileData.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -137,6 +137,7 @@ void ProfileData::dump(int fd) const { histogramGPUForEach([fd](HistogramEntry entry) { dprintf(fd, " %ums=%u", entry.renderTimeMs, entry.frameCount); }); dprintf(fd, "\n"); } uint32_t ProfileData::findPercentile(int percentile) const { Loading
libs/hwui/RenderProperties.h +3 −3 Original line number Diff line number Diff line Loading @@ -165,11 +165,11 @@ public: bool prepareForFunctorPresence(bool willHaveFunctor, bool ancestorDictatesFunctorsNeedLayer) { // parent may have already dictated that a descendant layer is needed bool functorsNeedLayer = ancestorDictatesFunctorsNeedLayer || CC_UNLIKELY(isClipMayBeComplex()) ancestorDictatesFunctorsNeedLayer || CC_UNLIKELY(isClipMayBeComplex()) // Round rect clipping forces layer for functors || CC_UNLIKELY(getOutline().willRoundRectClip()) || || CC_UNLIKELY(getOutline().willComplexClip()) || CC_UNLIKELY(getRevealClip().willClip()) // Complex matrices forces layer, due to stencil clipping Loading
libs/hwui/pipeline/skia/RenderNodeDrawable.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,10 @@ static void clipOutline(const Outline& outline, SkCanvas* canvas, const SkRect* if (pendingClip) { canvas->clipRect(*pendingClip); } const SkPath* path = outline.getPath(); if (path) { canvas->clipPath(*path, SkClipOp::kIntersect, true); } return; } Loading