Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 93f9989e authored by Zhao Qin's avatar Zhao Qin
Browse files

Only create clip bound object when RenderNode is not quick rejected

These three objects are only used when we really draw the node, so
don't create them if node has been quick rejected.

Test: TBD
Change-Id: Iae3f7a5d9c49aafd8ce3ede09b4093a2146d6568
parent 8314a3e5
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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);
    if (!quickRejected) {
        auto clipBounds = canvas->getLocalClipBounds();
        SkIRect srcBounds = SkIRect::MakeWH(bounds.width(), bounds.height());
        SkIPoint offset = SkIPoint::Make(0.0f, 0.0f);
    if (!quickRejected) {
        SkiaDisplayList* displayList = renderNode->getDisplayList().asSkiaDl();
        const LayerProperties& layerProperties = properties.layerProperties();
        // composing a hardware layer