Merge "Only create clip bound object when RenderNode is not quick rejected" am: b9c3e68a5d am: a8f5e69f86

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2255675

Change-Id: Ib54a0bfcd160672469355e476096884d66d57c18
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot
2022-11-02 08:07:34 +00:00
committed by Automerger Merge Worker

View File

@@ -224,10 +224,10 @@ void RenderNodeDrawable::drawContent(SkCanvas* canvas) const {
// TODO should we let the bound of the drawable do this for us? // TODO should we let the bound of the drawable do this for us?
const SkRect bounds = SkRect::MakeWH(properties.getWidth(), properties.getHeight()); const SkRect bounds = SkRect::MakeWH(properties.getWidth(), properties.getHeight());
bool quickRejected = properties.getClipToBounds() && canvas->quickReject(bounds); bool quickRejected = properties.getClipToBounds() && canvas->quickReject(bounds);
if (!quickRejected) {
auto clipBounds = canvas->getLocalClipBounds(); auto clipBounds = canvas->getLocalClipBounds();
SkIRect srcBounds = SkIRect::MakeWH(bounds.width(), bounds.height()); SkIRect srcBounds = SkIRect::MakeWH(bounds.width(), bounds.height());
SkIPoint offset = SkIPoint::Make(0.0f, 0.0f); SkIPoint offset = SkIPoint::Make(0.0f, 0.0f);
if (!quickRejected) {
SkiaDisplayList* displayList = renderNode->getDisplayList().asSkiaDl(); SkiaDisplayList* displayList = renderNode->getDisplayList().asSkiaDl();
const LayerProperties& layerProperties = properties.layerProperties(); const LayerProperties& layerProperties = properties.layerProperties();
// composing a hardware layer // composing a hardware layer