未验证 提交 ece4f593 编写于 作者: C Chinmay Garde 提交者: GitHub

Update Metal backend to account for Skia updates. (#9383)

Also makes it so that folks don't have to patch the buildroot manually when
building for Metal.
上级 c187e506
......@@ -122,7 +122,7 @@ allowed_hosts = [
]
deps = {
'src': 'https://github.com/flutter/buildroot.git' + '@' + 'd1bbc1496ab1e239169f1dcb29e706e76c46ddaa',
'src': 'https://github.com/flutter/buildroot.git' + '@' + '7a3ec7d15ccd753a270a714c3972cef4e8660ffb',
# Fuchsia compatibility
#
......
......@@ -8,6 +8,7 @@
#include "third_party/skia/include/core/SkSurface.h"
#include "third_party/skia/include/gpu/GrBackendSurface.h"
#include "third_party/skia/include/ports/SkCFObject.h"
namespace flutter {
......@@ -80,7 +81,7 @@ std::unique_ptr<SurfaceFrame> GPUSurfaceMetal::AcquireFrame(const SkISize& size)
}
GrMtlTextureInfo metal_texture_info;
metal_texture_info.fTexture = metal_texture.get();
metal_texture_info.fTexture.reset(SkCFSafeRetain(metal_texture.get()));
GrBackendRenderTarget metal_render_target(bounds.width * scale, // width
bounds.height * scale, // height
......
......@@ -229,6 +229,7 @@ def to_gn_args(args):
gn_args['skia_use_metal'] = True
gn_args['shell_enable_metal'] = True
gn_args['ios_deployment_target'] = '11'
gn_args['allow_deprecated_api_calls'] = True
if args.enable_vulkan:
# Enable vulkan in the Flutter shell.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册