Flutter iOS Embedder
texture_registrar_impl.h
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 #ifndef FLUTTER_SHELL_PLATFORM_COMMON_CLIENT_WRAPPER_TEXTURE_REGISTRAR_IMPL_H_
6 #define FLUTTER_SHELL_PLATFORM_COMMON_CLIENT_WRAPPER_TEXTURE_REGISTRAR_IMPL_H_
7 
9 
10 namespace flutter {
11 
12 // Wrapper around a FlutterDesktopTextureRegistrarRef that implements the
13 // TextureRegistrar API.
15  public:
16  explicit TextureRegistrarImpl(
17  FlutterDesktopTextureRegistrarRef texture_registrar_ref);
18  virtual ~TextureRegistrarImpl();
19 
20  // Prevent copying.
23 
24  // |flutter::TextureRegistrar|
25  int64_t RegisterTexture(TextureVariant* texture) override;
26 
27  // |flutter::TextureRegistrar|
28  bool MarkTextureFrameAvailable(int64_t texture_id) override;
29 
30  // |flutter::TextureRegistrar|
31  void UnregisterTexture(int64_t texture_id,
32  std::function<void()> callback) override;
33 
34  // |flutter::TextureRegistrar|
35  bool UnregisterTexture(int64_t texture_id) override;
36 
37  private:
38  // Handle for interacting with the C API.
39  FlutterDesktopTextureRegistrarRef texture_registrar_ref_;
40 };
41 
42 } // namespace flutter
43 
44 #endif // FLUTTER_SHELL_PLATFORM_COMMON_CLIENT_WRAPPER_TEXTURE_REGISTRAR_IMPL_H_
flutter::TextureRegistrarImpl::TextureRegistrarImpl
TextureRegistrarImpl(FlutterDesktopTextureRegistrarRef texture_registrar_ref)
Definition: core_implementations.cc:211
flutter::TextureRegistrarImpl::MarkTextureFrameAvailable
bool MarkTextureFrameAvailable(int64_t texture_id) override
Definition: core_implementations.cc:251
flutter::TextureRegistrar
Definition: texture_registrar.h:85
FlutterDesktopTextureRegistrarRef
struct FlutterDesktopTextureRegistrar * FlutterDesktopTextureRegistrarRef
Definition: flutter_texture_registrar.h:19
flutter::TextureVariant
std::variant< PixelBufferTexture, GpuSurfaceTexture > TextureVariant
Definition: texture_registrar.h:79
flutter
Definition: accessibility_bridge.h:28
flutter::TextureRegistrarImpl::~TextureRegistrarImpl
virtual ~TextureRegistrarImpl()
flutter::TextureRegistrarImpl::UnregisterTexture
void UnregisterTexture(int64_t texture_id, std::function< void()> callback) override
Definition: core_implementations.cc:256
flutter::TextureRegistrarImpl::operator=
TextureRegistrarImpl & operator=(TextureRegistrarImpl const &)=delete
flutter::TextureRegistrarImpl
Definition: texture_registrar_impl.h:14
flutter::TextureRegistrarImpl::RegisterTexture
int64_t RegisterTexture(TextureVariant *texture) override
Definition: core_implementations.cc:217
texture_registrar.h
texture_id
int64_t texture_id
Definition: texture_registrar_unittests.cc:24