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

Commit d2b0009

Browse files
authored
Merge branch 'main' into rotate_color
2 parents c9b5c9f + 3e5f27d commit d2b0009

17 files changed

+559
-1002
lines changed

ci/licenses_golden/licenses_flutter

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,8 +1200,6 @@ ORIGIN: ../../../flutter/impeller/entity/contents/filters/srgb_to_linear_filter_
12001200
ORIGIN: ../../../flutter/impeller/entity/contents/filters/srgb_to_linear_filter_contents.h + ../../../flutter/LICENSE
12011201
ORIGIN: ../../../flutter/impeller/entity/contents/filters/yuv_to_rgb_filter_contents.cc + ../../../flutter/LICENSE
12021202
ORIGIN: ../../../flutter/impeller/entity/contents/filters/yuv_to_rgb_filter_contents.h + ../../../flutter/LICENSE
1203-
ORIGIN: ../../../flutter/impeller/entity/contents/foreground_blend_contents.cc + ../../../flutter/LICENSE
1204-
ORIGIN: ../../../flutter/impeller/entity/contents/foreground_blend_contents.h + ../../../flutter/LICENSE
12051203
ORIGIN: ../../../flutter/impeller/entity/contents/framebuffer_blend_contents.cc + ../../../flutter/LICENSE
12061204
ORIGIN: ../../../flutter/impeller/entity/contents/framebuffer_blend_contents.h + ../../../flutter/LICENSE
12071205
ORIGIN: ../../../flutter/impeller/entity/contents/gradient_generator.cc + ../../../flutter/LICENSE
@@ -1878,6 +1876,7 @@ ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/layer_scene_builder
18781876
ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/layer_tree.dart + ../../../flutter/LICENSE
18791877
ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/mask_filter.dart + ../../../flutter/LICENSE
18801878
ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/n_way_canvas.dart + ../../../flutter/LICENSE
1879+
ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/native_memory.dart + ../../../flutter/LICENSE
18811880
ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/noto_font.dart + ../../../flutter/LICENSE
18821881
ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/painting.dart + ../../../flutter/LICENSE
18831882
ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/path.dart + ../../../flutter/LICENSE
@@ -3784,8 +3783,6 @@ FILE: ../../../flutter/impeller/entity/contents/filters/srgb_to_linear_filter_co
37843783
FILE: ../../../flutter/impeller/entity/contents/filters/srgb_to_linear_filter_contents.h
37853784
FILE: ../../../flutter/impeller/entity/contents/filters/yuv_to_rgb_filter_contents.cc
37863785
FILE: ../../../flutter/impeller/entity/contents/filters/yuv_to_rgb_filter_contents.h
3787-
FILE: ../../../flutter/impeller/entity/contents/foreground_blend_contents.cc
3788-
FILE: ../../../flutter/impeller/entity/contents/foreground_blend_contents.h
37893786
FILE: ../../../flutter/impeller/entity/contents/framebuffer_blend_contents.cc
37903787
FILE: ../../../flutter/impeller/entity/contents/framebuffer_blend_contents.h
37913788
FILE: ../../../flutter/impeller/entity/contents/gradient_generator.cc
@@ -4464,6 +4461,7 @@ FILE: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/layer_scene_builder.d
44644461
FILE: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/layer_tree.dart
44654462
FILE: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/mask_filter.dart
44664463
FILE: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/n_way_canvas.dart
4464+
FILE: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/native_memory.dart
44674465
FILE: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/noto_font.dart
44684466
FILE: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/painting.dart
44694467
FILE: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/path.dart

