diff options
author | Romain Guy <romainguy@google.com> | 2011-11-21 15:14:37 -0800 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2011-11-21 15:14:37 -0800 |
commit | 421458aad764cd9d1403d2540ab979b336b02341 (patch) | |
tree | 403620dc73a58422834e39e2ba04059ea1ed1274 /libs/hwui | |
parent | 7859c1842c1f2e3c43415dfb5337a0b005bdb1c4 (diff) | |
download | frameworks_base-421458aad764cd9d1403d2540ab979b336b02341.zip frameworks_base-421458aad764cd9d1403d2540ab979b336b02341.tar.gz frameworks_base-421458aad764cd9d1403d2540ab979b336b02341.tar.bz2 |
Draw in the correct FBO after invoking a GL functor
Bug #5650514
After invoking a GL functor, libhwui restores a few OpenGL states
including the current FBO. The renderer was however making the
wrong assumption that the FBO to restore to was the base layer
instead of the FBO associated with the current canvas state.
Change-Id: Ie565500832ebffd673f6a43b83422d6cc05470a0
Diffstat (limited to 'libs/hwui')
-rw-r--r-- | libs/hwui/OpenGLRenderer.cpp | 2 | ||||
-rw-r--r-- | libs/hwui/Snapshot.h | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 32595e4..7561a47 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -208,7 +208,7 @@ void OpenGLRenderer::resume() { glDisable(GL_DITHER); - glBindFramebuffer(GL_FRAMEBUFFER, getTargetFbo()); + glBindFramebuffer(GL_FRAMEBUFFER, mSnapshot->fbo); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); mCaches.blend = true; diff --git a/libs/hwui/Snapshot.h b/libs/hwui/Snapshot.h index d51154d..aff7b93 100644 --- a/libs/hwui/Snapshot.h +++ b/libs/hwui/Snapshot.h @@ -213,7 +213,8 @@ public: Layer* layer; /** - * Only set when the flag kFlagIsFboLayer is set. + * Target FBO used for rendering. Set to 0 when rendering directly + * into the framebuffer. */ GLuint fbo; |