Repository navigation
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Fluttere: impellerImpeller rendering backend issues and features requestsImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.team-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team
Description
Use case
Currently, the Impeller texture mapping in embedder_external_texture_gl.cc does not explicitly set the TextureType in the TextureDescriptor. This limits the embedder's ability to handle special texture types, most notably GL_TEXTURE_EXTERNAL_OES which is critical for efficient video and camera preview.
I propose introducing a mapping utility to translate OpenGL texture targets to Impeller texture types.
Proposal
Proposed Change
- Add a mapping helper:
Introduce a utility function to handle the translation of GL enums to Impeller types:
constexpr std::optional<impeller::TextureType> ToImpellerTextureType(GLenum type) {
switch (type) {
case GL_TEXTURE_2D:
return impeller::TextureType::kTexture2D;
case GL_TEXTURE_CUBE_MAP:
return impeller::TextureType::kTextureCube;
case GL_TEXTURE_EXTERNAL_OES:
// This ensures Impeller handles OES external textures correctly
return impeller::TextureType::kTextureExternalOES;
default:
return std::nullopt;
}
}- Update the descriptor initialization:
Update the logic in embedder_external_texture_gl.cc to use the provided texture target:
impeller::TextureDescriptor desc;
desc.size = impeller::ISize(texture->width, texture->height);
desc.format = impeller::PixelFormat::kR8G8B8A8UNormInt;
auto type = ToImpellerTextureType(texture->target);
if (!type.has_value()) {
return false;
}
desc.type = type.value();Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Fluttere: impellerImpeller rendering backend issues and features requestsImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.team-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team
Activity
[-][Impeller]Support GL_TEXTURE_EXTERNAL_OES in Impeller Embedder[/-][+][Impeller]Support GL_TEXTURE_EXTERNAL_OES in Embedder Texture[/+]gaaclarke commentedon Mar 23, 2026
Can you explain to us why the exiting external texture API isn't sufficient and can you give us some more concrete use-cases that you are attempting to create?
xiaowei-guan commentedon Mar 27, 2026
After investigation, it was found that Windows and Linux do not support GL_TEXTURE_EXTERNAL_OES.
github-actions commentedon Apr 10, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.