Flutter iOS Embedder
FlutterTextureRegistryRelay.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 
6 
7 #include "flutter/fml/logging.h"
8 
10 
11 @implementation FlutterTextureRegistryRelay : NSObject
12 
13 #pragma mark - FlutterTextureRegistry
14 
15 - (instancetype)initWithParent:(NSObject<FlutterTextureRegistry>*)parent {
16  if (self = [super init]) {
17  _parent = parent;
18  }
19  return self;
20 }
21 
22 - (int64_t)registerTexture:(NSObject<FlutterTexture>*)texture {
23  if (!self.parent) {
24  FML_LOG(WARNING) << "Using on an empty registry.";
25  return 0;
26  }
27  return [self.parent registerTexture:texture];
28 }
29 
30 - (void)textureFrameAvailable:(int64_t)textureId {
31  if (!self.parent) {
32  FML_LOG(WARNING) << "Using on an empty registry.";
33  }
34  return [self.parent textureFrameAvailable:textureId];
35 }
36 
37 - (void)unregisterTexture:(int64_t)textureId {
38  if (!self.parent) {
39  FML_LOG(WARNING) << "Using on an empty registry.";
40  }
41  return [self.parent unregisterTexture:textureId];
42 }
43 
44 @end
FlutterTextureRegistryRelay::parent
NSObject< FlutterTextureRegistry > * parent
Definition: FlutterTextureRegistryRelay.h:25
FlutterTextureRegistry-p
Definition: FlutterTexture.h:45
FlutterTextureRegistryRelay
Definition: FlutterTextureRegistryRelay.h:20
FlutterTexture
Definition: FlutterMetalLayer.mm:58
FlutterTextureRegistryRelay.h
FLUTTER_ASSERT_ARC
Definition: FlutterChannelKeyResponder.mm:13