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

Commit d44a1686 authored by Romain Guy's avatar Romain Guy Committed by Android (Google) Code Review
Browse files

Merge "Don't draw onto a hw surface using the software renderer Bug #6485955" into jb-dev

parents 67d10a58 413baf8a
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -2183,6 +2183,18 @@ public final class ViewRootImpl implements ViewParent,
    private boolean drawSoftware(Surface surface, AttachInfo attachInfo, int yoff,
            boolean scalingRequired, Rect dirty) {

        // If we get here with a disabled & requested hardware renderer, something went
        // wrong (an invalidate posted right before we destroyed the hardware surface
        // for instance) so we should just bail out. Locking the surface with software
        // rendering at this point would lock it forever and prevent hardware renderer
        // from doing its job when it comes back.
        if (attachInfo.mHardwareRenderer != null && !attachInfo.mHardwareRenderer.isEnabled() &&
                attachInfo.mHardwareRenderer.isRequested()) {
            mFullRedrawNeeded = true;
            scheduleTraversals();
            return false;
        }

        // Draw with software renderer.
        Canvas canvas;
        try {