diff options
| author | Alex Sakhartchouk <alexst@google.com> | 2011-11-15 04:10:47 -0800 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2011-11-15 04:10:47 -0800 |
| commit | 8ee964d10e0411e81b593f8d6ac9684dcd679eb1 (patch) | |
| tree | e8253428b0412c4ebef0ee351949160de505ca08 /graphics/java/android/renderscript | |
| parent | b069e4e169640dc52780b475f389dad79fa4b5aa (diff) | |
| parent | b14d771cf07479e3186a167a219fb2d42d8d4d30 (diff) | |
| download | frameworks_base-8ee964d10e0411e81b593f8d6ac9684dcd679eb1.zip frameworks_base-8ee964d10e0411e81b593f8d6ac9684dcd679eb1.tar.gz frameworks_base-8ee964d10e0411e81b593f8d6ac9684dcd679eb1.tar.bz2 | |
am b14d771c: am f579bb92: am cde433c5: Merge "Fixing a race condition in RSSurfaceView. Bug 5601083 When destroy is called shortly after creation, RS tries to set a surface on a partially destroyed context." into ics-mr1
* commit 'b14d771cf07479e3186a167a219fb2d42d8d4d30':
Fixing a race condition in RSSurfaceView. Bug 5601083 When destroy is called shortly after creation, RS tries to set a surface on a partially destroyed context.
Diffstat (limited to 'graphics/java/android/renderscript')
| -rw-r--r-- | graphics/java/android/renderscript/RSSurfaceView.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/graphics/java/android/renderscript/RSSurfaceView.java b/graphics/java/android/renderscript/RSSurfaceView.java index 199952c..20eb93f 100644 --- a/graphics/java/android/renderscript/RSSurfaceView.java +++ b/graphics/java/android/renderscript/RSSurfaceView.java @@ -30,7 +30,7 @@ import android.view.SurfaceHolder; import android.view.SurfaceView; /** - * The Surface View for a graphics renderscript (RenderScriptGL) to draw on. + * The Surface View for a graphics renderscript (RenderScriptGL) to draw on. */ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback { private SurfaceHolder mSurfaceHolder; @@ -77,7 +77,7 @@ 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 void surfaceDestroyed(SurfaceHolder holder) { + public synchronized void surfaceDestroyed(SurfaceHolder holder) { // Surface will be destroyed when we return if (mRS != null) { mRS.setSurface(null, 0, 0); @@ -88,7 +88,7 @@ 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 void surfaceChanged(SurfaceHolder holder, int format, int w, int h) { + public synchronized void surfaceChanged(SurfaceHolder holder, int format, int w, int h) { if (mRS != null) { mRS.setSurface(holder, w, h); } @@ -125,7 +125,7 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback return rs; } - public void destroyRenderScriptGL() { + public synchronized void destroyRenderScriptGL() { mRS.destroy(); mRS = null; } |
