Don't compile the Skia GL backend on iOS. (#34924)
diff --git a/shell/common/shell_io_manager.cc b/shell/common/shell_io_manager.cc
index 22a6ef7..d977c46 100644
--- a/shell/common/shell_io_manager.cc
+++ b/shell/common/shell_io_manager.cc
@@ -13,20 +13,20 @@
sk_sp<GrDirectContext> ShellIOManager::CreateCompatibleResourceLoadingContext(
GrBackend backend,
sk_sp<const GrGLInterface> gl_interface) {
+#if !OS_FUCHSIA && SK_GL
if (backend != GrBackend::kOpenGL_GrBackend) {
return nullptr;
}
const auto options = MakeDefaultContextOptions(ContextType::kResource);
-#if !OS_FUCHSIA
if (auto context = GrDirectContext::MakeGL(gl_interface, options)) {
// Do not cache textures created by the image decoder. These textures
// should be deleted when they are no longer referenced by an SkImage.
context->setResourceCacheLimit(0);
return context;
}
-#endif
+#endif // !OS_FUCHSIA && SK_GL
return nullptr;
}
diff --git a/tools/gn b/tools/gn
index c1046aa..2028fe2 100755
--- a/tools/gn
+++ b/tools/gn
@@ -398,12 +398,16 @@
# Enable Metal on iOS builds.
if args.target_os == 'ios':
- gn_args['skia_use_metal'] = True
+ gn_args['shell_enable_gl'] = False
+ gn_args['skia_use_gl'] = False
gn_args['shell_enable_metal'] = True
+ gn_args['skia_use_metal'] = True
# Bitcode enabled builds using the current version of the toolchain leak
# C++ symbols decorated with the availability attribute. Disable these
# attributes in release modes till the toolchain is updated.
gn_args['skia_enable_api_available_macro'] = args.runtime_mode != 'release'
+ else:
+ gn_args['skia_use_gl'] = args.target_os != 'fuchsia'
if sys.platform == 'darwin' and args.target_os not in ['android', 'fuchsia',
'wasm']: