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

Commit f4201925 authored by John Reck's avatar John Reck Committed by Android (Google) Code Review
Browse files

Merge "Add missing try/finallys"

parents 5451c559 05e85840
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -178,11 +178,14 @@ public class ThreadedRenderer extends HardwareRenderer {

        Trace.traceBegin(Trace.TRACE_TAG_VIEW, "getDisplayList");
        HardwareCanvas canvas = mRootNode.start(mWidth, mHeight);
        try {
            callbacks.onHardwarePostDraw(canvas);
            canvas.drawDisplayList(view.getDisplayList());
            callbacks.onHardwarePostDraw(canvas);
        } finally {
            mRootNode.end(canvas);
            Trace.traceEnd(Trace.TRACE_TAG_VIEW);
        }

        view.mRecreateDisplayList = false;
    }
+5 −2
Original line number Diff line number Diff line
@@ -14897,8 +14897,11 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        final int width = bounds.width();
        final int height = bounds.height();
        final HardwareCanvas canvas = displayList.start(width, height);
        try {
            drawable.draw(canvas);
        } finally {
            displayList.end(canvas);
        }
        // Set up drawable properties that are view-independent.
        displayList.setLeftTopRightBottom(bounds.left, bounds.top, bounds.right, bounds.bottom);
+36 −33
Original line number Diff line number Diff line
@@ -1514,6 +1514,7 @@ public final class ViewRootImpl implements ViewParent,
                        mResizeBuffer.prepare(mWidth, mHeight, false);
                        RenderNode layerRenderNode = mResizeBuffer.startRecording();
                        HardwareCanvas layerCanvas = layerRenderNode.start(mWidth, mHeight);
                        try {
                            final int restoreCount = layerCanvas.save();

                            int yoff;
@@ -1550,7 +1551,9 @@ public final class ViewRootImpl implements ViewParent,
                            layerRenderNode.setCaching(true);
                            layerRenderNode.setLeftTopRightBottom(0, 0, mWidth, mHeight);
                            mTempRect.set(0, 0, mWidth, mHeight);
                        } finally {
                            mResizeBuffer.endRecording(mTempRect);
                        }
                        mAttachInfo.mHardwareRenderer.flushLayerUpdates();
                    }
                    mAttachInfo.mContentInsets.set(mPendingContentInsets);