Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[Impeller] Reland: Remove Entity capture/AiksInspector. #52932

Merged
merged 3 commits into from
May 21, 2024
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
8 changes: 0 additions & 8 deletions ci/licenses_golden/licenses_flutter
Original file line number Diff line number Diff line change
Expand Up @@ -42255,8 +42255,6 @@ ORIGIN: ../../../flutter/impeller/aiks/aiks_context.cc + ../../../flutter/LICENS
ORIGIN: ../../../flutter/impeller/aiks/aiks_context.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/aiks/aiks_playground.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/aiks/aiks_playground.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/aiks/aiks_playground_inspector.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/aiks/aiks_playground_inspector.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/aiks/canvas.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/aiks/canvas.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/aiks/canvas_benchmarks.cc + ../../../flutter/LICENSE
Expand Down Expand Up @@ -42354,8 +42352,6 @@ ORIGIN: ../../../flutter/impeller/core/allocator.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/core/allocator.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/core/buffer_view.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/core/buffer_view.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/core/capture.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/core/capture.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/core/device_buffer.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/core/device_buffer.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/core/device_buffer_descriptor.cc + ../../../flutter/LICENSE
Expand Down Expand Up @@ -45126,8 +45122,6 @@ FILE: ../../../flutter/impeller/aiks/aiks_context.cc
FILE: ../../../flutter/impeller/aiks/aiks_context.h
FILE: ../../../flutter/impeller/aiks/aiks_playground.cc
FILE: ../../../flutter/impeller/aiks/aiks_playground.h
FILE: ../../../flutter/impeller/aiks/aiks_playground_inspector.cc
FILE: ../../../flutter/impeller/aiks/aiks_playground_inspector.h
FILE: ../../../flutter/impeller/aiks/canvas.cc
FILE: ../../../flutter/impeller/aiks/canvas.h
FILE: ../../../flutter/impeller/aiks/canvas_benchmarks.cc
Expand Down Expand Up @@ -45225,8 +45219,6 @@ FILE: ../../../flutter/impeller/core/allocator.cc
FILE: ../../../flutter/impeller/core/allocator.h
FILE: ../../../flutter/impeller/core/buffer_view.cc
FILE: ../../../flutter/impeller/core/buffer_view.h
FILE: ../../../flutter/impeller/core/capture.cc
FILE: ../../../flutter/impeller/core/capture.h
FILE: ../../../flutter/impeller/core/device_buffer.cc
FILE: ../../../flutter/impeller/core/device_buffer.h
FILE: ../../../flutter/impeller/core/device_buffer_descriptor.cc
Expand Down
4 changes: 0 additions & 4 deletions impeller/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ config("impeller_public_config") {
defines += [ "IMPELLER_DEBUG=1" ]
}

if (impeller_capture) {
defines += [ "IMPELLER_ENABLE_CAPTURE=1" ]
}

if (impeller_supports_rendering) {
defines += [ "IMPELLER_SUPPORTS_RENDERING=1" ]
}
Expand Down
2 changes: 0 additions & 2 deletions impeller/aiks/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ impeller_component("aiks_playground") {
sources = [
"aiks_playground.cc",
"aiks_playground.h",
"aiks_playground_inspector.cc",
"aiks_playground_inspector.h",
]
deps = [
":aiks",
Expand Down
25 changes: 17 additions & 8 deletions impeller/aiks/aiks_playground.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "impeller/aiks/aiks_playground.h"

#include <memory>
#include <optional>

#include "impeller/aiks/aiks_context.h"
#include "impeller/display_list/dl_dispatcher.h"
Expand All @@ -24,14 +25,24 @@ void AiksPlayground::SetTypographerContext(
}

void AiksPlayground::TearDown() {
inspector_.HackResetDueToTextureLeaks();
PlaygroundTest::TearDown();
}

bool AiksPlayground::OpenPlaygroundHere(Picture picture) {
return OpenPlaygroundHere([&picture](AiksContext& renderer) -> Picture {
return std::move(picture);
});
if (!switches_.enable_playground) {
return true;
}

AiksContext renderer(GetContext(), typographer_context_);

if (!renderer.IsValid()) {
return false;
}

return Playground::OpenPlaygroundHere(
[&renderer, &picture](RenderTarget& render_target) -> bool {
return renderer.Render(picture, render_target, true);
});
}

bool AiksPlayground::OpenPlaygroundHere(AiksPlaygroundCallback callback) {
Expand All @@ -46,10 +57,8 @@ bool AiksPlayground::OpenPlaygroundHere(AiksPlaygroundCallback callback) {
}

return Playground::OpenPlaygroundHere(
[this, &renderer, &callback](RenderTarget& render_target) -> bool {
const std::optional<Picture>& picture = inspector_.RenderInspector(
renderer, [&]() { return callback(renderer); });

[&renderer, &callback](RenderTarget& render_target) -> bool {
std::optional<Picture> picture = callback(renderer);
if (!picture.has_value()) {
return false;
}
Expand Down
2 changes: 0 additions & 2 deletions impeller/aiks/aiks_playground.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#include "flutter/display_list/display_list.h"
#include "impeller/aiks/aiks_context.h"
#include "impeller/aiks/aiks_playground_inspector.h"
#include "impeller/aiks/picture.h"
#include "impeller/playground/playground_test.h"
#include "impeller/typographer/typographer_context.h"
Expand Down Expand Up @@ -41,7 +40,6 @@ class AiksPlayground : public PlaygroundTest {

private:
std::shared_ptr<TypographerContext> typographer_context_;
AiksInspector inspector_;

AiksPlayground(const AiksPlayground&) = delete;

Expand Down
277 changes: 0 additions & 277 deletions impeller/aiks/aiks_playground_inspector.cc

This file was deleted.

Loading