diff --git a/impeller/renderer/backend/vulkan/command_buffer_vk.cc b/impeller/renderer/backend/vulkan/command_buffer_vk.cc index af8ab6d6b9c1e..6db5c36c2c391 100644 --- a/impeller/renderer/backend/vulkan/command_buffer_vk.cc +++ b/impeller/renderer/backend/vulkan/command_buffer_vk.cc @@ -129,7 +129,8 @@ std::shared_ptr CommandBufferVK::OnCreateRenderPass( } std::shared_ptr CommandBufferVK::OnCreateBlitPass() const { - FML_UNREACHABLE(); + // TODO(kaushikiska): https://github.com/flutter/flutter/issues/112649 + return nullptr; } std::shared_ptr CommandBufferVK::OnCreateComputePass() const { diff --git a/lib/ui/painting/image_decoder_impeller.cc b/lib/ui/painting/image_decoder_impeller.cc index 4130f37e75794..aa89551dc8958 100644 --- a/lib/ui/painting/image_decoder_impeller.cc +++ b/lib/ui/painting/image_decoder_impeller.cc @@ -179,20 +179,19 @@ sk_sp ImageDecoderImpeller::UploadTexture( { auto command_buffer = context->CreateCommandBuffer(); - command_buffer->SetLabel("Mipmap Command Buffer"); if (!command_buffer) { FML_DLOG(ERROR) << "Could not create command buffer for mipmap generation."; return nullptr; } + command_buffer->SetLabel("Mipmap Command Buffer"); auto blit_pass = command_buffer->CreateBlitPass(); - blit_pass->SetLabel("Mipmap Blit Pass"); if (!blit_pass) { FML_DLOG(ERROR) << "Could not create blit pass for mipmap generation."; return nullptr; } - + blit_pass->SetLabel("Mipmap Blit Pass"); blit_pass->GenerateMipmap(texture); blit_pass->EncodeCommands(context->GetResourceAllocator()); @@ -233,6 +232,7 @@ void ImageDecoderImpeller::Decode(fml::RefPtr descriptor, io_runner = runners_.GetIOTaskRunner(), // result // ]() { + FML_CHECK(context) << "No valid impeller context"; auto max_size_supported = context->GetResourceAllocator()->GetMaxTextureSizeSupported(); diff --git a/shell/platform/android/android_surface_vulkan_impeller.cc b/shell/platform/android/android_surface_vulkan_impeller.cc index e4f5637d1eef4..f5bf383ab19da 100644 --- a/shell/platform/android/android_surface_vulkan_impeller.cc +++ b/shell/platform/android/android_surface_vulkan_impeller.cc @@ -116,4 +116,9 @@ bool AndroidSurfaceVulkanImpeller::SetNativeWindow( return false; } +std::shared_ptr +AndroidSurfaceVulkanImpeller::GetImpellerContext() { + return impeller_context_; +} + } // namespace flutter diff --git a/shell/platform/android/android_surface_vulkan_impeller.h b/shell/platform/android/android_surface_vulkan_impeller.h index f5012dbf61e1d..c96cbd21a8fe1 100644 --- a/shell/platform/android/android_surface_vulkan_impeller.h +++ b/shell/platform/android/android_surface_vulkan_impeller.h @@ -40,6 +40,9 @@ class AndroidSurfaceVulkanImpeller : public AndroidSurface { // |AndroidSurface| bool ResourceContextClearCurrent() override; + // |AndroidSurface| + std::shared_ptr GetImpellerContext() override; + // |AndroidSurface| bool SetNativeWindow(fml::RefPtr window) override;