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

Commit d3269d5

Browse files
authored
[Impeller] Disable OpenGL dithering by default. (#53768)
My expectation was that all toggles were disabled with OpenGL. But the specification states: "The initial value for each capability with the exception of GL_DITHER is GL_FALSE. The initial value for GL_DITHER is GL_TRUE." The kind of dithering is implementation dependent and our layered OpenGL implementations choose to do nothing when this is enabled (unless extensions like VK_EXT_legacy_dithering are supported). Since, again, per the spec: "As far as OpenGL layering is concerned, no dithering is technically an acceptable algorithm". But it does have a cost of older hardware where dithering is supported. This sets the default to match our other backends and get some performance on hardware that does do dithering.
1 parent 4a2ac0e commit d3269d5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

impeller/renderer/backend/gles/render_pass_gles.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ struct RenderPassData {
241241
gl.Disable(GL_STENCIL_TEST);
242242
gl.Disable(GL_CULL_FACE);
243243
gl.Disable(GL_BLEND);
244+
gl.Disable(GL_DITHER);
244245
gl.ColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
245246
gl.DepthMask(GL_TRUE);
246247
gl.StencilMaskSeparate(GL_FRONT, 0xFFFFFFFF);

0 commit comments

Comments
 (0)