Skip to content

Commit

Permalink
Add fix
Browse files Browse the repository at this point in the history
  • Loading branch information
loic-sharma committed Jan 11, 2024
1 parent 9417ee6 commit 934fa88
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions shell/platform/windows/compositor_opengl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ bool CompositorOpenGL::Present(const FlutterLayer** layers,
}

auto source_id = layers[0]->backing_store->open_gl.framebuffer.name;

gl_->Disable(GL_SCISSOR_TEST);
gl_->Disable(GL_DEPTH_TEST);
gl_->Disable(GL_STENCIL_TEST);

gl_->BindFramebuffer(GL_READ_FRAMEBUFFER, source_id);
gl_->BindFramebuffer(GL_DRAW_FRAMEBUFFER, kWindowFrameBufferId);

Expand All @@ -148,6 +153,10 @@ bool CompositorOpenGL::Present(const FlutterLayer** layers,
GL_NEAREST // filter
);

// TODO: Should we add this?
// gl_->BindFramebuffer(GL_READ_FRAMEBUFFER, 0);
// gl_->BindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);

return engine_->view()->SwapBuffers();
}

Expand Down

0 comments on commit 934fa88

Please sign in to comment.