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

Commit d348ec20 authored by Chet Haase's avatar Chet Haase Committed by Android Git Automerger
Browse files

am d95316e2: Merge "Skip drawing offscreen objects" into jb-mr1-dev

* commit 'd95316e2':
  Skip drawing offscreen objects
parents f223282b d95316e2
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -887,11 +887,12 @@ public final class ViewRootImpl implements ViewParent,
        // Intersect with the bounds of the window to skip
        // updates that lie outside of the visible region
        final float appScale = mAttachInfo.mApplicationScale;
        localDirty.intersect(0, 0,
                (int) (mWidth * appScale + 0.5f), (int) (mHeight * appScale + 0.5f));

        if (!mWillDrawSoon) {
        if (localDirty.intersect(0, 0,
                (int) (mWidth * appScale + 0.5f), (int) (mHeight * appScale + 0.5f)) &&
                !mWillDrawSoon) {
            scheduleTraversals();
        } else {
            localDirty.setEmpty();
        }

        return null;