| Flutter Windows 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
8 #include "include/flutter/texture_registrar.h"
9
10 namespace flutter {
11
12 // Wrapper around a FlutterDesktopTextureRegistrarRef that implements the
13 // TextureRegistrar API.
14 class TextureRegistrarImpl : public TextureRegistrar {
15 public:
16 explicit TextureRegistrarImpl(
17 FlutterDesktopTextureRegistrarRef texture_registrar_ref);
18 virtual ~TextureRegistrarImpl();
19
20 // Prevent copying.
21 TextureRegistrarImpl(TextureRegistrarImpl const&) = delete;
22 TextureRegistrarImpl& operator=(TextureRegistrarImpl const&) = delete;
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::TextureRegistrar
Definition: texture_registrar.h:85
flutter::TextureRegistrarImpl
Definition: texture_registrar_impl.h:14
flutter::TextureRegistrarImpl::RegisterTexture
int64_t RegisterTexture(TextureVariant *texture) override
Definition: core_implementations.cc:217
flutter::TextureRegistrarImpl::MarkTextureFrameAvailable
bool MarkTextureFrameAvailable(int64_t texture_id) override
Definition: core_implementations.cc:251
flutter::TextureRegistrarImpl::TextureRegistrarImpl
TextureRegistrarImpl(TextureRegistrarImpl const &)=delete
flutter::TextureRegistrarImpl::TextureRegistrarImpl
TextureRegistrarImpl(FlutterDesktopTextureRegistrarRef texture_registrar_ref)
Definition: core_implementations.cc:211
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::~TextureRegistrarImpl
virtual ~TextureRegistrarImpl()
texture_id
uint32_t texture_id
Definition: compositor_opengl.cc:20
FlutterDesktopTextureRegistrarRef
struct FlutterDesktopTextureRegistrar * FlutterDesktopTextureRegistrarRef
Definition: flutter_texture_registrar.h:19
callback
FlutterDesktopBinaryReply callback
Definition: flutter_windows_view_unittests.cc:52
flutter
Definition: accessibility_bridge_windows.cc:11
flutter::TextureVariant
std::variant< PixelBufferTexture, GpuSurfaceTexture > TextureVariant
Definition: texture_registrar.h:79
texture_registrar.h