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

Commit f5106847 authored by Romain Guy's avatar Romain Guy
Browse files

Don't add clipped rects to layer regions.

Bug #3350208

Change-Id: I9266862f1d4d57b4598852e8dfa202b5f5099cce
parent 501053a1
Loading
Loading
Loading
Loading
+12 −12
Original line number Diff line number Diff line
@@ -697,14 +697,14 @@ void OpenGLRenderer::dirtyLayer(const float left, const float top,
    if ((mSnapshot->flags & Snapshot::kFlagFboTarget) && mSnapshot->region) {
        Rect bounds(left, top, right, bottom);
        transform.mapRect(bounds);
        bounds.intersect(*mSnapshot->clipRect);
        if (bounds.intersect(*mSnapshot->clipRect)) {
            bounds.snapToPixelBoundaries();

            android::Rect dirty(bounds.left, bounds.top, bounds.right, bounds.bottom);
            if (!dirty.isEmpty()) {
                mSnapshot->region->orSelf(dirty);
            }
        }
    }
#endif
}

@@ -713,14 +713,14 @@ void OpenGLRenderer::dirtyLayer(const float left, const float top,
#if RENDER_LAYERS_AS_REGIONS
    if ((mSnapshot->flags & Snapshot::kFlagFboTarget) && mSnapshot->region) {
        Rect bounds(left, top, right, bottom);
        bounds.intersect(*mSnapshot->clipRect);
        if (bounds.intersect(*mSnapshot->clipRect)) {
            bounds.snapToPixelBoundaries();

            android::Rect dirty(bounds.left, bounds.top, bounds.right, bounds.bottom);
            if (!dirty.isEmpty()) {
                mSnapshot->region->orSelf(dirty);
            }
        }
    }
#endif
}