summaryrefslogtreecommitdiffstats
path: root/graphics/java/android/renderscript
diff options
context:
space:
mode:
authorAlex Sakhartchouk <alexst@google.com>2011-11-17 04:13:03 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2011-11-17 04:13:03 -0800
commite679e2ebcfb85a0d26507f7afe7547c986858bc2 (patch)
tree8e1e79fa9b994d11d370407ba553597a31797fdd /graphics/java/android/renderscript
parent37c52254a1f2f0ec125332068484d2b40766b635 (diff)
parente693fa3e184f7a49f9bf912a0dac057fb339b8a4 (diff)
downloadframeworks_base-e679e2ebcfb85a0d26507f7afe7547c986858bc2.zip
frameworks_base-e679e2ebcfb85a0d26507f7afe7547c986858bc2.tar.gz
frameworks_base-e679e2ebcfb85a0d26507f7afe7547c986858bc2.tar.bz2
am e693fa3e: 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 'e693fa3e184f7a49f9bf912a0dac057fb339b8a4': 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.java26
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) {