Merge "Prevent crash in VPN settings Bug #5217245"
This commit is contained in:
@@ -413,8 +413,8 @@ public abstract class HardwareRenderer {
|
||||
if (error != EGL_SUCCESS) {
|
||||
// something bad has happened revert to
|
||||
// normal rendering.
|
||||
fallback(error != EGL11.EGL_CONTEXT_LOST);
|
||||
Log.w(LOG_TAG, "EGL error: " + GLUtils.getEGLErrorString(error));
|
||||
fallback(error != EGL11.EGL_CONTEXT_LOST);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -702,8 +702,9 @@ public abstract class HardwareRenderer {
|
||||
|
||||
@Override
|
||||
void setup(int width, int height) {
|
||||
checkCurrent();
|
||||
mCanvas.setViewport(width, height);
|
||||
if (validate()) {
|
||||
mCanvas.setViewport(width, height);
|
||||
}
|
||||
}
|
||||
|
||||
boolean canDraw() {
|
||||
|
||||
@@ -1352,7 +1352,7 @@ public final class ViewRootImpl extends Handler implements ViewParent,
|
||||
mAttachInfo.mHardwareRenderer != null &&
|
||||
mAttachInfo.mHardwareRenderer.isEnabled())) {
|
||||
mAttachInfo.mHardwareRenderer.setup(mWidth, mHeight);
|
||||
if (!hwInitialized) {
|
||||
if (!hwInitialized && mAttachInfo.mHardwareRenderer.isEnabled()) {
|
||||
mAttachInfo.mHardwareRenderer.invalidate(mHolder);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user