Flutter Engine
The Flutter Engine
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
10namespace flutter {
11
12// Wrapper around a FlutterDesktopTextureRegistrarRef that implements the
13// TextureRegistrar API.
15 public:
16 explicit TextureRegistrarImpl(
17 FlutterDesktopTextureRegistrarRef texture_registrar_ref);
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_
int64_t RegisterTexture(TextureVariant *texture) override
bool MarkTextureFrameAvailable(int64_t texture_id) override
TextureRegistrarImpl(TextureRegistrarImpl const &)=delete
TextureRegistrarImpl(FlutterDesktopTextureRegistrarRef texture_registrar_ref)
TextureRegistrarImpl & operator=(TextureRegistrarImpl const &)=delete
void UnregisterTexture(int64_t texture_id, std::function< void()> callback) override
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
struct FlutterDesktopTextureRegistrar * FlutterDesktopTextureRegistrarRef
Dart_NativeFunction function
Definition: fuchsia.cc:51
FlTexture * texture
std::variant< PixelBufferTexture, GpuSurfaceTexture > TextureVariant
int64_t texture_id