Skip to content

Commit 338a691

Browse files
committed
Revert "[Impeller] Reland DlAiksCanvas (flutter#45232)"
This reverts commit 3b75e3d.
1 parent 1f5b9c6 commit 338a691

File tree

92 files changed

+466
-2697
lines changed

Some content is hidden

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

92 files changed

+466
-2697
lines changed

ci/licenses_golden/excluded_files

Lines changed: 1 addition & 2 deletions
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
@@ -54,7 +53,6 @@
5453
../../../flutter/flow/flow_run_all_unittests.cc
5554
../../../flutter/flow/frame_timings_recorder_unittests.cc
5655
../../../flutter/flow/gl_context_switch_unittests.cc
57-
../../../flutter/flow/layers/aiks_layer_unittests.cc
5856
../../../flutter/flow/layers/backdrop_filter_layer_unittests.cc
5957
../../../flutter/flow/layers/checkerboard_layertree_unittests.cc
6058
../../../flutter/flow/layers/clip_path_layer_unittests.cc
@@ -224,6 +222,7 @@
224222
../../../flutter/runtime/type_conversions_unittests.cc
225223
../../../flutter/shell/common/animator_unittests.cc
226224
../../../flutter/shell/common/context_options_unittests.cc
225+
../../../flutter/shell/common/dl_op_spy_unittests.cc
227226
../../../flutter/shell/common/engine_unittests.cc
228227
../../../flutter/shell/common/fixtures
229228
../../../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
@@ -735,8 +735,6 @@ ORIGIN: ../../../flutter/display_list/dl_op_recorder.cc + ../../../flutter/LICEN
735735
ORIGIN: ../../../flutter/display_list/dl_op_recorder.h + ../../../flutter/LICENSE
736736
ORIGIN: ../../../flutter/display_list/dl_op_records.cc + ../../../flutter/LICENSE
737737
ORIGIN: ../../../flutter/display_list/dl_op_records.h + ../../../flutter/LICENSE
738-
ORIGIN: ../../../flutter/display_list/dl_op_spy.cc + ../../../flutter/LICENSE
739-
ORIGIN: ../../../flutter/display_list/dl_op_spy.h + ../../../flutter/LICENSE
740738
ORIGIN: ../../../flutter/display_list/dl_paint.cc + ../../../flutter/LICENSE
741739
ORIGIN: ../../../flutter/display_list/dl_paint.h + ../../../flutter/LICENSE
742740
ORIGIN: ../../../flutter/display_list/dl_sampling_options.h + ../../../flutter/LICENSE
@@ -791,8 +789,6 @@ ORIGIN: ../../../flutter/flow/frame_timings.cc + ../../../flutter/LICENSE
791789
ORIGIN: ../../../flutter/flow/frame_timings.h + ../../../flutter/LICENSE
792790
ORIGIN: ../../../flutter/flow/layer_snapshot_store.cc + ../../../flutter/LICENSE
793791
ORIGIN: ../../../flutter/flow/layer_snapshot_store.h + ../../../flutter/LICENSE
794-
ORIGIN: ../../../flutter/flow/layers/aiks_layer.cc + ../../../flutter/LICENSE
795-
ORIGIN: ../../../flutter/flow/layers/aiks_layer.h + ../../../flutter/LICENSE
796792
ORIGIN: ../../../flutter/flow/layers/backdrop_filter_layer.cc + ../../../flutter/LICENSE
797793
ORIGIN: ../../../flutter/flow/layers/backdrop_filter_layer.h + ../../../flutter/LICENSE
798794
ORIGIN: ../../../flutter/flow/layers/cacheable_layer.cc + ../../../flutter/LICENSE
@@ -1171,8 +1167,6 @@ ORIGIN: ../../../flutter/impeller/core/texture_descriptor.cc + ../../../flutter/
11711167
ORIGIN: ../../../flutter/impeller/core/texture_descriptor.h + ../../../flutter/LICENSE
11721168
ORIGIN: ../../../flutter/impeller/core/vertex_buffer.cc + ../../../flutter/LICENSE
11731169
ORIGIN: ../../../flutter/impeller/core/vertex_buffer.h + ../../../flutter/LICENSE
1174-
ORIGIN: ../../../flutter/impeller/display_list/dl_aiks_canvas.cc + ../../../flutter/LICENSE
1175-
ORIGIN: ../../../flutter/impeller/display_list/dl_aiks_canvas.h + ../../../flutter/LICENSE
11761170
ORIGIN: ../../../flutter/impeller/display_list/dl_dispatcher.cc + ../../../flutter/LICENSE
11771171
ORIGIN: ../../../flutter/impeller/display_list/dl_dispatcher.h + ../../../flutter/LICENSE
11781172
ORIGIN: ../../../flutter/impeller/display_list/dl_image_impeller.cc + ../../../flutter/LICENSE
@@ -2253,6 +2247,8 @@ ORIGIN: ../../../flutter/shell/common/display.cc + ../../../flutter/LICENSE
22532247
ORIGIN: ../../../flutter/shell/common/display.h + ../../../flutter/LICENSE
22542248
ORIGIN: ../../../flutter/shell/common/display_manager.cc + ../../../flutter/LICENSE
22552249
ORIGIN: ../../../flutter/shell/common/display_manager.h + ../../../flutter/LICENSE
2250+
ORIGIN: ../../../flutter/shell/common/dl_op_spy.cc + ../../../flutter/LICENSE
2251+
ORIGIN: ../../../flutter/shell/common/dl_op_spy.h + ../../../flutter/LICENSE
22562252
ORIGIN: ../../../flutter/shell/common/engine.cc + ../../../flutter/LICENSE
22572253
ORIGIN: ../../../flutter/shell/common/engine.h + ../../../flutter/LICENSE
22582254
ORIGIN: ../../../flutter/shell/common/pipeline.cc + ../../../flutter/LICENSE
@@ -3489,8 +3485,6 @@ FILE: ../../../flutter/display_list/dl_op_recorder.cc
34893485
FILE: ../../../flutter/display_list/dl_op_recorder.h
34903486
FILE: ../../../flutter/display_list/dl_op_records.cc
34913487
FILE: ../../../flutter/display_list/dl_op_records.h
3492-
FILE: ../../../flutter/display_list/dl_op_spy.cc
3493-
FILE: ../../../flutter/display_list/dl_op_spy.h
34943488
FILE: ../../../flutter/display_list/dl_paint.cc
34953489
FILE: ../../../flutter/display_list/dl_paint.h
34963490
FILE: ../../../flutter/display_list/dl_sampling_options.h
@@ -3545,8 +3539,6 @@ FILE: ../../../flutter/flow/frame_timings.cc
35453539
FILE: ../../../flutter/flow/frame_timings.h
35463540
FILE: ../../../flutter/flow/layer_snapshot_store.cc
35473541
FILE: ../../../flutter/flow/layer_snapshot_store.h
3548-
FILE: ../../../flutter/flow/layers/aiks_layer.cc
3549-
FILE: ../../../flutter/flow/layers/aiks_layer.h
35503542
FILE: ../../../flutter/flow/layers/backdrop_filter_layer.cc
35513543
FILE: ../../../flutter/flow/layers/backdrop_filter_layer.h
35523544
FILE: ../../../flutter/flow/layers/cacheable_layer.cc
@@ -3925,8 +3917,6 @@ FILE: ../../../flutter/impeller/core/texture_descriptor.cc
39253917
FILE: ../../../flutter/impeller/core/texture_descriptor.h
39263918
FILE: ../../../flutter/impeller/core/vertex_buffer.cc
39273919
FILE: ../../../flutter/impeller/core/vertex_buffer.h
3928-
FILE: ../../../flutter/impeller/display_list/dl_aiks_canvas.cc
3929-
FILE: ../../../flutter/impeller/display_list/dl_aiks_canvas.h
39303920
FILE: ../../../flutter/impeller/display_list/dl_dispatcher.cc
39313921
FILE: ../../../flutter/impeller/display_list/dl_dispatcher.h
39323922
FILE: ../../../flutter/impeller/display_list/dl_image_impeller.cc
@@ -5012,6 +5002,8 @@ FILE: ../../../flutter/shell/common/display.cc
50125002
FILE: ../../../flutter/shell/common/display.h
50135003
FILE: ../../../flutter/shell/common/display_manager.cc
50145004
FILE: ../../../flutter/shell/common/display_manager.h
5005+
FILE: ../../../flutter/shell/common/dl_op_spy.cc
5006+
FILE: ../../../flutter/shell/common/dl_op_spy.h
50155007
FILE: ../../../flutter/shell/common/engine.cc
50165008
FILE: ../../../flutter/shell/common/engine.h
50175009
FILE: ../../../flutter/shell/common/pipeline.cc

