Skip to content

Commit d8e3bb9

Browse files
committed
[Tizen] Harden Vulkan external texture resolution
- Null-check the command buffer returned by CreateCommandBuffer() before dereferencing it in the Impeller path. It can be null when the context is being torn down. - Fall back to the engine-provided size when the embedder does not populate the texture width/height, matching the Skia path.
1 parent a0e4223 commit d8e3bb9

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

engine/src/flutter/shell/platform/embedder/embedder_external_texture_vulkan.cc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,11 @@ sk_sp<DlImage> EmbedderExternalTextureVulkan::ResolveTextureImpeller(
139139
return nullptr;
140140
}
141141

142+
if (texture_desc->width == 0 || texture_desc->height == 0) {
143+
texture_desc->width = size.width();
144+
texture_desc->height = size.height();
145+
}
146+
142147
auto& impeller_context =
143148
impeller::ContextVK::Cast(*aiks_context->GetContext());
144149

@@ -153,6 +158,9 @@ sk_sp<DlImage> EmbedderExternalTextureVulkan::ResolveTextureImpeller(
153158
// Transition the layout to shader read.
154159
{
155160
auto buffer = impeller_context.CreateCommandBuffer();
161+
if (!buffer) {
162+
return nullptr;
163+
}
156164
impeller::CommandBufferVK& buffer_vk =
157165
impeller::CommandBufferVK::Cast(*buffer);
158166

0 commit comments

Comments
 (0)