Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 421458aa authored by Romain Guy's avatar Romain Guy
Browse files

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
parent 7859c184
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
+2 −1
Original line number Diff line number Diff line
@@ -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;