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

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

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

* commit 'c054d414':
  Avoid leaking Surface native object.
parents b31c3610 c054d414
Loading
Loading
Loading
Loading
+8 −4
Original line number Original line Diff line number Diff line
@@ -389,10 +389,14 @@ final class ElectronBeam {
                mTexNamesGenerated = true;
                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.screenshot(SurfaceControl.getBuiltInDisplay(
                    SurfaceControl.BUILT_IN_DISPLAY_ID_MAIN),
                        SurfaceControl.BUILT_IN_DISPLAY_ID_MAIN), s);
                    new Surface(st));
            } finally {
                s.release();
            }


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