Prefer ES 2.0 with external image support vs ES 3.0 without that support
We currently attempt to use ES 3.0 shaders even if it lacks the
extension for external images. This CL reverts back to ES 2.0 in
the event that we find that the OES_EGL_image_external_essl3 is not
present.
Test: no change in graphics output
Bug: 111220579
Change-Id: I6bd7145026d9686cfcf49393a19580208db8a367
diff --git a/libs/hwui/renderthread/RenderThread.cpp b/libs/hwui/renderthread/RenderThread.cpp
index 3eaf43b..c1284ec 100644
--- a/libs/hwui/renderthread/RenderThread.cpp
+++ b/libs/hwui/renderthread/RenderThread.cpp
@@ -189,6 +189,7 @@
LOG_ALWAYS_FATAL_IF(!glInterface.get());
GrContextOptions options;
+ options.fPreferExternalImagesOverES3 = true;
options.fDisableDistanceFieldPaths = true;
cacheManager().configureContext(&options);
sk_sp<GrContext> grContext(GrContext::MakeGL(std::move(glInterface), options));