diff options
author | Chet Haase <chet@google.com> | 2012-04-11 14:32:02 -0700 |
---|---|---|
committer | Chet Haase <chet@google.com> | 2012-04-11 14:32:02 -0700 |
commit | 7b6a75872bd2df96a23453d31c2e2e7fcc373554 (patch) | |
tree | 4ef0ab122aa11dc7b039693cfce420b8be063996 /libs/hwui/OpenGLRenderer.cpp | |
parent | d1f3de40ba50f0a3c4545139ea57242612f52971 (diff) | |
download | frameworks_base-7b6a75872bd2df96a23453d31c2e2e7fcc373554.zip frameworks_base-7b6a75872bd2df96a23453d31c2e2e7fcc373554.tar.gz frameworks_base-7b6a75872bd2df96a23453d31c2e2e7fcc373554.tar.bz2 |
Pass width/height parameters to webview
When webview draws into an fbo layer, it needs to know the
size of that surface to create the rendering transform appropriately.
This change copies in the current viewport size to the structure that
is passed to the webview.
Change-Id: I7160b0836d00834134c799c95a439cdc045e2035
Diffstat (limited to 'libs/hwui/OpenGLRenderer.cpp')
-rw-r--r-- | libs/hwui/OpenGLRenderer.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 2a908ab..06928df 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -249,6 +249,8 @@ status_t OpenGLRenderer::invokeFunctors(Rect& dirty) { info.clipRight = 0; info.clipBottom = 0; info.isLayer = false; + info.width = 0; + info.height = 0; memset(info.transform, 0, sizeof(float) * 16); size_t count = functors.size(); @@ -292,6 +294,8 @@ status_t OpenGLRenderer::callDrawGLFunction(Functor* functor, Rect& dirty) { info.clipRight = clip.right; info.clipBottom = clip.bottom; info.isLayer = hasLayer(); + info.width = getSnapshot()->viewport.getWidth(); + info.height = getSnapshot()->height; getSnapshot()->transform->copyTo(&info.transform[0]); status_t result = (*functor)(DrawGlInfo::kModeDraw, &info); |