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
41 changes: 23 additions & 18 deletions impeller/entity/contents/content_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,15 @@ ContentContext::ContentContext(
const auto supports_decal = static_cast<Scalar>(
context_->GetCapabilities()->SupportsDecalSamplerAddressMode());

// Futures for the following pipelines may block in case the first frame is
// rendered without the pipelines being ready. Put pipelines that are more
// likely to be used first.
{
glyph_atlas_pipelines_.CreateDefault(
*context_, options,
{static_cast<Scalar>(
GetContext()->GetCapabilities()->GetDefaultGlyphAtlasFormat() ==
PixelFormat::kA8UNormInt)});
solid_fill_pipelines_.CreateDefault(*context_, options);
texture_pipelines_.CreateDefault(*context_, options);
fast_gradient_pipelines_.CreateDefault(*context_, options);
Expand All @@ -310,7 +318,6 @@ ContentContext::ContentContext(
}

/// Setup default clip pipeline.

auto clip_pipeline_descriptor =
ClipPipeline::Builder::MakeDefaultPipelineDescriptor(*context_);
if (!clip_pipeline_descriptor.has_value()) {
Expand All @@ -332,6 +339,20 @@ ContentContext::ContentContext(
clip_pipelines_.SetDefault(
options,
std::make_unique<ClipPipeline>(*context_, clip_pipeline_descriptor));
texture_downsample_pipelines_.CreateDefault(*context_,
options_trianglestrip);
rrect_blur_pipelines_.CreateDefault(*context_, options_trianglestrip);
texture_strict_src_pipelines_.CreateDefault(*context_, options);
tiled_texture_pipelines_.CreateDefault(*context_, options,
{supports_decal});
gaussian_blur_pipelines_.CreateDefault(*context_, options_trianglestrip,
{supports_decal});
border_mask_blur_pipelines_.CreateDefault(*context_, options_trianglestrip);
color_matrix_color_filter_pipelines_.CreateDefault(*context_,
options_trianglestrip);
porter_duff_blend_pipelines_.CreateDefault(*context_, options_trianglestrip,
{supports_decal});
vertices_uber_shader_.CreateDefault(*context_, options, {supports_decal});
}

if (context_->GetCapabilities()->SupportsFramebufferFetch()) {
Expand Down Expand Up @@ -428,30 +449,14 @@ ContentContext::ContentContext(
{static_cast<Scalar>(BlendSelectValues::kSoftLight), supports_decal});
}

texture_downsample_pipelines_.CreateDefault(*context_, options_trianglestrip);
rrect_blur_pipelines_.CreateDefault(*context_, options_trianglestrip);
texture_strict_src_pipelines_.CreateDefault(*context_, options);
tiled_texture_pipelines_.CreateDefault(*context_, options, {supports_decal});
gaussian_blur_pipelines_.CreateDefault(*context_, options_trianglestrip,
{supports_decal});
border_mask_blur_pipelines_.CreateDefault(*context_, options_trianglestrip);
morphology_filter_pipelines_.CreateDefault(*context_, options_trianglestrip,
{supports_decal});
color_matrix_color_filter_pipelines_.CreateDefault(*context_,
options_trianglestrip);
linear_to_srgb_filter_pipelines_.CreateDefault(*context_,
options_trianglestrip);
srgb_to_linear_filter_pipelines_.CreateDefault(*context_,
options_trianglestrip);
glyph_atlas_pipelines_.CreateDefault(
*context_, options,
{static_cast<Scalar>(
GetContext()->GetCapabilities()->GetDefaultGlyphAtlasFormat() ==
PixelFormat::kA8UNormInt)});
yuv_to_rgb_filter_pipelines_.CreateDefault(*context_, options_trianglestrip);
porter_duff_blend_pipelines_.CreateDefault(*context_, options_trianglestrip,
{supports_decal});
vertices_uber_shader_.CreateDefault(*context_, options, {supports_decal});

// GLES only shader that is unsupported on macOS.
#if defined(IMPELLER_ENABLE_OPENGLES) && !defined(FML_OS_MACOSX)
if (GetContext()->GetBackendType() == Context::BackendType::kOpenGLES) {
Expand Down
3 changes: 2 additions & 1 deletion impeller/renderer/backend/vulkan/pipeline_vk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,8 @@ std::unique_ptr<PipelineVK> PipelineVK::Create(
const std::shared_ptr<DeviceHolderVK>& device_holder,
const std::weak_ptr<PipelineLibrary>& weak_library,
std::shared_ptr<SamplerVK> immutable_sampler) {
TRACE_EVENT0("flutter", "PipelineVK::Create");
TRACE_EVENT1("flutter", "PipelineVK::Create", "Name",
desc.GetLabel().c_str());

auto library = weak_library.lock();

Expand Down