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

Also makes it so that folks don't have to patch the buildroot manually when
building for Metal.
This commit is contained in:
Chinmay Garde
2019-06-19 15:24:26 -07:00
committed by GitHub
parent ffe035f619
commit 9788d1289a
3 changed files with 4 additions and 2 deletions

2
DEPS
View File

@@ -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
#

View File

@@ -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

View File

@@ -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.