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

Commit 30e2ce8

Browse files
author
Jonah Williams
authored
Merge branch 'main' into text_color_source_2
2 parents 7838622 + 4aaf77e commit 30e2ce8

File tree

85 files changed

+420
-2611
lines changed

Some content is hidden

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

85 files changed

+420
-2611
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
@@ -55,7 +54,6 @@
5554
../../../flutter/flow/frame_timings_recorder_unittests.cc
5655
../../../flutter/flow/gl_context_switch_unittests.cc
5756
../../../flutter/flow/instrumentation_unittests.cc
58-
../../../flutter/flow/layers/aiks_layer_unittests.cc
5957
../../../flutter/flow/layers/backdrop_filter_layer_unittests.cc
6058
../../../flutter/flow/layers/checkerboard_layertree_unittests.cc
6159
../../../flutter/flow/layers/clip_path_layer_unittests.cc
@@ -221,6 +219,7 @@
221219
../../../flutter/runtime/type_conversions_unittests.cc
222220
../../../flutter/shell/common/animator_unittests.cc
223221
../../../flutter/shell/common/context_options_unittests.cc
222+
../../../flutter/shell/common/dl_op_spy_unittests.cc
224223
../../../flutter/shell/common/engine_unittests.cc
225224
../../../flutter/shell/common/fixtures
226225
../../../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
@@ -793,8 +791,6 @@ ORIGIN: ../../../flutter/flow/instrumentation.cc + ../../../flutter/LICENSE
793791
ORIGIN: ../../../flutter/flow/instrumentation.h + ../../../flutter/LICENSE
794792
ORIGIN: ../../../flutter/flow/layer_snapshot_store.cc + ../../../flutter/LICENSE
795793
ORIGIN: ../../../flutter/flow/layer_snapshot_store.h + ../../../flutter/LICENSE
796-
ORIGIN: ../../../flutter/flow/layers/aiks_layer.cc + ../../../flutter/LICENSE
797-
ORIGIN: ../../../flutter/flow/layers/aiks_layer.h + ../../../flutter/LICENSE
798794
ORIGIN: ../../../flutter/flow/layers/backdrop_filter_layer.cc + ../../../flutter/LICENSE
799795
ORIGIN: ../../../flutter/flow/layers/backdrop_filter_layer.h + ../../../flutter/LICENSE
800796
ORIGIN: ../../../flutter/flow/layers/cacheable_layer.cc + ../../../flutter/LICENSE
@@ -1167,8 +1163,6 @@ ORIGIN: ../../../flutter/impeller/core/texture_descriptor.cc + ../../../flutter/
11671163
ORIGIN: ../../../flutter/impeller/core/texture_descriptor.h + ../../../flutter/LICENSE
11681164
ORIGIN: ../../../flutter/impeller/core/vertex_buffer.cc + ../../../flutter/LICENSE
11691165
ORIGIN: ../../../flutter/impeller/core/vertex_buffer.h + ../../../flutter/LICENSE
1170-
ORIGIN: ../../../flutter/impeller/display_list/dl_aiks_canvas.cc + ../../../flutter/LICENSE
1171-
ORIGIN: ../../../flutter/impeller/display_list/dl_aiks_canvas.h + ../../../flutter/LICENSE
11721166
ORIGIN: ../../../flutter/impeller/display_list/dl_dispatcher.cc + ../../../flutter/LICENSE
11731167
ORIGIN: ../../../flutter/impeller/display_list/dl_dispatcher.h + ../../../flutter/LICENSE
11741168
ORIGIN: ../../../flutter/impeller/display_list/dl_image_impeller.cc + ../../../flutter/LICENSE
@@ -2247,6 +2241,8 @@ ORIGIN: ../../../flutter/shell/common/display.cc + ../../../flutter/LICENSE
22472241
ORIGIN: ../../../flutter/shell/common/display.h + ../../../flutter/LICENSE
22482242
ORIGIN: ../../../flutter/shell/common/display_manager.cc + ../../../flutter/LICENSE
22492243
ORIGIN: ../../../flutter/shell/common/display_manager.h + ../../../flutter/LICENSE
2244+
ORIGIN: ../../../flutter/shell/common/dl_op_spy.cc + ../../../flutter/LICENSE
2245+
ORIGIN: ../../../flutter/shell/common/dl_op_spy.h + ../../../flutter/LICENSE
22502246
ORIGIN: ../../../flutter/shell/common/engine.cc + ../../../flutter/LICENSE
22512247
ORIGIN: ../../../flutter/shell/common/engine.h + ../../../flutter/LICENSE
22522248
ORIGIN: ../../../flutter/shell/common/pipeline.cc + ../../../flutter/LICENSE
@@ -3483,8 +3479,6 @@ FILE: ../../../flutter/display_list/dl_op_recorder.cc
34833479
FILE: ../../../flutter/display_list/dl_op_recorder.h
34843480
FILE: ../../../flutter/display_list/dl_op_records.cc
34853481
FILE: ../../../flutter/display_list/dl_op_records.h
3486-
FILE: ../../../flutter/display_list/dl_op_spy.cc
3487-
FILE: ../../../flutter/display_list/dl_op_spy.h
34883482
FILE: ../../../flutter/display_list/dl_paint.cc
34893483
FILE: ../../../flutter/display_list/dl_paint.h
34903484
FILE: ../../../flutter/display_list/dl_sampling_options.h
@@ -3541,8 +3535,6 @@ FILE: ../../../flutter/flow/instrumentation.cc
35413535
FILE: ../../../flutter/flow/instrumentation.h
35423536
FILE: ../../../flutter/flow/layer_snapshot_store.cc
35433537
FILE: ../../../flutter/flow/layer_snapshot_store.h
3544-
FILE: ../../../flutter/flow/layers/aiks_layer.cc
3545-
FILE: ../../../flutter/flow/layers/aiks_layer.h
35463538
FILE: ../../../flutter/flow/layers/backdrop_filter_layer.cc
35473539
FILE: ../../../flutter/flow/layers/backdrop_filter_layer.h
35483540
FILE: ../../../flutter/flow/layers/cacheable_layer.cc
@@ -3915,8 +3907,6 @@ FILE: ../../../flutter/impeller/core/texture_descriptor.cc
39153907
FILE: ../../../flutter/impeller/core/texture_descriptor.h
39163908
FILE: ../../../flutter/impeller/core/vertex_buffer.cc
39173909
FILE: ../../../flutter/impeller/core/vertex_buffer.h
3918-
FILE: ../../../flutter/impeller/display_list/dl_aiks_canvas.cc
3919-
FILE: ../../../flutter/impeller/display_list/dl_aiks_canvas.h
39203910
FILE: ../../../flutter/impeller/display_list/dl_dispatcher.cc
39213911
FILE: ../../../flutter/impeller/display_list/dl_dispatcher.h
39223912
FILE: ../../../flutter/impeller/display_list/dl_image_impeller.cc
@@ -5000,6 +4990,8 @@ FILE: ../../../flutter/shell/common/display.cc
50004990
FILE: ../../../flutter/shell/common/display.h
50014991
FILE: ../../../flutter/shell/common/display_manager.cc
50024992
FILE: ../../../flutter/shell/common/display_manager.h
4993+
FILE: ../../../flutter/shell/common/dl_op_spy.cc
4994+
FILE: ../../../flutter/shell/common/dl_op_spy.h
50034995
FILE: ../../../flutter/shell/common/engine.cc
50044996
FILE: ../../../flutter/shell/common/engine.h
50054997
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
// 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/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)