| Flutter Windows Embedder |

Public Member Functions | List of all members
flutter::ExternalTextureD3d Class Reference

`#include <external_texture_d3d.h>`

Inheritance diagram for flutter::ExternalTextureD3d:

## Public Member Functions
| ExternalTextureD3d (FlutterDesktopGpuSurfaceType type, const FlutterDesktopGpuSurfaceTextureCallback texture_callback, void *user_data, const egl::Manager *egl_manager, std::shared_ptr< egl::ProcTable > gl)
virtual | ~ExternalTextureD3d ()
bool | PopulateTexture (size_t width, size_t height, FlutterOpenGLTexture *opengl_texture) override
Public Member Functions inherited from flutter::ExternalTexture
virtual | ~ExternalTexture ()=default
int64_t | texture_id () const

## Detailed Description

Definition at line 19 of file external_texture_d3d.h.

## Constructor & Destructor Documentation

## ◆ ExternalTextureD3d()

flutter::ExternalTextureD3d::ExternalTextureD3d | ( | FlutterDesktopGpuSurfaceType | type,
|  | const FlutterDesktopGpuSurfaceTextureCallback | texture_callback,
|  | void * | user_data,
|  | const egl::Manager * | egl_manager,
|  | std::shared_ptr< egl::ProcTable > | gl
| ) |  |

Definition at line 12 of file external_texture_d3d.cc.

18 : type_(type),
19 texture_callback_(texture_callback),
20 user_data_(user_data),
21 egl_manager_(egl_manager),
22 gl_(std::move(gl)) {}
user_data
void * user_data
Definition: flutter_windows_view_unittests.cc:53
type
enum flutter::testing::@88::KeyboardChange::Type type
texture_callback
FlutterDesktopPixelBufferTextureCallback texture_callback
Definition: texture_registrar_unittests.cc:26

## ◆ ~ExternalTextureD3d()

flutter::ExternalTextureD3d::~ExternalTextureD3d | ( |  | ) |
| virtual

Definition at line 24 of file external_texture_d3d.cc.

24 {
25 ReleaseImage();
26
27 if (gl_texture_ != 0) {
28 gl_->DeleteTextures(1, &gl_texture_);
29 }
30 }

## Member Function Documentation

## ◆ PopulateTexture()

bool flutter::ExternalTextureD3d::PopulateTexture | ( | size_t | width,
|  | size_t | height,
|  | FlutterOpenGLTexture * | opengl_texture
| ) |  |
| overridevirtual

Implements flutter::ExternalTexture.

Definition at line 32 of file external_texture_d3d.cc.

34 {
35 const FlutterDesktopGpuSurfaceDescriptor* descriptor =
36 texture_callback_(width, height, user_data_);
37
38 if (!CreateOrUpdateTexture(descriptor)) {
39 return false;
40 }
41
42 // Populate the texture object used by the engine.
43 opengl_texture->target = GL_TEXTURE_2D;
44 opengl_texture->name = gl_texture_;
45 opengl_texture->format = GL_RGBA8_OES;
46 opengl_texture->destruction_callback = nullptr;
47 opengl_texture->user_data = nullptr;
48 opengl_texture->width = SAFE_ACCESS(descriptor, visible_width, 0);
49 opengl_texture->height = SAFE_ACCESS(descriptor, visible_height, 0);
50
51 return true;
52 }
FlutterDesktopGpuSurfaceDescriptor
Definition: flutter_texture_registrar.h:70

The documentation for this class was generated from the following files:

- shell/platform/windows/external_texture_d3d.h
- shell/platform/windows/external_texture_d3d.cc