display_list/BUILD.gn

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ source_set("display_list") {
4343
"dl_op_recorder.h",
4444
"dl_op_records.cc",
4545
"dl_op_records.h",
46-
"dl_op_spy.cc",
47-
"dl_op_spy.h",
4846
"dl_paint.cc",
4947
"dl_paint.h",
5048
"dl_sampling_options.h",
@@ -113,7 +111,6 @@ if (enable_unittests) {
113111
"benchmarking/dl_complexity_unittests.cc",
114112
"display_list_unittests.cc",
115113
"dl_color_unittests.cc",
116-
"dl_op_spy_unittests.cc",
117114
"dl_paint_unittests.cc",
118115
"dl_vertices_unittests.cc",
119116
"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
@@ -33,7 +33,7 @@ DisplayList::DisplayList(DlStorage&& storage,
3333
bool can_apply_group_opacity,
3434
bool is_ui_thread_safe,
3535
bool modifies_transparent_black,
36-
std::shared_ptr<const DlRTree> rtree)
36+
sk_sp<const DlRTree> rtree)
3737
: storage_(std::move(storage)),
3838
op_count_(op_count),
3939
nested_byte_count_(nested_byte_count),

display_list/display_list.h

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

236236
bool has_rtree() const { return rtree_ != nullptr; }
237-
std::shared_ptr<const DlRTree> rtree() const { return rtree_; }
237+
sk_sp<const DlRTree> rtree() const { return rtree_; }
238238

239239
bool Equals(const DisplayList* other) const;
240240
bool Equals(const DisplayList& other) const { return Equals(&other); }
@@ -300,7 +300,7 @@ class DisplayList : public SkRefCnt {
300300
bool can_apply_group_opacity,
301301
bool is_ui_thread_safe,
302302
bool modifies_transparent_black,
303-
std::shared_ptr<const DlRTree> rtree);
303+
sk_sp<const DlRTree> rtree);
304304

