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

Commit 3429528

Browse files
Revert "[Impeller] DlCanvas implementation wrapping Aiks canvas" (#44466)
This reverts commit 6e90446. See flutter/flutter#132071
1 parent 1609238 commit 3429528

File tree

78 files changed

+403
-2512
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+403
-2512
lines changed

ci/licenses_golden/excluded_files

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
../../../flutter/display_list/benchmarking/dl_complexity_unittests.cc
3333
../../../flutter/display_list/display_list_unittests.cc
3434
../../../flutter/display_list/dl_color_unittests.cc
35-
../../../flutter/display_list/dl_op_spy_unittests.cc
3635
../../../flutter/display_list/dl_paint_unittests.cc
3736
../../../flutter/display_list/dl_vertices_unittests.cc
3837
../../../flutter/display_list/effects/dl_color_filter_unittests.cc
@@ -218,6 +217,7 @@
218217
../../../flutter/runtime/type_conversions_unittests.cc
219218
../../../flutter/shell/common/animator_unittests.cc
220219
../../../flutter/shell/common/context_options_unittests.cc
220+
../../../flutter/shell/common/dl_op_spy_unittests.cc
221221
../../../flutter/shell/common/engine_unittests.cc
222222
../../../flutter/shell/common/fixtures
223223
../../../flutter/shell/common/input_events_unittests.cc

ci/licenses_golden/licenses_flutter

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -731,8 +731,6 @@ ORIGIN: ../../../flutter/display_list/dl_op_receiver.cc + ../../../flutter/LICEN
731731
ORIGIN: ../../../flutter/display_list/dl_op_receiver.h + ../../../flutter/LICENSE
732732
ORIGIN: ../../../flutter/display_list/dl_op_records.cc + ../../../flutter/LICENSE
733733
ORIGIN: ../../../flutter/display_list/dl_op_records.h + ../../../flutter/LICENSE
734-
ORIGIN: ../../../flutter/display_list/dl_op_spy.cc + ../../../flutter/LICENSE
735-
ORIGIN: ../../../flutter/display_list/dl_op_spy.h + ../../../flutter/LICENSE
736734
ORIGIN: ../../../flutter/display_list/dl_paint.cc + ../../../flutter/LICENSE
737735
ORIGIN: ../../../flutter/display_list/dl_paint.h + ../../../flutter/LICENSE
738736
ORIGIN: ../../../flutter/display_list/dl_sampling_options.h + ../../../flutter/LICENSE
@@ -789,8 +787,6 @@ ORIGIN: ../../../flutter/flow/instrumentation.cc + ../../../flutter/LICENSE
789787
ORIGIN: ../../../flutter/flow/instrumentation.h + ../../../flutter/LICENSE
790788
ORIGIN: ../../../flutter/flow/layer_snapshot_store.cc + ../../../flutter/LICENSE
791789
ORIGIN: ../../../flutter/flow/layer_snapshot_store.h + ../../../flutter/LICENSE
792-
ORIGIN: ../../../flutter/flow/layers/aiks_layer.cc + ../../../flutter/LICENSE
793-
ORIGIN: ../../../flutter/flow/layers/aiks_layer.h + ../../../flutter/LICENSE
794790
ORIGIN: ../../../flutter/flow/layers/backdrop_filter_layer.cc + ../../../flutter/LICENSE
795791
ORIGIN: ../../../flutter/flow/layers/backdrop_filter_layer.h + ../../../flutter/LICENSE
796792
ORIGIN: ../../../flutter/flow/layers/cacheable_layer.cc + ../../../flutter/LICENSE
@@ -1157,8 +1153,6 @@ ORIGIN: ../../../flutter/impeller/core/texture_descriptor.cc + ../../../flutter/
11571153
ORIGIN: ../../../flutter/impeller/core/texture_descriptor.h + ../../../flutter/LICENSE
11581154
ORIGIN: ../../../flutter/impeller/core/vertex_buffer.cc + ../../../flutter/LICENSE
11591155
ORIGIN: ../../../flutter/impeller/core/vertex_buffer.h + ../../../flutter/LICENSE
1160-
ORIGIN: ../../../flutter/impeller/display_list/dl_aiks_canvas.cc + ../../../flutter/LICENSE
1161-
ORIGIN: ../../../flutter/impeller/display_list/dl_aiks_canvas.h + ../../../flutter/LICENSE
11621156
ORIGIN: ../../../flutter/impeller/display_list/dl_dispatcher.cc + ../../../flutter/LICENSE
11631157
ORIGIN: ../../../flutter/impeller/display_list/dl_dispatcher.h + ../../../flutter/LICENSE
11641158
ORIGIN: ../../../flutter/impeller/display_list/dl_image_impeller.cc + ../../../flutter/LICENSE
@@ -2220,6 +2214,8 @@ ORIGIN: ../../../flutter/shell/common/display.cc + ../../../flutter/LICENSE
22202214
ORIGIN: ../../../flutter/shell/common/display.h + ../../../flutter/LICENSE
22212215
ORIGIN: ../../../flutter/shell/common/display_manager.cc + ../../../flutter/LICENSE
22222216
ORIGIN: ../../../flutter/shell/common/display_manager.h + ../../../flutter/LICENSE
2217+
ORIGIN: ../../../flutter/shell/common/dl_op_spy.cc + ../../../flutter/LICENSE
2218+
ORIGIN: ../../../flutter/shell/common/dl_op_spy.h + ../../../flutter/LICENSE
22232219
ORIGIN: ../../../flutter/shell/common/engine.cc + ../../../flutter/LICENSE
22242220
ORIGIN: ../../../flutter/shell/common/engine.h + ../../../flutter/LICENSE
22252221
ORIGIN: ../../../flutter/shell/common/pipeline.cc + ../../../flutter/LICENSE
@@ -3451,8 +3447,6 @@ FILE: ../../../flutter/display_list/dl_op_receiver.cc
34513447
FILE: ../../../flutter/display_list/dl_op_receiver.h
34523448
FILE: ../../../flutter/display_list/dl_op_records.cc
34533449
FILE: ../../../flutter/display_list/dl_op_records.h
3454-
FILE: ../../../flutter/display_list/dl_op_spy.cc
3455-
FILE: ../../../flutter/display_list/dl_op_spy.h
34563450
FILE: ../../../flutter/display_list/dl_paint.cc
34573451
FILE: ../../../flutter/display_list/dl_paint.h
34583452
FILE: ../../../flutter/display_list/dl_sampling_options.h
@@ -3509,8 +3503,6 @@ FILE: ../../../flutter/flow/instrumentation.cc
35093503
FILE: ../../../flutter/flow/instrumentation.h
35103504
FILE: ../../../flutter/flow/layer_snapshot_store.cc
35113505
FILE: ../../../flutter/flow/layer_snapshot_store.h
3512-
FILE: ../../../flutter/flow/layers/aiks_layer.cc
3513-
FILE: ../../../flutter/flow/layers/aiks_layer.h
35143506
FILE: ../../../flutter/flow/layers/backdrop_filter_layer.cc
35153507
FILE: ../../../flutter/flow/layers/backdrop_filter_layer.h
35163508
FILE: ../../../flutter/flow/layers/cacheable_layer.cc
@@ -3877,8 +3869,6 @@ FILE: ../../../flutter/impeller/core/texture_descriptor.cc
38773869
FILE: ../../../flutter/impeller/core/texture_descriptor.h
38783870
FILE: ../../../flutter/impeller/core/vertex_buffer.cc
38793871
FILE: ../../../flutter/impeller/core/vertex_buffer.h
3880-
FILE: ../../../flutter/impeller/display_list/dl_aiks_canvas.cc
3881-
FILE: ../../../flutter/impeller/display_list/dl_aiks_canvas.h
38823872
FILE: ../../../flutter/impeller/display_list/dl_dispatcher.cc
38833873
FILE: ../../../flutter/impeller/display_list/dl_dispatcher.h
38843874
FILE: ../../../flutter/impeller/display_list/dl_image_impeller.cc
@@ -4945,6 +4935,8 @@ FILE: ../../../flutter/shell/common/display.cc
49454935
FILE: ../../../flutter/shell/common/display.h
49464936
FILE: ../../../flutter/shell/common/display_manager.cc
49474937
FILE: ../../../flutter/shell/common/display_manager.h
4938+
FILE: ../../../flutter/shell/common/dl_op_spy.cc
4939+
FILE: ../../../flutter/shell/common/dl_op_spy.h
49484940
FILE: ../../../flutter/shell/common/engine.cc
49494941
FILE: ../../../flutter/shell/common/engine.h
49504942
FILE: ../../../flutter/shell/common/pipeline.cc

display_list/BUILD.gn

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ source_set("display_list") {
3939
"dl_op_receiver.h",
4040
"dl_op_records.cc",
4141
"dl_op_records.h",
42-
"dl_op_spy.cc",
43-
"dl_op_spy.h",
4442
"dl_paint.cc",
4543
"dl_paint.h",
4644
"dl_sampling_options.h",
@@ -109,7 +107,6 @@ if (enable_unittests) {
109107
"benchmarking/dl_complexity_unittests.cc",
110108
"display_list_unittests.cc",
111109
"dl_color_unittests.cc",
112-
"dl_op_spy_unittests.cc",
113110
"dl_paint_unittests.cc",
114111
"dl_vertices_unittests.cc",
115112
"effects/dl_color_filter_unittests.cc",

display_list/display_list.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ DisplayList::DisplayList(DisplayListStorage&& storage,
3434
bool can_apply_group_opacity,
3535
bool is_ui_thread_safe,
3636
bool modifies_transparent_black,
37-
std::shared_ptr<const DlRTree> rtree)
37+
sk_sp<const DlRTree> rtree)
3838
: storage_(std::move(storage)),
3939
byte_count_(byte_count),
4040
op_count_(op_count),

display_list/display_list.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ class DisplayList : public SkRefCnt {
254254
const SkRect& bounds() const { return bounds_; }
255255

256256
bool has_rtree() const { return rtree_ != nullptr; }
257-
std::shared_ptr<const DlRTree> rtree() const { return rtree_; }
257+
sk_sp<const DlRTree> rtree() const { return rtree_; }
258258

259259
bool Equals(const DisplayList* other) const;
260260
bool Equals(const DisplayList& other) const { return Equals(&other); }
@@ -288,7 +288,7 @@ class DisplayList : public SkRefCnt {
288288
bool can_apply_group_opacity,
289289
bool is_ui_thread_safe,
290290
bool modifies_transparent_black,
291-
std::shared_ptr<const DlRTree> rtree);
291+
sk_sp<const DlRTree> rtree);
292292

293293
static uint32_t next_unique_id();
294294

@@ -308,7 +308,7 @@ class DisplayList : public SkRefCnt {
308308
const bool is_ui_thread_safe_;
309309
const bool modifies_transparent_black_;
310310

311-
const std::shared_ptr<const DlRTree> rtree_;
311+
const sk_sp<const DlRTree> rtree_;
312312

313313
void Dispatch(DlOpReceiver& ctx,
314314
uint8_t* ptr,

display_list/display_list_unittests.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2130,7 +2130,7 @@ TEST_F(DisplayListTest, FlatDrawPointsProducesBounds) {
21302130
}
21312131
}
21322132

2133-
static void test_rtree(const std::shared_ptr<const DlRTree>& rtree,
2133+
static void test_rtree(const sk_sp<const DlRTree>& rtree,
21342134
const SkRect& query,
21352135
std::vector<SkRect> expected_rects,
21362136
const std::vector<int>& expected_indices) {

display_list/dl_builder.cc

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,13 +1208,6 @@ void DisplayListBuilder::DrawAtlas(const sk_sp<DlImage>& atlas,
12081208
}
12091209
}
12101210

1211-
void DisplayListBuilder::DrawImpellerPicture(
1212-
const std::shared_ptr<const impeller::Picture>& picture,
1213-
SkScalar opacity) {
1214-
FML_LOG(ERROR) << "Cannot draw Impeller Picture in to a a display list.";
1215-
FML_DCHECK(false);
1216-
}
1217-
12181211
void DisplayListBuilder::DrawDisplayList(const sk_sp<DisplayList> display_list,
12191212
SkScalar opacity) {
12201213
if (!SkScalarIsFinite(opacity) || opacity <= SK_ScalarNearlyZero ||

display_list/dl_builder.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,6 @@ class DisplayListBuilder final : public virtual DlCanvas,
216216
DlImageSampling sampling,
217217
const SkRect* cullRect,
218218
const DlPaint* paint = nullptr) override;
219-
220-
// |DlCanvas|
221-
void DrawImpellerPicture(
222-
const std::shared_ptr<const impeller::Picture>& picture,
223-
SkScalar opacity = SK_Scalar1) override;
224-
225219
// |DlCanvas|
226220
void DrawDisplayList(const sk_sp<DisplayList> display_list,
227221
SkScalar opacity = SK_Scalar1) override;
@@ -707,7 +701,7 @@ class DisplayListBuilder final : public virtual DlCanvas,
707701
return accumulator_->bounds();
708702
}
709703

710-
std::shared_ptr<DlRTree> rtree() {
704+
sk_sp<DlRTree> rtree() {
711705
FML_DCHECK(layer_stack_.size() == 1);
712706
if (is_unbounded()) {
713707
FML_LOG(INFO) << "returning partial rtree for unbounded DisplayList";

display_list/dl_canvas.h

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@
1818
#include "third_party/skia/include/core/SkRect.h"
1919
#include "third_party/skia/include/core/SkTextBlob.h"
2020

21-
namespace impeller {
22-
struct Picture;
23-
} // namespace impeller
24-
2521
namespace flutter {
2622

2723
// The primary class used to express rendering operations in the
@@ -63,12 +59,7 @@ class DlCanvas {
6359
const DlImageFilter* backdrop = nullptr) = 0;
6460
virtual void Restore() = 0;
6561
virtual int GetSaveCount() const = 0;
66-
virtual void RestoreToCount(int restore_count) {
67-
FML_DCHECK(restore_count <= GetSaveCount());
68-
while (restore_count < GetSaveCount() && GetSaveCount() > 1) {
69-
Restore();
70-
}
71-
}
62+
virtual void RestoreToCount(int restore_count) = 0;
7263

7364
virtual void Translate(SkScalar tx, SkScalar ty) = 0;
7465
virtual void Scale(SkScalar sx, SkScalar sy) = 0;
@@ -208,9 +199,6 @@ class DlCanvas {
208199
const DlPaint* paint = nullptr) = 0;
209200
virtual void DrawDisplayList(const sk_sp<DisplayList> display_list,
210201
SkScalar opacity = SK_Scalar1) = 0;
211-
virtual void DrawImpellerPicture(
212-
const std::shared_ptr<const impeller::Picture>& picture,
213-
SkScalar opacity = SK_Scalar1) = 0;
214202
virtual void DrawTextBlob(const sk_sp<SkTextBlob>& blob,
215203
SkScalar x,
216204
SkScalar y,

display_list/geometry/dl_rtree.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace flutter {
2525
/// - Query for a set of non-overlapping rectangles that are joined
2626
/// from the original rectangles that intersect a query rect
2727
/// @see |searchAndConsolidateRects|
28-
class DlRTree {
28+
class DlRTree : public SkRefCnt {
2929
private:
3030
static constexpr int kMaxChildren = 11;
3131

0 commit comments

Comments
 (0)