Merge "Switch to pbuffer surface sooner" into nyc-dev

This commit is contained in:
John Reck
2016-02-26 23:53:46 +00:00
committed by Android (Google) Code Review
2 changed files with 9 additions and 1 deletions

View File

@ -1078,8 +1078,10 @@ public final class ViewRootImpl implements ViewParent,
scheduleTraversals();
} else {
if (mAttachInfo.mHardwareRenderer != null) {
mAttachInfo.mHardwareRenderer.destroyHardwareResources(mView);
// TODO: Temporary to help track down b/27286867
Log.d(mTag, "WindowStopped on " + getTitle());
mAttachInfo.mHardwareRenderer.updateSurface(null);
mAttachInfo.mHardwareRenderer.destroyHardwareResources(mView);
}
}
}

View File

@ -270,6 +270,12 @@ bool EglManager::makeCurrent(EGLSurface surface, EGLint* errOut) {
// Ensure we always have a valid surface & context
surface = mPBufferSurface;
}
// TODO: Temporary to help diagnose b/27286867
if (mCurrentSurface == mPBufferSurface || surface == mPBufferSurface) {
ALOGD("Switching from surface %p%s to %p%s", mCurrentSurface,
mCurrentSurface == mPBufferSurface ? " (pbuffer)" : "",
surface, surface == mPBufferSurface ? " (pbuffer)" : "");
}
if (!eglMakeCurrent(mEglDisplay, surface, surface, mEglContext)) {
if (errOut) {
*errOut = eglGetError();