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
4 changes: 0 additions & 4 deletions ci/licenses_golden/licenses_flutter
Original file line number Diff line number Diff line change
Expand Up @@ -1214,8 +1214,6 @@ FILE: ../../../flutter/impeller/entity/contents/radial_gradient_contents.cc
FILE: ../../../flutter/impeller/entity/contents/radial_gradient_contents.h
FILE: ../../../flutter/impeller/entity/contents/rrect_shadow_contents.cc
FILE: ../../../flutter/impeller/entity/contents/rrect_shadow_contents.h
FILE: ../../../flutter/impeller/entity/contents/runtime_effect_contents.cc
FILE: ../../../flutter/impeller/entity/contents/runtime_effect_contents.h
FILE: ../../../flutter/impeller/entity/contents/solid_color_contents.cc
FILE: ../../../flutter/impeller/entity/contents/solid_color_contents.h
FILE: ../../../flutter/impeller/entity/contents/solid_stroke_contents.cc
Expand Down Expand Up @@ -1282,7 +1280,6 @@ FILE: ../../../flutter/impeller/entity/shaders/morphology_filter.frag
FILE: ../../../flutter/impeller/entity/shaders/morphology_filter.vert
FILE: ../../../flutter/impeller/entity/shaders/position.vert
FILE: ../../../flutter/impeller/entity/shaders/position_color.vert
FILE: ../../../flutter/impeller/entity/shaders/position_no_color.vert
FILE: ../../../flutter/impeller/entity/shaders/position_uv.vert
FILE: ../../../flutter/impeller/entity/shaders/radial_gradient_fill.frag
FILE: ../../../flutter/impeller/entity/shaders/rrect_blur.frag
Expand Down Expand Up @@ -1558,7 +1555,6 @@ FILE: ../../../flutter/impeller/runtime_stage/runtime_stage.h
FILE: ../../../flutter/impeller/runtime_stage/runtime_stage_playground.cc
FILE: ../../../flutter/impeller/runtime_stage/runtime_stage_playground.h
FILE: ../../../flutter/impeller/runtime_stage/runtime_stage_unittests.cc
FILE: ../../../flutter/impeller/runtime_stage/runtime_types.cc
FILE: ../../../flutter/impeller/runtime_stage/runtime_types.h
FILE: ../../../flutter/impeller/tessellator/c/tessellator.cc
FILE: ../../../flutter/impeller/tessellator/c/tessellator.h
Expand Down
26 changes: 1 addition & 25 deletions impeller/display_list/display_list_dispatcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@
#include "impeller/display_list/display_list_dispatcher.h"

#include <algorithm>
#include <cstring>
#include <memory>
#include <optional>
#include <unordered_map>

#include "display_list/display_list_blend_mode.h"
#include "display_list/display_list_color_filter.h"
#include "display_list/display_list_color_source.h"
#include "display_list/display_list_path_effect.h"
#include "display_list/display_list_tile_mode.h"
#include "flutter/fml/logging.h"
Expand All @@ -24,7 +21,6 @@
#include "impeller/entity/contents/filters/inputs/filter_input.h"
#include "impeller/entity/contents/linear_gradient_contents.h"
#include "impeller/entity/contents/radial_gradient_contents.h"
#include "impeller/entity/contents/runtime_effect_contents.h"
#include "impeller/entity/contents/solid_stroke_contents.h"
#include "impeller/entity/contents/sweep_gradient_contents.h"
#include "impeller/entity/contents/tiled_texture_contents.h"
Expand Down Expand Up @@ -429,28 +425,8 @@ void DisplayListDispatcher::setColorSource(
};
return;
}
case flutter::DlColorSourceType::kRuntimeEffect: {
const flutter::DlRuntimeEffectColorSource* runtime_effect_color_source =
source->asRuntimeEffect();
auto runtime_stage =
runtime_effect_color_source->runtime_effect()->runtime_stage();
auto uniform_data_sk = runtime_effect_color_source->uniform_data();

paint_.color_source = [runtime_stage, uniform_data_sk]() {
// TODO(113714): Get rid of the allocation + copy for uniform data.
std::vector<uint8_t> uniform_data;
uniform_data.resize(uniform_data_sk->size());
memcpy(uniform_data.data(), uniform_data_sk->bytes(),
uniform_data.size());

auto contents = std::make_shared<RuntimeEffectContents>();
contents->SetRuntimeStage(runtime_stage);
contents->SetUniformData(std::move(uniform_data));
return contents;
};
return;
}
case flutter::DlColorSourceType::kConicalGradient:
case flutter::DlColorSourceType::kRuntimeEffect:
case flutter::DlColorSourceType::kUnknown:
UNIMPLEMENTED;
break;
Expand Down
9 changes: 3 additions & 6 deletions impeller/entity/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ impeller_shaders("entity_shaders") {
"shaders/linear_gradient_fill.frag",
"shaders/morphology_filter.frag",
"shaders/morphology_filter.vert",
"shaders/position_color.vert",
"shaders/position_no_color.vert",
"shaders/position_uv.vert",
"shaders/position.vert",
"shaders/radial_gradient_fill.frag",
"shaders/rrect_blur.vert",
"shaders/rrect_blur.frag",
Expand All @@ -61,6 +57,9 @@ impeller_shaders("entity_shaders") {
"shaders/tiled_texture_fill.frag",
"shaders/tiled_texture_fill.vert",
"shaders/vertices.frag",
"shaders/position_color.vert",
"shaders/position.vert",
"shaders/position_uv.vert",
]
}

