| Flutter Windows Embedder |

external_texture.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_WINDOWS_EXTERNAL_TEXTURE_H_
6 #define FLUTTER_SHELL_PLATFORM_WINDOWS_EXTERNAL_TEXTURE_H_
7
8 #include "flutter/shell/platform/embedder/embedder.h"
9
10 #include <GLES2/gl2.h>
11 #include <GLES2/gl2ext.h>
12
13 namespace flutter {
14
15 // Abstract external texture.
16 class ExternalTexture {
17 public:
18 virtual ~ExternalTexture() = default;
19
20 // Returns the unique id of this texture.
21 int64_t texture_id() const { return reinterpret_cast<int64_t>(this); };
22
23 // Attempts to populate the specified |opengl_texture| with texture details
24 // such as the name, width, height and the pixel format.
25 // Returns true on success.
26 virtual bool PopulateTexture(size_t width,
27 size_t height,
28 FlutterOpenGLTexture* opengl_texture) = 0;
29 };
30
31 } // namespace flutter
32
33 #endif // FLUTTER_SHELL_PLATFORM_WINDOWS_EXTERNAL_TEXTURE_H_
flutter::ExternalTexture::~ExternalTexture
virtual ~ExternalTexture()=default
flutter::ExternalTexture::texture_id
int64_t texture_id() const
Definition: external_texture.h:21
flutter::ExternalTexture::PopulateTexture
virtual bool PopulateTexture(size_t width, size_t height, FlutterOpenGLTexture *opengl_texture)=0
flutter
Definition: accessibility_bridge_windows.cc:11
flutter::ExternalTexture
Definition: external_texture.h:16