impeller/entity/BUILD.gn

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,6 @@ impeller_component("entity") {
180180
"contents/filters/srgb_to_linear_filter_contents.h",
181181
"contents/filters/yuv_to_rgb_filter_contents.cc",
182182
"contents/filters/yuv_to_rgb_filter_contents.h",
183-
"contents/foreground_blend_contents.cc",
184-
"contents/foreground_blend_contents.h",
185183
"contents/framebuffer_blend_contents.cc",
186184
"contents/framebuffer_blend_contents.h",
187185
"contents/gradient_generator.cc",

impeller/entity/contents/filters/blend_filter_contents.cc

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include "impeller/entity/contents/content_context.h"
1313
#include "impeller/entity/contents/contents.h"
1414
#include "impeller/entity/contents/filters/inputs/filter_input.h"
15-
#include "impeller/entity/contents/foreground_blend_contents.h"
1615
#include "impeller/entity/contents/solid_color_contents.h"
1716
#include "impeller/entity/entity.h"
1817
#include "impeller/geometry/path_builder.h"
@@ -374,20 +373,6 @@ std::optional<Entity> BlendFilterContents::RenderFilter(
374373
}
375374

376375
if (blend_mode_ <= Entity::kLastAdvancedBlendMode) {
377-
auto potential_alpha = GetAlpha().value_or(1.0);
378-
if (inputs.size() == 1 && foreground_color_.has_value() &&
379-
potential_alpha >= 1.0 - kEhCloseEnough) {
380-
auto contents = std::make_shared<AdvancedForegroundBlendContents>();
381-
contents->SetBlendMode(blend_mode_);
382-
contents->SetCoverage(coverage);
383-
contents->SetSrcInput(inputs[0]);
384-
contents->SetForegroundColor(foreground_color_.value());
385-
Entity entity;
386-
entity.SetTransformation(Matrix::MakeTranslation(coverage.origin));
387-
entity.SetContents(std::move(contents));
388-
return entity;
389-
}
390-
391376
return advanced_blend_proc_(inputs, renderer, entity, coverage,
392377
foreground_color_, GetAbsorbOpacity(),
393378
GetAlpha());

impeller/entity/contents/foreground_blend_contents.cc

Lines changed: 0 additions & 159 deletions
This file was deleted.

impeller/entity/contents/foreground_blend_contents.h

Lines changed: 0 additions & 50 deletions
This file was deleted.

lib/web_ui/lib/src/engine.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export 'engine/canvaskit/layer_scene_builder.dart';
3939
export 'engine/canvaskit/layer_tree.dart';
4040
export 'engine/canvaskit/mask_filter.dart';
4141
export 'engine/canvaskit/n_way_canvas.dart';
42+
export 'engine/canvaskit/native_memory.dart';
4243
export 'engine/canvaskit/noto_font.dart';
4344
export 'engine/canvaskit/painting.dart';
4445
export 'engine/canvaskit/path.dart';

lib/web_ui/lib/src/engine/canvaskit/canvas.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ class CkCanvas {
215215
offset.dx,
216216
offset.dy,
217217
);
218-
paragraph.markUsed();
219218
}
220219

221220
void drawPath(CkPath path, CkPaint paint) {
@@ -1112,7 +1111,6 @@ class CkDrawParagraphCommand extends CkPaintCommand {
11121111
offset.dx,
11131112
offset.dy,
11141113
);
1115-
paragraph.markUsed();
11161114
}
11171115
}
11181116

lib/web_ui/lib/src/engine/canvaskit/canvaskit_api.dart

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3392,7 +3392,7 @@ abstract class Collector {
33923392
class ProductionCollector implements Collector {
33933393
ProductionCollector() {
33943394
_skObjectFinalizationRegistry =
3395-
SkObjectFinalizationRegistry((SkDeletable deletable) {
3395+
createSkObjectFinalizationRegistry((SkDeletable deletable) {
33963396
// This is called when GC decides to collect the wrapper object and
33973397
// notify us, which may happen after the object is already deleted
33983398
// explicitly, e.g. when its ref count drops to zero. When that happens
@@ -3568,10 +3568,13 @@ extension JsConstructorExtension on JsConstructor {
35683568
/// 6. We call `delete` on SkPaint.
35693569
@JS('window.FinalizationRegistry')
35703570
@staticInterop
3571-
class SkObjectFinalizationRegistry {
3572-
// TODO(hterkelsen): Add a type for the `cleanup` function when
3573-
// native constructors support type parameters.
3574-
external factory SkObjectFinalizationRegistry(JSFunction cleanup);
3571+
class SkObjectFinalizationRegistry {}
3572+
3573+
SkObjectFinalizationRegistry createSkObjectFinalizationRegistry(JSFunction cleanup) {
3574+
return js_util.callConstructor(
3575+
_finalizationRegistryConstructor!.toObjectShallow,
3576+
<Object>[cleanup],
3577+
);
35753578
}
35763579

35773580
extension SkObjectFinalizationRegistryExtension on SkObjectFinalizationRegistry {

0 commit comments

Comments
 (0)