Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion impeller/renderer/backend/vulkan/command_buffer_vk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ std::shared_ptr<RenderPass> CommandBufferVK::OnCreateRenderPass(
}

std::shared_ptr<BlitPass> CommandBufferVK::OnCreateBlitPass() const {
FML_UNREACHABLE();
// TODO(kaushikiska): https://github.com/flutter/flutter/issues/112649
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: TODO(112649): [Description of issue] ?

return nullptr;
}

std::shared_ptr<ComputePass> CommandBufferVK::OnCreateComputePass() const {
Expand Down
6 changes: 3 additions & 3 deletions lib/ui/painting/image_decoder_impeller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -179,20 +179,19 @@ sk_sp<DlImage> 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());
Expand Down Expand Up @@ -233,6 +232,7 @@ void ImageDecoderImpeller::Decode(fml::RefPtr<ImageDescriptor> descriptor,
io_runner = runners_.GetIOTaskRunner(), //
result //
]() {
FML_CHECK(context) << "No valid impeller context";
auto max_size_supported =
context->GetResourceAllocator()->GetMaxTextureSizeSupported();

Expand Down
5 changes: 5 additions & 0 deletions shell/platform/android/android_surface_vulkan_impeller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,9 @@ bool AndroidSurfaceVulkanImpeller::SetNativeWindow(
return false;
}

std::shared_ptr<impeller::Context>
AndroidSurfaceVulkanImpeller::GetImpellerContext() {
return impeller_context_;
}

} // namespace flutter
3 changes: 3 additions & 0 deletions shell/platform/android/android_surface_vulkan_impeller.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ class AndroidSurfaceVulkanImpeller : public AndroidSurface {
// |AndroidSurface|
bool ResourceContextClearCurrent() override;

// |AndroidSurface|
std::shared_ptr<impeller::Context> GetImpellerContext() override;

// |AndroidSurface|
bool SetNativeWindow(fml::RefPtr<AndroidNativeWindow> window) override;

Expand Down