305305
static uint32_t next_unique_id();
306306

@@ -317,7 +317,7 @@ class DisplayList : public SkRefCnt {
317317
const bool is_ui_thread_safe_;
318318
const bool modifies_transparent_black_;
319319

320-
const std::shared_ptr<const DlRTree> rtree_;
320+
const sk_sp<const DlRTree> rtree_;
321321

322322
void Dispatch(DlOpReceiver& ctx,
323323
uint8_t* ptr,

display_list/display_list_unittests.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1932,7 +1932,7 @@ TEST_F(DisplayListTest, FlatDrawPointsProducesBounds) {
19321932
}
19331933
}
19341934

1935-
static void test_rtree(const std::shared_ptr<const DlRTree>& rtree,
1935+
static void test_rtree(const sk_sp<const DlRTree>& rtree,
19361936
const SkRect& query,
19371937
std::vector<SkRect> expected_rects,
19381938
const std::vector<int>& expected_indices) {

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
//------------------------------------------------------------------------------
@@ -65,12 +61,7 @@ class DlCanvas {
6561
const DlImageFilter* backdrop = nullptr) = 0;
6662
virtual void Restore() = 0;
6763
virtual int GetSaveCount() const = 0;
68-
virtual void RestoreToCount(int restore_count) {
69-
FML_DCHECK(restore_count <= GetSaveCount());
70-
while (restore_count < GetSaveCount() && GetSaveCount() > 1) {
71-
Restore();
72-
}
73-
}
64+
virtual void RestoreToCount(int restore_count) = 0;
7465

7566
virtual void Translate(SkScalar tx, SkScalar ty) = 0;
7667
virtual void Scale(SkScalar sx, SkScalar sy) = 0;
@@ -210,9 +201,6 @@ class DlCanvas {
210201
const DlPaint* paint = nullptr) = 0;
211202
virtual void DrawDisplayList(const sk_sp<DisplayList> display_list,
212203
SkScalar opacity = SK_Scalar1) = 0;
213-
virtual void DrawImpellerPicture(
214-
const std::shared_ptr<const impeller::Picture>& picture,
215-
SkScalar opacity = SK_Scalar1) = 0;
216204
virtual void DrawTextBlob(const sk_sp<SkTextBlob>& blob,
217205
SkScalar x,
218206
SkScalar y,

display_list/dl_canvas_to_receiver.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -811,12 +811,6 @@ void DlCanvasToReceiver::DrawDisplayList(const sk_sp<DisplayList> display_list,
811811
: OpResult::kPreservesTransparency,
812812
display_list->can_apply_group_opacity());
813813
}
814-
void DlCanvasToReceiver::DrawImpellerPicture(
815-
const std::shared_ptr<const impeller::Picture>& picture,
816-
SkScalar opacity) {
817-
FML_LOG(ERROR) << "Cannot draw Impeller Picture in to a a display list.";
818-
FML_DCHECK(false);
819-
}
820814
void DlCanvasToReceiver::DrawTextBlob(const sk_sp<SkTextBlob>& blob,
821815
SkScalar x,
822816
SkScalar y,

display_list/dl_canvas_to_receiver.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
#include "flutter/display_list/dl_op_receiver.h"
1111
#include "flutter/fml/macros.h"
1212

13-
namespace impeller {
14-
struct Picture;
15-
}
16-
1713
namespace flutter {
1814

1915
class DlCanvasReceiver : public DlOpReceiver {
@@ -341,10 +337,6 @@ class DlCanvasToReceiver : public virtual DlCanvas, //
341337
void DrawDisplayList(const sk_sp<DisplayList> display_list,
342338
SkScalar opacity = SK_Scalar1) override;
343339
// |DlCanvas|
344-
void DrawImpellerPicture(
345-
const std::shared_ptr<const impeller::Picture>& picture,
346-
SkScalar opacity = SK_Scalar1) override;
347-
// |DlCanvas|
348340
void DrawTextBlob(const sk_sp<SkTextBlob>& blob,
349341
SkScalar x,
350342
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)