@@ -48,8 +48,9 @@ @implementation FlutterOpenGLRenderer {
4848
4949 FlutterView* _flutterView;
5050
51- // The context that is owned by the currently displayed FlutterView. This is stashed
52- // in the renderer so that the view doesn't need to be accessed from a background thread.
51+ // The context provided to the Flutter engine for rendering to the FlutterView. This is lazily
52+ // created during initialization of the FlutterView. This is used to render content into the
53+ // FlutterView.
5354 NSOpenGLContext * _openGLContext;
5455
5556 // The context provided to the Flutter engine for resource loading.
@@ -140,7 +141,7 @@ - (int64_t)registerTexture:(id<FlutterTexture>)texture {
140141 FlutterExternalTextureGL* FlutterTexture =
141142 [[FlutterExternalTextureGL alloc ] initWithFlutterTexture: texture];
142143 int64_t textureID = [FlutterTexture textureID ];
143- auto success = _embedderAPI.RegisterExternalTexture (_engine, textureID);
144+ FlutterEngineResult success = _embedderAPI.RegisterExternalTexture (_engine, textureID);
144145 if (success == FlutterEngineResult::kSuccess ) {
145146 _textures[@(textureID)] = FlutterTexture;
146147 return textureID;
@@ -151,14 +152,14 @@ - (int64_t)registerTexture:(id<FlutterTexture>)texture {
151152}
152153
153154- (void )textureFrameAvailable : (int64_t )textureID {
154- auto success = _embedderAPI.MarkExternalTextureFrameAvailable (_engine, textureID);
155+ FlutterEngineResult success = _embedderAPI.MarkExternalTextureFrameAvailable (_engine, textureID);
155156 if (success != FlutterEngineResult::kSuccess ) {
156157 NSLog (@" Unable to mark texture with id %lld as available." , textureID);
157158 }
158159}
159160
160161- (void )unregisterTexture : (int64_t )textureID {
161- auto success = _embedderAPI.UnregisterExternalTexture (_engine, textureID);
162+ FlutterEngineResult success = _embedderAPI.UnregisterExternalTexture (_engine, textureID);
162163 if (success == FlutterEngineResult::kSuccess ) {
163164 [_textures removeObjectForKey: @(textureID)];
164165 } else {
0 commit comments