-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
we can remove render texture code for Impeller + gles,because flutter engine has provided same interface for Skia + Impeller
https://github.com/flutter-tizen/embedder/blob/master/flutter/shell/platform/tizen/external_texture_pixel_egl_impeller.cc
https://github.com/flutter-tizen/embedder/blob/master/flutter/shell/platform/tizen/external_texture_surface_egl_impeller.cc
The following code is now failing to render successfully. I will check it.
sk_sp<DlImage> EmbedderExternalTextureGL::ResolveTextureImpeller(
int64_t texture_id,
impeller::AiksContext* aiks_context,
const SkISize& size) {
std::unique_ptr<FlutterOpenGLTexture> texture =
external_texture_callback_(texture_id, size.width(), size.height());
if (!texture) {
return nullptr;
}
impeller::TextureDescriptor desc;
desc.size = impeller::ISize(texture->width, texture->height);
impeller::ContextGLES& context =
impeller::ContextGLES::Cast(*aiks_context->GetContext());
impeller::HandleGLES handle = context.GetReactor()->CreateHandle(
impeller::HandleType::kTexture, texture->target);
std::shared_ptr<impeller::TextureGLES> image =
impeller::TextureGLES::WrapTexture(context.GetReactor(), desc, handle);
if (!image) {
// In case Skia rejects the image, call the release proc so that
// embedders can perform collection of intermediates.
if (texture->destruction_callback) {
texture->destruction_callback(texture->user_data);
}
FML_LOG(ERROR) << "Could not create external texture";
return nullptr;
}
if (texture->destruction_callback &&
!context.GetReactor()->RegisterCleanupCallback(
handle,
[callback = texture->destruction_callback,
user_data = texture->user_data]() { callback(user_data); })) {
FML_LOG(ERROR) << "Could not register destruction callback";
return nullptr;
}
return impeller::DlImageImpeller::Make(image);
}Metadata
Metadata
Assignees
Labels
No labels