diff --git a/DEPS b/DEPS index bb80e7131e1dc..3121079d10e57 100644 --- a/DEPS +++ b/DEPS @@ -14,7 +14,7 @@ vars = { 'flutter_git': 'https://flutter.googlesource.com', 'skia_git': 'https://skia.googlesource.com', 'llvm_git': 'https://llvm.googlesource.com', - 'skia_revision': '6484a450c457d3369ffba8947a3008f166224204', + 'skia_revision': 'eb6976fc57ccff62a37aecc8a43b95ce2187d929', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. @@ -1016,7 +1016,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'AW70sjrQKy2sSXpUAQl7nzgE70rTxG7C4hip4p_cnuAC' + 'version': '_uuBNUJ6KbprCDWmCNtSt6zkIMji0bGy0P_XX7P8oxAC' } ], 'condition': 'download_fuchsia_deps and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index d76b3a1db87fe..cc6c59092e416 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: 20e516e43f4cd145d010f783d5487f58 +Signature: c1f3616b3de106b9c7681db1908beca2 ==================================================================================================== LIBRARY: fuchsia_sdk @@ -4429,6 +4429,7 @@ FILE: ../../../fuchsia/sdk/linux/pkg/backend_fuchsia_globals/backend_fuchsia_glo FILE: ../../../fuchsia/sdk/linux/pkg/driver_runtime_shared_lib/driver_runtime.ifs FILE: ../../../fuchsia/sdk/linux/pkg/fdio/fdio.ifs FILE: ../../../fuchsia/sdk/linux/pkg/heapdump_instrumentation/heapdump_instrumentation.ifs +FILE: ../../../fuchsia/sdk/linux/pkg/heapdump_instrumentation/heapdump_instrumentation_shard.json FILE: ../../../fuchsia/sdk/linux/pkg/inspect/inspect.json FILE: ../../../fuchsia/sdk/linux/pkg/svc/svc.ifs FILE: ../../../fuchsia/sdk/linux/pkg/sys/component/realm_builder_shard_sdk.json @@ -11539,6 +11540,7 @@ FILE: ../../../fuchsia/sdk/linux/pkg/backend_fuchsia_globals/backend_fuchsia_glo FILE: ../../../fuchsia/sdk/linux/pkg/driver_runtime_shared_lib/driver_runtime.ifs FILE: ../../../fuchsia/sdk/linux/pkg/fdio/fdio.ifs FILE: ../../../fuchsia/sdk/linux/pkg/heapdump_instrumentation/heapdump_instrumentation.ifs +FILE: ../../../fuchsia/sdk/linux/pkg/heapdump_instrumentation/heapdump_instrumentation_shard.json FILE: ../../../fuchsia/sdk/linux/pkg/inspect/inspect.json FILE: ../../../fuchsia/sdk/linux/pkg/svc/svc.ifs FILE: ../../../fuchsia/sdk/linux/pkg/sys/component/realm_builder_shard_sdk.json @@ -14227,6 +14229,7 @@ ORIGIN: ../../../fuchsia/sdk/linux/pkg/driver_testing_cpp/environment_variables. ORIGIN: ../../../fuchsia/sdk/linux/pkg/driver_testing_cpp/test_environment.cc + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/pkg/driver_testing_cpp/test_node.cc + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/pkg/fidl_driver_natural/include/lib/fidl_driver/cpp/natural_ostream.h + ../../../fuchsia/sdk/linux/LICENSE +ORIGIN: ../../../fuchsia/sdk/linux/pkg/heapdump_instrumentation/collector.shard.cml + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/pkg/heapdump_instrumentation/include/heapdump/bind.h + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/pkg/heapdump_instrumentation/include/heapdump/snapshot.h + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/pkg/heapdump_instrumentation/include/heapdump/stats.h + ../../../fuchsia/sdk/linux/LICENSE @@ -14322,6 +14325,7 @@ FILE: ../../../fuchsia/sdk/linux/pkg/driver_testing_cpp/environment_variables.cc FILE: ../../../fuchsia/sdk/linux/pkg/driver_testing_cpp/test_environment.cc FILE: ../../../fuchsia/sdk/linux/pkg/driver_testing_cpp/test_node.cc FILE: ../../../fuchsia/sdk/linux/pkg/fidl_driver_natural/include/lib/fidl_driver/cpp/natural_ostream.h +FILE: ../../../fuchsia/sdk/linux/pkg/heapdump_instrumentation/collector.shard.cml FILE: ../../../fuchsia/sdk/linux/pkg/heapdump_instrumentation/include/heapdump/bind.h FILE: ../../../fuchsia/sdk/linux/pkg/heapdump_instrumentation/include/heapdump/snapshot.h FILE: ../../../fuchsia/sdk/linux/pkg/heapdump_instrumentation/include/heapdump/stats.h @@ -18838,6 +18842,7 @@ FILE: ../../../fuchsia/sdk/linux/pkg/backend_fuchsia_globals/backend_fuchsia_glo FILE: ../../../fuchsia/sdk/linux/pkg/driver_runtime_shared_lib/driver_runtime.ifs FILE: ../../../fuchsia/sdk/linux/pkg/fdio/fdio.ifs FILE: ../../../fuchsia/sdk/linux/pkg/heapdump_instrumentation/heapdump_instrumentation.ifs +FILE: ../../../fuchsia/sdk/linux/pkg/heapdump_instrumentation/heapdump_instrumentation_shard.json FILE: ../../../fuchsia/sdk/linux/pkg/inspect/inspect.json FILE: ../../../fuchsia/sdk/linux/pkg/svc/svc.ifs FILE: ../../../fuchsia/sdk/linux/pkg/sys/component/realm_builder_shard_sdk.json diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 4e5e0ce1a1371..d69b66f8e60eb 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 5bd50b1b6b6032b0feedab20465f8cc8 +Signature: 4ab61f21659b777a606e082d14429b9b ==================================================================================================== LIBRARY: etc1 @@ -7448,8 +7448,8 @@ ORIGIN: ../../../flutter/third_party/skia/src/gpu/graphite/task/RenderPassTask.c ORIGIN: ../../../flutter/third_party/skia/src/gpu/graphite/task/RenderPassTask.h + ../../../flutter/third_party/skia/LICENSE ORIGIN: ../../../flutter/third_party/skia/src/gpu/graphite/task/Task.cpp + ../../../flutter/third_party/skia/LICENSE ORIGIN: ../../../flutter/third_party/skia/src/gpu/graphite/task/Task.h + ../../../flutter/third_party/skia/LICENSE -ORIGIN: ../../../flutter/third_party/skia/src/gpu/graphite/task/TaskGraph.cpp + ../../../flutter/third_party/skia/LICENSE -ORIGIN: ../../../flutter/third_party/skia/src/gpu/graphite/task/TaskGraph.h + ../../../flutter/third_party/skia/LICENSE +ORIGIN: ../../../flutter/third_party/skia/src/gpu/graphite/task/TaskList.cpp + ../../../flutter/third_party/skia/LICENSE +ORIGIN: ../../../flutter/third_party/skia/src/gpu/graphite/task/TaskList.h + ../../../flutter/third_party/skia/LICENSE ORIGIN: ../../../flutter/third_party/skia/src/gpu/mtl/MtlMemoryAllocatorImpl.h + ../../../flutter/third_party/skia/LICENSE ORIGIN: ../../../flutter/third_party/skia/src/gpu/mtl/MtlMemoryAllocatorImpl.mm + ../../../flutter/third_party/skia/LICENSE ORIGIN: ../../../flutter/third_party/skia/src/gpu/mtl/MtlUtilsPriv.h + ../../../flutter/third_party/skia/LICENSE @@ -7662,8 +7662,8 @@ FILE: ../../../flutter/third_party/skia/src/gpu/graphite/task/RenderPassTask.cpp FILE: ../../../flutter/third_party/skia/src/gpu/graphite/task/RenderPassTask.h FILE: ../../../flutter/third_party/skia/src/gpu/graphite/task/Task.cpp FILE: ../../../flutter/third_party/skia/src/gpu/graphite/task/Task.h -FILE: ../../../flutter/third_party/skia/src/gpu/graphite/task/TaskGraph.cpp -FILE: ../../../flutter/third_party/skia/src/gpu/graphite/task/TaskGraph.h +FILE: ../../../flutter/third_party/skia/src/gpu/graphite/task/TaskList.cpp +FILE: ../../../flutter/third_party/skia/src/gpu/graphite/task/TaskList.h FILE: ../../../flutter/third_party/skia/src/gpu/mtl/MtlMemoryAllocatorImpl.h FILE: ../../../flutter/third_party/skia/src/gpu/mtl/MtlMemoryAllocatorImpl.mm FILE: ../../../flutter/third_party/skia/src/gpu/mtl/MtlUtilsPriv.h diff --git a/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/paragraph.dart b/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/paragraph.dart index e872c768a3af3..97c5b173b1b2c 100644 --- a/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/paragraph.dart +++ b/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/paragraph.dart @@ -113,7 +113,7 @@ class SkwasmParagraph extends SkwasmObjectWrapper implements ui.Pa @override void layout(ui.ParagraphConstraints constraints) { paragraphLayout(handle, constraints.width); - if (!_hasCheckedForMissingCodePoints) { + if (!debugDisableFontFallbacks && !_hasCheckedForMissingCodePoints) { _hasCheckedForMissingCodePoints = true; final int missingCodePointCount = paragraphGetUnresolvedCodePoints(handle, nullptr, 0); if (missingCodePointCount > 0) { diff --git a/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart b/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart index 20a2b4d17772b..36fd442bbb878 100644 --- a/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart +++ b/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart @@ -33,6 +33,11 @@ class SkwasmGradient extends SkwasmNativeShader implements ui.Gradient { ui.TileMode tileMode = ui.TileMode.clamp, Float32List? matrix4, }) => withStackScope((StackScope scope) { + assert(() { + validateColorStops(colors, colorStops); + return true; + }()); + final RawPointArray endPoints = scope.convertPointArrayToNative([from, to]); final RawColorArray nativeColors = scope.convertColorArrayToNative(colors); @@ -61,6 +66,11 @@ class SkwasmGradient extends SkwasmNativeShader implements ui.Gradient { ui.TileMode tileMode = ui.TileMode.clamp, Float32List? matrix4, }) => withStackScope((StackScope scope) { + assert(() { + validateColorStops(colors, colorStops); + return true; + }()); + final RawColorArray rawColors = scope.convertColorArrayToNative(colors); final Pointer rawStops = colorStops != null ? scope.convertDoublesToNative(colorStops) @@ -91,6 +101,11 @@ class SkwasmGradient extends SkwasmNativeShader implements ui.Gradient { ui.TileMode tileMode = ui.TileMode.clamp, Float32List? matrix4, }) => withStackScope((StackScope scope) { + assert(() { + validateColorStops(colors, colorStops); + return true; + }()); + final RawPointArray endPoints = scope.convertPointArrayToNative([focal, center]); final RawColorArray rawColors = scope.convertColorArrayToNative(colors); @@ -122,6 +137,11 @@ class SkwasmGradient extends SkwasmNativeShader implements ui.Gradient { required double endAngle, Float32List? matrix4, }) => withStackScope((StackScope scope) { + assert(() { + validateColorStops(colors, colorStops); + return true; + }()); + final RawColorArray rawColors = scope.convertColorArrayToNative(colors); final Pointer rawStops = colorStops != null ? scope.convertDoublesToNative(colorStops) diff --git a/lib/web_ui/test/ui/fallback_fonts_golden_test.dart b/lib/web_ui/test/ui/fallback_fonts_golden_test.dart index 4570bf2404817..621a9a3334df7 100644 --- a/lib/web_ui/test/ui/fallback_fonts_golden_test.dart +++ b/lib/web_ui/test/ui/fallback_fonts_golden_test.dart @@ -431,6 +431,26 @@ void testMain() { } } }); + + test('fallback fonts do not download when debugDisableFontFallbacks is set', () async { + debugDisableFontFallbacks = true; + + expect(renderer.fontCollection.fontFallbackManager!.globalFontFallbacks, ['Roboto']); + + // Creating this paragraph would cause us to start to download the + // fallback font if we didn't disable font fallbacks. + final ui.ParagraphBuilder pb = ui.ParagraphBuilder( + ui.ParagraphStyle(), + ); + pb.addText('Hello 😊'); + pb.build().layout(const ui.ParagraphConstraints(width: 1000)); + + await renderer.fontCollection.fontFallbackManager!.debugWhenIdle(); + + // Make sure we didn't download the fallback font. + expect(renderer.fontCollection.fontFallbackManager!.globalFontFallbacks, + isNot(contains('Noto Color Emoji'))); + }); }, // HTML renderer doesn't use the fallback font manager. skip: isHtml, diff --git a/lib/web_ui/test/ui/gradient_test.dart b/lib/web_ui/test/ui/gradient_test.dart index ae13bb05a9355..3ae0f886a0793 100644 --- a/lib/web_ui/test/ui/gradient_test.dart +++ b/lib/web_ui/test/ui/gradient_test.dart @@ -75,4 +75,45 @@ Future testMain() async { throwsA(const TypeMatcher()), ); }); + + test('gradients throw on invalid color stops', () { + expect( + () => Gradient.linear( + Offset.zero, + const Offset(1.0, 1.0), + const [ + Color(0x11111111), + Color(0x22222222), + Color(0x33333333), + ], + const [0.0, 1.0], + ), + throwsArgumentError + ); + expect( + () => Gradient.radial( + Offset.zero, + 5.0, + const [ + Color(0x11111111), + Color(0x22222222), + Color(0x33333333), + ], + const [0.0, 1.0], + ), + throwsArgumentError + ); + expect( + () => Gradient.sweep( + Offset.zero, + const [ + Color(0x11111111), + Color(0x22222222), + Color(0x33333333), + ], + const [0.0, 1.0], + ), + throwsArgumentError + ); + }); }