[Impeller] re-remove wireframe. (#165929)

Easier just to re-open rather than fix diffs.
This commit is contained in:
Jonah Williams
2025-03-26 08:15:23 -07:00
committed by GitHub
parent 0db16effe3
commit 200b98769f
4 changed files with 2 additions and 20 deletions

View File

@@ -40,11 +40,6 @@ bool DlPlayground::OpenPlaygroundHere(DisplayListPlaygroundCallback callback) {
}
return Playground::OpenPlaygroundHere(
[&context, &callback](RenderTarget& render_target) -> bool {
static bool wireframe = false;
if (ImGui::IsKeyPressed(ImGuiKey_Z)) {
wireframe = !wireframe;
context.GetContentContext().SetWireframe(wireframe);
}
return RenderToTarget(
context.GetContentContext(), //
render_target, //

View File

@@ -475,7 +475,7 @@ void ContentContextOptions::ApplyToPipelineDescriptor(
}
desc.SetPrimitiveType(primitive_type);
desc.SetPolygonMode(wireframe ? PolygonMode::kLine : PolygonMode::kFill);
desc.SetPolygonMode(PolygonMode::kFill);
}
std::array<std::vector<Scalar>, 15> GetPorterDuffSpecConstants(
@@ -913,10 +913,6 @@ const Capabilities& ContentContext::GetDeviceCapabilities() const {
return *context_->GetCapabilities();
}
void ContentContext::SetWireframe(bool wireframe) {
wireframe_ = wireframe;
}
PipelineRef ContentContext::GetCachedRuntimeEffectPipeline(
const std::string& unique_entrypoint_name,
const ContentContextOptions& options,

View File

@@ -97,7 +97,6 @@ struct ContentContextOptions {
PixelFormat color_attachment_pixel_format = PixelFormat::kUnknown;
bool has_depth_stencil_attachments = true;
bool depth_write_enabled = false;
bool wireframe = false;
bool is_for_rrect_blur_clear = false;
constexpr uint64_t ToKey() const {
@@ -110,7 +109,7 @@ struct ContentContextOptions {
static_assert(sizeof(color_attachment_pixel_format) == 1);
return (is_for_rrect_blur_clear ? 1llu : 0llu) << 0 |
(wireframe ? 1llu : 0llu) << 1 |
(0) << 1 | // // Unused, previously wireframe.
(has_depth_stencil_attachments ? 1llu : 0llu) << 2 |
(depth_write_enabled ? 1llu : 0llu) << 3 |
// enums
@@ -240,8 +239,6 @@ class ContentContext {
const Capabilities& GetDeviceCapabilities() const;
void SetWireframe(bool wireframe);
using SubpassCallback =
std::function<bool(const ContentContext&, RenderPass&)>;
@@ -343,7 +340,6 @@ class ContentContext {
std::shared_ptr<RenderTargetAllocator> render_target_cache_;
std::shared_ptr<HostBuffer> host_buffer_;
std::shared_ptr<Texture> empty_texture_;
bool wireframe_ = false;
ContentContext(const ContentContext&) = delete;

View File

@@ -53,11 +53,6 @@ bool EntityPlayground::OpenPlaygroundHere(EntityPlaygroundCallback callback) {
return false;
}
SinglePassCallback pass_callback = [&](RenderPass& pass) -> bool {
static bool wireframe = false;
if (ImGui::IsKeyPressed(ImGuiKey_Z)) {
wireframe = !wireframe;
content_context.SetWireframe(wireframe);
}
content_context.GetRenderTargetCache()->Start();
bool result = callback(content_context, pass);
content_context.GetRenderTargetCache()->End();