diff --git a/engine/src/flutter/shell/common/io_manager.cc b/engine/src/flutter/shell/common/io_manager.cc index 2b4523a46f..2d004fedb1 100644 --- a/engine/src/flutter/shell/common/io_manager.cc +++ b/engine/src/flutter/shell/common/io_manager.cc @@ -23,6 +23,10 @@ sk_sp IOManager::CreateCompatibleResourceLoadingContext( // that feature, which will cause texture uploads to do CPU YUV conversion. options.fDisableGpuYUVConversion = true; + // To get video playback on the widest range of devices, we limit Skia to + // ES2 shading language when the ES3 external image extension is missing. + options.fPreferExternalImagesOverES3 = true; + if (auto context = GrContext::MakeGL(GrGLMakeNativeInterface(), options)) { // Do not cache textures created by the image decoder. These textures // should be deleted when they are no longer referenced by an SkImage. diff --git a/engine/src/flutter/shell/gpu/gpu_surface_gl.cc b/engine/src/flutter/shell/gpu/gpu_surface_gl.cc index 11482e48f6..317d2ba29f 100644 --- a/engine/src/flutter/shell/gpu/gpu_surface_gl.cc +++ b/engine/src/flutter/shell/gpu/gpu_surface_gl.cc @@ -45,6 +45,10 @@ GPUSurfaceGL::GPUSurfaceGL(GPUSurfaceGLDelegate* delegate) GrContextOptions options; options.fAvoidStencilBuffers = true; + // To get video playback on the widest range of devices, we limit Skia to + // ES2 shading language when the ES3 external image extension is missing. + options.fPreferExternalImagesOverES3 = true; + auto context = GrContext::MakeGL(GrGLMakeNativeInterface(), options); if (context == nullptr) {