Don't compile the Skia GL backend on iOS. (flutter/engine#34924)
This commit is contained in:
@@ -13,20 +13,20 @@ namespace flutter {
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -398,12 +398,16 @@ def to_gn_args(args):
|
||||
|
||||
# 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']:
|
||||
|
||||
Reference in New Issue
Block a user