Fix garbage showing up beneath dialogs
bug:17463894
Fixes the setViewport method to immediately affect the return values
of getViewportWidth/Height methods.
Also works around tiling extension issues observed on first frame
after window resize by disabling tiling for that frame.
Change-Id: Ie172d572d20d74a1be9cc58ad389af2cffa0e4b6
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index 5e6796c..56ec797 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -117,10 +117,10 @@
stopDrawing();
}
+// TODO: don't pass viewport size, it's automatic via EGL
void CanvasContext::setup(int width, int height, const Vector3& lightCenter, float lightRadius,
uint8_t ambientShadowAlpha, uint8_t spotShadowAlpha) {
if (!mCanvas) return;
- mCanvas->setViewport(width, height);
mCanvas->initLight(lightCenter, lightRadius, ambientShadowAlpha, spotShadowAlpha);
}