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

Commit a962ef29 authored by Alex Sakhartchouk's avatar Alex Sakhartchouk Committed by Android Git Automerger
Browse files

am 4c593010: Merge "Followup to a bug fix. Addtion of synchronized to the...

am 4c593010: Merge "Followup to a bug fix. Addtion of synchronized to the methods triggers an API change. Per council advice, pushing synch block into the function body." into ics-mr1

* commit '4c593010':
  Followup to a bug fix. Addtion of synchronized to the methods triggers an API change. Per council advice, pushing synch block into the function body.
parents d592714d 4c593010
Loading
Loading
Loading
Loading
+16 −10
Original line number Diff line number Diff line
@@ -77,22 +77,26 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback
     * This method is part of the SurfaceHolder.Callback interface, and is
     * not normally called or subclassed by clients of RSSurfaceView.
     */
    public synchronized void surfaceDestroyed(SurfaceHolder holder) {
    public void surfaceDestroyed(SurfaceHolder holder) {
        synchronized (this) {
            // Surface will be destroyed when we return
            if (mRS != null) {
                mRS.setSurface(null, 0, 0);
            }
        }
    }

    /**
     * This method is part of the SurfaceHolder.Callback interface, and is
     * not normally called or subclassed by clients of RSSurfaceView.
     */
    public synchronized void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
    public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
        synchronized (this) {
            if (mRS != null) {
                mRS.setSurface(holder, w, h);
            }
        }
    }

   /**
     * Inform the view that the activity is paused. The owner of this view must
@@ -125,10 +129,12 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback
        return rs;
    }

    public synchronized void destroyRenderScriptGL() {
    public void destroyRenderScriptGL() {
        synchronized (this) {
            mRS.destroy();
            mRS = null;
        }
    }

    public void setRenderScriptGL(RenderScriptGL rs) {
        mRS = rs;