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

Commit c054d414 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android Git Automerger
Browse files

am 99ba7203: Merge "Avoid leaking Surface native object." into jb-mr2-dev

* commit '99ba7203':
  Avoid leaking Surface native object.
parents f652551b 99ba7203
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -389,10 +389,14 @@ final class ElectronBeam {
                mTexNamesGenerated = true;
            }

            SurfaceTexture st = new SurfaceTexture(mTexNames[0]);
            final SurfaceTexture st = new SurfaceTexture(mTexNames[0]);
            final Surface s = new Surface(st);
            try {
                SurfaceControl.screenshot(SurfaceControl.getBuiltInDisplay(
                    SurfaceControl.BUILT_IN_DISPLAY_ID_MAIN),
                    new Surface(st));
                        SurfaceControl.BUILT_IN_DISPLAY_ID_MAIN), s);
            } finally {
                s.release();
            }

            st.updateTexImage();
            st.getTransformMatrix(mTexMatrix);