| Flutter Windows Embedder |

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

`#include <external_texture_pixelbuffer.h>`

Inheritance diagram for flutter::ExternalTexturePixelBuffer:

## Public Member Functions
| ExternalTexturePixelBuffer (const FlutterDesktopPixelBufferTextureCallback texture_callback, void *user_data, const GlProcs &gl_procs)
virtual | ~ExternalTexturePixelBuffer ()
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 15 of file external_texture_pixelbuffer.h.

## Constructor & Destructor Documentation

## ◆ ExternalTexturePixelBuffer()

flutter::ExternalTexturePixelBuffer::ExternalTexturePixelBuffer | ( | const FlutterDesktopPixelBufferTextureCallback | texture_callback,
|  | void * | user_data,
|  | const GlProcs & | gl_procs
| ) |  |

Definition at line 9 of file external_texture_pixelbuffer.cc.

13 : texture_callback_(texture_callback),
14 user_data_(user_data),
15 gl_(gl_procs) {}

## ◆ ~ExternalTexturePixelBuffer()

flutter::ExternalTexturePixelBuffer::~ExternalTexturePixelBuffer | ( |  | ) |
| virtual

Definition at line 17 of file external_texture_pixelbuffer.cc.

17 {
18 if (gl_texture_ != 0) {
19 gl_.glDeleteTextures(1, &gl_texture_);
20 }
21 }

References flutter::GlProcs::glDeleteTextures.

## Member Function Documentation

## ◆ PopulateTexture()

bool flutter::ExternalTexturePixelBuffer::PopulateTexture | ( | size_t | width,
|  | size_t | height,
|  | FlutterOpenGLTexture * | opengl_texture
| ) |  |
| override virtual

Implements flutter::ExternalTexture.

Definition at line 23 of file external_texture_pixelbuffer.cc.

26 {
27 if (!CopyPixelBuffer(width, height)) {
28 return false;
29 }
30
31 // Populate the texture object used by the engine.
32 opengl_texture->target = GL_TEXTURE_2D;
33 opengl_texture->name = gl_texture_;
34 opengl_texture->format = GL_RGBA8_OES;
35 opengl_texture->destruction_callback = nullptr;
36 opengl_texture->user_data = nullptr;
37 opengl_texture->width = width;
38 opengl_texture->height = height;
39
40 return true;
41 }

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

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

user_data
void * user_data
Definition: flutter_windows_view_unittests.cc:47
flutter::GlProcs::glDeleteTextures
glDeleteTexturesProc glDeleteTextures
Definition: external_texture.h:32
texture_callback
FlutterDesktopPixelBufferTextureCallback texture_callback
Definition: texture_registrar_unittests.cc:26