Skip to content

Commit

Permalink
Disable GLES sampler objects in Skia (#3502)
Browse files Browse the repository at this point in the history
Forces GLES 3.0 texture sampler units off in all Cobalt builds. Cobalt
rendering code does not use samplers, and mixing Skia state that does,
can result in rendering artifacts like pixelated textures.

b/332330398
  • Loading branch information
kaidokert committed Jun 8, 2024
1 parent 959d023 commit 6fcac0a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions third_party/skia/src/gpu/gl/GrGLCaps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -809,8 +809,13 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
} else if (GR_IS_GR_WEBGL(standard)) {
fSamplerObjectSupport = version >= GR_GL_VER(2,0);
}
#if defined(STARBOARD)
// Cobalt rendering code cannot interop with sampler objects.
fUseSamplerObjects = false;
#else
// We currently use sampler objects whenever they are available.
fUseSamplerObjects = fSamplerObjectSupport;
#endif

if (GR_IS_GR_GL_ES(standard)) {
fTiledRenderingSupport = ctxInfo.hasExtension("GL_QCOM_tiled_rendering");
Expand Down

0 comments on commit 6fcac0a

Please sign in to comment.