| Flutter iOS Embedder |

ios_external_texture_metal.mm
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #import "flutter/shell/platform/darwin/ios/ios_external_texture_metal.h"
6 #include "flow/layers/layer.h"
7
8 FLUTTER_ASSERT_ARC
9
10 namespace flutter {
11
12 IOSExternalTextureMetal::IOSExternalTextureMetal(
13 FlutterDarwinExternalTextureMetal* darwin_external_texture_metal)
14 : Texture([darwin_external_texture_metal textureID]),
15 darwin_external_texture_metal_(darwin_external_texture_metal) {}
16
17 IOSExternalTextureMetal::~IOSExternalTextureMetal() = default;
18
19 void IOSExternalTextureMetal::Paint(PaintContext& context,
20 const DlRect& bounds,
21 bool freeze,
22 const DlImageSampling sampling) {
23 [darwin_external_texture_metal_ paintContext:context
24 bounds:ToSkRect(bounds)
25 freeze:freeze
26 sampling:sampling];
27 }
28
29 void IOSExternalTextureMetal::OnGrContextCreated() {
30 [darwin_external_texture_metal_ onGrContextCreated];
31 }
32
33 void IOSExternalTextureMetal::OnGrContextDestroyed() {
34 [darwin_external_texture_metal_ onGrContextDestroyed];
35 }
36
37 void IOSExternalTextureMetal::MarkNewFrameAvailable() {
38 [darwin_external_texture_metal_ markNewFrameAvailable];
39 }
40
41 void IOSExternalTextureMetal::OnTextureUnregistered() {
42 [darwin_external_texture_metal_ onTextureUnregistered];
43 }
44
45 } // namespace flutter
flutter::IOSExternalTextureMetal::IOSExternalTextureMetal
IOSExternalTextureMetal(FlutterDarwinExternalTextureMetal *darwin_external_texture_metal)
Definition: ios_external_texture_metal.mm:12
flutter::IOSExternalTextureMetal::~IOSExternalTextureMetal
~IOSExternalTextureMetal()
ios_external_texture_metal.h
FLUTTER_ASSERT_ARC
Definition: FlutterChannelKeyResponder.mm:13
flutter
Definition: accessibility_bridge.h:26