Expand Down Expand Up @@ -114,8 +113,6 @@ impeller_component("entity") {
"contents/radial_gradient_contents.h",
"contents/rrect_shadow_contents.cc",
"contents/rrect_shadow_contents.h",
"contents/runtime_effect_contents.cc",
"contents/runtime_effect_contents.h",
"contents/solid_color_contents.cc",
"contents/solid_color_contents.h",
"contents/solid_stroke_contents.cc",
Expand Down
166 changes: 0 additions & 166 deletions impeller/entity/contents/runtime_effect_contents.cc

This file was deleted.

29 changes: 0 additions & 29 deletions impeller/entity/contents/runtime_effect_contents.h

This file was deleted.

37 changes: 0 additions & 37 deletions impeller/entity/entity_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
// found in the LICENSE file.

#include <algorithm>
#include <cstring>
#include <memory>
#include <optional>
#include <unordered_map>
#include <vector>

#include "flutter/testing/testing.h"
#include "fml/logging.h"
#include "fml/time/time_point.h"
#include "gtest/gtest.h"
#include "impeller/entity/contents/atlas_contents.h"
#include "impeller/entity/contents/clip_contents.h"
Expand All @@ -21,7 +19,6 @@
#include "impeller/entity/contents/filters/filter_contents.h"
#include "impeller/entity/contents/filters/inputs/filter_input.h"
#include "impeller/entity/contents/rrect_shadow_contents.h"
#include "impeller/entity/contents/runtime_effect_contents.h"
#include "impeller/entity/contents/solid_color_contents.h"
#include "impeller/entity/contents/solid_stroke_contents.h"
#include "impeller/entity/contents/text_contents.h"
Expand All @@ -40,7 +37,6 @@
#include "impeller/playground/widgets.h"
#include "impeller/renderer/render_pass.h"
#include "impeller/renderer/vertex_buffer_builder.h"
#include "impeller/runtime_stage/runtime_stage.h"
#include "impeller/tessellator/tessellator.h"
#include "impeller/typographer/backends/skia/text_frame_skia.h"
#include "impeller/typographer/backends/skia/text_render_context_skia.h"
Expand Down Expand Up @@ -2030,38 +2026,5 @@ TEST_P(EntityTest, SdfText) {
ASSERT_TRUE(OpenPlaygroundHere(callback));
}

TEST_P(EntityTest, RuntimeEffect) {
if (GetParam() != PlaygroundBackend::kMetal) {
GTEST_SKIP_("This test only has a Metal fixture at the moment.");
}

auto callback = [&](ContentContext& context, RenderPass& pass) -> bool {
auto contents = std::make_shared<RuntimeEffectContents>();
contents->SetGeometry(Geometry::MakeCover());

auto runtime_stage =
LoadFixtureRuntimeStage("runtime_stage_example.frag.iplr");
contents->SetRuntimeStage(runtime_stage);

struct FragUniforms {
Scalar iTime;
Vector2 iResolution;
} frag_uniforms = {
.iTime = static_cast<Scalar>(
fml::TimePoint::Now().ToEpochDelta().ToSecondsF()),
.iResolution = Vector2(GetWindowSize().width, GetWindowSize().height),
};
std::vector<uint8_t> uniform_data;
uniform_data.resize(sizeof(FragUniforms));
memcpy(uniform_data.data(), &frag_uniforms, sizeof(FragUniforms));
contents->SetUniformData(uniform_data);

Entity entity;
entity.SetContents(contents);
return contents->Render(context, entity, pass);
};
ASSERT_TRUE(OpenPlaygroundHere(callback));
}

} // namespace testing
} // namespace impeller
17 changes: 0 additions & 17 deletions impeller/entity/shaders/position_no_color.vert

This file was deleted.

Loading