Loading services/surfaceflinger/Layer.cpp +8 −2 Original line number Diff line number Diff line Loading @@ -1788,9 +1788,13 @@ half4 Layer::getColor() const { } Layer::RoundedCornerState Layer::getRoundedCornerState() const { return getRoundedCornerStateInternal(mSourceBounds); } Layer::RoundedCornerState Layer::getRoundedCornerStateInternal(const FloatRect bounds) const { const auto& p = mDrawingParent.promote(); if (p != nullptr) { RoundedCornerState parentState = p->getRoundedCornerState(); RoundedCornerState parentState = p->getRoundedCornerStateInternal(bounds); if (parentState.radius > 0) { ui::Transform t = getActiveTransform(getDrawingState()); t = t.inverse(); Loading @@ -1804,7 +1808,9 @@ Layer::RoundedCornerState Layer::getRoundedCornerState() const { } } const float radius = getDrawingState().cornerRadius; return radius > 0 ? RoundedCornerState(getBounds(), radius) : RoundedCornerState(); return radius > 0 ? RoundedCornerState(bounds.intersect(getCrop(getDrawingState()).toFloatRect()), radius) : RoundedCornerState(); } void Layer::commitChildList() { Loading services/surfaceflinger/Layer.h +2 −0 Original line number Diff line number Diff line Loading @@ -907,6 +907,8 @@ private: */ Rect getCroppedBufferSize(const Layer::State& s) const; RoundedCornerState getRoundedCornerStateInternal(const FloatRect bounds) const; // Cached properties computed from drawing state // Effective transform taking into account parent transforms and any parent scaling. ui::Transform mEffectiveTransform; Loading Loading
services/surfaceflinger/Layer.cpp +8 −2 Original line number Diff line number Diff line Loading @@ -1788,9 +1788,13 @@ half4 Layer::getColor() const { } Layer::RoundedCornerState Layer::getRoundedCornerState() const { return getRoundedCornerStateInternal(mSourceBounds); } Layer::RoundedCornerState Layer::getRoundedCornerStateInternal(const FloatRect bounds) const { const auto& p = mDrawingParent.promote(); if (p != nullptr) { RoundedCornerState parentState = p->getRoundedCornerState(); RoundedCornerState parentState = p->getRoundedCornerStateInternal(bounds); if (parentState.radius > 0) { ui::Transform t = getActiveTransform(getDrawingState()); t = t.inverse(); Loading @@ -1804,7 +1808,9 @@ Layer::RoundedCornerState Layer::getRoundedCornerState() const { } } const float radius = getDrawingState().cornerRadius; return radius > 0 ? RoundedCornerState(getBounds(), radius) : RoundedCornerState(); return radius > 0 ? RoundedCornerState(bounds.intersect(getCrop(getDrawingState()).toFloatRect()), radius) : RoundedCornerState(); } void Layer::commitChildList() { Loading
services/surfaceflinger/Layer.h +2 −0 Original line number Diff line number Diff line Loading @@ -907,6 +907,8 @@ private: */ Rect getCroppedBufferSize(const Layer::State& s) const; RoundedCornerState getRoundedCornerStateInternal(const FloatRect bounds) const; // Cached properties computed from drawing state // Effective transform taking into account parent transforms and any parent scaling. ui::Transform mEffectiveTransform; Loading