From a44249500f6c1c7a75b5c420fa2e81c2aa317a10 Mon Sep 17 00:00:00 2001 From: Jack Palevich Date: Sat, 7 Nov 2009 07:49:15 +0800 Subject: Fix stupid bug in GLThreadManager implementation. The code intended to copy the old value of a field, before the field was updated. However, what the code was actually doing was copying the new value of the field, after the field was updated. The fix was to move the copy to before the update. This is work towards fixing bug 2228262 --- opengl/java/android/opengl/GLSurfaceView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'opengl') diff --git a/opengl/java/android/opengl/GLSurfaceView.java b/opengl/java/android/opengl/GLSurfaceView.java index 952eff2..ac27a2d 100644 --- a/opengl/java/android/opengl/GLSurfaceView.java +++ b/opengl/java/android/opengl/GLSurfaceView.java @@ -1281,8 +1281,8 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback public void start(GLThread thread) throws InterruptedException { GLThread oldThread = null; synchronized(this) { - mMostRecentGLThread = thread; oldThread = mMostRecentGLThread; + mMostRecentGLThread = thread; } if (oldThread != null) { synchronized(oldThread) { -- cgit v1.1