| Chunk |
|---|
| Conflicting content |
|---|
}
private static class GLThreadManager {
<<<<<<< HEAD
public boolean shouldHaveEgl(GLThread thread) {
if (mMultipleGLESContextsAllowed) {
return true;
} else {
synchronized(this) {
return thread == mMostRecentGLThread || mMostRecentGLThread == null;
}
}
}
public void start(GLThread thread) throws InterruptedException {
if (! mGLESVersionCheckComplete) {
mGLESVersion = SystemProperties.getInt(
"ro.opengles.version",
ConfigurationInfo.GL_ES_VERSION_UNDEFINED);
if (mGLESVersion >= kGLES_20) {
mMultipleGLESContextsAllowed = true;
}
mGLESVersionCheckComplete = true;
}
GLThread oldThread = null;
synchronized(this) {
oldThread = mMostRecentGLThread;
mMostRecentGLThread = thread;
}
if (oldThread != null && ! mMultipleGLESContextsAllowed) {
synchronized(oldThread) {
oldThread.notifyAll();
}
}
synchronized(this) {
while ((! mMultipleGLESContextsAllowed)
&& mGLContextCount > 0) {
wait();
}
mGLContextCount++;
=======
public synchronized void threadExiting(GLThread thread) {
if (LOG_THREADS) {
Log.i("GLThread", "exiting tid=" + thread.getId());
}
thread.mDone = true;
if (mEglOwner == thread) {
mEglOwner = null;
}
notifyAll();
}
/*
* Tries once to acquire the right to use an EGL
* surface. Does not block.
* @return true if the right to use an EGL surface was acquired.
*/
public synchronized boolean tryAcquireEglSurface(GLThread thread) {
if (mEglOwner == thread || mEglOwner == null) {
mEglOwner = thread;
notifyAll();
return true;
}
return false;
}
public synchronized void releaseEglSurface(GLThread thread) {
if (mEglOwner == thread) {
mEglOwner = null;
>>>>>>> ba56915a71cad672baff5594dbb7c9331bf01283
}
notifyAll();
} |
| Solution content |
|---|
}
}
private static class GLThreadManager {
public synchronized void threadExiting(GLThread thread) {
if (LOG_THREADS) {
Log.i("GLThread", "exiting tid=" + thread.getId());
}
thread.mDone = true;
if (mEglOwner == thread) {
mEglOwner = null;
}
notifyAll();
}
/*
* Tries to acquire the right to use an EGL
* surface. Does not block.
* @return true if the right to use an EGL surface was acquired.
*/
public synchronized boolean tryAcquireEglSurface(GLThread thread) {
if (mEglOwner == thread || mEglOwner == null) {
mEglOwner = thread;
notifyAll();
return true;
}
checkGLESVersion();
if (mMultipleGLESContextsAllowed) {
return true;
return false;
}
public synchronized void releaseEglSurface(GLThread thread) {
if (mEglOwner == thread) {
mEglOwner = null;
}
notifyAll();
} |
| File |
|---|
| GLSurfaceView.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Comment |
| If statement |
| Method declaration |
| Method signature |
| Synchronized statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
notifyAll();
}
<<<<<<< HEAD
public synchronized void end(GLThread thread) {
mGLContextCount--;
notifyAll();
if (mMostRecentGLThread == thread) {
mMostRecentGLThread = null;
}
}
public synchronized void checkGLDriver(GL10 gl) {
if (! mGLESDriverCheckComplete) {
if (mGLESVersion < kGLES_20) {
String renderer = gl.glGetString(GL10.GL_RENDERER);
mMultipleGLESContextsAllowed =
! renderer.startsWith(kMSM7K_RENDERER_PREFIX);
notifyAll();
}
mGLESDriverCheckComplete = true;
}
}
private boolean mGLESVersionCheckComplete;
private int mGLESVersion;
private GLThread mMostRecentGLThread;
private boolean mGLESDriverCheckComplete;
private boolean mMultipleGLESContextsAllowed;
private int mGLContextCount;
private static final int kGLES_20 = 0x20000;
private static final String kMSM7K_RENDERER_PREFIX =
"Q3Dimension MSM7500 ";
};
=======
private GLThread mEglOwner;
}
>>>>>>> ba56915a71cad672baff5594dbb7c9331bf01283
private static final GLThreadManager sGLThreadManager = new GLThreadManager();
private boolean mSizeChanged = true; |
| Solution content |
|---|
notifyAll();
}
public synchronized void checkGLDriver(GL10 gl) {
if (! mGLESDriverCheckComplete) {
checkGLESVersion();
if (mGLESVersion < kGLES_20) {
String renderer = gl.glGetString(GL10.GL_RENDERER);
mMultipleGLESContextsAllowed =
! renderer.startsWith(kMSM7K_RENDERER_PREFIX);
notifyAll();
}
mGLESDriverCheckComplete = true;
}
}
private void checkGLESVersion() {
if (! mGLESVersionCheckComplete) {
mGLESVersion = SystemProperties.getInt(
"ro.opengles.version",
ConfigurationInfo.GL_ES_VERSION_UNDEFINED);
if (mGLESVersion >= kGLES_20) {
mMultipleGLESContextsAllowed = true;
}
mGLESVersionCheckComplete = true;
}
}
private boolean mGLESVersionCheckComplete;
private int mGLESVersion;
private boolean mGLESDriverCheckComplete;
private boolean mMultipleGLESContextsAllowed;
private int mGLContextCount;
private static final int kGLES_20 = 0x20000;
private static final String kMSM7K_RENDERER_PREFIX =
"Q3Dimension MSM7500 ";
private GLThread mEglOwner;
}
private static final GLThreadManager sGLThreadManager = new GLThreadManager();
private boolean mSizeChanged = true; |
| File |
|---|
| GLSurfaceView.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Attribute |
| Method declaration |