diff options
author | 2022-11-02 08:39:53 +0000 | |
---|---|---|
committer | 2022-11-02 08:39:53 +0000 | |
commit | a87173baac664c4dac1cac0afcc485657dd584be (patch) | |
tree | 20c8f7bb166ca51c34a51f61f8f5e803fa82ddc3 | |
parent | 6745a77c6c0a8524802b984f729541d3310bad22 (diff) | |
parent | 7562b2f78b4e126bb051228a0f8d52dad4e8a54a (diff) |
Merge "Only create clip bound object when RenderNode is not quick rejected" am: b9c3e68a5d am: a8f5e69f86 am: 7562b2f78b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2255675
Change-Id: Ic32262351d71b430f3f16f25f7d2075cc831c797
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | libs/hwui/pipeline/skia/RenderNodeDrawable.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/hwui/pipeline/skia/RenderNodeDrawable.cpp b/libs/hwui/pipeline/skia/RenderNodeDrawable.cpp index f2282e661535..1a47db5c8ec2 100644 --- a/libs/hwui/pipeline/skia/RenderNodeDrawable.cpp +++ b/libs/hwui/pipeline/skia/RenderNodeDrawable.cpp @@ -229,10 +229,10 @@ void RenderNodeDrawable::drawContent(SkCanvas* canvas) const { // TODO should we let the bound of the drawable do this for us? const SkRect bounds = SkRect::MakeWH(properties.getWidth(), properties.getHeight()); bool quickRejected = properties.getClipToBounds() && canvas->quickReject(bounds); - auto clipBounds = canvas->getLocalClipBounds(); - SkIRect srcBounds = SkIRect::MakeWH(bounds.width(), bounds.height()); - SkIPoint offset = SkIPoint::Make(0.0f, 0.0f); if (!quickRejected) { + auto clipBounds = canvas->getLocalClipBounds(); + SkIRect srcBounds = SkIRect::MakeWH(bounds.width(), bounds.height()); + SkIPoint offset = SkIPoint::Make(0.0f, 0.0f); SkiaDisplayList* displayList = renderNode->getDisplayList().asSkiaDl(); const LayerProperties& layerProperties = properties.layerProperties(); // composing a hardware layer |