diff options
author | 2011-03-01 14:55:21 -0800 | |
---|---|---|
committer | 2011-03-01 14:55:21 -0800 | |
commit | d643bb56fdf21973ea75984f0816b7dc024698df (patch) | |
tree | fa0b758dfebc484db04a7d7f052ac8c961e35b10 /libs/hwui/OpenGLRenderer.cpp | |
parent | 321dce646dc3c2ecfbd72a693d8d9294a6119736 (diff) |
Correctly mark layers dirty when drawing WebView.
Change-Id: I7ae0c3cfa0916d8fbeaf01e8da127c621a06a0f4
Diffstat (limited to 'libs/hwui/OpenGLRenderer.cpp')
-rw-r--r-- | libs/hwui/OpenGLRenderer.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 48b3d6ea6c75..361815a07ab3 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -213,6 +213,17 @@ bool OpenGLRenderer::callDrawGLFunction(Functor *functor) { if (mDirtyClip) { setScissorFromClip(); } + +#if RENDER_LAYERS_AS_REGIONS + // Since we don't know what the functor will draw, let's dirty + // tne entire clip region + if (hasLayer()) { + Rect clip(*mSnapshot->clipRect); + clip.snapToPixelBoundaries(); + dirtyLayerUnchecked(clip, getRegion()); + } +#endif + status_t result = (*functor)(); resume(); return (result == 0) ? false : true; |