diff options
| author | Alex Sakhartchouk <alexst@google.com> | 2011-11-17 04:08:30 -0800 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2011-11-17 04:08:30 -0800 |
| commit | e693fa3e184f7a49f9bf912a0dac057fb339b8a4 (patch) | |
| tree | bee10cc38bc679eb09272c5373621be56dda8da9 /graphics/java/android/renderscript | |
| parent | d2789aa322357ebb453bcad8825a33b27bb78c29 (diff) | |
| parent | a962ef2993099e6c5db3809a7e829e43c8cf084a (diff) | |
| download | frameworks_base-e693fa3e184f7a49f9bf912a0dac057fb339b8a4.zip frameworks_base-e693fa3e184f7a49f9bf912a0dac057fb339b8a4.tar.gz frameworks_base-e693fa3e184f7a49f9bf912a0dac057fb339b8a4.tar.bz2 | |
am a962ef29: 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 'a962ef2993099e6c5db3809a7e829e43c8cf084a':
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.
Diffstat (limited to 'graphics/java/android/renderscript')
| -rw-r--r-- | graphics/java/android/renderscript/RSSurfaceView.java | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/graphics/java/android/renderscript/RSSurfaceView.java b/graphics/java/android/renderscript/RSSurfaceView.java index 20eb93f..a8e3107 100644 --- a/graphics/java/android/renderscript/RSSurfaceView.java +++ b/graphics/java/android/renderscript/RSSurfaceView.java @@ -77,10 +77,12 @@ 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) { - // Surface will be destroyed when we return - if (mRS != null) { - mRS.setSurface(null, 0, 0); + public void surfaceDestroyed(SurfaceHolder holder) { + synchronized (this) { + // Surface will be destroyed when we return + if (mRS != null) { + mRS.setSurface(null, 0, 0); + } } } @@ -88,9 +90,11 @@ 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 surfaceChanged(SurfaceHolder holder, int format, int w, int h) { - if (mRS != null) { - mRS.setSurface(holder, w, h); + public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) { + synchronized (this) { + if (mRS != null) { + mRS.setSurface(holder, w, h); + } } } @@ -125,9 +129,11 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback return rs; } - public synchronized void destroyRenderScriptGL() { - mRS.destroy(); - mRS = null; + public void destroyRenderScriptGL() { + synchronized (this) { + mRS.destroy(); + mRS = null; + } } public void setRenderScriptGL(RenderScriptGL rs) { |
