summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2022-11-02 07:13:35 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2022-11-02 07:13:35 +0000
commita8f5e69f867a63f55fb346317e71d53d6d63a47b (patch)
treeddf55c0aecd1f2692977cbbbbdd0ad9a5391df3b /libs
parent09ce36118957d26a612b149a0e123ad1f0519335 (diff)
parentb9c3e68a5d84dbea29eebd8e174512cd3443c7ad (diff)
Merge "Only create clip bound object when RenderNode is not quick rejected" am: b9c3e68a5d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2255675 Change-Id: I74843dc257f75de076267be4cbe4bc30fbbba464 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'libs')
-rw-r--r--libs/hwui/pipeline/skia/RenderNodeDrawable.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/hwui/pipeline/skia/RenderNodeDrawable.cpp b/libs/hwui/pipeline/skia/RenderNodeDrawable.cpp
index 507d3dcdcde9..9e17b9e6d985 100644
--- a/libs/hwui/pipeline/skia/RenderNodeDrawable.cpp
+++ b/libs/hwui/pipeline/skia/RenderNodeDrawable.cpp
@@ -224,10 +224,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