Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit e866af0

Browse files
committed
Add fix: disable scissor test before blit
1 parent d337378 commit e866af0

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

impeller/renderer/backend/gles/blit_command_gles.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ static std::optional<GLuint> ConfigureFBO(
4848
}
4949

5050
if (gl.CheckFramebufferStatus(fbo_type) != GL_FRAMEBUFFER_COMPLETE) {
51-
VALIDATION_LOG << "Could not create a complete frambuffer.";
51+
VALIDATION_LOG << "Could not create a complete framebuffer.";
5252
DeleteFBO(gl, fbo, fbo_type);
5353
return std::nullopt;
5454
}

shell/platform/linux/fl_backing_store_provider.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ uint32_t fl_backing_store_provider_get_gl_format(FlBackingStoreProvider* self) {
8282
// In Linux kN32_SkColorType is assumed to be kBGRA_8888_SkColorType.
8383
// So we must choose a valid gl format to be compatible with surface format
8484
// BGRA8.
85-
// Following logics are copied from Skia GrGLCaps.cpp:
85+
// Following logic is copied from Skia GrGLCaps.cpp:
8686
// https://github.com/google/skia/blob/4738ed711e03212aceec3cd502a4adb545f38e63/src/gpu/ganesh/gl/GrGLCaps.cpp#L1963-L2116
8787

8888
if (epoxy_is_desktop_gl()) {

shell/platform/windows/compositor_opengl.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,12 @@ bool CompositorOpenGL::Present(const FlutterLayer** layers,
133133
}
134134

135135
auto source_id = layers[0]->backing_store->open_gl.framebuffer.name;
136+
137+
// Disable the scissor test as it can affect blit operations.
138+
// Prevents regressions like: https://github.com/flutter/flutter/issues/140828
139+
// See OpenGL specification version 4.6, section 18.3.1.
140+
gl_->Disable(GL_SCISSOR_TEST);
141+
136142
gl_->BindFramebuffer(GL_READ_FRAMEBUFFER, source_id);
137143
gl_->BindFramebuffer(GL_DRAW_FRAMEBUFFER, kWindowFrameBufferId);
138144

0 commit comments

Comments
 (0)