From 41308e2936c768103d0e9c82500e97938d6797f1 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Mon, 22 Oct 2012 20:02:43 -0700 Subject: [PATCH] Properly draw the window background on window resize Bug #7385090 This change gets rid of two silly asumptions: - That a layer needs to be cleared with opaque black (it shouldn't, it's already cleared to transparent and the view will cover it up with its own background) - The the clip should be dirty at the beginning of a frame only when the render target is opaque Change-Id: I415b6d3cab196057fb0281419a53fef601a44e28 --- core/java/android/view/ViewRootImpl.java | 2 -- libs/hwui/OpenGLRenderer.cpp | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 8a82a540e7336..ded4cfc908a7c 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -1424,8 +1424,6 @@ public final class ViewRootImpl implements ViewParent, layerCanvas.setViewport(mWidth, mHeight); layerCanvas.onPreDraw(null); final int restoreCount = layerCanvas.save(); - - layerCanvas.drawColor(0xff000000, PorterDuff.Mode.SRC); int yoff; final boolean scrolling = mScroller != null diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 914516c593b0e..e2d7156769d13 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -179,7 +179,7 @@ status_t OpenGLRenderer::prepareDirty(float left, float top, float right, float mSaveCount = 1; mSnapshot->setClip(left, top, right, bottom); - mDirtyClip = opaque; + mDirtyClip = true; updateLayers();