From 1db3c03b8d02b57fe099fe8e8cdcd93ea90b9197 Mon Sep 17 00:00:00 2001 From: Harry Terkelsen <1961493+harryterkelsen@users.noreply.github.com> Date: Wed, 13 Sep 2023 12:55:09 -0700 Subject: [PATCH 001/859] Revert "Revert "Use a single OffscreenCanvas for rendering in CanvasKit" (#45744)" This reverts commit 153edff425826aafc6ff9d5c89b66675ac2e0db8. --- ci/licenses_golden/licenses_flutter | 6 +- lib/web_ui/lib/src/engine.dart | 3 +- .../src/engine/canvaskit/canvaskit_api.dart | 10 + .../src/engine/canvaskit/embedded_views.dart | 170 ++++------ .../lib/src/engine/canvaskit/picture.dart | 4 +- .../lib/src/engine/canvaskit/rasterizer.dart | 46 ++- .../src/engine/canvaskit/render_canvas.dart | 113 +++++++ .../canvaskit/render_canvas_factory.dart | 142 ++++++++ .../lib/src/engine/canvaskit/surface.dart | 310 +++++++++--------- .../src/engine/canvaskit/surface_factory.dart | 167 ---------- lib/web_ui/lib/src/engine/configuration.dart | 13 +- lib/web_ui/lib/src/engine/dom.dart | 120 ++++--- .../test/canvaskit/canvas_golden_test.dart | 2 +- lib/web_ui/test/canvaskit/common.dart | 2 +- .../test/canvaskit/embedded_views_test.dart | 179 ++-------- .../canvaskit/render_canvas_factory_test.dart | 95 ++++++ .../test/canvaskit/render_canvas_test.dart | 62 ++++ .../test/canvaskit/surface_factory_test.dart | 103 ------ lib/web_ui/test/canvaskit/surface_test.dart | 91 ++--- lib/web_ui/test/engine/scene_view_test.dart | 36 +- lib/web_ui/test/ui/image_golden_test.dart | 2 +- 21 files changed, 820 insertions(+), 856 deletions(-) create mode 100644 lib/web_ui/lib/src/engine/canvaskit/render_canvas.dart create mode 100644 lib/web_ui/lib/src/engine/canvaskit/render_canvas_factory.dart delete mode 100644 lib/web_ui/lib/src/engine/canvaskit/surface_factory.dart create mode 100644 lib/web_ui/test/canvaskit/render_canvas_factory_test.dart create mode 100644 lib/web_ui/test/canvaskit/render_canvas_test.dart delete mode 100644 lib/web_ui/test/canvaskit/surface_factory_test.dart diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index f37b0279e3c8d..4ee3bf8b0109a 100644 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -1970,10 +1970,11 @@ ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/picture_recorder.da ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/platform_message.dart + ../../../flutter/LICENSE ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/raster_cache.dart + ../../../flutter/LICENSE ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/rasterizer.dart + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/render_canvas.dart + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/render_canvas_factory.dart + ../../../flutter/LICENSE ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/renderer.dart + ../../../flutter/LICENSE ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/shader.dart + ../../../flutter/LICENSE ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/surface.dart + ../../../flutter/LICENSE -ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/surface_factory.dart + ../../../flutter/LICENSE ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/text.dart + ../../../flutter/LICENSE ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/text_fragmenter.dart + ../../../flutter/LICENSE ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/util.dart + ../../../flutter/LICENSE @@ -4719,10 +4720,11 @@ FILE: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/picture_recorder.dart FILE: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/platform_message.dart FILE: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/raster_cache.dart FILE: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/rasterizer.dart +FILE: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/render_canvas.dart +FILE: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/render_canvas_factory.dart FILE: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/renderer.dart FILE: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/shader.dart FILE: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/surface.dart -FILE: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/surface_factory.dart FILE: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/text.dart FILE: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/text_fragmenter.dart FILE: ../../../flutter/lib/web_ui/lib/src/engine/canvaskit/util.dart diff --git a/lib/web_ui/lib/src/engine.dart b/lib/web_ui/lib/src/engine.dart index 016117334272e..8f72042ca42ec 100644 --- a/lib/web_ui/lib/src/engine.dart +++ b/lib/web_ui/lib/src/engine.dart @@ -43,10 +43,11 @@ export 'engine/canvaskit/picture.dart'; export 'engine/canvaskit/picture_recorder.dart'; export 'engine/canvaskit/raster_cache.dart'; export 'engine/canvaskit/rasterizer.dart'; +export 'engine/canvaskit/render_canvas.dart'; +export 'engine/canvaskit/render_canvas_factory.dart'; export 'engine/canvaskit/renderer.dart'; export 'engine/canvaskit/shader.dart'; export 'engine/canvaskit/surface.dart'; -export 'engine/canvaskit/surface_factory.dart'; export 'engine/canvaskit/text.dart'; export 'engine/canvaskit/text_fragmenter.dart'; export 'engine/canvaskit/util.dart'; diff --git a/lib/web_ui/lib/src/engine/canvaskit/canvaskit_api.dart b/lib/web_ui/lib/src/engine/canvaskit/canvaskit_api.dart index 22c94573fdf6f..492bbb1b50afb 100644 --- a/lib/web_ui/lib/src/engine/canvaskit/canvaskit_api.dart +++ b/lib/web_ui/lib/src/engine/canvaskit/canvaskit_api.dart @@ -161,6 +161,13 @@ extension CanvasKitExtension on CanvasKit { DomCanvasElement canvas, SkWebGLContextOptions options) => _GetWebGLContext(canvas, options).toDartDouble; + @JS('GetWebGLContext') + external JSNumber _GetOffscreenWebGLContext( + DomOffscreenCanvas canvas, SkWebGLContextOptions options); + double GetOffscreenWebGLContext( + DomOffscreenCanvas canvas, SkWebGLContextOptions options) => + _GetOffscreenWebGLContext(canvas, options).toDartDouble; + @JS('MakeGrContext') external SkGrContext _MakeGrContext(JSNumber glContext); SkGrContext MakeGrContext(double glContext) => @@ -199,6 +206,9 @@ extension CanvasKitExtension on CanvasKit { external SkSurface MakeSWCanvasSurface(DomCanvasElement canvas); + @JS('MakeSWCanvasSurface') + external SkSurface MakeOffscreenSWCanvasSurface(DomOffscreenCanvas canvas); + /// Creates an image from decoded pixels represented as a list of bytes. /// /// The pixel data must be encoded according to the image info in [info]. diff --git a/lib/web_ui/lib/src/engine/canvaskit/embedded_views.dart b/lib/web_ui/lib/src/engine/canvaskit/embedded_views.dart index 779ca9babb1bc..06c6f5aa6a3fa 100644 --- a/lib/web_ui/lib/src/engine/canvaskit/embedded_views.dart +++ b/lib/web_ui/lib/src/engine/canvaskit/embedded_views.dart @@ -5,7 +5,6 @@ import 'package:ui/ui.dart' as ui; import '../../engine.dart' show platformViewManager; -import '../configuration.dart'; import '../dom.dart'; import '../html/path_to_svg_clip.dart'; import '../platform_views/slots.dart'; @@ -18,9 +17,9 @@ import 'embedded_views_diff.dart'; import 'path.dart'; import 'picture.dart'; import 'picture_recorder.dart'; +import 'render_canvas.dart'; +import 'render_canvas_factory.dart'; import 'renderer.dart'; -import 'surface.dart'; -import 'surface_factory.dart'; /// This composites HTML views into the [ui.Scene]. class HtmlViewEmbedder { @@ -31,42 +30,6 @@ class HtmlViewEmbedder { DomElement get skiaSceneHost => CanvasKitRenderer.instance.sceneHost!; - /// Force the view embedder to disable overlays. - /// - /// This should never be used outside of tests. - static set debugDisableOverlays(bool disable) { - // Short circuit if the value is the same as what we already have. - if (disable == _debugOverlaysDisabled) { - return; - } - _debugOverlaysDisabled = disable; - final SurfaceFactory? instance = SurfaceFactory.debugUninitializedInstance; - if (instance != null) { - instance.releaseSurfaces(); - instance.removeSurfacesFromDom(); - instance.debugClear(); - } - if (disable) { - // If we are disabling overlays then get the current [SurfaceFactory] - // instance, clear it, and overwrite it with a new instance with only - // one surface for the base surface. - SurfaceFactory.debugSetInstance(SurfaceFactory(1)); - } else { - // If we are re-enabling overlays then replace the current - // [SurfaceFactory]instance with one with - // [configuration.canvasKitMaximumSurfaces] overlays. - SurfaceFactory.debugSetInstance( - SurfaceFactory(configuration.canvasKitMaximumSurfaces)); - } - } - - static bool _debugOverlaysDisabled = false; - - /// Whether or not we have issues a warning to the user about having too many - /// surfaces on screen at once. This is so we only warn once, instead of every - /// frame. - bool _warnedAboutTooManySurfaces = false; - /// The context for the current frame. EmbedderFrameContext _context = EmbedderFrameContext(); @@ -86,10 +49,12 @@ class HtmlViewEmbedder { /// * The number of clipping elements used last time the view was composited. final Map _viewClipChains = {}; - /// Surfaces used to draw on top of platform views, keyed by platform view ID. - /// - /// These surfaces are cached in the [OverlayCache] and reused. - final Map _overlays = {}; + /// The maximum number of overlays to create. Too many overlays can cause a + /// performance burden. + static const int maximumOverlays = 7; + + /// Canvases used to draw on top of platform views, keyed by platform view ID. + final Map _overlays = {}; /// The views that need to be recomposited into the scene on the next frame. final Set _viewsToRecomposite = {}; @@ -100,6 +65,9 @@ class HtmlViewEmbedder { /// The most recent composition order. final List _activeCompositionOrder = []; + /// The most recent overlay groups. + List _activeOverlayGroups = []; + /// The size of the frame, in physical pixels. ui.Size _frameSize = ui.window.physicalSize; @@ -124,20 +92,10 @@ class HtmlViewEmbedder { } void prerollCompositeEmbeddedView(int viewId, EmbeddedViewParams params) { - final bool hasAvailableOverlay = - _context.pictureRecordersCreatedDuringPreroll.length < - SurfaceFactory.instance.maximumOverlays; - if (!hasAvailableOverlay && !_warnedAboutTooManySurfaces) { - _warnedAboutTooManySurfaces = true; - printWarning('Flutter was unable to create enough overlay surfaces. ' - 'This is usually caused by too many platform views being ' - 'displayed at once. ' - 'You may experience incorrect rendering.'); - } // We need an overlay for each visible platform view. Invisible platform // views will be grouped with (at most) one visible platform view later. final bool needNewOverlay = platformViewManager.isVisible(viewId); - if (needNewOverlay && hasAvailableOverlay) { + if (needNewOverlay) { final CkPictureRecorder pictureRecorder = CkPictureRecorder(); pictureRecorder.beginRecording(ui.Offset.zero & _frameSize); _context.pictureRecordersCreatedDuringPreroll.add(pictureRecorder); @@ -409,26 +367,27 @@ class HtmlViewEmbedder { (_activeCompositionOrder.isEmpty || _compositionOrder.isEmpty) ? null : diffViewList(_activeCompositionOrder, _compositionOrder); - _updateOverlays(diffResult); + final List? overlayGroups = _updateOverlays(diffResult); + if (overlayGroups != null) { + _activeOverlayGroups = overlayGroups; + } assert( - _context.pictureRecorders.length == _overlays.length, - 'There should be the same number of picture recorders ' + _context.pictureRecorders.length >= _overlays.length, + 'There should be at least as many picture recorders ' '(${_context.pictureRecorders.length}) as overlays (${_overlays.length}).', ); - int pictureRecorderIndex = 0; - for (int i = 0; i < _compositionOrder.length; i++) { - final int viewId = _compositionOrder[i]; - if (_overlays[viewId] != null) { - final SurfaceFrame frame = _overlays[viewId]!.acquireFrame(_frameSize); - final CkCanvas canvas = frame.skiaCanvas; - final CkPicture ckPicture = - _context.pictureRecorders[pictureRecorderIndex].endRecording(); - canvas.clear(const ui.Color(0x00000000)); - canvas.drawPicture(ckPicture); + int pictureRecorderIndex = 0; + for (final OverlayGroup overlayGroup in _activeOverlayGroups) { + final RenderCanvas overlay = _overlays[overlayGroup.last]!; + final List pictures = []; + for (int i = 0; i < overlayGroup.visibleCount; i++) { + pictures.add( + _context.pictureRecorders[pictureRecorderIndex].endRecording()); pictureRecorderIndex++; - frame.submit(); } + CanvasKitRenderer.instance.rasterizer + .rasterizeToCanvas(overlay, pictures); } for (final CkPictureRecorder recorder in _context.pictureRecordersCreatedDuringPreroll) { @@ -481,7 +440,7 @@ class HtmlViewEmbedder { if (diffResult.addToBeginning) { final DomElement platformViewRoot = _viewClipChains[viewId]!.root; skiaSceneHost.insertBefore(platformViewRoot, elementToInsertBefore); - final Surface? overlay = _overlays[viewId]; + final RenderCanvas? overlay = _overlays[viewId]; if (overlay != null) { skiaSceneHost.insertBefore( overlay.htmlElement, elementToInsertBefore); @@ -489,7 +448,7 @@ class HtmlViewEmbedder { } else { final DomElement platformViewRoot = _viewClipChains[viewId]!.root; skiaSceneHost.append(platformViewRoot); - final Surface? overlay = _overlays[viewId]; + final RenderCanvas? overlay = _overlays[viewId]; if (overlay != null) { skiaSceneHost.append(overlay.htmlElement); } @@ -514,7 +473,7 @@ class HtmlViewEmbedder { } } } else { - SurfaceFactory.instance.removeSurfacesFromDom(); + RenderCanvasFactory.instance.removeSurfacesFromDom(); for (int i = 0; i < _compositionOrder.length; i++) { final int viewId = _compositionOrder[i]; @@ -532,7 +491,7 @@ class HtmlViewEmbedder { } final DomElement platformViewRoot = _viewClipChains[viewId]!.root; - final Surface? overlay = _overlays[viewId]; + final RenderCanvas? overlay = _overlays[viewId]; skiaSceneHost.append(platformViewRoot); if (overlay != null) { skiaSceneHost.append(overlay.htmlElement); @@ -568,8 +527,8 @@ class HtmlViewEmbedder { void _releaseOverlay(int viewId) { if (_overlays[viewId] != null) { - final Surface overlay = _overlays[viewId]!; - SurfaceFactory.instance.releaseSurface(overlay); + final RenderCanvas overlay = _overlays[viewId]!; + RenderCanvasFactory.instance.releaseCanvas(overlay); _overlays.remove(viewId); } } @@ -591,13 +550,13 @@ class HtmlViewEmbedder { // composition order of the current and previous frame, respectively. // // TODO(hterkelsen): Test this more thoroughly. - void _updateOverlays(ViewListDiffResult? diffResult) { + List? _updateOverlays(ViewListDiffResult? diffResult) { if (diffResult != null && diffResult.viewsToAdd.isEmpty && diffResult.viewsToRemove.isEmpty) { // The composition order has not changed, continue using the assigned // overlays. - return; + return null; } // Group platform views from their composition order. // Each group contains one visible view, and any number of invisible views @@ -606,17 +565,10 @@ class HtmlViewEmbedder { getOverlayGroups(_compositionOrder); final List viewsNeedingOverlays = overlayGroups.map((OverlayGroup group) => group.last).toList(); - // If there were more visible views than overlays, then the last group - // doesn't have an overlay. - if (viewsNeedingOverlays.length > SurfaceFactory.instance.maximumOverlays) { - assert(viewsNeedingOverlays.length == - SurfaceFactory.instance.maximumOverlays + 1); - viewsNeedingOverlays.removeLast(); - } if (diffResult == null) { // Everything is going to be explicitly recomposited anyway. Release all // the surfaces and assign an overlay to all the surfaces needing one. - SurfaceFactory.instance.releaseSurfaces(); + RenderCanvasFactory.instance.releaseCanvases(); _overlays.clear(); viewsNeedingOverlays.forEach(_initializeOverlay); } else { @@ -635,6 +587,7 @@ class HtmlViewEmbedder { .forEach(_initializeOverlay); } assert(_overlays.length == viewsNeedingOverlays.length); + return overlayGroups; } // Group the platform views into "overlay groups". These are sublists @@ -646,12 +599,8 @@ class HtmlViewEmbedder { // be assigned an overlay are grouped together and will be rendered on top of // the rest of the scene. List getOverlayGroups(List views) { - final int maxOverlays = SurfaceFactory.instance.maximumOverlays; - if (maxOverlays == 0) { - return const []; - } final List result = []; - OverlayGroup currentGroup = OverlayGroup([]); + OverlayGroup currentGroup = OverlayGroup(); for (int i = 0; i < views.length; i++) { final int view = views[i]; @@ -660,8 +609,10 @@ class HtmlViewEmbedder { currentGroup.add(view); } else { // `view` is visible. - if (!currentGroup.hasVisibleView) { - // If `view` is the first visible one of the group, add it. + if (!currentGroup.hasVisibleView || + result.length + 1 >= HtmlViewEmbedder.maximumOverlays) { + // If `view` is the first visible one of the group or we've reached + // the maximum number of overlays, add it. currentGroup.add(view, visible: true); } else { // There's already a visible `view` in `currentGroup`, so a new @@ -671,17 +622,8 @@ class HtmlViewEmbedder { // We only care about groups that have one visible view. result.add(currentGroup); } - // If there are overlays still available. - if (result.length < maxOverlays) { - // Create a new group, starting with `view`. - currentGroup = OverlayGroup([view], visible: true); - } else { - // Add the rest of the views to a final group that will be rendered - // on top of the scene. - currentGroup = OverlayGroup(views.sublist(i), visible: true); - // And break out of the loop! - break; - } + currentGroup = OverlayGroup(); + currentGroup.add(view, visible: true); } } } @@ -696,8 +638,7 @@ class HtmlViewEmbedder { assert(!_overlays.containsKey(viewId)); // Try reusing a cached overlay created for another platform view. - final Surface overlay = SurfaceFactory.instance.getSurface()!; - overlay.createOrUpdateSurface(_frameSize); + final RenderCanvas overlay = RenderCanvasFactory.instance.getCanvas(); _overlays[viewId] = overlay; } @@ -742,29 +683,30 @@ class HtmlViewEmbedder { /// Every overlay group is a list containing a visible view preceded or followed /// by zero or more invisible views. class OverlayGroup { - /// Constructor - OverlayGroup( - List viewGroup, { - bool visible = false, - }) : _group = viewGroup, - _containsVisibleView = visible; + OverlayGroup() : _group = []; // The internal list of ints. final List _group; - // A boolean flag to mark if any visible view has been added to the list. - bool _containsVisibleView; + + /// The number of visible views in this group. + int _visibleCount = 0; /// Add a [view] (maybe [visible]) to this group. void add(int view, {bool visible = false}) { _group.add(view); - _containsVisibleView |= visible; + if (visible) { + _visibleCount++; + } } /// Get the "last" view added to this group. int get last => _group.last; /// Returns true if this group contains any visible view. - bool get hasVisibleView => _group.isNotEmpty && _containsVisibleView; + bool get hasVisibleView => _visibleCount > 0; + + /// Returns the number of visible views in this overlay group. + int get visibleCount => _visibleCount; } /// Represents a Clip Chain (for a view). diff --git a/lib/web_ui/lib/src/engine/canvaskit/picture.dart b/lib/web_ui/lib/src/engine/canvaskit/picture.dart index 52b8229ec2b9f..668afeeb47434 100644 --- a/lib/web_ui/lib/src/engine/canvaskit/picture.dart +++ b/lib/web_ui/lib/src/engine/canvaskit/picture.dart @@ -11,8 +11,8 @@ import 'canvas.dart'; import 'canvaskit_api.dart'; import 'image.dart'; import 'native_memory.dart'; +import 'render_canvas_factory.dart'; import 'surface.dart'; -import 'surface_factory.dart'; /// Implements [ui.Picture] on top of [SkPicture]. class CkPicture implements ScenePicture { @@ -99,7 +99,7 @@ class CkPicture implements ScenePicture { CkImage toImageSync(int width, int height) { assert(debugCheckNotDisposed('Cannot convert picture to image.')); - final Surface surface = SurfaceFactory.instance.pictureToImageSurface; + final Surface surface = RenderCanvasFactory.instance.pictureToImageSurface; final CkSurface ckSurface = surface .createOrUpdateSurface(ui.Size(width.toDouble(), height.toDouble())); final CkCanvas ckCanvas = ckSurface.getCanvas(); diff --git a/lib/web_ui/lib/src/engine/canvaskit/rasterizer.dart b/lib/web_ui/lib/src/engine/canvaskit/rasterizer.dart index 67f01fff852f9..8d150ecae4144 100644 --- a/lib/web_ui/lib/src/engine/canvaskit/rasterizer.dart +++ b/lib/web_ui/lib/src/engine/canvaskit/rasterizer.dart @@ -3,22 +3,29 @@ // found in the LICENSE file. import 'package:meta/meta.dart'; +import 'package:ui/src/engine.dart'; import 'package:ui/ui.dart' as ui; -import '../frame_reference.dart'; -import 'canvas.dart'; -import 'embedded_views.dart'; -import 'layer_tree.dart'; -import 'surface.dart'; -import 'surface_factory.dart'; - /// A class that can rasterize [LayerTree]s into a given [Surface]. class Rasterizer { final CompositorContext context = CompositorContext(); final List _postFrameCallbacks = []; + /// This is an SkSurface backed by an OffScreenCanvas. This single Surface is + /// used to render to many RenderCanvases to produce the rendered scene. + final Surface _offscreenSurface = Surface(); + ui.Size _currentFrameSize = ui.Size.zero; + + /// Render the given [pictures] so it is displayed by the given [canvas]. + Future rasterizeToCanvas( + RenderCanvas canvas, List pictures) async { + await _offscreenSurface.rasterizeToCanvas( + _currentFrameSize, canvas, pictures); + } + + /// Sets the maximum size of the Skia resource cache, in bytes. void setSkiaResourceCacheMaxBytes(int bytes) => - SurfaceFactory.instance.baseSurface.setSkiaResourceCacheMaxBytes(bytes); + _offscreenSurface.setSkiaResourceCacheMaxBytes(bytes); /// Creates a new frame from this rasterizer's surface, draws the given /// [LayerTree] into it, and then submits the frame. @@ -29,17 +36,22 @@ class Rasterizer { return; } - final SurfaceFrame frame = - SurfaceFactory.instance.baseSurface.acquireFrame(layerTree.frameSize); - HtmlViewEmbedder.instance.frameSize = layerTree.frameSize; - final CkCanvas canvas = frame.skiaCanvas; - canvas.clear(const ui.Color(0x00000000)); - final Frame compositorFrame = - context.acquireFrame(canvas, HtmlViewEmbedder.instance); + _currentFrameSize = layerTree.frameSize; + _offscreenSurface.acquireFrame(_currentFrameSize); + HtmlViewEmbedder.instance.frameSize = _currentFrameSize; + final CkPictureRecorder pictureRecorder = CkPictureRecorder(); + pictureRecorder.beginRecording(ui.Offset.zero & _currentFrameSize); + pictureRecorder.recordingCanvas!.clear(const ui.Color(0x00000000)); + final Frame compositorFrame = context.acquireFrame( + pictureRecorder.recordingCanvas!, HtmlViewEmbedder.instance); compositorFrame.raster(layerTree, ignoreRasterCache: true); - SurfaceFactory.instance.baseSurface.addToScene(); - frame.submit(); + + CanvasKitRenderer.instance.sceneHost! + .prepend(RenderCanvasFactory.instance.baseCanvas.htmlElement); + rasterizeToCanvas(RenderCanvasFactory.instance.baseCanvas, + [pictureRecorder.endRecording()]); + HtmlViewEmbedder.instance.submitFrame(); } finally { _runPostFrameCallbacks(); diff --git a/lib/web_ui/lib/src/engine/canvaskit/render_canvas.dart b/lib/web_ui/lib/src/engine/canvaskit/render_canvas.dart new file mode 100644 index 0000000000000..7793cfbe6cbce --- /dev/null +++ b/lib/web_ui/lib/src/engine/canvaskit/render_canvas.dart @@ -0,0 +1,113 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'dart:js_interop'; + +import 'package:ui/ui.dart' as ui; + +import '../dom.dart'; +import '../window.dart'; + +/// A visible (on-screen) canvas that can display bitmaps produced by CanvasKit +/// in the (off-screen) SkSurface which is backed by an OffscreenCanvas. +/// +/// In a typical frame, the content will be rendered via CanvasKit in an +/// OffscreenCanvas, and then the contents will be transferred to the +/// RenderCanvas via `transferFromImageBitmap()`. +/// +/// If we need more RenderCanvases, for example in the case where there are +/// platform views and we need overlays to render the frame correctly, then +/// we will create multiple RenderCanvases, but crucially still only have +/// one OffscreenCanvas which transfers bitmaps to all of the RenderCanvases. +/// +/// To render into the OffscreenCanvas with CanvasKit we need to create a +/// WebGL context, which is not only expensive, but the browser has a limit +/// on the maximum amount of WebGL contexts which can be live at once. Using +/// a single OffscreenCanvas and multiple RenderCanvases allows us to only +/// create a single WebGL context. +class RenderCanvas { + RenderCanvas() { + canvasElement.setAttribute('aria-hidden', 'true'); + canvasElement.style.position = 'absolute'; + _updateLogicalHtmlCanvasSize(); + htmlElement.append(canvasElement); + } + + /// The root HTML element for this canvas. + /// + /// This element contains the canvas used to draw the UI. Unlike the canvas, + /// this element is permanent. It is never replaced or deleted, until this + /// canvas is disposed of via [dispose]. + /// + /// Conversely, the canvas that lives inside this element can be swapped, for + /// example, when the screen size changes, or when the WebGL context is lost + /// due to the browser tab becoming dormant. + final DomElement htmlElement = createDomElement('flt-canvas-container'); + + /// The underlying `` element used to display the pixels. + final DomCanvasElement canvasElement = createDomCanvasElement(); + int _pixelWidth = 0; + int _pixelHeight = 0; + + late final DomCanvasRenderingContextBitmapRenderer renderContext = + canvasElement.contextBitmapRenderer; + + double _currentDevicePixelRatio = -1; + + /// Sets the CSS size of the canvas so that canvas pixels are 1:1 with device + /// pixels. + /// + /// The logical size of the canvas is not based on the size of the window + /// but on the size of the canvas, which, due to `ceil()` above, may not be + /// the same as the window. We do not round/floor/ceil the logical size as + /// CSS pixels can contain more than one physical pixel and therefore to + /// match the size of the window precisely we use the most precise floating + /// point value we can get. + void _updateLogicalHtmlCanvasSize() { + final double logicalWidth = _pixelWidth / window.devicePixelRatio; + final double logicalHeight = _pixelHeight / window.devicePixelRatio; + final DomCSSStyleDeclaration style = canvasElement.style; + style.width = '${logicalWidth}px'; + style.height = '${logicalHeight}px'; + _currentDevicePixelRatio = window.devicePixelRatio; + } + + /// Render the given [bitmap] with this [RenderCanvas]. + /// + /// The canvas will be resized to accomodate the bitmap immediately before + /// rendering it. + void render(DomImageBitmap bitmap) { + _ensureSize(ui.Size(bitmap.width.toDartDouble, bitmap.height.toDartDouble)); + renderContext.transferFromImageBitmap(bitmap); + } + + /// Ensures that this canvas can draw a frame of the given [size]. + void _ensureSize(ui.Size size) { + // Check if the frame is the same size as before, and if so, we don't need + // to resize the canvas. + if (size.width.ceil() == _pixelWidth && + size.height.ceil() == _pixelHeight) { + // The existing canvas doesn't need to be resized (unless the device pixel + // ratio changed). + if (window.devicePixelRatio != _currentDevicePixelRatio) { + _updateLogicalHtmlCanvasSize(); + } + return; + } + + // If the canvas is too large or too small, resize it to the exact size of + // the frame. We cannot allow the canvas to be larger than the screen + // because then when we call `transferFromImageBitmap()` the bitmap will + // be scaled to cover the entire canvas. + _pixelWidth = size.width.ceil(); + _pixelHeight = size.height.ceil(); + canvasElement.width = _pixelWidth.toDouble(); + canvasElement.height = _pixelHeight.toDouble(); + _updateLogicalHtmlCanvasSize(); + } + + void dispose() { + htmlElement.remove(); + } +} diff --git a/lib/web_ui/lib/src/engine/canvaskit/render_canvas_factory.dart b/lib/web_ui/lib/src/engine/canvaskit/render_canvas_factory.dart new file mode 100644 index 0000000000000..593390972377c --- /dev/null +++ b/lib/web_ui/lib/src/engine/canvaskit/render_canvas_factory.dart @@ -0,0 +1,142 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +import 'package:meta/meta.dart'; + +import '../../engine.dart'; + +/// Caches canvases used to overlay platform views. +class RenderCanvasFactory { + RenderCanvasFactory() { + assert(() { + registerHotRestartListener(debugClear); + return true; + }()); + } + + /// The lazy-initialized singleton surface factory. + /// + /// [debugClear] causes this singleton to be reinitialized. + static RenderCanvasFactory get instance => + _instance ??= RenderCanvasFactory(); + + /// Returns the raw (potentially uninitialized) value of the singleton. + /// + /// Useful in tests for checking the lifecycle of this class. + static RenderCanvasFactory? get debugUninitializedInstance => _instance; + + // Override the current instance with a new one. + // + // This should only be used in tests. + static void debugSetInstance(RenderCanvasFactory newInstance) { + _instance = newInstance; + } + + static RenderCanvasFactory? _instance; + + /// The base canvas to paint on. This is the default canvas which will be + /// painted to. If there are no platform views, then this canvas will render + /// the entire scene. + final RenderCanvas baseCanvas = RenderCanvas(); + + /// A surface used specifically for `Picture.toImage` when software rendering + /// is supported. + late final Surface pictureToImageSurface = Surface(); + + /// Canvases created by this factory which are currently in use. + final List _liveCanvases = []; + + /// Canvases created by this factory which are no longer in use. These can be + /// reused. + final List _cache = []; + + /// The number of canvases which have been created by this factory. + int get _canvasCount => _liveCanvases.length + _cache.length + 1; + + /// The number of surfaces created by this factory. Used for testing. + @visibleForTesting + int get debugSurfaceCount => _canvasCount; + + /// Returns the number of cached surfaces. + /// + /// Useful in tests. + int get debugCacheSize => _cache.length; + + /// Gets an overlay canvas from the cache or creates a new one if there are + /// none in the cache. + RenderCanvas getCanvas() { + if (_cache.isNotEmpty) { + final RenderCanvas canvas = _cache.removeLast(); + _liveCanvases.add(canvas); + return canvas; + } else { + final RenderCanvas canvas = RenderCanvas(); + _liveCanvases.add(canvas); + return canvas; + } + } + + /// Releases all surfaces so they can be reused in the next frame. + /// + /// If a released surface is in the DOM, it is not removed. This allows the + /// engine to release the surfaces at the end of the frame so they are ready + /// to be used in the next frame, but still used for painting in the current + /// frame. + void releaseCanvases() { + _cache.addAll(_liveCanvases); + _liveCanvases.clear(); + } + + /// Removes all surfaces except the base surface from the DOM. + /// + /// This is called at the beginning of the frame to prepare for painting into + /// the new surfaces. + void removeSurfacesFromDom() { + _cache.forEach(_removeFromDom); + } + + // Removes [canvas] from the DOM. + void _removeFromDom(RenderCanvas canvas) { + canvas.htmlElement.remove(); + } + + /// Signals that a canvas is no longer being used. It can be reused. + void releaseCanvas(RenderCanvas canvas) { + assert(canvas != baseCanvas, 'Attempting to release the base canvas'); + assert( + _liveCanvases.contains(canvas), + 'Attempting to release a Canvas which ' + 'was not created by this factory'); + canvas.htmlElement.remove(); + _liveCanvases.remove(canvas); + _cache.add(canvas); + } + + /// Returns [true] if [canvas] is currently being used to paint content. + /// + /// The base canvas always counts as live. + /// + /// If a canvas is not live, then it must be in the cache and ready to be + /// reused. + bool isLive(RenderCanvas canvas) { + if (canvas == baseCanvas || _liveCanvases.contains(canvas)) { + return true; + } + assert(_cache.contains(canvas)); + return false; + } + + /// Dispose all canvases created by this factory. Used in tests. + void debugClear() { + for (final RenderCanvas canvas in _cache) { + canvas.dispose(); + } + for (final RenderCanvas canvas in _liveCanvases) { + canvas.dispose(); + } + baseCanvas.dispose(); + _liveCanvases.clear(); + _cache.clear(); + _instance = null; + } +} diff --git a/lib/web_ui/lib/src/engine/canvaskit/surface.dart b/lib/web_ui/lib/src/engine/canvaskit/surface.dart index 76719d68dcea8..db2277c65ac6b 100644 --- a/lib/web_ui/lib/src/engine/canvaskit/surface.dart +++ b/lib/web_ui/lib/src/engine/canvaskit/surface.dart @@ -11,11 +11,10 @@ import '../configuration.dart'; import '../dom.dart'; import '../platform_dispatcher.dart'; import '../util.dart'; -import '../window.dart'; import 'canvas.dart'; import 'canvaskit_api.dart'; -import 'renderer.dart'; -import 'surface_factory.dart'; +import 'picture.dart'; +import 'render_canvas.dart'; import 'util.dart'; // Only supported in profile/release mode. Allows Flutter to use MSAA but @@ -26,8 +25,7 @@ typedef SubmitCallback = bool Function(SurfaceFrame, CkCanvas); /// A frame which contains a canvas to be drawn into. class SurfaceFrame { - SurfaceFrame(this.skiaSurface, this.submitCallback) - : _submitted = false; + SurfaceFrame(this.skiaSurface, this.submitCallback) : _submitted = false; final CkSurface skiaSurface; final SubmitCallback submitCallback; @@ -82,19 +80,16 @@ class Surface { int? _glContext; int? _skiaCacheBytes; - /// The root HTML element for this surface. - /// - /// This element contains the canvas used to draw the UI. Unlike the canvas, - /// this element is permanent. It is never replaced or deleted, until this - /// surface is disposed of via [dispose]. - /// - /// Conversely, the canvas that lives inside this element can be swapped, for - /// example, when the screen size changes, or when the WebGL context is lost - /// due to the browser tab becoming dormant. - final DomElement htmlElement = createDomElement('flt-canvas-container'); + /// The underlying OffscreenCanvas element used for this surface. + DomOffscreenCanvas? _offscreenCanvas; + + /// Returns the underlying OffscreenCanvas. Should only be used in tests. + DomOffscreenCanvas? get debugOffscreenCanvas => _offscreenCanvas; + + /// The backing this Surface in the case that OffscreenCanvas isn't + /// supported. + DomCanvasElement? _canvasElement; - /// The underlying `` element used for this surface. - DomCanvasElement? htmlCanvas; int _pixelWidth = -1; int _pixelHeight = -1; int _sampleCount = -1; @@ -112,7 +107,33 @@ class Surface { } } - bool _addedToScene = false; + Future rasterizeToCanvas( + ui.Size frameSize, RenderCanvas canvas, List pictures) async { + final CkCanvas skCanvas = _surface!.getCanvas(); + skCanvas.clear(const ui.Color(0x00000000)); + pictures.forEach(skCanvas.drawPicture); + _surface!.flush(); + + DomImageBitmap bitmap; + if (Surface.offscreenCanvasSupported) { + bitmap = (await createSizedOffscreenImageBitmap( + _offscreenCanvas!, + 0, + _pixelHeight - frameSize.height.toInt(), + frameSize.width.toInt(), + frameSize.height.toInt(), + ))!; + } else { + bitmap = (await createSizedImageBitmap( + _canvasElement!, + 0, + _pixelHeight - frameSize.height.toInt(), + frameSize.width.toInt(), + frameSize.height.toInt(), + ))!; + } + canvas.render(bitmap); + } /// Acquire a frame of the given [size] containing a drawable canvas. /// @@ -129,21 +150,16 @@ class Surface { return SurfaceFrame(surface, submitCallback); } - void addToScene() { - if (!_addedToScene) { - CanvasKitRenderer.instance.sceneHost!.prepend(htmlElement); - } - _addedToScene = true; - } - ui.Size? _currentCanvasPhysicalSize; ui.Size? _currentSurfaceSize; - double _currentDevicePixelRatio = -1; /// This is only valid after the first frame or if [ensureSurface] has been /// called - bool get usingSoftwareBackend => _glContext == null || - _grContext == null || webGLVersion == -1 || configuration.canvasKitForceCpuOnly; + bool get usingSoftwareBackend => + _glContext == null || + _grContext == null || + webGLVersion == -1 || + configuration.canvasKitForceCpuOnly; /// Ensure that the initial surface exists and has a size of at least [size]. /// @@ -159,22 +175,10 @@ class Surface { } // TODO(jonahwilliams): this is somewhat wasteful. We should probably // eagerly setup this surface instead of delaying until the first frame? - // Or at least cache the estimated window size. + // Or at least cache the estimated window sizeThis is the first frame we have rendered with this canvas. createOrUpdateSurface(size); } - /// This method is not supported if software rendering is used. - CkSurface createRenderTargetSurface(ui.Size size) { - assert(!usingSoftwareBackend); - - final SkSurface skSurface = canvasKit.MakeRenderTarget( - _grContext!, - size.width.ceil(), - size.height.ceil(), - )!; - return CkSurface(skSurface, _glContext); - } - /// Creates a and SkSurface for the given [size]. CkSurface createOrUpdateSurface(ui.Size size) { if (size.isEmpty) { @@ -188,11 +192,6 @@ class Surface { if (previousSurfaceSize != null && size.width == previousSurfaceSize.width && size.height == previousSurfaceSize.height) { - // The existing surface is still reusable. - if (window.devicePixelRatio != _currentDevicePixelRatio) { - _updateLogicalHtmlCanvasSize(); - _translateCanvas(); - } return _surface!; } @@ -205,12 +204,16 @@ class Surface { final ui.Size newSize = size * 1.4; _surface?.dispose(); _surface = null; - htmlCanvas!.width = newSize.width; - htmlCanvas!.height = newSize.height; + if (Surface.offscreenCanvasSupported) { + _offscreenCanvas!.width = newSize.width; + _offscreenCanvas!.height = newSize.height; + } else { + _canvasElement!.width = newSize.width; + _canvasElement!.height = newSize.height; + } _currentCanvasPhysicalSize = newSize; _pixelWidth = newSize.width.ceil(); _pixelHeight = newSize.height.ceil(); - _updateLogicalHtmlCanvasSize(); } } @@ -218,57 +221,20 @@ class Surface { if (_forceNewContext || _currentCanvasPhysicalSize == null) { _surface?.dispose(); _surface = null; - _addedToScene = false; _grContext?.releaseResourcesAndAbandonContext(); _grContext?.delete(); _grContext = null; _createNewCanvas(size); _currentCanvasPhysicalSize = size; - } else if (window.devicePixelRatio != _currentDevicePixelRatio) { - _updateLogicalHtmlCanvasSize(); } - _currentDevicePixelRatio = window.devicePixelRatio; _currentSurfaceSize = size; - _translateCanvas(); _surface?.dispose(); _surface = _createNewSurface(size); return _surface!; } - /// Sets the CSS size of the canvas so that canvas pixels are 1:1 with device - /// pixels. - /// - /// The logical size of the canvas is not based on the size of the window - /// but on the size of the canvas, which, due to `ceil()` above, may not be - /// the same as the window. We do not round/floor/ceil the logical size as - /// CSS pixels can contain more than one physical pixel and therefore to - /// match the size of the window precisely we use the most precise floating - /// point value we can get. - void _updateLogicalHtmlCanvasSize() { - final double logicalWidth = _pixelWidth / window.devicePixelRatio; - final double logicalHeight = _pixelHeight / window.devicePixelRatio; - final DomCSSStyleDeclaration style = htmlCanvas!.style; - style.width = '${logicalWidth}px'; - style.height = '${logicalHeight}px'; - } - - /// Translate the canvas so the surface covers the visible portion of the - /// screen. - /// - /// The may be larger than the visible screen, but the SkSurface is - /// exactly the size of the visible screen. Unfortunately, the SkSurface is - /// drawn in the lower left corner of the , and without translation, - /// only the top left of the is visible. So we shift the canvas up so - /// the bottom left corner is visible. - void _translateCanvas() { - final int surfaceHeight = _currentSurfaceSize!.height.ceil(); - final double offset = - (_pixelHeight - surfaceHeight) / window.devicePixelRatio; - htmlCanvas!.style.transform = 'translate(0, -${offset}px)'; - } - JSVoid _contextRestoredListener(DomEvent event) { assert( _contextLost, @@ -282,16 +248,11 @@ class Surface { } JSVoid _contextLostListener(DomEvent event) { - assert(event.target == htmlCanvas, + assert(event.target == _offscreenCanvas || event.target == _canvasElement, 'Received a context lost event for a disposed canvas'); - final SurfaceFactory factory = SurfaceFactory.instance; _contextLost = true; - if (factory.isLive(this)) { - _forceNewContext = true; - event.preventDefault(); - } else { - dispose(); - } + _forceNewContext = true; + event.preventDefault(); } /// This function is expensive. @@ -299,18 +260,32 @@ class Surface { /// It's better to reuse canvas if possible. void _createNewCanvas(ui.Size physicalSize) { // Clear the container, if it's not empty. We're going to create a new . - if (this.htmlCanvas != null) { - this.htmlCanvas!.removeEventListener( - 'webglcontextrestored', - _cachedContextRestoredListener, - false, - ); - this.htmlCanvas!.removeEventListener( - 'webglcontextlost', - _cachedContextLostListener, - false, - ); - this.htmlCanvas!.remove(); + if (_offscreenCanvas != null) { + _offscreenCanvas!.removeEventListener( + 'webglcontextrestored', + _cachedContextRestoredListener, + false, + ); + _offscreenCanvas!.removeEventListener( + 'webglcontextlost', + _cachedContextLostListener, + false, + ); + _offscreenCanvas = null; + _cachedContextRestoredListener = null; + _cachedContextLostListener = null; + } else if (_canvasElement != null) { + _canvasElement!.removeEventListener( + 'webglcontextrestored', + _cachedContextRestoredListener, + false, + ); + _canvasElement!.removeEventListener( + 'webglcontextlost', + _cachedContextLostListener, + false, + ); + _canvasElement = null; _cachedContextRestoredListener = null; _cachedContextLostListener = null; } @@ -319,25 +294,22 @@ class Surface { // we ensure that the rendred picture covers the entire browser window. _pixelWidth = physicalSize.width.ceil(); _pixelHeight = physicalSize.height.ceil(); - final DomCanvasElement htmlCanvas = createDomCanvasElement( - width: _pixelWidth, - height: _pixelHeight, - ); - this.htmlCanvas = htmlCanvas; - - // The DOM elements used to render pictures are used purely to put pixels on - // the screen. They have no semantic information. If an assistive technology - // attempts to scan picture content it will look like garbage and confuse - // users. UI semantics are exported as a separate DOM tree rendered parallel - // to pictures. - // - // Why are layer and scene elements not hidden from ARIA? Because those - // elements may contain platform views, and platform views must be - // accessible. - htmlCanvas.setAttribute('aria-hidden', 'true'); - - htmlCanvas.style.position = 'absolute'; - _updateLogicalHtmlCanvasSize(); + DomEventTarget htmlCanvas; + if (Surface.offscreenCanvasSupported) { + final DomOffscreenCanvas offscreenCanvas = createDomOffscreenCanvas( + _pixelWidth, + _pixelHeight, + ); + htmlCanvas = offscreenCanvas; + _offscreenCanvas = offscreenCanvas; + _canvasElement = null; + } else { + final DomCanvasElement canvas = + createDomCanvasElement(width: _pixelWidth, height: _pixelHeight); + htmlCanvas = canvas; + _canvasElement = canvas; + _offscreenCanvas = null; + } // When the browser tab using WebGL goes dormant the browser and/or OS may // decide to clear GPU resources to let other tabs/programs use the GPU. @@ -345,7 +317,8 @@ class Surface { // notification. When we receive this notification we force a new context. // // See also: https://www.khronos.org/webgl/wiki/HandlingContextLost - _cachedContextRestoredListener = createDomEventListener(_contextRestoredListener); + _cachedContextRestoredListener = + createDomEventListener(_contextRestoredListener); _cachedContextLostListener = createDomEventListener(_contextLostListener); htmlCanvas.addEventListener( 'webglcontextlost', @@ -361,15 +334,24 @@ class Surface { _contextLost = false; if (webGLVersion != -1 && !configuration.canvasKitForceCpuOnly) { - final int glContext = canvasKit.GetWebGLContext( - htmlCanvas, - SkWebGLContextOptions( - // Default to no anti-aliasing. Paint commands can be explicitly - // anti-aliased by setting their `Paint` object's `antialias` property. - antialias: _kUsingMSAA ? 1 : 0, - majorVersion: webGLVersion.toDouble(), - ), - ).toInt(); + int glContext = 0; + final SkWebGLContextOptions options = SkWebGLContextOptions( + // Default to no anti-aliasing. Paint commands can be explicitly + // anti-aliased by setting their `Paint` object's `antialias` property. + antialias: _kUsingMSAA ? 1 : 0, + majorVersion: webGLVersion.toDouble(), + ); + if (Surface.offscreenCanvasSupported) { + glContext = canvasKit.GetOffscreenWebGLContext( + _offscreenCanvas!, + options, + ).toInt(); + } else { + glContext = canvasKit.GetWebGLContext( + _canvasElement!, + options, + ).toInt(); + } _glContext = glContext; @@ -387,40 +369,38 @@ class Surface { _syncCacheBytes(); } } - - htmlElement.append(htmlCanvas); } void _initWebglParams() { - final WebGLContext gl = htmlCanvas!.getGlContext(webGLVersion); + WebGLContext gl; + if (Surface.offscreenCanvasSupported) { + gl = _offscreenCanvas!.getGlContext(webGLVersion); + } else { + gl = _canvasElement!.getGlContext(webGLVersion); + } _sampleCount = gl.getParameter(gl.samples); _stencilBits = gl.getParameter(gl.stencilBits); } CkSurface _createNewSurface(ui.Size size) { - assert(htmlCanvas != null); + assert(_offscreenCanvas != null || _canvasElement != null); if (webGLVersion == -1) { - return _makeSoftwareCanvasSurface( - htmlCanvas!, 'WebGL support not detected'); + return _makeSoftwareCanvasSurface('WebGL support not detected'); } else if (configuration.canvasKitForceCpuOnly) { - return _makeSoftwareCanvasSurface( - htmlCanvas!, 'CPU rendering forced by application'); + return _makeSoftwareCanvasSurface('CPU rendering forced by application'); } else if (_glContext == 0) { - return _makeSoftwareCanvasSurface( - htmlCanvas!, 'Failed to initialize WebGL context'); + return _makeSoftwareCanvasSurface('Failed to initialize WebGL context'); } else { final SkSurface? skSurface = canvasKit.MakeOnScreenGLSurface( - _grContext!, - size.width.roundToDouble(), - size.height.roundToDouble(), - SkColorSpaceSRGB, - _sampleCount, - _stencilBits - ); + _grContext!, + size.width.roundToDouble(), + size.height.roundToDouble(), + SkColorSpaceSRGB, + _sampleCount, + _stencilBits); if (skSurface == null) { - return _makeSoftwareCanvasSurface( - htmlCanvas!, 'Failed to initialize WebGL surface'); + return _makeSoftwareCanvasSurface('Failed to initialize WebGL surface'); } return CkSurface(skSurface, _glContext); @@ -429,14 +409,20 @@ class Surface { static bool _didWarnAboutWebGlInitializationFailure = false; - CkSurface _makeSoftwareCanvasSurface( - DomCanvasElement htmlCanvas, String reason) { + CkSurface _makeSoftwareCanvasSurface(String reason) { if (!_didWarnAboutWebGlInitializationFailure) { printWarning('WARNING: Falling back to CPU-only rendering. $reason.'); _didWarnAboutWebGlInitializationFailure = true; } + + SkSurface surface; + if (Surface.offscreenCanvasSupported) { + surface = canvasKit.MakeOffscreenSWCanvasSurface(_offscreenCanvas!); + } else { + surface = canvasKit.MakeSWCanvasSurface(_canvasElement!); + } return CkSurface( - canvasKit.MakeSWCanvasSurface(htmlCanvas), + surface, null, ); } @@ -447,15 +433,19 @@ class Surface { } void dispose() { - htmlCanvas?.removeEventListener( + _offscreenCanvas?.removeEventListener( 'webglcontextlost', _cachedContextLostListener, false); - htmlCanvas?.removeEventListener( + _offscreenCanvas?.removeEventListener( 'webglcontextrestored', _cachedContextRestoredListener, false); _cachedContextLostListener = null; _cachedContextRestoredListener = null; - htmlElement.remove(); _surface?.dispose(); } + + /// Safari 15 doesn't support OffscreenCanvas at all. Safari 16 supports + /// OffscreenCanvas, but only with the context2d API, not WebGL. + static bool get offscreenCanvasSupported => + browserSupportsOffscreenCanvas && !isSafari; } /// A Dart wrapper around Skia's CkSurface. diff --git a/lib/web_ui/lib/src/engine/canvaskit/surface_factory.dart b/lib/web_ui/lib/src/engine/canvaskit/surface_factory.dart deleted file mode 100644 index ee5b001dd8e04..0000000000000 --- a/lib/web_ui/lib/src/engine/canvaskit/surface_factory.dart +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -import 'dart:math' as math show max; - -import 'package:meta/meta.dart'; - -import '../../engine.dart'; - -/// Caches surfaces used to overlay platform views. -class SurfaceFactory { - SurfaceFactory(int maximumSurfaces) - : maximumSurfaces = math.max(maximumSurfaces, 1) { - assert(() { - if (maximumSurfaces < 1) { - printWarning('Attempted to create a $SurfaceFactory with ' - '$maximumSurfaces maximum surfaces. At least 1 surface is required ' - 'for rendering.'); - } - registerHotRestartListener(debugClear); - return true; - }()); - } - - /// The lazy-initialized singleton surface factory. - /// - /// [debugClear] causes this singleton to be reinitialized. - static SurfaceFactory get instance => - _instance ??= SurfaceFactory(configuration.canvasKitMaximumSurfaces); - - /// Returns the raw (potentially uninitialized) value of the singleton. - /// - /// Useful in tests for checking the lifecycle of this class. - static SurfaceFactory? get debugUninitializedInstance => _instance; - - // Override the current instance with a new one. - // - // This should only be used in tests. - static void debugSetInstance(SurfaceFactory newInstance) { - _instance = newInstance; - } - - static SurfaceFactory? _instance; - - /// The base surface to paint on. This is the default surface which will be - /// painted to. If there are no platform views, then this surface will receive - /// all painting commands. - final Surface baseSurface = Surface(); - - /// The maximum number of surfaces which can be live at once. - final int maximumSurfaces; - - /// A surface used specifically for `Picture.toImage` when software rendering - /// is supported. - late final Surface pictureToImageSurface = Surface(); - - /// The maximum number of assignable overlays. - /// - /// This is just `maximumSurfaces - 1` (the maximum number of surfaces minus - /// the required base surface). - int get maximumOverlays => maximumSurfaces - 1; - - /// Surfaces created by this factory which are currently in use. - final List _liveSurfaces = []; - - /// Surfaces created by this factory which are no longer in use. These can be - /// reused. - final List _cache = []; - - /// The number of surfaces which have been created by this factory. - int get _surfaceCount => _liveSurfaces.length + _cache.length + 1; - - /// The number of available overlay surfaces. - /// - /// This does not include the base surface. - int get numAvailableOverlays => maximumOverlays - _liveSurfaces.length; - - /// The number of surfaces created by this factory. Used for testing. - @visibleForTesting - int get debugSurfaceCount => _surfaceCount; - - /// Returns the number of cached surfaces. - /// - /// Useful in tests. - int get debugCacheSize => _cache.length; - - /// Gets an overlay surface from the cache or creates a new one if it wouldn't - /// exceed the maximum. If there are no available surfaces, returns `null`. - Surface? getSurface() { - if (_cache.isNotEmpty) { - final Surface surface = _cache.removeLast(); - _liveSurfaces.add(surface); - return surface; - } else if (debugSurfaceCount < maximumSurfaces) { - final Surface surface = Surface(); - _liveSurfaces.add(surface); - return surface; - } else { - return null; - } - } - - /// Releases all surfaces so they can be reused in the next frame. - /// - /// If a released surface is in the DOM, it is not removed. This allows the - /// engine to release the surfaces at the end of the frame so they are ready - /// to be used in the next frame, but still used for painting in the current - /// frame. - void releaseSurfaces() { - _cache.addAll(_liveSurfaces); - _liveSurfaces.clear(); - } - - /// Removes all surfaces except the base surface from the DOM. - /// - /// This is called at the beginning of the frame to prepare for painting into - /// the new surfaces. - void removeSurfacesFromDom() { - _cache.forEach(_removeFromDom); - } - - // Removes [surface] from the DOM. - void _removeFromDom(Surface surface) { - surface.htmlElement.remove(); - } - - /// Signals that a surface is no longer being used. It can be reused. - void releaseSurface(Surface surface) { - assert(surface != baseSurface, 'Attempting to release the base surface'); - assert( - _liveSurfaces.contains(surface), - 'Attempting to release a Surface which ' - 'was not created by this factory'); - surface.htmlElement.remove(); - _liveSurfaces.remove(surface); - _cache.add(surface); - } - - /// Returns [true] if [surface] is currently being used to paint content. - /// - /// The base surface always counts as live. - /// - /// If a surface is not live, then it must be in the cache and ready to be - /// reused. - bool isLive(Surface surface) { - if (surface == baseSurface || - _liveSurfaces.contains(surface)) { - return true; - } - assert(_cache.contains(surface)); - return false; - } - - /// Dispose all surfaces created by this factory. Used in tests. - void debugClear() { - for (final Surface surface in _cache) { - surface.dispose(); - } - for (final Surface surface in _liveSurfaces) { - surface.dispose(); - } - baseSurface.dispose(); - _liveSurfaces.clear(); - _cache.clear(); - _instance = null; - } -} diff --git a/lib/web_ui/lib/src/engine/configuration.dart b/lib/web_ui/lib/src/engine/configuration.dart index 151e2c2bc83d7..1a5dff3bdd696 100644 --- a/lib/web_ui/lib/src/engine/configuration.dart +++ b/lib/web_ui/lib/src/engine/configuration.dart @@ -257,15 +257,10 @@ class FlutterConfiguration { 'FLUTTER_WEB_CANVASKIT_FORCE_CPU_ONLY', ); - /// The maximum number of overlay surfaces that the CanvasKit renderer will use. - /// - /// Overlay surfaces are extra WebGL `` elements used to paint on top - /// of platform views. Too many platform views can cause the browser to run - /// out of resources (memory, CPU, GPU) to handle the content efficiently. - /// The number of overlay surfaces is therefore limited. - /// - /// This value can be specified using either the `FLUTTER_WEB_MAXIMUM_SURFACES` - /// environment variable, or using the runtime configuration. + /// This is deprecated. The CanvasKit renderer will only ever create one + /// WebGL context, obviating the problem this configuration was meant to + /// solve originally. + @Deprecated('Setting canvasKitMaximumSurfaces has no effect') int get canvasKitMaximumSurfaces => _configuration?.canvasKitMaximumSurfaces?.toInt() ?? _defaultCanvasKitMaximumSurfaces; static const int _defaultCanvasKitMaximumSurfaces = int.fromEnvironment( diff --git a/lib/web_ui/lib/src/engine/dom.dart b/lib/web_ui/lib/src/engine/dom.dart index c5b4411a97b70..c90554b06efb4 100644 --- a/lib/web_ui/lib/src/engine/dom.dart +++ b/lib/web_ui/lib/src/engine/dom.dart @@ -198,6 +198,36 @@ external DomIntl get domIntl; @JS('Symbol') external DomSymbol get domSymbol; +@JS('createImageBitmap') +external JSPromise _createImageBitmap(JSAny source); +Future createImageBitmap(JSAny source) => + js_util.promiseToFuture(_createImageBitmap(source)); + +@JS('createImageBitmap') +external JSPromise _createSizedImageBitmap(DomCanvasElement canvas, JSNumber sx, + JSNumber sy, JSNumber sw, JSNumber sh); +Future createSizedImageBitmap( + DomCanvasElement canvas, int sx, int sy, int sw, int sh) => + js_util.promiseToFuture( + _createSizedImageBitmap(canvas, sx.toJS, sy.toJS, sw.toJS, sh.toJS)); + +@JS('createImageBitmap') +external JSPromise _createSizedImageBitmapFromImageData( + DomImageData imageData, JSNumber sx, JSNumber sy, JSNumber sw, JSNumber sh); +Future createSizedImageBitmapFromImageData( + DomImageData imageData, int sx, int sy, int sw, int sh) => + js_util.promiseToFuture( + _createSizedImageBitmapFromImageData( + imageData, sx.toJS, sy.toJS, sw.toJS, sh.toJS)); + +@JS('createImageBitmap') +external JSPromise _createSizedOffscreenImageBitmap(DomOffscreenCanvas canvas, + JSNumber sx, JSNumber sy, JSNumber sw, JSNumber sh); +Future createSizedOffscreenImageBitmap( + DomOffscreenCanvas canvas, int sx, int sy, int sw, int sh) => + js_util.promiseToFuture(_createSizedOffscreenImageBitmap( + canvas, sx.toJS, sy.toJS, sw.toJS, sh.toJS)); + @JS() @staticInterop class DomNavigator {} @@ -1404,7 +1434,7 @@ extension DomCanvasRenderingContextWebGlExtension class DomCanvasRenderingContextBitmapRenderer {} extension DomCanvasRenderingContextBitmapRendererExtension - on DomCanvasRenderingContextBitmapRenderer { + on DomCanvasRenderingContextBitmapRenderer { external void transferFromImageBitmap(DomImageBitmap bitmap); } @@ -1412,10 +1442,13 @@ extension DomCanvasRenderingContextBitmapRendererExtension @staticInterop class DomImageData { external factory DomImageData._(JSAny? data, JSNumber sw, JSNumber sh); + external factory DomImageData._empty(JSNumber sw, JSNumber sh); } -DomImageData createDomImageData(Object? data, int sw, int sh) => - DomImageData._(data?.toJSAnyShallow, sw.toJS, sh.toJS); +DomImageData createDomImageData(Object data, int sw, int sh) => + DomImageData._(data.toJSAnyShallow, sw.toJS, sh.toJS); +DomImageData createBlankDomImageData(int sw, int sh) => + DomImageData._empty(sw.toJS, sh.toJS); extension DomImageDataExtension on DomImageData { @JS('data') @@ -1433,33 +1466,6 @@ extension DomImageBitmapExtension on DomImageBitmap { external void close(); } - -@JS('createImageBitmap') -external JSPromise _createImageBitmap1( - JSAny source, -); -@JS('createImageBitmap') -external JSPromise _createImageBitmap2( - JSAny source, - JSNumber x, - JSNumber y, - JSNumber width, - JSNumber height, -); -JSPromise createImageBitmap(JSAny source, [({int x, int y, int width, int height})? bounds]) { - if (bounds != null) { - return _createImageBitmap2( - source, - bounds.x.toJS, - bounds.y.toJS, - bounds.width.toJS, - bounds.height.toJS - ); - } else { - return _createImageBitmap1(source); - } -} - @JS() @staticInterop class DomCanvasPattern {} @@ -1502,7 +1508,8 @@ MockHttpFetchResponseFactory? mockHttpFetchResponseFactory; /// [httpFetchText] instead. Future httpFetch(String url) async { if (mockHttpFetchResponseFactory != null) { - final MockHttpFetchResponse? response = await mockHttpFetchResponseFactory!(url); + final MockHttpFetchResponse? response = + await mockHttpFetchResponseFactory!(url); if (response != null) { return response; } @@ -1759,8 +1766,7 @@ class MockHttpFetchPayload implements HttpFetchPayload { while (currentIndex < totalLength) { final int chunkSize = math.min(_chunkSize, totalLength - currentIndex); final Uint8List chunk = Uint8List.sublistView( - _byteBuffer.asByteData(), currentIndex, currentIndex + chunkSize - ); + _byteBuffer.asByteData(), currentIndex, currentIndex + chunkSize); callback(chunk.toJS as T); currentIndex += chunkSize; } @@ -1770,10 +1776,12 @@ class MockHttpFetchPayload implements HttpFetchPayload { Future asByteBuffer() async => _byteBuffer; @override - Future json() async => throw AssertionError('json not supported by mock'); + Future json() async => + throw AssertionError('json not supported by mock'); @override - Future text() async => throw AssertionError('text not supported by mock'); + Future text() async => + throw AssertionError('text not supported by mock'); } /// Indicates a missing HTTP payload when one was expected, such as when @@ -2308,9 +2316,7 @@ DomBlob createDomBlob(List parts, [Map? options]) { return DomBlob(parts.toJSAnyShallow as JSArray); } else { return DomBlob.withOptions( - parts.toJSAnyShallow as JSArray, - options.toJSAnyDeep - ); + parts.toJSAnyShallow as JSArray, options.toJSAnyDeep); } } @@ -2842,6 +2848,13 @@ extension DomOffscreenCanvasExtension on DomOffscreenCanvas { } } + WebGLContext getGlContext(int majorVersion) { + if (majorVersion == 1) { + return getContext('webgl')! as WebGLContext; + } + return getContext('webgl2')! as WebGLContext; + } + @JS('convertToBlob') external JSPromise _convertToBlob1(); @JS('convertToBlob') @@ -2855,6 +2868,11 @@ extension DomOffscreenCanvasExtension on DomOffscreenCanvas { } return js_util.promiseToFuture(blob); } + + @JS('transferToImageBitmap') + external JSAny? _transferToImageBitmap(); + DomImageBitmap transferToImageBitmap() => + _transferToImageBitmap()! as DomImageBitmap; } DomOffscreenCanvas createDomOffscreenCanvas(int width, int height) => @@ -3423,8 +3441,8 @@ class DomSegments {} extension DomSegmentsExtension on DomSegments { DomIteratorWrapper iterator() { - final DomIterator segmentIterator = - js_util.callMethod(this, domSymbol.iterator, const []) as DomIterator; + final DomIterator segmentIterator = js_util + .callMethod(this, domSymbol.iterator, const []) as DomIterator; return DomIteratorWrapper(segmentIterator); } } @@ -3561,10 +3579,8 @@ external JSAny? get _finalizationRegistryConstructor; // dart2js that causes a crash in the Google3 build if we do use a factory // constructor. See b/284478971 DomFinalizationRegistry createDomFinalizationRegistry(JSFunction cleanup) => - js_util.callConstructor( - _finalizationRegistryConstructor!.toObjectShallow, - [cleanup] - ); + js_util.callConstructor( + _finalizationRegistryConstructor!.toObjectShallow, [cleanup]); extension DomFinalizationRegistryExtension on DomFinalizationRegistry { @JS('register') @@ -3573,11 +3589,12 @@ extension DomFinalizationRegistryExtension on DomFinalizationRegistry { @JS('register') external JSVoid _register2(JSAny target, JSAny value, JSAny token); void register(Object target, Object value, [Object? token]) { - if (token != null) { - _register2(target.toJSAnyShallow, value.toJSAnyShallow, token.toJSAnyShallow); - } else { - _register1(target.toJSAnyShallow, value.toJSAnyShallow); - } + if (token != null) { + _register2( + target.toJSAnyShallow, value.toJSAnyShallow, token.toJSAnyShallow); + } else { + _register1(target.toJSAnyShallow, value.toJSAnyShallow); + } } @JS('unregister') @@ -3588,3 +3605,8 @@ extension DomFinalizationRegistryExtension on DomFinalizationRegistry { /// Whether the current browser supports `FinalizationRegistry`. bool browserSupportsFinalizationRegistry = _finalizationRegistryConstructor != null; + +@JS('window.OffscreenCanvas') +external JSAny? get _offscreenCanvasConstructor; + +bool browserSupportsOffscreenCanvas = _offscreenCanvasConstructor != null; diff --git a/lib/web_ui/test/canvaskit/canvas_golden_test.dart b/lib/web_ui/test/canvaskit/canvas_golden_test.dart index 361e823b6e37e..46a436db87726 100644 --- a/lib/web_ui/test/canvaskit/canvas_golden_test.dart +++ b/lib/web_ui/test/canvaskit/canvas_golden_test.dart @@ -163,7 +163,7 @@ void testMain() { // Regression test for https://github.com/flutter/flutter/issues/121758 test('resources used in temporary surfaces for Image.toByteData can cross to rendering overlays', () async { final Rasterizer rasterizer = CanvasKitRenderer.instance.rasterizer; - SurfaceFactory.instance.debugClear(); + RenderCanvasFactory.instance.debugClear(); ui_web.platformViewRegistry.registerViewFactory( 'test-platform-view', diff --git a/lib/web_ui/test/canvaskit/common.dart b/lib/web_ui/test/canvaskit/common.dart index a8a2b04ce9469..bf0fd59602968 100644 --- a/lib/web_ui/test/canvaskit/common.dart +++ b/lib/web_ui/test/canvaskit/common.dart @@ -24,7 +24,7 @@ void setUpCanvasKitTest() { tearDown(() { HtmlViewEmbedder.instance.debugClear(); - SurfaceFactory.instance.debugClear(); + RenderCanvasFactory.instance.debugClear(); }); setUp(() => diff --git a/lib/web_ui/test/canvaskit/embedded_views_test.dart b/lib/web_ui/test/canvaskit/embedded_views_test.dart index 58b34661fcb4d..49db4e0dddc63 100644 --- a/lib/web_ui/test/canvaskit/embedded_views_test.dart +++ b/lib/web_ui/test/canvaskit/embedded_views_test.dart @@ -3,7 +3,6 @@ // found in the LICENSE file. import 'dart:async'; -import 'dart:js_interop'; import 'package:test/bootstrap/browser.dart'; import 'package:test/test.dart'; @@ -42,10 +41,10 @@ void testMain() { // The platform view is now split in two parts. The contents live // as a child of the glassPane, and the slot lives in the glassPane // shadow root. The slot is the one that has pointer events auto. - final DomElement contents = flutterViewEmbedder.glassPaneElement - .querySelector('#view-0')!; - final DomElement slot = flutterViewEmbedder.sceneElement! - .querySelector('slot')!; + final DomElement contents = + flutterViewEmbedder.glassPaneElement.querySelector('#view-0')!; + final DomElement slot = + flutterViewEmbedder.sceneElement!.querySelector('slot')!; final DomElement contentsHost = contents.parent!; final DomElement slotHost = slot.parent!; @@ -292,8 +291,7 @@ void testMain() { }); test('renders overlays on top of platform views', () async { - expect(SurfaceFactory.instance.debugCacheSize, 0); - expect(configuration.canvasKitMaximumSurfaces, 8); + expect(RenderCanvasFactory.instance.debugCacheSize, 0); final CkPicture testPicture = paintPicture(const ui.Rect.fromLTRB(0, 0, 10, 10), (CkCanvas canvas) { canvas.drawCircle(const ui.Offset(5, 5), 5, CkPaint()); @@ -339,8 +337,8 @@ void testMain() { _platformView, _overlay, _platformView, - _overlay, _platformView, + _overlay, ]); // Frame 2: @@ -372,7 +370,7 @@ void testMain() { ]); // Frame 4: - // Render: more platform views than max cache size. + // Render: more platform views than max overlay count. // Expect: main canvas, backup overlay, maximum overlays. await Future.delayed(Duration.zero); renderTestScene(viewCount: 16); @@ -391,7 +389,6 @@ void testMain() { _platformView, _overlay, _platformView, - _overlay, _platformView, _platformView, _platformView, @@ -401,6 +398,7 @@ void testMain() { _platformView, _platformView, _platformView, + _overlay, ]); // Frame 5: @@ -477,7 +475,6 @@ void testMain() { // Render: Views 1-10 // Expect: main canvas plus platform view overlays; empty cache. renderTestScene([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); - expect(SurfaceFactory.instance.numAvailableOverlays, 0); _expectSceneMatches(<_EmbeddedViewMarker>[ _overlay, _platformView, @@ -493,10 +490,10 @@ void testMain() { _platformView, _overlay, _platformView, - _overlay, _platformView, _platformView, _platformView, + _overlay, ]); // Frame 2: @@ -504,7 +501,6 @@ void testMain() { // Expect: main canvas plus platform view overlays; empty cache. await Future.delayed(Duration.zero); renderTestScene([2, 3, 4, 5, 6, 7, 8, 9, 10, 11]); - expect(SurfaceFactory.instance.numAvailableOverlays, 0); _expectSceneMatches(<_EmbeddedViewMarker>[ _overlay, _platformView, @@ -520,10 +516,10 @@ void testMain() { _platformView, _overlay, _platformView, - _overlay, _platformView, _platformView, _platformView, + _overlay, ]); // Frame 3: @@ -546,10 +542,10 @@ void testMain() { _platformView, _overlay, _platformView, - _overlay, _platformView, _platformView, _platformView, + _overlay, ]); // Frame 4: @@ -572,10 +568,10 @@ void testMain() { _platformView, _overlay, _platformView, - _overlay, _platformView, _platformView, _platformView, + _overlay, ]); // TODO(yjbanov): skipped due to https://github.com/flutter/flutter/issues/73867 @@ -599,8 +595,7 @@ void testMain() { ]); expect( - flutterViewEmbedder.glassPaneElement - .querySelector('flt-platform-view'), + flutterViewEmbedder.glassPaneElement.querySelector('flt-platform-view'), isNotNull, ); @@ -615,13 +610,14 @@ void testMain() { ]); expect( - flutterViewEmbedder.glassPaneElement - .querySelector('flt-platform-view'), + flutterViewEmbedder.glassPaneElement.querySelector('flt-platform-view'), isNull, ); }); - test('does not crash when resizing the window after textures have been registered', () async { + test( + 'does not crash when resizing the window after textures have been registered', + () async { ui_web.platformViewRegistry.registerViewFactory( 'test-platform-view', (int viewId) => createDomHTMLDivElement()..id = 'view-0', @@ -664,7 +660,7 @@ void testMain() { window.debugPhysicalSizeOverride = null; window.debugForceResize(); - // ImageDecoder is not supported in Safari or Firefox. + // ImageDecoder is not supported in Safari or Firefox. }, skip: isSafari || isFirefox); test('removed the DOM node of an unrendered platform view', () async { @@ -686,8 +682,7 @@ void testMain() { ]); expect( - flutterViewEmbedder.glassPaneElement - .querySelector('flt-platform-view'), + flutterViewEmbedder.glassPaneElement.querySelector('flt-platform-view'), isNotNull, ); @@ -744,8 +739,8 @@ void testMain() { rasterizer.draw(sb.build().layerTree); } - final DomNode skPathDefs = flutterViewEmbedder.sceneElement! - .querySelector('#sk_path_defs')!; + final DomNode skPathDefs = + flutterViewEmbedder.sceneElement!.querySelector('#sk_path_defs')!; expect(skPathDefs.childNodes, hasLength(0)); @@ -782,121 +777,6 @@ void testMain() { ]); }); - test('does not crash when overlays are disabled', () async { - final Rasterizer rasterizer = CanvasKitRenderer.instance.rasterizer; - HtmlViewEmbedder.debugDisableOverlays = true; - ui_web.platformViewRegistry.registerViewFactory( - 'test-platform-view', - (int viewId) => createDomHTMLDivElement()..id = 'view-0', - ); - await createPlatformView(0, 'test-platform-view'); - - final LayerSceneBuilder sb = LayerSceneBuilder(); - sb.pushOffset(0, 0); - sb.addPlatformView(0, width: 10, height: 10); - sb.pop(); - // The below line should not throw an error. - rasterizer.draw(sb.build().layerTree); - _expectSceneMatches(<_EmbeddedViewMarker>[ - _overlay, - _platformView, - ]); - HtmlViewEmbedder.debugDisableOverlays = false; - }); - - test('works correctly with max overlays == 2', () async { - final Rasterizer rasterizer = CanvasKitRenderer.instance.rasterizer; - debugOverrideJsConfiguration( - { - 'canvasKitMaximumSurfaces': 2, - }.jsify() as JsFlutterConfiguration? - ); - expect(configuration.canvasKitMaximumSurfaces, 2); - expect(configuration.canvasKitVariant, isNot(CanvasKitVariant.auto)); - - SurfaceFactory.instance.debugClear(); - - expect(SurfaceFactory.instance.maximumSurfaces, 2); - expect(SurfaceFactory.instance.maximumOverlays, 1); - - ui_web.platformViewRegistry.registerViewFactory( - 'test-platform-view', - (int viewId) => createDomHTMLDivElement()..id = 'view-0', - ); - await createPlatformView(0, 'test-platform-view'); - await createPlatformView(1, 'test-platform-view'); - - LayerSceneBuilder sb = LayerSceneBuilder(); - sb.pushOffset(0, 0); - sb.addPlatformView(0, width: 10, height: 10); - sb.pop(); - // The below line should not throw an error. - rasterizer.draw(sb.build().layerTree); - - _expectSceneMatches(<_EmbeddedViewMarker>[ - _overlay, - _platformView, - _overlay, - ]); - - sb = LayerSceneBuilder(); - sb.pushOffset(0, 0); - sb.addPlatformView(1, width: 10, height: 10); - sb.addPlatformView(0, width: 10, height: 10); - sb.pop(); - // The below line should not throw an error. - rasterizer.draw(sb.build().layerTree); - - _expectSceneMatches(<_EmbeddedViewMarker>[ - _overlay, - _platformView, - _overlay, - _platformView, - ]); - - // Reset configuration - debugOverrideJsConfiguration(null); - }); - - test( - 'correctly renders when overlays are disabled and a subset ' - 'of views is used', () async { - final Rasterizer rasterizer = CanvasKitRenderer.instance.rasterizer; - HtmlViewEmbedder.debugDisableOverlays = true; - ui_web.platformViewRegistry.registerViewFactory( - 'test-platform-view', - (int viewId) => createDomHTMLDivElement()..id = 'view-0', - ); - await createPlatformView(0, 'test-platform-view'); - await createPlatformView(1, 'test-platform-view'); - - LayerSceneBuilder sb = LayerSceneBuilder(); - sb.pushOffset(0, 0); - sb.addPlatformView(0, width: 10, height: 10); - sb.addPlatformView(1, width: 10, height: 10); - sb.pop(); - // The below line should not throw an error. - rasterizer.draw(sb.build().layerTree); - _expectSceneMatches(<_EmbeddedViewMarker>[ - _overlay, - _platformView, - _platformView, - ]); - - sb = LayerSceneBuilder(); - sb.pushOffset(0, 0); - sb.addPlatformView(1, width: 10, height: 10); - sb.pop(); - // The below line should not throw an error. - rasterizer.draw(sb.build().layerTree); - _expectSceneMatches(<_EmbeddedViewMarker>[ - _overlay, - _platformView, - ]); - - HtmlViewEmbedder.debugDisableOverlays = false; - }); - test('does not create overlays for invisible platform views', () async { final Rasterizer rasterizer = CanvasKitRenderer.instance.rasterizer; ui_web.platformViewRegistry.registerViewFactory( @@ -957,7 +837,9 @@ void testMain() { _overlay, _platformView, _overlay, - ], reason: 'Overlays created after each group containing a visible view.'); + ], + reason: + 'Overlays created after each group containing a visible view.'); sb = LayerSceneBuilder(); sb.pushOffset(0, 0); @@ -1059,7 +941,9 @@ void testMain() { _platformView, _platformView, _platformView, - ], reason: 'Many invisible views can be rendered on top of the base overlay.'); + ], + reason: + 'Many invisible views can be rendered on top of the base overlay.'); sb = LayerSceneBuilder(); sb.pushOffset(0, 0); @@ -1108,19 +992,22 @@ enum _EmbeddedViewMarker { _EmbeddedViewMarker get _overlay => _EmbeddedViewMarker.overlay; _EmbeddedViewMarker get _platformView => _EmbeddedViewMarker.platformView; -const Map _tagToViewMarker = { +const Map _tagToViewMarker = + { 'flt-canvas-container': _EmbeddedViewMarker.overlay, 'flt-platform-view-slot': _EmbeddedViewMarker.platformView, }; -void _expectSceneMatches(List<_EmbeddedViewMarker> expectedMarkers, { +void _expectSceneMatches( + List<_EmbeddedViewMarker> expectedMarkers, { String? reason, }) { // Convert the scene elements to its corresponding array of _EmbeddedViewMarker final List<_EmbeddedViewMarker> sceneElements = flutterViewEmbedder .sceneElement!.children .where((DomElement element) => element.tagName != 'svg') - .map((DomElement element) => _tagToViewMarker[element.tagName.toLowerCase()]!) + .map((DomElement element) => + _tagToViewMarker[element.tagName.toLowerCase()]!) .toList(); expect(sceneElements, expectedMarkers, reason: reason); diff --git a/lib/web_ui/test/canvaskit/render_canvas_factory_test.dart b/lib/web_ui/test/canvaskit/render_canvas_factory_test.dart new file mode 100644 index 0000000000000..70aa4e6073ffa --- /dev/null +++ b/lib/web_ui/test/canvaskit/render_canvas_factory_test.dart @@ -0,0 +1,95 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:test/bootstrap/browser.dart'; +import 'package:test/test.dart'; +import 'package:ui/src/engine.dart'; + +import 'common.dart'; + +const MethodCodec codec = StandardMethodCodec(); + +void main() { + internalBootstrapBrowserTest(() => testMain); +} + +void testMain() { + group('$RenderCanvasFactory', () { + setUpCanvasKitTest(); + + test('getCanvas', () { + final RenderCanvasFactory factory = RenderCanvasFactory(); + expect(factory.baseCanvas, isNotNull); + + expect(factory.debugSurfaceCount, equals(1)); + + // Get a canvas from the factory, it should be unique. + final RenderCanvas newCanvas = factory.getCanvas(); + expect(newCanvas, isNot(equals(factory.baseCanvas))); + + expect(factory.debugSurfaceCount, equals(2)); + + // Get another canvas from the factory. Now we are at maximum capacity. + final RenderCanvas anotherCanvas = factory.getCanvas(); + expect(anotherCanvas, isNot(equals(factory.baseCanvas))); + + expect(factory.debugSurfaceCount, equals(3)); + }); + + test('releaseCanvas', () { + final RenderCanvasFactory factory = RenderCanvasFactory(); + + // Create a new canvas and immediately release it. + final RenderCanvas canvas = factory.getCanvas(); + factory.releaseCanvas(canvas); + + // If we create a new canvas, it should be the same as the one we + // just created. + final RenderCanvas newCanvas = factory.getCanvas(); + expect(newCanvas, equals(canvas)); + }); + + test('isLive', () { + final RenderCanvasFactory factory = RenderCanvasFactory(); + + expect(factory.isLive(factory.baseCanvas), isTrue); + + final RenderCanvas canvas = factory.getCanvas(); + expect(factory.isLive(canvas), isTrue); + + factory.releaseCanvas(canvas); + expect(factory.isLive(canvas), isFalse); + }); + + test('hot restart', () { + void expectDisposed(RenderCanvas canvas) { + expect(canvas.canvasElement.isConnected, isFalse); + } + + final RenderCanvasFactory originalFactory = RenderCanvasFactory.instance; + expect(RenderCanvasFactory.debugUninitializedInstance, isNotNull); + + // Cause the surface and its canvas to be attached to the page + CanvasKitRenderer.instance.sceneHost! + .prepend(originalFactory.baseCanvas.htmlElement); + expect(originalFactory.baseCanvas.canvasElement.isConnected, isTrue); + + // Create a few overlay canvases + final List overlays = []; + for (int i = 0; i < 3; i++) { + final RenderCanvas canvas = originalFactory.getCanvas(); + CanvasKitRenderer.instance.sceneHost!.prepend(canvas.htmlElement); + overlays.add(canvas); + } + expect(originalFactory.debugSurfaceCount, 4); + + // Trigger hot restart clean-up logic and check that we indeed clean up. + debugEmulateHotRestart(); + expect(RenderCanvasFactory.debugUninitializedInstance, isNull); + expectDisposed(originalFactory.baseCanvas); + overlays.forEach(expectDisposed); + expect(originalFactory.debugSurfaceCount, 1); + }); + }); +} diff --git a/lib/web_ui/test/canvaskit/render_canvas_test.dart b/lib/web_ui/test/canvaskit/render_canvas_test.dart new file mode 100644 index 0000000000000..75a0cfba2897c --- /dev/null +++ b/lib/web_ui/test/canvaskit/render_canvas_test.dart @@ -0,0 +1,62 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:test/bootstrap/browser.dart'; +import 'package:test/test.dart'; +import 'package:ui/src/engine.dart'; + +import 'common.dart'; + +void main() { + internalBootstrapBrowserTest(() => testMain); +} + +void testMain() { + group('CanvasKit', () { + setUpCanvasKitTest(); + setUp(() async { + window.debugOverrideDevicePixelRatio(1.0); + }); + + Future newBitmap(int width, int height) async { + return (await createSizedImageBitmapFromImageData( + createBlankDomImageData(width, height), + 0, + 0, + width, + height, + ))!; + } + + // Regression test for https://github.com/flutter/flutter/issues/75286 + test('updates canvas logical size when device-pixel ratio changes', + () async { + final RenderCanvas canvas = RenderCanvas(); + canvas.render(await newBitmap(10, 16)); + + expect(canvas.canvasElement.width, 10); + expect(canvas.canvasElement.height, 16); + expect(canvas.canvasElement.style.width, '10px'); + expect(canvas.canvasElement.style.height, '16px'); + + // Increase device-pixel ratio: this makes CSS pixels bigger, so we need + // fewer of them to cover the browser window. + window.debugOverrideDevicePixelRatio(2.0); + canvas.render(await newBitmap(10, 16)); + expect(canvas.canvasElement.width, 10); + expect(canvas.canvasElement.height, 16); + expect(canvas.canvasElement.style.width, '5px'); + expect(canvas.canvasElement.style.height, '8px'); + + // Decrease device-pixel ratio: this makes CSS pixels smaller, so we need + // more of them to cover the browser window. + window.debugOverrideDevicePixelRatio(0.5); + canvas.render(await newBitmap(10, 16)); + expect(canvas.canvasElement.width, 10); + expect(canvas.canvasElement.height, 16); + expect(canvas.canvasElement.style.width, '20px'); + expect(canvas.canvasElement.style.height, '32px'); + }); + }); +} diff --git a/lib/web_ui/test/canvaskit/surface_factory_test.dart b/lib/web_ui/test/canvaskit/surface_factory_test.dart deleted file mode 100644 index 05db21472386c..0000000000000 --- a/lib/web_ui/test/canvaskit/surface_factory_test.dart +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import 'package:test/bootstrap/browser.dart'; -import 'package:test/test.dart'; -import 'package:ui/src/engine.dart'; -import 'package:ui/ui.dart' as ui; - -import 'common.dart'; - -const MethodCodec codec = StandardMethodCodec(); - -void main() { - internalBootstrapBrowserTest(() => testMain); -} - -void testMain() { - group('$SurfaceFactory', () { - setUpCanvasKitTest(); - - test('cannot be created with size less than 1', () { - expect(SurfaceFactory(-1).maximumSurfaces, 1); - expect(SurfaceFactory(0).maximumSurfaces, 1); - expect(SurfaceFactory(1).maximumSurfaces, 1); - expect(SurfaceFactory(2).maximumSurfaces, 2); - }); - - test('getSurface', () { - final SurfaceFactory factory = SurfaceFactory(3); - expect(factory.baseSurface, isNotNull); - - expect(factory.debugSurfaceCount, equals(1)); - - // Get a surface from the factory, it should be unique. - final Surface? newSurface = factory.getSurface(); - expect(newSurface, isNot(equals(factory.baseSurface))); - - expect(factory.debugSurfaceCount, equals(2)); - - // Get another surface from the factory. Now we are at maximum capacity. - final Surface? anotherSurface = factory.getSurface(); - expect(anotherSurface, isNot(equals(factory.baseSurface))); - - expect(factory.debugSurfaceCount, equals(3)); - }); - - test('releaseSurface', () { - final SurfaceFactory factory = SurfaceFactory(3); - - // Create a new surface and immediately release it. - final Surface? surface = factory.getSurface(); - factory.releaseSurface(surface!); - - // If we create a new surface, it should be the same as the one we - // just created. - final Surface? newSurface = factory.getSurface(); - expect(newSurface, equals(surface)); - }); - - test('isLive', () { - final SurfaceFactory factory = SurfaceFactory(3); - - expect(factory.isLive(factory.baseSurface), isTrue); - - final Surface? surface = factory.getSurface(); - expect(factory.isLive(surface!), isTrue); - - factory.releaseSurface(surface); - expect(factory.isLive(surface), isFalse); - }); - - test('hot restart', () { - void expectDisposed(Surface surface) { - expect(surface.htmlCanvas!.isConnected, isFalse); - } - - final SurfaceFactory originalFactory = SurfaceFactory.instance; - expect(SurfaceFactory.debugUninitializedInstance, isNotNull); - - // Cause the surface and its canvas to be attached to the page - originalFactory.baseSurface.acquireFrame(const ui.Size(10, 10)); - originalFactory.baseSurface.addToScene(); - expect(originalFactory.baseSurface.htmlCanvas!.isConnected, isTrue); - - // Create a few overlay surfaces - final List overlays = []; - for (int i = 0; i < 3; i++) { - overlays.add(originalFactory.getSurface()! - ..acquireFrame(const ui.Size(10, 10)) - ..addToScene()); - } - expect(originalFactory.debugSurfaceCount, 4); - - // Trigger hot restart clean-up logic and check that we indeed clean up. - debugEmulateHotRestart(); - expect(SurfaceFactory.debugUninitializedInstance, isNull); - expectDisposed(originalFactory.baseSurface); - overlays.forEach(expectDisposed); - expect(originalFactory.debugSurfaceCount, 1); - }); - }); -} diff --git a/lib/web_ui/test/canvaskit/surface_test.dart b/lib/web_ui/test/canvaskit/surface_test.dart index e31ca43bf8079..f01016db5ae16 100644 --- a/lib/web_ui/test/canvaskit/surface_test.dart +++ b/lib/web_ui/test/canvaskit/surface_test.dart @@ -23,17 +23,14 @@ void testMain() { }); test('Surface allocates canvases efficiently', () { - final Surface? surface = SurfaceFactory.instance.getSurface(); + final Surface surface = Surface(); final CkSurface originalSurface = - surface!.acquireFrame(const ui.Size(9, 19)).skiaSurface; - final DomCanvasElement original = surface.htmlCanvas!; + surface.acquireFrame(const ui.Size(9, 19)).skiaSurface; + final DomOffscreenCanvas original = surface.debugOffscreenCanvas!; // Expect exact requested dimensions. expect(original.width, 9); expect(original.height, 19); - expect(original.style.width, '9px'); - expect(original.style.height, '19px'); - expect(original.style.transform, _isTranslate('0', '0')); expect(originalSurface.width(), 9); expect(originalSurface.height(), 19); @@ -41,11 +38,8 @@ void testMain() { // Skia renders into the visible area. final CkSurface shrunkSurface = surface.acquireFrame(const ui.Size(5, 15)).skiaSurface; - final DomCanvasElement shrunk = surface.htmlCanvas!; + final DomOffscreenCanvas shrunk = surface.debugOffscreenCanvas!; expect(shrunk, same(original)); - expect(shrunk.style.width, '9px'); - expect(shrunk.style.height, '19px'); - expect(shrunk.style.transform, _isTranslate('0', '-4')); expect(shrunkSurface, isNot(same(originalSurface))); expect(shrunkSurface.width(), 5); expect(shrunkSurface.height(), 15); @@ -54,52 +48,42 @@ void testMain() { // by 40% to accommodate future increases. final CkSurface firstIncreaseSurface = surface.acquireFrame(const ui.Size(10, 20)).skiaSurface; - final DomCanvasElement firstIncrease = surface.htmlCanvas!; + final DomOffscreenCanvas firstIncrease = surface.debugOffscreenCanvas!; expect(firstIncrease, same(original)); expect(firstIncreaseSurface, isNot(same(shrunkSurface))); // Expect overallocated dimensions expect(firstIncrease.width, 14); expect(firstIncrease.height, 28); - expect(firstIncrease.style.width, '14px'); - expect(firstIncrease.style.height, '28px'); - expect(firstIncrease.style.transform, _isTranslate('0', '-8')); expect(firstIncreaseSurface.width(), 10); expect(firstIncreaseSurface.height(), 20); // Subsequent increases within 40% reuse the old canvas. final CkSurface secondIncreaseSurface = surface.acquireFrame(const ui.Size(11, 22)).skiaSurface; - final DomCanvasElement secondIncrease = surface.htmlCanvas!; + final DomOffscreenCanvas secondIncrease = surface.debugOffscreenCanvas!; expect(secondIncrease, same(firstIncrease)); - expect(secondIncrease.style.transform, _isTranslate('0', '-6')); expect(secondIncreaseSurface, isNot(same(firstIncreaseSurface))); expect(secondIncreaseSurface.width(), 11); expect(secondIncreaseSurface.height(), 22); // Increases beyond the 40% limit will cause a new allocation. final CkSurface hugeSurface = surface.acquireFrame(const ui.Size(20, 40)).skiaSurface; - final DomCanvasElement huge = surface.htmlCanvas!; + final DomOffscreenCanvas huge = surface.debugOffscreenCanvas!; expect(huge, same(secondIncrease)); expect(hugeSurface, isNot(same(secondIncreaseSurface))); // Also over-allocated expect(huge.width, 28); expect(huge.height, 56); - expect(huge.style.width, '28px'); - expect(huge.style.height, '56px'); - expect(huge.style.transform, _isTranslate('0', '-16')); expect(hugeSurface.width(), 20); expect(hugeSurface.height(), 40); // Shrink again. Reuse the last allocated surface. final CkSurface shrunkSurface2 = surface.acquireFrame(const ui.Size(5, 15)).skiaSurface; - final DomCanvasElement shrunk2 = surface.htmlCanvas!; + final DomOffscreenCanvas shrunk2 = surface.debugOffscreenCanvas!; expect(shrunk2, same(huge)); - expect(shrunk2.style.width, '28px'); - expect(shrunk2.style.height, '56px'); - expect(shrunk2.style.transform, _isTranslate('0', '-41')); expect(shrunkSurface2, isNot(same(hugeSurface))); expect(shrunkSurface2.width(), 5); expect(shrunkSurface2.height(), 15); @@ -109,11 +93,8 @@ void testMain() { window.debugOverrideDevicePixelRatio(2.0); final CkSurface dpr2Surface2 = surface.acquireFrame(const ui.Size(5, 15)).skiaSurface; - final DomCanvasElement dpr2Canvas = surface.htmlCanvas!; + final DomOffscreenCanvas dpr2Canvas = surface.debugOffscreenCanvas!; expect(dpr2Canvas, same(huge)); - expect(dpr2Canvas.style.width, '14px'); - expect(dpr2Canvas.style.height, '28px'); - expect(dpr2Canvas.style.transform, _isTranslate('0', '-20.5')); expect(dpr2Surface2, isNot(same(hugeSurface))); expect(dpr2Surface2.width(), 5); expect(dpr2Surface2.height(), 15); @@ -123,13 +104,13 @@ void testMain() { // which cannot be a different size from the canvas. // TODO(hterkelsen): See if we can give a custom size for software // surfaces. - }, skip: isFirefox); + }, skip: isFirefox || !Surface.offscreenCanvasSupported); test( 'Surface creates new context when WebGL context is restored', () async { - final Surface? surface = SurfaceFactory.instance.getSurface(); - expect(surface!.debugForceNewContext, isTrue); + final Surface surface = Surface(); + expect(surface.debugForceNewContext, isTrue); final CkSurface before = surface.acquireFrame(const ui.Size(9, 19)).skiaSurface; expect(surface.debugForceNewContext, isFalse); @@ -142,8 +123,7 @@ void testMain() { expect(afterAcquireFrame, same(before)); // Emulate WebGL context loss. - final DomCanvasElement canvas = - surface.htmlElement.children.single as DomCanvasElement; + final DomOffscreenCanvas canvas = surface.debugOffscreenCanvas!; final Object ctx = canvas.getContext('webgl2')!; final Object loseContextExtension = js_util.callMethod( ctx, @@ -172,7 +152,7 @@ void testMain() { expect(afterContextLost, isNot(same(before))); }, // Firefox can't create a WebGL2 context in headless mode. - skip: isFirefox, + skip: isFirefox || !Surface.offscreenCanvasSupported, ); // Regression test for https://github.com/flutter/flutter/issues/75286 @@ -183,9 +163,8 @@ void testMain() { expect(original.width(), 10); expect(original.height(), 16); - expect(surface.htmlCanvas!.style.width, '10px'); - expect(surface.htmlCanvas!.style.height, '16px'); - expect(surface.htmlCanvas!.style.transform, _isTranslate('0', '0')); + expect(surface.debugOffscreenCanvas!.width, 10); + expect(surface.debugOffscreenCanvas!.height, 16); // Increase device-pixel ratio: this makes CSS pixels bigger, so we need // fewer of them to cover the browser window. @@ -194,9 +173,8 @@ void testMain() { surface.acquireFrame(const ui.Size(10, 16)).skiaSurface; expect(highDpr.width(), 10); expect(highDpr.height(), 16); - expect(surface.htmlCanvas!.style.width, '5px'); - expect(surface.htmlCanvas!.style.height, '8px'); - expect(surface.htmlCanvas!.style.transform, _isTranslate('0', '0')); + expect(surface.debugOffscreenCanvas!.width, 10); + expect(surface.debugOffscreenCanvas!.height, 16); // Decrease device-pixel ratio: this makes CSS pixels smaller, so we need // more of them to cover the browser window. @@ -205,9 +183,8 @@ void testMain() { surface.acquireFrame(const ui.Size(10, 16)).skiaSurface; expect(lowDpr.width(), 10); expect(lowDpr.height(), 16); - expect(surface.htmlCanvas!.style.width, '20px'); - expect(surface.htmlCanvas!.style.height, '32px'); - expect(surface.htmlCanvas!.style.transform, _isTranslate('0', '0')); + expect(surface.debugOffscreenCanvas!.width, 10); + expect(surface.debugOffscreenCanvas!.height, 16); // See https://github.com/flutter/flutter/issues/77084#issuecomment-1120151172 window.debugOverrideDevicePixelRatio(2.0); @@ -215,28 +192,10 @@ void testMain() { surface.acquireFrame(const ui.Size(9.9, 15.9)).skiaSurface; expect(changeRatioAndSize.width(), 10); expect(changeRatioAndSize.height(), 16); - expect(surface.htmlCanvas!.style.width, '5px'); - expect(surface.htmlCanvas!.style.height, '8px'); - expect(surface.htmlCanvas!.style.transform, _isTranslate('0', '0')); - }); - }); -} - -/// Checks that the CSS 'transform' property is a translation in a cross-browser way. -/// -/// Takes strings directly to avoid issues with floating point or differences -/// in stringification of numeric values across JS and Wasm targets. -Matcher _isTranslate(String x, String y) { - // When the y coordinate is zero, Firefox omits it, e.g.: - // Chrome/Safari/Edge: translate(0px, 0px) - // Firefox: translate(0px) - final String fullFormat = 'translate(${x}px, ${y}px)'; - if (y != '0') { - return equals(fullFormat); - } else { - return anyOf( - fullFormat, // Non-Firefox browsers use this format. - 'translate(${x}px)', // Firefox omits y when it's zero. + expect(surface.debugOffscreenCanvas!.width, 10); + expect(surface.debugOffscreenCanvas!.height, 16); + }, + skip: !Surface.offscreenCanvasSupported, ); - } + }); } diff --git a/lib/web_ui/test/engine/scene_view_test.dart b/lib/web_ui/test/engine/scene_view_test.dart index 0b475d8842824..d054059c4b443 100644 --- a/lib/web_ui/test/engine/scene_view_test.dart +++ b/lib/web_ui/test/engine/scene_view_test.dart @@ -3,7 +3,6 @@ // found in the LICENSE file. import 'dart:async'; -import 'dart:js_interop'; import 'package:test/bootstrap/browser.dart'; import 'package:test/test.dart'; @@ -19,17 +18,18 @@ void main() { } class StubPictureRenderer implements PictureRenderer { - final DomCanvasElement scratchCanvasElement = createDomCanvasElement( - width: 500, height: 500 - ); + final DomCanvasElement scratchCanvasElement = + createDomCanvasElement(width: 500, height: 500); @override Future renderPicture(ScenePicture picture) async { final ui.Rect cullRect = picture.cullRect; - final DomImageBitmap bitmap = (await createImageBitmap( - scratchCanvasElement as JSAny, - (x: 0, y: 0, width: cullRect.width.toInt(), height: cullRect.height.toInt()) - ).toDart)! as DomImageBitmap; + final DomImageBitmap bitmap = (await createSizedImageBitmap( + scratchCanvasElement, + 0, + 0, + cullRect.width.toInt(), + cullRect.height.toInt()))!; return bitmap; } } @@ -58,9 +58,11 @@ void testMain() { final List children = sceneElement.children.toList(); expect(children.length, 1); final DomElement containerElement = children.first; - expect(containerElement.tagName, equalsIgnoringCase('flt-canvas-container')); + expect( + containerElement.tagName, equalsIgnoringCase('flt-canvas-container')); - final List containerChildren = containerElement.children.toList(); + final List containerChildren = + containerElement.children.toList(); expect(containerChildren.length, 1); final DomElement canvasElement = containerChildren.first; final DomCSSStyleDeclaration style = canvasElement.style; @@ -76,12 +78,11 @@ void testMain() { debugOverrideDevicePixelRatio(2.0); final PlatformView platformView = PlatformView( - 1, - const ui.Size(100, 120), - const PlatformViewStyling( - position: PlatformViewPosition.offset(ui.Offset(50, 80)), - ) - ); + 1, + const ui.Size(100, 120), + const PlatformViewStyling( + position: PlatformViewPosition.offset(ui.Offset(50, 80)), + )); final EngineRootLayer rootLayer = EngineRootLayer(); rootLayer.slices.add(PlatformViewSlice([platformView], null)); final EngineScene scene = EngineScene(rootLayer); @@ -91,7 +92,8 @@ void testMain() { final List children = sceneElement.children.toList(); expect(children.length, 1); final DomElement containerElement = children.first; - expect(containerElement.tagName, equalsIgnoringCase('flt-platform-view-slot')); + expect( + containerElement.tagName, equalsIgnoringCase('flt-platform-view-slot')); final DomCSSStyleDeclaration style = containerElement.style; expect(style.left, '25px'); diff --git a/lib/web_ui/test/ui/image_golden_test.dart b/lib/web_ui/test/ui/image_golden_test.dart index fccb86c8b2951..9894ccac310a9 100644 --- a/lib/web_ui/test/ui/image_golden_test.dart +++ b/lib/web_ui/test/ui/image_golden_test.dart @@ -318,7 +318,7 @@ Future testMain() async { image.src = url; await completer.future; - final DomImageBitmap bitmap = (await createImageBitmap(image as JSAny).toDart)! as DomImageBitmap; + final DomImageBitmap bitmap = (await createImageBitmap(image as JSAny))!; return renderer.createImageFromImageBitmap(bitmap); }); } From b9ce92ce21f34b03d82cbdc5bce637dd87b27753 Mon Sep 17 00:00:00 2001 From: yaakovschectman <109111084+yaakovschectman@users.noreply.github.com> Date: Wed, 13 Sep 2023 16:17:48 -0400 Subject: [PATCH 002/859] Use `start` instead of `extent` for Windows IME cursor position (#45667) When composing with the IME in a text edit, we should add the `start` of the composition range to the in-composition `cursor_pos` rather than its `extent`. When using `extent`, the cursor position would always be outside of the composition range, resulting in the linked bug. Add a test to check cursor position. https://github.com/flutter/flutter/issues/123749 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [x] I updated/added relevant documentation (doc comments with `///`). - [ ] I signed the [CLA]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat --- shell/platform/windows/text_input_plugin.cc | 2 +- .../windows/text_input_plugin_unittest.cc | 63 ++++++++++++++++++- 2 files changed, 63 insertions(+), 2 deletions(-) diff --git a/shell/platform/windows/text_input_plugin.cc b/shell/platform/windows/text_input_plugin.cc index 340092e3edb79..08c0007a4d083 100644 --- a/shell/platform/windows/text_input_plugin.cc +++ b/shell/platform/windows/text_input_plugin.cc @@ -196,7 +196,7 @@ void TextInputPlugin::ComposeChangeHook(const std::u16string& text, std::string text_before_change = active_model_->GetText(); TextRange composing_before_change = active_model_->composing_range(); active_model_->AddText(text); - cursor_pos += active_model_->composing_range().extent(); + cursor_pos += active_model_->composing_range().start(); active_model_->UpdateComposingText(text); active_model_->SetSelection(TextRange(cursor_pos, cursor_pos)); std::string text_after_change = active_model_->GetText(); diff --git a/shell/platform/windows/text_input_plugin_unittest.cc b/shell/platform/windows/text_input_plugin_unittest.cc index 7d4705096441d..a99e0149aa286 100644 --- a/shell/platform/windows/text_input_plugin_unittest.cc +++ b/shell/platform/windows/text_input_plugin_unittest.cc @@ -36,6 +36,8 @@ static constexpr char kSelectionAffinityKey[] = "selectionAffinity"; static constexpr char kSelectionIsDirectionalKey[] = "selectionIsDirectional"; static constexpr char kComposingBaseKey[] = "composingBase"; static constexpr char kComposingExtentKey[] = "composingExtent"; +static constexpr char kUpdateEditingStateMethod[] = + "TextInputClient.updateEditingState"; static std::unique_ptr> CreateResponse(bool handled) { auto response_doc = @@ -243,7 +245,7 @@ TEST(TextInputPluginTest, VerifyInputActionNewlineInsertNewLine) { // Editing state should have been updated. auto encoded_arguments = EncodedEditingState("\n", TextRange(1)); auto update_state_message = codec.EncodeMethodCall( - {"TextInputClient.updateEditingState", std::move(encoded_arguments)}); + {kUpdateEditingStateMethod, std::move(encoded_arguments)}); EXPECT_TRUE(std::equal(update_state_message->begin(), update_state_message->end(), @@ -366,6 +368,65 @@ TEST(TextInputPluginTest, TextEditingWorksWithDeltaModel) { // Passes if it did not crash } +// Regression test for https://github.com/flutter/flutter/issues/123749 +TEST(TextInputPluginTest, CompositionCursorPos) { + int selection_base = -1; + TestBinaryMessenger messenger([&](const std::string& channel, + const uint8_t* message, size_t size, + BinaryReply reply) { + auto method = JsonMethodCodec::GetInstance().DecodeMethodCall( + std::vector(message, message + size)); + if (method->method_name() == kUpdateEditingStateMethod) { + const auto& args = *method->arguments(); + const auto& editing_state = args[1]; + auto base = editing_state.FindMember(kSelectionBaseKey); + auto extent = editing_state.FindMember(kSelectionExtentKey); + ASSERT_NE(base, editing_state.MemberEnd()); + ASSERT_TRUE(base->value.IsInt()); + ASSERT_NE(extent, editing_state.MemberEnd()); + ASSERT_TRUE(extent->value.IsInt()); + selection_base = base->value.GetInt(); + EXPECT_EQ(extent->value.GetInt(), selection_base); + } + }); + MockTextInputPluginDelegate delegate; + + TextInputPlugin plugin(&messenger, &delegate); + + auto args = std::make_unique(rapidjson::kArrayType); + auto& allocator = args->GetAllocator(); + args->PushBack(123, allocator); // client_id + rapidjson::Value client_config(rapidjson::kObjectType); + args->PushBack(client_config, allocator); + auto encoded = JsonMethodCodec::GetInstance().EncodeMethodCall( + MethodCall(kSetClientMethod, std::move(args))); + EXPECT_TRUE(messenger.SimulateEngineMessage( + kChannelName, encoded->data(), encoded->size(), + [](const uint8_t* reply, size_t reply_size) {})); + + plugin.ComposeBeginHook(); + EXPECT_EQ(selection_base, 0); + plugin.ComposeChangeHook(u"abc", 3); + EXPECT_EQ(selection_base, 3); + + plugin.ComposeCommitHook(); + plugin.ComposeEndHook(); + EXPECT_EQ(selection_base, 3); + + plugin.ComposeBeginHook(); + plugin.ComposeChangeHook(u"1", 1); + EXPECT_EQ(selection_base, 4); + + plugin.ComposeChangeHook(u"12", 2); + EXPECT_EQ(selection_base, 5); + + plugin.ComposeChangeHook(u"12", 1); + EXPECT_EQ(selection_base, 4); + + plugin.ComposeChangeHook(u"12", 2); + EXPECT_EQ(selection_base, 5); +} + TEST(TextInputPluginTest, TransformCursorRect) { // A position of `EditableText`. double view_x = 100; From 1ecf827974e9af0c782798299d8e010fce06545a Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 13 Sep 2023 16:23:22 -0400 Subject: [PATCH 003/859] Roll Skia from e39cf360ea93 to b38989859b81 (4 revisions) (#45787) https://skia.googlesource.com/skia.git/+log/e39cf360ea93..b38989859b81 2023-09-13 johnstiles@google.com Fix GCC warning about missing function. 2023-09-13 johnstiles@google.com Fix redundant-move warning from GCC. 2023-09-13 egdaniel@google.com Add support for Vulkan 10x6 format. 2023-09-13 johnstiles@google.com Fix -Wclass-memaccess warning when bit-casting SkRects. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index b3193f8abbdc6..8f814d4028cc8 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'e39cf360ea93daeb8e0997908a44f8d298730ce8', + 'skia_revision': 'b38989859b81cba40dc7e83d99333dd51bef8c1b', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 6fb15209df5f1..5ecc4480c063d 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 8ef10e4ab0d396fd7a4dde6d2a3971dc +Signature: 5e75d16bc1041d3acb02a6c33a916dba ==================================================================================================== LIBRARY: etc1 From 84e08d76d2a9da57dc97bf681556b1185eaed10d Mon Sep 17 00:00:00 2001 From: godofredoc Date: Wed, 13 Sep 2023 13:31:08 -0700 Subject: [PATCH 004/859] Update dependabot.yml (#45788) Remove pubspec.yaml portion of directory. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- .github/dependabot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 5010e1b1b248a..9688ddae25af1 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -16,7 +16,7 @@ updates: - dependency-name: "github/codeql-action" update-types: ["version-update:semver-minor"] - package-ecosystem: "pub" - directory: "/lib/web_ui/pubspec.yaml" + directory: "/lib/web_ui" schedule: interval: "daily" labels: From b824af6ebcc3ef17c9c40d63d7af2dbf08133894 Mon Sep 17 00:00:00 2001 From: Mouad Debbar Date: Wed, 13 Sep 2023 17:13:05 -0400 Subject: [PATCH 005/859] [web] Use DOM to render paragraphs with letter spacing (#45651) <**_Only applies to the HTML renderer_**> When a paragraph has letter spacing that's greater than 0, we attempt to render each character individually on the canvas, while adding extra gaps between the characters (because the browser's canvas API doesn't support letter spacing). This works well-ish in English but causes issues with international text. It also makes text rendering very slow. With this PR, the idea is to force all paragraphs with letter spacing to be rendered to a DOM element. Fixes https://github.com/flutter/flutter/issues/51234 Fixes https://github.com/flutter/flutter/issues/71220 --- .../lib/src/engine/text/canvas_paragraph.dart | 6 +++++ .../lib/src/engine/text/paint_service.dart | 19 +--------------- .../html/paragraph/general_golden_test.dart | 22 +++++++++++++++++++ 3 files changed, 29 insertions(+), 18 deletions(-) diff --git a/lib/web_ui/lib/src/engine/text/canvas_paragraph.dart b/lib/web_ui/lib/src/engine/text/canvas_paragraph.dart index fe3874785c607..f527d576bc41b 100644 --- a/lib/web_ui/lib/src/engine/text/canvas_paragraph.dart +++ b/lib/web_ui/lib/src/engine/text/canvas_paragraph.dart @@ -648,6 +648,12 @@ class CanvasParagraphBuilder implements ui.ParagraphBuilder { return; } + final double? letterSpacing = style.letterSpacing; + if (letterSpacing != null && letterSpacing != 0.0) { + _canDrawOnCanvas = false; + return; + } + final ui.TextDecoration? decoration = style.decoration; if (decoration != null && decoration != ui.TextDecoration.none) { _canDrawOnCanvas = false; diff --git a/lib/web_ui/lib/src/engine/text/paint_service.dart b/lib/web_ui/lib/src/engine/text/paint_service.dart index 8b2084cca6f8f..7c1de48489c73 100644 --- a/lib/web_ui/lib/src/engine/text/paint_service.dart +++ b/lib/web_ui/lib/src/engine/text/paint_service.dart @@ -4,7 +4,6 @@ import 'package:ui/ui.dart' as ui; -import '../dom.dart'; import '../html/bitmap_canvas.dart'; import '../html/painting.dart'; import 'canvas_paragraph.dart'; @@ -78,23 +77,7 @@ class TextPaintService { final EngineTextStyle style = fragment.style; final String text = fragment.getText(paragraph); - final double? letterSpacing = style.letterSpacing; - if (letterSpacing == null || letterSpacing == 0.0) { - canvas.drawText(text, x, y, - style: style.foreground?.style, shadows: style.shadows); - } else { - // TODO(mdebbar): Implement letter-spacing on canvas more efficiently: - // https://github.com/flutter/flutter/issues/51234 - double charX = x; - final int len = text.length; - for (int i = 0; i < len; i++) { - final String char = text[i]; - canvas.drawText(char, charX.roundToDouble(), y, - style: style.foreground?.style, - shadows: style.shadows); - charX += letterSpacing + canvas.measureText(char).width!; - } - } + canvas.drawText(text, x, y, style: style.foreground?.style, shadows: style.shadows); canvas.tearDownPaint(); } diff --git a/lib/web_ui/test/html/paragraph/general_golden_test.dart b/lib/web_ui/test/html/paragraph/general_golden_test.dart index 34325eb7b7ab1..4c8b5e153a06b 100644 --- a/lib/web_ui/test/html/paragraph/general_golden_test.dart +++ b/lib/web_ui/test/html/paragraph/general_golden_test.dart @@ -337,6 +337,28 @@ Future testMain() async { return takeScreenshot(canvas, bounds, 'canvas_paragraph_letter_spacing'); }); + test('letter-spacing Thai', () { + final BitmapCanvas canvas = BitmapCanvas(bounds, RenderStrategy()); + + const String yes = '\u0e43\u0e0a\u0e48'; + const String no = '\u0e44\u0e21\u0e48'; + + final CanvasParagraph paragraph = rich( + EngineParagraphStyle(fontFamily: 'Roboto', fontSize: 36), + (CanvasParagraphBuilder builder) { + builder.pushStyle(EngineTextStyle.only(color: blue)); + builder.addText('$yes $no '); + builder.pushStyle(EngineTextStyle.only(color: green, letterSpacing: 1)); + builder.addText('$yes $no '); + builder.pushStyle(EngineTextStyle.only(color: red, letterSpacing: 3)); + builder.addText('$yes $no'); + }, + )..layout(constrain(double.infinity)); + canvas.drawParagraph(paragraph, const Offset(20, 20)); + + return takeScreenshot(canvas, bounds, 'canvas_paragraph_letter_spacing_thai'); + }); + test('draws text decorations', () { final BitmapCanvas canvas = BitmapCanvas(bounds, RenderStrategy()); final List decorationStyles = [ From 3607008a854cbdd85d67e6e2a43d580bb6f824a0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Sep 2023 21:14:37 +0000 Subject: [PATCH 006/859] Bump archive from 3.1.2 to 3.3.9 in /lib/web_ui (#45795) Bumps [archive](https://github.com/brendan-duncan/archive) from 3.1.2 to 3.3.9.
Changelog

Sourced from archive's changelog.

3.3.9 - September 10, 2023

  • Fix for extractFileToDisk causing corrupt files by closing a file stream before it finished writing.

3.3.8 - September 02, 2023

3.3.7 - April 01, 2023

  • Add Zip AES-256 decryption
  • Fix symlink encoding for tar files

3.3.6 - January 27, 2023

  • Fix errors decoding XZ files.

3.3.5 - November 22, 2022

  • Fix file content when decoding zips

3.3.4 - November 11, 2022

  • Fix analysis errors.

3.3.3 - November 11, 2022

  • Support symlinks in ZIP archives
  • Fix ZIP decryption for ZipCrypto format

3.3.2 - October 16, 2022

  • Fix for UTF-8 file name caused problem on Windows.

3.3.1 - July 19, 2022

  • Fix for Inflate crashing on some compressed files.

3.3.0 - March 25, 2022

  • IO encoders (ZipFileEncoder, TarFileEncoder), will now include directories and empty directories.
  • Fix for ZipEncoder file lastModTime.
  • Fix for ArchiveFile.string.
  • Add PAX format to tar decoder.
  • Make more file operations async.

... (truncated)

Commits
  • 53e1773 Update to 3.3.9
  • 2912496 Fix analyzer error
  • 674522a Make sure input file isn't closed until after the archive has been extracted ...
  • bbd1b6d Update CHANGELOG.md
  • 21fe8e6 Update pubspec sdk version to <4.0.0
  • 01110f0 Update to 3.3.8
  • 0d17b27 Use central directory filename instead of local file name when extracting zip...
  • 6de4923 improve symlink validation check
  • edb0d48 don't create symlinks to files outside of the extracted path
  • 85ac8df Merge pull request #272 from Mastbau-FN/main
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=archive&package-manager=pub&previous-version=3.1.2&new-version=3.3.9)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- lib/web_ui/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/web_ui/pubspec.yaml b/lib/web_ui/pubspec.yaml index b15d7862b331c..fc013d0dfa314 100644 --- a/lib/web_ui/pubspec.yaml +++ b/lib/web_ui/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: path: ../../third_party/web_test_fonts dev_dependencies: - archive: 3.1.2 + archive: 3.3.9 args: any async: any convert: any From 55b8ca8da3c444adbb00d40d7340e82cf0a22aea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Sep 2023 21:14:39 +0000 Subject: [PATCH 007/859] Bump http from 0.13.5 to 1.1.0 in /lib/web_ui (#45791) Bumps [http](https://github.com/dart-lang/http/tree/master/pkgs) from 0.13.5 to 1.1.0.
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=http&package-manager=pub&previous-version=0.13.5&new-version=1.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- lib/web_ui/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/web_ui/pubspec.yaml b/lib/web_ui/pubspec.yaml index fc013d0dfa314..27419693bd124 100644 --- a/lib/web_ui/pubspec.yaml +++ b/lib/web_ui/pubspec.yaml @@ -24,7 +24,7 @@ dev_dependencies: convert: any crypto: any html: 0.15.0 - http: 0.13.5 + http: 1.1.0 http_multi_server: any image: 3.0.1 matcher: 0.12.14 From 3e1fc6a47882a25195fb6216cd8316932a99848e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Sep 2023 21:24:05 +0000 Subject: [PATCH 008/859] Bump quiver from 3.0.0 to 3.2.1 in /lib/web_ui (#45792) Bumps [quiver](https://github.com/google/quiver-dart) from 3.0.0 to 3.2.1.
Changelog

Sourced from quiver's changelog.

3.2.1 - 2022-12-20

  • Un-deprecate Optional. Causing breaks with hints internally at Google. Need to remove all usages before we try to land again.

3.2.0 - 2022-12-20 (Retracted)

  • Deprecate Optional. With the introduction of non-null by default in Dart SDK 2.12, existing users should migrate to non-nullable types. This type will be removed in Quiver 4.0.0.
  • Make TreeIterator not implement deprecated BidirectionalIterator. The movePrevious method still exists on TreeIterator.
  • Require Dart 2.17

3.1.0 - 2022-05-03

  • Fix: Make Cache.get ifAbsent parameter nullable. The parameter was always optional; this just corrects the type.
  • Fix: Remove documentation links to the (previously removed) mirrors library.

3.0.1+2 - 2022-03-09

  • Remove broken references to the defunct mirrors library.

3.0.1+1 - 2021-10-14

  • Add documentation to Optional suggesting that adding new uses be avoided and existing uses should be migrated to nullable types in codebases where non-null by default has been enabled.

3.0.1 - 2021-04-06

  • Fix: Eliminate null check error on removal of root node of AVLTree.
  • Fix: Eliminate null check in partition internal iterator current getter.
  • Minor documentation typo corrections.
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=quiver&package-manager=pub&previous-version=3.0.0&new-version=3.2.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- lib/web_ui/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/web_ui/pubspec.yaml b/lib/web_ui/pubspec.yaml index 27419693bd124..e0cd447cde5d6 100644 --- a/lib/web_ui/pubspec.yaml +++ b/lib/web_ui/pubspec.yaml @@ -31,7 +31,7 @@ dev_dependencies: package_config: any path: 1.8.0 pool: any - quiver: 3.0.0 + quiver: 3.2.1 shelf: any shelf_packages_handler: any shelf_static: any From de27fd2c94cec4ae80c8d3061a1cb9405a0232e2 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 13 Sep 2023 17:26:05 -0400 Subject: [PATCH 009/859] Roll Skia from b38989859b81 to a30fbf83f2e9 (3 revisions) (#45796) https://skia.googlesource.com/skia.git/+log/b38989859b81..a30fbf83f2e9 2023-09-13 johnstiles@google.com Fix -Wignored-qualifiers when building for GCC. 2023-09-13 johnstiles@google.com Fix GCC warnings about memsetting over a non-trivial struct. 2023-09-13 kjlubick@google.com Find and replace GrMipmapped with skgpu::Mipmapped If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 8f814d4028cc8..7579c60a5664b 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'b38989859b81cba40dc7e83d99333dd51bef8c1b', + 'skia_revision': 'a30fbf83f2e9f87ee3794b02076e6986de94ebda', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 5ecc4480c063d..6423e3736f102 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 5e75d16bc1041d3acb02a6c33a916dba +Signature: d3e2739d365684277963c40b3193b373 ==================================================================================================== LIBRARY: etc1 From 6b689bde8af4b78004506b290cbffd1ab0f934e3 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 13 Sep 2023 18:10:07 -0400 Subject: [PATCH 010/859] Roll Skia from a30fbf83f2e9 to 5c7d604c81b0 (2 revisions) (#45800) https://skia.googlesource.com/skia.git/+log/a30fbf83f2e9..5c7d604c81b0 2023-09-13 lehoangquyen@chromium.org GraphiteDawn: Use CreateRenderPipelineAsync to compile pipelines. 2023-09-13 lovisolo@google.com Bazel-related task driver flags: Move into a common file. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 7579c60a5664b..45e50c647ec7a 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'a30fbf83f2e9f87ee3794b02076e6986de94ebda', + 'skia_revision': '5c7d604c81b02bf31e98a446f10ce39a09b1e9e0', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 6423e3736f102..a84a6df96f70a 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: d3e2739d365684277963c40b3193b373 +Signature: aa90a98c50eb446a40e6fd4326d88eed ==================================================================================================== LIBRARY: etc1 From a61277136e13075376482a5f949e97bc6a74720e Mon Sep 17 00:00:00 2001 From: Jackson Gardner Date: Wed, 13 Sep 2023 15:12:13 -0700 Subject: [PATCH 011/859] Compile a platform dill for dart2wasm (#45797) This continues work on https://github.com/flutter/flutter/issues/133467 We still need a change on the tool side to consume this platform dill file after this lands. --- web_sdk/BUILD.gn | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/web_sdk/BUILD.gn b/web_sdk/BUILD.gn index 83d965219100d..4177d97055c3f 100644 --- a/web_sdk/BUILD.gn +++ b/web_sdk/BUILD.gn @@ -229,6 +229,11 @@ template("_compile_platform") { if (defined(invoker.null_environment) && invoker.null_environment) { args += [ "--null-environment" ] } + skwasm_library = "dart:_skwasm_stub" + if (invoker.kernel_target == "dart2wasm") { + skwasm_library = "dart:_skwasm_impl" + } + args += [ "--target", "${invoker.kernel_target}", @@ -253,7 +258,7 @@ template("_compile_platform") { "--source", "dart:_engine", "--source", - "dart:_skwasm_stub", + skwasm_library, "--source", "dart:_web_unicode", "--source", @@ -306,6 +311,14 @@ _compile_platform("flutter_dart2js_kernel_sdk_full_sound") { null_environment = true } +_compile_platform("flutter_dart2wasm_kernel_sdk_full_sound") { + sound_null_safety = true + kernel_target = "dart2wasm" + summary_only = false + output_dill = "$root_out_dir/flutter_web_sdk/kernel/dart2wasm_platform.dill" + null_environment = true +} + # TODO(jacksongardner): remove these once they are no longer used by the flutter tool copy("flutter_dartdevc_kernel_sdk_outline_unsound_legacy") { sources = get_target_outputs(":flutter_dartdevc_kernel_sdk_outline_unsound") @@ -328,6 +341,7 @@ group("flutter_platform_dills") { public_deps = [ ":flutter_dart2js_kernel_sdk_full_sound", ":flutter_dart2js_kernel_sdk_full_unsound", + ":flutter_dart2wasm_kernel_sdk_full_sound", ":flutter_dartdevc_kernel_sdk_outline_sound", ":flutter_dartdevc_kernel_sdk_outline_unsound", @@ -528,6 +542,7 @@ if (!is_fuchsia) { sources += get_target_outputs(":flutter_dartdevc_kernel_sdk_outline_sound") sources += get_target_outputs(":flutter_dart2js_kernel_sdk_full_unsound") sources += get_target_outputs(":flutter_dart2js_kernel_sdk_full_sound") + sources += get_target_outputs(":flutter_dart2wasm_kernel_sdk_full_sound") if (is_wasm) { sources += [ "$root_out_dir/flutter_web_sdk/canvaskit/canvaskit.js", From 18f5be05b406960a23599142a3e12334c3b0be43 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 13 Sep 2023 18:48:43 -0400 Subject: [PATCH 012/859] Roll Skia from 5c7d604c81b0 to ad51509c8e3f (1 revision) (#45802) https://skia.googlesource.com/skia.git/+log/5c7d604c81b0..ad51509c8e3f 2023-09-13 lovisolo@google.com [bazel] Fix broken Bazel tasks. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 45e50c647ec7a..163b873da6756 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '5c7d604c81b02bf31e98a446f10ce39a09b1e9e0', + 'skia_revision': 'ad51509c8e3f28a70a80bf2b2b11ebd7608b5195', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 1b894c393c5a091eb91bf22b5f189ce0aa09909e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 00:44:47 +0000 Subject: [PATCH 013/859] Bump uuid from 3.0.6 to 4.0.0 in /lib/web_ui (#45794) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [uuid](https://github.com/Daegalus/dart-uuid) from 3.0.6 to 4.0.0.
Release notes

Sourced from uuid's releases.

4.0.0

What's Changed

New Contributors

All changes since v3.0.7

v4.0.0

  • toBytes on UuidValue now does not validate by default, but has the option validate that can be set to true if you need validation when calling it. (Thanks @​Erhannis)

v4.0.0-beta3-1

  • Ensure that any custom RNG implementation produces Uint8Lists of length 16. (Thanks @​wph144)

v4.0.0-beta3

  • [BREAKING CHANGE] Replacing UuidUtil rng functions with RNG classes.
    • UuidUtil.mathRNG() is replaced with MathRNG().generate().
    • UuidUtil.cryptoRNG() is replaced with CryptoRNG().generate().
    • Custom crypto implementations just need to implement the RNG abstract class.
    • namedArgs and positionalArgs have been removed from GlobalOptions
    • You may use LegacyRNG() if you need to use the old function style RNG.
  • Fix a bug with the usage of Uint64List in Dart2js by not using it. (Thanks @​hambergerpls)

v4.0.0-beta2

  • [BREAKING CHANGE] The Uuid class now takes a GlobalOptions class instead of a Map<String, dynamic>.
  • Added options classes to eventually replace the Map parameter.
  • [BREAKING CHANGE] Since v6,v7,v8 are new for 4.0, I have made it so they only take the new options class.
  • Reworked the constructors, and moved state out of the classes. Const is now supported properly again
  • Switched tests to use const Uuid to catch regressions.
  • Set the options parameter in v1, v4, and v5 to deprecated.
  • [BREAKING CHANGE] Make UuidValue properly const also
    • Can no longer run validation on the const variant.
    • Added UuidValue.withValidation() to handle this usecase, it can't be const.
    • If you need const and validation. Create the UuidValue with the UUID, then call the validate() function on it.

v4.0.0-beta1-1

  • Mostly cleanup, linting, updating depedencies, etc.

... (truncated)

Changelog

Sourced from uuid's changelog.

v4.0.0

  • toBytes on UuidValue now does not validate by default, but has the option validate that can be set to true if you need validation when calling it. (Thanks @​Erhannis)

v4.0.0-beta3-1

  • Ensure that any custom RNG implementation produces Uint8Lists of length 16. (Thanks @​wph44)

v4.0.0-beta3

  • [BREAKING CHANGE] Replacing UuidUtil rng functions with RNG classes.
    • UuidUtil.mathRNG() is replaced with MathRNG().generate().
    • UuidUtil.cryptoRNG() is replaced with CryptoRNG().generate().
    • Custom crypto implementations just need to implement the RNG abstract class.
    • namedArgs and positionalArgs have been removed from GlobalOptions
    • You may use LegacyRNG() if you need to use the old function style RNG.
  • Fix a bug with the usage of Uint64List in Dart2js by not using it. (Thanks @​hambergerpls)

v4.0.0-beta2

  • [BREAKING CHANGE] The Uuid class now takes a GlobalOptions class instead of a Map<String, dynamic>.
  • Added options classes to eventually replace the Map parameter.
  • [BREAKING CHANGE] Since v6,v7,v8 are new for 4.0, I have made it so they only take the new options class.
  • Reworked the constructors, and moved state out of the classes. Const is now supported properly again
  • Switched tests to use const Uuid to catch regressions.
  • Set the options parameter in v1, v4, and v5 to deprecated.
  • [BREAKING CHANGE] Make UuidValue properly const also
    • Can no longer run validation on the const variant.
    • Added UuidValue.withValidation() to handle this usecase, it can't be const.
    • If you need const and validation. Create the UuidValue with the UUID, then call the validate() function on it.

v4.0.0-beta1-1

  • Mostly cleanup, linting, updating depedencies, etc.

v4.0.0-beta1

  • Break up versions into individual objects that can be used standalone.
  • No more colliding global states between versions
  • Added UUID v6, v7, v8 from the new RFC.
  • Add time, version, and variant functions to UuidValue

v3.0.7

  • Fixed parse to allow buffers larger than 16 bytes to be used. [Thanks @​hoylen]
Commits
  • e67b968 Fix SDK constraints
  • 13da889 Update docs
  • 8b0ada2 Prep for 4.0.0 release
  • 3416381 Added validate option to toBytes. Also ran dart format, because of git CI fail.
  • 8a49c14 Revert "Made fromByteList and fromList match" - turns out it wasn't
  • c2dd584 Made fromByteList and fromList match
  • 14cb91c toBytes no longer validates
  • 54ccdce Cleanup and regenerate docs
  • 06e425a Cleanup and version bump
  • ca2bf53 check the length of the Uint8list returned by the custom RNG
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=uuid&package-manager=pub&previous-version=3.0.6&new-version=4.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- lib/web_ui/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/web_ui/pubspec.yaml b/lib/web_ui/pubspec.yaml index e0cd447cde5d6..d9a2834297813 100644 --- a/lib/web_ui/pubspec.yaml +++ b/lib/web_ui/pubspec.yaml @@ -42,7 +42,7 @@ dev_dependencies: test_api: any test_core: any typed_data: any - uuid: 3.0.6 + uuid: 4.0.0 watcher: 1.1.0 web_socket_channel: any webdriver: 3.0.1 From 06774b0c5fe5b15d162d627372eb2db93494dd7e Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 13 Sep 2023 21:03:47 -0400 Subject: [PATCH 014/859] Roll Fuchsia Linux SDK from ftcEc93bjtc0q2a6s... to 5aKvHj_QcSHJkbWjr... (#45808) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC bdero@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 163b873da6756..c30a24801be78 100644 --- a/DEPS +++ b/DEPS @@ -924,7 +924,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'ftcEc93bjtc0q2a6skMN1MORORVVwcAJIW8gUyhP_Q4C' + 'version': '5aKvHj_QcSHJkbWjrtp4Pd4JT7q71ewR6YIdYnVFScIC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index b21c0d70c5f40..1168e09f37782 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: 75eb720a09615537eaca04d3a0afb82f +Signature: 31227b0d8a2f280cc08763455603214f ==================================================================================================== LIBRARY: fuchsia_sdk From 84f5814577e4abc1ecea73a2afe6b84ed1eca440 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 13 Sep 2023 22:19:23 -0400 Subject: [PATCH 015/859] Roll Skia from ad51509c8e3f to b2a4969c7782 (3 revisions) (#45812) https://skia.googlesource.com/skia.git/+log/ad51509c8e3f..b2a4969c7782 2023-09-14 michaelludwig@google.com Revert "Reland "Add epsilon to texture effect clamping at pixel centers"" 2023-09-14 johnstiles@google.com Avoid stack corruption of rtAdjust array. 2023-09-13 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from f64a38bd0c7a to 61dbf7960649 (6 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index c30a24801be78..49b5ed631500b 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'ad51509c8e3f28a70a80bf2b2b11ebd7608b5195', + 'skia_revision': 'b2a4969c778238a4eeca78a63def5ee54d8a30d6', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index a84a6df96f70a..90de4cbf65b81 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: aa90a98c50eb446a40e6fd4326d88eed +Signature: b50d9b5ac9fa871830df83643c7b7e37 ==================================================================================================== LIBRARY: etc1 From 75ac8922c48c60f1646f1659842da922baa43330 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 13 Sep 2023 22:35:08 -0400 Subject: [PATCH 016/859] Roll Fuchsia Mac SDK from gHhOd3d6V3Zv6CzK2... to f4jtyOMeNSKGqqI4y... (#45813) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC bdero@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 49b5ed631500b..5a08589c4bf18 100644 --- a/DEPS +++ b/DEPS @@ -914,7 +914,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'gHhOd3d6V3Zv6CzK2s7BcyuC4jOjrn9t1vfN-QWP3nMC' + 'version': 'f4jtyOMeNSKGqqI4yO9wCP1JikaC4JYk79N4g8OUpdYC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From c7fa2b8056f285af998078662e5c386bf29da050 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 13 Sep 2023 23:07:35 -0400 Subject: [PATCH 017/859] Roll Skia from b2a4969c7782 to 5f18d2ead8c8 (2 revisions) (#45814) https://skia.googlesource.com/skia.git/+log/b2a4969c7782..5f18d2ead8c8 2023-09-14 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from 19ec9904dd95 to 5f6a13cae14e 2023-09-14 weiyuhuang@google.com Reland https://skia-review.googlesource.com/c/skia/+/753079 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 5a08589c4bf18..ef54d598ed6fd 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'b2a4969c778238a4eeca78a63def5ee54d8a30d6', + 'skia_revision': '5f18d2ead8c8f4597da4c75fc2a69795dce2004c', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 90de4cbf65b81..91062af00d98a 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: b50d9b5ac9fa871830df83643c7b7e37 +Signature: 5305995425260afcb61349121a9ca697 ==================================================================================================== LIBRARY: etc1 From 82d8218c8b7c321f1e3d36ae3589e0b6bf4611ac Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 14 Sep 2023 00:11:28 -0400 Subject: [PATCH 018/859] Roll Skia from 5f18d2ead8c8 to 5ff47ea11c13 (1 revision) (#45815) https://skia.googlesource.com/skia.git/+log/5f18d2ead8c8..5ff47ea11c13 2023-09-14 johnstiles@google.com Enable SkSL testing in Graphite + Vulkan. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index ef54d598ed6fd..72a326f1da330 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '5f18d2ead8c8f4597da4c75fc2a69795dce2004c', + 'skia_revision': '5ff47ea11c13661c45f7e01b7448ebe8fd339e97', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From d4d3e419fa051b2dea529eb8a7cde73b46d6cca9 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 14 Sep 2023 04:46:36 -0400 Subject: [PATCH 019/859] Roll Skia from 5ff47ea11c13 to 4bb29f80ed43 (1 revision) (#45818) https://skia.googlesource.com/skia.git/+log/5ff47ea11c13..4bb29f80ed43 2023-09-14 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from 19ec9904dd95 to 5f6a13cae14e (1 revision) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 72a326f1da330..c8d424d7a7b86 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '5ff47ea11c13661c45f7e01b7448ebe8fd339e97', + 'skia_revision': '4bb29f80ed434785ecff0f8961faf1bd92c9a6f3', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 91062af00d98a..e4d677148cffc 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 5305995425260afcb61349121a9ca697 +Signature: 2cf94d4693b1f568d7ec97deeaa038aa ==================================================================================================== LIBRARY: etc1 From 7c81624349ca81166da077603ca8b5f5b81a9169 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 09:02:21 +0000 Subject: [PATCH 020/859] Bump html from 0.15.0 to 0.15.4 in /lib/web_ui (#45819) Bumps [html](https://github.com/dart-lang/html) from 0.15.0 to 0.15.4.
Changelog

Sourced from html's changelog.

0.15.4

  • Widen the dependency on package:csslib.
  • Require Dart 2.19.

0.15.3

  • Added package topics to the pubspec file.

0.15.2

  • Add additional types at the API boundary (in lib/parser.dart and others).
  • Adopted the package:dart_flutter_team_lints linting rules.
  • Fixed an issue with querySelector where it would fail in some cases with descendant or sibling combinators (#157).
  • Add an API example in example/.

0.15.1

  • Move htmlSerializeEscape to its own library, package:html/html_escape.dart, which is exported from package:html/dom_parsing.dart.
  • Use more non-growable lists, and type annotations on List literals.
  • Switch analysis option implicit-casts: false to strict-casts: true.
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=html&package-manager=pub&previous-version=0.15.0&new-version=0.15.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- lib/web_ui/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/web_ui/pubspec.yaml b/lib/web_ui/pubspec.yaml index d9a2834297813..cab85c2f223c6 100644 --- a/lib/web_ui/pubspec.yaml +++ b/lib/web_ui/pubspec.yaml @@ -23,7 +23,7 @@ dev_dependencies: async: any convert: any crypto: any - html: 0.15.0 + html: 0.15.4 http: 1.1.0 http_multi_server: any image: 3.0.1 From 1441661f05ae30fb32c40e7fe0a19adeb40c609b Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 14 Sep 2023 07:54:27 -0400 Subject: [PATCH 021/859] Roll Skia from 4bb29f80ed43 to 45ba26fae9cd (1 revision) (#45821) https://skia.googlesource.com/skia.git/+log/4bb29f80ed43..45ba26fae9cd 2023-09-14 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 61dbf7960649 to b4c3435d2fba (3 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index c8d424d7a7b86..9325ce4a015b9 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '4bb29f80ed434785ecff0f8961faf1bd92c9a6f3', + 'skia_revision': '45ba26fae9cd39918fb38c587c506ff10b6b6d41', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 3ffbfdc448c675bfe73bd803d4d936083e5ddc6e Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 14 Sep 2023 09:49:24 -0400 Subject: [PATCH 022/859] Roll Fuchsia Linux SDK from 5aKvHj_QcSHJkbWjr... to MzLcTzBiWJ7o3Q2_Z... (#45823) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC bdero@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 9325ce4a015b9..126a74c672773 100644 --- a/DEPS +++ b/DEPS @@ -924,7 +924,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': '5aKvHj_QcSHJkbWjrtp4Pd4JT7q71ewR6YIdYnVFScIC' + 'version': 'MzLcTzBiWJ7o3Q2_ZoCskAyXV_qzdvkqbOC7R1VhrY8C' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index 1168e09f37782..44ac3183d3f79 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: 31227b0d8a2f280cc08763455603214f +Signature: b0cb98becf39edbf5c9268242cd57b5c ==================================================================================================== LIBRARY: fuchsia_sdk From 3d690e6d092ff80183ce9e4bc0781c4eacb651d7 Mon Sep 17 00:00:00 2001 From: godofredoc Date: Thu, 14 Sep 2023 07:15:11 -0700 Subject: [PATCH 023/859] Fix script (#45598) Makes mac framework readable and executable by all. Bug: https://github.com/flutter/flutter/issues/132725 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- sky/tools/create_macos_framework.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sky/tools/create_macos_framework.py b/sky/tools/create_macos_framework.py index c1382527ad4c2..bb78320bf29ac 100755 --- a/sky/tools/create_macos_framework.py +++ b/sky/tools/create_macos_framework.py @@ -81,6 +81,7 @@ def main(): shutil.rmtree(fat_framework, True) shutil.copytree(arm64_framework, fat_framework, symlinks=True) + regenerate_symlinks(fat_framework) fat_framework_binary = os.path.join( @@ -91,6 +92,21 @@ def main(): subprocess.check_call([ 'lipo', arm64_dylib, x64_dylib, '-create', '-output', fat_framework_binary ]) + + # Add group and other readability to all files. + versions_path = os.path.join(fat_framework, 'Versions') + subprocess.check_call(['chmod', '-R', 'og+r', versions_path]) + # Find all the files below the target dir with owner execute permission + find_subprocess = subprocess.Popen([ + 'find', versions_path, '-perm', '-100', '-print0' + ], + stdout=subprocess.PIPE) + # Add execute permission for other and group for all files that had it for owner. + xargs_subprocess = subprocess.Popen(['xargs', '-0', 'chmod', 'og+x'], + stdin=find_subprocess.stdout) + find_subprocess.wait() + xargs_subprocess.wait() + process_framework(dst, args, fat_framework, fat_framework_binary) return 0 From 8ca5096799b325d171422ce1965796843a688acc Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 14 Sep 2023 10:43:19 -0400 Subject: [PATCH 024/859] Roll Skia from 45ba26fae9cd to 08fb9768d1b8 (2 revisions) (#45825) https://skia.googlesource.com/skia.git/+log/45ba26fae9cd..08fb9768d1b8 2023-09-14 egdaniel@google.com Reland "Add option for clients to set default gpu staging buffer size." 2023-09-14 johnstiles@google.com Clarify build documentation. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 126a74c672773..d5200d8181caf 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '45ba26fae9cd39918fb38c587c506ff10b6b6d41', + 'skia_revision': '08fb9768d1b85995168df3eaf1a419e01194384c', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index e4d677148cffc..6bbc9c2281919 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 2cf94d4693b1f568d7ec97deeaa038aa +Signature: 377f8649831a7069f3b0b1db990f16f1 ==================================================================================================== LIBRARY: etc1 From ab99e5074a89501192f2ddb26c79329a92fbd3b8 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 14 Sep 2023 11:14:05 -0400 Subject: [PATCH 025/859] Roll Fuchsia Mac SDK from f4jtyOMeNSKGqqI4y... to FF4r9-tqhioBbRG9f... (#45827) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC bdero@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index d5200d8181caf..d5e889ba7ff06 100644 --- a/DEPS +++ b/DEPS @@ -914,7 +914,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'f4jtyOMeNSKGqqI4yO9wCP1JikaC4JYk79N4g8OUpdYC' + 'version': 'FF4r9-tqhioBbRG9fMFASuWfOKHBuLBdZtdnlvEPZY0C' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From a8662b39951b0875a8296e23fc2ae7c3706fcc57 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 14 Sep 2023 11:26:22 -0400 Subject: [PATCH 026/859] Roll Skia from 08fb9768d1b8 to 91d5a781ebaf (3 revisions) (#45828) https://skia.googlesource.com/skia.git/+log/08fb9768d1b8..91d5a781ebaf 2023-09-14 brianosman@google.com Fully remove legacy SK_VULKAN code from GrBackendSurface.h 2023-09-14 jvanverth@google.com [graphite] Rename AtlasShapeRenderStep to CoverageMaskRenderStep 2023-09-14 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll vulkan-deps from b4c3435d2fba to 27be2a276618 (2 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/DEPS b/DEPS index d5e889ba7ff06..1c223a31a8014 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '08fb9768d1b85995168df3eaf1a419e01194384c', + 'skia_revision': '91d5a781ebafa890ae11edcc1a86ec549de05320', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 6bbc9c2281919..77d261e6aca6d 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 377f8649831a7069f3b0b1db990f16f1 +Signature: 99eafb62e4b7488470e990787121953c ==================================================================================================== LIBRARY: etc1 @@ -8967,8 +8967,8 @@ ORIGIN: ../../../third_party/skia/src/gpu/graphite/dawn/DawnErrorChecker.cpp + . ORIGIN: ../../../third_party/skia/src/gpu/graphite/dawn/DawnErrorChecker.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/graphite/geom/CoverageMaskShape.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/graphite/geom/EdgeAAQuad.h + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/src/gpu/graphite/render/AtlasShapeRenderStep.cpp + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/src/gpu/graphite/render/AtlasShapeRenderStep.h + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/gpu/graphite/render/CoverageMaskRenderStep.cpp + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/gpu/graphite/render/CoverageMaskRenderStep.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/graphite/render/GraphiteVertexFiller.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/graphite/vk/VulkanDescriptorPool.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/graphite/vk/VulkanDescriptorPool.h + ../../../third_party/skia/LICENSE @@ -9228,8 +9228,8 @@ FILE: ../../../third_party/skia/src/gpu/graphite/dawn/DawnErrorChecker.cpp FILE: ../../../third_party/skia/src/gpu/graphite/dawn/DawnErrorChecker.h FILE: ../../../third_party/skia/src/gpu/graphite/geom/CoverageMaskShape.h FILE: ../../../third_party/skia/src/gpu/graphite/geom/EdgeAAQuad.h -FILE: ../../../third_party/skia/src/gpu/graphite/render/AtlasShapeRenderStep.cpp -FILE: ../../../third_party/skia/src/gpu/graphite/render/AtlasShapeRenderStep.h +FILE: ../../../third_party/skia/src/gpu/graphite/render/CoverageMaskRenderStep.cpp +FILE: ../../../third_party/skia/src/gpu/graphite/render/CoverageMaskRenderStep.h FILE: ../../../third_party/skia/src/gpu/graphite/render/GraphiteVertexFiller.cpp FILE: ../../../third_party/skia/src/gpu/graphite/vk/VulkanDescriptorPool.cpp FILE: ../../../third_party/skia/src/gpu/graphite/vk/VulkanDescriptorPool.h From 9e9d79935a896078dba5ad0acfbce6fefc39cf46 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 14 Sep 2023 12:12:06 -0400 Subject: [PATCH 027/859] Roll Skia from 91d5a781ebaf to 54253f58533d (2 revisions) (#45829) https://skia.googlesource.com/skia.git/+log/91d5a781ebaf..54253f58533d 2023-09-14 johnstiles@google.com Add gcloud login step to ASAN documentation. 2023-09-14 johnstiles@google.com Initialize 'fIsWrappedOnly' member variable. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 1c223a31a8014..ab59df33918b6 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '91d5a781ebafa890ae11edcc1a86ec549de05320', + 'skia_revision': '54253f58533d83eb6eb8e698048db065e419c030', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 77d261e6aca6d..0d8e421977be5 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 99eafb62e4b7488470e990787121953c +Signature: 6a0ea9668bf71c1fbe13b2af6613d442 ==================================================================================================== LIBRARY: etc1 From 4843ed3af05d73c7012e7722e57b30121654de2b Mon Sep 17 00:00:00 2001 From: Brandon DeRosier Date: Thu, 14 Sep 2023 10:07:19 -0700 Subject: [PATCH 028/859] [Impeller] Incorporate filters in subpass coverage. (#45778) I adjusted the size of the matrix filtered circle in both SaveLayer Matrix filter test variants (post-filter and backdrop filter) to move the transformed circle outside the coverage area that would be computed if subpass filters aren't being accounted for. Further, we need to avoid intersecting with the pass coverage hint when the transformation being applied by the paint's filter graph causes the Entity's space basis to deviate from the parent pass basis. We're still able to apply it for simple translations, though. --- impeller/aiks/aiks_unittests.cc | 4 +- impeller/aiks/paint.cc | 17 +++++--- impeller/aiks/paint.h | 9 ++-- impeller/aiks/paint_pass_delegate.cc | 14 ++++++ impeller/aiks/paint_pass_delegate.h | 10 +++++ impeller/entity/contents/contents.cc | 4 ++ impeller/entity/contents/contents.h | 7 +++ .../contents/filters/filter_contents.cc | 12 ++++++ .../entity/contents/filters/filter_contents.h | 13 ++++++ .../inputs/filter_contents_filter_input.cc | 4 ++ .../inputs/filter_contents_filter_input.h | 3 ++ .../contents/filters/inputs/filter_input.cc | 4 ++ .../contents/filters/inputs/filter_input.h | 3 ++ .../filters/matrix_filter_contents.cc | 4 ++ .../contents/filters/matrix_filter_contents.h | 3 ++ impeller/entity/entity_pass.cc | 43 +++++++++++++++++-- impeller/entity/entity_pass.h | 3 ++ impeller/entity/entity_pass_delegate.cc | 7 +++ impeller/entity/entity_pass_delegate.h | 6 +++ impeller/entity/entity_unittests.cc | 7 +++ 20 files changed, 163 insertions(+), 14 deletions(-) diff --git a/impeller/aiks/aiks_unittests.cc b/impeller/aiks/aiks_unittests.cc index 6af0cbc9283a9..06f551be4832a 100644 --- a/impeller/aiks/aiks_unittests.cc +++ b/impeller/aiks/aiks_unittests.cc @@ -3220,7 +3220,7 @@ TEST_P(AiksTest, MatrixSaveLayerFilter) { canvas.SaveLayer({.image_filter = ImageFilter::MakeMatrix( Matrix::MakeTranslation(Vector2(1, 1) * (200 + 100 * k1OverSqrt2)) * - Matrix::MakeScale(Vector2(1, 1) * 0.2) * + Matrix::MakeScale(Vector2(1, 1) * 0.5) * Matrix::MakeTranslation(Vector2(-200, -200)), SamplerDescriptor{})}, std::nullopt); @@ -3248,7 +3248,7 @@ TEST_P(AiksTest, MatrixBackdropFilter) { {}, std::nullopt, ImageFilter::MakeMatrix( Matrix::MakeTranslation(Vector2(1, 1) * (100 + 100 * k1OverSqrt2)) * - Matrix::MakeScale(Vector2(1, 1) * 0.2) * + Matrix::MakeScale(Vector2(1, 1) * 0.5) * Matrix::MakeTranslation(Vector2(-100, -100)), SamplerDescriptor{})); canvas.Restore(); diff --git a/impeller/aiks/paint.cc b/impeller/aiks/paint.cc index a7bb6d00d3152..5c2b808c69eb3 100644 --- a/impeller/aiks/paint.cc +++ b/impeller/aiks/paint.cc @@ -60,14 +60,21 @@ std::shared_ptr Paint::WithFilters( std::shared_ptr input) const { input = WithColorFilter(input, /*absorb_opacity=*/true); input = WithInvertFilter(input); - input = WithImageFilter(input, Matrix(), /*is_subpass=*/false); + auto image_filter = WithImageFilter(input, Matrix(), /*is_subpass=*/false); + if (image_filter) { + input = image_filter; + } return input; } std::shared_ptr Paint::WithFiltersForSubpassTarget( std::shared_ptr input, const Matrix& effect_transform) const { - input = WithImageFilter(input, effect_transform, /*is_subpass=*/true); + auto image_filter = + WithImageFilter(input, effect_transform, /*is_subpass=*/true); + if (image_filter) { + input = image_filter; + } input = WithColorFilter(input, /*absorb_opacity=*/true); return input; } @@ -81,12 +88,12 @@ std::shared_ptr Paint::WithMaskBlur(std::shared_ptr input, return input; } -std::shared_ptr Paint::WithImageFilter( - std::shared_ptr input, +std::shared_ptr Paint::WithImageFilter( + const FilterInput::Variant& input, const Matrix& effect_transform, bool is_subpass) const { if (!image_filter) { - return input; + return nullptr; } auto filter = image_filter->WrapInput(FilterInput::Make(input)); filter->SetIsForSubpass(is_subpass); diff --git a/impeller/aiks/paint.h b/impeller/aiks/paint.h index d77a298d5bd21..384b4bdb1f150 100644 --- a/impeller/aiks/paint.h +++ b/impeller/aiks/paint.h @@ -98,11 +98,12 @@ struct Paint { std::shared_ptr WithMaskBlur(std::shared_ptr input, bool is_solid_color) const; - private: - std::shared_ptr WithImageFilter(std::shared_ptr input, - const Matrix& effect_transform, - bool is_subpass) const; + std::shared_ptr WithImageFilter( + const FilterInput::Variant& input, + const Matrix& effect_transform, + bool is_subpass) const; + private: std::shared_ptr WithColorFilter(std::shared_ptr input, bool absorb_opacity = false) const; diff --git a/impeller/aiks/paint_pass_delegate.cc b/impeller/aiks/paint_pass_delegate.cc index 382ca3457cd93..6a72338028d5a 100644 --- a/impeller/aiks/paint_pass_delegate.cc +++ b/impeller/aiks/paint_pass_delegate.cc @@ -47,6 +47,13 @@ std::shared_ptr PaintPassDelegate::CreateContentsForSubpassTarget( effect_transform); } +// |EntityPassDelgate| +std::shared_ptr PaintPassDelegate::WithImageFilter( + const FilterInput::Variant& input, + const Matrix& effect_transform) const { + return paint_.WithImageFilter(input, effect_transform, true); +} + /// OpacityPeepholePassDelegate /// ---------------------------------------------- @@ -140,4 +147,11 @@ OpacityPeepholePassDelegate::CreateContentsForSubpassTarget( effect_transform); } +// |EntityPassDelgate| +std::shared_ptr OpacityPeepholePassDelegate::WithImageFilter( + const FilterInput::Variant& input, + const Matrix& effect_transform) const { + return paint_.WithImageFilter(input, effect_transform, true); +} + } // namespace impeller diff --git a/impeller/aiks/paint_pass_delegate.h b/impeller/aiks/paint_pass_delegate.h index 967b59ea81e63..17e87b20bd366 100644 --- a/impeller/aiks/paint_pass_delegate.h +++ b/impeller/aiks/paint_pass_delegate.h @@ -32,6 +32,11 @@ class PaintPassDelegate final : public EntityPassDelegate { std::shared_ptr target, const Matrix& effect_transform) override; + // |EntityPassDelgate| + std::shared_ptr WithImageFilter( + const FilterInput::Variant& input, + const Matrix& effect_transform) const override; + private: const Paint paint_; @@ -61,6 +66,11 @@ class OpacityPeepholePassDelegate final : public EntityPassDelegate { std::shared_ptr target, const Matrix& effect_transform) override; + // |EntityPassDelgate| + std::shared_ptr WithImageFilter( + const FilterInput::Variant& input, + const Matrix& effect_transform) const override; + private: const Paint paint_; diff --git a/impeller/entity/contents/contents.cc b/impeller/entity/contents/contents.cc index 85e70e534e061..a181e22302b21 100644 --- a/impeller/entity/contents/contents.cc +++ b/impeller/entity/contents/contents.cc @@ -123,6 +123,10 @@ std::optional Contents::AsBackgroundColor(const Entity& entity, return {}; } +const FilterContents* Contents::AsFilter() const { + return nullptr; +} + bool Contents::ApplyColorFilter( const Contents::ColorFilterProc& color_filter_proc) { return false; diff --git a/impeller/entity/contents/contents.h b/impeller/entity/contents/contents.h index 245b8f2d6d514..b9dec5db2d12e 100644 --- a/impeller/entity/contents/contents.h +++ b/impeller/entity/contents/contents.h @@ -23,6 +23,7 @@ struct ContentContextOptions; class Entity; class Surface; class RenderPass; +class FilterContents; ContentContextOptions OptionsFromPass(const RenderPass& pass); @@ -155,6 +156,12 @@ class Contents { virtual std::optional AsBackgroundColor(const Entity& entity, ISize target_size) const; + //---------------------------------------------------------------------------- + /// @brief Cast to a filter. Returns `nullptr` if this Contents is not a + /// filter. + /// + virtual const FilterContents* AsFilter() const; + //---------------------------------------------------------------------------- /// @brief If possible, applies a color filter to this contents inputs on /// the CPU. diff --git a/impeller/entity/contents/filters/filter_contents.cc b/impeller/entity/contents/filters/filter_contents.cc index ae48cec892ddc..3d4fa96a6321b 100644 --- a/impeller/entity/contents/filters/filter_contents.cc +++ b/impeller/entity/contents/filters/filter_contents.cc @@ -259,6 +259,10 @@ std::optional FilterContents::RenderToSnapshot( return std::nullopt; } +const FilterContents* FilterContents::AsFilter() const { + return this; +} + Matrix FilterContents::GetLocalTransform(const Matrix& parent_transform) const { return Matrix(); } @@ -266,6 +270,14 @@ Matrix FilterContents::GetLocalTransform(const Matrix& parent_transform) const { Matrix FilterContents::GetTransform(const Matrix& parent_transform) const { return parent_transform * GetLocalTransform(parent_transform); } +bool FilterContents::IsTranslationOnly() const { + for (auto& input : inputs_) { + if (!input->IsTranslationOnly()) { + return false; + } + } + return true; +} bool FilterContents::IsLeaf() const { for (auto& input : inputs_) { diff --git a/impeller/entity/contents/filters/filter_contents.h b/impeller/entity/contents/filters/filter_contents.h index e5e7604434821..c14393444980c 100644 --- a/impeller/entity/contents/filters/filter_contents.h +++ b/impeller/entity/contents/filters/filter_contents.h @@ -125,10 +125,23 @@ class FilterContents : public Contents { bool msaa_enabled = true, const std::string& label = "Filter Snapshot") const override; + // |Contents| + const FilterContents* AsFilter() const override; + virtual Matrix GetLocalTransform(const Matrix& parent_transform) const; Matrix GetTransform(const Matrix& parent_transform) const; + /// @brief Returns true if this filter graph doesn't perform any basis + /// transformations to the filtered content. For example: Rotating, + /// scaling, and skewing are all basis transformations, but + /// translating is not. + /// + /// This is useful for determining whether a filtered object's space + /// is compatible enough with the parent pass space to perform certain + /// subpass clipping optimizations. + virtual bool IsTranslationOnly() const; + /// @brief Returns `true` if this filter does not have any `FilterInput` /// children. bool IsLeaf() const; diff --git a/impeller/entity/contents/filters/inputs/filter_contents_filter_input.cc b/impeller/entity/contents/filters/inputs/filter_contents_filter_input.cc index e1af31f8bede4..78a1cec98e3b2 100644 --- a/impeller/entity/contents/filters/inputs/filter_contents_filter_input.cc +++ b/impeller/entity/contents/filters/inputs/filter_contents_filter_input.cc @@ -58,6 +58,10 @@ void FilterContentsFilterInput::PopulateGlyphAtlas( filter_->PopulateGlyphAtlas(lazy_glyph_atlas, scale); } +bool FilterContentsFilterInput::IsTranslationOnly() const { + return filter_->IsTranslationOnly(); +} + bool FilterContentsFilterInput::IsLeaf() const { return false; } diff --git a/impeller/entity/contents/filters/inputs/filter_contents_filter_input.h b/impeller/entity/contents/filters/inputs/filter_contents_filter_input.h index 7aaaa3aebdd7a..45d44993520cf 100644 --- a/impeller/entity/contents/filters/inputs/filter_contents_filter_input.h +++ b/impeller/entity/contents/filters/inputs/filter_contents_filter_input.h @@ -36,6 +36,9 @@ class FilterContentsFilterInput final : public FilterInput { const std::shared_ptr& lazy_glyph_atlas, Scalar scale) override; + // |FilterInput| + bool IsTranslationOnly() const override; + // |FilterInput| bool IsLeaf() const override; diff --git a/impeller/entity/contents/filters/inputs/filter_input.cc b/impeller/entity/contents/filters/inputs/filter_input.cc index 1cb4744468c20..e438212688a44 100644 --- a/impeller/entity/contents/filters/inputs/filter_input.cc +++ b/impeller/entity/contents/filters/inputs/filter_input.cc @@ -76,6 +76,10 @@ void FilterInput::PopulateGlyphAtlas( FilterInput::~FilterInput() = default; +bool FilterInput::IsTranslationOnly() const { + return true; +} + bool FilterInput::IsLeaf() const { return true; } diff --git a/impeller/entity/contents/filters/inputs/filter_input.h b/impeller/entity/contents/filters/inputs/filter_input.h index 598ca1b560cca..43db41eb6a8ef 100644 --- a/impeller/entity/contents/filters/inputs/filter_input.h +++ b/impeller/entity/contents/filters/inputs/filter_input.h @@ -69,6 +69,9 @@ class FilterInput { const std::shared_ptr& lazy_glyph_atlas, Scalar scale); + /// @see `FilterContents::HasBasisTransformations` + virtual bool IsTranslationOnly() const; + /// @brief Returns `true` unless this input is a `FilterInput`, which may /// take other inputs. virtual bool IsLeaf() const; diff --git a/impeller/entity/contents/filters/matrix_filter_contents.cc b/impeller/entity/contents/filters/matrix_filter_contents.cc index 5483b4d7d306b..c767ffe6cd19f 100644 --- a/impeller/entity/contents/filters/matrix_filter_contents.cc +++ b/impeller/entity/contents/filters/matrix_filter_contents.cc @@ -19,6 +19,10 @@ void MatrixFilterContents::SetIsForSubpass(bool is_subpass) { FilterContents::SetIsForSubpass(is_subpass); } +bool MatrixFilterContents::IsTranslationOnly() const { + return matrix_.Basis().IsIdentity() && FilterContents::IsTranslationOnly(); +} + void MatrixFilterContents::SetSamplerDescriptor(SamplerDescriptor desc) { sampler_descriptor_ = std::move(desc); } diff --git a/impeller/entity/contents/filters/matrix_filter_contents.h b/impeller/entity/contents/filters/matrix_filter_contents.h index a2e4c5f239953..ea221301d8e33 100644 --- a/impeller/entity/contents/filters/matrix_filter_contents.h +++ b/impeller/entity/contents/filters/matrix_filter_contents.h @@ -20,6 +20,9 @@ class MatrixFilterContents final : public FilterContents { // |FilterContents| void SetIsForSubpass(bool is_for_subpass) override; + // |FilterContents| + bool IsTranslationOnly() const override; + void SetSamplerDescriptor(SamplerDescriptor desc); // |FilterContents| diff --git a/impeller/entity/entity_pass.cc b/impeller/entity/entity_pass.cc index 29a737e8f57e5..b93d997d468d2 100644 --- a/impeller/entity/entity_pass.cc +++ b/impeller/entity/entity_pass.cc @@ -110,12 +110,39 @@ std::optional EntityPass::GetElementsCoverage( if (auto entity = std::get_if(&element)) { coverage = entity->GetCoverage(); + // When the coverage limit is std::nullopt, that means there is no limit, + // as opposed to empty coverage. if (coverage.has_value() && coverage_limit.has_value()) { - coverage = coverage->Intersection(coverage_limit.value()); + const auto* filter = entity->GetContents()->AsFilter(); + if (!filter || filter->IsTranslationOnly()) { + coverage = coverage->Intersection(coverage_limit.value()); + } } - } else if (auto subpass = + } else if (auto subpass_ptr = std::get_if>(&element)) { - coverage = GetSubpassCoverage(*subpass->get(), coverage_limit); + auto& subpass = *subpass_ptr->get(); + + std::optional unfiltered_coverage = + GetSubpassCoverage(subpass, std::nullopt); + if (!unfiltered_coverage.has_value()) { + continue; + } + + std::shared_ptr image_filter = + subpass.delegate_->WithImageFilter(*unfiltered_coverage, + subpass.xformation_); + if (image_filter) { + Entity subpass_entity; + subpass_entity.SetTransformation(subpass.xformation_); + coverage = image_filter->GetCoverage(subpass_entity); + } else { + coverage = unfiltered_coverage; + } + + if (coverage.has_value() && coverage_limit.has_value() && + (!image_filter || image_filter->IsTranslationOnly())) { + coverage = coverage->Intersection(coverage_limit.value()); + } } else { FML_UNREACHABLE(); } @@ -135,6 +162,16 @@ std::optional EntityPass::GetElementsCoverage( std::optional EntityPass::GetSubpassCoverage( const EntityPass& subpass, std::optional coverage_limit) const { + std::shared_ptr image_filter = + subpass.delegate_->WithImageFilter(Rect(), subpass.xformation_); + + // If the filter graph transforms the basis of the subpass, then its space + // has deviated too much from the parent pass to safely intersect with the + // pass coverage limit. + coverage_limit = + (image_filter && image_filter->IsTranslationOnly() ? std::nullopt + : coverage_limit); + auto entities_coverage = subpass.GetElementsCoverage(coverage_limit); // The entities don't cover anything. There is nothing to do. if (!entities_coverage.has_value()) { diff --git a/impeller/entity/entity_pass.h b/impeller/entity/entity_pass.h index f9b11d155f50f..f00c9d3653978 100644 --- a/impeller/entity/entity_pass.h +++ b/impeller/entity/entity_pass.h @@ -141,6 +141,9 @@ class EntityPass { void SetEnableOffscreenCheckerboard(bool enabled); + //---------------------------------------------------------------------------- + /// @brief Get the coverage of an unfiltered subpass. + /// std::optional GetSubpassCoverage( const EntityPass& subpass, std::optional coverage_limit) const; diff --git a/impeller/entity/entity_pass_delegate.cc b/impeller/entity/entity_pass_delegate.cc index b996995b57de6..e6a1021956176 100644 --- a/impeller/entity/entity_pass_delegate.cc +++ b/impeller/entity/entity_pass_delegate.cc @@ -34,6 +34,13 @@ class DefaultEntityPassDelegate final : public EntityPassDelegate { FML_UNREACHABLE(); } + // |EntityPassDelgate| + std::shared_ptr WithImageFilter( + const FilterInput::Variant& input, + const Matrix& effect_transform) const override { + return nullptr; + } + private: FML_DISALLOW_COPY_AND_ASSIGN(DefaultEntityPassDelegate); }; diff --git a/impeller/entity/entity_pass_delegate.h b/impeller/entity/entity_pass_delegate.h index fbc7f97be2bbb..4675236b35a79 100644 --- a/impeller/entity/entity_pass_delegate.h +++ b/impeller/entity/entity_pass_delegate.h @@ -9,6 +9,8 @@ #include "flutter/fml/macros.h" #include "impeller/core/texture.h" #include "impeller/entity/contents/contents.h" +#include "impeller/entity/contents/filters/filter_contents.h" +#include "impeller/entity/contents/filters/inputs/filter_input.h" namespace impeller { @@ -32,6 +34,10 @@ class EntityPassDelegate { std::shared_ptr target, const Matrix& effect_transform) = 0; + virtual std::shared_ptr WithImageFilter( + const FilterInput::Variant& input, + const Matrix& effect_transform) const = 0; + private: FML_DISALLOW_COPY_AND_ASSIGN(EntityPassDelegate); }; diff --git a/impeller/entity/entity_unittests.cc b/impeller/entity/entity_unittests.cc index b5d36ca2abad8..3ff5548509b5e 100644 --- a/impeller/entity/entity_unittests.cc +++ b/impeller/entity/entity_unittests.cc @@ -91,6 +91,13 @@ class TestPassDelegate final : public EntityPassDelegate { return nullptr; } + // |EntityPassDelegate| + std::shared_ptr WithImageFilter( + const FilterInput::Variant& input, + const Matrix& effect_transform) const override { + return nullptr; + } + private: const std::optional coverage_; const bool collapse_; From b1a3c2505955810e5fbfb38afc991c66ee83481d Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 14 Sep 2023 13:31:43 -0400 Subject: [PATCH 029/859] Roll Skia from 54253f58533d to 87025d1e162c (1 revision) (#45833) https://skia.googlesource.com/skia.git/+log/54253f58533d..87025d1e162c 2023-09-14 robertphillips@google.com [graphite] Add Blend method to assist paint key creation If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index ab59df33918b6..1fe1fb509b1fa 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '54253f58533d83eb6eb8e698048db065e419c030', + 'skia_revision': '87025d1e162c24e64db2a4369169303d1a060d77', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 0d8e421977be5..a3793e6162f7d 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 6a0ea9668bf71c1fbe13b2af6613d442 +Signature: eea7cccc5e3a4dbcb1560e08123bc1e8 ==================================================================================================== LIBRARY: etc1 From 662b31cb92e55a29363eb7347dedfca353066125 Mon Sep 17 00:00:00 2001 From: godofredoc Date: Thu, 14 Sep 2023 11:26:42 -0700 Subject: [PATCH 030/859] Update webdriver imports. (#45816) This is to be able to update the webdriver dependency. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- lib/web_ui/dev/webdriver_browser.dart | 2 +- lib/web_ui/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/web_ui/dev/webdriver_browser.dart b/lib/web_ui/dev/webdriver_browser.dart index 8c1c82a9b01c1..ef27394127fa7 100644 --- a/lib/web_ui/dev/webdriver_browser.dart +++ b/lib/web_ui/dev/webdriver_browser.dart @@ -8,7 +8,7 @@ import 'dart:io'; import 'dart:math'; import 'package:image/image.dart'; -import 'package:webdriver/io.dart' show WebDriver, createDriver; +import 'package:webdriver/async_io.dart' show WebDriver, createDriver; import 'browser.dart'; diff --git a/lib/web_ui/pubspec.yaml b/lib/web_ui/pubspec.yaml index cab85c2f223c6..3eb5e98ebb74f 100644 --- a/lib/web_ui/pubspec.yaml +++ b/lib/web_ui/pubspec.yaml @@ -45,7 +45,7 @@ dev_dependencies: uuid: 4.0.0 watcher: 1.1.0 web_socket_channel: any - webdriver: 3.0.1 + webdriver: 3.0.2 webkit_inspection_protocol: any yaml: 3.0.0 web_test_utils: From f7e12cf64504d288b678510c49669423cc0db358 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 14 Sep 2023 14:36:05 -0400 Subject: [PATCH 031/859] Manual roll Dart SDK from 1ee7ef8bbc65 to d25e8d682c8f (22 revisions) (#45836) Manual roll requested by zra@google.com https://dart.googlesource.com/sdk.git/+log/1ee7ef8bbc65..d25e8d682c8f 2023-09-14 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-162.0.dev 2023-09-14 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-161.0.dev 2023-09-13 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-160.0.dev 2023-09-13 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-159.0.dev 2023-09-13 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-158.0.dev 2023-09-13 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-157.0.dev 2023-09-13 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-156.0.dev 2023-09-12 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-155.0.dev 2023-09-12 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-154.0.dev 2023-09-12 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-153.0.dev 2023-09-12 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-152.0.dev 2023-09-12 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-151.0.dev 2023-09-12 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-150.0.dev 2023-09-11 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-149.0.dev 2023-09-11 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-148.0.dev 2023-09-11 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-147.0.dev 2023-09-08 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-146.0.dev 2023-09-08 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-145.0.dev 2023-09-08 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-144.0.dev 2023-09-08 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-143.0.dev 2023-09-07 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-142.0.dev 2023-09-07 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-141.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC bdero@google.com,dart-vm-team@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 16 ++++++++-------- ci/licenses_golden/excluded_files | 2 +- ci/licenses_golden/licenses_dart | 14 +++++++++----- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/DEPS b/DEPS index 1fe1fb509b1fa..92193ede0ce7a 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '1ee7ef8bbc6543b851f805027e1ca64f4e7909bd', + 'dart_revision': 'd25e8d682c8f7770fadb19291fcd2d2710b84406', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py @@ -74,9 +74,9 @@ vars = { 'dart_protobuf_rev': 'c16bc891978a1764f0d6d8eca54f420242c78a6a', 'dart_pub_rev': 'be6868ba132c782d9835b1638a634ecb73428579', 'dart_root_certificates_rev': '692f6d6488af68e0121317a9c2c9eb393eb0ee50', - 'dart_tools_rev': '2c8cbd63b96d94ef4fbc0c7df6fd5eff65fc9a85', + 'dart_tools_rev': 'fa01f9bad86b48757a96c6790fcd0812bf27def0', 'dart_watcher_rev': '1aed03e2a8005f45083fdb38cbd4b684cd23082f', - 'dart_webdev_rev': 'fc876cb0de59526160ed17efaa920557a6e2ba32', + 'dart_webdev_rev': '6b21ecf0256dc6ae9d7434b9332cf3c626253474', 'dart_webkit_inspection_protocol_rev': '39a3c297ff573635e7936b015ce4f3466e4739d6', 'dart_yaml_edit_rev': '4a9734dda12f63ef9eee4121f87ff4401e25a607', 'dart_zlib_rev': '14dd4c4455602c9b71a1a89b5cafd1f4030d2e3f', @@ -372,10 +372,10 @@ deps = { Var('dart_git') + '/csslib.git@bd30a1a773ec66d3e435dfc53fc140f1967716da', 'src/third_party/dart/third_party/pkg/dart_style': - Var('dart_git') + '/dart_style.git@2956b1a705953f880a5dae9d3a0969df0fc45e99', + Var('dart_git') + '/dart_style.git@1a2def95a3c04dafd27b85d17e6e828bd4afa1a3', 'src/third_party/dart/third_party/pkg/dartdoc': - Var('dart_git') + '/dartdoc.git@a32ba3a16baba6d4c785b0424a1cc3a0e83124ff', + Var('dart_git') + '/dartdoc.git@dd28f4ce4135c019c9943ef6c27e10cdcfe6760c', 'src/third_party/dart/third_party/pkg/ffi': Var('dart_git') + '/ffi.git@d36e05af55293bcc511d6b3a99ea4b8cb69f6323', @@ -393,7 +393,7 @@ deps = { Var('dart_git') + '/html.git@a1b193e95f13c995e7f7200ce0d363de5952e383', 'src/third_party/dart/third_party/pkg/http': - Var('dart_git') + '/http.git@7fb6fd686f6ce60af300be71a84defcc336d272e', + Var('dart_git') + '/http.git@de1921405c93f864ba1a6f646f664b16fa060a28', 'src/third_party/dart/third_party/pkg/http_multi_server': Var('dart_git') + '/http_multi_server.git@9d62ea396d7d282592edf994378f67fcde982ce8', @@ -474,7 +474,7 @@ deps = { Var('dart_git') + '/term_glyph.git@1b28285a7e818b8e87c4d2119d968c5b36d73c7a', 'src/third_party/dart/third_party/pkg/test': - Var('dart_git') + '/test.git@27dcae11f6630c0d980f521cf372e962d286e9d3', + Var('dart_git') + '/test.git@64494959ecdb2e777711487a1fb86555c0c20570', 'src/third_party/dart/third_party/pkg/test_reflective_loader': Var('dart_git') + '/test_reflective_loader.git@45c57d62fb08471681cd0b0a1c3b131bf0122929', @@ -507,7 +507,7 @@ deps = { Var('dart_git') + '/yaml_edit.git' + '@' + Var('dart_yaml_edit_rev'), 'src/third_party/dart/tools/sdks/dart-sdk': - {'dep_type': 'cipd', 'packages': [{'package': 'dart/dart-sdk/${{platform}}', 'version': 'version:3.1.0-298.0.dev'}]}, + {'dep_type': 'cipd', 'packages': [{'package': 'dart/dart-sdk/${{platform}}', 'version': 'version:3.2.0-150.0.dev'}]}, # WARNING: end of dart dependencies list that is cleaned up automatically - see create_updated_flutter_deps.py. diff --git a/ci/licenses_golden/excluded_files b/ci/licenses_golden/excluded_files index 9b1f50e0670f3..e728e514fb7e7 100644 --- a/ci/licenses_golden/excluded_files +++ b/ci/licenses_golden/excluded_files @@ -1592,8 +1592,8 @@ ../../../third_party/dart/runtime/third_party/double-conversion/.gitignore ../../../third_party/dart/runtime/third_party/double-conversion/AUTHORS ../../../third_party/dart/runtime/third_party/double-conversion/Changelog -../../../third_party/dart/runtime/third_party/double-conversion/README ../../../third_party/dart/runtime/third_party/double-conversion/README.dart +../../../third_party/dart/runtime/third_party/double-conversion/README.md ../../../third_party/dart/runtime/tools/.gitignore ../../../third_party/dart/runtime/tools/android_finder.py ../../../third_party/dart/runtime/tools/benchmark.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index 2433a1a934b1b..0f65a14171c7f 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: 2842791947e56be69f6d021381e26966 +Signature: b34b2da659aa12578e2249aa3f5e9f1a ==================================================================================================== LIBRARY: dart @@ -4688,12 +4688,12 @@ ORIGIN: ../../../third_party/dart/runtime/third_party/double-conversion/src/bign ORIGIN: ../../../third_party/dart/runtime/third_party/double-conversion/src/bignum.cc ORIGIN: ../../../third_party/dart/runtime/third_party/double-conversion/src/bignum.h ORIGIN: ../../../third_party/dart/runtime/third_party/double-conversion/src/cached-powers.h -ORIGIN: ../../../third_party/dart/runtime/third_party/double-conversion/src/diy-fp.cc ORIGIN: ../../../third_party/dart/runtime/third_party/double-conversion/src/diy-fp.h -ORIGIN: ../../../third_party/dart/runtime/third_party/double-conversion/src/double-conversion.cc +ORIGIN: ../../../third_party/dart/runtime/third_party/double-conversion/src/double-to-string.cc ORIGIN: ../../../third_party/dart/runtime/third_party/double-conversion/src/fast-dtoa.h ORIGIN: ../../../third_party/dart/runtime/third_party/double-conversion/src/fixed-dtoa.cc ORIGIN: ../../../third_party/dart/runtime/third_party/double-conversion/src/fixed-dtoa.h +ORIGIN: ../../../third_party/dart/runtime/third_party/double-conversion/src/string-to-double.cc ORIGIN: ../../../third_party/dart/runtime/third_party/double-conversion/src/strtod.cc ORIGIN: ../../../third_party/dart/runtime/third_party/double-conversion/src/strtod.h ORIGIN: ../../../third_party/dart/runtime/third_party/double-conversion/src/utils.h @@ -4703,12 +4703,12 @@ FILE: ../../../third_party/dart/runtime/third_party/double-conversion/src/bignum FILE: ../../../third_party/dart/runtime/third_party/double-conversion/src/bignum.cc FILE: ../../../third_party/dart/runtime/third_party/double-conversion/src/bignum.h FILE: ../../../third_party/dart/runtime/third_party/double-conversion/src/cached-powers.h -FILE: ../../../third_party/dart/runtime/third_party/double-conversion/src/diy-fp.cc FILE: ../../../third_party/dart/runtime/third_party/double-conversion/src/diy-fp.h -FILE: ../../../third_party/dart/runtime/third_party/double-conversion/src/double-conversion.cc +FILE: ../../../third_party/dart/runtime/third_party/double-conversion/src/double-to-string.cc FILE: ../../../third_party/dart/runtime/third_party/double-conversion/src/fast-dtoa.h FILE: ../../../third_party/dart/runtime/third_party/double-conversion/src/fixed-dtoa.cc FILE: ../../../third_party/dart/runtime/third_party/double-conversion/src/fixed-dtoa.h +FILE: ../../../third_party/dart/runtime/third_party/double-conversion/src/string-to-double.cc FILE: ../../../third_party/dart/runtime/third_party/double-conversion/src/strtod.cc FILE: ../../../third_party/dart/runtime/third_party/double-conversion/src/strtod.h FILE: ../../../third_party/dart/runtime/third_party/double-conversion/src/utils.h @@ -4745,12 +4745,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==================================================================================================== LIBRARY: double-conversion ORIGIN: ../../../third_party/dart/runtime/third_party/double-conversion/src/double-conversion.h +ORIGIN: ../../../third_party/dart/runtime/third_party/double-conversion/src/double-to-string.h ORIGIN: ../../../third_party/dart/runtime/third_party/double-conversion/src/fast-dtoa.cc ORIGIN: ../../../third_party/dart/runtime/third_party/double-conversion/src/ieee.h +ORIGIN: ../../../third_party/dart/runtime/third_party/double-conversion/src/string-to-double.h TYPE: LicenseType.bsd FILE: ../../../third_party/dart/runtime/third_party/double-conversion/src/double-conversion.h +FILE: ../../../third_party/dart/runtime/third_party/double-conversion/src/double-to-string.h FILE: ../../../third_party/dart/runtime/third_party/double-conversion/src/fast-dtoa.cc FILE: ../../../third_party/dart/runtime/third_party/double-conversion/src/ieee.h +FILE: ../../../third_party/dart/runtime/third_party/double-conversion/src/string-to-double.h ---------------------------------------------------------------------------------------------------- Copyright 2012 the V8 project authors. All rights reserved. From e9cedebf85734606ad1cf6e50c1403abdd86a5c0 Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Thu, 14 Sep 2023 11:37:49 -0700 Subject: [PATCH 032/859] Make `fml::ScopedCleanupClosure` `std::move`-able and add unit tests. (#45772) Fixes https://github.com/flutter/flutter/issues/134568. --- ci/licenses_golden/excluded_files | 1 + fml/BUILD.gn | 1 + fml/closure.h | 11 ++++- fml/closure_unittests.cc | 71 +++++++++++++++++++++++++++++++ 4 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 fml/closure_unittests.cc diff --git a/ci/licenses_golden/excluded_files b/ci/licenses_golden/excluded_files index e728e514fb7e7..08a10f984b050 100644 --- a/ci/licenses_golden/excluded_files +++ b/ci/licenses_golden/excluded_files @@ -83,6 +83,7 @@ ../../../flutter/fml/ascii_trie_unittests.cc ../../../flutter/fml/backtrace_unittests.cc ../../../flutter/fml/base32_unittest.cc +../../../flutter/fml/closure_unittests.cc ../../../flutter/fml/command_line_unittest.cc ../../../flutter/fml/container_unittests.cc ../../../flutter/fml/endianness_unittests.cc diff --git a/fml/BUILD.gn b/fml/BUILD.gn index 7906c32968b4c..a585864159444 100644 --- a/fml/BUILD.gn +++ b/fml/BUILD.gn @@ -319,6 +319,7 @@ if (enable_unittests) { "ascii_trie_unittests.cc", "backtrace_unittests.cc", "base32_unittest.cc", + "closure_unittests.cc", "command_line_unittest.cc", "container_unittests.cc", "endianness_unittests.cc", diff --git a/fml/closure.h b/fml/closure.h index 7631f3a7be439..3a0de0dcbbc6d 100644 --- a/fml/closure.h +++ b/fml/closure.h @@ -29,10 +29,19 @@ using closure = std::function; /// automatically at the end of the scope. This covers the cases /// where there are early returns as well. /// -class ScopedCleanupClosure { +class ScopedCleanupClosure final { public: ScopedCleanupClosure() = default; + ScopedCleanupClosure(ScopedCleanupClosure&& other) { + closure_ = other.Release(); + } + + ScopedCleanupClosure& operator=(ScopedCleanupClosure&& other) { + closure_ = other.Release(); + return *this; + } + explicit ScopedCleanupClosure(const fml::closure& closure) : closure_(closure) {} diff --git a/fml/closure_unittests.cc b/fml/closure_unittests.cc new file mode 100644 index 0000000000000..37124d9ae16c6 --- /dev/null +++ b/fml/closure_unittests.cc @@ -0,0 +1,71 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "fml/closure.h" +#include "gtest/gtest.h" + +TEST(ScopedCleanupClosureTest, DestructorDoesNothingWhenNoClosureSet) { + fml::ScopedCleanupClosure cleanup; + + // Nothing should happen. +} + +TEST(ScopedCleanupClosureTest, ReleaseDoesNothingWhenNoClosureSet) { + fml::ScopedCleanupClosure cleanup; + + // Nothing should happen. + EXPECT_EQ(nullptr, cleanup.Release()); +} + +TEST(ScopedCleanupClosureTest, ClosureInvokedOnDestructorWhenSetInConstructor) { + auto invoked = false; + + { + fml::ScopedCleanupClosure cleanup([&invoked]() { invoked = true; }); + + EXPECT_FALSE(invoked); + } + + EXPECT_TRUE(invoked); +} + +TEST(ScopedCleanupClosureTest, ClosureInvokedOnDestructorWhenSet) { + auto invoked = false; + + { + fml::ScopedCleanupClosure cleanup; + cleanup.SetClosure([&invoked]() { invoked = true; }); + + EXPECT_FALSE(invoked); + } + + EXPECT_TRUE(invoked); +} + +TEST(ScopedCleanupClosureTest, ClosureNotInvokedWhenMoved) { + auto invoked = 0; + + { + fml::ScopedCleanupClosure cleanup([&invoked]() { invoked++; }); + fml::ScopedCleanupClosure cleanup2(std::move(cleanup)); + + EXPECT_EQ(0, invoked); + } + + EXPECT_EQ(1, invoked); +} + +TEST(ScopedCleanupClosureTest, ClosureNotInvokedWhenMovedViaAssignment) { + auto invoked = 0; + + { + fml::ScopedCleanupClosure cleanup([&invoked]() { invoked++; }); + fml::ScopedCleanupClosure cleanup2; + cleanup2 = std::move(cleanup); + + EXPECT_EQ(0, invoked); + } + + EXPECT_EQ(1, invoked); +} From 5fa50fc36c17e4451376e2163588c6d2a1170fe2 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 14 Sep 2023 14:37:52 -0400 Subject: [PATCH 033/859] Roll Skia from 87025d1e162c to 9bdf01416042 (1 revision) (#45835) https://skia.googlesource.com/skia.git/+log/87025d1e162c..9bdf01416042 2023-09-14 kjlubick@google.com Make SkJpegConstants.h visible when just encoding JPEG If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 92193ede0ce7a..fff28b0e53ef4 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '87025d1e162c24e64db2a4369169303d1a060d77', + 'skia_revision': '9bdf01416042dc6f50e2c6c43658167e64b70a8f', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 0cdcfae147f63611d670294e22b50cfdbddaf18a Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Thu, 14 Sep 2023 11:39:01 -0700 Subject: [PATCH 034/859] [Impeller] Release a texture during Playground teardown (#45832) Closes https://github.com/flutter/flutter/issues/134678. Partial work towards https://github.com/flutter/flutter/issues/133708, https://github.com/flutter/flutter/issues/133506. This gets us closer to being able to run `aiks_unittests` with validations enabled, removing a VMA allocation error: ## Before ```txt Note: Google Test filter = Play/AiksTest.ReleasesTextureOnTeardown/Vulkan [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from Play/AiksTest [ RUN ] Play/AiksTest.ReleasesTextureOnTeardown/Vulkan [INFO:capabilities_vk.cc(50)] Vulkan validations are enabled. [FATAL:third_party/vulkan_memory_allocator/include/vk_mem_alloc.h(6179)] Check failed: (false && "Unfreed dedicated allocations found!"). Vulkan Memory Allocator Failure! ``` ## After ```txt Note: Google Test filter = Play/AiksTest.ReleasesTextureOnTeardown/Vulkan [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from Play/AiksTest [ RUN ] Play/AiksTest.ReleasesTextureOnTeardown/Vulkan [INFO:capabilities_vk.cc(50)] Vulkan validations are enabled. [ OK ] Play/AiksTest.ReleasesTextureOnTeardown/Vulkan (1192 ms) [----------] 1 test from Play/AiksTest (1192 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test suite ran. (1192 ms total) [ PASSED ] 1 test. ``` --- Added a test that will catch regressions. --- impeller/aiks/aiks_playground.cc | 5 ++++ impeller/aiks/aiks_playground.h | 2 ++ impeller/aiks/aiks_playground_inspector.cc | 4 +++ impeller/aiks/aiks_playground_inspector.h | 11 ++++++++ impeller/aiks/aiks_unittests.cc | 33 ++++++++++++++++++++++ 5 files changed, 55 insertions(+) diff --git a/impeller/aiks/aiks_playground.cc b/impeller/aiks/aiks_playground.cc index 3f31c658daedb..b9ed2a828e7ae 100644 --- a/impeller/aiks/aiks_playground.cc +++ b/impeller/aiks/aiks_playground.cc @@ -23,6 +23,11 @@ void AiksPlayground::SetTypographerContext( typographer_context_ = std::move(typographer_context); } +void AiksPlayground::TearDown() { + inspector_.HackResetDueToTextureLeaks(); + PlaygroundTest::TearDown(); +} + bool AiksPlayground::OpenPlaygroundHere(Picture picture) { return OpenPlaygroundHere([&picture](AiksContext& renderer) -> Picture { return std::move(picture); diff --git a/impeller/aiks/aiks_playground.h b/impeller/aiks/aiks_playground.h index d33a15b07f6cf..e01f0ef92de09 100644 --- a/impeller/aiks/aiks_playground.h +++ b/impeller/aiks/aiks_playground.h @@ -22,6 +22,8 @@ class AiksPlayground : public PlaygroundTest { ~AiksPlayground(); + void TearDown() override; + void SetTypographerContext( std::shared_ptr typographer_context); diff --git a/impeller/aiks/aiks_playground_inspector.cc b/impeller/aiks/aiks_playground_inspector.cc index 0f8721358d010..89ace8c5d1283 100644 --- a/impeller/aiks/aiks_playground_inspector.cc +++ b/impeller/aiks/aiks_playground_inspector.cc @@ -63,6 +63,10 @@ const std::optional& AiksInspector::RenderInspector( return last_picture_; } +void AiksInspector::HackResetDueToTextureLeaks() { + last_picture_.reset(); +} + static const auto kPropertiesProcTable = CaptureProcTable{ .boolean = [](CaptureBooleanProperty& p) { diff --git a/impeller/aiks/aiks_playground_inspector.h b/impeller/aiks/aiks_playground_inspector.h index 95b1e0777809e..b86b51baec7b2 100644 --- a/impeller/aiks/aiks_playground_inspector.h +++ b/impeller/aiks/aiks_playground_inspector.h @@ -21,6 +21,17 @@ class AiksInspector { AiksContext& aiks_context, const std::function()>& picture_callback); + // Resets (releases) the underlying |Picture| object. + // + // Underlying issue: . + // + // The tear-down code is not running in the right order; we still have a + // reference to the |Picture| object when the |Context| is being destroyed, + // which causes the |Texture| objects to leak. + // + // TODO(matanlurey): https://github.com/flutter/flutter/issues/134748. + void HackResetDueToTextureLeaks(); + private: void RenderCapture(CaptureContext& capture_context); void RenderCaptureElement(CaptureElement& element); diff --git a/impeller/aiks/aiks_unittests.cc b/impeller/aiks/aiks_unittests.cc index 06f551be4832a..4097a43dca3c4 100644 --- a/impeller/aiks/aiks_unittests.cc +++ b/impeller/aiks/aiks_unittests.cc @@ -3409,5 +3409,38 @@ TEST_P(AiksTest, CaptureInactivatedByDefault) { ASSERT_FALSE(GetContext()->capture.IsActive()); } +// Regression test for https://github.com/flutter/flutter/issues/134678. +TEST_P(AiksTest, ReleasesTextureOnTeardown) { + auto context = GetContext(); + std::weak_ptr weak_texture; + + { + auto texture = CreateTextureForFixture("table_mountain_nx.png"); + + Canvas canvas; + canvas.Scale(GetContentScale()); + canvas.Translate({100.0f, 100.0f, 0}); + + Paint paint; + paint.color_source = ColorSource::MakeImage( + texture, Entity::TileMode::kClamp, Entity::TileMode::kClamp, {}, {}); + canvas.DrawRect({0, 0, 600, 600}, paint); + + ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); + } + + // See https://github.com/flutter/flutter/issues/134751. + // + // If the fence waiter was working this may not be released by the end of the + // scope above. Adding a manual shutdown so that future changes to the fence + // waiter will not flake this test. + context->Shutdown(); + + // The texture should be released by now. + ASSERT_TRUE(weak_texture.expired()) << "When the texture is no longer in use " + "by the backend, it should be " + "released."; +} + } // namespace testing } // namespace impeller From 3c9bcea9fd9c8ffb8e5e13ae0d5a33f2e0c193f9 Mon Sep 17 00:00:00 2001 From: Jackson Gardner Date: Thu, 14 Sep 2023 11:50:48 -0700 Subject: [PATCH 035/859] Declare the js context as nullable in skwasm surface callback (#45810) Declaring this as non-nullable causes breakage with an incoming JS interop change from the SDK. Marking this as nullable fixes the issue. This doesn't actually change any behavior. The breakages were in `test/ui/image_golden_test.dart`. No changes to the test are required (they did catch the issue when the dart roll happened). --- lib/web_ui/lib/src/engine/skwasm/skwasm_impl/surface.dart | 2 +- lib/web_ui/skwasm/library_skwasm_support.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/surface.dart b/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/surface.dart index bce7a8a62edf0..4827c78b00f77 100644 --- a/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/surface.dart +++ b/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/surface.dart @@ -78,7 +78,7 @@ class SkwasmSurface { return completer.future; } - void _callbackHandler(JSNumber callbackId, JSNumber context, JSAny jsContext) { + void _callbackHandler(JSNumber callbackId, JSNumber context, JSAny? jsContext) { final Completer completer = _pendingCallbacks.remove(callbackId.toDartInt)!; if (jsContext.isUndefinedOrNull) { completer.complete(context); diff --git a/lib/web_ui/skwasm/library_skwasm_support.js b/lib/web_ui/skwasm/library_skwasm_support.js index d1c3459d10809..c9c1aba46db3e 100644 --- a/lib/web_ui/skwasm/library_skwasm_support.js +++ b/lib/web_ui/skwasm/library_skwasm_support.js @@ -39,8 +39,9 @@ mergeInto(LibraryManager.library, { object.close(); } associatedObjectsMap.delete(data.pointer); + return; default: - console.warn('unrecognized skwasm message'); + console.warn(`unrecognized skwasm message: ${skwasmMessage}`); } }; if (!threadId) { From 0f30489a08aa072bac05ea5acf1665d70da102dd Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 14 Sep 2023 15:26:19 -0400 Subject: [PATCH 036/859] Roll Skia from 9bdf01416042 to 0f003d5748bc (4 revisions) (#45841) https://skia.googlesource.com/skia.git/+log/9bdf01416042..0f003d5748bc 2023-09-14 michaelludwig@google.com Reland "Reland "Add epsilon to texture effect clamping at pixel centers"" 2023-09-14 cmumford@google.com [infra] Stop building legacy Skottie Docker image 2023-09-14 robertphillips@google.com [graphite] Expand usage of Blend helper 2023-09-14 lovisolo@google.com [bazel] Add "bazel clean" step to all Bazel task drivers. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index fff28b0e53ef4..7bcb777fdbced 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '9bdf01416042dc6f50e2c6c43658167e64b70a8f', + 'skia_revision': '0f003d5748bc86ba17e87d4673434ab065b832a3', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index a3793e6162f7d..446d54c85e06d 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: eea7cccc5e3a4dbcb1560e08123bc1e8 +Signature: a051b3deca41a836cb34b632ba51166b ==================================================================================================== LIBRARY: etc1 From 40b0acc5cbc86d6882d18840a867b2bdb8ea8d1a Mon Sep 17 00:00:00 2001 From: Brandon DeRosier Date: Thu, 14 Sep 2023 13:01:17 -0700 Subject: [PATCH 037/859] [Impeller] Add AbsorbOpacity enum. (#45838) Part of https://github.com/flutter/flutter/issues/134681. --- impeller/aiks/color_filter.cc | 8 +-- impeller/aiks/color_filter.h | 10 +-- impeller/aiks/color_source.cc | 5 +- impeller/aiks/image_filter.cc | 4 +- impeller/aiks/paint.cc | 9 +-- impeller/aiks/paint.h | 6 +- .../contents/filters/blend_filter_contents.cc | 72 ++++++++++++------- .../contents/filters/blend_filter_contents.h | 22 +++--- .../contents/filters/color_filter_contents.cc | 5 +- .../contents/filters/color_filter_contents.h | 11 ++- .../filters/color_matrix_filter_contents.cc | 6 +- .../filters/linear_to_srgb_filter_contents.cc | 5 +- .../filters/srgb_to_linear_filter_contents.cc | 5 +- 13 files changed, 104 insertions(+), 64 deletions(-) diff --git a/impeller/aiks/color_filter.cc b/impeller/aiks/color_filter.cc index 72868a0c0d10f..87f7022e1cd1f 100644 --- a/impeller/aiks/color_filter.cc +++ b/impeller/aiks/color_filter.cc @@ -45,7 +45,7 @@ BlendColorFilter::~BlendColorFilter() = default; std::shared_ptr BlendColorFilter::WrapWithGPUColorFilter( std::shared_ptr input, - bool absorb_opacity) const { + ColorFilterContents::AbsorbOpacity absorb_opacity) const { auto filter = ColorFilterContents::MakeBlend(blend_mode_, {std::move(input)}, color_); filter->SetAbsorbOpacity(absorb_opacity); @@ -73,7 +73,7 @@ MatrixColorFilter::~MatrixColorFilter() = default; std::shared_ptr MatrixColorFilter::WrapWithGPUColorFilter( std::shared_ptr input, - bool absorb_opacity) const { + ColorFilterContents::AbsorbOpacity absorb_opacity) const { auto filter = ColorFilterContents::MakeColorMatrix({std::move(input)}, color_matrix_); filter->SetAbsorbOpacity(absorb_opacity); @@ -101,7 +101,7 @@ SrgbToLinearColorFilter::~SrgbToLinearColorFilter() = default; std::shared_ptr SrgbToLinearColorFilter::WrapWithGPUColorFilter( std::shared_ptr input, - bool absorb_opacity) const { + ColorFilterContents::AbsorbOpacity absorb_opacity) const { auto filter = ColorFilterContents::MakeSrgbToLinearFilter({std::move(input)}); filter->SetAbsorbOpacity(absorb_opacity); return filter; @@ -127,7 +127,7 @@ LinearToSrgbColorFilter::~LinearToSrgbColorFilter() = default; std::shared_ptr LinearToSrgbColorFilter::WrapWithGPUColorFilter( std::shared_ptr input, - bool absorb_opacity) const { + ColorFilterContents::AbsorbOpacity absorb_opacity) const { auto filter = ColorFilterContents::MakeSrgbToLinearFilter({std::move(input)}); filter->SetAbsorbOpacity(absorb_opacity); return filter; diff --git a/impeller/aiks/color_filter.h b/impeller/aiks/color_filter.h index 234cbc63c160f..1c5bf32dd9f8a 100644 --- a/impeller/aiks/color_filter.h +++ b/impeller/aiks/color_filter.h @@ -43,7 +43,7 @@ class ColorFilter { /// treated as color information. virtual std::shared_ptr WrapWithGPUColorFilter( std::shared_ptr input, - bool absorb_opacity) const = 0; + ColorFilterContents::AbsorbOpacity absorb_opacity) const = 0; /// @brief Returns a function that can be used to filter unpremultiplied /// Impeller Colors on the CPU. @@ -65,7 +65,7 @@ class BlendColorFilter final : public ColorFilter { // |ColorFilter| std::shared_ptr WrapWithGPUColorFilter( std::shared_ptr input, - bool absorb_opacity) const override; + ColorFilterContents::AbsorbOpacity absorb_opacity) const override; // |ColorFilter| ColorFilterProc GetCPUColorFilterProc() const override; @@ -91,7 +91,7 @@ class MatrixColorFilter final : public ColorFilter { // |ColorFilter| std::shared_ptr WrapWithGPUColorFilter( std::shared_ptr input, - bool absorb_opacity) const override; + ColorFilterContents::AbsorbOpacity absorb_opacity) const override; // |ColorFilter| ColorFilterProc GetCPUColorFilterProc() const override; @@ -116,7 +116,7 @@ class SrgbToLinearColorFilter final : public ColorFilter { // |ColorFilter| std::shared_ptr WrapWithGPUColorFilter( std::shared_ptr input, - bool absorb_opacity) const override; + ColorFilterContents::AbsorbOpacity absorb_opacity) const override; // |ColorFilter| ColorFilterProc GetCPUColorFilterProc() const override; @@ -138,7 +138,7 @@ class LinearToSrgbColorFilter final : public ColorFilter { // |ColorFilter| std::shared_ptr WrapWithGPUColorFilter( std::shared_ptr input, - bool absorb_opacity) const override; + ColorFilterContents::AbsorbOpacity absorb_opacity) const override; // |ColorFilter| ColorFilterProc GetCPUColorFilterProc() const override; diff --git a/impeller/aiks/color_source.cc b/impeller/aiks/color_source.cc index 3329bcb4b832e..da3191f2d63c4 100644 --- a/impeller/aiks/color_source.cc +++ b/impeller/aiks/color_source.cc @@ -10,6 +10,7 @@ #include "impeller/aiks/paint.h" #include "impeller/core/sampler_descriptor.h" #include "impeller/entity/contents/conical_gradient_contents.h" +#include "impeller/entity/contents/filters/color_filter_contents.h" #include "impeller/entity/contents/linear_gradient_contents.h" #include "impeller/entity/contents/radial_gradient_contents.h" #include "impeller/entity/contents/runtime_effect_contents.h" @@ -182,8 +183,8 @@ ColorSource ColorSource::MakeImage(std::shared_ptr texture, if (paint.color_filter) { TiledTextureContents::ColorFilterProc filter_proc = [color_filter = paint.color_filter](FilterInput::Ref input) { - return color_filter->WrapWithGPUColorFilter(std::move(input), - false); + return color_filter->WrapWithGPUColorFilter( + std::move(input), ColorFilterContents::AbsorbOpacity::kNo); }; contents->SetColorFilter(filter_proc); } diff --git a/impeller/aiks/image_filter.cc b/impeller/aiks/image_filter.cc index 6420e8c293df7..7eba48713c8a3 100644 --- a/impeller/aiks/image_filter.cc +++ b/impeller/aiks/image_filter.cc @@ -3,6 +3,7 @@ // found in the LICENSE file. #include "impeller/aiks/image_filter.h" +#include "impeller/entity/contents/filters/color_filter_contents.h" #include "impeller/entity/contents/filters/filter_contents.h" #include "impeller/entity/contents/filters/inputs/filter_input.h" @@ -175,7 +176,8 @@ ColorImageFilter::~ColorImageFilter() = default; std::shared_ptr ColorImageFilter::WrapInput( const FilterInput::Ref& input) const { - return color_filter_->WrapWithGPUColorFilter(input, false); + return color_filter_->WrapWithGPUColorFilter( + input, ColorFilterContents::AbsorbOpacity::kNo); } std::shared_ptr ColorImageFilter::Clone() const { diff --git a/impeller/aiks/paint.cc b/impeller/aiks/paint.cc index 5c2b808c69eb3..9950661705444 100644 --- a/impeller/aiks/paint.cc +++ b/impeller/aiks/paint.cc @@ -58,7 +58,7 @@ std::shared_ptr Paint::CreateContentsForGeometry( std::shared_ptr Paint::WithFilters( std::shared_ptr input) const { - input = WithColorFilter(input, /*absorb_opacity=*/true); + input = WithColorFilter(input, ColorFilterContents::AbsorbOpacity::kYes); input = WithInvertFilter(input); auto image_filter = WithImageFilter(input, Matrix(), /*is_subpass=*/false); if (image_filter) { @@ -75,7 +75,7 @@ std::shared_ptr Paint::WithFiltersForSubpassTarget( if (image_filter) { input = image_filter; } - input = WithColorFilter(input, /*absorb_opacity=*/true); + input = WithColorFilter(input, ColorFilterContents::AbsorbOpacity::kYes); return input; } @@ -103,7 +103,7 @@ std::shared_ptr Paint::WithImageFilter( std::shared_ptr Paint::WithColorFilter( std::shared_ptr input, - bool absorb_opacity) const { + ColorFilterContents::AbsorbOpacity absorb_opacity) const { // Image input types will directly set their color filter, // if any. See `TiledTextureContents.SetColorFilter`. if (color_source.GetType() == ColorSource::Type::kImage) { @@ -186,7 +186,8 @@ std::shared_ptr Paint::MaskBlurDescriptor::CreateMaskBlur( if (color_filter) { color_contents = color_filter->WrapWithGPUColorFilter( - FilterInput::Make(color_source_contents), true); + FilterInput::Make(color_source_contents), + ColorFilterContents::AbsorbOpacity::kYes); } /// 5. Composite the color source with the blurred mask. diff --git a/impeller/aiks/paint.h b/impeller/aiks/paint.h index 384b4bdb1f150..e13fd9122f8ad 100644 --- a/impeller/aiks/paint.h +++ b/impeller/aiks/paint.h @@ -104,8 +104,10 @@ struct Paint { bool is_subpass) const; private: - std::shared_ptr WithColorFilter(std::shared_ptr input, - bool absorb_opacity = false) const; + std::shared_ptr WithColorFilter( + std::shared_ptr input, + ColorFilterContents::AbsorbOpacity absorb_opacity = + ColorFilterContents::AbsorbOpacity::kNo) const; std::shared_ptr WithInvertFilter( std::shared_ptr input) const; diff --git a/impeller/entity/contents/filters/blend_filter_contents.cc b/impeller/entity/contents/filters/blend_filter_contents.cc index 3c1b8617612f2..7e50634e4d185 100644 --- a/impeller/entity/contents/filters/blend_filter_contents.cc +++ b/impeller/entity/contents/filters/blend_filter_contents.cc @@ -13,6 +13,7 @@ #include "impeller/entity/contents/anonymous_contents.h" #include "impeller/entity/contents/content_context.h" #include "impeller/entity/contents/contents.h" +#include "impeller/entity/contents/filters/color_filter_contents.h" #include "impeller/entity/contents/filters/inputs/filter_input.h" #include "impeller/entity/contents/solid_color_contents.h" #include "impeller/entity/entity.h" @@ -76,7 +77,7 @@ static std::optional AdvancedBlend( const Rect& coverage, BlendMode blend_mode, std::optional foreground_color, - bool absorb_opacity, + ColorFilterContents::AbsorbOpacity absorb_opacity, PipelineProc pipeline_proc, std::optional alpha) { using VS = typename TPipeline::VertexShader; @@ -184,7 +185,10 @@ static std::optional AdvancedBlend( dst_sampler_descriptor); FS::BindTextureSamplerDst(cmd, dst_snapshot->texture, dst_sampler); frame_info.dst_y_coord_scale = dst_snapshot->texture->GetYCoordScale(); - blend_info.dst_input_alpha = absorb_opacity ? dst_snapshot->opacity : 1.0; + blend_info.dst_input_alpha = + absorb_opacity == ColorFilterContents::AbsorbOpacity::kYes + ? dst_snapshot->opacity + : 1.0; if (foreground_color.has_value()) { blend_info.color_factor = 1; @@ -227,14 +231,17 @@ static std::optional AdvancedBlend( } return Entity::FromSnapshot( - Snapshot{.texture = out_texture, - .transform = Matrix::MakeTranslation(subpass_coverage.origin), - // Since we absorbed the transform of the inputs and used the - // respective snapshot sampling modes when blending, pass on - // the default NN clamp sampler. - .sampler_descriptor = {}, - .opacity = (absorb_opacity ? 1.0f : dst_snapshot->opacity) * - alpha.value_or(1.0)}, + Snapshot{ + .texture = out_texture, + .transform = Matrix::MakeTranslation(subpass_coverage.origin), + // Since we absorbed the transform of the inputs and used the + // respective snapshot sampling modes when blending, pass on + // the default NN clamp sampler. + .sampler_descriptor = {}, + .opacity = (absorb_opacity == ColorFilterContents::AbsorbOpacity::kYes + ? 1.0f + : dst_snapshot->opacity) * + alpha.value_or(1.0)}, entity.GetBlendMode(), entity.GetStencilDepth()); } @@ -246,7 +253,7 @@ std::optional BlendFilterContents::CreateForegroundAdvancedBlend( Color foreground_color, BlendMode blend_mode, std::optional alpha, - bool absorb_opacity) const { + ColorFilterContents::AbsorbOpacity absorb_opacity) const { auto dst_snapshot = input->GetSnapshot("ForegroundAdvancedBlend", renderer, entity); if (!dst_snapshot.has_value()) { @@ -353,7 +360,9 @@ std::optional BlendFilterContents::CreateForegroundAdvancedBlend( FS::BindTextureSamplerDst(cmd, dst_snapshot->texture, dst_sampler); frame_info.dst_y_coord_scale = dst_snapshot->texture->GetYCoordScale(); blend_info.dst_input_alpha = - absorb_opacity ? dst_snapshot->opacity * alpha.value_or(1.0) : 1.0; + absorb_opacity == ColorFilterContents::AbsorbOpacity::kYes + ? dst_snapshot->opacity * alpha.value_or(1.0) + : 1.0; blend_info.color_factor = 1; blend_info.color = foreground_color; @@ -395,7 +404,7 @@ std::optional BlendFilterContents::CreateForegroundPorterDuffBlend( Color foreground_color, BlendMode blend_mode, std::optional alpha, - bool absorb_opacity) const { + ColorFilterContents::AbsorbOpacity absorb_opacity) const { if (blend_mode == BlendMode::kClear) { return std::nullopt; } @@ -477,7 +486,9 @@ std::optional BlendFilterContents::CreateForegroundPorterDuffBlend( dst_snapshot->texture->GetYCoordScale(); frag_info.input_alpha = - absorb_opacity ? dst_snapshot->opacity * alpha.value_or(1.0) : 1.0; + absorb_opacity == ColorFilterContents::AbsorbOpacity::kYes + ? dst_snapshot->opacity * alpha.value_or(1.0) + : 1.0; frag_info.output_alpha = 1.0; auto blend_coefficients = @@ -520,7 +531,7 @@ static std::optional PipelineBlend( const Rect& coverage, BlendMode blend_mode, std::optional foreground_color, - bool absorb_opacity, + ColorFilterContents::AbsorbOpacity absorb_opacity, std::optional alpha) { using VS = BlendPipeline::VertexShader; using FS = BlendPipeline::FragmentShader; @@ -589,7 +600,10 @@ static std::optional PipelineBlend( input->texture->GetYCoordScale(); FS::FragInfo frag_info; - frag_info.input_alpha = absorb_opacity ? input->opacity : 1.0; + frag_info.input_alpha = + absorb_opacity == ColorFilterContents::AbsorbOpacity::kYes + ? input->opacity + : 1.0; FS::BindFragInfo(cmd, host_buffer.EmplaceUniform(frag_info)); VS::BindFrameInfo(cmd, host_buffer.EmplaceUniform(frame_info)); @@ -647,14 +661,17 @@ static std::optional PipelineBlend( } return Entity::FromSnapshot( - Snapshot{.texture = out_texture, - .transform = Matrix::MakeTranslation(subpass_coverage.origin), - // Since we absorbed the transform of the inputs and used the - // respective snapshot sampling modes when blending, pass on - // the default NN clamp sampler. - .sampler_descriptor = {}, - .opacity = (absorb_opacity ? 1.0f : dst_snapshot->opacity) * - alpha.value_or(1.0)}, + Snapshot{ + .texture = out_texture, + .transform = Matrix::MakeTranslation(subpass_coverage.origin), + // Since we absorbed the transform of the inputs and used the + // respective snapshot sampling modes when blending, pass on + // the default NN clamp sampler. + .sampler_descriptor = {}, + .opacity = (absorb_opacity == ColorFilterContents::AbsorbOpacity::kYes + ? 1.0f + : dst_snapshot->opacity) * + alpha.value_or(1.0)}, entity.GetBlendMode(), entity.GetStencilDepth()); } @@ -663,7 +680,8 @@ static std::optional PipelineBlend( advanced_blend_proc_ = \ [](const FilterInput::Vector& inputs, const ContentContext& renderer, \ const Entity& entity, const Rect& coverage, BlendMode blend_mode, \ - std::optional fg_color, bool absorb_opacity, \ + std::optional fg_color, \ + ColorFilterContents::AbsorbOpacity absorb_opacity, \ std::optional alpha) { \ PipelineProc p = &ContentContext::GetBlend##mode##Pipeline; \ return AdvancedBlend( \ @@ -726,7 +744,7 @@ std::optional BlendFilterContents::RenderFilter( if (blend_mode_ <= Entity::kLastPipelineBlendMode) { if (inputs.size() == 1 && foreground_color_.has_value() && - GetAbsorbOpacity()) { + GetAbsorbOpacity() == ColorFilterContents::AbsorbOpacity::kYes) { return CreateForegroundPorterDuffBlend( inputs[0], renderer, entity, coverage, foreground_color_.value(), blend_mode_, GetAlpha(), GetAbsorbOpacity()); @@ -737,7 +755,7 @@ std::optional BlendFilterContents::RenderFilter( if (blend_mode_ <= Entity::kLastAdvancedBlendMode) { if (inputs.size() == 1 && foreground_color_.has_value() && - GetAbsorbOpacity()) { + GetAbsorbOpacity() == ColorFilterContents::AbsorbOpacity::kYes) { return CreateForegroundAdvancedBlend( inputs[0], renderer, entity, coverage, foreground_color_.value(), blend_mode_, GetAlpha(), GetAbsorbOpacity()); diff --git a/impeller/entity/contents/filters/blend_filter_contents.h b/impeller/entity/contents/filters/blend_filter_contents.h index f279f7f926bd8..a0e49d2adabee 100644 --- a/impeller/entity/contents/filters/blend_filter_contents.h +++ b/impeller/entity/contents/filters/blend_filter_contents.h @@ -33,15 +33,15 @@ std::optional InvertPorterDuffBlend(BlendMode blend_mode); class BlendFilterContents : public ColorFilterContents { public: - using AdvancedBlendProc = - std::function(const FilterInput::Vector& inputs, - const ContentContext& renderer, - const Entity& entity, - const Rect& coverage, - BlendMode blend_mode, - std::optional foreground_color, - bool absorb_opacity, - std::optional alpha)>; + using AdvancedBlendProc = std::function( + const FilterInput::Vector& inputs, + const ContentContext& renderer, + const Entity& entity, + const Rect& coverage, + BlendMode blend_mode, + std::optional foreground_color, + ColorFilterContents::AbsorbOpacity absorb_opacity, + std::optional alpha)>; BlendFilterContents(); @@ -75,7 +75,7 @@ class BlendFilterContents : public ColorFilterContents { Color foreground_color, BlendMode blend_mode, std::optional alpha, - bool absorb_opacity) const; + ColorFilterContents::AbsorbOpacity absorb_opacity) const; /// @brief Optimized porter-duff blend that avoids a second subpass when there /// is only a single input and a foreground color. @@ -89,7 +89,7 @@ class BlendFilterContents : public ColorFilterContents { Color foreground_color, BlendMode blend_mode, std::optional alpha, - bool absorb_opacity) const; + ColorFilterContents::AbsorbOpacity absorb_opacity) const; BlendMode blend_mode_ = BlendMode::kSourceOver; AdvancedBlendProc advanced_blend_proc_; diff --git a/impeller/entity/contents/filters/color_filter_contents.cc b/impeller/entity/contents/filters/color_filter_contents.cc index 51de176698bba..f5a36456a451f 100644 --- a/impeller/entity/contents/filters/color_filter_contents.cc +++ b/impeller/entity/contents/filters/color_filter_contents.cc @@ -82,11 +82,12 @@ ColorFilterContents::ColorFilterContents() = default; ColorFilterContents::~ColorFilterContents() = default; -void ColorFilterContents::SetAbsorbOpacity(bool absorb_opacity) { +void ColorFilterContents::SetAbsorbOpacity(AbsorbOpacity absorb_opacity) { absorb_opacity_ = absorb_opacity; } -bool ColorFilterContents::GetAbsorbOpacity() const { +ColorFilterContents::AbsorbOpacity ColorFilterContents::GetAbsorbOpacity() + const { return absorb_opacity_; } diff --git a/impeller/entity/contents/filters/color_filter_contents.h b/impeller/entity/contents/filters/color_filter_contents.h index 0099c16a6c282..f09b2d7287b80 100644 --- a/impeller/entity/contents/filters/color_filter_contents.h +++ b/impeller/entity/contents/filters/color_filter_contents.h @@ -10,6 +10,11 @@ namespace impeller { class ColorFilterContents : public FilterContents { public: + enum class AbsorbOpacity { + kYes, + kNo, + }; + /// @brief the [inputs] are expected to be in the order of dst, src. static std::shared_ptr MakeBlend( BlendMode blend_mode, @@ -30,9 +35,9 @@ class ColorFilterContents : public FilterContents { ~ColorFilterContents() override; - void SetAbsorbOpacity(bool absorb_opacity); + void SetAbsorbOpacity(AbsorbOpacity absorb_opacity); - bool GetAbsorbOpacity() const; + AbsorbOpacity GetAbsorbOpacity() const; /// @brief Sets an alpha that is applied to the final blended result. void SetAlpha(Scalar alpha); @@ -40,7 +45,7 @@ class ColorFilterContents : public FilterContents { std::optional GetAlpha() const; private: - bool absorb_opacity_ = false; + AbsorbOpacity absorb_opacity_ = AbsorbOpacity::kNo; std::optional alpha_; FML_DISALLOW_COPY_AND_ASSIGN(ColorFilterContents); diff --git a/impeller/entity/contents/filters/color_matrix_filter_contents.cc b/impeller/entity/contents/filters/color_matrix_filter_contents.cc index 24d0389bb0947..98024afa53207 100644 --- a/impeller/entity/contents/filters/color_matrix_filter_contents.cc +++ b/impeller/entity/contents/filters/color_matrix_filter_contents.cc @@ -9,6 +9,7 @@ #include "impeller/entity/contents/anonymous_contents.h" #include "impeller/entity/contents/content_context.h" #include "impeller/entity/contents/contents.h" +#include "impeller/entity/contents/filters/color_filter_contents.h" #include "impeller/geometry/point.h" #include "impeller/geometry/vector.h" #include "impeller/renderer/render_pass.h" @@ -94,7 +95,10 @@ std::optional ColorMatrixFilterContents::RenderFilter( matrix[3], matrix[8], matrix[13], matrix[18] ); // clang-format on - frag_info.input_alpha = absorb_opacity ? input_snapshot->opacity : 1.0f; + frag_info.input_alpha = + absorb_opacity == ColorFilterContents::AbsorbOpacity::kYes + ? input_snapshot->opacity + : 1.0f; auto sampler = renderer.GetContext()->GetSamplerLibrary()->GetSampler({}); FS::BindInputTexture(cmd, input_snapshot->texture, sampler); FS::BindFragInfo(cmd, host_buffer.EmplaceUniform(frag_info)); diff --git a/impeller/entity/contents/filters/linear_to_srgb_filter_contents.cc b/impeller/entity/contents/filters/linear_to_srgb_filter_contents.cc index e75c269105f88..df6f5e0c0e19c 100644 --- a/impeller/entity/contents/filters/linear_to_srgb_filter_contents.cc +++ b/impeller/entity/contents/filters/linear_to_srgb_filter_contents.cc @@ -76,7 +76,10 @@ std::optional LinearToSrgbFilterContents::RenderFilter( input_snapshot->texture->GetYCoordScale(); FS::FragInfo frag_info; - frag_info.input_alpha = absorb_opacity ? input_snapshot->opacity : 1.0f; + frag_info.input_alpha = + absorb_opacity == ColorFilterContents::AbsorbOpacity::kYes + ? input_snapshot->opacity + : 1.0f; auto sampler = renderer.GetContext()->GetSamplerLibrary()->GetSampler({}); FS::BindInputTexture(cmd, input_snapshot->texture, sampler); diff --git a/impeller/entity/contents/filters/srgb_to_linear_filter_contents.cc b/impeller/entity/contents/filters/srgb_to_linear_filter_contents.cc index 84568a0a2f25f..253089a85a26f 100644 --- a/impeller/entity/contents/filters/srgb_to_linear_filter_contents.cc +++ b/impeller/entity/contents/filters/srgb_to_linear_filter_contents.cc @@ -76,7 +76,10 @@ std::optional SrgbToLinearFilterContents::RenderFilter( input_snapshot->texture->GetYCoordScale(); FS::FragInfo frag_info; - frag_info.input_alpha = absorb_opacity ? input_snapshot->opacity : 1.0f; + frag_info.input_alpha = + absorb_opacity == ColorFilterContents::AbsorbOpacity::kYes + ? input_snapshot->opacity + : 1.0f; auto sampler = renderer.GetContext()->GetSamplerLibrary()->GetSampler({}); FS::BindInputTexture(cmd, input_snapshot->texture, sampler); From 228d37891a298f60f4ab88d3573bacf77d5c7bb3 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 14 Sep 2023 16:06:40 -0400 Subject: [PATCH 038/859] Roll Skia from 0f003d5748bc to 6bc9f5886ddf (2 revisions) (#45847) https://skia.googlesource.com/skia.git/+log/0f003d5748bc..6bc9f5886ddf 2023-09-14 rmistry@google.com Fix webpages_playback.py instructions 2023-09-14 cmumford@google.com [infra] Delete the PushBazelAppsFromWASM build task If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 7bcb777fdbced..5705c2e50b82a 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '0f003d5748bc86ba17e87d4673434ab065b832a3', + 'skia_revision': '6bc9f5886ddf8b6bf501c7d7533f0e1f2b6cf632', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 494f98ed21cbf2f98335e36b099aa1dce5cdeb49 Mon Sep 17 00:00:00 2001 From: Brandon DeRosier Date: Thu, 14 Sep 2023 13:21:05 -0700 Subject: [PATCH 039/859] [Impeller] Assert IMPELLER_ENABLE_3D when importing scene_contents.h. (#45848) Noticed we had a residual unguarded import of scene_contents.h while investigating https://github.com/flutter/flutter/issues/134745. --- impeller/aiks/aiks_unittests.cc | 1 - impeller/entity/contents/scene_contents.h | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/impeller/aiks/aiks_unittests.cc b/impeller/aiks/aiks_unittests.cc index 4097a43dca3c4..a9e4b162f36bc 100644 --- a/impeller/aiks/aiks_unittests.cc +++ b/impeller/aiks/aiks_unittests.cc @@ -22,7 +22,6 @@ #include "impeller/entity/contents/conical_gradient_contents.h" #include "impeller/entity/contents/filters/inputs/filter_input.h" #include "impeller/entity/contents/linear_gradient_contents.h" -#include "impeller/entity/contents/scene_contents.h" #include "impeller/entity/contents/solid_color_contents.h" #include "impeller/entity/contents/tiled_texture_contents.h" #include "impeller/geometry/color.h" diff --git a/impeller/entity/contents/scene_contents.h b/impeller/entity/contents/scene_contents.h index 9191728cb972b..b1f443cd7502d 100644 --- a/impeller/entity/contents/scene_contents.h +++ b/impeller/entity/contents/scene_contents.h @@ -4,6 +4,10 @@ #pragma once +#if !IMPELLER_ENABLE_3D +static_assert(false); +#endif + #include #include "impeller/entity/contents/color_source_contents.h" From 6df4d89f2f9f4eef5cb5edc6f62727769e79048f Mon Sep 17 00:00:00 2001 From: Brandon DeRosier Date: Thu, 14 Sep 2023 13:56:33 -0700 Subject: [PATCH 040/859] [Impeller] Add Entity::RenderingMode enum. (#45845) Resolves https://github.com/flutter/flutter/issues/134681. For the various places where we track if a rendered entity is a subpass or not. After landing this, I think the next winning move is to make this an Entity field and remove the `SetRenderingMode` junk from the filter graph. That refactor is a bit more risky, so I plan to do that separately. --- impeller/aiks/canvas.cc | 9 +++++---- impeller/aiks/canvas.h | 2 +- impeller/aiks/paint.cc | 9 +++++---- impeller/aiks/paint.h | 4 ++-- impeller/aiks/paint_pass_delegate.cc | 6 ++++-- .../entity/contents/filters/filter_contents.cc | 4 ++-- .../entity/contents/filters/filter_contents.h | 2 +- .../inputs/filter_contents_filter_input.cc | 5 +++-- .../inputs/filter_contents_filter_input.h | 2 +- .../contents/filters/inputs/filter_input.cc | 2 +- .../contents/filters/inputs/filter_input.h | 2 +- .../contents/filters/matrix_filter_contents.cc | 17 ++++++++++------- .../contents/filters/matrix_filter_contents.h | 4 ++-- impeller/entity/entity.h | 11 +++++++++++ impeller/entity/entity_pass.cc | 6 +++--- impeller/entity/entity_pass.h | 2 +- 16 files changed, 53 insertions(+), 34 deletions(-) diff --git a/impeller/aiks/canvas.cc b/impeller/aiks/canvas.cc index f50dd36af7ad9..ae4c9d512037f 100644 --- a/impeller/aiks/canvas.cc +++ b/impeller/aiks/canvas.cc @@ -64,7 +64,7 @@ void Canvas::Save(bool create_subpass, entry.cull_rect = xformation_stack_.back().cull_rect; entry.stencil_depth = xformation_stack_.back().stencil_depth; if (create_subpass) { - entry.is_subpass = true; + entry.rendering_mode = Entity::RenderingMode::kSubpass; auto subpass = std::make_unique(); subpass->SetEnableOffscreenCheckerboard( debug_options.offscreen_texture_checkerboard); @@ -72,10 +72,10 @@ void Canvas::Save(bool create_subpass, EntityPass::BackdropFilterProc backdrop_filter_proc = [backdrop_filter = backdrop_filter->Clone()]( const FilterInput::Ref& input, const Matrix& effect_transform, - bool is_subpass) { + Entity::RenderingMode rendering_mode) { auto filter = backdrop_filter->WrapInput(input); filter->SetEffectTransform(effect_transform); - filter->SetIsForSubpass(is_subpass); + filter->SetRenderingMode(rendering_mode); return filter; }; subpass->SetBackdropFilter(backdrop_filter_proc); @@ -93,7 +93,8 @@ bool Canvas::Restore() { if (xformation_stack_.size() == 1) { return false; } - if (xformation_stack_.back().is_subpass) { + if (xformation_stack_.back().rendering_mode == + Entity::RenderingMode::kSubpass) { current_pass_ = GetCurrentPass().GetSuperpass(); FML_DCHECK(current_pass_); } diff --git a/impeller/aiks/canvas.h b/impeller/aiks/canvas.h index 0ea187c39a5ad..a7a5652229b03 100644 --- a/impeller/aiks/canvas.h +++ b/impeller/aiks/canvas.h @@ -35,7 +35,7 @@ struct CanvasStackEntry { // |cull_rect| is conservative screen-space bounds of the clipped output area std::optional cull_rect; size_t stencil_depth = 0u; - bool is_subpass = false; + Entity::RenderingMode rendering_mode = Entity::RenderingMode::kDirect; bool contains_clips = false; }; diff --git a/impeller/aiks/paint.cc b/impeller/aiks/paint.cc index 9950661705444..66a3f7280f70a 100644 --- a/impeller/aiks/paint.cc +++ b/impeller/aiks/paint.cc @@ -60,7 +60,8 @@ std::shared_ptr Paint::WithFilters( std::shared_ptr input) const { input = WithColorFilter(input, ColorFilterContents::AbsorbOpacity::kYes); input = WithInvertFilter(input); - auto image_filter = WithImageFilter(input, Matrix(), /*is_subpass=*/false); + auto image_filter = + WithImageFilter(input, Matrix(), Entity::RenderingMode::kDirect); if (image_filter) { input = image_filter; } @@ -71,7 +72,7 @@ std::shared_ptr Paint::WithFiltersForSubpassTarget( std::shared_ptr input, const Matrix& effect_transform) const { auto image_filter = - WithImageFilter(input, effect_transform, /*is_subpass=*/true); + WithImageFilter(input, effect_transform, Entity::RenderingMode::kSubpass); if (image_filter) { input = image_filter; } @@ -91,12 +92,12 @@ std::shared_ptr Paint::WithMaskBlur(std::shared_ptr input, std::shared_ptr Paint::WithImageFilter( const FilterInput::Variant& input, const Matrix& effect_transform, - bool is_subpass) const { + Entity::RenderingMode rendering_mode) const { if (!image_filter) { return nullptr; } auto filter = image_filter->WrapInput(FilterInput::Make(input)); - filter->SetIsForSubpass(is_subpass); + filter->SetRenderingMode(rendering_mode); filter->SetEffectTransform(effect_transform); return filter; } diff --git a/impeller/aiks/paint.h b/impeller/aiks/paint.h index e13fd9122f8ad..c2e907a1cc5b0 100644 --- a/impeller/aiks/paint.h +++ b/impeller/aiks/paint.h @@ -26,7 +26,7 @@ struct Paint { using ImageFilterProc = std::function( FilterInput::Ref, const Matrix& effect_transform, - bool is_subpass)>; + Entity::RenderingMode rendering_mode)>; using MaskFilterProc = std::function( FilterInput::Ref, bool is_solid_color, @@ -101,7 +101,7 @@ struct Paint { std::shared_ptr WithImageFilter( const FilterInput::Variant& input, const Matrix& effect_transform, - bool is_subpass) const; + Entity::RenderingMode rendering_mode) const; private: std::shared_ptr WithColorFilter( diff --git a/impeller/aiks/paint_pass_delegate.cc b/impeller/aiks/paint_pass_delegate.cc index 6a72338028d5a..f9a081a0b55cf 100644 --- a/impeller/aiks/paint_pass_delegate.cc +++ b/impeller/aiks/paint_pass_delegate.cc @@ -51,7 +51,8 @@ std::shared_ptr PaintPassDelegate::CreateContentsForSubpassTarget( std::shared_ptr PaintPassDelegate::WithImageFilter( const FilterInput::Variant& input, const Matrix& effect_transform) const { - return paint_.WithImageFilter(input, effect_transform, true); + return paint_.WithImageFilter(input, effect_transform, + Entity::RenderingMode::kSubpass); } /// OpacityPeepholePassDelegate @@ -151,7 +152,8 @@ OpacityPeepholePassDelegate::CreateContentsForSubpassTarget( std::shared_ptr OpacityPeepholePassDelegate::WithImageFilter( const FilterInput::Variant& input, const Matrix& effect_transform) const { - return paint_.WithImageFilter(input, effect_transform, true); + return paint_.WithImageFilter(input, effect_transform, + Entity::RenderingMode::kSubpass); } } // namespace impeller diff --git a/impeller/entity/contents/filters/filter_contents.cc b/impeller/entity/contents/filters/filter_contents.cc index 3d4fa96a6321b..57653b10b739f 100644 --- a/impeller/entity/contents/filters/filter_contents.cc +++ b/impeller/entity/contents/filters/filter_contents.cc @@ -298,9 +298,9 @@ void FilterContents::SetLeafInputs(const FilterInput::Vector& inputs) { } } -void FilterContents::SetIsForSubpass(bool is_subpass) { +void FilterContents::SetRenderingMode(Entity::RenderingMode rendering_mode) { for (auto& input : inputs_) { - input->SetIsForSubpass(is_subpass); + input->SetRenderingMode(rendering_mode); } } diff --git a/impeller/entity/contents/filters/filter_contents.h b/impeller/entity/contents/filters/filter_contents.h index c14393444980c..fb1c6b59f1cb3 100644 --- a/impeller/entity/contents/filters/filter_contents.h +++ b/impeller/entity/contents/filters/filter_contents.h @@ -157,7 +157,7 @@ class FilterContents : public Contents { /// that the current transformation matrix of the entity is not stored /// in the Entity transformation matrix. Instead, the effect transform /// is used in this case. - virtual void SetIsForSubpass(bool is_subpass); + virtual void SetRenderingMode(Entity::RenderingMode rendering_mode); private: virtual std::optional GetFilterCoverage( diff --git a/impeller/entity/contents/filters/inputs/filter_contents_filter_input.cc b/impeller/entity/contents/filters/inputs/filter_contents_filter_input.cc index 78a1cec98e3b2..3e43132c1320d 100644 --- a/impeller/entity/contents/filters/inputs/filter_contents_filter_input.cc +++ b/impeller/entity/contents/filters/inputs/filter_contents_filter_input.cc @@ -75,8 +75,9 @@ void FilterContentsFilterInput::SetEffectTransform(const Matrix& matrix) { filter_->SetEffectTransform(matrix); } -void FilterContentsFilterInput::SetIsForSubpass(bool is_for_subpass) { - filter_->SetIsForSubpass(is_for_subpass); +void FilterContentsFilterInput::SetRenderingMode( + Entity::RenderingMode rendering_mode) { + filter_->SetRenderingMode(rendering_mode); } } // namespace impeller diff --git a/impeller/entity/contents/filters/inputs/filter_contents_filter_input.h b/impeller/entity/contents/filters/inputs/filter_contents_filter_input.h index 45d44993520cf..e21cb7acc451c 100644 --- a/impeller/entity/contents/filters/inputs/filter_contents_filter_input.h +++ b/impeller/entity/contents/filters/inputs/filter_contents_filter_input.h @@ -49,7 +49,7 @@ class FilterContentsFilterInput final : public FilterInput { virtual void SetEffectTransform(const Matrix& matrix) override; // |FilterInput| - virtual void SetIsForSubpass(bool is_for_subpass) override; + virtual void SetRenderingMode(Entity::RenderingMode rendering_mode) override; private: explicit FilterContentsFilterInput(std::shared_ptr filter); diff --git a/impeller/entity/contents/filters/inputs/filter_input.cc b/impeller/entity/contents/filters/inputs/filter_input.cc index e438212688a44..b3ecc69895b92 100644 --- a/impeller/entity/contents/filters/inputs/filter_input.cc +++ b/impeller/entity/contents/filters/inputs/filter_input.cc @@ -88,6 +88,6 @@ void FilterInput::SetLeafInputs(const FilterInput::Vector& inputs) {} void FilterInput::SetEffectTransform(const Matrix& matrix) {} -void FilterInput::SetIsForSubpass(bool is_for_subpass) {} +void FilterInput::SetRenderingMode(Entity::RenderingMode rendering_mode) {} } // namespace impeller diff --git a/impeller/entity/contents/filters/inputs/filter_input.h b/impeller/entity/contents/filters/inputs/filter_input.h index 43db41eb6a8ef..955932885ea07 100644 --- a/impeller/entity/contents/filters/inputs/filter_input.h +++ b/impeller/entity/contents/filters/inputs/filter_input.h @@ -85,7 +85,7 @@ class FilterInput { virtual void SetEffectTransform(const Matrix& matrix); /// @brief Turns on subpass mode for filter inputs. - virtual void SetIsForSubpass(bool is_for_subpass); + virtual void SetRenderingMode(Entity::RenderingMode rendering_mode); }; } // namespace impeller diff --git a/impeller/entity/contents/filters/matrix_filter_contents.cc b/impeller/entity/contents/filters/matrix_filter_contents.cc index c767ffe6cd19f..612e2e7b43eda 100644 --- a/impeller/entity/contents/filters/matrix_filter_contents.cc +++ b/impeller/entity/contents/filters/matrix_filter_contents.cc @@ -14,9 +14,10 @@ void MatrixFilterContents::SetMatrix(Matrix matrix) { matrix_ = matrix; } -void MatrixFilterContents::SetIsForSubpass(bool is_subpass) { - is_for_subpass_ = is_subpass; - FilterContents::SetIsForSubpass(is_subpass); +void MatrixFilterContents::SetRenderingMode( + Entity::RenderingMode rendering_mode) { + rendering_mode_ = rendering_mode; + FilterContents::SetRenderingMode(rendering_mode); } bool MatrixFilterContents::IsTranslationOnly() const { @@ -54,8 +55,9 @@ std::optional MatrixFilterContents::RenderFilter( // mentioned above). And so we sneak the subpass's captured CTM in through the // effect transform. - auto transform = - is_for_subpass_ ? effect_transform : entity.GetTransformation(); + auto transform = rendering_mode_ == Entity::RenderingMode::kSubpass + ? effect_transform + : entity.GetTransformation(); snapshot->transform = transform * // matrix_ * // transform.Invert() * // @@ -78,8 +80,9 @@ std::optional MatrixFilterContents::GetFilterCoverage( if (!coverage.has_value()) { return std::nullopt; } - auto& m = - is_for_subpass_ ? effect_transform : inputs[0]->GetTransform(entity); + auto& m = rendering_mode_ == Entity::RenderingMode::kSubpass + ? effect_transform + : inputs[0]->GetTransform(entity); auto transform = m * // matrix_ * // m.Invert(); // diff --git a/impeller/entity/contents/filters/matrix_filter_contents.h b/impeller/entity/contents/filters/matrix_filter_contents.h index ea221301d8e33..9f2cb9d0d1774 100644 --- a/impeller/entity/contents/filters/matrix_filter_contents.h +++ b/impeller/entity/contents/filters/matrix_filter_contents.h @@ -18,7 +18,7 @@ class MatrixFilterContents final : public FilterContents { void SetMatrix(Matrix matrix); // |FilterContents| - void SetIsForSubpass(bool is_for_subpass) override; + void SetRenderingMode(Entity::RenderingMode rendering_mode) override; // |FilterContents| bool IsTranslationOnly() const override; @@ -43,7 +43,7 @@ class MatrixFilterContents final : public FilterContents { Matrix matrix_; SamplerDescriptor sampler_descriptor_ = {}; - bool is_for_subpass_ = false; + Entity::RenderingMode rendering_mode_ = Entity::RenderingMode::kDirect; FML_DISALLOW_COPY_AND_ASSIGN(MatrixFilterContents); }; diff --git a/impeller/entity/entity.h b/impeller/entity/entity.h index 929824fbf5354..8cbcfaa9440b7 100644 --- a/impeller/entity/entity.h +++ b/impeller/entity/entity.h @@ -23,6 +23,17 @@ class Entity { static constexpr BlendMode kLastPipelineBlendMode = BlendMode::kModulate; static constexpr BlendMode kLastAdvancedBlendMode = BlendMode::kLuminosity; + enum class RenderingMode { + /// In direct mode, the Entity's transform is used as the current + /// local-to-screen transformation matrix. + kDirect, + /// In subpass mode, the Entity passed through the filter is in screen space + /// rather than local space, and so some filters (namely, + /// MatrixFilterContents) need to interpret the given EffectTransform as the + /// current transformation matrix. + kSubpass, + }; + /// An enum to define how to repeat, fold, or omit colors outside of the /// typically defined range of the source of the colors (such as the /// bounds of an image or the defining geometry of a gradient). diff --git a/impeller/entity/entity_pass.cc b/impeller/entity/entity_pass.cc index b93d997d468d2..6b4017ad0a19c 100644 --- a/impeller/entity/entity_pass.cc +++ b/impeller/entity/entity_pass.cc @@ -530,9 +530,9 @@ EntityPass::EntityResult EntityPass::GetEntityForElement( auto texture = pass_context.GetTexture(); // Render the backdrop texture before any of the pass elements. const auto& proc = subpass->backdrop_filter_proc_; - subpass_backdrop_filter_contents = proc( - FilterInput::Make(std::move(texture)), subpass->xformation_.Basis(), - /*is_subpass*/ true); + subpass_backdrop_filter_contents = + proc(FilterInput::Make(std::move(texture)), + subpass->xformation_.Basis(), Entity::RenderingMode::kSubpass); // The subpass will need to read from the current pass texture when // rendering the backdrop, so if there's an active pass, end it prior to diff --git a/impeller/entity/entity_pass.h b/impeller/entity/entity_pass.h index f00c9d3653978..d09649abfd9d0 100644 --- a/impeller/entity/entity_pass.h +++ b/impeller/entity/entity_pass.h @@ -41,7 +41,7 @@ class EntityPass { using BackdropFilterProc = std::function( FilterInput::Ref, const Matrix& effect_transform, - bool is_subpass)>; + Entity::RenderingMode rendering_mode)>; struct StencilCoverageLayer { std::optional coverage; From 922ff60a630fb7e5e838a2a4621bab1ad7bef9fe Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Thu, 14 Sep 2023 14:02:03 -0700 Subject: [PATCH 041/859] Enable private field promotion (#45722) New feature in upcoming Dart 3.2. See https://github.com/dart-lang/language/issues/2020. Feature is enabled by bumping the min SDK version to 3.2. Part of https://github.com/flutter/flutter/issues/134476. --- ci/pubspec.yaml | 2 +- flutter_frontend_server/pubspec.yaml | 2 +- impeller/golden_tests_harvester/pubspec.yaml | 2 +- impeller/tessellator/dart/pubspec.yaml | 2 +- lib/gpu/pubspec.yaml | 2 +- lib/snapshot/pubspec.yaml | 2 +- lib/web_ui/dev/test_platform.dart | 2 +- lib/web_ui/lib/src/engine/canvaskit/layer.dart | 3 +-- lib/web_ui/pubspec.yaml | 2 +- lib/web_ui/test/common/fake_asset_manager.dart | 2 +- shell/platform/fuchsia/dart-pkg/fuchsia/pubspec.yaml | 2 +- shell/platform/fuchsia/dart-pkg/zircon/pubspec.yaml | 2 +- shell/platform/fuchsia/dart-pkg/zircon_ffi/pubspec.yaml | 2 +- shell/platform/fuchsia/dart_runner/embedder/pubspec.yaml | 2 +- shell/platform/fuchsia/dart_runner/vmservice/pubspec.yaml | 2 +- shell/platform/fuchsia/flutter/kernel/pubspec.yaml | 2 +- .../flutter/tests/integration/embedder/child-view/pubspec.yaml | 2 +- .../tests/integration/embedder/parent-view/pubspec.yaml | 2 +- .../integration/mouse-input/mouse-input-view/pubspec.yaml | 2 +- .../tests/integration/text-input/text-input-view/pubspec.yaml | 2 +- .../touch-input/embedding-flutter-view/pubspec.yaml | 2 +- .../integration/touch-input/touch-input-view/pubspec.yaml | 2 +- .../fuchsia/runtime/dart/profiler_symbols/pubspec.yaml | 2 +- shell/vmservice/pubspec.yaml | 2 +- sky/packages/sky_engine/pubspec.yaml | 2 +- testing/android_background_image/pubspec.yaml | 2 +- testing/benchmark/pubspec.yaml | 2 +- testing/dart/pubspec.yaml | 2 +- testing/litetest/pubspec.yaml | 2 +- testing/scenario_app/pubspec.yaml | 2 +- testing/skia_gold_client/pubspec.yaml | 2 +- testing/smoke_test_failure/pubspec.yaml | 2 +- testing/symbols/pubspec.yaml | 2 +- third_party/web_locale_keymap/pubspec.yaml | 2 +- third_party/web_test_fonts/pubspec.yaml | 2 +- third_party/web_unicode/pubspec.yaml | 2 +- tools/android_lint/pubspec.yaml | 2 +- tools/api_check/pubspec.yaml | 2 +- tools/build_bucket_golden_scraper/pubspec.yaml | 2 +- tools/clang_tidy/pubspec.yaml | 2 +- tools/const_finder/pubspec.yaml | 2 +- tools/gen_web_locale_keymap/pubspec.yaml | 2 +- tools/githooks/pubspec.yaml | 2 +- tools/licenses/pubspec.yaml | 2 +- tools/path_ops/dart/pubspec.yaml | 2 +- tools/pkg/engine_build_configs/pubspec.yaml | 2 +- tools/pkg/engine_repo_tools/pubspec.yaml | 2 +- web_sdk/pubspec.yaml | 2 +- web_sdk/web_engine_tester/pubspec.yaml | 2 +- web_sdk/web_test_utils/pubspec.yaml | 2 +- 50 files changed, 50 insertions(+), 51 deletions(-) diff --git a/ci/pubspec.yaml b/ci/pubspec.yaml index 85639d87f8160..8a662bdd57134 100644 --- a/ci/pubspec.yaml +++ b/ci/pubspec.yaml @@ -5,7 +5,7 @@ name: ci_scripts publish_to: none environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' # Do not add any dependencies that require more than what is provided in # //third_party/pkg, //third_party/dart/pkg, or diff --git a/flutter_frontend_server/pubspec.yaml b/flutter_frontend_server/pubspec.yaml index 8861b9d217fd8..2f0d37c5583b7 100644 --- a/flutter_frontend_server/pubspec.yaml +++ b/flutter_frontend_server/pubspec.yaml @@ -18,7 +18,7 @@ homepage: https://flutter.dev # relative to this directory into //third_party/dart environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' dependencies: args: any diff --git a/impeller/golden_tests_harvester/pubspec.yaml b/impeller/golden_tests_harvester/pubspec.yaml index 04e93ab85e450..bbb49e9cabbd5 100644 --- a/impeller/golden_tests_harvester/pubspec.yaml +++ b/impeller/golden_tests_harvester/pubspec.yaml @@ -5,7 +5,7 @@ name: golden_tests_harvester publish_to: none environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' # Do not add any dependencies that require more than what is provided in # //third_party/dart/pkg, //third_party/dart/third_party/pkg, or diff --git a/impeller/tessellator/dart/pubspec.yaml b/impeller/tessellator/dart/pubspec.yaml index fc17320855790..12ec6ec21b003 100644 --- a/impeller/tessellator/dart/pubspec.yaml +++ b/impeller/tessellator/dart/pubspec.yaml @@ -8,4 +8,4 @@ publish_to: none homepage: https://github.com/flutter/impeller/tree/main/tessellator/dart environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' diff --git a/lib/gpu/pubspec.yaml b/lib/gpu/pubspec.yaml index a45d82dab12d3..204f445df09fb 100644 --- a/lib/gpu/pubspec.yaml +++ b/lib/gpu/pubspec.yaml @@ -7,7 +7,7 @@ description: A framework for writing Flutter applications homepage: https://flutter.dev environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' dependencies: sky_engine: diff --git a/lib/snapshot/pubspec.yaml b/lib/snapshot/pubspec.yaml index bb7cd30be46ca..0fa6a26f9ecaa 100644 --- a/lib/snapshot/pubspec.yaml +++ b/lib/snapshot/pubspec.yaml @@ -5,4 +5,4 @@ # This file is needed by Fuchsia's dart_library template. environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' diff --git a/lib/web_ui/dev/test_platform.dart b/lib/web_ui/dev/test_platform.dart index d9d717a1c4b77..da32db94ca187 100644 --- a/lib/web_ui/dev/test_platform.dart +++ b/lib/web_ui/dev/test_platform.dart @@ -1004,7 +1004,7 @@ class BrowserManager { final String pathToTest = p.dirname(path); final String mapPath = p.join( - _sourceMapDirectory!.path, + _sourceMapDirectory.path, pathToTest, sourceMapFileName ); diff --git a/lib/web_ui/lib/src/engine/canvaskit/layer.dart b/lib/web_ui/lib/src/engine/canvaskit/layer.dart index 9a8c37b75edae..74f8148b2c895 100644 --- a/lib/web_ui/lib/src/engine/canvaskit/layer.dart +++ b/lib/web_ui/lib/src/engine/canvaskit/layer.dart @@ -406,8 +406,7 @@ class ImageFilterEngineLayer extends ContainerLayer prerollContext.mutatorsStack.pushTransform(transform); final ui.Rect childPaintBounds = prerollChildren(prerollContext, childMatrix); - (_filter as CkManagedSkImageFilterConvertible) - .imageFilter((SkImageFilter filter) { + _filter.imageFilter((SkImageFilter filter) { paintBounds = rectFromSkIRect(filter.getOutputBounds(toSkRect(childPaintBounds))); }); diff --git a/lib/web_ui/pubspec.yaml b/lib/web_ui/pubspec.yaml index 3eb5e98ebb74f..c88e1a6df256c 100644 --- a/lib/web_ui/pubspec.yaml +++ b/lib/web_ui/pubspec.yaml @@ -3,7 +3,7 @@ publish_to: none # Keep the SDK version range in sync with pubspecs under web_sdk environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' dependencies: js: 0.6.4 diff --git a/lib/web_ui/test/common/fake_asset_manager.dart b/lib/web_ui/test/common/fake_asset_manager.dart index d87b071da59b1..b6f8c176e5c8a 100644 --- a/lib/web_ui/test/common/fake_asset_manager.dart +++ b/lib/web_ui/test/common/fake_asset_manager.dart @@ -81,7 +81,7 @@ class FakeAssetScope { return fetcher(); } if (_parent != null) { - return _parent!.getAssetData(assetKey); + return _parent.getAssetData(assetKey); } return null; } diff --git a/shell/platform/fuchsia/dart-pkg/fuchsia/pubspec.yaml b/shell/platform/fuchsia/dart-pkg/fuchsia/pubspec.yaml index 16fe4cdd83d71..85d01ce1515b9 100644 --- a/shell/platform/fuchsia/dart-pkg/fuchsia/pubspec.yaml +++ b/shell/platform/fuchsia/dart-pkg/fuchsia/pubspec.yaml @@ -3,4 +3,4 @@ # found in the LICENSE file. environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' diff --git a/shell/platform/fuchsia/dart-pkg/zircon/pubspec.yaml b/shell/platform/fuchsia/dart-pkg/zircon/pubspec.yaml index 121b528580c14..c75e7f8ff6a4a 100644 --- a/shell/platform/fuchsia/dart-pkg/zircon/pubspec.yaml +++ b/shell/platform/fuchsia/dart-pkg/zircon/pubspec.yaml @@ -5,7 +5,7 @@ name: zircon environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' # Uncomment block for local testing diff --git a/shell/platform/fuchsia/dart-pkg/zircon_ffi/pubspec.yaml b/shell/platform/fuchsia/dart-pkg/zircon_ffi/pubspec.yaml index 5e3507cef3c23..e30ca0196f5a7 100644 --- a/shell/platform/fuchsia/dart-pkg/zircon_ffi/pubspec.yaml +++ b/shell/platform/fuchsia/dart-pkg/zircon_ffi/pubspec.yaml @@ -1,7 +1,7 @@ name: zircon_ffi environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' dependencies: ffi: ^1.0.0 diff --git a/shell/platform/fuchsia/dart_runner/embedder/pubspec.yaml b/shell/platform/fuchsia/dart_runner/embedder/pubspec.yaml index 0bda0be6f7c95..d1ccbe7700dc5 100644 --- a/shell/platform/fuchsia/dart_runner/embedder/pubspec.yaml +++ b/shell/platform/fuchsia/dart_runner/embedder/pubspec.yaml @@ -6,5 +6,5 @@ # template in BUILD.gn. environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' diff --git a/shell/platform/fuchsia/dart_runner/vmservice/pubspec.yaml b/shell/platform/fuchsia/dart_runner/vmservice/pubspec.yaml index 09da15ac00b35..df2ce1ab10dbf 100644 --- a/shell/platform/fuchsia/dart_runner/vmservice/pubspec.yaml +++ b/shell/platform/fuchsia/dart_runner/vmservice/pubspec.yaml @@ -3,5 +3,5 @@ # found in the LICENSE file. environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' diff --git a/shell/platform/fuchsia/flutter/kernel/pubspec.yaml b/shell/platform/fuchsia/flutter/kernel/pubspec.yaml index 16fe4cdd83d71..85d01ce1515b9 100644 --- a/shell/platform/fuchsia/flutter/kernel/pubspec.yaml +++ b/shell/platform/fuchsia/flutter/kernel/pubspec.yaml @@ -3,4 +3,4 @@ # found in the LICENSE file. environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' diff --git a/shell/platform/fuchsia/flutter/tests/integration/embedder/child-view/pubspec.yaml b/shell/platform/fuchsia/flutter/tests/integration/embedder/child-view/pubspec.yaml index fc1d582237cd2..89f565db2969b 100644 --- a/shell/platform/fuchsia/flutter/tests/integration/embedder/child-view/pubspec.yaml +++ b/shell/platform/fuchsia/flutter/tests/integration/embedder/child-view/pubspec.yaml @@ -5,4 +5,4 @@ name: child_view2 environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' diff --git a/shell/platform/fuchsia/flutter/tests/integration/embedder/parent-view/pubspec.yaml b/shell/platform/fuchsia/flutter/tests/integration/embedder/parent-view/pubspec.yaml index 201cf3fa56906..1ee7f0c30401c 100644 --- a/shell/platform/fuchsia/flutter/tests/integration/embedder/parent-view/pubspec.yaml +++ b/shell/platform/fuchsia/flutter/tests/integration/embedder/parent-view/pubspec.yaml @@ -5,4 +5,4 @@ name: parent-view2 environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' diff --git a/shell/platform/fuchsia/flutter/tests/integration/mouse-input/mouse-input-view/pubspec.yaml b/shell/platform/fuchsia/flutter/tests/integration/mouse-input/mouse-input-view/pubspec.yaml index c3196484ca75f..40e52bb3bbc54 100644 --- a/shell/platform/fuchsia/flutter/tests/integration/mouse-input/mouse-input-view/pubspec.yaml +++ b/shell/platform/fuchsia/flutter/tests/integration/mouse-input/mouse-input-view/pubspec.yaml @@ -5,4 +5,4 @@ name: mouse-input-view environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' diff --git a/shell/platform/fuchsia/flutter/tests/integration/text-input/text-input-view/pubspec.yaml b/shell/platform/fuchsia/flutter/tests/integration/text-input/text-input-view/pubspec.yaml index f15d93799943b..21d9b7d9c0917 100644 --- a/shell/platform/fuchsia/flutter/tests/integration/text-input/text-input-view/pubspec.yaml +++ b/shell/platform/fuchsia/flutter/tests/integration/text-input/text-input-view/pubspec.yaml @@ -5,4 +5,4 @@ name: text-input-view environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' diff --git a/shell/platform/fuchsia/flutter/tests/integration/touch-input/embedding-flutter-view/pubspec.yaml b/shell/platform/fuchsia/flutter/tests/integration/touch-input/embedding-flutter-view/pubspec.yaml index 5051384ec5bea..e929bdaaa7518 100644 --- a/shell/platform/fuchsia/flutter/tests/integration/touch-input/embedding-flutter-view/pubspec.yaml +++ b/shell/platform/fuchsia/flutter/tests/integration/touch-input/embedding-flutter-view/pubspec.yaml @@ -5,4 +5,4 @@ name: embedding-flutter-view environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' diff --git a/shell/platform/fuchsia/flutter/tests/integration/touch-input/touch-input-view/pubspec.yaml b/shell/platform/fuchsia/flutter/tests/integration/touch-input/touch-input-view/pubspec.yaml index 3e8e25f294cbf..7fc83f8c32fd0 100644 --- a/shell/platform/fuchsia/flutter/tests/integration/touch-input/touch-input-view/pubspec.yaml +++ b/shell/platform/fuchsia/flutter/tests/integration/touch-input/touch-input-view/pubspec.yaml @@ -5,4 +5,4 @@ name: touch-input-view environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' diff --git a/shell/platform/fuchsia/runtime/dart/profiler_symbols/pubspec.yaml b/shell/platform/fuchsia/runtime/dart/profiler_symbols/pubspec.yaml index 519e6f49fd1a5..7076e2a537f44 100644 --- a/shell/platform/fuchsia/runtime/dart/profiler_symbols/pubspec.yaml +++ b/shell/platform/fuchsia/runtime/dart/profiler_symbols/pubspec.yaml @@ -4,7 +4,7 @@ name: profiler_symbols environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' version: 0 description: Extracts a minimal symbols table for the Dart VM profiler author: Dart Team diff --git a/shell/vmservice/pubspec.yaml b/shell/vmservice/pubspec.yaml index d8061c2f61dbb..c3cffd9d83aad 100644 --- a/shell/vmservice/pubspec.yaml +++ b/shell/vmservice/pubspec.yaml @@ -5,4 +5,4 @@ name: vmservice_snapshot publish_to: none environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' diff --git a/sky/packages/sky_engine/pubspec.yaml b/sky/packages/sky_engine/pubspec.yaml index c613749d4bbc5..08863df240e90 100644 --- a/sky/packages/sky_engine/pubspec.yaml +++ b/sky/packages/sky_engine/pubspec.yaml @@ -5,4 +5,4 @@ description: Dart SDK extensions for dart:ui homepage: http://flutter.io # sky_engine requires sdk_ext support in the analyzer which was added in 1.11.x environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' diff --git a/testing/android_background_image/pubspec.yaml b/testing/android_background_image/pubspec.yaml index 82a37fd9f4831..ff08f39de0489 100644 --- a/testing/android_background_image/pubspec.yaml +++ b/testing/android_background_image/pubspec.yaml @@ -5,7 +5,7 @@ name: android_background_image publish_to: none environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' # Do not add any dependencies that require more than what is provided in # //third_party/dart/pkg, //third_party/dart/third_party/pkg, or diff --git a/testing/benchmark/pubspec.yaml b/testing/benchmark/pubspec.yaml index dc860ed38d7ca..545d455b0431d 100644 --- a/testing/benchmark/pubspec.yaml +++ b/testing/benchmark/pubspec.yaml @@ -5,7 +5,7 @@ name: flutter_engine_benchmark publish_to: none environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' # Do not add any dependencies that require more than what is provided in # //third_party/pkg, //third_party/dart/pkg, or diff --git a/testing/dart/pubspec.yaml b/testing/dart/pubspec.yaml index 2c2a9a3d6a835..771026fff3627 100644 --- a/testing/dart/pubspec.yaml +++ b/testing/dart/pubspec.yaml @@ -14,7 +14,7 @@ publish_to: none # relative to this directory into //third_party/dart environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' dependencies: litetest: any diff --git a/testing/litetest/pubspec.yaml b/testing/litetest/pubspec.yaml index 392ce6411fcd7..ee8f8fd4dda63 100644 --- a/testing/litetest/pubspec.yaml +++ b/testing/litetest/pubspec.yaml @@ -14,7 +14,7 @@ publish_to: none # relative to this directory into //third_party/dart environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' dependencies: async_helper: any diff --git a/testing/scenario_app/pubspec.yaml b/testing/scenario_app/pubspec.yaml index c90a33d7f3204..c2b5d8425f9a3 100644 --- a/testing/scenario_app/pubspec.yaml +++ b/testing/scenario_app/pubspec.yaml @@ -5,7 +5,7 @@ name: scenario_app publish_to: none environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' # Do not add any dependencies that require more than what is provided in # //third_party/dart/pkg, //third_party/dart/third_party/pkg, or diff --git a/testing/skia_gold_client/pubspec.yaml b/testing/skia_gold_client/pubspec.yaml index 9f39ae9b2806e..53add9bf3093d 100644 --- a/testing/skia_gold_client/pubspec.yaml +++ b/testing/skia_gold_client/pubspec.yaml @@ -5,7 +5,7 @@ name: skia_gold_client publish_to: none environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' # Do not add any dependencies that require more than what is provided in # //third_party/dart/pkg, //third_party/dart/third_party/pkg, or diff --git a/testing/smoke_test_failure/pubspec.yaml b/testing/smoke_test_failure/pubspec.yaml index df2f11055e778..41670c0136865 100644 --- a/testing/smoke_test_failure/pubspec.yaml +++ b/testing/smoke_test_failure/pubspec.yaml @@ -5,7 +5,7 @@ name: smoke_test_failure publish_to: none environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' # Do not add any dependencies that require more than what is provided in # //third_party/dart/pkg or //third_party/dart/third_party/pkg. diff --git a/testing/symbols/pubspec.yaml b/testing/symbols/pubspec.yaml index ab9d4b49a8d67..fb7d37a812907 100644 --- a/testing/symbols/pubspec.yaml +++ b/testing/symbols/pubspec.yaml @@ -5,7 +5,7 @@ name: verify_exported publish_to: none environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' # Do not add any dependencies that require more than what is provided in # //third_party/pkg, //third_party/dart/pkg, or diff --git a/third_party/web_locale_keymap/pubspec.yaml b/third_party/web_locale_keymap/pubspec.yaml index 2da80a46c5108..646fbb3b96997 100644 --- a/third_party/web_locale_keymap/pubspec.yaml +++ b/third_party/web_locale_keymap/pubspec.yaml @@ -3,7 +3,7 @@ name: web_locale_keymap publish_to: none environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' dev_dependencies: test: ^1.21.7 diff --git a/third_party/web_test_fonts/pubspec.yaml b/third_party/web_test_fonts/pubspec.yaml index 6c2af49caa236..2042ad239ca21 100644 --- a/third_party/web_test_fonts/pubspec.yaml +++ b/third_party/web_test_fonts/pubspec.yaml @@ -3,7 +3,7 @@ name: web_test_fonts publish_to: none environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' dev_dependencies: args: any diff --git a/third_party/web_unicode/pubspec.yaml b/third_party/web_unicode/pubspec.yaml index 99b6d98c56688..fd57811f90f19 100644 --- a/third_party/web_unicode/pubspec.yaml +++ b/third_party/web_unicode/pubspec.yaml @@ -3,7 +3,7 @@ name: web_unicode publish_to: none environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' dev_dependencies: args: any diff --git a/tools/android_lint/pubspec.yaml b/tools/android_lint/pubspec.yaml index 4c62944ea4617..f60899e9ae2d8 100644 --- a/tools/android_lint/pubspec.yaml +++ b/tools/android_lint/pubspec.yaml @@ -4,7 +4,7 @@ name: android_lint environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' # Do not add any dependencies that require more than what is provided in # //third_party.pkg, //third_party/dart/pkg, or diff --git a/tools/api_check/pubspec.yaml b/tools/api_check/pubspec.yaml index ae99d7afd5322..1f33a38ad53f7 100644 --- a/tools/api_check/pubspec.yaml +++ b/tools/api_check/pubspec.yaml @@ -14,7 +14,7 @@ publish_to: none # relative to this directory into //third_party/dart environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' # Do not add any dependencies that require more than what is provided in # //third_party/pkg, //third_party/dart/pkg, or diff --git a/tools/build_bucket_golden_scraper/pubspec.yaml b/tools/build_bucket_golden_scraper/pubspec.yaml index 9d38d8327d97e..f9855c0958e4a 100644 --- a/tools/build_bucket_golden_scraper/pubspec.yaml +++ b/tools/build_bucket_golden_scraper/pubspec.yaml @@ -5,7 +5,7 @@ name: build_bucket_golden_scraper publish_to: none environment: - sdk: ^3.0.0 + sdk: '>=3.2.0-0 <4.0.0' # Do not add any dependencies that require more than what is provided in # //third_party/pkg, //third_party/dart/pkg, or diff --git a/tools/clang_tidy/pubspec.yaml b/tools/clang_tidy/pubspec.yaml index 5e33c8c0db0e5..e869ef5f41684 100644 --- a/tools/clang_tidy/pubspec.yaml +++ b/tools/clang_tidy/pubspec.yaml @@ -5,7 +5,7 @@ name: clang_tidy publish_to: none environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' # Do not add any dependencies that require more than what is provided in # //third_party/pkg, //third_party/dart/pkg, or diff --git a/tools/const_finder/pubspec.yaml b/tools/const_finder/pubspec.yaml index b174754fff0df..c7d2b9f0f82bc 100644 --- a/tools/const_finder/pubspec.yaml +++ b/tools/const_finder/pubspec.yaml @@ -6,7 +6,7 @@ name: const_finder publish_to: none environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' # Do not add any dependencies that require more than what is provided in # //third_party/dart/pkg or //third_party/dart/third_party/pkg. diff --git a/tools/gen_web_locale_keymap/pubspec.yaml b/tools/gen_web_locale_keymap/pubspec.yaml index 888b50029207b..5fee8ff44e90f 100644 --- a/tools/gen_web_locale_keymap/pubspec.yaml +++ b/tools/gen_web_locale_keymap/pubspec.yaml @@ -2,7 +2,7 @@ name: gen_web_keyboard_keymap description: Generates keyboard layouts for Web from external sources. environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' dependencies: args: any diff --git a/tools/githooks/pubspec.yaml b/tools/githooks/pubspec.yaml index 6b5bb5c2340a7..a0a6a9789b8cb 100644 --- a/tools/githooks/pubspec.yaml +++ b/tools/githooks/pubspec.yaml @@ -5,7 +5,7 @@ name: githooks publish_to: none environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' # Do not add any dependencies that require more than what is provided in # //third_party.pkg, //third_party/dart/pkg, or diff --git a/tools/licenses/pubspec.yaml b/tools/licenses/pubspec.yaml index 85f69a2bad58b..67a905e9c02c2 100644 --- a/tools/licenses/pubspec.yaml +++ b/tools/licenses/pubspec.yaml @@ -5,7 +5,7 @@ name: licenses publish_to: none environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' # Do not add any dependencies that require more than what is provided # in //third_party.pkg, //third_party/dart/pkg, or diff --git a/tools/path_ops/dart/pubspec.yaml b/tools/path_ops/dart/pubspec.yaml index db4d16542f5f1..d53bbbfe14ab5 100644 --- a/tools/path_ops/dart/pubspec.yaml +++ b/tools/path_ops/dart/pubspec.yaml @@ -8,7 +8,7 @@ publish_to: none homepage: https://github.com/flutter/engine/tree/main/tools/path_ops environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' dev_dependencies: litetest: any diff --git a/tools/pkg/engine_build_configs/pubspec.yaml b/tools/pkg/engine_build_configs/pubspec.yaml index b093547b0ed49..8aeeda6181890 100644 --- a/tools/pkg/engine_build_configs/pubspec.yaml +++ b/tools/pkg/engine_build_configs/pubspec.yaml @@ -5,7 +5,7 @@ name: engine_build_configs publish_to: none environment: - sdk: '>=3.1.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' # Do not add any dependencies that require more than what is provided in # //third_party/pkg, //third_party/dart/pkg, or diff --git a/tools/pkg/engine_repo_tools/pubspec.yaml b/tools/pkg/engine_repo_tools/pubspec.yaml index 455ee7cca5ea6..08f4a18186979 100644 --- a/tools/pkg/engine_repo_tools/pubspec.yaml +++ b/tools/pkg/engine_repo_tools/pubspec.yaml @@ -5,7 +5,7 @@ name: engine_repo_tools publish_to: none environment: - sdk: ^3.0.0 + sdk: '>=3.2.0-0 <4.0.0' # Do not add any dependencies that require more than what is provided in # //third_party/pkg, //third_party/dart/pkg, or diff --git a/web_sdk/pubspec.yaml b/web_sdk/pubspec.yaml index 9d65bb86930d1..e6932e6ea68bc 100644 --- a/web_sdk/pubspec.yaml +++ b/web_sdk/pubspec.yaml @@ -2,7 +2,7 @@ name: web_sdk_tests # Keep the SDK version range in sync with lib/web_ui/pubspec.yaml environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' dependencies: args: 2.3.1 diff --git a/web_sdk/web_engine_tester/pubspec.yaml b/web_sdk/web_engine_tester/pubspec.yaml index 06ab52b319740..dbb9dccf4d881 100644 --- a/web_sdk/web_engine_tester/pubspec.yaml +++ b/web_sdk/web_engine_tester/pubspec.yaml @@ -2,7 +2,7 @@ name: web_engine_tester # Keep the SDK version range in sync with lib/web_ui/pubspec.yaml environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' dependencies: js: 0.6.4 diff --git a/web_sdk/web_test_utils/pubspec.yaml b/web_sdk/web_test_utils/pubspec.yaml index 2879b821cc479..ca7efd336eec7 100644 --- a/web_sdk/web_test_utils/pubspec.yaml +++ b/web_sdk/web_test_utils/pubspec.yaml @@ -2,7 +2,7 @@ name: web_test_utils # Keep the SDK version range in sync with lib/web_ui/pubspec.yaml environment: - sdk: '>=3.0.0-0 <4.0.0' + sdk: '>=3.2.0-0 <4.0.0' dependencies: collection: 1.17.0 From b8c729c579275a21c16505a0090c2cea22f90d0e Mon Sep 17 00:00:00 2001 From: yaakovschectman <109111084+yaakovschectman@users.noreply.github.com> Date: Thu, 14 Sep 2023 17:07:14 -0400 Subject: [PATCH 042/859] Handle external window's `WM_CLOSE` in lifecycle manager (#45840) Handle the close messages from non-Flutter windows similarly to how we handle our own, for graceful app exit purposes. https://github.com/flutter/flutter/issues/131497 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [x] I updated/added relevant documentation (doc comments with `///`). - [ ] I signed the [CLA]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat --- .../flutter_windows_engine_unittests.cc | 22 ++++++++ .../windows/windows_lifecycle_manager.cc | 52 +++++++++++-------- .../windows/windows_lifecycle_manager.h | 7 +++ 3 files changed, 60 insertions(+), 21 deletions(-) diff --git a/shell/platform/windows/flutter_windows_engine_unittests.cc b/shell/platform/windows/flutter_windows_engine_unittests.cc index d27c78c70507d..7b29748453fa9 100644 --- a/shell/platform/windows/flutter_windows_engine_unittests.cc +++ b/shell/platform/windows/flutter_windows_engine_unittests.cc @@ -909,6 +909,28 @@ TEST_F(FlutterWindowsEngineTest, EnableApplicationLifecycle) { 0); } +TEST_F(FlutterWindowsEngineTest, ApplicationLifecycleExternalWindow) { + FlutterWindowsEngineBuilder builder{GetContext()}; + + auto window_binding_handler = + std::make_unique<::testing::NiceMock>(); + MockFlutterWindowsView view(std::move(window_binding_handler)); + view.SetEngine(builder.Build()); + FlutterWindowsEngine* engine = view.GetEngine(); + + EngineModifier modifier(engine); + modifier.embedder_api().RunsAOTCompiledDartCode = []() { return false; }; + auto handler = std::make_unique(engine); + ON_CALL(*handler, IsLastWindowOfProcess).WillByDefault([]() { + return false; + }); + EXPECT_CALL(*handler, IsLastWindowOfProcess).Times(1); + modifier.SetLifecycleManager(std::move(handler)); + engine->lifecycle_manager()->BeginProcessingExit(); + + engine->lifecycle_manager()->ExternalWindowMessage(0, WM_CLOSE, 0, 0); +} + TEST_F(FlutterWindowsEngineTest, AppStartsInResumedState) { FlutterWindowsEngineBuilder builder{GetContext()}; diff --git a/shell/platform/windows/windows_lifecycle_manager.cc b/shell/platform/windows/windows_lifecycle_manager.cc index a41b1617ba6c2..90d52f300b2dd 100644 --- a/shell/platform/windows/windows_lifecycle_manager.cc +++ b/shell/platform/windows/windows_lifecycle_manager.cc @@ -38,6 +38,30 @@ void WindowsLifecycleManager::DispatchMessage(HWND hwnd, PostMessage(hwnd, message, wparam, lparam); } +bool WindowsLifecycleManager::HandleCloseMessage(HWND hwnd, + WPARAM wparam, + LPARAM lparam) { + if (!process_exit_) { + return false; + } + auto key = std::make_tuple(hwnd, wparam, lparam); + auto itr = sent_close_messages_.find(key); + if (itr != sent_close_messages_.end()) { + if (itr->second == 1) { + sent_close_messages_.erase(itr); + } else { + sent_close_messages_[key]--; + } + return false; + } + if (IsLastWindowOfProcess()) { + engine_->RequestApplicationQuit(hwnd, wparam, lparam, + AppExitType::cancelable); + return true; + } + return false; +} + bool WindowsLifecycleManager::WindowProc(HWND hwnd, UINT msg, WPARAM wpar, @@ -48,27 +72,8 @@ bool WindowsLifecycleManager::WindowProc(HWND hwnd, // send a request to the framework to see if the app should exit. If it // is, we re-dispatch a new WM_CLOSE message. In order to allow the new // message to reach other delegates, we ignore it here. - case WM_CLOSE: { - if (!process_exit_) { - return false; - } - auto key = std::make_tuple(hwnd, wpar, lpar); - auto itr = sent_close_messages_.find(key); - if (itr != sent_close_messages_.end()) { - if (itr->second == 1) { - sent_close_messages_.erase(itr); - } else { - sent_close_messages_[key]--; - } - return false; - } - if (IsLastWindowOfProcess()) { - engine_->RequestApplicationQuit(hwnd, wpar, lpar, - AppExitType::cancelable); - return true; - } - break; - } + case WM_CLOSE: + return HandleCloseMessage(hwnd, wpar, lpar); // DWM composition can be disabled on Windows 7. // Notify the engine as this can result in screen tearing. @@ -285,6 +290,11 @@ std::optional WindowsLifecycleManager::ExternalWindowMessage( case WM_DESTROY: event = flutter::WindowStateEvent::kHide; break; + case WM_CLOSE: + if (HandleCloseMessage(hwnd, wparam, lparam)) { + return NULL; + } + break; } if (event.has_value()) { diff --git a/shell/platform/windows/windows_lifecycle_manager.h b/shell/platform/windows/windows_lifecycle_manager.h index c56bfc306b0fb..fc20b382467fa 100644 --- a/shell/platform/windows/windows_lifecycle_manager.h +++ b/shell/platform/windows/windows_lifecycle_manager.h @@ -99,6 +99,13 @@ class WindowsLifecycleManager { LPARAM lparam); private: + // Pass top-level window close notifications to the application lifecycle + // logic. If the last window of the process receives WM_CLOSE and a listener + // is registered for WidgetsBindingObserver.didRequestAppExit, the message is + // sent to the framework to query whether the application should be allowed + // to quit. + bool HandleCloseMessage(HWND hwnd, WPARAM wparam, LPARAM lparam); + FlutterWindowsEngine* engine_; std::map, int> sent_close_messages_; From 427e0d1708df0e3b0a9fd1f6ceeaa02534320f97 Mon Sep 17 00:00:00 2001 From: keyonghan <54558023+keyonghan@users.noreply.github.com> Date: Thu, 14 Sep 2023 14:28:02 -0700 Subject: [PATCH 043/859] Switch goma to reclient fro standalone targets (#45804) Part of https://github.com/flutter/flutter/issues/132701. --- ci/builders/standalone/linux_android_emulator.json | 4 +++- ci/builders/standalone/linux_benchmarks.json | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ci/builders/standalone/linux_android_emulator.json b/ci/builders/standalone/linux_android_emulator.json index e8c392e56ae1e..9166236d97233 100644 --- a/ci/builders/standalone/linux_android_emulator.json +++ b/ci/builders/standalone/linux_android_emulator.json @@ -6,7 +6,9 @@ "gn": [ "--android", "--android-cpu=x64", - "--no-lto" + "--no-lto", + "--rbe", + "--no-goma" ], "name": "android_debug_x64", "ninja": { diff --git a/ci/builders/standalone/linux_benchmarks.json b/ci/builders/standalone/linux_benchmarks.json index fdec72e47ae7a..53b6a460db062 100644 --- a/ci/builders/standalone/linux_benchmarks.json +++ b/ci/builders/standalone/linux_benchmarks.json @@ -10,7 +10,9 @@ "--runtime-mode", "release", "--prebuilt-dart-sdk", - "--build-embedder-examples" + "--build-embedder-examples", + "--rbe", + "--no-goma" ], "name": "host_release", "ninja": { From aba0a3b7e0147e91d470162628da3523d5dd63ce Mon Sep 17 00:00:00 2001 From: keyonghan <54558023+keyonghan@users.noreply.github.com> Date: Thu, 14 Sep 2023 14:30:00 -0700 Subject: [PATCH 044/859] Switch linux_android_debug_engine from goma to reclient (#45345) Part of https://github.com/flutter/flutter/issues/132701. --- ci/builders/linux_android_debug_engine.json | 24 +++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/ci/builders/linux_android_debug_engine.json b/ci/builders/linux_android_debug_engine.json index 0b6f20399e8f8..89566df798d8e 100644 --- a/ci/builders/linux_android_debug_engine.json +++ b/ci/builders/linux_android_debug_engine.json @@ -20,7 +20,9 @@ "gn": [ "--android", "--android-cpu=x86", - "--runtime-mode=jit_release" + "--runtime-mode=jit_release", + "--rbe", + "--no-goma" ], "name": "android_jit_release_x86", "ninja": { @@ -72,7 +74,9 @@ "gn": [ "--android", "--android-cpu=arm", - "--no-lto" + "--no-lto", + "--rbe", + "--no-goma" ], "name": "android_debug", "ninja": { @@ -123,7 +127,9 @@ "gn": [ "--android", "--android-cpu=arm64", - "--no-lto" + "--no-lto", + "--rbe", + "--no-goma" ], "name": "android_debug_arm64", "ninja": { @@ -144,7 +150,9 @@ "--android", "--android-cpu=arm64", "--no-lto", - "--enable-vulkan-validation-layers" + "--enable-vulkan-validation-layers", + "--rbe", + "--no-goma" ], "name": "android_debug_arm64_validation_layers", "ninja": { @@ -176,7 +184,9 @@ "gn": [ "--android", "--android-cpu=x86", - "--no-lto" + "--no-lto", + "--rbe", + "--no-goma" ], "name": "android_debug_x86", "ninja": { @@ -208,7 +218,9 @@ "gn": [ "--android", "--android-cpu=x64", - "--no-lto" + "--no-lto", + "--rbe", + "--no-goma" ], "name": "android_debug_x64", "ninja": { From d74831d09ae14cd3928f11a9b47f9078bcfabc7e Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 14 Sep 2023 17:32:11 -0400 Subject: [PATCH 045/859] Roll Skia from 6bc9f5886ddf to 9b7c116ed6c2 (1 revision) (#45853) https://skia.googlesource.com/skia.git/+log/6bc9f5886ddf..9b7c116ed6c2 2023-09-14 michaelludwig@google.com [skif] FilterResult::draw() operates on SkDevice instead of SkSpecialSurface+SkCanvas If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 5705c2e50b82a..ccd9ebc75aa6c 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '6bc9f5886ddf8b6bf501c7d7533f0e1f2b6cf632', + 'skia_revision': '9b7c116ed6c2e7cc889fc0b97a34bf3af11d7605', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 446d54c85e06d..b5948a47cc508 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: a051b3deca41a836cb34b632ba51166b +Signature: 7595ba1a49857dc941060858e98d60af ==================================================================================================== LIBRARY: etc1 From 26f3e02e88562c2d27ca88681135a1837ec1190b Mon Sep 17 00:00:00 2001 From: Martin Kustermann Date: Thu, 14 Sep 2023 23:33:29 +0200 Subject: [PATCH 046/859] Remove @pragma('vm:entry-point') annotations on members that aren't accessed from C++ (#45697) The `@pragma('vm:entry-point')` annotation serves as an annotation telling our AOT compiler that the member is needed and cannot be tree-shaken because it may be accessed from the outside (i.e. C++). There are seemingly entry-point annotations on members that aren't actually used from C++. => We remove the annotation from those members in this CL. --- lib/ui/compositing.dart | 1 - lib/ui/geometry.dart | 1 - lib/ui/painting.dart | 11 ----------- lib/ui/semantics.dart | 4 ---- lib/ui/text.dart | 4 ---- 5 files changed, 21 deletions(-) diff --git a/lib/ui/compositing.dart b/lib/ui/compositing.dart index fac0ac8a5f121..7550a3ac19f1a 100644 --- a/lib/ui/compositing.dart +++ b/lib/ui/compositing.dart @@ -574,7 +574,6 @@ abstract class SceneBuilder { base class _NativeSceneBuilder extends NativeFieldWrapperClass1 implements SceneBuilder { /// Creates an empty [SceneBuilder] object. - @pragma('vm:entry-point') _NativeSceneBuilder() { _constructor(); } diff --git a/lib/ui/geometry.dart b/lib/ui/geometry.dart index 26ac53a5f4df6..6f00295aaa40a 100644 --- a/lib/ui/geometry.dart +++ b/lib/ui/geometry.dart @@ -632,7 +632,6 @@ class Rect { /// /// ![](https://flutter.github.io/assets-for-api-docs/assets/dart-ui/rect_from_ltrb.png#gh-light-mode-only) /// ![](https://flutter.github.io/assets-for-api-docs/assets/dart-ui/rect_from_ltrb_dark.png#gh-dark-mode-only) - @pragma('vm:entry-point') const Rect.fromLTRB(this.left, this.top, this.right, this.bottom); /// Construct a rectangle from its left and top edges, its width, and its diff --git a/lib/ui/painting.dart b/lib/ui/painting.dart index 03d32b97cbc90..ea6fa78fa88ff 100644 --- a/lib/ui/painting.dart +++ b/lib/ui/painting.dart @@ -99,7 +99,6 @@ class Color { /// For example, to get a fully opaque orange, you would use `const /// Color(0xFFFF9000)` (`FF` for the alpha, `FF` for the red, `90` for the /// green, and `00` for the blue). - @pragma('vm:entry-point') const Color(int value) : value = value & 0xFFFFFFFF; /// Construct a color from the lower 8 bits of four integers. @@ -2098,7 +2097,6 @@ abstract class Codec { void dispose(); } -@pragma('vm:entry-point') base class _NativeCodec extends NativeFieldWrapperClass1 implements Codec { // // This class is created by the engine, and should not be instantiated @@ -2106,7 +2104,6 @@ base class _NativeCodec extends NativeFieldWrapperClass1 implements Codec { // // To obtain an instance of the [Codec] interface, see // [instantiateImageCodec]. - @pragma('vm:entry-point') _NativeCodec._(); int? _cachedFrameCount; @@ -2574,11 +2571,9 @@ abstract class EngineLayer { void dispose(); } -@pragma('vm:entry-point') base class _NativeEngineLayer extends NativeFieldWrapperClass1 implements EngineLayer { /// This class is created by the engine, and should not be instantiated /// or extended directly. - @pragma('vm:entry-point') _NativeEngineLayer._(); @override @@ -2889,10 +2884,8 @@ abstract class Path { PathMetrics computeMetrics({bool forceClosed = false}); } -@pragma('vm:entry-point') base class _NativePath extends NativeFieldWrapperClass1 implements Path { /// Create a new empty [Path] object. - @pragma('vm:entry-point') _NativePath() { _constructor(); } /// Avoids creating a new native backing for the path for methods that will @@ -5766,7 +5759,6 @@ abstract class Canvas { } base class _NativeCanvas extends NativeFieldWrapperClass1 implements Canvas { - @pragma('vm:entry-point') _NativeCanvas(PictureRecorder recorder, [ Rect? cullRect ]) { if (recorder.isRecording) { throw ArgumentError('"recorder" must not already be associated with another Canvas.'); @@ -6305,13 +6297,11 @@ abstract class Picture { int get approximateBytesUsed; } -@pragma('vm:entry-point') base class _NativePicture extends NativeFieldWrapperClass1 implements Picture { /// This class is created by the engine, and should not be instantiated /// or extended directly. /// /// To create a [Picture], use a [PictureRecorder]. - @pragma('vm:entry-point') _NativePicture._(); @override @@ -6410,7 +6400,6 @@ abstract class PictureRecorder { } base class _NativePictureRecorder extends NativeFieldWrapperClass1 implements PictureRecorder { - @pragma('vm:entry-point') _NativePictureRecorder() { _constructor(); } @Native(symbol: 'PictureRecorder::Create') diff --git a/lib/ui/semantics.dart b/lib/ui/semantics.dart index c619ab4e596c9..bb8d58f10087e 100644 --- a/lib/ui/semantics.dart +++ b/lib/ui/semantics.dart @@ -848,9 +848,7 @@ abstract class SemanticsUpdateBuilder { SemanticsUpdate build(); } -@pragma('vm:entry-point') base class _NativeSemanticsUpdateBuilder extends NativeFieldWrapperClass1 implements SemanticsUpdateBuilder { - @pragma('vm:entry-point') _NativeSemanticsUpdateBuilder() { _constructor(); } @Native(symbol: 'SemanticsUpdateBuilder::Create') @@ -1039,13 +1037,11 @@ abstract class SemanticsUpdate { void dispose(); } -@pragma('vm:entry-point') base class _NativeSemanticsUpdate extends NativeFieldWrapperClass1 implements SemanticsUpdate { /// This class is created by the engine, and should not be instantiated /// or extended directly. /// /// To create a SemanticsUpdate object, use a [SemanticsUpdateBuilder]. - @pragma('vm:entry-point') _NativeSemanticsUpdate._(); @override diff --git a/lib/ui/text.dart b/lib/ui/text.dart index b35ab8ad3ba9e..8bf5a8ccec707 100644 --- a/lib/ui/text.dart +++ b/lib/ui/text.dart @@ -2314,7 +2314,6 @@ enum TextDirection { /// A rectangle enclosing a run of text. /// /// This is similar to [Rect] but includes an inherent [TextDirection]. -@pragma('vm:entry-point') class TextBox { /// Creates an object that describes a box containing text. const TextBox.fromLTRBD( @@ -3004,13 +3003,11 @@ abstract class Paragraph { bool get debugDisposed; } -@pragma('vm:entry-point') base class _NativeParagraph extends NativeFieldWrapperClass1 implements Paragraph { /// This class is created by the engine, and should not be instantiated /// or extended directly. /// /// To create a [Paragraph] object, use a [ParagraphBuilder]. - @pragma('vm:entry-point') _NativeParagraph._(); bool _needsLayout = true; @@ -3322,7 +3319,6 @@ abstract class ParagraphBuilder { } base class _NativeParagraphBuilder extends NativeFieldWrapperClass1 implements ParagraphBuilder { - @pragma('vm:entry-point') _NativeParagraphBuilder(ParagraphStyle style) : _defaultLeadingDistribution = style._leadingDistribution { List? strutFontFamilies; From 1ce964583ba96b3b6315d7597b2adc88ff5bfafa Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 14 Sep 2023 17:40:13 -0400 Subject: [PATCH 047/859] Roll Dart SDK from d25e8d682c8f to 7e4d9f4d8e52 (3 revisions) (#45854) https://dart.googlesource.com/sdk.git/+log/d25e8d682c8f..7e4d9f4d8e52 2023-09-14 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-165.0.dev 2023-09-14 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-164.0.dev 2023-09-14 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-163.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC bdero@google.com,dart-vm-team@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 12 ++++++------ ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/DEPS b/DEPS index ccd9ebc75aa6c..ecf409df2537d 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': 'd25e8d682c8f7770fadb19291fcd2d2710b84406', + 'dart_revision': '7e4d9f4d8e521b8e44ea32be2754cc611e46c83e', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py @@ -74,9 +74,9 @@ vars = { 'dart_protobuf_rev': 'c16bc891978a1764f0d6d8eca54f420242c78a6a', 'dart_pub_rev': 'be6868ba132c782d9835b1638a634ecb73428579', 'dart_root_certificates_rev': '692f6d6488af68e0121317a9c2c9eb393eb0ee50', - 'dart_tools_rev': 'fa01f9bad86b48757a96c6790fcd0812bf27def0', + 'dart_tools_rev': '1512f3d1efde11ace801618822f63934961cc80d', 'dart_watcher_rev': '1aed03e2a8005f45083fdb38cbd4b684cd23082f', - 'dart_webdev_rev': '6b21ecf0256dc6ae9d7434b9332cf3c626253474', + 'dart_webdev_rev': '501ccc287783db685240d0f47c1cc9df68a43ae4', 'dart_webkit_inspection_protocol_rev': '39a3c297ff573635e7936b015ce4f3466e4739d6', 'dart_yaml_edit_rev': '4a9734dda12f63ef9eee4121f87ff4401e25a607', 'dart_zlib_rev': '14dd4c4455602c9b71a1a89b5cafd1f4030d2e3f', @@ -393,7 +393,7 @@ deps = { Var('dart_git') + '/html.git@a1b193e95f13c995e7f7200ce0d363de5952e383', 'src/third_party/dart/third_party/pkg/http': - Var('dart_git') + '/http.git@de1921405c93f864ba1a6f646f664b16fa060a28', + Var('dart_git') + '/http.git@e19094aba55a0f245dfea3354289572c71e4e81d', 'src/third_party/dart/third_party/pkg/http_multi_server': Var('dart_git') + '/http_multi_server.git@9d62ea396d7d282592edf994378f67fcde982ce8', @@ -426,7 +426,7 @@ deps = { Var('dart_git') + '/mockito.git@412c0beb51a12ed4a8833db7f542558ab92c0c65', 'src/third_party/dart/third_party/pkg/native': - Var('dart_git') + '/native.git@a2dfedc35960711eb24cb04dcb906793d2222295', + Var('dart_git') + '/native.git@bbcbc1fd28dbe6fe50ce167574b8440dd11d664c', 'src/third_party/dart/third_party/pkg/package_config': Var('dart_git') + '/package_config.git@ae7ad83de97aba507fd05e97cc372bc6695c1759', @@ -447,7 +447,7 @@ deps = { Var('dart_git') + '/pub_semver.git@f0be74a446f971db478e68b59ea62e393d6df3bd', 'src/third_party/dart/third_party/pkg/shelf': - Var('dart_git') + '/shelf.git@2926f76dc0f713b46ba5d9dbc391e29c6d1521a9', + Var('dart_git') + '/shelf.git@e2a02b77f5f7dd2db57e6c6ea1990b1fa2239096', 'src/third_party/dart/third_party/pkg/source_map_stack_trace': Var('dart_git') + '/source_map_stack_trace.git@196d7bfa58ef307687907c323ab8e5fb1f382afa', diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index 0f65a14171c7f..b746f0f6a430e 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: b34b2da659aa12578e2249aa3f5e9f1a +Signature: 22f159ccd7e74406c6faf1213fb1937e ==================================================================================================== LIBRARY: dart From fc68874e6a404144b663e518583cddba8d4eb026 Mon Sep 17 00:00:00 2001 From: Victoria Ashworth <15619084+vashworth@users.noreply.github.com> Date: Thu, 14 Sep 2023 17:19:57 -0500 Subject: [PATCH 048/859] Set tests to run on macOS 12 (#45855) We recently upgraded a bot in the try pool to macOS 13 and I noticed a couple of tests have leaked through to it and we're not ready for tests to run on macOS 13 yet. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- ci/builders/linux_web_engine.json | 10 +++++----- ci/builders/mac_clang_tidy.json | 10 +++++----- ci/builders/mac_clang_tidy_presubmit.json | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ci/builders/linux_web_engine.json b/ci/builders/linux_web_engine.json index 3063262c05fed..6134f4640ff8f 100644 --- a/ci/builders/linux_web_engine.json +++ b/ci/builders/linux_web_engine.json @@ -1095,7 +1095,7 @@ "recipe": "engine_v2/tester_engine", "drone_dimensions": [ "device_type=none", - "os=Mac" + "os=Mac-12" ], "gclient_variables": { "download_android_deps": false @@ -1127,7 +1127,7 @@ "recipe": "engine_v2/tester_engine", "drone_dimensions": [ "device_type=none", - "os=Mac" + "os=Mac-12" ], "gclient_variables": { "download_android_deps": false @@ -1159,7 +1159,7 @@ "recipe": "engine_v2/tester_engine", "drone_dimensions": [ "device_type=none", - "os=Mac" + "os=Mac-12" ], "gclient_variables": { "download_android_deps": false @@ -1191,7 +1191,7 @@ "recipe": "engine_v2/tester_engine", "drone_dimensions": [ "device_type=none", - "os=Mac" + "os=Mac-12" ], "gclient_variables": { "download_android_deps": false @@ -1223,7 +1223,7 @@ "recipe": "engine_v2/tester_engine", "drone_dimensions": [ "device_type=none", - "os=Mac" + "os=Mac-12" ], "gclient_variables": { "download_android_deps": false diff --git a/ci/builders/mac_clang_tidy.json b/ci/builders/mac_clang_tidy.json index aadf3721911ca..412c3662ab7fb 100644 --- a/ci/builders/mac_clang_tidy.json +++ b/ci/builders/mac_clang_tidy.json @@ -50,7 +50,7 @@ "recipe": "engine_v2/tester_engine", "drone_dimensions": [ "device_type=none", - "os=Mac", + "os=Mac-12", "cpu=arm64" ], "gclient_variables": { @@ -82,7 +82,7 @@ "recipe": "engine_v2/tester_engine", "drone_dimensions": [ "device_type=none", - "os=Mac", + "os=Mac-12", "cpu=arm64" ], "gclient_variables": { @@ -114,7 +114,7 @@ "recipe": "engine_v2/tester_engine", "drone_dimensions": [ "device_type=none", - "os=Mac", + "os=Mac-12", "cpu=arm64" ], "gclient_variables": { @@ -146,7 +146,7 @@ "recipe": "engine_v2/tester_engine", "drone_dimensions": [ "device_type=none", - "os=Mac", + "os=Mac-12", "cpu=arm64" ], "gclient_variables": { @@ -178,7 +178,7 @@ "recipe": "engine_v2/tester_engine", "drone_dimensions": [ "device_type=none", - "os=Mac", + "os=Mac-12", "cpu=arm64" ], "gclient_variables": { diff --git a/ci/builders/mac_clang_tidy_presubmit.json b/ci/builders/mac_clang_tidy_presubmit.json index 8fa1e9f4ebd29..19f030435649e 100644 --- a/ci/builders/mac_clang_tidy_presubmit.json +++ b/ci/builders/mac_clang_tidy_presubmit.json @@ -50,7 +50,7 @@ "recipe": "engine_v2/tester_engine", "drone_dimensions": [ "device_type=none", - "os=Mac", + "os=Mac-12", "cpu=arm64" ], "gclient_variables": { @@ -82,7 +82,7 @@ "recipe": "engine_v2/tester_engine", "drone_dimensions": [ "device_type=none", - "os=Mac", + "os=Mac-12", "cpu=arm64" ], "gclient_variables": { From d769d263badc1e4e879f23c3437ae83bf821cbb4 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 14 Sep 2023 18:41:23 -0400 Subject: [PATCH 049/859] Roll Skia from 9b7c116ed6c2 to 8c9e378c4902 (3 revisions) (#45858) https://skia.googlesource.com/skia.git/+log/9b7c116ed6c2..8c9e378c4902 2023-09-14 brianosman@google.com Clamp alpha after doing CPU color filtering 2023-09-14 johnstiles@google.com Add support for mesh programs to sksl-minify. 2023-09-14 jamesgk@google.com [graphite] Be more defensive in attempting dst samples If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index ecf409df2537d..ee33d8d207c46 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '9b7c116ed6c2e7cc889fc0b97a34bf3af11d7605', + 'skia_revision': '8c9e378c49025e72f8867d1067196c9abfed9e49', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index b5948a47cc508..67143f04ef87c 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 7595ba1a49857dc941060858e98d60af +Signature: cd89e78b760471d6affd3011f86ea2ea ==================================================================================================== LIBRARY: etc1 @@ -386,6 +386,7 @@ FILE: ../../../third_party/skia/modules/pathkit/perf/perfReporter.js FILE: ../../../third_party/skia/modules/skparagraph/test.html FILE: ../../../third_party/skia/package-lock.json FILE: ../../../third_party/skia/relnotes/directcontext_submit.md +FILE: ../../../third_party/skia/relnotes/minify-mesh.md FILE: ../../../third_party/skia/relnotes/shadowflags.md FILE: ../../../third_party/skia/src/gpu/gpu_workaround_list.txt FILE: ../../../third_party/skia/src/sksl/generated/sksl_compute.minified.sksl From 3a3b6d69abe507685b08834780d92e14e3b63424 Mon Sep 17 00:00:00 2001 From: XuanTung95 Date: Fri, 15 Sep 2023 05:46:56 +0700 Subject: [PATCH 050/859] Reduce unnecessary Dart_TimelineGetMicros call (#45637) Minor changes that reduce unnecessary Dart_TimelineGetMicros calls. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- shell/common/animator.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/shell/common/animator.cc b/shell/common/animator.cc index 29c21c1ae5592..b0d8f62a22033 100644 --- a/shell/common/animator.cc +++ b/shell/common/animator.cc @@ -123,14 +123,17 @@ void Animator::BeginFrame( if (!self) { return; } - auto now = fml::TimeDelta::FromMicroseconds(Dart_TimelineGetMicros()); // If there's a frame scheduled, bail. // If there's no frame scheduled, but we're not yet past the last // vsync deadline, bail. - if (!self->frame_scheduled_ && now > self->dart_frame_deadline_) { - TRACE_EVENT0("flutter", "BeginFrame idle callback"); - self->delegate_.OnAnimatorNotifyIdle( - now + fml::TimeDelta::FromMilliseconds(100)); + if (!self->frame_scheduled_) { + auto now = + fml::TimeDelta::FromMicroseconds(Dart_TimelineGetMicros()); + if (now > self->dart_frame_deadline_) { + TRACE_EVENT0("flutter", "BeginFrame idle callback"); + self->delegate_.OnAnimatorNotifyIdle( + now + fml::TimeDelta::FromMilliseconds(100)); + } } }, kNotifyIdleTaskWaitTime); From 64a5aab74ca3da9eaf8a19ec3a26a3dc39062c48 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 14 Sep 2023 19:28:12 -0400 Subject: [PATCH 051/859] Roll Skia from 8c9e378c4902 to 37ea783440ea (1 revision) (#45859) https://skia.googlesource.com/skia.git/+log/8c9e378c4902..37ea783440ea 2023-09-14 kjlubick@google.com Remove some unused path effects If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/DEPS b/DEPS index ee33d8d207c46..241c3708bb6d7 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '8c9e378c49025e72f8867d1067196c9abfed9e49', + 'skia_revision': '37ea783440eafda23fa9ccadefe9235cd6c456fa', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 67143f04ef87c..c5c4c7d273910 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: cd89e78b760471d6affd3011f86ea2ea +Signature: 257f246d3a2495c012a2c54181bc6503 ==================================================================================================== LIBRARY: etc1 @@ -387,6 +387,7 @@ FILE: ../../../third_party/skia/modules/skparagraph/test.html FILE: ../../../third_party/skia/package-lock.json FILE: ../../../third_party/skia/relnotes/directcontext_submit.md FILE: ../../../third_party/skia/relnotes/minify-mesh.md +FILE: ../../../third_party/skia/relnotes/patheffects.md FILE: ../../../third_party/skia/relnotes/shadowflags.md FILE: ../../../third_party/skia/src/gpu/gpu_workaround_list.txt FILE: ../../../third_party/skia/src/sksl/generated/sksl_compute.minified.sksl @@ -5051,7 +5052,6 @@ ORIGIN: ../../../third_party/skia/include/core/SkFontMetrics.h + ../../../third_ ORIGIN: ../../../third_party/skia/include/core/SkFontParameters.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/core/SkFontTypes.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/core/SkSpan.h + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/include/effects/SkOpPathEffect.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/effects/SkShaderMaskFilter.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/effects/SkTrimPathEffect.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/gpu/GrBackendDrawableInfo.h + ../../../third_party/skia/LICENSE @@ -5124,8 +5124,6 @@ ORIGIN: ../../../third_party/skia/src/core/SkSafeRange.h + ../../../third_party/ ORIGIN: ../../../third_party/skia/src/core/SkStrikeCache.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/core/SkTextBlobPriv.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/core/SkTypeface_remote.h + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/src/effects/SkOpPE.h + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/src/effects/SkOpPathEffect.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/effects/SkShaderMaskFilterImpl.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/effects/SkTrimPE.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/effects/SkTrimPathEffect.cpp + ../../../third_party/skia/LICENSE @@ -5266,7 +5264,6 @@ FILE: ../../../third_party/skia/include/core/SkFontMetrics.h FILE: ../../../third_party/skia/include/core/SkFontParameters.h FILE: ../../../third_party/skia/include/core/SkFontTypes.h FILE: ../../../third_party/skia/include/core/SkSpan.h -FILE: ../../../third_party/skia/include/effects/SkOpPathEffect.h FILE: ../../../third_party/skia/include/effects/SkShaderMaskFilter.h FILE: ../../../third_party/skia/include/effects/SkTrimPathEffect.h FILE: ../../../third_party/skia/include/gpu/GrBackendDrawableInfo.h @@ -5339,8 +5336,6 @@ FILE: ../../../third_party/skia/src/core/SkSafeRange.h FILE: ../../../third_party/skia/src/core/SkStrikeCache.cpp FILE: ../../../third_party/skia/src/core/SkTextBlobPriv.h FILE: ../../../third_party/skia/src/core/SkTypeface_remote.h -FILE: ../../../third_party/skia/src/effects/SkOpPE.h -FILE: ../../../third_party/skia/src/effects/SkOpPathEffect.cpp FILE: ../../../third_party/skia/src/effects/SkShaderMaskFilterImpl.cpp FILE: ../../../third_party/skia/src/effects/SkTrimPE.h FILE: ../../../third_party/skia/src/effects/SkTrimPathEffect.cpp @@ -6434,7 +6429,6 @@ ORIGIN: ../../../third_party/skia/gm/verifiers/gmverifier.h + ../../../third_par ORIGIN: ../../../third_party/skia/gm/widebuttcaps.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/core/SkM44.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/core/SkSamplingOptions.h + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/include/effects/SkStrokeAndFillPathEffect.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/gpu/GrDirectContext.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/gpu/mtl/GrMtlBackendContext.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/private/base/SkTPin.h + ../../../third_party/skia/LICENSE @@ -6568,7 +6562,6 @@ FILE: ../../../third_party/skia/gm/verifiers/gmverifier.h FILE: ../../../third_party/skia/gm/widebuttcaps.cpp FILE: ../../../third_party/skia/include/core/SkM44.h FILE: ../../../third_party/skia/include/core/SkSamplingOptions.h -FILE: ../../../third_party/skia/include/effects/SkStrokeAndFillPathEffect.h FILE: ../../../third_party/skia/include/gpu/GrDirectContext.h FILE: ../../../third_party/skia/include/gpu/mtl/GrMtlBackendContext.h FILE: ../../../third_party/skia/include/private/base/SkTPin.h From 8b3138e03fd70e3dfd81b9489df456db495c76d5 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 14 Sep 2023 20:36:23 -0400 Subject: [PATCH 052/859] Roll Skia from 37ea783440ea to 7aa8bfaa63fc (1 revision) (#45861) https://skia.googlesource.com/skia.git/+log/37ea783440ea..7aa8bfaa63fc 2023-09-15 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 27be2a276618 to 786b5d99590b (3 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 241c3708bb6d7..ebc56e08dc1b5 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '37ea783440eafda23fa9ccadefe9235cd6c456fa', + 'skia_revision': '7aa8bfaa63fc52817f777fd457b99a50b4cec8c9', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 69ec3ccce99a15e35f5d8ab32cccffafbc6c21a1 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 14 Sep 2023 21:14:01 -0400 Subject: [PATCH 053/859] Roll Skia from 7aa8bfaa63fc to c0cabb0f93c9 (1 revision) (#45863) https://skia.googlesource.com/skia.git/+log/7aa8bfaa63fc..c0cabb0f93c9 2023-09-15 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from 5f6a13cae14e to 18fd0925a396 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index ebc56e08dc1b5..180849630654c 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '7aa8bfaa63fc52817f777fd457b99a50b4cec8c9', + 'skia_revision': 'c0cabb0f93c9be1feaeef75b9ddd0d681e68a164', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 7089352ec31851d95fe31a570e7eff1dde4405a0 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 14 Sep 2023 21:37:38 -0400 Subject: [PATCH 054/859] Roll Dart SDK from 7e4d9f4d8e52 to c0a505f9d1dd (1 revision) (#45864) https://dart.googlesource.com/sdk.git/+log/7e4d9f4d8e52..c0a505f9d1dd 2023-09-15 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-166.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC bdero@google.com,dart-vm-team@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 180849630654c..58950138bddd4 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '7e4d9f4d8e521b8e44ea32be2754cc611e46c83e', + 'dart_revision': 'c0a505f9d1ddaa60eab30eab41906ca3e14ba688', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index b746f0f6a430e..2ddb1a9036598 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: 22f159ccd7e74406c6faf1213fb1937e +Signature: c6cbb7dbc3abed0dbab341935f4c9a37 ==================================================================================================== LIBRARY: dart From f22d12cdb75ab9dd1d6325337c475c08fb1fb930 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 14 Sep 2023 22:37:26 -0400 Subject: [PATCH 055/859] Roll Fuchsia Linux SDK from MzLcTzBiWJ7o3Q2_Z... to ES0r-mYplPOBYHvUQ... (#45865) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC bdero@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 58950138bddd4..4edc201a2f0c0 100644 --- a/DEPS +++ b/DEPS @@ -924,7 +924,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'MzLcTzBiWJ7o3Q2_ZoCskAyXV_qzdvkqbOC7R1VhrY8C' + 'version': 'ES0r-mYplPOBYHvUQWej_QitxiDHZC6VI_W-1-F2Im4C' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index 44ac3183d3f79..a1c7da16a8c14 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: b0cb98becf39edbf5c9268242cd57b5c +Signature: 70cd5aee40464b0a2e14d85393cf15cd ==================================================================================================== LIBRARY: fuchsia_sdk From 10b3c0874d4cbe2ab2606a7ee564b4b296f75c63 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 15 Sep 2023 00:17:22 -0400 Subject: [PATCH 056/859] Roll Fuchsia Mac SDK from FF4r9-tqhioBbRG9f... to --OUw__L3ekVTG-5c... (#45866) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC bdero@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 4edc201a2f0c0..4d714f0dcdfa9 100644 --- a/DEPS +++ b/DEPS @@ -914,7 +914,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'FF4r9-tqhioBbRG9fMFASuWfOKHBuLBdZtdnlvEPZY0C' + 'version': '--OUw__L3ekVTG-5cM1VmVBddza1REkMCIN9c0D3m_MC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 290a301a532bf47adacfe4378a05540208c9d30d Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 15 Sep 2023 01:23:07 -0400 Subject: [PATCH 057/859] Roll Dart SDK from c0a505f9d1dd to 65117290c3b0 (1 revision) (#45867) https://dart.googlesource.com/sdk.git/+log/c0a505f9d1dd..65117290c3b0 2023-09-15 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-167.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC bdero@google.com,dart-vm-team@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 4d714f0dcdfa9..10ea1d46830d1 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': 'c0a505f9d1ddaa60eab30eab41906ca3e14ba688', + 'dart_revision': '65117290c3b0660d5916d0e0b1c96a5a6bdb60fc', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py From 7e5488ce989b6d69b49fb5e5f16de9869ed5770f Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 15 Sep 2023 01:27:12 -0400 Subject: [PATCH 058/859] Roll Skia from c0cabb0f93c9 to 4f7aafd0c853 (1 revision) (#45868) https://skia.googlesource.com/skia.git/+log/c0cabb0f93c9..4f7aafd0c853 2023-09-15 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from 5f6a13cae14e to 18fd0925a396 (8 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 10ea1d46830d1..e0f3036207df9 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'c0cabb0f93c9be1feaeef75b9ddd0d681e68a164', + 'skia_revision': '4f7aafd0c853455930cce7029648333d4ed01a50', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index c5c4c7d273910..c713f61c41430 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 257f246d3a2495c012a2c54181bc6503 +Signature: 5cf54b11066d06afce8c6f4139d3cc3e ==================================================================================================== LIBRARY: etc1 From de24092c667c67102c9bff943ca970369d0bbb0c Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 15 Sep 2023 04:57:04 -0400 Subject: [PATCH 059/859] Roll Skia from 4f7aafd0c853 to 824b1973703d (1 revision) (#45871) https://skia.googlesource.com/skia.git/+log/4f7aafd0c853..824b1973703d 2023-09-15 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from e1b80fac8bd3 to b4852ef95ec1 (8 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index e0f3036207df9..1a59d14d086db 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '4f7aafd0c853455930cce7029648333d4ed01a50', + 'skia_revision': '824b1973703d209f6680bf56108b8578e774ff26', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From bb86eea55d3256bba02766c5f40edd086121d1ba Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 15 Sep 2023 09:09:38 -0400 Subject: [PATCH 060/859] Roll Skia from 824b1973703d to 6e286034109e (1 revision) (#45875) https://skia.googlesource.com/skia.git/+log/824b1973703d..6e286034109e 2023-09-15 cmumford@google.com Disable use of DXC If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 1a59d14d086db..a05b1bd8e0bdd 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '824b1973703d209f6680bf56108b8578e774ff26', + 'skia_revision': '6e286034109ee2d136bbca87fd58e1023de47c71', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 27bd4f812213458e2661194559498db948eff206 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 15 Sep 2023 09:46:52 -0400 Subject: [PATCH 061/859] Roll Skia from 6e286034109e to 3492fc567816 (1 revision) (#45876) https://skia.googlesource.com/skia.git/+log/6e286034109e..3492fc567816 2023-09-15 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 786b5d99590b to 1ab98511aaae (6 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index a05b1bd8e0bdd..2bf7a9e5d43e5 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '6e286034109ee2d136bbca87fd58e1023de47c71', + 'skia_revision': '3492fc567816bd12c3945b8a4e3b58baae681c67', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From fb7270d261bf8fc06d107df0ce43871a2966d6a6 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 15 Sep 2023 10:34:27 -0400 Subject: [PATCH 062/859] Roll Skia from 3492fc567816 to de56f293eb41 (1 revision) (#45878) https://skia.googlesource.com/skia.git/+log/3492fc567816..de56f293eb41 2023-09-15 johnstiles@google.com Optimize 'expr ? 1 : 0' into 'cast(expr)'. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 2bf7a9e5d43e5..84dc6f8d8b9aa 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '3492fc567816bd12c3945b8a4e3b58baae681c67', + 'skia_revision': 'de56f293eb41d65786b9e6224fdf9a4702b30f51', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index c713f61c41430..b39ca27f20642 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 5cf54b11066d06afce8c6f4139d3cc3e +Signature: e3a9c12189ef2a03985197e724cc97d5 ==================================================================================================== LIBRARY: etc1 From 541f462ade324172c1d2bf5fff49ddff62192327 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 15 Sep 2023 11:22:18 -0400 Subject: [PATCH 063/859] Roll Fuchsia Linux SDK from ES0r-mYplPOBYHvUQ... to wWzXsy6kx1sp8Km34... (#45879) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC bdero@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 84dc6f8d8b9aa..57542d7fad70d 100644 --- a/DEPS +++ b/DEPS @@ -924,7 +924,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'ES0r-mYplPOBYHvUQWej_QitxiDHZC6VI_W-1-F2Im4C' + 'version': 'wWzXsy6kx1sp8Km34yMP4z_bIX4Hp2IigySu6bjGR-oC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index a1c7da16a8c14..8e1daab9747c8 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: 70cd5aee40464b0a2e14d85393cf15cd +Signature: aa4d18323ac385df749df52431de2e1d ==================================================================================================== LIBRARY: fuchsia_sdk @@ -3755,6 +3755,7 @@ ORIGIN: ../../../fuchsia/sdk/linux/fidl/fuchsia.component.resolution/overview.fi ORIGIN: ../../../fuchsia/sdk/linux/fidl/fuchsia.component.resolution/package.fidl + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/fidl/fuchsia.component.resolution/resolver.fidl + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/fidl/fuchsia.component.sandbox/sandbox.fidl + ../../../fuchsia/sdk/linux/LICENSE +ORIGIN: ../../../fuchsia/sdk/linux/fidl/fuchsia.component/namespace.fidl + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/fidl/fuchsia.component/overview.fidl + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/fidl/fuchsia.debugdata/publisher.fidl + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/fidl/fuchsia.diagnostics/overview.fidl + ../../../fuchsia/sdk/linux/LICENSE @@ -4003,6 +4004,7 @@ FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.component.resolution/overview.fidl FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.component.resolution/package.fidl FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.component.resolution/resolver.fidl FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.component.sandbox/sandbox.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.component/namespace.fidl FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.component/overview.fidl FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.debugdata/publisher.fidl FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.diagnostics/overview.fidl From 5497f6634441e067c0d461a3fa8c363e92453b2c Mon Sep 17 00:00:00 2001 From: gaaclarke <30870216+gaaclarke@users.noreply.github.com> Date: Fri, 15 Sep 2023 08:42:03 -0700 Subject: [PATCH 064/859] [Impeller] Introduce mock vulkan context builder (#45834) This allows us to have better control over the mock context and allows us to test situations like having the validations available, versus not available. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- .../vulkan/blit_command_vk_unittests.cc | 8 +-- .../vulkan/command_encoder_vk_unittests.cc | 4 +- .../backend/vulkan/context_vk_unittests.cc | 33 ++++++++-- .../vulkan/pass_bindings_cache_unittests.cc | 8 +-- .../backend/vulkan/test/mock_vulkan.cc | 65 +++++++++++++++---- .../backend/vulkan/test/mock_vulkan.h | 50 ++++++++++---- .../vulkan/test/mock_vulkan_unittests.cc | 2 +- 7 files changed, 129 insertions(+), 41 deletions(-) diff --git a/impeller/renderer/backend/vulkan/blit_command_vk_unittests.cc b/impeller/renderer/backend/vulkan/blit_command_vk_unittests.cc index 44206c2e7ddb5..e1172651353b7 100644 --- a/impeller/renderer/backend/vulkan/blit_command_vk_unittests.cc +++ b/impeller/renderer/backend/vulkan/blit_command_vk_unittests.cc @@ -11,7 +11,7 @@ namespace impeller { namespace testing { TEST(BlitCommandVkTest, BlitCopyTextureToTextureCommandVK) { - auto context = CreateMockVulkanContext(); + auto context = MockVulkanContextBuilder().Build(); auto pool = CommandPoolVK::GetThreadLocal(context.get()); auto encoder = std::make_unique(context)->Create(); BlitCopyTextureToTextureCommandVK cmd; @@ -28,7 +28,7 @@ TEST(BlitCommandVkTest, BlitCopyTextureToTextureCommandVK) { } TEST(BlitCommandVkTest, BlitCopyTextureToBufferCommandVK) { - auto context = CreateMockVulkanContext(); + auto context = MockVulkanContextBuilder().Build(); auto encoder = std::make_unique(context)->Create(); BlitCopyTextureToBufferCommandVK cmd; cmd.source = context->GetResourceAllocator()->CreateTexture({ @@ -44,7 +44,7 @@ TEST(BlitCommandVkTest, BlitCopyTextureToBufferCommandVK) { } TEST(BlitCommandVkTest, BlitCopyBufferToTextureCommandVK) { - auto context = CreateMockVulkanContext(); + auto context = MockVulkanContextBuilder().Build(); auto encoder = std::make_unique(context)->Create(); BlitCopyBufferToTextureCommandVK cmd; cmd.destination = context->GetResourceAllocator()->CreateTexture({ @@ -62,7 +62,7 @@ TEST(BlitCommandVkTest, BlitCopyBufferToTextureCommandVK) { } TEST(BlitCommandVkTest, BlitGenerateMipmapCommandVK) { - auto context = CreateMockVulkanContext(); + auto context = MockVulkanContextBuilder().Build(); auto encoder = std::make_unique(context)->Create(); BlitGenerateMipmapCommandVK cmd; cmd.texture = context->GetResourceAllocator()->CreateTexture({ diff --git a/impeller/renderer/backend/vulkan/command_encoder_vk_unittests.cc b/impeller/renderer/backend/vulkan/command_encoder_vk_unittests.cc index 0fa38fdb82985..2314796f54415 100644 --- a/impeller/renderer/backend/vulkan/command_encoder_vk_unittests.cc +++ b/impeller/renderer/backend/vulkan/command_encoder_vk_unittests.cc @@ -18,7 +18,7 @@ TEST(CommandEncoderVKTest, DeleteEncoderAfterThreadDies) { // command buffers before it cleans up its command pool. std::shared_ptr> called_functions; { - auto context = CreateMockVulkanContext(); + auto context = MockVulkanContextBuilder().Build(); called_functions = GetMockVulkanFunctions(context->GetDevice()); std::shared_ptr encoder; std::thread thread([&] { @@ -46,7 +46,7 @@ TEST(CommandEncoderVKTest, CleanupAfterSubmit) { { fml::AutoResetWaitableEvent wait_for_submit; fml::AutoResetWaitableEvent wait_for_thread_join; - auto context = CreateMockVulkanContext(); + auto context = MockVulkanContextBuilder().Build(); std::thread thread([&] { CommandEncoderFactoryVK factory(context); std::shared_ptr encoder = factory.Create(); diff --git a/impeller/renderer/backend/vulkan/context_vk_unittests.cc b/impeller/renderer/backend/vulkan/context_vk_unittests.cc index 8a577be6d79bc..11f8b1599bc21 100644 --- a/impeller/renderer/backend/vulkan/context_vk_unittests.cc +++ b/impeller/renderer/backend/vulkan/context_vk_unittests.cc @@ -14,7 +14,7 @@ TEST(ContextVKTest, DeletesCommandPools) { std::weak_ptr weak_context; std::weak_ptr weak_pool; { - std::shared_ptr context = CreateMockVulkanContext(); + std::shared_ptr context = MockVulkanContextBuilder().Build(); std::shared_ptr pool = CommandPoolVK::GetThreadLocal(context.get()); weak_pool = pool; @@ -30,7 +30,7 @@ TEST(ContextVKTest, DeletePipelineAfterContext) { std::shared_ptr> pipeline; std::shared_ptr> functions; { - std::shared_ptr context = CreateMockVulkanContext(); + std::shared_ptr context = MockVulkanContextBuilder().Build(); PipelineDescriptor pipeline_desc; pipeline_desc.SetVertexDescriptor(std::make_shared()); PipelineFuture pipeline_future = @@ -49,7 +49,7 @@ TEST(ContextVKTest, DeleteShaderFunctionAfterContext) { std::shared_ptr shader_function; std::shared_ptr> functions; { - std::shared_ptr context = CreateMockVulkanContext(); + std::shared_ptr context = MockVulkanContextBuilder().Build(); PipelineDescriptor pipeline_desc; pipeline_desc.SetVertexDescriptor(std::make_shared()); std::vector data = {0x03, 0x02, 0x23, 0x07}; @@ -71,7 +71,7 @@ TEST(ContextVKTest, DeletePipelineLibraryAfterContext) { std::shared_ptr pipeline_library; std::shared_ptr> functions; { - std::shared_ptr context = CreateMockVulkanContext(); + std::shared_ptr context = MockVulkanContextBuilder().Build(); PipelineDescriptor pipeline_desc; pipeline_desc.SetVertexDescriptor(std::make_shared()); pipeline_library = context->GetPipelineLibrary(); @@ -86,9 +86,30 @@ TEST(ContextVKTest, DeletePipelineLibraryAfterContext) { TEST(ContextVKTest, CanCreateContextInAbsenceOfValidationLayers) { // The mocked methods don't report the presence of a validation layer but we // explicitly ask for validation. Context creation should continue anyway. - auto context = CreateMockVulkanContext( - [](auto& settings) { settings.enable_validation = true; }); + auto context = MockVulkanContextBuilder() + .SetSettingsCallback([](auto& settings) { + settings.enable_validation = true; + }) + .Build(); ASSERT_NE(context, nullptr); + const CapabilitiesVK* capabilites_vk = + reinterpret_cast(context->GetCapabilities().get()); + ASSERT_FALSE(capabilites_vk->AreValidationsEnabled()); +} + +TEST(ContextVKTest, CanCreateContextWithValidationLayers) { + auto context = + MockVulkanContextBuilder() + .SetSettingsCallback( + [](auto& settings) { settings.enable_validation = true; }) + .SetInstanceExtensions( + {"VK_KHR_surface", "VK_MVK_macos_surface", "VK_EXT_debug_utils"}) + .SetInstanceLayers({"VK_LAYER_KHRONOS_validation"}) + .Build(); + ASSERT_NE(context, nullptr); + const CapabilitiesVK* capabilites_vk = + reinterpret_cast(context->GetCapabilities().get()); + ASSERT_TRUE(capabilites_vk->AreValidationsEnabled()); } } // namespace testing diff --git a/impeller/renderer/backend/vulkan/pass_bindings_cache_unittests.cc b/impeller/renderer/backend/vulkan/pass_bindings_cache_unittests.cc index bab2a25db7f35..e76213c200493 100644 --- a/impeller/renderer/backend/vulkan/pass_bindings_cache_unittests.cc +++ b/impeller/renderer/backend/vulkan/pass_bindings_cache_unittests.cc @@ -24,7 +24,7 @@ int32_t CountStringViewInstances(const std::vector& strings, } // namespace TEST(PassBindingsCacheTest, bindPipeline) { - auto context = CreateMockVulkanContext(); + auto context = MockVulkanContextBuilder().Build(); PassBindingsCache cache; auto encoder = std::make_unique(context)->Create(); auto buffer = encoder->GetCommandBuffer(); @@ -38,7 +38,7 @@ TEST(PassBindingsCacheTest, bindPipeline) { } TEST(PassBindingsCacheTest, setStencilReference) { - auto context = CreateMockVulkanContext(); + auto context = MockVulkanContextBuilder().Build(); PassBindingsCache cache; auto encoder = std::make_unique(context)->Create(); auto buffer = encoder->GetCommandBuffer(); @@ -53,7 +53,7 @@ TEST(PassBindingsCacheTest, setStencilReference) { } TEST(PassBindingsCacheTest, setScissor) { - auto context = CreateMockVulkanContext(); + auto context = MockVulkanContextBuilder().Build(); PassBindingsCache cache; auto encoder = std::make_unique(context)->Create(); auto buffer = encoder->GetCommandBuffer(); @@ -66,7 +66,7 @@ TEST(PassBindingsCacheTest, setScissor) { } TEST(PassBindingsCacheTest, setViewport) { - auto context = CreateMockVulkanContext(); + auto context = MockVulkanContextBuilder().Build(); PassBindingsCache cache; auto encoder = std::make_unique(context)->Create(); auto buffer = encoder->GetCommandBuffer(); diff --git a/impeller/renderer/backend/vulkan/test/mock_vulkan.cc b/impeller/renderer/backend/vulkan/test/mock_vulkan.cc index aafb3cf410153..ed311ac017a81 100644 --- a/impeller/renderer/backend/vulkan/test/mock_vulkan.cc +++ b/impeller/renderer/backend/vulkan/test/mock_vulkan.cc @@ -3,8 +3,10 @@ // found in the LICENSE file. #include "impeller/renderer/backend/vulkan/test/mock_vulkan.h" +#include #include #include "fml/macros.h" +#include "fml/thread_local.h" #include "impeller/base/thread_safety.h" namespace impeller { @@ -54,25 +56,41 @@ class MockDevice final { void noop() {} +FML_THREAD_LOCAL std::vector g_instance_extensions; + VkResult vkEnumerateInstanceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties) { if (!pProperties) { - *pPropertyCount = 2; - + *pPropertyCount = g_instance_extensions.size(); } else { - strcpy(pProperties[0].extensionName, "VK_KHR_surface"); - pProperties[0].specVersion = 0; - strcpy(pProperties[1].extensionName, "VK_MVK_macos_surface"); - pProperties[1].specVersion = 0; + uint32_t count = 0; + for (const std::string& ext : g_instance_extensions) { + strncpy(pProperties[count].extensionName, ext.c_str(), + sizeof(VkExtensionProperties::extensionName)); + pProperties[count].specVersion = 0; + count++; + } } return VK_SUCCESS; } +FML_THREAD_LOCAL std::vector g_instance_layers; + VkResult vkEnumerateInstanceLayerProperties(uint32_t* pPropertyCount, VkLayerProperties* pProperties) { - *pPropertyCount = 0; + if (!pProperties) { + *pPropertyCount = g_instance_layers.size(); + } else { + uint32_t count = 0; + for (const std::string& layer : g_instance_layers) { + strncpy(pProperties[count].layerName, layer.c_str(), + sizeof(VkLayerProperties::layerName)); + pProperties[count].specVersion = 0; + count++; + } + } return VK_SUCCESS; } @@ -415,6 +433,20 @@ VkResult vkGetFenceStatus(VkDevice device, VkFence fence) { return VK_SUCCESS; } +VkResult vkCreateDebugUtilsMessengerEXT( + VkInstance instance, + const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkDebugUtilsMessengerEXT* pMessenger) { + return VK_SUCCESS; +} + +VkResult vkSetDebugUtilsObjectNameEXT( + VkDevice device, + const VkDebugUtilsObjectNameInfoEXT* pNameInfo) { + return VK_SUCCESS; +} + PFN_vkVoidFunction GetMockVulkanProcAddress(VkInstance instance, const char* pName) { if (strcmp("vkEnumerateInstanceExtensionProperties", pName) == 0) { @@ -507,21 +539,30 @@ PFN_vkVoidFunction GetMockVulkanProcAddress(VkInstance instance, return (PFN_vkVoidFunction)vkWaitForFences; } else if (strcmp("vkGetFenceStatus", pName) == 0) { return (PFN_vkVoidFunction)vkGetFenceStatus; + } else if (strcmp("vkCreateDebugUtilsMessengerEXT", pName) == 0) { + return (PFN_vkVoidFunction)vkCreateDebugUtilsMessengerEXT; + } else if (strcmp("vkSetDebugUtilsObjectNameEXT", pName) == 0) { + return (PFN_vkVoidFunction)vkSetDebugUtilsObjectNameEXT; } return noop; } } // namespace -std::shared_ptr CreateMockVulkanContext( - const std::function& settings_callback) { +MockVulkanContextBuilder::MockVulkanContextBuilder() + : instance_extensions_({"VK_KHR_surface", "VK_MVK_macos_surface"}) {} + +std::shared_ptr MockVulkanContextBuilder::Build() { auto message_loop = fml::ConcurrentMessageLoop::Create(); ContextVK::Settings settings; settings.proc_address_callback = GetMockVulkanProcAddress; - if (settings_callback) { - settings_callback(settings); + if (settings_callback_) { + settings_callback_(settings); } - return ContextVK::Create(std::move(settings)); + g_instance_extensions = instance_extensions_; + g_instance_layers = instance_layers_; + std::shared_ptr result = ContextVK::Create(std::move(settings)); + return result; } std::shared_ptr> GetMockVulkanFunctions( diff --git a/impeller/renderer/backend/vulkan/test/mock_vulkan.h b/impeller/renderer/backend/vulkan/test/mock_vulkan.h index 2984db473ff09..41c82c6da2a90 100644 --- a/impeller/renderer/backend/vulkan/test/mock_vulkan.h +++ b/impeller/renderer/backend/vulkan/test/mock_vulkan.h @@ -16,18 +16,44 @@ namespace testing { std::shared_ptr> GetMockVulkanFunctions( VkDevice device); -//------------------------------------------------------------------------------ -/// @brief Create a Vulkan context with Vulkan functions mocked. The caller -/// is given a chance to tinker on the settings right before a -/// context is created. -/// -/// @param[in] settings_callback The settings callback -/// -/// @return A context if one can be created. -/// -std::shared_ptr CreateMockVulkanContext( - const std::function& settings_callback = - nullptr); +class MockVulkanContextBuilder { + public: + MockVulkanContextBuilder(); + + //------------------------------------------------------------------------------ + /// @brief Create a Vulkan context with Vulkan functions mocked. The + /// caller is given a chance to tinker on the settings right + /// before a context is created. + /// + /// @return A context if one can be created. + /// + std::shared_ptr Build(); + + /// A callback that allows the modification of the ContextVK::Settings before + /// the context is made. + MockVulkanContextBuilder& SetSettingsCallback( + const std::function& settings_callback) { + settings_callback_ = settings_callback; + return *this; + } + + MockVulkanContextBuilder& SetInstanceExtensions( + const std::vector& instance_extensions) { + instance_extensions_ = instance_extensions; + return *this; + } + + MockVulkanContextBuilder& SetInstanceLayers( + const std::vector& instance_layers) { + instance_layers_ = instance_layers; + return *this; + } + + private: + std::function settings_callback_; + std::vector instance_extensions_; + std::vector instance_layers_; +}; } // namespace testing } // namespace impeller diff --git a/impeller/renderer/backend/vulkan/test/mock_vulkan_unittests.cc b/impeller/renderer/backend/vulkan/test/mock_vulkan_unittests.cc index 05cc7682e004d..de28491e69fed 100644 --- a/impeller/renderer/backend/vulkan/test/mock_vulkan_unittests.cc +++ b/impeller/renderer/backend/vulkan/test/mock_vulkan_unittests.cc @@ -14,7 +14,7 @@ TEST(MockVulkanContextTest, IsThreadSafe) { // In a typical app, there is a single ContextVK per app, shared b/w threads. // // This test ensures that the (mock) ContextVK is thread-safe. - auto const context = CreateMockVulkanContext(); + auto const context = MockVulkanContextBuilder().Build(); // Spawn two threads, and have them create a CommandPoolVK each. std::thread thread1([&context]() { From 4bc45a31b5b2cbd01c70455d36c25c44294075cd Mon Sep 17 00:00:00 2001 From: Kevin Lubick Date: Fri, 15 Sep 2023 11:48:20 -0400 Subject: [PATCH 065/859] Migrate GrMipmapped->skgpu::Mipmapped (#45881) Skia's Graphite and Ganesh backend coalesced two enums regarding mipmaps into one and deprecated the public Ganesh version. This migrates Flutter to use the preferred type. No functional changes expected. See also https://skia-review.googlesource.com/c/skia/+/753567 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [ ] I listed at least one issue that this PR fixes in the description above. - [x] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [ ] I updated/added relevant documentation (doc comments with `///`). - [x] I signed the [CLA]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat --- lib/web_ui/skwasm/image.cpp | 3 ++- shell/common/rasterizer.cc | 3 ++- shell/gpu/gpu_surface_metal_skia.mm | 3 ++- .../darwin/graphics/FlutterDarwinExternalTextureMetal.mm | 7 ++++--- shell/platform/embedder/embedder.cc | 9 +++++---- .../platform/embedder/tests/embedder_metal_unittests.mm | 5 +++-- .../tests/embedder_test_backingstore_producer.cc | 3 ++- testing/test_metal_surface_impl.mm | 5 +++-- 8 files changed, 23 insertions(+), 15 deletions(-) diff --git a/lib/web_ui/skwasm/image.cpp b/lib/web_ui/skwasm/image.cpp index 74df647625600..0e7665d0722d2 100644 --- a/lib/web_ui/skwasm/image.cpp +++ b/lib/web_ui/skwasm/image.cpp @@ -12,6 +12,7 @@ #include "third_party/skia/include/core/SkImage.h" #include "third_party/skia/include/core/SkImageInfo.h" #include "third_party/skia/include/core/SkPicture.h" +#include "third_party/skia/include/gpu/GpuTypes.h" #include "third_party/skia/include/gpu/GrBackendSurface.h" #include "third_party/skia/include/gpu/GrDirectContext.h" #include "third_party/skia/include/gpu/ganesh/GrExternalTextureGenerator.h" @@ -90,7 +91,7 @@ class TextureSourceImageGenerator : public GrExternalTextureGenerator { std::unique_ptr generateExternalTexture( GrRecordingContext* context, - GrMipMapped mipmapped) override { + skgpu::Mipmapped mipmapped) override { GrGLTextureInfo glInfo; glInfo.fID = skwasm_createGlTextureFromTextureSource( _textureSourceWrapper->getTextureSource(), fInfo.width(), diff --git a/shell/common/rasterizer.cc b/shell/common/rasterizer.cc index 4ed0b2fb4fd31..9a7e6e16552b0 100644 --- a/shell/common/rasterizer.cc +++ b/shell/common/rasterizer.cc @@ -27,6 +27,7 @@ #include "third_party/skia/include/core/SkSize.h" #include "third_party/skia/include/core/SkSurface.h" #include "third_party/skia/include/encode/SkPngEncoder.h" +#include "third_party/skia/include/gpu/GpuTypes.h" #include "third_party/skia/include/gpu/GrBackendSurface.h" #include "third_party/skia/include/gpu/GrDirectContext.h" #include "third_party/skia/include/gpu/GrTypes.h" @@ -346,7 +347,7 @@ std::unique_ptr Rasterizer::MakeSkiaGpuImage( GrBackendTexture texture = context->createBackendTexture( image_info.width(), image_info.height(), image_info.colorType(), - GrMipmapped::kNo, GrRenderable::kYes); + skgpu::Mipmapped::kNo, GrRenderable::kYes); if (!texture.isValid()) { result = std::make_unique( GrBackendTexture(), nullptr, nullptr, diff --git a/shell/gpu/gpu_surface_metal_skia.mm b/shell/gpu/gpu_surface_metal_skia.mm index ed884151d0ab7..652891c9acbd6 100644 --- a/shell/gpu/gpu_surface_metal_skia.mm +++ b/shell/gpu/gpu_surface_metal_skia.mm @@ -24,6 +24,7 @@ #include "third_party/skia/include/core/SkSize.h" #include "third_party/skia/include/core/SkSurface.h" #include "third_party/skia/include/core/SkSurfaceProps.h" +#include "third_party/skia/include/gpu/GpuTypes.h" #include "third_party/skia/include/gpu/GrBackendSurface.h" #include "third_party/skia/include/gpu/ganesh/SkSurfaceGanesh.h" #include "third_party/skia/include/ports/SkCFObject.h" @@ -44,7 +45,7 @@ SkSurface::ReleaseContext release_context) { GrMtlTextureInfo info; info.fTexture.reset([texture retain]); - GrBackendTexture backend_texture(texture.width, texture.height, GrMipmapped::kNo, info); + GrBackendTexture backend_texture(texture.width, texture.height, skgpu::Mipmapped::kNo, info); return SkSurfaces::WrapBackendTexture( context, backend_texture, origin, static_cast(sample_cnt), color_type, std::move(color_space), props, release_proc, release_context); diff --git a/shell/platform/darwin/graphics/FlutterDarwinExternalTextureMetal.mm b/shell/platform/darwin/graphics/FlutterDarwinExternalTextureMetal.mm index 9c0190e827dec..55ca7cb906408 100644 --- a/shell/platform/darwin/graphics/FlutterDarwinExternalTextureMetal.mm +++ b/shell/platform/darwin/graphics/FlutterDarwinExternalTextureMetal.mm @@ -10,6 +10,7 @@ #include "third_party/skia/include/core/SkColorSpace.h" #include "third_party/skia/include/core/SkImage.h" #include "third_party/skia/include/core/SkYUVAInfo.h" +#include "third_party/skia/include/gpu/GpuTypes.h" #include "third_party/skia/include/gpu/GrBackendSurface.h" #include "third_party/skia/include/gpu/GrDirectContext.h" #include "third_party/skia/include/gpu/GrYUVABackendTextures.h" @@ -295,7 +296,7 @@ @implementation FlutterDarwinExternalTextureSkImageWrapper GrBackendTexture skiaBackendTextures[2]; skiaBackendTextures[0] = GrBackendTexture(/*width=*/width, /*height=*/height, - /*mipMapped=*/GrMipMapped::kNo, + /*mipMapped=*/skgpu::Mipmapped::kNo, /*textureInfo=*/ySkiaTextureInfo); GrMtlTextureInfo uvSkiaTextureInfo; @@ -303,7 +304,7 @@ @implementation FlutterDarwinExternalTextureSkImageWrapper skiaBackendTextures[1] = GrBackendTexture(/*width=*/width, /*height=*/height, - /*mipMapped=*/GrMipMapped::kNo, + /*mipMapped=*/skgpu::Mipmapped::kNo, /*textureInfo=*/uvSkiaTextureInfo); SkYUVAInfo yuvaInfo(skiaBackendTextures[0].dimensions(), SkYUVAInfo::PlaneConfig::kY_UV, SkYUVAInfo::Subsampling::k444, colorSpace); @@ -324,7 +325,7 @@ GrYUVABackendTextures yuvaBackendTextures(yuvaInfo, skiaBackendTextures, GrBackendTexture skiaBackendTexture(/*width=*/width, /*height=*/height, - /*mipMapped=*/GrMipMapped ::kNo, + /*mipMapped=*/skgpu::Mipmapped ::kNo, /*textureInfo=*/skiaTextureInfo); return SkImages::BorrowTextureFrom(grContext, skiaBackendTexture, kTopLeft_GrSurfaceOrigin, diff --git a/shell/platform/embedder/embedder.cc b/shell/platform/embedder/embedder.cc index af32d9ffa3f1c..eb6b4edb85bbf 100644 --- a/shell/platform/embedder/embedder.cc +++ b/shell/platform/embedder/embedder.cc @@ -20,6 +20,7 @@ #include "third_party/dart/runtime/bin/elf_loader.h" #include "third_party/dart/runtime/include/dart_native_api.h" #include "third_party/skia/include/core/SkSurface.h" +#include "third_party/skia/include/gpu/GpuTypes.h" #include "third_party/skia/include/gpu/GrBackendSurface.h" #include "third_party/skia/include/gpu/ganesh/SkSurfaceGanesh.h" @@ -924,10 +925,10 @@ static sk_sp MakeSkSurfaceFromBackingStore( sk_cfp mtl_texture; mtl_texture.retain(metal->texture.texture); texture_info.fTexture = mtl_texture; - GrBackendTexture backend_texture(config.size.width, // - config.size.height, // - GrMipMapped::kNo, // - texture_info // + GrBackendTexture backend_texture(config.size.width, // + config.size.height, // + skgpu::Mipmapped::kNo, // + texture_info // ); SkSurfaceProps surface_properties(0, kUnknown_SkPixelGeometry); diff --git a/shell/platform/embedder/tests/embedder_metal_unittests.mm b/shell/platform/embedder/tests/embedder_metal_unittests.mm index f3666d9fee4c4..c23a6553a5360 100644 --- a/shell/platform/embedder/tests/embedder_metal_unittests.mm +++ b/shell/platform/embedder/tests/embedder_metal_unittests.mm @@ -21,6 +21,7 @@ #include "flutter/testing/testing.h" #include "third_party/skia/include/core/SkSurface.h" +#include "third_party/skia/include/gpu/GpuTypes.h" #include "third_party/skia/include/gpu/GrBackendSurface.h" #include "third_party/skia/include/gpu/ganesh/SkSurfaceGanesh.h" @@ -63,8 +64,8 @@ void* texture) { GrMtlTextureInfo info; info.fTexture.reset([(id)texture retain]); - GrBackendTexture backend_texture(texture_size.width(), texture_size.height(), GrMipmapped::kNo, - info); + GrBackendTexture backend_texture(texture_size.width(), texture_size.height(), + skgpu::Mipmapped::kNo, info); return SkSurfaces::WrapBackendTexture(skia_context.get(), backend_texture, kTopLeft_GrSurfaceOrigin, 1, kBGRA_8888_SkColorType, diff --git a/shell/platform/embedder/tests/embedder_test_backingstore_producer.cc b/shell/platform/embedder/tests/embedder_test_backingstore_producer.cc index eb74388dac16c..0c67e3dccea2d 100644 --- a/shell/platform/embedder/tests/embedder_test_backingstore_producer.cc +++ b/shell/platform/embedder/tests/embedder_test_backingstore_producer.cc @@ -11,6 +11,7 @@ #include "third_party/skia/include/core/SkImageInfo.h" #include "third_party/skia/include/core/SkSize.h" #include "third_party/skia/include/core/SkSurface.h" +#include "third_party/skia/include/gpu/GpuTypes.h" #include "third_party/skia/include/gpu/GrBackendSurface.h" #include "third_party/skia/include/gpu/ganesh/SkSurfaceGanesh.h" #include "third_party/skia/include/gpu/ganesh/gl/GrGLBackendSurface.h" @@ -281,7 +282,7 @@ bool EmbedderTestBackingStoreProducer::CreateMTLTexture( GrMtlTextureInfo skia_texture_info; skia_texture_info.fTexture.reset(SkCFSafeRetain(texture_info.texture)); GrBackendTexture backend_texture(surface_size.width(), surface_size.height(), - GrMipmapped::kNo, skia_texture_info); + skgpu::Mipmapped::kNo, skia_texture_info); sk_sp surface = SkSurfaces::WrapBackendTexture( context_.get(), backend_texture, kTopLeft_GrSurfaceOrigin, 1, diff --git a/testing/test_metal_surface_impl.mm b/testing/test_metal_surface_impl.mm index 34878a9613d0d..cf2c6931f8621 100644 --- a/testing/test_metal_surface_impl.mm +++ b/testing/test_metal_surface_impl.mm @@ -15,6 +15,7 @@ #include "third_party/skia/include/core/SkRefCnt.h" #include "third_party/skia/include/core/SkSize.h" #include "third_party/skia/include/core/SkSurface.h" +#include "third_party/skia/include/gpu/GpuTypes.h" #include "third_party/skia/include/gpu/GrBackendSurface.h" #include "third_party/skia/include/gpu/ganesh/SkSurfaceGanesh.h" @@ -26,8 +27,8 @@ GrMtlTextureInfo skia_texture_info; skia_texture_info.fTexture.reset([texture retain]); - GrBackendTexture backend_texture(surface_size.width(), surface_size.height(), GrMipmapped::kNo, - skia_texture_info); + GrBackendTexture backend_texture(surface_size.width(), surface_size.height(), + skgpu::Mipmapped::kNo, skia_texture_info); sk_sp surface = SkSurfaces::WrapBackendTexture( test_metal_context_.GetSkiaContext().get(), backend_texture, kTopLeft_GrSurfaceOrigin, 1, From a98fb2b504eaf7f9d2a7eef2924caeee146303e8 Mon Sep 17 00:00:00 2001 From: Reid Baker Date: Fri, 15 Sep 2023 08:54:04 -0700 Subject: [PATCH 066/859] Update AGP and Kotlin for scenario app (#45549) flutter/flutter/#134220 Command required to update lock files required not using the custom task and required matching the version of gradle in ci and passing a custom version of java. `~/.gradle/wrapper/dists/gradle-7.5.1-bin/7jzzequgds1hbszbhq3npc5ng/gradle-7.5.1/bin/gradle -D=org.gradle.java.home=/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home app:dependencies --write-locks` for app:dependencies and dependencies. --- .../scenario_app/android/app/gradle.lockfile | 44 ++-- .../android/app/src/main/AndroidManifest.xml | 7 +- .../dev/flutter/scenarios/TestActivity.java | 14 +- .../main/res/xml/data_extraction_rules.xml | 18 ++ .../xml/extraction_config_11_and_below.xml | 8 + testing/scenario_app/android/build.gradle | 13 +- .../android/buildscript-gradle.lockfile | 203 +++++++++--------- 7 files changed, 178 insertions(+), 129 deletions(-) create mode 100644 testing/scenario_app/android/app/src/main/res/xml/data_extraction_rules.xml create mode 100644 testing/scenario_app/android/app/src/main/res/xml/extraction_config_11_and_below.xml diff --git a/testing/scenario_app/android/app/gradle.lockfile b/testing/scenario_app/android/app/gradle.lockfile index 630350a3efe1b..e083af965d3fb 100644 --- a/testing/scenario_app/android/app/gradle.lockfile +++ b/testing/scenario_app/android/app/gradle.lockfile @@ -125,7 +125,7 @@ jline:jline:2.14.6=lintClassPath junit:junit:4.12=androidTestImplementationDependenciesMetadata,debugAndroidTestCompileClasspath,debugAndroidTestImplementationDependenciesMetadata,debugAndroidTestRuntimeClasspath junit:junit:4.13.1=lintClassPath net.java.dev.jna:jna-platform:5.6.0=lintClassPath -net.java.dev.jna:jna:5.6.0=lintClassPath +net.java.dev.jna:jna:5.6.0=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath,lintClassPath net.sf.jopt-simple:jopt-simple:4.9=lintClassPath net.sf.kxml:kxml2:2.3.0=androidTestImplementationDependenciesMetadata,debugAndroidTestCompileClasspath,debugAndroidTestImplementationDependenciesMetadata,debugAndroidTestRuntimeClasspath,lintClassPath org.apache.ant:ant-antlr:1.10.9=lintClassPath @@ -168,29 +168,27 @@ org.glassfish.jaxb:txw2:2.3.2=lintClassPath org.hamcrest:hamcrest-core:1.3=androidTestImplementationDependenciesMetadata,debugAndroidTestCompileClasspath,debugAndroidTestImplementationDependenciesMetadata,debugAndroidTestRuntimeClasspath,lintClassPath org.hamcrest:hamcrest-integration:1.3=androidTestImplementationDependenciesMetadata,debugAndroidTestCompileClasspath,debugAndroidTestImplementationDependenciesMetadata,debugAndroidTestRuntimeClasspath org.hamcrest:hamcrest-library:1.3=androidTestImplementationDependenciesMetadata,debugAndroidTestCompileClasspath,debugAndroidTestImplementationDependenciesMetadata,debugAndroidTestRuntimeClasspath -org.jacoco:org.jacoco.agent:0.8.3=androidJacocoAnt -org.jacoco:org.jacoco.ant:0.8.3=androidJacocoAnt -org.jacoco:org.jacoco.core:0.8.3=androidJacocoAnt -org.jacoco:org.jacoco.report:0.8.3=androidJacocoAnt +org.jacoco:org.jacoco.agent:0.8.8=androidJacocoAnt +org.jacoco:org.jacoco.ant:0.8.8=androidJacocoAnt +org.jacoco:org.jacoco.core:0.8.8=androidJacocoAnt +org.jacoco:org.jacoco.report:0.8.8=androidJacocoAnt org.jetbrains.intellij.deps:trove4j:1.0.20181211=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath,lintClassPath -org.jetbrains.kotlin:kotlin-compiler-embeddable:1.5.30=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath -org.jetbrains.kotlin:kotlin-daemon-embeddable:1.5.30=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath -org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:1.5.30=kotlinKlibCommonizerClasspath +org.jetbrains.kotlin:kotlin-compiler-embeddable:1.6.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath +org.jetbrains.kotlin:kotlin-daemon-embeddable:1.6.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath +org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:1.6.10=kotlinKlibCommonizerClasspath org.jetbrains.kotlin:kotlin-reflect:1.4.32=lintClassPath -org.jetbrains.kotlin:kotlin-reflect:1.5.30=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath -org.jetbrains.kotlin:kotlin-script-runtime:1.5.30=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath +org.jetbrains.kotlin:kotlin-reflect:1.6.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath +org.jetbrains.kotlin:kotlin-script-runtime:1.6.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath org.jetbrains.kotlin:kotlin-stdlib-common:1.4.21=androidTestImplementationDependenciesMetadata,debugAndroidTestImplementationDependenciesMetadata org.jetbrains.kotlin:kotlin-stdlib-common:1.4.32=lintClassPath -org.jetbrains.kotlin:kotlin-stdlib-common:1.5.30=apiDependenciesMetadata,debugApiDependenciesMetadata,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath,releaseApiDependenciesMetadata -org.jetbrains.kotlin:kotlin-stdlib-common:1.5.31=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugImplementationDependenciesMetadata,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,implementationDependenciesMetadata,releaseCompileClasspath,releaseImplementationDependenciesMetadata,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath +org.jetbrains.kotlin:kotlin-stdlib-common:1.6.10=apiDependenciesMetadata,debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugApiDependenciesMetadata,debugCompileClasspath,debugImplementationDependenciesMetadata,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath,releaseApiDependenciesMetadata,releaseCompileClasspath,releaseImplementationDependenciesMetadata,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.32=lintClassPath -org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.30=apiDependenciesMetadata,debugAndroidTestCompileClasspath,debugApiDependenciesMetadata,debugCompileClasspath,debugImplementationDependenciesMetadata,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,implementationDependenciesMetadata,releaseApiDependenciesMetadata,releaseCompileClasspath,releaseImplementationDependenciesMetadata,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath +org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.10=apiDependenciesMetadata,debugAndroidTestCompileClasspath,debugApiDependenciesMetadata,debugCompileClasspath,debugImplementationDependenciesMetadata,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,implementationDependenciesMetadata,releaseApiDependenciesMetadata,releaseCompileClasspath,releaseImplementationDependenciesMetadata,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.32=lintClassPath -org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30=apiDependenciesMetadata,debugAndroidTestCompileClasspath,debugApiDependenciesMetadata,debugCompileClasspath,debugImplementationDependenciesMetadata,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,implementationDependenciesMetadata,releaseApiDependenciesMetadata,releaseCompileClasspath,releaseImplementationDependenciesMetadata,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath +org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10=apiDependenciesMetadata,debugAndroidTestCompileClasspath,debugApiDependenciesMetadata,debugCompileClasspath,debugImplementationDependenciesMetadata,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,implementationDependenciesMetadata,releaseApiDependenciesMetadata,releaseCompileClasspath,releaseImplementationDependenciesMetadata,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath org.jetbrains.kotlin:kotlin-stdlib:1.4.21=androidTestImplementationDependenciesMetadata,debugAndroidTestImplementationDependenciesMetadata org.jetbrains.kotlin:kotlin-stdlib:1.4.32=lintClassPath -org.jetbrains.kotlin:kotlin-stdlib:1.5.30=apiDependenciesMetadata,debugApiDependenciesMetadata,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath,releaseApiDependenciesMetadata -org.jetbrains.kotlin:kotlin-stdlib:1.5.31=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugImplementationDependenciesMetadata,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,implementationDependenciesMetadata,releaseCompileClasspath,releaseImplementationDependenciesMetadata,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath +org.jetbrains.kotlin:kotlin-stdlib:1.6.10=apiDependenciesMetadata,debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugApiDependenciesMetadata,debugCompileClasspath,debugImplementationDependenciesMetadata,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath,releaseApiDependenciesMetadata,releaseCompileClasspath,releaseImplementationDependenciesMetadata,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2=debugAndroidTestCompileClasspath,debugCompileClasspath,debugImplementationDependenciesMetadata,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,implementationDependenciesMetadata,releaseCompileClasspath,releaseImplementationDependenciesMetadata,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.2=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2=debugAndroidTestCompileClasspath,debugCompileClasspath,debugImplementationDependenciesMetadata,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,implementationDependenciesMetadata,releaseCompileClasspath,releaseImplementationDependenciesMetadata,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath @@ -203,12 +201,16 @@ org.junit.platform:junit-platform-launcher:1.7.0=lintClassPath org.junit:junit-bom:5.7.0=lintClassPath org.jvnet.staxex:stax-ex:1.8.1=lintClassPath org.opentest4j:opentest4j:1.2.0=lintClassPath -org.ow2.asm:asm-analysis:7.0=androidJacocoAnt,lintClassPath -org.ow2.asm:asm-commons:7.0=androidJacocoAnt,lintClassPath -org.ow2.asm:asm-tree:7.0=androidJacocoAnt,lintClassPath +org.ow2.asm:asm-analysis:7.0=lintClassPath +org.ow2.asm:asm-analysis:9.2=androidJacocoAnt +org.ow2.asm:asm-commons:7.0=lintClassPath +org.ow2.asm:asm-commons:9.2=androidJacocoAnt +org.ow2.asm:asm-tree:7.0=lintClassPath +org.ow2.asm:asm-tree:9.2=androidJacocoAnt org.ow2.asm:asm-util:7.0=lintClassPath -org.ow2.asm:asm:7.0=androidJacocoAnt,lintClassPath +org.ow2.asm:asm:7.0=lintClassPath +org.ow2.asm:asm:9.2=androidJacocoAnt org.testng:testng:7.3.0=lintClassPath xerces:xercesImpl:2.12.0=lintClassPath xml-apis:xml-apis:1.4.01=lintClassPath -empty=androidApis,androidJdkImage,androidTestApiDependenciesMetadata,androidTestCompileOnlyDependenciesMetadata,androidTestDebugApiDependenciesMetadata,androidTestDebugCompileOnlyDependenciesMetadata,androidTestDebugImplementationDependenciesMetadata,androidTestDebugIntransitiveDependenciesMetadata,androidTestDebugRuntimeOnlyDependenciesMetadata,androidTestIntransitiveDependenciesMetadata,androidTestReleaseApiDependenciesMetadata,androidTestReleaseCompileOnlyDependenciesMetadata,androidTestReleaseImplementationDependenciesMetadata,androidTestReleaseIntransitiveDependenciesMetadata,androidTestReleaseRuntimeOnlyDependenciesMetadata,androidTestRuntimeOnlyDependenciesMetadata,androidTestUtil,compileOnlyDependenciesMetadata,coreLibraryDesugaring,debugAndroidTestAnnotationProcessorClasspath,debugAndroidTestApiDependenciesMetadata,debugAndroidTestCompileOnlyDependenciesMetadata,debugAndroidTestIntransitiveDependenciesMetadata,debugAndroidTestRuntimeOnlyDependenciesMetadata,debugAnnotationProcessorClasspath,debugCompileOnly,debugCompileOnlyDependenciesMetadata,debugIntransitiveDependenciesMetadata,debugReverseMetadataValues,debugRuntimeOnlyDependenciesMetadata,debugUnitTestAnnotationProcessorClasspath,debugUnitTestApiDependenciesMetadata,debugUnitTestCompileOnlyDependenciesMetadata,debugUnitTestImplementationDependenciesMetadata,debugUnitTestIntransitiveDependenciesMetadata,debugUnitTestRuntimeOnlyDependenciesMetadata,debugWearBundling,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinCompilerPluginClasspathDebug,kotlinCompilerPluginClasspathDebugAndroidTest,kotlinCompilerPluginClasspathDebugUnitTest,kotlinCompilerPluginClasspathRelease,kotlinCompilerPluginClasspathReleaseUnitTest,kotlinNativeCompilerPluginClasspath,lintChecks,lintPublish,releaseAnnotationProcessorClasspath,releaseCompileOnly,releaseCompileOnlyDependenciesMetadata,releaseIntransitiveDependenciesMetadata,releaseReverseMetadataValues,releaseRuntimeOnlyDependenciesMetadata,releaseUnitTestAnnotationProcessorClasspath,releaseUnitTestApiDependenciesMetadata,releaseUnitTestCompileOnlyDependenciesMetadata,releaseUnitTestImplementationDependenciesMetadata,releaseUnitTestIntransitiveDependenciesMetadata,releaseUnitTestRuntimeOnlyDependenciesMetadata,releaseWearBundling,runtimeOnlyDependenciesMetadata,testApiDependenciesMetadata,testCompileOnlyDependenciesMetadata,testDebugApiDependenciesMetadata,testDebugCompileOnlyDependenciesMetadata,testDebugImplementationDependenciesMetadata,testDebugIntransitiveDependenciesMetadata,testDebugRuntimeOnlyDependenciesMetadata,testImplementationDependenciesMetadata,testIntransitiveDependenciesMetadata,testReleaseApiDependenciesMetadata,testReleaseCompileOnlyDependenciesMetadata,testReleaseImplementationDependenciesMetadata,testReleaseIntransitiveDependenciesMetadata,testReleaseRuntimeOnlyDependenciesMetadata,testRuntimeOnlyDependenciesMetadata +empty=androidApis,androidJdkImage,androidTestApiDependenciesMetadata,androidTestCompileOnlyDependenciesMetadata,androidTestDebugApiDependenciesMetadata,androidTestDebugCompileOnlyDependenciesMetadata,androidTestDebugImplementationDependenciesMetadata,androidTestDebugIntransitiveDependenciesMetadata,androidTestDebugRuntimeOnlyDependenciesMetadata,androidTestIntransitiveDependenciesMetadata,androidTestReleaseApiDependenciesMetadata,androidTestReleaseCompileOnlyDependenciesMetadata,androidTestReleaseImplementationDependenciesMetadata,androidTestReleaseIntransitiveDependenciesMetadata,androidTestReleaseRuntimeOnlyDependenciesMetadata,androidTestRuntimeOnlyDependenciesMetadata,androidTestUtil,compileOnlyDependenciesMetadata,coreLibraryDesugaring,debugAndroidTestAnnotationProcessorClasspath,debugAndroidTestApiDependenciesMetadata,debugAndroidTestCompileOnlyDependenciesMetadata,debugAndroidTestIntransitiveDependenciesMetadata,debugAndroidTestRuntimeOnlyDependenciesMetadata,debugAnnotationProcessorClasspath,debugCompileOnly,debugCompileOnlyDependenciesMetadata,debugIntransitiveDependenciesMetadata,debugReverseMetadataValues,debugRuntimeOnlyDependenciesMetadata,debugUnitTestAnnotationProcessorClasspath,debugUnitTestApiDependenciesMetadata,debugUnitTestCompileOnlyDependenciesMetadata,debugUnitTestImplementationDependenciesMetadata,debugUnitTestIntransitiveDependenciesMetadata,debugUnitTestRuntimeOnlyDependenciesMetadata,debugWearBundling,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinCompilerPluginClasspathDebug,kotlinCompilerPluginClasspathDebugAndroidTest,kotlinCompilerPluginClasspathDebugUnitTest,kotlinCompilerPluginClasspathRelease,kotlinCompilerPluginClasspathReleaseUnitTest,kotlinNativeCompilerPluginClasspath,lintChecks,lintPublish,releaseAnnotationProcessorClasspath,releaseCompileOnly,releaseCompileOnlyDependenciesMetadata,releaseIntransitiveDependenciesMetadata,releaseReverseMetadataValues,releaseRuntimeOnlyDependenciesMetadata,releaseUnitTestAnnotationProcessorClasspath,releaseUnitTestApiDependenciesMetadata,releaseUnitTestCompileOnlyDependenciesMetadata,releaseUnitTestImplementationDependenciesMetadata,releaseUnitTestIntransitiveDependenciesMetadata,releaseUnitTestRuntimeOnlyDependenciesMetadata,releaseWearBundling,runtimeOnlyDependenciesMetadata,testApiDependenciesMetadata,testCompileOnlyDependenciesMetadata,testDebugApiDependenciesMetadata,testDebugCompileOnlyDependenciesMetadata,testDebugImplementationDependenciesMetadata,testDebugIntransitiveDependenciesMetadata,testDebugRuntimeOnlyDependenciesMetadata,testFixturesApiDependenciesMetadata,testFixturesCompileOnlyDependenciesMetadata,testFixturesDebugApiDependenciesMetadata,testFixturesDebugCompileOnlyDependenciesMetadata,testFixturesDebugImplementationDependenciesMetadata,testFixturesDebugIntransitiveDependenciesMetadata,testFixturesDebugRuntimeOnlyDependenciesMetadata,testFixturesImplementationDependenciesMetadata,testFixturesIntransitiveDependenciesMetadata,testFixturesReleaseApiDependenciesMetadata,testFixturesReleaseCompileOnlyDependenciesMetadata,testFixturesReleaseImplementationDependenciesMetadata,testFixturesReleaseIntransitiveDependenciesMetadata,testFixturesReleaseRuntimeOnlyDependenciesMetadata,testFixturesRuntimeOnlyDependenciesMetadata,testImplementationDependenciesMetadata,testIntransitiveDependenciesMetadata,testReleaseApiDependenciesMetadata,testReleaseCompileOnlyDependenciesMetadata,testReleaseImplementationDependenciesMetadata,testReleaseIntransitiveDependenciesMetadata,testReleaseRuntimeOnlyDependenciesMetadata,testRuntimeOnlyDependenciesMetadata diff --git a/testing/scenario_app/android/app/src/main/AndroidManifest.xml b/testing/scenario_app/android/app/src/main/AndroidManifest.xml index 96ec901014b28..e125978054d8d 100644 --- a/testing/scenario_app/android/app/src/main/AndroidManifest.xml +++ b/testing/scenario_app/android/app/src/main/AndroidManifest.xml @@ -1,13 +1,16 @@ + android:theme="@style/AppTheme" + android:dataExtractionRules="@xml/data_extraction_rules" + android:fullBackupContent="@xml/extraction_config_11_and_below" + tools:ignore="UnusedAttribute"> { + AssetFileDescriptor afd = null; try { - final FileDescriptor fd = - getContentResolver().openAssetFileDescriptor(logFile, "w").getFileDescriptor(); + afd = getContentResolver().openAssetFileDescriptor(logFile, "w"); + final FileDescriptor fd = afd.getFileDescriptor(); final FileOutputStream outputStream = new FileOutputStream(fd); outputStream.write(reply.array()); outputStream.close(); } catch (IOException ex) { Log.e(TAG, "Could not write timeline file", ex); + } finally { + try { + if (afd != null) { + afd.close(); + } + } catch (IOException e) { + Log.w(TAG, "Could not close", e); + } } finish(); }); diff --git a/testing/scenario_app/android/app/src/main/res/xml/data_extraction_rules.xml b/testing/scenario_app/android/app/src/main/res/xml/data_extraction_rules.xml new file mode 100644 index 0000000000000..9ec01e6da1e70 --- /dev/null +++ b/testing/scenario_app/android/app/src/main/res/xml/data_extraction_rules.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/testing/scenario_app/android/app/src/main/res/xml/extraction_config_11_and_below.xml b/testing/scenario_app/android/app/src/main/res/xml/extraction_config_11_and_below.xml new file mode 100644 index 0000000000000..ff293d0205569 --- /dev/null +++ b/testing/scenario_app/android/app/src/main/res/xml/extraction_config_11_and_below.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/testing/scenario_app/android/build.gradle b/testing/scenario_app/android/build.gradle index 007f63430020b..165461c763928 100644 --- a/testing/scenario_app/android/build.gradle +++ b/testing/scenario_app/android/build.gradle @@ -6,11 +6,16 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.0.0' classpath 'com.facebook.testing.screenshot:plugin:0.12.0' - // leakcanary uses Kotlin. This app does not, but the plugin is - // needed to specify language version options. - classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.30' + // leakcanary uses Kotlin. This app does not, but the plugin is + // needed to specify language version options. + // Gradle 8.0 requires minimum kotlin 1.6.10 + // https://docs.gradle.org/current/userguide/upgrading_version_7.html#legacy_incrementaltaskinputs_api + classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10' + // Requries Minimum AGP 7.3. + // https://docs.gradle.org/current/userguide/upgrading_version_7.html#legacy_incrementaltaskinputs_api + classpath 'com.android.tools.build:gradle:7.4.2' + // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/testing/scenario_app/android/buildscript-gradle.lockfile b/testing/scenario_app/android/buildscript-gradle.lockfile index 8a0282f655ecd..dc10f2efd340e 100644 --- a/testing/scenario_app/android/buildscript-gradle.lockfile +++ b/testing/scenario_app/android/buildscript-gradle.lockfile @@ -1,146 +1,149 @@ # This is a Gradle generated file for dependency locking. # Manual edits can break the build and are not advised. # This file is expected to be part of source control. -androidx.databinding:databinding-common:7.0.0=classpath -androidx.databinding:databinding-compiler-common:7.0.0=classpath -com.android.databinding:baseLibrary:7.0.0=classpath -com.android.tools.analytics-library:crash:30.0.0=classpath -com.android.tools.analytics-library:protos:30.0.0=classpath -com.android.tools.analytics-library:shared:30.0.0=classpath -com.android.tools.analytics-library:tracker:30.0.0=classpath -com.android.tools.build.jetifier:jetifier-core:1.0.0-beta09=classpath -com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta09=classpath -com.android.tools.build:aapt2-proto:7.0.0-7396180=classpath -com.android.tools.build:aaptcompiler:7.0.0=classpath -com.android.tools.build:apksig:7.0.0=classpath -com.android.tools.build:apkzlib:7.0.0=classpath -com.android.tools.build:builder-model:7.0.0=classpath -com.android.tools.build:builder-test-api:7.0.0=classpath -com.android.tools.build:builder:7.0.0=classpath -com.android.tools.build:bundletool:1.6.0=classpath -com.android.tools.build:gradle-api:7.0.0=classpath -com.android.tools.build:gradle:7.0.0=classpath -com.android.tools.build:manifest-merger:30.0.0=classpath +androidx.databinding:databinding-common:7.4.2=classpath +androidx.databinding:databinding-compiler-common:7.4.2=classpath +com.android.databinding:baseLibrary:7.4.2=classpath +com.android.tools.analytics-library:crash:30.4.2=classpath +com.android.tools.analytics-library:protos:30.4.2=classpath +com.android.tools.analytics-library:shared:30.4.2=classpath +com.android.tools.analytics-library:tracker:30.4.2=classpath +com.android.tools.build.jetifier:jetifier-core:1.0.0-beta10=classpath +com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta10=classpath +com.android.tools.build:aapt2-proto:7.4.2-8841542=classpath +com.android.tools.build:aaptcompiler:7.4.2=classpath +com.android.tools.build:apksig:7.4.2=classpath +com.android.tools.build:apkzlib:7.4.2=classpath +com.android.tools.build:builder-model:7.4.2=classpath +com.android.tools.build:builder-test-api:7.4.2=classpath +com.android.tools.build:builder:7.4.2=classpath +com.android.tools.build:bundletool:1.11.4=classpath +com.android.tools.build:gradle-api:7.4.2=classpath +com.android.tools.build:gradle-settings-api:7.4.2=classpath +com.android.tools.build:gradle:7.4.2=classpath +com.android.tools.build:manifest-merger:30.4.2=classpath com.android.tools.build:transform-api:2.0.0-deprecated-use-gradle-api=classpath -com.android.tools.ddms:ddmlib:30.0.0=classpath -com.android.tools.layoutlib:layoutlib-api:30.0.0=classpath -com.android.tools.lint:lint-model:30.0.0=classpath -com.android.tools.utp:android-device-provider-gradle-proto:30.0.0=classpath -com.android.tools.utp:android-test-plugin-host-retention-proto:30.0.0=classpath -com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.0.0=classpath -com.android.tools:annotations:30.0.0=classpath -com.android.tools:common:30.0.0=classpath -com.android.tools:dvlib:30.0.0=classpath -com.android.tools:repository:30.0.0=classpath -com.android.tools:sdk-common:30.0.0=classpath -com.android.tools:sdklib:30.0.0=classpath -com.android:signflinger:7.0.0=classpath -com.android:zipflinger:7.0.0=classpath +com.android.tools.ddms:ddmlib:30.4.2=classpath +com.android.tools.layoutlib:layoutlib-api:30.4.2=classpath +com.android.tools.lint:lint-model:30.4.2=classpath +com.android.tools.lint:lint-typedef-remover:30.4.2=classpath +com.android.tools.utp:android-device-provider-ddmlib-proto:30.4.2=classpath +com.android.tools.utp:android-device-provider-gradle-proto:30.4.2=classpath +com.android.tools.utp:android-test-plugin-host-additional-test-output-proto:30.4.2=classpath +com.android.tools.utp:android-test-plugin-host-coverage-proto:30.4.2=classpath +com.android.tools.utp:android-test-plugin-host-retention-proto:30.4.2=classpath +com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.4.2=classpath +com.android.tools:annotations:30.4.2=classpath +com.android.tools:common:30.4.2=classpath +com.android.tools:dvlib:30.4.2=classpath +com.android.tools:repository:30.4.2=classpath +com.android.tools:sdk-common:30.4.2=classpath +com.android.tools:sdklib:30.4.2=classpath +com.android:signflinger:7.4.2=classpath +com.android:zipflinger:7.4.2=classpath com.facebook.testing.screenshot:plugin:0.12.0=classpath com.github.gundy:semver4j:0.16.4=classpath com.google.android:annotations:4.1.1.4=classpath -com.google.api.grpc:proto-google-common-protos:1.12.0=classpath +com.google.api.grpc:proto-google-common-protos:2.0.1=classpath com.google.auto.value:auto-value-annotations:1.6.2=classpath com.google.code.findbugs:jsr305:3.0.2=classpath -com.google.code.gson:gson:2.8.6=classpath +com.google.code.gson:gson:2.8.9=classpath com.google.crypto.tink:tink:1.3.0-rc2=classpath com.google.dagger:dagger:2.28.3=classpath -com.google.errorprone:error_prone_annotations:2.3.4=classpath +com.google.errorprone:error_prone_annotations:2.4.0=classpath com.google.flatbuffers:flatbuffers-java:1.12.0=classpath com.google.guava:failureaccess:1.0.1=classpath com.google.guava:guava:30.1-jre=classpath com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=classpath com.google.j2objc:j2objc-annotations:1.3=classpath com.google.jimfs:jimfs:1.1=classpath -com.google.protobuf:protobuf-java-util:3.10.0=classpath -com.google.protobuf:protobuf-java:3.10.0=classpath -com.google.testing.platform:core-proto:0.0.8-alpha04=classpath -com.googlecode.json-simple:json-simple:1.1=classpath +com.google.protobuf:protobuf-java-util:3.17.2=classpath +com.google.protobuf:protobuf-java:3.17.2=classpath +com.google.testing.platform:core-proto:0.0.8-alpha08=classpath com.googlecode.juniversalchardet:juniversalchardet:1.0.3=classpath com.squareup:javapoet:1.10.0=classpath com.squareup:javawriter:2.5.0=classpath com.sun.activation:javax.activation:1.2.0=classpath com.sun.istack:istack-commons-runtime:3.0.8=classpath com.sun.xml.fastinfoset:FastInfoset:1.2.16=classpath -commons-codec:commons-codec:1.10=classpath +commons-codec:commons-codec:1.11=classpath commons-io:commons-io:2.4=classpath commons-logging:commons-logging:1.2=classpath de.undercouch:gradle-download-task:4.1.1=classpath -io.grpc:grpc-api:1.21.1=classpath -io.grpc:grpc-context:1.21.1=classpath -io.grpc:grpc-core:1.21.1=classpath -io.grpc:grpc-netty:1.21.1=classpath -io.grpc:grpc-protobuf-lite:1.21.1=classpath -io.grpc:grpc-protobuf:1.21.1=classpath -io.grpc:grpc-stub:1.21.1=classpath -io.netty:netty-buffer:4.1.34.Final=classpath -io.netty:netty-codec-http2:4.1.34.Final=classpath -io.netty:netty-codec-http:4.1.34.Final=classpath -io.netty:netty-codec-socks:4.1.34.Final=classpath -io.netty:netty-codec:4.1.34.Final=classpath -io.netty:netty-common:4.1.34.Final=classpath -io.netty:netty-handler-proxy:4.1.34.Final=classpath -io.netty:netty-handler:4.1.34.Final=classpath -io.netty:netty-resolver:4.1.34.Final=classpath -io.netty:netty-transport:4.1.34.Final=classpath -io.opencensus:opencensus-api:0.21.0=classpath -io.opencensus:opencensus-contrib-grpc-metrics:0.21.0=classpath -it.unimi.dsi:fastutil:8.4.0=classpath +io.grpc:grpc-api:1.39.0=classpath +io.grpc:grpc-context:1.39.0=classpath +io.grpc:grpc-core:1.39.0=classpath +io.grpc:grpc-netty:1.39.0=classpath +io.grpc:grpc-protobuf-lite:1.39.0=classpath +io.grpc:grpc-protobuf:1.39.0=classpath +io.grpc:grpc-stub:1.39.0=classpath +io.netty:netty-buffer:4.1.52.Final=classpath +io.netty:netty-codec-http2:4.1.52.Final=classpath +io.netty:netty-codec-http:4.1.52.Final=classpath +io.netty:netty-codec-socks:4.1.52.Final=classpath +io.netty:netty-codec:4.1.52.Final=classpath +io.netty:netty-common:4.1.52.Final=classpath +io.netty:netty-handler-proxy:4.1.52.Final=classpath +io.netty:netty-handler:4.1.52.Final=classpath +io.netty:netty-resolver:4.1.52.Final=classpath +io.netty:netty-transport:4.1.52.Final=classpath +io.perfmark:perfmark-api:0.23.0=classpath jakarta.activation:jakarta.activation-api:1.2.1=classpath jakarta.xml.bind:jakarta.xml.bind-api:2.3.2=classpath +javax.annotation:javax.annotation-api:1.3.2=classpath javax.inject:javax.inject:1=classpath net.java.dev.jna:jna-platform:5.6.0=classpath net.java.dev.jna:jna:5.6.0=classpath net.sf.jopt-simple:jopt-simple:4.9=classpath net.sf.kxml:kxml2:2.3.0=classpath -org.antlr:antlr4:4.5.3=classpath org.apache.commons:commons-compress:1.20=classpath -org.apache.httpcomponents:httpclient:4.5.6=classpath -org.apache.httpcomponents:httpcore:4.4.10=classpath +org.apache.httpcomponents:httpclient:4.5.13=classpath +org.apache.httpcomponents:httpcore:4.4.13=classpath org.apache.httpcomponents:httpmime:4.5.6=classpath -org.bouncycastle:bcpkix-jdk15on:1.56=classpath -org.bouncycastle:bcprov-jdk15on:1.56=classpath +org.bitbucket.b_c:jose4j:0.7.0=classpath +org.bouncycastle:bcpkix-jdk15on:1.67=classpath +org.bouncycastle:bcprov-jdk15on:1.67=classpath org.checkerframework:checker-qual:3.5.0=classpath -org.codehaus.mojo:animal-sniffer-annotations:1.17=classpath +org.codehaus.mojo:animal-sniffer-annotations:1.19=classpath org.glassfish.jaxb:jaxb-runtime:2.3.2=classpath org.glassfish.jaxb:txw2:2.3.2=classpath org.jdom:jdom2:2.0.6=classpath -org.jetbrains.intellij.deps:trove4j:1.0.20181211=classpath -org.jetbrains.kotlin:kotlin-android-extensions:1.5.30=classpath -org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.5.30=classpath -org.jetbrains.kotlin:kotlin-build-common:1.5.30=classpath -org.jetbrains.kotlin:kotlin-compiler-embeddable:1.5.30=classpath -org.jetbrains.kotlin:kotlin-compiler-runner:1.5.30=classpath -org.jetbrains.kotlin:kotlin-daemon-client:1.5.30=classpath -org.jetbrains.kotlin:kotlin-daemon-embeddable:1.5.30=classpath -org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.5.30=classpath -org.jetbrains.kotlin:kotlin-gradle-plugin-model:1.5.30=classpath -org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.30=classpath -org.jetbrains.kotlin:kotlin-klib-commonizer-api:1.5.30=classpath -org.jetbrains.kotlin:kotlin-native-utils:1.5.30=classpath -org.jetbrains.kotlin:kotlin-project-model:1.5.30=classpath -org.jetbrains.kotlin:kotlin-reflect:1.4.32=classpath -org.jetbrains.kotlin:kotlin-scripting-common:1.5.30=classpath -org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.5.30=classpath -org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.5.30=classpath -org.jetbrains.kotlin:kotlin-scripting-jvm:1.5.30=classpath -org.jetbrains.kotlin:kotlin-stdlib-common:1.4.32=classpath -org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.32=classpath -org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.32=classpath -org.jetbrains.kotlin:kotlin-stdlib:1.4.32=classpath -org.jetbrains.kotlin:kotlin-tooling-metadata:1.5.30=classpath -org.jetbrains.kotlin:kotlin-util-io:1.5.30=classpath -org.jetbrains.kotlin:kotlin-util-klib:1.5.30=classpath +org.jetbrains.intellij.deps:trove4j:1.0.20200330=classpath +org.jetbrains.kotlin:kotlin-android-extensions:1.6.10=classpath +org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.6.10=classpath +org.jetbrains.kotlin:kotlin-build-common:1.6.10=classpath +org.jetbrains.kotlin:kotlin-compiler-embeddable:1.6.10=classpath +org.jetbrains.kotlin:kotlin-compiler-runner:1.6.10=classpath +org.jetbrains.kotlin:kotlin-daemon-client:1.6.10=classpath +org.jetbrains.kotlin:kotlin-daemon-embeddable:1.6.10=classpath +org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.6.10=classpath +org.jetbrains.kotlin:kotlin-gradle-plugin-model:1.6.10=classpath +org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10=classpath +org.jetbrains.kotlin:kotlin-klib-commonizer-api:1.6.10=classpath +org.jetbrains.kotlin:kotlin-native-utils:1.6.10=classpath +org.jetbrains.kotlin:kotlin-project-model:1.6.10=classpath +org.jetbrains.kotlin:kotlin-reflect:1.7.10=classpath +org.jetbrains.kotlin:kotlin-scripting-common:1.6.10=classpath +org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.6.10=classpath +org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.6.10=classpath +org.jetbrains.kotlin:kotlin-scripting-jvm:1.6.10=classpath +org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10=classpath +org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10=classpath +org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10=classpath +org.jetbrains.kotlin:kotlin-stdlib:1.7.10=classpath +org.jetbrains.kotlin:kotlin-tooling-metadata:1.6.10=classpath +org.jetbrains.kotlin:kotlin-util-io:1.6.10=classpath +org.jetbrains.kotlin:kotlin-util-klib:1.6.10=classpath org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.0=classpath -org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0=classpath org.jetbrains:annotations:13.0=classpath org.json:json:20180813=classpath org.jvnet.staxex:stax-ex:1.8.1=classpath -org.ow2.asm:asm-analysis:7.0=classpath -org.ow2.asm:asm-commons:7.0=classpath -org.ow2.asm:asm-tree:7.0=classpath -org.ow2.asm:asm-util:7.0=classpath -org.ow2.asm:asm:7.0=classpath +org.ow2.asm:asm-analysis:9.2=classpath +org.ow2.asm:asm-commons:9.2=classpath +org.ow2.asm:asm-tree:9.2=classpath +org.ow2.asm:asm-util:9.2=classpath +org.ow2.asm:asm:9.2=classpath +org.slf4j:slf4j-api:1.7.30=classpath org.tensorflow:tensorflow-lite-metadata:0.1.0-rc2=classpath xerces:xercesImpl:2.12.0=classpath xml-apis:xml-apis:1.4.01=classpath From b64da92634c456d740b66d6616a11bdbc2153f3c Mon Sep 17 00:00:00 2001 From: Zachary Anderson Date: Fri, 15 Sep 2023 09:31:55 -0700 Subject: [PATCH 067/859] Adds a --quiet flag to run_tests.py (#45880) This PR changes run_tests.py to use the python logging library to report results instead of direct prints or writes to stdout/stderr. This change simplifies adding a `--quiet` flag that causes the script to only generate output if a log is emitted at WARNING or above. Overall this is a bit of progress toward landing something like https://github.com/flutter/engine/pull/45595 --- testing/run_tests.py | 136 +++++++++++++++++++++++++++++-------------- 1 file changed, 92 insertions(+), 44 deletions(-) diff --git a/testing/run_tests.py b/testing/run_tests.py index a22579b6e0c17..4f75b6e549227 100755 --- a/testing/run_tests.py +++ b/testing/run_tests.py @@ -13,12 +13,17 @@ import argparse import errno import glob +import logging +import logging.handlers import multiprocessing import os import re import shutil import subprocess -import sys +# Explicitly import the parts of sys that are needed. This is to avoid using +# sys.stdout and sys.stderr directly. Instead, only the logger defined below +# should be used for output. +from sys import exit as sys_exit, platform as sys_platform import tempfile import time import typing @@ -39,12 +44,20 @@ FML_UNITTESTS_FILTER = '--gtest_filter=-*TimeSensitiveTest*' ENCODING = 'UTF-8' +logger = logging.getLogger(__name__) +logger_handler = logging.StreamHandler() + + +# Override print so that it uses the logger instead of stdout directly. +def print(*args, **kwargs): # pylint: disable=redefined-builtin + logger.info(*args, **kwargs) + def print_divider(char='='): - print('\n') + logger.info('\n') for _ in range(4): - print(''.join([char for _ in range(80)])) - print('\n') + logger.info(''.join([char for _ in range(80)])) + logger.info('\n') def is_asan(build_dir): @@ -71,7 +84,7 @@ def run_cmd( command_string = ' '.join(cmd) print_divider('>') - print(f'Running command "{command_string}"') + logger.info('Running command "%s"', command_string) start_time = time.time() @@ -87,17 +100,17 @@ def run_cmd( for line in iter(process.stdout.readline, ''): output += line - sys.stdout.write(line) + logger.info(line.rstrip()) - sys.stdout.flush() process.wait() end_time = time.time() if process.returncode != 0 and not expect_failure: print_divider('!') - print( - f'Failed Command:\n\n{command_string}\n\nExit Code: {process.returncode}\n' + logger.error( + 'Failed Command:\n\n%s\n\nExit Code: %s\n\nOutput:\n%s', command_string, + process.returncode, output ) print_divider('!') @@ -109,23 +122,26 @@ def run_cmd( if not allowed_failure: raise RuntimeError( - f'Command "{command_string}" exited with code {process.returncode}.' + 'Command "%s" exited with code %s.' % + (command_string, process.returncode) ) for forbidden_string in forbidden_output: if forbidden_string in output: raise RuntimeError( - f'command "{command_string}" contained forbidden string {forbidden_string}' + 'command "%s" contained forbidden string "%s"' % + (command_string, forbidden_string) ) print_divider('<') - print( - f'Command run successfully in {end_time - start_time:.2f} seconds: {command_string}' + logger.info( + 'Command run successfully in %.2f seconds: %s', end_time - start_time, + command_string ) def is_mac(): - return sys.platform == 'darwin' + return sys_platform == 'darwin' def is_aarm64(): @@ -139,11 +155,11 @@ def is_aarm64(): def is_linux(): - return sys.platform.startswith('linux') + return sys_platform.startswith('linux') def is_windows(): - return sys.platform.startswith(('cygwin', 'win')) + return sys_platform.startswith(('cygwin', 'win')) def executable_suffix(): @@ -217,7 +233,7 @@ def run_engine_executable( # pylint: disable=too-many-arguments gtest=False, ): if executable_filter is not None and executable_name not in executable_filter: - print('Skipping %s due to filter.' % executable_name) + logger.info('Skipping %s due to filter.', executable_name) return if flags is None: @@ -250,7 +266,7 @@ def run_engine_executable( # pylint: disable=too-many-arguments else: env['PATH'] = build_dir + ':' + env['PATH'] - print('Running %s in %s' % (executable_name, cwd)) + logger.info('Running %s in %s', executable_name, cwd) test_command = build_engine_executable_command( build_dir, @@ -283,9 +299,9 @@ def run_engine_executable( # pylint: disable=too-many-arguments if luci_test_outputs_path and os.path.exists(core_path) and os.path.exists( unstripped_exe): dump_path = os.path.join( - luci_test_outputs_path, '%s_%s.txt' % (executable_name, sys.platform) + luci_test_outputs_path, '%s_%s.txt' % (executable_name, sys_platform) ) - print('Writing core dump analysis to %s' % dump_path) + logger.error('Writing core dump analysis to %s', dump_path) subprocess.call([ os.path.join( BUILDROOT_DIR, 'flutter', 'testing', 'analyze_core_dump.sh' @@ -356,7 +372,7 @@ def __str__(self): def run_cc_tests(build_dir, executable_filter, coverage, capture_core_dump): - print('Running Engine Unit-tests.') + logger.info('Running Engine Unit-tests.') if capture_core_dump and is_linux(): import resource # pylint: disable=import-outside-toplevel @@ -510,7 +526,7 @@ def make_test(name, flags=None, extra_env=None): def run_engine_benchmarks(build_dir, executable_filter): - print('Running Engine Benchmarks.') + logger.info('Running Engine Benchmarks.') icu_flags = [ '--icu-data-file-path=%s' % os.path.join(build_dir, 'icudtl.dat') @@ -583,9 +599,9 @@ def gather_dart_test( threading = 'single-threaded' tester_name = 'flutter_tester' - print( - "Running test '%s' using '%s' (%s)" % - (kernel_file_name, tester_name, threading) + logger.info( + "Running test '%s' using '%s' (%s)", kernel_file_name, tester_name, + threading ) forbidden_output = [] if 'unopt' in build_dir or expect_failure else [ '[ERROR' @@ -810,10 +826,10 @@ def gather_dart_tests(build_dir, test_filter): for dart_test_file in dart_observatory_tests: if test_filter is not None and os.path.basename(dart_test_file ) not in test_filter: - print("Skipping '%s' due to filter." % dart_test_file) + logger.info("Skipping '%s' due to filter.", dart_test_file) else: - print( - "Gathering dart test '%s' with observatory enabled" % dart_test_file + logger.info( + "Gathering dart test '%s' with observatory enabled", dart_test_file ) yield gather_dart_test(build_dir, dart_test_file, True, True) yield gather_dart_test(build_dir, dart_test_file, False, True) @@ -821,9 +837,9 @@ def gather_dart_tests(build_dir, test_filter): for dart_test_file in dart_tests: if test_filter is not None and os.path.basename(dart_test_file ) not in test_filter: - print("Skipping '%s' due to filter." % dart_test_file) + logger.info("Skipping '%s' due to filter.", dart_test_file) else: - print("Gathering dart test '%s'" % dart_test_file) + logger.info("Gathering dart test '%s'", dart_test_file) yield gather_dart_test(build_dir, dart_test_file, True) yield gather_dart_test(build_dir, dart_test_file, False) @@ -1053,6 +1069,13 @@ def gather_ci_tests(build_dir): ) +def worker_init(queue, level): + queue_handler = logging.handlers.QueueHandler(queue) + log = logging.getLogger(__name__) + log.setLevel(level) + log.addHandler(queue_handler) + + def run_engine_tasks_in_parallel(tasks): # Work around a bug in Python. # @@ -1064,23 +1087,33 @@ def run_engine_tasks_in_parallel(tasks): # # See: https://bugs.python.org/issue26903 max_processes = multiprocessing.cpu_count() - if sys.platform.startswith(('cygwin', 'win')) and max_processes > 60: + if sys_platform.startswith(('cygwin', 'win')) and max_processes > 60: max_processes = 60 - pool = multiprocessing.Pool(processes=max_processes) - async_results = [(t, pool.apply_async(t, ())) for t in tasks] + queue = multiprocessing.Queue() + queue_listener = logging.handlers.QueueListener(queue, logger_handler) + queue_listener.start() + failures = [] - for task, async_result in async_results: - try: - async_result.get() - except Exception as exn: # pylint: disable=broad-except - failures += [(task, exn)] + try: + with multiprocessing.Pool(max_processes, worker_init, + [queue, logger.getEffectiveLevel()]) as pool: + async_results = [(t, pool.apply_async(t, ())) for t in tasks] + for task, async_result in async_results: + try: + async_result.get() + except Exception as exn: # pylint: disable=broad-except + failures += [(task, exn)] + finally: + queue_listener.stop() if len(failures) > 0: - print('The following commands failed:') + logger.error('The following commands failed:') for task, exn in failures: - print('%s\n%s\n' % (str(task), str(exn))) - raise Exception() + logger.error('%s\n', str(task)) + return False + + return True class DirectoryChange(): @@ -1230,9 +1263,20 @@ def main(): default=None, help='Provide the path of adb used for android tests. By default it looks on $PATH.' ) + parser.add_argument( + '--quiet', + dest='quiet', + action='store_true', + default=False, + help='Only emit output when there is an error.' + ) args = parser.parse_args() + logger.addHandler(logger_handler) + if not args.quiet: + logger.setLevel(logging.INFO) + if args.type == 'all': types = all_types else: @@ -1259,6 +1303,8 @@ def main(): os.environ[key] = value process.communicate() # Avoid pipe deadlock while waiting for termination. + success = True + engine_filter = args.engine_filter.split(',') if args.engine_filter else None if 'engine' in types: run_cc_tests( @@ -1296,14 +1342,14 @@ def main(): tasks += list(gather_front_end_server_tests(build_dir)) tasks += list(gather_ci_tests(build_dir)) tasks += list(gather_dart_tests(build_dir, dart_filter)) - run_engine_tasks_in_parallel(tasks) + success = success and run_engine_tasks_in_parallel(tasks) if 'java' in types: assert not is_windows( ), "Android engine files can't be compiled on Windows." java_filter = args.java_filter if ',' in java_filter or '*' in java_filter: - print( + logger.wraning( 'Can only filter JUnit4 tests by single entire class name, ' 'eg "io.flutter.SmokeTest". Ignoring filter=' + java_filter ) @@ -1332,6 +1378,8 @@ def main(): if 'impeller-golden' in types: run_impeller_golden_tests(build_dir) + return 0 if success else 1 + if __name__ == '__main__': - sys.exit(main()) + sys_exit(main()) From 7601c156e62c76218dc04fa8f14269abb7cbb4de Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 15 Sep 2023 12:50:06 -0400 Subject: [PATCH 068/859] Roll Skia from de56f293eb41 to fffef1047640 (2 revisions) (#45885) https://skia.googlesource.com/skia.git/+log/de56f293eb41..fffef1047640 2023-09-15 egdaniel@google.com [Graphite] Fix Graphite Vk depth stencil. 2023-09-15 fmalita@chromium.org [mesh2d demo] Patch controls If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 57542d7fad70d..6b43437ec4481 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'de56f293eb41d65786b9e6224fdf9a4702b30f51', + 'skia_revision': 'fffef10476400601a867fb75f005c495414e1f84', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index b39ca27f20642..73a595bdefc6e 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: e3a9c12189ef2a03985197e724cc97d5 +Signature: 3b5068c3a0c27f600a4234b82e18bb0c ==================================================================================================== LIBRARY: etc1 From b5bcc5deea098831e0989f63bf66d469fdb7947a Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 15 Sep 2023 12:58:17 -0400 Subject: [PATCH 069/859] Roll Fuchsia Mac SDK from --OUw__L3ekVTG-5c... to -_edKGA5GTkDFxVgl... (#45886) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC bdero@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 6b43437ec4481..d1b3d71e35565 100644 --- a/DEPS +++ b/DEPS @@ -914,7 +914,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': '--OUw__L3ekVTG-5cM1VmVBddza1REkMCIN9c0D3m_MC' + 'version': '-_edKGA5GTkDFxVglA5Eeh776tpMq4tePGwvozCb52gC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 2d3b58c18fcd4ea2c0a0a9511f34a9a5af659b10 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 15 Sep 2023 13:27:57 -0400 Subject: [PATCH 070/859] Roll Dart SDK from 65117290c3b0 to a5ee0055cf20 (1 revision) (#45887) https://dart.googlesource.com/sdk.git/+log/65117290c3b0..a5ee0055cf20 2023-09-15 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-168.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC bdero@google.com,dart-vm-team@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index d1b3d71e35565..dba9537a0ba59 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '65117290c3b0660d5916d0e0b1c96a5a6bdb60fc', + 'dart_revision': 'a5ee0055cf20b439001e19e2dd2bf326640e5bdd', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py From 8c93a580449d90c574f4cfdd064f126f5d6225fb Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 15 Sep 2023 13:40:05 -0400 Subject: [PATCH 071/859] Roll Skia from fffef1047640 to 58c509b1a24a (2 revisions) (#45888) https://skia.googlesource.com/skia.git/+log/fffef1047640..58c509b1a24a 2023-09-15 robertphillips@google.com [graphite] Add Compose helper 2023-09-15 kjlubick@google.com Add SkSerialProcs and SkDeserialProcs to Slug serialization If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index dba9537a0ba59..d7bdb95a72b88 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'fffef10476400601a867fb75f005c495414e1f84', + 'skia_revision': '58c509b1a24a4939b7f2ed89cb59147fe6d27438', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 73a595bdefc6e..d641281ba2f2f 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 3b5068c3a0c27f600a4234b82e18bb0c +Signature: a26db932f30427776c1ae49b5ec9e0c2 ==================================================================================================== LIBRARY: etc1 From d2f2387eeae886363e5626f6b7ebc40c6888603d Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 15 Sep 2023 14:26:14 -0400 Subject: [PATCH 072/859] Roll Skia from 58c509b1a24a to c79441fc8016 (1 revision) (#45892) https://skia.googlesource.com/skia.git/+log/58c509b1a24a..c79441fc8016 2023-09-15 michaelludwig@google.com Delete unused SkSpecialSurface If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/DEPS b/DEPS index d7bdb95a72b88..5c63da2d645bf 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '58c509b1a24a4939b7f2ed89cb59147fe6d27438', + 'skia_revision': 'c79441fc8016449294ab7b9ebd78852a823e193b', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index d641281ba2f2f..78469bcf56e9e 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: a26db932f30427776c1ae49b5ec9e0c2 +Signature: 3b6944599b8f0fb796ec25cfa53e6085 ==================================================================================================== LIBRARY: etc1 @@ -3879,8 +3879,6 @@ ORIGIN: ../../../third_party/skia/src/core/SkRecordedDrawable.h + ../../../third ORIGIN: ../../../third_party/skia/src/core/SkScaleToSides.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/core/SkSpecialImage.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/core/SkSpecialImage.h + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/src/core/SkSpecialSurface.cpp + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/src/core/SkSpecialSurface.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/core/SkSwizzle.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/core/SkSwizzlePriv.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/effects/imagefilters/SkShaderImageFilter.cpp + ../../../third_party/skia/LICENSE @@ -4186,8 +4184,6 @@ FILE: ../../../third_party/skia/src/core/SkRecordedDrawable.h FILE: ../../../third_party/skia/src/core/SkScaleToSides.h FILE: ../../../third_party/skia/src/core/SkSpecialImage.cpp FILE: ../../../third_party/skia/src/core/SkSpecialImage.h -FILE: ../../../third_party/skia/src/core/SkSpecialSurface.cpp -FILE: ../../../third_party/skia/src/core/SkSpecialSurface.h FILE: ../../../third_party/skia/src/core/SkSwizzle.cpp FILE: ../../../third_party/skia/src/core/SkSwizzlePriv.h FILE: ../../../third_party/skia/src/effects/imagefilters/SkShaderImageFilter.cpp From 1216347e8baffecee70c689f68083ecb6e6aaef0 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 15 Sep 2023 15:39:10 -0400 Subject: [PATCH 073/859] Roll Skia from c79441fc8016 to 4f26f22daa4b (1 revision) (#45893) https://skia.googlesource.com/skia.git/+log/c79441fc8016..4f26f22daa4b 2023-09-15 brianosman@google.com Return transparent black when sampling null shader children If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 5c63da2d645bf..765872c5789ff 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'c79441fc8016449294ab7b9ebd78852a823e193b', + 'skia_revision': '4f26f22daa4bf124e2999145f5caad4b10625580', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 78469bcf56e9e..f8555fa955bd0 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 3b6944599b8f0fb796ec25cfa53e6085 +Signature: 557fd0352aa7fae3245d470facd95273 ==================================================================================================== LIBRARY: etc1 From 5c80851cff2bb37e599ac31d62d2233493ed6c33 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Fri, 15 Sep 2023 13:15:23 -0700 Subject: [PATCH 074/859] [Impeller] dont cache failed render target allocations. (#45895) Otherwise we'll null de-ref when trying to create a texture with the same descriptor later on. --- impeller/entity/render_target_cache.cc | 4 ++++ .../entity/render_target_cache_unittests.cc | 23 +++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/impeller/entity/render_target_cache.cc b/impeller/entity/render_target_cache.cc index a26551768975b..89e16289092a8 100644 --- a/impeller/entity/render_target_cache.cc +++ b/impeller/entity/render_target_cache.cc @@ -39,12 +39,16 @@ std::shared_ptr RenderTargetCache::CreateTexture( for (auto& td : texture_data_) { const auto other_desc = td.texture->GetTextureDescriptor(); + FML_DCHECK(td.texture != nullptr); if (!td.used_this_frame && desc == other_desc) { td.used_this_frame = true; return td.texture; } } auto result = RenderTargetAllocator::CreateTexture(desc); + if (result == nullptr) { + return result; + } texture_data_.push_back( TextureData{.used_this_frame = true, .texture = result}); return result; diff --git a/impeller/entity/render_target_cache_unittests.cc b/impeller/entity/render_target_cache_unittests.cc index d8086b32aec44..fc402f87fa9f5 100644 --- a/impeller/entity/render_target_cache_unittests.cc +++ b/impeller/entity/render_target_cache_unittests.cc @@ -25,13 +25,21 @@ class TestAllocator : public Allocator { std::shared_ptr OnCreateBuffer( const DeviceBufferDescriptor& desc) override { + if (should_fail) { + return nullptr; + } return std::make_shared(desc); }; virtual std::shared_ptr OnCreateTexture( const TextureDescriptor& desc) override { + if (should_fail) { + return nullptr; + } return std::make_shared(desc); }; + + bool should_fail = false; }; TEST(RenderTargetCacheTest, CachesUsedTexturesAcrossFrames) { @@ -62,5 +70,20 @@ TEST(RenderTargetCacheTest, CachesUsedTexturesAcrossFrames) { ASSERT_EQ(render_target_cache.CachedTextureCount(), 1u); } +TEST(RenderTargetCacheTest, DoesNotPersistFailedAllocations) { + auto allocator = std::make_shared(); + auto render_target_cache = RenderTargetCache(allocator); + auto desc = TextureDescriptor{ + .format = PixelFormat::kR8G8B8A8UNormInt, + .size = ISize(100, 100), + .usage = static_cast(TextureUsage::kRenderTarget)}; + + render_target_cache.Start(); + allocator->should_fail = true; + + ASSERT_EQ(render_target_cache.CreateTexture(desc), nullptr); + ASSERT_EQ(render_target_cache.CachedTextureCount(), 0u); +} + } // namespace testing } // namespace impeller From b6f85026995f1b672aabd0db41c160bb5bc6ccf8 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 15 Sep 2023 17:30:21 -0400 Subject: [PATCH 075/859] Roll Skia from 4f26f22daa4b to 7f88bda24f7f (5 revisions) (#45901) https://skia.googlesource.com/skia.git/+log/4f26f22daa4b..7f88bda24f7f 2023-09-15 robertphillips@google.com [graphite] Make Blend helper take an addBlendToKey parameter 2023-09-15 egdaniel@google.com [Graphite] Fix setting depth load/store ops in Vulkan. 2023-09-15 michaelludwig@google.com [skif] Guard case when dst range starts and ends before src range 2023-09-15 jvanverth@google.com [graphite] Add rasterization and uploading to SoftwarePathAtlas. 2023-09-15 jvanverth@google.com [graphite] Move testing ContextOptions to private struct If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 765872c5789ff..fa4eb4d9528c2 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '4f26f22daa4bf124e2999145f5caad4b10625580', + 'skia_revision': '7f88bda24f7f355afbe1be2e44cee4d3d84aab45', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index f8555fa955bd0..c412035238987 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 557fd0352aa7fae3245d470facd95273 +Signature: 87f0195998ae50921ad40d63914b9c6c ==================================================================================================== LIBRARY: etc1 @@ -8815,6 +8815,7 @@ ORIGIN: ../../../third_party/skia/include/private/chromium/GrPromiseImageTexture ORIGIN: ../../../third_party/skia/include/private/chromium/GrSurfaceCharacterization.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/private/chromium/SkImageChromium.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/private/gpu/ganesh/GrTextureGenerator.h + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/include/private/gpu/graphite/ContextOptionsPriv.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/bentleyottmann/include/BentleyOttmann1.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/bentleyottmann/include/EventQueue.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/bentleyottmann/include/Int96.h + ../../../third_party/skia/LICENSE @@ -9076,6 +9077,7 @@ FILE: ../../../third_party/skia/include/private/chromium/GrPromiseImageTexture.h FILE: ../../../third_party/skia/include/private/chromium/GrSurfaceCharacterization.h FILE: ../../../third_party/skia/include/private/chromium/SkImageChromium.h FILE: ../../../third_party/skia/include/private/gpu/ganesh/GrTextureGenerator.h +FILE: ../../../third_party/skia/include/private/gpu/graphite/ContextOptionsPriv.h FILE: ../../../third_party/skia/modules/bentleyottmann/include/BentleyOttmann1.h FILE: ../../../third_party/skia/modules/bentleyottmann/include/EventQueue.h FILE: ../../../third_party/skia/modules/bentleyottmann/include/Int96.h From 94464bf278631e2e59eb658472e4ee33370efc23 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 15 Sep 2023 17:36:23 -0400 Subject: [PATCH 076/859] Roll Dart SDK from a5ee0055cf20 to e9452310189b (1 revision) (#45902) https://dart.googlesource.com/sdk.git/+log/a5ee0055cf20..e9452310189b 2023-09-15 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-169.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC bdero@google.com,dart-vm-team@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index fa4eb4d9528c2..e6620d860df5b 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': 'a5ee0055cf20b439001e19e2dd2bf326640e5bdd', + 'dart_revision': 'e9452310189ba85997d8e806a987880fbcdcc17b', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index 2ddb1a9036598..b79cc2742001a 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: c6cbb7dbc3abed0dbab341935f4c9a37 +Signature: 3d94b81ec28985b6374ba80946aab4f3 ==================================================================================================== LIBRARY: dart From a0055e561eb84165a29a0953f6a25f8cd9a74233 Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Fri, 15 Sep 2023 15:08:05 -0700 Subject: [PATCH 077/859] [Impeller] Test `FenceWaiterVK` and fix termination bugs (#45870) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes https://github.com/flutter/flutter/issues/134751, and @jonahwilliams suspects it could be related to a number of other flaky/texture leak scenarios (https://github.com/flutter/flutter/issues/133506#issuecomment-1720275749) that only happen sometimes (i.e. on CI but not real devices), i.e. stuff like: ```txt --- Vulkan Debug Report  ---------------------------------------- |                Severity: Error |                    Type: { Validation } |                 ID Name: VUID-vkDestroyBuffer-buffer-00922 |               ID Number: -464217071 |       Queue Breadcrumbs: [NONE] |  CMD Buffer Breadcrumbs: [NONE] |         Related Objects: Device [94498356231456] [ImpellerDevice] |                 Trigger: Validation Error: [ VUID-vkDestroyBuffer-buffer-00922 ] Object 0: handle = 0x55f21cf47d20, name = ImpellerDevice, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xe4549c11 | Cannot call vkDestroyBuffer on VkBuffer 0xbb00000000bb[] that is currently in use by a command buffer. The Vulkan spec states: All submitted commands that refer to buffer, either directly or via a VkBufferView, must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyBuffer-buffer-00922) ----------------------------------------------------------------- ``` --- ~~This PR will look a bit like a mess until the last 2 PRs merge in, but locally it appears to fix fence races/segfaults that I was seeing on CI, including on Linux with validations enabled. We can test it further tomorrow.~~ EDIT: Updated. --- ci/licenses_golden/excluded_files | 1 + impeller/renderer/backend/vulkan/BUILD.gn | 1 + .../renderer/backend/vulkan/context_vk.cc | 4 - .../backend/vulkan/fence_waiter_vk.cc | 165 ++++++++++-------- .../renderer/backend/vulkan/fence_waiter_vk.h | 4 +- .../vulkan/fence_waiter_vk_unittests.cc | 130 ++++++++++++++ .../backend/vulkan/test/mock_vulkan.cc | 19 +- .../backend/vulkan/test/mock_vulkan.h | 36 ++++ .../vulkan/test/mock_vulkan_unittests.cc | 22 +++ 9 files changed, 305 insertions(+), 77 deletions(-) create mode 100644 impeller/renderer/backend/vulkan/fence_waiter_vk_unittests.cc diff --git a/ci/licenses_golden/excluded_files b/ci/licenses_golden/excluded_files index 08a10f984b050..8aa84c50351f1 100644 --- a/ci/licenses_golden/excluded_files +++ b/ci/licenses_golden/excluded_files @@ -154,6 +154,7 @@ ../../../flutter/impeller/renderer/backend/vulkan/blit_command_vk_unittests.cc ../../../flutter/impeller/renderer/backend/vulkan/command_encoder_vk_unittests.cc ../../../flutter/impeller/renderer/backend/vulkan/context_vk_unittests.cc +../../../flutter/impeller/renderer/backend/vulkan/fence_waiter_vk_unittests.cc ../../../flutter/impeller/renderer/backend/vulkan/pass_bindings_cache_unittests.cc ../../../flutter/impeller/renderer/backend/vulkan/resource_manager_vk_unittests.cc ../../../flutter/impeller/renderer/backend/vulkan/test diff --git a/impeller/renderer/backend/vulkan/BUILD.gn b/impeller/renderer/backend/vulkan/BUILD.gn index 0c71fab1035a1..90781bdb0ad85 100644 --- a/impeller/renderer/backend/vulkan/BUILD.gn +++ b/impeller/renderer/backend/vulkan/BUILD.gn @@ -11,6 +11,7 @@ impeller_component("vulkan_unittests") { "blit_command_vk_unittests.cc", "command_encoder_vk_unittests.cc", "context_vk_unittests.cc", + "fence_waiter_vk_unittests.cc", "pass_bindings_cache_unittests.cc", "resource_manager_vk_unittests.cc", "test/mock_vulkan.cc", diff --git a/impeller/renderer/backend/vulkan/context_vk.cc b/impeller/renderer/backend/vulkan/context_vk.cc index a4748427e104a..88a86fa2c71a2 100644 --- a/impeller/renderer/backend/vulkan/context_vk.cc +++ b/impeller/renderer/backend/vulkan/context_vk.cc @@ -377,10 +377,6 @@ void ContextVK::Setup(Settings settings) { /// auto fence_waiter = std::shared_ptr(new FenceWaiterVK(device_holder)); - if (!fence_waiter->IsValid()) { - VALIDATION_LOG << "Could not create fence waiter."; - return; - } //---------------------------------------------------------------------------- /// Create the resource manager. diff --git a/impeller/renderer/backend/vulkan/fence_waiter_vk.cc b/impeller/renderer/backend/vulkan/fence_waiter_vk.cc index 73ba0879dd3c2..4a16c7a79a716 100644 --- a/impeller/renderer/backend/vulkan/fence_waiter_vk.cc +++ b/impeller/renderer/backend/vulkan/fence_waiter_vk.cc @@ -6,6 +6,7 @@ #include #include +#include #include "flutter/fml/thread.h" #include "flutter/fml/trace_event.h" @@ -47,28 +48,25 @@ class WaitSetEntry { FenceWaiterVK::FenceWaiterVK(std::weak_ptr device_holder) : device_holder_(std::move(device_holder)) { waiter_thread_ = std::make_unique([&]() { Main(); }); - is_valid_ = true; } FenceWaiterVK::~FenceWaiterVK() { Terminate(); - if (waiter_thread_) { - waiter_thread_->join(); - } -} - -bool FenceWaiterVK::IsValid() const { - return is_valid_; + waiter_thread_->join(); } bool FenceWaiterVK::AddFence(vk::UniqueFence fence, const fml::closure& callback) { TRACE_EVENT0("flutter", "FenceWaiterVK::AddFence"); - if (!IsValid() || !fence || !callback) { + if (!fence || !callback) { return false; } { + // Maintain the invariant that terminate_ is accessed only under the lock. std::scoped_lock lock(wait_set_mutex_); + if (terminate_) { + return false; + } wait_set_.emplace_back(WaitSetEntry::Create(std::move(fence), callback)); } wait_set_cv_.notify_one(); @@ -92,85 +90,112 @@ void FenceWaiterVK::Main() { using namespace std::literals::chrono_literals; while (true) { - std::unique_lock lock(wait_set_mutex_); - - // If there are no fences to wait on, wait on the condition variable. - wait_set_cv_.wait(lock, [&]() { return !wait_set_.empty() || terminate_; }); + // We'll read the terminate_ flag within the lock below. + bool terminate = false; - // We don't want to check on fence status or collect wait set entries in the - // critical section. Copy the array of entries and immediately unlock the - // mutex. - WaitSet wait_set = wait_set_; + { + std::unique_lock lock(wait_set_mutex_); - const auto terminate = terminate_; + // If there are no fences to wait on, wait on the condition variable. + wait_set_cv_.wait(lock, + [&]() { return !wait_set_.empty() || terminate_; }); - lock.unlock(); + // Still under the lock, check if the waiter has been terminated. + terminate = terminate_; + } if (terminate) { + WaitUntilEmpty(); break; } - // Check if the context had died in the meantime. - auto device_holder = device_holder_.lock(); - if (!device_holder) { + if (!Wait()) { break; } + } +} - const auto& device = device_holder->GetDevice(); +void FenceWaiterVK::WaitUntilEmpty() { + // Note, there is no lock because once terminate_ is set to true, no other + // fence can be added to the wait set. Just in case, here's a FML_DCHECK: + FML_DCHECK(terminate_) << "Fence waiter must be terminated."; + while (!wait_set_.empty() && Wait()) { + // Intentionally empty. + } +} - // Wait for one or more fences to be signaled. Any additional fences added - // to the waiter will be serviced in the next pass. If a fence that is going - // to be signaled at an abnormally long deadline is the only one in the set, - // a timeout will bail out the wait. - auto fences = GetFencesForWaitSet(wait_set); - if (fences.empty()) { - continue; - } +bool FenceWaiterVK::Wait() { + // Snapshot the wait set and wait on the fences. + WaitSet wait_set; + { + std::scoped_lock lock(wait_set_mutex_); + wait_set = wait_set_; + } - auto result = device.waitForFences( - fences.size(), // fences count - fences.data(), // fences - false, // wait for all - std::chrono::nanoseconds{100ms}.count() // timeout (ns) - ); - if (!(result == vk::Result::eSuccess || result == vk::Result::eTimeout)) { - VALIDATION_LOG << "Fence waiter encountered an unexpected error. Tearing " - "down the waiter thread."; - break; - } + using namespace std::literals::chrono_literals; - // One or more fences have been signaled. Find out which ones and update - // their signaled statuses. - { - TRACE_EVENT0("impeller", "CheckFenceStatus"); - for (auto& entry : wait_set) { - entry->UpdateSignalledStatus(device); - } - wait_set.clear(); - } + // Check if the context had died in the meantime. + auto device_holder = device_holder_.lock(); + if (!device_holder) { + return false; + } - // Quickly acquire the wait set lock and erase signaled entries. Make sure - // the mutex is unlocked before calling the destructors of the erased - // entries. These might touch allocators. - WaitSet erased_entries; - { - static auto is_signalled = [](const auto& entry) { - return entry->IsSignalled(); - }; - std::scoped_lock lock(wait_set_mutex_); - std::copy_if(wait_set_.begin(), wait_set_.end(), - std::back_inserter(erased_entries), is_signalled); - wait_set_.erase( - std::remove_if(wait_set_.begin(), wait_set_.end(), is_signalled), - wait_set_.end()); - } + const auto& device = device_holder->GetDevice(); + // Wait for one or more fences to be signaled. Any additional fences added + // to the waiter will be serviced in the next pass. If a fence that is going + // to be signaled at an abnormally long deadline is the only one in the set, + // a timeout will bail out the wait. + auto fences = GetFencesForWaitSet(wait_set); + if (fences.empty()) { + return true; + } - { - TRACE_EVENT0("impeller", "ClearSignaledFences"); - // Erase the erased entries which will invoke callbacks. - erased_entries.clear(); // Bit redundant because of scope but hey. + auto result = device.waitForFences( + /*fenceCount=*/fences.size(), + /*pFences=*/fences.data(), + /*waitAll=*/false, + /*timeout=*/std::chrono::nanoseconds{100ms}.count()); + if (!(result == vk::Result::eSuccess || result == vk::Result::eTimeout)) { + VALIDATION_LOG << "Fence waiter encountered an unexpected error. Tearing " + "down the waiter thread."; + return false; + } + + // One or more fences have been signaled. Find out which ones and update + // their signaled statuses. + { + TRACE_EVENT0("impeller", "CheckFenceStatus"); + for (auto& entry : wait_set) { + entry->UpdateSignalledStatus(device); } + wait_set.clear(); } + + // Quickly acquire the wait set lock and erase signaled entries. Make sure + // the mutex is unlocked before calling the destructors of the erased + // entries. These might touch allocators. + WaitSet erased_entries; + { + static constexpr auto is_signalled = [](const auto& entry) { + return entry->IsSignalled(); + }; + std::scoped_lock lock(wait_set_mutex_); + + // TODO(matanlurey): Iterate the list 1x by copying is_signaled into erased. + std::copy_if(wait_set_.begin(), wait_set_.end(), + std::back_inserter(erased_entries), is_signalled); + wait_set_.erase( + std::remove_if(wait_set_.begin(), wait_set_.end(), is_signalled), + wait_set_.end()); + } + + { + TRACE_EVENT0("impeller", "ClearSignaledFences"); + // Erase the erased entries which will invoke callbacks. + erased_entries.clear(); // Bit redundant because of scope but hey. + } + + return true; } void FenceWaiterVK::Terminate() { diff --git a/impeller/renderer/backend/vulkan/fence_waiter_vk.h b/impeller/renderer/backend/vulkan/fence_waiter_vk.h index 7e562433ddb9d..83050c554d037 100644 --- a/impeller/renderer/backend/vulkan/fence_waiter_vk.h +++ b/impeller/renderer/backend/vulkan/fence_waiter_vk.h @@ -42,12 +42,14 @@ class FenceWaiterVK { std::condition_variable wait_set_cv_; WaitSet wait_set_; bool terminate_ = false; - bool is_valid_ = false; explicit FenceWaiterVK(std::weak_ptr device_holder); void Main(); + bool Wait(); + void WaitUntilEmpty(); + FML_DISALLOW_COPY_AND_ASSIGN(FenceWaiterVK); }; diff --git a/impeller/renderer/backend/vulkan/fence_waiter_vk_unittests.cc b/impeller/renderer/backend/vulkan/fence_waiter_vk_unittests.cc new file mode 100644 index 0000000000000..ef2ff5d40cbb9 --- /dev/null +++ b/impeller/renderer/backend/vulkan/fence_waiter_vk_unittests.cc @@ -0,0 +1,130 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "fml/synchronization/waitable_event.h" +#include "gtest/gtest.h" // IWYU pragma: keep +#include "impeller/renderer/backend/vulkan/fence_waiter_vk.h" // IWYU pragma: keep +#include "impeller/renderer/backend/vulkan/test/mock_vulkan.h" + +namespace impeller { +namespace testing { + +TEST(FenceWaiterVKTest, IgnoresNullFence) { + auto const context = MockVulkanContextBuilder().Build(); + auto const waiter = context->GetFenceWaiter(); + EXPECT_FALSE(waiter->AddFence(vk::UniqueFence(), []() {})); +} + +TEST(FenceWaiterVKTest, IgnoresNullCallback) { + auto const context = MockVulkanContextBuilder().Build(); + auto const device = context->GetDevice(); + auto const waiter = context->GetFenceWaiter(); + + auto fence = device.createFenceUnique({}).value; + EXPECT_FALSE(waiter->AddFence(std::move(fence), nullptr)); +} + +TEST(FenceWaiterVKTest, ExecutesFenceCallback) { + auto const context = MockVulkanContextBuilder().Build(); + auto const device = context->GetDevice(); + auto const waiter = context->GetFenceWaiter(); + + auto signal = fml::ManualResetWaitableEvent(); + auto fence = device.createFenceUnique({}).value; + waiter->AddFence(std::move(fence), [&signal]() { signal.Signal(); }); + + signal.Wait(); +} + +TEST(FenceWaiterVKTest, ExecutesFenceCallbackX2) { + auto const context = MockVulkanContextBuilder().Build(); + auto const device = context->GetDevice(); + auto const waiter = context->GetFenceWaiter(); + + auto signal = fml::ManualResetWaitableEvent(); + auto fence = device.createFenceUnique({}).value; + waiter->AddFence(std::move(fence), [&signal]() { signal.Signal(); }); + + auto signal2 = fml::ManualResetWaitableEvent(); + auto fence2 = device.createFenceUnique({}).value; + waiter->AddFence(std::move(fence2), [&signal2]() { signal2.Signal(); }); + + signal.Wait(); + signal2.Wait(); +} + +TEST(FenceWaiterVKTest, ExecutesNewFenceThenOldFence) { + auto const context = MockVulkanContextBuilder().Build(); + auto const device = context->GetDevice(); + auto const waiter = context->GetFenceWaiter(); + + auto signal = fml::ManualResetWaitableEvent(); + auto fence = device.createFenceUnique({}).value; + MockFence::SetStatus(fence, vk::Result::eNotReady); + auto raw_fence = MockFence::GetRawPointer(fence); + waiter->AddFence(std::move(fence), [&signal]() { signal.Signal(); }); + + // The easiest way to verify that the callback was _not_ called is to wait + // for a timeout, but that could introduce flakiness. Instead, we'll add a + // second fence that will signal immediately, and wait for that one instead. + { + auto signal2 = fml::ManualResetWaitableEvent(); + auto fence2 = device.createFenceUnique({}).value; + MockFence::SetStatus(fence2, vk::Result::eSuccess); + waiter->AddFence(std::move(fence2), [&signal2]() { signal2.Signal(); }); + signal2.Wait(); + } + + // Now, we'll signal the first fence, and wait for the callback to be called. + raw_fence->SetStatus(vk::Result::eSuccess); + + // Now, we'll signal the first fence, and wait for the callback to be called. + signal.Wait(); +} + +TEST(FenceWaiterVKTest, AddFenceDoesNothingIfTerminating) { + auto signal = fml::ManualResetWaitableEvent(); + + { + auto const context = MockVulkanContextBuilder().Build(); + auto const device = context->GetDevice(); + auto const waiter = context->GetFenceWaiter(); + waiter->Terminate(); + + auto fence = device.createFenceUnique({}).value; + waiter->AddFence(std::move(fence), [&signal]() { signal.Signal(); }); + } + + // Ensure the fence did _not_ signal. + EXPECT_TRUE(signal.WaitWithTimeout(fml::TimeDelta::FromMilliseconds(100))); +} + +TEST(FenceWaiterVKTest, InProgressFencesStillWaitIfTerminated) { + MockFence* raw_fence = nullptr; + auto signal = fml::ManualResetWaitableEvent(); + + auto const context = MockVulkanContextBuilder().Build(); + auto const device = context->GetDevice(); + auto const waiter = context->GetFenceWaiter(); + + // Add a fence that isn't signalled yet. + auto fence = device.createFenceUnique({}).value; + + // Even if the fence is eSuccess, it's not guaranteed to be called in time. + MockFence::SetStatus(fence, vk::Result::eNotReady); + raw_fence = MockFence::GetRawPointer(fence); + waiter->AddFence(std::move(fence), [&signal]() { signal.Signal(); }); + + // Terminate the waiter. + waiter->Terminate(); + + // Signal the fence. + raw_fence->SetStatus(vk::Result::eSuccess); + + // This will hang if the fence was not signalled. + signal.Wait(); +} + +} // namespace testing +} // namespace impeller diff --git a/impeller/renderer/backend/vulkan/test/mock_vulkan.cc b/impeller/renderer/backend/vulkan/test/mock_vulkan.cc index ed311ac017a81..393916b81023f 100644 --- a/impeller/renderer/backend/vulkan/test/mock_vulkan.cc +++ b/impeller/renderer/backend/vulkan/test/mock_vulkan.cc @@ -4,10 +4,13 @@ #include "impeller/renderer/backend/vulkan/test/mock_vulkan.h" #include +#include #include #include "fml/macros.h" #include "fml/thread_local.h" #include "impeller/base/thread_safety.h" +#include "vulkan/vulkan_core.h" +#include "vulkan/vulkan_enums.hpp" namespace impeller { namespace testing { @@ -410,7 +413,15 @@ VkResult vkCreateFence(VkDevice device, const VkFenceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence) { - *pFence = reinterpret_cast(0xfe0ce); + MockDevice* mock_device = reinterpret_cast(device); + *pFence = reinterpret_cast(new MockFence()); + return VK_SUCCESS; +} + +VkResult vkDestroyFence(VkDevice device, + VkFence fence, + const VkAllocationCallbacks* pAllocator) { + delete reinterpret_cast(fence); return VK_SUCCESS; } @@ -430,7 +441,9 @@ VkResult vkWaitForFences(VkDevice device, } VkResult vkGetFenceStatus(VkDevice device, VkFence fence) { - return VK_SUCCESS; + MockDevice* mock_device = reinterpret_cast(device); + MockFence* mock_fence = reinterpret_cast(fence); + return mock_fence->GetStatus(); } VkResult vkCreateDebugUtilsMessengerEXT( @@ -533,6 +546,8 @@ PFN_vkVoidFunction GetMockVulkanProcAddress(VkInstance instance, return (PFN_vkVoidFunction)vkEndCommandBuffer; } else if (strcmp("vkCreateFence", pName) == 0) { return (PFN_vkVoidFunction)vkCreateFence; + } else if (strcmp("vkDestroyFence", pName) == 0) { + return (PFN_vkVoidFunction)vkDestroyFence; } else if (strcmp("vkQueueSubmit", pName) == 0) { return (PFN_vkVoidFunction)vkQueueSubmit; } else if (strcmp("vkWaitForFences", pName) == 0) { diff --git a/impeller/renderer/backend/vulkan/test/mock_vulkan.h b/impeller/renderer/backend/vulkan/test/mock_vulkan.h index 41c82c6da2a90..8f41b9f86ee62 100644 --- a/impeller/renderer/backend/vulkan/test/mock_vulkan.h +++ b/impeller/renderer/backend/vulkan/test/mock_vulkan.h @@ -5,10 +5,13 @@ #pragma once #include +#include #include #include +#include "impeller/base/thread.h" #include "impeller/renderer/backend/vulkan/context_vk.h" +#include "vulkan/vulkan_enums.hpp" namespace impeller { namespace testing { @@ -16,6 +19,39 @@ namespace testing { std::shared_ptr> GetMockVulkanFunctions( VkDevice device); +// A test-controlled version of |vk::Fence|. +class MockFence final { + public: + MockFence() = default; + + // Returns the result that was set in the constructor or |SetStatus|. + VkResult GetStatus() { return static_cast(result_.load()); } + + // Sets the result that will be returned by `GetFenceStatus`. + void SetStatus(vk::Result result) { result_ = result; } + + // Sets the result that will be returned by `GetFenceStatus`. + static void SetStatus(vk::UniqueFence& fence, vk::Result result) { + // Cast the fence to a MockFence and set the result. + VkFence raw_fence = fence.get(); + MockFence* mock_fence = reinterpret_cast(raw_fence); + mock_fence->SetStatus(result); + } + + // Gets a raw pointer to manipulate the fence after it's been moved. + static MockFence* GetRawPointer(vk::UniqueFence& fence) { + // Cast the fence to a MockFence and get the result. + VkFence raw_fence = fence.get(); + MockFence* mock_fence = reinterpret_cast(raw_fence); + return mock_fence; + } + + private: + std::atomic result_ = vk::Result::eSuccess; + + FML_DISALLOW_COPY_AND_ASSIGN(MockFence); +}; + class MockVulkanContextBuilder { public: MockVulkanContextBuilder(); diff --git a/impeller/renderer/backend/vulkan/test/mock_vulkan_unittests.cc b/impeller/renderer/backend/vulkan/test/mock_vulkan_unittests.cc index de28491e69fed..1aa57b0345f21 100644 --- a/impeller/renderer/backend/vulkan/test/mock_vulkan_unittests.cc +++ b/impeller/renderer/backend/vulkan/test/mock_vulkan_unittests.cc @@ -6,6 +6,7 @@ #include "gtest/gtest.h" #include "impeller/renderer/backend/vulkan/command_pool_vk.h" #include "impeller/renderer/backend/vulkan/test/mock_vulkan.h" +#include "vulkan/vulkan_enums.hpp" namespace impeller { namespace testing { @@ -33,5 +34,26 @@ TEST(MockVulkanContextTest, IsThreadSafe) { context->Shutdown(); } +TEST(MockVulkanContextTest, DefaultFenceAlwaysReportsSuccess) { + auto const context = MockVulkanContextBuilder().Build(); + auto const device = context->GetDevice(); + + auto fence = device.createFenceUnique({}).value; + EXPECT_EQ(vk::Result::eSuccess, device.getFenceStatus(*fence)); +} + +TEST(MockVulkanContextTest, MockedFenceReportsStatus) { + auto const context = MockVulkanContextBuilder().Build(); + + auto const device = context->GetDevice(); + auto fence = device.createFenceUnique({}).value; + MockFence::SetStatus(fence, vk::Result::eNotReady); + + EXPECT_EQ(vk::Result::eNotReady, device.getFenceStatus(fence.get())); + + MockFence::SetStatus(fence, vk::Result::eSuccess); + EXPECT_EQ(vk::Result::eSuccess, device.getFenceStatus(*fence)); +} + } // namespace testing } // namespace impeller From 68299275a1da16da4a200b45e3eb35bd3fde5c3e Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 15 Sep 2023 18:10:59 -0400 Subject: [PATCH 078/859] Roll Skia from 7f88bda24f7f to 0057898979a1 (1 revision) (#45904) https://skia.googlesource.com/skia.git/+log/7f88bda24f7f..0057898979a1 2023-09-15 johnstiles@google.com Add unit test for shadowed variables in a loop-continue. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index e6620d860df5b..dc324e1d1ae7f 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '7f88bda24f7f355afbe1be2e44cee4d3d84aab45', + 'skia_revision': '0057898979a1d9a8f76cb845f72e8c12dc59f146', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 8c616350bfd23d25eb7d67b65f9c193c5c039ecf Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Fri, 15 Sep 2023 15:29:13 -0700 Subject: [PATCH 079/859] Do not convert an open path to a closed rect. (#45903) Fixes https://github.com/flutter/flutter/issues/134816. --- Confirmed this only happens when utilizing `DisplayListBuilder`. Consider: ```cc TEST_P(DisplayListTest, CanDrawAnOpenPath) { flutter::DisplayListBuilder builder; flutter::DlPaint paint; paint.setColor(flutter::DlColor::kRed()); paint.setDrawStyle(flutter::DlDrawStyle::kStroke); paint.setStrokeWidth(10); builder.Translate(300, 300); // Move to (50, 50) and draw lines from: // 1. (50, height) // 2. (width, height) // 3. (width, 50) SkPath path; path.moveTo(50, 50); path.lineTo(50, 100); path.lineTo(100, 100); path.lineTo(100, 50); builder.DrawPath(path, paint); ASSERT_TRUE(OpenPlaygroundHere(builder.Build())); } ``` ![Screenshot 2023-09-15 at 2 06 53 PM](https://github.com/flutter/flutter/assets/168174/3a3868e1-f1d1-4e29-affa-4bd32d26ccdc) --- The bug is in `dl_dispatcher.cc`: ```cc // |flutter::DlOpReceiver| void DlDispatcher::drawPath(const SkPath& path) { SkRect rect; SkRRect rrect; SkRect oval; if (path.isRect(&rect)) { canvas_.DrawRect(skia_conversions::ToRect(rect), paint_); } else if (path.isRRect(&rrect) && rrect.isSimple()) { canvas_.DrawRRect(skia_conversions::ToRect(rrect.rect()), rrect.getSimpleRadii().fX, paint_); } else if (path.isOval(&oval) && oval.width() == oval.height()) { canvas_.DrawCircle(skia_conversions::ToPoint(oval.center()), oval.width() * 0.5, paint_); } else { canvas_.DrawPath(skia_conversions::ToPath(path), paint_); } } ``` Note the documentation for `isRect`: ```cc /** Returns true if SkPath is equivalent to SkRect when filled. If false: rect, isClosed, and direction are unchanged. If true: rect, isClosed, and direction are written to if not nullptr. rect may be smaller than the SkPath bounds. SkPath bounds may include kMove_Verb points that do not alter the area drawn by the returned rect. @param rect storage for bounds of SkRect; may be nullptr @param isClosed storage set to true if SkPath is closed; may be nullptr @param direction storage set to SkRect direction; may be nullptr @return true if SkPath contains SkRect example: https://fiddle.skia.org/c/@Path_isRect */ bool isRect(SkRect* rect, bool* isClosed = nullptr, SkPathDirection* direction = nullptr) const; ``` ... the `isClosed` is critical, without checking that we're doing an incorrect optimization. I'll send a fix and test. --- impeller/aiks/aiks_unittests.cc | 26 +++++++++++++++++++++++++ impeller/display_list/dl_dispatcher.cc | 24 ++++++++++++++++------- impeller/display_list/dl_unittests.cc | 27 ++++++++++++++++++++++++++ 3 files changed, 70 insertions(+), 7 deletions(-) diff --git a/impeller/aiks/aiks_unittests.cc b/impeller/aiks/aiks_unittests.cc index a9e4b162f36bc..0460bab2f42d9 100644 --- a/impeller/aiks/aiks_unittests.cc +++ b/impeller/aiks/aiks_unittests.cc @@ -1262,6 +1262,32 @@ TEST_P(AiksTest, CanRenderDifferencePaths) { ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); } +// Regression test for https://github.com/flutter/flutter/issues/134816. +// +// It should be possible to draw 3 lines, and not have an implicit close path. +TEST_P(AiksTest, CanDrawAnOpenPath) { + Canvas canvas; + + // Starting at (50, 50), draw lines from: + // 1. (50, height) + // 2. (width, height) + // 3. (width, 50) + PathBuilder builder; + builder.MoveTo({50, 50}); + builder.LineTo({50, 100}); + builder.LineTo({100, 100}); + builder.LineTo({100, 50}); + + Paint paint; + paint.color = Color::Red(); + paint.style = Paint::Style::kStroke; + paint.stroke_width = 10; + + canvas.DrawPath(builder.TakePath(), paint); + + ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); +} + static sk_sp OpenFixtureAsSkData(const char* fixture_name) { auto mapping = flutter::testing::OpenFixtureAsMapping(fixture_name); if (!mapping) { diff --git a/impeller/display_list/dl_dispatcher.cc b/impeller/display_list/dl_dispatcher.cc index edcd363a7e45c..107389deaf715 100644 --- a/impeller/display_list/dl_dispatcher.cc +++ b/impeller/display_list/dl_dispatcher.cc @@ -848,19 +848,29 @@ void DlDispatcher::drawDRRect(const SkRRect& outer, const SkRRect& inner) { // |flutter::DlOpReceiver| void DlDispatcher::drawPath(const SkPath& path) { SkRect rect; - SkRRect rrect; - SkRect oval; - if (path.isRect(&rect)) { + + // We can't "optimize" a path into a rectangle if it's open. + bool closed; + if (path.isRect(&rect, &closed); closed) { canvas_.DrawRect(skia_conversions::ToRect(rect), paint_); - } else if (path.isRRect(&rrect) && rrect.isSimple()) { + return; + } + + SkRRect rrect; + if (path.isRRect(&rrect) && rrect.isSimple()) { canvas_.DrawRRect(skia_conversions::ToRect(rrect.rect()), rrect.getSimpleRadii().fX, paint_); - } else if (path.isOval(&oval) && oval.width() == oval.height()) { + return; + } + + SkRect oval; + if (path.isOval(&oval) && oval.width() == oval.height()) { canvas_.DrawCircle(skia_conversions::ToPoint(oval.center()), oval.width() * 0.5, paint_); - } else { - canvas_.DrawPath(skia_conversions::ToPath(path), paint_); + return; } + + canvas_.DrawPath(skia_conversions::ToPath(path), paint_); } // |flutter::DlOpReceiver| diff --git a/impeller/display_list/dl_unittests.cc b/impeller/display_list/dl_unittests.cc index 70396ccdb2200..7b692363c54b1 100644 --- a/impeller/display_list/dl_unittests.cc +++ b/impeller/display_list/dl_unittests.cc @@ -411,6 +411,33 @@ TEST_P(DisplayListTest, CanDrawWithOddPathWinding) { ASSERT_TRUE(OpenPlaygroundHere(builder.Build())); } +// Regression test for https://github.com/flutter/flutter/issues/134816. +// +// It should be possible to draw 3 lines, and not have an implicit close path. +TEST_P(DisplayListTest, CanDrawAnOpenPath) { + flutter::DisplayListBuilder builder; + flutter::DlPaint paint; + + paint.setColor(flutter::DlColor::kRed()); + paint.setDrawStyle(flutter::DlDrawStyle::kStroke); + paint.setStrokeWidth(10); + + builder.Translate(300, 300); + + // Move to (50, 50) and draw lines from: + // 1. (50, height) + // 2. (width, height) + // 3. (width, 50) + SkPath path; + path.moveTo(50, 50); + path.lineTo(50, 100); + path.lineTo(100, 100); + path.lineTo(100, 50); + builder.DrawPath(path, paint); + + ASSERT_TRUE(OpenPlaygroundHere(builder.Build())); +} + TEST_P(DisplayListTest, CanDrawWithMaskBlur) { auto texture = CreateTextureForFixture("embarcadero.jpg"); flutter::DisplayListBuilder builder; From f9d1e79749acfab519e010c40198f81bf9dd9afc Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 15 Sep 2023 18:56:27 -0400 Subject: [PATCH 080/859] Roll Skia from 0057898979a1 to 917fd16e6f26 (1 revision) (#45906) https://skia.googlesource.com/skia.git/+log/0057898979a1..917fd16e6f26 2023-09-15 johnstiles@google.com Add device-name to Caps when test-utils is active. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index dc324e1d1ae7f..28b79d2df2b88 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '0057898979a1d9a8f76cb845f72e8c12dc59f146', + 'skia_revision': '917fd16e6f26f56ef053e4ee10a4e583c3e7dee7', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index c412035238987..2c94bd2c27b0c 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 87f0195998ae50921ad40d63914b9c6c +Signature: 35e1fb513e6fb3cc87b456dd764c6931 ==================================================================================================== LIBRARY: etc1 From 48573f93b76f2379cb564ef11d051f6c77e76bd6 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 15 Sep 2023 19:54:22 -0400 Subject: [PATCH 081/859] Roll Skia from 917fd16e6f26 to 7c179932cc06 (1 revision) (#45907) https://skia.googlesource.com/skia.git/+log/917fd16e6f26..7c179932cc06 2023-09-15 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from 18fd0925a396 to 76d21d4985f8 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 28b79d2df2b88..13a66d7518b2d 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '917fd16e6f26f56ef053e4ee10a4e583c3e7dee7', + 'skia_revision': '7c179932cc063c83476ee4acf70d1ed82addd2f8', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 504f211d5885f112eeff4cf8bb31fe1d757b1469 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 15 Sep 2023 21:20:11 -0400 Subject: [PATCH 082/859] Roll Skia from 7c179932cc06 to c19cc483c619 (1 revision) (#45911) https://skia.googlesource.com/skia.git/+log/7c179932cc06..c19cc483c619 2023-09-16 michaelludwig@google.com Update SetTraceValue() to use a template, remove bitpun union If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 13a66d7518b2d..51061a0602213 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '7c179932cc063c83476ee4acf70d1ed82addd2f8', + 'skia_revision': 'c19cc483c61983fd5034833bba470998ba93414e', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 2c94bd2c27b0c..e88be9f68bd9d 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 35e1fb513e6fb3cc87b456dd764c6931 +Signature: 8bebf3a869344ac4385c8c2013c16cbd ==================================================================================================== LIBRARY: etc1 From f1de6052db3de3d90277795614e8b66c659507e0 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Fri, 15 Sep 2023 18:22:13 -0700 Subject: [PATCH 083/859] Revert "[Impeller] construct text frames on UI thread." (#45910) Reverts flutter/engine#45418 Some google3 tests are hitting the CHECK I added in the DlSkCanvasDispatcher::drawTextFrame, which indicates that the SkParagraph code likely thinks impeller is enabled, whereas other code might be running with Skia. Perhaps this could happen if its software rendering? It should be a fatal error on startup so we can track this down. --- display_list/BUILD.gn | 1 - display_list/benchmarking/dl_complexity_gl.cc | 5 - display_list/benchmarking/dl_complexity_gl.h | 3 - .../benchmarking/dl_complexity_metal.cc | 5 - .../benchmarking/dl_complexity_metal.h | 3 - display_list/display_list.h | 1 - display_list/dl_builder.cc | 42 ----- display_list/dl_builder.h | 10 -- display_list/dl_canvas.h | 11 +- display_list/dl_op_receiver.h | 4 - display_list/dl_op_records.h | 20 --- display_list/skia/dl_sk_canvas.cc | 8 - display_list/skia/dl_sk_canvas.h | 5 - display_list/skia/dl_sk_dispatcher.cc | 7 - display_list/skia/dl_sk_dispatcher.h | 3 - display_list/utils/dl_receiver_utils.h | 3 - flow/BUILD.gn | 5 +- flow/layers/performance_overlay_layer.cc | 10 -- impeller/aiks/aiks_unittests.cc | 16 +- impeller/aiks/canvas.cc | 4 +- impeller/aiks/canvas.h | 2 +- impeller/display_list/dl_dispatcher.cc | 21 ++- impeller/display_list/dl_dispatcher.h | 5 - impeller/entity/contents/text_contents.cc | 16 +- impeller/entity/contents/text_contents.h | 4 +- impeller/entity/entity_unittests.cc | 6 +- .../backends/skia/text_frame_skia.cc | 13 +- .../backends/skia/text_frame_skia.h | 3 +- .../backends/stb/text_frame_stb.cc | 10 +- .../typographer/backends/stb/text_frame_stb.h | 7 +- impeller/typographer/typographer_context.h | 1 + impeller/typographer/typographer_unittests.cc | 47 +++--- shell/common/dl_op_spy.cc | 8 - shell/common/dl_op_spy.h | 3 - testing/display_list_testing.cc | 9 -- testing/display_list_testing.h | 3 - testing/mock_canvas.cc | 8 - testing/mock_canvas.h | 4 - third_party/txt/BUILD.gn | 1 - third_party/txt/src/skia/paragraph_skia.cc | 46 +----- third_party/txt/tests/paragraph_unittests.cc | 147 ++++-------------- 41 files changed, 122 insertions(+), 408 deletions(-) diff --git a/display_list/BUILD.gn b/display_list/BUILD.gn index 736e13dc5c7bb..97c9683511b61 100644 --- a/display_list/BUILD.gn +++ b/display_list/BUILD.gn @@ -87,7 +87,6 @@ source_set("display_list") { public_deps = [ "//flutter/fml", "//flutter/impeller/runtime_stage", - "//flutter/impeller/typographer", "//third_party/skia", ] diff --git a/display_list/benchmarking/dl_complexity_gl.cc b/display_list/benchmarking/dl_complexity_gl.cc index 53b70e2c24e47..f8dd1c52a1260 100644 --- a/display_list/benchmarking/dl_complexity_gl.cc +++ b/display_list/benchmarking/dl_complexity_gl.cc @@ -637,11 +637,6 @@ void DisplayListGLComplexityCalculator::GLHelper::drawTextBlob( draw_text_blob_count_++; } -void DisplayListGLComplexityCalculator::GLHelper::drawTextFrame( - const std::shared_ptr& text_frame, - SkScalar x, - SkScalar y) {} - void DisplayListGLComplexityCalculator::GLHelper::drawShadow( const SkPath& path, const DlColor color, diff --git a/display_list/benchmarking/dl_complexity_gl.h b/display_list/benchmarking/dl_complexity_gl.h index 5115bb4d6ecd6..9fc7596687051 100644 --- a/display_list/benchmarking/dl_complexity_gl.h +++ b/display_list/benchmarking/dl_complexity_gl.h @@ -70,9 +70,6 @@ class DisplayListGLComplexityCalculator void drawTextBlob(const sk_sp blob, SkScalar x, SkScalar y) override; - void drawTextFrame(const std::shared_ptr& text_frame, - SkScalar x, - SkScalar y) override; void drawShadow(const SkPath& path, const DlColor color, const SkScalar elevation, diff --git a/display_list/benchmarking/dl_complexity_metal.cc b/display_list/benchmarking/dl_complexity_metal.cc index c6b6547afee56..56d4f3b406ad9 100644 --- a/display_list/benchmarking/dl_complexity_metal.cc +++ b/display_list/benchmarking/dl_complexity_metal.cc @@ -581,11 +581,6 @@ void DisplayListMetalComplexityCalculator::MetalHelper::drawTextBlob( draw_text_blob_count_++; } -void DisplayListMetalComplexityCalculator::MetalHelper::drawTextFrame( - const std::shared_ptr& text_frame, - SkScalar x, - SkScalar y) {} - void DisplayListMetalComplexityCalculator::MetalHelper::drawShadow( const SkPath& path, const DlColor color, diff --git a/display_list/benchmarking/dl_complexity_metal.h b/display_list/benchmarking/dl_complexity_metal.h index dd068e2fa3243..aa63863fa4d05 100644 --- a/display_list/benchmarking/dl_complexity_metal.h +++ b/display_list/benchmarking/dl_complexity_metal.h @@ -70,9 +70,6 @@ class DisplayListMetalComplexityCalculator void drawTextBlob(const sk_sp blob, SkScalar x, SkScalar y) override; - void drawTextFrame(const std::shared_ptr& text_frame, - SkScalar x, - SkScalar y) override; void drawShadow(const SkPath& path, const DlColor color, const SkScalar elevation, diff --git a/display_list/display_list.h b/display_list/display_list.h index 3d4a7acff5896..668a247d5596f 100644 --- a/display_list/display_list.h +++ b/display_list/display_list.h @@ -136,7 +136,6 @@ namespace flutter { \ V(DrawDisplayList) \ V(DrawTextBlob) \ - V(DrawTextFrame) \ \ V(DrawShadow) \ V(DrawShadowTransparentOccluder) diff --git a/display_list/dl_builder.cc b/display_list/dl_builder.cc index f20b8fe82ec47..2906f9a85fda7 100644 --- a/display_list/dl_builder.cc +++ b/display_list/dl_builder.cc @@ -1302,48 +1302,6 @@ void DisplayListBuilder::DrawTextBlob(const sk_sp& blob, SetAttributesFromPaint(paint, DisplayListOpFlags::kDrawTextBlobFlags); drawTextBlob(blob, x, y); } - -void DisplayListBuilder::drawTextFrame( - const std::shared_ptr& text_frame, - SkScalar x, - SkScalar y) { - DisplayListAttributeFlags flags = kDrawTextBlobFlags; - OpResult result = PaintResult(current_, flags); - if (result == OpResult::kNoEffect) { - return; - } - impeller::Rect bounds = text_frame->GetBounds(); - SkRect sk_bounds = SkRect::MakeLTRB(bounds.GetLeft(), bounds.GetTop(), - bounds.GetRight(), bounds.GetBottom()); - bool unclipped = AccumulateOpBounds(sk_bounds.makeOffset(x, y), flags); - // TODO(https://github.com/flutter/flutter/issues/82202): Remove once the - // unit tests can use Fuchsia's font manager instead of the empty default. - // Until then we might encounter empty bounds for otherwise valid text and - // thus we ignore the results from AccumulateOpBounds. -#if defined(OS_FUCHSIA) - unclipped = true; -#endif // OS_FUCHSIA - if (unclipped) { - Push(0, 1, text_frame, x, y); - // There is no way to query if the glyphs of a text blob overlap and - // there are no current guarantees from either Skia or Impeller that - // they will protect overlapping glyphs from the effects of overdraw - // so we must make the conservative assessment that this DL layer is - // not compatible with group opacity inheritance. - UpdateLayerOpacityCompatibility(false); - UpdateLayerResult(result); - } -} - -void DisplayListBuilder::DrawTextFrame( - const std::shared_ptr& text_frame, - SkScalar x, - SkScalar y, - const DlPaint& paint) { - SetAttributesFromPaint(paint, DisplayListOpFlags::kDrawTextBlobFlags); - drawTextFrame(text_frame, x, y); -} - void DisplayListBuilder::DrawShadow(const SkPath& path, const DlColor color, const SkScalar elevation, diff --git a/display_list/dl_builder.h b/display_list/dl_builder.h index 3a65b8fad5328..ab0bce0db3c38 100644 --- a/display_list/dl_builder.h +++ b/display_list/dl_builder.h @@ -224,16 +224,6 @@ class DisplayListBuilder final : public virtual DlCanvas, SkScalar x, SkScalar y, const DlPaint& paint) override; - - void drawTextFrame(const std::shared_ptr& text_frame, - SkScalar x, - SkScalar y) override; - - void DrawTextFrame(const std::shared_ptr& text_frame, - SkScalar x, - SkScalar y, - const DlPaint& paint) override; - // |DlCanvas| void DrawShadow(const SkPath& path, const DlColor color, diff --git a/display_list/dl_canvas.h b/display_list/dl_canvas.h index 5cd06146c78c3..f04645c157788 100644 --- a/display_list/dl_canvas.h +++ b/display_list/dl_canvas.h @@ -18,8 +18,6 @@ #include "third_party/skia/include/core/SkRect.h" #include "third_party/skia/include/core/SkTextBlob.h" -#include "impeller/typographer/text_frame.h" - namespace flutter { //------------------------------------------------------------------------------ @@ -154,7 +152,7 @@ class DlCanvas { virtual void DrawVertices(const DlVertices* vertices, DlBlendMode mode, const DlPaint& paint) = 0; - void DrawVertices(const std::shared_ptr& vertices, + void DrawVertices(const std::shared_ptr vertices, DlBlendMode mode, const DlPaint& paint) { DrawVertices(vertices.get(), mode, paint); @@ -203,13 +201,6 @@ class DlCanvas { const DlPaint* paint = nullptr) = 0; virtual void DrawDisplayList(const sk_sp display_list, SkScalar opacity = SK_Scalar1) = 0; - - virtual void DrawTextFrame( - const std::shared_ptr& text_frame, - SkScalar x, - SkScalar y, - const DlPaint& paint) = 0; - virtual void DrawTextBlob(const sk_sp& blob, SkScalar x, SkScalar y, diff --git a/display_list/dl_op_receiver.h b/display_list/dl_op_receiver.h index d9bbc7b7f4f3f..23a0aaf6fd97c 100644 --- a/display_list/dl_op_receiver.h +++ b/display_list/dl_op_receiver.h @@ -257,10 +257,6 @@ class DlOpReceiver { virtual void drawTextBlob(const sk_sp blob, SkScalar x, SkScalar y) = 0; - virtual void drawTextFrame( - const std::shared_ptr& text_frame, - SkScalar x, - SkScalar y) = 0; virtual void drawShadow(const SkPath& path, const DlColor color, const SkScalar elevation, diff --git a/display_list/dl_op_records.h b/display_list/dl_op_records.h index a1c7835e43df9..47cdeb9d0e6fb 100644 --- a/display_list/dl_op_records.h +++ b/display_list/dl_op_records.h @@ -12,7 +12,6 @@ #include "flutter/display_list/effects/dl_color_source.h" #include "flutter/fml/macros.h" -#include "impeller/typographer/text_frame.h" #include "third_party/skia/include/core/SkRSXform.h" namespace flutter { @@ -1085,25 +1084,6 @@ struct DrawTextBlobOp final : DrawOpBase { } }; -struct DrawTextFrameOp final : DrawOpBase { - static const auto kType = DisplayListOpType::kDrawTextFrame; - - DrawTextFrameOp(const std::shared_ptr& text_frame, - SkScalar x, - SkScalar y) - : x(x), y(y), text_frame(text_frame) {} - - const SkScalar x; - const SkScalar y; - const std::shared_ptr text_frame; - - void dispatch(DispatchContext& ctx) const { - if (op_needed(ctx)) { - ctx.receiver.drawTextFrame(text_frame, x, y); - } - } -}; - // 4 byte header + 28 byte payload packs evenly into 32 bytes #define DEFINE_DRAW_SHADOW_OP(name, transparent_occluder) \ struct Draw##name##Op final : DrawOpBase { \ diff --git a/display_list/skia/dl_sk_canvas.cc b/display_list/skia/dl_sk_canvas.cc index 34270bd88018d..9299c9a6ff9d7 100644 --- a/display_list/skia/dl_sk_canvas.cc +++ b/display_list/skia/dl_sk_canvas.cc @@ -325,14 +325,6 @@ void DlSkCanvasAdapter::DrawTextBlob(const sk_sp& blob, delegate_->drawTextBlob(blob, x, y, ToSk(paint)); } -void DlSkCanvasAdapter::DrawTextFrame( - const std::shared_ptr& text_frame, - SkScalar x, - SkScalar y, - const DlPaint& paint) { - FML_CHECK(false); -} - void DlSkCanvasAdapter::DrawShadow(const SkPath& path, const DlColor color, const SkScalar elevation, diff --git a/display_list/skia/dl_sk_canvas.h b/display_list/skia/dl_sk_canvas.h index f085d35ae8c9d..0377b7de75e30 100644 --- a/display_list/skia/dl_sk_canvas.h +++ b/display_list/skia/dl_sk_canvas.h @@ -7,7 +7,6 @@ #include "flutter/display_list/dl_canvas.h" #include "flutter/display_list/skia/dl_sk_types.h" -#include "impeller/typographer/text_frame.h" namespace flutter { @@ -145,10 +144,6 @@ class DlSkCanvasAdapter final : public virtual DlCanvas { SkScalar x, SkScalar y, const DlPaint& paint) override; - void DrawTextFrame(const std::shared_ptr& text_frame, - SkScalar x, - SkScalar y, - const DlPaint& paint) override; void DrawShadow(const SkPath& path, const DlColor color, const SkScalar elevation, diff --git a/display_list/skia/dl_sk_dispatcher.cc b/display_list/skia/dl_sk_dispatcher.cc index f8cc16d1151c1..def08fa8886a3 100644 --- a/display_list/skia/dl_sk_dispatcher.cc +++ b/display_list/skia/dl_sk_dispatcher.cc @@ -270,13 +270,6 @@ void DlSkCanvasDispatcher::drawTextBlob(const sk_sp blob, canvas_->drawTextBlob(blob, x, y, paint()); } -void DlSkCanvasDispatcher::drawTextFrame( - const std::shared_ptr& text_frame, - SkScalar x, - SkScalar y) { - FML_CHECK(false); -} - void DlSkCanvasDispatcher::DrawShadow(SkCanvas* canvas, const SkPath& path, DlColor color, diff --git a/display_list/skia/dl_sk_dispatcher.h b/display_list/skia/dl_sk_dispatcher.h index ee6101291e76a..a7fc73bbe2a54 100644 --- a/display_list/skia/dl_sk_dispatcher.h +++ b/display_list/skia/dl_sk_dispatcher.h @@ -98,9 +98,6 @@ class DlSkCanvasDispatcher : public virtual DlOpReceiver, void drawTextBlob(const sk_sp blob, SkScalar x, SkScalar y) override; - void drawTextFrame(const std::shared_ptr& text_frame, - SkScalar x, - SkScalar y) override; void drawShadow(const SkPath& path, const DlColor color, const SkScalar elevation, diff --git a/display_list/utils/dl_receiver_utils.h b/display_list/utils/dl_receiver_utils.h index 2a1f9cb7efff4..e2d07310368ae 100644 --- a/display_list/utils/dl_receiver_utils.h +++ b/display_list/utils/dl_receiver_utils.h @@ -129,9 +129,6 @@ class IgnoreDrawDispatchHelper : public virtual DlOpReceiver { void drawTextBlob(const sk_sp blob, SkScalar x, SkScalar y) override {} - void drawTextFrame(const std::shared_ptr& text_frame, - SkScalar x, - SkScalar y) override {} void drawShadow(const SkPath& path, const DlColor color, const SkScalar elevation, diff --git a/flow/BUILD.gn b/flow/BUILD.gn index a75605749c7aa..53de13474e316 100644 --- a/flow/BUILD.gn +++ b/flow/BUILD.gn @@ -99,10 +99,7 @@ source_set("flow") { deps = [ "//third_party/skia" ] if (impeller_supports_rendering) { - deps += [ - "//flutter/impeller", - "//flutter/impeller/typographer/backends/skia:typographer_skia_backend", - ] + deps += [ "//flutter/impeller" ] } } diff --git a/flow/layers/performance_overlay_layer.cc b/flow/layers/performance_overlay_layer.cc index 1c1ebb4566798..911131fd0cfbc 100644 --- a/flow/layers/performance_overlay_layer.cc +++ b/flow/layers/performance_overlay_layer.cc @@ -14,9 +14,6 @@ #include "flow/stopwatch_sk.h" #include "third_party/skia/include/core/SkFont.h" #include "third_party/skia/include/core/SkTextBlob.h" -#ifdef IMPELLER_SUPPORTS_RENDERING -#include "impeller/typographer/backends/skia/text_frame_skia.h" // nogncheck -#endif // IMPELLER_SUPPORTS_RENDERING namespace flutter { namespace { @@ -53,14 +50,7 @@ void VisualizeStopWatch(DlCanvas* canvas, stopwatch, label_prefix, font_path); // Historically SK_ColorGRAY (== 0xFF888888) was used here DlPaint paint(0xFF888888); -#ifdef IMPELLER_SUPPORTS_RENDERING - if (impeller_enabled) { - canvas->DrawTextFrame(impeller::MakeTextFrameFromTextBlobSkia(text), - x + label_x, y + height + label_y, paint); - } -#endif // IMPELLER_SUPPORTS_RENDERING canvas->DrawTextBlob(text, x + label_x, y + height + label_y, paint); - return; } } diff --git a/impeller/aiks/aiks_unittests.cc b/impeller/aiks/aiks_unittests.cc index 0460bab2f42d9..be7b50c8cb347 100644 --- a/impeller/aiks/aiks_unittests.cc +++ b/impeller/aiks/aiks_unittests.cc @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -1334,7 +1335,11 @@ bool RenderTextInCanvasSkia(const std::shared_ptr& context, } // Create the Impeller text frame and draw it at the designated baseline. - auto frame = MakeTextFrameFromTextBlobSkia(blob); + auto maybe_frame = MakeTextFrameFromTextBlobSkia(blob); + if (!maybe_frame.has_value()) { + return false; + } + auto frame = maybe_frame.value(); Paint text_paint; text_paint.color = Color::Yellow().WithAlpha(options.alpha); @@ -1523,7 +1528,7 @@ TEST_P(AiksTest, CanRenderTextOutsideBoundaries) { { auto blob = SkTextBlob::MakeFromString(t.text, sk_font); ASSERT_NE(blob, nullptr); - auto frame = MakeTextFrameFromTextBlobSkia(blob); + auto frame = MakeTextFrameFromTextBlobSkia(blob).value(); canvas.DrawTextFrame(frame, Point(), text_paint); } canvas.Restore(); @@ -3127,7 +3132,12 @@ TEST_P(AiksTest, TextForegroundShaderWithTransform) { auto blob = SkTextBlob::MakeFromString("Hello", sk_font); ASSERT_NE(blob, nullptr); - auto frame = MakeTextFrameFromTextBlobSkia(blob); + auto maybe_frame = MakeTextFrameFromTextBlobSkia(blob); + ASSERT_TRUE(maybe_frame.has_value()); + if (!maybe_frame.has_value()) { + return; + } + auto frame = maybe_frame.value(); canvas.DrawTextFrame(frame, Point(), text_paint); ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); diff --git a/impeller/aiks/canvas.cc b/impeller/aiks/canvas.cc index ae4c9d512037f..9175cddbe353e 100644 --- a/impeller/aiks/canvas.cc +++ b/impeller/aiks/canvas.cc @@ -546,7 +546,7 @@ void Canvas::SaveLayer(const Paint& paint, } } -void Canvas::DrawTextFrame(const std::shared_ptr& text_frame, +void Canvas::DrawTextFrame(const TextFrame& text_frame, Point position, const Paint& paint) { Entity entity; @@ -554,7 +554,7 @@ void Canvas::DrawTextFrame(const std::shared_ptr& text_frame, entity.SetBlendMode(paint.blend_mode); auto text_contents = std::make_shared(); - text_contents->SetTextFrame(text_frame); + text_contents->SetTextFrame(TextFrame(text_frame)); text_contents->SetColor(paint.color); entity.SetTransformation(GetCurrentTransformation() * diff --git a/impeller/aiks/canvas.h b/impeller/aiks/canvas.h index a7a5652229b03..6bba9ff7e0120 100644 --- a/impeller/aiks/canvas.h +++ b/impeller/aiks/canvas.h @@ -140,7 +140,7 @@ class Canvas { void DrawPicture(const Picture& picture); - void DrawTextFrame(const std::shared_ptr& text_frame, + void DrawTextFrame(const TextFrame& text_frame, Point position, const Paint& paint); diff --git a/impeller/display_list/dl_dispatcher.cc b/impeller/display_list/dl_dispatcher.cc index 107389deaf715..f352a18b05b85 100644 --- a/impeller/display_list/dl_dispatcher.cc +++ b/impeller/display_list/dl_dispatcher.cc @@ -34,6 +34,7 @@ #include "impeller/geometry/path_builder.h" #include "impeller/geometry/scalar.h" #include "impeller/geometry/sigma.h" +#include "impeller/typographer/backends/skia/text_frame_skia.h" #if IMPELLER_ENABLE_3D #include "impeller/entity/contents/scene_contents.h" @@ -1070,14 +1071,20 @@ void DlDispatcher::drawDisplayList( void DlDispatcher::drawTextBlob(const sk_sp blob, SkScalar x, SkScalar y) { - // When running with Impeller enabled Skia text blobs are converted to - // Impeller text frames in paragraph_skia.cc - UNIMPLEMENTED; -} + const auto maybe_text_frame = MakeTextFrameFromTextBlobSkia(blob); + if (!maybe_text_frame.has_value()) { + return; + } + const auto text_frame = maybe_text_frame.value(); + if (paint_.style == Paint::Style::kStroke || + paint_.color_source.GetType() != ColorSource::Type::kColor) { + auto bounds = blob->bounds(); + auto path = skia_conversions::PathDataFromTextBlob( + blob, Point(x + bounds.left(), y + bounds.top())); + canvas_.DrawPath(path, paint_); + return; + } -void DlDispatcher::drawTextFrame(const std::shared_ptr& text_frame, - SkScalar x, - SkScalar y) { canvas_.DrawTextFrame(text_frame, // impeller::Point{x, y}, // paint_ // diff --git a/impeller/display_list/dl_dispatcher.h b/impeller/display_list/dl_dispatcher.h index 0dc3b7ce72461..d9a36e2239980 100644 --- a/impeller/display_list/dl_dispatcher.h +++ b/impeller/display_list/dl_dispatcher.h @@ -212,11 +212,6 @@ class DlDispatcher final : public flutter::DlOpReceiver { SkScalar x, SkScalar y) override; - // |flutter::DlOpReceiver| - void drawTextFrame(const std::shared_ptr& text_frame, - SkScalar x, - SkScalar y) override; - // |flutter::DlOpReceiver| void drawShadow(const SkPath& path, const flutter::DlColor color, diff --git a/impeller/entity/contents/text_contents.cc b/impeller/entity/contents/text_contents.cc index c17c47ae20b31..fceab90a6ed26 100644 --- a/impeller/entity/contents/text_contents.cc +++ b/impeller/entity/contents/text_contents.cc @@ -24,8 +24,8 @@ TextContents::TextContents() = default; TextContents::~TextContents() = default; -void TextContents::SetTextFrame(const std::shared_ptr& frame) { - frame_ = frame; +void TextContents::SetTextFrame(TextFrame&& frame) { + frame_ = std::move(frame); } std::shared_ptr TextContents::ResolveAtlas( @@ -49,7 +49,7 @@ Color TextContents::GetColor() const { } bool TextContents::CanInheritOpacity(const Entity& entity) const { - return !frame_->MaybeHasOverlapping(); + return !frame_.MaybeHasOverlapping(); } void TextContents::SetInheritedOpacity(Scalar opacity) { @@ -61,13 +61,13 @@ void TextContents::SetOffset(Vector2 offset) { } std::optional TextContents::GetCoverage(const Entity& entity) const { - return frame_->GetBounds().TransformBounds(entity.GetTransformation()); + return frame_.GetBounds().TransformBounds(entity.GetTransformation()); } void TextContents::PopulateGlyphAtlas( const std::shared_ptr& lazy_glyph_atlas, Scalar scale) { - lazy_glyph_atlas->AddTextFrame(*frame_, scale); + lazy_glyph_atlas->AddTextFrame(frame_, scale); scale_ = scale; } @@ -79,7 +79,7 @@ bool TextContents::Render(const ContentContext& renderer, return true; } - auto type = frame_->GetAtlasType(); + auto type = frame_.GetAtlasType(); auto atlas = ResolveAtlas(*renderer.GetContext(), type, renderer.GetLazyGlyphAtlas()); @@ -152,7 +152,7 @@ bool TextContents::Render(const ContentContext& renderer, auto& host_buffer = pass.GetTransientsBuffer(); size_t vertex_count = 0; - for (const auto& run : frame_->GetRuns()) { + for (const auto& run : frame_.GetRuns()) { vertex_count += run.GetGlyphPositions().size(); } vertex_count *= 6; @@ -163,7 +163,7 @@ bool TextContents::Render(const ContentContext& renderer, VS::PerVertexData vtx; VS::PerVertexData* vtx_contents = reinterpret_cast(contents); - for (const TextRun& run : frame_->GetRuns()) { + for (const TextRun& run : frame_.GetRuns()) { const Font& font = run.GetFont(); Scalar rounded_scale = TextFrame::RoundScaledFontSize( scale_, font.GetMetrics().point_size); diff --git a/impeller/entity/contents/text_contents.h b/impeller/entity/contents/text_contents.h index 07d191ef3caad..6e3b89d558e61 100644 --- a/impeller/entity/contents/text_contents.h +++ b/impeller/entity/contents/text_contents.h @@ -26,7 +26,7 @@ class TextContents final : public Contents { ~TextContents(); - void SetTextFrame(const std::shared_ptr& frame); + void SetTextFrame(TextFrame&& frame); void SetColor(Color color); @@ -56,7 +56,7 @@ class TextContents final : public Contents { RenderPass& pass) const override; private: - std::shared_ptr frame_; + TextFrame frame_; Scalar scale_ = 1.0; Color color_; Scalar inherited_opacity_ = 1.0; diff --git a/impeller/entity/entity_unittests.cc b/impeller/entity/entity_unittests.cc index 3ff5548509b5e..d4f4697d47512 100644 --- a/impeller/entity/entity_unittests.cc +++ b/impeller/entity/entity_unittests.cc @@ -2180,13 +2180,13 @@ TEST_P(EntityTest, InheritOpacityTest) { SkFont font; font.setSize(30); auto blob = SkTextBlob::MakeFromString("A", font); - auto frame = MakeTextFrameFromTextBlobSkia(blob); + auto frame = MakeTextFrameFromTextBlobSkia(blob).value(); auto lazy_glyph_atlas = std::make_shared(TypographerContextSkia::Make()); - lazy_glyph_atlas->AddTextFrame(*frame, 1.0f); + lazy_glyph_atlas->AddTextFrame(frame, 1.0f); auto text_contents = std::make_shared(); - text_contents->SetTextFrame(frame); + text_contents->SetTextFrame(std::move(frame)); text_contents->SetColor(Color::Blue().WithAlpha(0.5)); ASSERT_TRUE(text_contents->CanInheritOpacity(entity)); diff --git a/impeller/typographer/backends/skia/text_frame_skia.cc b/impeller/typographer/backends/skia/text_frame_skia.cc index b5d7ee8c468e5..11c256a8af918 100644 --- a/impeller/typographer/backends/skia/text_frame_skia.cc +++ b/impeller/typographer/backends/skia/text_frame_skia.cc @@ -8,6 +8,7 @@ #include "flutter/fml/logging.h" #include "impeller/typographer/backends/skia/typeface_skia.h" +#include "include/core/SkFontTypes.h" #include "include/core/SkRect.h" #include "third_party/skia/include/core/SkFont.h" #include "third_party/skia/include/core/SkFontMetrics.h" @@ -38,10 +39,16 @@ static Rect ToRect(const SkRect& rect) { static constexpr Scalar kScaleSize = 100000.0f; -std::shared_ptr MakeTextFrameFromTextBlobSkia( +std::optional MakeTextFrameFromTextBlobSkia( const sk_sp& blob) { - bool has_color = false; + // Handling nullptr text blobs feels overly defensive here, as I don't + // actually know if this happens. + if (!blob) { + return {}; + } + std::vector runs; + bool has_color = false; for (SkTextBlobRunIterator run(blob.get()); !run.done(); run.next()) { // TODO(jonahwilliams): ask Skia for a public API to look this up. // https://github.com/flutter/flutter/issues/112005 @@ -88,7 +95,7 @@ std::shared_ptr MakeTextFrameFromTextBlobSkia( continue; } } - return std::make_shared(runs, ToRect(blob->bounds()), has_color); + return TextFrame(runs, ToRect(blob->bounds()), has_color); } } // namespace impeller diff --git a/impeller/typographer/backends/skia/text_frame_skia.h b/impeller/typographer/backends/skia/text_frame_skia.h index e7721a0c6e9c7..53170a248d3a1 100644 --- a/impeller/typographer/backends/skia/text_frame_skia.h +++ b/impeller/typographer/backends/skia/text_frame_skia.h @@ -4,12 +4,13 @@ #pragma once +#include "flutter/fml/macros.h" #include "impeller/typographer/text_frame.h" #include "third_party/skia/include/core/SkTextBlob.h" namespace impeller { -std::shared_ptr MakeTextFrameFromTextBlobSkia( +std::optional MakeTextFrameFromTextBlobSkia( const sk_sp& blob); } // namespace impeller diff --git a/impeller/typographer/backends/stb/text_frame_stb.cc b/impeller/typographer/backends/stb/text_frame_stb.cc index e1d1dd0d1c662..5e6060ba32551 100644 --- a/impeller/typographer/backends/stb/text_frame_stb.cc +++ b/impeller/typographer/backends/stb/text_frame_stb.cc @@ -8,10 +8,9 @@ namespace impeller { -std::shared_ptr MakeTextFrameSTB( - const std::shared_ptr& typeface_stb, - Font::Metrics metrics, - const std::string& text) { +TextFrame MakeTextFrameSTB(const std::shared_ptr& typeface_stb, + Font::Metrics metrics, + const std::string& text) { TextRun run(Font(typeface_stb, metrics)); // Shape the text run using STB. The glyph positions could also be resolved @@ -62,8 +61,7 @@ std::shared_ptr MakeTextFrameSTB( } std::vector runs = {run}; - return std::make_shared( - runs, result.value_or(Rect::MakeLTRB(0, 0, 0, 0)), false); + return TextFrame(runs, result.value_or(Rect::MakeLTRB(0, 0, 0, 0)), false); } } // namespace impeller diff --git a/impeller/typographer/backends/stb/text_frame_stb.h b/impeller/typographer/backends/stb/text_frame_stb.h index 39f8cccc7688a..622cb1f3b72fd 100644 --- a/impeller/typographer/backends/stb/text_frame_stb.h +++ b/impeller/typographer/backends/stb/text_frame_stb.h @@ -10,9 +10,8 @@ namespace impeller { -std::shared_ptr MakeTextFrameSTB( - const std::shared_ptr& typeface_stb, - Font::Metrics metrics, - const std::string& text); +TextFrame MakeTextFrameSTB(const std::shared_ptr& typeface_stb, + Font::Metrics metrics, + const std::string& text); } // namespace impeller diff --git a/impeller/typographer/typographer_context.h b/impeller/typographer/typographer_context.h index 3714dd804070e..1ca4d4a7687c3 100644 --- a/impeller/typographer/typographer_context.h +++ b/impeller/typographer/typographer_context.h @@ -4,6 +4,7 @@ #pragma once +#include #include #include "flutter/fml/macros.h" diff --git a/impeller/typographer/typographer_unittests.cc b/impeller/typographer/typographer_unittests.cc index eb3581d750f0b..a996bdf98d98d 100644 --- a/impeller/typographer/typographer_unittests.cc +++ b/impeller/typographer/typographer_unittests.cc @@ -40,9 +40,9 @@ TEST_P(TypographerTest, CanConvertTextBlob) { auto blob = SkTextBlob::MakeFromString( "the quick brown fox jumped over the lazy dog.", font); ASSERT_TRUE(blob); - auto frame = MakeTextFrameFromTextBlobSkia(blob); - ASSERT_EQ(frame->GetRunCount(), 1u); - for (const auto& run : frame->GetRuns()) { + auto frame = MakeTextFrameFromTextBlobSkia(blob).value(); + ASSERT_EQ(frame.GetRunCount(), 1u); + for (const auto& run : frame.GetRuns()) { ASSERT_TRUE(run.IsValid()); ASSERT_EQ(run.GetGlyphCount(), 45u); } @@ -62,7 +62,7 @@ TEST_P(TypographerTest, CanCreateGlyphAtlas) { ASSERT_TRUE(blob); auto atlas = CreateGlyphAtlas( *GetContext(), context.get(), GlyphAtlas::Type::kAlphaBitmap, 1.0f, - atlas_context, *MakeTextFrameFromTextBlobSkia(blob)); + atlas_context, MakeTextFrameFromTextBlobSkia(blob).value()); ASSERT_NE(atlas, nullptr); ASSERT_NE(atlas->GetTexture(), nullptr); ASSERT_EQ(atlas->GetType(), GlyphAtlas::Type::kAlphaBitmap); @@ -113,20 +113,21 @@ TEST_P(TypographerTest, LazyAtlasTracksColor) { auto blob = SkTextBlob::MakeFromString("hello", sk_font); ASSERT_TRUE(blob); - auto frame = MakeTextFrameFromTextBlobSkia(blob); + auto frame = MakeTextFrameFromTextBlobSkia(blob).value(); - ASSERT_FALSE(frame->GetAtlasType() == GlyphAtlas::Type::kColorBitmap); + ASSERT_FALSE(frame.GetAtlasType() == GlyphAtlas::Type::kColorBitmap); LazyGlyphAtlas lazy_atlas(TypographerContextSkia::Make()); - lazy_atlas.AddTextFrame(*frame, 1.0f); + lazy_atlas.AddTextFrame(frame, 1.0f); frame = MakeTextFrameFromTextBlobSkia( - SkTextBlob::MakeFromString("😀 ", emoji_font)); + SkTextBlob::MakeFromString("😀 ", emoji_font)) + .value(); - ASSERT_TRUE(frame->GetAtlasType() == GlyphAtlas::Type::kColorBitmap); + ASSERT_TRUE(frame.GetAtlasType() == GlyphAtlas::Type::kColorBitmap); - lazy_atlas.AddTextFrame(*frame, 1.0f); + lazy_atlas.AddTextFrame(frame, 1.0f); // Creates different atlases for color and alpha bitmap. auto color_atlas = lazy_atlas.CreateOrGetGlyphAtlas( @@ -147,7 +148,7 @@ TEST_P(TypographerTest, GlyphAtlasWithOddUniqueGlyphSize) { ASSERT_TRUE(blob); auto atlas = CreateGlyphAtlas( *GetContext(), context.get(), GlyphAtlas::Type::kAlphaBitmap, 1.0f, - atlas_context, *MakeTextFrameFromTextBlobSkia(blob)); + atlas_context, MakeTextFrameFromTextBlobSkia(blob).value()); ASSERT_NE(atlas, nullptr); ASSERT_NE(atlas->GetTexture(), nullptr); @@ -164,7 +165,7 @@ TEST_P(TypographerTest, GlyphAtlasIsRecycledIfUnchanged) { ASSERT_TRUE(blob); auto atlas = CreateGlyphAtlas( *GetContext(), context.get(), GlyphAtlas::Type::kAlphaBitmap, 1.0f, - atlas_context, *MakeTextFrameFromTextBlobSkia(blob)); + atlas_context, MakeTextFrameFromTextBlobSkia(blob).value()); ASSERT_NE(atlas, nullptr); ASSERT_NE(atlas->GetTexture(), nullptr); ASSERT_EQ(atlas, atlas_context->GetGlyphAtlas()); @@ -173,7 +174,7 @@ TEST_P(TypographerTest, GlyphAtlasIsRecycledIfUnchanged) { auto next_atlas = CreateGlyphAtlas( *GetContext(), context.get(), GlyphAtlas::Type::kAlphaBitmap, 1.0f, - atlas_context, *MakeTextFrameFromTextBlobSkia(blob)); + atlas_context, MakeTextFrameFromTextBlobSkia(blob).value()); ASSERT_EQ(atlas, next_atlas); ASSERT_EQ(atlas_context->GetGlyphAtlas(), atlas); } @@ -196,7 +197,7 @@ TEST_P(TypographerTest, GlyphAtlasWithLotsOfdUniqueGlyphSize) { FontGlyphMap font_glyph_map; size_t size_count = 8; for (size_t index = 0; index < size_count; index += 1) { - MakeTextFrameFromTextBlobSkia(blob)->CollectUniqueFontGlyphPairs( + MakeTextFrameFromTextBlobSkia(blob).value().CollectUniqueFontGlyphPairs( font_glyph_map, 0.6 * index); }; auto atlas = @@ -231,7 +232,7 @@ TEST_P(TypographerTest, GlyphAtlasTextureIsRecycledIfUnchanged) { ASSERT_TRUE(blob); auto atlas = CreateGlyphAtlas( *GetContext(), context.get(), GlyphAtlas::Type::kAlphaBitmap, 1.0f, - atlas_context, *MakeTextFrameFromTextBlobSkia(blob)); + atlas_context, MakeTextFrameFromTextBlobSkia(blob).value()); auto old_packer = atlas_context->GetRectPacker(); ASSERT_NE(atlas, nullptr); @@ -245,7 +246,7 @@ TEST_P(TypographerTest, GlyphAtlasTextureIsRecycledIfUnchanged) { auto blob2 = SkTextBlob::MakeFromString("spooky 2", sk_font); auto next_atlas = CreateGlyphAtlas( *GetContext(), context.get(), GlyphAtlas::Type::kAlphaBitmap, 1.0f, - atlas_context, *MakeTextFrameFromTextBlobSkia(blob2)); + atlas_context, MakeTextFrameFromTextBlobSkia(blob2).value()); ASSERT_EQ(atlas, next_atlas); auto* second_texture = next_atlas->GetTexture().get(); @@ -264,7 +265,7 @@ TEST_P(TypographerTest, GlyphAtlasTextureIsRecreatedIfTypeChanges) { ASSERT_TRUE(blob); auto atlas = CreateGlyphAtlas( *GetContext(), context.get(), GlyphAtlas::Type::kAlphaBitmap, 1.0f, - atlas_context, *MakeTextFrameFromTextBlobSkia(blob)); + atlas_context, MakeTextFrameFromTextBlobSkia(blob).value()); auto old_packer = atlas_context->GetRectPacker(); ASSERT_NE(atlas, nullptr); @@ -279,7 +280,7 @@ TEST_P(TypographerTest, GlyphAtlasTextureIsRecreatedIfTypeChanges) { auto blob2 = SkTextBlob::MakeFromString("spooky 1", sk_font); auto next_atlas = CreateGlyphAtlas( *GetContext(), context.get(), GlyphAtlas::Type::kColorBitmap, 1.0f, - atlas_context, *MakeTextFrameFromTextBlobSkia(blob2)); + atlas_context, MakeTextFrameFromTextBlobSkia(blob2).value()); ASSERT_NE(atlas, next_atlas); auto* second_texture = next_atlas->GetTexture().get(); @@ -296,13 +297,15 @@ TEST_P(TypographerTest, MaybeHasOverlapping) { SkFont sk_font(typeface, 0.5f); auto frame = - MakeTextFrameFromTextBlobSkia(SkTextBlob::MakeFromString("1", sk_font)); + MakeTextFrameFromTextBlobSkia(SkTextBlob::MakeFromString("1", sk_font)) + .value(); // Single character has no overlapping - ASSERT_FALSE(frame->MaybeHasOverlapping()); + ASSERT_FALSE(frame.MaybeHasOverlapping()); auto frame_2 = MakeTextFrameFromTextBlobSkia( - SkTextBlob::MakeFromString("123456789", sk_font)); - ASSERT_FALSE(frame_2->MaybeHasOverlapping()); + SkTextBlob::MakeFromString("123456789", sk_font)) + .value(); + ASSERT_FALSE(frame_2.MaybeHasOverlapping()); } TEST_P(TypographerTest, RectanglePackerAddsNonoverlapingRectangles) { diff --git a/shell/common/dl_op_spy.cc b/shell/common/dl_op_spy.cc index bcf213bffa8e9..15910fc2e85de 100644 --- a/shell/common/dl_op_spy.cc +++ b/shell/common/dl_op_spy.cc @@ -127,14 +127,6 @@ void DlOpSpy::drawTextBlob(const sk_sp blob, SkScalar y) { did_draw_ |= will_draw_; } - -void DlOpSpy::drawTextFrame( - const std::shared_ptr& text_frame, - SkScalar x, - SkScalar y) { - did_draw_ |= will_draw_; -} - void DlOpSpy::drawShadow(const SkPath& path, const DlColor color, const SkScalar elevation, diff --git a/shell/common/dl_op_spy.h b/shell/common/dl_op_spy.h index 1bcf08c7a84c5..1cb29ff7219aa 100644 --- a/shell/common/dl_op_spy.h +++ b/shell/common/dl_op_spy.h @@ -90,9 +90,6 @@ class DlOpSpy final : public virtual DlOpReceiver, void drawTextBlob(const sk_sp blob, SkScalar x, SkScalar y) override; - void drawTextFrame(const std::shared_ptr& text_frame, - SkScalar x, - SkScalar y) override; void drawShadow(const SkPath& path, const DlColor color, const SkScalar elevation, diff --git a/testing/display_list_testing.cc b/testing/display_list_testing.cc index 3ddeeac6cd92c..f54a90c192d19 100644 --- a/testing/display_list_testing.cc +++ b/testing/display_list_testing.cc @@ -859,15 +859,6 @@ void DisplayListStreamDispatcher::drawTextBlob(const sk_sp blob, << blob.get() << ", " << x << ", " << y << ");" << std::endl; } - -void DisplayListStreamDispatcher::drawTextFrame(const std::shared_ptr& text_frame, - SkScalar x, - SkScalar y) { - startl() << "drawTextFrame(" - << text_frame.get() << ", " - << x << ", " << y << ");" << std::endl; -} - void DisplayListStreamDispatcher::drawShadow(const SkPath& path, const DlColor color, const SkScalar elevation, diff --git a/testing/display_list_testing.h b/testing/display_list_testing.h index a468deda878e2..4f3830a204b44 100644 --- a/testing/display_list_testing.h +++ b/testing/display_list_testing.h @@ -144,9 +144,6 @@ class DisplayListStreamDispatcher final : public DlOpReceiver { void drawTextBlob(const sk_sp blob, SkScalar x, SkScalar y) override; - void drawTextFrame(const std::shared_ptr& text_frame, - SkScalar x, - SkScalar y) override; void drawShadow(const SkPath& path, const DlColor color, const SkScalar elevation, diff --git a/testing/mock_canvas.cc b/testing/mock_canvas.cc index 8d5a51fd1b6c6..75b03107e2a75 100644 --- a/testing/mock_canvas.cc +++ b/testing/mock_canvas.cc @@ -160,14 +160,6 @@ void MockCanvas::DrawTextBlob(const sk_sp& text, paint, SkPoint::Make(x, y)}}); } -void MockCanvas::DrawTextFrame( - const std::shared_ptr& text_frame, - SkScalar x, - SkScalar y, - const DlPaint& paint) { - FML_DCHECK(false); -} - void MockCanvas::DrawRect(const SkRect& rect, const DlPaint& paint) { draw_calls_.emplace_back(DrawCall{current_layer_, DrawRectData{rect, paint}}); } diff --git a/testing/mock_canvas.h b/testing/mock_canvas.h index 591f1c908e9fb..71260d5b8755f 100644 --- a/testing/mock_canvas.h +++ b/testing/mock_canvas.h @@ -273,10 +273,6 @@ class MockCanvas final : public DlCanvas { SkScalar x, SkScalar y, const DlPaint& paint) override; - void DrawTextFrame(const std::shared_ptr& text_frame, - SkScalar x, - SkScalar y, - const DlPaint& paint) override; void DrawShadow(const SkPath& path, const DlColor color, const SkScalar elevation, diff --git a/third_party/txt/BUILD.gn b/third_party/txt/BUILD.gn index a61438b72c5eb..b799bc5dd46d5 100644 --- a/third_party/txt/BUILD.gn +++ b/third_party/txt/BUILD.gn @@ -81,7 +81,6 @@ source_set("txt") { public_deps = [ "//flutter/display_list", "//flutter/fml", - "//flutter/impeller/typographer/backends/skia:typographer_skia_backend", "//third_party/harfbuzz", "//third_party/icu", "//third_party/skia", diff --git a/third_party/txt/src/skia/paragraph_skia.cc b/third_party/txt/src/skia/paragraph_skia.cc index a688720cfced9..76d737224aa79 100644 --- a/third_party/txt/src/skia/paragraph_skia.cc +++ b/third_party/txt/src/skia/paragraph_skia.cc @@ -18,10 +18,7 @@ #include #include -#include "display_list/dl_paint.h" #include "fml/logging.h" -#include "impeller/typographer/backends/skia/text_frame_skia.h" -#include "include/core/SkMatrix.h" namespace txt { @@ -68,10 +65,10 @@ class DisplayListParagraphPainter : public skt::ParagraphPainter { /// decision (i.e. with `#ifdef`) instead of a runtime option. DisplayListParagraphPainter(DisplayListBuilder* builder, const std::vector& dl_paints, - bool impeller_enabled) + bool draw_path_effect) : builder_(builder), dl_paints_(dl_paints), - impeller_enabled_(impeller_enabled) {} + draw_path_effect_(draw_path_effect) {} void drawTextBlob(const sk_sp& blob, SkScalar x, @@ -82,22 +79,6 @@ class DisplayListParagraphPainter : public skt::ParagraphPainter { } size_t paint_id = std::get(paint); FML_DCHECK(paint_id < dl_paints_.size()); - -#ifdef IMPELLER_SUPPORTS_RENDERING - if (impeller_enabled_) { - if (ShouldRenderAsPath(dl_paints_[paint_id])) { - auto path = skia::textlayout::Paragraph::GetPath(blob.get()); - auto transformed = path.makeTransform(SkMatrix::Translate( - x + blob->bounds().left(), y + blob->bounds().top())); - builder_->DrawPath(transformed, dl_paints_[paint_id]); - return; - } - - builder_->DrawTextFrame(impeller::MakeTextFrameFromTextBlobSkia(blob), x, - y, dl_paints_[paint_id]); - return; - } -#endif // IMPELLER_SUPPORTS_RENDERING builder_->DrawTextBlob(blob, x, y, dl_paints_[paint_id]); } @@ -115,11 +96,6 @@ class DisplayListParagraphPainter : public skt::ParagraphPainter { DlBlurMaskFilter filter(DlBlurStyle::kNormal, blur_sigma, false); paint.setMaskFilter(&filter); } - if (impeller_enabled_) { - builder_->DrawTextFrame(impeller::MakeTextFrameFromTextBlobSkia(blob), x, - y, paint); - return; - } builder_->DrawTextBlob(blob, x, y, paint); } @@ -153,13 +129,11 @@ class DisplayListParagraphPainter : public skt::ParagraphPainter { // the line directly using the `drawLine` API instead of using a path effect // (because Impeller does not support path effects). auto dash_path_effect = decor_style.getDashPathEffect(); -#ifdef IMPELLER_SUPPORTS_RENDERING - if (impeller_enabled_ && dash_path_effect) { + if (draw_path_effect_ && dash_path_effect) { auto path = dashedLine(x0, x1, y0, *dash_path_effect); builder_->DrawPath(path, toDlPaint(decor_style)); return; } -#endif // IMPELLER_SUPPORTS_RENDERING auto paint = toDlPaint(decor_style); if (dash_path_effect) { @@ -206,16 +180,6 @@ class DisplayListParagraphPainter : public skt::ParagraphPainter { return path; } - bool ShouldRenderAsPath(const DlPaint& paint) const { - FML_DCHECK(impeller_enabled_); - // Text with non-trivial color sources or stroke paint mode should be - // rendered as a path when running on Impeller for correctness. These - // filters rely on having the glyph coverage, whereas regular text is - // drawn as rectangular texture samples. - return ((paint.getColorSource() && !paint.getColorSource()->asColor()) || - paint.getDrawStyle() == DlDrawStyle::kStroke); - } - DlPaint toDlPaint(const DecorationStyle& decor_style, DlDrawStyle draw_style = DlDrawStyle::kStroke) { DlPaint paint; @@ -228,7 +192,7 @@ class DisplayListParagraphPainter : public skt::ParagraphPainter { void setPathEffect(DlPaint& paint, const DashPathEffect& dash_path_effect) { // Impeller does not support path effects, so we should never be setting. - FML_DCHECK(!impeller_enabled_); + FML_DCHECK(!draw_path_effect_); std::array intervals{dash_path_effect.fOnLength, dash_path_effect.fOffLength}; @@ -238,7 +202,7 @@ class DisplayListParagraphPainter : public skt::ParagraphPainter { DisplayListBuilder* builder_; const std::vector& dl_paints_; - const bool impeller_enabled_; + bool draw_path_effect_; }; } // anonymous namespace diff --git a/third_party/txt/tests/paragraph_unittests.cc b/third_party/txt/tests/paragraph_unittests.cc index 7eaf771c6cde8..ec06ce702512e 100644 --- a/third_party/txt/tests/paragraph_unittests.cc +++ b/third_party/txt/tests/paragraph_unittests.cc @@ -3,13 +3,8 @@ // found in the LICENSE file. #include -#include "display_list/dl_color.h" -#include "display_list/dl_paint.h" -#include "display_list/dl_tile_mode.h" -#include "display_list/effects/dl_color_source.h" #include "display_list/utils/dl_receiver_utils.h" #include "gtest/gtest.h" -#include "include/core/SkScalar.h" #include "runtime/test_font_data.h" #include "skia/paragraph_builder_skia.h" #include "testing/canvas_test.h" @@ -28,8 +23,6 @@ class DlOpRecorder final : public virtual DlOpReceiver, int lineCount() const { return lines_.size(); } int rectCount() const { return rects_.size(); } int pathCount() const { return paths_.size(); } - int textFrameCount() const { return text_frames_.size(); } - int blobCount() const { return blobs_.size(); } bool hasPathEffect() const { return path_effect_ != nullptr; } private: @@ -37,18 +30,6 @@ class DlOpRecorder final : public virtual DlOpReceiver, lines_.emplace_back(p0, p1); } - void drawTextFrame(const std::shared_ptr& text_frame, - SkScalar x, - SkScalar y) override { - text_frames_.push_back(text_frame); - } - - void drawTextBlob(const sk_sp blob, - SkScalar x, - SkScalar y) override { - blobs_.push_back(blob); - } - void drawRect(const SkRect& rect) override { rects_.push_back(rect); } void drawPath(const SkPath& path) override { paths_.push_back(path); } @@ -57,8 +38,6 @@ class DlOpRecorder final : public virtual DlOpReceiver, path_effect_ = effect; } - std::vector> text_frames_; - std::vector> blobs_; std::vector> lines_; std::vector rects_; std::vector paths_; @@ -73,30 +52,10 @@ class PainterTestBase : public CanvasTestBase { void PretendImpellerIsEnabled(bool impeller) { impeller_ = impeller; } protected: - txt::TextStyle makeDecoratedStyle(txt::TextDecorationStyle style) { - auto t_style = txt::TextStyle(); - t_style.color = SK_ColorBLACK; // default - t_style.font_weight = txt::FontWeight::w400; // normal - t_style.font_size = 14; // default - t_style.decoration = txt::TextDecoration::kUnderline; - t_style.decoration_style = style; - t_style.decoration_color = SK_ColorBLACK; - t_style.font_families.push_back("ahem"); - return t_style; - } - - txt::TextStyle makeStyle() { - auto t_style = txt::TextStyle(); - t_style.color = SK_ColorBLACK; // default - t_style.font_weight = txt::FontWeight::w400; // normal - t_style.font_size = 14; // default - t_style.font_families.push_back("ahem"); - return t_style; - } - - sk_sp draw(txt::TextStyle style) const { + sk_sp draw(txt::TextDecorationStyle style) const { + auto t_style = makeDecoratedStyle(style); auto pb_skia = makeParagraphBuilder(); - pb_skia.PushStyle(style); + pb_skia.PushStyle(t_style); pb_skia.AddText(u"Hello World!"); pb_skia.Pop(); @@ -126,6 +85,18 @@ class PainterTestBase : public CanvasTestBase { return txt::ParagraphBuilderSkia(p_style, f_collection, impeller_); } + txt::TextStyle makeDecoratedStyle(txt::TextDecorationStyle style) const { + auto t_style = txt::TextStyle(); + t_style.color = SK_ColorBLACK; // default + t_style.font_weight = txt::FontWeight::w400; // normal + t_style.font_size = 14; // default + t_style.decoration = txt::TextDecoration::kUnderline; + t_style.decoration_style = style; + t_style.decoration_color = SK_ColorBLACK; + t_style.font_families.push_back("ahem"); + return t_style; + } + bool impeller_ = false; }; @@ -135,8 +106,7 @@ TEST_F(PainterTest, DrawsSolidLineSkia) { PretendImpellerIsEnabled(false); auto recorder = DlOpRecorder(); - draw(makeDecoratedStyle(txt::TextDecorationStyle::kSolid)) - ->Dispatch(recorder); + draw(txt::TextDecorationStyle::kSolid)->Dispatch(recorder); // Skia may draw a solid underline as a filled rectangle: // https://skia.googlesource.com/skia/+/refs/heads/main/modules/skparagraph/src/Decorations.cpp#91 @@ -144,25 +114,11 @@ TEST_F(PainterTest, DrawsSolidLineSkia) { EXPECT_FALSE(recorder.hasPathEffect()); } -TEST_F(PainterTest, DrawDashedLineSkia) { - PretendImpellerIsEnabled(false); - - auto recorder = DlOpRecorder(); - draw(makeDecoratedStyle(txt::TextDecorationStyle::kDashed)) - ->Dispatch(recorder); - - // Skia draws a dashed underline as a filled rectangle with a path effect. - EXPECT_EQ(recorder.lineCount(), 1); - EXPECT_TRUE(recorder.hasPathEffect()); -} - -#ifdef IMPELLER_SUPPORTS_RENDERING TEST_F(PainterTest, DrawsSolidLineImpeller) { PretendImpellerIsEnabled(true); auto recorder = DlOpRecorder(); - draw(makeDecoratedStyle(txt::TextDecorationStyle::kSolid)) - ->Dispatch(recorder); + draw(txt::TextDecorationStyle::kSolid)->Dispatch(recorder); // Skia may draw a solid underline as a filled rectangle: // https://skia.googlesource.com/skia/+/refs/heads/main/modules/skparagraph/src/Decorations.cpp#91 @@ -170,76 +126,27 @@ TEST_F(PainterTest, DrawsSolidLineImpeller) { EXPECT_FALSE(recorder.hasPathEffect()); } -TEST_F(PainterTest, DrawDashedLineImpeller) { - PretendImpellerIsEnabled(true); - - auto recorder = DlOpRecorder(); - draw(makeDecoratedStyle(txt::TextDecorationStyle::kDashed)) - ->Dispatch(recorder); - - // Impeller draws a dashed underline as a path. - EXPECT_EQ(recorder.pathCount(), 1); - EXPECT_FALSE(recorder.hasPathEffect()); -} - -TEST_F(PainterTest, DrawTextFrameImpeller) { - PretendImpellerIsEnabled(true); - - auto recorder = DlOpRecorder(); - draw(makeStyle())->Dispatch(recorder); - - EXPECT_EQ(recorder.textFrameCount(), 1); - EXPECT_EQ(recorder.blobCount(), 0); -} - -TEST_F(PainterTest, DrawStrokedTextImpeller) { - PretendImpellerIsEnabled(true); - - auto style = makeStyle(); - // What is your shtyle? - DlPaint foreground; - foreground.setDrawStyle(DlDrawStyle::kStroke); - style.foreground = foreground; +TEST_F(PainterTest, DrawDashedLineSkia) { + PretendImpellerIsEnabled(false); auto recorder = DlOpRecorder(); - draw(style)->Dispatch(recorder); + draw(txt::TextDecorationStyle::kDashed)->Dispatch(recorder); - EXPECT_EQ(recorder.textFrameCount(), 0); - EXPECT_EQ(recorder.blobCount(), 0); - EXPECT_EQ(recorder.pathCount(), 1); + // Skia draws a dashed underline as a filled rectangle with a path effect. + EXPECT_EQ(recorder.lineCount(), 1); + EXPECT_TRUE(recorder.hasPathEffect()); } -TEST_F(PainterTest, DrawTextWithGradientImpeller) { +TEST_F(PainterTest, DrawDashedLineImpeller) { PretendImpellerIsEnabled(true); - auto style = makeStyle(); - // how do you like my shtyle? - DlPaint foreground; - std::vector colors = {DlColor::kRed(), DlColor::kCyan()}; - std::vector stops = {0.0, 1.0}; - foreground.setColorSource(DlColorSource::MakeLinear( - SkPoint::Make(0, 0), SkPoint::Make(100, 100), 2, colors.data(), - stops.data(), DlTileMode::kClamp)); - style.foreground = foreground; - auto recorder = DlOpRecorder(); - draw(style)->Dispatch(recorder); + draw(txt::TextDecorationStyle::kDashed)->Dispatch(recorder); - EXPECT_EQ(recorder.textFrameCount(), 0); - EXPECT_EQ(recorder.blobCount(), 0); + // Impeller draws a dashed underline as a path. EXPECT_EQ(recorder.pathCount(), 1); + EXPECT_FALSE(recorder.hasPathEffect()); } -TEST_F(PainterTest, DrawTextBlobNoImpeller) { - PretendImpellerIsEnabled(false); - - auto recorder = DlOpRecorder(); - draw(makeStyle())->Dispatch(recorder); - - EXPECT_EQ(recorder.textFrameCount(), 0); - EXPECT_EQ(recorder.blobCount(), 1); -} -#endif // IMPELLER_SUPPORTS_RENDERING - } // namespace testing } // namespace flutter From a38f5edd6d99e360ec02e4724f1e092a7fa75472 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 15 Sep 2023 21:27:36 -0400 Subject: [PATCH 084/859] Roll Dart SDK from e9452310189b to 029d6d73c860 (1 revision) (#45912) https://dart.googlesource.com/sdk.git/+log/e9452310189b..029d6d73c860 2023-09-16 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-170.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC bdero@google.com,dart-vm-team@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DEPS b/DEPS index 51061a0602213..12023c505360c 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': 'e9452310189ba85997d8e806a987880fbcdcc17b', + 'dart_revision': '029d6d73c8607db74e24105793b9dc0ba4838443', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py @@ -67,7 +67,7 @@ vars = { 'dart_browser_launcher_rev': '1f69393d63a2f8d36d00b86cdd20df70c347af82', 'dart_clock_rev': '1e75f08d3428bcd6f4b7cf70e788f24fc9b661e1', 'dart_collection_rev': '91afde43f488eef618454b896301c6ff59af72e0', - 'dart_devtools_rev': 'adfb08c95c626248b28cc60df3b085c12ad8758e', + 'dart_devtools_rev': '532dc39c7a2820a6dc759590e03a9c18fec915f8', 'dart_libprotobuf_rev': '24487dd1045c7f3d64a21f38a3f0c06cc4cf2edb', 'dart_perfetto_rev': 'b8da07095979310818f0efde2ef3c69ea70d62c5', 'dart_protobuf_gn_rev': 'ca669f79945418f6229e4fef89b666b2a88cbb10', @@ -77,7 +77,7 @@ vars = { 'dart_tools_rev': '1512f3d1efde11ace801618822f63934961cc80d', 'dart_watcher_rev': '1aed03e2a8005f45083fdb38cbd4b684cd23082f', 'dart_webdev_rev': '501ccc287783db685240d0f47c1cc9df68a43ae4', - 'dart_webkit_inspection_protocol_rev': '39a3c297ff573635e7936b015ce4f3466e4739d6', + 'dart_webkit_inspection_protocol_rev': '82f0c1c46dfdba5edf7c5fa84456233121dd69e1', 'dart_yaml_edit_rev': '4a9734dda12f63ef9eee4121f87ff4401e25a607', 'dart_zlib_rev': '14dd4c4455602c9b71a1a89b5cafd1f4030d2e3f', @@ -336,7 +336,7 @@ deps = { Var('chromium_git') + '/external/github.com/WebAssembly/binaryen.git@cdb7aeab40b4c522de20b242019f7e88641445d5', 'src/third_party/dart/third_party/devtools': - {'dep_type': 'cipd', 'packages': [{'package': 'dart/third_party/flutter/devtools', 'version': 'git_revision:adfb08c95c626248b28cc60df3b085c12ad8758e'}]}, + {'dep_type': 'cipd', 'packages': [{'package': 'dart/third_party/flutter/devtools', 'version': 'git_revision:532dc39c7a2820a6dc759590e03a9c18fec915f8'}]}, 'src/third_party/dart/third_party/pkg/args': Var('dart_git') + '/args.git@5a4e16f1e4c08b01498a9dce8aeda1a60161cd52', From 96618972f737cdf88fbd374d6c649261dc82c6b6 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 15 Sep 2023 22:11:23 -0400 Subject: [PATCH 085/859] Roll Skia from c19cc483c619 to 4851cd29e1dd (1 revision) (#45913) https://skia.googlesource.com/skia.git/+log/c19cc483c619..4851cd29e1dd 2023-09-16 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 1ab98511aaae to 5060b88f0c23 (5 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 12023c505360c..45d76b5dae5d1 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'c19cc483c61983fd5034833bba470998ba93414e', + 'skia_revision': '4851cd29e1dd82bf08ec4354458d5d3b174a3762', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From fd787e1d8dde82d3772c99552300bdd7380b1e32 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 15 Sep 2023 23:02:07 -0400 Subject: [PATCH 086/859] Roll Skia from 4851cd29e1dd to 696ac041ea82 (1 revision) (#45915) https://skia.googlesource.com/skia.git/+log/4851cd29e1dd..696ac041ea82 2023-09-16 michaelludwig@google.com [graphite] Add TRACE_EVENTS throughout If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 45d76b5dae5d1..317cb19e972ac 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '4851cd29e1dd82bf08ec4354458d5d3b174a3762', + 'skia_revision': '696ac041ea822f54085a16718313717fc26e9e8a', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index e88be9f68bd9d..64e9b5ef81c7c 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 8bebf3a869344ac4385c8c2013c16cbd +Signature: 1d7a2fc66b5d6e465e8cb12c6d3b675c ==================================================================================================== LIBRARY: etc1 From cdaedcc47d7649d70f70b216bc42cd31d970bb96 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 15 Sep 2023 23:46:49 -0400 Subject: [PATCH 087/859] Roll Skia from 696ac041ea82 to a1f8fb54299a (1 revision) (#45917) https://skia.googlesource.com/skia.git/+log/696ac041ea82..a1f8fb54299a 2023-09-16 johnstiles@google.com Fix Vulkan depth format flags for VK_FORMAT_D32_SFLOAT_S8_UINT. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 317cb19e972ac..05d18b4b33c21 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '696ac041ea822f54085a16718313717fc26e9e8a', + 'skia_revision': 'a1f8fb54299a69bda9e4a7d55fa2ee1cb3f2574c', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 64e9b5ef81c7c..5f924c4f4a8f5 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 1d7a2fc66b5d6e465e8cb12c6d3b675c +Signature: f00f2bf4e45599b3d8be5c2680ce8d81 ==================================================================================================== LIBRARY: etc1 From cd1063c817f0fa3998e46a94ea00ab532282a7a4 Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Fri, 15 Sep 2023 20:55:06 -0700 Subject: [PATCH 088/859] Add a single MacOS+Vulkan+SwiftShader CI test (#45918) Closes https://github.com/flutter/flutter/issues/133708. Will track why it's (a) blank and (b) times out in async presentation in https://github.com/flutter/flutter/issues/134852. --- .../backend/vulkan/playground_impl_vk.cc | 9 ++++++++ testing/run_tests.py | 23 +++++++++++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/impeller/playground/backend/vulkan/playground_impl_vk.cc b/impeller/playground/backend/vulkan/playground_impl_vk.cc index 26ba03bbd2a32..82d8d0e25ffbc 100644 --- a/impeller/playground/backend/vulkan/playground_impl_vk.cc +++ b/impeller/playground/backend/vulkan/playground_impl_vk.cc @@ -93,6 +93,15 @@ PlaygroundImplVK::PlaygroundImplVK(PlaygroundSwitches switches) return; } + // Without this, the playground will timeout waiting for the presentation. + // It's better to have some Vulkan validation tests running on CI to catch + // regressions, but for now this is a workaround. + // + // TODO(matanlurey): https://github.com/flutter/flutter/issues/134852. + // + // (Note, if you're using MoltenVK, or Linux, you can comment out this line). + context_vk->SetSyncPresentation(true); + VkSurfaceKHR vk_surface; auto res = vk::Result{::glfwCreateWindowSurface( context_vk->GetInstance(), // instance diff --git a/testing/run_tests.py b/testing/run_tests.py index 4f75b6e549227..6a807c65021a6 100755 --- a/testing/run_tests.py +++ b/testing/run_tests.py @@ -516,14 +516,33 @@ def make_test(name, flags=None, extra_env=None): shuffle_flags + ['--enable_vulkan_validation'], coverage=coverage, extra_env=extra_env, - # TODO(117122): Remove this allowlist. - # https://github.com/flutter/flutter/issues/114872 + # TODO(https://github.com/flutter/flutter/issues/123733): Remove this allowlist. + # See also https://github.com/flutter/flutter/issues/114872. allowed_failure_output=[ '[MTLCompiler createVertexStageAndLinkPipelineWithFragment:', '[MTLCompiler pipelineStateWithVariant:', ] ) + # Run one interactive Vulkan test with validation enabled. + # + # TODO(matanlurey): https://github.com/flutter/flutter/issues/134852; enable + # more of the suite, and ideally we'd like to use Skia gold and take screen + # shots as well. + run_engine_executable( + build_dir, + 'impeller_unittests', + executable_filter, + shuffle_flags + [ + '--enable_vulkan_validation', + '--enable_playground', + '--playground_timeout_ms=4000', + '--gtest_filter="*ColorWheel/Vulkan"', + ], + coverage=coverage, + extra_env=extra_env, + ) + def run_engine_benchmarks(build_dir, executable_filter): logger.info('Running Engine Benchmarks.') From 4a32cdbb485e3f269890b0e65fea0cc2a6b0c750 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 16 Sep 2023 00:12:10 -0400 Subject: [PATCH 089/859] Roll Fuchsia Linux SDK from wWzXsy6kx1sp8Km34... to ZhY53WD7bFJSA3xoO... (#45919) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC bdero@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 05d18b4b33c21..fa3ce6f865e3a 100644 --- a/DEPS +++ b/DEPS @@ -924,7 +924,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'wWzXsy6kx1sp8Km34yMP4z_bIX4Hp2IigySu6bjGR-oC' + 'version': 'ZhY53WD7bFJSA3xoOchmSzb5zambmf3zOGFuK0GVv_YC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index 8e1daab9747c8..d9191dee15d16 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: aa4d18323ac385df749df52431de2e1d +Signature: c3fd941dfa4989c98789c7cebb5617fc ==================================================================================================== LIBRARY: fuchsia_sdk From 948637a0f7f06cc9ea15a821ee0779dbcda2fb58 Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Fri, 15 Sep 2023 21:20:21 -0700 Subject: [PATCH 090/859] [Impeller] `vk::CommandPool` resets via `ResourceManager` (#45654) Fixes https://github.com/flutter/flutter/issues/133198. Major changes: - `CommandPoolVK` is now created indirectly through `CommandPoolRecyclerVK`. - Via destructor, `CommandPoolVK` resets on a background thread via `ResourceManager`. - Removed all of the code trying to reuse/reset individual command buffers (no longer needed). - After every frame, the current/active command pool is recycled. --- _Tests secured._ --- ci/licenses_golden/excluded_files | 1 + impeller/renderer/backend/vulkan/BUILD.gn | 1 + .../vulkan/blit_command_vk_unittests.cc | 4 +- .../backend/vulkan/command_encoder_vk.cc | 11 +- .../vulkan/command_encoder_vk_unittests.cc | 8 +- .../backend/vulkan/command_pool_vk.cc | 272 ++++++++++-------- .../renderer/backend/vulkan/command_pool_vk.h | 163 ++++++----- .../vulkan/command_pool_vk_unittests.cc | 113 ++++++++ .../renderer/backend/vulkan/context_vk.cc | 29 +- impeller/renderer/backend/vulkan/context_vk.h | 5 + .../backend/vulkan/context_vk_unittests.cc | 3 +- .../backend/vulkan/resource_manager_vk.cc | 5 + .../vulkan/resource_manager_vk_unittests.cc | 30 +- .../backend/vulkan/surface_context_vk.cc | 2 + .../backend/vulkan/test/mock_vulkan.cc | 43 ++- .../vulkan/test/mock_vulkan_unittests.cc | 5 +- 16 files changed, 484 insertions(+), 211 deletions(-) create mode 100644 impeller/renderer/backend/vulkan/command_pool_vk_unittests.cc diff --git a/ci/licenses_golden/excluded_files b/ci/licenses_golden/excluded_files index 8aa84c50351f1..41298f9154317 100644 --- a/ci/licenses_golden/excluded_files +++ b/ci/licenses_golden/excluded_files @@ -153,6 +153,7 @@ ../../../flutter/impeller/playground ../../../flutter/impeller/renderer/backend/vulkan/blit_command_vk_unittests.cc ../../../flutter/impeller/renderer/backend/vulkan/command_encoder_vk_unittests.cc +../../../flutter/impeller/renderer/backend/vulkan/command_pool_vk_unittests.cc ../../../flutter/impeller/renderer/backend/vulkan/context_vk_unittests.cc ../../../flutter/impeller/renderer/backend/vulkan/fence_waiter_vk_unittests.cc ../../../flutter/impeller/renderer/backend/vulkan/pass_bindings_cache_unittests.cc diff --git a/impeller/renderer/backend/vulkan/BUILD.gn b/impeller/renderer/backend/vulkan/BUILD.gn index 90781bdb0ad85..6b49311ed35a2 100644 --- a/impeller/renderer/backend/vulkan/BUILD.gn +++ b/impeller/renderer/backend/vulkan/BUILD.gn @@ -10,6 +10,7 @@ impeller_component("vulkan_unittests") { sources = [ "blit_command_vk_unittests.cc", "command_encoder_vk_unittests.cc", + "command_pool_vk_unittests.cc", "context_vk_unittests.cc", "fence_waiter_vk_unittests.cc", "pass_bindings_cache_unittests.cc", diff --git a/impeller/renderer/backend/vulkan/blit_command_vk_unittests.cc b/impeller/renderer/backend/vulkan/blit_command_vk_unittests.cc index e1172651353b7..9b911c66cef17 100644 --- a/impeller/renderer/backend/vulkan/blit_command_vk_unittests.cc +++ b/impeller/renderer/backend/vulkan/blit_command_vk_unittests.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "flutter/testing/testing.h" +#include "flutter/testing/testing.h" // IWYU pragma: keep #include "impeller/renderer/backend/vulkan/blit_command_vk.h" #include "impeller/renderer/backend/vulkan/command_encoder_vk.h" #include "impeller/renderer/backend/vulkan/test/mock_vulkan.h" @@ -12,7 +12,7 @@ namespace testing { TEST(BlitCommandVkTest, BlitCopyTextureToTextureCommandVK) { auto context = MockVulkanContextBuilder().Build(); - auto pool = CommandPoolVK::GetThreadLocal(context.get()); + auto pool = context->GetCommandPoolRecycler()->Get(); auto encoder = std::make_unique(context)->Create(); BlitCopyTextureToTextureCommandVK cmd; cmd.source = context->GetResourceAllocator()->CreateTexture({ diff --git a/impeller/renderer/backend/vulkan/command_encoder_vk.cc b/impeller/renderer/backend/vulkan/command_encoder_vk.cc index 9b187896a4f6d..8f973bd0fa4d1 100644 --- a/impeller/renderer/backend/vulkan/command_encoder_vk.cc +++ b/impeller/renderer/backend/vulkan/command_encoder_vk.cc @@ -5,7 +5,6 @@ #include "impeller/renderer/backend/vulkan/command_encoder_vk.h" #include "flutter/fml/closure.h" -#include "flutter/fml/trace_event.h" #include "impeller/renderer/backend/vulkan/context_vk.h" #include "impeller/renderer/backend/vulkan/fence_waiter_vk.h" #include "impeller/renderer/backend/vulkan/texture_vk.h" @@ -21,7 +20,7 @@ class TrackedObjectsVK { if (!pool) { return; } - auto buffer = pool->CreateGraphicsCommandBuffer(); + auto buffer = pool->CreateCommandBuffer(); if (!buffer) { return; } @@ -34,7 +33,7 @@ class TrackedObjectsVK { if (!buffer_) { return; } - pool_->CollectGraphicsCommandBuffer(std::move(buffer_)); + pool_->CollectCommandBuffer(std::move(buffer_)); } bool IsValid() const { return is_valid_; } @@ -105,7 +104,11 @@ std::shared_ptr CommandEncoderFactoryVK::Create() { return nullptr; } auto& context_vk = ContextVK::Cast(*context); - auto tls_pool = CommandPoolVK::GetThreadLocal(&context_vk); + auto recycler = context_vk.GetCommandPoolRecycler(); + if (!recycler) { + return nullptr; + } + auto tls_pool = recycler->Get(); if (!tls_pool) { return nullptr; } diff --git a/impeller/renderer/backend/vulkan/command_encoder_vk_unittests.cc b/impeller/renderer/backend/vulkan/command_encoder_vk_unittests.cc index 2314796f54415..3f17a6e99c1ac 100644 --- a/impeller/renderer/backend/vulkan/command_encoder_vk_unittests.cc +++ b/impeller/renderer/backend/vulkan/command_encoder_vk_unittests.cc @@ -4,10 +4,9 @@ #include -#include "flutter/fml/synchronization/count_down_latch.h" -#include "flutter/testing/testing.h" +#include "flutter/testing/testing.h" // IWYU pragma: keep +#include "fml/synchronization/waitable_event.h" #include "impeller/renderer/backend/vulkan/command_encoder_vk.h" -#include "impeller/renderer/backend/vulkan/fence_waiter_vk.h" #include "impeller/renderer/backend/vulkan/test/mock_vulkan.h" namespace impeller { @@ -26,6 +25,7 @@ TEST(CommandEncoderVKTest, DeleteEncoderAfterThreadDies) { encoder = factory.Create(); }); thread.join(); + context->Shutdown(); } auto destroy_pool = std::find(called_functions->begin(), called_functions->end(), @@ -60,7 +60,9 @@ TEST(CommandEncoderVKTest, CleanupAfterSubmit) { wait_for_thread_join.Signal(); wait_for_submit.Wait(); called_functions = GetMockVulkanFunctions(context->GetDevice()); + context->Shutdown(); } + auto destroy_pool = std::find(called_functions->begin(), called_functions->end(), "vkDestroyCommandPool"); diff --git a/impeller/renderer/backend/vulkan/command_pool_vk.cc b/impeller/renderer/backend/vulkan/command_pool_vk.cc index ad657e3dac60d..6b72f1a92361e 100644 --- a/impeller/renderer/backend/vulkan/command_pool_vk.cc +++ b/impeller/renderer/backend/vulkan/command_pool_vk.cc @@ -4,165 +4,201 @@ #include "impeller/renderer/backend/vulkan/command_pool_vk.h" -#include -#include -#include +#include +#include +#include -#include "flutter/fml/thread_local.h" -#include "impeller/base/thread.h" -#include "impeller/renderer/backend/vulkan/context_vk.h" +#include "fml/macros.h" +#include "fml/thread_local.h" +#include "fml/trace_event.h" +#include "impeller/renderer/backend/vulkan/resource_manager_vk.h" +#include "impeller/renderer/backend/vulkan/vk.h" // IWYU pragma: keep. +#include "vulkan/vulkan_structs.hpp" namespace impeller { -using CommandPoolMap = std::map>; -FML_THREAD_LOCAL fml::ThreadLocalUniquePtr tls_command_pool; +// Holds the command pool in a background thread, recyling it when not in use. +class BackgroundCommandPoolVK final { + public: + BackgroundCommandPoolVK(BackgroundCommandPoolVK&&) = default; + + explicit BackgroundCommandPoolVK( + vk::UniqueCommandPool&& pool, + std::vector&& buffers, + std::weak_ptr recycler) + : pool_(std::move(pool)), + buffers_(std::move(buffers)), + recycler_(std::move(recycler)) {} + + ~BackgroundCommandPoolVK() { + auto const recycler = recycler_.lock(); + + // Not only does this prevent recycling when the context is being destroyed, + // but it also prevents the destructor from effectively being called twice; + // once for the original BackgroundCommandPoolVK() and once for the moved + // BackgroundCommandPoolVK(). + if (!recycler) { + return; + } + + recycler->Reclaim(std::move(pool_)); + } -static Mutex g_all_pools_mutex; -static std::unordered_map>> - g_all_pools IPLR_GUARDED_BY(g_all_pools_mutex); + private: + FML_DISALLOW_COPY_AND_ASSIGN(BackgroundCommandPoolVK); -std::shared_ptr CommandPoolVK::GetThreadLocal( - const ContextVK* context) { + vk::UniqueCommandPool pool_; + + // These are retained because the destructor of the C++ UniqueCommandBuffer + // wrapper type will attempt to reset the cmd buffer, and doing so may be a + // thread safety violation as this may happen on the fence waiter thread. + std::vector buffers_; + std::weak_ptr recycler_; +}; + +CommandPoolVK::~CommandPoolVK() { + auto const context = context_.lock(); if (!context) { - return nullptr; - } - if (tls_command_pool.get() == nullptr) { - tls_command_pool.reset(new CommandPoolMap()); - } - CommandPoolMap& pool_map = *tls_command_pool.get(); - auto found = pool_map.find(context->GetHash()); - if (found != pool_map.end() && found->second->IsValid()) { - return found->second; - } - auto pool = std::shared_ptr(new CommandPoolVK(context)); - if (!pool->IsValid()) { - return nullptr; + return; } - pool_map[context->GetHash()] = pool; - { - Lock pool_lock(g_all_pools_mutex); - g_all_pools[context].push_back(pool); + auto const recycler = context->GetCommandPoolRecycler(); + if (!recycler) { + return; } - return pool; + + UniqueResourceVKT pool( + context->GetResourceManager(), + BackgroundCommandPoolVK(std::move(pool_), std::move(collected_buffers_), + recycler)); } -void CommandPoolVK::ClearAllPools(const ContextVK* context) { - if (tls_command_pool.get()) { - tls_command_pool.get()->erase(context->GetHash()); - } - Lock pool_lock(g_all_pools_mutex); - if (auto found = g_all_pools.find(context); found != g_all_pools.end()) { - for (auto& weak_pool : found->second) { - auto pool = weak_pool.lock(); - if (!pool) { - // The pool has already died because the thread died. - continue; - } - // The pool is reset but its reference in the TLS map remains till the - // thread dies. - pool->Reset(); - } - g_all_pools.erase(found); +// TODO(matanlurey): Return a status_or<> instead of {} when we have one. +vk::UniqueCommandBuffer CommandPoolVK::CreateCommandBuffer() { + auto const context = context_.lock(); + if (!context) { + return {}; } -} -CommandPoolVK::CommandPoolVK(const ContextVK* context) - : owner_id_(std::this_thread::get_id()) { - vk::CommandPoolCreateInfo pool_info; + auto const device = context->GetDevice(); + vk::CommandBufferAllocateInfo info; + info.setCommandPool(pool_.get()); + info.setCommandBufferCount(1u); + info.setLevel(vk::CommandBufferLevel::ePrimary); + auto [result, buffers] = device.allocateCommandBuffersUnique(info); + if (result != vk::Result::eSuccess) { + return {}; + } + return std::move(buffers[0]); +} - pool_info.queueFamilyIndex = context->GetGraphicsQueue()->GetIndex().family; - pool_info.flags = vk::CommandPoolCreateFlagBits::eTransient | - vk::CommandPoolCreateFlagBits::eResetCommandBuffer; - auto pool = context->GetDevice().createCommandPoolUnique(pool_info); - if (pool.result != vk::Result::eSuccess) { +void CommandPoolVK::CollectCommandBuffer(vk::UniqueCommandBuffer&& buffer) { + if (!pool_) { + // If the command pool has already been destroyed, just free the buffer. return; } - - device_holder_ = context->GetDeviceHolder(); - graphics_pool_ = std::move(pool.value); - is_valid_ = true; + collected_buffers_.push_back(std::move(buffer)); } -CommandPoolVK::~CommandPoolVK() = default; - -bool CommandPoolVK::IsValid() const { - return is_valid_; -} +// Associates a resource with a thread and context. +using CommandPoolMap = + std::unordered_map>; +FML_THREAD_LOCAL fml::ThreadLocalUniquePtr resources_; -void CommandPoolVK::Reset() { - { - Lock lock(buffers_to_collect_mutex_); - graphics_pool_.reset(); +// TODO(matanlurey): Return a status_or<> instead of nullptr when we have one. +std::shared_ptr CommandPoolRecyclerVK::Get() { + auto const strong_context = context_.lock(); + if (!strong_context) { + return nullptr; + } - // When the command pool is destroyed, all of its command buffers are freed. - // Handles allocated from that pool are now invalid and must be discarded. - for (vk::UniqueCommandBuffer& buffer : buffers_to_collect_) { - buffer.release(); - } - buffers_to_collect_.clear(); + // If there is a resource in used for this thread and context, return it. + auto resources = resources_.get(); + if (!resources) { + resources = new CommandPoolMap(); + resources_.reset(resources); + } + auto const hash = strong_context->GetHash(); + auto const it = resources->find(hash); + if (it != resources->end()) { + return it->second; } - for (vk::UniqueCommandBuffer& buffer : recycled_buffers_) { - buffer.release(); + // Otherwise, create a new resource and return it. + auto pool = Create(); + if (!pool) { + return nullptr; } - recycled_buffers_.clear(); - is_valid_ = false; + auto const resource = + std::make_shared(std::move(*pool), context_); + resources->emplace(hash, resource); + return resource; } -vk::UniqueCommandBuffer CommandPoolVK::CreateGraphicsCommandBuffer() { - std::shared_ptr strong_device = device_holder_.lock(); - if (!strong_device) { - return {}; - } - FML_DCHECK(std::this_thread::get_id() == owner_id_); - { - Lock lock(buffers_to_collect_mutex_); - GarbageCollectBuffersIfAble(); +// TODO(matanlurey): Return a status_or<> instead of nullopt when we have one. +std::optional CommandPoolRecyclerVK::Create() { + // If we can reuse a command pool, do so. + if (auto pool = Reuse()) { + return pool; } - if (!recycled_buffers_.empty()) { - vk::UniqueCommandBuffer result = std::move(recycled_buffers_.back()); - recycled_buffers_.pop_back(); - return result; + // Otherwise, create a new one. + auto context = context_.lock(); + if (!context) { + return std::nullopt; } + vk::CommandPoolCreateInfo info; + info.setQueueFamilyIndex(context->GetGraphicsQueue()->GetIndex().family); + info.setFlags(vk::CommandPoolCreateFlagBits::eTransient); - vk::CommandBufferAllocateInfo alloc_info; - alloc_info.commandPool = graphics_pool_.get(); - alloc_info.commandBufferCount = 1u; - alloc_info.level = vk::CommandBufferLevel::ePrimary; - auto [result, buffers] = - strong_device->GetDevice().allocateCommandBuffersUnique(alloc_info); + auto device = context->GetDevice(); + auto [result, pool] = device.createCommandPoolUnique(info); if (result != vk::Result::eSuccess) { - return {}; + return std::nullopt; } - return std::move(buffers[0]); + return std::move(pool); } -void CommandPoolVK::CollectGraphicsCommandBuffer( - vk::UniqueCommandBuffer buffer) { - Lock lock(buffers_to_collect_mutex_); - if (!graphics_pool_) { - // If the command pool has already been destroyed, then its command buffers - // have been freed and are now invalid. - buffer.release(); +std::optional CommandPoolRecyclerVK::Reuse() { + // If there are no recycled pools, return nullopt. + Lock recycled_lock(recycled_mutex_); + if (recycled_.empty()) { + return std::nullopt; } - buffers_to_collect_.emplace_back(std::move(buffer)); - GarbageCollectBuffersIfAble(); + + // Otherwise, remove and return a recycled pool. + auto pool = std::move(recycled_.back()); + recycled_.pop_back(); + return std::move(pool); } -void CommandPoolVK::GarbageCollectBuffersIfAble() { - if (std::this_thread::get_id() != owner_id_) { +void CommandPoolRecyclerVK::Reclaim(vk::UniqueCommandPool&& pool) { + TRACE_EVENT0("impeller", "ReclaimCommandPool"); + + // Reset the pool on a background thread. + auto strong_context = context_.lock(); + if (!strong_context) { return; } + auto device = strong_context->GetDevice(); + device.resetCommandPool(pool.get()); - for (auto& buffer : buffers_to_collect_) { - buffer->reset(); - recycled_buffers_.emplace_back(std::move(buffer)); - } + // Move the pool to the recycled list. + Lock recycled_lock(recycled_mutex_); + recycled_.push_back(std::move(pool)); +} + +CommandPoolRecyclerVK::~CommandPoolRecyclerVK() { + // Ensure all recycled pools are reclaimed before this is destroyed. + Dispose(); +} - buffers_to_collect_.clear(); +void CommandPoolRecyclerVK::Dispose() { + auto const resources = resources_.get(); + if (!resources) { + return; + } + resources->clear(); } } // namespace impeller diff --git a/impeller/renderer/backend/vulkan/command_pool_vk.h b/impeller/renderer/backend/vulkan/command_pool_vk.h index 44722dba4b895..de7aa8b78ffcc 100644 --- a/impeller/renderer/backend/vulkan/command_pool_vk.h +++ b/impeller/renderer/backend/vulkan/command_pool_vk.h @@ -5,109 +5,130 @@ #pragma once #include -#include - -#include "flutter/fml/macros.h" +#include +#include +#include "fml/macros.h" #include "impeller/base/thread.h" #include "impeller/renderer/backend/vulkan/context_vk.h" -#include "impeller/renderer/backend/vulkan/device_holder.h" +#include "impeller/renderer/backend/vulkan/vk.h" // IWYU pragma: keep. namespace impeller { +class ContextVK; +class CommandPoolRecyclerVK; + //------------------------------------------------------------------------------ -/// @brief An opaque object that provides |vk::CommandBuffer| objects. +/// @brief Manages the lifecycle of a single |vk::CommandPool|. /// -/// A best practice is to create a |CommandPoolVK| for each thread that will -/// submit commands to the GPU, and to recycle (reuse) |vk::CommandBuffer|s by -/// resetting them in a background thread. +/// A |vk::CommandPool| is expensive to create and reset. This class manages +/// the lifecycle of a single |vk::CommandPool| by returning to the origin +/// (|CommandPoolRecyclerVK|) when it is destroyed to be reused. /// -/// @see -/// https://arm-software.github.io/vulkan_best_practice_for_mobile_developers/samples/performance/command_buffer_usage/command_buffer_usage_tutorial.html#resetting-the-command-pool +/// @warning This class is not thread-safe. +/// +/// @see |CommandPoolRecyclerVK| class CommandPoolVK final { public: - /// @brief Gets the |CommandPoolVK| for the current thread. - /// - /// @param[in] context The |ContextVK| to use. - /// - /// If the current thread does not have a |CommandPoolVK|, one will be created - /// and returned. If the current thread already has a |CommandPoolVK|, it will - /// be returned. - /// - /// @return The |CommandPoolVK| for the current thread, or |nullptr| if - /// either the |ContextVK| is invalid, or a pool could not be - /// created for any reason. - /// - /// In other words an invalid command pool will never be returned. - static std::shared_ptr GetThreadLocal( - const ContextVK* context); - - /// @brief Clears all |CommandPoolVK|s for the given |ContextVK|. - /// - /// @param[in] context The |ContextVK| to clear. - /// - /// Every |CommandPoolVK| that was created for every thread that has ever - /// called |GetThreadLocal| with the given |ContextVK| will be cleared. - /// - /// @note Should only be called when the |ContextVK| is being destroyed. - static void ClearAllPools(const ContextVK* context); - + CommandPoolVK(CommandPoolVK&&) = default; ~CommandPoolVK(); - /// @brief Whether or not this |CommandPoolVK| is valid. + /// @brief Creates a resource that manages the life of a command pool. /// - /// A command pool is no longer when valid once it's been |Reset|. - bool IsValid() const; + /// @param[in] pool The command pool to manage. + /// @param[in] recycler The context that will be notified on destruction. + explicit CommandPoolVK(vk::UniqueCommandPool pool, + std::weak_ptr& context) + : pool_(std::move(pool)), context_(context) {} /// @brief Creates and returns a new |vk::CommandBuffer|. /// - /// An attempt is made to reuse existing buffers (instead of creating new - /// ones) by recycling buffers that have been collected by - /// |CollectGraphicsCommandBuffer|. - /// /// @return Always returns a new |vk::CommandBuffer|, but if for any /// reason a valid command buffer could not be created, it will be /// a `{}` default instance (i.e. while being torn down). - vk::UniqueCommandBuffer CreateGraphicsCommandBuffer(); + vk::UniqueCommandBuffer CreateCommandBuffer(); - /// @brief Collects the given |vk::CommandBuffer| for recycling. - /// - /// The given |vk::CommandBuffer| will be recycled (reused) in the future when - /// |CreateGraphicsCommandBuffer| is called. + /// @brief Collects the given |vk::CommandBuffer| to be retained. /// /// @param[in] buffer The |vk::CommandBuffer| to collect. /// - /// @note This method is a noop if a different thread created the pool. - /// /// @see |GarbageCollectBuffersIfAble| - void CollectGraphicsCommandBuffer(vk::UniqueCommandBuffer buffer); + void CollectCommandBuffer(vk::UniqueCommandBuffer&& buffer); private: - const std::thread::id owner_id_; - std::weak_ptr device_holder_; - vk::UniqueCommandPool graphics_pool_; - Mutex buffers_to_collect_mutex_; - std::vector buffers_to_collect_ - IPLR_GUARDED_BY(buffers_to_collect_mutex_); - std::vector recycled_buffers_; - bool is_valid_ = false; - - /// @brief Resets, releasing all |vk::CommandBuffer|s. + FML_DISALLOW_COPY_AND_ASSIGN(CommandPoolVK); + + vk::UniqueCommandPool pool_; + std::weak_ptr& context_; + + // Used to retain a reference on these until the pool is reset. + std::vector collected_buffers_; +}; + +//------------------------------------------------------------------------------ +/// @brief Creates and manages the lifecycle of |vk::CommandPool| objects. +/// +/// A |vk::CommandPool| is expensive to create and reset. This class manages +/// the lifecycle of |vk::CommandPool| objects by creating and recycling them; +/// or in other words, a pool for command pools. +/// +/// A single instance should be created per |ContextVK|. +/// +/// Every "frame", a single |CommandPoolResourceVk| is made available for each +/// thread that calls |Get|. After calling |Dispose|, the current thread's pool +/// is moved to a background thread, reset, and made available for the next time +/// |Get| is called and needs to create a command pool. +/// +/// Commands in the command pool are not necessarily done executing when the +/// pool is recycled, when all references are dropped to the pool, they are +/// reset and returned to the pool of available pools. +/// +/// @note This class is thread-safe. +/// +/// @see |vk::CommandPoolResourceVk| +/// @see |ContextVK| +/// @see +/// https://arm-software.github.io/vulkan_best_practice_for_mobile_developers/samples/performance/command_buffer_usage/command_buffer_usage_tutorial.html +class CommandPoolRecyclerVK final + : public std::enable_shared_from_this { + public: + ~CommandPoolRecyclerVK(); + + /// @brief Creates a recycler for the given |ContextVK|. + /// + /// @param[in] context The context to create the recycler for. + explicit CommandPoolRecyclerVK(std::weak_ptr context) + : context_(std::move(context)) {} + + /// @brief Gets a command pool for the current thread. + /// + /// @warning Returns a |nullptr| if a pool could not be created. + std::shared_ptr Get(); + + /// @brief Returns a command pool to be reset on a background thread. /// - /// @note "All" includes active and recycled buffers. - void Reset(); + /// @param[in] pool The pool to recycler. + void Reclaim(vk::UniqueCommandPool&& pool); - explicit CommandPoolVK(const ContextVK* context); + /// @brief Clears all recycled command pools to let them be reclaimed. + void Dispose(); - /// @brief Collects buffers for recycling if able. + private: + std::weak_ptr context_; + + Mutex recycled_mutex_; + std::vector recycled_ IPLR_GUARDED_BY(recycled_mutex_); + + /// @brief Creates a new |vk::CommandPool|. /// - /// If any buffers have been returned through |CollectGraphicsCommandBuffer|, - /// then they are reset and made available to future calls to - /// |CreateGraphicsCommandBuffer|. + /// @returns Returns a |std::nullopt| if a pool could not be created. + std::optional Create(); + + /// @brief Reuses a recycled |vk::CommandPool|, if available. /// - /// @note This method is a noop if a different thread created the pool. - void GarbageCollectBuffersIfAble() IPLR_REQUIRES(buffers_to_collect_mutex_); + /// @returns Returns a |std::nullopt| if a pool was not available. + std::optional Reuse(); - FML_DISALLOW_COPY_AND_ASSIGN(CommandPoolVK); + FML_DISALLOW_COPY_AND_ASSIGN(CommandPoolRecyclerVK); }; } // namespace impeller diff --git a/impeller/renderer/backend/vulkan/command_pool_vk_unittests.cc b/impeller/renderer/backend/vulkan/command_pool_vk_unittests.cc new file mode 100644 index 0000000000000..66cde90c5cac2 --- /dev/null +++ b/impeller/renderer/backend/vulkan/command_pool_vk_unittests.cc @@ -0,0 +1,113 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "flutter/testing/testing.h" // IWYU pragma: keep. +#include "fml/synchronization/waitable_event.h" +#include "impeller/renderer/backend/vulkan/resource_manager_vk.h" +#include "impeller/renderer/backend/vulkan/test/mock_vulkan.h" + +namespace impeller { +namespace testing { + +TEST(CommandPoolRecyclerVKTest, GetsACommandPoolPerThread) { + auto const context = MockVulkanContextBuilder().Build(); + + // Record the memory location of each pointer to a command pool. + int* pool1 = nullptr; + int* pool2 = nullptr; + + // Create a command pool in two threads and record the memory location. + std::thread thread1([&]() { + auto const pool = context->GetCommandPoolRecycler()->Get(); + pool1 = reinterpret_cast(pool.get()); + }); + + std::thread thread2([&]() { + auto const pool = context->GetCommandPoolRecycler()->Get(); + pool2 = reinterpret_cast(pool.get()); + }); + + thread1.join(); + thread2.join(); + + // The two command pools should be different. + EXPECT_NE(pool1, pool2); + + context->Shutdown(); +} + +TEST(CommandPoolRecyclerVKTest, GetsTheSameCommandPoolOnSameThread) { + auto const context = MockVulkanContextBuilder().Build(); + + auto const pool1 = context->GetCommandPoolRecycler()->Get(); + auto const pool2 = context->GetCommandPoolRecycler()->Get(); + + // The two command pools should be the same. + EXPECT_EQ(pool1.get(), pool2.get()); + + context->Shutdown(); +} + +namespace { + +// Invokes the provided callback when the destructor is called. +// +// Can be moved, but not copied. +class DeathRattle final { + public: + explicit DeathRattle(std::function callback) + : callback_(std::move(callback)) {} + + DeathRattle(DeathRattle&&) = default; + DeathRattle& operator=(DeathRattle&&) = default; + + ~DeathRattle() { callback_(); } + + private: + std::function callback_; +}; + +} // namespace + +TEST(CommandPoolRecyclerVKTest, ReclaimMakesCommandPoolAvailable) { + auto const context = MockVulkanContextBuilder().Build(); + + { + // Fetch a pool (which will be created). + auto const recycler = context->GetCommandPoolRecycler(); + auto const pool = recycler->Get(); + + // This normally is called at the end of a frame. + recycler->Dispose(); + } + + // Add something to the resource manager and have it notify us when it's + // destroyed. That should give us a non-flaky signal that the pool has been + // reclaimed as well. + auto waiter = fml::AutoResetWaitableEvent(); + auto rattle = DeathRattle([&waiter]() { waiter.Signal(); }); + { + UniqueResourceVKT resource(context->GetResourceManager(), + std::move(rattle)); + } + waiter.Wait(); + + // On another thread explicitly, request a new pool. + std::thread thread([&]() { + auto const pool = context->GetCommandPoolRecycler()->Get(); + EXPECT_NE(pool.get(), nullptr); + }); + + thread.join(); + + // Now check that we only ever created one pool. + auto const called = GetMockVulkanFunctions(context->GetDevice()); + EXPECT_EQ(std::count(called->begin(), called->end(), "vkCreateCommandPool"), + 1u); + + context->Shutdown(); +} + +} // namespace testing +} // namespace impeller diff --git a/impeller/renderer/backend/vulkan/context_vk.cc b/impeller/renderer/backend/vulkan/context_vk.cc index 88a86fa2c71a2..5453f060f7a44 100644 --- a/impeller/renderer/backend/vulkan/context_vk.cc +++ b/impeller/renderer/backend/vulkan/context_vk.cc @@ -13,11 +13,9 @@ #include #include #include -#include #include #include -#include "flutter/fml/build_config.h" #include "flutter/fml/trace_event.h" #include "impeller/base/validation.h" #include "impeller/renderer/backend/vulkan/allocator_vk.h" @@ -114,7 +112,9 @@ ContextVK::~ContextVK() { if (device_holder_ && device_holder_->device) { [[maybe_unused]] auto result = device_holder_->device->waitIdle(); } - CommandPoolVK::ClearAllPools(this); + if (command_pool_recycler_) { + command_pool_recycler_.get()->Dispose(); + } } Context::BackendType ContextVK::GetBackendType() const { @@ -379,7 +379,7 @@ void ContextVK::Setup(Settings settings) { std::shared_ptr(new FenceWaiterVK(device_holder)); //---------------------------------------------------------------------------- - /// Create the resource manager. + /// Create the resource manager and command pool recycler. /// auto resource_manager = ResourceManagerVK::Create(); if (!resource_manager) { @@ -387,6 +387,13 @@ void ContextVK::Setup(Settings settings) { return; } + auto command_pool_recycler = + std::make_shared(weak_from_this()); + if (!command_pool_recycler) { + VALIDATION_LOG << "Could not create command pool recycler."; + return; + } + //---------------------------------------------------------------------------- /// Fetch the queues. /// @@ -417,6 +424,7 @@ void ContextVK::Setup(Settings settings) { device_capabilities_ = std::move(caps); fence_waiter_ = std::move(fence_waiter); resource_manager_ = std::move(resource_manager); + command_pool_recycler_ = std::move(command_pool_recycler); device_name_ = std::string(physical_device_properties.deviceName); is_valid_ = true; @@ -477,6 +485,14 @@ ContextVK::GetConcurrentWorkerTaskRunner() const { } void ContextVK::Shutdown() { + // There are multiple objects, for example |CommandPoolVK|, that in their + // destructors make a strong reference to |ContextVK|. Resetting these shared + // pointers ensures that cleanup happens in a correct order. + // + // tl;dr: Without it, we get thread::join failures on shutdown. + fence_waiter_.reset(); + resource_manager_.reset(); + raster_message_loop_->Terminate(); } @@ -504,6 +520,11 @@ std::shared_ptr ContextVK::GetResourceManager() const { return resource_manager_; } +std::shared_ptr ContextVK::GetCommandPoolRecycler() + const { + return command_pool_recycler_; +} + std::unique_ptr ContextVK::CreateGraphicsCommandEncoderFactory() const { return std::make_unique(weak_from_this()); diff --git a/impeller/renderer/backend/vulkan/context_vk.h b/impeller/renderer/backend/vulkan/context_vk.h index 316cf1cbb2161..144de15b26913 100644 --- a/impeller/renderer/backend/vulkan/context_vk.h +++ b/impeller/renderer/backend/vulkan/context_vk.h @@ -12,6 +12,7 @@ #include "flutter/fml/unique_fd.h" #include "impeller/base/backend_cast.h" #include "impeller/core/formats.h" +#include "impeller/renderer/backend/vulkan/command_pool_vk.h" #include "impeller/renderer/backend/vulkan/device_holder.h" #include "impeller/renderer/backend/vulkan/pipeline_library_vk.h" #include "impeller/renderer/backend/vulkan/queue_vk.h" @@ -26,6 +27,7 @@ bool HasValidationLayers(); class CommandEncoderFactoryVK; class CommandEncoderVK; +class CommandPoolRecyclerVK; class DebugReportVK; class FenceWaiterVK; class ResourceManagerVK; @@ -140,6 +142,8 @@ class ContextVK final : public Context, std::shared_ptr GetResourceManager() const; + std::shared_ptr GetCommandPoolRecycler() const; + private: struct DeviceHolderImpl : public DeviceHolder { // |DeviceHolder| @@ -164,6 +168,7 @@ class ContextVK final : public Context, std::shared_ptr device_capabilities_; std::shared_ptr fence_waiter_; std::shared_ptr resource_manager_; + std::shared_ptr command_pool_recycler_; std::string device_name_; std::shared_ptr raster_message_loop_; bool sync_presentation_ = false; diff --git a/impeller/renderer/backend/vulkan/context_vk_unittests.cc b/impeller/renderer/backend/vulkan/context_vk_unittests.cc index 11f8b1599bc21..e658d94911865 100644 --- a/impeller/renderer/backend/vulkan/context_vk_unittests.cc +++ b/impeller/renderer/backend/vulkan/context_vk_unittests.cc @@ -15,8 +15,7 @@ TEST(ContextVKTest, DeletesCommandPools) { std::weak_ptr weak_pool; { std::shared_ptr context = MockVulkanContextBuilder().Build(); - std::shared_ptr pool = - CommandPoolVK::GetThreadLocal(context.get()); + auto const pool = context->GetCommandPoolRecycler()->Get(); weak_pool = pool; weak_context = context; ASSERT_TRUE(weak_pool.lock()); diff --git a/impeller/renderer/backend/vulkan/resource_manager_vk.cc b/impeller/renderer/backend/vulkan/resource_manager_vk.cc index 382f7aa715e7c..f981321c7115e 100644 --- a/impeller/renderer/backend/vulkan/resource_manager_vk.cc +++ b/impeller/renderer/backend/vulkan/resource_manager_vk.cc @@ -22,6 +22,11 @@ std::shared_ptr ResourceManagerVK::Create() { ResourceManagerVK::ResourceManagerVK() : waiter_([&]() { Start(); }) {} ResourceManagerVK::~ResourceManagerVK() { + FML_DCHECK(waiter_.get_id() != std::this_thread::get_id()) + << "The ResourceManager being destructed on its own spawned thread is a " + << "sign that ContextVK was not properly destroyed. A usual fix for this " + << "is to ensure that ContextVK is shutdown (i.e. context->Shutdown()) " + "before the ResourceManager is destroyed (i.e. at the end of a test)."; Terminate(); waiter_.join(); } diff --git a/impeller/renderer/backend/vulkan/resource_manager_vk_unittests.cc b/impeller/renderer/backend/vulkan/resource_manager_vk_unittests.cc index 30df654d3dac0..fd5f10d8e0f70 100644 --- a/impeller/renderer/backend/vulkan/resource_manager_vk_unittests.cc +++ b/impeller/renderer/backend/vulkan/resource_manager_vk_unittests.cc @@ -6,7 +6,6 @@ #include #include #include -#include "fml/logging.h" #include "fml/synchronization/waitable_event.h" #include "gtest/gtest.h" #include "impeller/renderer/backend/vulkan/resource_manager_vk.h" @@ -75,5 +74,34 @@ TEST(ResourceManagerVKTest, TerminatesWhenOutOfScope) { EXPECT_EQ(manager.lock(), nullptr); } +TEST(ResourceManagerVKTest, IsThreadSafe) { + // In a typical app, there is a single ResourceManagerVK per app, shared b/w + // threads. + // + // This test ensures that the ResourceManagerVK is thread-safe. + std::weak_ptr manager; + + { + auto const manager = ResourceManagerVK::Create(); + + // Spawn two threads, and have them both put resources into the manager. + struct MockResource {}; + + std::thread thread1([&manager]() { + UniqueResourceVKT(manager, MockResource{}); + }); + + std::thread thread2([&manager]() { + UniqueResourceVKT(manager, MockResource{}); + }); + + thread1.join(); + thread2.join(); + } + + // The thread should have terminated. + EXPECT_EQ(manager.lock(), nullptr); +} + } // namespace testing } // namespace impeller diff --git a/impeller/renderer/backend/vulkan/surface_context_vk.cc b/impeller/renderer/backend/vulkan/surface_context_vk.cc index a1cddaef6e924..2e20d2af5cbe6 100644 --- a/impeller/renderer/backend/vulkan/surface_context_vk.cc +++ b/impeller/renderer/backend/vulkan/surface_context_vk.cc @@ -5,6 +5,7 @@ #include "impeller/renderer/backend/vulkan/surface_context_vk.h" #include "flutter/fml/trace_event.h" +#include "impeller/renderer/backend/vulkan/command_pool_vk.h" #include "impeller/renderer/backend/vulkan/context_vk.h" #include "impeller/renderer/backend/vulkan/swapchain_vk.h" @@ -79,6 +80,7 @@ std::unique_ptr SurfaceContextVK::AcquireNextSurface() { if (auto allocator = parent_->GetResourceAllocator()) { allocator->DidAcquireSurfaceFrame(); } + parent_->GetCommandPoolRecycler()->Dispose(); return surface; } diff --git a/impeller/renderer/backend/vulkan/test/mock_vulkan.cc b/impeller/renderer/backend/vulkan/test/mock_vulkan.cc index 393916b81023f..1140078386693 100644 --- a/impeller/renderer/backend/vulkan/test/mock_vulkan.cc +++ b/impeller/renderer/backend/vulkan/test/mock_vulkan.cc @@ -9,8 +9,7 @@ #include "fml/macros.h" #include "fml/thread_local.h" #include "impeller/base/thread_safety.h" -#include "vulkan/vulkan_core.h" -#include "vulkan/vulkan_enums.hpp" +#include "impeller/renderer/backend/vulkan/vk.h" // IWYU pragma: keep. namespace impeller { namespace testing { @@ -24,6 +23,8 @@ struct MockCommandBuffer { std::shared_ptr> called_functions_; }; +struct MockCommandPool {}; + class MockDevice final { public: explicit MockDevice() : called_functions_(new std::vector()) {} @@ -36,6 +37,25 @@ class MockDevice final { return result; } + MockCommandPool* NewCommandPool() { + auto pool = std::make_unique(); + MockCommandPool* result = pool.get(); + Lock lock(commmand_pools_mutex_); + command_pools_.emplace_back(std::move(pool)); + return result; + } + + void DeleteCommandPool(MockCommandPool* pool) { + Lock lock(commmand_pools_mutex_); + auto it = std::find_if(command_pools_.begin(), command_pools_.end(), + [pool](const std::unique_ptr& p) { + return p.get() == pool; + }); + if (it != command_pools_.end()) { + command_pools_.erase(it); + } + } + const std::shared_ptr>& GetCalledFunctions() { return called_functions_; } @@ -55,6 +75,10 @@ class MockDevice final { Mutex command_buffers_mutex_; std::vector> command_buffers_ IPLR_GUARDED_BY(command_buffers_mutex_); + + Mutex commmand_pools_mutex_; + std::vector> command_pools_ + IPLR_GUARDED_BY(commmand_pools_mutex_); }; void noop() {} @@ -200,7 +224,16 @@ VkResult vkCreateCommandPool(VkDevice device, const VkCommandPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCommandPool* pCommandPool) { - *pCommandPool = reinterpret_cast(0xc0de0001); + MockDevice* mock_device = reinterpret_cast(device); + mock_device->AddCalledFunction("vkCreateCommandPool"); + *pCommandPool = + reinterpret_cast(mock_device->NewCommandPool()); + return VK_SUCCESS; +} + +VkResult vkResetCommandPool(VkDevice device, + VkCommandPool commandPool, + VkCommandPoolResetFlags flags) { return VK_SUCCESS; } @@ -402,6 +435,8 @@ void vkDestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks* pAllocator) { MockDevice* mock_device = reinterpret_cast(device); + mock_device->DeleteCommandPool( + reinterpret_cast(commandPool)); mock_device->AddCalledFunction("vkDestroyCommandPool"); } @@ -486,6 +521,8 @@ PFN_vkVoidFunction GetMockVulkanProcAddress(VkInstance instance, return (PFN_vkVoidFunction)vkCreatePipelineCache; } else if (strcmp("vkCreateCommandPool", pName) == 0) { return (PFN_vkVoidFunction)vkCreateCommandPool; + } else if (strcmp("vkResetCommandPool", pName) == 0) { + return (PFN_vkVoidFunction)vkResetCommandPool; } else if (strcmp("vkAllocateCommandBuffers", pName) == 0) { return (PFN_vkVoidFunction)vkAllocateCommandBuffers; } else if (strcmp("vkBeginCommandBuffer", pName) == 0) { diff --git a/impeller/renderer/backend/vulkan/test/mock_vulkan_unittests.cc b/impeller/renderer/backend/vulkan/test/mock_vulkan_unittests.cc index 1aa57b0345f21..2555994a8fd03 100644 --- a/impeller/renderer/backend/vulkan/test/mock_vulkan_unittests.cc +++ b/impeller/renderer/backend/vulkan/test/mock_vulkan_unittests.cc @@ -4,7 +4,6 @@ #include "flutter/testing/testing.h" // IWYU pragma: keep #include "gtest/gtest.h" -#include "impeller/renderer/backend/vulkan/command_pool_vk.h" #include "impeller/renderer/backend/vulkan/test/mock_vulkan.h" #include "vulkan/vulkan_enums.hpp" @@ -19,12 +18,12 @@ TEST(MockVulkanContextTest, IsThreadSafe) { // Spawn two threads, and have them create a CommandPoolVK each. std::thread thread1([&context]() { - auto const pool = CommandPoolVK::GetThreadLocal(context.get()); + auto const pool = context->GetCommandPoolRecycler()->Get(); EXPECT_TRUE(pool); }); std::thread thread2([&context]() { - auto const pool = CommandPoolVK::GetThreadLocal(context.get()); + auto const pool = context->GetCommandPoolRecycler()->Get(); EXPECT_TRUE(pool); }); From 63c5f70b91ecc0c7919f942aaab792975f928325 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 16 Sep 2023 01:31:47 -0400 Subject: [PATCH 091/859] Roll Dart SDK from 029d6d73c860 to a0ca39c63c16 (1 revision) (#45921) https://dart.googlesource.com/sdk.git/+log/029d6d73c860..a0ca39c63c16 2023-09-16 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-171.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC bdero@google.com,dart-vm-team@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index fa3ce6f865e3a..7a5233430bc0a 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '029d6d73c8607db74e24105793b9dc0ba4838443', + 'dart_revision': 'a0ca39c63c16121dd4f9967a8a2fd5c333d28331', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index b79cc2742001a..74df30034601d 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: 3d94b81ec28985b6374ba80946aab4f3 +Signature: d8ceb2eb9c118958dd5945ea9d4d4581 ==================================================================================================== LIBRARY: dart From f936808a1b5af6e86638e40497b41e813467a78d Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 16 Sep 2023 01:38:03 -0400 Subject: [PATCH 092/859] Roll Fuchsia Mac SDK from -_edKGA5GTkDFxVgl... to 3Tb9CQTTiBv1lb673... (#45922) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC bdero@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 7a5233430bc0a..2769c5b6eebeb 100644 --- a/DEPS +++ b/DEPS @@ -914,7 +914,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': '-_edKGA5GTkDFxVglA5Eeh776tpMq4tePGwvozCb52gC' + 'version': '3Tb9CQTTiBv1lb673dy6Hni3h6dG144nwKugXqH74TkC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 1814c75b00dd1dcdfc1a51a424eea210bf04d718 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 16 Sep 2023 01:42:11 -0400 Subject: [PATCH 093/859] Roll Skia from a1f8fb54299a to b33e0e6706b0 (1 revision) (#45923) https://skia.googlesource.com/skia.git/+log/a1f8fb54299a..b33e0e6706b0 2023-09-16 egdaniel@google.com Add GrDirectCotnext querey to check if the we are in a device lost state If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 2769c5b6eebeb..727356c06b551 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'a1f8fb54299a69bda9e4a7d55fa2ee1cb3f2574c', + 'skia_revision': 'b33e0e6706b03c6df2ad7da7ace2b057a7c322e8', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 5f924c4f4a8f5..c87b9c9e521fe 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: f00f2bf4e45599b3d8be5c2680ce8d81 +Signature: f8b42c5b0008f9daebac05195c520930 ==================================================================================================== LIBRARY: etc1 From 198e748c6aacca90e418806e069c4ea3a0046f37 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 16 Sep 2023 10:59:21 -0400 Subject: [PATCH 094/859] Roll Skia from b33e0e6706b0 to 2eaaa5bf7dae (1 revision) (#45926) https://skia.googlesource.com/skia.git/+log/b33e0e6706b0..2eaaa5bf7dae 2023-09-16 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 5060b88f0c23 to d94b7bab5be9 (5 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 727356c06b551..87ef0ffef8f16 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'b33e0e6706b03c6df2ad7da7ace2b057a7c322e8', + 'skia_revision': '2eaaa5bf7daeb82f755b73d28535975627e59a68', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 75df7a851060f685a8abe56e008724597ca55cd9 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 16 Sep 2023 14:16:29 -0400 Subject: [PATCH 095/859] Roll Fuchsia Mac SDK from 3Tb9CQTTiBv1lb673... to IJXVQbD3CpkL2_ihZ... (#45928) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC bdero@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 87ef0ffef8f16..fff8938c2a32c 100644 --- a/DEPS +++ b/DEPS @@ -914,7 +914,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': '3Tb9CQTTiBv1lb673dy6Hni3h6dG144nwKugXqH74TkC' + 'version': 'IJXVQbD3CpkL2_ihZcSSLPiJeFWfFVT7pijN8i-f8ZwC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 8077f7942cca628c29f868da23833fc9229c141f Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 16 Sep 2023 23:58:12 -0400 Subject: [PATCH 096/859] Roll Skia from 2eaaa5bf7dae to a160e7fb80db (1 revision) (#45933) https://skia.googlesource.com/skia.git/+log/2eaaa5bf7dae..a160e7fb80db 2023-09-17 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from d94b7bab5be9 to 54560bc26175 (1 revision) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,jmbetancourt@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index fff8938c2a32c..c4d1c2c81731a 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '2eaaa5bf7daeb82f755b73d28535975627e59a68', + 'skia_revision': 'a160e7fb80db8facdd7e5f368afa970b42f4ddb1', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From deca2bebdb99172e8848e53a5b042117abb85634 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sun, 17 Sep 2023 02:52:23 -0400 Subject: [PATCH 097/859] Roll Fuchsia Mac SDK from IJXVQbD3CpkL2_ihZ... to AjL85L6CVMEuMWPVZ... (#45937) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC bdero@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index c4d1c2c81731a..34663a3fc349d 100644 --- a/DEPS +++ b/DEPS @@ -914,7 +914,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'IJXVQbD3CpkL2_ihZcSSLPiJeFWfFVT7pijN8i-f8ZwC' + 'version': 'AjL85L6CVMEuMWPVZzN1EMWG4cwS6R6cOpbv7-jDjEsC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 9d5c3f007bffc421cc30c1054c631b6a7405ba6c Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sun, 17 Sep 2023 15:32:22 -0400 Subject: [PATCH 098/859] Roll Fuchsia Mac SDK from AjL85L6CVMEuMWPVZ... to 2TJNsB32jPioIfFao... (#45945) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC bdero@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 34663a3fc349d..0196fce679692 100644 --- a/DEPS +++ b/DEPS @@ -914,7 +914,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'AjL85L6CVMEuMWPVZzN1EMWG4cwS6R6cOpbv7-jDjEsC' + 'version': '2TJNsB32jPioIfFaoLtDUK2JsGct6o1oo_fISGZ_vWgC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From ee57280deb96e236d8c514f48ab150b60aba28a8 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 18 Sep 2023 00:22:17 -0400 Subject: [PATCH 099/859] Roll Skia from a160e7fb80db to 0d02aa8cb640 (1 revision) (#45952) https://skia.googlesource.com/skia.git/+log/a160e7fb80db..0d02aa8cb640 2023-09-18 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 54560bc26175 to dc9947ad4d2b (1 revision) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 0196fce679692..a427909b1b9e9 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'a160e7fb80db8facdd7e5f368afa970b42f4ddb1', + 'skia_revision': '0d02aa8cb640a7428c5a15f9106ba7235e0b1b5e', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 275277992958deff220566a48d0ab8cd14c6b0a6 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 18 Sep 2023 01:22:07 -0400 Subject: [PATCH 100/859] Roll Dart SDK from a0ca39c63c16 to 5eef4301567f (1 revision) (#45956) https://dart.googlesource.com/sdk.git/+log/a0ca39c63c16..5eef4301567f 2023-09-18 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-172.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC bdero@google.com,dart-vm-team@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index a427909b1b9e9..62f8083c31892 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': 'a0ca39c63c16121dd4f9967a8a2fd5c333d28331', + 'dart_revision': '5eef4301567feffc1cb7fdbfc6b271b64d16f9bd', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py From 7b504f33af91abaddfa70c5b2c49baf6218e7f15 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 18 Sep 2023 01:30:25 -0400 Subject: [PATCH 101/859] Roll Skia from 0d02aa8cb640 to eac827d9eed3 (1 revision) (#45957) https://skia.googlesource.com/skia.git/+log/0d02aa8cb640..eac827d9eed3 2023-09-18 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from 18fd0925a396 to 6e55411b61e1 (4 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 62f8083c31892..6774bdd9fe72d 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '0d02aa8cb640a7428c5a15f9106ba7235e0b1b5e', + 'skia_revision': 'eac827d9eed33a4e8fba973dac7b6faf357b226e', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index c87b9c9e521fe..3b2a311a4db88 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: f8b42c5b0008f9daebac05195c520930 +Signature: e281489f609447ee79807afc583df6a9 ==================================================================================================== LIBRARY: etc1 From 17619e529c831a39cf17ebbb6ccac7c61ac520bf Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 18 Sep 2023 03:13:22 -0400 Subject: [PATCH 102/859] Roll Skia from eac827d9eed3 to f8065ca00d0c (2 revisions) (#45962) https://skia.googlesource.com/skia.git/+log/eac827d9eed3..f8065ca00d0c 2023-09-18 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from b4852ef95ec1 to 22b6ca1c6191 (9 revisions) 2023-09-18 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from 6e55411b61e1 to 4dfcc029292a If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 6774bdd9fe72d..8185076a8e4c4 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'eac827d9eed33a4e8fba973dac7b6faf357b226e', + 'skia_revision': 'f8065ca00d0c705946a661709d0f7bc89bad5df5', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From f7e4a7004e2d70373dfa99f587de60ea56d45504 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 18 Sep 2023 04:31:22 -0400 Subject: [PATCH 103/859] Roll Fuchsia Mac SDK from 2TJNsB32jPioIfFao... to 3_Lh8otTpmVuf-Zwb... (#45963) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC bdero@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 8185076a8e4c4..d10955486f087 100644 --- a/DEPS +++ b/DEPS @@ -914,7 +914,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': '2TJNsB32jPioIfFaoLtDUK2JsGct6o1oo_fISGZ_vWgC' + 'version': '3_Lh8otTpmVuf-Zwb5yQy61cqmV-4g7xjO1wsANaeC0C' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From dfd3756b921903235c744963f40429c19adcf1ac Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 18 Sep 2023 05:20:56 -0400 Subject: [PATCH 104/859] Roll Dart SDK from 5eef4301567f to 5c56e0f3fe13 (1 revision) (#45966) https://dart.googlesource.com/sdk.git/+log/5eef4301567f..5c56e0f3fe13 2023-09-18 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-173.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC bdero@google.com,dart-vm-team@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index d10955486f087..db640e3a1c57f 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '5eef4301567feffc1cb7fdbfc6b271b64d16f9bd', + 'dart_revision': '5c56e0f3fe1345e01023a344a4e202cda6932a1c', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py From 787f0a0d5b12e75855752c2c8e01e83f8a610e93 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 18 Sep 2023 09:24:32 -0400 Subject: [PATCH 105/859] Roll Dart SDK from 5c56e0f3fe13 to 5b0e7bda1379 (1 revision) (#45974) https://dart.googlesource.com/sdk.git/+log/5c56e0f3fe13..5b0e7bda1379 2023-09-18 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-174.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC bdero@google.com,dart-vm-team@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index db640e3a1c57f..3bd3d66fa1469 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '5c56e0f3fe1345e01023a344a4e202cda6932a1c', + 'dart_revision': '5b0e7bda13798782ed14be5ce74e0a0298750945', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py From 01e7ba17bbe008d316774d462b3c76946ee95630 Mon Sep 17 00:00:00 2001 From: Mouad Debbar Date: Mon, 18 Sep 2023 11:35:58 -0400 Subject: [PATCH 106/859] [web] De-singletonize MouseCursor for multi-view (#45295) `MouseCursor` is a singleton that works by accessing `flutterViewEmbedder` directly. After this PR, `MouseCursor` becomes a non-singleton that takes a `FlutterView` and controls the mouse cursor for said view. Part of https://github.com/flutter/flutter/issues/134443 --- ci/licenses_golden/licenses_flutter | 4 +- lib/web_ui/lib/src/engine.dart | 2 +- lib/web_ui/lib/src/engine/dom.dart | 2 + lib/web_ui/lib/src/engine/initialization.dart | 1 - .../{mouse_cursor.dart => mouse/cursor.dart} | 25 +++--------- .../lib/src/engine/platform_dispatcher.dart | 16 +++----- lib/web_ui/lib/src/engine/window.dart | 19 ++++++++- .../initialization/services_vs_ui_test.dart | 3 -- lib/web_ui/test/engine/mouse/cursor_test.dart | 40 +++++++++++++++++++ 9 files changed, 74 insertions(+), 38 deletions(-) rename lib/web_ui/lib/src/engine/{mouse_cursor.dart => mouse/cursor.dart} (73%) create mode 100644 lib/web_ui/test/engine/mouse/cursor_test.dart diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index 4ee3bf8b0109a..a4fbca11e268e 100644 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -2039,7 +2039,7 @@ ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/js_interop/js_typed_data.dart ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/key_map.g.dart + ../../../flutter/LICENSE ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/keyboard_binding.dart + ../../../flutter/LICENSE ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/layers.dart + ../../../flutter/LICENSE -ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/mouse_cursor.dart + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/mouse/cursor.dart + ../../../flutter/LICENSE ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/navigation/history.dart + ../../../flutter/LICENSE ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/noto_font.dart + ../../../flutter/LICENSE ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/noto_font_encoding.dart + ../../../flutter/LICENSE @@ -4789,7 +4789,7 @@ FILE: ../../../flutter/lib/web_ui/lib/src/engine/js_interop/js_typed_data.dart FILE: ../../../flutter/lib/web_ui/lib/src/engine/key_map.g.dart FILE: ../../../flutter/lib/web_ui/lib/src/engine/keyboard_binding.dart FILE: ../../../flutter/lib/web_ui/lib/src/engine/layers.dart -FILE: ../../../flutter/lib/web_ui/lib/src/engine/mouse_cursor.dart +FILE: ../../../flutter/lib/web_ui/lib/src/engine/mouse/cursor.dart FILE: ../../../flutter/lib/web_ui/lib/src/engine/navigation/history.dart FILE: ../../../flutter/lib/web_ui/lib/src/engine/noto_font.dart FILE: ../../../flutter/lib/web_ui/lib/src/engine/noto_font_encoding.dart diff --git a/lib/web_ui/lib/src/engine.dart b/lib/web_ui/lib/src/engine.dart index 8f72042ca42ec..c6ff0ea568e24 100644 --- a/lib/web_ui/lib/src/engine.dart +++ b/lib/web_ui/lib/src/engine.dart @@ -112,7 +112,7 @@ export 'engine/js_interop/js_typed_data.dart'; export 'engine/key_map.g.dart'; export 'engine/keyboard_binding.dart'; export 'engine/layers.dart'; -export 'engine/mouse_cursor.dart'; +export 'engine/mouse/cursor.dart'; export 'engine/navigation/history.dart'; export 'engine/noto_font.dart'; export 'engine/noto_font_encoding.dart'; diff --git a/lib/web_ui/lib/src/engine/dom.dart b/lib/web_ui/lib/src/engine/dom.dart index c90554b06efb4..c0a7a288c666b 100644 --- a/lib/web_ui/lib/src/engine/dom.dart +++ b/lib/web_ui/lib/src/engine/dom.dart @@ -773,6 +773,7 @@ extension DomCSSStyleDeclarationExtension on DomCSSStyleDeclaration { set alignContent(String value) => setProperty('align-content', value); set textAlign(String value) => setProperty('text-align', value); set font(String value) => setProperty('font', value); + set cursor(String value) => setProperty('cursor', value); String get width => getPropertyValue('width'); String get height => getPropertyValue('height'); String get position => getPropertyValue('position'); @@ -837,6 +838,7 @@ extension DomCSSStyleDeclarationExtension on DomCSSStyleDeclaration { String get alignContent => getPropertyValue('align-content'); String get textAlign => getPropertyValue('text-align'); String get font => getPropertyValue('font'); + String get cursor => getPropertyValue('cursor'); @JS('getPropertyValue') external JSString _getPropertyValue(JSString property); diff --git a/lib/web_ui/lib/src/engine/initialization.dart b/lib/web_ui/lib/src/engine/initialization.dart index 5e94e5a78b77b..ed537132c98ca 100644 --- a/lib/web_ui/lib/src/engine/initialization.dart +++ b/lib/web_ui/lib/src/engine/initialization.dart @@ -226,7 +226,6 @@ Future initializeEngineUi() async { _initializationState = DebugEngineInitializationState.initializingUi; RawKeyboard.initialize(onMacOs: operatingSystem == OperatingSystem.macOs); - MouseCursor.initialize(); ensureFlutterViewEmbedderInitialized(); _initializationState = DebugEngineInitializationState.initialized; } diff --git a/lib/web_ui/lib/src/engine/mouse_cursor.dart b/lib/web_ui/lib/src/engine/mouse/cursor.dart similarity index 73% rename from lib/web_ui/lib/src/engine/mouse_cursor.dart rename to lib/web_ui/lib/src/engine/mouse/cursor.dart index 0ccfbed03b129..589891173b5fe 100644 --- a/lib/web_ui/lib/src/engine/mouse_cursor.dart +++ b/lib/web_ui/lib/src/engine/mouse/cursor.dart @@ -2,23 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'embedder.dart'; -import 'util.dart'; +import '../dom.dart'; -/// Provides mouse cursor bindings, such as the `flutter/mousecursor` channel. +/// Controls the mouse cursor in the given [element]. class MouseCursor { - MouseCursor._(); + MouseCursor(this.element); - /// Initializes the [MouseCursor] singleton. - /// - /// Use the [instance] getter to get the singleton after calling this method. - static void initialize() { - _instance ??= MouseCursor._(); - } - - /// The [MouseCursor] singleton. - static MouseCursor? get instance => _instance; - static MouseCursor? _instance; + final DomElement element; // Map from Flutter's kind values to CSS's cursor values. // @@ -61,15 +51,12 @@ class MouseCursor { 'zoomIn': 'zoom-in', 'zoomOut': 'zoom-out', }; + static String _mapKindToCssValue(String? kind) { return _kindToCssValueMap[kind] ?? 'default'; } void activateSystemCursor(String? kind) { - setElementStyle( - flutterViewEmbedder.flutterViewElement, - 'cursor', - _mapKindToCssValue(kind), - ); + element.style.cursor = _mapKindToCssValue(kind); } } diff --git a/lib/web_ui/lib/src/engine/platform_dispatcher.dart b/lib/web_ui/lib/src/engine/platform_dispatcher.dart index 89bbab28f046b..424346aafd548 100644 --- a/lib/web_ui/lib/src/engine/platform_dispatcher.dart +++ b/lib/web_ui/lib/src/engine/platform_dispatcher.dart @@ -171,7 +171,7 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher { /// * [PlatformDisptacher.views] for a list of all [FlutterView]s provided /// by the platform. @override - ui.FlutterView? get implicitView => viewData[kImplicitViewId]; + EngineFlutterWindow? get implicitView => viewData[kImplicitViewId] as EngineFlutterWindow?; /// A callback that is invoked whenever the platform's [devicePixelRatio], /// [physicalSize], [padding], [viewInsets], or [systemGestureInsets] @@ -505,10 +505,7 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher { // TODO(a-wallen): As multi-window support expands, the pop call // will need to include the view ID. Right now only one view is // supported. - (viewData[kImplicitViewId]! as EngineFlutterWindow) - .browserHistory - .exit() - .then((_) { + implicitView!.browserHistory.exit().then((_) { replyToPlatformMessage( callback, codec.encodeSuccessEnvelope(true)); }); @@ -585,7 +582,7 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher { final Map arguments = decoded.arguments as Map; switch (decoded.method) { case 'activateSystemCursor': - MouseCursor.instance!.activateSystemCursor(arguments.tryString('kind')); + implicitView!.mouseCursor.activateSystemCursor(arguments.tryString('kind')); } return; @@ -618,9 +615,7 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher { // TODO(a-wallen): As multi-window support expands, the navigation call // will need to include the view ID. Right now only one view is // supported. - (viewData[kImplicitViewId]! as EngineFlutterWindow) - .handleNavigationMessage(data) - .then((bool handled) { + implicitView!.handleNavigationMessage(data).then((bool handled) { if (handled) { const MethodCodec codec = JSONMethodCodec(); replyToPlatformMessage(callback, codec.encodeSuccessEnvelope(true)); @@ -1231,8 +1226,7 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher { /// requests from the embedder. @override String get defaultRouteName { - return _defaultRouteName ??= - (viewData[kImplicitViewId]! as EngineFlutterWindow).browserHistory.currentPath; + return _defaultRouteName ??= implicitView!.browserHistory.currentPath; } /// Lazily initialized when the `defaultRouteName` getter is invoked. diff --git a/lib/web_ui/lib/src/engine/window.dart b/lib/web_ui/lib/src/engine/window.dart index 47a1215fd1f9b..0dd502def1627 100644 --- a/lib/web_ui/lib/src/engine/window.dart +++ b/lib/web_ui/lib/src/engine/window.dart @@ -16,6 +16,8 @@ import 'package:ui/ui_web/src/ui_web.dart' as ui_web; import '../engine.dart' show DimensionsProvider, registerHotRestartListener, renderer; import 'display.dart'; import 'dom.dart'; +import 'embedder.dart'; +import 'mouse/cursor.dart'; import 'navigation/history.dart'; import 'platform_dispatcher.dart'; import 'services.dart'; @@ -29,8 +31,17 @@ const bool debugPrintPlatformMessages = false; /// The view ID for the implicit flutter view provided by the platform. const int kImplicitViewId = 0; +/// Represents all views in the Flutter Web Engine. +/// +/// In addition to everything defined in [ui.FlutterView], this class adds +/// a few web-specific properties. +abstract interface class EngineFlutterView extends ui.FlutterView { + MouseCursor get mouseCursor; + DomElement get rootElement; +} + /// The Web implementation of [ui.SingletonFlutterWindow]. -class EngineFlutterWindow extends ui.SingletonFlutterWindow { +class EngineFlutterWindow extends ui.SingletonFlutterWindow implements EngineFlutterView { EngineFlutterWindow(this.viewId, this.platformDispatcher) { platformDispatcher.viewData[viewId] = this; platformDispatcher.windowConfigurations[viewId] = const ViewConfiguration(); @@ -53,6 +64,12 @@ class EngineFlutterWindow extends ui.SingletonFlutterWindow { @override final EnginePlatformDispatcher platformDispatcher; + @override + late final MouseCursor mouseCursor = MouseCursor(rootElement); + + @override + DomElement get rootElement => flutterViewEmbedder.flutterViewElement; + /// Handles the browser history integration to allow users to use the back /// button, etc. BrowserHistory get browserHistory { diff --git a/lib/web_ui/test/canvaskit/initialization/services_vs_ui_test.dart b/lib/web_ui/test/canvaskit/initialization/services_vs_ui_test.dart index 8f6d74cc09469..f4adbc5398af2 100644 --- a/lib/web_ui/test/canvaskit/initialization/services_vs_ui_test.dart +++ b/lib/web_ui/test/canvaskit/initialization/services_vs_ui_test.dart @@ -17,7 +17,6 @@ void testMain() { expect(findGlassPane(), isNull); expect(RawKeyboard.instance, isNull); - expect(MouseCursor.instance, isNull); expect(KeyboardBinding.instance, isNull); expect(PointerBinding.instance, isNull); @@ -28,7 +27,6 @@ void testMain() { expect(findGlassPane(), isNull); expect(RawKeyboard.instance, isNull); - expect(MouseCursor.instance, isNull); expect(KeyboardBinding.instance, isNull); expect(PointerBinding.instance, isNull); @@ -36,7 +34,6 @@ void testMain() { await initializeEngineUi(); expect(findGlassPane(), isNotNull); expect(RawKeyboard.instance, isNotNull); - expect(MouseCursor.instance, isNotNull); expect(KeyboardBinding.instance, isNotNull); expect(PointerBinding.instance, isNotNull); }); diff --git a/lib/web_ui/test/engine/mouse/cursor_test.dart b/lib/web_ui/test/engine/mouse/cursor_test.dart new file mode 100644 index 0000000000000..f81012ba61efa --- /dev/null +++ b/lib/web_ui/test/engine/mouse/cursor_test.dart @@ -0,0 +1,40 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:test/bootstrap/browser.dart'; +import 'package:test/test.dart'; +import 'package:ui/src/engine.dart'; + +void main() { + internalBootstrapBrowserTest(() => testMain); +} + +void testMain() { + group('$MouseCursor', () { + test('sets correct `cursor` style on root element', () { + final DomElement rootViewElement = createDomElement('div'); + final MouseCursor mouseCursor = MouseCursor(rootViewElement); + + mouseCursor.activateSystemCursor('alias'); + expect(rootViewElement.style.cursor, 'alias'); + + mouseCursor.activateSystemCursor('move'); + expect(rootViewElement.style.cursor, 'move'); + + mouseCursor.activateSystemCursor('precise'); + expect(rootViewElement.style.cursor, 'crosshair'); + + mouseCursor.activateSystemCursor('resizeDownRight'); + expect(rootViewElement.style.cursor, 'se-resize'); + }); + + test('handles unknown cursor type', () { + final DomElement rootViewElement = createDomElement('div'); + final MouseCursor mouseCursor = MouseCursor(rootViewElement); + + mouseCursor.activateSystemCursor('unknown'); + expect(rootViewElement.style.cursor, 'default'); + }); + }); +} From 7a5ed32b5f65f74f483d045d55d6535b90845c3f Mon Sep 17 00:00:00 2001 From: Mouad Debbar Date: Mon, 18 Sep 2023 11:43:08 -0400 Subject: [PATCH 107/859] [web] ScreenOrientation singleton (#45304) One more piece moving out of `FlutterViewEmbedder`. `ScreenOrientation` is a singleton class that can be used to control the screen orientation of the browser. Part of https://github.com/flutter/flutter/issues/134443 --- lib/web_ui/lib/src/engine/display.dart | 75 +++++++++++++++++++ lib/web_ui/lib/src/engine/embedder.dart | 74 ------------------ .../lib/src/engine/platform_dispatcher.dart | 2 +- lib/web_ui/test/engine/window_test.dart | 10 +-- 4 files changed, 81 insertions(+), 80 deletions(-) diff --git a/lib/web_ui/lib/src/engine/display.dart b/lib/web_ui/lib/src/engine/display.dart index dd05733025aef..1264b49865b09 100644 --- a/lib/web_ui/lib/src/engine/display.dart +++ b/lib/web_ui/lib/src/engine/display.dart @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +import 'dart:async'; + import 'package:ui/ui.dart' as ui; import '../engine.dart'; @@ -59,3 +61,76 @@ class EngineFlutterDisplay extends ui.Display { double? _debugDevicePixelRatioOverride; } + +/// Controls the screen orientation using the browser's screen orientation API. +class ScreenOrientation { + const ScreenOrientation(); + + static ScreenOrientation get instance => _instance; + static const ScreenOrientation _instance = ScreenOrientation(); + + static const String lockTypeAny = 'any'; + static const String lockTypeNatural = 'natural'; + static const String lockTypeLandscape = 'landscape'; + static const String lockTypePortrait = 'portrait'; + static const String lockTypePortraitPrimary = 'portrait-primary'; + static const String lockTypePortraitSecondary = 'portrait-secondary'; + static const String lockTypeLandscapePrimary = 'landscape-primary'; + static const String lockTypeLandscapeSecondary = 'landscape-secondary'; + + /// Sets preferred screen orientation. + /// + /// Specifies the set of orientations the application interface can be + /// displayed in. + /// + /// The [orientations] argument is a list of DeviceOrientation values. + /// The empty list uses Screen unlock api and causes the application to + /// defer to the operating system default. + /// + /// See w3c screen api: https://www.w3.org/TR/screen-orientation/ + Future setPreferredOrientation(List orientations) async { + final DomScreen? screen = domWindow.screen; + if (screen != null) { + final DomScreenOrientation? screenOrientation = screen.orientation; + if (screenOrientation != null) { + if (orientations.isEmpty) { + screenOrientation.unlock(); + return true; + } else { + final String? lockType = + _deviceOrientationToLockType(orientations.first as String?); + if (lockType != null) { + try { + await screenOrientation.lock(lockType); + return true; + } catch (_) { + // On Chrome desktop an error with 'not supported on this device + // error' is fired. + return Future.value(false); + } + } + } + } + } + // API is not supported on this browser return false. + return false; + } + + // Converts device orientation to w3c OrientationLockType enum. + // + // See also: https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation/lock + static String? _deviceOrientationToLockType(String? deviceOrientation) { + switch (deviceOrientation) { + case 'DeviceOrientation.portraitUp': + return lockTypePortraitPrimary; + case 'DeviceOrientation.portraitDown': + return lockTypePortraitSecondary; + case 'DeviceOrientation.landscapeLeft': + return lockTypeLandscapePrimary; + case 'DeviceOrientation.landscapeRight': + return lockTypeLandscapeSecondary; + default: + return null; + } + } +} diff --git a/lib/web_ui/lib/src/engine/embedder.dart b/lib/web_ui/lib/src/engine/embedder.dart index 623d6aa9bdd1c..aced6b1ba0c84 100644 --- a/lib/web_ui/lib/src/engine/embedder.dart +++ b/lib/web_ui/lib/src/engine/embedder.dart @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:async'; - import 'package:ui/src/engine/safe_browser_api.dart'; import 'package:ui/ui.dart' as ui; @@ -288,78 +286,6 @@ class FlutterViewEmbedder { } } - static const String orientationLockTypeAny = 'any'; - static const String orientationLockTypeNatural = 'natural'; - static const String orientationLockTypeLandscape = 'landscape'; - static const String orientationLockTypePortrait = 'portrait'; - static const String orientationLockTypePortraitPrimary = 'portrait-primary'; - static const String orientationLockTypePortraitSecondary = - 'portrait-secondary'; - static const String orientationLockTypeLandscapePrimary = 'landscape-primary'; - static const String orientationLockTypeLandscapeSecondary = - 'landscape-secondary'; - - /// Sets preferred screen orientation. - /// - /// Specifies the set of orientations the application interface can be - /// displayed in. - /// - /// The [orientations] argument is a list of DeviceOrientation values. - /// The empty list uses Screen unlock api and causes the application to - /// defer to the operating system default. - /// - /// See w3c screen api: https://www.w3.org/TR/screen-orientation/ - Future setPreferredOrientation(List orientations) { - final DomScreen? screen = domWindow.screen; - if (screen != null) { - final DomScreenOrientation? screenOrientation = screen.orientation; - if (screenOrientation != null) { - if (orientations.isEmpty) { - screenOrientation.unlock(); - return Future.value(true); - } else { - final String? lockType = - _deviceOrientationToLockType(orientations.first as String?); - if (lockType != null) { - final Completer completer = Completer(); - try { - screenOrientation.lock(lockType).then((dynamic _) { - completer.complete(true); - }).catchError((dynamic error) { - // On Chrome desktop an error with 'not supported on this device - // error' is fired. - completer.complete(false); - }); - } catch (_) { - return Future.value(false); - } - return completer.future; - } - } - } - } - // API is not supported on this browser return false. - return Future.value(false); - } - - // Converts device orientation to w3c OrientationLockType enum. - // - // See also: https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation/lock - static String? _deviceOrientationToLockType(String? deviceOrientation) { - switch (deviceOrientation) { - case 'DeviceOrientation.portraitUp': - return orientationLockTypePortraitPrimary; - case 'DeviceOrientation.portraitDown': - return orientationLockTypePortraitSecondary; - case 'DeviceOrientation.landscapeLeft': - return orientationLockTypeLandscapePrimary; - case 'DeviceOrientation.landscapeRight': - return orientationLockTypeLandscapeSecondary; - default: - return null; - } - } - /// Add an element as a global resource to be referenced by CSS. /// /// This call create a global resource host element on demand and either diff --git a/lib/web_ui/lib/src/engine/platform_dispatcher.dart b/lib/web_ui/lib/src/engine/platform_dispatcher.dart index 424346aafd548..e2ddae4ff0e0a 100644 --- a/lib/web_ui/lib/src/engine/platform_dispatcher.dart +++ b/lib/web_ui/lib/src/engine/platform_dispatcher.dart @@ -532,7 +532,7 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher { return; case 'SystemChrome.setPreferredOrientations': final List arguments = decoded.arguments as List; - flutterViewEmbedder.setPreferredOrientation(arguments).then((bool success) { + ScreenOrientation.instance.setPreferredOrientation(arguments).then((bool success) { replyToPlatformMessage( callback, codec.encodeSuccessEnvelope(success)); }); diff --git a/lib/web_ui/test/engine/window_test.dart b/lib/web_ui/test/engine/window_test.dart index df39afb17adde..ff93016a59056 100644 --- a/lib/web_ui/test/engine/window_test.dart +++ b/lib/web_ui/test/engine/window_test.dart @@ -358,25 +358,25 @@ Future testMain() async { unlockCount = 0; expect(await sendSetPreferredOrientations(['DeviceOrientation.portraitUp']), isTrue); - expect(lockCalls, [FlutterViewEmbedder.orientationLockTypePortraitPrimary]); + expect(lockCalls, [ScreenOrientation.lockTypePortraitPrimary]); expect(unlockCount, 0); lockCalls.clear(); unlockCount = 0; expect(await sendSetPreferredOrientations(['DeviceOrientation.portraitDown']), isTrue); - expect(lockCalls, [FlutterViewEmbedder.orientationLockTypePortraitSecondary]); + expect(lockCalls, [ScreenOrientation.lockTypePortraitSecondary]); expect(unlockCount, 0); lockCalls.clear(); unlockCount = 0; expect(await sendSetPreferredOrientations(['DeviceOrientation.landscapeLeft']), isTrue); - expect(lockCalls, [FlutterViewEmbedder.orientationLockTypeLandscapePrimary]); + expect(lockCalls, [ScreenOrientation.lockTypeLandscapePrimary]); expect(unlockCount, 0); lockCalls.clear(); unlockCount = 0; expect(await sendSetPreferredOrientations(['DeviceOrientation.landscapeRight']), isTrue); - expect(lockCalls, [FlutterViewEmbedder.orientationLockTypeLandscapeSecondary]); + expect(lockCalls, [ScreenOrientation.lockTypeLandscapeSecondary]); expect(unlockCount, 0); lockCalls.clear(); unlockCount = 0; @@ -389,7 +389,7 @@ Future testMain() async { simulateError = true; expect(await sendSetPreferredOrientations(['DeviceOrientation.portraitDown']), isFalse); - expect(lockCalls, [FlutterViewEmbedder.orientationLockTypePortraitSecondary]); + expect(lockCalls, [ScreenOrientation.lockTypePortraitSecondary]); expect(unlockCount, 0); js_util.setProperty(domWindow, 'screen', original); From 100b057668cfcf7e8f3c3bed7b6974eaaae4a274 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 18 Sep 2023 11:44:50 -0400 Subject: [PATCH 108/859] Roll Skia from f8065ca00d0c to 0c990ab9e097 (7 revisions) (#45979) https://skia.googlesource.com/skia.git/+log/f8065ca00d0c..0c990ab9e097 2023-09-18 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll Dawn from d00d8da6f58d to 02233e019c4e (69 revisions) 2023-09-18 robertphillips@google.com [graphite] Implement AddBlendModeColorFilter with the Blend helper 2023-09-18 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll vulkan-deps from dc9947ad4d2b to 53e6e021f9b7 (2 revisions) 2023-09-18 kjlubick@google.com Avoid direct call from SkPictureData -> Slug 2023-09-18 johnstiles@google.com Disable test PixelLocalStorage.sksl temporarily. 2023-09-18 skia-autoroll@skia-public.iam.gserviceaccount.com Roll skottie-base from 3d8e63c59919 to ac643e8ecce3 2023-09-18 kjlubick@google.com Remove shim includes If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/DEPS b/DEPS index 3bd3d66fa1469..daa1e2c5d4c4e 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'f8065ca00d0c705946a661709d0f7bc89bad5df5', + 'skia_revision': '0c990ab9e0978c2c420d3be8ce090a4c337a9873', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 3b2a311a4db88..acf3f9a464c3d 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: e281489f609447ee79807afc583df6a9 +Signature: bab5aca18f538f50b4b23ee8fbf37d3b ==================================================================================================== LIBRARY: etc1 @@ -8791,8 +8791,6 @@ ORIGIN: ../../../third_party/skia/include/codec/SkRawDecoder.h + ../../../third_ ORIGIN: ../../../third_party/skia/include/codec/SkWbmpDecoder.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/codec/SkWebpDecoder.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/core/SkColorTable.h + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/include/core/SkEncodedImageFormat.h + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/include/core/SkICC.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/core/SkPoint.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/core/SkTextureCompressionType.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/core/SkTiledImageUtils.h + ../../../third_party/skia/LICENSE @@ -9010,7 +9008,7 @@ ORIGIN: ../../../third_party/skia/src/sksl/tracing/SkSLTraceHook.h + ../../../th ORIGIN: ../../../third_party/skia/src/sksl/transform/SkSLHoistSwitchVarDeclarationsAtTopLevel.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/sksl/transform/SkSLRewriteIndexedSwizzle.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/text/EmptyMailboxImpl.cpp + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/src/text/EmptySlugImpl.cpp + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/text/SlugFromBuffer.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/text/TextBlobMailbox.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/text/gpu/SlugImpl.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/text/gpu/SlugImpl.h + ../../../third_party/skia/LICENSE @@ -9053,8 +9051,6 @@ FILE: ../../../third_party/skia/include/codec/SkRawDecoder.h FILE: ../../../third_party/skia/include/codec/SkWbmpDecoder.h FILE: ../../../third_party/skia/include/codec/SkWebpDecoder.h FILE: ../../../third_party/skia/include/core/SkColorTable.h -FILE: ../../../third_party/skia/include/core/SkEncodedImageFormat.h -FILE: ../../../third_party/skia/include/core/SkICC.h FILE: ../../../third_party/skia/include/core/SkPoint.h FILE: ../../../third_party/skia/include/core/SkTextureCompressionType.h FILE: ../../../third_party/skia/include/core/SkTiledImageUtils.h @@ -9272,7 +9268,7 @@ FILE: ../../../third_party/skia/src/sksl/tracing/SkSLTraceHook.h FILE: ../../../third_party/skia/src/sksl/transform/SkSLHoistSwitchVarDeclarationsAtTopLevel.cpp FILE: ../../../third_party/skia/src/sksl/transform/SkSLRewriteIndexedSwizzle.cpp FILE: ../../../third_party/skia/src/text/EmptyMailboxImpl.cpp -FILE: ../../../third_party/skia/src/text/EmptySlugImpl.cpp +FILE: ../../../third_party/skia/src/text/SlugFromBuffer.cpp FILE: ../../../third_party/skia/src/text/TextBlobMailbox.h FILE: ../../../third_party/skia/src/text/gpu/SlugImpl.cpp FILE: ../../../third_party/skia/src/text/gpu/SlugImpl.h From c3c1c414f7428a5d521de296ca866559a19bbd53 Mon Sep 17 00:00:00 2001 From: LongCatIsLooong <31859944+LongCatIsLooong@users.noreply.github.com> Date: Mon, 18 Sep 2023 10:18:57 -0700 Subject: [PATCH 109/859] [iOS] Remove selectionDidChange call in UndoManager (#45657) Fixes https://github.com/flutter/flutter/issues/133424 The `-[TextInputDelegate selectionDidChange:]` call actually triggers some unwanted keyboard NLP actions that generate a bunch of candidates and automatically accept the first candidate. This causes `-[UITextInput setMarkedText:selection]` to be called with the first candidate and that inserts extraneous characters after the user types certain characters on the iPad software keyboard. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- .../Source/FlutterUndoManagerPlugin.mm | 6 ++--- .../Source/FlutterUndoManagerPluginTest.mm | 25 ++++++++++++++++++- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/shell/platform/darwin/ios/framework/Source/FlutterUndoManagerPlugin.mm b/shell/platform/darwin/ios/framework/Source/FlutterUndoManagerPlugin.mm index 488704ea4aeb9..b8f4b65f0f561 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterUndoManagerPlugin.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterUndoManagerPlugin.mm @@ -104,9 +104,9 @@ - (void)setUndoState:(NSDictionary*)dictionary API_AVAILABLE(ios(9.0)) { // This is needed to notify the iPadOS keyboard that it needs to update the // state of the UIBarButtons. Otherwise, the state changes to NSUndoManager // will not show up until the next keystroke (or other trigger). - id inputDelegate = - _viewController.engine.textInputPlugin.textInputView.inputDelegate; - [inputDelegate selectionDidChange:_viewController.engine.textInputPlugin.textInputView]; + UITextInputAssistantItem* assistantItem = + _viewController.engine.textInputPlugin.textInputView.inputAssistantItem; + assistantItem.leadingBarButtonGroups = assistantItem.leadingBarButtonGroups; } [self undoManager].groupsByEvent = groupsByEvent; } diff --git a/shell/platform/darwin/ios/framework/Source/FlutterUndoManagerPluginTest.mm b/shell/platform/darwin/ios/framework/Source/FlutterUndoManagerPluginTest.mm index 24f9bba023582..c9edad986370e 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterUndoManagerPluginTest.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterUndoManagerPluginTest.mm @@ -10,11 +10,13 @@ #import "flutter/shell/platform/darwin/common/framework/Headers/FlutterMacros.h" #import "flutter/shell/platform/darwin/ios/framework/Headers/FlutterEngine.h" #import "flutter/shell/platform/darwin/ios/framework/Headers/FlutterViewController.h" +#import "flutter/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.h" FLUTTER_ASSERT_ARC @interface FlutterEngine () - (nonnull FlutterUndoManagerPlugin*)undoManagerPlugin; +- (nonnull FlutterTextInputPlugin*)textInputPlugin; @end @interface FlutterUndoManagerPluginForTest : FlutterUndoManagerPlugin @@ -50,7 +52,6 @@ - (void)setUp { - (void)tearDown { [self.undoManager removeAllActionsWithTarget:self.undoManagerPlugin]; - self.undoManagerPlugin = nil; self.engine = nil; self.viewController = nil; self.undoManager = nil; @@ -140,4 +141,26 @@ - (void)testSetUndoState { XCTAssertEqual(2, delegateRedoCount); } +- (void)testSetUndoStateDoesInteractWithInputDelegate { + // Regression test for https://github.com/flutter/flutter/issues/133424 + FlutterViewController* viewController = OCMPartialMock(self.viewController); + self.undoManagerPlugin.viewController = self.viewController; + + FlutterTextInputPlugin* textInputPlugin = OCMClassMock([FlutterTextInputPlugin class]); + FlutterTextInputView* textInputView = OCMClassMock([FlutterTextInputView class]); + + OCMStub([viewController engine]).andReturn(self.engine); + OCMStub([self.engine textInputPlugin]).andReturn(textInputPlugin); + OCMStub([textInputPlugin textInputView]).andReturn(textInputView); + + FlutterMethodCall* setUndoStateCall = + [FlutterMethodCall methodCallWithMethodName:@"UndoManager.setUndoState" + arguments:@{@"canUndo" : @NO, @"canRedo" : @NO}]; + [self.undoManagerPlugin handleMethodCall:setUndoStateCall + result:^(id _Nullable result){ + }]; + + OCMVerify(never(), [textInputView inputDelegate]); +} + @end From 59d9a5b2e3358cca15a084aaf7dd82896e4e7c77 Mon Sep 17 00:00:00 2001 From: Brandon DeRosier Date: Mon, 18 Sep 2023 13:38:47 -0400 Subject: [PATCH 110/859] Bump impeller-cmake to HEAD. (#45953) Weekly bump. --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index daa1e2c5d4c4e..2c75ef643139e 100644 --- a/DEPS +++ b/DEPS @@ -932,7 +932,7 @@ deps = { }, 'src/third_party/impeller-cmake-example': { - 'url': Var('github_git') + '/bdero/impeller-cmake-example.git' + '@' + '1f606c40651029fd944236e5be64710a6ddb75de', + 'url': Var('github_git') + '/bdero/impeller-cmake-example.git' + '@' + 'c2286827ae68e3c2694410e0047cab42dac3312f', 'condition': 'download_impeller_cmake_example', }, From 00e9b5efe836b585d1609f73087a2f64dfcd2ead Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Mon, 18 Sep 2023 11:02:54 -0700 Subject: [PATCH 111/859] [ios] use python script to generate extension safe frameworks and code sign them (#45781) Generates the fat framework for extension safe variants and add them to the code sign list. Also reverts part of https://github.com/flutter/engine/pull/45664 where the variants are uploaded in separate archive. Now with this change, the extension safe is inside a "extension_safe" folder under existing archive. fixes https://github.com/flutter/flutter/issues/124291 The destination folder after this change: - An extension_safe folder is added, which includes the extension safe Flutter.frameworks and dsym - The artifacts.zip now includes the `extension_safe` except the dysm - A extension_safe_Flutter.dsym.zip is created (under ios/release/) , which includes the extension_safe/Flutter.dsym Screenshot 2023-09-13 at 3 26 23 PM [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- ci/builders/mac_ios_engine.json | 66 +------------------------- sky/tools/create_full_ios_framework.py | 52 +++++++++++++++++++- 2 files changed, 53 insertions(+), 65 deletions(-) diff --git a/ci/builders/mac_ios_engine.json b/ci/builders/mac_ios_engine.json index a8a4bb926462e..600f495929b0c 100644 --- a/ci/builders/mac_ios_engine.json +++ b/ci/builders/mac_ios_engine.json @@ -289,53 +289,6 @@ "script": "flutter/sky/tools/create_full_ios_framework.py", "language": "python3" }, - { - "name": "Debug-ios-Flutter-Extension-Safe.xcframework", - "parameters": [ - "--dst", - "out/debug_extension_safe", - "--arm64-out-dir", - "out/ios_debug_extension_safe", - "--simulator-x64-out-dir", - "out/ios_debug_sim_extension_safe", - "--simulator-arm64-out-dir", - "out/ios_debug_sim_arm64_extension_safe" - ], - "script": "flutter/sky/tools/create_full_ios_framework.py", - "language": "python3" - }, - { - "name": "Profile-ios-Flutter-Extension-Safe.xcframework", - "parameters": [ - "--dst", - "out/profile_extension_safe", - "--arm64-out-dir", - "out/ios_profile_extension_safe", - "--simulator-x64-out-dir", - "out/ios_debug_sim_extension_safe", - "--simulator-arm64-out-dir", - "out/ios_debug_sim_arm64_extension_safe" - ], - "script": "flutter/sky/tools/create_full_ios_framework.py", - "language": "python3" - }, - { - "name": "Release-ios-Flutter-Extension-Safe.xcframework", - "parameters": [ - "--dst", - "out/release_extension_safe", - "--arm64-out-dir", - "out/ios_release_extension_safe", - "--simulator-x64-out-dir", - "out/ios_debug_sim_extension_safe", - "--simulator-arm64-out-dir", - "out/ios_debug_sim_arm64_extension_safe", - "--dsym", - "--strip" - ], - "script": "flutter/sky/tools/create_full_ios_framework.py", - "language": "python3" - }, { "name": "Release-macos-gen-snapshots", "parameters": [ @@ -379,23 +332,8 @@ "realm": "production" }, { - "source": "out/debug_extension_safe/artifacts.zip", - "destination": "ios-extension-safe/artifacts.zip", - "realm": "production" - }, - { - "source": "out/profile_extension_safe/artifacts.zip", - "destination": "ios-profile-extension-safe/artifacts.zip", - "realm": "production" - }, - { - "source": "out/release_extension_safe/artifacts.zip", - "destination": "ios-release-extension-safe/artifacts.zip", - "realm": "production" - }, - { - "source": "out/release_extension_safe/Flutter.dSYM.zip", - "destination": "ios-release-extension-safe/Flutter.dSYM.zip", + "source": "out/release/extension_safe_Flutter.dSYM.zip", + "destination": "ios-release/extension_safe_Flutter.dSYM.zip", "realm": "production" } ] diff --git a/sky/tools/create_full_ios_framework.py b/sky/tools/create_full_ios_framework.py index 5858ddefb7b12..6aeaea94176b7 100644 --- a/sky/tools/create_full_ios_framework.py +++ b/sky/tools/create_full_ios_framework.py @@ -106,10 +106,49 @@ def main(): args, dst, framework, arm64_framework, simulator_framework, simulator_x64_framework, simulator_arm64_framework ) + + extension_safe_dst = os.path.join(dst, 'extension_safe') + create_extension_safe_framework( + args, extension_safe_dst, '%s_extension_safe' % arm64_out_dir, + '%s_extension_safe' % simulator_x64_out_dir, + '%s_extension_safe' % simulator_arm64_out_dir + ) + generate_gen_snapshot(args, dst, x64_out_dir, arm64_out_dir) zip_archive(dst) return 0 +def create_extension_safe_framework( # pylint: disable=too-many-arguments + args, dst, arm64_out_dir, simulator_x64_out_dir, simulator_arm64_out_dir +): + framework = os.path.join(dst, 'Flutter.framework') + simulator_framework = os.path.join(dst, 'sim', 'Flutter.framework') + arm64_framework = os.path.join(arm64_out_dir, 'Flutter.framework') + simulator_x64_framework = os.path.join( + simulator_x64_out_dir, 'Flutter.framework' + ) + simulator_arm64_framework = os.path.join( + simulator_arm64_out_dir, 'Flutter.framework' + ) + + if not os.path.isdir(arm64_framework): + print( + 'Cannot find extension safe iOS arm64 Framework at %s' % arm64_framework + ) + return 1 + + if not os.path.isdir(simulator_x64_framework): + print( + 'Cannot find extension safe iOS x64 simulator Framework at %s' % + simulator_x64_framework + ) + return 1 + + create_framework( + args, dst, framework, arm64_framework, simulator_framework, + simulator_x64_framework, simulator_arm64_framework + ) + return 0 def create_framework( # pylint: disable=too-many-arguments args, dst, framework, arm64_framework, simulator_framework, @@ -173,7 +212,9 @@ def zip_archive(dst): ios_file_with_entitlements = ['gen_snapshot_arm64'] ios_file_without_entitlements = [ 'Flutter.xcframework/ios-arm64/Flutter.framework/Flutter', - 'Flutter.xcframework/ios-arm64_x86_64-simulator/Flutter.framework/Flutter' + 'Flutter.xcframework/ios-arm64_x86_64-simulator/Flutter.framework/Flutter', + 'extension_safe/Flutter.xcframework/ios-arm64/Flutter.framework/Flutter', + 'extension_safe/Flutter.xcframework/ios-arm64_x86_64-simulator/Flutter.framework/Flutter' ] embed_codesign_configuration( os.path.join(dst, 'entitlements.txt'), ios_file_with_entitlements @@ -192,12 +233,21 @@ def zip_archive(dst): 'Flutter.xcframework', 'entitlements.txt', 'without_entitlements.txt', + 'extension_safe/Flutter.framework', + 'extension_safe/Flutter.xcframework', + 'extension_safe/sim', ], cwd=dst) if os.path.exists(os.path.join(dst, 'Flutter.dSYM')): subprocess.check_call(['zip', '-r', 'Flutter.dSYM.zip', 'Flutter.dSYM'], cwd=dst) + if os.path.exists(os.path.join(dst, 'extension_safe', 'Flutter.dSYM')): + subprocess.check_call([ + 'zip', '-r', 'extension_safe_Flutter.dSYM.zip', 'Flutter.dSYM' + ], + cwd=dst) + def process_framework(args, dst, framework, framework_binary): if args.dsym: From e93de4ff951e2245b1225650e01a4a1086aacff5 Mon Sep 17 00:00:00 2001 From: John McCutchan Date: Mon, 18 Sep 2023 12:34:10 -0700 Subject: [PATCH 112/859] Tighten up ImageReaderPlatformViewRenderTarget code (#45889) - Fix a missing Image close in an error path. - Ensure we close the Image when the TextureEntry is finalized. - Fix an inconsistency in the maxImages when running on Android < 33. - Wrap acquireLatestImage in a try block and return a null image instead of crashing the application. --- .../hardware_buffer_external_texture.cc | 2 ++ .../engine/renderer/FlutterRenderer.java | 13 ++++++++++++- .../ImageReaderPlatformViewRenderTarget.java | 19 ++++++++++++++----- 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/shell/platform/android/hardware_buffer_external_texture.cc b/shell/platform/android/hardware_buffer_external_texture.cc index 13d76e8d871ea..0b5d54a20785a 100644 --- a/shell/platform/android/hardware_buffer_external_texture.cc +++ b/shell/platform/android/hardware_buffer_external_texture.cc @@ -81,6 +81,8 @@ AHardwareBuffer* HardwareBufferExternalTexture::GetLatestHardwareBuffer() { NDKHelpers::AHardwareBuffer_fromHardwareBuffer( env, hardware_buffer_java.obj()); if (latest_hardware_buffer == nullptr) { + jni_facade_->HardwareBufferClose(hardware_buffer_java); + jni_facade_->ImageClose(image_java); return nullptr; } diff --git a/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java b/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java index f1faeab73e1ef..6a0f3686ec5c9 100644 --- a/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java +++ b/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java @@ -351,11 +351,16 @@ public long id() { } @Override + @TargetApi(19) public void release() { if (released) { return; } released = true; + if (image != null) { + image.close(); + image = null; + } unregisterTexture(id); } @@ -388,12 +393,18 @@ public Image acquireLatestImage() { } @Override + @TargetApi(19) protected void finalize() throws Throwable { try { if (released) { return; } - + if (image != null) { + // Be sure to finalize any cached image. + image.close(); + image = null; + } + released = true; handler.post(new TextureFinalizerRunnable(id, flutterJNI)); } finally { super.finalize(); diff --git a/shell/platform/android/io/flutter/plugin/platform/ImageReaderPlatformViewRenderTarget.java b/shell/platform/android/io/flutter/plugin/platform/ImageReaderPlatformViewRenderTarget.java index 655f7ee3bcc49..937b00c6ae899 100644 --- a/shell/platform/android/io/flutter/plugin/platform/ImageReaderPlatformViewRenderTarget.java +++ b/shell/platform/android/io/flutter/plugin/platform/ImageReaderPlatformViewRenderTarget.java @@ -9,6 +9,7 @@ import android.os.Build; import android.os.Handler; import android.view.Surface; +import io.flutter.Log; import io.flutter.view.TextureRegistry.ImageTextureEntry; @TargetApi(29) @@ -34,7 +35,12 @@ private void closeReader() { new ImageReader.OnImageAvailableListener() { @Override public void onImageAvailable(ImageReader reader) { - final Image image = reader.acquireLatestImage(); + Image image = null; + try { + image = reader.acquireLatestImage(); + } catch (IllegalStateException e) { + Log.e(TAG, "New image available that could not be acquired: " + e.toString()); + } if (image == null) { return; } @@ -49,10 +55,13 @@ protected ImageReader createImageReader33() { builder.setMaxImages(3); // Use PRIVATE image format so that we can support video decoding. // TODO(johnmccutchan): Should we always use PRIVATE here? It may impact our - // ability to read back texture data. If we don't always want to use it, how do we - // decide when to use it or not? Perhaps PlatformViews can indicate if they may contain + // ability to read back texture data. If we don't always want to use it, how do + // we + // decide when to use it or not? Perhaps PlatformViews can indicate if they may + // contain // DRM'd content. - // I need to investigate how PRIVATE impacts our ability to take screenshots or capture + // I need to investigate how PRIVATE impacts our ability to take screenshots or + // capture // the output of Flutter application. builder.setImageFormat(ImageFormat.PRIVATE); // Hint that consumed images will only be read by GPU. @@ -69,7 +78,7 @@ protected ImageReader createImageReader29() { bufferWidth, bufferHeight, ImageFormat.PRIVATE, - 2, + 3, HardwareBuffer.USAGE_GPU_SAMPLED_IMAGE); reader.setOnImageAvailableListener(this.onImageAvailableListener, onImageAvailableHandler); return reader; From 3416a40e37d11968279e006d89f3374c19f6d2e1 Mon Sep 17 00:00:00 2001 From: John McCutchan Date: Mon, 18 Sep 2023 12:36:16 -0700 Subject: [PATCH 113/859] Disable HardwareBuffer backed Platform Views temporarily (#45986) Necessary to unblock the GPay release --- .../io/flutter/plugin/platform/PlatformViewsController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java b/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java index b783128900e2c..b5559a3a9e23a 100644 --- a/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java +++ b/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java @@ -147,6 +147,8 @@ public class PlatformViewsController implements PlatformViewsAccessibilityDelega // Whether software rendering is used. private boolean usesSoftwareRendering = false; + private static boolean enableHardwareBufferRenderingTarget = false; + private final PlatformViewsChannel.PlatformViewsHandler channelHandler = new PlatformViewsChannel.PlatformViewsHandler() { @@ -968,7 +970,7 @@ private void unlockInputConnection(@NonNull VirtualDisplayController controller) private static PlatformViewRenderTarget makePlatformViewRenderTarget( TextureRegistry textureRegistry) { - if (Build.VERSION.SDK_INT >= 29) { + if (enableHardwareBufferRenderingTarget && Build.VERSION.SDK_INT >= 29) { final TextureRegistry.ImageTextureEntry textureEntry = textureRegistry.createImageTexture(); return new ImageReaderPlatformViewRenderTarget(textureEntry); } From a493a1ef744fd9ad234112418084569440427a8d Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Mon, 18 Sep 2023 15:09:33 -0700 Subject: [PATCH 114/859] Revert "[ios] use python script to generate extension safe frameworks and code sign them" (#46004) Reverts flutter/engine#45781 Issue with engine roll https://github.com/flutter/flutter/pull/134964. We need to update the conductor and performa manual roll. We also need to remove the Flutter.framework from the artifact.zip --- ci/builders/mac_ios_engine.json | 66 +++++++++++++++++++++++++- sky/tools/create_full_ios_framework.py | 52 +------------------- 2 files changed, 65 insertions(+), 53 deletions(-) diff --git a/ci/builders/mac_ios_engine.json b/ci/builders/mac_ios_engine.json index 600f495929b0c..a8a4bb926462e 100644 --- a/ci/builders/mac_ios_engine.json +++ b/ci/builders/mac_ios_engine.json @@ -289,6 +289,53 @@ "script": "flutter/sky/tools/create_full_ios_framework.py", "language": "python3" }, + { + "name": "Debug-ios-Flutter-Extension-Safe.xcframework", + "parameters": [ + "--dst", + "out/debug_extension_safe", + "--arm64-out-dir", + "out/ios_debug_extension_safe", + "--simulator-x64-out-dir", + "out/ios_debug_sim_extension_safe", + "--simulator-arm64-out-dir", + "out/ios_debug_sim_arm64_extension_safe" + ], + "script": "flutter/sky/tools/create_full_ios_framework.py", + "language": "python3" + }, + { + "name": "Profile-ios-Flutter-Extension-Safe.xcframework", + "parameters": [ + "--dst", + "out/profile_extension_safe", + "--arm64-out-dir", + "out/ios_profile_extension_safe", + "--simulator-x64-out-dir", + "out/ios_debug_sim_extension_safe", + "--simulator-arm64-out-dir", + "out/ios_debug_sim_arm64_extension_safe" + ], + "script": "flutter/sky/tools/create_full_ios_framework.py", + "language": "python3" + }, + { + "name": "Release-ios-Flutter-Extension-Safe.xcframework", + "parameters": [ + "--dst", + "out/release_extension_safe", + "--arm64-out-dir", + "out/ios_release_extension_safe", + "--simulator-x64-out-dir", + "out/ios_debug_sim_extension_safe", + "--simulator-arm64-out-dir", + "out/ios_debug_sim_arm64_extension_safe", + "--dsym", + "--strip" + ], + "script": "flutter/sky/tools/create_full_ios_framework.py", + "language": "python3" + }, { "name": "Release-macos-gen-snapshots", "parameters": [ @@ -332,8 +379,23 @@ "realm": "production" }, { - "source": "out/release/extension_safe_Flutter.dSYM.zip", - "destination": "ios-release/extension_safe_Flutter.dSYM.zip", + "source": "out/debug_extension_safe/artifacts.zip", + "destination": "ios-extension-safe/artifacts.zip", + "realm": "production" + }, + { + "source": "out/profile_extension_safe/artifacts.zip", + "destination": "ios-profile-extension-safe/artifacts.zip", + "realm": "production" + }, + { + "source": "out/release_extension_safe/artifacts.zip", + "destination": "ios-release-extension-safe/artifacts.zip", + "realm": "production" + }, + { + "source": "out/release_extension_safe/Flutter.dSYM.zip", + "destination": "ios-release-extension-safe/Flutter.dSYM.zip", "realm": "production" } ] diff --git a/sky/tools/create_full_ios_framework.py b/sky/tools/create_full_ios_framework.py index 6aeaea94176b7..5858ddefb7b12 100644 --- a/sky/tools/create_full_ios_framework.py +++ b/sky/tools/create_full_ios_framework.py @@ -106,49 +106,10 @@ def main(): args, dst, framework, arm64_framework, simulator_framework, simulator_x64_framework, simulator_arm64_framework ) - - extension_safe_dst = os.path.join(dst, 'extension_safe') - create_extension_safe_framework( - args, extension_safe_dst, '%s_extension_safe' % arm64_out_dir, - '%s_extension_safe' % simulator_x64_out_dir, - '%s_extension_safe' % simulator_arm64_out_dir - ) - generate_gen_snapshot(args, dst, x64_out_dir, arm64_out_dir) zip_archive(dst) return 0 -def create_extension_safe_framework( # pylint: disable=too-many-arguments - args, dst, arm64_out_dir, simulator_x64_out_dir, simulator_arm64_out_dir -): - framework = os.path.join(dst, 'Flutter.framework') - simulator_framework = os.path.join(dst, 'sim', 'Flutter.framework') - arm64_framework = os.path.join(arm64_out_dir, 'Flutter.framework') - simulator_x64_framework = os.path.join( - simulator_x64_out_dir, 'Flutter.framework' - ) - simulator_arm64_framework = os.path.join( - simulator_arm64_out_dir, 'Flutter.framework' - ) - - if not os.path.isdir(arm64_framework): - print( - 'Cannot find extension safe iOS arm64 Framework at %s' % arm64_framework - ) - return 1 - - if not os.path.isdir(simulator_x64_framework): - print( - 'Cannot find extension safe iOS x64 simulator Framework at %s' % - simulator_x64_framework - ) - return 1 - - create_framework( - args, dst, framework, arm64_framework, simulator_framework, - simulator_x64_framework, simulator_arm64_framework - ) - return 0 def create_framework( # pylint: disable=too-many-arguments args, dst, framework, arm64_framework, simulator_framework, @@ -212,9 +173,7 @@ def zip_archive(dst): ios_file_with_entitlements = ['gen_snapshot_arm64'] ios_file_without_entitlements = [ 'Flutter.xcframework/ios-arm64/Flutter.framework/Flutter', - 'Flutter.xcframework/ios-arm64_x86_64-simulator/Flutter.framework/Flutter', - 'extension_safe/Flutter.xcframework/ios-arm64/Flutter.framework/Flutter', - 'extension_safe/Flutter.xcframework/ios-arm64_x86_64-simulator/Flutter.framework/Flutter' + 'Flutter.xcframework/ios-arm64_x86_64-simulator/Flutter.framework/Flutter' ] embed_codesign_configuration( os.path.join(dst, 'entitlements.txt'), ios_file_with_entitlements @@ -233,21 +192,12 @@ def zip_archive(dst): 'Flutter.xcframework', 'entitlements.txt', 'without_entitlements.txt', - 'extension_safe/Flutter.framework', - 'extension_safe/Flutter.xcframework', - 'extension_safe/sim', ], cwd=dst) if os.path.exists(os.path.join(dst, 'Flutter.dSYM')): subprocess.check_call(['zip', '-r', 'Flutter.dSYM.zip', 'Flutter.dSYM'], cwd=dst) - if os.path.exists(os.path.join(dst, 'extension_safe', 'Flutter.dSYM')): - subprocess.check_call([ - 'zip', '-r', 'extension_safe_Flutter.dSYM.zip', 'Flutter.dSYM' - ], - cwd=dst) - def process_framework(args, dst, framework, framework_binary): if args.dsym: From 3066d43bbffa01d37f680f8f794b403c33b060ba Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Mon, 18 Sep 2023 15:34:27 -0700 Subject: [PATCH 115/859] Provide a default `--target-variant` for `clang_tidy`. (#45909) Using `engine_repo_tools`, provide a default `--target-variant` for the `clang_tidy` tool. Mostly test code added below, the major change is that `--target-variant` now has a default other than `host_debug` if we're running inside of an engine root (which we ~always are). I didn't make any other changes (i.e. to the pre-commit hook) to keep this change smallish. Also rewrote the `README.md` to represent the current state as best I could. --- tools/clang_tidy/README.md | 95 +++++++++- tools/clang_tidy/lib/clang_tidy.dart | 15 +- tools/clang_tidy/lib/src/options.dart | 163 ++++++++++-------- tools/clang_tidy/pubspec.yaml | 3 + tools/clang_tidy/test/clang_tidy_test.dart | 56 +++++- tools/githooks/pubspec.yaml | 4 +- .../lib/engine_repo_tools.dart | 139 ++++++++++++--- .../test/engine_repo_tools_test.dart | 4 +- 8 files changed, 356 insertions(+), 123 deletions(-) diff --git a/tools/clang_tidy/README.md b/tools/clang_tidy/README.md index 460ecbbfb7959..5c7fa9414fcde 100644 --- a/tools/clang_tidy/README.md +++ b/tools/clang_tidy/README.md @@ -1,15 +1,94 @@ # clang_tidy -This is a Dart program/library that runs clang_tidy over modified files in the Flutter engine repo. +A wrapper library and program that runs `clang_tidy` on the Flutter engine repo. -By default the linter runs on the repo files changed contained in `src/out/host_debug/compile_commands.json` command. -To check files other than in `host_debug` use `--target-variant android_debug_unopt`, -`--target-variant ios_debug_sim_unopt`, etc. +```shell +# Assuming you are in the `flutter` root of the engine repo. +dart ./tools/clang_tidy/bin/main.dart +``` + +By default, the linter runs over _modified_[^1] files in the _latest_[^2] build +of the engine. -Alternatively, use `--compile-commands` to specify a path to a `compile_commands.json` file. +A subset of checks can also be fixed automatically by passing `--fix`: +```shell +dart ./tools/clang_tidy/bin/main.dart --fix ``` -$ bin/main.dart --target-variant -$ bin/main.dart --compile-commands -$ bin/main.dart --help + +To configure what lints are enabled, see [`.clang-tidy`](../../.clang-tidy). + +> **💡 TIP**: If you're looking for the git pre-commit hook configuration, see +> [`githooks`](../githooks). + +## Advanced Usage + +Some common use cases are described below, or use `--help` to see all options. + +### Run with checks added or removed + +To run adding a check _not_ specified in `.clang-tidy`: + +```shell +dart ./tools/clang_tidy/bin/main.dart --checks="" ``` + +It's possible also to use wildcards to add multiple checks: + +```shell +dart ./tools/clang_tidy/bin/main.dart --checks="readability-*" +``` + +To remove a specific check: + +```shell +dart ./tools/clang_tidy/bin/main.dart --checks="-" +``` + +To remove multiple checks: + +```shell +dart ./tools/clang_tidy/bin/main.dart --checks="-readability-*" +``` + +To remove _all_ checks (usually to add a specific check): + +```shell +dart ./tools/clang_tidy/bin/main.dart --checks="-*," +``` + +### Specify a specific build + +There are some rules that are only applicable to certain builds, or to check +a difference in behavior between two builds. + +Use `--target-variant` to specify a build: + +```shell +dart ./tools/clang_tidy/bin/main.dart --target-variant +``` + +For example, to check the `android_debug_unopt` build: + +```shell +dart ./tools/clang_tidy/bin/main.dart --target-variant android_debug_unopt +``` + +In rarer cases, for example comparing two different checkouts of the engine, +use `--src-dir=`. + +### Lint entire repository + +When adding a new lint rule, or when checking lint rules that impact files that +have not changed. + +Use `--lint-all` to lint all files in the repo: + +```shell +dart ./tools/clang_tidy/bin/main.dart --lint-all +``` + +> **⚠️ WARNING**: This will take a long time to run. + +[^1]: Modified files are determined by a `git diff` command compared to `HEAD`. +[^2]: Latest build is the last updated directory in `src/out/`. diff --git a/tools/clang_tidy/lib/clang_tidy.dart b/tools/clang_tidy/lib/clang_tidy.dart index f54d3c78a15e2..e8cb4db6e9f9e 100644 --- a/tools/clang_tidy/lib/clang_tidy.dart +++ b/tools/clang_tidy/lib/clang_tidy.dart @@ -5,6 +5,7 @@ import 'dart:convert' show LineSplitter, jsonDecode; import 'dart:io' as io show File, stderr, stdout; +import 'package:engine_repo_tools/engine_repo_tools.dart'; import 'package:meta/meta.dart'; import 'package:path/path.dart' as path; import 'package:process/process.dart'; @@ -92,25 +93,29 @@ class ClangTidy { ), _outSink = outSink ?? io.stdout, _errSink = errSink ?? io.stderr, - _processManager = processManager; + _processManager = processManager, + _engine = null; /// Builds an instance of [ClangTidy] from a command line. ClangTidy.fromCommandLine( List args, { + Engine? engine, StringSink? outSink, StringSink? errSink, ProcessManager processManager = const LocalProcessManager(), }) : - options = Options.fromCommandLine(args, errSink: errSink), + options = Options.fromCommandLine(args, errSink: errSink, engine: engine), _outSink = outSink ?? io.stdout, _errSink = errSink ?? io.stderr, - _processManager = processManager; + _processManager = processManager, + _engine = engine; /// The [Options] that specify how this [ClangTidy] operates. final Options options; final StringSink _outSink; final StringSink _errSink; final ProcessManager _processManager; + final Engine? _engine; late final DateTime _startTime; @@ -119,12 +124,12 @@ class ClangTidy { _startTime = DateTime.now(); if (options.help) { - options.printUsage(); + options.printUsage(engine: _engine); return 0; } if (options.errorMessage != null) { - options.printUsage(message: options.errorMessage); + options.printUsage(message: options.errorMessage, engine: _engine); return 1; } diff --git a/tools/clang_tidy/lib/src/options.dart b/tools/clang_tidy/lib/src/options.dart index 401d34b8e81bc..dca4c3a3874e7 100644 --- a/tools/clang_tidy/lib/src/options.dart +++ b/tools/clang_tidy/lib/src/options.dart @@ -5,11 +5,10 @@ import 'dart:io' as io show Directory, File, Platform, stderr; import 'package:args/args.dart'; +import 'package:engine_repo_tools/engine_repo_tools.dart'; import 'package:path/path.dart' as path; -// Path to root of the flutter/engine repository containing this script. -final String _engineRoot = path.dirname(path.dirname(path.dirname(path.dirname(path.fromUri(io.Platform.script))))); - +final Engine _engineRoot = Engine.findWithin(path.dirname(path.fromUri(io.Platform.script))); /// Adds warnings as errors for only specific runs. This is helpful if migrating one platform at a time. String? _platformSpecificWarningsAsErrors(ArgResults options) { @@ -91,8 +90,13 @@ class Options { factory Options.fromCommandLine( List arguments, { StringSink? errSink, + Engine? engine, }) { - final ArgResults argResults = _argParser.parse(arguments); + // TODO(matanlurey): Refactor this further, ideally moving all of the engine + // resolution logic (i.e. --src-dir, --target-variant, --compile-commands) + // into a separate method, and perhaps also adding `engine.output(name)` + // to engine_repo_tools instead of path manipulation inlined below. + final ArgResults argResults = _argParser(defaultEngine: engine).parse(arguments); String? buildCommandsPath = argResults['compile-commands'] as String?; @@ -134,74 +138,85 @@ class Options { ); } - static final ArgParser _argParser = ArgParser() - ..addFlag( - 'help', - abbr: 'h', - help: 'Print help.', - negatable: false, - ) - ..addFlag( - 'lint-all', - help: 'Lint all of the sources, regardless of FLUTTER_NOLINT.', - ) - ..addFlag( - 'lint-head', - help: 'Lint files changed in the tip-of-tree commit.', - ) - ..addFlag( - 'fix', - help: 'Apply suggested fixes.', - ) - ..addFlag( - 'verbose', - help: 'Print verbose output.', - ) - ..addOption( - 'shard-id', - help: 'When used with the shard-commands option this identifies which shard will execute.', - valueHelp: 'A number less than 1 + the number of shard-commands arguments.', - ) - ..addOption( - 'shard-variants', - help: 'Comma separated list of other targets, this invocation ' - 'will only execute a subset of the intersection and the difference of the ' - 'compile commands. Use with `shard-id`.' - ) - ..addOption( - 'compile-commands', - help: 'Use the given path as the source of compile_commands.json. This ' - 'file is created by running "tools/gn". Cannot be used with --target-variant ' - 'or --src-dir.', - ) - ..addOption( - 'target-variant', - aliases: ['variant'], - help: 'The engine variant directory containing compile_commands.json ' - 'created by running "tools/gn". Cannot be used with --compile-commands.', - valueHelp: 'host_debug|android_debug_unopt|ios_debug|ios_debug_sim_unopt', - defaultsTo: 'host_debug', - ) - ..addOption('mac-host-warnings-as-errors', + static ArgParser _argParser({required Engine? defaultEngine}) { + defaultEngine ??= _engineRoot; + final io.Directory? latestBuild = defaultEngine.latestOutput()?.path; + return ArgParser() + ..addFlag( + 'help', + abbr: 'h', + help: 'Print help.', + negatable: false, + ) + ..addFlag( + 'lint-all', + help: 'Lint all of the sources, regardless of FLUTTER_NOLINT.', + ) + ..addFlag( + 'lint-head', + help: 'Lint files changed in the tip-of-tree commit.', + ) + ..addFlag( + 'fix', + help: 'Apply suggested fixes.', + ) + ..addFlag( + 'verbose', + help: 'Print verbose output.', + ) + ..addOption( + 'shard-id', + help: 'When used with the shard-commands option this identifies which shard will execute.', + valueHelp: 'A number less than 1 + the number of shard-commands arguments.', + ) + ..addOption( + 'shard-variants', + help: 'Comma separated list of other targets, this invocation ' + 'will only execute a subset of the intersection and the difference of the ' + 'compile commands. Use with `shard-id`.' + ) + ..addOption( + 'compile-commands', + help: 'Use the given path as the source of compile_commands.json. This ' + 'file is created by running "tools/gn". Cannot be used with --target-variant ' + 'or --src-dir.', + ) + ..addOption( + 'target-variant', + aliases: ['variant'], + help: 'The engine variant directory name containing compile_commands.json ' + 'created by running "tools/gn".\n\nIf not provided, the default is ' + 'the latest build in the engine defined by --src-dir (or the ' + 'default path, see --src-dir for details).\n\n' + 'Cannot be used with --compile-commands.', + valueHelp: 'host_debug|android_debug_unopt|ios_debug|ios_debug_sim_unopt', + defaultsTo: latestBuild == null ? 'host_debug' : path.basename(latestBuild.path), + ) + ..addOption('mac-host-warnings-as-errors', + help: + 'checks that will be treated as errors when running debug_host on mac.') + ..addOption( + 'src-dir', help: - 'checks that will be treated as errors when running debug_host on mac.') - ..addOption( - 'src-dir', - help: 'Path to the engine src directory. Cannot be used with --compile-commands.', - valueHelp: 'path/to/engine/src', - defaultsTo: path.dirname(_engineRoot), - ) - ..addOption( - 'checks', - help: 'Perform the given checks on the code. Defaults to the empty ' - 'string, indicating all checks should be performed.', - defaultsTo: '', - ) - ..addFlag( - 'enable-check-profile', - help: 'Enable per-check timing profiles and print a report to stderr.', - negatable: false, - ); + 'Path to the engine src directory.\n\n' + 'If not provided, the default is the engine root directory that ' + 'contains the `clang_tidy` tool.\n\n' + 'Cannot be used with --compile-commands.', + valueHelp: 'path/to/engine/src', + defaultsTo: _engineRoot.srcDir.path, + ) + ..addOption( + 'checks', + help: 'Perform the given checks on the code. Defaults to the empty ' + 'string, indicating all checks should be performed.', + defaultsTo: '', + ) + ..addFlag( + 'enable-check-profile', + help: 'Enable per-check timing profiles and print a report to stderr.', + negatable: false, + ); + } /// Whether to print a help message and exit. final bool help; @@ -219,7 +234,7 @@ class Options { final int? shardId; /// The root of the flutter/engine repository. - final io.Directory repoPath = io.Directory(_engineRoot); + final io.Directory repoPath = _engineRoot.flutterDir; /// Argument sent as `warnings-as-errors` to clang-tidy. final String? warningsAsErrors; @@ -249,7 +264,7 @@ class Options { final StringSink _errSink; /// Print command usage with an additional message. - void printUsage({String? message}) { + void printUsage({String? message, required Engine? engine}) { if (message != null) { _errSink.writeln(message); } @@ -257,7 +272,7 @@ class Options { 'Usage: bin/main.dart [--help] [--lint-all] [--lint-head] [--fix] [--verbose] ' '[--diff-branch] [--target-variant variant] [--src-dir path/to/engine/src]', ); - _errSink.writeln(_argParser.usage); + _errSink.writeln(_argParser(defaultEngine: engine).usage); } /// Command line argument validation. diff --git a/tools/clang_tidy/pubspec.yaml b/tools/clang_tidy/pubspec.yaml index e869ef5f41684..b06cd30247821 100644 --- a/tools/clang_tidy/pubspec.yaml +++ b/tools/clang_tidy/pubspec.yaml @@ -18,6 +18,7 @@ environment: dependencies: args: any + engine_repo_tools: any meta: any path: any process: any @@ -38,6 +39,8 @@ dependency_overrides: path: ../../../third_party/dart/pkg/async_helper collection: path: ../../../third_party/dart/third_party/pkg/collection + engine_repo_tools: + path: ../pkg/engine_repo_tools expect: path: ../../../third_party/dart/pkg/expect file: diff --git a/tools/clang_tidy/test/clang_tidy_test.dart b/tools/clang_tidy/test/clang_tidy_test.dart index 5fcdd984a73e0..4dbb39e2b125e 100644 --- a/tools/clang_tidy/test/clang_tidy_test.dart +++ b/tools/clang_tidy/test/clang_tidy_test.dart @@ -7,6 +7,7 @@ import 'dart:io' as io show Directory, File, Platform, stderr; import 'package:clang_tidy/clang_tidy.dart'; import 'package:clang_tidy/src/command.dart'; import 'package:clang_tidy/src/options.dart'; +import 'package:engine_repo_tools/engine_repo_tools.dart'; import 'package:litetest/litetest.dart'; import 'package:path/path.dart' as path; import 'package:process/process.dart'; @@ -19,6 +20,7 @@ final class Fixture { /// Simulates running the tool with the given [args]. factory Fixture.fromCommandLine(List args, { ProcessManager? processManager, + Engine? engine, }) { processManager ??= FakeProcessManager(); final StringBuffer outBuffer = StringBuffer(); @@ -28,6 +30,7 @@ final class Fixture { outSink: outBuffer, errSink: errBuffer, processManager: processManager, + engine: engine, ), errBuffer, outBuffer); } @@ -106,21 +109,58 @@ void _withTempFile(String prefix, void Function(String path) func) { } Future main(List args) async { - if (args.isEmpty) { + final String? buildCommands = + args.firstOrNull ?? + Engine.findWithin().latestOutput()?.compileCommandsJson.path; + + if (buildCommands == null || args.length > 1) { io.stderr.writeln( 'Usage: clang_tidy_test.dart [path/to/compile_commands.json]', ); return 1; } - final String buildCommands = args[0]; - test('--help gives help', () async { - final Fixture fixture = Fixture.fromCommandLine(['--help']); - final int result = await fixture.tool.run(); + test('--help gives help, and uses host_debug by default outside of an engine root', () async { + final io.Directory rootDir = io.Directory.systemTemp.createTempSync('clang_tidy_test'); + try { + final Fixture fixture = Fixture.fromCommandLine( + ['--help'], + engine: TestEngine.createTemp(rootDir: rootDir) + ); + final int result = await fixture.tool.run(); - expect(fixture.tool.options.help, isTrue); - expect(result, equals(0)); - expect(fixture.errBuffer.toString(), contains('Usage: ')); + expect(fixture.tool.options.help, isTrue); + expect(result, equals(0)); + + final String errors = fixture.errBuffer.toString(); + expect(errors, contains('Usage: ')); + expect(errors, contains('defaults to "host_debug"')); + } finally { + rootDir.deleteSync(recursive: true); + } + }); + + test('--help gives help, and uses the latest build by default outside in an engine root', () async { + final io.Directory rootDir = io.Directory.systemTemp.createTempSync('clang_tidy_test'); + final io.Directory buildDir = io.Directory(path.join(rootDir.path, 'out', 'host_debug_unopt_arm64'))..createSync(recursive: true); + try { + final Fixture fixture = Fixture.fromCommandLine( + ['--help'], + engine: TestEngine.createTemp(rootDir: rootDir, outputs: [ + TestOutput(buildDir), + ]) + ); + final int result = await fixture.tool.run(); + + expect(fixture.tool.options.help, isTrue); + expect(result, equals(0)); + + final String errors = fixture.errBuffer.toString(); + expect(errors, contains('Usage: ')); + expect(errors, contains('defaults to "host_debug_unopt_arm64"')); + } finally { + rootDir.deleteSync(recursive: true); + } }); test('trimmed clang-tidy output', () { diff --git a/tools/githooks/pubspec.yaml b/tools/githooks/pubspec.yaml index a0a6a9789b8cb..07d1820110b37 100644 --- a/tools/githooks/pubspec.yaml +++ b/tools/githooks/pubspec.yaml @@ -18,9 +18,9 @@ environment: dependencies: args: any + clang_tidy: any meta: any path: any - clang_tidy: any dev_dependencies: async_helper: any @@ -39,6 +39,8 @@ dependency_overrides: path: ../clang_tidy collection: path: ../../../third_party/dart/third_party/pkg/collection + engine_repo_tools: + path: ../pkg/engine_repo_tools expect: path: ../../../third_party/dart/pkg/expect file: diff --git a/tools/pkg/engine_repo_tools/lib/engine_repo_tools.dart b/tools/pkg/engine_repo_tools/lib/engine_repo_tools.dart index 820f1bf29045b..f52cf8a6c4329 100644 --- a/tools/pkg/engine_repo_tools/lib/engine_repo_tools.dart +++ b/tools/pkg/engine_repo_tools/lib/engine_repo_tools.dart @@ -35,6 +35,12 @@ import 'package:path/path.dart' as p; /// If you have a path to a directory within the `$ENGINE/src` directory, or /// want to use the current working directory, use [Engine.findWithin]. final class Engine { + const Engine._({ + required this.srcDir, + required this.flutterDir, + required this.outDir, + }); + /// Creates an [Engine] from a path such as `/Users/.../flutter/engine/src`. /// /// ```dart @@ -66,25 +72,44 @@ final class Engine { // don't want to fail if it doesn't exist. final io.Directory outDir = io.Directory(p.join(srcPath, 'out')); - return Engine._(srcDir, flutterDir, outDir); + return Engine._( + srcDir: srcDir, + flutterDir: flutterDir, + outDir: outDir, + ); } /// Creates an [Engine] by looking for a `src/` directory in the given path. /// + /// Similar to [tryFindWithin], but throws a [StateError] if the path is not + /// within a valid engine. This is useful for tools that require an engine + /// and do not have a reasonable fallback or recovery path. + factory Engine.findWithin([String? path]) { + final Engine? engine = tryFindWithin(path); + if (engine == null) { + throw StateError('The path "$path" is not within a valid engine.'); + } + return engine; + } + + /// Creates an [Engine] by looking for a `src/` directory in the given [path]. + /// /// ```dart /// // Use the current working directory. /// final Engine engine = Engine.findWithin(); /// print(engine.srcDir.path); // /Users/.../engine/src /// /// // Use a specific directory. - /// final Engine engine = Engine.findWithin('/Users/.../engine/src/foo/bar/baz'); + /// final Engine engine = Engine.findWithin('/Users/.../engine/src/foo/bar'); /// print(engine.srcDir.path); // /Users/.../engine/src /// ``` /// - /// If a path is not provided, the current working directory is used. + /// If a [path] is not provided, the current working directory is used. /// - /// Throws a [StateError] if the path is not within a valid engine. - factory Engine.findWithin([String? path]) { + /// If path does not exist, or is not a directory, an error is thrown. + /// + /// Returns `null` if the path is not within a valid engine. + static Engine? tryFindWithin([String? path]) { path ??= p.current; // Search parent directories for a `src` directory. @@ -105,17 +130,9 @@ final class Engine { maybeSrcDir = maybeSrcDir.parent; } while (maybeSrcDir.parent.path != maybeSrcDir.path /* at root */); - throw StateError( - 'The path "$path" is not within a Flutter engine source directory.' - ); + return null; } - const Engine._( - this.srcDir, - this.flutterDir, - this.outDir, - ); - /// The path to the `$ENGINE/src` directory. final io.Directory srcDir; @@ -145,12 +162,88 @@ final class Engine { return null; } outputs.sort((Output a, Output b) { - return b.dir.statSync().modified.compareTo(a.dir.statSync().modified); + return b.path.statSync().modified.compareTo(a.path.statSync().modified); }); return outputs.first; } } +/// An implementation of [Engine] that has pre-defined outputs for testing. +final class TestEngine extends Engine { + /// Creates a [TestEngine] with pre-defined paths. + /// + /// The [srcDir] and [flutterDir] must exist, but the [outDir] is optional. + /// + /// Optionally, provide a list of [outputs] to use, otherwise it is empty. + TestEngine.withPaths({ + required super.srcDir, + required super.flutterDir, + required super.outDir, + List outputs = const [], + }) : _outputs = outputs, super._() { + if (!srcDir.existsSync()) { + throw ArgumentError.value(srcDir, 'srcDir', 'does not exist'); + } + if (!flutterDir.existsSync()) { + throw ArgumentError.value(flutterDir, 'flutterDir', 'does not exist'); + } + } + + /// Creates a [TestEngine] within a temporary directory. + /// + /// The [rootDir] is the temporary directory that will contain the engine. + /// + /// Optionally, provide a list of [outputs] to use, otherwise it is empty. + factory TestEngine.createTemp({ + required io.Directory rootDir, + List outputs = const [], + }) { + final io.Directory srcDir = io.Directory(p.join(rootDir.path, 'src')); + final io.Directory flutterDir = io.Directory(p.join(srcDir.path, 'flutter')); + final io.Directory outDir = io.Directory(p.join(srcDir.path, 'out')); + srcDir.createSync(recursive: true); + flutterDir.createSync(recursive: true); + outDir.createSync(recursive: true); + return TestEngine.withPaths( + srcDir: srcDir, + flutterDir: flutterDir, + outDir: outDir, + outputs: outputs, + ); + } + + final List _outputs; + + @override + List outputs() => List.unmodifiable(_outputs); + + @override + Output? latestOutput() { + if (_outputs.isEmpty) { + return null; + } + _outputs.sort((TestOutput a, TestOutput b) { + return b.lastModified.compareTo(a.lastModified); + }); + return _outputs.first; + } +} + +/// An implementation of [Output] that has a pre-defined path for testing. +final class TestOutput extends Output { + /// Creates a [TestOutput] with a pre-defined path. + /// + /// Optionally, provide a [lastModified] date. + TestOutput(super.path, {DateTime? lastModified}) + : lastModified = lastModified ?? _defaultLastModified, + super._(); + + static final DateTime _defaultLastModified = DateTime.now(); + + /// The last modified date of the output target. + final DateTime lastModified; +} + /// Thrown when an [Engine] could not be created from a path. sealed class InvalidEngineException implements Exception { /// Thrown when an [Engine] was created from a path not ending in `src`. @@ -210,19 +303,15 @@ final class InvalidEngineMissingFlutterDirectoryException implements InvalidEngi /// Represents a single output target in the `$ENGINE/src/out` directory. final class Output { - const Output._(this.dir); + const Output._(this.path); /// The directory containing the output target. - final io.Directory dir; + final io.Directory path; - /// The `compile_commands.json` file for this output target. + /// The `compile_commands.json` file that should exist for this output target. /// - /// Returns `null` if the file does not exist. - io.File? get compileCommandsJson { - final io.File file = io.File(p.join(dir.path, 'compile_commands.json')); - if (!file.existsSync()) { - return null; - } - return file; + /// The file may not exist. + io.File get compileCommandsJson { + return io.File(p.join(path.path, 'compile_commands.json')); } } diff --git a/tools/pkg/engine_repo_tools/test/engine_repo_tools_test.dart b/tools/pkg/engine_repo_tools/test/engine_repo_tools_test.dart index 48c18210b304e..8e34590ba8118 100644 --- a/tools/pkg/engine_repo_tools/test/engine_repo_tools_test.dart +++ b/tools/pkg/engine_repo_tools/test/engine_repo_tools_test.dart @@ -187,7 +187,7 @@ void main() { io.Directory(p.join(emptyDir.path, 'src', 'out', 'host_debug_unopt_arm64')).createSync(recursive: true); final Engine engine = Engine.fromSrcPath(p.join(emptyDir.path, 'src')); - final List outputs = engine.outputs().map((Output o) => p.basename(o.dir.path)).toList()..sort(); + final List outputs = engine.outputs().map((Output o) => p.basename(o.path.path)).toList()..sort(); expect(outputs, [ 'host_debug', 'host_debug_unopt_arm64', @@ -218,7 +218,7 @@ void main() { final Engine engine = Engine.fromSrcPath(p.join(emptyDir.path, 'src')); final Output? latestOutput = engine.latestOutput(); expect(latestOutput, isNotNull); - expect(p.basename(latestOutput!.dir.path), 'host_debug_unopt_arm64'); + expect(p.basename(latestOutput!.path.path), 'host_debug_unopt_arm64'); expect(latestOutput.compileCommandsJson, isNotNull); } finally { tearDown(); From 6be792ade3f99a38e7b57a8833e3f0d79b851236 Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Mon, 18 Sep 2023 23:34:29 +0100 Subject: [PATCH 116/859] Revert "[Windows] Update vsync on raster thread (#45310)" (#46000) This also reverts the ANGLE roll (for which the original fix was landed) to 48e2c605adcd5bcc1622b18f357c7a73ebfb3543. fixes: https://github.com/flutter/flutter/issues/134262 This reverts commit 708d82dc8a95a58c0f44b5c5e6758048aeff192e. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- DEPS | 2 +- ci/licenses_golden/excluded_files | 2 - ci/licenses_golden/licenses_third_party | 44 ++++++------------- .../platform/windows/angle_surface_manager.cc | 7 --- .../platform/windows/flutter_windows_engine.h | 2 +- .../platform/windows/flutter_windows_view.cc | 7 +-- .../windows/flutter_windows_view_unittests.cc | 11 +---- 7 files changed, 18 insertions(+), 57 deletions(-) diff --git a/DEPS b/DEPS index 2c75ef643139e..c59de1fbaaaed 100644 --- a/DEPS +++ b/DEPS @@ -631,7 +631,7 @@ deps = { Var('swiftshader_git') + '/SwiftShader.git' + '@' + '5f9ed9b16931c7155171d31f75004f73f0a3abc8', 'src/third_party/angle': - Var('chromium_git') + '/angle/angle.git' + '@' + '48e2c605adcd5bcc1622b18f357c7a73ebfb3543', + Var('chromium_git') + '/angle/angle.git' + '@' + '6a09e41ce6ea8c93524faae1a925eb01562f53b1', 'src/third_party/vulkan_memory_allocator': Var('chromium_git') + '/external/github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator' + '@' + '7de5cc00de50e71a3aab22dea52fbb7ff4efceb6', diff --git a/ci/licenses_golden/excluded_files b/ci/licenses_golden/excluded_files index 41298f9154317..e8a291b37414e 100644 --- a/ci/licenses_golden/excluded_files +++ b/ci/licenses_golden/excluded_files @@ -991,7 +991,6 @@ ../../../third_party/angle/.git ../../../third_party/angle/.gitattributes ../../../third_party/angle/.gitignore -../../../third_party/angle/.gitmodules ../../../third_party/angle/.gn ../../../third_party/angle/.style.yapf ../../../third_party/angle/.vpython @@ -1130,7 +1129,6 @@ ../../../third_party/angle/src/third_party/ceval/package.json ../../../third_party/angle/src/third_party/libXNVCtrl/README.chromium ../../../third_party/angle/src/third_party/volk -../../../third_party/angle/testing ../../../third_party/angle/third_party ../../../third_party/angle/tools ../../../third_party/angle/util diff --git a/ci/licenses_golden/licenses_third_party b/ci/licenses_golden/licenses_third_party index 8570dd9030482..468830592f309 100644 --- a/ci/licenses_golden/licenses_third_party +++ b/ci/licenses_golden/licenses_third_party @@ -1,4 +1,4 @@ -Signature: d18c418247db94f3fad4810fc4ab16af +Signature: 0e74d276e12eb0bcc1bfbdbbfabc2574 ==================================================================================================== LIBRARY: angle @@ -42632,8 +42632,12 @@ ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/cgl/ContextCGL.cpp + ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/cgl/ContextCGL.h + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/cgl/DeviceCGL.cpp + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/cgl/DeviceCGL.h + ../../../third_party/angle/LICENSE +ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/cgl/RendererCGL.cpp + ../../../third_party/angle/LICENSE +ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/cgl/RendererCGL.h + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/egl/SyncEGL.cpp + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/egl/SyncEGL.h + ../../../third_party/angle/LICENSE +ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/glx/RendererGLX.cpp + ../../../third_party/angle/LICENSE +ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/glx/RendererGLX.h + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/BufferMtl.h + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/BufferMtl.mm + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/CompilerMtl.h + ../../../third_party/angle/LICENSE @@ -42819,8 +42823,12 @@ FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/cgl/ContextCGL.cpp FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/cgl/ContextCGL.h FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/cgl/DeviceCGL.cpp FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/cgl/DeviceCGL.h +FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/cgl/RendererCGL.cpp +FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/cgl/RendererCGL.h FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/egl/SyncEGL.cpp FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/egl/SyncEGL.h +FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/glx/RendererGLX.cpp +FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/glx/RendererGLX.h FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/BufferMtl.h FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/BufferMtl.mm FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/CompilerMtl.h @@ -43218,6 +43226,8 @@ ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/eagl/IOSurfaceSurfac ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/eagl/IOSurfaceSurfaceEAGL.mm + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/eagl/PbufferSurfaceEAGL.cpp + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/eagl/PbufferSurfaceEAGL.h + ../../../third_party/angle/LICENSE +ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/eagl/RendererEAGL.cpp + ../../../third_party/angle/LICENSE +ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/eagl/RendererEAGL.h + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/eagl/WindowSurfaceEAGL.h + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/eagl/WindowSurfaceEAGL.mm + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/glx/PixmapSurfaceGLX.cpp + ../../../third_party/angle/LICENSE @@ -43232,7 +43242,6 @@ ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/TransformFeedback ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/TransformFeedbackMtl.mm + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/file_hooking/shader_cache_file_hooking.cpp + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/mtl_format_table_autogen.mm + ../../../third_party/angle/LICENSE -ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/shaders/mtl_internal_shaders_autogen.metal + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/shaders/mtl_internal_shaders_ios_autogen.h + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/shaders/mtl_internal_shaders_macos_autogen.h + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/shaders/mtl_internal_shaders_src_autogen.h + ../../../third_party/angle/LICENSE @@ -43492,6 +43501,8 @@ FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/eagl/IOSurfaceSurfaceE FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/eagl/IOSurfaceSurfaceEAGL.mm FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/eagl/PbufferSurfaceEAGL.cpp FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/eagl/PbufferSurfaceEAGL.h +FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/eagl/RendererEAGL.cpp +FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/eagl/RendererEAGL.h FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/eagl/WindowSurfaceEAGL.h FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/eagl/WindowSurfaceEAGL.mm FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/glx/PixmapSurfaceGLX.cpp @@ -43506,7 +43517,6 @@ FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/TransformFeedbackMt FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/TransformFeedbackMtl.mm FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/file_hooking/shader_cache_file_hooking.cpp FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/mtl_format_table_autogen.mm -FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/shaders/mtl_internal_shaders_autogen.metal FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/shaders/mtl_internal_shaders_ios_autogen.h FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/shaders/mtl_internal_shaders_macos_autogen.h FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/shaders/mtl_internal_shaders_src_autogen.h @@ -44468,8 +44478,6 @@ LIBRARY: angle ORIGIN: ../../../third_party/angle/src/common/FixedQueue.h + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/common/platform_helpers.cpp + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/common/platform_helpers.h + ../../../third_party/angle/LICENSE -ORIGIN: ../../../third_party/angle/src/compiler/translator/tree_ops/RescopeGlobalVariables.cpp + ../../../third_party/angle/LICENSE -ORIGIN: ../../../third_party/angle/src/compiler/translator/tree_ops/RescopeGlobalVariables.h + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/compiler/translator/tree_ops/msl/RewriteInterpolants.cpp + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/compiler/translator/tree_ops/msl/RewriteInterpolants.h + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/compiler/translator/tree_ops/spirv/EmulateFramebufferFetch.cpp + ../../../third_party/angle/LICENSE @@ -44484,13 +44492,6 @@ ORIGIN: ../../../third_party/angle/src/libANGLE/context_private_call_gl.cpp + .. ORIGIN: ../../../third_party/angle/src/libANGLE/context_private_call_gl_autogen.h + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/libANGLE/context_private_call_gles.cpp + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/libANGLE/context_private_call_gles_autogen.h + ../../../third_party/angle/LICENSE -ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/ProgramExecutableImpl.h + ../../../third_party/angle/LICENSE -ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/d3d/ProgramExecutableD3D.cpp + ../../../third_party/angle/LICENSE -ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/d3d/ProgramExecutableD3D.h + ../../../third_party/angle/LICENSE -ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/ProgramExecutableGL.cpp + ../../../third_party/angle/LICENSE -ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/gl/ProgramExecutableGL.h + ../../../third_party/angle/LICENSE -ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/ProgramExecutableMtl.h + ../../../third_party/angle/LICENSE -ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/ProgramExecutableMtl.mm + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/blocklayoutMetal.cpp + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/blocklayoutMetal.h + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/mtl_library_cache.h + ../../../third_party/angle/LICENSE @@ -44501,17 +44502,12 @@ ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/process.cpp + ../ ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/process.h + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/renderermtl_utils.cpp + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/renderermtl_utils.h + ../../../third_party/angle/LICENSE -ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/metal/shaders/mtl_internal_shaders_metallib.h + ../../../third_party/angle/LICENSE -ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/null/ProgramExecutableNULL.cpp + ../../../third_party/angle/LICENSE -ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/null/ProgramExecutableNULL.h + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/vulkan/MemoryTracking.cpp + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/vulkan/MemoryTracking.h + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/vulkan/SecondaryCommandPool.cpp + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/vulkan/SecondaryCommandPool.h + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/vulkan/ShareGroupVk.cpp + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/vulkan/ShareGroupVk.h + ../../../third_party/angle/LICENSE -ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/vulkan/linux/DisplayVkOffscreen.cpp + ../../../third_party/angle/LICENSE -ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/vulkan/linux/DisplayVkOffscreen.h + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/vulkan/shaders/src/CopyImageToBuffer.comp + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/libANGLE/renderer/vulkan/shaders/src/CopyImageToBuffer.comp.json + ../../../third_party/angle/LICENSE ORIGIN: ../../../third_party/angle/src/libGLESv2/egl_context_lock_autogen.h + ../../../third_party/angle/LICENSE @@ -44520,8 +44516,6 @@ TYPE: LicenseType.bsd FILE: ../../../third_party/angle/src/common/FixedQueue.h FILE: ../../../third_party/angle/src/common/platform_helpers.cpp FILE: ../../../third_party/angle/src/common/platform_helpers.h -FILE: ../../../third_party/angle/src/compiler/translator/tree_ops/RescopeGlobalVariables.cpp -FILE: ../../../third_party/angle/src/compiler/translator/tree_ops/RescopeGlobalVariables.h FILE: ../../../third_party/angle/src/compiler/translator/tree_ops/msl/RewriteInterpolants.cpp FILE: ../../../third_party/angle/src/compiler/translator/tree_ops/msl/RewriteInterpolants.h FILE: ../../../third_party/angle/src/compiler/translator/tree_ops/spirv/EmulateFramebufferFetch.cpp @@ -44536,13 +44530,6 @@ FILE: ../../../third_party/angle/src/libANGLE/context_private_call_gl.cpp FILE: ../../../third_party/angle/src/libANGLE/context_private_call_gl_autogen.h FILE: ../../../third_party/angle/src/libANGLE/context_private_call_gles.cpp FILE: ../../../third_party/angle/src/libANGLE/context_private_call_gles_autogen.h -FILE: ../../../third_party/angle/src/libANGLE/renderer/ProgramExecutableImpl.h -FILE: ../../../third_party/angle/src/libANGLE/renderer/d3d/ProgramExecutableD3D.cpp -FILE: ../../../third_party/angle/src/libANGLE/renderer/d3d/ProgramExecutableD3D.h -FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/ProgramExecutableGL.cpp -FILE: ../../../third_party/angle/src/libANGLE/renderer/gl/ProgramExecutableGL.h -FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/ProgramExecutableMtl.h -FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/ProgramExecutableMtl.mm FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/blocklayoutMetal.cpp FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/blocklayoutMetal.h FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/mtl_library_cache.h @@ -44553,17 +44540,12 @@ FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/process.cpp FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/process.h FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/renderermtl_utils.cpp FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/renderermtl_utils.h -FILE: ../../../third_party/angle/src/libANGLE/renderer/metal/shaders/mtl_internal_shaders_metallib.h -FILE: ../../../third_party/angle/src/libANGLE/renderer/null/ProgramExecutableNULL.cpp -FILE: ../../../third_party/angle/src/libANGLE/renderer/null/ProgramExecutableNULL.h FILE: ../../../third_party/angle/src/libANGLE/renderer/vulkan/MemoryTracking.cpp FILE: ../../../third_party/angle/src/libANGLE/renderer/vulkan/MemoryTracking.h FILE: ../../../third_party/angle/src/libANGLE/renderer/vulkan/SecondaryCommandPool.cpp FILE: ../../../third_party/angle/src/libANGLE/renderer/vulkan/SecondaryCommandPool.h FILE: ../../../third_party/angle/src/libANGLE/renderer/vulkan/ShareGroupVk.cpp FILE: ../../../third_party/angle/src/libANGLE/renderer/vulkan/ShareGroupVk.h -FILE: ../../../third_party/angle/src/libANGLE/renderer/vulkan/linux/DisplayVkOffscreen.cpp -FILE: ../../../third_party/angle/src/libANGLE/renderer/vulkan/linux/DisplayVkOffscreen.h FILE: ../../../third_party/angle/src/libANGLE/renderer/vulkan/shaders/src/CopyImageToBuffer.comp FILE: ../../../third_party/angle/src/libANGLE/renderer/vulkan/shaders/src/CopyImageToBuffer.comp.json FILE: ../../../third_party/angle/src/libGLESv2/egl_context_lock_autogen.h diff --git a/shell/platform/windows/angle_surface_manager.cc b/shell/platform/windows/angle_surface_manager.cc index 2165130ba158a..7deafc2d0bf8c 100644 --- a/shell/platform/windows/angle_surface_manager.cc +++ b/shell/platform/windows/angle_surface_manager.cc @@ -343,13 +343,6 @@ void AngleSurfaceManager::SetVSyncEnabled(bool enabled) { LogEglError("Unable to update the swap interval"); return; } - - if (eglMakeCurrent(egl_display_, EGL_NO_SURFACE, EGL_NO_SURFACE, - EGL_NO_CONTEXT) != EGL_TRUE) { - LogEglError( - "Unable to release the context after updating the swap interval"); - return; - } } bool AngleSurfaceManager::GetDevice(ID3D11Device** device) { diff --git a/shell/platform/windows/flutter_windows_engine.h b/shell/platform/windows/flutter_windows_engine.h index 04d33e7583d4b..cdbcd375fd119 100644 --- a/shell/platform/windows/flutter_windows_engine.h +++ b/shell/platform/windows/flutter_windows_engine.h @@ -199,7 +199,7 @@ class FlutterWindowsEngine { bool MarkExternalTextureFrameAvailable(int64_t texture_id); // Posts the given callback onto the raster thread. - virtual bool PostRasterThreadTask(fml::closure callback); + bool PostRasterThreadTask(fml::closure callback); // Invoke on the embedder's vsync callback to schedule a frame. void OnVsync(intptr_t baton); diff --git a/shell/platform/windows/flutter_windows_view.cc b/shell/platform/windows/flutter_windows_view.cc index 20ac21558ec86..d668d2f447b6c 100644 --- a/shell/platform/windows/flutter_windows_view.cc +++ b/shell/platform/windows/flutter_windows_view.cc @@ -669,12 +669,7 @@ void FlutterWindowsView::UpdateSemanticsEnabled(bool enabled) { void FlutterWindowsView::OnDwmCompositionChanged() { if (engine_->surface_manager()) { - // Update the surface with the new composition state. - // Switch to the raster thread as this requires making the context current. - auto needs_vsync = binding_handler_->NeedsVSync(); - engine_->PostRasterThreadTask([this, needs_vsync]() { - engine_->surface_manager()->SetVSyncEnabled(needs_vsync); - }); + engine_->surface_manager()->SetVSyncEnabled(binding_handler_->NeedsVSync()); } } diff --git a/shell/platform/windows/flutter_windows_view_unittests.cc b/shell/platform/windows/flutter_windows_view_unittests.cc index 93a7f3024d88b..b7ce34c05b3bd 100644 --- a/shell/platform/windows/flutter_windows_view_unittests.cc +++ b/shell/platform/windows/flutter_windows_view_unittests.cc @@ -110,8 +110,8 @@ class MockFlutterWindowsEngine : public FlutterWindowsEngine { public: MockFlutterWindowsEngine() : FlutterWindowsEngine(GetTestProject()) {} - MOCK_METHOD(bool, Stop, (), (override)); - MOCK_METHOD(bool, PostRasterThreadTask, (fml::closure), (override)); + MOCK_METHOD(bool, Stop, (), ()); + MOCK_METHOD(bool, PostRasterThreadTask, (fml::closure), ()); private: FML_DISALLOW_COPY_AND_ASSIGN(MockFlutterWindowsEngine); @@ -1287,13 +1287,6 @@ TEST(FlutterWindowsViewTest, UpdatesVSyncOnDwmUpdates) { std::unique_ptr surface_manager = std::make_unique(); - EXPECT_CALL(*engine.get(), PostRasterThreadTask) - .Times(2) - .WillRepeatedly([](fml::closure callback) { - callback(); - return true; - }); - EXPECT_CALL(*window_binding_handler.get(), NeedsVSync) .WillOnce(Return(true)) .WillOnce(Return(false)); From 606608b9bda38fb889644c35d064f6c0edb0dd54 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 18 Sep 2023 18:34:31 -0400 Subject: [PATCH 117/859] Roll Fuchsia Mac SDK from 3_Lh8otTpmVuf-Zwb... to qy5FU4y6sx1FscCpd... (#45998) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC bdero@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index c59de1fbaaaed..f64143d98c362 100644 --- a/DEPS +++ b/DEPS @@ -914,7 +914,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': '3_Lh8otTpmVuf-Zwb5yQy61cqmV-4g7xjO1wsANaeC0C' + 'version': 'qy5FU4y6sx1FscCpd_r8vxXwLApv4irBWyfBT9WF374C' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 795519ac2fcc24dca7ba15d4ceb16321d77f37b4 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Mon, 18 Sep 2023 15:37:57 -0700 Subject: [PATCH 118/859] [Impeller] Respect max supported texture size when allocating glyph atlas texture. (#45992) The earlier limit of 4096u was pessimistically small on some backends and too big on others (like older versions of OpenGL ES). The former would stop glpyhs from rendering when they got sufficiently large or numerous. The latter would cause errors on texture allocation. The full fix is tracked in https://github.com/flutter/flutter/issues/133092 --- .../backends/skia/typographer_context_skia.cc | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/impeller/typographer/backends/skia/typographer_context_skia.cc b/impeller/typographer/backends/skia/typographer_context_skia.cc index 9f8725a67c81d..e3082678d541a 100644 --- a/impeller/typographer/backends/skia/typographer_context_skia.cc +++ b/impeller/typographer/backends/skia/typographer_context_skia.cc @@ -117,10 +117,10 @@ static ISize OptimumAtlasSizeForFontGlyphPairs( const std::vector& pairs, std::vector& glyph_positions, const std::shared_ptr& atlas_context, - GlyphAtlas::Type type) { + GlyphAtlas::Type type, + const ISize& max_texture_size) { static constexpr auto kMinAtlasSize = 8u; static constexpr auto kMinAlphaBitmapSize = 1024u; - static constexpr auto kMaxAtlasSize = 4096u; TRACE_EVENT0("impeller", __FUNCTION__); @@ -147,8 +147,8 @@ static ISize OptimumAtlasSizeForFontGlyphPairs( Allocation::NextPowerOfTwoSize(current_size.width + 1), Allocation::NextPowerOfTwoSize(current_size.height + 1)); } - } while (current_size.width <= kMaxAtlasSize && - current_size.height <= kMaxAtlasSize); + } while (current_size.width <= max_texture_size.width && + current_size.height <= max_texture_size.height); return ISize{0, 0}; } @@ -366,7 +366,7 @@ std::shared_ptr TypographerContextSkia::CreateGlyphAtlas( // --------------------------------------------------------------------------- // Step 3a: Record the positions in the glyph atlas of the newly added - // glyphs. + // glyphs. // --------------------------------------------------------------------------- for (size_t i = 0, count = glyph_positions.size(); i < count; i++) { last_atlas->AddTypefaceGlyphPosition(new_glyphs[i], glyph_positions[i]); @@ -405,7 +405,12 @@ std::shared_ptr TypographerContextSkia::CreateGlyphAtlas( } auto glyph_atlas = std::make_shared(type); auto atlas_size = OptimumAtlasSizeForFontGlyphPairs( - font_glyph_pairs, glyph_positions, atlas_context, type); + font_glyph_pairs, // + glyph_positions, // + atlas_context, // + type, // + context.GetResourceAllocator()->GetMaxTextureSizeSupported() // + ); atlas_context->UpdateGlyphAtlas(glyph_atlas, atlas_size); if (atlas_size.IsEmpty()) { From bc2f9c7983f2aace36ba3eddf2f3a9b19df8af8f Mon Sep 17 00:00:00 2001 From: Kevin Lubick Date: Mon, 18 Sep 2023 19:49:17 -0400 Subject: [PATCH 119/859] Add missing include of SkPath (#45996) This is needed as Skia refactors its #includes internally. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- lib/web_ui/skwasm/contour_measure.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/web_ui/skwasm/contour_measure.cpp b/lib/web_ui/skwasm/contour_measure.cpp index 1e732420e0e55..4af486ffe3d3a 100644 --- a/lib/web_ui/skwasm/contour_measure.cpp +++ b/lib/web_ui/skwasm/contour_measure.cpp @@ -6,6 +6,7 @@ #include "helpers.h" #include "third_party/skia/include/core/SkContourMeasure.h" +#include "third_party/skia/include/core/SkPath.h" using namespace Skwasm; From d382dd560f28ea296ad62e4b208d7ec4643d4234 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 18 Sep 2023 21:21:21 -0400 Subject: [PATCH 120/859] Roll Skia from 0c990ab9e097 to 4122791099ce (19 revisions) (#46016) https://skia.googlesource.com/skia.git/+log/0c990ab9e097..4122791099ce 2023-09-18 johnstiles@google.com Remove orphaned test disable. 2023-09-18 brianosman@google.com Remove paint-color transform in working-format color filter 2023-09-18 skia-autoroll@skia-public.iam.gserviceaccount.com Roll shaders-base from 45116d485d17 to 75c3a7bb1f19 2023-09-18 skia-autoroll@skia-public.iam.gserviceaccount.com Roll skottie-base from ac643e8ecce3 to 6fbc053bdad0 2023-09-18 skia-autoroll@skia-public.iam.gserviceaccount.com Roll jsfiddle-base from 420bf03c7a80 to 3c3b69cdbecd 2023-09-18 skia-autoroll@skia-public.iam.gserviceaccount.com Roll debugger-app-base from 5b191a5ec3d1 to 4880b92b4f1c 2023-09-18 brianosman@google.com Suppress alpha-only image shader logic when sampled via runtime effects 2023-09-18 bungeman@google.com Reland "[skicu] Use cache and respect locale" 2023-09-18 johnstiles@google.com Remove Dawn Ganesh-specific SkSL test disables. 2023-09-18 brianosman@google.com In DM, use an SkSurface for CPU configs 2023-09-18 johnstiles@google.com Add contextType() accessor to test contexts. 2023-09-18 kjlubick@google.com Enforce IWYU on src/core/SkC* and SkD* 2023-09-18 kjlubick@google.com Remove TextBlob's empty mailbox in favor of delegate 2023-09-18 egdaniel@google.com Remove SkRefCnt from GrGpu. 2023-09-18 jmbetancourt@google.com [skottie] make SkottieSlide slot manager UI responsive to live changes 2023-09-18 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll ANGLE from 22b6ca1c6191 to 18f1b3b8e79d (2 revisions) 2023-09-18 johnstiles@google.com Re-enable pixel-local storage test. 2023-09-18 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 53e6e021f9b7 to cf45d7c5dc0d (1 revision) 2023-09-18 johnstiles@google.com Pass test run details into SkSL test permutation runner. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/DEPS b/DEPS index f64143d98c362..937a8fab42225 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '0c990ab9e0978c2c420d3be8ce090a4c337a9873', + 'skia_revision': '4122791099ce43134fdb35a5ddd4eb1bd8bd53b2', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index acf3f9a464c3d..85c25c2c7725e 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: bab5aca18f538f50b4b23ee8fbf37d3b +Signature: bf9e643eb81d9f8a5fe4afbf3061f542 ==================================================================================================== LIBRARY: etc1 @@ -9007,9 +9007,7 @@ ORIGIN: ../../../third_party/skia/src/sksl/tracing/SkSLTraceHook.cpp + ../../../ ORIGIN: ../../../third_party/skia/src/sksl/tracing/SkSLTraceHook.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/sksl/transform/SkSLHoistSwitchVarDeclarationsAtTopLevel.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/sksl/transform/SkSLRewriteIndexedSwizzle.cpp + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/src/text/EmptyMailboxImpl.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/text/SlugFromBuffer.cpp + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/src/text/TextBlobMailbox.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/text/gpu/SlugImpl.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/text/gpu/SlugImpl.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/text/gpu/VertexFiller.cpp + ../../../third_party/skia/LICENSE @@ -9267,9 +9265,7 @@ FILE: ../../../third_party/skia/src/sksl/tracing/SkSLTraceHook.cpp FILE: ../../../third_party/skia/src/sksl/tracing/SkSLTraceHook.h FILE: ../../../third_party/skia/src/sksl/transform/SkSLHoistSwitchVarDeclarationsAtTopLevel.cpp FILE: ../../../third_party/skia/src/sksl/transform/SkSLRewriteIndexedSwizzle.cpp -FILE: ../../../third_party/skia/src/text/EmptyMailboxImpl.cpp FILE: ../../../third_party/skia/src/text/SlugFromBuffer.cpp -FILE: ../../../third_party/skia/src/text/TextBlobMailbox.h FILE: ../../../third_party/skia/src/text/gpu/SlugImpl.cpp FILE: ../../../third_party/skia/src/text/gpu/SlugImpl.h FILE: ../../../third_party/skia/src/text/gpu/VertexFiller.cpp From d46056de95b7d748d1c9e016bfb402ff4b7d07da Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Mon, 18 Sep 2023 18:25:25 -0700 Subject: [PATCH 121/859] [Impeller] Hold the CommandPoolVK at a higher scope. (#46013) Fixes https://github.com/flutter/flutter/issues/134982. I could never reproduce the flakes locally, but this should prevent `pool1 == pool2`. --- .../vulkan/command_pool_vk_unittests.cc | 43 ++++++++++--------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/impeller/renderer/backend/vulkan/command_pool_vk_unittests.cc b/impeller/renderer/backend/vulkan/command_pool_vk_unittests.cc index 66cde90c5cac2..0b140542c40ff 100644 --- a/impeller/renderer/backend/vulkan/command_pool_vk_unittests.cc +++ b/impeller/renderer/backend/vulkan/command_pool_vk_unittests.cc @@ -4,6 +4,7 @@ #include "flutter/testing/testing.h" // IWYU pragma: keep. #include "fml/synchronization/waitable_event.h" +#include "impeller/renderer/backend/vulkan/command_pool_vk.h" #include "impeller/renderer/backend/vulkan/resource_manager_vk.h" #include "impeller/renderer/backend/vulkan/test/mock_vulkan.h" @@ -13,26 +14,28 @@ namespace testing { TEST(CommandPoolRecyclerVKTest, GetsACommandPoolPerThread) { auto const context = MockVulkanContextBuilder().Build(); - // Record the memory location of each pointer to a command pool. - int* pool1 = nullptr; - int* pool2 = nullptr; - - // Create a command pool in two threads and record the memory location. - std::thread thread1([&]() { - auto const pool = context->GetCommandPoolRecycler()->Get(); - pool1 = reinterpret_cast(pool.get()); - }); - - std::thread thread2([&]() { - auto const pool = context->GetCommandPoolRecycler()->Get(); - pool2 = reinterpret_cast(pool.get()); - }); - - thread1.join(); - thread2.join(); - - // The two command pools should be different. - EXPECT_NE(pool1, pool2); + { + // Record the memory location of each pointer to a command pool. + // + // These pools have to be held at this context, otherwise they will be + // dropped and recycled and potentially reused by another thread, causing + // flaky tests. + std::shared_ptr pool1; + std::shared_ptr pool2; + + // Create a command pool in two threads and record the memory location. + std::thread thread1( + [&]() { pool1 = context->GetCommandPoolRecycler()->Get(); }); + + std::thread thread2( + [&]() { pool2 = context->GetCommandPoolRecycler()->Get(); }); + + thread1.join(); + thread2.join(); + + // The two command pools should be different. + EXPECT_NE(pool1, pool2); + } context->Shutdown(); } From 838623f39c6d68a7b02fa6fe5c68c2222546dc6e Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Mon, 18 Sep 2023 20:26:36 -0700 Subject: [PATCH 122/859] [Impeller] Fix STB backend to account for max texture sizes. (#46010) Gets rid of the hardcoded 2048 px size. Followup from review comment left unaddressed in https://github.com/flutter/engine/pull/45992. Missing this will be less easy after https://github.com/flutter/flutter/issues/133029. --- .../backends/stb/typographer_context_stb.cc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/impeller/typographer/backends/stb/typographer_context_stb.cc b/impeller/typographer/backends/stb/typographer_context_stb.cc index 5669d7eba7837..a3cf14b91837a 100644 --- a/impeller/typographer/backends/stb/typographer_context_stb.cc +++ b/impeller/typographer/backends/stb/typographer_context_stb.cc @@ -160,10 +160,10 @@ static ISize OptimumAtlasSizeForFontGlyphPairs( const std::vector& pairs, std::vector& glyph_positions, const std::shared_ptr& atlas_context, - GlyphAtlas::Type type) { + GlyphAtlas::Type type, + const ISize& max_texture_size) { static constexpr auto kMinAtlasSize = 8u; static constexpr auto kMinAlphaBitmapSize = 1024u; - static constexpr auto kMaxAtlasSize = 2048u; // QNX required 2048 or less. TRACE_EVENT0("impeller", __FUNCTION__); @@ -190,8 +190,8 @@ static ISize OptimumAtlasSizeForFontGlyphPairs( Allocation::NextPowerOfTwoSize(current_size.width + 1), Allocation::NextPowerOfTwoSize(current_size.height + 1)); } - } while (current_size.width <= kMaxAtlasSize && - current_size.height <= kMaxAtlasSize); + } while (current_size.width <= max_texture_size.width && + current_size.height <= max_texture_size.height); return ISize{0, 0}; } @@ -469,7 +469,12 @@ std::shared_ptr TypographerContextSTB::CreateGlyphAtlas( } auto glyph_atlas = std::make_shared(type); auto atlas_size = OptimumAtlasSizeForFontGlyphPairs( - font_glyph_pairs, glyph_positions, atlas_context, type); + font_glyph_pairs, // + glyph_positions, // + atlas_context, // + type, // + context.GetResourceAllocator()->GetMaxTextureSizeSupported() // + ); atlas_context->UpdateGlyphAtlas(glyph_atlas, atlas_size); if (atlas_size.IsEmpty()) { From 176c2684fd8e42adc3258ed123be2661f8dca1ff Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Mon, 18 Sep 2023 20:50:05 -0700 Subject: [PATCH 123/859] [Android] Add support for setting thread affinity based on core speed. (#45673) https://github.com/flutter/flutter/issues/134452 This patch parses the speed of all CPU data out of /proc and constructs a table that allows us to request high level CPU affinities: performance, efficiency, and not performance. These affinties are applied where appropriate during Android thread construction. --- ci/licenses_golden/excluded_files | 1 + ci/licenses_golden/licenses_flutter | 8 ++ fml/BUILD.gn | 5 ++ fml/cpu_affinity.cc | 78 ++++++++++++++++ fml/cpu_affinity.h | 68 ++++++++++++++ fml/cpu_affinity_unittests.cc | 90 +++++++++++++++++++ fml/platform/android/cpu_affinity.cc | 59 ++++++++++++ fml/platform/android/cpu_affinity.h | 21 +++++ .../platform/android/android_shell_holder.cc | 5 ++ 9 files changed, 335 insertions(+) create mode 100644 fml/cpu_affinity.cc create mode 100644 fml/cpu_affinity.h create mode 100644 fml/cpu_affinity_unittests.cc create mode 100644 fml/platform/android/cpu_affinity.cc create mode 100644 fml/platform/android/cpu_affinity.h diff --git a/ci/licenses_golden/excluded_files b/ci/licenses_golden/excluded_files index e8a291b37414e..ec29109a476a5 100644 --- a/ci/licenses_golden/excluded_files +++ b/ci/licenses_golden/excluded_files @@ -86,6 +86,7 @@ ../../../flutter/fml/closure_unittests.cc ../../../flutter/fml/command_line_unittest.cc ../../../flutter/fml/container_unittests.cc +../../../flutter/fml/cpu_affinity_unittests.cc ../../../flutter/fml/endianness_unittests.cc ../../../flutter/fml/file_unittest.cc ../../../flutter/fml/hash_combine_unittests.cc diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index a4fbca11e268e..99c9fcec20537 100644 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -870,6 +870,8 @@ ORIGIN: ../../../flutter/fml/concurrent_message_loop.cc + ../../../flutter/LICEN ORIGIN: ../../../flutter/fml/concurrent_message_loop.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/fml/concurrent_message_loop_factory.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/fml/container.h + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/fml/cpu_affinity.cc + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/fml/cpu_affinity.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/fml/dart/dart_converter.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/fml/dart/dart_converter.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/fml/delayed_task.cc + ../../../flutter/LICENSE @@ -916,6 +918,8 @@ ORIGIN: ../../../flutter/fml/message_loop_task_queues_benchmark.cc + ../../../fl ORIGIN: ../../../flutter/fml/native_library.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/fml/paths.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/fml/paths.h + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/fml/platform/android/cpu_affinity.cc + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/fml/platform/android/cpu_affinity.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/fml/platform/android/jni_util.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/fml/platform/android/jni_util.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/fml/platform/android/jni_weak_ref.cc + ../../../flutter/LICENSE @@ -3615,6 +3619,8 @@ FILE: ../../../flutter/fml/concurrent_message_loop.cc FILE: ../../../flutter/fml/concurrent_message_loop.h FILE: ../../../flutter/fml/concurrent_message_loop_factory.cc FILE: ../../../flutter/fml/container.h +FILE: ../../../flutter/fml/cpu_affinity.cc +FILE: ../../../flutter/fml/cpu_affinity.h FILE: ../../../flutter/fml/dart/dart_converter.cc FILE: ../../../flutter/fml/dart/dart_converter.h FILE: ../../../flutter/fml/delayed_task.cc @@ -3661,6 +3667,8 @@ FILE: ../../../flutter/fml/message_loop_task_queues_benchmark.cc FILE: ../../../flutter/fml/native_library.h FILE: ../../../flutter/fml/paths.cc FILE: ../../../flutter/fml/paths.h +FILE: ../../../flutter/fml/platform/android/cpu_affinity.cc +FILE: ../../../flutter/fml/platform/android/cpu_affinity.h FILE: ../../../flutter/fml/platform/android/jni_util.cc FILE: ../../../flutter/fml/platform/android/jni_util.h FILE: ../../../flutter/fml/platform/android/jni_weak_ref.cc diff --git a/fml/BUILD.gn b/fml/BUILD.gn index a585864159444..887d7637b7bb7 100644 --- a/fml/BUILD.gn +++ b/fml/BUILD.gn @@ -19,6 +19,8 @@ source_set("fml") { "concurrent_message_loop.cc", "concurrent_message_loop.h", "container.h", + "cpu_affinity.cc", + "cpu_affinity.h", "delayed_task.cc", "delayed_task.h", "eintr_wrapper.h", @@ -170,6 +172,8 @@ source_set("fml") { if (is_android) { sources += [ + "platform/android/cpu_affinity.cc", + "platform/android/cpu_affinity.h", "platform/android/jni_util.cc", "platform/android/jni_util.h", "platform/android/jni_weak_ref.cc", @@ -322,6 +326,7 @@ if (enable_unittests) { "closure_unittests.cc", "command_line_unittest.cc", "container_unittests.cc", + "cpu_affinity_unittests.cc", "endianness_unittests.cc", "file_unittest.cc", "hash_combine_unittests.cc", diff --git a/fml/cpu_affinity.cc b/fml/cpu_affinity.cc new file mode 100644 index 0000000000000..c4e89613b252a --- /dev/null +++ b/fml/cpu_affinity.cc @@ -0,0 +1,78 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "flutter/fml/cpu_affinity.h" + +#include +#include +#include + +namespace fml { + +CPUSpeedTracker::CPUSpeedTracker(std::vector data) + : cpu_speeds_(std::move(data)) { + std::optional max_speed = std::nullopt; + std::optional min_speed = std::nullopt; + for (const auto& data : cpu_speeds_) { + if (!max_speed.has_value() || data.speed > max_speed.value()) { + max_speed = data.speed; + } + if (!min_speed.has_value() || data.speed < min_speed.value()) { + min_speed = data.speed; + } + } + if (!max_speed.has_value() || !min_speed.has_value() || + min_speed.value() == max_speed.value()) { + return; + } + + for (const auto& data : cpu_speeds_) { + if (data.speed == max_speed.value()) { + performance_.push_back(data.index); + } else { + not_performance_.push_back(data.index); + } + if (data.speed == min_speed.value()) { + efficiency_.push_back(data.index); + } + } + + valid_ = true; +} + +bool CPUSpeedTracker::IsValid() const { + return valid_; +} + +const std::vector& CPUSpeedTracker::GetIndices( + CpuAffinity affinity) const { + switch (affinity) { + case CpuAffinity::kPerformance: + return performance_; + case CpuAffinity::kEfficiency: + return efficiency_; + case CpuAffinity::kNotPerformance: + return not_performance_; + } +} + +// Get the size of the cpuinfo file by reading it until the end. This is +// required because files under /proc do not always return a valid size +// when using fseek(0, SEEK_END) + ftell(). Nor can they be mmap()-ed. +std::optional ReadIntFromFile(const std::string& path) { + // size_t data_length = 0u; + std::ifstream file; + file.open(path.c_str()); + + // Dont use stoi because if this data isnt a parseable number then it + // will abort, as we compile with exceptions disabled. + int64_t speed = 0; + file >> speed; + if (speed > 0) { + return speed; + } + return std::nullopt; +} + +} // namespace fml diff --git a/fml/cpu_affinity.h b/fml/cpu_affinity.h new file mode 100644 index 0000000000000..3ea45a4fa3d3b --- /dev/null +++ b/fml/cpu_affinity.h @@ -0,0 +1,68 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#pragma once + +#include +#include +#include + +namespace fml { + +/// The CPU Affinity provides a hint to the operating system on which cores a +/// particular thread should be scheduled on. The operating system may or may +/// not honor these requests. +enum class CpuAffinity { + /// @brief Request CPU affinity for the performance cores. + /// + /// Generally speaking, only the UI and Raster thread should + /// use this option. + kPerformance, + + /// @brief Request CPU affinity for the efficiency cores. + kEfficiency, + + /// @brief Request affinity for all non-performance cores. + kNotPerformance, +}; + +struct CpuIndexAndSpeed { + // The index of the given CPU. + size_t index; + // CPU speed in kHZ + int64_t speed; +}; + +/// @brief A class that computes the correct CPU indices for a requested CPU +/// affinity. +/// +/// @note This is visible for testing. +class CPUSpeedTracker { + public: + explicit CPUSpeedTracker(std::vector data); + + /// @brief The class is valid if it has more than one CPU index and a distinct + /// set of efficiency or performance CPUs. + /// + /// If all CPUs are the same speed this returns false, and all requests + /// to set affinity are ignored. + bool IsValid() const; + + /// @brief Return the set of CPU indices for the requested CPU affinity. + /// + /// If the tracker is valid, this will always return a non-empty set. + const std::vector& GetIndices(CpuAffinity affinity) const; + + private: + bool valid_ = false; + std::vector cpu_speeds_; + std::vector efficiency_; + std::vector performance_; + std::vector not_performance_; +}; + +/// @note Visible for testing. +std::optional ReadIntFromFile(const std::string& path); + +} // namespace fml diff --git a/fml/cpu_affinity_unittests.cc b/fml/cpu_affinity_unittests.cc new file mode 100644 index 0000000000000..eb2f010bc66d6 --- /dev/null +++ b/fml/cpu_affinity_unittests.cc @@ -0,0 +1,90 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "cpu_affinity.h" + +#include "fml/file.h" +#include "fml/mapping.h" +#include "gtest/gtest.h" +#include "logging.h" + +namespace fml { +namespace testing { + +TEST(CpuAffinity, NormalSlowMedFastCores) { + auto speeds = {CpuIndexAndSpeed{.index = 0, .speed = 1}, + CpuIndexAndSpeed{.index = 1, .speed = 2}, + CpuIndexAndSpeed{.index = 2, .speed = 3}}; + auto tracker = CPUSpeedTracker(speeds); + + ASSERT_TRUE(tracker.IsValid()); + ASSERT_EQ(tracker.GetIndices(CpuAffinity::kEfficiency)[0], 0u); + ASSERT_EQ(tracker.GetIndices(CpuAffinity::kPerformance)[0], 2u); + ASSERT_EQ(tracker.GetIndices(CpuAffinity::kNotPerformance).size(), 2u); + ASSERT_EQ(tracker.GetIndices(CpuAffinity::kNotPerformance)[0], 0u); + ASSERT_EQ(tracker.GetIndices(CpuAffinity::kNotPerformance)[1], 1u); +} + +TEST(CpuAffinity, NoCpuData) { + auto tracker = CPUSpeedTracker({}); + + ASSERT_FALSE(tracker.IsValid()); +} + +TEST(CpuAffinity, AllSameSpeed) { + auto speeds = {CpuIndexAndSpeed{.index = 0, .speed = 1}, + CpuIndexAndSpeed{.index = 1, .speed = 1}, + CpuIndexAndSpeed{.index = 2, .speed = 1}}; + auto tracker = CPUSpeedTracker(speeds); + + ASSERT_FALSE(tracker.IsValid()); +} + +TEST(CpuAffinity, SingleCore) { + auto speeds = {CpuIndexAndSpeed{.index = 0, .speed = 1}}; + auto tracker = CPUSpeedTracker(speeds); + + ASSERT_FALSE(tracker.IsValid()); +} + +TEST(CpuAffinity, FileParsing) { + fml::ScopedTemporaryDirectory base_dir; + ASSERT_TRUE(base_dir.fd().is_valid()); + + // Generate a fake CPU speed file + fml::DataMapping test_data(std::string("12345")); + ASSERT_TRUE(fml::WriteAtomically(base_dir.fd(), "test_file", test_data)); + + auto file = fml::OpenFileReadOnly(base_dir.fd(), "test_file"); + ASSERT_TRUE(file.is_valid()); + + // Open file and parse speed. + auto result = ReadIntFromFile(base_dir.path() + "/test_file"); + ASSERT_TRUE(result.has_value()); + ASSERT_EQ(result.value_or(0), 12345); +} + +TEST(CpuAffinity, FileParsingWithNonNumber) { + fml::ScopedTemporaryDirectory base_dir; + ASSERT_TRUE(base_dir.fd().is_valid()); + + // Generate a fake CPU speed file + fml::DataMapping test_data(std::string("whoa this isnt a number")); + ASSERT_TRUE(fml::WriteAtomically(base_dir.fd(), "test_file", test_data)); + + auto file = fml::OpenFileReadOnly(base_dir.fd(), "test_file"); + ASSERT_TRUE(file.is_valid()); + + // Open file and parse speed. + auto result = ReadIntFromFile(base_dir.path() + "/test_file"); + ASSERT_FALSE(result.has_value()); +} + +TEST(CpuAffinity, MissingFileParsing) { + auto result = ReadIntFromFile("/does_not_exist"); + ASSERT_FALSE(result.has_value()); +} + +} // namespace testing +} // namespace fml diff --git a/fml/platform/android/cpu_affinity.cc b/fml/platform/android/cpu_affinity.cc new file mode 100644 index 0000000000000..737f8204b9b6e --- /dev/null +++ b/fml/platform/android/cpu_affinity.cc @@ -0,0 +1,59 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "flutter/fml/platform/android/cpu_affinity.h" + +#include +#include +#include +#include +#include +#include +#include + +namespace fml { + +/// The CPUSpeedTracker is initialized once the first time a thread affinity is +/// requested. +std::once_flag gCPUTrackerFlag; +static CPUSpeedTracker* gCPUTracker; + +// For each CPU index provided, attempts to open the file +// /sys/devices/system/cpu/cpu$NUM/cpufreq/cpuinfo_max_freq and parse a number +// containing the CPU frequency. +void InitCPUInfo(size_t cpu_count) { + std::vector cpu_speeds; + + for (auto i = 0u; i < cpu_count; i++) { + auto path = "/sys/devices/system/cpu/cpu" + std::to_string(i) + + "/cpufreq/cpuinfo_max_freq"; + auto speed = ReadIntFromFile(path); + if (speed.has_value()) { + cpu_speeds.push_back({.index = i, .speed = speed.value()}); + } + } + gCPUTracker = new CPUSpeedTracker(cpu_speeds); +} + +bool RequestAffinity(CpuAffinity affinity) { + // Populate CPU Info if uninitialized. + auto count = std::thread::hardware_concurrency(); + std::call_once(gCPUTrackerFlag, [count]() { InitCPUInfo(count); }); + if (gCPUTracker == nullptr) { + return true; + } + + if (!gCPUTracker->IsValid()) { + return true; + } + + cpu_set_t set; + CPU_ZERO(&set); + for (const auto index : gCPUTracker->GetIndices(affinity)) { + CPU_SET(index, &set); + } + return sched_setaffinity(gettid(), sizeof(set), &set) == 0; +} + +} // namespace fml diff --git a/fml/platform/android/cpu_affinity.h b/fml/platform/android/cpu_affinity.h new file mode 100644 index 0000000000000..03c59ad5e9126 --- /dev/null +++ b/fml/platform/android/cpu_affinity.h @@ -0,0 +1,21 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#pragma once + +#include "flutter/fml/cpu_affinity.h" + +namespace fml { + +/// @brief Request the given affinity for the current thread. +/// +/// Returns true if successfull, or if it was a no-op. This function is +/// only supported on Android devices. +/// +/// Affinity requests are based on documented CPU speed. This speed data +/// is parsed from cpuinfo_max_freq files, see also: +/// https://www.kernel.org/doc/Documentation/cpu-freq/user-guide.txt +bool RequestAffinity(CpuAffinity affinity); + +} // namespace fml diff --git a/shell/platform/android/android_shell_holder.cc b/shell/platform/android/android_shell_holder.cc index 80eb4839fc439..39aef72727d9d 100644 --- a/shell/platform/android/android_shell_holder.cc +++ b/shell/platform/android/android_shell_holder.cc @@ -20,6 +20,7 @@ #include "flutter/fml/make_copyable.h" #include "flutter/fml/message_loop.h" #include "flutter/fml/native_library.h" +#include "flutter/fml/platform/android/cpu_affinity.h" #include "flutter/fml/platform/android/jni_util.h" #include "flutter/lib/ui/painting/image_generator_registry.h" #include "flutter/shell/common/rasterizer.h" @@ -41,18 +42,21 @@ static void AndroidPlatformThreadConfigSetter( // set thread priority switch (config.priority) { case fml::Thread::ThreadPriority::BACKGROUND: { + fml::RequestAffinity(fml::CpuAffinity::kEfficiency); if (::setpriority(PRIO_PROCESS, 0, 10) != 0) { FML_LOG(ERROR) << "Failed to set IO task runner priority"; } break; } case fml::Thread::ThreadPriority::DISPLAY: { + fml::RequestAffinity(fml::CpuAffinity::kPerformance); if (::setpriority(PRIO_PROCESS, 0, -1) != 0) { FML_LOG(ERROR) << "Failed to set UI task runner priority"; } break; } case fml::Thread::ThreadPriority::RASTER: { + fml::RequestAffinity(fml::CpuAffinity::kPerformance); // Android describes -8 as "most important display threads, for // compositing the screen and retrieving input events". Conservatively // set the raster thread to slightly lower priority than it. @@ -66,6 +70,7 @@ static void AndroidPlatformThreadConfigSetter( break; } default: + fml::RequestAffinity(fml::CpuAffinity::kNotPerformance); if (::setpriority(PRIO_PROCESS, 0, 0) != 0) { FML_LOG(ERROR) << "Failed to set priority"; } From 61b5e846517c165c98387d826761ae741d7bac70 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 19 Sep 2023 00:17:22 -0400 Subject: [PATCH 124/859] Roll Skia from 4122791099ce to 744807d740c7 (1 revision) (#46019) https://skia.googlesource.com/skia.git/+log/4122791099ce..744807d740c7 2023-09-19 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from cf45d7c5dc0d to 293f55f6d3d0 (5 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 937a8fab42225..ee1adf284cb55 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '4122791099ce43134fdb35a5ddd4eb1bd8bd53b2', + 'skia_revision': '744807d740c7cbea1d14f55ac9bded1fe3cc5461', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From bfdb27a30c37026e4d9ed187bb9f50699ccedf7a Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 19 Sep 2023 03:37:31 -0400 Subject: [PATCH 125/859] Roll Skia from 744807d740c7 to 1e84aa4509cd (4 revisions) (#46026) https://skia.googlesource.com/skia.git/+log/744807d740c7..1e84aa4509cd 2023-09-19 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 18f1b3b8e79d to 91ef1f3cfd30 (11 revisions) 2023-09-19 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from 6e55411b61e1 to 1b17251d0e2c (10 revisions) 2023-09-19 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Dawn from 02233e019c4e to 5ca21ed72084 (5 revisions) 2023-09-19 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from aea31dd66eb1 to 1b17251d0e2c If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC bdero@google.com,brianosman@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index ee1adf284cb55..67d1cde1f975f 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '744807d740c7cbea1d14f55ac9bded1fe3cc5461', + 'skia_revision': '1e84aa4509cd7c88d50095e9c241282a4ba1b7b4', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 85c25c2c7725e..b6333a0952146 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: bf9e643eb81d9f8a5fe4afbf3061f542 +Signature: 9ff1a09a26d8f28317c610127f9173ae ==================================================================================================== LIBRARY: etc1 From 926dd89a4ba80c13fec91dd23afc547462c8e50b Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 19 Sep 2023 05:34:14 -0400 Subject: [PATCH 126/859] Roll Dart SDK from 5b0e7bda1379 to 8ad823c03f26 (3 revisions) (#46028) https://dart.googlesource.com/sdk.git/+log/5b0e7bda1379..8ad823c03f26 2023-09-19 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-177.0.dev 2023-09-18 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-176.0.dev 2023-09-18 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-175.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jonahwilliams@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 4 ++-- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index 67d1cde1f975f..3a4a08f220fee 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '5b0e7bda13798782ed14be5ce74e0a0298750945', + 'dart_revision': '8ad823c03f2612b1a7e4554d56629523f69f3a68', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py @@ -426,7 +426,7 @@ deps = { Var('dart_git') + '/mockito.git@412c0beb51a12ed4a8833db7f542558ab92c0c65', 'src/third_party/dart/third_party/pkg/native': - Var('dart_git') + '/native.git@bbcbc1fd28dbe6fe50ce167574b8440dd11d664c', + Var('dart_git') + '/native.git@4f4d7c303291b341cf1052380139def3a145c90e', 'src/third_party/dart/third_party/pkg/package_config': Var('dart_git') + '/package_config.git@ae7ad83de97aba507fd05e97cc372bc6695c1759', diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index 74df30034601d..5aa14f3d9dcbe 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: d8ceb2eb9c118958dd5945ea9d4d4581 +Signature: f7d8c96060b34af806d674b62b8183a1 ==================================================================================================== LIBRARY: dart From e27aabae55d921ce1fc187644d1f7798dda6228d Mon Sep 17 00:00:00 2001 From: Bruno Leroux Date: Tue, 19 Sep 2023 11:40:18 +0200 Subject: [PATCH 127/859] =?UTF-8?q?[macOS,iOS]=20Expose=20channel=20buffer?= =?UTF-8?q?s=20'resize'=20and=20'overflow'=20control=20co=E2=80=A6=20(#448?= =?UTF-8?q?48)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description This PR update the helper function that invokes the control channel 'resize' command (previous implementation relied on a deprecated format). It also adds a similar helper function for the 'overflow' commands exposed by the control channel. See: https://github.com/flutter/engine/blob/93e8901490e78c7ba7e319cce4470d9c6478c6dc/lib/ui/channel_buffers.dart#L302-L309 ## Related Issue iOS and macOS implementation for https://github.com/flutter/flutter/issues/132386 Similar implementations: - Android: https://github.com/flutter/engine/pull/44434 - Linux: https://github.com/flutter/engine/pull/44636 ## Tests Adds two tests. --- .../framework/Headers/FlutterChannels.h | 37 ++++++++++++++ .../framework/Source/FlutterChannels.mm | 49 ++++++++++++++++++- .../framework/Source/FlutterChannelsTest.m | 38 ++++++++++++-- 3 files changed, 117 insertions(+), 7 deletions(-) diff --git a/shell/platform/darwin/common/framework/Headers/FlutterChannels.h b/shell/platform/darwin/common/framework/Headers/FlutterChannels.h index 9b84cd64c7178..cdbf140091e8f 100644 --- a/shell/platform/darwin/common/framework/Headers/FlutterChannels.h +++ b/shell/platform/darwin/common/framework/Headers/FlutterChannels.h @@ -143,9 +143,46 @@ FLUTTER_DARWIN_EXPORT * Adjusts the number of messages that will get buffered when sending messages to * channels that aren't fully set up yet. For example, the engine isn't running * yet or the channel's message handler isn't set up on the Dart side yet. + * + * @param name The channel name. + * @param messenger The binary messenger. + * @param newSize The number of messages that will get buffered. + */ ++ (void)resizeChannelWithName:(NSString*)name + binaryMessenger:(NSObject*)messenger + size:(NSInteger)newSize; + +/** + * Adjusts the number of messages that will get buffered when sending messages to + * channels that aren't fully set up yet. For example, the engine isn't running + * yet or the channel's message handler isn't set up on the Dart side yet. + * + * @param newSize The number of messages that will get buffered. */ - (void)resizeChannelBuffer:(NSInteger)newSize; +/** + * Defines whether the channel should show warning messages when discarding messages + * due to overflow. + * + * @param warns When false, the channel is expected to overflow and warning messages + * will not be shown. + * @param name The channel name. + * @param messenger The binary messenger. + */ ++ (void)setWarnsOnOverflow:(BOOL)warns + forChannelWithName:(NSString*)name + binaryMessenger:(NSObject*)messenger; + +/** + * Defines whether the channel should show warning messages when discarding messages + * due to overflow. + * + * @param warns When false, the channel is expected to overflow and warning messages + * will not be shown. + */ +- (void)setWarnsOnOverflow:(BOOL)warns; + @end /** diff --git a/shell/platform/darwin/common/framework/Source/FlutterChannels.mm b/shell/platform/darwin/common/framework/Source/FlutterChannels.mm index f360144d3748f..78d5c08404227 100644 --- a/shell/platform/darwin/common/framework/Source/FlutterChannels.mm +++ b/shell/platform/darwin/common/framework/Source/FlutterChannels.mm @@ -9,12 +9,41 @@ #pragma mark - Basic message channel static NSString* const kFlutterChannelBuffersChannel = @"dev.flutter/channel-buffers"; +static NSString* const kResizeMethod = @"resize"; +static NSString* const kOverflowMethod = @"overflow"; static void ResizeChannelBuffer(NSObject* binaryMessenger, NSString* channel, NSInteger newSize) { - NSString* messageString = [NSString stringWithFormat:@"resize\r%@\r%@", channel, @(newSize)]; - NSData* message = [messageString dataUsingEncoding:NSUTF8StringEncoding]; + NSCAssert(newSize >= 0, @"Channel buffer size must be non-negative"); + // Cast newSize to int because the deserialization logic handles only 32 bits values, + // see + // https://github.com/flutter/engine/blob/93e8901490e78c7ba7e319cce4470d9c6478c6dc/lib/ui/channel_buffers.dart#L495. + NSArray* args = @[ channel, @(static_cast(newSize)) ]; + FlutterMethodCall* resizeMethodCall = [FlutterMethodCall methodCallWithMethodName:kResizeMethod + arguments:args]; + NSObject* codec = [FlutterStandardMethodCodec sharedInstance]; + NSData* message = [codec encodeMethodCall:resizeMethodCall]; + [binaryMessenger sendOnChannel:kFlutterChannelBuffersChannel message:message]; +} + +/** + * Defines whether a channel should show warning messages when discarding messages + * due to overflow. + * + * @param binaryMessenger The binary messenger. + * @param channel The channel name. + * @param warns When false, the channel is expected to overflow and warning messages + * will not be shown. + */ +static void SetWarnsOnOverflow(NSObject* binaryMessenger, + NSString* channel, + BOOL warns) { + FlutterMethodCall* overflowMethodCall = + [FlutterMethodCall methodCallWithMethodName:kOverflowMethod + arguments:@[ channel, @(!warns) ]]; + NSObject* codec = [FlutterStandardMethodCodec sharedInstance]; + NSData* message = [codec encodeMethodCall:overflowMethodCall]; [binaryMessenger sendOnChannel:kFlutterChannelBuffersChannel message:message]; } @@ -114,10 +143,26 @@ - (void)setMessageHandler:(FlutterMessageHandler)handler { _connection = SetMessageHandler(_messenger, _name, messageHandler, _taskQueue); } ++ (void)resizeChannelWithName:(NSString*)name + binaryMessenger:(NSObject*)messenger + size:(NSInteger)newSize { + ResizeChannelBuffer(messenger, name, newSize); +} + - (void)resizeChannelBuffer:(NSInteger)newSize { ResizeChannelBuffer(_messenger, _name, newSize); } ++ (void)setWarnsOnOverflow:(BOOL)warns + forChannelWithName:(NSString*)name + binaryMessenger:(NSObject*)messenger { + SetWarnsOnOverflow(messenger, name, warns); +} + +- (void)setWarnsOnOverflow:(BOOL)warns { + SetWarnsOnOverflow(_messenger, _name, warns); +} + @end #pragma mark - Method channel diff --git a/shell/platform/darwin/common/framework/Source/FlutterChannelsTest.m b/shell/platform/darwin/common/framework/Source/FlutterChannelsTest.m index 767c762d86449..fef4a1075cc43 100644 --- a/shell/platform/darwin/common/framework/Source/FlutterChannelsTest.m +++ b/shell/platform/darwin/common/framework/Source/FlutterChannelsTest.m @@ -147,7 +147,31 @@ - (void)testCallMethodHandler { } - (void)testResize { - NSString* channelName = @"foo"; + NSString* channelName = @"flutter/test"; + id binaryMessenger = OCMStrictProtocolMock(@protocol(FlutterBinaryMessenger)); + id codec = OCMProtocolMock(@protocol(FlutterMethodCodec)); + FlutterBasicMessageChannel* channel = + [[FlutterBasicMessageChannel alloc] initWithName:channelName + binaryMessenger:binaryMessenger + codec:codec]; + XCTAssertNotNil(channel); + + // The expected content was created from the following Dart code: + // MethodCall call = MethodCall('resize', ['flutter/test',3]); + // StandardMethodCodec().encodeMethodCall(call).buffer.asUint8List(); + const unsigned char bytes[] = {7, 6, 114, 101, 115, 105, 122, 101, 12, 2, + 7, 12, 102, 108, 117, 116, 116, 101, 114, 47, + 116, 101, 115, 116, 3, 3, 0, 0, 0}; + NSData* expectedMessage = [NSData dataWithBytes:bytes length:sizeof(bytes)]; + + OCMExpect([binaryMessenger sendOnChannel:@"dev.flutter/channel-buffers" message:expectedMessage]); + [channel resizeChannelBuffer:3]; + OCMVerifyAll(binaryMessenger); + [binaryMessenger stopMocking]; +} + +- (bool)testSetWarnsOnOverflow { + NSString* channelName = @"flutter/test"; id binaryMessenger = OCMStrictProtocolMock(@protocol(FlutterBinaryMessenger)); id codec = OCMProtocolMock(@protocol(FlutterMethodCodec)); FlutterBasicMessageChannel* channel = @@ -156,11 +180,15 @@ - (void)testResize { codec:codec]; XCTAssertNotNil(channel); - NSString* expectedMessageString = - [NSString stringWithFormat:@"resize\r%@\r%@", channelName, @100]; - NSData* expectedMessage = [expectedMessageString dataUsingEncoding:NSUTF8StringEncoding]; + // The expected content was created from the following Dart code: + // MethodCall call = MethodCall('overflow',['flutter/test', true]); + // StandardMethodCodec().encodeMethodCall(call).buffer.asUint8List(); + const unsigned char bytes[] = {7, 8, 111, 118, 101, 114, 102, 108, 111, 119, 12, 2, 7, 12, + 102, 108, 117, 116, 116, 101, 114, 47, 116, 101, 115, 116, 1}; + NSData* expectedMessage = [NSData dataWithBytes:bytes length:sizeof(bytes)]; + OCMExpect([binaryMessenger sendOnChannel:@"dev.flutter/channel-buffers" message:expectedMessage]); - [channel resizeChannelBuffer:100]; + [channel setWarnsOnOverflow:NO]; OCMVerifyAll(binaryMessenger); [binaryMessenger stopMocking]; } From 682c04367628ec6775910e12f38729c114a3385f Mon Sep 17 00:00:00 2001 From: Kevin Lubick Date: Tue, 19 Sep 2023 10:05:20 -0400 Subject: [PATCH 128/859] Add more missing Skia #includes (#46034) Ran into compile errors when refactoring Skia's #includes. This addresses those ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [ ] I listed at least one issue that this PR fixes in the description above. - [x] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [ ] I updated/added relevant documentation (doc comments with `///`). - [x] I signed the [CLA]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat --- display_list/skia/dl_sk_paint_dispatcher.h | 1 + display_list/skia/dl_sk_types.h | 1 + 2 files changed, 2 insertions(+) diff --git a/display_list/skia/dl_sk_paint_dispatcher.h b/display_list/skia/dl_sk_paint_dispatcher.h index 33c59ff29bb14..46ca117b5592e 100644 --- a/display_list/skia/dl_sk_paint_dispatcher.h +++ b/display_list/skia/dl_sk_paint_dispatcher.h @@ -6,6 +6,7 @@ #define FLUTTER_DISPLAY_LIST_SKIA_DL_SK_PAINT_DISPATCHER_H_ #include "flutter/display_list/dl_op_receiver.h" +#include "flutter/display_list/skia/dl_sk_types.h" namespace flutter { diff --git a/display_list/skia/dl_sk_types.h b/display_list/skia/dl_sk_types.h index bd359b64f5b34..6f66c0629e68a 100644 --- a/display_list/skia/dl_sk_types.h +++ b/display_list/skia/dl_sk_types.h @@ -15,6 +15,7 @@ #include "third_party/skia/include/core/SkImage.h" #include "third_party/skia/include/core/SkImageFilter.h" #include "third_party/skia/include/core/SkMaskFilter.h" +#include "third_party/skia/include/core/SkPaint.h" #include "third_party/skia/include/core/SkPath.h" #include "third_party/skia/include/core/SkPathEffect.h" #include "third_party/skia/include/core/SkPicture.h" From 313096af368fc69630a3670192ad4a699e898c6a Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 19 Sep 2023 10:13:21 -0400 Subject: [PATCH 129/859] Roll Fuchsia Mac SDK from qy5FU4y6sx1FscCpd... to 06g6i7-5u8O-FOTSi... (#46038) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jonahwilliams@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 3a4a08f220fee..9842ed9c954d1 100644 --- a/DEPS +++ b/DEPS @@ -914,7 +914,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'qy5FU4y6sx1FscCpd_r8vxXwLApv4irBWyfBT9WF374C' + 'version': '06g6i7-5u8O-FOTSiXV49zPhENc4ZaXzGkSyFuDpJQgC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From ed6aeebcf89f9fc8d45a936aade601bdd9e32624 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 19 Sep 2023 10:22:54 -0400 Subject: [PATCH 130/859] Roll Dart SDK from 8ad823c03f26 to e7cd697bd0e9 (2 revisions) (#46039) https://dart.googlesource.com/sdk.git/+log/8ad823c03f26..e7cd697bd0e9 2023-09-19 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-179.0.dev 2023-09-19 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-178.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jonahwilliams@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 9842ed9c954d1..cc1bb7d941351 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '8ad823c03f2612b1a7e4554d56629523f69f3a68', + 'dart_revision': 'e7cd697bd0e9df94cf8e04f214e14fb2fc0929ee', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index 5aa14f3d9dcbe..d29520b1b3e17 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: f7d8c96060b34af806d674b62b8183a1 +Signature: a466c9ba2fc46dcb8427b8aa0bcbb658 ==================================================================================================== LIBRARY: dart From 24e3f10884a82368979ffd2726d666d0ab4c0637 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 19 Sep 2023 10:30:28 -0400 Subject: [PATCH 131/859] Roll Skia from 1e84aa4509cd to 91adc7d289f7 (2 revisions) (#46040) https://skia.googlesource.com/skia.git/+log/1e84aa4509cd..91adc7d289f7 2023-09-19 robertphillips@google.com [graphite] Refactor the precompilation SelectOption and AddToKey methods 2023-09-19 kjlubick@google.com Add googlefonts CIPD asset to fontations If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index cc1bb7d941351..2d9be20109eb8 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '1e84aa4509cd7c88d50095e9c241282a4ba1b7b4', + 'skia_revision': '91adc7d289f7c692aa12eb29bcbdfb9ac4ee1577', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index b6333a0952146..74602b8ed024b 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 9ff1a09a26d8f28317c610127f9173ae +Signature: 0b3eeb8128a8d7c2778285bd77461f57 ==================================================================================================== LIBRARY: etc1 From d2ac155905d2ca8dc627e525f6465184a9644ae0 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 19 Sep 2023 11:35:50 -0400 Subject: [PATCH 132/859] Roll Skia from 91adc7d289f7 to d54cf63f051b (3 revisions) (#46043) https://skia.googlesource.com/skia.git/+log/91adc7d289f7..d54cf63f051b 2023-09-19 johnstiles@google.com Add support for matching expected test failures into SkSLTest. 2023-09-19 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll Dawn from 5ca21ed72084 to 58dbcccc38b5 (2 revisions) 2023-09-19 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll vulkan-deps from 293f55f6d3d0 to 640b7331b244 (1 revision) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 2d9be20109eb8..993382a6bf2ff 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '91adc7d289f7c692aa12eb29bcbdfb9ac4ee1577', + 'skia_revision': 'd54cf63f051bc47db928e06cd2b86342d5cf3864', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From c0dd41975d654d6473d2ff01c29dd39bd3a5d5d6 Mon Sep 17 00:00:00 2001 From: Mouad Debbar Date: Tue, 19 Sep 2023 11:53:16 -0400 Subject: [PATCH 133/859] [web] DOM objects implement JS object (#46047) Instead of doing `as JSAny` for DOM objects that are defined in static JS interop, let's make them `implements JSObject`? cc @eyebrowsoffire @srujzs thoughts? --- lib/web_ui/lib/src/engine/canvaskit/canvaskit_api.dart | 2 +- lib/web_ui/lib/src/engine/dom.dart | 10 +++++----- .../lib/src/engine/skwasm/skwasm_impl/codecs.dart | 4 +--- .../lib/src/engine/skwasm/skwasm_impl/renderer.dart | 4 ++-- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/lib/web_ui/lib/src/engine/canvaskit/canvaskit_api.dart b/lib/web_ui/lib/src/engine/canvaskit/canvaskit_api.dart index 492bbb1b50afb..dff531d06c244 100644 --- a/lib/web_ui/lib/src/engine/canvaskit/canvaskit_api.dart +++ b/lib/web_ui/lib/src/engine/canvaskit/canvaskit_api.dart @@ -250,7 +250,7 @@ extension CanvasKitExtension on CanvasKit { DomImageBitmap imageBitmap, bool hasPremultipliedAlpha, ) => _MakeLazyImageFromTextureSource3( - imageBitmap as JSAny, + imageBitmap, 0.toJS, hasPremultipliedAlpha.toJS, ); diff --git a/lib/web_ui/lib/src/engine/dom.dart b/lib/web_ui/lib/src/engine/dom.dart index c0a7a288c666b..a7d36ca1115fd 100644 --- a/lib/web_ui/lib/src/engine/dom.dart +++ b/lib/web_ui/lib/src/engine/dom.dart @@ -352,7 +352,7 @@ external DomHTMLDocument get domDocument; @JS() @staticInterop -class DomEventTarget {} +class DomEventTarget implements JSObject {} extension DomEventTargetExtension on DomEventTarget { @JS('addEventListener') @@ -1164,7 +1164,7 @@ extension WebGLContextExtension on WebGLContext { @JS() @staticInterop -abstract class DomCanvasImageSource {} +abstract class DomCanvasImageSource implements JSObject {} @JS() @staticInterop @@ -1460,7 +1460,7 @@ extension DomImageDataExtension on DomImageData { @JS('ImageBitmap') @staticInterop -class DomImageBitmap {} +class DomImageBitmap implements JSObject {} extension DomImageBitmapExtension on DomImageBitmap { external JSNumber get width; @@ -1838,7 +1838,7 @@ class HttpFetchError implements Exception { @JS() @staticInterop -class DomResponse {} +class DomResponse implements JSObject {} extension DomResponseExtension on DomResponse { @JS('status') @@ -1875,7 +1875,7 @@ extension DomHeadersExtension on DomHeaders { @JS() @staticInterop -class _DomReadableStream {} +class _DomReadableStream implements JSObject {} extension _DomReadableStreamExtension on _DomReadableStream { external _DomStreamReader getReader(); diff --git a/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/codecs.dart b/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/codecs.dart index 1f767354b8355..57a30d9cc5bbf 100644 --- a/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/codecs.dart +++ b/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/codecs.dart @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:js_interop'; - import 'package:ui/src/engine.dart'; import 'package:ui/src/engine/skwasm/skwasm_impl.dart'; import 'package:ui/ui.dart' as ui; @@ -21,7 +19,7 @@ class SkwasmImageDecoder extends BrowserImageDecoder { final int height = frame.codedHeight.toInt(); final SkwasmSurface surface = (renderer as SkwasmRenderer).surface; return SkwasmImage(imageCreateFromTextureSource( - frame as JSAny, + frame, width, height, surface.handle, diff --git a/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/renderer.dart b/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/renderer.dart index 5b2636d8a8b7f..4cdaf6805a3ed 100644 --- a/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/renderer.dart +++ b/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/renderer.dart @@ -391,7 +391,7 @@ class SkwasmRenderer implements Renderer { } final SkwasmImageDecoder decoder = SkwasmImageDecoder( contentType: contentType, - dataSource: response.body as JSAny, + dataSource: response.body, debugSource: uri.toString(), ); await decoder.initialize(); @@ -452,7 +452,7 @@ class SkwasmRenderer implements Renderer { @override ui.Image createImageFromImageBitmap(DomImageBitmap imageSource) { return SkwasmImage(imageCreateFromTextureSource( - imageSource as JSAny, + imageSource, imageSource.width.toDartInt, imageSource.height.toDartInt, surface.handle, From 10cb3677178614e7ad85d2dc2948ddc5e370cdfb Mon Sep 17 00:00:00 2001 From: Jackson Gardner Date: Tue, 19 Sep 2023 09:27:49 -0700 Subject: [PATCH 134/859] Update CI to Chrome 117 (#45842) --- .ci.yaml | 2 +- ci/builders/linux_web_engine.json | 48 +++++++++---------- lib/web_ui/dev/browser_lock.yaml | 10 ++-- lib/web_ui/dev/generate_builder_json.dart | 2 +- .../test/engine/pointer_binding_test.dart | 2 +- 5 files changed, 32 insertions(+), 32 deletions(-) diff --git a/.ci.yaml b/.ci.yaml index 484dabfa97843..3f1c7e5334ff2 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -361,7 +361,7 @@ targets: {"download_emsdk": true} dependencies: >- [ - {"dependency": "chrome_and_driver", "version": "version:115.0"}, + {"dependency": "chrome_and_driver", "version": "version:117.0"}, {"dependency": "curl", "version": "version:7.64.0"} ] framework: "true" diff --git a/ci/builders/linux_web_engine.json b/ci/builders/linux_web_engine.json index 6134f4640ff8f..83ceb59f3462e 100644 --- a/ci/builders/linux_web_engine.json +++ b/ci/builders/linux_web_engine.json @@ -355,7 +355,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:115.0" + "version": "version:117.0" } ], "tasks": [ @@ -391,7 +391,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:115.0" + "version": "version:117.0" } ], "tasks": [ @@ -427,7 +427,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:115.0" + "version": "version:117.0" } ], "tasks": [ @@ -463,7 +463,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:115.0" + "version": "version:117.0" } ], "tasks": [ @@ -499,7 +499,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:115.0" + "version": "version:117.0" } ], "tasks": [ @@ -535,7 +535,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:115.0" + "version": "version:117.0" } ], "tasks": [ @@ -571,7 +571,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:115.0" + "version": "version:117.0" } ], "tasks": [ @@ -607,7 +607,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:115.0" + "version": "version:117.0" } ], "tasks": [ @@ -823,7 +823,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:115.0" + "version": "version:117.0" } ], "tasks": [ @@ -859,7 +859,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:115.0" + "version": "version:117.0" } ], "tasks": [ @@ -895,7 +895,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:115.0" + "version": "version:117.0" } ], "tasks": [ @@ -931,7 +931,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:115.0" + "version": "version:117.0" } ], "tasks": [ @@ -967,7 +967,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:115.0" + "version": "version:117.0" } ], "tasks": [ @@ -1003,7 +1003,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:115.0" + "version": "version:117.0" } ], "tasks": [ @@ -1039,7 +1039,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:115.0" + "version": "version:117.0" } ], "tasks": [ @@ -1075,7 +1075,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:115.0" + "version": "version:117.0" } ], "tasks": [ @@ -1271,7 +1271,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:115.0" + "version": "version:117.0" } ], "tasks": [ @@ -1307,7 +1307,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:115.0" + "version": "version:117.0" } ], "tasks": [ @@ -1343,7 +1343,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:115.0" + "version": "version:117.0" } ], "tasks": [ @@ -1379,7 +1379,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:115.0" + "version": "version:117.0" } ], "tasks": [ @@ -1415,7 +1415,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:115.0" + "version": "version:117.0" } ], "tasks": [ @@ -1451,7 +1451,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:115.0" + "version": "version:117.0" } ], "tasks": [ @@ -1487,7 +1487,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:115.0" + "version": "version:117.0" } ], "tasks": [ @@ -1523,7 +1523,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:115.0" + "version": "version:117.0" } ], "tasks": [ diff --git a/lib/web_ui/dev/browser_lock.yaml b/lib/web_ui/dev/browser_lock.yaml index 05fe635e109d7..3a957ede46156 100644 --- a/lib/web_ui/dev/browser_lock.yaml +++ b/lib/web_ui/dev/browser_lock.yaml @@ -13,11 +13,11 @@ chrome: # `self.m.platform.name.capitalize()` evaluates to. See: # # recipe_modules/web_util/api.py - Linux: 1148103 - Mac: 1148119 - Mac_Arm: 1148112 - Win: 1148119 - version: '115.0' # CIPD tag for the above Build IDs. Normally "ChromeMajorVersion.UploadAttempt". ;) + Linux: 1181205 + Mac: 1181205 + Mac_Arm: 1181212 + Win: 1181217 + version: '117.0' # CIPD tag for the above Build IDs. Normally "ChromeMajorVersion.UploadAttempt". ;) firefox: version: '106.0' diff --git a/lib/web_ui/dev/generate_builder_json.dart b/lib/web_ui/dev/generate_builder_json.dart index e85e7cb279c06..e92820ee8d72a 100644 --- a/lib/web_ui/dev/generate_builder_json.dart +++ b/lib/web_ui/dev/generate_builder_json.dart @@ -154,7 +154,7 @@ Iterable _getTestStepsForPlatform( if (suite.runConfig.browser == BrowserName.chrome) { 'dependency': 'chrome_and_driver', - 'version': 'version:115.0', + 'version': 'version:117.0', }, if (suite.runConfig.browser == BrowserName.firefox) { diff --git a/lib/web_ui/test/engine/pointer_binding_test.dart b/lib/web_ui/test/engine/pointer_binding_test.dart index 8543210d30240..2f7af70ddd51a 100644 --- a/lib/web_ui/test/engine/pointer_binding_test.dart +++ b/lib/web_ui/test/engine/pointer_binding_test.dart @@ -3379,7 +3379,7 @@ void _testClickDebouncer() { ); // Wait for the timer to expire to make sure pointer events are flushed. - await Future.delayed(const Duration(milliseconds: 11)); + await Future.delayed(const Duration(milliseconds: 20)); expect( reason: 'Queued up events should be flushed to the framework because the ' From 661d2fe81996a07bc59f004b906654486a973367 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 19 Sep 2023 12:33:04 -0400 Subject: [PATCH 135/859] Roll Skia from d54cf63f051b to d756a2f5665d (5 revisions) (#46048) https://skia.googlesource.com/skia.git/+log/d54cf63f051b..d756a2f5665d 2023-09-19 kjlubick@google.com Enforce IWYU on more src/core files 2023-09-19 johnstiles@google.com Migrate Mali 400 test disables into SkSLTest.cpp. 2023-09-19 johnstiles@google.com Migrate Adreno test disables into SkSLTest.cpp. 2023-09-19 kjlubick@google.com Add way to get GrDirectContext from Ganesh-backed image 2023-09-19 robertphillips@google.com [graphite] Use Compose helper to add color filters to the key If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 993382a6bf2ff..01c501649f4e7 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'd54cf63f051bc47db928e06cd2b86342d5cf3864', + 'skia_revision': 'd756a2f5665dc36024488838ecd98c0f04073c07', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 74602b8ed024b..9857487c2d059 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 0b3eeb8128a8d7c2778285bd77461f57 +Signature: a6e01ac4996739e064bee5ae56e8a934 ==================================================================================================== LIBRARY: etc1 From 3972efe6ad266ae39ace9c43b8df58631a0fa66c Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Tue, 19 Sep 2023 10:58:33 -0700 Subject: [PATCH 136/859] Rename `layoutGoals` to `kLayoutGoals` to enforce lints on headers. (#46054) This is required to eventually land https://github.com/flutter/flutter/issues/134969 (lint header files). --- .../darwin/macos/framework/Source/FlutterKeyboardManager.mm | 2 +- shell/platform/darwin/macos/framework/Source/KeyCodeMap.g.mm | 2 +- .../darwin/macos/framework/Source/KeyCodeMap_Internal.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/shell/platform/darwin/macos/framework/Source/FlutterKeyboardManager.mm b/shell/platform/darwin/macos/framework/Source/FlutterKeyboardManager.mm index 2238c300bf9a3..8812df4e948da 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterKeyboardManager.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterKeyboardManager.mm @@ -275,7 +275,7 @@ - (void)buildLayout { std::map mandatoryGoalsByChar; std::map usLayoutGoalsByKeyCode; - for (const LayoutGoal& goal : flutter::layoutGoals) { + for (const LayoutGoal& goal : flutter::kLayoutGoals) { if (goal.mandatory) { mandatoryGoalsByChar[goal.keyChar] = goal; } else { diff --git a/shell/platform/darwin/macos/framework/Source/KeyCodeMap.g.mm b/shell/platform/darwin/macos/framework/Source/KeyCodeMap.g.mm index 52229d518b0ab..6fc5c71c78d08 100644 --- a/shell/platform/darwin/macos/framework/Source/KeyCodeMap.g.mm +++ b/shell/platform/darwin/macos/framework/Source/KeyCodeMap.g.mm @@ -245,7 +245,7 @@ const uint64_t kCapsLockPhysicalKey = 0x00070039; const uint64_t kCapsLockLogicalKey = 0x100000104; -const std::vector layoutGoals = { +const std::vector kLayoutGoals = { LayoutGoal{0x31, 0x20, false}, // Space LayoutGoal{0x27, 0x22, false}, // Quote LayoutGoal{0x2b, 0x2c, false}, // Comma diff --git a/shell/platform/darwin/macos/framework/Source/KeyCodeMap_Internal.h b/shell/platform/darwin/macos/framework/Source/KeyCodeMap_Internal.h index 9a7e38659ff4e..15fe906c1bc03 100644 --- a/shell/platform/darwin/macos/framework/Source/KeyCodeMap_Internal.h +++ b/shell/platform/darwin/macos/framework/Source/KeyCodeMap_Internal.h @@ -104,6 +104,6 @@ typedef struct { * All keys that Flutter wants to derive layout for, and guides on how to derive * them. */ -extern const std::vector layoutGoals; +extern const std::vector kLayoutGoals; } // namespace flutter From 6f7af24decb308b79b774a8d0e37da0aefd96bda Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Tue, 19 Sep 2023 11:05:38 -0700 Subject: [PATCH 137/859] Deprecate `fml::LOG_X` in favor of `kLogX`. (#46052) This is required to eventually land https://github.com/flutter/flutter/issues/134969 (lint header files). No changes in behavior in this PR. Future steps: - Change existing `LOG_X` references to `kLogX` - Delete `LOG_X` --- fml/log_level.h | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/fml/log_level.h b/fml/log_level.h index 2c9a85305b53d..30e40a48055c3 100644 --- a/fml/log_level.h +++ b/fml/log_level.h @@ -7,29 +7,47 @@ namespace fml { +// Default log levels. Negative values can be used for verbose log levels. typedef int LogSeverity; -// Default log levels. Negative values can be used for verbose log levels. -constexpr LogSeverity LOG_INFO = 0; -constexpr LogSeverity LOG_WARNING = 1; -constexpr LogSeverity LOG_ERROR = 2; -constexpr LogSeverity LOG_FATAL = 3; -constexpr LogSeverity LOG_NUM_SEVERITIES = 4; +constexpr LogSeverity kLogInfo = 0; +constexpr LogSeverity kLogWarning = 1; +constexpr LogSeverity kLogError = 2; +constexpr LogSeverity kLogFatal = 3; +constexpr LogSeverity kLogNumSeverities = 4; + +// DEPRECATED: Use |kLogInfo|. +constexpr LogSeverity LOG_INFO = kLogInfo; + +// DEPRECATED: Use |kLogWarning|. +constexpr LogSeverity LOG_WARNING = kLogWarning; + +// DEPRECATED: Use |kLogError|. +constexpr LogSeverity LOG_ERROR = kLogError; + +// DEPRECATED: Use |kLogFatal|. +constexpr LogSeverity LOG_FATAL = kLogFatal; + +// DEPRECATED: Use |kLogNumSeverities|. +constexpr LogSeverity LOG_NUM_SEVERITIES = kLogNumSeverities; // One of the Windows headers defines ERROR to 0. This makes the token // concatenation in FML_LOG(ERROR) to resolve to LOG_0. We define this back to // the appropriate log level. #ifdef _WIN32 -#define LOG_0 LOG_ERROR +#define LOG_0 kLogError #endif -// LOG_DFATAL is LOG_FATAL in debug mode, ERROR in normal mode +// kLogDFatal is kLogFatal in debug mode, kLogError in normal mode #ifdef NDEBUG -const LogSeverity LOG_DFATAL = LOG_ERROR; +const LogSeverity kLogDFatal = kLogError; #else -const LogSeverity LOG_DFATAL = LOG_FATAL; +const LogSeverity kLogDFatal = kLogFatal; #endif +// DEPRECATED: Use |kLogDFatal|. +const LogSeverity LOG_DFATAL = kLogDFatal; + } // namespace fml #endif // FLUTTER_FML_LOG_LEVEL_H_ From e6ec5a8cadce5b94ca3fbc8fb25baac36238bf71 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 19 Sep 2023 14:08:55 -0400 Subject: [PATCH 138/859] Roll Dart SDK from e7cd697bd0e9 to b8f006d88c07 (1 revision) (#46055) https://dart.googlesource.com/sdk.git/+log/e7cd697bd0e9..b8f006d88c07 2023-09-19 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-180.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jonahwilliams@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 01c501649f4e7..54c3e66c3c167 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': 'e7cd697bd0e9df94cf8e04f214e14fb2fc0929ee', + 'dart_revision': 'b8f006d88c07a17683c249a8601a552db6753298', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py From c15c6631bbcc970e40e905908b05d5906a2d8702 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 19 Sep 2023 14:30:17 -0400 Subject: [PATCH 139/859] Roll Skia from d756a2f5665d to 559a964f9f1b (9 revisions) (#46059) https://skia.googlesource.com/skia.git/+log/d756a2f5665d..559a964f9f1b 2023-09-19 brianosman@google.com Fix encoder funtion for 101010_xr 2023-09-19 johnstiles@google.com Pass the GraphiteTestContext to the most-complex DEF_TESTs. 2023-09-19 johnstiles@google.com Return a ContextInfo from Graphite's ContextFactory. 2023-09-19 kjlubick@google.com Add grep (pgrep) to Docker container used to build Skia-release 2023-09-19 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 640b7331b244 to e1a78e7e85a9 (2 revisions) 2023-09-19 bungeman@google.com [skshaper] Stage "Split off SkUnicode specific code" 2023-09-19 jvanverth@google.com [graphite] Track whether ordered Recordings are required. 2023-09-19 jmbetancourt@google.com expose textProperty slot support to CanvasKit 2023-09-19 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll ANGLE from 91ef1f3cfd30 to 7cb117e0b06c (4 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 54c3e66c3c167..85da328063832 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'd756a2f5665dc36024488838ecd98c0f04073c07', + 'skia_revision': '559a964f9f1bd6ac5ab226c791d18c9defaf025b', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 9857487c2d059..f54f2f45cb459 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: a6e01ac4996739e064bee5ae56e8a934 +Signature: 672d851f6fca7bd95c59e7a7c60503cd ==================================================================================================== LIBRARY: etc1 @@ -8655,6 +8655,7 @@ ORIGIN: ../../../third_party/skia/include/private/SkJpegGainmapEncoder.h + ../.. ORIGIN: ../../../third_party/skia/include/private/SkXmp.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/skottie/include/SlotManager.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/skottie/src/SlotManager.cpp + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/modules/skshaper/src/SkShaper_skunicode.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/skunicode/src/SkUnicode_hardcoded.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/skunicode/src/SkUnicode_hardcoded.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/skunicode/src/SkUnicode_icu_bidi.h + ../../../third_party/skia/LICENSE @@ -8696,6 +8697,7 @@ FILE: ../../../third_party/skia/include/private/SkJpegGainmapEncoder.h FILE: ../../../third_party/skia/include/private/SkXmp.h FILE: ../../../third_party/skia/modules/skottie/include/SlotManager.h FILE: ../../../third_party/skia/modules/skottie/src/SlotManager.cpp +FILE: ../../../third_party/skia/modules/skshaper/src/SkShaper_skunicode.cpp FILE: ../../../third_party/skia/modules/skunicode/src/SkUnicode_hardcoded.cpp FILE: ../../../third_party/skia/modules/skunicode/src/SkUnicode_hardcoded.h FILE: ../../../third_party/skia/modules/skunicode/src/SkUnicode_icu_bidi.h From d6f040c7882831e94248cf6e5e6474eb7fbdbaec Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Tue, 19 Sep 2023 12:54:00 -0700 Subject: [PATCH 140/859] [ios]Adjust golden test threshold for TwoPlatformViewsWithOtherBackDropFilterTests based on current macOS version (#45891) TwoPlatformViewsWithOtherBackDropFilterTests is failing on macOS 13 with the same simulator version used in macOS 12. The image diff looks identical and slightly above the threshold. This PR adjusts the threshold for this test temporarily so our CI can run on both macOS 13 and 12. This change can be reverted when we move all our CI to macOS 13 Fixes https://github.com/flutter/flutter/issues/134740 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- .../ios/Scenarios/ScenariosUITests/BogusFontTextTest.m | 2 +- .../ios/Scenarios/ScenariosUITests/GoldenImage.h | 2 +- .../ios/Scenarios/ScenariosUITests/GoldenImage.m | 8 +++----- .../Scenarios/ScenariosUITests/GoldenPlatformViewTests.h | 1 + .../Scenarios/ScenariosUITests/GoldenPlatformViewTests.m | 3 ++- .../ios/Scenarios/ScenariosUITests/GoldenTestManager.h | 3 ++- .../ios/Scenarios/ScenariosUITests/GoldenTestManager.m | 5 +++-- .../ios/Scenarios/ScenariosUITests/PlatformViewUITests.m | 5 +++++ .../ios/Scenarios/ScenariosUITests/SpawnEngineTest.m | 2 +- 9 files changed, 19 insertions(+), 12 deletions(-) diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/BogusFontTextTest.m b/testing/scenario_app/ios/Scenarios/ScenariosUITests/BogusFontTextTest.m index 14c9e0bb93365..dc554ae2e5986 100644 --- a/testing/scenario_app/ios/Scenarios/ScenariosUITests/BogusFontTextTest.m +++ b/testing/scenario_app/ios/Scenarios/ScenariosUITests/BogusFontTextTest.m @@ -25,7 +25,7 @@ - (void)testFontRenderingWhenSuppliedWithBogusFont { XCTAssertTrue([addTextField waitForExistenceWithTimeout:30]); GoldenTestManager* manager = [[GoldenTestManager alloc] initWithLaunchArg:@"--bogus-font-text"]; - [manager checkGoldenForTest:self]; + [manager checkGoldenForTest:self rmesThreshold:kDefaultRmseThreshold]; } @end diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenImage.h b/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenImage.h index dead0c530e126..4c0b9306fe14b 100644 --- a/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenImage.h +++ b/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenImage.h @@ -19,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN // Compare this GoldenImage to `image`. // // Return YES if the `image` of this GoldenImage have the same pixels of provided `image`. -- (BOOL)compareGoldenToImage:(UIImage*)image; +- (BOOL)compareGoldenToImage:(UIImage*)image rmesThreshold:(double)rmesThreshold; @end diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenImage.m b/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenImage.m index 698207aa681d4..37ae7b70fbb1d 100644 --- a/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenImage.m +++ b/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenImage.m @@ -8,8 +8,6 @@ #import #include -static const double kRmseThreshold = 0.5; - @interface GoldenImage () @end @@ -28,7 +26,7 @@ - (instancetype)initWithGoldenNamePrefix:(NSString*)prefix { return self; } -- (BOOL)compareGoldenToImage:(UIImage*)image { +- (BOOL)compareGoldenToImage:(UIImage*)image rmesThreshold:(double)rmesThreshold { if (!self.image || !image) { os_log_error(OS_LOG_DEFAULT, "GOLDEN DIFF FAILED: image does not exists."); return NO; @@ -91,11 +89,11 @@ - (BOOL)compareGoldenToImage:(UIImage*)image { } } double rmse = sqrt(sum / size); - if (rmse > kRmseThreshold) { + if (rmse > rmesThreshold) { os_log_error( OS_LOG_DEFAULT, "GOLDEN DIFF FAILED: image diff greater than threshold. Current diff: %@, threshold: %@", - @(rmse), @(kRmseThreshold)); + @(rmse), @(rmesThreshold)); return NO; } return YES; diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenPlatformViewTests.h b/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenPlatformViewTests.h index fd1b05ef0b009..625fbf8b31e3c 100644 --- a/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenPlatformViewTests.h +++ b/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenPlatformViewTests.h @@ -18,6 +18,7 @@ NS_ASSUME_NONNULL_BEGIN @interface GoldenPlatformViewTests : XCTestCase @property(nonatomic, strong) XCUIApplication* application; +@property(nonatomic, assign) double rmseThreadhold; // Initialize with a `GoldenTestManager`. - (instancetype)initWithManager:(GoldenTestManager*)manager invocation:(NSInvocation*)invocation; diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenPlatformViewTests.m b/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenPlatformViewTests.m index 7e4bb368fc6eb..7199fa2600e86 100644 --- a/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenPlatformViewTests.m +++ b/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenPlatformViewTests.m @@ -22,6 +22,7 @@ @implementation GoldenPlatformViewTests - (instancetype)initWithManager:(GoldenTestManager*)manager invocation:(NSInvocation*)invocation { self = [super initWithInvocation:invocation]; _manager = manager; + _rmseThreadhold = kDefaultRmseThreshold; return self; } @@ -45,6 +46,6 @@ - (void)checkPlatformViewGolden { @(kSecondsToWaitForPlatformView)); } - [self.manager checkGoldenForTest:self]; + [self.manager checkGoldenForTest:self rmesThreshold:self.rmseThreadhold]; } @end diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenTestManager.h b/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenTestManager.h index 4bb0b275a77e9..7026672af7c46 100644 --- a/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenTestManager.h +++ b/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenTestManager.h @@ -9,6 +9,7 @@ NS_ASSUME_NONNULL_BEGIN extern NSDictionary* launchArgsMap; +const extern double kDefaultRmseThreshold; // Manages a `GoldenPlatformViewTests`. // @@ -27,7 +28,7 @@ extern NSDictionary* launchArgsMap; // Take a sceenshot of the test app and check it has the same pixels with // goldenImage inside the `GoldenTestManager`. -- (void)checkGoldenForTest:(XCTestCase*)test; +- (void)checkGoldenForTest:(XCTestCase*)test rmesThreshold:(double)rmesThreshold; @end diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenTestManager.m b/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenTestManager.m index 76c95a06501fe..a8d966379a5aa 100644 --- a/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenTestManager.m +++ b/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenTestManager.m @@ -14,6 +14,7 @@ @interface GoldenTestManager () @implementation GoldenTestManager NSDictionary* launchArgsMap; +const double kDefaultRmseThreshold = 0.5; - (instancetype)initWithLaunchArg:(NSString*)launchArg { self = [super init]; @@ -73,7 +74,7 @@ - (instancetype)initWithLaunchArg:(NSString*)launchArg { return self; } -- (void)checkGoldenForTest:(XCTestCase*)test { +- (void)checkGoldenForTest:(XCTestCase*)test rmesThreshold:(double)rmesThreshold { XCUIScreenshot* screenshot = [[XCUIScreen mainScreen] screenshot]; if (!_goldenImage.image) { XCTAttachment* attachment = [XCTAttachment attachmentWithScreenshot:screenshot]; @@ -88,7 +89,7 @@ - (void)checkGoldenForTest:(XCTestCase*)test { _goldenImage.goldenName); } - if (![_goldenImage compareGoldenToImage:screenshot.image]) { + if (![_goldenImage compareGoldenToImage:screenshot.image rmesThreshold:rmesThreshold]) { XCTAttachment* screenshotAttachment = [XCTAttachment attachmentWithImage:screenshot.image]; screenshotAttachment.name = [_goldenImage.goldenName stringByAppendingString:@"_actual.png"]; screenshotAttachment.lifetime = XCTAttachmentLifetimeKeepAlways; diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/PlatformViewUITests.m b/testing/scenario_app/ios/Scenarios/ScenariosUITests/PlatformViewUITests.m index 03984f27fda42..7415a51717ddb 100644 --- a/testing/scenario_app/ios/Scenarios/ScenariosUITests/PlatformViewUITests.m +++ b/testing/scenario_app/ios/Scenarios/ScenariosUITests/PlatformViewUITests.m @@ -375,6 +375,11 @@ - (instancetype)initWithInvocation:(NSInvocation*)invocation { } - (void)testPlatformView { + // (TODO)cyanglaz: remove the threshold adjustment after all the ci migrates to macOS13. + // https://github.com/flutter/flutter/issues/133207 + if ([NSProcessInfo processInfo].operatingSystemVersion.majorVersion >= 13) { + self.rmseThreadhold = 0.7; + } [self checkPlatformViewGolden]; } diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/SpawnEngineTest.m b/testing/scenario_app/ios/Scenarios/ScenariosUITests/SpawnEngineTest.m index f00a8c988bdfd..cc5810eeac608 100644 --- a/testing/scenario_app/ios/Scenarios/ScenariosUITests/SpawnEngineTest.m +++ b/testing/scenario_app/ios/Scenarios/ScenariosUITests/SpawnEngineTest.m @@ -21,7 +21,7 @@ - (void)testSpawnEngineWorks { GoldenTestManager* manager = [[GoldenTestManager alloc] initWithLaunchArg:@"--spawn-engine-works"]; - [manager checkGoldenForTest:self]; + [manager checkGoldenForTest:self rmesThreshold:kDefaultRmseThreshold]; } @end From 2f203f110a24f2151fefa852e3fca189714a3e15 Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Tue, 19 Sep 2023 12:54:08 -0700 Subject: [PATCH 141/859] Add TODO(name) to comply with Clang Tidy. (#46057) Partial work towards https://github.com/flutter/flutter/issues/134969. --- shell/platform/darwin/macos/framework/Headers/FlutterEngine.h | 2 +- .../macos/framework/Headers/FlutterPluginRegistrarMacOS.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/shell/platform/darwin/macos/framework/Headers/FlutterEngine.h b/shell/platform/darwin/macos/framework/Headers/FlutterEngine.h index bb12d5cd2ae76..bc0cb71097360 100644 --- a/shell/platform/darwin/macos/framework/Headers/FlutterEngine.h +++ b/shell/platform/darwin/macos/framework/Headers/FlutterEngine.h @@ -16,7 +16,7 @@ #import "FlutterPluginRegistrarMacOS.h" #import "FlutterTexture.h" -// TODO: Merge this file with the iOS FlutterEngine.h. +// TODO(stuartmorgan): Merge this file with the iOS FlutterEngine.h. @class FlutterViewController; diff --git a/shell/platform/darwin/macos/framework/Headers/FlutterPluginRegistrarMacOS.h b/shell/platform/darwin/macos/framework/Headers/FlutterPluginRegistrarMacOS.h index 16768776afb0c..338896041d6bd 100644 --- a/shell/platform/darwin/macos/framework/Headers/FlutterPluginRegistrarMacOS.h +++ b/shell/platform/darwin/macos/framework/Headers/FlutterPluginRegistrarMacOS.h @@ -11,8 +11,8 @@ #import "FlutterPluginMacOS.h" #import "FlutterTexture.h" -// TODO: Merge this file and FlutterPluginMacOS.h with the iOS FlutterPlugin.h, sharing all but -// the platform-specific methods. +// TODO(stuartmorgan): Merge this file and FlutterPluginMacOS.h with the iOS FlutterPlugin.h, +// sharing all but the platform-specific methods. /** * The protocol for an object managing registration for a plugin. It provides access to application From 6fb090af64230c5a5ff49b6b3486c622d38ee221 Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Tue, 19 Sep 2023 14:13:18 -0700 Subject: [PATCH 142/859] `FlutterMouse.*` -> `kFlutterMouse.*`, so we can lint header files. (#46056) Partial work towards https://github.com/flutter/flutter/issues/134969. --------- Co-authored-by: Chris Bracken --- .../framework/Headers/FlutterViewController.h | 21 +++++++++++++++---- .../framework/Source/FlutterViewController.mm | 10 ++++----- .../Source/FlutterViewControllerTest.mm | 4 ++-- 3 files changed, 24 insertions(+), 11 deletions(-) diff --git a/shell/platform/darwin/macos/framework/Headers/FlutterViewController.h b/shell/platform/darwin/macos/framework/Headers/FlutterViewController.h index b0d7a9f8bd86e..3a28e94a85631 100644 --- a/shell/platform/darwin/macos/framework/Headers/FlutterViewController.h +++ b/shell/platform/darwin/macos/framework/Headers/FlutterViewController.h @@ -14,13 +14,26 @@ */ typedef NS_ENUM(NSInteger, FlutterMouseTrackingMode) { // Hover events will never be sent to Flutter. - FlutterMouseTrackingModeNone = 0, + kFlutterMouseTrackingModeNone = 0, + // NOLINTNEXTLINE(readability-identifier-naming) + FlutterMouseTrackingModeNone __attribute__((deprecated)) = kFlutterMouseTrackingModeNone, + // Hover events will be sent to Flutter when the view is in the key window. - FlutterMouseTrackingModeInKeyWindow, + kFlutterMouseTrackingModeInKeyWindow = 1, + // NOLINTNEXTLINE(readability-identifier-naming) + FlutterMouseTrackingModeInKeyWindow + __attribute__((deprecated)) = kFlutterMouseTrackingModeInKeyWindow, + // Hover events will be sent to Flutter when the view is in the active app. - FlutterMouseTrackingModeInActiveApp, + kFlutterMouseTrackingModeInActiveApp = 2, + // NOLINTNEXTLINE(readability-identifier-naming) + FlutterMouseTrackingModeInActiveApp + __attribute__((deprecated)) = kFlutterMouseTrackingModeInActiveApp, + // Hover events will be sent to Flutter regardless of window and app focus. - FlutterMouseTrackingModeAlways, + kFlutterMouseTrackingModeAlways = 3, + // NOLINTNEXTLINE(readability-identifier-naming) + FlutterMouseTrackingModeAlways __attribute__((deprecated)) = kFlutterMouseTrackingModeAlways, }; /** diff --git a/shell/platform/darwin/macos/framework/Source/FlutterViewController.mm b/shell/platform/darwin/macos/framework/Source/FlutterViewController.mm index 62d81dbaa43bd..5c22fe6c01d71 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterViewController.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterViewController.mm @@ -400,7 +400,7 @@ static void CommonInit(FlutterViewController* controller, FlutterEngine* engine) @"In unit tests, this is likely because either the FlutterViewController or " @"the FlutterEngine is mocked. Please subclass these classes instead.", controller.engine, controller.viewId); - controller->_mouseTrackingMode = FlutterMouseTrackingModeInKeyWindow; + controller->_mouseTrackingMode = kFlutterMouseTrackingModeInKeyWindow; controller->_textInputPlugin = [[FlutterTextInputPlugin alloc] initWithViewController:controller]; [controller initializeKeyboard]; [controller notifySemanticsEnabledChanged]; @@ -642,17 +642,17 @@ - (void)configureTrackingArea { // the view is actually loaded. return; } - if (_mouseTrackingMode != FlutterMouseTrackingModeNone && self.flutterView) { + if (_mouseTrackingMode != kFlutterMouseTrackingModeNone && self.flutterView) { NSTrackingAreaOptions options = NSTrackingMouseEnteredAndExited | NSTrackingMouseMoved | NSTrackingInVisibleRect | NSTrackingEnabledDuringMouseDrag; switch (_mouseTrackingMode) { - case FlutterMouseTrackingModeInKeyWindow: + case kFlutterMouseTrackingModeInKeyWindow: options |= NSTrackingActiveInKeyWindow; break; - case FlutterMouseTrackingModeInActiveApp: + case kFlutterMouseTrackingModeInActiveApp: options |= NSTrackingActiveInActiveApp; break; - case FlutterMouseTrackingModeAlways: + case kFlutterMouseTrackingModeAlways: options |= NSTrackingActiveAlways; break; default: diff --git a/shell/platform/darwin/macos/framework/Source/FlutterViewControllerTest.mm b/shell/platform/darwin/macos/framework/Source/FlutterViewControllerTest.mm index 1628aa004ef4d..eb28a5b786ad5 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterViewControllerTest.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterViewControllerTest.mm @@ -195,8 +195,8 @@ id MockGestureEvent(NSEventType type, NSEventPhase phase, double magnification, initWithAssetsPath:fixtures ICUDataPath:[fixtures stringByAppendingString:@"/icudtl.dat"]]; FlutterViewController* viewController = [[FlutterViewController alloc] initWithProject:project]; - viewController.mouseTrackingMode = FlutterMouseTrackingModeInActiveApp; - ASSERT_EQ(viewController.mouseTrackingMode, FlutterMouseTrackingModeInActiveApp); + viewController.mouseTrackingMode = kFlutterMouseTrackingModeInActiveApp; + ASSERT_EQ(viewController.mouseTrackingMode, kFlutterMouseTrackingModeInActiveApp); } TEST(FlutterViewControllerTest, TestKeyEventsAreSentToFramework) { From b6f130278df8fcd12ffe5029e5d3dd64e9a4b2b1 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam <58529443+srujzs@users.noreply.github.com> Date: Tue, 19 Sep 2023 14:14:16 -0700 Subject: [PATCH 143/859] Implement JSObject instead of extending (#46070) JSObject will have a factory constructor to create an object literal, so you can't extend it as it will no longer have a generative constructor (@staticInterop types can't have generative constructors). --- lib/web_ui/lib/src/engine/js_interop/js_loader.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/web_ui/lib/src/engine/js_interop/js_loader.dart b/lib/web_ui/lib/src/engine/js_interop/js_loader.dart index 096fb57915a15..eafb921c5135c 100644 --- a/lib/web_ui/lib/src/engine/js_interop/js_loader.dart +++ b/lib/web_ui/lib/src/engine/js_interop/js_loader.dart @@ -73,7 +73,7 @@ abstract class FlutterEngineInitializer{ @JS() @anonymous @staticInterop -abstract class FlutterAppRunner extends JSObject { +abstract class FlutterAppRunner implements JSObject { factory FlutterAppRunner({required RunAppFn runApp,}) => FlutterAppRunner._( runApp: (([RunAppFnParameters? args]) => futureToPromise(runApp(args))).toJS ); @@ -101,7 +101,7 @@ typedef RunAppFn = Future Function([RunAppFnParameters?]); @JS() @anonymous @staticInterop -abstract class FlutterApp extends JSObject { +abstract class FlutterApp implements JSObject { /// Cleans a Flutter app external factory FlutterApp(); } From 92901270d341fc59382973c53953e15fd62c80cc Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 19 Sep 2023 17:15:05 -0400 Subject: [PATCH 144/859] Roll Skia from 559a964f9f1b to fe3568162721 (5 revisions) (#46069) https://skia.googlesource.com/skia.git/+log/559a964f9f1b..fe3568162721 2023-09-19 jvanverth@google.com [graphite] Switch signed unique ID iterators to unsigned. 2023-09-19 jamesgk@google.com Add "unsafe apis" toggle for Adapter in Graphite DawnTestContext 2023-09-19 fmalita@chromium.org [skottie] Make text shaper header public 2023-09-19 jvanverth@google.com [graphite] Add option to disable cached glyph uploads. 2023-09-19 jamesgk@google.com [graphite] Use Dawn's dual-src blend coeffs when possible If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/DEPS b/DEPS index 85da328063832..dc3a636e83c2a 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '559a964f9f1bd6ac5ab226c791d18c9defaf025b', + 'skia_revision': 'fe35681627210de13b447ccb9b40ae6bb8e447d7', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index f54f2f45cb459..f331bc2e1e9b1 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 672d851f6fca7bd95c59e7a7c60503cd +Signature: 4b2d1a29398b500d5c27e9d459eb2f6d ==================================================================================================== LIBRARY: etc1 @@ -5740,6 +5740,7 @@ ORIGIN: ../../../third_party/skia/include/ports/SkCFObject.h + ../../../third_pa ORIGIN: ../../../third_party/skia/include/private/chromium/GrVkSecondaryCBDrawContext.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/private/gpu/ganesh/GrContext_Base.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/private/gpu/ganesh/GrImageContext.h + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/modules/skottie/include/TextShaper.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/skottie/src/Composition.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/skottie/src/Composition.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/skottie/src/Layer.cpp + ../../../third_party/skia/LICENSE @@ -5768,12 +5769,12 @@ ORIGIN: ../../../third_party/skia/modules/skottie/src/layers/NullLayer.cpp + ../ ORIGIN: ../../../third_party/skia/modules/skottie/src/layers/SolidLayer.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/skottie/src/text/RangeSelector.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/skottie/src/text/RangeSelector.h + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/modules/skottie/src/text/SkottieShaper.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/skottie/src/text/SkottieShaper.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/skottie/src/text/TextAdapter.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/skottie/src/text/TextAdapter.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/skottie/src/text/TextAnimator.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/skottie/src/text/TextAnimator.h + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/modules/skottie/src/text/TextShaper.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/skottie/src/text/TextValue.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/skottie/src/text/TextValue.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/sksg/include/SkSGRenderEffect.h + ../../../third_party/skia/LICENSE @@ -5858,6 +5859,7 @@ FILE: ../../../third_party/skia/include/ports/SkCFObject.h FILE: ../../../third_party/skia/include/private/chromium/GrVkSecondaryCBDrawContext.h FILE: ../../../third_party/skia/include/private/gpu/ganesh/GrContext_Base.h FILE: ../../../third_party/skia/include/private/gpu/ganesh/GrImageContext.h +FILE: ../../../third_party/skia/modules/skottie/include/TextShaper.h FILE: ../../../third_party/skia/modules/skottie/src/Composition.cpp FILE: ../../../third_party/skia/modules/skottie/src/Composition.h FILE: ../../../third_party/skia/modules/skottie/src/Layer.cpp @@ -5886,12 +5888,12 @@ FILE: ../../../third_party/skia/modules/skottie/src/layers/NullLayer.cpp FILE: ../../../third_party/skia/modules/skottie/src/layers/SolidLayer.cpp FILE: ../../../third_party/skia/modules/skottie/src/text/RangeSelector.cpp FILE: ../../../third_party/skia/modules/skottie/src/text/RangeSelector.h -FILE: ../../../third_party/skia/modules/skottie/src/text/SkottieShaper.cpp FILE: ../../../third_party/skia/modules/skottie/src/text/SkottieShaper.h FILE: ../../../third_party/skia/modules/skottie/src/text/TextAdapter.cpp FILE: ../../../third_party/skia/modules/skottie/src/text/TextAdapter.h FILE: ../../../third_party/skia/modules/skottie/src/text/TextAnimator.cpp FILE: ../../../third_party/skia/modules/skottie/src/text/TextAnimator.h +FILE: ../../../third_party/skia/modules/skottie/src/text/TextShaper.cpp FILE: ../../../third_party/skia/modules/skottie/src/text/TextValue.cpp FILE: ../../../third_party/skia/modules/skottie/src/text/TextValue.h FILE: ../../../third_party/skia/modules/sksg/include/SkSGRenderEffect.h From 0893caac11122b1bccb3da9f71e918876a13b91b Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Tue, 19 Sep 2023 14:17:16 -0700 Subject: [PATCH 145/859] Enable strict-inference (#46062) Avoids that dynamic accidentally sneaks in, see https://dart.dev/tools/analysis#enabling-additional-type-checks --- analysis_options.yaml | 1 + ci/bin/format.dart | 2 +- lib/ui/hooks.dart | 3 +-- lib/web_ui/test/canvaskit/surface_test.dart | 4 ++-- lib/web_ui/test/engine/pointer_binding_test.dart | 2 +- testing/scenario_app/bin/utils/logs.dart | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index c33c15e544991..f4e9378bdf958 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -7,6 +7,7 @@ analyzer: language: strict-casts: true + strict-inference: true strict-raw-types: true errors: # allow self-reference to deprecated members (we do this because otherwise we have diff --git a/ci/bin/format.dart b/ci/bin/format.dart index 1e4de1455edfd..8e1c1b1d6b3c6 100644 --- a/ci/bin/format.dart +++ b/ci/bin/format.dart @@ -99,7 +99,7 @@ Future _runGit( return result.stdout; } -typedef MessageCallback = Function(String? message, {MessageType type}); +typedef MessageCallback = void Function(String? message, {MessageType type}); /// Base class for format checkers. /// diff --git a/lib/ui/hooks.dart b/lib/ui/hooks.dart index 5c2244d43a9ad..2d228e1bf66ba 100644 --- a/lib/ui/hooks.dart +++ b/lib/ui/hooks.dart @@ -288,8 +288,7 @@ bool _onError(Object error, StackTrace? stackTrace) { return PlatformDispatcher.instance._dispatchError(error, stackTrace ?? StackTrace.empty); } -// ignore: always_declare_return_types, prefer_generic_function_type_aliases -typedef _ListStringArgFunction(List args); +typedef _ListStringArgFunction = Object? Function(List args); @pragma('vm:entry-point') void _runMain(Function startMainIsolateFunction, diff --git a/lib/web_ui/test/canvaskit/surface_test.dart b/lib/web_ui/test/canvaskit/surface_test.dart index f01016db5ae16..06e0d04ed1bbe 100644 --- a/lib/web_ui/test/canvaskit/surface_test.dart +++ b/lib/web_ui/test/canvaskit/surface_test.dart @@ -130,7 +130,7 @@ void testMain() { 'getExtension', ['WEBGL_lose_context'], ); - js_util.callMethod(loseContextExtension, 'loseContext', const []); + js_util.callMethod(loseContextExtension, 'loseContext', const []); // Pump a timer to allow the "lose context" event to propagate. await Future.delayed(Duration.zero); @@ -140,7 +140,7 @@ void testMain() { expect(isContextLost, isTrue); // Emulate WebGL context restoration. - js_util.callMethod(loseContextExtension, 'restoreContext', const []); + js_util.callMethod(loseContextExtension, 'restoreContext', const []); // Pump a timer to allow the "restore context" event to propagate. await Future.delayed(Duration.zero); diff --git a/lib/web_ui/test/engine/pointer_binding_test.dart b/lib/web_ui/test/engine/pointer_binding_test.dart index 2f7af70ddd51a..613b247ee1391 100644 --- a/lib/web_ui/test/engine/pointer_binding_test.dart +++ b/lib/web_ui/test/engine/pointer_binding_test.dart @@ -3606,7 +3606,7 @@ mixin _ButtonedEventMixin on _BasicEventContext { }); // timeStamp can't be set in the constructor, need to override the getter. if (timeStamp != null) { - js_util.callMethod( + js_util.callMethod( objectConstructor, 'defineProperty', [ diff --git a/testing/scenario_app/bin/utils/logs.dart b/testing/scenario_app/bin/utils/logs.dart index 41800342d193f..0c7c8a6873bf3 100644 --- a/testing/scenario_app/bin/utils/logs.dart +++ b/testing/scenario_app/bin/utils/logs.dart @@ -10,7 +10,7 @@ String _red = _supportsAnsi ? '\u001b[31m' : ''; String _gray = _supportsAnsi ? '\u001b[90m' : ''; String _reset = _supportsAnsi? '\u001B[0m' : ''; -Future step(String msg, Function() fn) async { +Future step(String msg, Future Function() fn) async { stdout.writeln('-> $_green$msg$_reset'); try { await fn(); From c236efea1edfdc0c0065f07b9f9ee4a4d77b8c6b Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Tue, 19 Sep 2023 14:23:16 -0700 Subject: [PATCH 146/859] [ios] scenario test make parent view controller hide status bar (#46065) The parent view controller of FlutterViewController in `non_full_screen_flutter_view_platform_view` does not explicitly set the status bar hidden. iOS 17 will show the status bar causing the golden to be no deterministic. Part of https://github.com/flutter/flutter/issues/133207 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- .../ios/Scenarios/Scenarios/AppDelegate.m | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/testing/scenario_app/ios/Scenarios/Scenarios/AppDelegate.m b/testing/scenario_app/ios/Scenarios/Scenarios/AppDelegate.m index d938a895373d0..9aa3a0043063d 100644 --- a/testing/scenario_app/ios/Scenarios/Scenarios/AppDelegate.m +++ b/testing/scenario_app/ios/Scenarios/Scenarios/AppDelegate.m @@ -9,6 +9,20 @@ #import "ScreenBeforeFlutter.h" #import "TextPlatformView.h" +// A UIViewController that sets YES for its preferedStatusBarHidden property. +// StatusBar includes current time, which is non-deterministic. This ViewController +// removes the StatusBar to make the screenshot deterministic. +@interface NoStatusBarViewController : UIViewController + +@end + +@implementation NoStatusBarViewController +- (BOOL)prefersStatusBarHidden { + return YES; +} +@end + +// The FlutterViewController version of NoStatusBarViewController @interface NoStatusBarFlutterViewController : FlutterViewController @end @@ -166,7 +180,7 @@ - (void)setupFlutterViewControllerTest:(NSString*)scenarioIdentifier { UIViewController* rootViewController = flutterViewController; // Make Flutter View's origin x/y not 0. if ([scenarioIdentifier isEqualToString:@"non_full_screen_flutter_view_platform_view"]) { - rootViewController = [UIViewController new]; + rootViewController = [[NoStatusBarViewController alloc] init]; [rootViewController.view addSubview:flutterViewController.view]; flutterViewController.view.frame = CGRectMake(150, 150, 500, 500); } From 3e0b8be7d511a08e1f11694a8f507a1428d95763 Mon Sep 17 00:00:00 2001 From: gaaclarke <30870216+gaaclarke@users.noreply.github.com> Date: Tue, 19 Sep 2023 14:24:47 -0700 Subject: [PATCH 147/859] [Impeller] Adds unit test to make sure we can encode bgr101010xr to png. (#46007) fixes https://github.com/flutter/flutter/issues/133942 This is current blocked on the skia bug: https://g-issues.skia.org/issues/300986800 Depends on skia fix: https://skia-review.googlesource.com/c/skia/+/757816 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- lib/ui/painting/image_encoding.cc | 85 +++++++++------------ lib/ui/painting/image_encoding.h | 13 ++++ lib/ui/painting/image_encoding_unittests.cc | 23 ++++++ 3 files changed, 74 insertions(+), 47 deletions(-) diff --git a/lib/ui/painting/image_encoding.cc b/lib/ui/painting/image_encoding.cc index 93ccb4fa2c8a1..dfd6daf130c61 100644 --- a/lib/ui/painting/image_encoding.cc +++ b/lib/ui/painting/image_encoding.cc @@ -34,15 +34,6 @@ class Context; namespace flutter { namespace { -// This must be kept in sync with the enum in painting.dart -enum ImageByteFormat { - kRawRGBA, - kRawStraightRGBA, - kRawUnmodified, - kRawExtendedRgba128, - kPNG, -}; - void FinalizeSkData(void* isolate_callback_data, void* peer) { SkData* buffer = reinterpret_cast(peer); buffer->unref(); @@ -107,44 +98,6 @@ sk_sp CopyImageByteData(const sk_sp& raster_image, return SkData::MakeWithCopy(pixmap.addr(), pixmap.computeByteSize()); } -sk_sp EncodeImage(const sk_sp& raster_image, - ImageByteFormat format) { - TRACE_EVENT0("flutter", __FUNCTION__); - - if (!raster_image) { - return nullptr; - } - - switch (format) { - case kPNG: { - auto png_image = SkPngEncoder::Encode(nullptr, raster_image.get(), {}); - - if (png_image == nullptr) { - FML_LOG(ERROR) << "Could not convert raster image to PNG."; - return nullptr; - }; - return png_image; - } - case kRawRGBA: - return CopyImageByteData(raster_image, kRGBA_8888_SkColorType, - kPremul_SkAlphaType); - - case kRawStraightRGBA: - return CopyImageByteData(raster_image, kRGBA_8888_SkColorType, - kUnpremul_SkAlphaType); - - case kRawUnmodified: - return CopyImageByteData(raster_image, raster_image->colorType(), - raster_image->alphaType()); - case kRawExtendedRgba128: - return CopyImageByteData(raster_image, kRGBA_F32_SkColorType, - kUnpremul_SkAlphaType); - } - - FML_LOG(ERROR) << "Unknown error encoding image."; - return nullptr; -} - void EncodeImageAndInvokeDataCallback( const sk_sp& image, std::unique_ptr callback, @@ -229,4 +182,42 @@ Dart_Handle EncodeImage(CanvasImage* canvas_image, return Dart_Null(); } +sk_sp EncodeImage(const sk_sp& raster_image, + ImageByteFormat format) { + TRACE_EVENT0("flutter", __FUNCTION__); + + if (!raster_image) { + return nullptr; + } + + switch (format) { + case kPNG: { + auto png_image = SkPngEncoder::Encode(nullptr, raster_image.get(), {}); + + if (png_image == nullptr) { + FML_LOG(ERROR) << "Could not convert raster image to PNG."; + return nullptr; + }; + return png_image; + } + case kRawRGBA: + return CopyImageByteData(raster_image, kRGBA_8888_SkColorType, + kPremul_SkAlphaType); + + case kRawStraightRGBA: + return CopyImageByteData(raster_image, kRGBA_8888_SkColorType, + kUnpremul_SkAlphaType); + + case kRawUnmodified: + return CopyImageByteData(raster_image, raster_image->colorType(), + raster_image->alphaType()); + case kRawExtendedRgba128: + return CopyImageByteData(raster_image, kRGBA_F32_SkColorType, + kUnpremul_SkAlphaType); + } + + FML_LOG(ERROR) << "Unknown error encoding image."; + return nullptr; +} + } // namespace flutter diff --git a/lib/ui/painting/image_encoding.h b/lib/ui/painting/image_encoding.h index df7801302d9be..be852043022ae 100644 --- a/lib/ui/painting/image_encoding.h +++ b/lib/ui/painting/image_encoding.h @@ -5,16 +5,29 @@ #ifndef FLUTTER_LIB_UI_PAINTING_IMAGE_ENCODING_H_ #define FLUTTER_LIB_UI_PAINTING_IMAGE_ENCODING_H_ +#include "third_party/skia/include/core/SkImage.h" #include "third_party/tonic/dart_library_natives.h" namespace flutter { class CanvasImage; +// This must be kept in sync with the enum in painting.dart +enum ImageByteFormat { + kRawRGBA, + kRawStraightRGBA, + kRawUnmodified, + kRawExtendedRgba128, + kPNG, +}; + Dart_Handle EncodeImage(CanvasImage* canvas_image, int format, Dart_Handle callback_handle); +sk_sp EncodeImage(const sk_sp& raster_image, + ImageByteFormat format); + } // namespace flutter #endif // FLUTTER_LIB_UI_PAINTING_IMAGE_ENCODING_H_ diff --git a/lib/ui/painting/image_encoding_unittests.cc b/lib/ui/painting/image_encoding_unittests.cc index 65fb4df75e410..46c1e15ef4dfe 100644 --- a/lib/ui/painting/image_encoding_unittests.cc +++ b/lib/ui/painting/image_encoding_unittests.cc @@ -275,6 +275,29 @@ TEST(ImageEncodingImpellerTest, ConvertDlImageToSkImage10XR) { context); EXPECT_TRUE(did_call); } + +TEST(ImageEncodingImpellerTest, PngEncoding10XR) { + int width = 100; + int height = 100; + SkImageInfo info = SkImageInfo::Make( + width, height, kBGR_101010x_XR_SkColorType, kUnpremul_SkAlphaType); + + auto surface = SkSurfaces::Raster(info); + SkCanvas* canvas = surface->getCanvas(); + + SkPaint paint; + paint.setColor(SK_ColorBLUE); + paint.setAntiAlias(true); + + canvas->clear(SK_ColorWHITE); + canvas->drawCircle(width / 2, height / 2, 100, paint); + + sk_sp image = surface->makeImageSnapshot(); + + sk_sp png = EncodeImage(image, ImageByteFormat::kPNG); + EXPECT_TRUE(png); +} + #endif // IMPELLER_SUPPORTS_RENDERING } // namespace testing From 4f4ea9b22474fad7a7f984f679198c60acf2b734 Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Tue, 19 Sep 2023 14:43:06 -0700 Subject: [PATCH 148/859] Conform to clang_tidy in `client_wrapper` headers. (#46058) Partial work towards https://github.com/flutter/flutter/issues/134969. All of these were auto-suggested by Clang, and mostly avoid unnecessary copies. --- .../client_wrapper/include/flutter/basic_message_channel.h | 6 ++++-- .../common/client_wrapper/include/flutter/event_channel.h | 2 +- .../client_wrapper/include/flutter/event_stream_handler.h | 4 ++-- .../include/flutter/method_result_functions.h | 3 ++- .../client_wrapper/include/flutter/texture_registrar.h | 3 ++- .../common/client_wrapper/testing/test_codec_extensions.h | 2 +- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/shell/platform/common/client_wrapper/include/flutter/basic_message_channel.h b/shell/platform/common/client_wrapper/include/flutter/basic_message_channel.h index c0819465c5d79..4109c59a0a615 100644 --- a/shell/platform/common/client_wrapper/include/flutter/basic_message_channel.h +++ b/shell/platform/common/client_wrapper/include/flutter/basic_message_channel.h @@ -7,6 +7,7 @@ #include #include +#include #include "binary_messenger.h" #include "message_codec.h" @@ -58,7 +59,8 @@ class BasicMessageChannel { void Send(const T& message, BinaryReply reply) { std::unique_ptr> raw_message = codec_->EncodeMessage(message); - messenger_->Send(name_, raw_message->data(), raw_message->size(), reply); + messenger_->Send(name_, raw_message->data(), raw_message->size(), + std::move(reply)); } // Registers a handler that should be called any time a message is @@ -77,7 +79,7 @@ class BasicMessageChannel { BinaryMessageHandler binary_handler = [handler, codec, channel_name]( const uint8_t* binary_message, const size_t binary_message_size, - BinaryReply binary_reply) { + const BinaryReply& binary_reply) { // Use this channel's codec to decode the message and build a reply // handler. std::unique_ptr message = diff --git a/shell/platform/common/client_wrapper/include/flutter/event_channel.h b/shell/platform/common/client_wrapper/include/flutter/event_channel.h index 6a3ef09b8e120..1ff577a76d8c6 100644 --- a/shell/platform/common/client_wrapper/include/flutter/event_channel.h +++ b/shell/platform/common/client_wrapper/include/flutter/event_channel.h @@ -69,7 +69,7 @@ class EventChannel { // Mutable state to track the handler's listening status. is_listening = bool(false)](const uint8_t* message, const size_t message_size, - BinaryReply reply) mutable { + const BinaryReply& reply) mutable { constexpr char kOnListenMethod[] = "listen"; constexpr char kOnCancelMethod[] = "cancel"; diff --git a/shell/platform/common/client_wrapper/include/flutter/event_stream_handler.h b/shell/platform/common/client_wrapper/include/flutter/event_stream_handler.h index 9c1d89418d3a0..166733dd0661b 100644 --- a/shell/platform/common/client_wrapper/include/flutter/event_stream_handler.h +++ b/shell/platform/common/client_wrapper/include/flutter/event_stream_handler.h @@ -20,8 +20,8 @@ struct StreamHandlerError { const std::string error_message; const std::unique_ptr error_details; - StreamHandlerError(const std::string error_code, - const std::string error_message, + StreamHandlerError(const std::string& error_code, + const std::string& error_message, std::unique_ptr&& error_details) : error_code(error_code), error_message(error_message), diff --git a/shell/platform/common/client_wrapper/include/flutter/method_result_functions.h b/shell/platform/common/client_wrapper/include/flutter/method_result_functions.h index a19cc349d1911..57f6d0e9b8862 100644 --- a/shell/platform/common/client_wrapper/include/flutter/method_result_functions.h +++ b/shell/platform/common/client_wrapper/include/flutter/method_result_functions.h @@ -7,6 +7,7 @@ #include #include +#include #include "method_result.h" @@ -36,7 +37,7 @@ class MethodResultFunctions : public MethodResult { ResultHandlerNotImplemented on_not_implemented) : on_success_(on_success), on_error_(on_error), - on_not_implemented_(on_not_implemented) {} + on_not_implemented_(std::move(on_not_implemented)) {} virtual ~MethodResultFunctions() = default; diff --git a/shell/platform/common/client_wrapper/include/flutter/texture_registrar.h b/shell/platform/common/client_wrapper/include/flutter/texture_registrar.h index 47daf7c42fbcd..3f812d17406ce 100644 --- a/shell/platform/common/client_wrapper/include/flutter/texture_registrar.h +++ b/shell/platform/common/client_wrapper/include/flutter/texture_registrar.h @@ -10,6 +10,7 @@ #include #include #include +#include #include namespace flutter { @@ -28,7 +29,7 @@ class PixelBufferTexture { // take care of proper synchronization. It also needs to be ensured that the // returned buffer isn't released prior to unregistering this texture. explicit PixelBufferTexture(CopyBufferCallback copy_buffer_callback) - : copy_buffer_callback_(copy_buffer_callback) {} + : copy_buffer_callback_(std::move(copy_buffer_callback)) {} // Returns the callback-provided FlutterDesktopPixelBuffer that contains the // actual pixel data. The intended surface size is specified by |width| and diff --git a/shell/platform/common/client_wrapper/testing/test_codec_extensions.h b/shell/platform/common/client_wrapper/testing/test_codec_extensions.h index 29f81a4a82b99..7b10dd47fbe32 100644 --- a/shell/platform/common/client_wrapper/testing/test_codec_extensions.h +++ b/shell/platform/common/client_wrapper/testing/test_codec_extensions.h @@ -32,7 +32,7 @@ class Point { // variable-length type that includes types handled by the core standard codec. class SomeData { public: - SomeData(const std::string label, const std::vector& data) + SomeData(const std::string& label, const std::vector& data) : label_(label), data_(data) {} ~SomeData() = default; From 12a5d888e456b246ee7895a6c78e49ad612ac20f Mon Sep 17 00:00:00 2001 From: gaaclarke <30870216+gaaclarke@users.noreply.github.com> Date: Tue, 19 Sep 2023 14:45:35 -0700 Subject: [PATCH 149/859] Made the warning about downgrading wide gamut happen at the correct time (#46064) fixes https://github.com/flutter/flutter/issues/135033 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- .../ios/framework/Source/FlutterView.mm | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/shell/platform/darwin/ios/framework/Source/FlutterView.mm b/shell/platform/darwin/ios/framework/Source/FlutterView.mm index daef8b2ab30d3..8da6ef72660ed 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterView.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterView.mm @@ -48,6 +48,8 @@ - (BOOL)isWideGamutSupported { return NO; } + FML_DCHECK(self.screen); + // This predicates the decision on the capabilities of the iOS device's // display. This means external displays will not support wide gamut if the // device's display doesn't support it. It practice that should be never. @@ -68,10 +70,6 @@ - (instancetype)initWithDelegate:(id)delegate if (self) { _delegate = delegate; _isWideGamutEnabled = isWideGamutEnabled; - if (_isWideGamutEnabled && !self.isWideGamutSupported) { - FML_DLOG(WARNING) << "Rendering wide gamut colors is turned on but isn't " - "supported, downgrading the color gamut to sRGB."; - } self.layer.opaque = opaque; // This line is necessary. CoreAnimation(or UIKit) may take this to do @@ -84,6 +82,16 @@ - (instancetype)initWithDelegate:(id)delegate return self; } +static void PrintWideGamutWarningOnce() { + static BOOL did_print = NO; + if (did_print) { + return; + } + FML_DLOG(WARNING) << "Rendering wide gamut colors is turned on but isn't " + "supported, downgrading the color gamut to sRGB."; + did_print = YES; +} + - (void)layoutSubviews { if ([self.layer isKindOfClass:NSClassFromString(@"CAMetalLayer")]) { // It is a known Apple bug that CAMetalLayer incorrectly reports its supported @@ -97,7 +105,8 @@ - (void)layoutSubviews { layer.contentsScale = screenScale; layer.rasterizationScale = screenScale; layer.framebufferOnly = flutter::Settings::kSurfaceDataAccessible ? NO : YES; - if (_isWideGamutEnabled && self.isWideGamutSupported) { + BOOL isWideGamutSupported = self.isWideGamutSupported; + if (_isWideGamutEnabled && isWideGamutSupported) { CGColorSpaceRef srgb = CGColorSpaceCreateWithName(kCGColorSpaceExtendedSRGB); layer.colorspace = srgb; CFRelease(srgb); @@ -106,6 +115,8 @@ - (void)layoutSubviews { // F16 was chosen over BGRA10_XR since Skia does not support decoding // BGRA10_XR. layer.pixelFormat = MTLPixelFormatRGBA16Float; + } else if (_isWideGamutEnabled && !isWideGamutSupported) { + PrintWideGamutWarningOnce(); } } From 86b74c3a2b995b5db5fad037fa31d3ca7364a379 Mon Sep 17 00:00:00 2001 From: Jackson Gardner Date: Tue, 19 Sep 2023 15:23:40 -0700 Subject: [PATCH 150/859] Properly transfer objects between the main thread and web worker. (#46061) We need to make sure to add objects to the transfer list when we send them across the ui thread/web worker boundary. Otherwise, they get copied, which is very expensive. On my M1 MacBook Pro, I took measurements of scrolling in the material 3 demo. Before this change, the work on the web worker thread was taking about 25-40ms per frame. After the change, it's around 2ms. --- lib/web_ui/skwasm/library_skwasm_support.js | 13 +++++++------ lib/web_ui/test/ui/image_golden_test.dart | 12 +++++++++++- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/lib/web_ui/skwasm/library_skwasm_support.js b/lib/web_ui/skwasm/library_skwasm_support.js index c9c1aba46db3e..46467e507b60b 100644 --- a/lib/web_ui/skwasm/library_skwasm_support.js +++ b/lib/web_ui/skwasm/library_skwasm_support.js @@ -15,7 +15,7 @@ mergeInto(LibraryManager.library, { skwasmMessage: 'setAssociatedObject', pointer, object, - }); + }, [object]); }; _skwasm_getAssociatedObject = function(pointer) { return associatedObjectsMap.get(pointer); @@ -34,11 +34,12 @@ mergeInto(LibraryManager.library, { associatedObjectsMap.set(data.pointer, data.object); return; case 'disposeAssociatedObject': - const object = { data }; + const pointer = data.pointer; + const object = associatedObjectsMap.get(pointer); if (object.close) { object.close(); } - associatedObjectsMap.delete(data.pointer); + associatedObjectsMap.delete(pointer); return; default: console.warn(`unrecognized skwasm message: ${skwasmMessage}`); @@ -81,7 +82,7 @@ mergeInto(LibraryManager.library, { surface: surfaceHandle, callbackId, imageBitmap, - }); + }, [imageBitmap]); }; _skwasm_createGlTextureFromTextureSource = function(textureSource, width, height) { const glCtx = GL.currentContext.GLctx; @@ -98,10 +99,10 @@ mergeInto(LibraryManager.library, { GL.textures[textureId] = newTexture; return textureId; }; - _skwasm_disposeAssociatedObjectOnThread = function(threadId, object) { + _skwasm_disposeAssociatedObjectOnThread = function(threadId, pointer) { PThread.pthreads[threadId].postMessage({ skwasmMessage: 'disposeAssociatedObject', - object, + pointer, }); }; }, diff --git a/lib/web_ui/test/ui/image_golden_test.dart b/lib/web_ui/test/ui/image_golden_test.dart index 9894ccac310a9..7c84839466606 100644 --- a/lib/web_ui/test/ui/image_golden_test.dart +++ b/lib/web_ui/test/ui/image_golden_test.dart @@ -319,7 +319,17 @@ Future testMain() async { await completer.future; final DomImageBitmap bitmap = (await createImageBitmap(image as JSAny))!; - return renderer.createImageFromImageBitmap(bitmap); + + expect(bitmap.width.toDartInt, 150); + expect(bitmap.height.toDartInt, 150); + final ui.Image uiImage = await renderer.createImageFromImageBitmap(bitmap); + + if (isSkwasm) { + // Skwasm transfers the bitmap to the web worker, so it should be disposed/consumed. + expect(bitmap.width.toDartInt, 0); + expect(bitmap.height.toDartInt, 0); + } + return uiImage; }); } From 86c41f00ed6de9af74fe6e4e3d9352f12f398b36 Mon Sep 17 00:00:00 2001 From: gaaclarke <30870216+gaaclarke@users.noreply.github.com> Date: Tue, 19 Sep 2023 15:27:36 -0700 Subject: [PATCH 151/859] [Impeller] adds hardware gate for wide gamut (#46051) fixes https://github.com/flutter/flutter/issues/133015 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- .../framework/Source/FlutterDartProject.mm | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/shell/platform/darwin/ios/framework/Source/FlutterDartProject.mm b/shell/platform/darwin/ios/framework/Source/FlutterDartProject.mm index 3d434eb2179f2..04bf8b9b33242 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterDartProject.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterDartProject.mm @@ -8,6 +8,7 @@ #include +#import #include #include @@ -22,6 +23,8 @@ #import "flutter/shell/platform/darwin/common/command_line.h" #import "flutter/shell/platform/darwin/ios/framework/Headers/FlutterViewController.h" +FLUTTER_ASSERT_NOT_ARC + extern "C" { #if FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DEBUG // Used for debugging dart:* sources. @@ -32,6 +35,23 @@ static const char* kApplicationKernelSnapshotFileName = "kernel_blob.bin"; +static BOOL DoesHardwareSupportWideGamut() { + static BOOL result = NO; + static dispatch_once_t once_token = 0; + dispatch_once(&once_token, ^{ + id device = MTLCreateSystemDefaultDevice(); + if (@available(iOS 13.0, *)) { + // MTLGPUFamilyApple2 = A9/A10 + result = [device supportsFamily:MTLGPUFamilyApple2]; + } else { + // A9/A10 on iOS 10+ + result = [device supportsFeatureSet:MTLFeatureSet_iOS_GPUFamily3_v2]; + } + [device release]; + }); + return result; +} + flutter::Settings FLTDefaultSettingsForBundle(NSBundle* bundle, NSProcessInfo* processInfoOrNil) { auto command_line = flutter::CommandLineFromNSProcessInfo(processInfoOrNil); @@ -153,9 +173,12 @@ // As of Xcode 14.1, the wide gamut surface pixel formats are not supported by // the simulator. settings.enable_wide_gamut = false; + // Removes unused function warning. + (void)DoesHardwareSupportWideGamut; #else NSNumber* nsEnableWideGamut = [mainBundle objectForInfoDictionaryKey:@"FLTEnableWideGamut"]; - BOOL enableWideGamut = nsEnableWideGamut ? nsEnableWideGamut.boolValue : YES; + BOOL enableWideGamut = + (nsEnableWideGamut ? nsEnableWideGamut.boolValue : YES) && DoesHardwareSupportWideGamut(); settings.enable_wide_gamut = enableWideGamut; #endif From e0511ae6cf296ac7cb22b75bcb01a67d5e92f20b Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 19 Sep 2023 18:34:05 -0400 Subject: [PATCH 152/859] Roll Skia from fe3568162721 to 1a8885b9e03c (6 revisions) (#46075) https://skia.googlesource.com/skia.git/+log/fe3568162721..1a8885b9e03c 2023-09-19 skia-autoroll@skia-public.iam.gserviceaccount.com Roll skottie-base from 6fbc053bdad0 to a5a762c16294 2023-09-19 skia-autoroll@skia-public.iam.gserviceaccount.com Roll debugger-app-base from 4880b92b4f1c to 927fde2f2c6e 2023-09-19 skia-autoroll@skia-public.iam.gserviceaccount.com Roll shaders-base from 75c3a7bb1f19 to b4ee53fe6042 2023-09-19 skia-autoroll@skia-public.iam.gserviceaccount.com Roll jsfiddle-base from 3c3b69cdbecd to 5a23365ca776 2023-09-19 johnstiles@google.com Fix a few more GCC warnings. 2023-09-19 bungeman@google.com Revert "Enforce IWYU on more src/core files" If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index dc3a636e83c2a..0f7371a3d510b 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'fe35681627210de13b447ccb9b40ae6bb8e447d7', + 'skia_revision': '1a8885b9e03c65598feb5c8f46e669fd51b2417a', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index f331bc2e1e9b1..de5ce8f934404 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 4b2d1a29398b500d5c27e9d459eb2f6d +Signature: 1dd1e3dabbb4a7c06084bd3bcfa5afe6 ==================================================================================================== LIBRARY: etc1 From 58b183f50bce26fbe24bf30f686140c738eb87f2 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Tue, 19 Sep 2023 16:25:07 -0700 Subject: [PATCH 153/859] [Impeller] Fix validation errors in RendererTest. (#46076) Vulkan validation was tripping on the fact that renderer tests were rendering to the root render pass. This root render pass doesn't contain a stencil buffer. However, `MakeDefaultPipelineDescriptor` assumes a stencil and color attachment. The other backends are resilient to this mismatch since there is no compat render pass created upfront. But Vulkan was sad. This should only happen in the low level tests. In the higher levels of the framework, we have variants that make sure there is a pipeline pass and render pass compatibility. Fixes validations of the kind: ``` --- Vulkan Debug Report ---------------------------------------- | Severity: Error | Type: { Validation } | ID Name: VUID-vkCmdDraw-renderPass-02684 | ID Number: 1349015333 | Queue Breadcrumbs: [NONE] | CMD Buffer Breadcrumbs: [NONE] | Related Objects: RenderPass [16305153808034431137] [Playground Render Pass], RenderPass [18100546345029861533] [Compat Render Pass: BoxFade Pipeline] | Trigger: Validation Error: [ VUID-vkCmdDraw-renderPass-02684 ] Object 0: handle = 0xe2478b00000000a1, name = Playground Render Pass, type = VK_OBJECT_TYPE_RENDER_PASS; Object 1: handle = 0xfb320f000000009d, name = Compat Render Pass: BoxFade Pipeline, type = VK_OBJECT_TYPE_RENDER_PASS; | MessageID = 0x50685725 | vkCmdDraw: RenderPasses incompatible between active render pass w/ VkRenderPass 0xe2478b00000000a1[Playground Render Pass] and pipeline state object w/ VkRenderPass 0xfb320f000000009d[Compat Render Pass: BoxFade Pipeline] Attachment 4294967295 is not compatible with 1: The first is unused while the second is not.. The Vulkan spec states: The current render pass must be compatible with the renderPass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline bound to VK_PIPELINE_BIND_POINT_GRAPHICS (https://vulkan.lunarg.com/doc/view/1.3.224.1/mac/1.3-extensions/vkspec.html#VUID-vkCmdDraw-renderPass-02684) ----------------------------------------------------------------- ``` --- .../backend/vulkan/pipeline_library_vk.cc | 15 ++++++++++++--- impeller/renderer/renderer_unittests.cc | 14 +++++++++++++- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/impeller/renderer/backend/vulkan/pipeline_library_vk.cc b/impeller/renderer/backend/vulkan/pipeline_library_vk.cc index b47c9d57237ac..830d2d08120e1 100644 --- a/impeller/renderer/backend/vulkan/pipeline_library_vk.cc +++ b/impeller/renderer/backend/vulkan/pipeline_library_vk.cc @@ -75,8 +75,9 @@ static vk::AttachmentDescription CreatePlaceholderAttachmentDescription( /// spec: /// https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/chap8.html#renderpass-compatibility /// -static vk::UniqueRenderPass CreateRenderPass(const vk::Device& device, - const PipelineDescriptor& desc) { +static vk::UniqueRenderPass CreateCompatRenderPassForPipeline( + const vk::Device& device, + const PipelineDescriptor& desc) { std::vector attachments; std::vector color_refs; @@ -128,6 +129,13 @@ static vk::UniqueRenderPass CreateRenderPass(const vk::Device& device, return {}; } + // This pass is not used with the render pass. It is only necessary to tell + // Vulkan the expected render pass layout. The actual pass will be created + // later during render pass setup and will need to be compatible with this + // one. + ContextVK::SetDebugName(device, pass.get(), + "Compat Render Pass: " + desc.GetLabel()); + return std::move(pass); } @@ -332,7 +340,8 @@ std::unique_ptr PipelineLibraryVK::CreatePipeline( return nullptr; } - auto render_pass = CreateRenderPass(strong_device->GetDevice(), desc); + auto render_pass = + CreateCompatRenderPassForPipeline(strong_device->GetDevice(), desc); if (render_pass) { pipeline_info.setBasePipelineHandle(VK_NULL_HANDLE); pipeline_info.setSubpass(0); diff --git a/impeller/renderer/renderer_unittests.cc b/impeller/renderer/renderer_unittests.cc index 575178f229bf2..48772d09198e1 100644 --- a/impeller/renderer/renderer_unittests.cc +++ b/impeller/renderer/renderer_unittests.cc @@ -58,6 +58,7 @@ TEST_P(RendererTest, CanCreateBoxPrimitive) { auto desc = BoxPipelineBuilder::MakeDefaultPipelineDescriptor(*context); ASSERT_TRUE(desc.has_value()); desc->SetSampleCount(SampleCount::kCount4); + desc->SetStencilAttachmentDescriptors(std::nullopt); // Vertex buffer. VertexBufferBuilder vertex_builder; @@ -130,6 +131,7 @@ TEST_P(RendererTest, CanRenderPerspectiveCube) { desc->SetCullMode(CullMode::kBackFace); desc->SetWindingOrder(WindingOrder::kCounterClockwise); desc->SetSampleCount(SampleCount::kCount4); + desc->SetStencilAttachmentDescriptors(std::nullopt); auto pipeline = context->GetPipelineLibrary()->GetPipeline(std::move(desc)).Get(); ASSERT_TRUE(pipeline); @@ -219,6 +221,7 @@ TEST_P(RendererTest, CanRenderMultiplePrimitives) { auto desc = BoxPipelineBuilder::MakeDefaultPipelineDescriptor(*context); ASSERT_TRUE(desc.has_value()); desc->SetSampleCount(SampleCount::kCount4); + desc->SetStencilAttachmentDescriptors(std::nullopt); auto box_pipeline = context->GetPipelineLibrary()->GetPipeline(std::move(desc)).Get(); ASSERT_TRUE(box_pipeline); @@ -420,7 +423,9 @@ TEST_P(RendererTest, CanRenderInstanced) { ->GetPipelineLibrary() ->GetPipeline(PipelineBuilder::MakeDefaultPipelineDescriptor( *GetContext()) - ->SetSampleCount(SampleCount::kCount4)) + ->SetSampleCount(SampleCount::kCount4) + .SetStencilAttachmentDescriptors(std::nullopt)) + .Get(); ASSERT_TRUE(pipeline && pipeline->IsValid()); @@ -459,6 +464,7 @@ TEST_P(RendererTest, CanBlitTextureToTexture) { auto desc = PipelineBuilder::MakeDefaultPipelineDescriptor(*context); ASSERT_TRUE(desc.has_value()); desc->SetSampleCount(SampleCount::kCount4); + desc->SetStencilAttachmentDescriptors(std::nullopt); auto mipmaps_pipeline = context->GetPipelineLibrary()->GetPipeline(std::move(desc)).Get(); ASSERT_TRUE(mipmaps_pipeline); @@ -571,6 +577,7 @@ TEST_P(RendererTest, CanBlitTextureToBuffer) { auto desc = PipelineBuilder::MakeDefaultPipelineDescriptor(*context); ASSERT_TRUE(desc.has_value()); desc->SetSampleCount(SampleCount::kCount4); + desc->SetStencilAttachmentDescriptors(std::nullopt); auto mipmaps_pipeline = context->GetPipelineLibrary()->GetPipeline(std::move(desc)).Get(); ASSERT_TRUE(mipmaps_pipeline); @@ -702,6 +709,7 @@ TEST_P(RendererTest, CanGenerateMipmaps) { auto desc = PipelineBuilder::MakeDefaultPipelineDescriptor(*context); ASSERT_TRUE(desc.has_value()); desc->SetSampleCount(SampleCount::kCount4); + desc->SetStencilAttachmentDescriptors(std::nullopt); auto mipmaps_pipeline = context->GetPipelineLibrary()->GetPipeline(std::move(desc)).Get(); ASSERT_TRUE(mipmaps_pipeline); @@ -818,6 +826,7 @@ TEST_P(RendererTest, TheImpeller) { PipelineBuilder::MakeDefaultPipelineDescriptor(*context); ASSERT_TRUE(pipeline_descriptor.has_value()); pipeline_descriptor->SetSampleCount(SampleCount::kCount4); + pipeline_descriptor->SetStencilAttachmentDescriptors(std::nullopt); auto pipeline = context->GetPipelineLibrary()->GetPipeline(pipeline_descriptor).Get(); ASSERT_TRUE(pipeline && pipeline->IsValid()); @@ -878,6 +887,7 @@ TEST_P(RendererTest, ArrayUniforms) { PipelineBuilder::MakeDefaultPipelineDescriptor(*context); ASSERT_TRUE(pipeline_descriptor.has_value()); pipeline_descriptor->SetSampleCount(SampleCount::kCount4); + pipeline_descriptor->SetStencilAttachmentDescriptors(std::nullopt); auto pipeline = context->GetPipelineLibrary()->GetPipeline(pipeline_descriptor).Get(); ASSERT_TRUE(pipeline && pipeline->IsValid()); @@ -934,6 +944,7 @@ TEST_P(RendererTest, InactiveUniforms) { PipelineBuilder::MakeDefaultPipelineDescriptor(*context); ASSERT_TRUE(pipeline_descriptor.has_value()); pipeline_descriptor->SetSampleCount(SampleCount::kCount4); + pipeline_descriptor->SetStencilAttachmentDescriptors(std::nullopt); auto pipeline = context->GetPipelineLibrary()->GetPipeline(pipeline_descriptor).Get(); ASSERT_TRUE(pipeline && pipeline->IsValid()); @@ -1120,6 +1131,7 @@ TEST_P(RendererTest, StencilMask) { ASSERT_TRUE(vertex_buffer); desc->SetSampleCount(SampleCount::kCount4); + desc->SetStencilAttachmentDescriptors(std::nullopt); auto bridge = CreateTextureForFixture("bay_bridge.jpg"); auto boston = CreateTextureForFixture("boston.jpg"); From 601745db5a2d49f70a1567c0cbf15b8cb3fae3d1 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Tue, 19 Sep 2023 16:34:11 -0700 Subject: [PATCH 154/859] [Impeller] Affinity adjustments for Vulkan backend. (#46063) Runs the waiter threads with efficiency affinity and the worker thread with "not performance" affinity. --- fml/cpu_affinity.cc | 22 ++++++++++++++++++- fml/cpu_affinity.h | 18 +++++++++++++++ fml/cpu_affinity_unittests.cc | 5 +++++ fml/platform/android/cpu_affinity.cc | 19 +++++++++++++--- fml/platform/android/cpu_affinity.h | 14 +++++------- .../renderer/backend/vulkan/context_vk.cc | 8 +++++-- .../backend/vulkan/fence_waiter_vk.cc | 5 +++-- .../backend/vulkan/resource_manager_vk.cc | 4 ++++ runtime/dart_vm.cc | 5 ++++- .../platform/android/android_shell_holder.cc | 2 +- 10 files changed, 83 insertions(+), 19 deletions(-) diff --git a/fml/cpu_affinity.cc b/fml/cpu_affinity.cc index c4e89613b252a..ae759e24c4218 100644 --- a/fml/cpu_affinity.cc +++ b/fml/cpu_affinity.cc @@ -3,13 +3,34 @@ // found in the LICENSE file. #include "flutter/fml/cpu_affinity.h" +#include "flutter/fml/build_config.h" #include #include #include +#ifdef FML_OS_ANDROID +#include "flutter/fml/platform/android/cpu_affinity.h" +#endif // FML_OS_ANDROID + namespace fml { +std::optional EfficiencyCoreCount() { +#ifdef FML_OS_ANDROID + return AndroidEfficiencyCoreCount(); +#else + return std::nullopt; +#endif +} + +bool RequestAffinity(CpuAffinity affinity) { +#ifdef FML_OS_ANDROID + return AndroidRequestAffinity(affinity); +#else + return true; +#endif +} + CPUSpeedTracker::CPUSpeedTracker(std::vector data) : cpu_speeds_(std::move(data)) { std::optional max_speed = std::nullopt; @@ -61,7 +82,6 @@ const std::vector& CPUSpeedTracker::GetIndices( // required because files under /proc do not always return a valid size // when using fseek(0, SEEK_END) + ftell(). Nor can they be mmap()-ed. std::optional ReadIntFromFile(const std::string& path) { - // size_t data_length = 0u; std::ifstream file; file.open(path.c_str()); diff --git a/fml/cpu_affinity.h b/fml/cpu_affinity.h index 3ea45a4fa3d3b..31b58940a61a1 100644 --- a/fml/cpu_affinity.h +++ b/fml/cpu_affinity.h @@ -27,6 +27,24 @@ enum class CpuAffinity { kNotPerformance, }; +/// @brief Request count of efficiency cores. +/// +/// Efficiency cores are defined as those with the lowest reported +/// cpu_max_freq. If the CPU speed could not be determined, or if all +/// cores have the same reported speed then this returns std::nullopt. +/// That is, the result will never be 0. +std::optional EfficiencyCoreCount(); + +/// @brief Request the given affinity for the current thread. +/// +/// Returns true if successfull, or if it was a no-op. This function is +/// only supported on Android devices. +/// +/// Affinity requests are based on documented CPU speed. This speed data +/// is parsed from cpuinfo_max_freq files, see also: +/// https://www.kernel.org/doc/Documentation/cpu-freq/user-guide.txt +bool RequestAffinity(CpuAffinity affinity); + struct CpuIndexAndSpeed { // The index of the given CPU. size_t index; diff --git a/fml/cpu_affinity_unittests.cc b/fml/cpu_affinity_unittests.cc index eb2f010bc66d6..8a5c90687ed24 100644 --- a/fml/cpu_affinity_unittests.cc +++ b/fml/cpu_affinity_unittests.cc @@ -12,6 +12,11 @@ namespace fml { namespace testing { +TEST(CpuAffinity, NonAndroidPlatformDefaults) { + ASSERT_FALSE(fml::EfficiencyCoreCount().has_value()); + ASSERT_TRUE(fml::RequestAffinity(fml::CpuAffinity::kEfficiency)); +} + TEST(CpuAffinity, NormalSlowMedFastCores) { auto speeds = {CpuIndexAndSpeed{.index = 0, .speed = 1}, CpuIndexAndSpeed{.index = 1, .speed = 2}, diff --git a/fml/platform/android/cpu_affinity.cc b/fml/platform/android/cpu_affinity.cc index 737f8204b9b6e..f7477e97de3b0 100644 --- a/fml/platform/android/cpu_affinity.cc +++ b/fml/platform/android/cpu_affinity.cc @@ -11,6 +11,7 @@ #include #include #include +#include "flutter/fml/logging.h" namespace fml { @@ -36,15 +37,27 @@ void InitCPUInfo(size_t cpu_count) { gCPUTracker = new CPUSpeedTracker(cpu_speeds); } -bool RequestAffinity(CpuAffinity affinity) { +bool SetUpCPUTracker() { // Populate CPU Info if uninitialized. auto count = std::thread::hardware_concurrency(); std::call_once(gCPUTrackerFlag, [count]() { InitCPUInfo(count); }); - if (gCPUTracker == nullptr) { + if (gCPUTracker == nullptr || !gCPUTracker->IsValid()) { + return false; + } + return true; +} + +std::optional AndroidEfficiencyCoreCount() { + if (!SetUpCPUTracker()) { return true; } + auto result = gCPUTracker->GetIndices(CpuAffinity::kEfficiency).size(); + FML_DCHECK(result > 0); + return result; +} - if (!gCPUTracker->IsValid()) { +bool AndroidRequestAffinity(CpuAffinity affinity) { + if (!SetUpCPUTracker()) { return true; } diff --git a/fml/platform/android/cpu_affinity.h b/fml/platform/android/cpu_affinity.h index 03c59ad5e9126..4ce1e7964aef9 100644 --- a/fml/platform/android/cpu_affinity.h +++ b/fml/platform/android/cpu_affinity.h @@ -8,14 +8,10 @@ namespace fml { -/// @brief Request the given affinity for the current thread. -/// -/// Returns true if successfull, or if it was a no-op. This function is -/// only supported on Android devices. -/// -/// Affinity requests are based on documented CPU speed. This speed data -/// is parsed from cpuinfo_max_freq files, see also: -/// https://www.kernel.org/doc/Documentation/cpu-freq/user-guide.txt -bool RequestAffinity(CpuAffinity affinity); +/// @brief Android specific implementation of EfficiencyCoreCount. +std::optional AndroidEfficiencyCoreCount(); + +/// @brief Android specific implementation of RequestAffinity. +bool AndroidRequestAffinity(CpuAffinity affinity); } // namespace fml diff --git a/impeller/renderer/backend/vulkan/context_vk.cc b/impeller/renderer/backend/vulkan/context_vk.cc index 5453f060f7a44..0a7b0db2bfabd 100644 --- a/impeller/renderer/backend/vulkan/context_vk.cc +++ b/impeller/renderer/backend/vulkan/context_vk.cc @@ -16,6 +16,7 @@ #include #include +#include "flutter/fml/cpu_affinity.h" #include "flutter/fml/trace_event.h" #include "impeller/base/validation.h" #include "impeller/renderer/backend/vulkan/allocator_vk.h" @@ -130,13 +131,16 @@ void ContextVK::Setup(Settings settings) { raster_message_loop_ = fml::ConcurrentMessageLoop::Create( std::min(4u, std::thread::hardware_concurrency())); -#ifdef FML_OS_ANDROID raster_message_loop_->PostTaskToAllWorkers([]() { + // Currently we only use the worker task pool for small parts of a frame + // workload, if this changes this setting may need to be adjusted. + fml::RequestAffinity(fml::CpuAffinity::kNotPerformance); +#ifdef FML_OS_ANDROID if (::setpriority(PRIO_PROCESS, gettid(), -5) != 0) { FML_LOG(ERROR) << "Failed to set Workers task runner priority"; } - }); #endif // FML_OS_ANDROID + }); auto& dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER; dispatcher.init(settings.proc_address_callback); diff --git a/impeller/renderer/backend/vulkan/fence_waiter_vk.cc b/impeller/renderer/backend/vulkan/fence_waiter_vk.cc index 4a16c7a79a716..ef906f869af2c 100644 --- a/impeller/renderer/backend/vulkan/fence_waiter_vk.cc +++ b/impeller/renderer/backend/vulkan/fence_waiter_vk.cc @@ -8,6 +8,7 @@ #include #include +#include "flutter/fml/cpu_affinity.h" #include "flutter/fml/thread.h" #include "flutter/fml/trace_event.h" #include "impeller/base/validation.h" @@ -86,8 +87,8 @@ static std::vector GetFencesForWaitSet(const WaitSet& set) { void FenceWaiterVK::Main() { fml::Thread::SetCurrentThreadName( fml::Thread::ThreadConfig{"io.flutter.impeller.fence_waiter"}); - - using namespace std::literals::chrono_literals; + // Since this thread mostly waits on fences, it doesn't need to be fast. + fml::RequestAffinity(fml::CpuAffinity::kEfficiency); while (true) { // We'll read the terminate_ flag within the lock below. diff --git a/impeller/renderer/backend/vulkan/resource_manager_vk.cc b/impeller/renderer/backend/vulkan/resource_manager_vk.cc index f981321c7115e..b719737337f8e 100644 --- a/impeller/renderer/backend/vulkan/resource_manager_vk.cc +++ b/impeller/renderer/backend/vulkan/resource_manager_vk.cc @@ -4,6 +4,7 @@ #include "impeller/renderer/backend/vulkan/resource_manager_vk.h" +#include "flutter/fml/cpu_affinity.h" #include "flutter/fml/thread.h" #include "flutter/fml/trace_event.h" #include "fml/logging.h" @@ -39,6 +40,9 @@ void ResourceManagerVK::Start() { fml::Thread::SetCurrentThreadName( fml::Thread::ThreadConfig{"io.flutter.impeller.resource_manager"}); + // While this code calls destructors it doesn't need to be particularly fast + // with them, as long as it doesn't interrupt raster thread. + fml::RequestAffinity(fml::CpuAffinity::kEfficiency); bool should_exit = false; while (!should_exit) { diff --git a/runtime/dart_vm.cc b/runtime/dart_vm.cc index 48715c5cc2eec..152a4cd6665ce 100644 --- a/runtime/dart_vm.cc +++ b/runtime/dart_vm.cc @@ -11,6 +11,7 @@ #include "flutter/common/settings.h" #include "flutter/fml/compiler_specific.h" +#include "flutter/fml/cpu_affinity.h" #include "flutter/fml/logging.h" #include "flutter/fml/mapping.h" #include "flutter/fml/size.h" @@ -285,7 +286,9 @@ size_t DartVM::GetVMLaunchCount() { DartVM::DartVM(const std::shared_ptr& vm_data, std::shared_ptr isolate_name_server) : settings_(vm_data->GetSettings()), - concurrent_message_loop_(fml::ConcurrentMessageLoop::Create()), + concurrent_message_loop_(fml::ConcurrentMessageLoop::Create( + fml::EfficiencyCoreCount().value_or( + std::thread::hardware_concurrency()))), skia_concurrent_executor_( [runner = concurrent_message_loop_->GetTaskRunner()]( const fml::closure& work) { runner->PostTask(work); }), diff --git a/shell/platform/android/android_shell_holder.cc b/shell/platform/android/android_shell_holder.cc index 39aef72727d9d..4ae3c82203bee 100644 --- a/shell/platform/android/android_shell_holder.cc +++ b/shell/platform/android/android_shell_holder.cc @@ -16,11 +16,11 @@ #include #include +#include "flutter/fml/cpu_affinity.h" #include "flutter/fml/logging.h" #include "flutter/fml/make_copyable.h" #include "flutter/fml/message_loop.h" #include "flutter/fml/native_library.h" -#include "flutter/fml/platform/android/cpu_affinity.h" #include "flutter/fml/platform/android/jni_util.h" #include "flutter/lib/ui/painting/image_generator_registry.h" #include "flutter/shell/common/rasterizer.h" From 6f424ecac3a5c8b5a92292e487f05f05136fc280 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Tue, 19 Sep 2023 16:40:14 -0700 Subject: [PATCH 155/859] [Impeller] Fix validation error about incorrect aspect on buffer to texture copies. (#46078) This shows up when we try to set the contents of a depth of stencil image. The aspect was assumed to be color only because typical Impeller workloads have device-transient depth and stencil images. But the "stencil mask" test apparently does set the context directly. Besides, this is perfectly valid usage. This makes Vulkan resilient to said usage. --- impeller/renderer/backend/vulkan/texture_vk.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/impeller/renderer/backend/vulkan/texture_vk.cc b/impeller/renderer/backend/vulkan/texture_vk.cc index 94843de103bdf..cbe525400c303 100644 --- a/impeller/renderer/backend/vulkan/texture_vk.cc +++ b/impeller/renderer/backend/vulkan/texture_vk.cc @@ -93,7 +93,8 @@ bool TextureVK::OnSetContents(const uint8_t* contents, copy.imageExtent.width = desc.size.width; copy.imageExtent.height = desc.size.height; copy.imageExtent.depth = 1u; - copy.imageSubresource.aspectMask = vk::ImageAspectFlagBits::eColor; + copy.imageSubresource.aspectMask = + ToImageAspectFlags(GetTextureDescriptor().format); copy.imageSubresource.mipLevel = 0u; copy.imageSubresource.baseArrayLayer = slice; copy.imageSubresource.layerCount = 1u; From 4621fe048c2717042ccfffcf88e4866018282fa3 Mon Sep 17 00:00:00 2001 From: godofredoc Date: Tue, 19 Sep 2023 19:42:19 -0700 Subject: [PATCH 156/859] Use magic envs to pass commit and temp folder. (#46015) The fuchsia scripts rely on paths and the commit version being passed as parameters. This changes pass those values using special environment variables. Bug: https://github.com/flutter/flutter/issues/126461 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- ci/builders/README.md | 24 ++++++++++++++++++++---- ci/builders/linux_fuchsia.json | 9 +++++---- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/ci/builders/README.md b/ci/builders/README.md index 645cc2d731ff5..ba662166c9f9e 100644 --- a/ci/builders/README.md +++ b/ci/builders/README.md @@ -105,6 +105,25 @@ A configuration file defines a top-level builder that will show up as a column in the [Flutter Dashboard](https://flutter-dashboard.appspot.com/#/build?repo=engine&branch=master). + +### Magic variables + +Magic variables are special environment variables that can be used as parameters +for generators and test commands in the local and global contexts. + +Magic environment variables have the following limitations: +only `${FLUTTER_LOGS_DIR}` is currently supported and it needs to be used +alone within the parameter string(e.g. `["${FLUTTER_LOGS_DIR}"]` is OK +but `["path=${FLUTTER_LOGS_DIR}"]` is not). + +The current list of supported magic variables is: + +* `${FLUTTER_LOGS_DIR}` - translated to the path of the temporary + folder where logs are being placed. +* `${LUCI_WORKDIR}` - translated to the LUCI chroot working directory. +* `${LUCI_CLEANUP}` - translated to the LUCI chroot temp directory. +* `${REVISION}` - translated to the engine commit under test. + ### Build A build is a dictionary with a gn command, a ninja command, zero or more @@ -299,10 +318,7 @@ permissions to run in the target platform. * **name** - the name of the step running the script. * **parameters** - flags or parameters passed to the script. Parameters accept magic environment variables(placeholders replaced before executing -the test). Magic environment variables have the following limitations: -only `${FLUTTER_LOGS_DIR}` is currently supported and it needs to be used -alone within the parameter string(e.g. `["${FLUTTER_LOGS_DIR}"]` is OK -but `["path=${FLUTTER_LOGS_DIR}"]` is not). +the test). * **Script** - the path to the script to execute relative to the checkout directory. * **contexts** - a list of available contexts to add to the text execution step. diff --git a/ci/builders/linux_fuchsia.json b/ci/builders/linux_fuchsia.json index 8af5dc025e426..f66fee507795f 100644 --- a/ci/builders/linux_fuchsia.json +++ b/ci/builders/linux_fuchsia.json @@ -152,8 +152,9 @@ "name": "Upload fuchsia artifacts", "parameters": [ "--engine-version", - "HEAD", - "--skip-build" + "${REVISION}", + "--skip-build", + "--upload" ], "script": "flutter/tools/fuchsia/build_fuchsia_artifacts.py", "language": "python3" @@ -166,7 +167,7 @@ "--target-arch", "arm64", "--out-dir", - "/b/s/w/ir/x/w/recipe_cleanup/tmppqs4ecj7", + "${LUCI_CLEANUP}", "--symbol-dirs", "out/fuchsia_debug_arm64/.build-id", "out/fuchsia_profile_arm64/.build-id", @@ -183,7 +184,7 @@ "--target-arch", "x64", "--out-dir", - "/b/s/w/ir/x/w/recipe_cleanup/tmppqs4ecj7", + "${LUCI_CLEANUP}", "--symbol-dirs", "out/fuchsia_debug_x64/.build-id", "out/fuchsia_profile_x64/.build-id", From 0765b9ed4575539288cdb3ad40d48021a797e364 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 19 Sep 2023 22:48:04 -0400 Subject: [PATCH 157/859] Roll Fuchsia Mac SDK from 06g6i7-5u8O-FOTSi... to kGkqpvcPI1TGmR4Sc... (#46079) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jonahwilliams@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 0f7371a3d510b..6e4feb3c0c2c9 100644 --- a/DEPS +++ b/DEPS @@ -914,7 +914,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': '06g6i7-5u8O-FOTSiXV49zPhENc4ZaXzGkSyFuDpJQgC' + 'version': 'kGkqpvcPI1TGmR4Scp19EXK5hxyrDBhn2-hp4U8E6skC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From ec79109ff00e1f93d2f7576f44928b29d5471678 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 19 Sep 2023 23:56:22 -0400 Subject: [PATCH 158/859] Roll Skia from 1a8885b9e03c to 5d916c04e9fc (6 revisions) (#46081) https://skia.googlesource.com/skia.git/+log/1a8885b9e03c..5d916c04e9fc 2023-09-20 skia-autoroll@skia-public.iam.gserviceaccount.com Roll shaders-base from b4ee53fe6042 to ca3aa4986e49 2023-09-20 skia-autoroll@skia-public.iam.gserviceaccount.com Roll debugger-app-base from 927fde2f2c6e to 34426197856b 2023-09-20 skia-autoroll@skia-public.iam.gserviceaccount.com Roll jsfiddle-base from 5a23365ca776 to bc9bc348e2da 2023-09-20 skia-autoroll@skia-public.iam.gserviceaccount.com Roll skottie-base from a5a762c16294 to 4983a463d62a 2023-09-20 fmalita@chromium.org [mesh2d demo] Include CK copy 2023-09-19 armansito@google.com [graphite][mtl] Align dynamic thread group memory to 16 bytes If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 6e4feb3c0c2c9..ebb85ca21ee4b 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '1a8885b9e03c65598feb5c8f46e669fd51b2417a', + 'skia_revision': '5d916c04e9fc172cd0b9f42be1389d71a2c0b186', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index de5ce8f934404..3ed0ddbf1f0ac 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 1dd1e3dabbb4a7c06084bd3bcfa5afe6 +Signature: 62a03a34ada555b5a18cd19517a5af93 ==================================================================================================== LIBRARY: etc1 From 5c77126c50ca56593af50ad32b0f27ee760da29e Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 20 Sep 2023 00:19:21 -0400 Subject: [PATCH 159/859] Roll Fuchsia Linux SDK from ZhY53WD7bFJSA3xoO... to aHtib4LBcLwx7JwK-... (#46082) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jonahwilliams@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/excluded_files | 3 ++ ci/licenses_golden/licenses_fuchsia | 63 ++++++++++++++++++++++++++++- 3 files changed, 66 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index ebb85ca21ee4b..103c82ac3b0b3 100644 --- a/DEPS +++ b/DEPS @@ -924,7 +924,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'ZhY53WD7bFJSA3xoOchmSzb5zambmf3zOGFuK0GVv_YC' + 'version': 'aHtib4LBcLwx7JwK-pLiQPleFerXUt7If4yJSTh4tUcC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/excluded_files b/ci/licenses_golden/excluded_files index ec29109a476a5..feed60b197fdf 100644 --- a/ci/licenses_golden/excluded_files +++ b/ci/licenses_golden/excluded_files @@ -635,6 +635,7 @@ ../../../fuchsia/sdk/linux/fidl/zx/meta.json ../../../fuchsia/sdk/linux/meta ../../../fuchsia/sdk/linux/packages/blobs +../../../fuchsia/sdk/linux/packages/heapdump-collector/meta.json ../../../fuchsia/sdk/linux/packages/realm_builder_server/meta.json ../../../fuchsia/sdk/linux/pkg/async-cpp/meta.json ../../../fuchsia/sdk/linux/pkg/async-default/meta.json @@ -675,9 +676,11 @@ ../../../fuchsia/sdk/linux/pkg/fidl_cpp_v2/meta.json ../../../fuchsia/sdk/linux/pkg/fidl_cpp_wire/meta.json ../../../fuchsia/sdk/linux/pkg/fidl_driver/meta.json +../../../fuchsia/sdk/linux/pkg/fidl_driver_natural/meta.json ../../../fuchsia/sdk/linux/pkg/fidl_driver_transport/meta.json ../../../fuchsia/sdk/linux/pkg/fit-promise/meta.json ../../../fuchsia/sdk/linux/pkg/fit/meta.json +../../../fuchsia/sdk/linux/pkg/heapdump_instrumentation/meta.json ../../../fuchsia/sdk/linux/pkg/images_cpp/meta.json ../../../fuchsia/sdk/linux/pkg/input_report_reader/meta.json ../../../fuchsia/sdk/linux/pkg/inspect/meta.json diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index d9191dee15d16..b4c704177ec73 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: c3fd941dfa4989c98789c7cebb5617fc +Signature: f16d65317d75c8c97f9ad5c10e688e5a ==================================================================================================== LIBRARY: fuchsia_sdk @@ -9,6 +9,7 @@ FILE: ../../../fuchsia/sdk/linux/arch/arm64/dist/VkLayer_khronos_validation.so FILE: ../../../fuchsia/sdk/linux/arch/arm64/dist/libasync-default.so FILE: ../../../fuchsia/sdk/linux/arch/arm64/dist/libdriver_runtime.so FILE: ../../../fuchsia/sdk/linux/arch/arm64/dist/libfdio.so +FILE: ../../../fuchsia/sdk/linux/arch/arm64/dist/libheapdump_instrumentation.so FILE: ../../../fuchsia/sdk/linux/arch/arm64/dist/libsvc.so FILE: ../../../fuchsia/sdk/linux/arch/arm64/dist/libsyslog.so FILE: ../../../fuchsia/sdk/linux/arch/arm64/dist/libtrace-engine.so @@ -18,6 +19,7 @@ FILE: ../../../fuchsia/sdk/linux/arch/arm64/lib/libasync-default.so FILE: ../../../fuchsia/sdk/linux/arch/arm64/lib/libasync-loop-default.a FILE: ../../../fuchsia/sdk/linux/arch/arm64/lib/libdriver_runtime.so FILE: ../../../fuchsia/sdk/linux/arch/arm64/lib/libfdio.so +FILE: ../../../fuchsia/sdk/linux/arch/arm64/lib/libheapdump_instrumentation.so FILE: ../../../fuchsia/sdk/linux/arch/arm64/lib/libmagma_client.a FILE: ../../../fuchsia/sdk/linux/arch/arm64/lib/libsvc.so FILE: ../../../fuchsia/sdk/linux/arch/arm64/lib/libsync.a @@ -186,6 +188,7 @@ FILE: ../../../fuchsia/sdk/linux/arch/riscv64/dist/VkLayer_khronos_validation.so FILE: ../../../fuchsia/sdk/linux/arch/riscv64/dist/libasync-default.so FILE: ../../../fuchsia/sdk/linux/arch/riscv64/dist/libdriver_runtime.so FILE: ../../../fuchsia/sdk/linux/arch/riscv64/dist/libfdio.so +FILE: ../../../fuchsia/sdk/linux/arch/riscv64/dist/libheapdump_instrumentation.so FILE: ../../../fuchsia/sdk/linux/arch/riscv64/dist/libsvc.so FILE: ../../../fuchsia/sdk/linux/arch/riscv64/dist/libsyslog.so FILE: ../../../fuchsia/sdk/linux/arch/riscv64/dist/libtrace-engine.so @@ -195,6 +198,7 @@ FILE: ../../../fuchsia/sdk/linux/arch/riscv64/lib/libasync-default.so FILE: ../../../fuchsia/sdk/linux/arch/riscv64/lib/libasync-loop-default.a FILE: ../../../fuchsia/sdk/linux/arch/riscv64/lib/libdriver_runtime.so FILE: ../../../fuchsia/sdk/linux/arch/riscv64/lib/libfdio.so +FILE: ../../../fuchsia/sdk/linux/arch/riscv64/lib/libheapdump_instrumentation.so FILE: ../../../fuchsia/sdk/linux/arch/riscv64/lib/libmagma_client.a FILE: ../../../fuchsia/sdk/linux/arch/riscv64/lib/libsvc.so FILE: ../../../fuchsia/sdk/linux/arch/riscv64/lib/libsync.a @@ -363,6 +367,7 @@ FILE: ../../../fuchsia/sdk/linux/arch/x64/dist/VkLayer_khronos_validation.so FILE: ../../../fuchsia/sdk/linux/arch/x64/dist/libasync-default.so FILE: ../../../fuchsia/sdk/linux/arch/x64/dist/libdriver_runtime.so FILE: ../../../fuchsia/sdk/linux/arch/x64/dist/libfdio.so +FILE: ../../../fuchsia/sdk/linux/arch/x64/dist/libheapdump_instrumentation.so FILE: ../../../fuchsia/sdk/linux/arch/x64/dist/libsvc.so FILE: ../../../fuchsia/sdk/linux/arch/x64/dist/libsyslog.so FILE: ../../../fuchsia/sdk/linux/arch/x64/dist/libtrace-engine.so @@ -372,6 +377,7 @@ FILE: ../../../fuchsia/sdk/linux/arch/x64/lib/libasync-default.so FILE: ../../../fuchsia/sdk/linux/arch/x64/lib/libasync-loop-default.a FILE: ../../../fuchsia/sdk/linux/arch/x64/lib/libdriver_runtime.so FILE: ../../../fuchsia/sdk/linux/arch/x64/lib/libfdio.so +FILE: ../../../fuchsia/sdk/linux/arch/x64/lib/libheapdump_instrumentation.so FILE: ../../../fuchsia/sdk/linux/arch/x64/lib/libmagma_client.a FILE: ../../../fuchsia/sdk/linux/arch/x64/lib/libsvc.so FILE: ../../../fuchsia/sdk/linux/arch/x64/lib/libsync.a @@ -536,6 +542,12 @@ FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/lib/libpthread.so FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/lib/librt.so FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/lib/libzircon.so FILE: ../../../fuchsia/sdk/linux/data/config/symbol_index/config.json +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/arm64/release/content_checklist_path +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/arm64/release/package_manifest.json +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/riscv64/release/content_checklist_path +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/riscv64/release/package_manifest.json +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/x64/release/content_checklist_path +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/x64/release/package_manifest.json FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/arm64/release/content_checklist_path FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/arm64/release/package_manifest.json FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/riscv64/release/content_checklist_path @@ -545,6 +557,7 @@ FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/x64/release/packa FILE: ../../../fuchsia/sdk/linux/pkg/async-default/async-default.ifs 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/inspect/inspect.json FILE: ../../../fuchsia/sdk/linux/pkg/svc/svc.ifs FILE: ../../../fuchsia/sdk/linux/pkg/sys/component/realm_builder_shard_sdk.json @@ -1821,6 +1834,7 @@ FILE: ../../../fuchsia/sdk/linux/arch/arm64/dist/VkLayer_khronos_validation.so FILE: ../../../fuchsia/sdk/linux/arch/arm64/dist/libasync-default.so FILE: ../../../fuchsia/sdk/linux/arch/arm64/dist/libdriver_runtime.so FILE: ../../../fuchsia/sdk/linux/arch/arm64/dist/libfdio.so +FILE: ../../../fuchsia/sdk/linux/arch/arm64/dist/libheapdump_instrumentation.so FILE: ../../../fuchsia/sdk/linux/arch/arm64/dist/libsvc.so FILE: ../../../fuchsia/sdk/linux/arch/arm64/dist/libsyslog.so FILE: ../../../fuchsia/sdk/linux/arch/arm64/dist/libtrace-engine.so @@ -1830,6 +1844,7 @@ FILE: ../../../fuchsia/sdk/linux/arch/arm64/lib/libasync-default.so FILE: ../../../fuchsia/sdk/linux/arch/arm64/lib/libasync-loop-default.a FILE: ../../../fuchsia/sdk/linux/arch/arm64/lib/libdriver_runtime.so FILE: ../../../fuchsia/sdk/linux/arch/arm64/lib/libfdio.so +FILE: ../../../fuchsia/sdk/linux/arch/arm64/lib/libheapdump_instrumentation.so FILE: ../../../fuchsia/sdk/linux/arch/arm64/lib/libmagma_client.a FILE: ../../../fuchsia/sdk/linux/arch/arm64/lib/libsvc.so FILE: ../../../fuchsia/sdk/linux/arch/arm64/lib/libsync.a @@ -1998,6 +2013,7 @@ FILE: ../../../fuchsia/sdk/linux/arch/riscv64/dist/VkLayer_khronos_validation.so FILE: ../../../fuchsia/sdk/linux/arch/riscv64/dist/libasync-default.so FILE: ../../../fuchsia/sdk/linux/arch/riscv64/dist/libdriver_runtime.so FILE: ../../../fuchsia/sdk/linux/arch/riscv64/dist/libfdio.so +FILE: ../../../fuchsia/sdk/linux/arch/riscv64/dist/libheapdump_instrumentation.so FILE: ../../../fuchsia/sdk/linux/arch/riscv64/dist/libsvc.so FILE: ../../../fuchsia/sdk/linux/arch/riscv64/dist/libsyslog.so FILE: ../../../fuchsia/sdk/linux/arch/riscv64/dist/libtrace-engine.so @@ -2007,6 +2023,7 @@ FILE: ../../../fuchsia/sdk/linux/arch/riscv64/lib/libasync-default.so FILE: ../../../fuchsia/sdk/linux/arch/riscv64/lib/libasync-loop-default.a FILE: ../../../fuchsia/sdk/linux/arch/riscv64/lib/libdriver_runtime.so FILE: ../../../fuchsia/sdk/linux/arch/riscv64/lib/libfdio.so +FILE: ../../../fuchsia/sdk/linux/arch/riscv64/lib/libheapdump_instrumentation.so FILE: ../../../fuchsia/sdk/linux/arch/riscv64/lib/libmagma_client.a FILE: ../../../fuchsia/sdk/linux/arch/riscv64/lib/libsvc.so FILE: ../../../fuchsia/sdk/linux/arch/riscv64/lib/libsync.a @@ -2175,6 +2192,7 @@ FILE: ../../../fuchsia/sdk/linux/arch/x64/dist/VkLayer_khronos_validation.so FILE: ../../../fuchsia/sdk/linux/arch/x64/dist/libasync-default.so FILE: ../../../fuchsia/sdk/linux/arch/x64/dist/libdriver_runtime.so FILE: ../../../fuchsia/sdk/linux/arch/x64/dist/libfdio.so +FILE: ../../../fuchsia/sdk/linux/arch/x64/dist/libheapdump_instrumentation.so FILE: ../../../fuchsia/sdk/linux/arch/x64/dist/libsvc.so FILE: ../../../fuchsia/sdk/linux/arch/x64/dist/libsyslog.so FILE: ../../../fuchsia/sdk/linux/arch/x64/dist/libtrace-engine.so @@ -2184,6 +2202,7 @@ FILE: ../../../fuchsia/sdk/linux/arch/x64/lib/libasync-default.so FILE: ../../../fuchsia/sdk/linux/arch/x64/lib/libasync-loop-default.a FILE: ../../../fuchsia/sdk/linux/arch/x64/lib/libdriver_runtime.so FILE: ../../../fuchsia/sdk/linux/arch/x64/lib/libfdio.so +FILE: ../../../fuchsia/sdk/linux/arch/x64/lib/libheapdump_instrumentation.so FILE: ../../../fuchsia/sdk/linux/arch/x64/lib/libmagma_client.a FILE: ../../../fuchsia/sdk/linux/arch/x64/lib/libsvc.so FILE: ../../../fuchsia/sdk/linux/arch/x64/lib/libsync.a @@ -2348,6 +2367,12 @@ FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/lib/libpthread.so FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/lib/librt.so FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/lib/libzircon.so FILE: ../../../fuchsia/sdk/linux/data/config/symbol_index/config.json +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/arm64/release/content_checklist_path +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/arm64/release/package_manifest.json +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/riscv64/release/content_checklist_path +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/riscv64/release/package_manifest.json +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/x64/release/content_checklist_path +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/x64/release/package_manifest.json FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/arm64/release/content_checklist_path FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/arm64/release/package_manifest.json FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/riscv64/release/content_checklist_path @@ -2357,6 +2382,7 @@ FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/x64/release/packa FILE: ../../../fuchsia/sdk/linux/pkg/async-default/async-default.ifs 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/inspect/inspect.json FILE: ../../../fuchsia/sdk/linux/pkg/svc/svc.ifs FILE: ../../../fuchsia/sdk/linux/pkg/sys/component/realm_builder_shard_sdk.json @@ -3945,6 +3971,13 @@ ORIGIN: ../../../fuchsia/sdk/linux/pkg/fidl_driver/include/lib/fidl_driver/cpp/u ORIGIN: ../../../fuchsia/sdk/linux/pkg/fidl_driver/include/lib/fidl_driver/cpp/wire_client.h + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/pkg/fidl_driver/include/lib/fidl_driver/cpp/wire_messaging_declarations.h + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/pkg/fidl_driver/unknown_interactions.cc + ../../../fuchsia/sdk/linux/LICENSE +ORIGIN: ../../../fuchsia/sdk/linux/pkg/fidl_driver_natural/include/lib/fidl_driver/cpp/internal/endpoint_conversions.h + ../../../fuchsia/sdk/linux/LICENSE +ORIGIN: ../../../fuchsia/sdk/linux/pkg/fidl_driver_natural/include/lib/fidl_driver/cpp/internal/natural_client_details.h + ../../../fuchsia/sdk/linux/LICENSE +ORIGIN: ../../../fuchsia/sdk/linux/pkg/fidl_driver_natural/include/lib/fidl_driver/cpp/natural_client.h + ../../../fuchsia/sdk/linux/LICENSE +ORIGIN: ../../../fuchsia/sdk/linux/pkg/fidl_driver_natural/include/lib/fidl_driver/cpp/natural_messaging.h + ../../../fuchsia/sdk/linux/LICENSE +ORIGIN: ../../../fuchsia/sdk/linux/pkg/fidl_driver_natural/include/lib/fidl_driver/cpp/natural_types.h + ../../../fuchsia/sdk/linux/LICENSE +ORIGIN: ../../../fuchsia/sdk/linux/pkg/fidl_driver_natural/include/lib/fidl_driver/cpp/unified_messaging_declarations.h + ../../../fuchsia/sdk/linux/LICENSE +ORIGIN: ../../../fuchsia/sdk/linux/pkg/fidl_driver_natural/natural_messaging.cc + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/pkg/fit/include/lib/fit/inline_any.h + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/pkg/fit/include/lib/fit/internal/inline_any.h + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/pkg/input_report_reader/reader.cc + ../../../fuchsia/sdk/linux/LICENSE @@ -4194,6 +4227,13 @@ FILE: ../../../fuchsia/sdk/linux/pkg/fidl_driver/include/lib/fidl_driver/cpp/unk FILE: ../../../fuchsia/sdk/linux/pkg/fidl_driver/include/lib/fidl_driver/cpp/wire_client.h FILE: ../../../fuchsia/sdk/linux/pkg/fidl_driver/include/lib/fidl_driver/cpp/wire_messaging_declarations.h FILE: ../../../fuchsia/sdk/linux/pkg/fidl_driver/unknown_interactions.cc +FILE: ../../../fuchsia/sdk/linux/pkg/fidl_driver_natural/include/lib/fidl_driver/cpp/internal/endpoint_conversions.h +FILE: ../../../fuchsia/sdk/linux/pkg/fidl_driver_natural/include/lib/fidl_driver/cpp/internal/natural_client_details.h +FILE: ../../../fuchsia/sdk/linux/pkg/fidl_driver_natural/include/lib/fidl_driver/cpp/natural_client.h +FILE: ../../../fuchsia/sdk/linux/pkg/fidl_driver_natural/include/lib/fidl_driver/cpp/natural_messaging.h +FILE: ../../../fuchsia/sdk/linux/pkg/fidl_driver_natural/include/lib/fidl_driver/cpp/natural_types.h +FILE: ../../../fuchsia/sdk/linux/pkg/fidl_driver_natural/include/lib/fidl_driver/cpp/unified_messaging_declarations.h +FILE: ../../../fuchsia/sdk/linux/pkg/fidl_driver_natural/natural_messaging.cc FILE: ../../../fuchsia/sdk/linux/pkg/fit/include/lib/fit/inline_any.h FILE: ../../../fuchsia/sdk/linux/pkg/fit/include/lib/fit/internal/inline_any.h FILE: ../../../fuchsia/sdk/linux/pkg/input_report_reader/reader.cc @@ -4289,6 +4329,7 @@ ORIGIN: ../../../fuchsia/sdk/linux/pkg/component_outgoing_cpp/include/lib/compon ORIGIN: ../../../fuchsia/sdk/linux/pkg/driver_component_cpp/driver_base.cc + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/pkg/driver_component_cpp/include/lib/driver/component/cpp/driver_export.h + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/pkg/driver_component_cpp/include/lib/driver/component/cpp/internal/basic_factory.h + ../../../fuchsia/sdk/linux/LICENSE +ORIGIN: ../../../fuchsia/sdk/linux/pkg/driver_component_cpp/include/lib/driver/component/cpp/internal/driver_server.h + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/pkg/driver_component_cpp/include/lib/driver/component/cpp/internal/lifecycle.h + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/pkg/driver_component_cpp/include/lib/driver/component/cpp/prepare_stop_completer.h + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/pkg/driver_component_cpp/include/lib/driver/component/cpp/start_completer.h + ../../../fuchsia/sdk/linux/LICENSE @@ -4306,6 +4347,9 @@ ORIGIN: ../../../fuchsia/sdk/linux/pkg/driver_testing_cpp/driver_runtime.cc + .. ORIGIN: ../../../fuchsia/sdk/linux/pkg/driver_testing_cpp/environment_variables.cc + ../../../fuchsia/sdk/linux/LICENSE 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/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 ORIGIN: ../../../fuchsia/sdk/linux/pkg/inspect/offer.shard.cml + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/pkg/inspect/use.shard.cml + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/pkg/sync_cpp/include/lib/sync/cpp/mutex.h + ../../../fuchsia/sdk/linux/LICENSE @@ -4350,6 +4394,7 @@ FILE: ../../../fuchsia/sdk/linux/pkg/component_outgoing_cpp/include/lib/componen FILE: ../../../fuchsia/sdk/linux/pkg/driver_component_cpp/driver_base.cc FILE: ../../../fuchsia/sdk/linux/pkg/driver_component_cpp/include/lib/driver/component/cpp/driver_export.h FILE: ../../../fuchsia/sdk/linux/pkg/driver_component_cpp/include/lib/driver/component/cpp/internal/basic_factory.h +FILE: ../../../fuchsia/sdk/linux/pkg/driver_component_cpp/include/lib/driver/component/cpp/internal/driver_server.h FILE: ../../../fuchsia/sdk/linux/pkg/driver_component_cpp/include/lib/driver/component/cpp/internal/lifecycle.h FILE: ../../../fuchsia/sdk/linux/pkg/driver_component_cpp/include/lib/driver/component/cpp/prepare_stop_completer.h FILE: ../../../fuchsia/sdk/linux/pkg/driver_component_cpp/include/lib/driver/component/cpp/start_completer.h @@ -4367,6 +4412,9 @@ FILE: ../../../fuchsia/sdk/linux/pkg/driver_testing_cpp/driver_runtime.cc 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/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 FILE: ../../../fuchsia/sdk/linux/pkg/inspect/offer.shard.cml FILE: ../../../fuchsia/sdk/linux/pkg/inspect/use.shard.cml FILE: ../../../fuchsia/sdk/linux/pkg/sync_cpp/include/lib/sync/cpp/mutex.h @@ -4407,6 +4455,7 @@ FILE: ../../../fuchsia/sdk/linux/arch/arm64/dist/VkLayer_khronos_validation.so FILE: ../../../fuchsia/sdk/linux/arch/arm64/dist/libasync-default.so FILE: ../../../fuchsia/sdk/linux/arch/arm64/dist/libdriver_runtime.so FILE: ../../../fuchsia/sdk/linux/arch/arm64/dist/libfdio.so +FILE: ../../../fuchsia/sdk/linux/arch/arm64/dist/libheapdump_instrumentation.so FILE: ../../../fuchsia/sdk/linux/arch/arm64/dist/libsvc.so FILE: ../../../fuchsia/sdk/linux/arch/arm64/dist/libsyslog.so FILE: ../../../fuchsia/sdk/linux/arch/arm64/dist/libtrace-engine.so @@ -4416,6 +4465,7 @@ FILE: ../../../fuchsia/sdk/linux/arch/arm64/lib/libasync-default.so FILE: ../../../fuchsia/sdk/linux/arch/arm64/lib/libasync-loop-default.a FILE: ../../../fuchsia/sdk/linux/arch/arm64/lib/libdriver_runtime.so FILE: ../../../fuchsia/sdk/linux/arch/arm64/lib/libfdio.so +FILE: ../../../fuchsia/sdk/linux/arch/arm64/lib/libheapdump_instrumentation.so FILE: ../../../fuchsia/sdk/linux/arch/arm64/lib/libmagma_client.a FILE: ../../../fuchsia/sdk/linux/arch/arm64/lib/libsvc.so FILE: ../../../fuchsia/sdk/linux/arch/arm64/lib/libsync.a @@ -4584,6 +4634,7 @@ FILE: ../../../fuchsia/sdk/linux/arch/riscv64/dist/VkLayer_khronos_validation.so FILE: ../../../fuchsia/sdk/linux/arch/riscv64/dist/libasync-default.so FILE: ../../../fuchsia/sdk/linux/arch/riscv64/dist/libdriver_runtime.so FILE: ../../../fuchsia/sdk/linux/arch/riscv64/dist/libfdio.so +FILE: ../../../fuchsia/sdk/linux/arch/riscv64/dist/libheapdump_instrumentation.so FILE: ../../../fuchsia/sdk/linux/arch/riscv64/dist/libsvc.so FILE: ../../../fuchsia/sdk/linux/arch/riscv64/dist/libsyslog.so FILE: ../../../fuchsia/sdk/linux/arch/riscv64/dist/libtrace-engine.so @@ -4593,6 +4644,7 @@ FILE: ../../../fuchsia/sdk/linux/arch/riscv64/lib/libasync-default.so FILE: ../../../fuchsia/sdk/linux/arch/riscv64/lib/libasync-loop-default.a FILE: ../../../fuchsia/sdk/linux/arch/riscv64/lib/libdriver_runtime.so FILE: ../../../fuchsia/sdk/linux/arch/riscv64/lib/libfdio.so +FILE: ../../../fuchsia/sdk/linux/arch/riscv64/lib/libheapdump_instrumentation.so FILE: ../../../fuchsia/sdk/linux/arch/riscv64/lib/libmagma_client.a FILE: ../../../fuchsia/sdk/linux/arch/riscv64/lib/libsvc.so FILE: ../../../fuchsia/sdk/linux/arch/riscv64/lib/libsync.a @@ -4761,6 +4813,7 @@ FILE: ../../../fuchsia/sdk/linux/arch/x64/dist/VkLayer_khronos_validation.so FILE: ../../../fuchsia/sdk/linux/arch/x64/dist/libasync-default.so FILE: ../../../fuchsia/sdk/linux/arch/x64/dist/libdriver_runtime.so FILE: ../../../fuchsia/sdk/linux/arch/x64/dist/libfdio.so +FILE: ../../../fuchsia/sdk/linux/arch/x64/dist/libheapdump_instrumentation.so FILE: ../../../fuchsia/sdk/linux/arch/x64/dist/libsvc.so FILE: ../../../fuchsia/sdk/linux/arch/x64/dist/libsyslog.so FILE: ../../../fuchsia/sdk/linux/arch/x64/dist/libtrace-engine.so @@ -4770,6 +4823,7 @@ FILE: ../../../fuchsia/sdk/linux/arch/x64/lib/libasync-default.so FILE: ../../../fuchsia/sdk/linux/arch/x64/lib/libasync-loop-default.a FILE: ../../../fuchsia/sdk/linux/arch/x64/lib/libdriver_runtime.so FILE: ../../../fuchsia/sdk/linux/arch/x64/lib/libfdio.so +FILE: ../../../fuchsia/sdk/linux/arch/x64/lib/libheapdump_instrumentation.so FILE: ../../../fuchsia/sdk/linux/arch/x64/lib/libmagma_client.a FILE: ../../../fuchsia/sdk/linux/arch/x64/lib/libsvc.so FILE: ../../../fuchsia/sdk/linux/arch/x64/lib/libsync.a @@ -4934,6 +4988,12 @@ FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/lib/libpthread.so FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/lib/librt.so FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/lib/libzircon.so FILE: ../../../fuchsia/sdk/linux/data/config/symbol_index/config.json +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/arm64/release/content_checklist_path +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/arm64/release/package_manifest.json +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/riscv64/release/content_checklist_path +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/riscv64/release/package_manifest.json +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/x64/release/content_checklist_path +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/x64/release/package_manifest.json FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/arm64/release/content_checklist_path FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/arm64/release/package_manifest.json FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/riscv64/release/content_checklist_path @@ -4943,6 +5003,7 @@ FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/x64/release/packa FILE: ../../../fuchsia/sdk/linux/pkg/async-default/async-default.ifs 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/inspect/inspect.json FILE: ../../../fuchsia/sdk/linux/pkg/svc/svc.ifs FILE: ../../../fuchsia/sdk/linux/pkg/sys/component/realm_builder_shard_sdk.json From ee2d3a383226852474c5478ac178d47b4e4ad277 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 20 Sep 2023 00:33:22 -0400 Subject: [PATCH 160/859] Roll Skia from 5d916c04e9fc to d6325ec2f053 (1 revision) (#46083) https://skia.googlesource.com/skia.git/+log/5d916c04e9fc..d6325ec2f053 2023-09-20 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from 1b17251d0e2c to 918412e0912f If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 103c82ac3b0b3..32a9e5173b2ef 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '5d916c04e9fc172cd0b9f42be1389d71a2c0b186', + 'skia_revision': 'd6325ec2f053d079b5546f40e72ed0332b4f893d', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 029635fac40a542de6a8a34130c59a7b03f67335 Mon Sep 17 00:00:00 2001 From: Brandon DeRosier Date: Wed, 20 Sep 2023 01:13:37 -0400 Subject: [PATCH 161/859] [Impeller] Use BlackTransparent clear color when backdrop filters are present. (#46085) Fix for https://github.com/flutter/flutter/issues/135053. We already duck out of the Entity absorbing part of the optimization, but we also need to duck here when computing clear colors, otherwise we end up double-applying the effect of clearing entities at the beginning of a pass in some cases. --- impeller/aiks/aiks_unittests.cc | 29 +++++++++++++++++++++++++++++ impeller/entity/entity_pass.cc | 4 ++++ 2 files changed, 33 insertions(+) diff --git a/impeller/aiks/aiks_unittests.cc b/impeller/aiks/aiks_unittests.cc index be7b50c8cb347..35207daa55d8f 100644 --- a/impeller/aiks/aiks_unittests.cc +++ b/impeller/aiks/aiks_unittests.cc @@ -2368,6 +2368,35 @@ TEST_P(AiksTest, ClipRectElidesNoOpClips) { ASSERT_EQ(render_pass->GetCommands().size(), 0llu); } +TEST_P(AiksTest, ClearColorOptimizationDoesNotApplyForBackdropFilters) { + Canvas canvas; + canvas.SaveLayer({}, std::nullopt, + ImageFilter::MakeBlur(Sigma(3), Sigma(3), + FilterContents::BlurStyle::kNormal, + Entity::TileMode::kClamp)); + canvas.DrawPaint({.color = Color::Red(), .blend_mode = BlendMode::kSource}); + canvas.DrawPaint({.color = Color::CornflowerBlue().WithAlpha(0.75), + .blend_mode = BlendMode::kSourceOver}); + canvas.Restore(); + + Picture picture = canvas.EndRecordingAsPicture(); + + std::optional actual_color; + picture.pass->IterateAllElements([&](EntityPass::Element& element) -> bool { + if (auto subpass = std::get_if>(&element)) { + actual_color = subpass->get()->GetClearColor(); + } + // Fail if the first element isn't a subpass. + return true; + }); + + ASSERT_TRUE(actual_color.has_value()); + if (!actual_color) { + return; + } + ASSERT_EQ(actual_color.value(), Color::BlackTransparent()); +} + TEST_P(AiksTest, CollapsedDrawPaintInSubpass) { Canvas canvas; canvas.DrawPaint( diff --git a/impeller/entity/entity_pass.cc b/impeller/entity/entity_pass.cc index 6b4017ad0a19c..e4b36fee3a46d 100644 --- a/impeller/entity/entity_pass.cc +++ b/impeller/entity/entity_pass.cc @@ -1091,6 +1091,10 @@ void EntityPass::SetBlendMode(BlendMode blend_mode) { Color EntityPass::GetClearColor(ISize target_size) const { Color result = Color::BlackTransparent(); + if (backdrop_filter_proc_) { + return result; + } + for (const Element& element : elements_) { auto [entity_color, blend_mode] = ElementAsBackgroundColor(element, target_size); From 1314541f12bc28c70bbe074f6f0b8038bbe5d7f4 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 20 Sep 2023 01:22:16 -0400 Subject: [PATCH 162/859] Roll Skia from d6325ec2f053 to e9b9e9a4f541 (1 revision) (#46086) https://skia.googlesource.com/skia.git/+log/d6325ec2f053..e9b9e9a4f541 2023-09-20 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Dawn from 58dbcccc38b5 to bc9a66c04290 (14 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 32a9e5173b2ef..5e780bea66a3f 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'd6325ec2f053d079b5546f40e72ed0332b4f893d', + 'skia_revision': 'e9b9e9a4f541a677fd228c30b8728aa00d9262cc', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From accee82017ed08d82f9c525e0ae09283767302df Mon Sep 17 00:00:00 2001 From: Brandon DeRosier Date: Wed, 20 Sep 2023 01:33:37 -0400 Subject: [PATCH 163/859] [Impeller] Ensure that reused textures are cleared before getting sampled by backdrop textures (#46084) Fix for https://github.com/flutter/flutter/issues/135053. I'm going to try and optimize out this case later, since Wondrous is inadvertently paying for a backdrop filter that contributes nothing to the final image. --- impeller/aiks/aiks_unittests.cc | 24 ++++++++++++++++++++++++ impeller/entity/entity_pass.cc | 8 ++++++++ 2 files changed, 32 insertions(+) diff --git a/impeller/aiks/aiks_unittests.cc b/impeller/aiks/aiks_unittests.cc index 35207daa55d8f..b6801f4731956 100644 --- a/impeller/aiks/aiks_unittests.cc +++ b/impeller/aiks/aiks_unittests.cc @@ -2264,6 +2264,30 @@ TEST_P(AiksTest, DrawPaintAbsorbsClears) { ASSERT_EQ(render_pass->GetCommands().size(), 0llu); } +// This is important to enforce with texture reuse, since cached textures need +// to be cleared before reuse. +TEST_P(AiksTest, + ParentSaveLayerCreatesRenderPassWhenChildBackdropFilterIsPresent) { + Canvas canvas; + canvas.SaveLayer({}, std::nullopt, ImageFilter::MakeMatrix(Matrix(), {})); + canvas.DrawPaint({.color = Color::Red(), .blend_mode = BlendMode::kSource}); + canvas.DrawPaint({.color = Color::CornflowerBlue().WithAlpha(0.75), + .blend_mode = BlendMode::kSourceOver}); + canvas.Restore(); + + Picture picture = canvas.EndRecordingAsPicture(); + + std::shared_ptr spy = ContextSpy::Make(); + std::shared_ptr real_context = GetContext(); + std::shared_ptr mock_context = spy->MakeContext(real_context); + AiksContext renderer(mock_context, nullptr); + std::shared_ptr image = picture.ToImage(renderer, {300, 300}); + + ASSERT_EQ(spy->render_passes_.size(), 3llu); + std::shared_ptr render_pass = spy->render_passes_[0]; + ASSERT_EQ(render_pass->GetCommands().size(), 0llu); +} + TEST_P(AiksTest, DrawRectAbsorbsClears) { Canvas canvas; canvas.DrawRect({0, 0, 300, 300}, diff --git a/impeller/entity/entity_pass.cc b/impeller/entity/entity_pass.cc index e4b36fee3a46d..7390c14df9d61 100644 --- a/impeller/entity/entity_pass.cc +++ b/impeller/entity/entity_pass.cc @@ -534,6 +534,14 @@ EntityPass::EntityResult EntityPass::GetEntityForElement( proc(FilterInput::Make(std::move(texture)), subpass->xformation_.Basis(), Entity::RenderingMode::kSubpass); + // If the very first thing we render in this EntityPass is a subpass that + // happens to have a backdrop filter, than that backdrop filter will end + // may wind up sampling from the raw, uncleared texture that came straight + // out of the texture cache. By calling `pass_context.GetRenderPass` here, + // we force the texture to pass through at least one RenderPass with the + // correct clear configuration before any sampling occurs. + pass_context.GetRenderPass(pass_depth); + // The subpass will need to read from the current pass texture when // rendering the backdrop, so if there's an active pass, end it prior to // rendering the subpass. From 812577ad60a54de763bcd439d972d9e2019b7714 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 20 Sep 2023 01:34:03 -0400 Subject: [PATCH 164/859] Roll Dart SDK from b8f006d88c07 to b3fd178ce59f (3 revisions) (#46087) https://dart.googlesource.com/sdk.git/+log/b8f006d88c07..b3fd178ce59f 2023-09-20 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-183.0.dev 2023-09-20 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-182.0.dev 2023-09-19 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-181.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jonahwilliams@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 14 +++++++------- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/DEPS b/DEPS index 5e780bea66a3f..0fa27256a9482 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': 'b8f006d88c07a17683c249a8601a552db6753298', + 'dart_revision': 'b3fd178ce59f4fecbdc852d2426b06fa70f12a50', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py @@ -67,16 +67,16 @@ vars = { 'dart_browser_launcher_rev': '1f69393d63a2f8d36d00b86cdd20df70c347af82', 'dart_clock_rev': '1e75f08d3428bcd6f4b7cf70e788f24fc9b661e1', 'dart_collection_rev': '91afde43f488eef618454b896301c6ff59af72e0', - 'dart_devtools_rev': '532dc39c7a2820a6dc759590e03a9c18fec915f8', + 'dart_devtools_rev': '2a1d1975d7ad8773a3e2590d10636432775f23a1', 'dart_libprotobuf_rev': '24487dd1045c7f3d64a21f38a3f0c06cc4cf2edb', 'dart_perfetto_rev': 'b8da07095979310818f0efde2ef3c69ea70d62c5', 'dart_protobuf_gn_rev': 'ca669f79945418f6229e4fef89b666b2a88cbb10', 'dart_protobuf_rev': 'c16bc891978a1764f0d6d8eca54f420242c78a6a', 'dart_pub_rev': 'be6868ba132c782d9835b1638a634ecb73428579', 'dart_root_certificates_rev': '692f6d6488af68e0121317a9c2c9eb393eb0ee50', - 'dart_tools_rev': '1512f3d1efde11ace801618822f63934961cc80d', + 'dart_tools_rev': '70d778d58d0fb5a5f9d52d288709f790f6e70be6', 'dart_watcher_rev': '1aed03e2a8005f45083fdb38cbd4b684cd23082f', - 'dart_webdev_rev': '501ccc287783db685240d0f47c1cc9df68a43ae4', + 'dart_webdev_rev': 'd7e0d1ff57d954ce4bb9e2201c87de092695701b', 'dart_webkit_inspection_protocol_rev': '82f0c1c46dfdba5edf7c5fa84456233121dd69e1', 'dart_yaml_edit_rev': '4a9734dda12f63ef9eee4121f87ff4401e25a607', 'dart_zlib_rev': '14dd4c4455602c9b71a1a89b5cafd1f4030d2e3f', @@ -336,7 +336,7 @@ deps = { Var('chromium_git') + '/external/github.com/WebAssembly/binaryen.git@cdb7aeab40b4c522de20b242019f7e88641445d5', 'src/third_party/dart/third_party/devtools': - {'dep_type': 'cipd', 'packages': [{'package': 'dart/third_party/flutter/devtools', 'version': 'git_revision:532dc39c7a2820a6dc759590e03a9c18fec915f8'}]}, + {'dep_type': 'cipd', 'packages': [{'package': 'dart/third_party/flutter/devtools', 'version': 'git_revision:2a1d1975d7ad8773a3e2590d10636432775f23a1'}]}, 'src/third_party/dart/third_party/pkg/args': Var('dart_git') + '/args.git@5a4e16f1e4c08b01498a9dce8aeda1a60161cd52', @@ -393,7 +393,7 @@ deps = { Var('dart_git') + '/html.git@a1b193e95f13c995e7f7200ce0d363de5952e383', 'src/third_party/dart/third_party/pkg/http': - Var('dart_git') + '/http.git@e19094aba55a0f245dfea3354289572c71e4e81d', + Var('dart_git') + '/http.git@decefa64234d87b1490001b8fbca6dd496d38da2', 'src/third_party/dart/third_party/pkg/http_multi_server': Var('dart_git') + '/http_multi_server.git@9d62ea396d7d282592edf994378f67fcde982ce8', @@ -426,7 +426,7 @@ deps = { Var('dart_git') + '/mockito.git@412c0beb51a12ed4a8833db7f542558ab92c0c65', 'src/third_party/dart/third_party/pkg/native': - Var('dart_git') + '/native.git@4f4d7c303291b341cf1052380139def3a145c90e', + Var('dart_git') + '/native.git@a5d88093017f5cecf30978a823fe6a8a2ebb8ca5', 'src/third_party/dart/third_party/pkg/package_config': Var('dart_git') + '/package_config.git@ae7ad83de97aba507fd05e97cc372bc6695c1759', diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index d29520b1b3e17..3cb3bb3eb0515 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: a466c9ba2fc46dcb8427b8aa0bcbb658 +Signature: 14a660e7ce6e94bb3dfbe0994a36032d ==================================================================================================== LIBRARY: dart From 800bedde962fea894ea074cf113b2562fed51be7 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 20 Sep 2023 02:31:34 -0400 Subject: [PATCH 165/859] Roll Skia from e9b9e9a4f541 to e3aa86332255 (1 revision) (#46088) https://skia.googlesource.com/skia.git/+log/e9b9e9a4f541..e3aa86332255 2023-09-20 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from 1b17251d0e2c to 918412e0912f (4 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 0fa27256a9482..a139a04d0490e 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'e9b9e9a4f541a677fd228c30b8728aa00d9262cc', + 'skia_revision': 'e3aa8633225506bd5bce5dff826c645e7216a851', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 3ed0ddbf1f0ac..23b8a6e6986a6 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 62a03a34ada555b5a18cd19517a5af93 +Signature: 1a0051b23611265eaab51ccc042ffd3f ==================================================================================================== LIBRARY: etc1 From 021bc7d5ca45df40ed58f64ccf9cf55a9155ac63 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 20 Sep 2023 03:12:22 -0400 Subject: [PATCH 166/859] Roll Skia from e3aa86332255 to 14e9b3c91c64 (1 revision) (#46089) https://skia.googlesource.com/skia.git/+log/e3aa86332255..14e9b3c91c64 2023-09-20 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from e1a78e7e85a9 to b8fa58ef74a9 (5 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index a139a04d0490e..f384af6234634 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'e3aa8633225506bd5bce5dff826c645e7216a851', + 'skia_revision': '14e9b3c91c644d74cff356cb36d11fd6ff9e5038', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From b3a9953a6ea1277271511d4ae9adaadc900944d0 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 20 Sep 2023 03:48:09 -0400 Subject: [PATCH 167/859] Roll Skia from 14e9b3c91c64 to 7d9d5ac84d8f (1 revision) (#46090) https://skia.googlesource.com/skia.git/+log/14e9b3c91c64..7d9d5ac84d8f 2023-09-20 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 7cb117e0b06c to e305459968f2 (8 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index f384af6234634..38d615ae187bb 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '14e9b3c91c644d74cff356cb36d11fd6ff9e5038', + 'skia_revision': '7d9d5ac84d8f6664bbcaaacfa04243ed4eccd614', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 7ee1a3d2617b5ab9a9868b9dfbef1af4ea13f3e6 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 20 Sep 2023 06:34:21 -0400 Subject: [PATCH 168/859] Roll Skia from 7d9d5ac84d8f to d7f2d1083979 (1 revision) (#46091) https://skia.googlesource.com/skia.git/+log/7d9d5ac84d8f..d7f2d1083979 2023-09-20 maryla@google.com Fix default values for gain map metadata. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 38d615ae187bb..fec2ba5c6e7c4 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '7d9d5ac84d8f6664bbcaaacfa04243ed4eccd614', + 'skia_revision': 'd7f2d108397955f83c75bed968068e7dfa255970', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 23b8a6e6986a6..dc5f8b4ccd3d7 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 1a0051b23611265eaab51ccc042ffd3f +Signature: 2d4b182938835878194a7840556a574a ==================================================================================================== LIBRARY: etc1 From d1d49a8b11efbfa698dd53370b2761dd0456a531 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 20 Sep 2023 09:24:24 -0400 Subject: [PATCH 169/859] Roll Dart SDK from b3fd178ce59f to ed05ca364d5e (1 revision) (#46092) https://dart.googlesource.com/sdk.git/+log/b3fd178ce59f..ed05ca364d5e 2023-09-20 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-184.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jonahwilliams@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index fec2ba5c6e7c4..4c965257cb835 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': 'b3fd178ce59f4fecbdc852d2426b06fa70f12a50', + 'dart_revision': 'ed05ca364d5eb9ae6e5078b293f887b05335fc51', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py From c191d0134b291ee525d8c2ddb5cdee6474cd3d36 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 20 Sep 2023 09:35:11 -0400 Subject: [PATCH 170/859] Roll Dart SDK from b3fd178ce59f to ed05ca364d5e (1 revision) (#46093) https://dart.googlesource.com/sdk.git/+log/b3fd178ce59f..ed05ca364d5e 2023-09-20 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-184.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jonahwilliams@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md From d86930bf0aca6d5205664370791c8ccd431220c4 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 20 Sep 2023 09:58:50 -0400 Subject: [PATCH 171/859] Roll Skia from d7f2d1083979 to fd317812bd27 (2 revisions) (#46094) https://skia.googlesource.com/skia.git/+log/d7f2d1083979..fd317812bd27 2023-09-20 weiyuhuang@google.com Expose 5 more paragraph methods from Canvaskit for Flutter. 2023-09-20 skia-autoroll@skia-public.iam.gserviceaccount.com Roll jsfiddle-base from bc9bc348e2da to 5b50d4261358 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 4c965257cb835..e92ad70f0b3e6 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'd7f2d108397955f83c75bed968068e7dfa255970', + 'skia_revision': 'fd317812bd27da05c3b7f50dd5fbcdcf2fd488e6', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index dc5f8b4ccd3d7..688ce25dbcd0a 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 2d4b182938835878194a7840556a574a +Signature: 75e2d4355af8eede9cb5aa87ec7490d6 ==================================================================================================== LIBRARY: etc1 From 192cbffa82ed58e82d4f4fe9aa9bdd64d9482ab9 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 20 Sep 2023 10:42:02 -0400 Subject: [PATCH 172/859] Roll Skia from fd317812bd27 to 56ce5bb201c6 (4 revisions) (#46096) https://skia.googlesource.com/skia.git/+log/fd317812bd27..56ce5bb201c6 2023-09-20 drott@chromium.org [Fontations] Test path equivalence for a set of test fonts and strings 2023-09-20 johnstiles@google.com Migrate NVIDIA test disables into SkSLTest.cpp. 2023-09-20 brianosman@google.com [graphite] Adjust the working context inside working format color filter 2023-09-20 robertphillips@google.com [graphite] Add a PaintOption class to the precompilation system If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index e92ad70f0b3e6..af06ee1227058 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'fd317812bd27da05c3b7f50dd5fbcdcf2fd488e6', + 'skia_revision': '56ce5bb201c697296b2fb68156da92ae182a1cb6', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 688ce25dbcd0a..1340a3de19c80 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 75e2d4355af8eede9cb5aa87ec7490d6 +Signature: 8ce2b368698cb8ef1488f85d86dbeb8e ==================================================================================================== LIBRARY: etc1 From cf48affe0900bde62ae7ec551dfaef74eadf780f Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 20 Sep 2023 11:27:00 -0400 Subject: [PATCH 173/859] Roll Skia from 56ce5bb201c6 to f54c214a739b (4 revisions) (#46098) https://skia.googlesource.com/skia.git/+log/56ce5bb201c6..f54c214a739b 2023-09-20 michaelludwig@google.com [skif] Use optionals to track unbounded input/output bounds 2023-09-20 robertphillips@google.com [graphite] Use Compose helper to implement dithering 2023-09-20 kjlubick@google.com Revert "[Fontations] Test path equivalence for a set of test fonts and strings" 2023-09-20 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll Dawn from bc9a66c04290 to 881dc3bb55fd (7 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index af06ee1227058..0067ebc3135a4 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '56ce5bb201c697296b2fb68156da92ae182a1cb6', + 'skia_revision': 'f54c214a739beab676e692b57c7926e807ec15bf', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 1340a3de19c80..cedc88fcdc1a5 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 8ce2b368698cb8ef1488f85d86dbeb8e +Signature: 2607e1b5f6ab6d213cfbf83a61a4a4ea ==================================================================================================== LIBRARY: etc1 From 3e3a2ccf3c87277bc2e1f0d4e09b75d5e3ff75c8 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 20 Sep 2023 11:29:05 -0400 Subject: [PATCH 174/859] Roll Fuchsia Mac SDK from kGkqpvcPI1TGmR4Sc... to zuOP7YCHHocXuZJcD... (#46097) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jonahwilliams@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 0067ebc3135a4..b1ecb03a07dca 100644 --- a/DEPS +++ b/DEPS @@ -914,7 +914,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'kGkqpvcPI1TGmR4Scp19EXK5hxyrDBhn2-hp4U8E6skC' + 'version': 'zuOP7YCHHocXuZJcDIxnlpB-rNuuZrNvIw4FuTNHV5gC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 5fc08fb708221282efa81ab3b4d0599a21db00cc Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 20 Sep 2023 12:00:58 -0400 Subject: [PATCH 175/859] Roll Skia from f54c214a739b to 9bc5eeb93a1e (2 revisions) (#46099) https://skia.googlesource.com/skia.git/+log/f54c214a739b..9bc5eeb93a1e 2023-09-20 johnstiles@google.com Migrate Apple test disables into SkSLTest.cpp. 2023-09-20 johnstiles@google.com Migrate Intel test disables into SkSLTest.cpp. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index b1ecb03a07dca..0d4e924158508 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'f54c214a739beab676e692b57c7926e807ec15bf', + 'skia_revision': '9bc5eeb93a1e0ae4d62c1cd4efd883b78c96ad11', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 775ead26132efcb8251af0f61a29f83c4d75d8e4 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Wed, 20 Sep 2023 09:18:21 -0700 Subject: [PATCH 176/859] [ios] Reland "[ios] use python script to generate extension safe frameworks and code sign them" #46004" (#46014) Relands https://github.com/flutter/engine/pull/45781 The Flutter.framework and the sim folders are mistakenly added to the artifact, this PR removed those files along with re-landing the original changes https://github.com/flutter/flutter/pull/134966 should pass with this change. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- ci/builders/mac_ios_engine.json | 66 +------------------------- sky/tools/create_full_ios_framework.py | 50 ++++++++++++++++++- 2 files changed, 51 insertions(+), 65 deletions(-) diff --git a/ci/builders/mac_ios_engine.json b/ci/builders/mac_ios_engine.json index a8a4bb926462e..600f495929b0c 100644 --- a/ci/builders/mac_ios_engine.json +++ b/ci/builders/mac_ios_engine.json @@ -289,53 +289,6 @@ "script": "flutter/sky/tools/create_full_ios_framework.py", "language": "python3" }, - { - "name": "Debug-ios-Flutter-Extension-Safe.xcframework", - "parameters": [ - "--dst", - "out/debug_extension_safe", - "--arm64-out-dir", - "out/ios_debug_extension_safe", - "--simulator-x64-out-dir", - "out/ios_debug_sim_extension_safe", - "--simulator-arm64-out-dir", - "out/ios_debug_sim_arm64_extension_safe" - ], - "script": "flutter/sky/tools/create_full_ios_framework.py", - "language": "python3" - }, - { - "name": "Profile-ios-Flutter-Extension-Safe.xcframework", - "parameters": [ - "--dst", - "out/profile_extension_safe", - "--arm64-out-dir", - "out/ios_profile_extension_safe", - "--simulator-x64-out-dir", - "out/ios_debug_sim_extension_safe", - "--simulator-arm64-out-dir", - "out/ios_debug_sim_arm64_extension_safe" - ], - "script": "flutter/sky/tools/create_full_ios_framework.py", - "language": "python3" - }, - { - "name": "Release-ios-Flutter-Extension-Safe.xcframework", - "parameters": [ - "--dst", - "out/release_extension_safe", - "--arm64-out-dir", - "out/ios_release_extension_safe", - "--simulator-x64-out-dir", - "out/ios_debug_sim_extension_safe", - "--simulator-arm64-out-dir", - "out/ios_debug_sim_arm64_extension_safe", - "--dsym", - "--strip" - ], - "script": "flutter/sky/tools/create_full_ios_framework.py", - "language": "python3" - }, { "name": "Release-macos-gen-snapshots", "parameters": [ @@ -379,23 +332,8 @@ "realm": "production" }, { - "source": "out/debug_extension_safe/artifacts.zip", - "destination": "ios-extension-safe/artifacts.zip", - "realm": "production" - }, - { - "source": "out/profile_extension_safe/artifacts.zip", - "destination": "ios-profile-extension-safe/artifacts.zip", - "realm": "production" - }, - { - "source": "out/release_extension_safe/artifacts.zip", - "destination": "ios-release-extension-safe/artifacts.zip", - "realm": "production" - }, - { - "source": "out/release_extension_safe/Flutter.dSYM.zip", - "destination": "ios-release-extension-safe/Flutter.dSYM.zip", + "source": "out/release/extension_safe_Flutter.dSYM.zip", + "destination": "ios-release/extension_safe_Flutter.dSYM.zip", "realm": "production" } ] diff --git a/sky/tools/create_full_ios_framework.py b/sky/tools/create_full_ios_framework.py index 5858ddefb7b12..9aac99671348f 100644 --- a/sky/tools/create_full_ios_framework.py +++ b/sky/tools/create_full_ios_framework.py @@ -106,10 +106,49 @@ def main(): args, dst, framework, arm64_framework, simulator_framework, simulator_x64_framework, simulator_arm64_framework ) + + extension_safe_dst = os.path.join(dst, 'extension_safe') + create_extension_safe_framework( + args, extension_safe_dst, '%s_extension_safe' % arm64_out_dir, + '%s_extension_safe' % simulator_x64_out_dir, + '%s_extension_safe' % simulator_arm64_out_dir + ) + generate_gen_snapshot(args, dst, x64_out_dir, arm64_out_dir) zip_archive(dst) return 0 +def create_extension_safe_framework( # pylint: disable=too-many-arguments + args, dst, arm64_out_dir, simulator_x64_out_dir, simulator_arm64_out_dir +): + framework = os.path.join(dst, 'Flutter.framework') + simulator_framework = os.path.join(dst, 'sim', 'Flutter.framework') + arm64_framework = os.path.join(arm64_out_dir, 'Flutter.framework') + simulator_x64_framework = os.path.join( + simulator_x64_out_dir, 'Flutter.framework' + ) + simulator_arm64_framework = os.path.join( + simulator_arm64_out_dir, 'Flutter.framework' + ) + + if not os.path.isdir(arm64_framework): + print( + 'Cannot find extension safe iOS arm64 Framework at %s' % arm64_framework + ) + return 1 + + if not os.path.isdir(simulator_x64_framework): + print( + 'Cannot find extension safe iOS x64 simulator Framework at %s' % + simulator_x64_framework + ) + return 1 + + create_framework( + args, dst, framework, arm64_framework, simulator_framework, + simulator_x64_framework, simulator_arm64_framework + ) + return 0 def create_framework( # pylint: disable=too-many-arguments args, dst, framework, arm64_framework, simulator_framework, @@ -173,7 +212,9 @@ def zip_archive(dst): ios_file_with_entitlements = ['gen_snapshot_arm64'] ios_file_without_entitlements = [ 'Flutter.xcframework/ios-arm64/Flutter.framework/Flutter', - 'Flutter.xcframework/ios-arm64_x86_64-simulator/Flutter.framework/Flutter' + 'Flutter.xcframework/ios-arm64_x86_64-simulator/Flutter.framework/Flutter', + 'extension_safe/Flutter.xcframework/ios-arm64/Flutter.framework/Flutter', + 'extension_safe/Flutter.xcframework/ios-arm64_x86_64-simulator/Flutter.framework/Flutter' ] embed_codesign_configuration( os.path.join(dst, 'entitlements.txt'), ios_file_with_entitlements @@ -192,12 +233,19 @@ def zip_archive(dst): 'Flutter.xcframework', 'entitlements.txt', 'without_entitlements.txt', + 'extension_safe/Flutter.xcframework', ], cwd=dst) if os.path.exists(os.path.join(dst, 'Flutter.dSYM')): subprocess.check_call(['zip', '-r', 'Flutter.dSYM.zip', 'Flutter.dSYM'], cwd=dst) + if os.path.exists(os.path.join(dst, 'extension_safe', 'Flutter.dSYM')): + subprocess.check_call([ + 'zip', '-r', 'extension_safe_Flutter.dSYM.zip', 'Flutter.dSYM' + ], + cwd=dst) + def process_framework(args, dst, framework, framework_binary): if args.dsym: From 10128782d58375c0ea3f8b655d6a0f3bdae4cd1d Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 20 Sep 2023 13:07:04 -0400 Subject: [PATCH 177/859] Roll Skia from 9bc5eeb93a1e to 565d95f72f2e (1 revision) (#46100) https://skia.googlesource.com/skia.git/+log/9bc5eeb93a1e..565d95f72f2e 2023-09-20 johnstiles@google.com Migrate remaining test disables into SkSLTest.cpp. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 0d4e924158508..75b784abb45bb 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '9bc5eeb93a1e0ae4d62c1cd4efd883b78c96ad11', + 'skia_revision': '565d95f72f2e2eadb756692f74b8e3939cd1624b', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 4ed3042e02d8c555df1aaf41d512df197916dd8c Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 20 Sep 2023 13:11:04 -0400 Subject: [PATCH 178/859] Roll Fuchsia Linux SDK from aHtib4LBcLwx7JwK-... to QcxgV9KlY7j3o3b4j... (#46102) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jonahwilliams@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 75b784abb45bb..9d6d6abbb9e15 100644 --- a/DEPS +++ b/DEPS @@ -924,7 +924,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'aHtib4LBcLwx7JwK-pLiQPleFerXUt7If4yJSTh4tUcC' + 'version': 'QcxgV9KlY7j3o3b4jzhzTH7yw1xDUfdSnU0UXLuoQEYC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index b4c704177ec73..1300c08186374 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: f16d65317d75c8c97f9ad5c10e688e5a +Signature: 93ce10008733c672adb8288d199c6631 ==================================================================================================== LIBRARY: fuchsia_sdk From 21ac99802002cd56d2229414209542c74a7f5583 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 20 Sep 2023 13:34:18 -0400 Subject: [PATCH 179/859] Roll Dart SDK from ed05ca364d5e to d5d05146868a (1 revision) (#46104) https://dart.googlesource.com/sdk.git/+log/ed05ca364d5e..d5d05146868a 2023-09-20 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-185.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jonahwilliams@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 9d6d6abbb9e15..924dc0edb3234 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': 'ed05ca364d5eb9ae6e5078b293f887b05335fc51', + 'dart_revision': 'd5d05146868a5489e8dfc6f049536277dc437a20', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index 3cb3bb3eb0515..609e78a149fc9 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: 14a660e7ce6e94bb3dfbe0994a36032d +Signature: 312266be9d532450c78136442943ffb7 ==================================================================================================== LIBRARY: dart From 6a4a2a1434f930c6f3fd567db8de314c8b2eb801 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 20 Sep 2023 13:53:22 -0400 Subject: [PATCH 180/859] Roll Skia from 565d95f72f2e to f4238844089f (3 revisions) (#46105) https://skia.googlesource.com/skia.git/+log/565d95f72f2e..f4238844089f 2023-09-20 johnstiles@google.com Fix capitalization of ANGLE. 2023-09-20 brianosman@google.com Add GM to test working-color-space color filter 2023-09-20 johnstiles@google.com Remove IncompleteShortIntPrecision workaround flag. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 924dc0edb3234..b13280be39edf 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '565d95f72f2e2eadb756692f74b8e3939cd1624b', + 'skia_revision': 'f4238844089f45e8b157dd4c2e7fe906b6da9b05', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index cedc88fcdc1a5..dae3e08093879 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 2607e1b5f6ab6d213cfbf83a61a4a4ea +Signature: 90d914ccf1ba25802ab5d90c21713c0e ==================================================================================================== LIBRARY: etc1 @@ -8779,6 +8779,7 @@ ORIGIN: ../../../third_party/skia/gm/surface_manager/GaneshVulkanSurfaceManager. ORIGIN: ../../../third_party/skia/gm/surface_manager/RasterSurfaceManager.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/surface_manager/SurfaceManager.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/vias/SimpleVias.cpp + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/gm/workingspace.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/android/SkCanvasAndroid.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/android/SkHeifDecoder.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/android/SkImageAndroid.h + ../../../third_party/skia/LICENSE @@ -9037,6 +9038,7 @@ FILE: ../../../third_party/skia/gm/surface_manager/GaneshVulkanSurfaceManager.cp FILE: ../../../third_party/skia/gm/surface_manager/RasterSurfaceManager.cpp FILE: ../../../third_party/skia/gm/surface_manager/SurfaceManager.cpp FILE: ../../../third_party/skia/gm/vias/SimpleVias.cpp +FILE: ../../../third_party/skia/gm/workingspace.cpp FILE: ../../../third_party/skia/include/android/SkCanvasAndroid.h FILE: ../../../third_party/skia/include/android/SkHeifDecoder.h FILE: ../../../third_party/skia/include/android/SkImageAndroid.h From fa1c5281c6ab6903ca60c6311be023790ecee7bc Mon Sep 17 00:00:00 2001 From: Mouad Debbar Date: Wed, 20 Sep 2023 14:28:53 -0400 Subject: [PATCH 181/859] [web] Make `PlatformViewManager` a clear singleton (#46044) Make it clear that `PlatformViewManager` is a singleton and follow the patterns that we use for other singleton classes. Part of https://github.com/flutter/flutter/issues/134443 --- .../src/engine/canvaskit/embedded_views.dart | 17 +++++++++-------- lib/web_ui/lib/src/engine/initialization.dart | 5 ----- .../lib/src/engine/platform_dispatcher.dart | 2 +- .../engine/platform_views/content_manager.dart | 7 ++++++- .../src/ui_web/platform_view_registry.dart | 4 ++-- .../test/canvaskit/embedded_views_test.dart | 4 ++-- lib/web_ui/test/ui/platform_view_test.dart | 2 +- 7 files changed, 21 insertions(+), 20 deletions(-) diff --git a/lib/web_ui/lib/src/engine/canvaskit/embedded_views.dart b/lib/web_ui/lib/src/engine/canvaskit/embedded_views.dart index 06c6f5aa6a3fa..57ff2ed6836ae 100644 --- a/lib/web_ui/lib/src/engine/canvaskit/embedded_views.dart +++ b/lib/web_ui/lib/src/engine/canvaskit/embedded_views.dart @@ -4,7 +4,8 @@ import 'package:ui/ui.dart' as ui; -import '../../engine.dart' show platformViewManager; +import '../../engine.dart' show PlatformViewManager; +import '../configuration.dart'; import '../dom.dart'; import '../html/path_to_svg_clip.dart'; import '../platform_views/slots.dart'; @@ -94,7 +95,7 @@ class HtmlViewEmbedder { void prerollCompositeEmbeddedView(int viewId, EmbeddedViewParams params) { // We need an overlay for each visible platform view. Invisible platform // views will be grouped with (at most) one visible platform view later. - final bool needNewOverlay = platformViewManager.isVisible(viewId); + final bool needNewOverlay = PlatformViewManager.instance.isVisible(viewId); if (needNewOverlay) { final CkPictureRecorder pictureRecorder = CkPictureRecorder(); pictureRecorder.beginRecording(ui.Offset.zero & _frameSize); @@ -122,11 +123,11 @@ class HtmlViewEmbedder { final int overlayIndex = _context.visibleViewCount; _compositionOrder.add(viewId); // Keep track of the number of visible platform views. - if (platformViewManager.isVisible(viewId)) { + if (PlatformViewManager.instance.isVisible(viewId)) { _context.visibleViewCount++; } // We need a new overlay if this is a visible view. - final bool needNewOverlay = platformViewManager.isVisible(viewId); + final bool needNewOverlay = PlatformViewManager.instance.isVisible(viewId); CkPictureRecorder? recorderToUseForRendering; if (needNewOverlay) { if (overlayIndex < _context.pictureRecordersCreatedDuringPreroll.length) { @@ -426,7 +427,7 @@ class HtmlViewEmbedder { for (final int viewId in diffResult.viewsToAdd) { bool isViewInvalid = false; assert(() { - isViewInvalid = !platformViewManager.knowsViewId(viewId); + isViewInvalid = !PlatformViewManager.instance.knowsViewId(viewId); if (isViewInvalid) { debugInvalidViewIds ??= []; debugInvalidViewIds!.add(viewId); @@ -479,7 +480,7 @@ class HtmlViewEmbedder { bool isViewInvalid = false; assert(() { - isViewInvalid = !platformViewManager.knowsViewId(viewId); + isViewInvalid = !PlatformViewManager.instance.knowsViewId(viewId); if (isViewInvalid) { debugInvalidViewIds ??= []; debugInvalidViewIds!.add(viewId); @@ -604,7 +605,7 @@ class HtmlViewEmbedder { for (int i = 0; i < views.length; i++) { final int view = views[i]; - if (platformViewManager.isInvisible(view)) { + if (PlatformViewManager.instance.isInvisible(view)) { // We add as many invisible views as we find to the current group. currentGroup.add(view); } else { @@ -661,7 +662,7 @@ class HtmlViewEmbedder { /// Clears the state of this view embedder. Used in tests. void debugClear() { - final Set allViews = platformViewManager.debugClear(); + final Set allViews = PlatformViewManager.instance.debugClear(); disposeViews(allViews); _context = EmbedderFrameContext(); _currentCompositionParams.clear(); diff --git a/lib/web_ui/lib/src/engine/initialization.dart b/lib/web_ui/lib/src/engine/initialization.dart index ed537132c98ca..11bdf0879fd2a 100644 --- a/lib/web_ui/lib/src/engine/initialization.dart +++ b/lib/web_ui/lib/src/engine/initialization.dart @@ -270,8 +270,3 @@ set debugDisableFontFallbacks(bool value) { _debugDisableFontFallbacks = value; } bool _debugDisableFontFallbacks = false; - -/// The shared instance of PlatformViewManager shared across the engine to handle -/// rendering of PlatformViews into the web app. -// TODO(dit): How to make this overridable from tests? -final PlatformViewManager platformViewManager = PlatformViewManager(); diff --git a/lib/web_ui/lib/src/engine/platform_dispatcher.dart b/lib/web_ui/lib/src/engine/platform_dispatcher.dart index e2ddae4ff0e0a..b769918996cc7 100644 --- a/lib/web_ui/lib/src/engine/platform_dispatcher.dart +++ b/lib/web_ui/lib/src/engine/platform_dispatcher.dart @@ -596,7 +596,7 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher { case 'flutter/platform_views': _platformViewMessageHandler ??= PlatformViewMessageHandler( - contentManager: platformViewManager, + contentManager: PlatformViewManager.instance, contentHandler: (DomElement content) { flutterViewEmbedder.glassPaneElement.append(content); }, diff --git a/lib/web_ui/lib/src/engine/platform_views/content_manager.dart b/lib/web_ui/lib/src/engine/platform_views/content_manager.dart index 73d951596a65d..a9ed363417caf 100644 --- a/lib/web_ui/lib/src/engine/platform_views/content_manager.dart +++ b/lib/web_ui/lib/src/engine/platform_views/content_manager.dart @@ -38,6 +38,11 @@ class PlatformViewManager { ); } + /// The shared instance of PlatformViewManager shared across the engine to handle + /// rendering of PlatformViews into the web app. + // TODO(dit): How to make this overridable from tests? + static final PlatformViewManager instance = PlatformViewManager(); + // The factory functions, indexed by the viewType final Map _factories = {}; @@ -49,7 +54,7 @@ class PlatformViewManager { /// Returns `true` if the passed in `viewType` has been registered before. /// - /// See [registerViewFactory] to understand how factories are registered. + /// See [registerFactory] to understand how factories are registered. bool knowsViewType(String viewType) { return _factories.containsKey(viewType); } diff --git a/lib/web_ui/lib/ui_web/src/ui_web/platform_view_registry.dart b/lib/web_ui/lib/ui_web/src/ui_web/platform_view_registry.dart index e33e8ebc53199..fc17cfb1ee3d3 100644 --- a/lib/web_ui/lib/ui_web/src/ui_web/platform_view_registry.dart +++ b/lib/web_ui/lib/ui_web/src/ui_web/platform_view_registry.dart @@ -42,7 +42,7 @@ class PlatformViewRegistry { Function viewFactory, { bool isVisible = true, }) { - return platformViewManager.registerFactory( + return PlatformViewManager.instance.registerFactory( viewType, viewFactory, isVisible: isVisible, @@ -53,6 +53,6 @@ class PlatformViewRegistry { /// /// Throws if no view has been created for [viewId]. Object getViewById(int viewId) { - return platformViewManager.getViewById(viewId); + return PlatformViewManager.instance.getViewById(viewId); } } diff --git a/lib/web_ui/test/canvaskit/embedded_views_test.dart b/lib/web_ui/test/canvaskit/embedded_views_test.dart index 49db4e0dddc63..40b5060fb5f53 100644 --- a/lib/web_ui/test/canvaskit/embedded_views_test.dart +++ b/lib/web_ui/test/canvaskit/embedded_views_test.dart @@ -797,8 +797,8 @@ void testMain() { await createPlatformView(5, 'test-invisible-view'); await createPlatformView(6, 'test-invisible-view'); - expect(platformViewManager.isInvisible(0), isFalse); - expect(platformViewManager.isInvisible(1), isTrue); + expect(PlatformViewManager.instance.isInvisible(0), isFalse); + expect(PlatformViewManager.instance.isInvisible(1), isTrue); LayerSceneBuilder sb = LayerSceneBuilder(); sb.pushOffset(0, 0); diff --git a/lib/web_ui/test/ui/platform_view_test.dart b/lib/web_ui/test/ui/platform_view_test.dart index 7c934caf6087b..be7f643186e60 100644 --- a/lib/web_ui/test/ui/platform_view_test.dart +++ b/lib/web_ui/test/ui/platform_view_test.dart @@ -38,7 +38,7 @@ Future testMain() async { }); tearDown(() { - platformViewManager.debugClear(); + PlatformViewManager.instance.debugClear(); }); test('picture + overlapping platformView', () async { From 8fc5e54116eb6c6faa9cf1d9d259a2792a85a075 Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Wed, 20 Sep 2023 11:29:10 -0700 Subject: [PATCH 182/859] Delete `ci/lint.sh`, which is no longer used. (#46049) Found out while working on https://github.com/flutter/flutter/issues/134969. I suspect this stopped being used when we sharded out the Clang Tidy builders? --- .clang-tidy | 2 -- ci/builders/README.md | 10 +++++----- ci/clang_tidy.sh | 6 +++++- ci/lint.sh | 35 ----------------------------------- tools/githooks/README.md | 4 ++-- 5 files changed, 12 insertions(+), 45 deletions(-) delete mode 100755 ci/lint.sh diff --git a/.clang-tidy b/.clang-tidy index f6ee71473d917..b65d8f4336e1c 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,8 +1,6 @@ # A YAML format of https://clang.llvm.org/extra/clang-tidy/. # Prefix check with "-" to ignore. -# Note: Some of the checks here are used as errors selectively, see -# //ci/lint.sh Checks: >- bugprone-use-after-move, bugprone-unchecked-optional-access, diff --git a/ci/builders/README.md b/ci/builders/README.md index ba662166c9f9e..2bccb7522cf00 100644 --- a/ci/builders/README.md +++ b/ci/builders/README.md @@ -464,7 +464,7 @@ Engine test example: { "tests": [ { - "name": "test: lint android_debug_arm64", + "name": "test: clang_tidy android_debug_arm64", "recipe": "engine_v2/tester_engine", "drone_dimensions": [ "device_type=none", @@ -476,7 +476,7 @@ Engine test example: ], "tasks": [ { - "name": "test: lint android_debug_arm64", + "name": "test: clang_tidy android_debug_arm64", "parameters": [ "--variant", "android_debug_arm64", @@ -485,7 +485,7 @@ Engine test example: "--shard-variants=host_debug" ], "max_attempts": 1, - "script": "flutter/ci/lint.sh" + "script": "flutter/ci/clang_tidy.sh" } ] } @@ -513,7 +513,7 @@ Example task configuration: ```json { - "name": "test: lint android_debug_arm64", + "name": "test: clang_tidy android_debug_arm64", "parameters": [ "--variant", "android_debug_arm64", @@ -522,7 +522,7 @@ Example task configuration: "--shard-variants=host_debug" ], "max_attempts": 1, - "script": "flutter/ci/lint.sh" + "script": "flutter/ci/clang_tidy.sh" } ``` diff --git a/ci/clang_tidy.sh b/ci/clang_tidy.sh index cacaebb62630a..80cb7030fbd55 100755 --- a/ci/clang_tidy.sh +++ b/ci/clang_tidy.sh @@ -36,10 +36,14 @@ DART="${DART_BIN}/dart" # FLUTTER_LINT_PRINT_FIX will make it so that fix is executed and the generated # diff is printed to stdout if clang-tidy fails. This is helpful for enabling # new lints. + +# To run on CI, just uncomment the following line: +# FLUTTER_LINT_PRINT_FIX=1 + if [[ -z "${FLUTTER_LINT_PRINT_FIX}" ]]; then fix_flag="" else - fix_flag="--fix" + fix_flag="--fix --lint-all" fi COMPILE_COMMANDS="$SRC_DIR/out/host_debug/compile_commands.json" diff --git a/ci/lint.sh b/ci/lint.sh deleted file mode 100755 index e7625fd7fdca1..0000000000000 --- a/ci/lint.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -# -# Copyright 2013 The Flutter Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -set -e - -# Needed because if it is set, cd may print the path it changed to. -unset CDPATH - -# On Mac OS, readlink -f doesn't work, so follow_links traverses the path one -# link at a time, and then cds into the link destination and find out where it -# ends up. -# -# The function is enclosed in a subshell to avoid changing the working directory -# of the caller. -function follow_links() ( - cd -P "$(dirname -- "$1")" - file="$PWD/$(basename -- "$1")" - while [[ -h "$file" ]]; do - cd -P "$(dirname -- "$file")" - file="$(readlink -- "$file")" - cd -P "$(dirname -- "$file")" - file="$PWD/$(basename -- "$file")" - done - echo "$file" -) - -SCRIPT_DIR=$(follow_links "$(dirname -- "${BASH_SOURCE[0]}")") -PYLINT="${SCRIPT_DIR}/pylint.sh" -CLANG_TIDY="${SCRIPT_DIR}/clang_tidy.sh" - -"${PYLINT}" "$@" -"${CLANG_TIDY}" "$@" diff --git a/tools/githooks/README.md b/tools/githooks/README.md index 1ac57c8ca3326..ce0ab06a24216 100644 --- a/tools/githooks/README.md +++ b/tools/githooks/README.md @@ -21,8 +21,8 @@ scripts have the names that `git` will look for. This hooks runs when pushing commits to a remote branch, for example to create or update a pull request: `git push origin my-local-branch`. -The `pre-push` hook runs `ci/lint.sh` and `ci/format.sh`. `ci/analyze.sh` and -`ci/licenses.sh` are more expensive and are not run. +The `pre-push` hook runs `ci/clang_tidy.sh`, `ci/pylint.sh` and `ci/format.sh`. +`ci/analyze.sh` and `ci/licenses.sh` are more expensive and are not run. ### Adding new pre-push checks From 1bd05c144cb942795add2e6a905349e31e317a4d Mon Sep 17 00:00:00 2001 From: Mouad Debbar Date: Wed, 20 Sep 2023 14:35:03 -0400 Subject: [PATCH 183/859] [web] Move context menu handling to its own class (#46042) Remove all `contextmenu` responsibilities out of `FlutterViewEmbedder`/`EmbeddingStrategy`, and into its own `ContextMenu` class that's instantiated and managed by the view. There's one major difference that this PR brings: the `contextmenu` event listener is now attached to the `` element instead of `window`. Since the entire app is contained within ``, I expect no issues with this change. Part of https://github.com/flutter/flutter/issues/134443 --- ci/licenses_golden/licenses_flutter | 4 + lib/web_ui/lib/src/engine.dart | 2 + lib/web_ui/lib/src/engine/embedder.dart | 14 --- .../lib/src/engine/mouse/context_menu.dart | 42 +++++++ .../lib/src/engine/mouse/prevent_default.dart | 10 ++ .../lib/src/engine/platform_dispatcher.dart | 4 +- .../src/engine/text_editing/text_editing.dart | 5 +- .../custom_element_embedding_strategy.dart | 6 - .../embedding_strategy.dart | 70 +----------- .../full_page_embedding_strategy.dart | 6 - lib/web_ui/lib/src/engine/window.dart | 5 + .../test/engine/mouse/context_menu_test.dart | 104 ++++++++++++++++++ ...ustom_element_embedding_strategy_test.dart | 56 ---------- .../full_page_embedding_strategy_test.dart | 52 --------- 14 files changed, 172 insertions(+), 208 deletions(-) create mode 100644 lib/web_ui/lib/src/engine/mouse/context_menu.dart create mode 100644 lib/web_ui/lib/src/engine/mouse/prevent_default.dart create mode 100644 lib/web_ui/test/engine/mouse/context_menu_test.dart diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index 99c9fcec20537..578a160f57053 100644 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -2043,7 +2043,9 @@ ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/js_interop/js_typed_data.dart ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/key_map.g.dart + ../../../flutter/LICENSE ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/keyboard_binding.dart + ../../../flutter/LICENSE ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/layers.dart + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/mouse/context_menu.dart + ../../../flutter/LICENSE ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/mouse/cursor.dart + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/mouse/prevent_default.dart + ../../../flutter/LICENSE ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/navigation/history.dart + ../../../flutter/LICENSE ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/noto_font.dart + ../../../flutter/LICENSE ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/noto_font_encoding.dart + ../../../flutter/LICENSE @@ -4797,7 +4799,9 @@ FILE: ../../../flutter/lib/web_ui/lib/src/engine/js_interop/js_typed_data.dart FILE: ../../../flutter/lib/web_ui/lib/src/engine/key_map.g.dart FILE: ../../../flutter/lib/web_ui/lib/src/engine/keyboard_binding.dart FILE: ../../../flutter/lib/web_ui/lib/src/engine/layers.dart +FILE: ../../../flutter/lib/web_ui/lib/src/engine/mouse/context_menu.dart FILE: ../../../flutter/lib/web_ui/lib/src/engine/mouse/cursor.dart +FILE: ../../../flutter/lib/web_ui/lib/src/engine/mouse/prevent_default.dart FILE: ../../../flutter/lib/web_ui/lib/src/engine/navigation/history.dart FILE: ../../../flutter/lib/web_ui/lib/src/engine/noto_font.dart FILE: ../../../flutter/lib/web_ui/lib/src/engine/noto_font_encoding.dart diff --git a/lib/web_ui/lib/src/engine.dart b/lib/web_ui/lib/src/engine.dart index c6ff0ea568e24..24ea306090661 100644 --- a/lib/web_ui/lib/src/engine.dart +++ b/lib/web_ui/lib/src/engine.dart @@ -112,7 +112,9 @@ export 'engine/js_interop/js_typed_data.dart'; export 'engine/key_map.g.dart'; export 'engine/keyboard_binding.dart'; export 'engine/layers.dart'; +export 'engine/mouse/context_menu.dart'; export 'engine/mouse/cursor.dart'; +export 'engine/mouse/prevent_default.dart'; export 'engine/navigation/history.dart'; export 'engine/noto_font.dart'; export 'engine/noto_font_encoding.dart'; diff --git a/lib/web_ui/lib/src/engine/embedder.dart b/lib/web_ui/lib/src/engine/embedder.dart index aced6b1ba0c84..7f362eee1f455 100644 --- a/lib/web_ui/lib/src/engine/embedder.dart +++ b/lib/web_ui/lib/src/engine/embedder.dart @@ -318,20 +318,6 @@ class FlutterViewEmbedder { assert(element.parentNode == _resourcesHost); element.remove(); } - - /// Disables the browser's context menu for this part of the DOM. - /// - /// By default, when a Flutter web app starts, the context menu is enabled. - /// - /// Can be re-enabled by calling [enableContextMenu]. - void disableContextMenu() => _embeddingStrategy.disableContextMenu(); - - /// Enables the browser's context menu for this part of the DOM. - /// - /// By default, when a Flutter web app starts, the context menu is already - /// enabled. Typically, this method would be used after calling - /// [disableContextMenu] to first disable it. - void enableContextMenu() => _embeddingStrategy.enableContextMenu(); } /// The embedder singleton. diff --git a/lib/web_ui/lib/src/engine/mouse/context_menu.dart b/lib/web_ui/lib/src/engine/mouse/context_menu.dart new file mode 100644 index 0000000000000..b34e3d64abe72 --- /dev/null +++ b/lib/web_ui/lib/src/engine/mouse/context_menu.dart @@ -0,0 +1,42 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import '../dom.dart'; +import 'prevent_default.dart'; + +/// Controls the browser's context menu in the given [element]. +class ContextMenu { + ContextMenu(this.element); + + final DomElement element; + + /// False when the context menu has been disabled, otherwise true. + bool _enabled = true; + + /// Disables the browser's context menu for this [element]. + /// + /// By default, when a Flutter web app starts, the context menu is enabled. + /// + /// Can be re-enabled by calling [enable]. + void disable() { + if (!_enabled) { + return; + } + _enabled = false; + element.addEventListener('contextmenu', preventDefaultListener); + } + + /// Enables the browser's context menu for this [element]. + /// + /// By default, when a Flutter web app starts, the context menu is already + /// enabled. Typically, this method would be used after calling + /// [disable] to first disable it. + void enable() { + if (_enabled) { + return; + } + _enabled = true; + element.removeEventListener('contextmenu', preventDefaultListener); + } +} diff --git a/lib/web_ui/lib/src/engine/mouse/prevent_default.dart b/lib/web_ui/lib/src/engine/mouse/prevent_default.dart new file mode 100644 index 0000000000000..2371deae14001 --- /dev/null +++ b/lib/web_ui/lib/src/engine/mouse/prevent_default.dart @@ -0,0 +1,10 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import '../dom.dart'; + +/// Listener for DOM events that prevents the default browser behavior. +final DomEventListener preventDefaultListener = createDomEventListener((DomEvent event) { + event.preventDefault(); +}); diff --git a/lib/web_ui/lib/src/engine/platform_dispatcher.dart b/lib/web_ui/lib/src/engine/platform_dispatcher.dart index b769918996cc7..eb400956eec5d 100644 --- a/lib/web_ui/lib/src/engine/platform_dispatcher.dart +++ b/lib/web_ui/lib/src/engine/platform_dispatcher.dart @@ -566,11 +566,11 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher { final MethodCall decoded = codec.decodeMethodCall(data); switch (decoded.method) { case 'enableContextMenu': - flutterViewEmbedder.enableContextMenu(); + implicitView!.contextMenu.enable(); replyToPlatformMessage(callback, codec.encodeSuccessEnvelope(true)); return; case 'disableContextMenu': - flutterViewEmbedder.disableContextMenu(); + implicitView!.contextMenu.disable(); replyToPlatformMessage(callback, codec.encodeSuccessEnvelope(true)); return; } diff --git a/lib/web_ui/lib/src/engine/text_editing/text_editing.dart b/lib/web_ui/lib/src/engine/text_editing/text_editing.dart index bc094ea1cb215..3be53ed83cedc 100644 --- a/lib/web_ui/lib/src/engine/text_editing/text_editing.dart +++ b/lib/web_ui/lib/src/engine/text_editing/text_editing.dart @@ -12,6 +12,7 @@ import 'package:ui/ui.dart' as ui; import '../browser_detection.dart'; import '../dom.dart'; import '../embedder.dart'; +import '../mouse/prevent_default.dart'; import '../platform_dispatcher.dart'; import '../safe_browser_api.dart'; import '../semantics.dart'; @@ -210,9 +211,7 @@ class EngineAutofillForm { formElement.noValidate = true; formElement.method = 'post'; formElement.action = '#'; - formElement.addEventListener('submit', createDomEventListener((DomEvent e) { - e.preventDefault(); - })); + formElement.addEventListener('submit', preventDefaultListener); // We need to explicitly disable pointer events on the form in Safari Desktop, // so that we don't have pointer event collisions if users hover over or click diff --git a/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/custom_element_embedding_strategy.dart b/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/custom_element_embedding_strategy.dart index 572bdb8ce33b2..ecf92bb3d8956 100644 --- a/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/custom_element_embedding_strategy.dart +++ b/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/custom_element_embedding_strategy.dart @@ -51,12 +51,6 @@ class CustomElementEmbeddingStrategy extends EmbeddingStrategy { registerElementForCleanup(resourceHost); } - @override - void disableContextMenu() => disableContextMenuOn(_hostElement); - - @override - void enableContextMenu() => enableContextMenuOn(_hostElement); - void _setHostAttribute(String name, String value) { _hostElement.setAttribute(name, value); } diff --git a/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/embedding_strategy.dart b/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/embedding_strategy.dart index 8a3e401816bf9..bb1c9361ae2a8 100644 --- a/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/embedding_strategy.dart +++ b/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/embedding_strategy.dart @@ -20,7 +20,7 @@ import 'full_page_embedding_strategy.dart'; /// * [CustomElementEmbeddingStrategy] - Flutter is rendered inside a custom host /// element, provided by the web app programmer through the engine /// initialization. -abstract class EmbeddingStrategy with _ContextMenu { +abstract class EmbeddingStrategy { EmbeddingStrategy() { // Initialize code to handle hot-restart (debug only). assert(() { @@ -56,71 +56,3 @@ abstract class EmbeddingStrategy with _ContextMenu { _hotRestartCache?.registerElement(element); } } - -/// Provides functionality to disable and enable the browser's context menu. -mixin _ContextMenu { - /// False when the context menu has been disabled, otherwise true. - bool _contextMenuEnabled = true; - - /// Listener for contextmenu events that prevents the browser's context menu - /// from being shown. - final DomEventListener _disablingContextMenuListener = createDomEventListener((DomEvent event) { - event.preventDefault(); - }); - - /// Disables the browser's context menu for this part of the DOM. - /// - /// By default, when a Flutter web app starts, the context menu is enabled. - /// - /// Can be re-enabled by calling [enableContextMenu]. - /// - /// See also: - /// - /// * [disableContextMenuOn], which is like this but takes the relevant - /// [DomElement] as a parameter. - void disableContextMenu(); - - /// Disables the browser's context menu for the given [DomElement]. - /// - /// See also: - /// - /// * [disableContextMenu], which is like this but is not passed a - /// [DomElement]. - @protected - void disableContextMenuOn(DomEventTarget element) { - if (!_contextMenuEnabled) { - return; - } - - element.addEventListener('contextmenu', _disablingContextMenuListener); - _contextMenuEnabled = false; - } - - /// Enables the browser's context menu for this part of the DOM. - /// - /// By default, when a Flutter web app starts, the context menu is already - /// enabled. Typically, this method would be used after calling - /// [disableContextMenu] to first disable it. - /// - /// See also: - /// - /// * [enableContextMenuOn], which is like this but takes the relevant - /// [DomElement] as a parameter. - void enableContextMenu(); - - /// Enables the browser's context menu for the given [DomElement]. - /// - /// See also: - /// - /// * [enableContextMenu], which is like this but is not passed a - /// [DomElement]. - @protected - void enableContextMenuOn(DomEventTarget element) { - if (_contextMenuEnabled) { - return; - } - - element.removeEventListener('contextmenu', _disablingContextMenuListener); - _contextMenuEnabled = true; - } -} diff --git a/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/full_page_embedding_strategy.dart b/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/full_page_embedding_strategy.dart index d8db4f82f2ac1..b8abc6e2427b7 100644 --- a/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/full_page_embedding_strategy.dart +++ b/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/full_page_embedding_strategy.dart @@ -48,12 +48,6 @@ class FullPageEmbeddingStrategy extends EmbeddingStrategy { registerElementForCleanup(resourceHost); } - @override - void disableContextMenu() => disableContextMenuOn(domWindow); - - @override - void enableContextMenu() => enableContextMenuOn(domWindow); - void _setHostAttribute(String name, String value) { domDocument.body!.setAttribute(name, value); } diff --git a/lib/web_ui/lib/src/engine/window.dart b/lib/web_ui/lib/src/engine/window.dart index 0dd502def1627..9f498654bdd9e 100644 --- a/lib/web_ui/lib/src/engine/window.dart +++ b/lib/web_ui/lib/src/engine/window.dart @@ -17,6 +17,7 @@ import '../engine.dart' show DimensionsProvider, registerHotRestartListener, ren import 'display.dart'; import 'dom.dart'; import 'embedder.dart'; +import 'mouse/context_menu.dart'; import 'mouse/cursor.dart'; import 'navigation/history.dart'; import 'platform_dispatcher.dart'; @@ -36,6 +37,7 @@ const int kImplicitViewId = 0; /// In addition to everything defined in [ui.FlutterView], this class adds /// a few web-specific properties. abstract interface class EngineFlutterView extends ui.FlutterView { + ContextMenu get contextMenu; MouseCursor get mouseCursor; DomElement get rootElement; } @@ -67,6 +69,9 @@ class EngineFlutterWindow extends ui.SingletonFlutterWindow implements EngineFlu @override late final MouseCursor mouseCursor = MouseCursor(rootElement); + @override + late final ContextMenu contextMenu = ContextMenu(rootElement); + @override DomElement get rootElement => flutterViewEmbedder.flutterViewElement; diff --git a/lib/web_ui/test/engine/mouse/context_menu_test.dart b/lib/web_ui/test/engine/mouse/context_menu_test.dart new file mode 100644 index 0000000000000..a432678657927 --- /dev/null +++ b/lib/web_ui/test/engine/mouse/context_menu_test.dart @@ -0,0 +1,104 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:test/bootstrap/browser.dart'; +import 'package:test/test.dart'; +import 'package:ui/src/engine.dart'; + +void main() { + internalBootstrapBrowserTest(() => testMain); +} + +void testMain() { + group('$ContextMenu', () { + test('can disable context menu', () { + final DomElement rootViewElement = createDomElement('div'); + final ContextMenu contextMenu = ContextMenu(rootViewElement); + + // When the app starts, contextmenu events are not prevented. + DomEvent event = createDomEvent('Event', 'contextmenu'); + expect(event.defaultPrevented, isFalse); + rootViewElement.dispatchEvent(event); + expect(event.defaultPrevented, isFalse); + + // Disabling the context menu causes contextmenu events to be prevented. + contextMenu.disable(); + event = createDomEvent('Event', 'contextmenu'); + expect(event.defaultPrevented, isFalse); + rootViewElement.dispatchEvent(event); + expect(event.defaultPrevented, isTrue); + + // Disabling again has no effect. + contextMenu.disable(); + event = createDomEvent('Event', 'contextmenu'); + expect(event.defaultPrevented, isFalse); + rootViewElement.dispatchEvent(event); + expect(event.defaultPrevented, isTrue); + }); + + test('does not disable context menu outside root view element', () { + final DomElement rootViewElement = createDomElement('div'); + final ContextMenu contextMenu = ContextMenu(rootViewElement); + + contextMenu.disable(); + + // Dispatching on a DOM element outside of target's subtree has no effect. + final DomEvent event = createDomEvent('Event', 'contextmenu'); + expect(event.defaultPrevented, isFalse); + domDocument.body!.dispatchEvent(event); + expect(event.defaultPrevented, isFalse); + }); + + test('can enable context menu after disabling', () { + final DomElement rootViewElement = createDomElement('div'); + final ContextMenu contextMenu = ContextMenu(rootViewElement); + + // When the app starts, contextmenu events are not prevented. + DomEvent event = createDomEvent('Event', 'contextmenu'); + expect(event.defaultPrevented, isFalse); + rootViewElement.dispatchEvent(event); + expect(event.defaultPrevented, isFalse); + + // Disabling the context menu causes contextmenu events to be prevented. + contextMenu.disable(); + event = createDomEvent('Event', 'contextmenu'); + expect(event.defaultPrevented, isFalse); + rootViewElement.dispatchEvent(event); + expect(event.defaultPrevented, isTrue); + + // Enabling the context menu means that contextmenu events are back to not + // being prevented. + contextMenu.enable(); + event = createDomEvent('Event', 'contextmenu'); + expect(event.defaultPrevented, isFalse); + rootViewElement.dispatchEvent(event); + expect(event.defaultPrevented, isFalse); + + // Enabling again has no effect. + contextMenu.enable(); + event = createDomEvent('Event', 'contextmenu'); + expect(event.defaultPrevented, isFalse); + rootViewElement.dispatchEvent(event); + expect(event.defaultPrevented, isFalse); + }); + + test('enabling before disabling has no effect', () { + final DomElement rootViewElement = createDomElement('div'); + final ContextMenu contextMenu = ContextMenu(rootViewElement); + + // When the app starts, contextmenu events are not prevented. + DomEvent event = createDomEvent('Event', 'contextmenu'); + expect(event.defaultPrevented, isFalse); + rootViewElement.dispatchEvent(event); + expect(event.defaultPrevented, isFalse); + + // Enabling has no effect. + contextMenu.enable(); + event = createDomEvent('Event', 'contextmenu'); + expect(event.defaultPrevented, isFalse); + rootViewElement.dispatchEvent(event); + expect(event.defaultPrevented, isFalse); + }); + }); +} diff --git a/lib/web_ui/test/engine/view_embedder/embedding_strategy/custom_element_embedding_strategy_test.dart b/lib/web_ui/test/engine/view_embedder/embedding_strategy/custom_element_embedding_strategy_test.dart index 850a2a66a2376..b28fbc3d7fe1c 100644 --- a/lib/web_ui/test/engine/view_embedder/embedding_strategy/custom_element_embedding_strategy_test.dart +++ b/lib/web_ui/test/engine/view_embedder/embedding_strategy/custom_element_embedding_strategy_test.dart @@ -122,60 +122,4 @@ void doTests() { reason: 'Should be injected `nextTo` the passed element.'); }); }); - - group('context menu', () { - setUp(() { - target = createDomElement('this-is-the-target'); - domDocument.body!.append(target); - strategy = CustomElementEmbeddingStrategy(target); - strategy.initialize(); - }); - - tearDown(() { - target.remove(); - }); - - test('disableContextMenu and enableContextMenu can toggle the context menu', () { - // When the app starts, contextmenu events are not prevented. - DomEvent event = createDomEvent('Event', 'contextmenu'); - expect(event.defaultPrevented, isFalse); - target.dispatchEvent(event); - expect(event.defaultPrevented, isFalse); - - // Disabling the context menu causes contextmenu events to be prevented. - strategy.disableContextMenu(); - event = createDomEvent('Event', 'contextmenu'); - expect(event.defaultPrevented, isFalse); - target.dispatchEvent(event); - expect(event.defaultPrevented, isTrue); - - // Disabling again has no effect. - strategy.disableContextMenu(); - event = createDomEvent('Event', 'contextmenu'); - expect(event.defaultPrevented, isFalse); - target.dispatchEvent(event); - expect(event.defaultPrevented, isTrue); - - // Dispatching on a DOM element outside of target's subtree has no effect. - event = createDomEvent('Event', 'contextmenu'); - expect(event.defaultPrevented, isFalse); - domDocument.body!.dispatchEvent(event); - expect(event.defaultPrevented, isFalse); - - // Enabling the context menu means that contextmenu events are back to not - // being prevented. - strategy.enableContextMenu(); - event = createDomEvent('Event', 'contextmenu'); - expect(event.defaultPrevented, isFalse); - target.dispatchEvent(event); - expect(event.defaultPrevented, isFalse); - - // Enabling again has no effect. - strategy.enableContextMenu(); - event = createDomEvent('Event', 'contextmenu'); - expect(event.defaultPrevented, isFalse); - target.dispatchEvent(event); - expect(event.defaultPrevented, isFalse); - }); - }); } diff --git a/lib/web_ui/test/engine/view_embedder/embedding_strategy/full_page_embedding_strategy_test.dart b/lib/web_ui/test/engine/view_embedder/embedding_strategy/full_page_embedding_strategy_test.dart index 70f2fbd1e92bd..5bf979105e142 100644 --- a/lib/web_ui/test/engine/view_embedder/embedding_strategy/full_page_embedding_strategy_test.dart +++ b/lib/web_ui/test/engine/view_embedder/embedding_strategy/full_page_embedding_strategy_test.dart @@ -130,56 +130,4 @@ void doTests() { reason: 'Should be injected `nextTo` the passed element.'); }); }); - - group('context menu', () { - setUp(() { - strategy = FullPageEmbeddingStrategy(); - strategy.initialize(); - }); - - test('disableContextMenu and enableContextMenu can toggle the context menu', () { - final FullPageEmbeddingStrategy strategy = FullPageEmbeddingStrategy(); - - // When the app starts, contextmenu events are not prevented. - DomEvent event = createDomEvent('Event', 'contextmenu'); - expect(event.defaultPrevented, isFalse); - target.dispatchEvent(event); - expect(event.defaultPrevented, isFalse); - - // Disabling the context menu causes contextmenu events to be prevented. - strategy.disableContextMenu(); - event = createDomEvent('Event', 'contextmenu'); - expect(event.defaultPrevented, isFalse); - target.dispatchEvent(event); - expect(event.defaultPrevented, isTrue); - - // Disabling again has no effect. - strategy.disableContextMenu(); - event = createDomEvent('Event', 'contextmenu'); - expect(event.defaultPrevented, isFalse); - target.dispatchEvent(event); - expect(event.defaultPrevented, isTrue); - - // Dispatching on the document body is still disabled. - event = createDomEvent('Event', 'contextmenu'); - expect(event.defaultPrevented, isFalse); - domDocument.body!.dispatchEvent(event); - expect(event.defaultPrevented, isTrue); - - // Enabling the context menu means that contextmenu events are back to not - // being prevented. - strategy.enableContextMenu(); - event = createDomEvent('Event', 'contextmenu'); - expect(event.defaultPrevented, isFalse); - target.dispatchEvent(event); - expect(event.defaultPrevented, isFalse); - - // Enabling again has no effect. - strategy.enableContextMenu(); - event = createDomEvent('Event', 'contextmenu'); - expect(event.defaultPrevented, isFalse); - target.dispatchEvent(event); - expect(event.defaultPrevented, isFalse); - }); - }); } From 34e72aa5a20c2c69abd3e74705b8801f846b0347 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 20 Sep 2023 14:42:02 -0400 Subject: [PATCH 184/859] Roll Skia from f4238844089f to c19115e8f712 (5 revisions) (#46108) https://skia.googlesource.com/skia.git/+log/f4238844089f..c19115e8f712 2023-09-20 johnstiles@google.com Re-enable existing SkSL tests. 2023-09-20 cmumford@google.com [infra] bump gsutil version to 5.25 2023-09-20 fmalita@chromium.org [mesh2d demo] Fix CK init URL 2023-09-20 bungeman@google.com [skshaper] Split off SkUnicode specific code 2023-09-20 johnstiles@google.com Remove dead code from SPIR-V code generator. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index b13280be39edf..aff62a961db58 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'f4238844089f45e8b157dd4c2e7fe906b6da9b05', + 'skia_revision': 'c19115e8f712d676d4363fdcd334c3abf0c08c3b', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index dae3e08093879..b2922536da0b7 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 90d914ccf1ba25802ab5d90c21713c0e +Signature: d5351ea7fed04e8f6f52a506e0cdba81 ==================================================================================================== LIBRARY: etc1 From a7bd0bc1517d6427724d2ab6d5f5d8649eec58b9 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 20 Sep 2023 15:24:20 -0400 Subject: [PATCH 185/859] Roll Skia from c19115e8f712 to b3c1f49821d8 (3 revisions) (#46112) https://skia.googlesource.com/skia.git/+log/c19115e8f712..b3c1f49821d8 2023-09-20 skia-autoroll@skia-public.iam.gserviceaccount.com Roll shaders-base from ca3aa4986e49 to 40f881ed7b8b 2023-09-20 skia-autoroll@skia-public.iam.gserviceaccount.com Roll debugger-app-base from 34426197856b to 4bd4f2832866 2023-09-20 skia-autoroll@skia-public.iam.gserviceaccount.com Roll skottie-base from 4983a463d62a to a8dcc44b5814 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index aff62a961db58..d6d8660b11ce9 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'c19115e8f712d676d4363fdcd334c3abf0c08c3b', + 'skia_revision': 'b3c1f49821d89a77328cca9b97252dbbaecd25ae', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 313c020890ecb9bc092567963eab2d5be0c0492b Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Wed, 20 Sep 2023 12:52:03 -0700 Subject: [PATCH 186/859] Make a variety of low-impact Clang tidy fixes. (#46114) Work towards https://github.com/flutter/flutter/issues/134969. These are all self-contained, so I bundled them all together. All fixes are generated by `clang-tidy --fix`, and manual search/replace if that wasn't sufficient. --- common/graphics/texture.cc | 2 +- common/graphics/texture.h | 2 +- display_list/display_list.h | 3 +- display_list/dl_canvas.h | 2 +- display_list/geometry/dl_rtree.cc | 2 +- display_list/geometry/dl_rtree.h | 4 +-- display_list/image/dl_image.h | 4 ++- display_list/image/dl_image_skia.h | 2 +- fml/base32.h | 4 +-- fml/endianness.h | 8 ++--- fml/math.h | 8 ++--- fml/math_unittests.cc | 6 ++-- fml/memory/ref_ptr.h | 4 +-- fml/message_loop_task_queues.cc | 30 +++++++++---------- fml/message_loop_task_queues.h | 4 +-- fml/message_loop_task_queues_unittests.cc | 6 ++-- fml/platform/darwin/scoped_block.h | 14 ++++----- .../framework/Source/FlutterViewController.mm | 2 +- .../platform_message_response_darwin.mm | 2 +- .../ios/platform_message_handler_ios.mm | 2 +- 20 files changed, 57 insertions(+), 54 deletions(-) diff --git a/common/graphics/texture.cc b/common/graphics/texture.cc index 07025ff085779..74d76c909f823 100644 --- a/common/graphics/texture.cc +++ b/common/graphics/texture.cc @@ -14,7 +14,7 @@ Texture::Texture(int64_t id) : id_(id) {} Texture::~Texture() = default; -TextureRegistry::TextureRegistry() : image_counter_(0) {} +TextureRegistry::TextureRegistry() = default; void TextureRegistry::RegisterTexture(const std::shared_ptr& texture) { if (!texture) { diff --git a/common/graphics/texture.h b/common/graphics/texture.h index 9b582a84da286..3f4ea4fcecfde 100644 --- a/common/graphics/texture.h +++ b/common/graphics/texture.h @@ -95,7 +95,7 @@ class TextureRegistry { private: std::map> mapping_; - size_t image_counter_; + size_t image_counter_ = 0; // This map keeps track of registered context listeners by their own // externally provided id. It indexes into ordered_images_. std::map image_indices_; diff --git a/display_list/display_list.h b/display_list/display_list.h index 668a247d5596f..f7c7aa09a9651 100644 --- a/display_list/display_list.h +++ b/display_list/display_list.h @@ -159,7 +159,8 @@ class SaveLayerOptions { SaveLayerOptions() : flags_(0) {} SaveLayerOptions(const SaveLayerOptions& options) : flags_(options.flags_) {} - SaveLayerOptions(const SaveLayerOptions* options) : flags_(options->flags_) {} + explicit SaveLayerOptions(const SaveLayerOptions* options) + : flags_(options->flags_) {} SaveLayerOptions without_optimizations() const { SaveLayerOptions options; diff --git a/display_list/dl_canvas.h b/display_list/dl_canvas.h index f04645c157788..96f4a3f91a345 100644 --- a/display_list/dl_canvas.h +++ b/display_list/dl_canvas.h @@ -152,7 +152,7 @@ class DlCanvas { virtual void DrawVertices(const DlVertices* vertices, DlBlendMode mode, const DlPaint& paint) = 0; - void DrawVertices(const std::shared_ptr vertices, + void DrawVertices(const std::shared_ptr& vertices, DlBlendMode mode, const DlPaint& paint) { DrawVertices(vertices.get(), mode, paint); diff --git a/display_list/geometry/dl_rtree.cc b/display_list/geometry/dl_rtree.cc index a4a805957bcc3..1598f505e88e1 100644 --- a/display_list/geometry/dl_rtree.cc +++ b/display_list/geometry/dl_rtree.cc @@ -217,7 +217,7 @@ const SkRect& DlRTree::bounds() const { if (!nodes_.empty()) { return nodes_.back().bounds; } else { - return empty_; + return kEmpty; } } diff --git a/display_list/geometry/dl_rtree.h b/display_list/geometry/dl_rtree.h index f12486edcce76..efda1613e38b1 100644 --- a/display_list/geometry/dl_rtree.h +++ b/display_list/geometry/dl_rtree.h @@ -96,7 +96,7 @@ class DlRTree : public SkRefCnt { const SkRect& bounds(int result_index) const { return (result_index >= 0 && result_index < leaf_count_) ? nodes_[result_index].bounds - : empty_; + : kEmpty; } /// Returns the bytes used by the object and all of its node data. @@ -136,7 +136,7 @@ class DlRTree : public SkRefCnt { } private: - static constexpr SkRect empty_ = SkRect::MakeEmpty(); + static constexpr SkRect kEmpty = SkRect::MakeEmpty(); void search(const Node& parent, const SkRect& query, diff --git a/display_list/image/dl_image.h b/display_list/image/dl_image.h index bc4a8602545ad..137fe03ac7acb 100644 --- a/display_list/image/dl_image.h +++ b/display_list/image/dl_image.h @@ -131,7 +131,9 @@ class DlImage : public SkRefCnt { bool Equals(const DlImage& other) const { return Equals(&other); } - bool Equals(sk_sp other) const { return Equals(other.get()); } + bool Equals(const sk_sp& other) const { + return Equals(other.get()); + } protected: DlImage(); diff --git a/display_list/image/dl_image_skia.h b/display_list/image/dl_image_skia.h index a29985d095929..03bcfa144a83a 100644 --- a/display_list/image/dl_image_skia.h +++ b/display_list/image/dl_image_skia.h @@ -12,7 +12,7 @@ namespace flutter { class DlImageSkia final : public DlImage { public: - DlImageSkia(sk_sp image); + explicit DlImageSkia(sk_sp image); // |DlImage| ~DlImageSkia() override; diff --git a/fml/base32.h b/fml/base32.h index aacbdc696e3ad..7892aaddb3484 100644 --- a/fml/base32.h +++ b/fml/base32.h @@ -25,7 +25,7 @@ class BitConverter { int Extract() { FML_DCHECK(CanExtract()); int result = Peek(); - buffer_ = (buffer_ << to_length) & mask_; + buffer_ = (buffer_ << to_length) & kMask; lower_free_bits_ += to_length; return result; } @@ -40,7 +40,7 @@ class BitConverter { static_assert(buffer_length >= 2 * to_length); static_assert(buffer_length < sizeof(int) * 8); - static constexpr int mask_ = (1 << buffer_length) - 1; + static constexpr int kMask = (1 << buffer_length) - 1; int buffer_ = 0; int lower_free_bits_ = buffer_length; diff --git a/fml/endianness.h b/fml/endianness.h index eff90f9cafb3c..18758b7b69492 100644 --- a/fml/endianness.h +++ b/fml/endianness.h @@ -32,11 +32,11 @@ struct IsByteSwappable integral_constant || std::is_enum_v> { }; template -constexpr bool IsByteSwappableV = IsByteSwappable::value; +constexpr bool kIsByteSwappableV = IsByteSwappable::value; /// @brief Flips the endianness of the given value. /// The given value must be an integral type of size 1, 2, 4, or 8. -template >> +template >> constexpr T ByteSwap(T n) { if constexpr (sizeof(T) == 1) { return n; @@ -55,7 +55,7 @@ constexpr T ByteSwap(T n) { /// current architecture. This is effectively a cross platform /// ntohl/ntohs (as network byte order is always Big Endian). /// The given value must be an integral type of size 1, 2, 4, or 8. -template >> +template >> constexpr T BigEndianToArch(T n) { #if FML_ARCH_CPU_LITTLE_ENDIAN return ByteSwap(n); @@ -67,7 +67,7 @@ constexpr T BigEndianToArch(T n) { /// @brief Convert a known little endian value to match the endianness of the /// current architecture. /// The given value must be an integral type of size 1, 2, 4, or 8. -template >> +template >> constexpr T LittleEndianToArch(T n) { #if !FML_ARCH_CPU_LITTLE_ENDIAN return ByteSwap(n); diff --git a/fml/math.h b/fml/math.h index 6182ada09d60c..57dced6630b3b 100644 --- a/fml/math.h +++ b/fml/math.h @@ -12,16 +12,16 @@ namespace math { constexpr float kE = 2.7182818284590452354; // log_2 e -constexpr float kLog2_E = 1.4426950408889634074; +constexpr float kLog2E = 1.4426950408889634074; // log_10 e -constexpr float kLog10_E = 0.43429448190325182765; +constexpr float kLog10E = 0.43429448190325182765; // log_e 2 -constexpr float klogE_2 = 0.69314718055994530942; +constexpr float kLogE2 = 0.69314718055994530942; // log_e 10 -constexpr float klogE_10 = 2.30258509299404568402; +constexpr float kLogE10 = 2.30258509299404568402; // pi constexpr float kPi = 3.14159265358979323846; diff --git a/fml/math_unittests.cc b/fml/math_unittests.cc index 0e627e28bb615..020d886037bbd 100644 --- a/fml/math_unittests.cc +++ b/fml/math_unittests.cc @@ -12,9 +12,9 @@ namespace testing { TEST(MathTest, Constants) { // Don't use the constants in cmath as those aren't portable. - EXPECT_FLOAT_EQ(std::log2(math::kE), math::kLog2_E); - EXPECT_FLOAT_EQ(std::log10(math::kE), math::kLog10_E); - EXPECT_FLOAT_EQ(std::log(2.0f), math::klogE_2); + EXPECT_FLOAT_EQ(std::log2(math::kE), math::kLog2E); + EXPECT_FLOAT_EQ(std::log10(math::kE), math::kLog10E); + EXPECT_FLOAT_EQ(std::log(2.0f), math::kLogE2); EXPECT_FLOAT_EQ(math::kPi / 2.0f, math::kPiOver2); EXPECT_FLOAT_EQ(math::kPi / 4.0f, math::kPiOver4); EXPECT_FLOAT_EQ(1.0f / math::kPi, math::k1OverPi); diff --git a/fml/memory/ref_ptr.h b/fml/memory/ref_ptr.h index c426a4901d7a2..149c058987a8e 100644 --- a/fml/memory/ref_ptr.h +++ b/fml/memory/ref_ptr.h @@ -205,7 +205,7 @@ class RefPtr final { friend RefPtr AdoptRef(T*); - enum AdoptTag { ADOPT }; + enum AdoptTag { kAdopt }; RefPtr(T* ptr, AdoptTag) : ptr_(ptr) { FML_DCHECK(ptr_); } T* ptr_; @@ -222,7 +222,7 @@ inline RefPtr AdoptRef(T* ptr) { #ifndef NDEBUG ptr->Adopt(); #endif - return RefPtr(ptr, RefPtr::ADOPT); + return RefPtr(ptr, RefPtr::kAdopt); } // Constructs a |RefPtr| from a plain pointer (to an object that must diff --git a/fml/message_loop_task_queues.cc b/fml/message_loop_task_queues.cc index 30c1e37880421..f92dd86bfbf20 100644 --- a/fml/message_loop_task_queues.cc +++ b/fml/message_loop_task_queues.cc @@ -36,7 +36,7 @@ FML_THREAD_LOCAL ThreadLocalUniquePtr tls_task_source_grade; TaskQueueEntry::TaskQueueEntry(TaskQueueId created_for_arg) - : subsumed_by(_kUnmerged), created_for(created_for_arg) { + : subsumed_by(kUnmerged), created_for(created_for_arg) { wakeable = NULL; task_observers = TaskObservers(); task_source = std::make_unique(created_for); @@ -66,7 +66,7 @@ MessageLoopTaskQueues::~MessageLoopTaskQueues() = default; void MessageLoopTaskQueues::Dispose(TaskQueueId queue_id) { std::lock_guard guard(queue_mutex_); const auto& queue_entry = queue_entries_.at(queue_id); - FML_DCHECK(queue_entry->subsumed_by == _kUnmerged); + FML_DCHECK(queue_entry->subsumed_by == kUnmerged); auto& subsumed_set = queue_entry->owner_of; for (auto& subsumed : subsumed_set) { queue_entries_.erase(subsumed); @@ -78,7 +78,7 @@ void MessageLoopTaskQueues::Dispose(TaskQueueId queue_id) { void MessageLoopTaskQueues::DisposeTasks(TaskQueueId queue_id) { std::lock_guard guard(queue_mutex_); const auto& queue_entry = queue_entries_.at(queue_id); - FML_DCHECK(queue_entry->subsumed_by == _kUnmerged); + FML_DCHECK(queue_entry->subsumed_by == kUnmerged); auto& subsumed_set = queue_entry->owner_of; queue_entry->task_source->ShutDown(); for (auto& subsumed : subsumed_set) { @@ -101,7 +101,7 @@ void MessageLoopTaskQueues::RegisterTask( queue_entry->task_source->RegisterTask( {order, task, target_time, task_source_grade}); TaskQueueId loop_to_wake = queue_id; - if (queue_entry->subsumed_by != _kUnmerged) { + if (queue_entry->subsumed_by != kUnmerged) { loop_to_wake = queue_entry->subsumed_by; } @@ -151,7 +151,7 @@ void MessageLoopTaskQueues::WakeUpUnlocked(TaskQueueId queue_id, size_t MessageLoopTaskQueues::GetNumPendingTasks(TaskQueueId queue_id) const { std::lock_guard guard(queue_mutex_); const auto& queue_entry = queue_entries_.at(queue_id); - if (queue_entry->subsumed_by != _kUnmerged) { + if (queue_entry->subsumed_by != kUnmerged) { return 0; } @@ -185,7 +185,7 @@ std::vector MessageLoopTaskQueues::GetObserversToNotify( std::lock_guard guard(queue_mutex_); std::vector observers; - if (queue_entries_.at(queue_id)->subsumed_by != _kUnmerged) { + if (queue_entries_.at(queue_id)->subsumed_by != kUnmerged) { return observers; } @@ -226,8 +226,8 @@ bool MessageLoopTaskQueues::Merge(TaskQueueId owner, TaskQueueId subsumed) { // Won't check owner_entry->owner_of, because it may contains items when // merged with other different queues. - // Ensure owner_entry->subsumed_by being _kUnmerged - if (owner_entry->subsumed_by != _kUnmerged) { + // Ensure owner_entry->subsumed_by being kUnmerged + if (owner_entry->subsumed_by != kUnmerged) { FML_LOG(WARNING) << "Thread merging failed: owner_entry was already " "subsumed by others, owner=" << owner << ", subsumed=" << subsumed @@ -242,8 +242,8 @@ bool MessageLoopTaskQueues::Merge(TaskQueueId owner, TaskQueueId subsumed) { << ", subsumed->owner_of.size()=" << subsumed_entry->owner_of.size(); return false; } - // Ensure subsumed_entry->subsumed_by being _kUnmerged - if (subsumed_entry->subsumed_by != _kUnmerged) { + // Ensure subsumed_entry->subsumed_by being kUnmerged + if (subsumed_entry->subsumed_by != kUnmerged) { FML_LOG(WARNING) << "Thread merging failed: subsumed_entry was already " "subsumed by others, owner=" << owner << ", subsumed=" << subsumed @@ -271,14 +271,14 @@ bool MessageLoopTaskQueues::Unmerge(TaskQueueId owner, TaskQueueId subsumed) { << owner << ", subsumed=" << subsumed; return false; } - if (owner_entry->subsumed_by != _kUnmerged) { + if (owner_entry->subsumed_by != kUnmerged) { FML_LOG(WARNING) << "Thread unmerging failed: owner_entry was subsumed by others, owner=" << owner << ", subsumed=" << subsumed << ", owner_entry->subsumed_by=" << owner_entry->subsumed_by; return false; } - if (queue_entries_.at(subsumed)->subsumed_by == _kUnmerged) { + if (queue_entries_.at(subsumed)->subsumed_by == kUnmerged) { FML_LOG(WARNING) << "Thread unmerging failed: subsumed_entry wasn't " "subsumed by others, owner=" << owner << ", subsumed=" << subsumed; @@ -291,7 +291,7 @@ bool MessageLoopTaskQueues::Unmerge(TaskQueueId owner, TaskQueueId subsumed) { return false; } - queue_entries_.at(subsumed)->subsumed_by = _kUnmerged; + queue_entries_.at(subsumed)->subsumed_by = kUnmerged; owner_entry->owner_of.erase(subsumed); if (HasPendingTasksUnlocked(owner)) { @@ -308,7 +308,7 @@ bool MessageLoopTaskQueues::Unmerge(TaskQueueId owner, TaskQueueId subsumed) { bool MessageLoopTaskQueues::Owns(TaskQueueId owner, TaskQueueId subsumed) const { std::lock_guard guard(queue_mutex_); - if (owner == _kUnmerged || subsumed == _kUnmerged) { + if (owner == kUnmerged || subsumed == kUnmerged) { return false; } auto& subsumed_set = queue_entries_.at(owner)->owner_of; @@ -340,7 +340,7 @@ void MessageLoopTaskQueues::ResumeSecondarySource(TaskQueueId queue_id) { bool MessageLoopTaskQueues::HasPendingTasksUnlocked( TaskQueueId queue_id) const { const auto& entry = queue_entries_.at(queue_id); - bool is_subsumed = entry->subsumed_by != _kUnmerged; + bool is_subsumed = entry->subsumed_by != kUnmerged; if (is_subsumed) { return false; } diff --git a/fml/message_loop_task_queues.h b/fml/message_loop_task_queues.h index 2d89caac305ab..ba464493952c0 100644 --- a/fml/message_loop_task_queues.h +++ b/fml/message_loop_task_queues.h @@ -22,7 +22,7 @@ namespace fml { -static const TaskQueueId _kUnmerged = TaskQueueId(TaskQueueId::kUnmerged); +static const TaskQueueId kUnmerged = TaskQueueId(TaskQueueId::kUnmerged); /// A collection of tasks and observers associated with one TaskQueue. /// @@ -40,7 +40,7 @@ class TaskQueueEntry { /// empty, this TaskQueue does not own any other TaskQueues. std::set owner_of; - /// Identifies the TaskQueue that subsumes this TaskQueue. If it is _kUnmerged + /// Identifies the TaskQueue that subsumes this TaskQueue. If it is kUnmerged /// it indicates that this TaskQueue is not owned by any other TaskQueue. TaskQueueId subsumed_by; diff --git a/fml/message_loop_task_queues_unittests.cc b/fml/message_loop_task_queues_unittests.cc index f9753ea8ad34c..7681d99379b74 100644 --- a/fml/message_loop_task_queues_unittests.cc +++ b/fml/message_loop_task_queues_unittests.cc @@ -338,9 +338,9 @@ TEST(MessageLoopTaskQueue, QueueDoNotOwnItself) { TEST(MessageLoopTaskQueue, QueueDoNotOwnUnmergedTaskQueueId) { auto task_queue = fml::MessageLoopTaskQueues::GetInstance(); - ASSERT_FALSE(task_queue->Owns(task_queue->CreateTaskQueue(), _kUnmerged)); - ASSERT_FALSE(task_queue->Owns(_kUnmerged, task_queue->CreateTaskQueue())); - ASSERT_FALSE(task_queue->Owns(_kUnmerged, _kUnmerged)); + ASSERT_FALSE(task_queue->Owns(task_queue->CreateTaskQueue(), kUnmerged)); + ASSERT_FALSE(task_queue->Owns(kUnmerged, task_queue->CreateTaskQueue())); + ASSERT_FALSE(task_queue->Owns(kUnmerged, kUnmerged)); } TEST(MessageLoopTaskQueue, QueueOwnsMergedTaskQueueId) { diff --git a/fml/platform/darwin/scoped_block.h b/fml/platform/darwin/scoped_block.h index 2608d1ef3149e..319cb25d0d0ee 100644 --- a/fml/platform/darwin/scoped_block.h +++ b/fml/platform/darwin/scoped_block.h @@ -17,20 +17,20 @@ namespace fml { enum class OwnershipPolicy { // The scoped object takes ownership of an object by taking over an existing // ownership claim. - Assume, + kAssume, // The scoped object will retain the object and any initial ownership is // not changed. - Retain, + kRetain, }; template class ScopedBlock { public: explicit ScopedBlock(B block = nullptr, - OwnershipPolicy policy = OwnershipPolicy::Assume) + OwnershipPolicy policy = OwnershipPolicy::kAssume) : block_(block) { - if (block_ && policy == OwnershipPolicy::Retain) { + if (block_ && policy == OwnershipPolicy::kRetain) { block_ = Block_copy(block); } } @@ -48,13 +48,13 @@ class ScopedBlock { } ScopedBlock& operator=(const ScopedBlock& that) { - reset(that.get(), OwnershipPolicy::Retain); + reset(that.get(), OwnershipPolicy::kRetain); return *this; } void reset(B block = nullptr, - OwnershipPolicy policy = OwnershipPolicy::Assume) { - if (block && policy == OwnershipPolicy::Retain) { + OwnershipPolicy policy = OwnershipPolicy::kAssume) { + if (block && policy == OwnershipPolicy::kRetain) { block = Block_copy(block); } if (block_) { diff --git a/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm b/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm index f78ca85f79ee4..c3223766d4c01 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm @@ -717,7 +717,7 @@ - (void)setSplashScreenView:(UIView*)view { } - (void)setFlutterViewDidRenderCallback:(void (^)(void))callback { - _flutterViewRenderedCallback.reset(callback, fml::OwnershipPolicy::Retain); + _flutterViewRenderedCallback.reset(callback, fml::OwnershipPolicy::kRetain); } #pragma mark - Surface creation and teardown updates diff --git a/shell/platform/darwin/ios/framework/Source/platform_message_response_darwin.mm b/shell/platform/darwin/ios/framework/Source/platform_message_response_darwin.mm index 53b04e484d6fb..ffe0f60802608 100644 --- a/shell/platform/darwin/ios/framework/Source/platform_message_response_darwin.mm +++ b/shell/platform/darwin/ios/framework/Source/platform_message_response_darwin.mm @@ -9,7 +9,7 @@ PlatformMessageResponseDarwin::PlatformMessageResponseDarwin( PlatformMessageResponseCallback callback, fml::RefPtr platform_task_runner) - : callback_(callback, fml::OwnershipPolicy::Retain), + : callback_(callback, fml::OwnershipPolicy::kRetain), platform_task_runner_(std::move(platform_task_runner)) {} PlatformMessageResponseDarwin::~PlatformMessageResponseDarwin() = default; diff --git a/shell/platform/darwin/ios/platform_message_handler_ios.mm b/shell/platform/darwin/ios/platform_message_handler_ios.mm index 8a1b2ebe0d66b..b9011009798c8 100644 --- a/shell/platform/darwin/ios/platform_message_handler_ios.mm +++ b/shell/platform/darwin/ios/platform_message_handler_ios.mm @@ -125,7 +125,7 @@ - (void)dispatch:(dispatch_block_t)block { message_handlers_[channel] = { .task_queue = fml::scoped_nsprotocol([task_queue retain]), .handler = - fml::ScopedBlock{handler, fml::OwnershipPolicy::Retain}, + fml::ScopedBlock{handler, fml::OwnershipPolicy::kRetain}, }; } } From 8a58485c5964256e5460dd4efae6163a112bca81 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Wed, 20 Sep 2023 12:55:47 -0700 Subject: [PATCH 187/859] [ios] fix asset url not found when loading app extension (#46073) In https://github.com/flutter/engine/commit/9446392af6a26a715c6db50a56b23d46c141d834, I refactored the assetsPath to use NSURL. It turns out that when the app bundle is not loaded (during launching app exgtension), the assetURL will return nil using the `URLForResource`, but the `pathForResource` successfully returns the raw path. This PR reverts back to the raw path solution. part of https://github.com/flutter/flutter/issues/124287 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- .../framework/Source/FlutterNSBundleUtils.h | 2 +- .../framework/Source/FlutterNSBundleUtils.mm | 14 +++++---- .../framework/Source/FlutterDartProject.mm | 9 +++--- .../Source/FlutterDartProjectTest.mm | 29 +++++++------------ 4 files changed, 25 insertions(+), 29 deletions(-) diff --git a/shell/platform/darwin/common/framework/Source/FlutterNSBundleUtils.h b/shell/platform/darwin/common/framework/Source/FlutterNSBundleUtils.h index e9c9f323ccb6a..9e0ea22e5fadc 100644 --- a/shell/platform/darwin/common/framework/Source/FlutterNSBundleUtils.h +++ b/shell/platform/darwin/common/framework/Source/FlutterNSBundleUtils.h @@ -48,7 +48,7 @@ NSString* FLTAssetPath(NSBundle* bundle); // If the key is not set, `flutter_assets` is used as the raw path value. // // If no valid asset is found under the raw path, returns nil. -NSURL* FLTAssetsURLFromBundle(NSBundle* bundle); +NSString* FLTAssetsPathFromBundle(NSBundle* bundle); NS_ASSUME_NONNULL_END diff --git a/shell/platform/darwin/common/framework/Source/FlutterNSBundleUtils.mm b/shell/platform/darwin/common/framework/Source/FlutterNSBundleUtils.mm index bf0002d9ade34..4198fd33e0209 100644 --- a/shell/platform/darwin/common/framework/Source/FlutterNSBundleUtils.mm +++ b/shell/platform/darwin/common/framework/Source/FlutterNSBundleUtils.mm @@ -54,15 +54,17 @@ } NSString* FLTAssetPath(NSBundle* bundle) { - return [bundle objectForInfoDictionaryKey:@"FLTAssetsPath"] ?: kDefaultAssetPath; + return [bundle objectForInfoDictionaryKey:@"FLTAssetsPath"] ?: @"flutter_assets"; } -NSURL* FLTAssetsURLFromBundle(NSBundle* bundle) { +NSString* FLTAssetsPathFromBundle(NSBundle* bundle) { NSString* flutterAssetsPath = FLTAssetPath(bundle); - NSURL* assets = [bundle URLForResource:flutterAssetsPath withExtension:nil]; + // Use the raw path solution so that asset path can be returned from unloaded bundles. + // See https://github.com/flutter/engine/pull/46073 + NSString* assetsPath = [bundle pathForResource:flutterAssetsPath ofType:@""]; - if (!assets) { - assets = [[NSBundle mainBundle] URLForResource:flutterAssetsPath withExtension:nil]; + if (assetsPath.length == 0) { + assetsPath = [[NSBundle mainBundle] pathForResource:flutterAssetsPath ofType:@""]; } - return assets; + return assetsPath; } diff --git a/shell/platform/darwin/ios/framework/Source/FlutterDartProject.mm b/shell/platform/darwin/ios/framework/Source/FlutterDartProject.mm index 04bf8b9b33242..70c1ac7a4742d 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterDartProject.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterDartProject.mm @@ -139,19 +139,20 @@ static BOOL DoesHardwareSupportWideGamut() { // Checks to see if the flutter assets directory is already present. if (settings.assets_path.empty()) { - NSURL* assetsURL = FLTAssetsURLFromBundle(bundle); + NSString* assetsPath = FLTAssetsPathFromBundle(bundle); - if (!assetsURL) { + if (assetsPath.length == 0) { NSLog(@"Failed to find assets path for \"%@\"", bundle); } else { - settings.assets_path = assetsURL.path.UTF8String; + settings.assets_path = assetsPath.UTF8String; // Check if there is an application kernel snapshot in the assets directory we could // potentially use. Looking for the snapshot makes sense only if we have a VM that can use // it. if (!flutter::DartVM::IsRunningPrecompiledCode()) { NSURL* applicationKernelSnapshotURL = - [assetsURL URLByAppendingPathComponent:@(kApplicationKernelSnapshotFileName)]; + [NSURL URLWithString:@(kApplicationKernelSnapshotFileName) + relativeToURL:[NSURL fileURLWithPath:assetsPath]]; NSError* error; if ([applicationKernelSnapshotURL checkResourceIsReachableAndReturnError:&error]) { settings.application_kernel_asset = applicationKernelSnapshotURL.path.UTF8String; diff --git a/shell/platform/darwin/ios/framework/Source/FlutterDartProjectTest.mm b/shell/platform/darwin/ios/framework/Source/FlutterDartProjectTest.mm index a28aaf8beeab9..19774d21bc52c 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterDartProjectTest.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterDartProjectTest.mm @@ -89,31 +89,24 @@ - (void)testFLTGetApplicationBundleWhenCurrentTargetIsExtension { - (void)testFLTAssetsURLFromBundle { { - // Found asset path in info.plist (even not reachable) + // Found asset path in info.plist id mockBundle = OCMClassMock([NSBundle class]); OCMStub([mockBundle objectForInfoDictionaryKey:@"FLTAssetsPath"]).andReturn(@"foo/assets"); - NSURL* mockAssetsURL = OCMClassMock([NSURL class]); - OCMStub([mockBundle URLForResource:@"foo/assets" withExtension:nil]).andReturn(mockAssetsURL); - OCMStub([mockAssetsURL checkResourceIsReachableAndReturnError:NULL]).andReturn(NO); - OCMStub([mockAssetsURL path]).andReturn(@"foo/assets"); - NSURL* url = FLTAssetsURLFromBundle(mockBundle); - XCTAssertEqualObjects(url.path, @"foo/assets"); + NSString* resultAssetsPath = @"path/to/foo/assets"; + OCMStub([mockBundle pathForResource:@"foo/assets" ofType:@""]).andReturn(resultAssetsPath); + NSString* path = FLTAssetsPathFromBundle(mockBundle); + XCTAssertEqualObjects(path, @"path/to/foo/assets"); } { // No asset path in info.plist, defaults to main bundle id mockBundle = OCMClassMock([NSBundle class]); id mockMainBundle = OCMPartialMock([NSBundle mainBundle]); - NSURL* mockAssetsURL = OCMClassMock([NSURL class]); - OCMStub([mockBundle URLForResource:@"Frameworks/App.framework/flutter_assets" - withExtension:nil]) - .andReturn(nil); - OCMStub([mockAssetsURL checkResourceIsReachableAndReturnError:NULL]).andReturn(NO); - OCMStub([mockAssetsURL path]).andReturn(@"path/to/foo/assets"); - OCMStub([mockMainBundle URLForResource:@"Frameworks/App.framework/flutter_assets" - withExtension:nil]) - .andReturn(mockAssetsURL); - NSURL* url = FLTAssetsURLFromBundle(mockBundle); - XCTAssertEqualObjects(url.path, @"path/to/foo/assets"); + NSString* resultAssetsPath = @"path/to/foo/assets"; + OCMStub([mockBundle pathForResource:@"flutter_assets" ofType:@""]).andReturn(nil); + OCMStub([mockMainBundle pathForResource:@"flutter_assets" ofType:@""]) + .andReturn(resultAssetsPath); + NSString* path = FLTAssetsPathFromBundle(mockBundle); + XCTAssertEqualObjects(path, @"path/to/foo/assets"); } } From e32c2d8c34b296da1b68f513f5d5ca493deb34de Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Wed, 20 Sep 2023 13:00:57 -0700 Subject: [PATCH 188/859] Make a variety of low-impact Clang tidy fixes in Impeller. (#46116) Work towards https://github.com/flutter/flutter/issues/134969. These are all self-contained, so I bundled them all together. All fixes are generated by `clang-tidy --fix`, and manual search/replace if that wasn't sufficient. --- impeller/base/thread.h | 9 ++++++--- impeller/base/version.h | 4 +++- impeller/geometry/color.h | 2 +- impeller/geometry/matrix.h | 2 +- impeller/golden_tests/metal_screenshot.h | 4 ++-- impeller/golden_tests/metal_screenshot.mm | 10 +++++----- impeller/renderer/pool.h | 4 ++-- impeller/scene/importer/importer_unittests.cc | 4 ++-- 8 files changed, 22 insertions(+), 17 deletions(-) diff --git a/impeller/base/thread.h b/impeller/base/thread.h index 9d44b7681cc93..75ab5aae9720d 100644 --- a/impeller/base/thread.h +++ b/impeller/base/thread.h @@ -53,7 +53,9 @@ class IPLR_CAPABILITY("mutex") RWMutex { class IPLR_SCOPED_CAPABILITY Lock { public: - Lock(Mutex& mutex) IPLR_ACQUIRE(mutex) : mutex_(mutex) { mutex_.Lock(); } + explicit Lock(Mutex& mutex) IPLR_ACQUIRE(mutex) : mutex_(mutex) { + mutex_.Lock(); + } ~Lock() IPLR_RELEASE() { mutex_.Unlock(); } @@ -65,7 +67,8 @@ class IPLR_SCOPED_CAPABILITY Lock { class IPLR_SCOPED_CAPABILITY ReaderLock { public: - ReaderLock(RWMutex& mutex) IPLR_ACQUIRE_SHARED(mutex) : mutex_(mutex) { + explicit ReaderLock(RWMutex& mutex) IPLR_ACQUIRE_SHARED(mutex) + : mutex_(mutex) { mutex_.LockReader(); } @@ -79,7 +82,7 @@ class IPLR_SCOPED_CAPABILITY ReaderLock { class IPLR_SCOPED_CAPABILITY WriterLock { public: - WriterLock(RWMutex& mutex) IPLR_ACQUIRE(mutex) : mutex_(mutex) { + explicit WriterLock(RWMutex& mutex) IPLR_ACQUIRE(mutex) : mutex_(mutex) { mutex_.LockWriter(); } diff --git a/impeller/base/version.h b/impeller/base/version.h index 8be914f6ba505..423e56272cf27 100644 --- a/impeller/base/version.h +++ b/impeller/base/version.h @@ -18,7 +18,9 @@ struct Version { size_t minor_version; size_t patch_version; - constexpr Version(size_t p_major = 0, size_t p_minor = 0, size_t p_patch = 0) + constexpr explicit Version(size_t p_major = 0, + size_t p_minor = 0, + size_t p_patch = 0) : major_version(p_major), minor_version(p_minor), patch_version(p_patch) {} diff --git a/impeller/geometry/color.h b/impeller/geometry/color.h index 02c89627d94d4..14247f1c6e5fd 100644 --- a/impeller/geometry/color.h +++ b/impeller/geometry/color.h @@ -144,7 +144,7 @@ struct Color { explicit Color(const ColorHSB& hsbColor); - Color(const Vector4& value); + explicit Color(const Vector4& value); constexpr Color(Scalar r, Scalar g, Scalar b, Scalar a) : red(r), green(g), blue(b), alpha(a) {} diff --git a/impeller/geometry/matrix.h b/impeller/geometry/matrix.h index 119702f6130a8..8a1f791e05cc4 100644 --- a/impeller/geometry/matrix.h +++ b/impeller/geometry/matrix.h @@ -62,7 +62,7 @@ struct Matrix { Vector4(m12, m13, m14, m15)} {} // clang-format on - Matrix(const MatrixDecomposition& decomposition); + explicit Matrix(const MatrixDecomposition& decomposition); // clang-format off static constexpr Matrix MakeColumn( diff --git a/impeller/golden_tests/metal_screenshot.h b/impeller/golden_tests/metal_screenshot.h index 0d2df7fc44309..30253989801de 100644 --- a/impeller/golden_tests/metal_screenshot.h +++ b/impeller/golden_tests/metal_screenshot.h @@ -30,9 +30,9 @@ class MetalScreenshot { private: friend class MetalScreenshoter; - MetalScreenshot(CGImageRef cgImage); + explicit MetalScreenshot(CGImageRef cgImage); FML_DISALLOW_COPY_AND_ASSIGN(MetalScreenshot); - CGImageRef cgImage_; + CGImageRef cg_image_; CFDataRef pixel_data_; }; } // namespace testing diff --git a/impeller/golden_tests/metal_screenshot.mm b/impeller/golden_tests/metal_screenshot.mm index db274a1de81e2..9a26bf08d3e5e 100644 --- a/impeller/golden_tests/metal_screenshot.mm +++ b/impeller/golden_tests/metal_screenshot.mm @@ -7,14 +7,14 @@ namespace impeller { namespace testing { -MetalScreenshot::MetalScreenshot(CGImageRef cgImage) : cgImage_(cgImage) { +MetalScreenshot::MetalScreenshot(CGImageRef cgImage) : cg_image_(cgImage) { CGDataProviderRef data_provider = CGImageGetDataProvider(cgImage); pixel_data_ = CGDataProviderCopyData(data_provider); } MetalScreenshot::~MetalScreenshot() { CFRelease(pixel_data_); - CGImageRelease(cgImage_); + CGImageRelease(cg_image_); } const UInt8* MetalScreenshot::GetBytes() const { @@ -22,11 +22,11 @@ } size_t MetalScreenshot::GetHeight() const { - return CGImageGetHeight(cgImage_); + return CGImageGetHeight(cg_image_); } size_t MetalScreenshot::GetWidth() const { - return CGImageGetWidth(cgImage_); + return CGImageGetWidth(cg_image_); } bool MetalScreenshot::WriteToPNG(const std::string& path) const { @@ -36,7 +36,7 @@ CGImageDestinationRef destination = CGImageDestinationCreateWithURL( (__bridge CFURLRef)output_url, kUTTypePNG, 1, nullptr); if (destination != nullptr) { - CGImageDestinationAddImage(destination, cgImage_, + CGImageDestinationAddImage(destination, cg_image_, (__bridge CFDictionaryRef) @{}); if (CGImageDestinationFinalize(destination)) { diff --git a/impeller/renderer/pool.h b/impeller/renderer/pool.h index f215ff2a6d975..a90357594196a 100644 --- a/impeller/renderer/pool.h +++ b/impeller/renderer/pool.h @@ -14,7 +14,7 @@ namespace impeller { template class Pool { public: - Pool(uint32_t limit_bytes) : limit_bytes_(limit_bytes), size_(0) {} + explicit Pool(uint32_t limit_bytes) : limit_bytes_(limit_bytes) {} std::shared_ptr Grab() { std::scoped_lock lock(mutex_); @@ -46,7 +46,7 @@ class Pool { private: std::vector> pool_; const uint32_t limit_bytes_; - uint32_t size_; + uint32_t size_ = 0; // Note: This would perform better as a lockless ring buffer. mutable std::mutex mutex_; }; diff --git a/impeller/scene/importer/importer_unittests.cc b/impeller/scene/importer/importer_unittests.cc index d172b7418deb4..c4aa6b27ec872 100644 --- a/impeller/scene/importer/importer_unittests.cc +++ b/impeller/scene/importer/importer_unittests.cc @@ -102,10 +102,10 @@ TEST(ImporterTest, CanParseSkinnedGLTF) { ASSERT_COLOR_NEAR(color, Color(1, 1, 1, 1)); Vector4 joints = ToVector4(vertex.joints()); - ASSERT_COLOR_NEAR(joints, Vector4(0, 0, 0, 0)); + ASSERT_VECTOR4_NEAR(joints, Vector4(0, 0, 0, 0)); Vector4 weights = ToVector4(vertex.weights()); - ASSERT_COLOR_NEAR(weights, Vector4(1, 0, 0, 0)); + ASSERT_VECTOR4_NEAR(weights, Vector4(1, 0, 0, 0)); ASSERT_EQ(scene.animations.size(), 2u); ASSERT_EQ(scene.animations[0]->name, "Idle"); From 1b747dfe594ba65ea1f9e92c262d384bb96fbb66 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 20 Sep 2023 16:12:03 -0400 Subject: [PATCH 189/859] Roll Skia from b3c1f49821d8 to d923bab3d5fa (2 revisions) (#46118) https://skia.googlesource.com/skia.git/+log/b3c1f49821d8..d923bab3d5fa 2023-09-20 johnstiles@google.com Add pack/unpack intrinsics to WGSL code generator. 2023-09-20 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from b8fa58ef74a9 to 2aba50a6944f (14 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index d6d8660b11ce9..0e3be4a44c0ce 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'b3c1f49821d89a77328cca9b97252dbbaecd25ae', + 'skia_revision': 'd923bab3d5facd39a517f8fa555deb3ed33ce27b', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index b2922536da0b7..d6e2df220c7e0 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: d5351ea7fed04e8f6f52a506e0cdba81 +Signature: 0d91c5c5ff84a2740d194a6659598ab1 ==================================================================================================== LIBRARY: etc1 From a5cdc3800470971c6c71dfb876539982f4240b15 Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Wed, 20 Sep 2023 13:24:01 -0700 Subject: [PATCH 190/859] Migrate from `LOG_X` to `kLogX`. (#46107) These should be entirely non-breaking, i.e. 1:1 and same backing `int` value. (See https://github.com/flutter/engine/pull/46052) --- fml/log_settings.cc | 5 ++-- fml/log_settings.h | 6 ++--- fml/logging.cc | 31 +++++++++++----------- fml/logging.h | 6 ++--- shell/common/persistent_cache_unittests.cc | 2 +- shell/common/shell.cc | 2 +- 6 files changed, 27 insertions(+), 25 deletions(-) diff --git a/fml/log_settings.cc b/fml/log_settings.cc index 93df3d4f23719..b81e78a3d70af 100644 --- a/fml/log_settings.cc +++ b/fml/log_settings.cc @@ -12,6 +12,7 @@ #include #include "flutter/fml/build_config.h" +#include "flutter/fml/log_level.h" #include "flutter/fml/logging.h" #if defined(OS_FUCHSIA) @@ -29,7 +30,7 @@ extern LogSettings g_log_settings; void SetLogSettings(const LogSettings& settings) { // Validate the new settings as we set them. state::g_log_settings.min_log_level = - std::min(LOG_FATAL, settings.min_log_level); + std::min(kLogFatal, settings.min_log_level); #if defined(OS_FUCHSIA) // Syslog should accept all logs, since filtering by severity is done by fml. fx_logger_t* logger = fx_log_get_logger(); @@ -45,7 +46,7 @@ LogSettings GetLogSettings() { } int GetMinLogLevel() { - return std::min(state::g_log_settings.min_log_level, LOG_FATAL); + return std::min(state::g_log_settings.min_log_level, kLogFatal); } ScopedSetLogSettings::ScopedSetLogSettings(const LogSettings& settings) { diff --git a/fml/log_settings.h b/fml/log_settings.h index 6a3664f0d3989..91587aaf82a06 100644 --- a/fml/log_settings.h +++ b/fml/log_settings.h @@ -17,12 +17,12 @@ struct LogSettings { // Anything at or above this level will be logged (if applicable). // Anything below this level will be silently ignored. // - // The log level defaults to 0 (LOG_INFO). + // The log level defaults to 0 (kLogInfo). // // Log messages for FML_VLOG(x) (from flutter/fml/logging.h) are logged // at level -x, so setting the min log level to negative values enables // verbose logging. - LogSeverity min_log_level = LOG_INFO; + LogSeverity min_log_level = kLogInfo; }; // Gets the active log settings for the current process. @@ -32,7 +32,7 @@ void SetLogSettings(const LogSettings& settings); LogSettings GetLogSettings(); // Gets the minimum log level for the current process. Never returs a value -// higher than LOG_FATAL. +// higher than kLogFatal. int GetMinLogLevel(); class ScopedSetLogSettings { diff --git a/fml/logging.cc b/fml/logging.cc index 0bffd08776f29..0d48943980e04 100644 --- a/fml/logging.cc +++ b/fml/logging.cc @@ -7,6 +7,7 @@ #include #include "flutter/fml/build_config.h" +#include "flutter/fml/log_level.h" #include "flutter/fml/log_settings.h" #include "flutter/fml/logging.h" @@ -23,11 +24,11 @@ namespace fml { namespace { #if !defined(OS_FUCHSIA) -const char* const kLogSeverityNames[LOG_NUM_SEVERITIES] = {"INFO", "WARNING", - "ERROR", "FATAL"}; +const char* const kLogSeverityNames[kLogNumSeverities] = {"INFO", "WARNING", + "ERROR", "FATAL"}; const char* GetNameForLogSeverity(LogSeverity severity) { - if (severity >= LOG_INFO && severity < LOG_NUM_SEVERITIES) { + if (severity >= kLogInfo && severity < kLogNumSeverities) { return kLogSeverityNames[severity]; } return "UNKNOWN"; @@ -58,12 +59,12 @@ LogMessage::LogMessage(LogSeverity severity, : severity_(severity), file_(file), line_(line) { #if !defined(OS_FUCHSIA) stream_ << "["; - if (severity >= LOG_INFO) { + if (severity >= kLogInfo) { stream_ << GetNameForLogSeverity(severity); } else { stream_ << "VERBOSE" << -severity; } - stream_ << ":" << (severity > LOG_INFO ? StripDots(file_) : StripPath(file_)) + stream_ << ":" << (severity > kLogInfo ? StripDots(file_) : StripPath(file_)) << "(" << line_ << ")] "; #endif @@ -109,16 +110,16 @@ LogMessage::~LogMessage() { android_LogPriority priority = (severity_ < 0) ? ANDROID_LOG_VERBOSE : ANDROID_LOG_UNKNOWN; switch (severity_) { - case LOG_INFO: + case kLogInfo: priority = ANDROID_LOG_INFO; break; - case LOG_WARNING: + case kLogWarning: priority = ANDROID_LOG_WARN; break; - case LOG_ERROR: + case kLogError: priority = ANDROID_LOG_ERROR; break; - case LOG_FATAL: + case kLogFatal: priority = ANDROID_LOG_FATAL; break; } @@ -128,16 +129,16 @@ LogMessage::~LogMessage() { #elif defined(OS_FUCHSIA) fx_log_severity_t fx_severity; switch (severity_) { - case LOG_INFO: + case kLogInfo: fx_severity = FX_LOG_INFO; break; - case LOG_WARNING: + case kLogWarning: fx_severity = FX_LOG_WARNING; break; - case LOG_ERROR: + case kLogError: fx_severity = FX_LOG_ERROR; break; - case LOG_FATAL: + case kLogFatal: fx_severity = FX_LOG_FATAL; break; default: @@ -157,13 +158,13 @@ LogMessage::~LogMessage() { #endif } - if (severity_ >= LOG_FATAL) { + if (severity_ >= kLogFatal) { KillProcess(); } } int GetVlogVerbosity() { - return std::max(-1, LOG_INFO - GetMinLogLevel()); + return std::max(-1, kLogInfo - GetMinLogLevel()); } bool ShouldCreateLogMessage(LogSeverity severity) { diff --git a/fml/logging.h b/fml/logging.h index 39dac4c8e1568..146c35bc88e28 100644 --- a/fml/logging.h +++ b/fml/logging.h @@ -57,7 +57,7 @@ class LogMessage { int GetVlogVerbosity(); // Returns true if |severity| is at or above the current minimum log level. -// LOG_FATAL and above is always true. +// kLogFatal and above is always true. bool ShouldCreateLogMessage(LogSeverity severity); [[noreturn]] void KillProcess(); @@ -74,7 +74,7 @@ bool ShouldCreateLogMessage(LogSeverity severity); true || (ignored) \ ? (void)0 \ : ::fml::LogMessageVoidify() & \ - ::fml::LogMessage(::fml::LOG_FATAL, 0, 0, nullptr).stream() + ::fml::LogMessage(::fml::kLogFatal, 0, 0, nullptr).stream() #define FML_LOG_IS_ON(severity) \ (::fml::ShouldCreateLogMessage(::fml::LOG_##severity)) @@ -84,7 +84,7 @@ bool ShouldCreateLogMessage(LogSeverity severity); #define FML_CHECK(condition) \ FML_LAZY_STREAM( \ - ::fml::LogMessage(::fml::LOG_FATAL, __FILE__, __LINE__, #condition) \ + ::fml::LogMessage(::fml::kLogFatal, __FILE__, __LINE__, #condition) \ .stream(), \ !(condition)) diff --git a/shell/common/persistent_cache_unittests.cc b/shell/common/persistent_cache_unittests.cc index e184bf2d57eef..427da231efed0 100644 --- a/shell/common/persistent_cache_unittests.cc +++ b/shell/common/persistent_cache_unittests.cc @@ -42,7 +42,7 @@ static void CheckTwoSkSLsAreLoaded() { TEST_F(PersistentCacheTest, CanLoadSkSLsFromAsset) { // Avoid polluting unit tests output by hiding INFO level logging. - fml::LogSettings warning_only = {fml::LOG_WARNING}; + fml::LogSettings warning_only = {fml::kLogWarning}; fml::ScopedSetLogSettings scoped_set_log_settings(warning_only); // The SkSL key is Base32 encoded. "IE" is the encoding of "A" and "II" is the diff --git a/shell/common/shell.cc b/shell/common/shell.cc index 261a41fff2767..8c456dfd159cc 100644 --- a/shell/common/shell.cc +++ b/shell/common/shell.cc @@ -104,7 +104,7 @@ void PerformInitializationTasks(Settings& settings) { { fml::LogSettings log_settings; log_settings.min_log_level = - settings.verbose_logging ? fml::LOG_INFO : fml::LOG_ERROR; + settings.verbose_logging ? fml::kLogInfo : fml::kLogError; fml::SetLogSettings(log_settings); } From e3437dc5aa0b8d7f981791eb1fda8ff94bbf5d81 Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Wed, 20 Sep 2023 13:24:26 -0700 Subject: [PATCH 191/859] Make `dl_(image|mask|path)_(filter|effect).h` tidy! (#46110) Closes https://github.com/flutter/flutter/issues/135064. Closes https://github.com/flutter/flutter/issues/135063. Closes https://github.com/flutter/flutter/issues/135062. I bundled a few of these together because they didn't have side-effects across the repo (self-contained). **NOTE**: All changes were auto-generated by `clang-tidy --fix`. --- display_list/effects/dl_image_filter.h | 16 +++++++++------- display_list/effects/dl_mask_filter.h | 2 +- display_list/effects/dl_path_effect.h | 2 +- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/display_list/effects/dl_image_filter.h b/display_list/effects/dl_image_filter.h index f7350e8bd767d..7d94da1eef84a 100644 --- a/display_list/effects/dl_image_filter.h +++ b/display_list/effects/dl_image_filter.h @@ -5,6 +5,8 @@ #ifndef FLUTTER_DISPLAY_LIST_EFFECTS_DL_IMAGE_FILTER_H_ #define FLUTTER_DISPLAY_LIST_EFFECTS_DL_IMAGE_FILTER_H_ +#include + #include "flutter/display_list/dl_attributes.h" #include "flutter/display_list/dl_sampling_options.h" #include "flutter/display_list/dl_tile_mode.h" @@ -223,7 +225,7 @@ class DlBlurImageFilter final : public DlImageFilter { : DlBlurImageFilter(filter->sigma_x_, filter->sigma_y_, filter->tile_mode_) {} - explicit DlBlurImageFilter(const DlBlurImageFilter& filter) + DlBlurImageFilter(const DlBlurImageFilter& filter) : DlBlurImageFilter(&filter) {} static std::shared_ptr Make(SkScalar sigma_x, @@ -295,7 +297,7 @@ class DlDilateImageFilter final : public DlImageFilter { : radius_x_(radius_x), radius_y_(radius_y) {} explicit DlDilateImageFilter(const DlDilateImageFilter* filter) : DlDilateImageFilter(filter->radius_x_, filter->radius_y_) {} - explicit DlDilateImageFilter(const DlDilateImageFilter& filter) + DlDilateImageFilter(const DlDilateImageFilter& filter) : DlDilateImageFilter(&filter) {} static std::shared_ptr Make(SkScalar radius_x, @@ -359,7 +361,7 @@ class DlErodeImageFilter final : public DlImageFilter { : radius_x_(radius_x), radius_y_(radius_y) {} explicit DlErodeImageFilter(const DlErodeImageFilter* filter) : DlErodeImageFilter(filter->radius_x_, filter->radius_y_) {} - explicit DlErodeImageFilter(const DlErodeImageFilter& filter) + DlErodeImageFilter(const DlErodeImageFilter& filter) : DlErodeImageFilter(&filter) {} static std::shared_ptr Make(SkScalar radius_x, @@ -423,7 +425,7 @@ class DlMatrixImageFilter final : public DlImageFilter { : matrix_(matrix), sampling_(sampling) {} explicit DlMatrixImageFilter(const DlMatrixImageFilter* filter) : DlMatrixImageFilter(filter->matrix_, filter->sampling_) {} - explicit DlMatrixImageFilter(const DlMatrixImageFilter& filter) + DlMatrixImageFilter(const DlMatrixImageFilter& filter) : DlMatrixImageFilter(&filter) {} static std::shared_ptr Make(const SkMatrix& matrix, @@ -510,7 +512,7 @@ class DlComposeImageFilter final : public DlImageFilter { : DlComposeImageFilter(&outer, &inner) {} explicit DlComposeImageFilter(const DlComposeImageFilter* filter) : DlComposeImageFilter(filter->outer_, filter->inner_) {} - explicit DlComposeImageFilter(const DlComposeImageFilter& filter) + DlComposeImageFilter(const DlComposeImageFilter& filter) : DlComposeImageFilter(&filter) {} static std::shared_ptr Make( @@ -586,7 +588,7 @@ class DlColorFilterImageFilter final : public DlImageFilter { : color_filter_(filter.shared()) {} explicit DlColorFilterImageFilter(const DlColorFilterImageFilter* filter) : DlColorFilterImageFilter(filter->color_filter_) {} - explicit DlColorFilterImageFilter(const DlColorFilterImageFilter& filter) + DlColorFilterImageFilter(const DlColorFilterImageFilter& filter) : DlColorFilterImageFilter(&filter) {} static std::shared_ptr Make( @@ -664,7 +666,7 @@ class DlLocalMatrixImageFilter final : public DlImageFilter { public: explicit DlLocalMatrixImageFilter(const SkMatrix& matrix, std::shared_ptr filter) - : matrix_(matrix), image_filter_(filter) {} + : matrix_(matrix), image_filter_(std::move(filter)) {} explicit DlLocalMatrixImageFilter(const DlLocalMatrixImageFilter* filter) : DlLocalMatrixImageFilter(filter->matrix_, filter->image_filter_) {} DlLocalMatrixImageFilter(const DlLocalMatrixImageFilter& filter) diff --git a/display_list/effects/dl_mask_filter.h b/display_list/effects/dl_mask_filter.h index 0749048caec60..d39839565ad2e 100644 --- a/display_list/effects/dl_mask_filter.h +++ b/display_list/effects/dl_mask_filter.h @@ -46,7 +46,7 @@ class DlBlurMaskFilter final : public DlMaskFilter { : style_(style), sigma_(sigma), respect_ctm_(respect_ctm) {} DlBlurMaskFilter(const DlBlurMaskFilter& filter) : DlBlurMaskFilter(filter.style_, filter.sigma_, filter.respect_ctm_) {} - DlBlurMaskFilter(const DlBlurMaskFilter* filter) + explicit DlBlurMaskFilter(const DlBlurMaskFilter* filter) : DlBlurMaskFilter(filter->style_, filter->sigma_, filter->respect_ctm_) { } diff --git a/display_list/effects/dl_path_effect.h b/display_list/effects/dl_path_effect.h index 0f9d0be60fa54..9c874fc203b3f 100644 --- a/display_list/effects/dl_path_effect.h +++ b/display_list/effects/dl_path_effect.h @@ -104,7 +104,7 @@ class DlDashPathEffect final : public DlPathEffect { } } - DlDashPathEffect(const DlDashPathEffect* dash_effect) + explicit DlDashPathEffect(const DlDashPathEffect* dash_effect) : DlDashPathEffect(dash_effect->intervals(), dash_effect->count_, dash_effect->phase_) {} From 8575a3b19b7d3fe5a2203a368e485c1c5326cd60 Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Wed, 20 Sep 2023 13:24:59 -0700 Subject: [PATCH 192/859] Make `dl_color_(filter|source)` tidy. (#46111) Closes https://github.com/flutter/flutter/issues/135060. Closes https://github.com/flutter/flutter/issues/135061. Bundled these two together as they are similar. Pretty boring `instance` -> `kInstance`, and `explicit`/`std::move`. --- display_list/effects/dl_color_filter.cc | 4 ++-- display_list/effects/dl_color_filter.h | 20 ++++++++++--------- .../effects/dl_color_filter_unittests.cc | 4 ++-- display_list/effects/dl_color_source.h | 17 +++++++++------- .../testing/dl_rendering_unittests.cc | 4 ++-- display_list/testing/dl_test_snippets.cc | 4 ++-- flow/layers/color_filter_layer_unittests.cc | 14 ++++++------- impeller/display_list/dl_unittests.cc | 6 ++++-- lib/ui/painting/color_filter.cc | 4 ++-- 9 files changed, 42 insertions(+), 35 deletions(-) diff --git a/display_list/effects/dl_color_filter.cc b/display_list/effects/dl_color_filter.cc index 99f4a7cdd8210..686484421561c 100644 --- a/display_list/effects/dl_color_filter.cc +++ b/display_list/effects/dl_color_filter.cc @@ -190,11 +190,11 @@ bool DlMatrixColorFilter::can_commute_with_opacity() const { } const std::shared_ptr - DlSrgbToLinearGammaColorFilter::instance = + DlSrgbToLinearGammaColorFilter::kInstance = std::make_shared(); const std::shared_ptr - DlLinearToSrgbGammaColorFilter::instance = + DlLinearToSrgbGammaColorFilter::kInstance = std::make_shared(); } // namespace flutter diff --git a/display_list/effects/dl_color_filter.h b/display_list/effects/dl_color_filter.h index a96517bb110db..42a4845e0a90c 100644 --- a/display_list/effects/dl_color_filter.h +++ b/display_list/effects/dl_color_filter.h @@ -63,7 +63,7 @@ class DlBlendColorFilter final : public DlColorFilter { : color_(color), mode_(mode) {} DlBlendColorFilter(const DlBlendColorFilter& filter) : DlBlendColorFilter(filter.color_, filter.mode_) {} - DlBlendColorFilter(const DlBlendColorFilter* filter) + explicit DlBlendColorFilter(const DlBlendColorFilter* filter) : DlBlendColorFilter(filter->color_, filter->mode_) {} static std::shared_ptr Make(DlColor color, DlBlendMode mode); @@ -113,12 +113,12 @@ class DlBlendColorFilter final : public DlColorFilter { // pixel data, the necessary pre<->non-pre conversions must be performed. class DlMatrixColorFilter final : public DlColorFilter { public: - DlMatrixColorFilter(const float matrix[20]) { + explicit DlMatrixColorFilter(const float matrix[20]) { memcpy(matrix_, matrix, sizeof(matrix_)); } DlMatrixColorFilter(const DlMatrixColorFilter& filter) : DlMatrixColorFilter(filter.matrix_) {} - DlMatrixColorFilter(const DlMatrixColorFilter* filter) + explicit DlMatrixColorFilter(const DlMatrixColorFilter* filter) : DlMatrixColorFilter(filter->matrix_) {} static std::shared_ptr Make(const float matrix[20]); @@ -155,12 +155,13 @@ class DlMatrixColorFilter final : public DlColorFilter { // gamma curve to the rendered pixels. class DlSrgbToLinearGammaColorFilter final : public DlColorFilter { public: - static const std::shared_ptr instance; + static const std::shared_ptr kInstance; DlSrgbToLinearGammaColorFilter() {} DlSrgbToLinearGammaColorFilter(const DlSrgbToLinearGammaColorFilter& filter) : DlSrgbToLinearGammaColorFilter() {} - DlSrgbToLinearGammaColorFilter(const DlSrgbToLinearGammaColorFilter* filter) + explicit DlSrgbToLinearGammaColorFilter( + const DlSrgbToLinearGammaColorFilter* filter) : DlSrgbToLinearGammaColorFilter() {} DlColorFilterType type() const override { @@ -170,7 +171,7 @@ class DlSrgbToLinearGammaColorFilter final : public DlColorFilter { bool modifies_transparent_black() const override { return false; } bool can_commute_with_opacity() const override { return true; } - std::shared_ptr shared() const override { return instance; } + std::shared_ptr shared() const override { return kInstance; } protected: bool equals_(const DlColorFilter& other) const override { @@ -186,12 +187,13 @@ class DlSrgbToLinearGammaColorFilter final : public DlColorFilter { // to the rendered pixels. class DlLinearToSrgbGammaColorFilter final : public DlColorFilter { public: - static const std::shared_ptr instance; + static const std::shared_ptr kInstance; DlLinearToSrgbGammaColorFilter() {} DlLinearToSrgbGammaColorFilter(const DlLinearToSrgbGammaColorFilter& filter) : DlLinearToSrgbGammaColorFilter() {} - DlLinearToSrgbGammaColorFilter(const DlLinearToSrgbGammaColorFilter* filter) + explicit DlLinearToSrgbGammaColorFilter( + const DlLinearToSrgbGammaColorFilter* filter) : DlLinearToSrgbGammaColorFilter() {} DlColorFilterType type() const override { @@ -201,7 +203,7 @@ class DlLinearToSrgbGammaColorFilter final : public DlColorFilter { bool modifies_transparent_black() const override { return false; } bool can_commute_with_opacity() const override { return true; } - std::shared_ptr shared() const override { return instance; } + std::shared_ptr shared() const override { return kInstance; } protected: bool equals_(const DlColorFilter& other) const override { diff --git a/display_list/effects/dl_color_filter_unittests.cc b/display_list/effects/dl_color_filter_unittests.cc index c82ca6eafef97..157348f3cf3ae 100644 --- a/display_list/effects/dl_color_filter_unittests.cc +++ b/display_list/effects/dl_color_filter_unittests.cc @@ -135,7 +135,7 @@ TEST(DisplayListColorFilter, SrgbToLinearEquals) { DlSrgbToLinearGammaColorFilter filter1; DlSrgbToLinearGammaColorFilter filter2; TestEquals(filter1, filter2); - TestEquals(filter1, *DlSrgbToLinearGammaColorFilter::instance); + TestEquals(filter1, *DlSrgbToLinearGammaColorFilter::kInstance); } TEST(DisplayListColorFilter, LinearToSrgbConstructor) { @@ -152,7 +152,7 @@ TEST(DisplayListColorFilter, LinearToSrgbEquals) { DlLinearToSrgbGammaColorFilter filter1; DlLinearToSrgbGammaColorFilter filter2; TestEquals(filter1, filter2); - TestEquals(filter1, *DlLinearToSrgbGammaColorFilter::instance); + TestEquals(filter1, *DlLinearToSrgbGammaColorFilter::kInstance); } } // namespace testing diff --git a/display_list/effects/dl_color_source.h b/display_list/effects/dl_color_source.h index 11a141da9c905..14eba1e23e2c7 100644 --- a/display_list/effects/dl_color_source.h +++ b/display_list/effects/dl_color_source.h @@ -178,7 +178,7 @@ class DlColorSource : public DlAttribute { class DlColorColorSource final : public DlColorSource { public: - DlColorColorSource(DlColor color) : color_(color) {} + explicit DlColorColorSource(DlColor color) : color_(color) {} bool isUIThreadSafe() const override { return true; } @@ -216,7 +216,7 @@ class DlMatrixColorSourceBase : public DlColorSource { } protected: - DlMatrixColorSourceBase(const SkMatrix* matrix) + explicit DlMatrixColorSourceBase(const SkMatrix* matrix) : matrix_(matrix ? *matrix : SkMatrix::I()) {} private: @@ -232,7 +232,7 @@ class DlImageColorSource final : public SkRefCnt, DlImageSampling sampling = DlImageSampling::kLinear, const SkMatrix* matrix = nullptr) : DlMatrixColorSourceBase(matrix), - image_(image), + image_(std::move(image)), horizontal_tile_mode_(horizontal_tile_mode), vertical_tile_mode_(vertical_tile_mode), sampling_(sampling) {} @@ -405,7 +405,8 @@ class DlLinearGradientColorSource final : public DlGradientColorSourceBase { store_color_stops(this + 1, colors, stops); } - DlLinearGradientColorSource(const DlLinearGradientColorSource* source) + explicit DlLinearGradientColorSource( + const DlLinearGradientColorSource* source) : DlGradientColorSourceBase(source->stop_count(), source->tile_mode(), source->matrix_ptr()), @@ -468,7 +469,8 @@ class DlRadialGradientColorSource final : public DlGradientColorSourceBase { store_color_stops(this + 1, colors, stops); } - DlRadialGradientColorSource(const DlRadialGradientColorSource* source) + explicit DlRadialGradientColorSource( + const DlRadialGradientColorSource* source) : DlGradientColorSourceBase(source->stop_count(), source->tile_mode(), source->matrix_ptr()), @@ -540,7 +542,8 @@ class DlConicalGradientColorSource final : public DlGradientColorSourceBase { store_color_stops(this + 1, colors, stops); } - DlConicalGradientColorSource(const DlConicalGradientColorSource* source) + explicit DlConicalGradientColorSource( + const DlConicalGradientColorSource* source) : DlGradientColorSourceBase(source->stop_count(), source->tile_mode(), source->matrix_ptr()), @@ -610,7 +613,7 @@ class DlSweepGradientColorSource final : public DlGradientColorSourceBase { store_color_stops(this + 1, colors, stops); } - DlSweepGradientColorSource(const DlSweepGradientColorSource* source) + explicit DlSweepGradientColorSource(const DlSweepGradientColorSource* source) : DlGradientColorSourceBase(source->stop_count(), source->tile_mode(), source->matrix_ptr()), diff --git a/display_list/testing/dl_rendering_unittests.cc b/display_list/testing/dl_rendering_unittests.cc index 9f25788384caf..5e451ffc459fa 100644 --- a/display_list/testing/dl_rendering_unittests.cc +++ b/display_list/testing/dl_rendering_unittests.cc @@ -3488,8 +3488,8 @@ TEST_F(DisplayListCanvas, SaveLayerConsolidation) { DlBlendMode::kSrcATop), std::make_shared(commutable_color_matrix), std::make_shared(non_commutable_color_matrix), - DlSrgbToLinearGammaColorFilter::instance, - DlLinearToSrgbGammaColorFilter::instance, + DlSrgbToLinearGammaColorFilter::kInstance, + DlLinearToSrgbGammaColorFilter::kInstance, }; std::vector> image_filters = { std::make_shared(5.0f, 5.0f, DlTileMode::kDecal), diff --git a/display_list/testing/dl_test_snippets.cc b/display_list/testing/dl_test_snippets.cc index 0a53f0337afd9..eed9300e8307a 100644 --- a/display_list/testing/dl_test_snippets.cc +++ b/display_list/testing/dl_test_snippets.cc @@ -212,11 +212,11 @@ std::vector CreateAllAttributesOps() { }}, {0, 16, 0, 0, [](DlOpReceiver& r) { - r.setColorFilter(DlSrgbToLinearGammaColorFilter::instance.get()); + r.setColorFilter(DlSrgbToLinearGammaColorFilter::kInstance.get()); }}, {0, 16, 0, 0, [](DlOpReceiver& r) { - r.setColorFilter(DlLinearToSrgbGammaColorFilter::instance.get()); + r.setColorFilter(DlLinearToSrgbGammaColorFilter::kInstance.get()); }}, {0, 0, 0, 0, [](DlOpReceiver& r) { r.setColorFilter(nullptr); }}, }}, diff --git a/flow/layers/color_filter_layer_unittests.cc b/flow/layers/color_filter_layer_unittests.cc index 1ec1f35bd0bcc..efafe90864049 100644 --- a/flow/layers/color_filter_layer_unittests.cc +++ b/flow/layers/color_filter_layer_unittests.cc @@ -89,7 +89,7 @@ TEST_F(ColorFilterLayerTest, SimpleFilter) { const SkPath child_path = SkPath().addRect(child_bounds); const DlPaint child_paint = DlPaint(DlColor::kYellow()); - auto dl_color_filter = DlLinearToSrgbGammaColorFilter::instance; + auto dl_color_filter = DlLinearToSrgbGammaColorFilter::kInstance; auto mock_layer = std::make_shared(child_path, child_paint); auto layer = std::make_shared(dl_color_filter); layer->Add(mock_layer); @@ -129,7 +129,7 @@ TEST_F(ColorFilterLayerTest, MultipleChildren) { const DlPaint child_paint2 = DlPaint(DlColor::kCyan()); auto mock_layer1 = std::make_shared(child_path1, child_paint1); auto mock_layer2 = std::make_shared(child_path2, child_paint2); - auto dl_color_filter = DlSrgbToLinearGammaColorFilter::instance; + auto dl_color_filter = DlSrgbToLinearGammaColorFilter::kInstance; auto layer = std::make_shared(dl_color_filter); layer->Add(mock_layer1); layer->Add(mock_layer2); @@ -179,7 +179,7 @@ TEST_F(ColorFilterLayerTest, Nested) { const DlPaint child_paint2 = DlPaint(DlColor::kCyan()); auto mock_layer1 = std::make_shared(child_path1, child_paint1); auto mock_layer2 = std::make_shared(child_path2, child_paint2); - auto dl_color_filter = DlSrgbToLinearGammaColorFilter::instance; + auto dl_color_filter = DlSrgbToLinearGammaColorFilter::kInstance; auto layer1 = std::make_shared(dl_color_filter); auto layer2 = std::make_shared(dl_color_filter); @@ -239,7 +239,7 @@ TEST_F(ColorFilterLayerTest, Readback) { // ColorFilterLayer does not read from surface auto layer = std::make_shared( - DlLinearToSrgbGammaColorFilter::instance); + DlLinearToSrgbGammaColorFilter::kInstance); preroll_context()->surface_needs_readback = false; preroll_context()->state_stack.set_preroll_delegate(initial_transform); layer->Preroll(preroll_context()); @@ -255,7 +255,7 @@ TEST_F(ColorFilterLayerTest, Readback) { } TEST_F(ColorFilterLayerTest, CacheChild) { - auto layer_filter = DlSrgbToLinearGammaColorFilter::instance; + auto layer_filter = DlSrgbToLinearGammaColorFilter::kInstance; auto initial_transform = SkMatrix::Translate(50.0, 25.5); auto other_transform = SkMatrix::Scale(1.0, 2.0); const SkPath child_path = SkPath().addRect(SkRect::MakeWH(5.0f, 5.0f)); @@ -296,7 +296,7 @@ TEST_F(ColorFilterLayerTest, CacheChild) { } TEST_F(ColorFilterLayerTest, CacheChildren) { - auto layer_filter = DlSrgbToLinearGammaColorFilter::instance; + auto layer_filter = DlSrgbToLinearGammaColorFilter::kInstance; auto initial_transform = SkMatrix::Translate(50.0, 25.5); auto other_transform = SkMatrix::Scale(1.0, 2.0); const SkPath child_path1 = SkPath().addRect(SkRect::MakeWH(5.0f, 5.0f)); @@ -342,7 +342,7 @@ TEST_F(ColorFilterLayerTest, CacheChildren) { } TEST_F(ColorFilterLayerTest, CacheColorFilterLayerSelf) { - auto layer_filter = DlSrgbToLinearGammaColorFilter::instance; + auto layer_filter = DlSrgbToLinearGammaColorFilter::kInstance; auto initial_transform = SkMatrix::Translate(50.0, 25.5); auto other_transform = SkMatrix::Scale(1.0, 2.0); const SkPath child_path1 = SkPath().addRect(SkRect::MakeWH(5.0f, 5.0f)); diff --git a/impeller/display_list/dl_unittests.cc b/impeller/display_list/dl_unittests.cc index 7b692363c54b1..896989c34ef3d 100644 --- a/impeller/display_list/dl_unittests.cc +++ b/impeller/display_list/dl_unittests.cc @@ -1196,11 +1196,13 @@ TEST_P(DisplayListTest, CanDrawRectWithLinearToSrgbColorFilter) { flutter::DlPaint paint; paint.setColor(flutter::DlColor(0xFF2196F3).withAlpha(128)); flutter::DisplayListBuilder builder; - paint.setColorFilter(flutter::DlLinearToSrgbGammaColorFilter::instance.get()); + paint.setColorFilter( + flutter::DlLinearToSrgbGammaColorFilter::kInstance.get()); builder.DrawRect(SkRect::MakeXYWH(0, 0, 200, 200), paint); builder.Translate(0, 200); - paint.setColorFilter(flutter::DlSrgbToLinearGammaColorFilter::instance.get()); + paint.setColorFilter( + flutter::DlSrgbToLinearGammaColorFilter::kInstance.get()); builder.DrawRect(SkRect::MakeXYWH(0, 0, 200, 200), paint); ASSERT_TRUE(OpenPlaygroundHere(builder.Build())); diff --git a/lib/ui/painting/color_filter.cc b/lib/ui/painting/color_filter.cc index 06d421b377369..f0d780d27208d 100644 --- a/lib/ui/painting/color_filter.cc +++ b/lib/ui/painting/color_filter.cc @@ -43,11 +43,11 @@ void ColorFilter::initMatrix(const tonic::Float32List& color_matrix) { } void ColorFilter::initLinearToSrgbGamma() { - filter_ = DlLinearToSrgbGammaColorFilter::instance; + filter_ = DlLinearToSrgbGammaColorFilter::kInstance; } void ColorFilter::initSrgbToLinearGamma() { - filter_ = DlSrgbToLinearGammaColorFilter::instance; + filter_ = DlSrgbToLinearGammaColorFilter::kInstance; } ColorFilter::~ColorFilter() = default; From 58a27855629a48027105ad03861f1912d2b49c14 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 20 Sep 2023 17:00:04 -0400 Subject: [PATCH 193/859] Roll Skia from d923bab3d5fa to b78c91996051 (4 revisions) (#46119) https://skia.googlesource.com/skia.git/+log/d923bab3d5fa..b78c91996051 2023-09-20 kjlubick@google.com Revert "Revert "Make SKP deserialize null instead of PNG images by default."" 2023-09-20 johnstiles@google.com Remove PackUnorm2x16 from SkSL tests. 2023-09-20 kjlubick@google.com Tidy up public.bzl rules for iOS 2023-09-20 johnstiles@google.com Fix test disables for PowerVR Rogue GE8300. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 0e3be4a44c0ce..71b3daa93560f 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'd923bab3d5facd39a517f8fa555deb3ed33ce27b', + 'skia_revision': 'b78c91996051d250b6a2946a7b6f14719e014d57', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index d6e2df220c7e0..0f537c698ef90 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 0d91c5c5ff84a2740d194a6659598ab1 +Signature: bb4f64aa5249d361a156d0ce29d71b3b ==================================================================================================== LIBRARY: etc1 @@ -389,6 +389,7 @@ FILE: ../../../third_party/skia/relnotes/directcontext_submit.md FILE: ../../../third_party/skia/relnotes/minify-mesh.md FILE: ../../../third_party/skia/relnotes/patheffects.md FILE: ../../../third_party/skia/relnotes/shadowflags.md +FILE: ../../../third_party/skia/relnotes/skpicture_png.md FILE: ../../../third_party/skia/src/gpu/gpu_workaround_list.txt FILE: ../../../third_party/skia/src/sksl/generated/sksl_compute.minified.sksl FILE: ../../../third_party/skia/src/sksl/generated/sksl_compute.unoptimized.sksl From 7709ad5a644871b8c1ddb1ce6f15ecddb42004c7 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 20 Sep 2023 17:40:30 -0400 Subject: [PATCH 194/859] Roll Skia from b78c91996051 to 86f48da2c812 (4 revisions) (#46121) https://skia.googlesource.com/skia.git/+log/b78c91996051..86f48da2c812 2023-09-20 skia-autoroll@skia-public.iam.gserviceaccount.com Roll jsfiddle-base from 5b50d4261358 to f4090760c770 2023-09-20 skia-autoroll@skia-public.iam.gserviceaccount.com Roll shaders-base from 40f881ed7b8b to c6e5b668b1a4 2023-09-20 skia-autoroll@skia-public.iam.gserviceaccount.com Roll debugger-app-base from 4bd4f2832866 to b5dc6c526875 2023-09-20 skia-autoroll@skia-public.iam.gserviceaccount.com Roll skottie-base from a8dcc44b5814 to b4674d1b2f50 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 71b3daa93560f..16c71aa1f8034 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'b78c91996051d250b6a2946a7b6f14719e014d57', + 'skia_revision': '86f48da2c812dad44a3a4180201a926b93faf34e', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 9d869cc23386b1af203fe29223212de3c0eaa15e Mon Sep 17 00:00:00 2001 From: godofredoc Date: Wed, 20 Sep 2023 15:08:05 -0700 Subject: [PATCH 195/859] Apply the right tag for linux fuchsia cipd packages. (#46123) The cipd packages were all being uploaded and tagged with git:HEAD. Bug: https://github.com/flutter/flutter/issues/126461 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- ci/builders/linux_fuchsia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/builders/linux_fuchsia.json b/ci/builders/linux_fuchsia.json index f66fee507795f..ef964c68b01aa 100644 --- a/ci/builders/linux_fuchsia.json +++ b/ci/builders/linux_fuchsia.json @@ -163,7 +163,7 @@ "name": "Upload to CIPD for arch: arm64", "parameters": [ "--engine-version", - "HEAD", + "${REVISION}", "--target-arch", "arm64", "--out-dir", @@ -180,7 +180,7 @@ "name": "Upload to CIPD for arch: x64", "parameters": [ "--engine-version", - "HEAD", + "${REVISION}", "--target-arch", "x64", "--out-dir", From bc9d2b2491db7a804775f0e2a53b2a8620adc620 Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Wed, 20 Sep 2023 15:08:07 -0700 Subject: [PATCH 196/859] Clang tidy-ify `DlColor` and friends. (#46122) Closes https://github.com/flutter/flutter/issues/135057. This is a fair bit more involved than previous changes, just due to the sheer number of implicit conversions. Highlights: - Made `public uint32_t argb` `private uint32_t argb_`, and added `argb()` instead. - Added `ToSk(DlColor)` instead of using implicit conversions. There were a bunch of places where I had to make a judgement call (particularly in tests) to keep the code a bit "messy", i.e. `DlColor(SK_RED)`, just to make the diff as small as possible and to prevent silly copy and paste bugs. I'd be open to filing a follow-up issue to reduce unnecessary wrapping. --- display_list/benchmarking/dl_benchmarks.cc | 21 ++++--- .../benchmarking/dl_complexity_unittests.cc | 10 +-- display_list/display_list_unittests.cc | 34 +++++----- display_list/dl_builder.cc | 2 +- display_list/dl_color.h | 63 ++++++++++--------- display_list/dl_color_unittests.cc | 2 +- display_list/dl_paint.h | 7 +-- display_list/dl_paint_unittests.cc | 4 +- display_list/effects/dl_color_source.h | 4 +- .../effects/dl_color_source_unittests.cc | 21 ++++--- display_list/skia/dl_sk_canvas.cc | 2 +- display_list/skia/dl_sk_conversions.cc | 6 +- display_list/skia/dl_sk_conversions.h | 6 ++ .../skia/dl_sk_conversions_unittests.cc | 18 +++++- display_list/skia/dl_sk_dispatcher.cc | 7 ++- display_list/skia/dl_sk_paint_dispatcher.cc | 4 +- display_list/skia/dl_sk_paint_dispatcher.h | 2 +- .../skia/dl_sk_paint_dispatcher_unittests.cc | 3 +- .../testing/dl_rendering_unittests.cc | 52 +++++++-------- display_list/testing/dl_test_snippets.cc | 30 +++++---- display_list/testing/dl_test_snippets.h | 4 +- flow/layers/color_filter_layer_unittests.cc | 4 +- flow/layers/image_filter_layer_unittests.cc | 2 +- flow/layers/performance_overlay_layer.cc | 2 +- .../performance_overlay_layer_unittests.cc | 2 +- flow/layers/shader_mask_layer_unittests.cc | 2 +- flow/paint_utils.cc | 2 +- flow/stopwatch_dl.cc | 6 +- flow/testing/layer_test.h | 11 ++-- .../skia_conversions_unittests.cc | 4 +- lib/ui/painting/canvas.cc | 4 +- lib/ui/painting/paint.cc | 4 +- lib/ui/painting/paint_unittests.cc | 4 +- testing/display_list_testing.cc | 2 +- .../txt/src/skia/paragraph_builder_skia.cc | 4 +- third_party/txt/src/skia/paragraph_skia.cc | 4 +- 36 files changed, 196 insertions(+), 163 deletions(-) diff --git a/display_list/benchmarking/dl_benchmarks.cc b/display_list/benchmarking/dl_benchmarks.cc index 88efb5d69af15..2a03b60c7a8e9 100644 --- a/display_list/benchmarking/dl_benchmarks.cc +++ b/display_list/benchmarking/dl_benchmarks.cc @@ -710,15 +710,15 @@ std::shared_ptr GetTestVertices(SkPoint center, // the center point C, this should create a triangle fan with vertices // C, O_0, O_1, O_2, O_3, ... vertices.push_back(center); - colors.push_back(SK_ColorCYAN); + colors.push_back(DlColor(SK_ColorCYAN)); for (size_t i = 0; i <= outer_points.size(); i++) { vertices.push_back(outer_points[i % outer_points.size()]); if (i % 3 == 0) { - colors.push_back(SK_ColorRED); + colors.push_back(DlColor(SK_ColorRED)); } else if (i % 3 == 1) { - colors.push_back(SK_ColorGREEN); + colors.push_back(DlColor(SK_ColorGREEN)); } else { - colors.push_back(SK_ColorBLUE); + colors.push_back(DlColor(SK_ColorBLUE)); } } break; @@ -728,11 +728,11 @@ std::shared_ptr GetTestVertices(SkPoint center, // vertices O_0, O_1, C, O_1, O_2, C, O_2, O_3, C, ... for (size_t i = 0; i < outer_vertex_count; i++) { vertices.push_back(outer_points[i % outer_points.size()]); - colors.push_back(SK_ColorRED); + colors.push_back(DlColor(SK_ColorRED)); vertices.push_back(outer_points[(i + 1) % outer_points.size()]); - colors.push_back(SK_ColorGREEN); + colors.push_back(DlColor(SK_ColorGREEN)); vertices.push_back(center); - colors.push_back(SK_ColorBLUE); + colors.push_back(DlColor(SK_ColorBLUE)); } break; case DlVertexMode::kTriangleStrip: @@ -741,10 +741,10 @@ std::shared_ptr GetTestVertices(SkPoint center, // O_0, O_1, C, O_2, O_3, C, O_4, O_5, C, ... for (size_t i = 0; i <= outer_vertex_count; i++) { vertices.push_back(outer_points[i % outer_points.size()]); - colors.push_back(i % 2 ? SK_ColorRED : SK_ColorGREEN); + colors.push_back(i % 2 ? DlColor(SK_ColorRED) : DlColor(SK_ColorGREEN)); if (i % 2 == 1) { vertices.push_back(center); - colors.push_back(SK_ColorBLUE); + colors.push_back(DlColor(SK_ColorBLUE)); } } break; @@ -1270,7 +1270,8 @@ void BM_DrawShadow(benchmark::State& state, // We can hardcode dpr to 1.0f as we're varying elevation, and dpr is only // ever used in conjunction with elevation. - builder.DrawShadow(path, SK_ColorBLUE, elevation, transparent_occluder, 1.0f); + builder.DrawShadow(path, DlColor(SK_ColorBLUE), elevation, + transparent_occluder, 1.0f); auto display_list = builder.Build(); // We only want to time the actual rasterization. diff --git a/display_list/benchmarking/dl_complexity_unittests.cc b/display_list/benchmarking/dl_complexity_unittests.cc index eee77ac9bdf55..df4fc68497336 100644 --- a/display_list/benchmarking/dl_complexity_unittests.cc +++ b/display_list/benchmarking/dl_complexity_unittests.cc @@ -190,7 +190,7 @@ TEST(DisplayListComplexity, DrawShadow) { line_path.moveTo(SkPoint::Make(0, 0)); line_path.lineTo(SkPoint::Make(10, 10)); line_path.close(); - builder_line.DrawShadow(line_path, SK_ColorRED, 10.0f, false, 1.0f); + builder_line.DrawShadow(line_path, DlColor(SK_ColorRED), 10.0f, false, 1.0f); auto display_list_line = builder_line.Build(); DisplayListBuilder builder_quad; @@ -198,7 +198,7 @@ TEST(DisplayListComplexity, DrawShadow) { quad_path.moveTo(SkPoint::Make(0, 0)); quad_path.quadTo(SkPoint::Make(10, 10), SkPoint::Make(10, 20)); quad_path.close(); - builder_quad.DrawShadow(quad_path, SK_ColorRED, 10.0f, false, 1.0f); + builder_quad.DrawShadow(quad_path, DlColor(SK_ColorRED), 10.0f, false, 1.0f); auto display_list_quad = builder_quad.Build(); DisplayListBuilder builder_conic; @@ -206,7 +206,8 @@ TEST(DisplayListComplexity, DrawShadow) { conic_path.moveTo(SkPoint::Make(0, 0)); conic_path.conicTo(SkPoint::Make(10, 10), SkPoint::Make(10, 20), 1.5f); conic_path.close(); - builder_conic.DrawShadow(conic_path, SK_ColorRED, 10.0f, false, 1.0f); + builder_conic.DrawShadow(conic_path, DlColor(SK_ColorRED), 10.0f, false, + 1.0f); auto display_list_conic = builder_conic.Build(); DisplayListBuilder builder_cubic; @@ -214,7 +215,8 @@ TEST(DisplayListComplexity, DrawShadow) { cubic_path.moveTo(SkPoint::Make(0, 0)); cubic_path.cubicTo(SkPoint::Make(10, 10), SkPoint::Make(10, 20), SkPoint::Make(20, 20)); - builder_cubic.DrawShadow(cubic_path, SK_ColorRED, 10.0f, false, 1.0f); + builder_cubic.DrawShadow(cubic_path, DlColor(SK_ColorRED), 10.0f, false, + 1.0f); auto display_list_cubic = builder_cubic.Build(); auto calculators = AccumulatorCalculators(); diff --git a/display_list/display_list_unittests.cc b/display_list/display_list_unittests.cc index bef888bcf8633..78185657d8d43 100644 --- a/display_list/display_list_unittests.cc +++ b/display_list/display_list_unittests.cc @@ -932,7 +932,8 @@ TEST_F(DisplayListTest, NestedOpCountMetricsSameAsSkPicture) { DlOpReceiver& receiver = ToReceiver(builder); for (int y = 10; y <= 60; y += 10) { for (int x = 10; x <= 60; x += 10) { - receiver.setColor(((x + y) % 20) == 10 ? SK_ColorRED : SK_ColorBLUE); + receiver.setColor(((x + y) % 20) == 10 ? DlColor(SK_ColorRED) + : DlColor(SK_ColorBLUE)); receiver.drawRect(SkRect::MakeXYWH(x, y, 80, 80)); } } @@ -1066,8 +1067,10 @@ TEST_F(DisplayListTest, SingleOpsMightSupportGroupOpacityBlendMode) { #body, [](DlOpReceiver& receiver) { body }, expect, expect) RUN_TESTS(receiver.drawPaint();); - RUN_TESTS2(receiver.drawColor(SK_ColorRED, DlBlendMode::kSrcOver);, true); - RUN_TESTS2(receiver.drawColor(SK_ColorRED, DlBlendMode::kSrc);, false); + RUN_TESTS2(receiver.drawColor(DlColor(SK_ColorRED), DlBlendMode::kSrcOver); + , true); + RUN_TESTS2(receiver.drawColor(DlColor(SK_ColorRED), DlBlendMode::kSrc); + , false); RUN_TESTS(receiver.drawLine({0, 0}, {10, 10});); RUN_TESTS(receiver.drawRect({0, 0, 10, 10});); RUN_TESTS(receiver.drawOval({0, 0, 10, 10});); @@ -1119,8 +1122,9 @@ TEST_F(DisplayListTest, SingleOpsMightSupportGroupOpacityBlendMode) { RUN_TESTS2(receiver.drawDisplayList(display_list);, false); } RUN_TESTS2(receiver.drawTextBlob(TestBlob1, 0, 0);, false); - RUN_TESTS2(receiver.drawShadow(kTestPath1, SK_ColorBLACK, 1.0, false, 1.0); - , false); + RUN_TESTS2( + receiver.drawShadow(kTestPath1, DlColor(SK_ColorBLACK), 1.0, false, 1.0); + , false); #undef RUN_TESTS2 #undef RUN_TESTS @@ -1250,7 +1254,7 @@ TEST_F(DisplayListTest, SaveLayerOneSimpleOpInheritsOpacity) { DisplayListBuilder builder; DlOpReceiver& receiver = ToReceiver(builder); - receiver.setColor(SkColorSetARGB(127, 255, 255, 255)); + receiver.setColor(DlColor(SkColorSetARGB(127, 255, 255, 255))); receiver.saveLayer(nullptr, SaveLayerOptions::kWithAttributes); receiver.drawRect({10, 10, 20, 20}); receiver.restore(); @@ -1280,7 +1284,7 @@ TEST_F(DisplayListTest, SaveLayerTwoOverlappingOpsDoesNotInheritOpacity) { DisplayListBuilder builder; DlOpReceiver& receiver = ToReceiver(builder); - receiver.setColor(SkColorSetARGB(127, 255, 255, 255)); + receiver.setColor(DlColor(SkColorSetARGB(127, 255, 255, 255))); receiver.saveLayer(nullptr, SaveLayerOptions::kWithAttributes); receiver.drawRect({10, 10, 20, 20}); receiver.drawRect({15, 15, 25, 25}); @@ -1300,7 +1304,7 @@ TEST_F(DisplayListTest, NestedSaveLayersMightInheritOpacity) { DisplayListBuilder builder; DlOpReceiver& receiver = ToReceiver(builder); - receiver.setColor(SkColorSetARGB(127, 255, 255, 255)); + receiver.setColor(DlColor(SkColorSetARGB(127, 255, 255, 255))); receiver.saveLayer(nullptr, SaveLayerOptions::kWithAttributes); receiver.saveLayer(nullptr, SaveLayerOptions::kWithAttributes); receiver.drawRect({10, 10, 20, 20}); @@ -1323,7 +1327,7 @@ TEST_F(DisplayListTest, NestedSaveLayersCanBothSupportOpacityOptimization) { DisplayListBuilder builder; DlOpReceiver& receiver = ToReceiver(builder); - receiver.setColor(SkColorSetARGB(127, 255, 255, 255)); + receiver.setColor(DlColor(SkColorSetARGB(127, 255, 255, 255))); receiver.saveLayer(nullptr, SaveLayerOptions::kWithAttributes); receiver.saveLayer(nullptr, SaveLayerOptions::kNoAttributes); receiver.drawRect({10, 10, 20, 20}); @@ -1340,7 +1344,7 @@ TEST_F(DisplayListTest, SaveLayerImageFilterDoesNotInheritOpacity) { DisplayListBuilder builder; DlOpReceiver& receiver = ToReceiver(builder); - receiver.setColor(SkColorSetARGB(127, 255, 255, 255)); + receiver.setColor(DlColor(SkColorSetARGB(127, 255, 255, 255))); receiver.setImageFilter(&kTestBlurImageFilter1); receiver.saveLayer(nullptr, SaveLayerOptions::kWithAttributes); receiver.setImageFilter(nullptr); @@ -1357,7 +1361,7 @@ TEST_F(DisplayListTest, SaveLayerColorFilterDoesNotInheritOpacity) { DisplayListBuilder builder; DlOpReceiver& receiver = ToReceiver(builder); - receiver.setColor(SkColorSetARGB(127, 255, 255, 255)); + receiver.setColor(DlColor(SkColorSetARGB(127, 255, 255, 255))); receiver.setColorFilter(&kTestMatrixColorFilter1); receiver.saveLayer(nullptr, SaveLayerOptions::kWithAttributes); receiver.setColorFilter(nullptr); @@ -1374,7 +1378,7 @@ TEST_F(DisplayListTest, SaveLayerSrcBlendDoesNotInheritOpacity) { DisplayListBuilder builder; DlOpReceiver& receiver = ToReceiver(builder); - receiver.setColor(SkColorSetARGB(127, 255, 255, 255)); + receiver.setColor(DlColor(SkColorSetARGB(127, 255, 255, 255))); receiver.setBlendMode(DlBlendMode::kSrc); receiver.saveLayer(nullptr, SaveLayerOptions::kWithAttributes); receiver.setBlendMode(DlBlendMode::kSrcOver); @@ -1392,7 +1396,7 @@ TEST_F(DisplayListTest, SaveLayerImageFilterOnChildInheritsOpacity) { DisplayListBuilder builder; DlOpReceiver& receiver = ToReceiver(builder); - receiver.setColor(SkColorSetARGB(127, 255, 255, 255)); + receiver.setColor(DlColor(SkColorSetARGB(127, 255, 255, 255))); receiver.saveLayer(nullptr, SaveLayerOptions::kWithAttributes); receiver.setImageFilter(&kTestBlurImageFilter1); receiver.drawRect({10, 10, 20, 20}); @@ -1408,7 +1412,7 @@ TEST_F(DisplayListTest, SaveLayerColorFilterOnChildDoesNotInheritOpacity) { DisplayListBuilder builder; DlOpReceiver& receiver = ToReceiver(builder); - receiver.setColor(SkColorSetARGB(127, 255, 255, 255)); + receiver.setColor(DlColor(SkColorSetARGB(127, 255, 255, 255))); receiver.saveLayer(nullptr, SaveLayerOptions::kWithAttributes); receiver.setColorFilter(&kTestMatrixColorFilter1); receiver.drawRect({10, 10, 20, 20}); @@ -1424,7 +1428,7 @@ TEST_F(DisplayListTest, SaveLayerSrcBlendOnChildDoesNotInheritOpacity) { DisplayListBuilder builder; DlOpReceiver& receiver = ToReceiver(builder); - receiver.setColor(SkColorSetARGB(127, 255, 255, 255)); + receiver.setColor(DlColor(SkColorSetARGB(127, 255, 255, 255))); receiver.saveLayer(nullptr, SaveLayerOptions::kWithAttributes); receiver.setBlendMode(DlBlendMode::kSrc); receiver.drawRect({10, 10, 20, 20}); diff --git a/display_list/dl_builder.cc b/display_list/dl_builder.cc index 2906f9a85fda7..ca0f7ff615c73 100644 --- a/display_list/dl_builder.cc +++ b/display_list/dl_builder.cc @@ -351,7 +351,7 @@ void DisplayListBuilder::SetAttributesFromPaint( setDither(paint.isDither()); } if (flags.applies_alpha_or_color()) { - setColor(paint.getColor().argb); + setColor(paint.getColor()); } if (flags.applies_blend()) { setBlendMode(paint.getBlendMode()); diff --git a/display_list/dl_color.h b/display_list/dl_color.h index 92a39150d2f2e..0b6bb2c21cb12 100644 --- a/display_list/dl_color.h +++ b/display_list/dl_color.h @@ -11,36 +11,34 @@ namespace flutter { struct DlColor { public: - constexpr DlColor() : argb(0xFF000000) {} - constexpr DlColor(uint32_t argb) : argb(argb) {} + constexpr DlColor() : argb_(0xFF000000) {} + constexpr explicit DlColor(uint32_t argb) : argb_(argb) {} static constexpr uint8_t toAlpha(SkScalar opacity) { return toC(opacity); } static constexpr SkScalar toOpacity(uint8_t alpha) { return toF(alpha); } // clang-format off - static constexpr DlColor kTransparent() {return 0x00000000;}; - static constexpr DlColor kBlack() {return 0xFF000000;}; - static constexpr DlColor kWhite() {return 0xFFFFFFFF;}; - static constexpr DlColor kRed() {return 0xFFFF0000;}; - static constexpr DlColor kGreen() {return 0xFF00FF00;}; - static constexpr DlColor kBlue() {return 0xFF0000FF;}; - static constexpr DlColor kCyan() {return 0xFF00FFFF;}; - static constexpr DlColor kMagenta() {return 0xFFFF00FF;}; - static constexpr DlColor kYellow() {return 0xFFFFFF00;}; - static constexpr DlColor kDarkGrey() {return 0xFF3F3F3F;}; - static constexpr DlColor kMidGrey() {return 0xFF808080;}; - static constexpr DlColor kLightGrey() {return 0xFFC0C0C0;}; + static constexpr DlColor kTransparent() {return DlColor(0x00000000);}; + static constexpr DlColor kBlack() {return DlColor(0xFF000000);}; + static constexpr DlColor kWhite() {return DlColor(0xFFFFFFFF);}; + static constexpr DlColor kRed() {return DlColor(0xFFFF0000);}; + static constexpr DlColor kGreen() {return DlColor(0xFF00FF00);}; + static constexpr DlColor kBlue() {return DlColor(0xFF0000FF);}; + static constexpr DlColor kCyan() {return DlColor(0xFF00FFFF);}; + static constexpr DlColor kMagenta() {return DlColor(0xFFFF00FF);}; + static constexpr DlColor kYellow() {return DlColor(0xFFFFFF00);}; + static constexpr DlColor kDarkGrey() {return DlColor(0xFF3F3F3F);}; + static constexpr DlColor kMidGrey() {return DlColor(0xFF808080);}; + static constexpr DlColor kLightGrey() {return DlColor(0xFFC0C0C0);}; // clang-format on - uint32_t argb; - constexpr bool isOpaque() const { return getAlpha() == 0xFF; } constexpr bool isTransparent() const { return getAlpha() == 0; } - constexpr int getAlpha() const { return argb >> 24; } - constexpr int getRed() const { return (argb >> 16) & 0xFF; } - constexpr int getGreen() const { return (argb >> 8) & 0xFF; } - constexpr int getBlue() const { return argb & 0xFF; } + constexpr int getAlpha() const { return argb_ >> 24; } + constexpr int getRed() const { return (argb_ >> 16) & 0xFF; } + constexpr int getGreen() const { return (argb_ >> 8) & 0xFF; } + constexpr int getBlue() const { return argb_ & 0xFF; } constexpr float getAlphaF() const { return toF(getAlpha()); } constexpr float getRedF() const { return toF(getRed()); } @@ -49,26 +47,26 @@ struct DlColor { constexpr uint32_t premultipliedArgb() const { if (isOpaque()) { - return argb; + return argb_; } float f = getAlphaF(); - return (argb & 0xFF000000) | // + return (argb_ & 0xFF000000) | // toC(getRedF() * f) << 16 | // toC(getGreenF() * f) << 8 | // toC(getBlueF() * f); } constexpr DlColor withAlpha(uint8_t alpha) const { // - return (argb & 0x00FFFFFF) | (alpha << 24); + return DlColor((argb_ & 0x00FFFFFF) | (alpha << 24)); } constexpr DlColor withRed(uint8_t red) const { // - return (argb & 0xFF00FFFF) | (red << 16); + return DlColor((argb_ & 0xFF00FFFF) | (red << 16)); } constexpr DlColor withGreen(uint8_t green) const { // - return (argb & 0xFFFF00FF) | (green << 8); + return DlColor((argb_ & 0xFFFF00FF) | (green << 8)); } constexpr DlColor withBlue(uint8_t blue) const { // - return (argb & 0xFFFFFF00) | (blue << 0); + return DlColor((argb_ & 0xFFFFFF00) | (blue << 0)); } constexpr DlColor modulateOpacity(float opacity) const { @@ -77,13 +75,16 @@ struct DlColor { : withAlpha(round(getAlpha() * opacity)); } - operator uint32_t() const { return argb; } - bool operator==(DlColor const& other) const { return argb == other.argb; } - bool operator!=(DlColor const& other) const { return argb != other.argb; } - bool operator==(uint32_t const& other) const { return argb == other; } - bool operator!=(uint32_t const& other) const { return argb != other; } + constexpr uint32_t argb() const { return argb_; } + + bool operator==(DlColor const& other) const { return argb_ == other.argb_; } + bool operator!=(DlColor const& other) const { return argb_ != other.argb_; } + bool operator==(uint32_t const& other) const { return argb_ == other; } + bool operator!=(uint32_t const& other) const { return argb_ != other; } private: + uint32_t argb_; + static float toF(uint8_t comp) { return comp * (1.0f / 255); } static uint8_t toC(float fComp) { return round(fComp * 255); } }; diff --git a/display_list/dl_color_unittests.cc b/display_list/dl_color_unittests.cc index 37d60b26c8fc7..7a6c6a15ed82d 100644 --- a/display_list/dl_color_unittests.cc +++ b/display_list/dl_color_unittests.cc @@ -14,7 +14,7 @@ static void arraysEqual(const uint32_t* ints, const DlColor* colors, int count) { for (int i = 0; i < count; i++) { - EXPECT_TRUE(ints[i] == colors[i]); + EXPECT_TRUE(ints[i] == colors[i].argb()); } } diff --git a/display_list/dl_paint.h b/display_list/dl_paint.h index 3d9220f57e3d6..b17dbf943eebf 100644 --- a/display_list/dl_paint.h +++ b/display_list/dl_paint.h @@ -78,11 +78,8 @@ class DlPaint { return *this; } - uint8_t getAlpha() const { return color_.argb >> 24; } - DlPaint& setAlpha(uint8_t alpha) { - color_.argb = alpha << 24 | (color_.argb & 0x00FFFFFF); - return *this; - } + uint8_t getAlpha() const { return color_.argb() >> 24; } + DlPaint& setAlpha(uint8_t alpha) { return setColor(color_.withAlpha(alpha)); } SkScalar getOpacity() const { return color_.getAlphaF(); } DlPaint& setOpacity(SkScalar opacity) { setAlpha(SkScalarRoundToInt(opacity * 0xff)); diff --git a/display_list/dl_paint_unittests.cc b/display_list/dl_paint_unittests.cc index a92082d0fefb2..2a34c466f60d1 100644 --- a/display_list/dl_paint_unittests.cc +++ b/display_list/dl_paint_unittests.cc @@ -42,14 +42,14 @@ TEST(DisplayListPaint, ConstructorDefaults) { EXPECT_EQ(paint, DlPaint()); EXPECT_EQ(paint, DlPaint(DlColor::kBlack())); - EXPECT_EQ(paint, DlPaint(0xFF000000)); + EXPECT_EQ(paint, DlPaint(DlColor(0xFF000000))); EXPECT_NE(paint, DlPaint().setAntiAlias(true)); EXPECT_NE(paint, DlPaint().setDither(true)); EXPECT_NE(paint, DlPaint().setInvertColors(true)); EXPECT_NE(paint, DlPaint().setColor(DlColor::kGreen())); EXPECT_NE(paint, DlPaint(DlColor::kGreen())); - EXPECT_NE(paint, DlPaint(0xFF00FF00)); + EXPECT_NE(paint, DlPaint(DlColor(0xFF00FF00))); EXPECT_NE(paint, DlPaint().setAlpha(0x7f)); EXPECT_NE(paint, DlPaint().setBlendMode(DlBlendMode::kDstIn)); EXPECT_NE(paint, DlPaint().setDrawStyle(DlDrawStyle::kStrokeAndFill)); diff --git a/display_list/effects/dl_color_source.h b/display_list/effects/dl_color_source.h index 14eba1e23e2c7..094006eb3ef40 100644 --- a/display_list/effects/dl_color_source.h +++ b/display_list/effects/dl_color_source.h @@ -191,7 +191,7 @@ class DlColorColorSource final : public DlColorSource { DlColorSourceType type() const override { return DlColorSourceType::kColor; } size_t size() const override { return sizeof(*this); } - bool is_opaque() const override { return (color_ >> 24) == 255; } + bool is_opaque() const override { return color_.getAlpha() == 255; } DlColor color() const { return color_; } @@ -290,7 +290,7 @@ class DlGradientColorSourceBase : public DlMatrixColorSourceBase { } const DlColor* my_colors = colors(); for (uint32_t i = 0; i < stop_count_; i++) { - if ((my_colors[i] >> 24) < 255) { + if (my_colors[i].getAlpha() < 255) { return false; } } diff --git a/display_list/effects/dl_color_source_unittests.cc b/display_list/effects/dl_color_source_unittests.cc index 96b2cc0f6ad9c..6fc0aac4cddb4 100644 --- a/display_list/effects/dl_color_source_unittests.cc +++ b/display_list/effects/dl_color_source_unittests.cc @@ -5,6 +5,7 @@ #include #include +#include "display_list/dl_color.h" #include "flutter/display_list/dl_sampling_options.h" #include "flutter/display_list/effects/dl_color_source.h" #include "flutter/display_list/effects/dl_runtime_effect.h" @@ -86,17 +87,17 @@ static constexpr SkPoint kTestPoints2[2] = { }; TEST(DisplayListColorSource, ColorConstructor) { - DlColorColorSource source(SK_ColorRED); + DlColorColorSource source(DlColor::kRed()); } TEST(DisplayListColorSource, ColorShared) { - DlColorColorSource source(SK_ColorRED); + DlColorColorSource source(DlColor::kRed()); ASSERT_NE(source.shared().get(), &source); ASSERT_EQ(*source.shared(), source); } TEST(DisplayListColorSource, ColorAsColor) { - DlColorColorSource source(SK_ColorRED); + DlColorColorSource source(DlColor::kRed()); ASSERT_NE(source.asColor(), nullptr); ASSERT_EQ(source.asColor(), &source); @@ -109,26 +110,26 @@ TEST(DisplayListColorSource, ColorAsColor) { } TEST(DisplayListColorSource, ColorContents) { - DlColorColorSource source(SK_ColorRED); - ASSERT_EQ(source.color(), SK_ColorRED); + DlColorColorSource source(DlColor::kRed()); + ASSERT_EQ(source.color(), DlColor::kRed()); ASSERT_EQ(source.is_opaque(), true); for (int i = 0; i < 255; i++) { SkColor alpha_color = SkColorSetA(SK_ColorRED, i); - DlColorColorSource alpha_source(alpha_color); + auto const alpha_source = DlColorColorSource(DlColor(alpha_color)); ASSERT_EQ(alpha_source.color(), alpha_color); ASSERT_EQ(alpha_source.is_opaque(), false); } } TEST(DisplayListColorSource, ColorEquals) { - DlColorColorSource source1(SK_ColorRED); - DlColorColorSource source2(SK_ColorRED); + DlColorColorSource source1(DlColor::kRed()); + DlColorColorSource source2(DlColor::kRed()); TestEquals(source1, source2); } TEST(DisplayListColorSource, ColorNotEquals) { - DlColorColorSource source1(SK_ColorRED); - DlColorColorSource source2(SK_ColorBLUE); + DlColorColorSource source1(DlColor::kRed()); + DlColorColorSource source2(DlColor::kBlue()); TestNotEquals(source1, source2, "Color differs"); } diff --git a/display_list/skia/dl_sk_canvas.cc b/display_list/skia/dl_sk_canvas.cc index 9299c9a6ff9d7..a6efddef43800 100644 --- a/display_list/skia/dl_sk_canvas.cc +++ b/display_list/skia/dl_sk_canvas.cc @@ -187,7 +187,7 @@ void DlSkCanvasAdapter::DrawPaint(const DlPaint& paint) { } void DlSkCanvasAdapter::DrawColor(DlColor color, DlBlendMode mode) { - delegate_->drawColor(color, ToSk(mode)); + delegate_->drawColor(ToSk(color), ToSk(mode)); } void DlSkCanvasAdapter::DrawLine(const SkPoint& p0, diff --git a/display_list/skia/dl_sk_conversions.cc b/display_list/skia/dl_sk_conversions.cc index 16f5fc710a343..2e7a42f5f91a4 100644 --- a/display_list/skia/dl_sk_conversions.cc +++ b/display_list/skia/dl_sk_conversions.cc @@ -23,7 +23,7 @@ SkPaint ToSk(const DlPaint& paint, bool force_stroke) { SkPaint sk_paint; sk_paint.setAntiAlias(paint.isAntiAlias()); - sk_paint.setColor(paint.getColor()); + sk_paint.setColor(ToSk(paint.getColor())); sk_paint.setBlendMode(ToSk(paint.getBlendMode())); sk_paint.setStyle(force_stroke ? SkPaint::kStroke_Style : ToSk(paint.getDrawStyle())); @@ -76,7 +76,7 @@ sk_sp ToSk(const DlColorSource* source) { case DlColorSourceType::kColor: { const DlColorColorSource* color_source = source->asColor(); FML_DCHECK(color_source != nullptr); - return SkShaders::Color(color_source->color()); + return SkShaders::Color(ToSk(color_source->color())); } case DlColorSourceType::kImage: { const DlImageColorSource* image_source = source->asImage(); @@ -240,7 +240,7 @@ sk_sp ToSk(const DlColorFilter* filter) { case DlColorFilterType::kBlend: { const DlBlendColorFilter* blend_filter = filter->asBlend(); FML_DCHECK(blend_filter != nullptr); - return SkColorFilters::Blend(blend_filter->color(), + return SkColorFilters::Blend(ToSk(blend_filter->color()), ToSk(blend_filter->mode())); } case DlColorFilterType::kMatrix: { diff --git a/display_list/skia/dl_sk_conversions.h b/display_list/skia/dl_sk_conversions.h index a1a9f6ce838b8..a162f8e65d3a1 100644 --- a/display_list/skia/dl_sk_conversions.h +++ b/display_list/skia/dl_sk_conversions.h @@ -16,6 +16,12 @@ inline SkBlendMode ToSk(DlBlendMode mode) { return static_cast(mode); } +inline SkColor ToSk(DlColor color) { + // This is safe because both SkColor and DlColor are backed by ARGB uint32_t. + // See dl_sk_conversions_unittests.cc. + return reinterpret_cast(color); +} + inline SkPaint::Style ToSk(DlDrawStyle style) { return static_cast(style); } diff --git a/display_list/skia/dl_sk_conversions_unittests.cc b/display_list/skia/dl_sk_conversions_unittests.cc index 1bae18a3ca1dd..be782181d994e 100644 --- a/display_list/skia/dl_sk_conversions_unittests.cc +++ b/display_list/skia/dl_sk_conversions_unittests.cc @@ -26,6 +26,21 @@ TEST(DisplayListImageFilter, LocalImageSkiaNull) { ASSERT_EQ(ToSk(dl_local_matrix_filter), nullptr); } +TEST(DisplayListSkConversions, ToSkColor) { + // Red + ASSERT_EQ(ToSk(DlColor::kRed()), SK_ColorRED); + + // Green + ASSERT_EQ(ToSk(DlColor::kGreen()), SK_ColorGREEN); + + // Blue + ASSERT_EQ(ToSk(DlColor::kBlue()), SK_ColorBLUE); + + // Half transparent grey + auto const grey_hex_half_opaque = 0x7F999999; + ASSERT_EQ(ToSk(DlColor(grey_hex_half_opaque)), SkColor(grey_hex_half_opaque)); +} + TEST(DisplayListSkConversions, ToSkTileMode) { ASSERT_EQ(ToSk(DlTileMode::kClamp), SkTileMode::kClamp); ASSERT_EQ(ToSk(DlTileMode::kRepeat), SkTileMode::kRepeat); @@ -136,7 +151,8 @@ TEST(DisplayListSkConversions, ToSkBlendMode) { TEST(DisplayListSkConversions, BlendColorFilterModifiesTransparency) { auto test_mode_color = [](DlBlendMode mode, DlColor color) { std::stringstream desc_str; - desc_str << "blend[" << static_cast(mode) << ", " << color << "]"; + desc_str << "blend[" << static_cast(mode) << ", " << color.argb() + << "]"; std::string desc = desc_str.str(); DlBlendColorFilter filter(color, mode); if (filter.modifies_transparent_black()) { diff --git a/display_list/skia/dl_sk_dispatcher.cc b/display_list/skia/dl_sk_dispatcher.cc index def08fa8886a3..d9cdaaf3c9f9e 100644 --- a/display_list/skia/dl_sk_dispatcher.cc +++ b/display_list/skia/dl_sk_dispatcher.cc @@ -141,7 +141,7 @@ void DlSkCanvasDispatcher::drawPaint() { void DlSkCanvasDispatcher::drawColor(DlColor color, DlBlendMode mode) { // SkCanvas::drawColor(SkColor) does the following conversion anyway // We do it here manually to increase precision on applying opacity - SkColor4f color4f = SkColor4f::FromColor(color); + SkColor4f color4f = SkColor4f::FromColor(ToSk(color)); color4f.fA *= opacity(); canvas_->drawColor(color4f, ToSk(mode)); } @@ -283,8 +283,9 @@ void DlSkCanvasDispatcher::DrawShadow(SkCanvas* canvas, ? SkShadowFlags::kTransparentOccluder_ShadowFlag : SkShadowFlags::kNone_ShadowFlag; flags |= SkShadowFlags::kDirectionalLight_ShadowFlag; - SkColor in_ambient = SkColorSetA(color, kAmbientAlpha * SkColorGetA(color)); - SkColor in_spot = SkColorSetA(color, kSpotAlpha * SkColorGetA(color)); + SkColor in_ambient = + SkColorSetA(ToSk(color), kAmbientAlpha * color.getAlpha()); + SkColor in_spot = SkColorSetA(ToSk(color), kSpotAlpha * color.getAlpha()); SkColor ambient_color, spot_color; SkShadowUtils::ComputeTonalColors(in_ambient, in_spot, &ambient_color, &spot_color); diff --git a/display_list/skia/dl_sk_paint_dispatcher.cc b/display_list/skia/dl_sk_paint_dispatcher.cc index 992b5146a6c13..43562405d4e23 100644 --- a/display_list/skia/dl_sk_paint_dispatcher.cc +++ b/display_list/skia/dl_sk_paint_dispatcher.cc @@ -63,8 +63,8 @@ void DlSkPaintDispatchHelper::setStrokeMiter(SkScalar limit) { paint_.setStrokeMiter(limit); } void DlSkPaintDispatchHelper::setColor(DlColor color) { - current_color_ = color; - paint_.setColor(color); + current_color_ = ToSk(color); + paint_.setColor(ToSk(color)); if (has_opacity()) { paint_.setAlphaf(paint_.getAlphaf() * opacity()); } diff --git a/display_list/skia/dl_sk_paint_dispatcher.h b/display_list/skia/dl_sk_paint_dispatcher.h index 46ca117b5592e..de404bbfbe040 100644 --- a/display_list/skia/dl_sk_paint_dispatcher.h +++ b/display_list/skia/dl_sk_paint_dispatcher.h @@ -85,7 +85,7 @@ class DlSkPaintDispatchHelper : public virtual DlOpReceiver { void set_opacity(SkScalar opacity) { if (opacity_ != opacity) { opacity_ = opacity; - setColor(current_color_); + setColor(DlColor(current_color_)); } } diff --git a/display_list/skia/dl_sk_paint_dispatcher_unittests.cc b/display_list/skia/dl_sk_paint_dispatcher_unittests.cc index 514a3a9d10018..2b638845757f9 100644 --- a/display_list/skia/dl_sk_paint_dispatcher_unittests.cc +++ b/display_list/skia/dl_sk_paint_dispatcher_unittests.cc @@ -22,7 +22,8 @@ class MockDispatchHelper final : public virtual DlOpReceiver, void restore() override { DlSkPaintDispatchHelper::restore_opacity(); } }; -static const DlColor kTestColors[2] = {0xFF000000, 0xFFFFFFFF}; +static const DlColor kTestColors[2] = {DlColor(0xFF000000), + DlColor(0xFFFFFFFF)}; static const float kTestStops[2] = {0.0f, 1.0f}; static const auto kTestLinearGradient = DlColorSource::MakeLinear(SkPoint::Make(0.0f, 0.0f), diff --git a/display_list/testing/dl_rendering_unittests.cc b/display_list/testing/dl_rendering_unittests.cc index 5e451ffc459fa..8e080cc9f98ae 100644 --- a/display_list/testing/dl_rendering_unittests.cc +++ b/display_list/testing/dl_rendering_unittests.cc @@ -493,7 +493,7 @@ class RenderEnvironment { auto surface = getSurface(info.width, info.height); FML_DCHECK(surface != nullptr); auto canvas = surface->getCanvas(); - canvas->clear(info.bg); + canvas->clear(ToSk(info.bg)); int restore_count = canvas->save(); canvas->scale(info.scale, info.scale); @@ -564,7 +564,7 @@ class CaseParameters { dl_setup, kEmptySkRenderer, kEmptyDlRenderer, - SK_ColorTRANSPARENT, + DlColor(SK_ColorTRANSPARENT), false, false, false) {} @@ -985,7 +985,7 @@ class CanvasCompareTester { "saveLayer with alpha, no bounds", [=](SkCanvas* cv, SkPaint& p) { SkPaint save_p; - save_p.setColor(alpha_layer_color); + save_p.setColor(ToSk(alpha_layer_color)); cv->saveLayer(nullptr, &save_p); }, [=](DlCanvas* cv, DlPaint& p) { @@ -999,7 +999,7 @@ class CanvasCompareTester { "saveLayer with peephole alpha, no bounds", [=](SkCanvas* cv, SkPaint& p) { SkPaint save_p; - save_p.setColor(alpha_layer_color); + save_p.setColor(ToSk(alpha_layer_color)); cv->saveLayer(nullptr, &save_p); }, [=](DlCanvas* cv, DlPaint& p) { @@ -1013,7 +1013,7 @@ class CanvasCompareTester { "saveLayer with alpha and bounds", [=](SkCanvas* cv, SkPaint& p) { SkPaint save_p; - save_p.setColor(alpha_layer_color); + save_p.setColor(ToSk(alpha_layer_color)); cv->saveLayer(layer_bounds, &save_p); }, [=](DlCanvas* cv, DlPaint& p) { @@ -1273,7 +1273,7 @@ class CanvasCompareTester { "Blend == SrcIn", [=](SkCanvas*, SkPaint& p) { p.setBlendMode(SkBlendMode::kSrcIn); - p.setColor(blendable_color); + p.setColor(ToSk(blendable_color)); }, [=](DlCanvas*, DlPaint& p) { p.setBlendMode(DlBlendMode::kSrcIn); @@ -1285,7 +1285,7 @@ class CanvasCompareTester { "Blend == DstIn", [=](SkCanvas*, SkPaint& p) { p.setBlendMode(SkBlendMode::kDstIn); - p.setColor(blendable_color); + p.setColor(ToSk(blendable_color)); }, [=](DlCanvas*, DlPaint& p) { p.setBlendMode(DlBlendMode::kDstIn); @@ -1432,7 +1432,7 @@ class CanvasCompareTester { CaseParameters( "ColorFilter == RotateRGB", [=](SkCanvas*, SkPaint& p) { - p.setColor(DlColor::kYellow()); + p.setColor(ToSk(DlColor::kYellow())); p.setColorFilter(sk_color_filter); }, [=](DlCanvas*, DlPaint& p) { @@ -1448,7 +1448,7 @@ class CanvasCompareTester { CaseParameters( "ColorFilter == Invert", [=](SkCanvas*, SkPaint& p) { - p.setColor(DlColor::kYellow()); + p.setColor(ToSk(DlColor::kYellow())); p.setColorFilter(SkColorFilters::Matrix(invert_color_matrix)); }, [=](DlCanvas*, DlPaint& p) { @@ -2130,11 +2130,11 @@ class CanvasCompareTester { for (int x = 0; x < kTestWidth; x++) { uint32_t ref_pixel = ref_row[x]; uint32_t test_pixel = test_row[x]; - if (ref_pixel != bg.argb || test_pixel != bg.argb) { + if (ref_pixel != bg.argb() || test_pixel != bg.argb()) { pixels_touched++; for (int i = 0; i < 32; i += 8) { int ref_comp = (ref_pixel >> i) & 0xff; - int bg_comp = (bg.argb >> i) & 0xff; + int bg_comp = (bg.argb() >> i) & 0xff; SkScalar faded_comp = bg_comp + (ref_comp - bg_comp) * opacity; int test_comp = (test_pixel >> i) & 0xff; if (std::abs(faded_comp - test_comp) > fudge) { @@ -3272,16 +3272,16 @@ sk_sp makeTestDisplayList() { DisplayListBuilder builder; DlPaint paint; paint.setDrawStyle(DlDrawStyle::kFill); - paint.setColor(SK_ColorRED); + paint.setColor(DlColor(SK_ColorRED)); builder.DrawRect({kRenderLeft, kRenderTop, kRenderCenterX, kRenderCenterY}, paint); - paint.setColor(SK_ColorBLUE); + paint.setColor(DlColor(SK_ColorBLUE)); builder.DrawRect({kRenderCenterX, kRenderTop, kRenderRight, kRenderCenterY}, paint); - paint.setColor(SK_ColorGREEN); + paint.setColor(DlColor(SK_ColorGREEN)); builder.DrawRect({kRenderLeft, kRenderCenterY, kRenderCenterX, kRenderBottom}, paint); - paint.setColor(SK_ColorYELLOW); + paint.setColor(DlColor(SK_ColorYELLOW)); builder.DrawRect( {kRenderCenterX, kRenderCenterY, kRenderRight, kRenderBottom}, paint); return builder.Build(); @@ -3666,7 +3666,7 @@ TEST_F(DisplayListCanvas, MatrixColorFilterModifyTransparencyCheck) { auto dl_filter = DlMatrixColorFilter::Make(matrix); bool is_identity = (dl_filter == nullptr || original_value == value); - DlPaint paint(0x7f7f7f7f); + DlPaint paint(DlColor(0x7f7f7f7f)); DlPaint filter_save_paint = DlPaint().setColorFilter(&filter); DisplayListBuilder builder1; @@ -3738,7 +3738,7 @@ TEST_F(DisplayListCanvas, MatrixColorFilterOpacityCommuteCheck) { auto filter = DlMatrixColorFilter::Make(matrix); EXPECT_EQ(SkScalarIsFinite(value), filter != nullptr); - DlPaint paint(0x80808080); + DlPaint paint(DlColor(0x80808080)); DlPaint opacity_save_paint = DlPaint().setOpacity(0.5); DlPaint filter_save_paint = DlPaint().setColorFilter(filter); @@ -3850,7 +3850,7 @@ TEST_F(DisplayListCanvas, BlendColorFilterModifyTransparencyCheck) { ASSERT_NE(DlBlendColorFilter::Make(color, mode), nullptr) << desc; } - DlPaint paint(0x7f7f7f7f); + DlPaint paint(DlColor(0x7f7f7f7f)); DlPaint filter_save_paint = DlPaint().setColorFilter(&filter); DisplayListBuilder builder1; @@ -3915,7 +3915,7 @@ TEST_F(DisplayListCanvas, BlendColorFilterOpacityCommuteCheck) { ASSERT_NE(DlBlendColorFilter::Make(color, mode), nullptr) << desc; } - DlPaint paint(0x80808080); + DlPaint paint(DlColor(0x80808080)); DlPaint opacity_save_paint = DlPaint().setOpacity(0.5); DlPaint filter_save_paint = DlPaint().setColorFilter(&filter); @@ -4019,7 +4019,7 @@ class DisplayListNopTest : public DisplayListCanvas { int x = 0; for (DlColor color : test_dst_colors) { SkPaint paint; - paint.setColor(color); + paint.setColor(ToSk(color)); paint.setBlendMode(SkBlendMode::kSrc); canvas->drawRect(SkRect::MakeXYWH(x, 0, 1, 1), paint); x++; @@ -4121,8 +4121,8 @@ class DisplayListNopTest : public DisplayListCanvas { const uint32_t* dst_pixels = dst_data->addr32(0, y); const uint32_t* result_pixels = result_data->addr32(0, y); for (int x = 0; x < dst_data->width(); x++) { - all_flags |= - check_color_result(dst_pixels[x], result_pixels[x], dl, desc); + all_flags |= check_color_result(DlColor(dst_pixels[x]), + DlColor(result_pixels[x]), dl, desc); } } return all_flags; @@ -4158,11 +4158,11 @@ class DisplayListNopTest : public DisplayListCanvas { } auto sk_mode = static_cast(mode); - auto sk_color_filter = SkColorFilters::Blend(color, sk_mode); + auto sk_color_filter = SkColorFilters::Blend(ToSk(color), sk_mode); int all_flags = 0; if (sk_color_filter) { for (DlColor dst_color : test_dst_colors) { - DlColor result = sk_color_filter->filterColor(dst_color); + DlColor result = DlColor(sk_color_filter->filterColor(ToSk(dst_color))); all_flags |= check_color_result(dst_color, result, dl, desc); } if ((all_flags & kWasMTB) != 0) { @@ -4192,7 +4192,7 @@ class DisplayListNopTest : public DisplayListCanvas { auto sk_mode = static_cast(mode); SkPaint sk_paint; sk_paint.setBlendMode(sk_mode); - sk_paint.setColor(color); + sk_paint.setColor(ToSk(color)); for (auto& provider : CanvasCompareTester::kTestProviders) { auto result_surface = provider->MakeOffscreenSurface( test_image->width(), test_image->height(), @@ -4252,7 +4252,7 @@ class DisplayListNopTest : public DisplayListCanvas { auto sk_mode = static_cast(mode); SkPaint sk_paint; sk_paint.setBlendMode(sk_mode); - sk_paint.setColor(color); + sk_paint.setColor(ToSk(color)); sk_paint.setColorFilter(ToSk(color_filter)); sk_paint.setImageFilter(ToSk(image_filter)); for (auto& provider : CanvasCompareTester::kTestProviders) { diff --git a/display_list/testing/dl_test_snippets.cc b/display_list/testing/dl_test_snippets.cc index eed9300e8307a..714da0cf732b6 100644 --- a/display_list/testing/dl_test_snippets.cc +++ b/display_list/testing/dl_test_snippets.cc @@ -20,7 +20,8 @@ sk_sp GetSampleNestedDisplayList() { DlPaint paint; for (int y = 10; y <= 60; y += 10) { for (int x = 10; x <= 60; x += 10) { - paint.setColor(((x + y) % 20) == 10 ? SK_ColorRED : SK_ColorBLUE); + paint.setColor(((x + y) % 20) == 10 ? DlColor(SK_ColorRED) + : DlColor(SK_ColorBLUE)); builder.DrawRect(SkRect::MakeXYWH(x, y, 80, 80), paint); } } @@ -101,9 +102,12 @@ std::vector CreateAllAttributesOps() { }}, {"SetColor", { - {0, 8, 0, 0, [](DlOpReceiver& r) { r.setColor(SK_ColorGREEN); }}, - {0, 8, 0, 0, [](DlOpReceiver& r) { r.setColor(SK_ColorBLUE); }}, - {0, 0, 0, 0, [](DlOpReceiver& r) { r.setColor(SK_ColorBLACK); }}, + {0, 8, 0, 0, + [](DlOpReceiver& r) { r.setColor(DlColor(SK_ColorGREEN)); }}, + {0, 8, 0, 0, + [](DlOpReceiver& r) { r.setColor(DlColor(SK_ColorBLUE)); }}, + {0, 0, 0, 0, + [](DlOpReceiver& r) { r.setColor(DlColor(SK_ColorBLACK)); }}, }}, {"SetBlendMode", { @@ -513,15 +517,15 @@ std::vector CreateAllRenderingOps() { // cv.drawColor becomes cv.drawPaint(paint) {1, 16, 1, 24, [](DlOpReceiver& r) { - r.drawColor(SK_ColorBLUE, DlBlendMode::kSrcIn); + r.drawColor(DlColor(SK_ColorBLUE), DlBlendMode::kSrcIn); }}, {1, 16, 1, 24, [](DlOpReceiver& r) { - r.drawColor(SK_ColorBLUE, DlBlendMode::kDstOut); + r.drawColor(DlColor(SK_ColorBLUE), DlBlendMode::kDstOut); }}, {1, 16, 1, 24, [](DlOpReceiver& r) { - r.drawColor(SK_ColorCYAN, DlBlendMode::kSrcIn); + r.drawColor(DlColor(SK_ColorCYAN), DlBlendMode::kSrcIn); }}, }}, {"DrawLine", @@ -921,27 +925,27 @@ std::vector CreateAllRenderingOps() { // exposed {1, 32, -1, 32, [](DlOpReceiver& r) { - r.drawShadow(kTestPath1, SK_ColorGREEN, 1.0, false, 1.0); + r.drawShadow(kTestPath1, DlColor(SK_ColorGREEN), 1.0, false, 1.0); }}, {1, 32, -1, 32, [](DlOpReceiver& r) { - r.drawShadow(kTestPath2, SK_ColorGREEN, 1.0, false, 1.0); + r.drawShadow(kTestPath2, DlColor(SK_ColorGREEN), 1.0, false, 1.0); }}, {1, 32, -1, 32, [](DlOpReceiver& r) { - r.drawShadow(kTestPath1, SK_ColorBLUE, 1.0, false, 1.0); + r.drawShadow(kTestPath1, DlColor(SK_ColorBLUE), 1.0, false, 1.0); }}, {1, 32, -1, 32, [](DlOpReceiver& r) { - r.drawShadow(kTestPath1, SK_ColorGREEN, 2.0, false, 1.0); + r.drawShadow(kTestPath1, DlColor(SK_ColorGREEN), 2.0, false, 1.0); }}, {1, 32, -1, 32, [](DlOpReceiver& r) { - r.drawShadow(kTestPath1, SK_ColorGREEN, 1.0, true, 1.0); + r.drawShadow(kTestPath1, DlColor(SK_ColorGREEN), 1.0, true, 1.0); }}, {1, 32, -1, 32, [](DlOpReceiver& r) { - r.drawShadow(kTestPath1, SK_ColorGREEN, 1.0, false, 2.5); + r.drawShadow(kTestPath1, DlColor(SK_ColorGREEN), 1.0, false, 2.5); }}, }}, }; diff --git a/display_list/testing/dl_test_snippets.h b/display_list/testing/dl_test_snippets.h index 536cb224e8ef9..64f54362cae7d 100644 --- a/display_list/testing/dl_test_snippets.h +++ b/display_list/testing/dl_test_snippets.h @@ -37,8 +37,6 @@ constexpr float kStops[] = { 0.5, 1.0, }; -static std::vector color_vector(kColors, kColors + 3); -static std::vector stops_vector(kStops, kStops + 3); // clang-format off constexpr float kRotateColorMatrix[20] = { @@ -216,7 +214,7 @@ static std::shared_ptr TestVertices2 = static sk_sp MakeTestDisplayList(int w, int h, SkColor color) { DisplayListBuilder builder; - builder.DrawRect(SkRect::MakeWH(w, h), DlPaint(color)); + builder.DrawRect(SkRect::MakeWH(w, h), DlPaint(DlColor(color))); return builder.Build(); } static sk_sp TestDisplayList1 = diff --git a/flow/layers/color_filter_layer_unittests.cc b/flow/layers/color_filter_layer_unittests.cc index efafe90864049..209ca2b22733a 100644 --- a/flow/layers/color_filter_layer_unittests.cc +++ b/flow/layers/color_filter_layer_unittests.cc @@ -439,11 +439,11 @@ TEST_F(ColorFilterLayerTest, OpacityInheritance) { expected_builder.Translate(offset.fX, offset.fY); /* ColorFilterLayer::Paint() */ { DlPaint dl_paint; - dl_paint.setColor(opacity_alpha << 24); + dl_paint.setColor(DlColor(opacity_alpha << 24)); dl_paint.setColorFilter(&layer_filter); expected_builder.SaveLayer(&child_path.getBounds(), &dl_paint); /* MockLayer::Paint() */ { - expected_builder.DrawPath(child_path, DlPaint(0xFF000000)); + expected_builder.DrawPath(child_path, DlPaint(DlColor(0xFF000000))); } expected_builder.Restore(); } diff --git a/flow/layers/image_filter_layer_unittests.cc b/flow/layers/image_filter_layer_unittests.cc index ee8f08c8491be..67cf817c0899f 100644 --- a/flow/layers/image_filter_layer_unittests.cc +++ b/flow/layers/image_filter_layer_unittests.cc @@ -603,7 +603,7 @@ TEST_F(ImageFilterLayerTest, OpacityInheritance) { expected_builder.Translate(offset.fX, offset.fY); /* ImageFilterLayer::Paint() */ { DlPaint image_filter_paint; - image_filter_paint.setColor(opacity_alpha << 24); + image_filter_paint.setColor(DlColor(opacity_alpha << 24)); image_filter_paint.setImageFilter(dl_image_filter.get()); expected_builder.SaveLayer(&child_path.getBounds(), &image_filter_paint); diff --git a/flow/layers/performance_overlay_layer.cc b/flow/layers/performance_overlay_layer.cc index 911131fd0cfbc..7a1feda79bc7d 100644 --- a/flow/layers/performance_overlay_layer.cc +++ b/flow/layers/performance_overlay_layer.cc @@ -49,7 +49,7 @@ void VisualizeStopWatch(DlCanvas* canvas, auto text = PerformanceOverlayLayer::MakeStatisticsText( stopwatch, label_prefix, font_path); // Historically SK_ColorGRAY (== 0xFF888888) was used here - DlPaint paint(0xFF888888); + DlPaint paint(DlColor(0xFF888888)); canvas->DrawTextBlob(text, x + label_x, y + height + label_y, paint); } } diff --git a/flow/layers/performance_overlay_layer_unittests.cc b/flow/layers/performance_overlay_layer_unittests.cc index b41143b863f6e..e1bbb29893268 100644 --- a/flow/layers/performance_overlay_layer_unittests.cc +++ b/flow/layers/performance_overlay_layer_unittests.cc @@ -181,7 +181,7 @@ TEST_F(PerformanceOverlayLayerTest, SimpleRasterizerStatistics) { paint_context().raster_time, "Raster", ""); auto overlay_text_data = overlay_text->serialize(SkSerialProcs{}); // Historically SK_ColorGRAY (== 0xFF888888) was used here - DlPaint text_paint(0xFF888888); + DlPaint text_paint(DlColor(0xFF888888)); SkPoint text_position = SkPoint::Make(16.0f, 22.0f); // TODO(https://github.com/flutter/flutter/issues/82202): Remove once the diff --git a/flow/layers/shader_mask_layer_unittests.cc b/flow/layers/shader_mask_layer_unittests.cc index 4354f8715a1db..5588caa369478 100644 --- a/flow/layers/shader_mask_layer_unittests.cc +++ b/flow/layers/shader_mask_layer_unittests.cc @@ -396,7 +396,7 @@ TEST_F(ShaderMaskLayerTest, OpacityInheritance) { { expected_builder.Translate(offset.fX, offset.fY); /* ShaderMaskLayer::Paint() */ { - DlPaint sl_paint = DlPaint(opacity_alpha << 24); + DlPaint sl_paint = DlPaint(DlColor(opacity_alpha << 24)); expected_builder.SaveLayer(&child_path.getBounds(), &sl_paint); { /* child layer paint */ { diff --git a/flow/paint_utils.cc b/flow/paint_utils.cc index 9b35291cffc70..eab62daad1d7a 100644 --- a/flow/paint_utils.cc +++ b/flow/paint_utils.cc @@ -49,7 +49,7 @@ void DrawCheckerboard(DlCanvas* canvas, const SkRect& rect) { // Stroke the drawn area DlPaint debug_paint; debug_paint.setStrokeWidth(8); - debug_paint.setColor(SkColorSetA(checkerboard_color, 255)); + debug_paint.setColor(DlColor(SkColorSetA(checkerboard_color, 255))); debug_paint.setDrawStyle(DlDrawStyle::kStroke); canvas->DrawRect(rect, debug_paint); } diff --git a/flow/stopwatch_dl.cc b/flow/stopwatch_dl.cc index 1da2963ebffe7..e341e6cccc568 100644 --- a/flow/stopwatch_dl.cc +++ b/flow/stopwatch_dl.cc @@ -36,7 +36,7 @@ void DlStopwatchVisualizer::Visualize(DlCanvas* canvas, auto const sample_unit_width = (1.0 / kMaxSamples); // Provide a semi-transparent background for the graph. - painter.DrawRect(rect, 0x99FFFFFF); + painter.DrawRect(rect, DlColor(0x99FFFFFF)); // Prepare a path for the data; we start at the height of the last point so // it looks like we wrap around. @@ -54,7 +54,7 @@ void DlStopwatchVisualizer::Visualize(DlCanvas* canvas, /*top=*/y + bar_height, /*right=*/bar_left + bar_width, /*bottom=*/bottom), - 0xAA0000FF); + DlColor(0xAA0000FF)); } } @@ -79,7 +79,7 @@ void DlStopwatchVisualizer::Visualize(DlCanvas* canvas, /*top=*/y + frame_height, /*right=*/width, /*bottom=*/y + frame_height + 1), - 0xCC000000); + DlColor(0xCC000000)); } } } diff --git a/flow/testing/layer_test.h b/flow/testing/layer_test.h index 178c307426c19..f9ed245f1bc44 100644 --- a/flow/testing/layer_test.h +++ b/flow/testing/layer_test.h @@ -5,6 +5,7 @@ #ifndef FLOW_TESTING_LAYER_TEST_H_ #define FLOW_TESTING_LAYER_TEST_H_ +#include "display_list/dl_color.h" #include "flutter/flow/layer_snapshot_store.h" #include "flutter/flow/layers/layer.h" @@ -40,7 +41,7 @@ template class LayerTestBase : public CanvasTestBase { using TestT = CanvasTestBase; - const SkRect kDlBounds = SkRect::MakeWH(500, 500); + const SkRect k_dl_bounds_ = SkRect::MakeWH(500, 500); public: LayerTestBase() @@ -72,7 +73,7 @@ class LayerTestBase : public CanvasTestBase { .raster_cache = nullptr, // clang-format on }, - display_list_builder_(kDlBounds), + display_list_builder_(k_dl_bounds_), display_list_paint_context_{ // clang-format off .state_stack = display_list_state_stack_, @@ -103,7 +104,7 @@ class LayerTestBase : public CanvasTestBase { display_list_state_stack_.set_delegate(&display_list_builder_); checkerboard_state_stack_.set_delegate(&display_list_builder_); checkerboard_state_stack_.set_checkerboard_func(draw_checkerboard); - checkerboard_paint_.setColor(checkerboard_color_); + checkerboard_paint_.setColor(kCheckerboardColor); } /** @@ -209,12 +210,12 @@ class LayerTestBase : public CanvasTestBase { display_list_paint_context_.raster_cache = raster_cache_.get(); } - static constexpr SkColor checkerboard_color_ = 0x42424242; + static constexpr DlColor kCheckerboardColor = DlColor(0x42424242); static void draw_checkerboard(DlCanvas* canvas, const SkRect& rect) { if (canvas) { DlPaint paint; - paint.setColor(checkerboard_color_); + paint.setColor(kCheckerboardColor); canvas->DrawRect(rect, paint); } } diff --git a/impeller/display_list/skia_conversions_unittests.cc b/impeller/display_list/skia_conversions_unittests.cc index c714a2fb6c760..220e5035f8226 100644 --- a/impeller/display_list/skia_conversions_unittests.cc +++ b/impeller/display_list/skia_conversions_unittests.cc @@ -13,8 +13,8 @@ TEST(SkiaConversionsTest, ToColor) { // Create a color with alpha, red, green, and blue values that are all // trivially divisible by 255 so that we can test the conversion results in // correct scalar values. - // AARRGGBB - const flutter::DlColor color = 0x8040C020; + // AARRGGBB + const flutter::DlColor color = flutter::DlColor(0x8040C020); auto converted_color = skia_conversions::ToColor(color); ASSERT_TRUE(ScalarNearlyEqual(converted_color.alpha, 0x80 * (1.0f / 255))); diff --git a/lib/ui/painting/canvas.cc b/lib/ui/painting/canvas.cc index 0b090b68c9a7b..485d36b6bdf34 100644 --- a/lib/ui/painting/canvas.cc +++ b/lib/ui/painting/canvas.cc @@ -214,7 +214,7 @@ void Canvas::getLocalClipBounds(Dart_Handle rect_handle) { void Canvas::drawColor(SkColor color, DlBlendMode blend_mode) { if (display_list_builder_) { - builder()->DrawColor(color, blend_mode); + builder()->DrawColor(DlColor(color), blend_mode); } } @@ -638,7 +638,7 @@ void Canvas::drawShadow(const CanvasPath* path, // that situation we bypass the canvas interface and inject the // shadow parameters directly into the underlying DisplayList. // See: https://bugs.chromium.org/p/skia/issues/detail?id=12125 - builder()->DrawShadow(path->path(), color, SafeNarrow(elevation), + builder()->DrawShadow(path->path(), DlColor(color), SafeNarrow(elevation), transparentOccluder, dpr); } } diff --git a/lib/ui/painting/paint.cc b/lib/ui/painting/paint.cc index 592643bee7d82..0614f3f966cea 100644 --- a/lib/ui/painting/paint.cc +++ b/lib/ui/painting/paint.cc @@ -137,7 +137,7 @@ const DlPaint* Paint::paint(DlPaint& paint, if (flags.applies_alpha_or_color()) { uint32_t encoded_color = uint_data[kColorIndex]; - paint.setColor(encoded_color ^ kColorDefault); + paint.setColor(DlColor(encoded_color ^ kColorDefault)); } if (flags.applies_blend()) { @@ -248,7 +248,7 @@ void Paint::toDlPaint(DlPaint& paint) const { paint.setAntiAlias(uint_data[kIsAntiAliasIndex] == 0); uint32_t encoded_color = uint_data[kColorIndex]; - paint.setColor(encoded_color ^ kColorDefault); + paint.setColor(DlColor(encoded_color ^ kColorDefault)); uint32_t encoded_blend_mode = uint_data[kBlendModeIndex]; uint32_t blend_mode = encoded_blend_mode ^ kBlendModeDefault; diff --git a/lib/ui/painting/paint_unittests.cc b/lib/ui/painting/paint_unittests.cc index 1324568cb2347..87447fa548124 100644 --- a/lib/ui/painting/paint_unittests.cc +++ b/lib/ui/painting/paint_unittests.cc @@ -50,9 +50,9 @@ TEST_F(ShellTest, ConvertPaintToDlPaint) { DestroyShell(std::move(shell), task_runners); ASSERT_EQ(dl_paint.getBlendMode(), DlBlendMode::kModulate); - ASSERT_EQ(static_cast(dl_paint.getColor()), 0x11223344u); + ASSERT_EQ(static_cast(dl_paint.getColor().argb()), 0x11223344u); ASSERT_EQ(*dl_paint.getColorFilter(), - DlBlendColorFilter(0x55667788, DlBlendMode::kXor)); + DlBlendColorFilter(DlColor(0x55667788), DlBlendMode::kXor)); ASSERT_EQ(*dl_paint.getMaskFilter(), DlBlurMaskFilter(DlBlurStyle::kInner, 0.75)); ASSERT_EQ(dl_paint.getDrawStyle(), DlDrawStyle::kStroke); diff --git a/testing/display_list_testing.cc b/testing/display_list_testing.cc index f54a90c192d19..d0b6e51f571f6 100644 --- a/testing/display_list_testing.cc +++ b/testing/display_list_testing.cc @@ -260,7 +260,7 @@ std::ostream& operator<<(std::ostream& os, const DlFilterMode& mode) { } std::ostream& operator<<(std::ostream& os, const DlColor& color) { - return os << "DlColor(" << std::hex << color.argb << std::dec << ")"; + return os << "DlColor(" << std::hex << color.argb() << std::dec << ")"; } std::ostream& operator<<(std::ostream& os, DlImageSampling sampling) { diff --git a/third_party/txt/src/skia/paragraph_builder_skia.cc b/third_party/txt/src/skia/paragraph_builder_skia.cc index 2028e80353c50..443c2b9ca2b08 100644 --- a/third_party/txt/src/skia/paragraph_builder_skia.cc +++ b/third_party/txt/src/skia/paragraph_builder_skia.cc @@ -102,7 +102,7 @@ skt::ParagraphStyle ParagraphBuilderSkia::TxtToSkia(const ParagraphStyle& txt) { // Convert the default color of an SkParagraph text style into a DlPaint. flutter::DlPaint dl_paint; - dl_paint.setColor(text_style.getColor()); + dl_paint.setColor(flutter::DlColor(text_style.getColor())); text_style.setForegroundPaintID(CreatePaintID(dl_paint)); text_style.setFontStyle(MakeSkFontStyle(txt.font_weight, txt.font_style)); @@ -178,7 +178,7 @@ skt::TextStyle ParagraphBuilderSkia::TxtToSkia(const TextStyle& txt) { skia.setForegroundPaintID(CreatePaintID(txt.foreground.value())); } else { flutter::DlPaint dl_paint; - dl_paint.setColor(txt.color); + dl_paint.setColor(flutter::DlColor(txt.color)); skia.setForegroundPaintID(CreatePaintID(dl_paint)); } diff --git a/third_party/txt/src/skia/paragraph_skia.cc b/third_party/txt/src/skia/paragraph_skia.cc index 76d737224aa79..1f20f1781d408 100644 --- a/third_party/txt/src/skia/paragraph_skia.cc +++ b/third_party/txt/src/skia/paragraph_skia.cc @@ -91,7 +91,7 @@ class DisplayListParagraphPainter : public skt::ParagraphPainter { return; } DlPaint paint; - paint.setColor(color); + paint.setColor(DlColor(color)); if (blur_sigma > 0.0) { DlBlurMaskFilter filter(DlBlurStyle::kNormal, blur_sigma, false); paint.setMaskFilter(&filter); @@ -185,7 +185,7 @@ class DisplayListParagraphPainter : public skt::ParagraphPainter { DlPaint paint; paint.setDrawStyle(draw_style); paint.setAntiAlias(true); - paint.setColor(decor_style.getColor()); + paint.setColor(DlColor(decor_style.getColor())); paint.setStrokeWidth(decor_style.getStrokeWidth()); return paint; } From 535b60c68c5154f60c6555a9ac4585f996fd34e5 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Wed, 20 Sep 2023 15:38:04 -0700 Subject: [PATCH 197/859] [Impeller] Apply the entity transformation when rendering FramebufferBlendContents (#46106) Fixes https://github.com/flutter/flutter/issues/134930 --- impeller/aiks/aiks_unittests.cc | 17 +++++++++++++++++ .../contents/framebuffer_blend_contents.cc | 3 ++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/impeller/aiks/aiks_unittests.cc b/impeller/aiks/aiks_unittests.cc index b6801f4731956..9696cdea6b207 100644 --- a/impeller/aiks/aiks_unittests.cc +++ b/impeller/aiks/aiks_unittests.cc @@ -1577,6 +1577,23 @@ TEST_P(AiksTest, CanDrawPaintWithAdvancedBlend) { ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); } +TEST_P(AiksTest, DrawPaintWithAdvancedBlendOverFilter) { + Paint filtered = { + .color = Color::Black(), + .mask_blur_descriptor = + Paint::MaskBlurDescriptor{ + .style = FilterContents::BlurStyle::kNormal, + .sigma = Sigma(60), + }, + }; + + Canvas canvas; + canvas.DrawPaint({.color = Color::White()}); + canvas.DrawCircle({300, 300}, 200, filtered); + canvas.DrawPaint({.color = Color::Green(), .blend_mode = BlendMode::kScreen}); + ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); +} + #define BLEND_MODE_TUPLE(blend_mode) {#blend_mode, BlendMode::k##blend_mode}, struct BlendModeSelection { diff --git a/impeller/entity/contents/framebuffer_blend_contents.cc b/impeller/entity/contents/framebuffer_blend_contents.cc index 96b915ee4ac23..3ced8b52d9d76 100644 --- a/impeller/entity/contents/framebuffer_blend_contents.cc +++ b/impeller/entity/contents/framebuffer_blend_contents.cc @@ -147,7 +147,8 @@ bool FramebufferBlendContents::Render(const ContentContext& renderer, FS::BindTextureSamplerSrc(cmd, src_snapshot->texture, src_sampler); frame_info.mvp = Matrix::MakeOrthographic(pass.GetRenderTargetSize()) * - src_snapshot->transform; + entity.GetTransformation() * + Matrix::MakeTranslation(src_coverage.origin); frame_info.src_y_coord_scale = src_snapshot->texture->GetYCoordScale(); VS::BindFrameInfo(cmd, host_buffer.EmplaceUniform(frame_info)); From 017bf5bc339dcd9af0a916a34424acda873888ba Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Wed, 20 Sep 2023 15:55:51 -0700 Subject: [PATCH 198/859] [Impeller] Remove removal of save layer from clip. (#46113) Fixes https://github.com/flutter/flutter/issues/134705 The save layer is observable so it isn't safe to optimize out. --- flow/layers/clip_rrect_layer_unittests.cc | 45 ----------------------- flow/layers/clip_shape_layer.h | 15 +++----- flow/layers/layer.h | 2 - flow/layers/layer_tree.cc | 1 - flow/testing/layer_test.h | 6 --- 5 files changed, 5 insertions(+), 64 deletions(-) diff --git a/flow/layers/clip_rrect_layer_unittests.cc b/flow/layers/clip_rrect_layer_unittests.cc index 98d6493ba7bb5..1c3672d7cc616 100644 --- a/flow/layers/clip_rrect_layer_unittests.cc +++ b/flow/layers/clip_rrect_layer_unittests.cc @@ -595,51 +595,6 @@ TEST_F(ClipRRectLayerTest, EmptyClipDoesNotCullPlatformView) { EXPECT_EQ(embedder.painted_views(), std::vector({view_id})); } -TEST_F(ClipRRectLayerTest, AntiAliasWithSaveLayerIgnoresSaveLayerImpeller) { - enable_impeller(); - - auto path1 = SkPath().addRect({10, 10, 30, 30}); - auto mock1 = MockLayer::MakeOpacityCompatible(path1); - auto path2 = SkPath().addRect({20, 20, 40, 40}); - auto mock2 = MockLayer::MakeOpacityCompatible(path2); - auto children_bounds = path1.getBounds(); - children_bounds.join(path2.getBounds()); - SkRect clip_rect = SkRect::MakeWH(500, 500); - SkRRect clip_rrect = SkRRect::MakeRectXY(clip_rect, 20, 20); - auto clip_rrect_layer = std::make_shared( - clip_rrect, Clip::antiAliasWithSaveLayer); - clip_rrect_layer->Add(mock1); - clip_rrect_layer->Add(mock2); - - // ClipRectLayer will pass through compatibility from multiple - // non-overlapping compatible children - PrerollContext* context = preroll_context(); - clip_rrect_layer->Preroll(context); - EXPECT_EQ(context->renderable_state_flags, 0); - - DisplayListBuilder expected_builder; - /* OpacityLayer::Paint() */ { - expected_builder.Save(); - { - /* ClipRectLayer::Paint() */ { - expected_builder.Save(); - expected_builder.ClipRRect(clip_rrect, ClipOp::kIntersect, true); - /* child layer1 paint */ { - expected_builder.DrawPath(path1, DlPaint()); - } - /* child layer2 paint */ { // - expected_builder.DrawPath(path2, DlPaint()); - } - // expected_builder.Restore(); - } - } - expected_builder.Restore(); - } - - clip_rrect_layer->Paint(display_list_paint_context()); - EXPECT_TRUE(DisplayListsEQ_Verbose(expected_builder.Build(), display_list())); -} - } // namespace testing } // namespace flutter diff --git a/flow/layers/clip_shape_layer.h b/flow/layers/clip_shape_layer.h index d33267853e30d..69c479fe61a23 100644 --- a/flow/layers/clip_shape_layer.h +++ b/flow/layers/clip_shape_layer.h @@ -32,8 +32,7 @@ class ClipShapeLayer : public CacheableContainerLayer { context->MarkSubtreeDirty(context->GetOldLayerPaintRegion(old_layer)); } } - if (UsesSaveLayer(context->impeller_enabled()) && - context->has_raster_cache()) { + if (UsesSaveLayer() && context->has_raster_cache()) { context->WillPaintWithIntegralTransform(); } if (context->PushCullRect(clip_shape_bounds())) { @@ -43,7 +42,7 @@ class ClipShapeLayer : public CacheableContainerLayer { } void Preroll(PrerollContext* context) override { - bool uses_save_layer = UsesSaveLayer(context->impeller_enabled); + bool uses_save_layer = UsesSaveLayer(); // We can use the raster_cache for children only when the use_save_layer is // true so if use_save_layer is false we pass the layer_raster_item is @@ -53,8 +52,7 @@ class ClipShapeLayer : public CacheableContainerLayer { context, context->state_stack.transform_3x3()); Layer::AutoPrerollSaveLayerState save = - Layer::AutoPrerollSaveLayerState::Create( - context, UsesSaveLayer(context->impeller_enabled)); + Layer::AutoPrerollSaveLayerState::Create(context, UsesSaveLayer()); auto mutator = context->state_stack.save(); ApplyClip(mutator); @@ -80,7 +78,7 @@ class ClipShapeLayer : public CacheableContainerLayer { auto mutator = context.state_stack.save(); ApplyClip(mutator); - if (!UsesSaveLayer(context.impeller_enabled)) { + if (!UsesSaveLayer()) { PaintChildren(context); return; } @@ -101,10 +99,7 @@ class ClipShapeLayer : public CacheableContainerLayer { PaintChildren(context); } - bool UsesSaveLayer(bool enable_impeller) const { - if (enable_impeller) { - return false; - } + bool UsesSaveLayer() const { return clip_behavior_ == Clip::antiAliasWithSaveLayer; } diff --git a/flow/layers/layer.h b/flow/layers/layer.h index d9864e82dcb3d..617f9221ebd0f 100644 --- a/flow/layers/layer.h +++ b/flow/layers/layer.h @@ -71,8 +71,6 @@ struct PrerollContext { // presence of a texture layer during Preroll. bool has_texture_layer = false; - bool impeller_enabled = false; - // The list of flags that describe which rendering state attributes // (such as opacity, ColorFilter, ImageFilter) a given layer can // render itself without requiring the parent to perform a protective diff --git a/flow/layers/layer_tree.cc b/flow/layers/layer_tree.cc index e8aea74efd78b..5f75aaf95f4fc 100644 --- a/flow/layers/layer_tree.cc +++ b/flow/layers/layer_tree.cc @@ -60,7 +60,6 @@ bool LayerTree::Preroll(CompositorContext::ScopedFrame& frame, .raster_time = frame.context().raster_time(), .ui_time = frame.context().ui_time(), .texture_registry = frame.context().texture_registry(), - .impeller_enabled = !frame.gr_context(), .raster_cached_entries = &raster_cache_items_, // clang-format on }; diff --git a/flow/testing/layer_test.h b/flow/testing/layer_test.h index f9ed245f1bc44..9f2cfa04a2d31 100644 --- a/flow/testing/layer_test.h +++ b/flow/testing/layer_test.h @@ -196,12 +196,6 @@ class LayerTestBase : public CanvasTestBase { paint_context_.layer_snapshot_store = nullptr; } - void enable_impeller() { - preroll_context_.impeller_enabled = true; - paint_context_.impeller_enabled = true; - display_list_paint_context_.impeller_enabled = true; - } - private: void set_raster_cache_(std::unique_ptr raster_cache) { raster_cache_ = std::move(raster_cache); From 75dd26ce32f066f60ed0c1f811e8849ee3149ba6 Mon Sep 17 00:00:00 2001 From: gaaclarke <30870216+gaaclarke@users.noreply.github.com> Date: Wed, 20 Sep 2023 17:22:05 -0700 Subject: [PATCH 199/859] [Impeller] removed global mutable variable for tessellation allocation function pointers (#46127) issue: https://github.com/flutter/flutter/issues/125749 This removes a global mutable variable, instead giving each tesellator its own struct. I suspect the root cause of the linked issue is memory corruption but this is good cleanup anyways. If for some reason libTess2 is mutating that global variable at cleanup, that could be the source of this problem and this would fix the issue. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- impeller/tessellator/tessellator.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/impeller/tessellator/tessellator.cc b/impeller/tessellator/tessellator.cc index 4e2c3c535f41e..f6b27215cca31 100644 --- a/impeller/tessellator/tessellator.cc +++ b/impeller/tessellator/tessellator.cc @@ -21,7 +21,7 @@ static void HeapFree(void* userData, void* ptr) { } // Note: these units are "number of entities" for bucket size and not in KB. -static TESSalloc alloc = { +static const TESSalloc kAlloc = { HeapAlloc, HeapRealloc, HeapFree, 0, /* =userData */ 16, /* =meshEdgeBucketSize */ 16, /* =meshVertexBucketSize */ @@ -31,8 +31,14 @@ static TESSalloc alloc = { 0 /* =extraVertices */ }; -Tessellator::Tessellator() - : c_tessellator_(::tessNewTess(&alloc), &DestroyTessellator) {} +Tessellator::Tessellator() : c_tessellator_(nullptr, &DestroyTessellator) { + TESSalloc alloc = kAlloc; + { + // libTess2 copies the TESSalloc despite the non-const argument. + CTessellator tessellator(::tessNewTess(&alloc), &DestroyTessellator); + c_tessellator_ = std::move(tessellator); + } +} Tessellator::~Tessellator() = default; From f9b64098c5e511cf88f45c379aa490dbc75c7643 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 20 Sep 2023 20:51:10 -0400 Subject: [PATCH 200/859] Roll Skia from 86f48da2c812 to a7bcbb9a39f3 (1 revision) (#46128) https://skia.googlesource.com/skia.git/+log/86f48da2c812..a7bcbb9a39f3 2023-09-21 johnstiles@google.com Revert "Tidy up public.bzl rules for iOS" If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 16c71aa1f8034..1a9d7e2d9d225 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '86f48da2c812dad44a3a4180201a926b93faf34e', + 'skia_revision': 'a7bcbb9a39f38814919da9b7303a01c11207d031', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From c7a6c52efc014dfb11f49b453934f504caf45cb6 Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Wed, 20 Sep 2023 18:41:27 -0700 Subject: [PATCH 201/859] Tidy up `DlPaint` and friends. (#46120) Closes https://github.com/flutter/flutter/issues/135058. Work towards https://github.com/flutter/flutter/issues/134969. All fixes are generated by `clang-tidy --fix`, and manual search/replace if that wasn't sufficient. --- display_list/dl_paint.cc | 48 ++++++++-------- display_list/dl_paint.h | 117 ++++++++++++++++++++------------------- 2 files changed, 83 insertions(+), 82 deletions(-) diff --git a/display_list/dl_paint.cc b/display_list/dl_paint.cc index 1389125d8c197..2ce1ec763277a 100644 --- a/display_list/dl_paint.cc +++ b/display_list/dl_paint.cc @@ -7,33 +7,33 @@ namespace flutter { DlPaint::DlPaint(DlColor color) - : blendMode_(static_cast(DlBlendMode::kDefaultMode)), - drawStyle_(static_cast(DlDrawStyle::kDefaultStyle)), - strokeCap_(static_cast(DlStrokeCap::kDefaultCap)), - strokeJoin_(static_cast(DlStrokeJoin::kDefaultJoin)), - isAntiAlias_(false), - isDither_(false), - isInvertColors_(false), + : blend_mode_(static_cast(DlBlendMode::kDefaultMode)), + draw_style_(static_cast(DlDrawStyle::kDefaultStyle)), + stroke_cap_(static_cast(DlStrokeCap::kDefaultCap)), + stroke_join_(static_cast(DlStrokeJoin::kDefaultJoin)), + is_anti_alias_(false), + is_dither_(false), + is_invert_colors_(false), color_(color), - strokeWidth_(kDefaultWidth), - strokeMiter_(kDefaultMiter) {} + stroke_width_(kDefaultWidth), + stroke_miter_(kDefaultMiter) {} bool DlPaint::operator==(DlPaint const& other) const { - return blendMode_ == other.blendMode_ && // - drawStyle_ == other.drawStyle_ && // - strokeCap_ == other.strokeCap_ && // - strokeJoin_ == other.strokeJoin_ && // - isAntiAlias_ == other.isAntiAlias_ && // - isDither_ == other.isDither_ && // - isInvertColors_ == other.isInvertColors_ && // - color_ == other.color_ && // - strokeWidth_ == other.strokeWidth_ && // - strokeMiter_ == other.strokeMiter_ && // - Equals(colorSource_, other.colorSource_) && // - Equals(colorFilter_, other.colorFilter_) && // - Equals(imageFilter_, other.imageFilter_) && // - Equals(maskFilter_, other.maskFilter_) && // - Equals(pathEffect_, other.pathEffect_); + return blend_mode_ == other.blend_mode_ && // + draw_style_ == other.draw_style_ && // + stroke_cap_ == other.stroke_cap_ && // + stroke_join_ == other.stroke_join_ && // + is_anti_alias_ == other.is_anti_alias_ && // + is_dither_ == other.is_dither_ && // + is_invert_colors_ == other.is_invert_colors_ && // + color_ == other.color_ && // + stroke_width_ == other.stroke_width_ && // + stroke_miter_ == other.stroke_miter_ && // + Equals(color_source_, other.color_source_) && // + Equals(color_filter_, other.color_filter_) && // + Equals(image_filter_, other.image_filter_) && // + Equals(mask_filter_, other.mask_filter_) && // + Equals(path_effect_, other.path_effect_); } const DlPaint DlPaint::kDefault; diff --git a/display_list/dl_paint.h b/display_list/dl_paint.h index b17dbf943eebf..4d09a39ce67fa 100644 --- a/display_list/dl_paint.h +++ b/display_list/dl_paint.h @@ -6,6 +6,7 @@ #define FLUTTER_DISPLAY_LIST_DL_PAINT_H_ #include +#include #include "flutter/display_list/dl_blend_mode.h" #include "flutter/display_list/dl_color.h" #include "flutter/display_list/effects/dl_color_filter.h" @@ -52,23 +53,23 @@ class DlPaint { static const DlPaint kDefault; DlPaint() : DlPaint(DlColor::kBlack()) {} - DlPaint(DlColor color); + explicit DlPaint(DlColor color); - bool isAntiAlias() const { return isAntiAlias_; } + bool isAntiAlias() const { return is_anti_alias_; } DlPaint& setAntiAlias(bool isAntiAlias) { - isAntiAlias_ = isAntiAlias; + is_anti_alias_ = isAntiAlias; return *this; } - bool isDither() const { return isDither_; } + bool isDither() const { return is_dither_; } DlPaint& setDither(bool isDither) { - isDither_ = isDither; + is_dither_ = isDither; return *this; } - bool isInvertColors() const { return isInvertColors_; } + bool isInvertColors() const { return is_invert_colors_; } DlPaint& setInvertColors(bool isInvertColors) { - isInvertColors_ = isInvertColors; + is_invert_colors_ = isInvertColors; return *this; } @@ -87,111 +88,111 @@ class DlPaint { } DlBlendMode getBlendMode() const { - return static_cast(blendMode_); + return static_cast(blend_mode_); } DlPaint& setBlendMode(DlBlendMode mode) { - blendMode_ = static_cast(mode); + blend_mode_ = static_cast(mode); return *this; } DlDrawStyle getDrawStyle() const { - return static_cast(drawStyle_); + return static_cast(draw_style_); } DlPaint& setDrawStyle(DlDrawStyle style) { - drawStyle_ = static_cast(style); + draw_style_ = static_cast(style); return *this; } DlStrokeCap getStrokeCap() const { - return static_cast(strokeCap_); + return static_cast(stroke_cap_); } DlPaint& setStrokeCap(DlStrokeCap cap) { - strokeCap_ = static_cast(cap); + stroke_cap_ = static_cast(cap); return *this; } DlStrokeJoin getStrokeJoin() const { - return static_cast(strokeJoin_); + return static_cast(stroke_join_); } DlPaint& setStrokeJoin(DlStrokeJoin join) { - strokeJoin_ = static_cast(join); + stroke_join_ = static_cast(join); return *this; } - float getStrokeWidth() const { return strokeWidth_; } + float getStrokeWidth() const { return stroke_width_; } DlPaint& setStrokeWidth(float width) { - strokeWidth_ = width; + stroke_width_ = width; return *this; } - float getStrokeMiter() const { return strokeMiter_; } + float getStrokeMiter() const { return stroke_miter_; } DlPaint& setStrokeMiter(float miter) { - strokeMiter_ = miter; + stroke_miter_ = miter; return *this; } std::shared_ptr getColorSource() const { - return colorSource_; + return color_source_; } - const DlColorSource* getColorSourcePtr() const { return colorSource_.get(); } + const DlColorSource* getColorSourcePtr() const { return color_source_.get(); } DlPaint& setColorSource(std::shared_ptr source) { - colorSource_ = source; + color_source_ = std::move(source); return *this; } DlPaint& setColorSource(const DlColorSource* source) { - colorSource_ = source ? source->shared() : nullptr; + color_source_ = source ? source->shared() : nullptr; return *this; } std::shared_ptr getColorFilter() const { - return colorFilter_; + return color_filter_; } - const DlColorFilter* getColorFilterPtr() const { return colorFilter_.get(); } - DlPaint& setColorFilter(const std::shared_ptr filter) { - colorFilter_ = filter; + const DlColorFilter* getColorFilterPtr() const { return color_filter_.get(); } + DlPaint& setColorFilter(const std::shared_ptr& filter) { + color_filter_ = filter; return *this; } DlPaint& setColorFilter(const DlColorFilter* filter) { - colorFilter_ = filter ? filter->shared() : nullptr; + color_filter_ = filter ? filter->shared() : nullptr; return *this; } std::shared_ptr getImageFilter() const { - return imageFilter_; + return image_filter_; } - const DlImageFilter* getImageFilterPtr() const { return imageFilter_.get(); } - DlPaint& setImageFilter(const std::shared_ptr filter) { - imageFilter_ = filter; + const DlImageFilter* getImageFilterPtr() const { return image_filter_.get(); } + DlPaint& setImageFilter(const std::shared_ptr& filter) { + image_filter_ = filter; return *this; } DlPaint& setImageFilter(const DlImageFilter* filter) { - imageFilter_ = filter ? filter->shared() : nullptr; + image_filter_ = filter ? filter->shared() : nullptr; return *this; } std::shared_ptr getMaskFilter() const { - return maskFilter_; + return mask_filter_; } - const DlMaskFilter* getMaskFilterPtr() const { return maskFilter_.get(); } - DlPaint& setMaskFilter(std::shared_ptr filter) { - maskFilter_ = filter; + const DlMaskFilter* getMaskFilterPtr() const { return mask_filter_.get(); } + DlPaint& setMaskFilter(const std::shared_ptr& filter) { + mask_filter_ = filter; return *this; } DlPaint& setMaskFilter(const DlMaskFilter* filter) { - maskFilter_ = filter ? filter->shared() : nullptr; + mask_filter_ = filter ? filter->shared() : nullptr; return *this; } std::shared_ptr getPathEffect() const { - return pathEffect_; + return path_effect_; } - const DlPathEffect* getPathEffectPtr() const { return pathEffect_.get(); } - DlPaint& setPathEffect(std::shared_ptr pathEffect) { - pathEffect_ = pathEffect; + const DlPathEffect* getPathEffectPtr() const { return path_effect_.get(); } + DlPaint& setPathEffect(const std::shared_ptr& pathEffect) { + path_effect_ = pathEffect; return *this; } DlPaint& setPathEffect(const DlPathEffect* effect) { - pathEffect_ = effect ? effect->shared() : nullptr; + path_effect_ = effect ? effect->shared() : nullptr; return *this; } @@ -216,25 +217,25 @@ class DlPaint { union { struct { - unsigned blendMode_ : kBlendModeBits; - unsigned drawStyle_ : kDrawStyleBits; - unsigned strokeCap_ : kStrokeCapBits; - unsigned strokeJoin_ : kStrokeJoinBits; - unsigned isAntiAlias_ : 1; - unsigned isDither_ : 1; - unsigned isInvertColors_ : 1; + unsigned blend_mode_ : kBlendModeBits; + unsigned draw_style_ : kDrawStyleBits; + unsigned stroke_cap_ : kStrokeCapBits; + unsigned stroke_join_ : kStrokeJoinBits; + unsigned is_anti_alias_ : 1; + unsigned is_dither_ : 1; + unsigned is_invert_colors_ : 1; }; }; DlColor color_; - float strokeWidth_; - float strokeMiter_; - - std::shared_ptr colorSource_; - std::shared_ptr colorFilter_; - std::shared_ptr imageFilter_; - std::shared_ptr maskFilter_; - std::shared_ptr pathEffect_; + float stroke_width_; + float stroke_miter_; + + std::shared_ptr color_source_; + std::shared_ptr color_filter_; + std::shared_ptr image_filter_; + std::shared_ptr mask_filter_; + std::shared_ptr path_effect_; }; } // namespace flutter From 61bf037df75705aff37f7f1726f28543fa4a4f71 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 20 Sep 2023 22:33:10 -0400 Subject: [PATCH 202/859] Roll Skia from a7bcbb9a39f3 to 81b9c7fd19b2 (1 revision) (#46129) https://skia.googlesource.com/skia.git/+log/a7bcbb9a39f3..81b9c7fd19b2 2023-09-21 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from 918412e0912f to af63cb4763f0 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 1a9d7e2d9d225..85444e410dcd3 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'a7bcbb9a39f38814919da9b7303a01c11207d031', + 'skia_revision': '81b9c7fd19b23dd0b54a2d6fd4d8b07b3cedeee5', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 23f677d9767577ed4f3988fb45cafcac3cd021e0 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Wed, 20 Sep 2023 20:48:47 -0700 Subject: [PATCH 203/859] [Impeller] temp work around for cmd pool validation issues. (#46131) I'm not able to reproduce most validation errors in the macrobenchmark app with this change. THe real fix seems to be to track this last cmd buffer but I'm struggling to find a way to do this. --- impeller/renderer/backend/vulkan/surface_context_vk.cc | 1 - impeller/renderer/backend/vulkan/swapchain_impl_vk.cc | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/impeller/renderer/backend/vulkan/surface_context_vk.cc b/impeller/renderer/backend/vulkan/surface_context_vk.cc index 2e20d2af5cbe6..88150f5ba77b1 100644 --- a/impeller/renderer/backend/vulkan/surface_context_vk.cc +++ b/impeller/renderer/backend/vulkan/surface_context_vk.cc @@ -80,7 +80,6 @@ std::unique_ptr SurfaceContextVK::AcquireNextSurface() { if (auto allocator = parent_->GetResourceAllocator()) { allocator->DidAcquireSurfaceFrame(); } - parent_->GetCommandPoolRecycler()->Dispose(); return surface; } diff --git a/impeller/renderer/backend/vulkan/swapchain_impl_vk.cc b/impeller/renderer/backend/vulkan/swapchain_impl_vk.cc index d9146d9056291..7a9ca108de6a6 100644 --- a/impeller/renderer/backend/vulkan/swapchain_impl_vk.cc +++ b/impeller/renderer/backend/vulkan/swapchain_impl_vk.cc @@ -424,6 +424,13 @@ bool SwapchainImplVK::Present(const std::shared_ptr& image, //---------------------------------------------------------------------------- /// Transition the image to color-attachment-optimal. /// + + // Increment the frame count right before allocating the cmd buffer below to + // force this to use the next frame's pool. This cmd buffer is completely + // untracked, and so we may end up resetting the cmd pool before all buffers + // have been collected. + context.GetCommandPoolRecycler()->Dispose(); + sync->final_cmd_buffer = context.CreateCommandBuffer(); if (!sync->final_cmd_buffer) { return false; From 56547cef6c117c993283df50ffc6210bd4fd28f3 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 21 Sep 2023 00:02:21 -0400 Subject: [PATCH 204/859] Roll Fuchsia Mac SDK from zuOP7YCHHocXuZJcD... to 3DKf4d8UFviYKRI28... (#46133) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jonahwilliams@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 85444e410dcd3..532eaf2c4a742 100644 --- a/DEPS +++ b/DEPS @@ -914,7 +914,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'zuOP7YCHHocXuZJcDIxnlpB-rNuuZrNvIw4FuTNHV5gC' + 'version': '3DKf4d8UFviYKRI289TgMqMOusKtYENjbSeT4i3xySIC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 407a4e7c2a24d08b4be5ed3d2f82a456dae107cb Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 21 Sep 2023 01:36:12 -0400 Subject: [PATCH 205/859] Roll Skia from 81b9c7fd19b2 to c20aeee90da9 (3 revisions) (#46134) https://skia.googlesource.com/skia.git/+log/81b9c7fd19b2..c20aeee90da9 2023-09-21 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from 918412e0912f to af63cb4763f0 (11 revisions) 2023-09-21 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Dawn from 881dc3bb55fd to 2eae44a62806 (11 revisions) 2023-09-21 johnstiles@google.com Add new flags to sksl-minify usage string. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 532eaf2c4a742..7f5bf94d8be3f 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '81b9c7fd19b23dd0b54a2d6fd4d8b07b3cedeee5', + 'skia_revision': 'c20aeee90da98a461070ff5b31347a898f0d52c8', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 0f537c698ef90..741b5a98aa93a 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: bb4f64aa5249d361a156d0ce29d71b3b +Signature: 8b2b70340497d70f1632596905227132 ==================================================================================================== LIBRARY: etc1 From 505c78129a513a22d721b2eb24528093d3773e75 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 21 Sep 2023 04:22:28 -0400 Subject: [PATCH 206/859] Roll Skia from c20aeee90da9 to 322abacca561 (1 revision) (#46137) https://skia.googlesource.com/skia.git/+log/c20aeee90da9..322abacca561 2023-09-21 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 2aba50a6944f to 79912a37e72c (6 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 7f5bf94d8be3f..2c79f790363cf 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'c20aeee90da98a461070ff5b31347a898f0d52c8', + 'skia_revision': '322abacca561b5c81c1950213a04676d05c8e68f', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 393cae151ff3d9e7b61edf61321a0ff704d02834 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 21 Sep 2023 05:31:22 -0400 Subject: [PATCH 207/859] Roll Dart SDK from d5d05146868a to eaeca487c944 (2 revisions) (#46138) https://dart.googlesource.com/sdk.git/+log/d5d05146868a..eaeca487c944 2023-09-21 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-187.0.dev 2023-09-20 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-186.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jonahwilliams@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 2c79f790363cf..e9a173cf2aa05 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': 'd5d05146868a5489e8dfc6f049536277dc437a20', + 'dart_revision': 'eaeca487c944c92612e5674b8eb2d49030327d05', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index 609e78a149fc9..fb2193ef5423c 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: 312266be9d532450c78136442943ffb7 +Signature: 74953727d0af6d818f0131146cadbf11 ==================================================================================================== LIBRARY: dart From 636029f6f93a5f76253c9ca1a28c072cdaa226be Mon Sep 17 00:00:00 2001 From: Sigurd Meldgaard Date: Thu, 21 Sep 2023 14:09:27 +0200 Subject: [PATCH 208/859] Add package:tar to DEPS (#46140) It was added to the Dart SDK DEPS file here: https://github.com/dart-lang/sdk/commit/04fe6d62fcfc227813aab2ea0bfb7816648c7cac --- DEPS | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/DEPS b/DEPS index e9a173cf2aa05..f1502b76b2ef8 100644 --- a/DEPS +++ b/DEPS @@ -125,7 +125,7 @@ vars = { # Upstream URLs for third party dependencies, used in # determining common ancestor commit for vulnerability scanning # prefixed with 'upstream_' in order to be identified by parsing tool. - # The vulnerabiity database being used in this scan can be browsed + # The vulnerability database being used in this scan can be browsed # using this UI https://osv.dev/list # If a new dependency needs to be added, the upstream (non-mirrored) # git URL for that dependency should be added to this list @@ -221,6 +221,7 @@ vars = { "upstream_stream_channel": "https://github.com/dart-lang/stream_channel.git", "upstream_string_scanner": "https://github.com/dart-lang/string_scanner.git", "upstream_SwiftShader": "https://swiftshader.googlesource.com/SwiftShader.git", + "upstream_tar": "https://github.com/simolus3/tar.git", "upstream_term_glyph": "https://github.com/dart-lang/term_glyph.git", "upstream_test_reflective_loader": "https://github.com/dart-lang/test_reflective_loader.git", "upstream_test": "https://github.com/dart-lang/test.git", @@ -470,6 +471,9 @@ deps = { 'src/third_party/dart/third_party/pkg/string_scanner': Var('dart_git') + '/string_scanner.git@da9142cf9809e7e1364144b8193ec60d87f0a4b8', + 'src/third_party/dart/third_party/pkg/tar': + Var('dart_git') + '/external/github.com/simolus3/tar.git@3c68cba8e51c569428222b9185469249206172c6', + 'src/third_party/dart/third_party/pkg/term_glyph': Var('dart_git') + '/term_glyph.git@1b28285a7e818b8e87c4d2119d968c5b36d73c7a', From 8fa514cdb24ae498a2a2013fa90a29d6b9522ec8 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 21 Sep 2023 10:54:32 -0400 Subject: [PATCH 209/859] Roll Skia from 322abacca561 to 0cf83a86c56d (1 revision) (#46143) https://skia.googlesource.com/skia.git/+log/322abacca561..0cf83a86c56d 2023-09-21 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll Dawn from 2eae44a62806 to 39aef37759a4 (11 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index f1502b76b2ef8..155d032347286 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '322abacca561b5c81c1950213a04676d05c8e68f', + 'skia_revision': '0cf83a86c56d8be6d17f676bc8628d689d2fd1d3', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From fa6e2669871f051069780d85fe097c5b4c32deaa Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 21 Sep 2023 12:40:08 -0400 Subject: [PATCH 210/859] Roll Fuchsia Mac SDK from 3DKf4d8UFviYKRI28... to PXDDhlPyd9sgrWWun... (#46148) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jonahwilliams@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 155d032347286..cc70aa5e53a9e 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': '3DKf4d8UFviYKRI289TgMqMOusKtYENjbSeT4i3xySIC' + 'version': 'PXDDhlPyd9sgrWWunaLin7Q_HAx2RMYRbJ6NXLlIrJUC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From b30fb57d3ed4523a789927c272d030ef806336b3 Mon Sep 17 00:00:00 2001 From: godofredoc Date: Thu, 21 Sep 2023 11:56:06 -0700 Subject: [PATCH 211/859] Remove linux fuchsia from recipes cq. (#46153) With some recent changes led builds can only run if they use -real-build. The migration of fuchsia builds to use -real-build as involved as migrating it to engine v2 and we are implementing the second one. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- .ci.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.ci.yaml b/.ci.yaml index 3f1c7e5334ff2..c6c8442e1b72c 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -161,7 +161,6 @@ targets: - name: Linux Fuchsia recipe: engine/engine properties: - add_recipes_cq: "true" build_fuchsia: "true" fuchsia_ctl_version: version:0.0.27 # ensure files from pre-production Fuchsia SDK tests are purged from cache From 07b7b8d74d2d85c555dd8d021002bad431767b2d Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Thu, 21 Sep 2023 12:16:42 -0700 Subject: [PATCH 212/859] Move `git_repo_tools` and `process_fakes` outside of `clang_tidy`. (#46017) Closes https://github.com/flutter/flutter/issues/134988. --- testing/run_tests.py | 20 ++ tools/clang_tidy/lib/clang_tidy.dart | 4 +- tools/clang_tidy/pubspec.yaml | 6 + tools/clang_tidy/test/clang_tidy_test.dart | 2 +- tools/githooks/pubspec.yaml | 2 + tools/pkg/git_repo_tools/README.md | 23 ++ .../git_repo_tools/lib/git_repo_tools.dart} | 61 +++-- tools/pkg/git_repo_tools/pubspec.yaml | 60 +++++ .../test/git_repo_tools_test.dart | 215 ++++++++++++++++++ tools/pkg/process_fakes/README.md | 7 + .../process_fakes/lib}/process_fakes.dart | 5 + tools/pkg/process_fakes/pubspec.yaml | 36 +++ tools/pub_get_offline.py | 2 + 13 files changed, 419 insertions(+), 24 deletions(-) create mode 100644 tools/pkg/git_repo_tools/README.md rename tools/{clang_tidy/lib/src/git_repo.dart => pkg/git_repo_tools/lib/git_repo_tools.dart} (67%) create mode 100644 tools/pkg/git_repo_tools/pubspec.yaml create mode 100644 tools/pkg/git_repo_tools/test/git_repo_tools_test.dart create mode 100644 tools/pkg/process_fakes/README.md rename tools/{clang_tidy/test => pkg/process_fakes/lib}/process_fakes.dart (91%) create mode 100644 tools/pkg/process_fakes/pubspec.yaml diff --git a/testing/run_tests.py b/testing/run_tests.py index 6a807c65021a6..9c4a6c254dbc3 100755 --- a/testing/run_tests.py +++ b/testing/run_tests.py @@ -1045,6 +1045,25 @@ def gather_engine_repo_tools_tests(build_dir): ) +def gather_git_repo_tools_tests(build_dir): + test_dir = os.path.join( + BUILDROOT_DIR, 'flutter', 'tools', 'pkg', 'git_repo_tools' + ) + dart_tests = glob.glob('%s/*_test.dart' % test_dir) + for dart_test_file in dart_tests: + opts = [ + '--disable-dart-dev', + dart_test_file, + ] + yield EngineExecutableTask( + build_dir, + os.path.join('dart-sdk', 'bin', 'dart'), + None, + flags=opts, + cwd=test_dir + ) + + def gather_api_consistency_tests(build_dir): test_dir = os.path.join(BUILDROOT_DIR, 'flutter', 'tools', 'api_check') dart_tests = glob.glob('%s/test/*_test.dart' % test_dir) @@ -1355,6 +1374,7 @@ def main(): tasks += list(gather_build_bucket_golden_scraper_tests(build_dir)) tasks += list(gather_engine_build_configs_tests(build_dir)) tasks += list(gather_engine_repo_tools_tests(build_dir)) + tasks += list(gather_git_repo_tools_tests(build_dir)) tasks += list(gather_api_consistency_tests(build_dir)) tasks += list(gather_path_ops_tests(build_dir)) tasks += list(gather_const_finder_tests(build_dir)) diff --git a/tools/clang_tidy/lib/clang_tidy.dart b/tools/clang_tidy/lib/clang_tidy.dart index e8cb4db6e9f9e..8a2308eb49e8d 100644 --- a/tools/clang_tidy/lib/clang_tidy.dart +++ b/tools/clang_tidy/lib/clang_tidy.dart @@ -6,13 +6,13 @@ import 'dart:convert' show LineSplitter, jsonDecode; import 'dart:io' as io show File, stderr, stdout; import 'package:engine_repo_tools/engine_repo_tools.dart'; +import 'package:git_repo_tools/git_repo_tools.dart'; import 'package:meta/meta.dart'; import 'package:path/path.dart' as path; import 'package:process/process.dart'; import 'package:process_runner/process_runner.dart'; import 'src/command.dart'; -import 'src/git_repo.dart'; import 'src/options.dart'; const String _linterOutputHeader = ''' @@ -211,7 +211,7 @@ class ClangTidy { .toList(); } - final GitRepo repo = GitRepo( + final GitRepo repo = GitRepo.fromRoot( options.repoPath, processManager: _processManager, verbose: options.verbose, diff --git a/tools/clang_tidy/pubspec.yaml b/tools/clang_tidy/pubspec.yaml index b06cd30247821..3dbe9e04ac86a 100644 --- a/tools/clang_tidy/pubspec.yaml +++ b/tools/clang_tidy/pubspec.yaml @@ -18,6 +18,7 @@ environment: dependencies: args: any + git_repo_tools: any engine_repo_tools: any meta: any path: any @@ -28,6 +29,7 @@ dev_dependencies: async_helper: any expect: any litetest: any + process_fakes: any smith: any dependency_overrides: @@ -45,6 +47,8 @@ dependency_overrides: path: ../../../third_party/dart/pkg/expect file: path: ../../../third_party/pkg/file/packages/file + git_repo_tools: + path: ../pkg/git_repo_tools litetest: path: ../../testing/litetest meta: @@ -55,6 +59,8 @@ dependency_overrides: path: ../../../third_party/pkg/platform process: path: ../../../third_party/pkg/process + process_fakes: + path: ../pkg/process_fakes process_runner: path: ../../../third_party/pkg/process_runner smith: diff --git a/tools/clang_tidy/test/clang_tidy_test.dart b/tools/clang_tidy/test/clang_tidy_test.dart index 4dbb39e2b125e..819815bed8d97 100644 --- a/tools/clang_tidy/test/clang_tidy_test.dart +++ b/tools/clang_tidy/test/clang_tidy_test.dart @@ -11,9 +11,9 @@ import 'package:engine_repo_tools/engine_repo_tools.dart'; import 'package:litetest/litetest.dart'; import 'package:path/path.dart' as path; import 'package:process/process.dart'; +import 'package:process_fakes/process_fakes.dart'; import 'package:process_runner/process_runner.dart'; -import 'process_fakes.dart'; /// A test fixture for the `clang-tidy` tool. final class Fixture { diff --git a/tools/githooks/pubspec.yaml b/tools/githooks/pubspec.yaml index 07d1820110b37..66755904f2fd5 100644 --- a/tools/githooks/pubspec.yaml +++ b/tools/githooks/pubspec.yaml @@ -45,6 +45,8 @@ dependency_overrides: path: ../../../third_party/dart/pkg/expect file: path: ../../../third_party/pkg/file/packages/file + git_repo_tools: + path: ../pkg/git_repo_tools litetest: path: ../../testing/litetest meta: diff --git a/tools/pkg/git_repo_tools/README.md b/tools/pkg/git_repo_tools/README.md new file mode 100644 index 0000000000000..e308c8104b911 --- /dev/null +++ b/tools/pkg/git_repo_tools/README.md @@ -0,0 +1,23 @@ +# `git_repo_tools` + +This is a repo-internal library for `flutter/engine`, that contains shared code +for writing tools that want to interact with the `git` repository. For example, +finding all changed files in the current branch: + +```dart +import 'dart:io' as io show File, Platform; + +import 'package:engine_repo_tools/engine_repo_tools.dart'; +import 'package:git_repo_tools/git_repo_tools.dart'; +import 'package:path/path.dart' as path; + +void main() async { + // Finds the root of the engine repository from the current script. + final Engine engine = Engine.findWithin(path.dirname(path.fromUri(io.Platform.script))); + final GitRepo gitRepo = GitRepo(engine.flutterDir); + + for (final io.File file in gitRepo.changedFiles) { + print('Changed file: ${file.path}'); + } +} +``` diff --git a/tools/clang_tidy/lib/src/git_repo.dart b/tools/pkg/git_repo_tools/lib/git_repo_tools.dart similarity index 67% rename from tools/clang_tidy/lib/src/git_repo.dart rename to tools/pkg/git_repo_tools/lib/git_repo_tools.dart index 746359bb51198..40fd07747f06b 100644 --- a/tools/clang_tidy/lib/src/git_repo.dart +++ b/tools/pkg/git_repo_tools/lib/git_repo_tools.dart @@ -2,58 +2,66 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:io' as io show Directory, File; +import 'dart:io' as io show Directory, File, stdout; import 'package:path/path.dart' as path; import 'package:process/process.dart'; import 'package:process_runner/process_runner.dart'; -/// Utility methods for working with a git repo. -class GitRepo { +/// Utility methods for working with a git repository. +final class GitRepo { /// The git repository rooted at `root`. - GitRepo(this.root, { + GitRepo.fromRoot(this.root, { this.verbose = false, + StringSink? logSink, ProcessManager processManager = const LocalProcessManager(), - }) : _processManager = processManager; + }) : + _processManager = processManager, + logSink = logSink ?? io.stdout; /// Whether to produce verbose log output. + /// + /// If true, output of git commands will be printed to [logSink]. final bool verbose; + /// Where to send verbose log output. + /// + /// Defaults to [io.stdout]. + final StringSink logSink; + /// The root of the git repo. final io.Directory root; /// The delegate to use for running processes. final ProcessManager _processManager; - List? _changedFiles; - /// Returns a list of all non-deleted files which differ from the nearest /// merge-base with `main`. If it can't find a fork point, uses the default /// merge-base. /// /// This is only computed once and cached. Subsequent invocations of the /// getter will return the same result. - Future> get changedFiles async => - _changedFiles ??= await _getChangedFiles(); - - List? _changedFilesAtHead; - - /// Returns a list of non-deleted files which differ between the HEAD - /// commit and its parent. - Future> get changedFilesAtHead async => - _changedFilesAtHead ??= await _getChangedFilesAtHead(); + late final Future> changedFiles = _changedFiles(); - Future> _getChangedFiles() async { + Future> _changedFiles() async { final ProcessRunner processRunner = ProcessRunner( defaultWorkingDirectory: root, processManager: _processManager, ); await _fetch(processRunner); + // Find the merge base between the current branch and the branch that was + // checked out at the time of the last fetch. The merge base is the common + // ancestor of the two branches, and the output is the hash of the merge + // base. ProcessRunnerResult mergeBaseResult = await processRunner.runProcess( ['git', 'merge-base', '--fork-point', 'FETCH_HEAD', 'HEAD'], failOk: true, ); if (mergeBaseResult.exitCode != 0) { + if (verbose) { + logSink.writeln('git merge-base --fork-point failed, using default merge-base'); + logSink.writeln('Output:\n${mergeBaseResult.stdout}'); + } mergeBaseResult = await processRunner.runProcess([ 'git', 'merge-base', @@ -62,8 +70,7 @@ class GitRepo { ]); } final String mergeBase = mergeBaseResult.stdout.trim(); - final ProcessRunnerResult masterResult = await processRunner - .runProcess([ + final ProcessRunnerResult masterResult = await processRunner.runProcess([ 'git', 'diff', '--name-only', @@ -73,9 +80,17 @@ class GitRepo { return _gitOutputToList(masterResult); } - Future> _getChangedFilesAtHead() async { + /// Returns a list of non-deleted files which differ between the HEAD + /// commit and its parent. + /// + /// This is only computed once and cached. Subsequent invocations of the + /// getter will return the same result. + late final Future> changedFilesAtHead = _changedFilesAtHead(); + + Future> _changedFilesAtHead() async { final ProcessRunner processRunner = ProcessRunner( defaultWorkingDirectory: root, + processManager: _processManager, ); await _fetch(processRunner); final ProcessRunnerResult diffTreeResult = await processRunner.runProcess( @@ -98,6 +113,10 @@ class GitRepo { failOk: true, ); if (fetchResult.exitCode != 0) { + if (verbose) { + logSink.writeln('git fetch upstream main failed, using origin main'); + logSink.writeln('Output:\n${fetchResult.stdout}'); + } await processRunner.runProcess([ 'git', 'fetch', @@ -110,7 +129,7 @@ class GitRepo { List _gitOutputToList(ProcessRunnerResult result) { final String diffOutput = result.stdout.trim(); if (verbose) { - print('git diff output:\n$diffOutput'); + logSink.writeln('git diff output:\n$diffOutput'); } final Set resultMap = {}; resultMap.addAll(diffOutput.split('\n').where( diff --git a/tools/pkg/git_repo_tools/pubspec.yaml b/tools/pkg/git_repo_tools/pubspec.yaml new file mode 100644 index 0000000000000..1cf937a42d22d --- /dev/null +++ b/tools/pkg/git_repo_tools/pubspec.yaml @@ -0,0 +1,60 @@ +# Copyright 2013 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +name: git_repo_tools +publish_to: none +environment: + sdk: '>=3.2.0-0 <4.0.0' + +# Do not add any dependencies that require more than what is provided in +# //third_party/pkg, //third_party/dart/pkg, or +# //third_party/dart/third_party/pkg. In particular, package:test is not usable +# here. + +# If you do add packages here, make sure you can run `pub get --offline`, and +# check the .packages and .package_config to make sure all the paths are +# relative to this directory into //third_party/dart + +dependencies: + meta: any + path: any + process: any + process_runner: any + +dev_dependencies: + async_helper: any + expect: any + litetest: any + process_fakes: any + smith: any + +dependency_overrides: + args: + path: ../../../../third_party/dart/third_party/pkg/args + async: + path: ../../../../third_party/dart/third_party/pkg/async + async_helper: + path: ../../../../third_party/dart/pkg/async_helper + collection: + path: ../../../../third_party/dart/third_party/pkg/collection + expect: + path: ../../../../third_party/dart/pkg/expect + file: + path: ../../../../third_party/pkg/file/packages/file + litetest: + path: ../../../testing/litetest + meta: + path: ../../../../third_party/dart/pkg/meta + path: + path: ../../../../third_party/dart/third_party/pkg/path + platform: + path: ../../../../third_party/pkg/platform + process: + path: ../../../../third_party/pkg/process + process_fakes: + path: ../process_fakes + process_runner: + path: ../../../../third_party/pkg/process_runner + smith: + path: ../../../../third_party/dart/pkg/smith diff --git a/tools/pkg/git_repo_tools/test/git_repo_tools_test.dart b/tools/pkg/git_repo_tools/test/git_repo_tools_test.dart new file mode 100644 index 0000000000000..bca022f353a5d --- /dev/null +++ b/tools/pkg/git_repo_tools/test/git_repo_tools_test.dart @@ -0,0 +1,215 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'dart:io' as io; + +import 'package:git_repo_tools/git_repo_tools.dart'; +import 'package:litetest/litetest.dart'; +import 'package:process_fakes/process_fakes.dart'; + +void main() { + const String fakeShaHash = 'fake-sha-hash'; + + + test('returns non-deleted files which differ from merge-base with main', () async { + final Fixture fixture = Fixture( + processManager: FakeProcessManager( + onStart: (List command) { + // Succeed calling "git merge-base --fork-point FETCH_HEAD HEAD". + if (command.join(' ').startsWith('git merge-base --fork-point')) { + return FakeProcess(stdout: fakeShaHash); + } + + // Succeed calling "git fetch upstream main". + if (command.join(' ') == 'git fetch upstream main') { + return FakeProcess(); + } + + // Succeed calling "git diff --name-only --diff-filter=ACMRT fake-sha-hash". + if (command.join(' ') == 'git diff --name-only --diff-filter=ACMRT $fakeShaHash') { + return FakeProcess(stdout: 'file1\nfile2'); + } + + // Otherwise, fail. + return FakeProcessManager.unhandledStart(command); + }, + ), + ); + + try { + final List changedFiles = await fixture.gitRepo.changedFiles; + expect(changedFiles, hasLength(2)); + expect(changedFiles[0].path, endsWith('file1')); + expect(changedFiles[1].path, endsWith('file2')); + } finally { + fixture.gitRepo.root.deleteSync(recursive: true); + } + }); + + test('returns non-deleted files which differ from default merge-base', () async { + final Fixture fixture = Fixture( + processManager: FakeProcessManager( + onStart: (List command) { + if (command.join(' ').startsWith('git merge-base --fork-point')) { + return FakeProcess(exitCode: 1); + } + + if (command.join(' ').startsWith('git merge-base')) { + return FakeProcess(stdout: fakeShaHash); + } + + if (command.join(' ') == 'git fetch upstream main') { + return FakeProcess(); + } + + if (command.join(' ') == 'git diff --name-only --diff-filter=ACMRT $fakeShaHash') { + return FakeProcess(stdout: 'file1\nfile2'); + } + + // Otherwise, fail. + return FakeProcessManager.unhandledStart(command); + }, + ), + ); + + try { + final List changedFiles = await fixture.gitRepo.changedFiles; + expect(changedFiles, hasLength(2)); + expect(changedFiles[0].path, endsWith('file1')); + expect(changedFiles[1].path, endsWith('file2')); + } finally { + fixture.gitRepo.root.deleteSync(recursive: true); + } + }); + + test('returns non-deleted files which differ from HEAD', () async { + final Fixture fixture = Fixture( + processManager: FakeProcessManager( + onStart: (List command) { + if (command.join(' ') == 'git fetch upstream main') { + return FakeProcess(); + } + + if (command.join(' ') == 'git diff-tree --no-commit-id --name-only --diff-filter=ACMRT -r HEAD') { + return FakeProcess(stdout: 'file1\nfile2'); + } + + // Otherwise, fail. + return FakeProcessManager.unhandledStart(command); + }, + ), + ); + + try { + final List changedFiles = await fixture.gitRepo.changedFilesAtHead; + expect(changedFiles, hasLength(2)); + expect(changedFiles[0].path, endsWith('file1')); + expect(changedFiles[1].path, endsWith('file2')); + } finally { + fixture.gitRepo.root.deleteSync(recursive: true); + } + }); + + test('returns non-deleted files which differ from HEAD when merge-base fails', () async { + final Fixture fixture = Fixture( + processManager: FakeProcessManager( + onStart: (List command) { + if (command.join(' ') == 'git fetch upstream main') { + return FakeProcess(); + } + + if (command.join(' ') == 'git diff-tree --no-commit-id --name-only --diff-filter=ACMRT -r HEAD') { + return FakeProcess(stdout: 'file1\nfile2'); + } + + if (command.join(' ').startsWith('git merge-base --fork-point')) { + return FakeProcess(exitCode: 1); + } + + if (command.join(' ').startsWith('git merge-base')) { + return FakeProcess(stdout: fakeShaHash); + } + + // Otherwise, fail. + return FakeProcessManager.unhandledStart(command); + }, + ), + ); + + try { + final List changedFiles = await fixture.gitRepo.changedFilesAtHead; + expect(changedFiles, hasLength(2)); + expect(changedFiles[0].path, endsWith('file1')); + expect(changedFiles[1].path, endsWith('file2')); + } finally { + fixture.gitRepo.root.deleteSync(recursive: true); + } + }); + + test('verbose output is captured', () async { + final Fixture fixture = Fixture( + processManager: FakeProcessManager( + onStart: (List command) { + if (command.join(' ').startsWith('git merge-base --fork-point')) { + return FakeProcess(exitCode: 1); + } + + if (command.join(' ').startsWith('git merge-base')) { + return FakeProcess(stdout: fakeShaHash); + } + + if (command.join(' ') == 'git fetch upstream main') { + return FakeProcess(); + } + + if (command.join(' ') == 'git diff --name-only --diff-filter=ACMRT $fakeShaHash') { + return FakeProcess(stdout: 'file1\nfile2'); + } + + // Otherwise, fail. + return FakeProcessManager.unhandledStart(command); + }, + ), + verbose: true, + ); + + try { + await fixture.gitRepo.changedFiles; + expect(fixture.logSink.toString(), contains('git merge-base --fork-point failed, using default merge-base')); + expect(fixture.logSink.toString(), contains('git diff output:\nfile1\nfile2')); + } finally { + fixture.gitRepo.root.deleteSync(recursive: true); + } + }); +} + +final class Fixture { + factory Fixture({ + FakeProcessManager? processManager, + bool verbose = false, + }) { + final io.Directory root = io.Directory.systemTemp.createTempSync('git_repo_tools.test'); + final StringBuffer logSink = StringBuffer(); + processManager ??= FakeProcessManager(); + return Fixture._( + gitRepo: GitRepo.fromRoot(root, + logSink: logSink, + processManager: processManager, + verbose: verbose, + ), + logSink: logSink, + processManager: processManager, + ); + } + + const Fixture._({ + required this.gitRepo, + required this.logSink, + required this.processManager, + }); + + final GitRepo gitRepo; + final StringBuffer logSink; + final FakeProcessManager processManager; +} diff --git a/tools/pkg/process_fakes/README.md b/tools/pkg/process_fakes/README.md new file mode 100644 index 0000000000000..33da210aea5b0 --- /dev/null +++ b/tools/pkg/process_fakes/README.md @@ -0,0 +1,7 @@ +# `process_fakes` + +Fake implementations of `Process` and `ProcessManager` for testing. + +This is not a great package, and is the bare minimum needed for fairly basic +tooling that uses `ProcessManager`. If we ever need a more complete solution +we should look at upstreaming [`flutter_tools/.../fake_proecss_manager.dart`](https://github.com/flutter/flutter/blob/a9183f696c8e12617d05a26b0b5e80035e515f2a/packages/flutter_tools/test/src/fake_process_manager.dart#L223) diff --git a/tools/clang_tidy/test/process_fakes.dart b/tools/pkg/process_fakes/lib/process_fakes.dart similarity index 91% rename from tools/clang_tidy/test/process_fakes.dart rename to tools/pkg/process_fakes/lib/process_fakes.dart index 7bc5fe5778e1f..356f1d391f33d 100644 --- a/tools/clang_tidy/test/process_fakes.dart +++ b/tools/pkg/process_fakes/lib/process_fakes.dart @@ -9,15 +9,20 @@ import 'package:process/process.dart'; /// A fake implementation of [ProcessManager] that allows control for testing. final class FakeProcessManager implements ProcessManager { + /// Creates a fake process manager delegates to [onRun] and [onStart]. + /// + /// If either is not provided, it throws an [UnsupportedError] when called. FakeProcessManager({ io.ProcessResult Function(List command) onRun = unhandledRun, io.Process Function(List command) onStart = unhandledStart, }) : _onRun = onRun, _onStart = onStart; + /// A default implementation of [onRun] that throws an [UnsupportedError]. static io.ProcessResult unhandledRun(List command) { throw UnsupportedError('Unhandled run: ${command.join(' ')}'); } + /// A default implementation of [onStart] that throws an [UnsupportedError]. static io.Process unhandledStart(List command) { throw UnsupportedError('Unhandled start: ${command.join(' ')}'); } diff --git a/tools/pkg/process_fakes/pubspec.yaml b/tools/pkg/process_fakes/pubspec.yaml new file mode 100644 index 0000000000000..8ac6e85aa88fe --- /dev/null +++ b/tools/pkg/process_fakes/pubspec.yaml @@ -0,0 +1,36 @@ +# Copyright 2013 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +name: process_fakes +publish_to: none +environment: + sdk: '>=3.2.0-0 <4.0.0' + +# Do not add any dependencies that require more than what is provided in +# //third_party/pkg, //third_party/dart/pkg, or +# //third_party/dart/third_party/pkg. In particular, package:test is not usable +# here. + +# If you do add packages here, make sure you can run `pub get --offline`, and +# check the .packages and .package_config to make sure all the paths are +# relative to this directory into //third_party/dart + +dependencies: + file: any + meta: any + path: any + platform: any + process: any + +dependency_overrides: + file: + path: ../../../../third_party/pkg/file/packages/file + meta: + path: ../../../../third_party/dart/pkg/meta + path: + path: ../../../../third_party/dart/third_party/pkg/path + platform: + path: ../../../../third_party/pkg/platform + process: + path: ../../../../third_party/pkg/process diff --git a/tools/pub_get_offline.py b/tools/pub_get_offline.py index 17f529c61c805..931db7319b8f9 100644 --- a/tools/pub_get_offline.py +++ b/tools/pub_get_offline.py @@ -44,6 +44,8 @@ os.path.join(ENGINE_DIR, 'tools', 'path_ops', 'dart'), os.path.join(ENGINE_DIR, 'tools', 'pkg', 'engine_build_configs'), os.path.join(ENGINE_DIR, 'tools', 'pkg', 'engine_repo_tools'), + os.path.join(ENGINE_DIR, 'tools', 'pkg', 'git_repo_tools'), + os.path.join(ENGINE_DIR, 'tools', 'pkg', 'process_fakes'), ] From dc024ab32c46eb300e3fc1558e70133f03abd504 Mon Sep 17 00:00:00 2001 From: Yegor Date: Thu, 21 Sep 2023 12:57:55 -0700 Subject: [PATCH 213/859] Revert "[web] fix clicks on merged semantic nodes (#43620)" (#46067) This reverts commit 0c1de9b8afbabe3857a3b495cc9b0bcfdf1ac305. The commit caused https://github.com/flutter/flutter/issues/134842. I'm going to try again, this time accounting for nested clickables/tappables. --- .../lib/src/engine/pointer_binding.dart | 341 +++------------- .../lib/src/engine/semantics/semantics.dart | 5 +- .../lib/src/engine/semantics/tappable.dart | 53 ++- lib/web_ui/test/common/matchers.dart | 20 +- .../test/engine/pointer_binding_test.dart | 379 ------------------ .../test/engine/semantics/semantics_test.dart | 46 +-- 6 files changed, 115 insertions(+), 729 deletions(-) diff --git a/lib/web_ui/lib/src/engine/pointer_binding.dart b/lib/web_ui/lib/src/engine/pointer_binding.dart index e3f43fde447c4..e2305c50b5e02 100644 --- a/lib/web_ui/lib/src/engine/pointer_binding.dart +++ b/lib/web_ui/lib/src/engine/pointer_binding.dart @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:async'; import 'dart:js_interop'; import 'dart:math' as math; @@ -26,7 +25,7 @@ const bool _debugLogPointerEvents = false; const bool _debugLogFlutterEvents = false; /// The signature of a callback that handles pointer events. -typedef _PointerDataCallback = void Function(DomEvent event, List); +typedef _PointerDataCallback = void Function(Iterable); // The mask for the bitfield of event buttons. Buttons not contained in this // mask are cut off. @@ -104,14 +103,11 @@ class PointerBinding { } } - final ClickDebouncer clickDebouncer = ClickDebouncer(); - /// Performs necessary clean up for PointerBinding including removing event listeners /// and clearing the existing pointer state void dispose() { _adapter.clearListeners(); _pointerDataConverter.clearPointerState(); - clickDebouncer.reset(); } final DomElement flutterViewElement; @@ -160,247 +156,20 @@ class PointerBinding { // TODO(dit): remove old API fallbacks, https://github.com/flutter/flutter/issues/116141 _BaseAdapter _createAdapter() { if (_detector.hasPointerEvents) { - return _PointerAdapter(clickDebouncer.onPointerData, flutterViewElement, _pointerDataConverter, _keyboardConverter); + return _PointerAdapter(_onPointerData, flutterViewElement, _pointerDataConverter, _keyboardConverter); } // Fallback for Safari Mobile < 13. To be removed. if (_detector.hasTouchEvents) { - return _TouchAdapter(clickDebouncer.onPointerData, flutterViewElement, _pointerDataConverter, _keyboardConverter); + return _TouchAdapter(_onPointerData, flutterViewElement, _pointerDataConverter, _keyboardConverter); } // Fallback for Safari Desktop < 13. To be removed. if (_detector.hasMouseEvents) { - return _MouseAdapter(clickDebouncer.onPointerData, flutterViewElement, _pointerDataConverter, _keyboardConverter); + return _MouseAdapter(_onPointerData, flutterViewElement, _pointerDataConverter, _keyboardConverter); } throw UnsupportedError('This browser does not support pointer, touch, or mouse events.'); } -} - -@visibleForTesting -typedef QueuedEvent = ({ DomEvent event, Duration timeStamp, List data }); - -@visibleForTesting -typedef DebounceState = ({ - DomElement target, - Timer timer, - List queue, -}); - -/// Disambiguates taps and clicks that are produced both by the framework from -/// `pointerdown`/`pointerup` events and those detected as DOM "click" events by -/// the browser. -/// -/// The implementation is waiting for a `pointerdown`, and as soon as it sees -/// one stops forwarding pointer events to the framework, and instead queues -/// them in a list. The queuing process stops as soon as one of the following -/// two conditions happens first: -/// -/// * 200ms passes after the `pointerdown` event. Most clicks, even slow ones, -/// are typically done by then. Importantly, screen readers simulate clicks -/// much faster than 200ms. So if the timer expires, it is likely the user is -/// not interested in producing a click, so the debouncing process stops and -/// all queued events are forwarded to the framework. If, for example, a -/// tappable node is inside a scrollable viewport, the events can be -/// intrepreted by the framework to initiate scrolling. -/// * A `click` event arrives. If the event queue has not been flushed to the -/// framework, the event is forwarded to the framework as a -/// `SemanticsAction.tap`, and all the pointer events are dropped. If, by the -/// time the click event arrives, the queue was flushed (but no more than 50ms -/// ago), then the click event is dropped instead under the assumption that -/// the flushed pointer events are interpreted by the framework as the desired -/// gesture. -/// -/// This mechanism is in place to deal with https://github.com/flutter/flutter/issues/130162. -class ClickDebouncer { - DebounceState? _state; - - @visibleForTesting - DebounceState? get debugState => _state; - - // The timestamp of the last "pointerup" DOM event that was flushed. - // - // Not to be confused with the time when it was flushed. The two may be far - // apart because the flushing can happen after a delay due to timer, or events - // that happen after the said "pointerup". - Duration? _lastFlushedPointerUpTimeStamp; - - /// Returns true if the debouncer has a non-empty queue of pointer events that - /// were withheld from the framework. - /// - /// This value is normally false, and it flips to true when the first - /// pointerdown is observed that lands on a tappable semantics node, denoted - /// by the presence of the `flt-tappable` attribute. - bool get isDebouncing => _state != null; - - /// Processes a pointer event. - /// - /// If semantics are off, simply forwards the event to the framework. - /// - /// If currently debouncing events (see [isDebouncing]), adds the event to - /// the debounce queue, unless the target of the event is different from the - /// target that initiated the debouncing process, in which case stops - /// debouncing and flushes pointer events to the framework. - /// - /// If the event is a `pointerdown` and the target is `flt-tappable`, begins - /// debouncing events. - /// - /// In all other situations forwards the event to the framework. - void onPointerData(DomEvent event, List data) { - if (!EnginePlatformDispatcher.instance.semanticsEnabled) { - _sendToFramework(event, data); - return; - } - - if (isDebouncing) { - _debounce(event, data); - } else if (event.type == 'pointerdown') { - _startDebouncing(event, data); - } else { - _sendToFramework(event, data); - } - } - - /// Notifies the debouncer of the browser-detected "click" DOM event. - /// - /// Forwards the event to the framework, unless it is deduplicated because - /// the corresponding pointer down/up events were recently flushed to the - /// framework already. - void onClick(DomEvent click, int semanticsNodeId, bool isListening) { - assert(click.type == 'click'); - - if (!isDebouncing) { - // There's no pending queue of pointer events that are being debounced. It - // is a standalone click event. Unless pointer down/up were flushed - // recently and if the node is currently listening to event, forward to - // the framework. - if (isListening && _shouldSendClickEventToFramework(click)) { - EnginePlatformDispatcher.instance.invokeOnSemanticsAction( - semanticsNodeId, ui.SemanticsAction.tap, null); - } - return; - } - - if (isListening) { - // There's a pending queue of pointer events. Prefer sending the tap action - // instead of pointer events, because the pointer events may not land on the - // combined semantic node and miss the click/tap. - final DebounceState state = _state!; - _state = null; - state.timer.cancel(); - EnginePlatformDispatcher.instance.invokeOnSemanticsAction( - semanticsNodeId, ui.SemanticsAction.tap, null); - } else { - // The semantic node is not listening to taps. Flush the pointer events - // for the framework to figure out what to do with them. It's possible - // the framework is interested in gestures other than taps. - _flush(); - } - } - - void _startDebouncing(DomEvent event, List data) { - assert( - _state == null, - 'Cannot start debouncing. Already debouncing.' - ); - assert( - event.type == 'pointerdown', - 'Click debouncing must begin with a pointerdown' - ); - - final DomEventTarget? target = event.target; - if (target is DomElement && target.hasAttribute('flt-tappable')) { - _state = ( - target: target, - // The 200ms duration was chosen empirically by testing tapping, mouse - // clicking, trackpad tapping and clicking, as well as the following - // screen readers: TalkBack on Android, VoiceOver on macOS, Narrator/ - // NVDA/JAWS on Windows. 200ms seemed to hit the sweet spot by - // satisfying the following: - // * It was short enough that delaying the `pointerdown` still allowed - // drag gestures to begin reasonably soon (e.g. scrolling). - // * It was long enough to register taps and clicks. - // * It was successful at detecting taps generated by all tested - // screen readers. - timer: Timer(const Duration(milliseconds: 200), _onTimerExpired), - queue: [( - event: event, - timeStamp: _BaseAdapter._eventTimeStampToDuration(event.timeStamp!), - data: data, - )], - ); - } else { - // The event landed on an non-tappable target. Assume this won't lead to - // double clicks and forward the event to the framework. - _sendToFramework(event, data); - } - } - - void _debounce(DomEvent event, List data) { - assert( - _state != null, - 'Cannot debounce event. Debouncing state not established by _startDebouncing.' - ); - - final DebounceState state = _state!; - state.queue.add(( - event: event, - timeStamp: _BaseAdapter._eventTimeStampToDuration(event.timeStamp!), - data: data, - )); - - // It's only interesting to debounce clicks when both `pointerdown` and - // `pointerup` land on the same element. - if (event.type == 'pointerup') { - // TODO(yjbanov): this is a bit mouthful, but see https://github.com/dart-lang/sdk/issues/53070 - final DomEventTarget? eventTarget = event.target; - final DomElement stateTarget = state.target; - final bool targetChanged = eventTarget != stateTarget; - if (targetChanged) { - _flush(); - } - } - } - - void _onTimerExpired() { - if (!isDebouncing) { - return; - } - _flush(); - } - - // If the click event happens soon after the last `pointerup` event that was - // already flushed to the framework, the click event is dropped to avoid - // double click. - bool _shouldSendClickEventToFramework(DomEvent click) { - final Duration? lastFlushedPointerUpTimeStamp = _lastFlushedPointerUpTimeStamp; - - if (lastFlushedPointerUpTimeStamp == null) { - // We haven't seen a pointerup. It's standalone click event. Let it through. - return true; - } - - final Duration clickTimeStamp = _BaseAdapter._eventTimeStampToDuration(click.timeStamp!); - final Duration delta = clickTimeStamp - lastFlushedPointerUpTimeStamp; - return delta >= const Duration(milliseconds: 50); - } - - void _flush() { - assert(_state != null); - - final DebounceState state = _state!; - state.timer.cancel(); - - final List aggregateData = []; - for (final QueuedEvent queuedEvent in state.queue) { - if (queuedEvent.event.type == 'pointerup') { - _lastFlushedPointerUpTimeStamp = queuedEvent.timeStamp; - } - aggregateData.addAll(queuedEvent.data); - } - - _sendToFramework(null, aggregateData); - _state = null; - } - void _sendToFramework(DomEvent? event, List data) { + void _onPointerData(Iterable data) { final ui.PointerDataPacket packet = ui.PointerDataPacket(data: data.toList()); if (_debugLogFlutterEvents) { for(final ui.PointerData datum in data) { @@ -409,16 +178,6 @@ class ClickDebouncer { } EnginePlatformDispatcher.instance.invokeOnPointerDataPacket(packet); } - - /// Cancels any pending debounce process and forgets anything that happened so - /// far. - /// - /// This object can be used as if it was just initialized. - void reset() { - _state?.timer.cancel(); - _state = null; - _lastFlushedPointerUpTimeStamp = null; - } } class PointerSupportDetector { @@ -439,50 +198,65 @@ class _Listener { required this.target, required this.handler, required this.useCapture, + required this.isNative, }); - /// Registers a listener for the given `event` on a `target`. - /// - /// If `passive` is null uses the default behavior determined by the event - /// type. If `passive` is true, marks the handler as non-blocking for the - /// built-in browser behavior. This means the browser will not wait for the - /// handler to finish execution before performing the default action - /// associated with this event. If `passive` is false, the browser will wait - /// for the handler to finish execution before performing the respective - /// action. + /// Registers a listener for the given [event] on [target] using the Dart-to-JS API. factory _Listener.register({ required String event, required DomEventTarget target, required DartDomEventListener handler, bool capture = false, - bool? passive, }) { final DomEventListener jsHandler = createDomEventListener(handler); - if (passive == null) { - target.addEventListener(event, jsHandler, capture); - } else { - final Map eventOptions = { - 'capture': capture, - 'passive': passive, - }; - target.addEventListenerWithOptions(event, jsHandler, eventOptions); - } + final _Listener listener = _Listener._( + event: event, + target: target, + handler: jsHandler, + useCapture: capture, + isNative: false, + ); + target.addEventListener(event, jsHandler, capture); + return listener; + } - return _Listener._( + /// Registers a listener for the given [event] on [target] using the native JS API. + factory _Listener.registerNative({ + required String event, + required DomEventTarget target, + required DomEventListener jsHandler, + bool capture = false, + bool passive = false, + }) { + final Map eventOptions = { + 'capture': capture, + 'passive': passive, + }; + final _Listener listener = _Listener._( event: event, target: target, handler: jsHandler, useCapture: capture, + isNative: true, ); + target.addEventListenerWithOptions(event, jsHandler, eventOptions); + return listener; } final String event; + final DomEventTarget target; final DomEventListener handler; + final bool useCapture; + final bool isNative; void unregister() { - target.removeEventListener(event, handler, useCapture); + if (isNative) { + target.removeEventListener(event, handler, useCapture); + } else { + target.removeEventListener(event, handler, useCapture); + } } } @@ -722,11 +496,10 @@ mixin _WheelEventListenerMixin on _BaseAdapter { } void _addWheelEventListener(DartDomEventListener handler) { - _listeners.add(_Listener.register( + _listeners.add(_Listener.registerNative( event: 'wheel', target: flutterViewElement, - handler: handler, - passive: false, + jsHandler: createDomEventListener(handler), )); } @@ -736,7 +509,7 @@ mixin _WheelEventListenerMixin on _BaseAdapter { if (_debugLogPointerEvents) { print(event.type); } - _callback(e, _convertWheelEventToPointerData(event)); + _callback(_convertWheelEventToPointerData(event)); // Prevent default so mouse wheel event doesn't get converted to // a scroll event that semantic nodes would process. // @@ -986,7 +759,7 @@ class _PointerAdapter extends _BaseAdapter with _WheelEventListenerMixin { buttons: event.buttons!.toInt(), ); _convertEventsToPointerData(data: pointerData, event: event, details: down); - _callback(event, pointerData); + _callback(pointerData); }); // Why `domWindow` you ask? See this fiddle: https://jsfiddle.net/ditman/7towxaqp @@ -1003,7 +776,7 @@ class _PointerAdapter extends _BaseAdapter with _WheelEventListenerMixin { final _SanitizedDetails move = sanitizer.sanitizeMoveEvent(buttons: event.buttons!.toInt()); _convertEventsToPointerData(data: pointerData, event: event, details: move); } - _callback(event, pointerData); + _callback(pointerData); }); _addPointerEventListener(flutterViewElement, 'pointerleave', (DomPointerEvent event) { @@ -1013,7 +786,7 @@ class _PointerAdapter extends _BaseAdapter with _WheelEventListenerMixin { final _SanitizedDetails? details = sanitizer.sanitizeLeaveEvent(buttons: event.buttons!.toInt()); if (details != null) { _convertEventsToPointerData(data: pointerData, event: event, details: details); - _callback(event, pointerData); + _callback(pointerData); } }, useCapture: false, checkModifiers: false); @@ -1026,7 +799,7 @@ class _PointerAdapter extends _BaseAdapter with _WheelEventListenerMixin { _removePointerIfUnhoverable(event); if (details != null) { _convertEventsToPointerData(data: pointerData, event: event, details: details); - _callback(event, pointerData); + _callback(pointerData); } } }); @@ -1042,7 +815,7 @@ class _PointerAdapter extends _BaseAdapter with _WheelEventListenerMixin { final _SanitizedDetails details = _getSanitizer(device).sanitizeCancelEvent(); _removePointerIfUnhoverable(event); _convertEventsToPointerData(data: pointerData, event: event, details: details); - _callback(event, pointerData); + _callback(pointerData); } }, checkModifiers: false); @@ -1181,7 +954,7 @@ class _TouchAdapter extends _BaseAdapter { ); } } - _callback(event, pointerData); + _callback(pointerData); }); _addTouchEventListener(flutterViewElement, 'touchmove', (DomTouchEvent event) { @@ -1200,7 +973,7 @@ class _TouchAdapter extends _BaseAdapter { ); } } - _callback(event, pointerData); + _callback(pointerData); }); _addTouchEventListener(flutterViewElement, 'touchend', (DomTouchEvent event) { @@ -1222,7 +995,7 @@ class _TouchAdapter extends _BaseAdapter { ); } } - _callback(event, pointerData); + _callback(pointerData); }); _addTouchEventListener(flutterViewElement, 'touchcancel', (DomTouchEvent event) { @@ -1241,7 +1014,7 @@ class _TouchAdapter extends _BaseAdapter { ); } } - _callback(event, pointerData); + _callback(pointerData); }); } @@ -1339,7 +1112,7 @@ class _MouseAdapter extends _BaseAdapter with _WheelEventListenerMixin { buttons: event.buttons!.toInt(), ); _convertEventsToPointerData(data: pointerData, event: event, details: sanitizedDetails); - _callback(event, pointerData); + _callback(pointerData); }); // Why `domWindow` you ask? See this fiddle: https://jsfiddle.net/ditman/7towxaqp @@ -1351,7 +1124,7 @@ class _MouseAdapter extends _BaseAdapter with _WheelEventListenerMixin { } final _SanitizedDetails move = _sanitizer.sanitizeMoveEvent(buttons: event.buttons!.toInt()); _convertEventsToPointerData(data: pointerData, event: event, details: move); - _callback(event, pointerData); + _callback(pointerData); }); _addMouseEventListener(flutterViewElement, 'mouseleave', (DomMouseEvent event) { @@ -1359,7 +1132,7 @@ class _MouseAdapter extends _BaseAdapter with _WheelEventListenerMixin { final _SanitizedDetails? details = _sanitizer.sanitizeLeaveEvent(buttons: event.buttons!.toInt()); if (details != null) { _convertEventsToPointerData(data: pointerData, event: event, details: details); - _callback(event, pointerData); + _callback(pointerData); } }, useCapture: false); @@ -1369,7 +1142,7 @@ class _MouseAdapter extends _BaseAdapter with _WheelEventListenerMixin { final _SanitizedDetails? sanitizedDetails = _sanitizer.sanitizeUpEvent(buttons: event.buttons?.toInt()); if (sanitizedDetails != null) { _convertEventsToPointerData(data: pointerData, event: event, details: sanitizedDetails); - _callback(event, pointerData); + _callback(pointerData); } }); diff --git a/lib/web_ui/lib/src/engine/semantics/semantics.dart b/lib/web_ui/lib/src/engine/semantics/semantics.dart index 5fa474c8b2b4c..316c867a5fef0 100644 --- a/lib/web_ui/lib/src/engine/semantics/semantics.dart +++ b/lib/web_ui/lib/src/engine/semantics/semantics.dart @@ -1980,9 +1980,8 @@ class EngineSemanticsOwner { } /// Receives DOM events from the pointer event system to correlate with the - /// semantics events. - /// - /// Returns true if the event should be forwarded to the framework. + /// semantics events; returns true if the event should be forwarded to the + /// framework. /// /// The browser sends us both raw pointer events and gestures from /// [SemanticsObject.element]s. There could be three possibilities: diff --git a/lib/web_ui/lib/src/engine/semantics/tappable.dart b/lib/web_ui/lib/src/engine/semantics/tappable.dart index 1bbf179c06ff5..259a9c7d55669 100644 --- a/lib/web_ui/lib/src/engine/semantics/tappable.dart +++ b/lib/web_ui/lib/src/engine/semantics/tappable.dart @@ -2,9 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'package:ui/src/engine.dart'; import 'package:ui/ui.dart' as ui; +import '../dom.dart'; +import '../platform_dispatcher.dart'; +import 'semantics.dart'; + /// Sets the "button" ARIA role. class Button extends PrimaryRoleManager { Button(SemanticsObject semanticsObject) : super.withBasics(PrimaryRole.button, semanticsObject) { @@ -30,45 +33,41 @@ class Button extends PrimaryRoleManager { /// the browser may not send us pointer events. In that mode we forward HTML /// click as [ui.SemanticsAction.tap]. class Tappable extends RoleManager { - Tappable(SemanticsObject semanticsObject) : super(Role.tappable, semanticsObject) { - _clickListener = createDomEventListener((DomEvent click) { - PointerBinding.instance!.clickDebouncer.onClick( - click, - semanticsObject.id, - _isListening, - ); - }); - semanticsObject.element.addEventListener('click', _clickListener); - } + Tappable(SemanticsObject semanticsObject) + : super(Role.tappable, semanticsObject); DomEventListener? _clickListener; - bool _isListening = false; @override void update() { - final bool wasListening = _isListening; - _isListening = semanticsObject.enabledState() != EnabledState.disabled && semanticsObject.isTappable; - if (wasListening != _isListening) { - _updateAttribute(); + if (!semanticsObject.isTappable || semanticsObject.enabledState() == EnabledState.disabled) { + _stopListening(); + } else { + if (_clickListener == null) { + _clickListener = createDomEventListener((DomEvent event) { + if (semanticsObject.owner.gestureMode != GestureMode.browserGestures) { + return; + } + EnginePlatformDispatcher.instance.invokeOnSemanticsAction( + semanticsObject.id, ui.SemanticsAction.tap, null); + }); + semanticsObject.element.addEventListener('click', _clickListener); + } } } - void _updateAttribute() { - // The `flt-tappable` attribute marks the element for the ClickDebouncer to - // to know that it should debounce click events on this element. The - // contract is that the element that has this attribute is also the element - // that receives pointer and "click" events. - if (_isListening) { - semanticsObject.element.setAttribute('flt-tappable', ''); - } else { - semanticsObject.element.removeAttribute('flt-tappable'); + void _stopListening() { + if (_clickListener == null) { + return; } + + semanticsObject.element.removeEventListener('click', _clickListener); + _clickListener = null; } @override void dispose() { - semanticsObject.element.removeEventListener('click', _clickListener); - _clickListener = null; super.dispose(); + _stopListening(); } } diff --git a/lib/web_ui/test/common/matchers.dart b/lib/web_ui/test/common/matchers.dart index 169baaef8af95..a2bd9fe66102a 100644 --- a/lib/web_ui/test/common/matchers.dart +++ b/lib/web_ui/test/common/matchers.dart @@ -293,23 +293,17 @@ String canonicalizeHtml( html_package.Element.tag(replacementTag); if (mode != HtmlComparisonMode.noAttributes) { - // Sort the attributes so tests are not sensitive to their order, which - // does not matter in terms of functionality. - final List attributeNames = original.attributes.keys.cast().toList(); - attributeNames.sort(); - for (final String name in attributeNames) { - final String value = original.attributes[name]!; + original.attributes.forEach((dynamic name, String value) { + if (name is! String) { + throw ArgumentError('"$name" should be String but was ${name.runtimeType}.'); + } if (name == 'style') { - // The style attribute is handled separately because it contains substructure. - continue; + return; } - - // These are the only attributes we're interested in testing. This list - // can change over time. - if (name.startsWith('aria-') || name.startsWith('flt-') || name == 'role') { + if (name.startsWith('aria-')) { replacement.attributes[name] = value; } - } + }); if (original.attributes.containsKey('style')) { final String styleValue = original.attributes['style']!; diff --git a/lib/web_ui/test/engine/pointer_binding_test.dart b/lib/web_ui/test/engine/pointer_binding_test.dart index 613b247ee1391..dcb74beda73a6 100644 --- a/lib/web_ui/test/engine/pointer_binding_test.dart +++ b/lib/web_ui/test/engine/pointer_binding_test.dart @@ -3087,385 +3087,6 @@ void testMain() { packets.clear(); }, ); - - group('ClickDebouncer', () { - _testClickDebouncer(); - }); -} - -typedef CapturedSemanticsEvent = ({ - ui.SemanticsAction type, - int nodeId, -}); - -void _testClickDebouncer() { - final DateTime testTime = DateTime(2018, 12, 17); - late List pointerPackets; - late List semanticsActions; - late _PointerEventContext context; - late PointerBinding binding; - - void testWithSemantics( - String description, - Future Function() body, - ) { - test( - description, - () async { - EngineSemanticsOwner.instance - ..debugOverrideTimestampFunction(() => testTime) - ..semanticsEnabled = true; - await body(); - EngineSemanticsOwner.instance.semanticsEnabled = false; - }, - ); - } - - setUp(() { - context = _PointerEventContext(); - pointerPackets = []; - semanticsActions = []; - ui.window.onPointerDataPacket = (ui.PointerDataPacket packet) { - for (final ui.PointerData data in packet.data) { - pointerPackets.add(data.change); - } - }; - EnginePlatformDispatcher.instance.onSemanticsActionEvent = (ui.SemanticsActionEvent event) { - semanticsActions.add((type: event.type, nodeId: event.nodeId)); - }; - binding = PointerBinding.instance!; - binding.debugOverrideDetector(context); - binding.clickDebouncer.reset(); - }); - - tearDown(() { - binding.clickDebouncer.reset(); - }); - - test('Forwards to framework when semantics is off', () { - expect(EnginePlatformDispatcher.instance.semanticsEnabled, false); - expect(binding.clickDebouncer.isDebouncing, false); - flutterViewEmbedder.flutterViewElement.dispatchEvent(context.primaryDown()); - expect(pointerPackets, [ - ui.PointerChange.add, - ui.PointerChange.down, - ]); - expect(binding.clickDebouncer.isDebouncing, false); - expect(semanticsActions, isEmpty); - }); - - testWithSemantics('Forwards to framework when not debouncing', () async { - expect(EnginePlatformDispatcher.instance.semanticsEnabled, true); - expect(binding.clickDebouncer.isDebouncing, false); - - // This test DOM element is missing the `flt-tappable` attribute on purpose - // so that the debouncer does not debounce events and simply lets - // everything through. - final DomElement testElement = createDomElement('flt-semantics'); - flutterViewEmbedder.semanticsHostElement!.appendChild(testElement); - - testElement.dispatchEvent(context.primaryDown()); - testElement.dispatchEvent(context.primaryUp()); - expect(binding.clickDebouncer.isDebouncing, false); - - expect(pointerPackets, [ - ui.PointerChange.add, - ui.PointerChange.down, - ui.PointerChange.up, - ]); - expect(semanticsActions, isEmpty); - }); - - testWithSemantics('Accumulates pointer events starting from pointerdown', () async { - expect(EnginePlatformDispatcher.instance.semanticsEnabled, true); - expect(binding.clickDebouncer.isDebouncing, false); - - final DomElement testElement = createDomElement('flt-semantics'); - testElement.setAttribute('flt-tappable', ''); - flutterViewEmbedder.semanticsHostElement!.appendChild(testElement); - - testElement.dispatchEvent(context.primaryDown()); - expect( - reason: 'Should start debouncing at first pointerdown', - binding.clickDebouncer.isDebouncing, - true, - ); - - testElement.dispatchEvent(context.primaryUp()); - expect( - reason: 'Should still be debouncing after pointerup', - binding.clickDebouncer.isDebouncing, - true, - ); - - expect( - reason: 'Events are withheld from the framework while debouncing', - pointerPackets, - [], - ); - expect( - binding.clickDebouncer.debugState!.target, - testElement, - ); - expect( - binding.clickDebouncer.debugState!.timer.isActive, - isTrue, - ); - expect( - binding.clickDebouncer.debugState!.queue.map((QueuedEvent e) => e.event.type), - ['pointerdown', 'pointerup'], - ); - - await Future.delayed(const Duration(milliseconds: 250)); - expect( - reason: 'Should stop debouncing after timer expires.', - binding.clickDebouncer.isDebouncing, - false, - ); - expect( - reason: 'Queued up events should be flushed to the framework.', - pointerPackets, - [ - ui.PointerChange.add, - ui.PointerChange.down, - ui.PointerChange.up, - ], - ); - expect(semanticsActions, isEmpty); - }); - - testWithSemantics('Flushes events to framework when target changes', () async { - expect(EnginePlatformDispatcher.instance.semanticsEnabled, true); - expect(binding.clickDebouncer.isDebouncing, false); - - final DomElement testElement = createDomElement('flt-semantics'); - testElement.setAttribute('flt-tappable', ''); - flutterViewEmbedder.semanticsHostElement!.appendChild(testElement); - - testElement.dispatchEvent(context.primaryDown()); - expect( - reason: 'Should start debouncing at first pointerdown', - binding.clickDebouncer.isDebouncing, - true, - ); - - final DomElement newTarget = createDomElement('flt-semantics'); - newTarget.setAttribute('flt-tappable', ''); - flutterViewEmbedder.semanticsHostElement!.appendChild(newTarget); - newTarget.dispatchEvent(context.primaryUp()); - - expect( - reason: 'Should stop debouncing when target changes.', - binding.clickDebouncer.isDebouncing, - false, - ); - expect( - reason: 'The state should be cleaned up after stopping debouncing.', - binding.clickDebouncer.debugState, - isNull, - ); - expect( - reason: 'Queued up events should be flushed to the framework.', - pointerPackets, - [ - ui.PointerChange.add, - ui.PointerChange.down, - ui.PointerChange.up, - ], - ); - expect(semanticsActions, isEmpty); - }); - - testWithSemantics('Forwards click to framework when not debouncing but listening', () async { - expect(binding.clickDebouncer.isDebouncing, false); - - final DomElement testElement = createDomElement('flt-semantics'); - testElement.setAttribute('flt-tappable', ''); - flutterViewEmbedder.semanticsHostElement!.appendChild(testElement); - - final DomEvent click = createDomMouseEvent( - 'click', - { - 'clientX': testElement.getBoundingClientRect().x, - 'clientY': testElement.getBoundingClientRect().y, - } - ); - - binding.clickDebouncer.onClick(click, 42, true); - expect(binding.clickDebouncer.isDebouncing, false); - expect(pointerPackets, isEmpty); - expect(semanticsActions, [ - (type: ui.SemanticsAction.tap, nodeId: 42) - ]); - }); - - testWithSemantics('Forwards click to framework when debouncing and listening', () async { - expect(binding.clickDebouncer.isDebouncing, false); - - final DomElement testElement = createDomElement('flt-semantics'); - testElement.setAttribute('flt-tappable', ''); - flutterViewEmbedder.semanticsHostElement!.appendChild(testElement); - testElement.dispatchEvent(context.primaryDown()); - expect(binding.clickDebouncer.isDebouncing, true); - - final DomEvent click = createDomMouseEvent( - 'click', - { - 'clientX': testElement.getBoundingClientRect().x, - 'clientY': testElement.getBoundingClientRect().y, - } - ); - - binding.clickDebouncer.onClick(click, 42, true); - expect(pointerPackets, isEmpty); - expect(semanticsActions, [ - (type: ui.SemanticsAction.tap, nodeId: 42) - ]); - }); - - testWithSemantics('Dedupes click if debouncing but not listening', () async { - expect(binding.clickDebouncer.isDebouncing, false); - - final DomElement testElement = createDomElement('flt-semantics'); - testElement.setAttribute('flt-tappable', ''); - flutterViewEmbedder.semanticsHostElement!.appendChild(testElement); - testElement.dispatchEvent(context.primaryDown()); - expect(binding.clickDebouncer.isDebouncing, true); - - final DomEvent click = createDomMouseEvent( - 'click', - { - 'clientX': testElement.getBoundingClientRect().x, - 'clientY': testElement.getBoundingClientRect().y, - } - ); - - binding.clickDebouncer.onClick(click, 42, false); - expect( - reason: 'When tappable declares that it is not listening to click events ' - 'the debouncer flushes the pointer events to the framework and ' - 'lets it sort it out.', - pointerPackets, - [ - ui.PointerChange.add, - ui.PointerChange.down, - ], - ); - expect(semanticsActions, isEmpty); - }); - - testWithSemantics('Dedupes click if pointer down/up flushed recently', () async { - expect(EnginePlatformDispatcher.instance.semanticsEnabled, true); - expect(binding.clickDebouncer.isDebouncing, false); - - final DomElement testElement = createDomElement('flt-semantics'); - testElement.setAttribute('flt-tappable', ''); - flutterViewEmbedder.semanticsHostElement!.appendChild(testElement); - - testElement.dispatchEvent(context.primaryDown()); - - // Simulate the user holding the pointer down for some time before releasing, - // such that the pointerup event happens close to timer expiration. This - // will create the situation that the click event arrives just after the - // pointerup is flushed. Forwarding the click to the framework would look - // like a double-click, so the click event is deduped. - await Future.delayed(const Duration(milliseconds: 190)); - - testElement.dispatchEvent(context.primaryUp()); - expect(binding.clickDebouncer.isDebouncing, true); - expect( - reason: 'Timer has not expired yet', - pointerPackets, isEmpty, - ); - - // Wait for the timer to expire to make sure pointer events are flushed. - await Future.delayed(const Duration(milliseconds: 20)); - - expect( - reason: 'Queued up events should be flushed to the framework because the ' - 'time expired before the click event arrived.', - pointerPackets, - [ - ui.PointerChange.add, - ui.PointerChange.down, - ui.PointerChange.up, - ], - ); - - final DomEvent click = createDomMouseEvent( - 'click', - { - 'clientX': testElement.getBoundingClientRect().x, - 'clientY': testElement.getBoundingClientRect().y, - } - ); - binding.clickDebouncer.onClick(click, 42, true); - - expect( - reason: 'Because the DOM click event was deduped.', - semanticsActions, - isEmpty, - ); - }); - - - testWithSemantics('Forwards click if enough time passed after the last flushed pointerup', () async { - expect(EnginePlatformDispatcher.instance.semanticsEnabled, true); - expect(binding.clickDebouncer.isDebouncing, false); - - final DomElement testElement = createDomElement('flt-semantics'); - testElement.setAttribute('flt-tappable', ''); - flutterViewEmbedder.semanticsHostElement!.appendChild(testElement); - - testElement.dispatchEvent(context.primaryDown()); - - // Simulate the user holding the pointer down for some time before releasing, - // such that the pointerup event happens close to timer expiration. This - // makes it possible for the click to arrive early. However, this test in - // particular will delay the click to check that the delay is checked - // correctly. The inverse situation was already tested in the previous test. - await Future.delayed(const Duration(milliseconds: 190)); - - testElement.dispatchEvent(context.primaryUp()); - expect(binding.clickDebouncer.isDebouncing, true); - expect( - reason: 'Timer has not expired yet', - pointerPackets, isEmpty, - ); - - // Wait for the timer to expire to make sure pointer events are flushed. - await Future.delayed(const Duration(milliseconds: 100)); - - expect( - reason: 'Queued up events should be flushed to the framework because the ' - 'time expired before the click event arrived.', - pointerPackets, - [ - ui.PointerChange.add, - ui.PointerChange.down, - ui.PointerChange.up, - ], - ); - - final DomEvent click = createDomMouseEvent( - 'click', - { - 'clientX': testElement.getBoundingClientRect().x, - 'clientY': testElement.getBoundingClientRect().y, - } - ); - binding.clickDebouncer.onClick(click, 42, true); - - expect( - reason: 'The DOM click should still be sent to the framework because it ' - 'happened far enough from the last pointerup that it is unlikely ' - 'to be a duplicate.', - semanticsActions, - [ - (type: ui.SemanticsAction.tap, nodeId: 42) - ], - ); - }); } class MockSafariPointerEventWorkaround implements SafariPointerEventWorkaround { diff --git a/lib/web_ui/test/engine/semantics/semantics_test.dart b/lib/web_ui/test/engine/semantics/semantics_test.dart index e5f652ea623ad..3d4876b0432ac 100644 --- a/lib/web_ui/test/engine/semantics/semantics_test.dart +++ b/lib/web_ui/test/engine/semantics/semantics_test.dart @@ -377,7 +377,7 @@ void _testEngineSemanticsOwner() { expectSemanticsTree(''' - + '''); @@ -387,7 +387,7 @@ void _testEngineSemanticsOwner() { expectSemanticsTree(''' - + '''); @@ -397,7 +397,7 @@ void _testEngineSemanticsOwner() { expectSemanticsTree(''' - + '''); @@ -430,7 +430,7 @@ void _testEngineSemanticsOwner() { expectSemanticsTree(''' - + '''); @@ -440,7 +440,7 @@ void _testEngineSemanticsOwner() { expectSemanticsTree(''' - + '''); @@ -1388,7 +1388,7 @@ void _testIncrementables() { semantics().updateSemantics(builder.build()); expectSemanticsTree(''' - + '''); final SemanticsObject node = semantics().debugSemanticsTree![0]!; @@ -1421,7 +1421,7 @@ void _testIncrementables() { semantics().updateSemantics(builder.build()); expectSemanticsTree(''' - + '''); final DomHTMLInputElement input = @@ -1454,7 +1454,7 @@ void _testIncrementables() { semantics().updateSemantics(builder.build()); expectSemanticsTree(''' - + '''); final DomHTMLInputElement input = @@ -1489,7 +1489,7 @@ void _testIncrementables() { semantics().updateSemantics(builder.build()); expectSemanticsTree(''' - + '''); semantics().semanticsEnabled = false; @@ -1632,7 +1632,7 @@ void _testCheckables() { semantics().updateSemantics(builder.build()); expectSemanticsTree(''' - + '''); final SemanticsObject node = semantics().debugSemanticsTree![0]!; @@ -1690,7 +1690,7 @@ void _testCheckables() { semantics().updateSemantics(builder.build()); expectSemanticsTree(''' - + '''); semantics().semanticsEnabled = false; @@ -1716,7 +1716,7 @@ void _testCheckables() { semantics().updateSemantics(builder.build()); expectSemanticsTree(''' - + '''); semantics().semanticsEnabled = false; @@ -1766,7 +1766,7 @@ void _testCheckables() { semantics().updateSemantics(builder.build()); expectSemanticsTree(''' - + '''); semantics().semanticsEnabled = false; @@ -1793,7 +1793,7 @@ void _testCheckables() { semantics().updateSemantics(builder.build()); expectSemanticsTree(''' - + '''); semantics().semanticsEnabled = false; @@ -1845,7 +1845,7 @@ void _testCheckables() { semantics().updateSemantics(builder.build()); expectSemanticsTree(''' - + '''); semantics().semanticsEnabled = false; @@ -1918,7 +1918,7 @@ void _testTappable() { tester.apply(); expectSemanticsTree(''' - + '''); final SemanticsObject node = semantics().debugSemanticsTree![0]!; @@ -1979,14 +1979,14 @@ void _testTappable() { ''); updateTappable(enabled: true); - expectSemanticsTree(''); + expectSemanticsTree(''); updateTappable(enabled: false); expectSemanticsTree( ''); updateTappable(enabled: true); - expectSemanticsTree(''); + expectSemanticsTree(''); semantics().semanticsEnabled = false; }); @@ -2623,11 +2623,11 @@ void _testDialog() { tester.apply(); expectSemanticsTree(''' - + - + @@ -2716,7 +2716,7 @@ void _testDialog() { - + @@ -2853,9 +2853,9 @@ void _testFocusable() { } expectSemanticsTree(''' - + - + '''); From 2b16901e7d45f6abbb10bdd417ba61879aa3bf13 Mon Sep 17 00:00:00 2001 From: Tong Mu Date: Thu, 21 Sep 2023 14:11:03 -0700 Subject: [PATCH 214/859] Reland: Enforce the rule of calling FlutterView.Render (#45300) (#45555) This PR relands #45300 which was reverted in https://github.com/flutter/engine/pull/45525 due to hanging on a windows startup test. The culprit test still calls `FlutterView.render` in the illegal way, which is ignored, causing no frame being ever produced. This has been fixed in https://github.com/flutter/flutter/pull/134245. I've also searched through the framework repo for `render(` to ensure there are no other cases. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- lib/ui/fixtures/ui_test.dart | 42 +++ lib/ui/platform_dispatcher.dart | 33 +++ lib/ui/window.dart | 28 +- .../platform_configuration_unittests.cc | 240 ++++++++++++++++++ shell/common/shell.cc | 31 ++- shell/common/shell.h | 10 + testing/dart/platform_view_test.dart | 9 +- 7 files changed, 370 insertions(+), 23 deletions(-) diff --git a/lib/ui/fixtures/ui_test.dart b/lib/ui/fixtures/ui_test.dart index 0aff1775688b7..3cc93a746921a 100644 --- a/lib/ui/fixtures/ui_test.dart +++ b/lib/ui/fixtures/ui_test.dart @@ -1076,3 +1076,45 @@ external void _callHook( Object? arg20, Object? arg21, ]); + +Scene _createRedBoxScene(Size size) { + final SceneBuilder builder = SceneBuilder(); + builder.pushOffset(0.0, 0.0); + final Paint paint = Paint() + ..color = Color.fromARGB(255, 255, 0, 0) + ..style = PaintingStyle.fill; + final PictureRecorder baseRecorder = PictureRecorder(); + final Canvas canvas = Canvas(baseRecorder); + canvas.drawRect(Rect.fromLTRB(0.0, 0.0, size.width, size.height), paint); + final Picture picture = baseRecorder.endRecording(); + builder.addPicture(Offset(0.0, 0.0), picture); + builder.pop(); + return builder.build(); +} + +@pragma('vm:entry-point') +void incorrectImmediateRender() { + PlatformDispatcher.instance.views.first.render(_createRedBoxScene(Size(2, 2))); + _finish(); + // Don't schedule a frame here. This test only checks if the + // [FlutterView.render] call is propagated to PlatformConfiguration.render + // and thus doesn't need anything from `Animator` or `Engine`, which, + // besides, are not even created in the native side at all. +} + +@pragma('vm:entry-point') +void incorrectDoubleRender() { + PlatformDispatcher.instance.onBeginFrame = (Duration value) { + PlatformDispatcher.instance.views.first.render(_createRedBoxScene(Size(2, 2))); + PlatformDispatcher.instance.views.first.render(_createRedBoxScene(Size(3, 3))); + }; + PlatformDispatcher.instance.onDrawFrame = () { + PlatformDispatcher.instance.views.first.render(_createRedBoxScene(Size(4, 4))); + PlatformDispatcher.instance.views.first.render(_createRedBoxScene(Size(5, 5))); + }; + _finish(); + // Don't schedule a frame here. This test only checks if the + // [FlutterView.render] call is propagated to PlatformConfiguration.render + // and thus doesn't need anything from `Animator` or `Engine`, which, + // besides, are not even created in the native side at all. +} diff --git a/lib/ui/platform_dispatcher.dart b/lib/ui/platform_dispatcher.dart index 0bd387270ba13..5f42aa4af9f26 100644 --- a/lib/ui/platform_dispatcher.dart +++ b/lib/ui/platform_dispatcher.dart @@ -308,6 +308,21 @@ class PlatformDispatcher { _invoke(onMetricsChanged, _onMetricsChangedZone); } + // [FlutterView]s for which [FlutterView.render] has already been called + // during the current [onBeginFrame]/[onDrawFrame] callback sequence. + // + // The field is null outside the scope of those callbacks indicating that + // calls to [FlutterView.render] must be ignored. Furthermore, if a given + // [FlutterView] is already present in this set when its [FlutterView.render] + // is called again, that call must be ignored as a duplicate. + // + // Between [onBeginFrame] and [onDrawFrame] the properties value is + // temporarily stored in `_renderedViewsBetweenCallbacks` so that it survives + // the gap between the two callbacks. + Set? _renderedViews; + // Temporary storage of the `_renderedViews` value between `_beginFrame` and + // `_drawFrame`. + Set? _renderedViewsBetweenCallbacks; /// A callback invoked when any view begins a frame. /// @@ -329,11 +344,20 @@ class PlatformDispatcher { // Called from the engine, via hooks.dart void _beginFrame(int microseconds) { + assert(_renderedViews == null); + assert(_renderedViewsBetweenCallbacks == null); + + _renderedViews = {}; _invoke1( onBeginFrame, _onBeginFrameZone, Duration(microseconds: microseconds), ); + _renderedViewsBetweenCallbacks = _renderedViews; + _renderedViews = null; + + assert(_renderedViews == null); + assert(_renderedViewsBetweenCallbacks != null); } /// A callback that is invoked for each frame after [onBeginFrame] has @@ -351,7 +375,16 @@ class PlatformDispatcher { // Called from the engine, via hooks.dart void _drawFrame() { + assert(_renderedViews == null); + assert(_renderedViewsBetweenCallbacks != null); + + _renderedViews = _renderedViewsBetweenCallbacks; + _renderedViewsBetweenCallbacks = null; _invoke(onDrawFrame, _onDrawFrameZone); + _renderedViews = null; + + assert(_renderedViews == null); + assert(_renderedViewsBetweenCallbacks == null); } /// A callback that is invoked when pointer data is available. diff --git a/lib/ui/window.dart b/lib/ui/window.dart index 26a258cfa96c1..286e1485b3a9f 100644 --- a/lib/ui/window.dart +++ b/lib/ui/window.dart @@ -327,14 +327,21 @@ class FlutterView { /// Updates the view's rendering on the GPU with the newly provided [Scene]. /// - /// This function must be called within the scope of the + /// ## Requirement for calling this method + /// + /// This method must be called within the synchronous scope of the /// [PlatformDispatcher.onBeginFrame] or [PlatformDispatcher.onDrawFrame] - /// callbacks being invoked. + /// callbacks. Calls out of this scope will be ignored. To use this method, + /// create a callback that calls this method instead, and assign it to either + /// of the fields above; then schedule a frame, which is done typically with + /// [PlatformDispatcher.scheduleFrame]. Also, make sure the callback does not + /// have `await` before the `FlutterWindow.render` call. + /// + /// Additionally, this method can only be called once for each view during a + /// single [PlatformDispatcher.onBeginFrame]/[PlatformDispatcher.onDrawFrame] + /// callback sequence. Duplicate calls will be ignored in production. /// - /// If this function is called a second time during a single - /// [PlatformDispatcher.onBeginFrame]/[PlatformDispatcher.onDrawFrame] - /// callback sequence or called outside the scope of those callbacks, the call - /// will be ignored. + /// ## How to record a scene /// /// To record graphical operations, first create a [PictureRecorder], then /// construct a [Canvas], passing that [PictureRecorder] to its constructor. @@ -353,7 +360,14 @@ class FlutterView { /// scheduling of frames. /// * [RendererBinding], the Flutter framework class which manages layout and /// painting. - void render(Scene scene) => _render(scene as _NativeScene); + void render(Scene scene) { + if (platformDispatcher._renderedViews?.add(this) != true) { + // Duplicated calls or calls outside of onBeginFrame/onDrawFrame + // (indicated by _renderedViews being null) are ignored, as documented. + return; + } + _render(scene as _NativeScene); + } @Native)>(symbol: 'PlatformConfigurationNativeApi::Render') external static void _render(_NativeScene scene); diff --git a/lib/ui/window/platform_configuration_unittests.cc b/lib/ui/window/platform_configuration_unittests.cc index 7410caeb66d6c..1fa8377d69a74 100644 --- a/lib/ui/window/platform_configuration_unittests.cc +++ b/lib/ui/window/platform_configuration_unittests.cc @@ -15,10 +15,171 @@ #include "flutter/shell/common/shell_test.h" #include "flutter/shell/common/thread_host.h" #include "flutter/testing/testing.h" +#include "gmock/gmock.h" namespace flutter { + +namespace { + +static constexpr int64_t kImplicitViewId = 0; + +static void PostSync(const fml::RefPtr& task_runner, + const fml::closure& task) { + fml::AutoResetWaitableEvent latch; + fml::TaskRunner::RunNowOrPostTask(task_runner, [&latch, &task] { + task(); + latch.Signal(); + }); + latch.Wait(); +} + +class MockRuntimeDelegate : public RuntimeDelegate { + public: + MOCK_METHOD(std::string, DefaultRouteName, (), (override)); + MOCK_METHOD(void, ScheduleFrame, (bool), (override)); + MOCK_METHOD(void, + Render, + (std::unique_ptr, float), + (override)); + MOCK_METHOD(void, + UpdateSemantics, + (SemanticsNodeUpdates, CustomAccessibilityActionUpdates), + (override)); + MOCK_METHOD(void, + HandlePlatformMessage, + (std::unique_ptr), + (override)); + MOCK_METHOD(FontCollection&, GetFontCollection, (), (override)); + MOCK_METHOD(std::shared_ptr, GetAssetManager, (), (override)); + MOCK_METHOD(void, OnRootIsolateCreated, (), (override)); + MOCK_METHOD(void, + UpdateIsolateDescription, + (const std::string, int64_t), + (override)); + MOCK_METHOD(void, SetNeedsReportTimings, (bool), (override)); + MOCK_METHOD(std::unique_ptr>, + ComputePlatformResolvedLocale, + (const std::vector&), + (override)); + MOCK_METHOD(void, RequestDartDeferredLibrary, (intptr_t), (override)); + MOCK_METHOD(std::weak_ptr, + GetPlatformMessageHandler, + (), + (const, override)); + MOCK_METHOD(void, SendChannelUpdate, (std::string, bool), (override)); + MOCK_METHOD(double, + GetScaledFontSize, + (double font_size, int configuration_id), + (const, override)); +}; + +class MockPlatformMessageHandler : public PlatformMessageHandler { + public: + MOCK_METHOD(void, + HandlePlatformMessage, + (std::unique_ptr message), + (override)); + MOCK_METHOD(bool, + DoesHandlePlatformMessageOnPlatformThread, + (), + (const, override)); + MOCK_METHOD(void, + InvokePlatformMessageResponseCallback, + (int response_id, std::unique_ptr mapping), + (override)); + MOCK_METHOD(void, + InvokePlatformMessageEmptyResponseCallback, + (int response_id), + (override)); +}; + +// A class that can launch a RuntimeController with the specified +// RuntimeDelegate. +// +// To use this class, contruct this class with Create, call LaunchRootIsolate, +// and use the controller with ControllerTaskSync(). +class RuntimeControllerContext { + public: + using ControllerCallback = std::function; + + [[nodiscard]] static std::unique_ptr Create( + Settings settings, // + const TaskRunners& task_runners, // + RuntimeDelegate& client) { + auto [vm, isolate_snapshot] = Shell::InferVmInitDataFromSettings(settings); + FML_CHECK(vm) << "Must be able to initialize the VM."; + // Construct the class with `new` because `make_unique` has no access to the + // private constructor. + RuntimeControllerContext* raw_pointer = new RuntimeControllerContext( + settings, task_runners, client, std::move(vm), isolate_snapshot); + return std::unique_ptr(raw_pointer); + } + + ~RuntimeControllerContext() { + PostSync(task_runners_.GetUITaskRunner(), + [&]() { runtime_controller_.reset(); }); + } + + // Launch the root isolate. The post_launch callback will be executed in the + // same UI task, which can be used to create initial views. + void LaunchRootIsolate(RunConfiguration& configuration, + ControllerCallback post_launch) { + PostSync(task_runners_.GetUITaskRunner(), [&]() { + bool launch_success = runtime_controller_->LaunchRootIsolate( + settings_, // + []() {}, // + configuration.GetEntrypoint(), // + configuration.GetEntrypointLibrary(), // + configuration.GetEntrypointArgs(), // + configuration.TakeIsolateConfiguration()); // + ASSERT_TRUE(launch_success); + post_launch(*runtime_controller_); + }); + } + + // Run a task that operates the RuntimeController on the UI thread, and wait + // for the task to end. + void ControllerTaskSync(ControllerCallback task) { + ASSERT_TRUE(runtime_controller_); + ASSERT_TRUE(task); + PostSync(task_runners_.GetUITaskRunner(), + [&]() { task(*runtime_controller_); }); + } + + private: + RuntimeControllerContext(const Settings& settings, + const TaskRunners& task_runners, + RuntimeDelegate& client, + DartVMRef vm, + fml::RefPtr isolate_snapshot) + : settings_(settings), + task_runners_(task_runners), + isolate_snapshot_(std::move(isolate_snapshot)), + vm_(std::move(vm)), + runtime_controller_(std::make_unique( + client, + &vm_, + std::move(isolate_snapshot_), + settings.idle_notification_callback, // idle notification callback + flutter::PlatformData(), // platform data + settings.isolate_create_callback, // isolate create callback + settings.isolate_shutdown_callback, // isolate shutdown callback + settings.persistent_isolate_data, // persistent isolate data + UIDartState::Context{task_runners})) {} + + Settings settings_; + TaskRunners task_runners_; + fml::RefPtr isolate_snapshot_; + DartVMRef vm_; + std::unique_ptr runtime_controller_; +}; +} // namespace + namespace testing { +using ::testing::_; +using ::testing::Return; + class PlatformConfigurationTest : public ShellTest {}; TEST_F(PlatformConfigurationTest, Initialization) { @@ -332,5 +493,84 @@ TEST_F(PlatformConfigurationTest, SetDartPerformanceMode) { DestroyShell(std::move(shell), task_runners); } +TEST_F(PlatformConfigurationTest, OutOfScopeRenderCallsAreIgnored) { + Settings settings = CreateSettingsForFixture(); + TaskRunners task_runners = GetTaskRunnersForFixture(); + + MockRuntimeDelegate client; + auto platform_message_handler = + std::make_shared(); + EXPECT_CALL(client, GetPlatformMessageHandler) + .WillOnce(Return(platform_message_handler)); + // Render should not be called. + EXPECT_CALL(client, Render).Times(0); + + auto finish_latch = std::make_shared(); + auto finish = [finish_latch](Dart_NativeArguments args) { + finish_latch->Signal(); + }; + AddNativeCallback("Finish", CREATE_NATIVE_ENTRY(finish)); + + auto runtime_controller_context = + RuntimeControllerContext::Create(settings, task_runners, client); + + auto configuration = RunConfiguration::InferFromSettings(settings); + configuration.SetEntrypoint("incorrectImmediateRender"); + runtime_controller_context->LaunchRootIsolate( + configuration, [](RuntimeController& runtime_controller) { + runtime_controller.AddView( + kImplicitViewId, + ViewportMetrics( + /*pixel_ratio=*/1.0, /*width=*/20, /*height=*/20, + /*touch_slop=*/2, /*display_id=*/0)); + }); + + // Wait for the Dart main function to end. + finish_latch->Wait(); +} + +TEST_F(PlatformConfigurationTest, DuplicateRenderCallsAreIgnored) { + Settings settings = CreateSettingsForFixture(); + TaskRunners task_runners = GetTaskRunnersForFixture(); + + MockRuntimeDelegate client; + auto platform_message_handler = + std::make_shared(); + EXPECT_CALL(client, GetPlatformMessageHandler) + .WillOnce(Return(platform_message_handler)); + // Render should only be called once, because the second call is ignored. + EXPECT_CALL(client, Render).Times(1); + + auto finish_latch = std::make_shared(); + auto finish = [finish_latch](Dart_NativeArguments args) { + finish_latch->Signal(); + }; + AddNativeCallback("Finish", CREATE_NATIVE_ENTRY(finish)); + + auto runtime_controller_context = + RuntimeControllerContext::Create(settings, task_runners, client); + + auto configuration = RunConfiguration::InferFromSettings(settings); + configuration.SetEntrypoint("incorrectDoubleRender"); + runtime_controller_context->LaunchRootIsolate( + configuration, [](RuntimeController& runtime_controller) { + runtime_controller.AddView( + kImplicitViewId, + ViewportMetrics( + /*pixel_ratio=*/1.0, /*width=*/20, /*height=*/20, + /*touch_slop=*/2, /*display_id=*/0)); + }); + + // Wait for the Dart main function to end. + finish_latch->Wait(); + + // This call synchronously calls PlatformDispatcher's handleBeginFrame and + // handleDrawFrame. Therefore it doesn't have to wait for latches. + runtime_controller_context->ControllerTaskSync( + [](RuntimeController& runtime_controller) { + runtime_controller.BeginFrame(fml::TimePoint::Now(), 0); + }); +} + } // namespace testing } // namespace flutter diff --git a/shell/common/shell.cc b/shell/common/shell.cc index 8c456dfd159cc..82db9dea4ff64 100644 --- a/shell/common/shell.cc +++ b/shell/common/shell.cc @@ -144,31 +144,36 @@ void PerformInitializationTasks(Settings& settings) { } // namespace -std::unique_ptr Shell::Create( - const PlatformData& platform_data, - const TaskRunners& task_runners, - Settings settings, - const Shell::CreateCallback& on_create_platform_view, - const Shell::CreateCallback& on_create_rasterizer, - bool is_gpu_disabled) { - // This must come first as it initializes tracing. - PerformInitializationTasks(settings); - - TRACE_EVENT0("flutter", "Shell::Create"); - +std::pair> +Shell::InferVmInitDataFromSettings(Settings& settings) { // Always use the `vm_snapshot` and `isolate_snapshot` provided by the // settings to launch the VM. If the VM is already running, the snapshot // arguments are ignored. auto vm_snapshot = DartSnapshot::VMSnapshotFromSettings(settings); auto isolate_snapshot = DartSnapshot::IsolateSnapshotFromSettings(settings); auto vm = DartVMRef::Create(settings, vm_snapshot, isolate_snapshot); - FML_CHECK(vm) << "Must be able to initialize the VM."; // If the settings did not specify an `isolate_snapshot`, fall back to the // one the VM was launched with. if (!isolate_snapshot) { isolate_snapshot = vm->GetVMData()->GetIsolateSnapshot(); } + return {std::move(vm), isolate_snapshot}; +} + +std::unique_ptr Shell::Create( + const PlatformData& platform_data, + const TaskRunners& task_runners, + Settings settings, + const Shell::CreateCallback& on_create_platform_view, + const Shell::CreateCallback& on_create_rasterizer, + bool is_gpu_disabled) { + // This must come first as it initializes tracing. + PerformInitializationTasks(settings); + + TRACE_EVENT0("flutter", "Shell::Create"); + + auto [vm, isolate_snapshot] = InferVmInitDataFromSettings(settings); auto resource_cache_limit_calculator = std::make_shared( settings.resource_cache_max_bytes_threshold); diff --git a/shell/common/shell.h b/shell/common/shell.h index b8c9c31052df6..d3bb7f0bd620c 100644 --- a/shell/common/shell.h +++ b/shell/common/shell.h @@ -438,6 +438,16 @@ class Shell final : public PlatformView::Delegate, const std::shared_ptr GetConcurrentWorkerTaskRunner() const; + // Infer the VM ref and the isolate snapshot based on the settings. + // + // If the VM is already running, the settings are ignored, but the returned + // isolate snapshot always prioritize what is specified by the settings, and + // falls back to the one VM was launched with. + // + // This function is what Shell::Create uses to infer snapshot settings. + static std::pair> + InferVmInitDataFromSettings(Settings& settings); + private: using ServiceProtocolHandler = std::function Date: Thu, 21 Sep 2023 14:16:16 -0700 Subject: [PATCH 215/859] More Clang Tidy --fix[es] to header files (#46151) More work towards https://github.com/flutter/flutter/issues/134969. I decided not to touch the `LOG_X` variables since they are just used in macro expansion. --- display_list/benchmarking/dl_benchmarks.h | 84 ++--- display_list/benchmarking/dl_complexity_gl.h | 2 +- .../benchmarking/dl_complexity_helper.h | 8 +- .../benchmarking/dl_complexity_metal.h | 10 +- display_list/dl_op_flags.cc | 2 +- display_list/dl_op_flags.h | 334 +++++++++--------- display_list/dl_op_records.h | 47 +-- display_list/effects/dl_image_filter.h | 2 +- display_list/skia/dl_sk_paint_dispatcher.h | 4 +- .../testing/dl_rendering_unittests.cc | 32 +- display_list/testing/dl_test_equality.h | 2 +- display_list/testing/dl_test_surface_gl.h | 4 +- display_list/testing/dl_test_surface_metal.cc | 2 +- display_list/testing/dl_test_surface_metal.h | 4 +- .../testing/dl_test_surface_provider.cc | 6 +- .../testing/dl_test_surface_provider.h | 21 +- .../testing/dl_test_surface_software.h | 2 +- display_list/utils/dl_matrix_clip_tracker.h | 2 +- fml/log_level.h | 13 +- fml/memory/ref_counted_internal.h | 4 +- lib/ui/painting/image.h | 2 +- testing/display_list_testing.h | 14 +- testing/test_metal_context.h | 2 +- testing/test_metal_context.mm | 8 +- 24 files changed, 308 insertions(+), 303 deletions(-) diff --git a/display_list/benchmarking/dl_benchmarks.h b/display_list/benchmarking/dl_benchmarks.h index 130c65c63259e..f43cd7c6731a6 100644 --- a/display_list/benchmarking/dl_benchmarks.h +++ b/display_list/benchmarking/dl_benchmarks.h @@ -102,7 +102,7 @@ void BM_SaveLayer(benchmark::State& state, // DrawLine #define DRAW_LINE_BENCHMARKS(BACKEND, ATTRIBUTES) \ BENCHMARK_CAPTURE(BM_DrawLine, BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES) \ ->RangeMultiplier(2) \ ->Range(16, 2048) \ @@ -112,7 +112,7 @@ void BM_SaveLayer(benchmark::State& state, // DrawRect #define DRAW_RECT_BENCHMARKS(BACKEND, ATTRIBUTES) \ BENCHMARK_CAPTURE(BM_DrawRect, BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES) \ ->RangeMultiplier(2) \ ->Range(16, 2048) \ @@ -122,7 +122,7 @@ void BM_SaveLayer(benchmark::State& state, // DrawOval #define DRAW_OVAL_BENCHMARKS(BACKEND, ATTRIBUTES) \ BENCHMARK_CAPTURE(BM_DrawOval, BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES) \ ->RangeMultiplier(2) \ ->Range(16, 2048) \ @@ -132,7 +132,7 @@ void BM_SaveLayer(benchmark::State& state, // DrawCircle #define DRAW_CIRCLE_BENCHMARKS(BACKEND, ATTRIBUTES) \ BENCHMARK_CAPTURE(BM_DrawCircle, BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES) \ ->RangeMultiplier(2) \ ->Range(16, 2048) \ @@ -142,7 +142,7 @@ void BM_SaveLayer(benchmark::State& state, // DrawArc #define DRAW_ARC_BENCHMARKS(BACKEND, ATTRIBUTES) \ BENCHMARK_CAPTURE(BM_DrawArc, BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES) \ ->RangeMultiplier(2) \ ->Range(128, 2048) \ @@ -153,7 +153,7 @@ void BM_SaveLayer(benchmark::State& state, #define DRAW_PATH_BENCHMARKS(BACKEND, ATTRIBUTES) \ BENCHMARK_CAPTURE(BM_DrawPath, \ Lines/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ SkPath::Verb::kLine_Verb) \ ->RangeMultiplier(2) \ @@ -164,7 +164,7 @@ void BM_SaveLayer(benchmark::State& state, \ BENCHMARK_CAPTURE(BM_DrawPath, \ Quads/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ SkPath::Verb::kQuad_Verb) \ ->RangeMultiplier(2) \ @@ -175,7 +175,7 @@ void BM_SaveLayer(benchmark::State& state, \ BENCHMARK_CAPTURE(BM_DrawPath, \ Conics/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ SkPath::Verb::kConic_Verb) \ ->RangeMultiplier(2) \ @@ -186,7 +186,7 @@ void BM_SaveLayer(benchmark::State& state, \ BENCHMARK_CAPTURE(BM_DrawPath, \ Cubics/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ SkPath::Verb::kCubic_Verb) \ ->RangeMultiplier(2) \ @@ -198,7 +198,7 @@ void BM_SaveLayer(benchmark::State& state, // DrawPoints #define DRAW_POINTS_BENCHMARKS(BACKEND, ATTRIBUTES) \ BENCHMARK_CAPTURE(BM_DrawPoints, Points/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ DlCanvas::PointMode::kPoints) \ ->RangeMultiplier(2) \ @@ -207,7 +207,7 @@ void BM_SaveLayer(benchmark::State& state, ->Unit(benchmark::kMillisecond); \ \ BENCHMARK_CAPTURE(BM_DrawPoints, Lines/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ DlCanvas::PointMode::kLines) \ ->RangeMultiplier(2) \ @@ -216,7 +216,7 @@ void BM_SaveLayer(benchmark::State& state, ->Unit(benchmark::kMillisecond); \ \ BENCHMARK_CAPTURE(BM_DrawPoints, Polygon/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ DlCanvas::PointMode::kPolygon) \ ->RangeMultiplier(2) \ @@ -228,7 +228,7 @@ void BM_SaveLayer(benchmark::State& state, #define DRAW_VERTICES_BENCHMARKS(BACKEND, ATTRIBUTES) \ BENCHMARK_CAPTURE(BM_DrawVertices, \ TriangleStrip/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ DlVertexMode::kTriangleStrip) \ ->RangeMultiplier(2) \ @@ -239,7 +239,7 @@ void BM_SaveLayer(benchmark::State& state, \ BENCHMARK_CAPTURE(BM_DrawVertices, \ TriangleFan/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ DlVertexMode::kTriangleFan) \ ->RangeMultiplier(2) \ @@ -250,7 +250,7 @@ void BM_SaveLayer(benchmark::State& state, \ BENCHMARK_CAPTURE(BM_DrawVertices, \ Triangles/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ DlVertexMode::kTriangles) \ ->RangeMultiplier(2) \ @@ -262,7 +262,7 @@ void BM_SaveLayer(benchmark::State& state, // DrawRRect #define DRAW_RRECT_BENCHMARKS(BACKEND, ATTRIBUTES) \ BENCHMARK_CAPTURE(BM_DrawRRect, Symmetric/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ SkRRect::Type::kSimple_Type) \ ->RangeMultiplier(2) \ @@ -271,7 +271,7 @@ void BM_SaveLayer(benchmark::State& state, ->Unit(benchmark::kMillisecond); \ \ BENCHMARK_CAPTURE(BM_DrawRRect, NinePatch/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ SkRRect::Type::kNinePatch_Type) \ ->RangeMultiplier(2) \ @@ -280,7 +280,7 @@ void BM_SaveLayer(benchmark::State& state, ->Unit(benchmark::kMillisecond); \ \ BENCHMARK_CAPTURE(BM_DrawRRect, Complex/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ SkRRect::Type::kComplex_Type) \ ->RangeMultiplier(2) \ @@ -291,7 +291,7 @@ void BM_SaveLayer(benchmark::State& state, // DrawDRRect #define DRAW_DRRECT_BENCHMARKS(BACKEND, ATTRIBUTES) \ BENCHMARK_CAPTURE(BM_DrawDRRect, Symmetric/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ SkRRect::Type::kSimple_Type) \ ->RangeMultiplier(2) \ @@ -300,7 +300,7 @@ void BM_SaveLayer(benchmark::State& state, ->Unit(benchmark::kMillisecond); \ \ BENCHMARK_CAPTURE(BM_DrawDRRect, NinePatch/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ SkRRect::Type::kNinePatch_Type) \ ->RangeMultiplier(2) \ @@ -309,7 +309,7 @@ void BM_SaveLayer(benchmark::State& state, ->Unit(benchmark::kMillisecond); \ \ BENCHMARK_CAPTURE(BM_DrawDRRect, Complex/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ SkRRect::Type::kComplex_Type) \ ->RangeMultiplier(2) \ @@ -320,7 +320,7 @@ void BM_SaveLayer(benchmark::State& state, // DrawImage #define DRAW_IMAGE_BENCHMARKS(BACKEND, ATTRIBUTES) \ BENCHMARK_CAPTURE(BM_DrawImage, Texture/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ DlImageSampling::kNearestNeighbor, false) \ ->RangeMultiplier(2) \ @@ -329,7 +329,7 @@ void BM_SaveLayer(benchmark::State& state, ->Unit(benchmark::kMillisecond); \ \ BENCHMARK_CAPTURE(BM_DrawImage, Upload/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ DlImageSampling::kNearestNeighbor, true) \ ->RangeMultiplier(2) \ @@ -341,7 +341,7 @@ void BM_SaveLayer(benchmark::State& state, #define DRAW_IMAGE_RECT_BENCHMARKS(BACKEND, ATTRIBUTES) \ BENCHMARK_CAPTURE( \ BM_DrawImageRect, Texture/Strict/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ DlImageSampling::kNearestNeighbor, \ DlCanvas::SrcRectConstraint::kStrict, false) \ @@ -352,7 +352,7 @@ void BM_SaveLayer(benchmark::State& state, \ BENCHMARK_CAPTURE( \ BM_DrawImageRect, Texture/Fast/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ DlImageSampling::kNearestNeighbor, \ DlCanvas::SrcRectConstraint::kFast, false) \ @@ -363,7 +363,7 @@ void BM_SaveLayer(benchmark::State& state, \ BENCHMARK_CAPTURE( \ BM_DrawImageRect, Upload/Strict/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ DlImageSampling::kNearestNeighbor, \ DlCanvas::SrcRectConstraint::kStrict, true) \ @@ -374,7 +374,7 @@ void BM_SaveLayer(benchmark::State& state, \ BENCHMARK_CAPTURE( \ BM_DrawImageRect, Upload/Fast/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ DlImageSampling::kNearestNeighbor, \ DlCanvas::SrcRectConstraint::kFast, true) \ @@ -386,7 +386,7 @@ void BM_SaveLayer(benchmark::State& state, // DrawImageNine #define DRAW_IMAGE_NINE_BENCHMARKS(BACKEND, ATTRIBUTES) \ BENCHMARK_CAPTURE(BM_DrawImageNine, Texture/Nearest/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ DlFilterMode::kNearest, false) \ ->RangeMultiplier(2) \ @@ -395,7 +395,7 @@ void BM_SaveLayer(benchmark::State& state, ->Unit(benchmark::kMillisecond); \ \ BENCHMARK_CAPTURE(BM_DrawImageNine, Upload/Nearest/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ DlFilterMode::kNearest, true) \ ->RangeMultiplier(2) \ @@ -404,7 +404,7 @@ void BM_SaveLayer(benchmark::State& state, ->Unit(benchmark::kMillisecond); \ \ BENCHMARK_CAPTURE(BM_DrawImageNine, Texture/Linear/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ DlFilterMode::kLinear, false) \ ->RangeMultiplier(2) \ @@ -413,7 +413,7 @@ void BM_SaveLayer(benchmark::State& state, ->Unit(benchmark::kMillisecond); \ \ BENCHMARK_CAPTURE(BM_DrawImageNine, Upload/Linear/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ DlFilterMode::kLinear, true) \ ->RangeMultiplier(2) \ @@ -424,7 +424,7 @@ void BM_SaveLayer(benchmark::State& state, // DrawTextBlob #define DRAW_TEXT_BLOB_BENCHMARKS(BACKEND, ATTRIBUTES) \ BENCHMARK_CAPTURE(BM_DrawTextBlob, BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES) \ ->RangeMultiplier(2) \ ->Range(1, 256) \ @@ -435,7 +435,7 @@ void BM_SaveLayer(benchmark::State& state, // DrawShadow #define DRAW_SHADOW_BENCHMARKS(BACKEND, ATTRIBUTES) \ BENCHMARK_CAPTURE(BM_DrawShadow, Lines/Transparent/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ true, \ SkPath::Verb::kLine_Verb) \ @@ -445,7 +445,7 @@ void BM_SaveLayer(benchmark::State& state, ->Unit(benchmark::kMillisecond); \ \ BENCHMARK_CAPTURE(BM_DrawShadow, Quads/Transparent/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ true, \ SkPath::Verb::kQuad_Verb) \ @@ -455,7 +455,7 @@ void BM_SaveLayer(benchmark::State& state, ->Unit(benchmark::kMillisecond); \ \ BENCHMARK_CAPTURE(BM_DrawShadow, Conics/Transparent/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ true, \ SkPath::Verb::kConic_Verb) \ @@ -465,7 +465,7 @@ void BM_SaveLayer(benchmark::State& state, ->Unit(benchmark::kMillisecond); \ \ BENCHMARK_CAPTURE(BM_DrawShadow, Cubics/Transparent/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ true, \ SkPath::Verb::kCubic_Verb) \ @@ -475,7 +475,7 @@ void BM_SaveLayer(benchmark::State& state, ->Unit(benchmark::kMillisecond); \ \ BENCHMARK_CAPTURE(BM_DrawShadow, Lines/Opaque/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ false, \ SkPath::Verb::kLine_Verb) \ @@ -485,7 +485,7 @@ void BM_SaveLayer(benchmark::State& state, ->Unit(benchmark::kMillisecond); \ \ BENCHMARK_CAPTURE(BM_DrawShadow, Quads/Opaque/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ false, \ SkPath::Verb::kQuad_Verb) \ @@ -495,7 +495,7 @@ void BM_SaveLayer(benchmark::State& state, ->Unit(benchmark::kMillisecond); \ \ BENCHMARK_CAPTURE(BM_DrawShadow, Conics/Opaque/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ false, \ SkPath::Verb::kConic_Verb) \ @@ -505,7 +505,7 @@ void BM_SaveLayer(benchmark::State& state, ->Unit(benchmark::kMillisecond); \ \ BENCHMARK_CAPTURE(BM_DrawShadow, Cubics/Opaque/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ false, \ SkPath::Verb::kCubic_Verb) \ @@ -517,7 +517,7 @@ void BM_SaveLayer(benchmark::State& state, // SaveLayer #define SAVE_LAYER_BENCHMARKS(BACKEND, ATTRIBUTES) \ BENCHMARK_CAPTURE(BM_SaveLayer, Depth 1/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ 1) \ ->RangeMultiplier(2) \ @@ -526,7 +526,7 @@ void BM_SaveLayer(benchmark::State& state, ->Unit(benchmark::kMillisecond); \ \ BENCHMARK_CAPTURE(BM_SaveLayer, Depth 8/BACKEND, \ - BackendType::k##BACKEND##_Backend, \ + BackendType::k##BACKEND##Backend, \ ATTRIBUTES, \ 8) \ ->RangeMultiplier(2) \ diff --git a/display_list/benchmarking/dl_complexity_gl.h b/display_list/benchmarking/dl_complexity_gl.h index 9fc7596687051..848b64e004b34 100644 --- a/display_list/benchmarking/dl_complexity_gl.h +++ b/display_list/benchmarking/dl_complexity_gl.h @@ -32,7 +32,7 @@ class DisplayListGLComplexityCalculator private: class GLHelper : public ComplexityCalculatorHelper { public: - GLHelper(unsigned int ceiling) + explicit GLHelper(unsigned int ceiling) : ComplexityCalculatorHelper(ceiling), save_layer_count_(0), draw_text_blob_count_(0) {} diff --git a/display_list/benchmarking/dl_complexity_helper.h b/display_list/benchmarking/dl_complexity_helper.h index 759d6e64460ed..871937a77a17c 100644 --- a/display_list/benchmarking/dl_complexity_helper.h +++ b/display_list/benchmarking/dl_complexity_helper.h @@ -96,8 +96,8 @@ class ComplexityCalculatorHelper public virtual IgnoreClipDispatchHelper, public virtual IgnoreTransformDispatchHelper { public: - ComplexityCalculatorHelper(unsigned int ceiling) - : is_complex_(false), ceiling_(ceiling), complexity_score_(0) {} + explicit ComplexityCalculatorHelper(unsigned int ceiling) + : ceiling_(ceiling) {} virtual ~ComplexityCalculatorHelper() = default; @@ -261,10 +261,10 @@ class ComplexityCalculatorHelper // If we exceed the ceiling (defaults to the largest number representable // by unsigned int), then set the is_complex_ bool and we no longer // accumulate. - bool is_complex_; + bool is_complex_ = false; unsigned int ceiling_; - unsigned int complexity_score_; + unsigned int complexity_score_ = 0; }; } // namespace flutter diff --git a/display_list/benchmarking/dl_complexity_metal.h b/display_list/benchmarking/dl_complexity_metal.h index aa63863fa4d05..9430efba67ebf 100644 --- a/display_list/benchmarking/dl_complexity_metal.h +++ b/display_list/benchmarking/dl_complexity_metal.h @@ -32,10 +32,8 @@ class DisplayListMetalComplexityCalculator private: class MetalHelper : public ComplexityCalculatorHelper { public: - MetalHelper(unsigned int ceiling) - : ComplexityCalculatorHelper(ceiling), - save_layer_count_(0), - draw_text_blob_count_(0) {} + explicit MetalHelper(unsigned int ceiling) + : ComplexityCalculatorHelper(ceiling) {} void saveLayer(const SkRect* bounds, const SaveLayerOptions options, @@ -85,8 +83,8 @@ class DisplayListMetalComplexityCalculator unsigned int BatchedComplexity() override; private: - unsigned int save_layer_count_; - unsigned int draw_text_blob_count_; + unsigned int save_layer_count_ = 0; + unsigned int draw_text_blob_count_ = 0; }; DisplayListMetalComplexityCalculator() diff --git a/display_list/dl_op_flags.cc b/display_list/dl_op_flags.cc index 8c444dd692554..9293b2adcdc7f 100644 --- a/display_list/dl_op_flags.cc +++ b/display_list/dl_op_flags.cc @@ -21,7 +21,7 @@ const DisplayListSpecialGeometryFlags DisplayListAttributeFlags::WithPathEffect( // end caps to areas that might not have had them before so all // we need to do is to indicate the potential for diagonal // end caps and move on. - return special_flags_.with(kMayHaveCaps_ | kMayHaveDiagonalCaps_); + return special_flags_.with(kMayHaveCaps | kMayHaveDiagonalCaps); } } } diff --git a/display_list/dl_op_flags.h b/display_list/dl_op_flags.h index 9bb6c013f8203..2f6a4d936c192 100644 --- a/display_list/dl_op_flags.h +++ b/display_list/dl_op_flags.h @@ -23,36 +23,36 @@ class DlPathEffect; class DisplayListFlags { protected: // A drawing operation that is not geometric in nature (but which - // may still apply a MaskFilter - see |kUsesMaskFilter_| below). - static constexpr int kIsNonGeometric_ = 0; + // may still apply a MaskFilter - see |kUsesMaskFilter| below). + static constexpr int kIsNonGeometric = 0; // A geometric operation that is defined as a fill operation // regardless of what the current paint Style is set to. - // This flag will automatically assume |kUsesMaskFilter_|. - static constexpr int kIsFilledGeometry_ = 1 << 0; + // This flag will automatically assume |kUsesMaskFilter|. + static constexpr int kIsFilledGeometry = 1 << 0; // A geometric operation that is defined as a stroke operation // regardless of what the current paint Style is set to. - // This flag will automatically assume |kUsesMaskFilter_|. - static constexpr int kIsStrokedGeometry_ = 1 << 1; + // This flag will automatically assume |kUsesMaskFilter|. + static constexpr int kIsStrokedGeometry = 1 << 1; // A geometric operation that may be a stroke or fill operation // depending on the current state of the paint Style attribute. - // This flag will automatically assume |kUsesMaskFilter_|. - static constexpr int kIsDrawnGeometry_ = 1 << 2; + // This flag will automatically assume |kUsesMaskFilter|. + static constexpr int kIsDrawnGeometry = 1 << 2; - static constexpr int kIsAnyGeometryMask_ = // - kIsFilledGeometry_ | // - kIsStrokedGeometry_ | // - kIsDrawnGeometry_; + static constexpr int kIsAnyGeometryMask = // + kIsFilledGeometry | // + kIsStrokedGeometry | // + kIsDrawnGeometry; // A primitive that floods the surface (or clip) with no // natural bounds, such as |drawColor| or |drawPaint|. - static constexpr int kFloodsSurface_ = 1 << 3; + static constexpr int kFloodsSurface = 1 << 3; - static constexpr int kMayHaveCaps_ = 1 << 4; - static constexpr int kMayHaveJoins_ = 1 << 5; - static constexpr int kButtCapIsSquare_ = 1 << 6; + static constexpr int kMayHaveCaps = 1 << 4; + static constexpr int kMayHaveJoins = 1 << 5; + static constexpr int kButtCapIsSquare = 1 << 6; // A geometric operation which has a path that might have // end caps that are not rectilinear which means that square @@ -62,7 +62,7 @@ class DisplayListFlags { // diagonal end caps. |drawLine| might have diagonal end // caps depending on the angle of the line, and more likely // |drawPath| will often have such end caps. - static constexpr int kMayHaveDiagonalCaps_ = 1 << 7; + static constexpr int kMayHaveDiagonalCaps = 1 << 7; // A geometric operation which has joined vertices that are // not guaranteed to be smooth (angles of incoming and outgoing) @@ -73,23 +73,23 @@ class DisplayListFlags { // |drawRect|, |drawOval| and |drawRRect| all have well // behaved joins, but |drawPath| might have joins that cause // mitered extensions outside the pre-transformed bounding box. - static constexpr int kMayHaveAcuteJoins_ = 1 << 8; + static constexpr int kMayHaveAcuteJoins = 1 << 8; - static constexpr int kAnySpecialGeometryMask_ = // - kMayHaveCaps_ | kMayHaveJoins_ | kButtCapIsSquare_ | // - kMayHaveDiagonalCaps_ | kMayHaveAcuteJoins_; + static constexpr int kAnySpecialGeometryMask = // + kMayHaveCaps | kMayHaveJoins | kButtCapIsSquare | // + kMayHaveDiagonalCaps | kMayHaveAcuteJoins; // clang-format off - static constexpr int kUsesAntiAlias_ = 1 << 10; - static constexpr int kUsesDither_ = 1 << 11; - static constexpr int kUsesAlpha_ = 1 << 12; - static constexpr int kUsesColor_ = 1 << 13; - static constexpr int kUsesBlend_ = 1 << 14; - static constexpr int kUsesShader_ = 1 << 15; - static constexpr int kUsesColorFilter_ = 1 << 16; - static constexpr int kUsesPathEffect_ = 1 << 17; - static constexpr int kUsesMaskFilter_ = 1 << 18; - static constexpr int kUsesImageFilter_ = 1 << 19; + static constexpr int kUsesAntiAlias = 1 << 10; + static constexpr int kUsesDither = 1 << 11; + static constexpr int kUsesAlpha = 1 << 12; + static constexpr int kUsesColor = 1 << 13; + static constexpr int kUsesBlend = 1 << 14; + static constexpr int kUsesShader = 1 << 15; + static constexpr int kUsesColorFilter = 1 << 16; + static constexpr int kUsesPathEffect = 1 << 17; + static constexpr int kUsesMaskFilter = 1 << 18; + static constexpr int kUsesImageFilter = 1 << 19; // Some ops have an optional paint argument. If the version // stored in the DisplayList ignores the paint, but there @@ -98,13 +98,13 @@ class DisplayListFlags { // a default paint object can be constructed when rendering // the op to carry information imposed from outside the // DisplayList (for example, the opacity override). - static constexpr int kIgnoresPaint_ = 1 << 30; + static constexpr int kIgnoresPaint = 1 << 30; // clang-format on - static constexpr int kAnyAttributeMask_ = // - kUsesAntiAlias_ | kUsesDither_ | kUsesAlpha_ | kUsesColor_ | kUsesBlend_ | - kUsesShader_ | kUsesColorFilter_ | kUsesPathEffect_ | kUsesMaskFilter_ | - kUsesImageFilter_; + static constexpr int kAnyAttributeMask = // + kUsesAntiAlias | kUsesDither | kUsesAlpha | kUsesColor | kUsesBlend | + kUsesShader | kUsesColorFilter | kUsesPathEffect | kUsesMaskFilter | + kUsesImageFilter; }; class DisplayListFlagsBase : protected DisplayListFlags { @@ -126,21 +126,21 @@ class DisplayListFlagsBase : protected DisplayListFlags { class DisplayListSpecialGeometryFlags : DisplayListFlagsBase { public: /// The geometry may have segments that end without closing the path. - constexpr bool may_have_end_caps() const { return has_any(kMayHaveCaps_); } + constexpr bool may_have_end_caps() const { return has_any(kMayHaveCaps); } /// The geometry may have segments connect non-continuously. - constexpr bool may_have_joins() const { return has_any(kMayHaveJoins_); } + constexpr bool may_have_joins() const { return has_any(kMayHaveJoins); } /// Mainly for drawPoints(PointMode) where Butt caps are rendered as squares. constexpr bool butt_cap_becomes_square() const { - return has_any(kButtCapIsSquare_); + return has_any(kButtCapIsSquare); } /// The geometry may have segments that end on a diagonal /// such that their end caps extend further than the default /// |strokeWidth * 0.5| margin around the geometry. constexpr bool may_have_diagonal_caps() const { - return has_any(kMayHaveDiagonalCaps_); + return has_any(kMayHaveDiagonalCaps); } /// The geometry may have segments that meet at vertices at @@ -148,13 +148,13 @@ class DisplayListSpecialGeometryFlags : DisplayListFlagsBase { /// further than the default |strokeWidth * 0.5| margin around /// the geometry. constexpr bool may_have_acute_joins() const { - return has_any(kMayHaveAcuteJoins_); + return has_any(kMayHaveAcuteJoins); } private: explicit constexpr DisplayListSpecialGeometryFlags(int flags) : DisplayListFlagsBase(flags) { - FML_DCHECK((flags & kAnySpecialGeometryMask_) == flags); + FML_DCHECK((flags & kAnySpecialGeometryMask) == flags); } const DisplayListSpecialGeometryFlags with(int extra) const { @@ -170,19 +170,19 @@ class DisplayListAttributeFlags : DisplayListFlagsBase { const DlPathEffect* effect, bool is_stroked) const; - constexpr bool ignores_paint() const { return has_any(kIgnoresPaint_); } + constexpr bool ignores_paint() const { return has_any(kIgnoresPaint); } - constexpr bool applies_anti_alias() const { return has_any(kUsesAntiAlias_); } - constexpr bool applies_dither() const { return has_any(kUsesDither_); } - constexpr bool applies_color() const { return has_any(kUsesColor_); } - constexpr bool applies_alpha() const { return has_any(kUsesAlpha_); } + constexpr bool applies_anti_alias() const { return has_any(kUsesAntiAlias); } + constexpr bool applies_dither() const { return has_any(kUsesDither); } + constexpr bool applies_color() const { return has_any(kUsesColor); } + constexpr bool applies_alpha() const { return has_any(kUsesAlpha); } constexpr bool applies_alpha_or_color() const { - return has_any(kUsesAlpha_ | kUsesColor_); + return has_any(kUsesAlpha | kUsesColor); } /// The primitive dynamically determines whether it is a stroke or fill /// operation (or both) based on the setting of the |Style| attribute. - constexpr bool applies_style() const { return has_any(kIsDrawnGeometry_); } + constexpr bool applies_style() const { return has_any(kIsDrawnGeometry); } /// The primitive can use any of the stroke attributes, such as /// StrokeWidth, StrokeMiter, StrokeCap, or StrokeJoin. This /// method will return if the primitive is defined as one that @@ -193,34 +193,34 @@ class DisplayListAttributeFlags : DisplayListFlagsBase { /// the style. // bool applies_stroke_attributes() const { return is_stroked(); } - constexpr bool applies_shader() const { return has_any(kUsesShader_); } + constexpr bool applies_shader() const { return has_any(kUsesShader); } /// The primitive honors the current DlColorFilter, including /// the related attribute InvertColors constexpr bool applies_color_filter() const { - return has_any(kUsesColorFilter_); + return has_any(kUsesColorFilter); } /// The primitive honors the DlBlendMode - constexpr bool applies_blend() const { return has_any(kUsesBlend_); } + constexpr bool applies_blend() const { return has_any(kUsesBlend); } constexpr bool applies_path_effect() const { - return has_any(kUsesPathEffect_); + return has_any(kUsesPathEffect); } /// The primitive honors the DlMaskFilter whether set using the /// filter object or using the convenience method |setMaskBlurFilter| constexpr bool applies_mask_filter() const { - return has_any(kUsesMaskFilter_); + return has_any(kUsesMaskFilter); } constexpr bool applies_image_filter() const { - return has_any(kUsesImageFilter_); + return has_any(kUsesImageFilter); } - constexpr bool is_geometric() const { return has_any(kIsAnyGeometryMask_); } - constexpr bool always_stroked() const { return has_any(kIsStrokedGeometry_); } + constexpr bool is_geometric() const { return has_any(kIsAnyGeometryMask); } + constexpr bool always_stroked() const { return has_any(kIsStrokedGeometry); } constexpr bool is_stroked(DlDrawStyle style = DlDrawStyle::kStroke) const { - return (has_any(kIsStrokedGeometry_) || - (style != DlDrawStyle::kFill && has_any(kIsDrawnGeometry_))); + return (has_any(kIsStrokedGeometry) || + (style != DlDrawStyle::kFill && has_any(kIsDrawnGeometry))); } - constexpr bool is_flood() const { return has_any(kFloodsSurface_); } + constexpr bool is_flood() const { return has_any(kFloodsSurface); } constexpr bool operator==(DisplayListAttributeFlags const& other) const { return flags_ == other.flags_; @@ -229,15 +229,15 @@ class DisplayListAttributeFlags : DisplayListFlagsBase { private: explicit constexpr DisplayListAttributeFlags(int flags) : DisplayListFlagsBase(flags), - special_flags_(flags & kAnySpecialGeometryMask_) { - FML_DCHECK((flags & kIsAnyGeometryMask_) == kIsNonGeometric_ || - (flags & kIsAnyGeometryMask_) == kIsFilledGeometry_ || - (flags & kIsAnyGeometryMask_) == kIsStrokedGeometry_ || - (flags & kIsAnyGeometryMask_) == kIsDrawnGeometry_); - FML_DCHECK(((flags & kAnyAttributeMask_) == 0) != - ((flags & kIgnoresPaint_) == 0)); - FML_DCHECK((flags & kIsAnyGeometryMask_) != 0 || - (flags & kAnySpecialGeometryMask_) == 0); + special_flags_(flags & kAnySpecialGeometryMask) { + FML_DCHECK((flags & kIsAnyGeometryMask) == kIsNonGeometric || + (flags & kIsAnyGeometryMask) == kIsFilledGeometry || + (flags & kIsAnyGeometryMask) == kIsStrokedGeometry || + (flags & kIsAnyGeometryMask) == kIsDrawnGeometry); + FML_DCHECK(((flags & kAnyAttributeMask) == 0) != + ((flags & kIgnoresPaint) == 0)); + FML_DCHECK((flags & kIsAnyGeometryMask) != 0 || + (flags & kAnySpecialGeometryMask) == 0); } constexpr DisplayListAttributeFlags operator+(int extra) const { @@ -257,171 +257,171 @@ class DisplayListAttributeFlags : DisplayListFlagsBase { class DisplayListOpFlags : DisplayListFlags { private: // Flags common to all primitives that apply colors - static constexpr int kBASE_PaintFlags_ = (kUsesDither_ | // - kUsesColor_ | // - kUsesAlpha_ | // - kUsesBlend_ | // - kUsesShader_ | // - kUsesColorFilter_ | // - kUsesImageFilter_); + static constexpr int kBasePaintFlags = (kUsesDither | // + kUsesColor | // + kUsesAlpha | // + kUsesBlend | // + kUsesShader | // + kUsesColorFilter | // + kUsesImageFilter); // Flags common to all primitives that stroke or fill - static constexpr int kBASE_StrokeOrFillFlags_ = (kIsDrawnGeometry_ | // - kUsesAntiAlias_ | // - kUsesMaskFilter_ | // - kUsesPathEffect_); + static constexpr int kBaseStrokeOrFillFlags = (kIsDrawnGeometry | // + kUsesAntiAlias | // + kUsesMaskFilter | // + kUsesPathEffect); // Flags common to primitives that stroke geometry - static constexpr int kBASE_StrokeFlags_ = (kIsStrokedGeometry_ | // - kUsesAntiAlias_ | // - kUsesMaskFilter_ | // - kUsesPathEffect_); + static constexpr int kBaseStrokeFlags = (kIsStrokedGeometry | // + kUsesAntiAlias | // + kUsesMaskFilter | // + kUsesPathEffect); // Flags common to primitives that render an image with paint attributes - static constexpr int kBASE_ImageFlags_ = (kIsNonGeometric_ | // - kUsesAlpha_ | // - kUsesDither_ | // - kUsesBlend_ | // - kUsesColorFilter_ | // - kUsesImageFilter_); + static constexpr int kBaseImageFlags = (kIsNonGeometric | // + kUsesAlpha | // + kUsesDither | // + kUsesBlend | // + kUsesColorFilter | // + kUsesImageFilter); public: static constexpr DisplayListAttributeFlags kSaveLayerFlags{ - kIgnoresPaint_ // + kIgnoresPaint // }; static constexpr DisplayListAttributeFlags kSaveLayerWithPaintFlags{ - kIsNonGeometric_ | // - kUsesAlpha_ | // - kUsesBlend_ | // - kUsesColorFilter_ | // - kUsesImageFilter_ // + kIsNonGeometric | // + kUsesAlpha | // + kUsesBlend | // + kUsesColorFilter | // + kUsesImageFilter // }; static constexpr DisplayListAttributeFlags kDrawColorFlags{ - kFloodsSurface_ | // - kIgnoresPaint_ // + kFloodsSurface | // + kIgnoresPaint // }; static constexpr DisplayListAttributeFlags kDrawPaintFlags{ - kBASE_PaintFlags_ | // - kFloodsSurface_ // + kBasePaintFlags | // + kFloodsSurface // }; // Special case flags for horizonal and vertical lines static constexpr DisplayListAttributeFlags kDrawHVLineFlags{ - kBASE_PaintFlags_ | // - kBASE_StrokeFlags_ | // - kMayHaveCaps_ // + kBasePaintFlags | // + kBaseStrokeFlags | // + kMayHaveCaps // }; static constexpr DisplayListAttributeFlags kDrawLineFlags{ - kDrawHVLineFlags // - + kMayHaveDiagonalCaps_ // + kDrawHVLineFlags // + + kMayHaveDiagonalCaps // }; static constexpr DisplayListAttributeFlags kDrawRectFlags{ - kBASE_PaintFlags_ | // - kBASE_StrokeOrFillFlags_ | // - kMayHaveJoins_ // + kBasePaintFlags | // + kBaseStrokeOrFillFlags | // + kMayHaveJoins // }; static constexpr DisplayListAttributeFlags kDrawOvalFlags{ - kBASE_PaintFlags_ | // - kBASE_StrokeOrFillFlags_ // + kBasePaintFlags | // + kBaseStrokeOrFillFlags // }; static constexpr DisplayListAttributeFlags kDrawCircleFlags{ - kBASE_PaintFlags_ | // - kBASE_StrokeOrFillFlags_ // + kBasePaintFlags | // + kBaseStrokeOrFillFlags // }; static constexpr DisplayListAttributeFlags kDrawRRectFlags{ - kBASE_PaintFlags_ | // - kBASE_StrokeOrFillFlags_ // + kBasePaintFlags | // + kBaseStrokeOrFillFlags // }; static constexpr DisplayListAttributeFlags kDrawDRRectFlags{ - kBASE_PaintFlags_ | // - kBASE_StrokeOrFillFlags_ // + kBasePaintFlags | // + kBaseStrokeOrFillFlags // }; static constexpr DisplayListAttributeFlags kDrawPathFlags{ - kBASE_PaintFlags_ | // - kBASE_StrokeOrFillFlags_ | // - kMayHaveCaps_ | // - kMayHaveDiagonalCaps_ | // - kMayHaveJoins_ | // - kMayHaveAcuteJoins_ // + kBasePaintFlags | // + kBaseStrokeOrFillFlags | // + kMayHaveCaps | // + kMayHaveDiagonalCaps | // + kMayHaveJoins | // + kMayHaveAcuteJoins // }; static constexpr DisplayListAttributeFlags kDrawArcNoCenterFlags{ - kBASE_PaintFlags_ | // - kBASE_StrokeOrFillFlags_ | // - kMayHaveCaps_ | // - kMayHaveDiagonalCaps_ // + kBasePaintFlags | // + kBaseStrokeOrFillFlags | // + kMayHaveCaps | // + kMayHaveDiagonalCaps // }; static constexpr DisplayListAttributeFlags kDrawArcWithCenterFlags{ - kBASE_PaintFlags_ | // - kBASE_StrokeOrFillFlags_ | // - kMayHaveJoins_ | // - kMayHaveAcuteJoins_ // + kBasePaintFlags | // + kBaseStrokeOrFillFlags | // + kMayHaveJoins | // + kMayHaveAcuteJoins // }; static constexpr DisplayListAttributeFlags kDrawPointsAsPointsFlags{ - kBASE_PaintFlags_ | // - kBASE_StrokeFlags_ | // - kMayHaveCaps_ | // - kButtCapIsSquare_ // + kBasePaintFlags | // + kBaseStrokeFlags | // + kMayHaveCaps | // + kButtCapIsSquare // }; static constexpr DisplayListAttributeFlags kDrawPointsAsLinesFlags{ - kBASE_PaintFlags_ | // - kBASE_StrokeFlags_ | // - kMayHaveCaps_ | // - kMayHaveDiagonalCaps_ // + kBasePaintFlags | // + kBaseStrokeFlags | // + kMayHaveCaps | // + kMayHaveDiagonalCaps // }; // Polygon mode just draws (count-1) separate lines, no joins static constexpr DisplayListAttributeFlags kDrawPointsAsPolygonFlags{ - kBASE_PaintFlags_ | // - kBASE_StrokeFlags_ | // - kMayHaveCaps_ | // - kMayHaveDiagonalCaps_ // + kBasePaintFlags | // + kBaseStrokeFlags | // + kMayHaveCaps | // + kMayHaveDiagonalCaps // }; static constexpr DisplayListAttributeFlags kDrawVerticesFlags{ - kIsNonGeometric_ | // - kUsesDither_ | // - kUsesAlpha_ | // - kUsesShader_ | // - kUsesBlend_ | // - kUsesColorFilter_ | // - kUsesImageFilter_ // + kIsNonGeometric | // + kUsesDither | // + kUsesAlpha | // + kUsesShader | // + kUsesBlend | // + kUsesColorFilter | // + kUsesImageFilter // }; static constexpr DisplayListAttributeFlags kDrawImageFlags{ - kIgnoresPaint_ // + kIgnoresPaint // }; static constexpr DisplayListAttributeFlags kDrawImageWithPaintFlags{ - kBASE_ImageFlags_ | // - kUsesAntiAlias_ | // - kUsesMaskFilter_ // + kBaseImageFlags | // + kUsesAntiAlias | // + kUsesMaskFilter // }; static constexpr DisplayListAttributeFlags kDrawImageRectFlags{ - kIgnoresPaint_ // + kIgnoresPaint // }; static constexpr DisplayListAttributeFlags kDrawImageRectWithPaintFlags{ - kBASE_ImageFlags_ | // - kUsesAntiAlias_ | // - kUsesMaskFilter_ // + kBaseImageFlags | // + kUsesAntiAlias | // + kUsesMaskFilter // }; static constexpr DisplayListAttributeFlags kDrawImageNineFlags{ - kIgnoresPaint_ // + kIgnoresPaint // }; static constexpr DisplayListAttributeFlags kDrawImageNineWithPaintFlags{ - kBASE_ImageFlags_ // + kBaseImageFlags // }; static constexpr DisplayListAttributeFlags kDrawAtlasFlags{ - kIgnoresPaint_ // + kIgnoresPaint // }; static constexpr DisplayListAttributeFlags kDrawAtlasWithPaintFlags{ - kBASE_ImageFlags_ // + kBaseImageFlags // }; static constexpr DisplayListAttributeFlags kDrawDisplayListFlags{ - kIgnoresPaint_ // + kIgnoresPaint // }; static constexpr DisplayListAttributeFlags kDrawTextBlobFlags{ - DisplayListAttributeFlags(kBASE_PaintFlags_ | // - kBASE_StrokeOrFillFlags_ | // - kMayHaveJoins_) // - - kUsesAntiAlias_ // + DisplayListAttributeFlags(kBasePaintFlags | // + kBaseStrokeOrFillFlags | // + kMayHaveJoins) // + - kUsesAntiAlias // }; static constexpr DisplayListAttributeFlags kDrawShadowFlags{ - kIgnoresPaint_ // + kIgnoresPaint // }; }; diff --git a/display_list/dl_op_records.h b/display_list/dl_op_records.h index 47cdeb9d0e6fb..47574ae82457f 100644 --- a/display_list/dl_op_records.h +++ b/display_list/dl_op_records.h @@ -235,7 +235,7 @@ DEFINE_SET_CLEAR_DLATTR_OP(PathEffect, PathEffect, effect) struct SetImageColorSourceOp : DLOp { static const auto kType = DisplayListOpType::kSetImageColorSource; - SetImageColorSourceOp(const DlImageColorSource* source) + explicit SetImageColorSourceOp(const DlImageColorSource* source) : source(source->image(), source->horizontal_tile_mode(), source->vertical_tile_mode(), @@ -254,7 +254,8 @@ struct SetImageColorSourceOp : DLOp { struct SetRuntimeEffectColorSourceOp : DLOp { static const auto kType = DisplayListOpType::kSetRuntimeEffectColorSource; - SetRuntimeEffectColorSourceOp(const DlRuntimeEffectColorSource* source) + explicit SetRuntimeEffectColorSourceOp( + const DlRuntimeEffectColorSource* source) : source(source->runtime_effect(), source->samplers(), source->uniform_data()) {} @@ -295,7 +296,7 @@ struct SetSceneColorSourceOp : DLOp { struct SetSharedImageFilterOp : DLOp { static const auto kType = DisplayListOpType::kSetSharedImageFilter; - SetSharedImageFilterOp(const DlImageFilter* filter) + explicit SetSharedImageFilterOp(const DlImageFilter* filter) : filter(filter->shared()) {} const std::shared_ptr filter; @@ -315,7 +316,7 @@ struct SetSharedImageFilterOp : DLOp { struct SaveOpBase : DLOp { SaveOpBase() : options(), restore_index(0) {} - SaveOpBase(const SaveLayerOptions options) + explicit SaveOpBase(const SaveLayerOptions& options) : options(options), restore_index(0) {} // options parameter is only used by saveLayer operations, but since @@ -347,7 +348,7 @@ struct SaveOp final : SaveOpBase { struct SaveLayerOp final : SaveOpBase { static const auto kType = DisplayListOpType::kSaveLayer; - explicit SaveLayerOp(const SaveLayerOptions options) : SaveOpBase(options) {} + explicit SaveLayerOp(const SaveLayerOptions& options) : SaveOpBase(options) {} void dispatch(DispatchContext& ctx) const { if (save_needed(ctx)) { @@ -359,7 +360,7 @@ struct SaveLayerOp final : SaveOpBase { struct SaveLayerBoundsOp final : SaveOpBase { static const auto kType = DisplayListOpType::kSaveLayerBounds; - SaveLayerBoundsOp(const SaveLayerOptions options, const SkRect& rect) + SaveLayerBoundsOp(const SaveLayerOptions& options, const SkRect& rect) : SaveOpBase(options), rect(rect) {} const SkRect rect; @@ -374,7 +375,7 @@ struct SaveLayerBoundsOp final : SaveOpBase { struct SaveLayerBackdropOp final : SaveOpBase { static const auto kType = DisplayListOpType::kSaveLayerBackdrop; - explicit SaveLayerBackdropOp(const SaveLayerOptions options, + explicit SaveLayerBackdropOp(const SaveLayerOptions& options, const DlImageFilter* backdrop) : SaveOpBase(options), backdrop(backdrop->shared()) {} @@ -396,7 +397,7 @@ struct SaveLayerBackdropOp final : SaveOpBase { struct SaveLayerBackdropBoundsOp final : SaveOpBase { static const auto kType = DisplayListOpType::kSaveLayerBackdropBounds; - SaveLayerBackdropBoundsOp(const SaveLayerOptions options, + SaveLayerBackdropBoundsOp(const SaveLayerOptions& options, const SkRect& rect, const DlImageFilter* backdrop) : SaveOpBase(options), rect(rect), backdrop(backdrop->shared()) {} @@ -603,7 +604,7 @@ DEFINE_CLIP_SHAPE_OP(RRect, Difference) struct Clip##clipop##PathOp final : TransformClipOpBase { \ static const auto kType = DisplayListOpType::kClip##clipop##Path; \ \ - Clip##clipop##PathOp(SkPath path, bool is_aa) \ + Clip##clipop##PathOp(const SkPath& path, bool is_aa) \ : is_aa(is_aa), path(path) {} \ \ const bool is_aa; \ @@ -689,7 +690,7 @@ DEFINE_DRAW_1ARG_OP(RRect, SkRRect, rrect) struct DrawPathOp final : DrawOpBase { static const auto kType = DisplayListOpType::kDrawPath; - explicit DrawPathOp(SkPath path) : path(path) {} + explicit DrawPathOp(const SkPath& path) : path(path) {} const SkPath path; @@ -787,7 +788,7 @@ DEFINE_DRAW_POINTS_OP(Polygon, kPolygon); struct DrawVerticesOp final : DrawOpBase { static const auto kType = DisplayListOpType::kDrawVertices; - DrawVerticesOp(DlBlendMode mode) : mode(mode) {} + explicit DrawVerticesOp(DlBlendMode mode) : mode(mode) {} const DlBlendMode mode; @@ -806,7 +807,7 @@ struct DrawVerticesOp final : DrawOpBase { struct name##Op final : DrawOpBase { \ static const auto kType = DisplayListOpType::k##name; \ \ - name##Op(const sk_sp image, \ + name##Op(const sk_sp& image, \ const SkPoint& point, \ DlImageSampling sampling) \ : point(point), sampling(sampling), image(std::move(image)) {} \ @@ -837,7 +838,7 @@ DEFINE_DRAW_IMAGE_OP(DrawImageWithAttr, true) struct DrawImageRectOp final : DrawOpBase { static const auto kType = DisplayListOpType::kDrawImageRect; - DrawImageRectOp(const sk_sp image, + DrawImageRectOp(const sk_sp& image, const SkRect& src, const SkRect& dst, DlImageSampling sampling, @@ -848,7 +849,7 @@ struct DrawImageRectOp final : DrawOpBase { sampling(sampling), render_with_attributes(render_with_attributes), constraint(constraint), - image(std::move(image)) {} + image(image) {} const SkRect src; const SkRect dst; @@ -879,7 +880,7 @@ struct DrawImageRectOp final : DrawOpBase { struct name##Op final : DrawOpBase { \ static const auto kType = DisplayListOpType::k##name; \ \ - name##Op(const sk_sp image, \ + name##Op(const sk_sp& image, \ const SkIRect& center, \ const SkRect& dst, \ DlFilterMode mode) \ @@ -916,7 +917,7 @@ DEFINE_DRAW_IMAGE_NINE_OP(DrawImageNineWithAttr, true) // DlColor list only packs well if the count is even, otherwise there // can be 4 unusued bytes at the end. struct DrawAtlasBaseOp : DrawOpBase { - DrawAtlasBaseOp(const sk_sp atlas, + DrawAtlasBaseOp(const sk_sp& atlas, int count, DlBlendMode mode, DlImageSampling sampling, @@ -927,7 +928,7 @@ struct DrawAtlasBaseOp : DrawOpBase { has_colors(has_colors), render_with_attributes(render_with_attributes), sampling(sampling), - atlas(std::move(atlas)) {} + atlas(atlas) {} const int count; const uint16_t mode_index; @@ -959,7 +960,7 @@ struct DrawAtlasBaseOp : DrawOpBase { struct DrawAtlasOp final : DrawAtlasBaseOp { static const auto kType = DisplayListOpType::kDrawAtlas; - DrawAtlasOp(const sk_sp atlas, + DrawAtlasOp(const sk_sp& atlas, int count, DlBlendMode mode, DlImageSampling sampling, @@ -1000,7 +1001,7 @@ struct DrawAtlasOp final : DrawAtlasBaseOp { struct DrawAtlasCulledOp final : DrawAtlasBaseOp { static const auto kType = DisplayListOpType::kDrawAtlasCulled; - DrawAtlasCulledOp(const sk_sp atlas, + DrawAtlasCulledOp(const sk_sp& atlas, int count, DlBlendMode mode, DlImageSampling sampling, @@ -1044,9 +1045,9 @@ struct DrawAtlasCulledOp final : DrawAtlasBaseOp { struct DrawDisplayListOp final : DrawOpBase { static const auto kType = DisplayListOpType::kDrawDisplayList; - explicit DrawDisplayListOp(const sk_sp display_list, + explicit DrawDisplayListOp(const sk_sp& display_list, SkScalar opacity) - : opacity(opacity), display_list(std::move(display_list)) {} + : opacity(opacity), display_list(display_list) {} SkScalar opacity; const sk_sp display_list; @@ -1070,8 +1071,8 @@ struct DrawDisplayListOp final : DrawOpBase { struct DrawTextBlobOp final : DrawOpBase { static const auto kType = DisplayListOpType::kDrawTextBlob; - DrawTextBlobOp(const sk_sp blob, SkScalar x, SkScalar y) - : x(x), y(y), blob(std::move(blob)) {} + DrawTextBlobOp(const sk_sp& blob, SkScalar x, SkScalar y) + : x(x), y(y), blob(blob) {} const SkScalar x; const SkScalar y; diff --git a/display_list/effects/dl_image_filter.h b/display_list/effects/dl_image_filter.h index 7d94da1eef84a..802f619b4c5af 100644 --- a/display_list/effects/dl_image_filter.h +++ b/display_list/effects/dl_image_filter.h @@ -592,7 +592,7 @@ class DlColorFilterImageFilter final : public DlImageFilter { : DlColorFilterImageFilter(&filter) {} static std::shared_ptr Make( - std::shared_ptr filter) { + const std::shared_ptr& filter) { if (filter) { return std::make_shared(filter); } diff --git a/display_list/skia/dl_sk_paint_dispatcher.h b/display_list/skia/dl_sk_paint_dispatcher.h index de404bbfbe040..dcbde11fba764 100644 --- a/display_list/skia/dl_sk_paint_dispatcher.h +++ b/display_list/skia/dl_sk_paint_dispatcher.h @@ -15,7 +15,7 @@ namespace flutter { // which can be accessed at any time via paint(). class DlSkPaintDispatchHelper : public virtual DlOpReceiver { public: - DlSkPaintDispatchHelper(SkScalar opacity = SK_Scalar1) + explicit DlSkPaintDispatchHelper(SkScalar opacity = SK_Scalar1) : current_color_(SK_ColorBLACK), opacity_(opacity) { if (opacity < SK_Scalar1) { paint_.setAlphaf(opacity); @@ -76,7 +76,7 @@ class DlSkPaintDispatchHelper : public virtual DlOpReceiver { sk_sp makeColorFilter() const; struct SaveInfo { - SaveInfo(SkScalar opacity) : opacity(opacity) {} + explicit SaveInfo(SkScalar opacity) : opacity(opacity) {} SkScalar opacity; }; diff --git a/display_list/testing/dl_rendering_unittests.cc b/display_list/testing/dl_rendering_unittests.cc index 8e080cc9f98ae..bb3ff367243eb 100644 --- a/display_list/testing/dl_rendering_unittests.cc +++ b/display_list/testing/dl_rendering_unittests.cc @@ -456,11 +456,11 @@ class RenderEnvironment { } static RenderEnvironment Make565(const DlSurfaceProvider* provider) { - return RenderEnvironment(provider, PixelFormat::k565_PixelFormat); + return RenderEnvironment(provider, PixelFormat::k565PixelFormat); } static RenderEnvironment MakeN32(const DlSurfaceProvider* provider) { - return RenderEnvironment(provider, PixelFormat::kN32Premul_PixelFormat); + return RenderEnvironment(provider, PixelFormat::kN32PremulPixelFormat); } void init_ref(SkRenderer& sk_renderer, @@ -1540,7 +1540,7 @@ class CanvasCompareTester { // See https://bugs.chromium.org/p/skia/issues/detail?id=14046 bool no_hairlines = testP.is_draw_path() && - env.provider()->backend_type() != BackendType::kSoftware_Backend; + env.provider()->backend_type() != BackendType::kSoftwareBackend; RenderWith(testP, env, tolerance, CaseParameters( "Stroke + defaults", @@ -2082,10 +2082,10 @@ class CanvasCompareTester { } static int groupOpacityFudgeFactor(const RenderEnvironment& env) { - if (env.format() == PixelFormat::k565_PixelFormat) { + if (env.format() == PixelFormat::k565PixelFormat) { return 9; } - if (env.provider()->backend_type() == BackendType::kOpenGL_Backend) { + if (env.provider()->backend_type() == BackendType::kOpenGlBackend) { // OpenGL gets a little fuzzy at times. Still, "within 5" (aka +/-4) // for byte samples is not bad, though the other backends give +/-1 return 5; @@ -2421,7 +2421,7 @@ class DisplayListCanvasTestBase : public BaseT, protected DisplayListOpFlags { return; } provider->InitializeSurface(kTestWidth, kTestHeight, - PixelFormat::kN32Premul_PixelFormat); + PixelFormat::kN32PremulPixelFormat); CanvasCompareTester::kTestProviders.push_back(std::move(provider)); } @@ -2446,13 +2446,13 @@ class DisplayListCanvasTestBase : public BaseT, protected DisplayListOpFlags { } } if (do_software) { - AddProvider(BackendType::kSoftware_Backend, "Software"); + AddProvider(BackendType::kSoftwareBackend, "Software"); } if (do_opengl) { - AddProvider(BackendType::kOpenGL_Backend, "OpenGL"); + AddProvider(BackendType::kOpenGlBackend, "OpenGL"); } if (do_metal) { - AddProvider(BackendType::kMetal_Backend, "Metal"); + AddProvider(BackendType::kMetalBackend, "Metal"); } std::string providers = ""; auto begin = CanvasCompareTester::kTestProviders.cbegin(); @@ -3501,7 +3501,7 @@ TEST_F(DisplayListCanvas, SaveLayerConsolidation) { std::vector> environments; for (auto& provider : CanvasCompareTester::kTestProviders) { auto env = std::make_unique( - provider.get(), PixelFormat::kN32Premul_PixelFormat); + provider.get(), PixelFormat::kN32PremulPixelFormat); environments.push_back(std::move(env)); } @@ -3645,7 +3645,7 @@ TEST_F(DisplayListCanvas, MatrixColorFilterModifyTransparencyCheck) { std::vector> environments; for (auto& provider : CanvasCompareTester::kTestProviders) { auto env = std::make_unique( - provider.get(), PixelFormat::kN32Premul_PixelFormat); + provider.get(), PixelFormat::kN32PremulPixelFormat); environments.push_back(std::move(env)); } @@ -3719,7 +3719,7 @@ TEST_F(DisplayListCanvas, MatrixColorFilterOpacityCommuteCheck) { std::vector> environments; for (auto& provider : CanvasCompareTester::kTestProviders) { auto env = std::make_unique( - provider.get(), PixelFormat::kN32Premul_PixelFormat); + provider.get(), PixelFormat::kN32PremulPixelFormat); environments.push_back(std::move(env)); } @@ -3836,7 +3836,7 @@ TEST_F(DisplayListCanvas, BlendColorFilterModifyTransparencyCheck) { std::vector> environments; for (auto& provider : CanvasCompareTester::kTestProviders) { auto env = std::make_unique( - provider.get(), PixelFormat::kN32Premul_PixelFormat); + provider.get(), PixelFormat::kN32PremulPixelFormat); environments.push_back(std::move(env)); } @@ -3898,7 +3898,7 @@ TEST_F(DisplayListCanvas, BlendColorFilterOpacityCommuteCheck) { std::vector> environments; for (auto& provider : CanvasCompareTester::kTestProviders) { auto env = std::make_unique( - provider.get(), PixelFormat::kN32Premul_PixelFormat); + provider.get(), PixelFormat::kN32PremulPixelFormat); environments.push_back(std::move(env)); } @@ -4196,7 +4196,7 @@ class DisplayListNopTest : public DisplayListCanvas { for (auto& provider : CanvasCompareTester::kTestProviders) { auto result_surface = provider->MakeOffscreenSurface( test_image->width(), test_image->height(), - DlSurfaceProvider::kN32Premul_PixelFormat); + DlSurfaceProvider::kN32PremulPixelFormat); SkCanvas* result_canvas = result_surface->sk_surface()->getCanvas(); result_canvas->clear(SK_ColorTRANSPARENT); result_canvas->drawImage(test_image.get(), 0, 0); @@ -4257,7 +4257,7 @@ class DisplayListNopTest : public DisplayListCanvas { sk_paint.setImageFilter(ToSk(image_filter)); for (auto& provider : CanvasCompareTester::kTestProviders) { auto result_surface = provider->MakeOffscreenSurface( - w, h, DlSurfaceProvider::kN32Premul_PixelFormat); + w, h, DlSurfaceProvider::kN32PremulPixelFormat); SkCanvas* result_canvas = result_surface->sk_surface()->getCanvas(); result_canvas->clear(SK_ColorTRANSPARENT); result_canvas->drawImage(test_image_dst_data->image(), 0, 0); diff --git a/display_list/testing/dl_test_equality.h b/display_list/testing/dl_test_equality.h index 9d24d54306d4c..84dcaff5e2814 100644 --- a/display_list/testing/dl_test_equality.h +++ b/display_list/testing/dl_test_equality.h @@ -25,7 +25,7 @@ static void TestEquals(T& source1, T& source2) { } template -static void TestNotEquals(T& source1, T& source2, std::string label) { +static void TestNotEquals(T& source1, T& source2, const std::string& label) { ASSERT_FALSE(source1 == source2) << label; ASSERT_FALSE(source2 == source1) << label; ASSERT_TRUE(source1 != source2) << label; diff --git a/display_list/testing/dl_test_surface_gl.h b/display_list/testing/dl_test_surface_gl.h index 882e0fd6d243b..82677c9be749d 100644 --- a/display_list/testing/dl_test_surface_gl.h +++ b/display_list/testing/dl_test_surface_gl.h @@ -26,9 +26,9 @@ class DlOpenGLSurfaceProvider : public DlSurfaceProvider { size_t height, PixelFormat format) const override; const std::string backend_name() const override { return "OpenGL"; } - BackendType backend_type() const override { return kOpenGL_Backend; } + BackendType backend_type() const override { return kOpenGlBackend; } bool supports(PixelFormat format) const override { - return format == kN32Premul_PixelFormat; + return format == kN32PremulPixelFormat; } private: diff --git a/display_list/testing/dl_test_surface_metal.cc b/display_list/testing/dl_test_surface_metal.cc index 7c3617e8d63ca..01048e783cc1a 100644 --- a/display_list/testing/dl_test_surface_metal.cc +++ b/display_list/testing/dl_test_surface_metal.cc @@ -28,7 +28,7 @@ class DlMetalSurfaceInstance : public DlSurfaceInstance { bool DlMetalSurfaceProvider::InitializeSurface(size_t width, size_t height, PixelFormat format) { - if (format != kN32Premul_PixelFormat) { + if (format != kN32PremulPixelFormat) { return false; } metal_context_ = std::make_unique(); diff --git a/display_list/testing/dl_test_surface_metal.h b/display_list/testing/dl_test_surface_metal.h index c660c6dc95454..619d4de7dbb87 100644 --- a/display_list/testing/dl_test_surface_metal.h +++ b/display_list/testing/dl_test_surface_metal.h @@ -26,9 +26,9 @@ class DlMetalSurfaceProvider : public DlSurfaceProvider { size_t height, PixelFormat format) const override; const std::string backend_name() const override { return "Metal"; } - BackendType backend_type() const override { return kMetal_Backend; } + BackendType backend_type() const override { return kMetalBackend; } bool supports(PixelFormat format) const override { - return format == kN32Premul_PixelFormat; + return format == kN32PremulPixelFormat; } private: diff --git a/display_list/testing/dl_test_surface_provider.cc b/display_list/testing/dl_test_surface_provider.cc index 9615183d88059..f3b611c62e8ee 100644 --- a/display_list/testing/dl_test_surface_provider.cc +++ b/display_list/testing/dl_test_surface_provider.cc @@ -27,15 +27,15 @@ std::unique_ptr DlSurfaceProvider::Create( BackendType backend_type) { switch (backend_type) { #ifdef ENABLE_SOFTWARE_BENCHMARKS - case kSoftware_Backend: + case kSoftwareBackend: return std::make_unique(); #endif #ifdef ENABLE_OPENGL_BENCHMARKS - case kOpenGL_Backend: + case kOpenGLBackend: return std::make_unique(); #endif #ifdef ENABLE_METAL_BENCHMARKS - case kMetal_Backend: + case kMetalBackend: return std::make_unique(); #endif default: diff --git a/display_list/testing/dl_test_surface_provider.h b/display_list/testing/dl_test_surface_provider.h index d3944aba21ae7..57055b93d3c19 100644 --- a/display_list/testing/dl_test_surface_provider.h +++ b/display_list/testing/dl_test_surface_provider.h @@ -5,6 +5,8 @@ #ifndef FLUTTER_DISPLAY_LIST_TESTING_DL_TEST_SURFACE_PROVIDER_H_ #define FLUTTER_DISPLAY_LIST_TESTING_DL_TEST_SURFACE_PROVIDER_H_ +#include + #include "flutter/fml/mapping.h" #include "flutter/testing/testing.h" @@ -25,7 +27,8 @@ class DlSurfaceInstance { class DlSurfaceInstanceBase : public DlSurfaceInstance { public: - DlSurfaceInstanceBase(sk_sp surface) : surface_(surface) {} + explicit DlSurfaceInstanceBase(sk_sp surface) + : surface_(std::move(surface)) {} ~DlSurfaceInstanceBase() = default; sk_sp sk_surface() const override { return surface_; } @@ -36,18 +39,14 @@ class DlSurfaceInstanceBase : public DlSurfaceInstance { class DlSurfaceProvider { public: - typedef enum { kN32Premul_PixelFormat, k565_PixelFormat } PixelFormat; - typedef enum { - kSoftware_Backend, - kOpenGL_Backend, - kMetal_Backend - } BackendType; + typedef enum { kN32PremulPixelFormat, k565PixelFormat } PixelFormat; + typedef enum { kSoftwareBackend, kOpenGlBackend, kMetalBackend } BackendType; static SkImageInfo MakeInfo(PixelFormat format, int w, int h) { switch (format) { - case kN32Premul_PixelFormat: + case kN32PremulPixelFormat: return SkImageInfo::MakeN32Premul(w, h); - case k565_PixelFormat: + case k565PixelFormat: return SkImageInfo::Make(SkISize::Make(w, h), kRGB_565_SkColorType, kOpaque_SkAlphaType); } @@ -63,12 +62,12 @@ class DlSurfaceProvider { virtual bool InitializeSurface( size_t width, size_t height, - PixelFormat format = kN32Premul_PixelFormat) = 0; + PixelFormat format = kN32PremulPixelFormat) = 0; virtual std::shared_ptr GetPrimarySurface() const = 0; virtual std::shared_ptr MakeOffscreenSurface( size_t width, size_t height, - PixelFormat format = kN32Premul_PixelFormat) const = 0; + PixelFormat format = kN32PremulPixelFormat) const = 0; virtual bool Snapshot(std::string& filename) const; diff --git a/display_list/testing/dl_test_surface_software.h b/display_list/testing/dl_test_surface_software.h index 5fbbe19457d9f..d341079b0adaf 100644 --- a/display_list/testing/dl_test_surface_software.h +++ b/display_list/testing/dl_test_surface_software.h @@ -26,7 +26,7 @@ class DlSoftwareSurfaceProvider : public DlSurfaceProvider { size_t height, PixelFormat format) const override; const std::string backend_name() const override { return "Software"; } - BackendType backend_type() const override { return kSoftware_Backend; } + BackendType backend_type() const override { return kSoftwareBackend; } bool supports(PixelFormat format) const override { return true; } private: diff --git a/display_list/utils/dl_matrix_clip_tracker.h b/display_list/utils/dl_matrix_clip_tracker.h index f6d2736f0a1db..5b4a3fa763cb2 100644 --- a/display_list/utils/dl_matrix_clip_tracker.h +++ b/display_list/utils/dl_matrix_clip_tracker.h @@ -124,7 +124,7 @@ class DisplayListMatrixClipTracker { virtual void resetBounds(const SkRect& cull_rect); protected: - Data(const SkRect& rect) : cull_rect_(rect) {} + explicit Data(const SkRect& rect) : cull_rect_(rect) {} virtual bool has_perspective() const = 0; diff --git a/fml/log_level.h b/fml/log_level.h index 30e40a48055c3..8610aa5fe52df 100644 --- a/fml/log_level.h +++ b/fml/log_level.h @@ -17,20 +17,25 @@ constexpr LogSeverity kLogFatal = 3; constexpr LogSeverity kLogNumSeverities = 4; // DEPRECATED: Use |kLogInfo|. +// Ignoring Clang Tidy because this is used in a very common substitution macro. +// NOLINTNEXTLINE(readability-identifier-naming) constexpr LogSeverity LOG_INFO = kLogInfo; // DEPRECATED: Use |kLogWarning|. +// Ignoring Clang Tidy because this is used in a very common substitution macro. +// NOLINTNEXTLINE(readability-identifier-naming) constexpr LogSeverity LOG_WARNING = kLogWarning; // DEPRECATED: Use |kLogError|. +// Ignoring Clang Tidy because this is used in a very common substitution macro. +// NOLINTNEXTLINE(readability-identifier-naming) constexpr LogSeverity LOG_ERROR = kLogError; // DEPRECATED: Use |kLogFatal|. +// Ignoring Clang Tidy because this is used in a very common substitution macro. +// NOLINTNEXTLINE(readability-identifier-naming) constexpr LogSeverity LOG_FATAL = kLogFatal; -// DEPRECATED: Use |kLogNumSeverities|. -constexpr LogSeverity LOG_NUM_SEVERITIES = kLogNumSeverities; - // One of the Windows headers defines ERROR to 0. This makes the token // concatenation in FML_LOG(ERROR) to resolve to LOG_0. We define this back to // the appropriate log level. @@ -46,6 +51,8 @@ const LogSeverity kLogDFatal = kLogFatal; #endif // DEPRECATED: Use |kLogDFatal|. +// Ignoring Clang Tidy because this is used in a very common substitution macro. +// NOLINTNEXTLINE(readability-identifier-naming) const LogSeverity LOG_DFATAL = kLogDFatal; } // namespace fml diff --git a/fml/memory/ref_counted_internal.h b/fml/memory/ref_counted_internal.h index a5c5fe04d6280..47bda01005ef9 100644 --- a/fml/memory/ref_counted_internal.h +++ b/fml/memory/ref_counted_internal.h @@ -76,8 +76,8 @@ class RefCountedThreadSafeBase { mutable std::atomic_uint_fast32_t ref_count_; #ifndef NDEBUG - mutable bool adoption_required_; - mutable bool destruction_started_; + mutable bool adoption_required_ = false; + mutable bool destruction_started_ = false; #endif FML_DISALLOW_COPY_AND_ASSIGN(RefCountedThreadSafeBase); diff --git a/lib/ui/painting/image.h b/lib/ui/painting/image.h index 18a7200739813..ad3a7d7d18dbe 100644 --- a/lib/ui/painting/image.h +++ b/lib/ui/painting/image.h @@ -39,7 +39,7 @@ class CanvasImage final : public RefCountedDartWrappable { sk_sp image() const { return image_; } - void set_image(sk_sp image) { + void set_image(const sk_sp& image) { FML_DCHECK(image->isUIThreadSafe()); image_ = image; } diff --git a/testing/display_list_testing.h b/testing/display_list_testing.h index 4f3830a204b44..df3b2fe58b372 100644 --- a/testing/display_list_testing.h +++ b/testing/display_list_testing.h @@ -17,16 +17,16 @@ bool DisplayListsEQ_Verbose(const DisplayList* a, const DisplayList* b); bool inline DisplayListsEQ_Verbose(const DisplayList& a, const DisplayList& b) { return DisplayListsEQ_Verbose(&a, &b); } -bool inline DisplayListsEQ_Verbose(sk_sp a, - sk_sp b) { +bool inline DisplayListsEQ_Verbose(const sk_sp& a, + const sk_sp& b) { return DisplayListsEQ_Verbose(a.get(), b.get()); } bool DisplayListsNE_Verbose(const DisplayList* a, const DisplayList* b); bool inline DisplayListsNE_Verbose(const DisplayList& a, const DisplayList& b) { return DisplayListsNE_Verbose(&a, &b); } -bool inline DisplayListsNE_Verbose(sk_sp a, - sk_sp b) { +bool inline DisplayListsNE_Verbose(const sk_sp& a, + const sk_sp& b) { return DisplayListsNE_Verbose(a.get(), b.get()); } @@ -52,9 +52,9 @@ extern std::ostream& operator<<(std::ostream& os, const DlImage* image); class DisplayListStreamDispatcher final : public DlOpReceiver { public: - DisplayListStreamDispatcher(std::ostream& os, - int cur_indent = 2, - int indent = 2) + explicit DisplayListStreamDispatcher(std::ostream& os, + int cur_indent = 2, + int indent = 2) : os_(os), cur_indent_(cur_indent), indent_(indent) {} void setAntiAlias(bool aa) override; diff --git a/testing/test_metal_context.h b/testing/test_metal_context.h index c470e501257d4..734aed61f991a 100644 --- a/testing/test_metal_context.h +++ b/testing/test_metal_context.h @@ -41,7 +41,7 @@ class TestMetalContext { void* device_; void* command_queue_; sk_sp skia_context_; - std::mutex textures_mutex; + std::mutex textures_mutex_; int64_t texture_id_ctr_ = 1; // guarded by textures_mutex std::map> textures_; // guarded by textures_mutex }; diff --git a/testing/test_metal_context.mm b/testing/test_metal_context.mm index 6ac70a2ae25f3..dca0a34f7df28 100644 --- a/testing/test_metal_context.mm +++ b/testing/test_metal_context.mm @@ -41,7 +41,7 @@ } TestMetalContext::~TestMetalContext() { - std::scoped_lock lock(textures_mutex); + std::scoped_lock lock(textures_mutex_); textures_.clear(); if (device_) { [(__bridge id)device_ release]; @@ -64,7 +64,7 @@ } TestMetalContext::TextureInfo TestMetalContext::CreateMetalTexture(const SkISize& size) { - std::scoped_lock lock(textures_mutex); + std::scoped_lock lock(textures_mutex_); auto texture_descriptor = fml::scoped_nsobject{ [[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:MTLPixelFormatBGRA8Unorm width:size.width() @@ -100,7 +100,7 @@ // Don't remove the texture from the map here. bool TestMetalContext::Present(int64_t texture_id) { - std::scoped_lock lock(textures_mutex); + std::scoped_lock lock(textures_mutex_); if (textures_.find(texture_id) == textures_.end()) { return false; } else { @@ -109,7 +109,7 @@ } TestMetalContext::TextureInfo TestMetalContext::GetTextureInfo(int64_t texture_id) { - std::scoped_lock lock(textures_mutex); + std::scoped_lock lock(textures_mutex_); if (textures_.find(texture_id) == textures_.end()) { FML_CHECK(false) << "Invalid texture id: " << texture_id; return {.texture_id = -1, .texture = nullptr}; From f8effca48088cacb0eaf44a79076d2778062b52e Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Thu, 21 Sep 2023 14:16:18 -0700 Subject: [PATCH 216/859] [Impeller] Use final cmd buffer to present drawable. (#46023) If we're not running with a transaction then we don't need to block on waitUntilScheduled on any platform. I think this should always work, as the problems we had before were due to always using drawable present. But this helper method schedules the drawable presentation after the cmd buffer is scheduled - which is what we're doing with waitUntilScheduled anyway - just non blocking from our perspective. Fixes https://github.com/flutter/flutter/issues/131520 --- impeller/renderer/backend/metal/surface_mtl.mm | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/impeller/renderer/backend/metal/surface_mtl.mm b/impeller/renderer/backend/metal/surface_mtl.mm index 526e66f4c5ff5..7244fc3b2a72a 100644 --- a/impeller/renderer/backend/metal/surface_mtl.mm +++ b/impeller/renderer/backend/metal/surface_mtl.mm @@ -248,13 +248,22 @@ } if (drawable_) { - TRACE_EVENT0("flutter", "waitUntilScheduled"); id command_buffer = ContextMTL::Cast(context.get()) ->CreateMTLCommandBuffer("Present Waiter Command Buffer"); - [command_buffer commit]; - [command_buffer waitUntilScheduled]; - [drawable_ present]; + // If the threads have been merged, or there is a pending frame capture, + // then block on cmd buffer scheduling to ensure that the + // transaction/capture work correctly. + if ([[NSThread currentThread] isMainThread] || + [[MTLCaptureManager sharedCaptureManager] isCapturing]) { + TRACE_EVENT0("flutter", "waitUntilScheduled"); + [command_buffer commit]; + [command_buffer waitUntilScheduled]; + [drawable_ present]; + } else { + [command_buffer presentDrawable:drawable_]; + [command_buffer commit]; + } } return true; From 143bf4c504978beb3f3d39c954aa369ba32e5abf Mon Sep 17 00:00:00 2001 From: John McCutchan Date: Thu, 21 Sep 2023 14:40:31 -0700 Subject: [PATCH 217/859] Re-enable HardwareBuffer backed Platform Views on Android >= 29 (#46071) --- .../platform/ImageReaderPlatformViewRenderTarget.java | 7 ++++--- .../flutter/plugin/platform/PlatformViewsController.java | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/shell/platform/android/io/flutter/plugin/platform/ImageReaderPlatformViewRenderTarget.java b/shell/platform/android/io/flutter/plugin/platform/ImageReaderPlatformViewRenderTarget.java index 937b00c6ae899..4ba58fce13b5f 100644 --- a/shell/platform/android/io/flutter/plugin/platform/ImageReaderPlatformViewRenderTarget.java +++ b/shell/platform/android/io/flutter/plugin/platform/ImageReaderPlatformViewRenderTarget.java @@ -19,6 +19,7 @@ public class ImageReaderPlatformViewRenderTarget implements PlatformViewRenderTa private int bufferWidth = 0; private int bufferHeight = 0; private static final String TAG = "ImageReaderPlatformViewRenderTarget"; + private static final int MAX_IMAGES = 3; private void closeReader() { if (this.reader != null) { @@ -39,7 +40,7 @@ public void onImageAvailable(ImageReader reader) { try { image = reader.acquireLatestImage(); } catch (IllegalStateException e) { - Log.e(TAG, "New image available that could not be acquired: " + e.toString()); + Log.e(TAG, "New image available but it could not be acquired: " + e.toString()); } if (image == null) { return; @@ -52,7 +53,7 @@ public void onImageAvailable(ImageReader reader) { protected ImageReader createImageReader33() { final ImageReader.Builder builder = new ImageReader.Builder(bufferWidth, bufferHeight); // Allow for double buffering. - builder.setMaxImages(3); + builder.setMaxImages(MAX_IMAGES); // Use PRIVATE image format so that we can support video decoding. // TODO(johnmccutchan): Should we always use PRIVATE here? It may impact our // ability to read back texture data. If we don't always want to use it, how do @@ -78,7 +79,7 @@ protected ImageReader createImageReader29() { bufferWidth, bufferHeight, ImageFormat.PRIVATE, - 3, + MAX_IMAGES, HardwareBuffer.USAGE_GPU_SAMPLED_IMAGE); reader.setOnImageAvailableListener(this.onImageAvailableListener, onImageAvailableHandler); return reader; diff --git a/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java b/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java index b5559a3a9e23a..0e7ad70aee29d 100644 --- a/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java +++ b/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java @@ -147,7 +147,7 @@ public class PlatformViewsController implements PlatformViewsAccessibilityDelega // Whether software rendering is used. private boolean usesSoftwareRendering = false; - private static boolean enableHardwareBufferRenderingTarget = false; + private static boolean enableHardwareBufferRenderingTarget = true; private final PlatformViewsChannel.PlatformViewsHandler channelHandler = new PlatformViewsChannel.PlatformViewsHandler() { From 2dd514886b871acb2afb337e67ebdbb591b49454 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 21 Sep 2023 17:54:02 -0400 Subject: [PATCH 218/859] Roll Skia from 0cf83a86c56d to a0928a46b9c8 (19 revisions) (#46164) https://skia.googlesource.com/skia.git/+log/0cf83a86c56d..a0928a46b9c8 2023-09-21 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 79912a37e72c to b7c710e0c890 (5 revisions) 2023-09-21 jlavrova@google.com Fixing Flutter roll build 2023-09-21 michaelludwig@google.com Remove extra semicolon after macro 2023-09-21 johnstiles@google.com Remove packDouble2x32 intrinsics from SkSL. 2023-09-21 johnstiles@google.com Add SkRuntimeEffectPriv::VarAsChild. 2023-09-21 robertphillips@google.com [graphite] Implement Image and Blend Shaders using the Blend helper 2023-09-21 johnstiles@google.com Split apart MeshSpec tests into separate DEF_TESTs. 2023-09-21 brianosman@google.com [graphite] Return transparent black when evaluating null child shader 2023-09-21 armansito@google.com [graphite][compute] Coverage mask format based on storage binding support 2023-09-21 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll ANGLE from e305459968f2 to 8fcd4a50ab47 (9 revisions) 2023-09-21 michaelludwig@google.com [skif] Combine isCropped() and modifiesPixelsBeyondImage() 2023-09-21 bungeman@google.com [skshaper] Use locale for line breaking 2023-09-21 jlavrova@google.com Set of utilities for Unicode comparison: Skia changes 2023-09-21 robertphillips@google.com [graphite] Implement DstReads w/ Blend helper 2023-09-21 johnstiles@google.com Disable DeadReturnES3 test on Radeon due to crashing. 2023-09-21 skia-autoroll@skia-public.iam.gserviceaccount.com Roll skottie-base from b4674d1b2f50 to bbf6a30f67f4 2023-09-21 skia-autoroll@skia-public.iam.gserviceaccount.com Roll jsfiddle-base from f4090760c770 to 3605928905e4 2023-09-21 skia-autoroll@skia-public.iam.gserviceaccount.com Roll shaders-base from c6e5b668b1a4 to 84356d9e8452 2023-09-21 skia-autoroll@skia-public.iam.gserviceaccount.com Roll debugger-app-base from b5dc6c526875 to 72a86e8cc35e If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index cc70aa5e53a9e..1eb3da365ae14 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '0cf83a86c56d8be6d17f676bc8628d689d2fd1d3', + 'skia_revision': 'a0928a46b9c83d3e4d5ce650d94d5b3511684f29', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 741b5a98aa93a..2227e8ee4a24c 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 8b2b70340497d70f1632596905227132 +Signature: 081182b36fe81f85190a3661de55417b ==================================================================================================== LIBRARY: etc1 From db1f8ee9fbdbc808b79b4a0bd14b30c8ad396410 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 21 Sep 2023 18:39:04 -0400 Subject: [PATCH 219/859] Roll Skia from a0928a46b9c8 to 611f08987be3 (2 revisions) (#46165) https://skia.googlesource.com/skia.git/+log/a0928a46b9c8..611f08987be3 2023-09-21 brianosman@google.com Add working color space shader 2023-09-21 avi@chromium.org Remove deprecated API use If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 1eb3da365ae14..4ddd05f1eb710 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'a0928a46b9c83d3e4d5ce650d94d5b3511684f29', + 'skia_revision': '611f08987be37fd530142af262eaa5baadc9f980', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 2227e8ee4a24c..c22f42c799222 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 081182b36fe81f85190a3661de55417b +Signature: 48468e3ab8dae681a975c559a05bf74a ==================================================================================================== LIBRARY: etc1 @@ -9002,6 +9002,8 @@ ORIGIN: ../../../third_party/skia/src/shaders/SkRuntimeShader.h + ../../../third ORIGIN: ../../../third_party/skia/src/shaders/SkShaderBase.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/shaders/SkTriColorShader.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/shaders/SkTriColorShader.h + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/shaders/SkWorkingColorSpaceShader.cpp + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/shaders/SkWorkingColorSpaceShader.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/shaders/gradients/SkRadialGradient.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/shaders/gradients/SkSweepGradient.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/sksl/analysis/SkSLGetLoopControlFlowInfo.cpp + ../../../third_party/skia/LICENSE @@ -9261,6 +9263,8 @@ FILE: ../../../third_party/skia/src/shaders/SkRuntimeShader.h FILE: ../../../third_party/skia/src/shaders/SkShaderBase.cpp FILE: ../../../third_party/skia/src/shaders/SkTriColorShader.cpp FILE: ../../../third_party/skia/src/shaders/SkTriColorShader.h +FILE: ../../../third_party/skia/src/shaders/SkWorkingColorSpaceShader.cpp +FILE: ../../../third_party/skia/src/shaders/SkWorkingColorSpaceShader.h FILE: ../../../third_party/skia/src/shaders/gradients/SkRadialGradient.h FILE: ../../../third_party/skia/src/shaders/gradients/SkSweepGradient.h FILE: ../../../third_party/skia/src/sksl/analysis/SkSLGetLoopControlFlowInfo.cpp From c211eccff033ed3af0c48bbad732197555afa1e1 Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Thu, 21 Sep 2023 16:10:37 -0700 Subject: [PATCH 220/859] Revert #46131, don't store `vkImage`, reset `vkComandPool` synchronously (#46166) Closes https://github.com/flutter/flutter/issues/135086. Reverts https://github.com/flutter/engine/pull/46131. This PR bundles together 3 changes that removes all validation errors on the `macrobenchmark` apps I could manually find: 1. Reverts https://github.com/flutter/engine/pull/46131, which did not fix the original issue. 2. Added `kResetOnBackgroundThread = false`, which drops performance benefits, but doesn't cause threading issues. 3. Stop tracking `image` for Swapchain presentation (was hitting Vulkan assertion errors about acquired images). /cc @gaaclarke I'd love to talk about how we could run the macrobenchmarks app on CI, with validation errors, after landing. --- impeller/renderer/backend/vulkan/command_pool_vk.cc | 13 +++++++++---- .../renderer/backend/vulkan/surface_context_vk.cc | 1 + .../renderer/backend/vulkan/swapchain_impl_vk.cc | 9 +-------- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/impeller/renderer/backend/vulkan/command_pool_vk.cc b/impeller/renderer/backend/vulkan/command_pool_vk.cc index 6b72f1a92361e..2339ad3f74c97 100644 --- a/impeller/renderer/backend/vulkan/command_pool_vk.cc +++ b/impeller/renderer/backend/vulkan/command_pool_vk.cc @@ -56,6 +56,8 @@ class BackgroundCommandPoolVK final { std::weak_ptr recycler_; }; +static bool kResetOnBackgroundThread = false; + CommandPoolVK::~CommandPoolVK() { auto const context = context_.lock(); if (!context) { @@ -66,10 +68,13 @@ CommandPoolVK::~CommandPoolVK() { return; } - UniqueResourceVKT pool( - context->GetResourceManager(), - BackgroundCommandPoolVK(std::move(pool_), std::move(collected_buffers_), - recycler)); + auto reset_pool_when_dropped = BackgroundCommandPoolVK( + std::move(pool_), std::move(collected_buffers_), recycler); + + if (kResetOnBackgroundThread) { + UniqueResourceVKT pool( + context->GetResourceManager(), std::move(reset_pool_when_dropped)); + } } // TODO(matanlurey): Return a status_or<> instead of {} when we have one. diff --git a/impeller/renderer/backend/vulkan/surface_context_vk.cc b/impeller/renderer/backend/vulkan/surface_context_vk.cc index 88150f5ba77b1..2e20d2af5cbe6 100644 --- a/impeller/renderer/backend/vulkan/surface_context_vk.cc +++ b/impeller/renderer/backend/vulkan/surface_context_vk.cc @@ -80,6 +80,7 @@ std::unique_ptr SurfaceContextVK::AcquireNextSurface() { if (auto allocator = parent_->GetResourceAllocator()) { allocator->DidAcquireSurfaceFrame(); } + parent_->GetCommandPoolRecycler()->Dispose(); return surface; } diff --git a/impeller/renderer/backend/vulkan/swapchain_impl_vk.cc b/impeller/renderer/backend/vulkan/swapchain_impl_vk.cc index 7a9ca108de6a6..0af88001b8e95 100644 --- a/impeller/renderer/backend/vulkan/swapchain_impl_vk.cc +++ b/impeller/renderer/backend/vulkan/swapchain_impl_vk.cc @@ -424,13 +424,6 @@ bool SwapchainImplVK::Present(const std::shared_ptr& image, //---------------------------------------------------------------------------- /// Transition the image to color-attachment-optimal. /// - - // Increment the frame count right before allocating the cmd buffer below to - // force this to use the next frame's pool. This cmd buffer is completely - // untracked, and so we may end up resetting the cmd pool before all buffers - // have been collected. - context.GetCommandPoolRecycler()->Dispose(); - sync->final_cmd_buffer = context.CreateCommandBuffer(); if (!sync->final_cmd_buffer) { return false; @@ -477,7 +470,7 @@ bool SwapchainImplVK::Present(const std::shared_ptr& image, } } - auto task = [&, index, image, current_frame = current_frame_] { + auto task = [&, index, current_frame = current_frame_] { auto context_strong = context_.lock(); if (!context_strong) { return; From d340ef27aae5e18b78e87cede0b1d6e853e17970 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 21 Sep 2023 19:26:06 -0400 Subject: [PATCH 221/859] Roll Skia from 611f08987be3 to 5b2dae1a9b54 (2 revisions) (#46168) https://skia.googlesource.com/skia.git/+log/611f08987be3..5b2dae1a9b54 2023-09-21 jvanverth@google.com [graphite] Hook up software path renderer. 2023-09-21 jreck@google.com Add missing const If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 4ddd05f1eb710..f94505f73c0bb 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '611f08987be37fd530142af262eaa5baadc9f980', + 'skia_revision': '5b2dae1a9b549aaa1d9d43103ff4e7db87a4b6d2', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index c22f42c799222..312dbfd67b593 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 48468e3ab8dae681a975c559a05bf74a +Signature: 51ffdc387c4831d355b03a2181b07eb8 ==================================================================================================== LIBRARY: etc1 From 14ac66c19f36d01c79b8767fb702696a5e07ee53 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Thu, 21 Sep 2023 17:31:00 -0700 Subject: [PATCH 222/859] [Impeller] fail if software backend is chosen and Impeller is enabled on iOS (#46124) Fixes https://github.com/flutter/flutter/issues/127408 This is also related to https://github.com/flutter/engine/pull/44346, which made it fatal to explicitly request both impeller and the software backend. Before landing this, we need to update some google internal tests that end up in this state to explicitly request Skia (or to get into a mode where they can actually use metal). --- .../Source/FlutterEnginePlatformViewTest.mm | 13 +- .../Source/FlutterPlatformViewsTest.mm | 126 +++++++++++++----- .../Source/accessibility_bridge_test.mm | 126 +++++++++++++----- shell/platform/darwin/ios/ios_context.mm | 14 +- 4 files changed, 208 insertions(+), 71 deletions(-) diff --git a/shell/platform/darwin/ios/framework/Source/FlutterEnginePlatformViewTest.mm b/shell/platform/darwin/ios/framework/Source/FlutterEnginePlatformViewTest.mm index 0b5526a5341a2..516cb8c8c826a 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterEnginePlatformViewTest.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterEnginePlatformViewTest.mm @@ -72,7 +72,9 @@ - (void)setUp { /*io=*/thread_task_runner); platform_view = std::make_unique( /*delegate=*/fake_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/fake_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -90,8 +92,13 @@ - (void)tearDown { } - (void)testMsaaSampleCount { - // Default should be 1. - XCTAssertEqual(platform_view->GetIosContext()->GetMsaaSampleCount(), MsaaSampleCount::kNone); + if (fake_delegate.settings_.enable_impeller) { + // Default should be 4 for Impeller. + XCTAssertEqual(platform_view->GetIosContext()->GetMsaaSampleCount(), MsaaSampleCount::kFour); + } else { + // Default should be 1 for Skia. + XCTAssertEqual(platform_view->GetIosContext()->GetMsaaSampleCount(), MsaaSampleCount::kNone); + } // Verify the platform view creates a new context with updated msaa_samples. // Need to use Metal, since this is ignored for Software/GL. diff --git a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViewsTest.mm b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViewsTest.mm index 1e6dad56089aa..2d630c870be11 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViewsTest.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViewsTest.mm @@ -89,6 +89,7 @@ @implementation FlutterPlatformViewsTestMockFlutterPlatformFactory namespace flutter { namespace { class FlutterPlatformViewsTestMockPlatformViewDelegate : public PlatformView::Delegate { + public: void OnPlatformViewCreated(std::unique_ptr surface) override {} void OnPlatformViewDestroyed() override {} void OnPlatformViewScheduleFrame() override {} @@ -117,7 +118,6 @@ void LoadDartDeferredLibraryError(intptr_t loading_unit_id, void UpdateAssetResolverByType(std::unique_ptr updated_asset_resolver, flutter::AssetResolver::AssetResolverType type) override {} - private: flutter::Settings settings_; }; @@ -148,7 +148,9 @@ - (void)testFlutterViewOnlyCreateOnceInOneFrame { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -204,7 +206,9 @@ - (void)testCanCreatePlatformViewWithoutFlutterView { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -258,7 +262,9 @@ - (void)testApplyBackdropFilter { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -330,7 +336,9 @@ - (void)testApplyBackdropFilterWithCorrectFrame { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -402,7 +410,9 @@ - (void)testApplyMultipleBackdropFilters { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -475,7 +485,9 @@ - (void)testAddBackdropFilters { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -588,7 +600,9 @@ - (void)testRemoveBackdropFilters { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -725,7 +739,9 @@ - (void)testEditBackdropFilters { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1002,7 +1018,9 @@ - (void)testApplyBackdropFilterNotDlBlurImageFilter { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1302,7 +1320,9 @@ - (void)testCompositePlatformView { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1358,7 +1378,9 @@ - (void)testBackdropFilterCorrectlyPushedAndReset { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1452,7 +1474,9 @@ - (void)testChildClippingViewShouldBeTheBoundingRectOfPlatformView { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1523,7 +1547,9 @@ - (void)testClipsDoNotInterceptWithPlatformViewShouldNotAddMaskView { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1590,7 +1616,9 @@ - (void)testClipRRectOnlyHasCornersInterceptWithPlatformViewShouldAddMaskView { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1656,7 +1684,9 @@ - (void)testClipRect { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1729,7 +1759,9 @@ - (void)testClipRRect { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1802,7 +1834,9 @@ - (void)testClipPath { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1876,7 +1910,9 @@ - (void)testSetFlutterViewControllerAfterCreateCanStillDispatchTouchEvents { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1940,7 +1976,9 @@ - (void)testSetFlutterViewControllerInTheMiddleOfTouchEventShouldStillAllowGestu auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -2061,7 +2099,9 @@ - (void)testSetFlutterViewControllerInTheMiddleOfTouchEventShouldStillAllowGestu auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -2172,7 +2212,9 @@ - (void)testFlutterPlatformViewTouchesCancelledEventAreForcedToBeCancelled { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -2234,7 +2276,9 @@ - (void)testFlutterPlatformViewControllerSubmitFrameWithoutFlutterViewNotCrashin auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -2296,7 +2340,9 @@ - (void)testFlutterPlatformViewControllerSubmitFrameWithoutFlutterViewNotCrashin auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -2346,7 +2392,9 @@ - (void)testFlutterPlatformViewControllerBeginFrameShouldResetCompisitionOrder { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -2402,7 +2450,9 @@ - (void)testFlutterPlatformViewControllerBeginFrameShouldResetCompisitionOrder { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -2500,7 +2550,9 @@ - (void)testFlutterPlatformViewControllerBeginFrameShouldResetCompisitionOrder { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -2598,7 +2650,9 @@ - (void)testThreadMergeAtEndFrame { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -2752,7 +2806,9 @@ - (void)testClipMaskViewIsReused { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -2834,7 +2890,9 @@ - (void)testDifferentClipMaskViewIsUsedForEachView { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -2934,7 +2992,9 @@ - (void)testDisposingViewInCompositionOrderDoNotCrash { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -3042,7 +3102,9 @@ - (void)testOnlyPlatformViewsAreRemovedWhenReset { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, diff --git a/shell/platform/darwin/ios/framework/Source/accessibility_bridge_test.mm b/shell/platform/darwin/ios/framework/Source/accessibility_bridge_test.mm index ac44da5370b9d..e9e598be039ba 100644 --- a/shell/platform/darwin/ios/framework/Source/accessibility_bridge_test.mm +++ b/shell/platform/darwin/ios/framework/Source/accessibility_bridge_test.mm @@ -73,6 +73,7 @@ @implementation MockFlutterPlatformFactory namespace flutter { namespace { class MockDelegate : public PlatformView::Delegate { + public: void OnPlatformViewCreated(std::unique_ptr surface) override {} void OnPlatformViewDestroyed() override {} void OnPlatformViewScheduleFrame() override {} @@ -101,7 +102,6 @@ void LoadDartDeferredLibraryError(intptr_t loading_unit_id, void UpdateAssetResolverByType(std::unique_ptr updated_asset_resolver, flutter::AssetResolver::AssetResolverType type) override {} - private: flutter::Settings settings_; }; @@ -147,7 +147,9 @@ - (void)testCreate { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -169,7 +171,9 @@ - (void)testUpdateSemanticsEmpty { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -198,7 +202,9 @@ - (void)testUpdateSemanticsOneNode { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -245,7 +251,9 @@ - (void)testIsVoiceOverRunning { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -277,7 +285,9 @@ - (void)testSemanticsDeallocated { std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -336,7 +346,9 @@ - (void)testSemanticsDeallocatedWithoutLoadingView { std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -381,7 +393,9 @@ - (void)testReplacedSemanticsDoesNotCleanupChildren { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -475,7 +489,9 @@ - (void)testScrollableSemanticsDeallocated { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -547,7 +563,9 @@ - (void)testBridgeReplacesSemanticsNode { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -619,7 +637,9 @@ - (void)testAnnouncesRouteChanges { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -687,7 +707,9 @@ - (void)testRadioButtonIsNotSwitchButton { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -734,7 +756,9 @@ - (void)testLayoutChangeWithNonAccessibilityElement { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -818,7 +842,9 @@ - (void)testLayoutChangeDoesCallNativeAccessibility { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -893,7 +919,9 @@ - (void)testLayoutChangeDoesCallNativeAccessibilityWhenFocusChanged { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -967,7 +995,9 @@ - (void)testScrollableSemanticsContainerReturnsCorrectChildren { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1024,7 +1054,9 @@ - (void)testAnnouncesRouteChangesAndLayoutChangeInOneUpdate { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1121,7 +1153,9 @@ - (void)testAnnouncesRouteChangesWhenAddAdditionalRoute { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1207,7 +1241,9 @@ - (void)testAnnouncesRouteChangesRemoveRouteInMiddle { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1299,7 +1335,9 @@ - (void)testHandleEvent { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1343,7 +1381,9 @@ - (void)testAnnouncesRouteChangesWhenNoNamesRoute { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1413,7 +1453,9 @@ - (void)testAnnouncesLayoutChangeWithNilIfLastFocusIsRemoved { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1482,7 +1524,9 @@ - (void)testAnnouncesLayoutChangeWithTheSameItemFocused { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1557,7 +1601,9 @@ - (void)testAnnouncesLayoutChangeWhenFocusMovedOutside { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1634,7 +1680,9 @@ - (void)testAnnouncesScrollChangeWithLastFocused { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1707,7 +1755,9 @@ - (void)testAnnouncesScrollChangeDoesCallNativeAccessibility { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1782,7 +1832,9 @@ - (void)testAnnouncesIgnoresRouteChangesWhenModal { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1839,7 +1891,9 @@ - (void)testAnnouncesIgnoresLayoutChangeWhenModal { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1901,7 +1955,9 @@ - (void)testAnnouncesIgnoresScrollChangeWhenModal { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1971,7 +2027,9 @@ - (void)testAccessibilityMessageAfterDeletion { auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -2006,7 +2064,9 @@ - (void)testFlutterSemanticsScrollViewManagedObjectLifecycleCorrectly { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/mock_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -2056,7 +2116,9 @@ - (void)testPlatformViewDestructorDoesNotCallSemanticsAPIs { thread_task_runner->PostTask([&] { auto platform_view = std::make_unique( /*delegate=*/test_delegate, - /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/test_delegate.settings_.enable_impeller + ? flutter::IOSRenderingAPI::kMetal + : flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, diff --git a/shell/platform/darwin/ios/ios_context.mm b/shell/platform/darwin/ios/ios_context.mm index 007de7a7105fd..2f58ebb7479a0 100644 --- a/shell/platform/darwin/ios/ios_context.mm +++ b/shell/platform/darwin/ios/ios_context.mm @@ -2,14 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#import "flutter/shell/platform/darwin/ios/ios_context.h" +#include "flutter/shell/platform/darwin/ios/ios_context.h" +#include "flutter/shell/platform/darwin/ios/rendering_api_selection.h" #include "flutter/fml/logging.h" -#import "flutter/shell/platform/darwin/ios/ios_context_software.h" +#include "flutter/shell/platform/darwin/ios/ios_context_software.h" #if SHELL_ENABLE_METAL -#import "flutter/shell/platform/darwin/ios/ios_context_metal_impeller.h" -#import "flutter/shell/platform/darwin/ios/ios_context_metal_skia.h" +#include "flutter/shell/platform/darwin/ios/ios_context_metal_impeller.h" +#include "flutter/shell/platform/darwin/ios/ios_context_metal_skia.h" #endif // SHELL_ENABLE_METAL namespace flutter { @@ -25,6 +26,11 @@ std::shared_ptr is_gpu_disabled_sync_switch) { switch (api) { case IOSRenderingAPI::kSoftware: + FML_CHECK(backend != IOSRenderingBackend::kImpeller) + << "Software rendering is incompatible with Impeller.\n" + "Software rendering may have been automatically selected when running on a simulator " + "in an environment that does not support Metal. Enabling GPU pass through in your " + "environment may fix this. If that is not possible, then disable Impeller."; return std::make_unique(); #if SHELL_ENABLE_METAL case IOSRenderingAPI::kMetal: From 55ba331bf30b9e4ec0ea62250c939c67afa17a53 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 21 Sep 2023 21:18:01 -0400 Subject: [PATCH 223/859] Roll Skia from 5b2dae1a9b54 to 86454ab4f3de (1 revision) (#46175) https://skia.googlesource.com/skia.git/+log/5b2dae1a9b54..86454ab4f3de 2023-09-22 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from af63cb4763f0 to 8ddc74eefa73 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index f94505f73c0bb..72a34fdbbc8f7 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '5b2dae1a9b549aaa1d9d43103ff4e7db87a4b6d2', + 'skia_revision': '86454ab4f3dedb9f1487b3847bd498e5c29280b3', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From b728e588a92bde7207b5f2b6fb76807d474b78f7 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 21 Sep 2023 21:36:24 -0400 Subject: [PATCH 224/859] Roll Dart SDK from eaeca487c944 to 5d33f4c85b82 (1 revision) (#46176) https://dart.googlesource.com/sdk.git/+log/eaeca487c944..5d33f4c85b82 2023-09-22 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-188.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jonahwilliams@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 5 +---- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/DEPS b/DEPS index 72a34fdbbc8f7..adab290acc1aa 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': 'eaeca487c944c92612e5674b8eb2d49030327d05', + 'dart_revision': '5d33f4c85b8249bfccceda9dea4a88b0df8991a3', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py @@ -471,9 +471,6 @@ deps = { 'src/third_party/dart/third_party/pkg/string_scanner': Var('dart_git') + '/string_scanner.git@da9142cf9809e7e1364144b8193ec60d87f0a4b8', - 'src/third_party/dart/third_party/pkg/tar': - Var('dart_git') + '/external/github.com/simolus3/tar.git@3c68cba8e51c569428222b9185469249206172c6', - 'src/third_party/dart/third_party/pkg/term_glyph': Var('dart_git') + '/term_glyph.git@1b28285a7e818b8e87c4d2119d968c5b36d73c7a', diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index fb2193ef5423c..d27490f19a829 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: 74953727d0af6d818f0131146cadbf11 +Signature: 54b66ecd4f21fce963c46b6bc79a02bb ==================================================================================================== LIBRARY: dart From f741569649cc10a5dc2ecc70566c1e8eed44b04f Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 22 Sep 2023 01:17:05 -0400 Subject: [PATCH 225/859] Roll Fuchsia Mac SDK from PXDDhlPyd9sgrWWun... to ZyajVWocCHVIuJkzM... (#46179) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jonahwilliams@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index adab290acc1aa..2787c9b10f017 100644 --- a/DEPS +++ b/DEPS @@ -915,7 +915,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'PXDDhlPyd9sgrWWunaLin7Q_HAx2RMYRbJ6NXLlIrJUC' + 'version': 'ZyajVWocCHVIuJkzM88O4Ss5WHqZcTNDl7K2YwixdMwC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 190bb31f96e98628411a9cd3a707140f85f4b132 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 22 Sep 2023 01:20:11 -0400 Subject: [PATCH 226/859] Roll Dart SDK from 5d33f4c85b82 to 6bde93a6e56f (1 revision) (#46180) https://dart.googlesource.com/sdk.git/+log/5d33f4c85b82..6bde93a6e56f 2023-09-22 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-189.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jonahwilliams@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 2787c9b10f017..87159cc1b5169 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '5d33f4c85b8249bfccceda9dea4a88b0df8991a3', + 'dart_revision': '6bde93a6e56fb58e7f9b52a7eadf69eee6a1e684', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py @@ -76,7 +76,7 @@ vars = { 'dart_root_certificates_rev': '692f6d6488af68e0121317a9c2c9eb393eb0ee50', 'dart_tools_rev': '70d778d58d0fb5a5f9d52d288709f790f6e70be6', 'dart_watcher_rev': '1aed03e2a8005f45083fdb38cbd4b684cd23082f', - 'dart_webdev_rev': 'd7e0d1ff57d954ce4bb9e2201c87de092695701b', + 'dart_webdev_rev': '3078f48fb56a1036bc0f2a08ac51567291d8a837', 'dart_webkit_inspection_protocol_rev': '82f0c1c46dfdba5edf7c5fa84456233121dd69e1', 'dart_yaml_edit_rev': '4a9734dda12f63ef9eee4121f87ff4401e25a607', 'dart_zlib_rev': '14dd4c4455602c9b71a1a89b5cafd1f4030d2e3f', From 51c78cc7bae5aba66babe2d2164f70082d602992 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 22 Sep 2023 01:22:00 -0400 Subject: [PATCH 227/859] Roll Skia from 86454ab4f3de to 97ec4dbabd05 (1 revision) (#46181) https://skia.googlesource.com/skia.git/+log/86454ab4f3de..97ec4dbabd05 2023-09-22 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Dawn from 39aef37759a4 to 28d5970cfe84 (6 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 87159cc1b5169..ac9ee7239fbf0 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '86454ab4f3dedb9f1487b3847bd498e5c29280b3', + 'skia_revision': '97ec4dbabd0565fa457b17192c0d56820256a5ae', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 16fbada03087f9c1579812514682533033398b88 Mon Sep 17 00:00:00 2001 From: Bruno Leroux Date: Fri, 22 Sep 2023 08:00:58 +0200 Subject: [PATCH 228/859] [iOS] Disable spelling corrections when auto correction is disabled (#46144) ## Description This iOS PR disables spellchecking when auto correction is disabled. ## Related Issue Fixes https://github.com/flutter/flutter/issues/134881. ## Tests Adds 1 test. --- .../framework/Source/FlutterTextInputPlugin.mm | 8 +++++--- .../Source/FlutterTextInputPluginTest.mm | 17 +++++++++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm index c47a5566e5839..f02ab85da7ece 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm @@ -878,9 +878,11 @@ - (void)configureWithDictionary:(NSDictionary*)configuration { self.keyboardAppearance = UIKeyboardAppearanceDefault; } NSString* autocorrect = configuration[kAutocorrectionType]; - self.autocorrectionType = autocorrect && ![autocorrect boolValue] - ? UITextAutocorrectionTypeNo - : UITextAutocorrectionTypeDefault; + bool autocorrectIsDisabled = autocorrect && ![autocorrect boolValue]; + self.autocorrectionType = + autocorrectIsDisabled ? UITextAutocorrectionTypeNo : UITextAutocorrectionTypeDefault; + self.spellCheckingType = + autocorrectIsDisabled ? UITextSpellCheckingTypeNo : UITextSpellCheckingTypeDefault; self.autofillId = AutofillIdFromDictionary(configuration); if (autofill == nil) { self.textContentType = @""; diff --git a/shell/platform/darwin/ios/framework/Source/FlutterTextInputPluginTest.mm b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPluginTest.mm index 701621273cd3f..f18357acf0ffc 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterTextInputPluginTest.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPluginTest.mm @@ -769,6 +769,23 @@ - (void)testInputActionContinueAction { OCMVerify([mockBinaryMessenger sendOnChannel:@"flutter/textinput" message:encodedMethodCall]); } +- (void)testDisablingAutocorrectDisablesSpellChecking { + FlutterTextInputView* inputView = [[FlutterTextInputView alloc] initWithOwner:textInputPlugin]; + + // Disable the interactive selection. + NSDictionary* config = self.mutableTemplateCopy; + [inputView configureWithDictionary:config]; + + XCTAssertEqual(inputView.autocorrectionType, UITextAutocorrectionTypeDefault); + XCTAssertEqual(inputView.spellCheckingType, UITextSpellCheckingTypeDefault); + + [config setValue:@(NO) forKey:@"autocorrect"]; + [inputView configureWithDictionary:config]; + + XCTAssertEqual(inputView.autocorrectionType, UITextAutocorrectionTypeNo); + XCTAssertEqual(inputView.spellCheckingType, UITextSpellCheckingTypeNo); +} + #pragma mark - TextEditingDelta tests - (void)testTextEditingDeltasAreGeneratedOnTextInput { FlutterTextInputView* inputView = [[FlutterTextInputView alloc] initWithOwner:textInputPlugin]; From f669b1d2faa01cd4a1363f43f6e3c416a970703c Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 22 Sep 2023 02:11:23 -0400 Subject: [PATCH 229/859] Roll Skia from 97ec4dbabd05 to 3ae3bb0d40df (1 revision) (#46182) https://skia.googlesource.com/skia.git/+log/97ec4dbabd05..3ae3bb0d40df 2023-09-22 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from af63cb4763f0 to 8ddc74eefa73 (3 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index ac9ee7239fbf0..3abf9cbbff72d 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '97ec4dbabd0565fa457b17192c0d56820256a5ae', + 'skia_revision': '3ae3bb0d40df6ede711c3f3331ca67376db7de34', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 312dbfd67b593..7a226f81f8ff8 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 51ffdc387c4831d355b03a2181b07eb8 +Signature: 354bf4bdc4657f150cc16801dca90161 ==================================================================================================== LIBRARY: etc1 From cb5cbf687a2f0d962e8ad9ecb45e0dca232eb9de Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 22 Sep 2023 02:59:27 -0400 Subject: [PATCH 230/859] Roll Skia from 3ae3bb0d40df to a3480a62e438 (1 revision) (#46183) https://skia.googlesource.com/skia.git/+log/3ae3bb0d40df..a3480a62e438 2023-09-22 jvanverth@google.com [Graphite] Fix typo in PathAtlasFlags If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 3abf9cbbff72d..66b67cb19f3bd 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '3ae3bb0d40df6ede711c3f3331ca67376db7de34', + 'skia_revision': 'a3480a62e4383245eac7e71722ccac41ffa925db', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 7a226f81f8ff8..3b54549f514db 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 354bf4bdc4657f150cc16801dca90161 +Signature: fc8190ddac6961fbf947baa347b50f99 ==================================================================================================== LIBRARY: etc1 From a069c180244b43ab0a797c8941d7fd83c6cc08ef Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 22 Sep 2023 03:41:48 -0400 Subject: [PATCH 231/859] Roll Skia from a3480a62e438 to 8d9e2cd32ec7 (1 revision) (#46184) https://skia.googlesource.com/skia.git/+log/a3480a62e438..8d9e2cd32ec7 2023-09-22 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 8fcd4a50ab47 to 26148a023702 (4 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 66b67cb19f3bd..bfafb669c9414 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'a3480a62e4383245eac7e71722ccac41ffa925db', + 'skia_revision': '8d9e2cd32ec723b42c62bbcc2d88545424b3e223', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 17b21d492517ba99ebee78606de440b9cf6f7fa9 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 22 Sep 2023 04:29:46 -0400 Subject: [PATCH 232/859] Roll Skia from 8d9e2cd32ec7 to 8752f3ac6e99 (1 revision) (#46186) https://skia.googlesource.com/skia.git/+log/8d9e2cd32ec7..8752f3ac6e99 2023-09-22 armansito@google.com [graphite] Ensure CoverageMaskShapes are created with a valid proxy If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index bfafb669c9414..9b1279299bd43 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '8d9e2cd32ec723b42c62bbcc2d88545424b3e223', + 'skia_revision': '8752f3ac6e99e0a12ca8db782f1a14ec419cf3c5', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 3b54549f514db..4ad0fff4dd84e 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: fc8190ddac6961fbf947baa347b50f99 +Signature: 62e88c7618b3f402b94df6deb311b570 ==================================================================================================== LIBRARY: etc1 From 864c720dc3ffc60d6e569bdff403f6d65f411e4b Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 22 Sep 2023 06:14:37 -0400 Subject: [PATCH 233/859] Roll Skia from 8752f3ac6e99 to d0f04adbec5c (1 revision) (#46191) https://skia.googlesource.com/skia.git/+log/8752f3ac6e99..d0f04adbec5c 2023-09-22 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from b7c710e0c890 to dfa558fbb39e (4 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 9b1279299bd43..5e27f2f295ecf 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '8752f3ac6e99e0a12ca8db782f1a14ec419cf3c5', + 'skia_revision': 'd0f04adbec5c92a8fa02da77af2fc02819010b8c', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 7fde04a974b2c99cd2297761d044b7eeb34314a9 Mon Sep 17 00:00:00 2001 From: William Hesse Date: Fri, 22 Sep 2023 12:16:01 +0200 Subject: [PATCH 234/859] Re-add package tar to DEPS (#46190) A partial roll of the Dart SDK removed a manually added third-party dependency on package tar, since the roll was to an earlier SDK version that didn't have the new package. Relanding the package addition from https://github.com/flutter/engine/pull/46140 that was partially reverted by autoroll https://github.com/flutter/engine/pull/46176 This should not happen again, because the next Dart SDK dev version should include the new package. Manual addition of new packages from Dart SDK DEPS to Flutter engine DEPS is needed because the autoroller cannot add new packages. An early signal that this needs done is failures on the monorepo builders that build the main branches of Dart SDK, Flutter engine, and Flutter framework together. This PR will fix those failures, and allow the next autoroll to succeed. --- DEPS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/DEPS b/DEPS index 5e27f2f295ecf..1bce17b176f13 100644 --- a/DEPS +++ b/DEPS @@ -471,6 +471,9 @@ deps = { 'src/third_party/dart/third_party/pkg/string_scanner': Var('dart_git') + '/string_scanner.git@da9142cf9809e7e1364144b8193ec60d87f0a4b8', + 'src/third_party/dart/third_party/pkg/tar': + Var('dart_git') + '/external/github.com/simolus3/tar.git@3c68cba8e51c569428222b9185469249206172c6', + 'src/third_party/dart/third_party/pkg/term_glyph': Var('dart_git') + '/term_glyph.git@1b28285a7e818b8e87c4d2119d968c5b36d73c7a', From 133f174116f237543f75e5c64821d86600656eec Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 22 Sep 2023 08:19:26 -0400 Subject: [PATCH 235/859] Roll Dart SDK from 6bde93a6e56f to 4ddff752a6b0 (1 revision) (#46193) https://dart.googlesource.com/sdk.git/+log/6bde93a6e56f..4ddff752a6b0 2023-09-22 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-190.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jonahwilliams@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/DEPS b/DEPS index 1bce17b176f13..10c66266984da 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '6bde93a6e56fb58e7f9b52a7eadf69eee6a1e684', + 'dart_revision': '4ddff752a6b0d986ca3f14363f3acce8f319fcae', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py @@ -471,9 +471,6 @@ deps = { 'src/third_party/dart/third_party/pkg/string_scanner': Var('dart_git') + '/string_scanner.git@da9142cf9809e7e1364144b8193ec60d87f0a4b8', - 'src/third_party/dart/third_party/pkg/tar': - Var('dart_git') + '/external/github.com/simolus3/tar.git@3c68cba8e51c569428222b9185469249206172c6', - 'src/third_party/dart/third_party/pkg/term_glyph': Var('dart_git') + '/term_glyph.git@1b28285a7e818b8e87c4d2119d968c5b36d73c7a', From 26b0fedebebc3371454df4cc2e22c342abe5b361 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 22 Sep 2023 08:27:17 -0400 Subject: [PATCH 236/859] Roll Skia from d0f04adbec5c to a911bc1352f2 (1 revision) (#46194) https://skia.googlesource.com/skia.git/+log/d0f04adbec5c..a911bc1352f2 2023-09-22 armansito@google.com [graphite] Fixes to some Caps methods that deal with TextureInfo If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 10c66266984da..fb239efb5b84b 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'd0f04adbec5c92a8fa02da77af2fc02819010b8c', + 'skia_revision': 'a911bc1352f2bce64ec60a10d80765d2dfd278df', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 4ad0fff4dd84e..9db277e87776d 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 62e88c7618b3f402b94df6deb311b570 +Signature: 86a11ee1748eca717492b75b28fd2b39 ==================================================================================================== LIBRARY: etc1 From 82e29587e3a263b90fb629735de7dd49460e0799 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 22 Sep 2023 10:05:06 -0400 Subject: [PATCH 237/859] Roll Skia from a911bc1352f2 to f346a813ffd4 (1 revision) (#46195) https://skia.googlesource.com/skia.git/+log/a911bc1352f2..f346a813ffd4 2023-09-22 brianosman@google.com Add SkColorFilter::makeWithWorkingColorSpace If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index fb239efb5b84b..d1a0a7fa33d36 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'a911bc1352f2bce64ec60a10d80765d2dfd278df', + 'skia_revision': 'f346a813ffd4b675ddf0d5bdc3eef72b31348ca0', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 9db277e87776d..7bd019bf71d14 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 86a11ee1748eca717492b75b28fd2b39 +Signature: ccb68a6de7ae6e927496980023d2bcb7 ==================================================================================================== LIBRARY: etc1 From e3061b99ec3b0889d560e4ed56ebe62746fe4b56 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 22 Sep 2023 12:00:38 -0400 Subject: [PATCH 238/859] Roll Skia from f346a813ffd4 to 8beae2053939 (5 revisions) (#46200) https://skia.googlesource.com/skia.git/+log/f346a813ffd4..8beae2053939 2023-09-22 kjlubick@google.com Add some iOS compile jobs to the CQ 2023-09-22 kjlubick@google.com Fix another use of flushAndSubmit 2023-09-22 johnstiles@google.com Add support for mesh programs to skslc. 2023-09-22 kjlubick@google.com Fix GM tests built for WASM 2023-09-22 kjlubick@google.com Remove legacy GrDirectContext flush methods If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index d1a0a7fa33d36..b41829d6c848e 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'f346a813ffd4b675ddf0d5bdc3eef72b31348ca0', + 'skia_revision': '8beae2053939b1b4e2dd84a612303455b57ea4d3', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 7bd019bf71d14..9488348ae2fe5 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: ccb68a6de7ae6e927496980023d2bcb7 +Signature: 00fc6e22d3bda3f4df31c5789c6cba2e ==================================================================================================== LIBRARY: etc1 From f4c384cae2a5ebbf14e089b0f7bc4f116879841d Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Fri, 22 Sep 2023 09:30:15 -0700 Subject: [PATCH 239/859] Enable checking headers with Clang Tidy. (#46009) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes https://github.com/flutter/flutter/issues/134969. Turns out this was literally 1 line. Tested locally: ```shell dart tools/clang_tidy/bin/main.dart \ --target-variant host_debug_unopt_arm64 \ --lint-all \ --checks="-*,llvm-header-guard" ```
Local Test Results Here is a tiny snippet showing this is indeed doing something: ```txt [0:02] Jobs: 0% done, 0/1033 completed, 7 in progress, 1019 pending, 7 failed. ❌ Failures for clang-tidy on /Users/matanl/Developer/engine/src/flutter/display_list/dl_blend_mode.cc: ../../flutter/display_list/dl_blend_mode.h:5:9: error: header guard does not follow preferred style [llvm-header-guard,-warnings-as-errors] 5 | #ifndef FLUTTER_DISPLAY_LIST_DL_BLEND_MODE_H_ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | USERS_MATANL_DEVELOPER_ENGINE_SRC_OUT_HOST_DEBUG_UNOPT_ARM64_______FLUTTER_DISPLAY_LIST_DL_BLEND_MODE_H 6 | #define FLUTTER_DISPLAY_LIST_DL_BLEND_MODE_H_ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | USERS_MATANL_DEVELOPER_ENGINE_SRC_OUT_HOST_DEBUG_UNOPT_ARM64_______FLUTTER_DISPLAY_LIST_DL_BLEND_MODE_H ^C ```
This will likely show failures on CI, so I'm following [our published directions](https://github.com/flutter/flutter/wiki/Engine-Clang-Tidy-Linter#clang-tidy-fix-on-ci) to get CI to tell me what needs to get fixed, and won't submit until there are no warnings at HEAD. As such, not seeking LGTM yet (draft). --------- Co-authored-by: Zachary Anderson --- .clang-tidy | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.clang-tidy b/.clang-tidy index b65d8f4336e1c..0e68ce7e4b3c1 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -39,3 +39,11 @@ CheckOptions: value: "lower_case" - key: readability-identifier-naming.PrivateMemberSuffix value: "_" + +# Lint headers within paths that contain "/flutter/" but not: +# - gen (generated code, the fact it compiles is good enough™) +# - third_party (we didn't author most of the code, and can't fix the lints) +# +# Note this is because of our buildroot setup, so the full path of a lint is: +# "../../flutter/impeller/core/runtime_types.h:1:1" as reported. +HeaderFilterRegex: "(!third_party/)(!gen/).*/flutter/.*" From 6a5c3ef4b955997418357ff87f429e2ef6619b75 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 22 Sep 2023 13:02:33 -0400 Subject: [PATCH 240/859] Roll Skia from 8beae2053939 to fe73688dc40f (1 revision) (#46202) https://skia.googlesource.com/skia.git/+log/8beae2053939..fe73688dc40f 2023-09-22 jvanverth@google.com Change some more signed uniqueID generators to unsigned. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index b41829d6c848e..7ea8432ae9daf 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '8beae2053939b1b4e2dd84a612303455b57ea4d3', + 'skia_revision': 'fe73688dc40f9853b3206c431d5e7ac2aa2d38ac', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 9488348ae2fe5..d1ebadd67cb3d 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 00fc6e22d3bda3f4df31c5789c6cba2e +Signature: 36e5c2c940cca4b6c22b53dee8af664e ==================================================================================================== LIBRARY: etc1 From 94cd9927424865d590b68cff99ea33ee41c8b16f Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Fri, 22 Sep 2023 10:46:32 -0700 Subject: [PATCH 241/859] [Impeller] Reland: construct text frames on UI thread. (#46115) Due to https://github.com/flutter/flutter/issues/127500 , we can get in a state where enable-impeller is true but we're using Skia. We need to either fall back completely to Skia, make this configuration fatal, or remote the check ---------------- Conversion of SkTextBlobs to impeller::TextFrame objects is one of the most expensive operations in display list dispatching. While the rest of the engine and framework makes a reasonable attempt to cache the SkTextBlobs generated during paragraph construction, the design of the dl dispatcher means that these the Impeller backend will always reconstruct all text frames on each frame - even if the display list/picture that contained those text frames was unchanged. Removing this overhead is one of the goals of https://github.com/flutter/engine/pull/45386 , however this patch is also fairly risky and will be difficult to land. As a more incremental solution, we can instead construct the impeller::TextFrame objects when performing paragraph painting and record them in the display list. This both moves the text frame construction to the UI thread and allows the framework/engine to cache unchanged text frames. This also does not conflict with the dl_aiks_canvas patch directly, and is fine to land before or after it does. (though I'd argue we should land this first). To compare the current performance levels, I ran the complex_layout_scroll perf test, since this is fairly text filled. On a Pixel 6 pro. Across several runs this is a fairly consistent ~1ms raster time improvement. Fixes https://github.com/flutter/flutter/issues/133204 --- display_list/BUILD.gn | 1 + display_list/benchmarking/dl_complexity_gl.cc | 5 + display_list/benchmarking/dl_complexity_gl.h | 3 + .../benchmarking/dl_complexity_metal.cc | 5 + .../benchmarking/dl_complexity_metal.h | 3 + display_list/display_list.h | 1 + display_list/dl_builder.cc | 42 +++++ display_list/dl_builder.h | 10 ++ display_list/dl_canvas.h | 9 ++ display_list/dl_op_receiver.h | 4 + display_list/dl_op_records.h | 20 +++ display_list/skia/dl_sk_canvas.cc | 8 + display_list/skia/dl_sk_canvas.h | 5 + display_list/skia/dl_sk_dispatcher.cc | 7 + display_list/skia/dl_sk_dispatcher.h | 3 + display_list/utils/dl_receiver_utils.h | 3 + flow/BUILD.gn | 5 +- flow/layers/performance_overlay_layer.cc | 10 ++ impeller/aiks/aiks_unittests.cc | 16 +- impeller/aiks/canvas.cc | 4 +- impeller/aiks/canvas.h | 2 +- impeller/display_list/dl_dispatcher.cc | 21 +-- impeller/display_list/dl_dispatcher.h | 5 + impeller/entity/contents/text_contents.cc | 16 +- impeller/entity/contents/text_contents.h | 4 +- impeller/entity/entity_unittests.cc | 6 +- .../backends/skia/text_frame_skia.cc | 13 +- .../backends/skia/text_frame_skia.h | 3 +- .../backends/stb/text_frame_stb.cc | 10 +- .../typographer/backends/stb/text_frame_stb.h | 7 +- impeller/typographer/typographer_context.h | 1 - impeller/typographer/typographer_unittests.cc | 47 +++--- shell/common/dl_op_spy.cc | 8 + shell/common/dl_op_spy.h | 3 + testing/display_list_testing.cc | 9 ++ testing/display_list_testing.h | 3 + testing/mock_canvas.cc | 8 + testing/mock_canvas.h | 4 + third_party/txt/BUILD.gn | 1 + third_party/txt/src/skia/paragraph_skia.cc | 46 +++++- third_party/txt/tests/paragraph_unittests.cc | 147 ++++++++++++++---- 41 files changed, 407 insertions(+), 121 deletions(-) diff --git a/display_list/BUILD.gn b/display_list/BUILD.gn index 97c9683511b61..736e13dc5c7bb 100644 --- a/display_list/BUILD.gn +++ b/display_list/BUILD.gn @@ -87,6 +87,7 @@ source_set("display_list") { public_deps = [ "//flutter/fml", "//flutter/impeller/runtime_stage", + "//flutter/impeller/typographer", "//third_party/skia", ] diff --git a/display_list/benchmarking/dl_complexity_gl.cc b/display_list/benchmarking/dl_complexity_gl.cc index f8dd1c52a1260..53b70e2c24e47 100644 --- a/display_list/benchmarking/dl_complexity_gl.cc +++ b/display_list/benchmarking/dl_complexity_gl.cc @@ -637,6 +637,11 @@ void DisplayListGLComplexityCalculator::GLHelper::drawTextBlob( draw_text_blob_count_++; } +void DisplayListGLComplexityCalculator::GLHelper::drawTextFrame( + const std::shared_ptr& text_frame, + SkScalar x, + SkScalar y) {} + void DisplayListGLComplexityCalculator::GLHelper::drawShadow( const SkPath& path, const DlColor color, diff --git a/display_list/benchmarking/dl_complexity_gl.h b/display_list/benchmarking/dl_complexity_gl.h index 848b64e004b34..61064e4cdef22 100644 --- a/display_list/benchmarking/dl_complexity_gl.h +++ b/display_list/benchmarking/dl_complexity_gl.h @@ -70,6 +70,9 @@ class DisplayListGLComplexityCalculator void drawTextBlob(const sk_sp blob, SkScalar x, SkScalar y) override; + void drawTextFrame(const std::shared_ptr& text_frame, + SkScalar x, + SkScalar y) override; void drawShadow(const SkPath& path, const DlColor color, const SkScalar elevation, diff --git a/display_list/benchmarking/dl_complexity_metal.cc b/display_list/benchmarking/dl_complexity_metal.cc index 56d4f3b406ad9..c6b6547afee56 100644 --- a/display_list/benchmarking/dl_complexity_metal.cc +++ b/display_list/benchmarking/dl_complexity_metal.cc @@ -581,6 +581,11 @@ void DisplayListMetalComplexityCalculator::MetalHelper::drawTextBlob( draw_text_blob_count_++; } +void DisplayListMetalComplexityCalculator::MetalHelper::drawTextFrame( + const std::shared_ptr& text_frame, + SkScalar x, + SkScalar y) {} + void DisplayListMetalComplexityCalculator::MetalHelper::drawShadow( const SkPath& path, const DlColor color, diff --git a/display_list/benchmarking/dl_complexity_metal.h b/display_list/benchmarking/dl_complexity_metal.h index 9430efba67ebf..90e7b9f69c663 100644 --- a/display_list/benchmarking/dl_complexity_metal.h +++ b/display_list/benchmarking/dl_complexity_metal.h @@ -68,6 +68,9 @@ class DisplayListMetalComplexityCalculator void drawTextBlob(const sk_sp blob, SkScalar x, SkScalar y) override; + void drawTextFrame(const std::shared_ptr& text_frame, + SkScalar x, + SkScalar y) override; void drawShadow(const SkPath& path, const DlColor color, const SkScalar elevation, diff --git a/display_list/display_list.h b/display_list/display_list.h index f7c7aa09a9651..621338e59fd1e 100644 --- a/display_list/display_list.h +++ b/display_list/display_list.h @@ -136,6 +136,7 @@ namespace flutter { \ V(DrawDisplayList) \ V(DrawTextBlob) \ + V(DrawTextFrame) \ \ V(DrawShadow) \ V(DrawShadowTransparentOccluder) diff --git a/display_list/dl_builder.cc b/display_list/dl_builder.cc index ca0f7ff615c73..923d32230f632 100644 --- a/display_list/dl_builder.cc +++ b/display_list/dl_builder.cc @@ -1302,6 +1302,48 @@ void DisplayListBuilder::DrawTextBlob(const sk_sp& blob, SetAttributesFromPaint(paint, DisplayListOpFlags::kDrawTextBlobFlags); drawTextBlob(blob, x, y); } + +void DisplayListBuilder::drawTextFrame( + const std::shared_ptr& text_frame, + SkScalar x, + SkScalar y) { + DisplayListAttributeFlags flags = kDrawTextBlobFlags; + OpResult result = PaintResult(current_, flags); + if (result == OpResult::kNoEffect) { + return; + } + impeller::Rect bounds = text_frame->GetBounds(); + SkRect sk_bounds = SkRect::MakeLTRB(bounds.GetLeft(), bounds.GetTop(), + bounds.GetRight(), bounds.GetBottom()); + bool unclipped = AccumulateOpBounds(sk_bounds.makeOffset(x, y), flags); + // TODO(https://github.com/flutter/flutter/issues/82202): Remove once the + // unit tests can use Fuchsia's font manager instead of the empty default. + // Until then we might encounter empty bounds for otherwise valid text and + // thus we ignore the results from AccumulateOpBounds. +#if defined(OS_FUCHSIA) + unclipped = true; +#endif // OS_FUCHSIA + if (unclipped) { + Push(0, 1, text_frame, x, y); + // There is no way to query if the glyphs of a text blob overlap and + // there are no current guarantees from either Skia or Impeller that + // they will protect overlapping glyphs from the effects of overdraw + // so we must make the conservative assessment that this DL layer is + // not compatible with group opacity inheritance. + UpdateLayerOpacityCompatibility(false); + UpdateLayerResult(result); + } +} + +void DisplayListBuilder::DrawTextFrame( + const std::shared_ptr& text_frame, + SkScalar x, + SkScalar y, + const DlPaint& paint) { + SetAttributesFromPaint(paint, DisplayListOpFlags::kDrawTextBlobFlags); + drawTextFrame(text_frame, x, y); +} + void DisplayListBuilder::DrawShadow(const SkPath& path, const DlColor color, const SkScalar elevation, diff --git a/display_list/dl_builder.h b/display_list/dl_builder.h index ab0bce0db3c38..3a65b8fad5328 100644 --- a/display_list/dl_builder.h +++ b/display_list/dl_builder.h @@ -224,6 +224,16 @@ class DisplayListBuilder final : public virtual DlCanvas, SkScalar x, SkScalar y, const DlPaint& paint) override; + + void drawTextFrame(const std::shared_ptr& text_frame, + SkScalar x, + SkScalar y) override; + + void DrawTextFrame(const std::shared_ptr& text_frame, + SkScalar x, + SkScalar y, + const DlPaint& paint) override; + // |DlCanvas| void DrawShadow(const SkPath& path, const DlColor color, diff --git a/display_list/dl_canvas.h b/display_list/dl_canvas.h index 96f4a3f91a345..5cd06146c78c3 100644 --- a/display_list/dl_canvas.h +++ b/display_list/dl_canvas.h @@ -18,6 +18,8 @@ #include "third_party/skia/include/core/SkRect.h" #include "third_party/skia/include/core/SkTextBlob.h" +#include "impeller/typographer/text_frame.h" + namespace flutter { //------------------------------------------------------------------------------ @@ -201,6 +203,13 @@ class DlCanvas { const DlPaint* paint = nullptr) = 0; virtual void DrawDisplayList(const sk_sp display_list, SkScalar opacity = SK_Scalar1) = 0; + + virtual void DrawTextFrame( + const std::shared_ptr& text_frame, + SkScalar x, + SkScalar y, + const DlPaint& paint) = 0; + virtual void DrawTextBlob(const sk_sp& blob, SkScalar x, SkScalar y, diff --git a/display_list/dl_op_receiver.h b/display_list/dl_op_receiver.h index 23a0aaf6fd97c..d9bbc7b7f4f3f 100644 --- a/display_list/dl_op_receiver.h +++ b/display_list/dl_op_receiver.h @@ -257,6 +257,10 @@ class DlOpReceiver { virtual void drawTextBlob(const sk_sp blob, SkScalar x, SkScalar y) = 0; + virtual void drawTextFrame( + const std::shared_ptr& text_frame, + SkScalar x, + SkScalar y) = 0; virtual void drawShadow(const SkPath& path, const DlColor color, const SkScalar elevation, diff --git a/display_list/dl_op_records.h b/display_list/dl_op_records.h index 47574ae82457f..64c54f583cf70 100644 --- a/display_list/dl_op_records.h +++ b/display_list/dl_op_records.h @@ -12,6 +12,7 @@ #include "flutter/display_list/effects/dl_color_source.h" #include "flutter/fml/macros.h" +#include "impeller/typographer/text_frame.h" #include "third_party/skia/include/core/SkRSXform.h" namespace flutter { @@ -1085,6 +1086,25 @@ struct DrawTextBlobOp final : DrawOpBase { } }; +struct DrawTextFrameOp final : DrawOpBase { + static const auto kType = DisplayListOpType::kDrawTextFrame; + + DrawTextFrameOp(const std::shared_ptr& text_frame, + SkScalar x, + SkScalar y) + : x(x), y(y), text_frame(text_frame) {} + + const SkScalar x; + const SkScalar y; + const std::shared_ptr text_frame; + + void dispatch(DispatchContext& ctx) const { + if (op_needed(ctx)) { + ctx.receiver.drawTextFrame(text_frame, x, y); + } + } +}; + // 4 byte header + 28 byte payload packs evenly into 32 bytes #define DEFINE_DRAW_SHADOW_OP(name, transparent_occluder) \ struct Draw##name##Op final : DrawOpBase { \ diff --git a/display_list/skia/dl_sk_canvas.cc b/display_list/skia/dl_sk_canvas.cc index a6efddef43800..2699a46bd7078 100644 --- a/display_list/skia/dl_sk_canvas.cc +++ b/display_list/skia/dl_sk_canvas.cc @@ -325,6 +325,14 @@ void DlSkCanvasAdapter::DrawTextBlob(const sk_sp& blob, delegate_->drawTextBlob(blob, x, y, ToSk(paint)); } +void DlSkCanvasAdapter::DrawTextFrame( + const std::shared_ptr& text_frame, + SkScalar x, + SkScalar y, + const DlPaint& paint) { + FML_CHECK(false); +} + void DlSkCanvasAdapter::DrawShadow(const SkPath& path, const DlColor color, const SkScalar elevation, diff --git a/display_list/skia/dl_sk_canvas.h b/display_list/skia/dl_sk_canvas.h index 0377b7de75e30..f085d35ae8c9d 100644 --- a/display_list/skia/dl_sk_canvas.h +++ b/display_list/skia/dl_sk_canvas.h @@ -7,6 +7,7 @@ #include "flutter/display_list/dl_canvas.h" #include "flutter/display_list/skia/dl_sk_types.h" +#include "impeller/typographer/text_frame.h" namespace flutter { @@ -144,6 +145,10 @@ class DlSkCanvasAdapter final : public virtual DlCanvas { SkScalar x, SkScalar y, const DlPaint& paint) override; + void DrawTextFrame(const std::shared_ptr& text_frame, + SkScalar x, + SkScalar y, + const DlPaint& paint) override; void DrawShadow(const SkPath& path, const DlColor color, const SkScalar elevation, diff --git a/display_list/skia/dl_sk_dispatcher.cc b/display_list/skia/dl_sk_dispatcher.cc index d9cdaaf3c9f9e..c05d23ec1d376 100644 --- a/display_list/skia/dl_sk_dispatcher.cc +++ b/display_list/skia/dl_sk_dispatcher.cc @@ -270,6 +270,13 @@ void DlSkCanvasDispatcher::drawTextBlob(const sk_sp blob, canvas_->drawTextBlob(blob, x, y, paint()); } +void DlSkCanvasDispatcher::drawTextFrame( + const std::shared_ptr& text_frame, + SkScalar x, + SkScalar y) { + FML_CHECK(false); +} + void DlSkCanvasDispatcher::DrawShadow(SkCanvas* canvas, const SkPath& path, DlColor color, diff --git a/display_list/skia/dl_sk_dispatcher.h b/display_list/skia/dl_sk_dispatcher.h index a7fc73bbe2a54..ee6101291e76a 100644 --- a/display_list/skia/dl_sk_dispatcher.h +++ b/display_list/skia/dl_sk_dispatcher.h @@ -98,6 +98,9 @@ class DlSkCanvasDispatcher : public virtual DlOpReceiver, void drawTextBlob(const sk_sp blob, SkScalar x, SkScalar y) override; + void drawTextFrame(const std::shared_ptr& text_frame, + SkScalar x, + SkScalar y) override; void drawShadow(const SkPath& path, const DlColor color, const SkScalar elevation, diff --git a/display_list/utils/dl_receiver_utils.h b/display_list/utils/dl_receiver_utils.h index e2d07310368ae..2a1f9cb7efff4 100644 --- a/display_list/utils/dl_receiver_utils.h +++ b/display_list/utils/dl_receiver_utils.h @@ -129,6 +129,9 @@ class IgnoreDrawDispatchHelper : public virtual DlOpReceiver { void drawTextBlob(const sk_sp blob, SkScalar x, SkScalar y) override {} + void drawTextFrame(const std::shared_ptr& text_frame, + SkScalar x, + SkScalar y) override {} void drawShadow(const SkPath& path, const DlColor color, const SkScalar elevation, diff --git a/flow/BUILD.gn b/flow/BUILD.gn index 53de13474e316..a75605749c7aa 100644 --- a/flow/BUILD.gn +++ b/flow/BUILD.gn @@ -99,7 +99,10 @@ source_set("flow") { deps = [ "//third_party/skia" ] if (impeller_supports_rendering) { - deps += [ "//flutter/impeller" ] + deps += [ + "//flutter/impeller", + "//flutter/impeller/typographer/backends/skia:typographer_skia_backend", + ] } } diff --git a/flow/layers/performance_overlay_layer.cc b/flow/layers/performance_overlay_layer.cc index 7a1feda79bc7d..1d83281372ee1 100644 --- a/flow/layers/performance_overlay_layer.cc +++ b/flow/layers/performance_overlay_layer.cc @@ -14,6 +14,9 @@ #include "flow/stopwatch_sk.h" #include "third_party/skia/include/core/SkFont.h" #include "third_party/skia/include/core/SkTextBlob.h" +#ifdef IMPELLER_SUPPORTS_RENDERING +#include "impeller/typographer/backends/skia/text_frame_skia.h" // nogncheck +#endif // IMPELLER_SUPPORTS_RENDERING namespace flutter { namespace { @@ -50,7 +53,14 @@ void VisualizeStopWatch(DlCanvas* canvas, stopwatch, label_prefix, font_path); // Historically SK_ColorGRAY (== 0xFF888888) was used here DlPaint paint(DlColor(0xFF888888)); +#ifdef IMPELLER_SUPPORTS_RENDERING + if (impeller_enabled) { + canvas->DrawTextFrame(impeller::MakeTextFrameFromTextBlobSkia(text), + x + label_x, y + height + label_y, paint); + } +#endif // IMPELLER_SUPPORTS_RENDERING canvas->DrawTextBlob(text, x + label_x, y + height + label_y, paint); + return; } } diff --git a/impeller/aiks/aiks_unittests.cc b/impeller/aiks/aiks_unittests.cc index 9696cdea6b207..e9230e583edfa 100644 --- a/impeller/aiks/aiks_unittests.cc +++ b/impeller/aiks/aiks_unittests.cc @@ -5,7 +5,6 @@ #include #include #include -#include #include #include #include @@ -1335,11 +1334,7 @@ bool RenderTextInCanvasSkia(const std::shared_ptr& context, } // Create the Impeller text frame and draw it at the designated baseline. - auto maybe_frame = MakeTextFrameFromTextBlobSkia(blob); - if (!maybe_frame.has_value()) { - return false; - } - auto frame = maybe_frame.value(); + auto frame = MakeTextFrameFromTextBlobSkia(blob); Paint text_paint; text_paint.color = Color::Yellow().WithAlpha(options.alpha); @@ -1528,7 +1523,7 @@ TEST_P(AiksTest, CanRenderTextOutsideBoundaries) { { auto blob = SkTextBlob::MakeFromString(t.text, sk_font); ASSERT_NE(blob, nullptr); - auto frame = MakeTextFrameFromTextBlobSkia(blob).value(); + auto frame = MakeTextFrameFromTextBlobSkia(blob); canvas.DrawTextFrame(frame, Point(), text_paint); } canvas.Restore(); @@ -3202,12 +3197,7 @@ TEST_P(AiksTest, TextForegroundShaderWithTransform) { auto blob = SkTextBlob::MakeFromString("Hello", sk_font); ASSERT_NE(blob, nullptr); - auto maybe_frame = MakeTextFrameFromTextBlobSkia(blob); - ASSERT_TRUE(maybe_frame.has_value()); - if (!maybe_frame.has_value()) { - return; - } - auto frame = maybe_frame.value(); + auto frame = MakeTextFrameFromTextBlobSkia(blob); canvas.DrawTextFrame(frame, Point(), text_paint); ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); diff --git a/impeller/aiks/canvas.cc b/impeller/aiks/canvas.cc index 9175cddbe353e..ae4c9d512037f 100644 --- a/impeller/aiks/canvas.cc +++ b/impeller/aiks/canvas.cc @@ -546,7 +546,7 @@ void Canvas::SaveLayer(const Paint& paint, } } -void Canvas::DrawTextFrame(const TextFrame& text_frame, +void Canvas::DrawTextFrame(const std::shared_ptr& text_frame, Point position, const Paint& paint) { Entity entity; @@ -554,7 +554,7 @@ void Canvas::DrawTextFrame(const TextFrame& text_frame, entity.SetBlendMode(paint.blend_mode); auto text_contents = std::make_shared(); - text_contents->SetTextFrame(TextFrame(text_frame)); + text_contents->SetTextFrame(text_frame); text_contents->SetColor(paint.color); entity.SetTransformation(GetCurrentTransformation() * diff --git a/impeller/aiks/canvas.h b/impeller/aiks/canvas.h index 6bba9ff7e0120..a7a5652229b03 100644 --- a/impeller/aiks/canvas.h +++ b/impeller/aiks/canvas.h @@ -140,7 +140,7 @@ class Canvas { void DrawPicture(const Picture& picture); - void DrawTextFrame(const TextFrame& text_frame, + void DrawTextFrame(const std::shared_ptr& text_frame, Point position, const Paint& paint); diff --git a/impeller/display_list/dl_dispatcher.cc b/impeller/display_list/dl_dispatcher.cc index f352a18b05b85..107389deaf715 100644 --- a/impeller/display_list/dl_dispatcher.cc +++ b/impeller/display_list/dl_dispatcher.cc @@ -34,7 +34,6 @@ #include "impeller/geometry/path_builder.h" #include "impeller/geometry/scalar.h" #include "impeller/geometry/sigma.h" -#include "impeller/typographer/backends/skia/text_frame_skia.h" #if IMPELLER_ENABLE_3D #include "impeller/entity/contents/scene_contents.h" @@ -1071,20 +1070,14 @@ void DlDispatcher::drawDisplayList( void DlDispatcher::drawTextBlob(const sk_sp blob, SkScalar x, SkScalar y) { - const auto maybe_text_frame = MakeTextFrameFromTextBlobSkia(blob); - if (!maybe_text_frame.has_value()) { - return; - } - const auto text_frame = maybe_text_frame.value(); - if (paint_.style == Paint::Style::kStroke || - paint_.color_source.GetType() != ColorSource::Type::kColor) { - auto bounds = blob->bounds(); - auto path = skia_conversions::PathDataFromTextBlob( - blob, Point(x + bounds.left(), y + bounds.top())); - canvas_.DrawPath(path, paint_); - return; - } + // When running with Impeller enabled Skia text blobs are converted to + // Impeller text frames in paragraph_skia.cc + UNIMPLEMENTED; +} +void DlDispatcher::drawTextFrame(const std::shared_ptr& text_frame, + SkScalar x, + SkScalar y) { canvas_.DrawTextFrame(text_frame, // impeller::Point{x, y}, // paint_ // diff --git a/impeller/display_list/dl_dispatcher.h b/impeller/display_list/dl_dispatcher.h index d9a36e2239980..0dc3b7ce72461 100644 --- a/impeller/display_list/dl_dispatcher.h +++ b/impeller/display_list/dl_dispatcher.h @@ -212,6 +212,11 @@ class DlDispatcher final : public flutter::DlOpReceiver { SkScalar x, SkScalar y) override; + // |flutter::DlOpReceiver| + void drawTextFrame(const std::shared_ptr& text_frame, + SkScalar x, + SkScalar y) override; + // |flutter::DlOpReceiver| void drawShadow(const SkPath& path, const flutter::DlColor color, diff --git a/impeller/entity/contents/text_contents.cc b/impeller/entity/contents/text_contents.cc index fceab90a6ed26..c17c47ae20b31 100644 --- a/impeller/entity/contents/text_contents.cc +++ b/impeller/entity/contents/text_contents.cc @@ -24,8 +24,8 @@ TextContents::TextContents() = default; TextContents::~TextContents() = default; -void TextContents::SetTextFrame(TextFrame&& frame) { - frame_ = std::move(frame); +void TextContents::SetTextFrame(const std::shared_ptr& frame) { + frame_ = frame; } std::shared_ptr TextContents::ResolveAtlas( @@ -49,7 +49,7 @@ Color TextContents::GetColor() const { } bool TextContents::CanInheritOpacity(const Entity& entity) const { - return !frame_.MaybeHasOverlapping(); + return !frame_->MaybeHasOverlapping(); } void TextContents::SetInheritedOpacity(Scalar opacity) { @@ -61,13 +61,13 @@ void TextContents::SetOffset(Vector2 offset) { } std::optional TextContents::GetCoverage(const Entity& entity) const { - return frame_.GetBounds().TransformBounds(entity.GetTransformation()); + return frame_->GetBounds().TransformBounds(entity.GetTransformation()); } void TextContents::PopulateGlyphAtlas( const std::shared_ptr& lazy_glyph_atlas, Scalar scale) { - lazy_glyph_atlas->AddTextFrame(frame_, scale); + lazy_glyph_atlas->AddTextFrame(*frame_, scale); scale_ = scale; } @@ -79,7 +79,7 @@ bool TextContents::Render(const ContentContext& renderer, return true; } - auto type = frame_.GetAtlasType(); + auto type = frame_->GetAtlasType(); auto atlas = ResolveAtlas(*renderer.GetContext(), type, renderer.GetLazyGlyphAtlas()); @@ -152,7 +152,7 @@ bool TextContents::Render(const ContentContext& renderer, auto& host_buffer = pass.GetTransientsBuffer(); size_t vertex_count = 0; - for (const auto& run : frame_.GetRuns()) { + for (const auto& run : frame_->GetRuns()) { vertex_count += run.GetGlyphPositions().size(); } vertex_count *= 6; @@ -163,7 +163,7 @@ bool TextContents::Render(const ContentContext& renderer, VS::PerVertexData vtx; VS::PerVertexData* vtx_contents = reinterpret_cast(contents); - for (const TextRun& run : frame_.GetRuns()) { + for (const TextRun& run : frame_->GetRuns()) { const Font& font = run.GetFont(); Scalar rounded_scale = TextFrame::RoundScaledFontSize( scale_, font.GetMetrics().point_size); diff --git a/impeller/entity/contents/text_contents.h b/impeller/entity/contents/text_contents.h index 6e3b89d558e61..07d191ef3caad 100644 --- a/impeller/entity/contents/text_contents.h +++ b/impeller/entity/contents/text_contents.h @@ -26,7 +26,7 @@ class TextContents final : public Contents { ~TextContents(); - void SetTextFrame(TextFrame&& frame); + void SetTextFrame(const std::shared_ptr& frame); void SetColor(Color color); @@ -56,7 +56,7 @@ class TextContents final : public Contents { RenderPass& pass) const override; private: - TextFrame frame_; + std::shared_ptr frame_; Scalar scale_ = 1.0; Color color_; Scalar inherited_opacity_ = 1.0; diff --git a/impeller/entity/entity_unittests.cc b/impeller/entity/entity_unittests.cc index d4f4697d47512..3ff5548509b5e 100644 --- a/impeller/entity/entity_unittests.cc +++ b/impeller/entity/entity_unittests.cc @@ -2180,13 +2180,13 @@ TEST_P(EntityTest, InheritOpacityTest) { SkFont font; font.setSize(30); auto blob = SkTextBlob::MakeFromString("A", font); - auto frame = MakeTextFrameFromTextBlobSkia(blob).value(); + auto frame = MakeTextFrameFromTextBlobSkia(blob); auto lazy_glyph_atlas = std::make_shared(TypographerContextSkia::Make()); - lazy_glyph_atlas->AddTextFrame(frame, 1.0f); + lazy_glyph_atlas->AddTextFrame(*frame, 1.0f); auto text_contents = std::make_shared(); - text_contents->SetTextFrame(std::move(frame)); + text_contents->SetTextFrame(frame); text_contents->SetColor(Color::Blue().WithAlpha(0.5)); ASSERT_TRUE(text_contents->CanInheritOpacity(entity)); diff --git a/impeller/typographer/backends/skia/text_frame_skia.cc b/impeller/typographer/backends/skia/text_frame_skia.cc index 11c256a8af918..b5d7ee8c468e5 100644 --- a/impeller/typographer/backends/skia/text_frame_skia.cc +++ b/impeller/typographer/backends/skia/text_frame_skia.cc @@ -8,7 +8,6 @@ #include "flutter/fml/logging.h" #include "impeller/typographer/backends/skia/typeface_skia.h" -#include "include/core/SkFontTypes.h" #include "include/core/SkRect.h" #include "third_party/skia/include/core/SkFont.h" #include "third_party/skia/include/core/SkFontMetrics.h" @@ -39,16 +38,10 @@ static Rect ToRect(const SkRect& rect) { static constexpr Scalar kScaleSize = 100000.0f; -std::optional MakeTextFrameFromTextBlobSkia( +std::shared_ptr MakeTextFrameFromTextBlobSkia( const sk_sp& blob) { - // Handling nullptr text blobs feels overly defensive here, as I don't - // actually know if this happens. - if (!blob) { - return {}; - } - - std::vector runs; bool has_color = false; + std::vector runs; for (SkTextBlobRunIterator run(blob.get()); !run.done(); run.next()) { // TODO(jonahwilliams): ask Skia for a public API to look this up. // https://github.com/flutter/flutter/issues/112005 @@ -95,7 +88,7 @@ std::optional MakeTextFrameFromTextBlobSkia( continue; } } - return TextFrame(runs, ToRect(blob->bounds()), has_color); + return std::make_shared(runs, ToRect(blob->bounds()), has_color); } } // namespace impeller diff --git a/impeller/typographer/backends/skia/text_frame_skia.h b/impeller/typographer/backends/skia/text_frame_skia.h index 53170a248d3a1..e7721a0c6e9c7 100644 --- a/impeller/typographer/backends/skia/text_frame_skia.h +++ b/impeller/typographer/backends/skia/text_frame_skia.h @@ -4,13 +4,12 @@ #pragma once -#include "flutter/fml/macros.h" #include "impeller/typographer/text_frame.h" #include "third_party/skia/include/core/SkTextBlob.h" namespace impeller { -std::optional MakeTextFrameFromTextBlobSkia( +std::shared_ptr MakeTextFrameFromTextBlobSkia( const sk_sp& blob); } // namespace impeller diff --git a/impeller/typographer/backends/stb/text_frame_stb.cc b/impeller/typographer/backends/stb/text_frame_stb.cc index 5e6060ba32551..e1d1dd0d1c662 100644 --- a/impeller/typographer/backends/stb/text_frame_stb.cc +++ b/impeller/typographer/backends/stb/text_frame_stb.cc @@ -8,9 +8,10 @@ namespace impeller { -TextFrame MakeTextFrameSTB(const std::shared_ptr& typeface_stb, - Font::Metrics metrics, - const std::string& text) { +std::shared_ptr MakeTextFrameSTB( + const std::shared_ptr& typeface_stb, + Font::Metrics metrics, + const std::string& text) { TextRun run(Font(typeface_stb, metrics)); // Shape the text run using STB. The glyph positions could also be resolved @@ -61,7 +62,8 @@ TextFrame MakeTextFrameSTB(const std::shared_ptr& typeface_stb, } std::vector runs = {run}; - return TextFrame(runs, result.value_or(Rect::MakeLTRB(0, 0, 0, 0)), false); + return std::make_shared( + runs, result.value_or(Rect::MakeLTRB(0, 0, 0, 0)), false); } } // namespace impeller diff --git a/impeller/typographer/backends/stb/text_frame_stb.h b/impeller/typographer/backends/stb/text_frame_stb.h index 622cb1f3b72fd..39f8cccc7688a 100644 --- a/impeller/typographer/backends/stb/text_frame_stb.h +++ b/impeller/typographer/backends/stb/text_frame_stb.h @@ -10,8 +10,9 @@ namespace impeller { -TextFrame MakeTextFrameSTB(const std::shared_ptr& typeface_stb, - Font::Metrics metrics, - const std::string& text); +std::shared_ptr MakeTextFrameSTB( + const std::shared_ptr& typeface_stb, + Font::Metrics metrics, + const std::string& text); } // namespace impeller diff --git a/impeller/typographer/typographer_context.h b/impeller/typographer/typographer_context.h index 1ca4d4a7687c3..3714dd804070e 100644 --- a/impeller/typographer/typographer_context.h +++ b/impeller/typographer/typographer_context.h @@ -4,7 +4,6 @@ #pragma once -#include #include #include "flutter/fml/macros.h" diff --git a/impeller/typographer/typographer_unittests.cc b/impeller/typographer/typographer_unittests.cc index a996bdf98d98d..eb3581d750f0b 100644 --- a/impeller/typographer/typographer_unittests.cc +++ b/impeller/typographer/typographer_unittests.cc @@ -40,9 +40,9 @@ TEST_P(TypographerTest, CanConvertTextBlob) { auto blob = SkTextBlob::MakeFromString( "the quick brown fox jumped over the lazy dog.", font); ASSERT_TRUE(blob); - auto frame = MakeTextFrameFromTextBlobSkia(blob).value(); - ASSERT_EQ(frame.GetRunCount(), 1u); - for (const auto& run : frame.GetRuns()) { + auto frame = MakeTextFrameFromTextBlobSkia(blob); + ASSERT_EQ(frame->GetRunCount(), 1u); + for (const auto& run : frame->GetRuns()) { ASSERT_TRUE(run.IsValid()); ASSERT_EQ(run.GetGlyphCount(), 45u); } @@ -62,7 +62,7 @@ TEST_P(TypographerTest, CanCreateGlyphAtlas) { ASSERT_TRUE(blob); auto atlas = CreateGlyphAtlas( *GetContext(), context.get(), GlyphAtlas::Type::kAlphaBitmap, 1.0f, - atlas_context, MakeTextFrameFromTextBlobSkia(blob).value()); + atlas_context, *MakeTextFrameFromTextBlobSkia(blob)); ASSERT_NE(atlas, nullptr); ASSERT_NE(atlas->GetTexture(), nullptr); ASSERT_EQ(atlas->GetType(), GlyphAtlas::Type::kAlphaBitmap); @@ -113,21 +113,20 @@ TEST_P(TypographerTest, LazyAtlasTracksColor) { auto blob = SkTextBlob::MakeFromString("hello", sk_font); ASSERT_TRUE(blob); - auto frame = MakeTextFrameFromTextBlobSkia(blob).value(); + auto frame = MakeTextFrameFromTextBlobSkia(blob); - ASSERT_FALSE(frame.GetAtlasType() == GlyphAtlas::Type::kColorBitmap); + ASSERT_FALSE(frame->GetAtlasType() == GlyphAtlas::Type::kColorBitmap); LazyGlyphAtlas lazy_atlas(TypographerContextSkia::Make()); - lazy_atlas.AddTextFrame(frame, 1.0f); + lazy_atlas.AddTextFrame(*frame, 1.0f); frame = MakeTextFrameFromTextBlobSkia( - SkTextBlob::MakeFromString("😀 ", emoji_font)) - .value(); + SkTextBlob::MakeFromString("😀 ", emoji_font)); - ASSERT_TRUE(frame.GetAtlasType() == GlyphAtlas::Type::kColorBitmap); + ASSERT_TRUE(frame->GetAtlasType() == GlyphAtlas::Type::kColorBitmap); - lazy_atlas.AddTextFrame(frame, 1.0f); + lazy_atlas.AddTextFrame(*frame, 1.0f); // Creates different atlases for color and alpha bitmap. auto color_atlas = lazy_atlas.CreateOrGetGlyphAtlas( @@ -148,7 +147,7 @@ TEST_P(TypographerTest, GlyphAtlasWithOddUniqueGlyphSize) { ASSERT_TRUE(blob); auto atlas = CreateGlyphAtlas( *GetContext(), context.get(), GlyphAtlas::Type::kAlphaBitmap, 1.0f, - atlas_context, MakeTextFrameFromTextBlobSkia(blob).value()); + atlas_context, *MakeTextFrameFromTextBlobSkia(blob)); ASSERT_NE(atlas, nullptr); ASSERT_NE(atlas->GetTexture(), nullptr); @@ -165,7 +164,7 @@ TEST_P(TypographerTest, GlyphAtlasIsRecycledIfUnchanged) { ASSERT_TRUE(blob); auto atlas = CreateGlyphAtlas( *GetContext(), context.get(), GlyphAtlas::Type::kAlphaBitmap, 1.0f, - atlas_context, MakeTextFrameFromTextBlobSkia(blob).value()); + atlas_context, *MakeTextFrameFromTextBlobSkia(blob)); ASSERT_NE(atlas, nullptr); ASSERT_NE(atlas->GetTexture(), nullptr); ASSERT_EQ(atlas, atlas_context->GetGlyphAtlas()); @@ -174,7 +173,7 @@ TEST_P(TypographerTest, GlyphAtlasIsRecycledIfUnchanged) { auto next_atlas = CreateGlyphAtlas( *GetContext(), context.get(), GlyphAtlas::Type::kAlphaBitmap, 1.0f, - atlas_context, MakeTextFrameFromTextBlobSkia(blob).value()); + atlas_context, *MakeTextFrameFromTextBlobSkia(blob)); ASSERT_EQ(atlas, next_atlas); ASSERT_EQ(atlas_context->GetGlyphAtlas(), atlas); } @@ -197,7 +196,7 @@ TEST_P(TypographerTest, GlyphAtlasWithLotsOfdUniqueGlyphSize) { FontGlyphMap font_glyph_map; size_t size_count = 8; for (size_t index = 0; index < size_count; index += 1) { - MakeTextFrameFromTextBlobSkia(blob).value().CollectUniqueFontGlyphPairs( + MakeTextFrameFromTextBlobSkia(blob)->CollectUniqueFontGlyphPairs( font_glyph_map, 0.6 * index); }; auto atlas = @@ -232,7 +231,7 @@ TEST_P(TypographerTest, GlyphAtlasTextureIsRecycledIfUnchanged) { ASSERT_TRUE(blob); auto atlas = CreateGlyphAtlas( *GetContext(), context.get(), GlyphAtlas::Type::kAlphaBitmap, 1.0f, - atlas_context, MakeTextFrameFromTextBlobSkia(blob).value()); + atlas_context, *MakeTextFrameFromTextBlobSkia(blob)); auto old_packer = atlas_context->GetRectPacker(); ASSERT_NE(atlas, nullptr); @@ -246,7 +245,7 @@ TEST_P(TypographerTest, GlyphAtlasTextureIsRecycledIfUnchanged) { auto blob2 = SkTextBlob::MakeFromString("spooky 2", sk_font); auto next_atlas = CreateGlyphAtlas( *GetContext(), context.get(), GlyphAtlas::Type::kAlphaBitmap, 1.0f, - atlas_context, MakeTextFrameFromTextBlobSkia(blob2).value()); + atlas_context, *MakeTextFrameFromTextBlobSkia(blob2)); ASSERT_EQ(atlas, next_atlas); auto* second_texture = next_atlas->GetTexture().get(); @@ -265,7 +264,7 @@ TEST_P(TypographerTest, GlyphAtlasTextureIsRecreatedIfTypeChanges) { ASSERT_TRUE(blob); auto atlas = CreateGlyphAtlas( *GetContext(), context.get(), GlyphAtlas::Type::kAlphaBitmap, 1.0f, - atlas_context, MakeTextFrameFromTextBlobSkia(blob).value()); + atlas_context, *MakeTextFrameFromTextBlobSkia(blob)); auto old_packer = atlas_context->GetRectPacker(); ASSERT_NE(atlas, nullptr); @@ -280,7 +279,7 @@ TEST_P(TypographerTest, GlyphAtlasTextureIsRecreatedIfTypeChanges) { auto blob2 = SkTextBlob::MakeFromString("spooky 1", sk_font); auto next_atlas = CreateGlyphAtlas( *GetContext(), context.get(), GlyphAtlas::Type::kColorBitmap, 1.0f, - atlas_context, MakeTextFrameFromTextBlobSkia(blob2).value()); + atlas_context, *MakeTextFrameFromTextBlobSkia(blob2)); ASSERT_NE(atlas, next_atlas); auto* second_texture = next_atlas->GetTexture().get(); @@ -297,15 +296,13 @@ TEST_P(TypographerTest, MaybeHasOverlapping) { SkFont sk_font(typeface, 0.5f); auto frame = - MakeTextFrameFromTextBlobSkia(SkTextBlob::MakeFromString("1", sk_font)) - .value(); + MakeTextFrameFromTextBlobSkia(SkTextBlob::MakeFromString("1", sk_font)); // Single character has no overlapping - ASSERT_FALSE(frame.MaybeHasOverlapping()); + ASSERT_FALSE(frame->MaybeHasOverlapping()); auto frame_2 = MakeTextFrameFromTextBlobSkia( - SkTextBlob::MakeFromString("123456789", sk_font)) - .value(); - ASSERT_FALSE(frame_2.MaybeHasOverlapping()); + SkTextBlob::MakeFromString("123456789", sk_font)); + ASSERT_FALSE(frame_2->MaybeHasOverlapping()); } TEST_P(TypographerTest, RectanglePackerAddsNonoverlapingRectangles) { diff --git a/shell/common/dl_op_spy.cc b/shell/common/dl_op_spy.cc index 15910fc2e85de..bcf213bffa8e9 100644 --- a/shell/common/dl_op_spy.cc +++ b/shell/common/dl_op_spy.cc @@ -127,6 +127,14 @@ void DlOpSpy::drawTextBlob(const sk_sp blob, SkScalar y) { did_draw_ |= will_draw_; } + +void DlOpSpy::drawTextFrame( + const std::shared_ptr& text_frame, + SkScalar x, + SkScalar y) { + did_draw_ |= will_draw_; +} + void DlOpSpy::drawShadow(const SkPath& path, const DlColor color, const SkScalar elevation, diff --git a/shell/common/dl_op_spy.h b/shell/common/dl_op_spy.h index 1cb29ff7219aa..1bcf08c7a84c5 100644 --- a/shell/common/dl_op_spy.h +++ b/shell/common/dl_op_spy.h @@ -90,6 +90,9 @@ class DlOpSpy final : public virtual DlOpReceiver, void drawTextBlob(const sk_sp blob, SkScalar x, SkScalar y) override; + void drawTextFrame(const std::shared_ptr& text_frame, + SkScalar x, + SkScalar y) override; void drawShadow(const SkPath& path, const DlColor color, const SkScalar elevation, diff --git a/testing/display_list_testing.cc b/testing/display_list_testing.cc index d0b6e51f571f6..c18d618209280 100644 --- a/testing/display_list_testing.cc +++ b/testing/display_list_testing.cc @@ -859,6 +859,15 @@ void DisplayListStreamDispatcher::drawTextBlob(const sk_sp blob, << blob.get() << ", " << x << ", " << y << ");" << std::endl; } + +void DisplayListStreamDispatcher::drawTextFrame(const std::shared_ptr& text_frame, + SkScalar x, + SkScalar y) { + startl() << "drawTextFrame(" + << text_frame.get() << ", " + << x << ", " << y << ");" << std::endl; +} + void DisplayListStreamDispatcher::drawShadow(const SkPath& path, const DlColor color, const SkScalar elevation, diff --git a/testing/display_list_testing.h b/testing/display_list_testing.h index df3b2fe58b372..8604906753deb 100644 --- a/testing/display_list_testing.h +++ b/testing/display_list_testing.h @@ -144,6 +144,9 @@ class DisplayListStreamDispatcher final : public DlOpReceiver { void drawTextBlob(const sk_sp blob, SkScalar x, SkScalar y) override; + void drawTextFrame(const std::shared_ptr& text_frame, + SkScalar x, + SkScalar y) override; void drawShadow(const SkPath& path, const DlColor color, const SkScalar elevation, diff --git a/testing/mock_canvas.cc b/testing/mock_canvas.cc index 75b03107e2a75..8d5a51fd1b6c6 100644 --- a/testing/mock_canvas.cc +++ b/testing/mock_canvas.cc @@ -160,6 +160,14 @@ void MockCanvas::DrawTextBlob(const sk_sp& text, paint, SkPoint::Make(x, y)}}); } +void MockCanvas::DrawTextFrame( + const std::shared_ptr& text_frame, + SkScalar x, + SkScalar y, + const DlPaint& paint) { + FML_DCHECK(false); +} + void MockCanvas::DrawRect(const SkRect& rect, const DlPaint& paint) { draw_calls_.emplace_back(DrawCall{current_layer_, DrawRectData{rect, paint}}); } diff --git a/testing/mock_canvas.h b/testing/mock_canvas.h index 71260d5b8755f..591f1c908e9fb 100644 --- a/testing/mock_canvas.h +++ b/testing/mock_canvas.h @@ -273,6 +273,10 @@ class MockCanvas final : public DlCanvas { SkScalar x, SkScalar y, const DlPaint& paint) override; + void DrawTextFrame(const std::shared_ptr& text_frame, + SkScalar x, + SkScalar y, + const DlPaint& paint) override; void DrawShadow(const SkPath& path, const DlColor color, const SkScalar elevation, diff --git a/third_party/txt/BUILD.gn b/third_party/txt/BUILD.gn index b799bc5dd46d5..a61438b72c5eb 100644 --- a/third_party/txt/BUILD.gn +++ b/third_party/txt/BUILD.gn @@ -81,6 +81,7 @@ source_set("txt") { public_deps = [ "//flutter/display_list", "//flutter/fml", + "//flutter/impeller/typographer/backends/skia:typographer_skia_backend", "//third_party/harfbuzz", "//third_party/icu", "//third_party/skia", diff --git a/third_party/txt/src/skia/paragraph_skia.cc b/third_party/txt/src/skia/paragraph_skia.cc index 1f20f1781d408..d1dc525909a25 100644 --- a/third_party/txt/src/skia/paragraph_skia.cc +++ b/third_party/txt/src/skia/paragraph_skia.cc @@ -18,7 +18,10 @@ #include #include +#include "display_list/dl_paint.h" #include "fml/logging.h" +#include "impeller/typographer/backends/skia/text_frame_skia.h" +#include "include/core/SkMatrix.h" namespace txt { @@ -65,10 +68,10 @@ class DisplayListParagraphPainter : public skt::ParagraphPainter { /// decision (i.e. with `#ifdef`) instead of a runtime option. DisplayListParagraphPainter(DisplayListBuilder* builder, const std::vector& dl_paints, - bool draw_path_effect) + bool impeller_enabled) : builder_(builder), dl_paints_(dl_paints), - draw_path_effect_(draw_path_effect) {} + impeller_enabled_(impeller_enabled) {} void drawTextBlob(const sk_sp& blob, SkScalar x, @@ -79,6 +82,22 @@ class DisplayListParagraphPainter : public skt::ParagraphPainter { } size_t paint_id = std::get(paint); FML_DCHECK(paint_id < dl_paints_.size()); + +#ifdef IMPELLER_SUPPORTS_RENDERING + if (impeller_enabled_) { + if (ShouldRenderAsPath(dl_paints_[paint_id])) { + auto path = skia::textlayout::Paragraph::GetPath(blob.get()); + auto transformed = path.makeTransform(SkMatrix::Translate( + x + blob->bounds().left(), y + blob->bounds().top())); + builder_->DrawPath(transformed, dl_paints_[paint_id]); + return; + } + + builder_->DrawTextFrame(impeller::MakeTextFrameFromTextBlobSkia(blob), x, + y, dl_paints_[paint_id]); + return; + } +#endif // IMPELLER_SUPPORTS_RENDERING builder_->DrawTextBlob(blob, x, y, dl_paints_[paint_id]); } @@ -96,6 +115,11 @@ class DisplayListParagraphPainter : public skt::ParagraphPainter { DlBlurMaskFilter filter(DlBlurStyle::kNormal, blur_sigma, false); paint.setMaskFilter(&filter); } + if (impeller_enabled_) { + builder_->DrawTextFrame(impeller::MakeTextFrameFromTextBlobSkia(blob), x, + y, paint); + return; + } builder_->DrawTextBlob(blob, x, y, paint); } @@ -129,11 +153,13 @@ class DisplayListParagraphPainter : public skt::ParagraphPainter { // the line directly using the `drawLine` API instead of using a path effect // (because Impeller does not support path effects). auto dash_path_effect = decor_style.getDashPathEffect(); - if (draw_path_effect_ && dash_path_effect) { +#ifdef IMPELLER_SUPPORTS_RENDERING + if (impeller_enabled_ && dash_path_effect) { auto path = dashedLine(x0, x1, y0, *dash_path_effect); builder_->DrawPath(path, toDlPaint(decor_style)); return; } +#endif // IMPELLER_SUPPORTS_RENDERING auto paint = toDlPaint(decor_style); if (dash_path_effect) { @@ -180,6 +206,16 @@ class DisplayListParagraphPainter : public skt::ParagraphPainter { return path; } + bool ShouldRenderAsPath(const DlPaint& paint) const { + FML_DCHECK(impeller_enabled_); + // Text with non-trivial color sources or stroke paint mode should be + // rendered as a path when running on Impeller for correctness. These + // filters rely on having the glyph coverage, whereas regular text is + // drawn as rectangular texture samples. + return ((paint.getColorSource() && !paint.getColorSource()->asColor()) || + paint.getDrawStyle() == DlDrawStyle::kStroke); + } + DlPaint toDlPaint(const DecorationStyle& decor_style, DlDrawStyle draw_style = DlDrawStyle::kStroke) { DlPaint paint; @@ -192,7 +228,7 @@ class DisplayListParagraphPainter : public skt::ParagraphPainter { void setPathEffect(DlPaint& paint, const DashPathEffect& dash_path_effect) { // Impeller does not support path effects, so we should never be setting. - FML_DCHECK(!draw_path_effect_); + FML_DCHECK(!impeller_enabled_); std::array intervals{dash_path_effect.fOnLength, dash_path_effect.fOffLength}; @@ -202,7 +238,7 @@ class DisplayListParagraphPainter : public skt::ParagraphPainter { DisplayListBuilder* builder_; const std::vector& dl_paints_; - bool draw_path_effect_; + const bool impeller_enabled_; }; } // anonymous namespace diff --git a/third_party/txt/tests/paragraph_unittests.cc b/third_party/txt/tests/paragraph_unittests.cc index ec06ce702512e..7eaf771c6cde8 100644 --- a/third_party/txt/tests/paragraph_unittests.cc +++ b/third_party/txt/tests/paragraph_unittests.cc @@ -3,8 +3,13 @@ // found in the LICENSE file. #include +#include "display_list/dl_color.h" +#include "display_list/dl_paint.h" +#include "display_list/dl_tile_mode.h" +#include "display_list/effects/dl_color_source.h" #include "display_list/utils/dl_receiver_utils.h" #include "gtest/gtest.h" +#include "include/core/SkScalar.h" #include "runtime/test_font_data.h" #include "skia/paragraph_builder_skia.h" #include "testing/canvas_test.h" @@ -23,6 +28,8 @@ class DlOpRecorder final : public virtual DlOpReceiver, int lineCount() const { return lines_.size(); } int rectCount() const { return rects_.size(); } int pathCount() const { return paths_.size(); } + int textFrameCount() const { return text_frames_.size(); } + int blobCount() const { return blobs_.size(); } bool hasPathEffect() const { return path_effect_ != nullptr; } private: @@ -30,6 +37,18 @@ class DlOpRecorder final : public virtual DlOpReceiver, lines_.emplace_back(p0, p1); } + void drawTextFrame(const std::shared_ptr& text_frame, + SkScalar x, + SkScalar y) override { + text_frames_.push_back(text_frame); + } + + void drawTextBlob(const sk_sp blob, + SkScalar x, + SkScalar y) override { + blobs_.push_back(blob); + } + void drawRect(const SkRect& rect) override { rects_.push_back(rect); } void drawPath(const SkPath& path) override { paths_.push_back(path); } @@ -38,6 +57,8 @@ class DlOpRecorder final : public virtual DlOpReceiver, path_effect_ = effect; } + std::vector> text_frames_; + std::vector> blobs_; std::vector> lines_; std::vector rects_; std::vector paths_; @@ -52,10 +73,30 @@ class PainterTestBase : public CanvasTestBase { void PretendImpellerIsEnabled(bool impeller) { impeller_ = impeller; } protected: - sk_sp draw(txt::TextDecorationStyle style) const { - auto t_style = makeDecoratedStyle(style); + txt::TextStyle makeDecoratedStyle(txt::TextDecorationStyle style) { + auto t_style = txt::TextStyle(); + t_style.color = SK_ColorBLACK; // default + t_style.font_weight = txt::FontWeight::w400; // normal + t_style.font_size = 14; // default + t_style.decoration = txt::TextDecoration::kUnderline; + t_style.decoration_style = style; + t_style.decoration_color = SK_ColorBLACK; + t_style.font_families.push_back("ahem"); + return t_style; + } + + txt::TextStyle makeStyle() { + auto t_style = txt::TextStyle(); + t_style.color = SK_ColorBLACK; // default + t_style.font_weight = txt::FontWeight::w400; // normal + t_style.font_size = 14; // default + t_style.font_families.push_back("ahem"); + return t_style; + } + + sk_sp draw(txt::TextStyle style) const { auto pb_skia = makeParagraphBuilder(); - pb_skia.PushStyle(t_style); + pb_skia.PushStyle(style); pb_skia.AddText(u"Hello World!"); pb_skia.Pop(); @@ -85,18 +126,6 @@ class PainterTestBase : public CanvasTestBase { return txt::ParagraphBuilderSkia(p_style, f_collection, impeller_); } - txt::TextStyle makeDecoratedStyle(txt::TextDecorationStyle style) const { - auto t_style = txt::TextStyle(); - t_style.color = SK_ColorBLACK; // default - t_style.font_weight = txt::FontWeight::w400; // normal - t_style.font_size = 14; // default - t_style.decoration = txt::TextDecoration::kUnderline; - t_style.decoration_style = style; - t_style.decoration_color = SK_ColorBLACK; - t_style.font_families.push_back("ahem"); - return t_style; - } - bool impeller_ = false; }; @@ -106,7 +135,8 @@ TEST_F(PainterTest, DrawsSolidLineSkia) { PretendImpellerIsEnabled(false); auto recorder = DlOpRecorder(); - draw(txt::TextDecorationStyle::kSolid)->Dispatch(recorder); + draw(makeDecoratedStyle(txt::TextDecorationStyle::kSolid)) + ->Dispatch(recorder); // Skia may draw a solid underline as a filled rectangle: // https://skia.googlesource.com/skia/+/refs/heads/main/modules/skparagraph/src/Decorations.cpp#91 @@ -114,11 +144,25 @@ TEST_F(PainterTest, DrawsSolidLineSkia) { EXPECT_FALSE(recorder.hasPathEffect()); } +TEST_F(PainterTest, DrawDashedLineSkia) { + PretendImpellerIsEnabled(false); + + auto recorder = DlOpRecorder(); + draw(makeDecoratedStyle(txt::TextDecorationStyle::kDashed)) + ->Dispatch(recorder); + + // Skia draws a dashed underline as a filled rectangle with a path effect. + EXPECT_EQ(recorder.lineCount(), 1); + EXPECT_TRUE(recorder.hasPathEffect()); +} + +#ifdef IMPELLER_SUPPORTS_RENDERING TEST_F(PainterTest, DrawsSolidLineImpeller) { PretendImpellerIsEnabled(true); auto recorder = DlOpRecorder(); - draw(txt::TextDecorationStyle::kSolid)->Dispatch(recorder); + draw(makeDecoratedStyle(txt::TextDecorationStyle::kSolid)) + ->Dispatch(recorder); // Skia may draw a solid underline as a filled rectangle: // https://skia.googlesource.com/skia/+/refs/heads/main/modules/skparagraph/src/Decorations.cpp#91 @@ -126,27 +170,76 @@ TEST_F(PainterTest, DrawsSolidLineImpeller) { EXPECT_FALSE(recorder.hasPathEffect()); } -TEST_F(PainterTest, DrawDashedLineSkia) { - PretendImpellerIsEnabled(false); +TEST_F(PainterTest, DrawDashedLineImpeller) { + PretendImpellerIsEnabled(true); auto recorder = DlOpRecorder(); - draw(txt::TextDecorationStyle::kDashed)->Dispatch(recorder); + draw(makeDecoratedStyle(txt::TextDecorationStyle::kDashed)) + ->Dispatch(recorder); - // Skia draws a dashed underline as a filled rectangle with a path effect. - EXPECT_EQ(recorder.lineCount(), 1); - EXPECT_TRUE(recorder.hasPathEffect()); + // Impeller draws a dashed underline as a path. + EXPECT_EQ(recorder.pathCount(), 1); + EXPECT_FALSE(recorder.hasPathEffect()); } -TEST_F(PainterTest, DrawDashedLineImpeller) { +TEST_F(PainterTest, DrawTextFrameImpeller) { PretendImpellerIsEnabled(true); auto recorder = DlOpRecorder(); - draw(txt::TextDecorationStyle::kDashed)->Dispatch(recorder); + draw(makeStyle())->Dispatch(recorder); - // Impeller draws a dashed underline as a path. + EXPECT_EQ(recorder.textFrameCount(), 1); + EXPECT_EQ(recorder.blobCount(), 0); +} + +TEST_F(PainterTest, DrawStrokedTextImpeller) { + PretendImpellerIsEnabled(true); + + auto style = makeStyle(); + // What is your shtyle? + DlPaint foreground; + foreground.setDrawStyle(DlDrawStyle::kStroke); + style.foreground = foreground; + + auto recorder = DlOpRecorder(); + draw(style)->Dispatch(recorder); + + EXPECT_EQ(recorder.textFrameCount(), 0); + EXPECT_EQ(recorder.blobCount(), 0); EXPECT_EQ(recorder.pathCount(), 1); - EXPECT_FALSE(recorder.hasPathEffect()); } +TEST_F(PainterTest, DrawTextWithGradientImpeller) { + PretendImpellerIsEnabled(true); + + auto style = makeStyle(); + // how do you like my shtyle? + DlPaint foreground; + std::vector colors = {DlColor::kRed(), DlColor::kCyan()}; + std::vector stops = {0.0, 1.0}; + foreground.setColorSource(DlColorSource::MakeLinear( + SkPoint::Make(0, 0), SkPoint::Make(100, 100), 2, colors.data(), + stops.data(), DlTileMode::kClamp)); + style.foreground = foreground; + + auto recorder = DlOpRecorder(); + draw(style)->Dispatch(recorder); + + EXPECT_EQ(recorder.textFrameCount(), 0); + EXPECT_EQ(recorder.blobCount(), 0); + EXPECT_EQ(recorder.pathCount(), 1); +} + +TEST_F(PainterTest, DrawTextBlobNoImpeller) { + PretendImpellerIsEnabled(false); + + auto recorder = DlOpRecorder(); + draw(makeStyle())->Dispatch(recorder); + + EXPECT_EQ(recorder.textFrameCount(), 0); + EXPECT_EQ(recorder.blobCount(), 1); +} +#endif // IMPELLER_SUPPORTS_RENDERING + } // namespace testing } // namespace flutter From c9d4009e00753ae9ae52c6b7b03fe4dc4cd7610b Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 22 Sep 2023 14:17:56 -0400 Subject: [PATCH 242/859] Roll Skia from fe73688dc40f to 8a1e6e5844d7 (1 revision) (#46205) https://skia.googlesource.com/skia.git/+log/fe73688dc40f..8a1e6e5844d7 2023-09-22 armansito@google.com [graphite] Support atlas textures without storage usage If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 7ea8432ae9daf..a2f393d3a7a63 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'fe73688dc40f9853b3206c431d5e7ac2aa2d38ac', + 'skia_revision': '8a1e6e5844d75a7776c6575d2cd85607b548384d', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index d1ebadd67cb3d..4ab9e247c5d14 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 36e5c2c940cca4b6c22b53dee8af664e +Signature: bbb68f045a2faf5e7d01c829521ffdf9 ==================================================================================================== LIBRARY: etc1 From 479cd928184dfda9f32bd3ab74c780e7213defb1 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 22 Sep 2023 15:36:20 -0400 Subject: [PATCH 243/859] Roll Skia from 8a1e6e5844d7 to 78fced84372d (4 revisions) (#46207) https://skia.googlesource.com/skia.git/+log/8a1e6e5844d7..78fced84372d 2023-09-22 kjlubick@google.com Reland "Enforce IWYU on more src/core files" 2023-09-22 michaelludwig@google.com [skif] Add SkBlender handling to FilterResult::draw 2023-09-22 kjlubick@google.com Extract SkImageGenerator::MakeFromEncoded into own file 2023-09-22 johnstiles@google.com Create error tests to verify existing mesh-program behavior. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index a2f393d3a7a63..55d204d6774e6 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '8a1e6e5844d75a7776c6575d2cd85607b548384d', + 'skia_revision': '78fced84372d8971bc79c647b935667e13109a81', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 4ab9e247c5d14..0083f4045d0f9 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: bbb68f045a2faf5e7d01c829521ffdf9 +Signature: 912dc22e56cc897ba0f02da09dd5c2b3 ==================================================================================================== LIBRARY: etc1 @@ -8840,6 +8840,7 @@ ORIGIN: ../../../third_party/skia/src/base/SkRectMemcpy.h + ../../../third_party ORIGIN: ../../../third_party/skia/src/base/SkSafeMath.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/base/SkTime.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/base/SkTime.h + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/codec/SkImageGenerator_FromEncoded.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/core/SkBitmapProcState_opts.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/core/SkBitmapProcState_opts_hsw.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/core/SkBitmapProcState_opts_ssse3.cpp + ../../../third_party/skia/LICENSE @@ -9101,6 +9102,7 @@ FILE: ../../../third_party/skia/src/base/SkRectMemcpy.h FILE: ../../../third_party/skia/src/base/SkSafeMath.cpp FILE: ../../../third_party/skia/src/base/SkTime.cpp FILE: ../../../third_party/skia/src/base/SkTime.h +FILE: ../../../third_party/skia/src/codec/SkImageGenerator_FromEncoded.cpp FILE: ../../../third_party/skia/src/core/SkBitmapProcState_opts.cpp FILE: ../../../third_party/skia/src/core/SkBitmapProcState_opts_hsw.cpp FILE: ../../../third_party/skia/src/core/SkBitmapProcState_opts_ssse3.cpp From 9f6113c9eefea0d143b2b47aea48eef1a4b83bcf Mon Sep 17 00:00:00 2001 From: Brandon DeRosier Date: Fri, 22 Sep 2023 16:56:03 -0400 Subject: [PATCH 244/859] [Impeller] Incorporate backdrop filters in subpass coverage. (#46130) Resolves https://github.com/flutter/flutter/issues/134775. Before: ![image](https://github.com/flutter/engine/assets/919017/0e709d09-38bc-458b-850f-ca13f82c269d) After: ![image](https://github.com/flutter/engine/assets/919017/a30fff08-e6bb-421a-9ed2-39f2cfa53d72) --- impeller/entity/entity_pass.cc | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/impeller/entity/entity_pass.cc b/impeller/entity/entity_pass.cc index 7390c14df9d61..1d8b0a4f3735e 100644 --- a/impeller/entity/entity_pass.cc +++ b/impeller/entity/entity_pass.cc @@ -124,10 +124,43 @@ std::optional EntityPass::GetElementsCoverage( std::optional unfiltered_coverage = GetSubpassCoverage(subpass, std::nullopt); + + // If the current pass elements have any coverage so far and there's a + // backdrop filter, then incorporate the backdrop filter in the + // pre-filtered coverage of the subpass. + if (result.has_value() && subpass.backdrop_filter_proc_) { + std::shared_ptr backdrop_filter = + subpass.backdrop_filter_proc_(FilterInput::Make(result.value()), + subpass.xformation_, + Entity::RenderingMode::kSubpass); + if (backdrop_filter) { + auto backdrop_coverage = backdrop_filter->GetCoverage({}); + backdrop_coverage->origin += result->origin; + if (backdrop_coverage.has_value()) { + if (unfiltered_coverage.has_value()) { + unfiltered_coverage = coverage->Union(*backdrop_coverage); + } else { + unfiltered_coverage = backdrop_coverage; + } + } + } else { + VALIDATION_LOG << "The EntityPass backdrop filter proc didn't return " + "a valid filter."; + } + } + if (!unfiltered_coverage.has_value()) { continue; } + // Additionally, subpass textures may be passed through filters, which may + // modify the coverage. + // + // Note that we currently only assume that ImageFilters (such as blurs and + // matrix transforms) may modify coverage, although it's technically + // possible ColorFilters to affect coverage as well. For example: A + // ColorMatrixFilter could output a completely transparent result, and + // we could potentially detect this case as zero coverage in the future. std::shared_ptr image_filter = subpass.delegate_->WithImageFilter(*unfiltered_coverage, subpass.xformation_); From 585a5964f34cb9682e6e9ce6cf15334ba4237aad Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 22 Sep 2023 17:27:41 -0400 Subject: [PATCH 245/859] Roll Skia from 78fced84372d to e9358f92110c (4 revisions) (#46211) https://skia.googlesource.com/skia.git/+log/78fced84372d..e9358f92110c 2023-09-22 brianosman@google.com [graphite] Fix lifetime of texture infos when updating descriptor set 2023-09-22 brianosman@google.com [graphite] Make Dawn viewer's swap chain copy/texture-able 2023-09-22 kjlubick@google.com Fix G3 2023-09-22 johnstiles@google.com Allow child effects in SkSL mesh-fragment programs during compile. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 55d204d6774e6..eb91eb7a6f2fd 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '78fced84372d8971bc79c647b935667e13109a81', + 'skia_revision': 'e9358f92110c081b63f98c2975c970cc7d5c7e01', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 0083f4045d0f9..3927860599a94 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 912dc22e56cc897ba0f02da09dd5c2b3 +Signature: 5dd5036cb866bb763a221b801ecf54e3 ==================================================================================================== LIBRARY: etc1 @@ -8992,6 +8992,7 @@ ORIGIN: ../../../third_party/skia/src/image/SkSurface_Null.cpp + ../../../third_ ORIGIN: ../../../third_party/skia/src/image/SkTiledImageUtils.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/opts/SkOpts_RestoreTarget.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/opts/SkOpts_SetTarget.h + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/ports/SkImageGenerator_empty.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/ports/fontations/src/ffi.rs + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/ports/fontations/src/skpath_bridge.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/shaders/SkBlendShader.h + ../../../third_party/skia/LICENSE @@ -9254,6 +9255,7 @@ FILE: ../../../third_party/skia/src/image/SkSurface_Null.cpp FILE: ../../../third_party/skia/src/image/SkTiledImageUtils.cpp FILE: ../../../third_party/skia/src/opts/SkOpts_RestoreTarget.h FILE: ../../../third_party/skia/src/opts/SkOpts_SetTarget.h +FILE: ../../../third_party/skia/src/ports/SkImageGenerator_empty.cpp FILE: ../../../third_party/skia/src/ports/fontations/src/ffi.rs FILE: ../../../third_party/skia/src/ports/fontations/src/skpath_bridge.h FILE: ../../../third_party/skia/src/shaders/SkBlendShader.h From b7339a6f7caf212abbaa463a90cebf8c844c5929 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 22 Sep 2023 17:32:31 -0400 Subject: [PATCH 246/859] Roll Dart SDK from 4ddff752a6b0 to 692273b46610 (1 revision) (#46212) https://dart.googlesource.com/sdk.git/+log/4ddff752a6b0..692273b46610 2023-09-22 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-191.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jonahwilliams@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 20 ++++++++++---------- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/DEPS b/DEPS index eb91eb7a6f2fd..2bcd8c2182889 100644 --- a/DEPS +++ b/DEPS @@ -57,11 +57,11 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '4ddff752a6b0d986ca3f14363f3acce8f319fcae', + 'dart_revision': '692273b46610c0bc12ae76fa8a95ebdcfa5abed9', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py - 'dart_binaryen_rev': 'cdb7aeab40b4c522de20b242019f7e88641445d5', + 'dart_binaryen_rev': 'a51bd6df919a5b79574f0996a760cc20cb05697e', 'dart_boringssl_gen_rev': 'a468ba9fec3f59edf46a7db98caaca893e1e4d96', 'dart_boringssl_rev': '74646566e93de7551bfdfc5f49de7462f13d1d05', 'dart_browser_launcher_rev': '1f69393d63a2f8d36d00b86cdd20df70c347af82', @@ -72,9 +72,9 @@ vars = { 'dart_perfetto_rev': 'b8da07095979310818f0efde2ef3c69ea70d62c5', 'dart_protobuf_gn_rev': 'ca669f79945418f6229e4fef89b666b2a88cbb10', 'dart_protobuf_rev': 'c16bc891978a1764f0d6d8eca54f420242c78a6a', - 'dart_pub_rev': 'be6868ba132c782d9835b1638a634ecb73428579', + 'dart_pub_rev': '1e38c837e4eee40c6d5c5b088e8ed1b512e02980', 'dart_root_certificates_rev': '692f6d6488af68e0121317a9c2c9eb393eb0ee50', - 'dart_tools_rev': '70d778d58d0fb5a5f9d52d288709f790f6e70be6', + 'dart_tools_rev': '3c248df45b9bf40738579e8616cd7d85f34ba5b1', 'dart_watcher_rev': '1aed03e2a8005f45083fdb38cbd4b684cd23082f', 'dart_webdev_rev': '3078f48fb56a1036bc0f2a08ac51567291d8a837', 'dart_webkit_inspection_protocol_rev': '82f0c1c46dfdba5edf7c5fa84456233121dd69e1', @@ -334,7 +334,7 @@ deps = { # WARNING: Unused Dart dependencies in the list below till "WARNING:" marker are removed automatically - see create_updated_flutter_deps.py. 'src/third_party/dart/third_party/binaryen/src': - Var('chromium_git') + '/external/github.com/WebAssembly/binaryen.git@cdb7aeab40b4c522de20b242019f7e88641445d5', + Var('chromium_git') + '/external/github.com/WebAssembly/binaryen.git@a51bd6df919a5b79574f0996a760cc20cb05697e', 'src/third_party/dart/third_party/devtools': {'dep_type': 'cipd', 'packages': [{'package': 'dart/third_party/flutter/devtools', 'version': 'git_revision:2a1d1975d7ad8773a3e2590d10636432775f23a1'}]}, @@ -376,7 +376,7 @@ deps = { Var('dart_git') + '/dart_style.git@1a2def95a3c04dafd27b85d17e6e828bd4afa1a3', 'src/third_party/dart/third_party/pkg/dartdoc': - Var('dart_git') + '/dartdoc.git@dd28f4ce4135c019c9943ef6c27e10cdcfe6760c', + Var('dart_git') + '/dartdoc.git@0e1a6d94a6cb5dd487a19ebb68980e34ac6154ba', 'src/third_party/dart/third_party/pkg/ffi': Var('dart_git') + '/ffi.git@d36e05af55293bcc511d6b3a99ea4b8cb69f6323', @@ -394,7 +394,7 @@ deps = { Var('dart_git') + '/html.git@a1b193e95f13c995e7f7200ce0d363de5952e383', 'src/third_party/dart/third_party/pkg/http': - Var('dart_git') + '/http.git@decefa64234d87b1490001b8fbca6dd496d38da2', + Var('dart_git') + '/http.git@12516197c28a0763b1f90c26b87660810bf58cc8', 'src/third_party/dart/third_party/pkg/http_multi_server': Var('dart_git') + '/http_multi_server.git@9d62ea396d7d282592edf994378f67fcde982ce8', @@ -424,7 +424,7 @@ deps = { Var('dart_git') + '/mime.git@37ef637c35896e289fdd37c0ea4680df4ab9f543', 'src/third_party/dart/third_party/pkg/mockito': - Var('dart_git') + '/mockito.git@412c0beb51a12ed4a8833db7f542558ab92c0c65', + Var('dart_git') + '/mockito.git@097e5635a6c1859e03e9c606c2ab4cfa74618bcc', 'src/third_party/dart/third_party/pkg/native': Var('dart_git') + '/native.git@a5d88093017f5cecf30978a823fe6a8a2ebb8ca5', @@ -448,7 +448,7 @@ deps = { Var('dart_git') + '/pub_semver.git@f0be74a446f971db478e68b59ea62e393d6df3bd', 'src/third_party/dart/third_party/pkg/shelf': - Var('dart_git') + '/shelf.git@e2a02b77f5f7dd2db57e6c6ea1990b1fa2239096', + Var('dart_git') + '/shelf.git@485197819b93a9f9342c389f1715fb8e17a7ac0f', 'src/third_party/dart/third_party/pkg/source_map_stack_trace': Var('dart_git') + '/source_map_stack_trace.git@196d7bfa58ef307687907c323ab8e5fb1f382afa', @@ -475,7 +475,7 @@ deps = { Var('dart_git') + '/term_glyph.git@1b28285a7e818b8e87c4d2119d968c5b36d73c7a', 'src/third_party/dart/third_party/pkg/test': - Var('dart_git') + '/test.git@64494959ecdb2e777711487a1fb86555c0c20570', + Var('dart_git') + '/test.git@8191a355cefe5e6073e597d139bfb46e4b00c493', 'src/third_party/dart/third_party/pkg/test_reflective_loader': Var('dart_git') + '/test_reflective_loader.git@45c57d62fb08471681cd0b0a1c3b131bf0122929', diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index d27490f19a829..dfb65223add71 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: 54b66ecd4f21fce963c46b6bc79a02bb +Signature: dc5b067967cfbbb6536ad9c2db2dbbab ==================================================================================================== LIBRARY: dart From 9c9c69672408b81eae8f5dab2267024daad89cfd Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 22 Sep 2023 18:02:17 -0400 Subject: [PATCH 247/859] Roll Fuchsia Mac SDK from ZyajVWocCHVIuJkzM... to M9rDyhmn7VY4iTxzQ... (#46215) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jonahwilliams@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 2bcd8c2182889..5090855e63687 100644 --- a/DEPS +++ b/DEPS @@ -915,7 +915,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'ZyajVWocCHVIuJkzM88O4Ss5WHqZcTNDl7K2YwixdMwC' + 'version': 'M9rDyhmn7VY4iTxzQo1aLY0ssV6IYwx61YrXw9IOomAC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 932f1e22a9b78fac5c4d58a96a9a3567302d4f6e Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 22 Sep 2023 18:45:28 -0400 Subject: [PATCH 248/859] Roll Skia from e9358f92110c to 15ccdeaba011 (1 revision) (#46216) https://skia.googlesource.com/skia.git/+log/e9358f92110c..15ccdeaba011 2023-09-22 kjlubick@google.com Reland "Revert "Make SKP deserialize null instead of PNG images by default."" If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index 5090855e63687..bb839ac9f3ea2 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'e9358f92110c081b63f98c2975c970cc7d5c7e01', + 'skia_revision': '15ccdeaba011c990b4848aa996f7e7d5ca08deb5', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 3927860599a94..f3ba4d218c62d 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 5dd5036cb866bb763a221b801ecf54e3 +Signature: a795ab472b70cf976a84738499986b31 ==================================================================================================== LIBRARY: etc1 @@ -389,7 +389,6 @@ FILE: ../../../third_party/skia/relnotes/directcontext_submit.md FILE: ../../../third_party/skia/relnotes/minify-mesh.md FILE: ../../../third_party/skia/relnotes/patheffects.md FILE: ../../../third_party/skia/relnotes/shadowflags.md -FILE: ../../../third_party/skia/relnotes/skpicture_png.md FILE: ../../../third_party/skia/src/gpu/gpu_workaround_list.txt FILE: ../../../third_party/skia/src/sksl/generated/sksl_compute.minified.sksl FILE: ../../../third_party/skia/src/sksl/generated/sksl_compute.unoptimized.sksl From a534ce88535704d9f1db8f5bfcbfc87c3097a6f0 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Fri, 22 Sep 2023 16:04:08 -0700 Subject: [PATCH 249/859] [Impeller] dont treat non-rects as rects. (#46218) We were going down this branch for all closed paths, but we should only be taking it for closed paths that are also rectangles. --- impeller/aiks/aiks_unittests.cc | 22 ++++++++++++++++++++++ impeller/display_list/dl_dispatcher.cc | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/impeller/aiks/aiks_unittests.cc b/impeller/aiks/aiks_unittests.cc index e9230e583edfa..ded50128789f8 100644 --- a/impeller/aiks/aiks_unittests.cc +++ b/impeller/aiks/aiks_unittests.cc @@ -1288,6 +1288,28 @@ TEST_P(AiksTest, CanDrawAnOpenPath) { ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); } +TEST_P(AiksTest, CanDrawAnOpenPathThatIsntARect) { + Canvas canvas; + + // Draw a stroked path that is explicitly closed to verify + // It doesn't become a rectangle. + PathBuilder builder; + builder.MoveTo({50, 50}); + builder.LineTo({520, 120}); + builder.LineTo({300, 310}); + builder.LineTo({100, 50}); + builder.Close(); + + Paint paint; + paint.color = Color::Red(); + paint.style = Paint::Style::kStroke; + paint.stroke_width = 10; + + canvas.DrawPath(builder.TakePath(), paint); + + ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); +} + static sk_sp OpenFixtureAsSkData(const char* fixture_name) { auto mapping = flutter::testing::OpenFixtureAsMapping(fixture_name); if (!mapping) { diff --git a/impeller/display_list/dl_dispatcher.cc b/impeller/display_list/dl_dispatcher.cc index 107389deaf715..8f18470b33302 100644 --- a/impeller/display_list/dl_dispatcher.cc +++ b/impeller/display_list/dl_dispatcher.cc @@ -851,7 +851,7 @@ void DlDispatcher::drawPath(const SkPath& path) { // We can't "optimize" a path into a rectangle if it's open. bool closed; - if (path.isRect(&rect, &closed); closed) { + if (path.isRect(&rect, &closed) && closed) { canvas_.DrawRect(skia_conversions::ToRect(rect), paint_); return; } From 7445d5f061685fbb85fcb83e5f0bd7b57abf4132 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 22 Sep 2023 22:15:48 -0400 Subject: [PATCH 250/859] Roll Fuchsia Linux SDK from QcxgV9KlY7j3o3b4j... to PCEkaltiQ-iEKlmEj... (#46221) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jonahwilliams@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index bb839ac9f3ea2..503cf19f8266d 100644 --- a/DEPS +++ b/DEPS @@ -925,7 +925,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'QcxgV9KlY7j3o3b4jzhzTH7yw1xDUfdSnU0UXLuoQEYC' + 'version': 'PCEkaltiQ-iEKlmEj87_RYerXAUaDmwE-bHTqz-I8jMC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index 1300c08186374..beb773ffa1ba3 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: 93ce10008733c672adb8288d199c6631 +Signature: 326261228cd44af2a8f3b82849c78bc5 ==================================================================================================== LIBRARY: fuchsia_sdk From f25392b66eec9f767d44c189c131078c3451590c Mon Sep 17 00:00:00 2001 From: Casey Hillers Date: Fri, 22 Sep 2023 19:15:50 -0700 Subject: [PATCH 251/859] Revert "[Impeller] fail if software backend is chosen and Impeller is enabled on iOS" (#46217) Reverts flutter/engine#46124 See b/301660190. This is breaking a few Google iOS tests due to test bed configurations. We'll need more time to investigate fixing those tests before relanding. --- .../Source/FlutterEnginePlatformViewTest.mm | 13 +- .../Source/FlutterPlatformViewsTest.mm | 126 +++++------------- .../Source/accessibility_bridge_test.mm | 126 +++++------------- shell/platform/darwin/ios/ios_context.mm | 14 +- 4 files changed, 71 insertions(+), 208 deletions(-) diff --git a/shell/platform/darwin/ios/framework/Source/FlutterEnginePlatformViewTest.mm b/shell/platform/darwin/ios/framework/Source/FlutterEnginePlatformViewTest.mm index 516cb8c8c826a..0b5526a5341a2 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterEnginePlatformViewTest.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterEnginePlatformViewTest.mm @@ -72,9 +72,7 @@ - (void)setUp { /*io=*/thread_task_runner); platform_view = std::make_unique( /*delegate=*/fake_delegate, - /*rendering_api=*/fake_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -92,13 +90,8 @@ - (void)tearDown { } - (void)testMsaaSampleCount { - if (fake_delegate.settings_.enable_impeller) { - // Default should be 4 for Impeller. - XCTAssertEqual(platform_view->GetIosContext()->GetMsaaSampleCount(), MsaaSampleCount::kFour); - } else { - // Default should be 1 for Skia. - XCTAssertEqual(platform_view->GetIosContext()->GetMsaaSampleCount(), MsaaSampleCount::kNone); - } + // Default should be 1. + XCTAssertEqual(platform_view->GetIosContext()->GetMsaaSampleCount(), MsaaSampleCount::kNone); // Verify the platform view creates a new context with updated msaa_samples. // Need to use Metal, since this is ignored for Software/GL. diff --git a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViewsTest.mm b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViewsTest.mm index 2d630c870be11..1e6dad56089aa 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViewsTest.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViewsTest.mm @@ -89,7 +89,6 @@ @implementation FlutterPlatformViewsTestMockFlutterPlatformFactory namespace flutter { namespace { class FlutterPlatformViewsTestMockPlatformViewDelegate : public PlatformView::Delegate { - public: void OnPlatformViewCreated(std::unique_ptr surface) override {} void OnPlatformViewDestroyed() override {} void OnPlatformViewScheduleFrame() override {} @@ -118,6 +117,7 @@ void LoadDartDeferredLibraryError(intptr_t loading_unit_id, void UpdateAssetResolverByType(std::unique_ptr updated_asset_resolver, flutter::AssetResolver::AssetResolverType type) override {} + private: flutter::Settings settings_; }; @@ -148,9 +148,7 @@ - (void)testFlutterViewOnlyCreateOnceInOneFrame { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -206,9 +204,7 @@ - (void)testCanCreatePlatformViewWithoutFlutterView { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -262,9 +258,7 @@ - (void)testApplyBackdropFilter { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -336,9 +330,7 @@ - (void)testApplyBackdropFilterWithCorrectFrame { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -410,9 +402,7 @@ - (void)testApplyMultipleBackdropFilters { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -485,9 +475,7 @@ - (void)testAddBackdropFilters { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -600,9 +588,7 @@ - (void)testRemoveBackdropFilters { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -739,9 +725,7 @@ - (void)testEditBackdropFilters { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1018,9 +1002,7 @@ - (void)testApplyBackdropFilterNotDlBlurImageFilter { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1320,9 +1302,7 @@ - (void)testCompositePlatformView { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1378,9 +1358,7 @@ - (void)testBackdropFilterCorrectlyPushedAndReset { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1474,9 +1452,7 @@ - (void)testChildClippingViewShouldBeTheBoundingRectOfPlatformView { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1547,9 +1523,7 @@ - (void)testClipsDoNotInterceptWithPlatformViewShouldNotAddMaskView { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1616,9 +1590,7 @@ - (void)testClipRRectOnlyHasCornersInterceptWithPlatformViewShouldAddMaskView { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1684,9 +1656,7 @@ - (void)testClipRect { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1759,9 +1729,7 @@ - (void)testClipRRect { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1834,9 +1802,7 @@ - (void)testClipPath { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1910,9 +1876,7 @@ - (void)testSetFlutterViewControllerAfterCreateCanStillDispatchTouchEvents { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1976,9 +1940,7 @@ - (void)testSetFlutterViewControllerInTheMiddleOfTouchEventShouldStillAllowGestu auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -2099,9 +2061,7 @@ - (void)testSetFlutterViewControllerInTheMiddleOfTouchEventShouldStillAllowGestu auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -2212,9 +2172,7 @@ - (void)testFlutterPlatformViewTouchesCancelledEventAreForcedToBeCancelled { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -2276,9 +2234,7 @@ - (void)testFlutterPlatformViewControllerSubmitFrameWithoutFlutterViewNotCrashin auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -2340,9 +2296,7 @@ - (void)testFlutterPlatformViewControllerSubmitFrameWithoutFlutterViewNotCrashin auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -2392,9 +2346,7 @@ - (void)testFlutterPlatformViewControllerBeginFrameShouldResetCompisitionOrder { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -2450,9 +2402,7 @@ - (void)testFlutterPlatformViewControllerBeginFrameShouldResetCompisitionOrder { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -2550,9 +2500,7 @@ - (void)testFlutterPlatformViewControllerBeginFrameShouldResetCompisitionOrder { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -2650,9 +2598,7 @@ - (void)testThreadMergeAtEndFrame { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -2806,9 +2752,7 @@ - (void)testClipMaskViewIsReused { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -2890,9 +2834,7 @@ - (void)testDifferentClipMaskViewIsUsedForEachView { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -2992,9 +2934,7 @@ - (void)testDisposingViewInCompositionOrderDoNotCrash { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -3102,9 +3042,7 @@ - (void)testOnlyPlatformViewsAreRemovedWhenReset { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, diff --git a/shell/platform/darwin/ios/framework/Source/accessibility_bridge_test.mm b/shell/platform/darwin/ios/framework/Source/accessibility_bridge_test.mm index e9e598be039ba..ac44da5370b9d 100644 --- a/shell/platform/darwin/ios/framework/Source/accessibility_bridge_test.mm +++ b/shell/platform/darwin/ios/framework/Source/accessibility_bridge_test.mm @@ -73,7 +73,6 @@ @implementation MockFlutterPlatformFactory namespace flutter { namespace { class MockDelegate : public PlatformView::Delegate { - public: void OnPlatformViewCreated(std::unique_ptr surface) override {} void OnPlatformViewDestroyed() override {} void OnPlatformViewScheduleFrame() override {} @@ -102,6 +101,7 @@ void LoadDartDeferredLibraryError(intptr_t loading_unit_id, void UpdateAssetResolverByType(std::unique_ptr updated_asset_resolver, flutter::AssetResolver::AssetResolverType type) override {} + private: flutter::Settings settings_; }; @@ -147,9 +147,7 @@ - (void)testCreate { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -171,9 +169,7 @@ - (void)testUpdateSemanticsEmpty { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -202,9 +198,7 @@ - (void)testUpdateSemanticsOneNode { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -251,9 +245,7 @@ - (void)testIsVoiceOverRunning { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -285,9 +277,7 @@ - (void)testSemanticsDeallocated { std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -346,9 +336,7 @@ - (void)testSemanticsDeallocatedWithoutLoadingView { std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -393,9 +381,7 @@ - (void)testReplacedSemanticsDoesNotCleanupChildren { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -489,9 +475,7 @@ - (void)testScrollableSemanticsDeallocated { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -563,9 +547,7 @@ - (void)testBridgeReplacesSemanticsNode { auto flutterPlatformViewsController = std::make_shared(); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/flutterPlatformViewsController, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -637,9 +619,7 @@ - (void)testAnnouncesRouteChanges { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -707,9 +687,7 @@ - (void)testRadioButtonIsNotSwitchButton { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -756,9 +734,7 @@ - (void)testLayoutChangeWithNonAccessibilityElement { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -842,9 +818,7 @@ - (void)testLayoutChangeDoesCallNativeAccessibility { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -919,9 +893,7 @@ - (void)testLayoutChangeDoesCallNativeAccessibilityWhenFocusChanged { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -995,9 +967,7 @@ - (void)testScrollableSemanticsContainerReturnsCorrectChildren { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1054,9 +1024,7 @@ - (void)testAnnouncesRouteChangesAndLayoutChangeInOneUpdate { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1153,9 +1121,7 @@ - (void)testAnnouncesRouteChangesWhenAddAdditionalRoute { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1241,9 +1207,7 @@ - (void)testAnnouncesRouteChangesRemoveRouteInMiddle { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1335,9 +1299,7 @@ - (void)testHandleEvent { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1381,9 +1343,7 @@ - (void)testAnnouncesRouteChangesWhenNoNamesRoute { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1453,9 +1413,7 @@ - (void)testAnnouncesLayoutChangeWithNilIfLastFocusIsRemoved { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1524,9 +1482,7 @@ - (void)testAnnouncesLayoutChangeWithTheSameItemFocused { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1601,9 +1557,7 @@ - (void)testAnnouncesLayoutChangeWhenFocusMovedOutside { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1680,9 +1634,7 @@ - (void)testAnnouncesScrollChangeWithLastFocused { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1755,9 +1707,7 @@ - (void)testAnnouncesScrollChangeDoesCallNativeAccessibility { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1832,9 +1782,7 @@ - (void)testAnnouncesIgnoresRouteChangesWhenModal { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1891,9 +1839,7 @@ - (void)testAnnouncesIgnoresLayoutChangeWhenModal { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -1955,9 +1901,7 @@ - (void)testAnnouncesIgnoresScrollChangeWhenModal { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -2027,9 +1971,7 @@ - (void)testAccessibilityMessageAfterDeletion { auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -2064,9 +2006,7 @@ - (void)testFlutterSemanticsScrollViewManagedObjectLifecycleCorrectly { /*io=*/thread_task_runner); auto platform_view = std::make_unique( /*delegate=*/mock_delegate, - /*rendering_api=*/mock_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, @@ -2116,9 +2056,7 @@ - (void)testPlatformViewDestructorDoesNotCallSemanticsAPIs { thread_task_runner->PostTask([&] { auto platform_view = std::make_unique( /*delegate=*/test_delegate, - /*rendering_api=*/test_delegate.settings_.enable_impeller - ? flutter::IOSRenderingAPI::kMetal - : flutter::IOSRenderingAPI::kSoftware, + /*rendering_api=*/flutter::IOSRenderingAPI::kSoftware, /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, diff --git a/shell/platform/darwin/ios/ios_context.mm b/shell/platform/darwin/ios/ios_context.mm index 2f58ebb7479a0..007de7a7105fd 100644 --- a/shell/platform/darwin/ios/ios_context.mm +++ b/shell/platform/darwin/ios/ios_context.mm @@ -2,15 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "flutter/shell/platform/darwin/ios/ios_context.h" -#include "flutter/shell/platform/darwin/ios/rendering_api_selection.h" +#import "flutter/shell/platform/darwin/ios/ios_context.h" #include "flutter/fml/logging.h" -#include "flutter/shell/platform/darwin/ios/ios_context_software.h" +#import "flutter/shell/platform/darwin/ios/ios_context_software.h" #if SHELL_ENABLE_METAL -#include "flutter/shell/platform/darwin/ios/ios_context_metal_impeller.h" -#include "flutter/shell/platform/darwin/ios/ios_context_metal_skia.h" +#import "flutter/shell/platform/darwin/ios/ios_context_metal_impeller.h" +#import "flutter/shell/platform/darwin/ios/ios_context_metal_skia.h" #endif // SHELL_ENABLE_METAL namespace flutter { @@ -26,11 +25,6 @@ std::shared_ptr is_gpu_disabled_sync_switch) { switch (api) { case IOSRenderingAPI::kSoftware: - FML_CHECK(backend != IOSRenderingBackend::kImpeller) - << "Software rendering is incompatible with Impeller.\n" - "Software rendering may have been automatically selected when running on a simulator " - "in an environment that does not support Metal. Enabling GPU pass through in your " - "environment may fix this. If that is not possible, then disable Impeller."; return std::make_unique(); #if SHELL_ENABLE_METAL case IOSRenderingAPI::kMetal: From 18c267adc17bed15ffb69b509ede4c42c73faf82 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 22 Sep 2023 23:02:53 -0400 Subject: [PATCH 252/859] Roll Skia from 15ccdeaba011 to 983f42f4c76b (1 revision) (#46223) https://skia.googlesource.com/skia.git/+log/15ccdeaba011..983f42f4c76b 2023-09-22 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from 8ddc74eefa73 to 352858b2283e If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jonahwilliams@google.com,rmistry@google.com,tdenniston@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 503cf19f8266d..21872b0a69369 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '15ccdeaba011c990b4848aa996f7e7d5ca08deb5', + 'skia_revision': '983f42f4c76b14242ebfc0d7d4be4082c1886330', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 580d12b6c3d80bfe9b4f197bca9675fed9d57f43 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Sat, 23 Sep 2023 04:43:21 -0700 Subject: [PATCH 253/859] [ios] Fix default assets url (#46214) When reverting the default asset url code, the old "flutter_assets" path was also copied in https://github.com/flutter/engine/pull/46073 This PR uses the correct URL. Although I'm unsure why the video player test passed before my change for the asset urls. I'm going to take another look at it but meanwhile this PR can unblock the roll once rolled into the framework. fixes of https://github.com/flutter/flutter/issues/135323 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- .../framework/Source/FlutterNSBundleUtils.mm | 2 +- .../Source/FlutterDartProjectTest.mm | 106 +++++++++++++++++- 2 files changed, 105 insertions(+), 3 deletions(-) diff --git a/shell/platform/darwin/common/framework/Source/FlutterNSBundleUtils.mm b/shell/platform/darwin/common/framework/Source/FlutterNSBundleUtils.mm index 4198fd33e0209..9582f94e266e1 100644 --- a/shell/platform/darwin/common/framework/Source/FlutterNSBundleUtils.mm +++ b/shell/platform/darwin/common/framework/Source/FlutterNSBundleUtils.mm @@ -54,7 +54,7 @@ } NSString* FLTAssetPath(NSBundle* bundle) { - return [bundle objectForInfoDictionaryKey:@"FLTAssetsPath"] ?: @"flutter_assets"; + return [bundle objectForInfoDictionaryKey:@"FLTAssetsPath"] ?: kDefaultAssetPath; } NSString* FLTAssetsPathFromBundle(NSBundle* bundle) { diff --git a/shell/platform/darwin/ios/framework/Source/FlutterDartProjectTest.mm b/shell/platform/darwin/ios/framework/Source/FlutterDartProjectTest.mm index 19774d21bc52c..aecab91f0051c 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterDartProjectTest.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterDartProjectTest.mm @@ -102,14 +102,116 @@ - (void)testFLTAssetsURLFromBundle { id mockBundle = OCMClassMock([NSBundle class]); id mockMainBundle = OCMPartialMock([NSBundle mainBundle]); NSString* resultAssetsPath = @"path/to/foo/assets"; - OCMStub([mockBundle pathForResource:@"flutter_assets" ofType:@""]).andReturn(nil); - OCMStub([mockMainBundle pathForResource:@"flutter_assets" ofType:@""]) + OCMStub([mockBundle pathForResource:@"Frameworks/App.framework/flutter_assets" ofType:@""]) + .andReturn(nil); + OCMStub([mockMainBundle pathForResource:@"Frameworks/App.framework/flutter_assets" ofType:@""]) .andReturn(resultAssetsPath); NSString* path = FLTAssetsPathFromBundle(mockBundle); XCTAssertEqualObjects(path, @"path/to/foo/assets"); } } +- (void)testFLTAssetPathReturnsTheCorrectValue { + { + // Found assets path in info.plist + id mockBundle = OCMClassMock([NSBundle class]); + OCMStub([mockBundle objectForInfoDictionaryKey:@"FLTAssetsPath"]).andReturn(@"foo/assets"); + XCTAssertEqualObjects(FLTAssetPath(mockBundle), @"foo/assets"); + } + { + // No assets path in info.plist, use default value + id mockBundle = OCMClassMock([NSBundle class]); + OCMStub([mockBundle objectForInfoDictionaryKey:@"FLTAssetsPath"]).andReturn(nil); + XCTAssertEqualObjects(FLTAssetPath(mockBundle), kDefaultAssetPath); + } +} + +- (void)testLookUpForAssets { + { + id mockBundle = OCMPartialMock([NSBundle mainBundle]); + // Found assets path in info.plist + OCMStub([mockBundle objectForInfoDictionaryKey:@"FLTAssetsPath"]).andReturn(@"foo/assets"); + NSString* assetsPath = [FlutterDartProject lookupKeyForAsset:@"bar"]; + // This is testing public API, changing this assert is likely to break plugins. + XCTAssertEqualObjects(assetsPath, @"foo/assets/bar"); + [mockBundle stopMocking]; + } + { + id mockBundle = OCMPartialMock([NSBundle mainBundle]); + // No assets path in info.plist, use default value + OCMStub([mockBundle objectForInfoDictionaryKey:@"FLTAssetsPath"]).andReturn(nil); + NSString* assetsPath = [FlutterDartProject lookupKeyForAsset:@"bar"]; + // This is testing public API, changing this assert is likely to break plugins. + XCTAssertEqualObjects(assetsPath, @"Frameworks/App.framework/flutter_assets/bar"); + [mockBundle stopMocking]; + } +} + +- (void)testLookUpForAssetsFromBundle { + { + id mockBundle = OCMClassMock([NSBundle class]); + // Found assets path in info.plist + OCMStub([mockBundle objectForInfoDictionaryKey:@"FLTAssetsPath"]).andReturn(@"foo/assets"); + NSString* assetsPath = [FlutterDartProject lookupKeyForAsset:@"bar" fromBundle:mockBundle]; + // This is testing public API, changing this assert is likely to break plugins. + XCTAssertEqualObjects(assetsPath, @"foo/assets/bar"); + } + { + // No assets path in info.plist, use default value + id mockBundle = OCMClassMock([NSBundle class]); + OCMStub([mockBundle objectForInfoDictionaryKey:@"FLTAssetsPath"]).andReturn(nil); + NSString* assetsPath = [FlutterDartProject lookupKeyForAsset:@"bar" fromBundle:mockBundle]; + // This is testing public API, changing this assert is likely to break plugins. + XCTAssertEqualObjects(assetsPath, @"Frameworks/App.framework/flutter_assets/bar"); + } +} + +- (void)testLookUpForAssetsFromPackage { + { + id mockBundle = OCMPartialMock([NSBundle mainBundle]); + // Found assets path in info.plist + OCMStub([mockBundle objectForInfoDictionaryKey:@"FLTAssetsPath"]).andReturn(@"foo/assets"); + NSString* assetsPath = [FlutterDartProject lookupKeyForAsset:@"bar" fromPackage:@"bar_package"]; + // This is testing public API, changing this assert is likely to break plugins. + XCTAssertEqualObjects(assetsPath, @"foo/assets/packages/bar_package/bar"); + [mockBundle stopMocking]; + } + { + id mockBundle = OCMPartialMock([NSBundle mainBundle]); + // No assets path in info.plist, use default value + OCMStub([mockBundle objectForInfoDictionaryKey:@"FLTAssetsPath"]).andReturn(nil); + NSString* assetsPath = [FlutterDartProject lookupKeyForAsset:@"bar" fromPackage:@"bar_package"]; + // This is testing public API, changing this assert is likely to break plugins. + XCTAssertEqualObjects(assetsPath, + @"Frameworks/App.framework/flutter_assets/packages/bar_package/bar"); + [mockBundle stopMocking]; + } +} + +- (void)testLookUpForAssetsFromPackageFromBundle { + { + id mockBundle = OCMClassMock([NSBundle class]); + // Found assets path in info.plist + OCMStub([mockBundle objectForInfoDictionaryKey:@"FLTAssetsPath"]).andReturn(@"foo/assets"); + NSString* assetsPath = [FlutterDartProject lookupKeyForAsset:@"bar" + fromPackage:@"bar_package" + fromBundle:mockBundle]; + // This is testing public API, changing this assert is likely to break plugins. + XCTAssertEqualObjects(assetsPath, @"foo/assets/packages/bar_package/bar"); + } + { + id mockBundle = OCMClassMock([NSBundle class]); + // No assets path in info.plist, use default value + OCMStub([mockBundle objectForInfoDictionaryKey:@"FLTAssetsPath"]).andReturn(nil); + NSString* assetsPath = [FlutterDartProject lookupKeyForAsset:@"bar" + fromPackage:@"bar_package" + fromBundle:mockBundle]; + // This is testing public API, changing this assert is likely to break plugins. + XCTAssertEqualObjects(assetsPath, + @"Frameworks/App.framework/flutter_assets/packages/bar_package/bar"); + } +} + - (void)testDisableImpellerSettingIsCorrectlyParsed { id mockMainBundle = OCMPartialMock([NSBundle mainBundle]); OCMStub([mockMainBundle objectForInfoDictionaryKey:@"FLTEnableImpeller"]).andReturn(@"NO"); From e05e1ab16c5661c5c71078892ebf0b150b890d90 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 23 Sep 2023 09:55:22 -0400 Subject: [PATCH 254/859] Roll Fuchsia Mac SDK from M9rDyhmn7VY4iTxzQ... to de4D1aoqF6LBk18Rd... (#46229) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jonahwilliams@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 21872b0a69369..1f50158749e2a 100644 --- a/DEPS +++ b/DEPS @@ -915,7 +915,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'M9rDyhmn7VY4iTxzQo1aLY0ssV6IYwx61YrXw9IOomAC' + 'version': 'de4D1aoqF6LBk18Rdjpzg5wqU3L3U2RCowLPHUUmnVMC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 3acf9e249cc80ff1861e732056d03eaca71c2142 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 23 Sep 2023 13:47:24 -0400 Subject: [PATCH 255/859] Roll Fuchsia Linux SDK from PCEkaltiQ-iEKlmEj... to M-fNM9YP2Lpc8Y_Dj... (#46231) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jonahwilliams@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 1f50158749e2a..fbda7ca56825c 100644 --- a/DEPS +++ b/DEPS @@ -925,7 +925,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'PCEkaltiQ-iEKlmEj87_RYerXAUaDmwE-bHTqz-I8jMC' + 'version': 'M-fNM9YP2Lpc8Y_Dj7W2nZ4xcbMR2TFzh0DY-bGs0MEC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index beb773ffa1ba3..8b935d29c38a3 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: 326261228cd44af2a8f3b82849c78bc5 +Signature: 83810fc792f7290d723d1f4c4a2d65eb ==================================================================================================== LIBRARY: fuchsia_sdk From 0b86182cd269aba2d478132b52d72f87858bfbc7 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 23 Sep 2023 22:31:28 -0400 Subject: [PATCH 256/859] Roll Fuchsia Mac SDK from de4D1aoqF6LBk18Rd... to W1uZC0_FbXyoCmwJ1... (#46238) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jonahwilliams@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index fbda7ca56825c..5107c60f4031c 100644 --- a/DEPS +++ b/DEPS @@ -915,7 +915,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'de4D1aoqF6LBk18Rdjpzg5wqU3L3U2RCowLPHUUmnVMC' + 'version': 'W1uZC0_FbXyoCmwJ17DM5CSvCQ-f3VF-Y3QuN_WB2eoC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 192cf5c745afc0459f095862b16ed00f19bc5de9 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sun, 24 Sep 2023 02:36:25 -0400 Subject: [PATCH 257/859] Roll Fuchsia Linux SDK from M-fNM9YP2Lpc8Y_Dj... to SqWjDvrDsMfiisUoA... (#46239) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jonahwilliams@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 5107c60f4031c..04673b16eecf8 100644 --- a/DEPS +++ b/DEPS @@ -925,7 +925,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'M-fNM9YP2Lpc8Y_Dj7W2nZ4xcbMR2TFzh0DY-bGs0MEC' + 'version': 'SqWjDvrDsMfiisUoAytmRbKOTo-E0fC6ajsyUXVRrckC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index 8b935d29c38a3..53dc415a52861 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: 83810fc792f7290d723d1f4c4a2d65eb +Signature: 09e00221d1276a03aee3895d2a3c484a ==================================================================================================== LIBRARY: fuchsia_sdk From fd0a7bb549465505b0ecd00f7dd5561ddd48f855 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sun, 24 Sep 2023 11:10:37 -0400 Subject: [PATCH 258/859] Roll Fuchsia Mac SDK from W1uZC0_FbXyoCmwJ1... to 0Jl20zAW45rRsTNEu... (#46240) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jonahwilliams@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 04673b16eecf8..383aab1b45945 100644 --- a/DEPS +++ b/DEPS @@ -915,7 +915,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'W1uZC0_FbXyoCmwJ17DM5CSvCQ-f3VF-Y3QuN_WB2eoC' + 'version': '0Jl20zAW45rRsTNEuuX3QIp835kbZeZevlzjb6BT7PYC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From b8ba380a6f23df21fa6b22d3e047befe85d65659 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sun, 24 Sep 2023 15:15:39 -0400 Subject: [PATCH 259/859] Roll Fuchsia Linux SDK from SqWjDvrDsMfiisUoA... to VKAiabs4VzJ1Py-oA... (#46241) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jonahwilliams@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 383aab1b45945..9bdf0077865bf 100644 --- a/DEPS +++ b/DEPS @@ -925,7 +925,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'SqWjDvrDsMfiisUoAytmRbKOTo-E0fC6ajsyUXVRrckC' + 'version': 'VKAiabs4VzJ1Py-oAN6-gffPf6vdWYlXuxYr8qboThQC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', From 54faf5958ec5367af696cd6753ea4f765b760128 Mon Sep 17 00:00:00 2001 From: Zachary Anderson Date: Sun, 24 Sep 2023 18:22:27 -0700 Subject: [PATCH 260/859] In run_tests.py, separate Dart package unit tests from other tests (#46232) This PR creates a new test type for `run_tests.py` called `dart-host`. The tests remaining under the `dart` type are tests that run in `flutter_tester`. The `dart-host` tests run in the Dart CLI. This allows `run_tests.py` to be simplified a bit, and while doing this I spotted a couple of mistakes that were causing some tests not to run. This PR also makes a couple of small style fixes to the build config json files, converting tabs to spaces, and moving some "script" fields before the "parameters" fields. --- ci/builders/linux_android_debug_engine.json | 8 +- ci/builders/linux_fuchsia.json | 2 +- ci/builders/linux_host_engine.json | 28 +- ci/builders/linux_unopt.json | 14 +- ci/builders/mac_android_aot_engine.json | 12 +- ci/builders/mac_clang_tidy.json | 4 +- ci/builders/mac_host_engine.json | 18 +- ci/builders/mac_unopt.json | 18 +- .../standalone/linux_android_emulator.json | 22 +- ci/builders/standalone/linux_license.json | 2 +- ci/builders/standalone/windows_unopt.json | 4 +- ci/builders/windows_host_engine.json | 4 +- testing/run_tests.py | 318 +++++------------- .../test/engine_repo_tools_test.dart | 38 ++- 14 files changed, 186 insertions(+), 306 deletions(-) diff --git a/ci/builders/linux_android_debug_engine.json b/ci/builders/linux_android_debug_engine.json index 89566df798d8e..7d3b62ef31091 100644 --- a/ci/builders/linux_android_debug_engine.json +++ b/ci/builders/linux_android_debug_engine.json @@ -38,6 +38,7 @@ { "language": "python3", "name": "Host Tests for android_jit_release_x86", + "script": "flutter/testing/run_tests.py", "parameters": [ "--variant", "android_jit_release_x86", @@ -46,8 +47,7 @@ "--engine-capture-core-dump", "--android-variant", "android_jit_release_x86" - ], - "script": "flutter/testing/run_tests.py" + ] } ] }, @@ -93,6 +93,7 @@ { "language": "python3", "name": "Host Tests for android_debug", + "script": "flutter/testing/run_tests.py", "parameters": [ "--variant", "android_debug", @@ -101,8 +102,7 @@ "--engine-capture-core-dump", "--android-variant", "android_debug" - ], - "script": "flutter/testing/run_tests.py" + ] } ] }, diff --git a/ci/builders/linux_fuchsia.json b/ci/builders/linux_fuchsia.json index ef964c68b01aa..e79853486b2f9 100644 --- a/ci/builders/linux_fuchsia.json +++ b/ci/builders/linux_fuchsia.json @@ -154,7 +154,7 @@ "--engine-version", "${REVISION}", "--skip-build", - "--upload" + "--upload" ], "script": "flutter/tools/fuchsia/build_fuchsia_artifacts.py", "language": "python3" diff --git a/ci/builders/linux_host_engine.json b/ci/builders/linux_host_engine.json index 97f535aa1a0bb..aae0ac2835190 100644 --- a/ci/builders/linux_host_engine.json +++ b/ci/builders/linux_host_engine.json @@ -53,14 +53,14 @@ { "language": "python3", "name": "Host Tests for host_debug_impeller_vulkan", + "script": "flutter/testing/run_tests.py", "parameters": [ "--variant", "host_debug_impeller_vulkan", "--type", "impeller-vulkan", "--engine-capture-core-dump" - ], - "script": "flutter/testing/run_tests.py" + ] } ] }, @@ -110,14 +110,14 @@ { "language": "python3", "name": "Host Tests for host_debug", + "script": "flutter/testing/run_tests.py", "parameters": [ "--variant", "host_debug", "--type", - "dart", + "dart,dart-host", "--engine-capture-core-dump" - ], - "script": "flutter/testing/run_tests.py" + ] } ] }, @@ -158,14 +158,14 @@ { "language": "python3", "name": "Host Tests for host_profile", + "script": "flutter/testing/run_tests.py", "parameters": [ "--variant", "host_profile", "--type", - "dart,engine", + "dart,dart-host,engine", "--engine-capture-core-dump" - ], - "script": "flutter/testing/run_tests.py" + ] } ] }, @@ -216,14 +216,14 @@ { "language": "python3", "name": "Host Tests for host_release", + "script": "flutter/testing/run_tests.py", "parameters": [ "--variant", "host_release", "--type", - "dart,engine,benchmarks", + "dart,dart-host,engine,benchmarks", "--engine-capture-core-dump" - ], - "script": "flutter/testing/run_tests.py" + ] }, { "language": "bash", @@ -233,10 +233,10 @@ { "language": "bash", "name": "Upload metrics dry-run", - "parameters": [ + "script": "flutter/testing/benchmark/upload_metrics.sh", + "parameters": [ "--no-upload" - ], - "script": "flutter/testing/benchmark/upload_metrics.sh" + ] } ] } diff --git a/ci/builders/linux_unopt.json b/ci/builders/linux_unopt.json index 2570f491dbf1e..4274c03223bc3 100644 --- a/ci/builders/linux_unopt.json +++ b/ci/builders/linux_unopt.json @@ -38,15 +38,15 @@ { "language": "python3", "name": "test: Host_Tests_for_host_debug_unopt", + "script": "flutter/testing/run_tests.py", "parameters": [ "--variant", "host_debug_unopt", "--type", - "dart,engine", + "dart,dart-host,engine", "--engine-capture-core-dump", "--use-sanitizer-suppressions" - ], - "script": "flutter/testing/run_tests.py" + ] }, { "name": "analyze_dart_ui", @@ -104,6 +104,7 @@ { "language": "python3", "name": "test: Host Tests for android_debug_unopt", + "script": "flutter/testing/run_tests.py", "parameters": [ "--variant", "android_debug_unopt", @@ -112,20 +113,19 @@ "--engine-capture-core-dump", "--android-variant", "android_debug_unopt" - ], - "script": "flutter/testing/run_tests.py" + ] }, { "language": "python3", "name": "malioc diff", + "script": "flutter/impeller/tools/malioc_diff.py", "parameters": [ "--before-relative-to-src", "flutter/impeller/tools/malioc.json", "--after-relative-to-src", "out/android_debug_unopt/gen/malioc", "--print-diff" - ], - "script": "flutter/impeller/tools/malioc_diff.py" + ] } ] } diff --git a/ci/builders/mac_android_aot_engine.json b/ci/builders/mac_android_aot_engine.json index 7f2f8861ab2dd..f59354f1078b5 100644 --- a/ci/builders/mac_android_aot_engine.json +++ b/ci/builders/mac_android_aot_engine.json @@ -9,7 +9,7 @@ "out/android_profile/zip_archives/android-arm-profile/darwin-x64.zip" ], "name": "android_profile", - "realm": "production" + "realm": "production" } ], "drone_dimensions": [ @@ -48,7 +48,7 @@ "out/android_profile_arm64/zip_archives/android-arm64-profile/darwin-x64.zip" ], "name": "android_profile_arm64", - "realm": "production" + "realm": "production" } ], "drone_dimensions": [ @@ -88,7 +88,7 @@ "out/android_profile_x64/zip_archives/android-x64-profile/darwin-x64.zip" ], "name": "android_profile_x64", - "realm": "production" + "realm": "production" } ], "drone_dimensions": [ @@ -128,7 +128,7 @@ "out/android_release/zip_archives/android-arm-release/darwin-x64.zip" ], "name": "android_release", - "realm": "production" + "realm": "production" } ], "drone_dimensions": [ @@ -167,7 +167,7 @@ "out/android_release_arm64/zip_archives/android-arm64-release/darwin-x64.zip" ], "name": "android_release_arm64", - "realm": "production" + "realm": "production" } ], "drone_dimensions": [ @@ -207,7 +207,7 @@ "out/android_release_x64/zip_archives/android-x64-release/darwin-x64.zip" ], "name": "android_release_x64", - "realm": "production" + "realm": "production" } ], "drone_dimensions": [ diff --git a/ci/builders/mac_clang_tidy.json b/ci/builders/mac_clang_tidy.json index 412c3662ab7fb..f68aa4028f3b8 100644 --- a/ci/builders/mac_clang_tidy.json +++ b/ci/builders/mac_clang_tidy.json @@ -72,7 +72,7 @@ "--shard-id=0", "--shard-variants=host_debug,host_debug,host_debug" ], - "max_attempts": 1, + "max_attempts": 1, "script": "flutter/ci/clang_tidy.sh" } ] @@ -201,7 +201,7 @@ "--shard-id=0", "--shard-variants=host_debug" ], - "max_attempts": 1, + "max_attempts": 1, "script": "flutter/ci/clang_tidy.sh" } ] diff --git a/ci/builders/mac_host_engine.json b/ci/builders/mac_host_engine.json index cc3a336302a50..aca28e9280962 100644 --- a/ci/builders/mac_host_engine.json +++ b/ci/builders/mac_host_engine.json @@ -54,14 +54,14 @@ { "language": "python3", "name": "Host Tests for host_debug", + "script": "flutter/testing/run_tests.py", "parameters": [ "--variant", "host_debug", "--type", - "dart,engine", + "dart,dart-host,engine", "--engine-capture-core-dump" - ], - "script": "flutter/testing/run_tests.py" + ] } ] }, @@ -113,14 +113,14 @@ { "language": "python3", "name": "Host Tests for host_profile", + "script": "flutter/testing/run_tests.py", "parameters": [ "--variant", "host_profile", "--type", - "dart,engine", + "dart,dart-host,engine", "--engine-capture-core-dump" - ], - "script": "flutter/testing/run_tests.py" + ] } ] }, @@ -183,13 +183,13 @@ { "language": "python3", "name": "Impeller-golden, dart and engine tests for host_release", + "script": "flutter/testing/run_tests.py", "parameters": [ "--variant", "host_release", "--type", - "dart,engine,impeller-golden" - ], - "script": "flutter/testing/run_tests.py" + "dart,dart-host,engine,impeller-golden" + ] } ] }, diff --git a/ci/builders/mac_unopt.json b/ci/builders/mac_unopt.json index 4d372bc615424..480b96a5c699d 100644 --- a/ci/builders/mac_unopt.json +++ b/ci/builders/mac_unopt.json @@ -40,14 +40,14 @@ { "language": "python3", "name": "Host Tests for host_debug_unopt", + "script": "flutter/testing/run_tests.py", "parameters": [ "--variant", "host_debug_unopt", "--type", - "dart,engine", + "dart,dart-host,engine", "--engine-capture-core-dump" - ], - "script": "flutter/testing/run_tests.py" + ] } ] }, @@ -96,6 +96,7 @@ { "language": "python3", "name": "Tests for ios_debug_sim", + "script": "flutter/testing/run_tests.py", "parameters": [ "--variant", "ios_debug_sim", @@ -104,8 +105,7 @@ "--engine-capture-core-dump", "--ios-variant", "ios_debug_sim" - ], - "script": "flutter/testing/run_tests.py" + ] }, { "name": "Scenario App Integration Tests", @@ -205,6 +205,7 @@ { "language": "python3", "name": "Tests for ios_debug_sim_arm64", + "script": "flutter/testing/run_tests.py", "parameters": [ "--variant", "ios_debug_sim_arm64", @@ -213,8 +214,7 @@ "--engine-capture-core-dump", "--ios-variant", "ios_debug_sim_arm64" - ], - "script": "flutter/testing/run_tests.py" + ] }, { "name": "Scenario App Integration Tests", @@ -276,6 +276,7 @@ { "language": "python3", "name": "Tests for ios_debug_sim_arm64_extension_safe", + "script": "flutter/testing/run_tests.py", "parameters": [ "--variant", "ios_debug_sim_arm64_extension_safe", @@ -284,8 +285,7 @@ "--engine-capture-core-dump", "--ios-variant", "ios_debug_sim_arm64_extension_safe" - ], - "script": "flutter/testing/run_tests.py" + ] }, { "name": "Scenario App Integration Tests", diff --git a/ci/builders/standalone/linux_android_emulator.json b/ci/builders/standalone/linux_android_emulator.json index 9166236d97233..b2fe54629a9b0 100644 --- a/ci/builders/standalone/linux_android_emulator.json +++ b/ci/builders/standalone/linux_android_emulator.json @@ -25,13 +25,13 @@ "contexts": [ "android_virtual_device" ], - "parameters": [ - "--android-variant", - "android_debug_x64", - "--type", - "android" - ], - "script": "flutter/testing/run_tests.py" + "script": "flutter/testing/run_tests.py", + "parameters": [ + "--android-variant", + "android_debug_x64", + "--type", + "android" + ] }, { "language": "bash", @@ -39,10 +39,10 @@ "contexts": [ "android_virtual_device" ], - "parameters": [ - "android_debug_x64" - ], - "script": "flutter/testing/scenario_app/run_android_tests.sh" + "script": "flutter/testing/scenario_app/run_android_tests.sh", + "parameters": [ + "android_debug_x64" + ] } ] } diff --git a/ci/builders/standalone/linux_license.json b/ci/builders/standalone/linux_license.json index 15a792c79b89b..494d401cccee2 100644 --- a/ci/builders/standalone/linux_license.json +++ b/ci/builders/standalone/linux_license.json @@ -11,7 +11,7 @@ "tests": [ { "name": "licenses check", - "max_attempts": 1, + "max_attempts": 1, "script": "flutter/ci/licenses.sh" } ] diff --git a/ci/builders/standalone/windows_unopt.json b/ci/builders/standalone/windows_unopt.json index 70839194ae0d9..2508f4507d663 100644 --- a/ci/builders/standalone/windows_unopt.json +++ b/ci/builders/standalone/windows_unopt.json @@ -26,14 +26,14 @@ { "language": "python3", "name": "test: Host Tests for host_debug_unopt", + "script": "flutter/testing/run_tests.py", "parameters": [ "--variant", "host_debug_unopt", "--type", "engine", "--engine-capture-core-dump" - ], - "script": "flutter/testing/run_tests.py" + ] } ] } diff --git a/ci/builders/windows_host_engine.json b/ci/builders/windows_host_engine.json index 729d62bdcfec9..12c4542b85496 100644 --- a/ci/builders/windows_host_engine.json +++ b/ci/builders/windows_host_engine.json @@ -46,13 +46,13 @@ { "language": "python3", "name": "Host Tests for host_debug", + "script": "flutter/testing/run_tests.py", "parameters": [ "--variant", "host_debug", "--type", "engine" - ], - "script": "flutter/testing/run_tests.py" + ] } ] }, diff --git a/testing/run_tests.py b/testing/run_tests.py index 9c4a6c254dbc3..9a0e24f4f1022 100755 --- a/testing/run_tests.py +++ b/testing/run_tests.py @@ -863,83 +863,85 @@ def gather_dart_tests(build_dir, test_filter): yield gather_dart_test(build_dir, dart_test_file, False) -def gather_dart_smoke_test(build_dir): +def gather_dart_smoke_test(build_dir, test_filter): smoke_test = os.path.join( - BUILDROOT_DIR, 'flutter', 'testing', 'smoke_test_failure', - 'fail_test.dart' + BUILDROOT_DIR, + 'flutter', + 'testing', + 'smoke_test_failure', + 'fail_test.dart', ) - yield gather_dart_test(build_dir, smoke_test, True, expect_failure=True) - yield gather_dart_test(build_dir, smoke_test, False, expect_failure=True) + if test_filter is not None and os.path.basename(smoke_test + ) not in test_filter: + logger.info("Skipping '%s' due to filter.", smoke_test) + else: + yield gather_dart_test(build_dir, smoke_test, True, expect_failure=True) + yield gather_dart_test(build_dir, smoke_test, False, expect_failure=True) -def gather_front_end_server_tests(build_dir): - test_dir = os.path.join(BUILDROOT_DIR, 'flutter', 'flutter_frontend_server') - dart_tests = glob.glob('%s/test/*_test.dart' % test_dir) +def gather_dart_package_tests(build_dir, package_path, extra_opts): + dart_tests = glob.glob('%s/test/*_test.dart' % package_path) + if not dart_tests: + raise Exception('No tests found for Dart package at %s' % package_path) for dart_test_file in dart_tests: - opts = [ - '--disable-dart-dev', dart_test_file, build_dir, - os.path.join(build_dir, 'gen', 'frontend_server.dart.snapshot'), - os.path.join(build_dir, 'flutter_patched_sdk') - ] + opts = ['--disable-dart-dev', dart_test_file] + extra_opts yield EngineExecutableTask( build_dir, os.path.join('dart-sdk', 'bin', 'dart'), None, flags=opts, - cwd=test_dir + cwd=package_path ) -def gather_path_ops_tests(build_dir): - # TODO(dnfield): https://github.com/flutter/flutter/issues/107321 - if is_asan(build_dir): - return - - test_dir = os.path.join( - BUILDROOT_DIR, 'flutter', 'tools', 'path_ops', 'dart', 'test' - ) - opts = ['--disable-dart-dev', os.path.join(test_dir, 'path_ops_test.dart')] - yield EngineExecutableTask( - build_dir, - os.path.join('dart-sdk', 'bin', 'dart'), - None, - flags=opts, - cwd=test_dir - ) - - -def gather_const_finder_tests(build_dir): - test_dir = os.path.join( - BUILDROOT_DIR, 'flutter', 'tools', 'const_finder', 'test' - ) - opts = [ - '--disable-dart-dev', - os.path.join(test_dir, 'const_finder_test.dart'), - os.path.join(build_dir, 'gen', 'frontend_server.dart.snapshot'), - os.path.join(build_dir, 'flutter_patched_sdk'), - os.path.join(build_dir, 'dart-sdk', 'lib', 'libraries.json') +# Returns a list of Dart packages to test. +# +# The first element of each tuple in the returned list is the path to the Dart +# package to test. It is assumed that the packages follow the convention that +# tests are named as '*_test.dart', and reside under a directory called 'test'. +# +# The second element of each tuple is a list of additional command line +# arguments to pass to each of the packages tests. +def build_dart_host_test_list(build_dir): + dart_host_tests = [ + ( + os.path.join('flutter', 'ci'), + [os.path.join(BUILDROOT_DIR, 'flutter')], + ), + ( + os.path.join('flutter', 'flutter_frontend_server'), + [ + build_dir, + os.path.join(build_dir, 'gen', 'frontend_server.dart.snapshot'), + os.path.join(build_dir, 'flutter_patched_sdk') + ], + ), + (os.path.join('flutter', 'testing', 'litetest'), []), + ( + os.path.join('flutter', 'tools', 'api_check'), + [os.path.join(BUILDROOT_DIR, 'flutter')], + ), + (os.path.join('flutter', 'tools', 'build_bucket_golden_scraper'), []), + (os.path.join('flutter', 'tools', 'clang_tidy'), []), + ( + os.path.join('flutter', 'tools', 'const_finder'), + [ + os.path.join(build_dir, 'gen', 'frontend_server.dart.snapshot'), + os.path.join(build_dir, 'flutter_patched_sdk'), + os.path.join(build_dir, 'dart-sdk', 'lib', 'libraries.json'), + ], + ), + (os.path.join('flutter', 'tools', 'githooks'), []), + (os.path.join('flutter', 'tools', 'pkg', 'engine_build_configs'), []), + (os.path.join('flutter', 'tools', 'pkg', 'engine_repo_tools'), []), + (os.path.join('flutter', 'tools', 'pkg', 'git_repo_tools'), []), ] - yield EngineExecutableTask( - build_dir, - os.path.join('dart-sdk', 'bin', 'dart'), - None, - flags=opts, - cwd=test_dir - ) - + if not is_asan(build_dir): + dart_host_tests += [ + (os.path.join('flutter', 'tools', 'path_ops', 'dart'), []), + ] -def gather_litetest_tests(build_dir): - test_dir = os.path.join(BUILDROOT_DIR, 'flutter', 'testing', 'litetest') - dart_tests = glob.glob('%s/test/*_test.dart' % test_dir) - for dart_test_file in dart_tests: - opts = ['--disable-dart-dev', dart_test_file] - yield EngineExecutableTask( - build_dir, - os.path.join('dart-sdk', 'bin', 'dart'), - None, - flags=opts, - cwd=test_dir - ) + return dart_host_tests def run_benchmark_tests(build_dir): @@ -956,157 +958,6 @@ def run_benchmark_tests(build_dir): ) -def gather_githooks_tests(build_dir): - test_dir = os.path.join(BUILDROOT_DIR, 'flutter', 'tools', 'githooks') - dart_tests = glob.glob('%s/test/*_test.dart' % test_dir) - for dart_test_file in dart_tests: - opts = ['--disable-dart-dev', dart_test_file] - yield EngineExecutableTask( - build_dir, - os.path.join('dart-sdk', 'bin', 'dart'), - None, - flags=opts, - cwd=test_dir - ) - - -def gather_clang_tidy_tests(build_dir): - test_dir = os.path.join(BUILDROOT_DIR, 'flutter', 'tools', 'clang_tidy') - dart_tests = glob.glob('%s/test/*_test.dart' % test_dir) - for dart_test_file in dart_tests: - opts = [ - '--disable-dart-dev', dart_test_file, - os.path.join(build_dir, 'compile_commands.json'), - os.path.join(BUILDROOT_DIR, 'flutter') - ] - yield EngineExecutableTask( - build_dir, - os.path.join('dart-sdk', 'bin', 'dart'), - None, - flags=opts, - cwd=test_dir - ) - - -def gather_build_bucket_golden_scraper_tests(build_dir): - test_dir = os.path.join( - BUILDROOT_DIR, 'flutter', 'tools', 'build_bucket_golden_scraper' - ) - dart_tests = glob.glob('%s/test/*_test.dart' % test_dir) - for dart_test_file in dart_tests: - opts = [ - '--disable-dart-dev', - dart_test_file, - ] - yield EngineExecutableTask( - build_dir, - os.path.join('dart-sdk', 'bin', 'dart'), - None, - flags=opts, - cwd=test_dir - ) - - -def gather_engine_build_configs_tests(build_dir): - test_dir = os.path.join( - BUILDROOT_DIR, 'flutter', 'tools', 'pkg', 'engine_build_configs' - ) - dart_tests = glob.glob('%s/*_test.dart' % test_dir) - for dart_test_file in dart_tests: - opts = [ - '--disable-dart-dev', - dart_test_file, - ] - yield EngineExecutableTask( - build_dir, - os.path.join('dart-sdk', 'bin', 'dart'), - None, - flags=opts, - cwd=test_dir - ) - - -def gather_engine_repo_tools_tests(build_dir): - test_dir = os.path.join( - BUILDROOT_DIR, 'flutter', 'tools', 'pkg', 'engine_repo_tools' - ) - dart_tests = glob.glob('%s/*_test.dart' % test_dir) - for dart_test_file in dart_tests: - opts = [ - '--disable-dart-dev', - dart_test_file, - ] - yield EngineExecutableTask( - build_dir, - os.path.join('dart-sdk', 'bin', 'dart'), - None, - flags=opts, - cwd=test_dir - ) - - -def gather_git_repo_tools_tests(build_dir): - test_dir = os.path.join( - BUILDROOT_DIR, 'flutter', 'tools', 'pkg', 'git_repo_tools' - ) - dart_tests = glob.glob('%s/*_test.dart' % test_dir) - for dart_test_file in dart_tests: - opts = [ - '--disable-dart-dev', - dart_test_file, - ] - yield EngineExecutableTask( - build_dir, - os.path.join('dart-sdk', 'bin', 'dart'), - None, - flags=opts, - cwd=test_dir - ) - - -def gather_api_consistency_tests(build_dir): - test_dir = os.path.join(BUILDROOT_DIR, 'flutter', 'tools', 'api_check') - dart_tests = glob.glob('%s/test/*_test.dart' % test_dir) - for dart_test_file in dart_tests: - opts = [ - '--disable-dart-dev', dart_test_file, - os.path.join(BUILDROOT_DIR, 'flutter') - ] - yield EngineExecutableTask( - build_dir, - os.path.join('dart-sdk', 'bin', 'dart'), - None, - flags=opts, - cwd=test_dir - ) - - -def gather_ci_tests(build_dir): - test_dir = os.path.join(BUILDROOT_DIR, 'flutter', 'ci') - dart_tests = glob.glob('%s/test/*_test.dart' % test_dir) - - run_engine_executable( - build_dir, - os.path.join('dart-sdk', 'bin', 'dart'), - None, - flags=['pub', 'get', '--offline'], - cwd=test_dir, - ) - - for dart_test_file in dart_tests: - opts = [ - '--disable-dart-dev', dart_test_file, - os.path.join(BUILDROOT_DIR, 'flutter') - ] - yield EngineExecutableTask( - build_dir, - os.path.join('dart-sdk', 'bin', 'dart'), - None, - flags=opts, - cwd=test_dir - ) - - def worker_init(queue, level): queue_handler = logging.handlers.QueueHandler(queue) log = logging.getLogger(__name__) @@ -1204,6 +1055,7 @@ def main(): all_types = [ 'engine', 'dart', + 'dart-host', 'benchmarks', 'java', 'android', @@ -1236,7 +1088,13 @@ def main(): '--dart-filter', type=str, default='', - help='A list of Dart test scripts to run.' + help='A list of Dart test scripts to run in flutter_tester.' + ) + parser.add_argument( + '--dart-host-filter', + type=str, + default='', + help='A list of Dart test scripts to run with the Dart CLI.' ) parser.add_argument( '--java-filter', @@ -1367,22 +1225,28 @@ def main(): if 'dart' in types: dart_filter = args.dart_filter.split(',') if args.dart_filter else None - tasks = list(gather_dart_smoke_test(build_dir)) - tasks += list(gather_litetest_tests(build_dir)) - tasks += list(gather_githooks_tests(build_dir)) - tasks += list(gather_clang_tidy_tests(build_dir)) - tasks += list(gather_build_bucket_golden_scraper_tests(build_dir)) - tasks += list(gather_engine_build_configs_tests(build_dir)) - tasks += list(gather_engine_repo_tools_tests(build_dir)) - tasks += list(gather_git_repo_tools_tests(build_dir)) - tasks += list(gather_api_consistency_tests(build_dir)) - tasks += list(gather_path_ops_tests(build_dir)) - tasks += list(gather_const_finder_tests(build_dir)) - tasks += list(gather_front_end_server_tests(build_dir)) - tasks += list(gather_ci_tests(build_dir)) + tasks = list(gather_dart_smoke_test(build_dir, dart_filter)) tasks += list(gather_dart_tests(build_dir, dart_filter)) success = success and run_engine_tasks_in_parallel(tasks) + if 'dart-host' in types: + dart_filter = args.dart_host_filter.split( + ',' + ) if args.dart_host_filter else None + dart_host_packages = build_dart_host_test_list(build_dir) + tasks = [] + for dart_host_package, extra_opts in dart_host_packages: + if dart_filter is None or dart_host_package in dart_filter: + tasks += list( + gather_dart_package_tests( + build_dir, + os.path.join(BUILDROOT_DIR, dart_host_package), + extra_opts, + ) + ) + + success = success and run_engine_tasks_in_parallel(tasks) + if 'java' in types: assert not is_windows( ), "Android engine files can't be compiled on Windows." diff --git a/tools/pkg/engine_repo_tools/test/engine_repo_tools_test.dart b/tools/pkg/engine_repo_tools/test/engine_repo_tools_test.dart index 8e34590ba8118..4b6a05becbb1c 100644 --- a/tools/pkg/engine_repo_tools/test/engine_repo_tools_test.dart +++ b/tools/pkg/engine_repo_tools/test/engine_repo_tools_test.dart @@ -202,20 +202,36 @@ void main() { try { // Create a valid engine. - io.Directory(p.join(emptyDir.path, 'src', 'flutter')).createSync(recursive: true); - io.Directory(p.join(emptyDir.path, 'src', 'out')).createSync(recursive: true); + final io.Directory srcDir = io.Directory(p.join(emptyDir.path, 'src')) + ..createSync(recursive: true); + final io.Directory flutterDir = io.Directory(p.join(srcDir.path, 'flutter')) + ..createSync(recursive: true); + final io.Directory outDir = io.Directory(p.join(srcDir.path, 'out')) + ..createSync(recursive: true); // Create two targets in out: host_debug and host_debug_unopt_arm64. - io.Directory(p.join(emptyDir.path, 'src', 'out', 'host_debug')).createSync(recursive: true); - io.Directory(p.join(emptyDir.path, 'src', 'out', 'host_debug_unopt_arm64')).createSync(recursive: true); + final io.Directory hostDebug = io.Directory(p.join(outDir.path, 'host_debug')) + ..createSync(recursive: true); + final io.Directory hostDebugUnoptArm64 = io.Directory( + p.join(outDir.path, 'host_debug_unopt_arm64'), + )..createSync(recursive: true); + + final Engine engine = TestEngine.withPaths( + srcDir: srcDir, + flutterDir: flutterDir, + outDir: outDir, + outputs: [ + TestOutput( + hostDebug, + lastModified: DateTime.utc(2023, 9, 23, 21, 16), + ), + TestOutput( + hostDebugUnoptArm64, + lastModified: DateTime.utc(2023, 9, 23, 22, 16), + ), + ], + ); - // Intentionnally make host_debug a day old to ensure it is not picked. - final io.File oldJson = io.File(p.join(emptyDir.path, 'src', 'out', 'host_debug', 'compile_commands.json'))..createSync(); - oldJson.setLastModifiedSync(oldJson.lastModifiedSync().subtract(const Duration(days: 1))); - - io.File(p.join(emptyDir.path, 'src', 'out', 'host_debug_unopt_arm64', 'compile_commands.json')).createSync(); - - final Engine engine = Engine.fromSrcPath(p.join(emptyDir.path, 'src')); final Output? latestOutput = engine.latestOutput(); expect(latestOutput, isNotNull); expect(p.basename(latestOutput!.path.path), 'host_debug_unopt_arm64'); From 5d33e333aa499d39fdc1f3fdc16014302cb4c8c9 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 25 Sep 2023 01:00:25 -0400 Subject: [PATCH 261/859] Roll Fuchsia Mac SDK from 0Jl20zAW45rRsTNEu... to SNqQGAfjWL3PbUABh... (#46246) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jonahwilliams@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 9bdf0077865bf..0dc4a858cfc69 100644 --- a/DEPS +++ b/DEPS @@ -915,7 +915,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': '0Jl20zAW45rRsTNEuuX3QIp835kbZeZevlzjb6BT7PYC' + 'version': 'SNqQGAfjWL3PbUABhZ7BwODv1wB0MaCNsJHkhne4okMC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 1e8a7a90d899f78d4149a0b227a4369dad076ca6 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 25 Sep 2023 01:34:22 -0400 Subject: [PATCH 262/859] Roll Skia from 983f42f4c76b to b8bc0c080aa8 (1 revision) (#46247) https://skia.googlesource.com/skia.git/+log/983f42f4c76b..b8bc0c080aa8 2023-09-25 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from 8ddc74eefa73 to 2888f630bd2e (2 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jonahwilliams@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 0dc4a858cfc69..ecc45ee6a4c72 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '983f42f4c76b14242ebfc0d7d4be4082c1886330', + 'skia_revision': 'b8bc0c080aa84ae2351601c3ef1cd06949df9974', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index f3ba4d218c62d..851a50dcd2d4c 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: a795ab472b70cf976a84738499986b31 +Signature: 8c19db4bdb91f68e95343955cbf5d3eb ==================================================================================================== LIBRARY: etc1 From 7efea81466b692cd9d0138c5b23e0beae55887c1 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 25 Sep 2023 02:33:54 -0400 Subject: [PATCH 263/859] Roll Skia from b8bc0c080aa8 to 31ceb1669d1c (1 revision) (#46249) https://skia.googlesource.com/skia.git/+log/b8bc0c080aa8..31ceb1669d1c 2023-09-25 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from 2888f630bd2e to 262aec389235 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jonahwilliams@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index ecc45ee6a4c72..a252920f23313 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'b8bc0c080aa84ae2351601c3ef1cd06949df9974', + 'skia_revision': '31ceb1669d1cf6a82be0d7ec63aaaf14cce1a4d6', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From d1fc6ee03cc17fa0fc18edbdc44ca79a55aa33a4 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 25 Sep 2023 04:58:06 -0400 Subject: [PATCH 264/859] Roll Fuchsia Linux SDK from VKAiabs4VzJ1Py-oA... to uY9WEf2tJxa1Hpp4v... (#46252) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jonahwilliams@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index a252920f23313..6091511c506b2 100644 --- a/DEPS +++ b/DEPS @@ -925,7 +925,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'VKAiabs4VzJ1Py-oAN6-gffPf6vdWYlXuxYr8qboThQC' + 'version': 'uY9WEf2tJxa1Hpp4v7RXvPN25swStFm4US-PlU6Xe8wC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', From cf3ca6d78a886f93a55343692d6941397b6ce385 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 09:02:05 +0000 Subject: [PATCH 265/859] Bump archive from 3.3.9 to 3.4.2 in /lib/web_ui (#46253) Bumps [archive](https://github.com/brendan-duncan/archive) from 3.3.9 to 3.4.2.
Changelog

Sourced from archive's changelog.

3.4.2 - September 23, 2023

  • Add bzip2 decompression for zip files.

3.4.1 - September 23, 2023

  • Fix for decoding zip64 zip files that have multiple extra fields.

3.4.0 - September 21, 2023

  • Add Zip64 support to ZipEncoder to allow it to create zip files > 4GB.
Commits
  • 3fe2f34 Update to 3.4.2
  • 7ebfdfe Throw exception for unsupported zip compression methods
  • 2a6c51b Add bzip2 decompression for zip files
  • 3bd14c0 Update to 3.4.1
  • e2ae505 Fix for zip files that have multiple extra fields
  • 9171bec Update to 3.4.0
  • 6fdd35c Add zip64 support to ZipEncoder to handle files > 4GB; reduce memory for enco...
  • See full diff in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=archive&package-manager=pub&previous-version=3.3.9&new-version=3.4.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- lib/web_ui/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/web_ui/pubspec.yaml b/lib/web_ui/pubspec.yaml index c88e1a6df256c..03a5b79e0245b 100644 --- a/lib/web_ui/pubspec.yaml +++ b/lib/web_ui/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: path: ../../third_party/web_test_fonts dev_dependencies: - archive: 3.3.9 + archive: 3.4.2 args: any async: any convert: any From 19be69ac352351fd5bbf9f2776a299e3db4309b2 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 25 Sep 2023 10:05:20 -0400 Subject: [PATCH 266/859] Roll Skia from 31ceb1669d1c to 569a30fbdbdf (1 revision) (#46256) https://skia.googlesource.com/skia.git/+log/31ceb1669d1c..569a30fbdbdf 2023-09-25 kjlubick@google.com [Fontations] Test path equivalence for a set of test fonts and strings If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jonahwilliams@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 6091511c506b2..76a13716295c7 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '31ceb1669d1cf6a82be0d7ec63aaaf14cce1a4d6', + 'skia_revision': '569a30fbdbdfa05e631ff0e5f58770ff00cef980', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 851a50dcd2d4c..74190712bbe11 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 8c19db4bdb91f68e95343955cbf5d3eb +Signature: 9121d0331e3da47466aa10355ef17dce ==================================================================================================== LIBRARY: etc1 From 04445ad9a077f52eb49576eb33beeb3ebdfde056 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 25 Sep 2023 10:51:32 -0400 Subject: [PATCH 267/859] Roll Skia from 569a30fbdbdf to 7a49397a02b4 (2 revisions) (#46257) https://skia.googlesource.com/skia.git/+log/569a30fbdbdf..7a49397a02b4 2023-09-25 jlavrova@google.com Set of utilities for Unicode comparison 2023-09-25 lehoangquyen@chromium.org GraphiteDawn: Use std::memory_or_acquire for last load in DawnAsyncWait If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jonahwilliams@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 76a13716295c7..f97cdebdb18c9 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '569a30fbdbdfa05e631ff0e5f58770ff00cef980', + 'skia_revision': '7a49397a02b4f23860a78261d89ba5684377dc2f', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 74190712bbe11..eae5e14b70e27 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 9121d0331e3da47466aa10355ef17dce +Signature: 3f10d187ba859bfd6e1f2be9531b1a3c ==================================================================================================== LIBRARY: etc1 From 320057f810ccae822a8a99b5daef4887df020365 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 25 Sep 2023 11:32:22 -0400 Subject: [PATCH 268/859] Roll Skia from 7a49397a02b4 to e16a9b5b2c48 (1 revision) (#46258) https://skia.googlesource.com/skia.git/+log/7a49397a02b4..e16a9b5b2c48 2023-09-25 johnstiles@google.com Expand the list of no-longer-existing error tests. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jonahwilliams@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index f97cdebdb18c9..9c698db40f41b 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '7a49397a02b4f23860a78261d89ba5684377dc2f', + 'skia_revision': 'e16a9b5b2c48319185cdab5adfe4a84e568723d0', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From bbcc54cafd3c50317153952c4f123a68937630f7 Mon Sep 17 00:00:00 2001 From: keyonghan <54558023+keyonghan@users.noreply.github.com> Date: Mon, 25 Sep 2023 08:56:46 -0700 Subject: [PATCH 269/859] Switch goma to reclient for Linux host engine targets (#45884) Part of https://github.com/flutter/flutter/issues/132701 --- ci/builders/linux_arm_host_engine.json | 12 +++++++++--- ci/builders/linux_host_desktop_engine.json | 12 +++++++++--- ci/builders/linux_host_engine.json | 20 +++++++++++++++----- 3 files changed, 33 insertions(+), 11 deletions(-) diff --git a/ci/builders/linux_arm_host_engine.json b/ci/builders/linux_arm_host_engine.json index 2c85d9b84a6a0..72472c095d9ee 100644 --- a/ci/builders/linux_arm_host_engine.json +++ b/ci/builders/linux_arm_host_engine.json @@ -25,7 +25,9 @@ "--no-lto", "--target-os=linux", "--linux-cpu=arm64", - "--prebuilt-dart-sdk" + "--prebuilt-dart-sdk", + "--rbe", + "--no-goma" ], "name": "linux_profile_arm64", "ninja": { @@ -62,7 +64,9 @@ "debug", "--target-os=linux", "--linux-cpu=arm64", - "--prebuilt-dart-sdk" + "--prebuilt-dart-sdk", + "--rbe", + "--no-goma" ], "name": "linux_debug_arm64", "ninja": { @@ -99,7 +103,9 @@ "release", "--target-os=linux", "--linux-cpu=arm64", - "--prebuilt-dart-sdk" + "--prebuilt-dart-sdk", + "--rbe", + "--no-goma" ], "name": "linux_release_arm64", "ninja": { diff --git a/ci/builders/linux_host_desktop_engine.json b/ci/builders/linux_host_desktop_engine.json index 55a45cdb2f884..cd455efffebe7 100644 --- a/ci/builders/linux_host_desktop_engine.json +++ b/ci/builders/linux_host_desktop_engine.json @@ -23,7 +23,9 @@ "--runtime-mode", "debug", "--enable-fontconfig", - "--prebuilt-dart-sdk" + "--prebuilt-dart-sdk", + "--rbe", + "--no-goma" ], "name": "host_debug", "ninja": { @@ -57,7 +59,9 @@ "profile", "--no-lto", "--enable-fontconfig", - "--prebuilt-dart-sdk" + "--prebuilt-dart-sdk", + "--rbe", + "--no-goma" ], "name": "host_profile", "ninja": { @@ -90,7 +94,9 @@ "--runtime-mode", "release", "--enable-fontconfig", - "--prebuilt-dart-sdk" + "--prebuilt-dart-sdk", + "--rbe", + "--no-goma" ], "name": "host_release", "ninja": { diff --git a/ci/builders/linux_host_engine.json b/ci/builders/linux_host_engine.json index aae0ac2835190..38846c70e5286 100644 --- a/ci/builders/linux_host_engine.json +++ b/ci/builders/linux_host_engine.json @@ -13,7 +13,9 @@ "--runtime-mode", "debug", "--unoptimized", - "--prebuilt-dart-sdk" + "--prebuilt-dart-sdk", + "--rbe", + "--no-goma" ], "name": "host_debug_unopt", "ninja": { @@ -39,7 +41,9 @@ "--unoptimized", "--prebuilt-dart-sdk", "--target-dir", - "host_debug_impeller_vulkan" + "host_debug_impeller_vulkan", + "--rbe", + "--no-goma" ], "name": "host_debug_impeller_vulkan", "ninja": { @@ -91,7 +95,9 @@ "--runtime-mode", "debug", "--prebuilt-dart-sdk", - "--build-embedder-examples" + "--build-embedder-examples", + "--rbe", + "--no-goma" ], "name": "host_debug", "ninja": { @@ -142,7 +148,9 @@ "profile", "--no-lto", "--prebuilt-dart-sdk", - "--build-embedder-examples" + "--build-embedder-examples", + "--rbe", + "--no-goma" ], "name": "host_profile", "ninja": { @@ -192,7 +200,9 @@ "--runtime-mode", "release", "--prebuilt-dart-sdk", - "--build-embedder-examples" + "--build-embedder-examples", + "--rbe", + "--no-goma" ], "name": "host_release", "ninja": { From da6c2f0be5d3624ef9fd436aaec5387dadd6eb0c Mon Sep 17 00:00:00 2001 From: keyonghan <54558023+keyonghan@users.noreply.github.com> Date: Mon, 25 Sep 2023 08:56:48 -0700 Subject: [PATCH 270/859] Switch goma to reclient for Linux fuchsia/unopt/android_aot (#45899) Part of https://github.com/flutter/flutter/issues/132701 --- ci/builders/linux_android_aot_engine.json | 24 +++++++++++++++++------ ci/builders/linux_fuchsia.json | 24 +++++++++++++++++------ ci/builders/linux_unopt.json | 8 ++++++-- 3 files changed, 42 insertions(+), 14 deletions(-) diff --git a/ci/builders/linux_android_aot_engine.json b/ci/builders/linux_android_aot_engine.json index 5065d6781d2e2..cb2bccd61acbc 100644 --- a/ci/builders/linux_android_aot_engine.json +++ b/ci/builders/linux_android_aot_engine.json @@ -24,7 +24,9 @@ "profile", "--android", "--android-cpu", - "arm" + "arm", + "--rbe", + "--no-goma" ], "name": "android_profile", "ninja": { @@ -61,7 +63,9 @@ "release", "--android", "--android-cpu", - "arm" + "arm", + "--rbe", + "--no-goma" ], "name": "android_release", "ninja": { @@ -99,7 +103,9 @@ "release", "--android", "--android-cpu", - "arm64" + "arm64", + "--rbe", + "--no-goma" ], "name": "android_release_arm64", "ninja": { @@ -152,7 +158,9 @@ "--runtime-mode", "profile", "--android-cpu", - "arm64" + "arm64", + "--rbe", + "--no-goma" ], "name": "android_profile_arm64", "ninja": { @@ -190,7 +198,9 @@ "profile", "--android", "--android-cpu", - "x64" + "x64", + "--rbe", + "--no-goma" ], "name": "android_profile_x64", "ninja": { @@ -228,7 +238,9 @@ "release", "--android", "--android-cpu", - "x64" + "x64", + "--rbe", + "--no-goma" ], "name": "android_release_x64", "ninja": { diff --git a/ci/builders/linux_fuchsia.json b/ci/builders/linux_fuchsia.json index e79853486b2f9..a53756825454c 100644 --- a/ci/builders/linux_fuchsia.json +++ b/ci/builders/linux_fuchsia.json @@ -14,7 +14,9 @@ "--fuchsia-cpu", "arm64", "--runtime-mode", - "profile" + "profile", + "--rbe", + "--no-goma" ], "name": "fuchsia_profile_arm64", "ninja": { @@ -38,7 +40,9 @@ "--fuchsia-cpu", "arm64", "--runtime-mode", - "release" + "release", + "--rbe", + "--no-goma" ], "name": "fuchsia_release_arm64", "ninja": { @@ -63,7 +67,9 @@ "arm64", "--runtime-mode", "debug", - "--no-lto" + "--no-lto", + "--rbe", + "--no-goma" ], "name": "fuchsia_debug_arm64", "ninja": { @@ -87,7 +93,9 @@ "--fuchsia-cpu", "x64", "--runtime-mode", - "profile" + "profile", + "--rbe", + "--no-goma" ], "name": "fuchsia_profile_x64", "ninja": { @@ -110,7 +118,9 @@ "--fuchsia-cpu", "x64", "--runtime-mode", - "release" + "release", + "--rbe", + "--no-goma" ], "name": "fuchsia_release_x64", "ninja": { @@ -134,7 +144,9 @@ "x64", "--runtime-mode", "debug", - "--no-lto" + "--no-lto", + "--rbe", + "--no-goma" ], "name": "fuchsia_debug_x64", "ninja": { diff --git a/ci/builders/linux_unopt.json b/ci/builders/linux_unopt.json index 4274c03223bc3..bdc93f0816438 100644 --- a/ci/builders/linux_unopt.json +++ b/ci/builders/linux_unopt.json @@ -13,7 +13,9 @@ "--prebuilt-dart-sdk", "--asan", "--lsan", - "--dart-debug" + "--dart-debug", + "--rbe", + "--no-goma" ], "name": "host_debug_unopt", "ninja": { @@ -89,7 +91,9 @@ ], "gn": [ "--android", - "--unoptimized" + "--unoptimized", + "--rbe", + "--no-goma" ], "name": "android_debug_unopt", "ninja": { From e57b76b7adec92577ef6acd4521c8f03446a574f Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 25 Sep 2023 12:40:30 -0400 Subject: [PATCH 271/859] Roll Dart SDK from 692273b46610 to 216b25f9ea6f (6 revisions) (#46260) https://dart.googlesource.com/sdk.git/+log/692273b46610..216b25f9ea6f 2023-09-25 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-197.0.dev 2023-09-25 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-196.0.dev 2023-09-24 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-195.0.dev 2023-09-23 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-194.0.dev 2023-09-23 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-193.0.dev 2023-09-23 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-192.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jonahwilliams@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 9c698db40f41b..848e115539a1b 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '692273b46610c0bc12ae76fa8a95ebdcfa5abed9', + 'dart_revision': '216b25f9ea6f56a94da4a79b96016ed20c1d8dc5', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index dfb65223add71..6a7aeb0d06d2e 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: dc5b067967cfbbb6536ad9c2db2dbbab +Signature: 8e6c2bff15fa625ee8505b718a9e9cab ==================================================================================================== LIBRARY: dart From ebf364fa4f0c2e9798d167d4a5a9b46e8fd1093d Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 25 Sep 2023 13:08:04 -0400 Subject: [PATCH 272/859] Roll Skia from e16a9b5b2c48 to a19a325cd670 (6 revisions) (#46261) https://skia.googlesource.com/skia.git/+log/e16a9b5b2c48..a19a325cd670 2023-09-25 jvanverth@google.com [Metal] Update some deprecated interfaces. 2023-09-25 johnstiles@google.com Add 'children' parameters to SkMesh::Make. 2023-09-25 kjlubick@google.com Reland "Make SKP deserialize null instead of PNG images by default." 2023-09-25 brianosman@google.com Update include/OWNERS 2023-09-25 johnstiles@google.com Allow child effects in SkMeshSpecification. 2023-09-25 kjlubick@google.com Fix Bazel rules If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jonahwilliams@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 848e115539a1b..477438020d805 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'e16a9b5b2c48319185cdab5adfe4a84e568723d0', + 'skia_revision': 'a19a325cd6707356b0e84f4738670a4d717fcafb', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index eae5e14b70e27..e86e2fcc18f54 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 3f10d187ba859bfd6e1f2be9531b1a3c +Signature: 13b69111adbe0bfca5e7742b99d45757 ==================================================================================================== LIBRARY: etc1 @@ -386,9 +386,12 @@ FILE: ../../../third_party/skia/modules/pathkit/perf/perfReporter.js FILE: ../../../third_party/skia/modules/skparagraph/test.html FILE: ../../../third_party/skia/package-lock.json FILE: ../../../third_party/skia/relnotes/directcontext_submit.md +FILE: ../../../third_party/skia/relnotes/mesh-child-effect.md +FILE: ../../../third_party/skia/relnotes/mesh-child-params.md FILE: ../../../third_party/skia/relnotes/minify-mesh.md FILE: ../../../third_party/skia/relnotes/patheffects.md FILE: ../../../third_party/skia/relnotes/shadowflags.md +FILE: ../../../third_party/skia/relnotes/skpicture_png.md FILE: ../../../third_party/skia/src/gpu/gpu_workaround_list.txt FILE: ../../../third_party/skia/src/sksl/generated/sksl_compute.minified.sksl FILE: ../../../third_party/skia/src/sksl/generated/sksl_compute.unoptimized.sksl From 51a68f4b17211a13968738d8687ff4a62537477d Mon Sep 17 00:00:00 2001 From: keyonghan <54558023+keyonghan@users.noreply.github.com> Date: Mon, 25 Sep 2023 10:51:00 -0700 Subject: [PATCH 273/859] Switch goma to reclient for Linux clang_tidy targets (#45898) Part of https://github.com/flutter/flutter/issues/132701 --- ci/builders/linux_clang_tidy.json | 8 ++++++-- ci/builders/linux_clang_tidy_presubmit.json | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ci/builders/linux_clang_tidy.json b/ci/builders/linux_clang_tidy.json index c80a985ac3417..27d1592c55e19 100644 --- a/ci/builders/linux_clang_tidy.json +++ b/ci/builders/linux_clang_tidy.json @@ -10,7 +10,9 @@ "--android", "--android-cpu", "arm64", - "--no-lto" + "--no-lto", + "--rbe", + "--no-goma" ], "name": "android_debug_arm64", "ninja": { @@ -27,7 +29,9 @@ "--runtime-mode", "debug", "--prebuilt-dart-sdk", - "--no-lto" + "--no-lto", + "--rbe", + "--no-goma" ], "name": "host_debug", "ninja": { diff --git a/ci/builders/linux_clang_tidy_presubmit.json b/ci/builders/linux_clang_tidy_presubmit.json index e3aaad01afdf3..a51235084baf6 100644 --- a/ci/builders/linux_clang_tidy_presubmit.json +++ b/ci/builders/linux_clang_tidy_presubmit.json @@ -11,7 +11,9 @@ "--android", "--android-cpu", "arm64", - "--no-lto" + "--no-lto", + "--rbe", + "--no-goma" ], "ninja": { "config": "android_debug_arm64" @@ -28,7 +30,9 @@ "--runtime-mode", "debug", "--prebuilt-dart-sdk", - "--no-lto" + "--no-lto", + "--rbe", + "--no-goma" ], "ninja": { "config": "host_debug" From 8623a1b9262d43d881b834773047ead967012ab3 Mon Sep 17 00:00:00 2001 From: Kenzie Davisson <43759233+kenzieschmoll@users.noreply.github.com> Date: Mon, 25 Sep 2023 10:57:44 -0700 Subject: [PATCH 274/859] Add description to assert in `history.dart` (#46072) I have hit this assertion error many times in tests and this message would be helpful for debugging. --------- Co-authored-by: Mouad Debbar --- lib/web_ui/lib/src/engine/navigation/history.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/web_ui/lib/src/engine/navigation/history.dart b/lib/web_ui/lib/src/engine/navigation/history.dart index dce3ba42131f8..ef90ad9c9f282 100644 --- a/lib/web_ui/lib/src/engine/navigation/history.dart +++ b/lib/web_ui/lib/src/engine/navigation/history.dart @@ -217,7 +217,12 @@ class MultiEntriesBrowserHistory extends BrowserHistory { _isTornDown = true; // Restores the html browser history. - assert(_hasSerialCount(currentState)); + assert( + _hasSerialCount(currentState), + currentState == null + ? 'unexpected null history state' + : "history state is missing field 'serialCount'", + ); final int backCount = _currentSerialCount; if (backCount > 0) { await urlStrategy!.go(-backCount); From f15c2581b406fb88576e5da3014a6b3b6556d2e9 Mon Sep 17 00:00:00 2001 From: "auto-submit[bot]" <98614782+auto-submit[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 18:27:27 +0000 Subject: [PATCH 275/859] Reverts "Switch goma to reclient for Linux clang_tidy targets" (#46267) Reverts flutter/engine#45898 Initiated by: ricardoamador This change reverts the following previous change: Part of https://github.com/flutter/flutter/issues/132701 --- ci/builders/linux_clang_tidy.json | 8 ++------ ci/builders/linux_clang_tidy_presubmit.json | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/ci/builders/linux_clang_tidy.json b/ci/builders/linux_clang_tidy.json index 27d1592c55e19..c80a985ac3417 100644 --- a/ci/builders/linux_clang_tidy.json +++ b/ci/builders/linux_clang_tidy.json @@ -10,9 +10,7 @@ "--android", "--android-cpu", "arm64", - "--no-lto", - "--rbe", - "--no-goma" + "--no-lto" ], "name": "android_debug_arm64", "ninja": { @@ -29,9 +27,7 @@ "--runtime-mode", "debug", "--prebuilt-dart-sdk", - "--no-lto", - "--rbe", - "--no-goma" + "--no-lto" ], "name": "host_debug", "ninja": { diff --git a/ci/builders/linux_clang_tidy_presubmit.json b/ci/builders/linux_clang_tidy_presubmit.json index a51235084baf6..e3aaad01afdf3 100644 --- a/ci/builders/linux_clang_tidy_presubmit.json +++ b/ci/builders/linux_clang_tidy_presubmit.json @@ -11,9 +11,7 @@ "--android", "--android-cpu", "arm64", - "--no-lto", - "--rbe", - "--no-goma" + "--no-lto" ], "ninja": { "config": "android_debug_arm64" @@ -30,9 +28,7 @@ "--runtime-mode", "debug", "--prebuilt-dart-sdk", - "--no-lto", - "--rbe", - "--no-goma" + "--no-lto" ], "ninja": { "config": "host_debug" From cc5f3d5cee8607ba40d2af3e1c6134bd9e6a6a90 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Mon, 25 Sep 2023 11:31:50 -0700 Subject: [PATCH 276/859] Revert "Switch goma to reclient for Linux clang_tidy targets (#45898)" (#46266) Clang tidy is now failing on CI: https://flutter-dashboard.appspot.com/#/build?repo=engine&branch=master From f036671b614675c1a062ed5b4ad828fb38c83902 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Mon, 25 Sep 2023 12:06:09 -0700 Subject: [PATCH 277/859] [Engine] use QoS classes in iOS engine. (#46265) Hint to the CPU scheduler which of our threads are more important. This change should result in more stable rendering times on CI, but likely doesn't have any other observable effects. --- shell/platform/darwin/ios/framework/Source/FlutterEngine.mm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm b/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm index df4bd038036a5..e6c81339ef709 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm @@ -49,15 +49,18 @@ static void IOSPlatformThreadConfigSetter(const fml::Thread::ThreadConfig& confi // set thread priority switch (config.priority) { case fml::Thread::ThreadPriority::BACKGROUND: { + pthread_set_qos_class_self_np(QOS_CLASS_BACKGROUND, 0); [[NSThread currentThread] setThreadPriority:0]; break; } case fml::Thread::ThreadPriority::NORMAL: { + pthread_set_qos_class_self_np(QOS_CLASS_DEFAULT, 0); [[NSThread currentThread] setThreadPriority:0.5]; break; } case fml::Thread::ThreadPriority::RASTER: case fml::Thread::ThreadPriority::DISPLAY: { + pthread_set_qos_class_self_np(QOS_CLASS_USER_INTERACTIVE, 0); [[NSThread currentThread] setThreadPriority:1.0]; sched_param param; int policy; From 8fe586995cf72b75e005a13b801ee0b47cfa70fd Mon Sep 17 00:00:00 2001 From: Ian McKellar Date: Mon, 25 Sep 2023 12:15:36 -0700 Subject: [PATCH 278/859] fuchsia: Update FIDL for unknown interactions (#45773) This is part of a language change in FIDL. This should have no effect. See: [https://fxbug.dev/88366](https://fxbug.dev/88366) --- shell/platform/fuchsia/dart_runner/fidl/echo.fidl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shell/platform/fuchsia/dart_runner/fidl/echo.fidl b/shell/platform/fuchsia/dart_runner/fidl/echo.fidl index eb27c91bad15b..6c39ac59f7db2 100644 --- a/shell/platform/fuchsia/dart_runner/fidl/echo.fidl +++ b/shell/platform/fuchsia/dart_runner/fidl/echo.fidl @@ -7,9 +7,9 @@ library dart.test; const MAX_STRING_LENGTH uint64 = 32; @discoverable -protocol Echo { +closed protocol Echo { /// Returns the input. - EchoString(struct { + strict EchoString(struct { value string:; }) -> (struct { response string:; From 4593b1262450dafad34cb5e4f446de64c0ec6e5f Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Mon, 25 Sep 2023 13:23:03 -0700 Subject: [PATCH 279/859] [Impeller] fallback to position data if texture coordinates are undefined. (#46264) Fixes https://github.com/flutter/flutter/issues/135441 This check was lost in some refactor, I added a test for it. --- impeller/aiks/aiks_unittests.cc | 22 +++++++++++++++++++ impeller/entity/geometry/vertices_geometry.cc | 4 +++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/impeller/aiks/aiks_unittests.cc b/impeller/aiks/aiks_unittests.cc index ded50128789f8..caa3372e93780 100644 --- a/impeller/aiks/aiks_unittests.cc +++ b/impeller/aiks/aiks_unittests.cc @@ -3559,5 +3559,27 @@ TEST_P(AiksTest, ReleasesTextureOnTeardown) { "released."; } +// Regression test for https://github.com/flutter/flutter/issues/135441 . +TEST_P(AiksTest, VerticesGeometryUVPositionData) { + Canvas canvas; + Paint paint; + auto texture = CreateTextureForFixture("table_mountain_nx.png"); + + paint.color_source = ColorSource::MakeImage(texture, Entity::TileMode::kClamp, + Entity::TileMode::kClamp, {}, {}); + + auto vertices = {Point(0, 0), Point(texture->GetSize().width, 0), + Point(0, texture->GetSize().height)}; + std::vector indices = {0u, 1u, 2u}; + std::vector texture_coordinates = {}; + std::vector vertex_colors = {}; + auto geometry = std::make_shared( + vertices, indices, texture_coordinates, vertex_colors, + Rect::MakeLTRB(0, 0, 1, 1), VerticesGeometry::VertexMode::kTriangleStrip); + + canvas.DrawVertices(geometry, BlendMode::kSourceOver, paint); + ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); +} + } // namespace testing } // namespace impeller diff --git a/impeller/entity/geometry/vertices_geometry.cc b/impeller/entity/geometry/vertices_geometry.cc index 8c1a0c0d542b2..23a1c32a5f0b1 100644 --- a/impeller/entity/geometry/vertices_geometry.cc +++ b/impeller/entity/geometry/vertices_geometry.cc @@ -229,11 +229,13 @@ GeometryResult VerticesGeometry::GetPositionUVBuffer( auto vertex_count = vertices_.size(); auto size = texture_coverage.size; auto origin = texture_coverage.origin; + auto has_texture_coordinates = HasTextureCoordinates(); std::vector vertex_data(vertex_count); { for (auto i = 0u; i < vertex_count; i++) { auto vertex = vertices_[i]; - auto texture_coord = texture_coordinates_[i]; + auto texture_coord = + has_texture_coordinates ? texture_coordinates_[i] : vertices_[i]; auto uv = effect_transform * Point((texture_coord.x - origin.x) / size.width, (texture_coord.y - origin.y) / size.height); From b7bdcd8bb3c0dd190bf913b71e9bff66b283e451 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 25 Sep 2023 16:27:04 -0400 Subject: [PATCH 280/859] Roll Skia from a19a325cd670 to 00e4d00021a7 (6 revisions) (#46269) https://skia.googlesource.com/skia.git/+log/a19a325cd670..00e4d00021a7 2023-09-25 johnstiles@google.com Type-check the list of child effects passed to SkMesh. 2023-09-25 armansito@google.com [graphite] Remove unused parameter in AtlasProvider method 2023-09-25 kjlubick@google.com Remove #ifdef SK_GL from GrDirectContext by moving MakeGL factories 2023-09-25 fmalita@chromium.org [svg] Fix nullptr deref in SkSVGAttributeParser 2023-09-25 kjlubick@google.com Reland "Tidy up public.bzl rules for iOS" 2023-09-25 johnstiles@google.com Fix expression position of redundant casts. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jonahwilliams@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 477438020d805..8ce642e73bd78 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'a19a325cd6707356b0e84f4738670a4d717fcafb', + 'skia_revision': '00e4d00021a771f7d3e4ae8ef0dbfe3a9755b425', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index e86e2fcc18f54..71b71f83c8e33 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 13b69111adbe0bfca5e7742b99d45757 +Signature: 196bf3fa5cc648e9d0999bfc2ca4da8a ==================================================================================================== LIBRARY: etc1 @@ -385,6 +385,7 @@ FILE: ../../../third_party/skia/modules/pathkit/perf/pathops.bench.js FILE: ../../../third_party/skia/modules/pathkit/perf/perfReporter.js FILE: ../../../third_party/skia/modules/skparagraph/test.html FILE: ../../../third_party/skia/package-lock.json +FILE: ../../../third_party/skia/relnotes/directcontext_gl.md FILE: ../../../third_party/skia/relnotes/directcontext_submit.md FILE: ../../../third_party/skia/relnotes/mesh-child-effect.md FILE: ../../../third_party/skia/relnotes/mesh-child-params.md @@ -8807,6 +8808,7 @@ ORIGIN: ../../../third_party/skia/include/gpu/ganesh/SkImageGanesh.h + ../../../ ORIGIN: ../../../third_party/skia/include/gpu/ganesh/SkMeshGanesh.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/gpu/ganesh/SkSurfaceGanesh.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/gpu/ganesh/gl/GrGLBackendSurface.h + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/include/gpu/ganesh/gl/GrGLDirectContext.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/gpu/ganesh/mtl/SkSurfaceMetal.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/gpu/ganesh/vk/GrVkBackendSurface.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/gpu/graphite/BackendSemaphore.h + ../../../third_party/skia/LICENSE @@ -8921,6 +8923,7 @@ ORIGIN: ../../../third_party/skia/src/gpu/ganesh/effects/GrPerlinNoise2Effect.h ORIGIN: ../../../third_party/skia/src/gpu/ganesh/gl/AHardwareBufferGL.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/gl/GrGLBackendSurface.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/gl/GrGLBackendSurfacePriv.h + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/gpu/ganesh/gl/GrGLDirectContext.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/image/GrImageUtils.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/image/GrImageUtils.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/image/GrTextureGenerator.cpp + ../../../third_party/skia/LICENSE @@ -9070,6 +9073,7 @@ FILE: ../../../third_party/skia/include/gpu/ganesh/SkImageGanesh.h FILE: ../../../third_party/skia/include/gpu/ganesh/SkMeshGanesh.h FILE: ../../../third_party/skia/include/gpu/ganesh/SkSurfaceGanesh.h FILE: ../../../third_party/skia/include/gpu/ganesh/gl/GrGLBackendSurface.h +FILE: ../../../third_party/skia/include/gpu/ganesh/gl/GrGLDirectContext.h FILE: ../../../third_party/skia/include/gpu/ganesh/mtl/SkSurfaceMetal.h FILE: ../../../third_party/skia/include/gpu/ganesh/vk/GrVkBackendSurface.h FILE: ../../../third_party/skia/include/gpu/graphite/BackendSemaphore.h @@ -9184,6 +9188,7 @@ FILE: ../../../third_party/skia/src/gpu/ganesh/effects/GrPerlinNoise2Effect.h FILE: ../../../third_party/skia/src/gpu/ganesh/gl/AHardwareBufferGL.cpp FILE: ../../../third_party/skia/src/gpu/ganesh/gl/GrGLBackendSurface.cpp FILE: ../../../third_party/skia/src/gpu/ganesh/gl/GrGLBackendSurfacePriv.h +FILE: ../../../third_party/skia/src/gpu/ganesh/gl/GrGLDirectContext.cpp FILE: ../../../third_party/skia/src/gpu/ganesh/image/GrImageUtils.cpp FILE: ../../../third_party/skia/src/gpu/ganesh/image/GrImageUtils.h FILE: ../../../third_party/skia/src/gpu/ganesh/image/GrTextureGenerator.cpp From a5ea05992cc7e548c778c6700dc543f6547addf5 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 25 Sep 2023 16:31:03 -0400 Subject: [PATCH 281/859] Roll Fuchsia Mac SDK from SNqQGAfjWL3PbUABh... to we5owZaebdO_3kyjz... (#46270) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jonahwilliams@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 8ce642e73bd78..750e74c6f3093 100644 --- a/DEPS +++ b/DEPS @@ -915,7 +915,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'SNqQGAfjWL3PbUABhZ7BwODv1wB0MaCNsJHkhne4okMC' + 'version': 'we5owZaebdO_3kyjzbmpyh37YiP2bGjPyaGIUnxXruUC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 518e3cff2d76ce3a2d2377d1a29e05efd76f1329 Mon Sep 17 00:00:00 2001 From: Ben Konyi Date: Mon, 25 Sep 2023 18:07:06 -0400 Subject: [PATCH 282/859] Add package:tar to DEPS to fix broken 3H configurations (#46273) Filed https://github.com/flutter/flutter/issues/135463 to track adding support for auto-updating this dependency as part of the SDK roll. --- DEPS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/DEPS b/DEPS index 750e74c6f3093..698fcbcca9790 100644 --- a/DEPS +++ b/DEPS @@ -471,6 +471,9 @@ deps = { 'src/third_party/dart/third_party/pkg/string_scanner': Var('dart_git') + '/string_scanner.git@da9142cf9809e7e1364144b8193ec60d87f0a4b8', + 'src/third_party/dart/third_party/pkg/tar': + Var('dart_git') + '/external/github.com/simolus3/tar.git@3c68cba8e51c569428222b9185469249206172c6', + 'src/third_party/dart/third_party/pkg/term_glyph': Var('dart_git') + '/term_glyph.git@1b28285a7e818b8e87c4d2119d968c5b36d73c7a', From 0dbf381232cf8053fc5448a425c91da1a3d42426 Mon Sep 17 00:00:00 2001 From: keyonghan <54558023+keyonghan@users.noreply.github.com> Date: Mon, 25 Sep 2023 15:14:48 -0700 Subject: [PATCH 283/859] Restore goma from rbe before 3.16 branching (#46272) This is a revert of targets that generate artifacts for framework: ``` Linux linux_fuchsia Linux linux_android_aot_engine Linux linux_android_debug_engine Linux linux_arm_host_engine Linux linux_host_desktop_engine Linux linux_host_engine ``` --- ci/builders/linux_android_aot_engine.json | 24 ++++++--------------- ci/builders/linux_android_debug_engine.json | 24 ++++++--------------- ci/builders/linux_arm_host_engine.json | 12 +++-------- ci/builders/linux_fuchsia.json | 24 ++++++--------------- ci/builders/linux_host_desktop_engine.json | 12 +++-------- ci/builders/linux_host_engine.json | 20 +++++------------ 6 files changed, 29 insertions(+), 87 deletions(-) diff --git a/ci/builders/linux_android_aot_engine.json b/ci/builders/linux_android_aot_engine.json index cb2bccd61acbc..5065d6781d2e2 100644 --- a/ci/builders/linux_android_aot_engine.json +++ b/ci/builders/linux_android_aot_engine.json @@ -24,9 +24,7 @@ "profile", "--android", "--android-cpu", - "arm", - "--rbe", - "--no-goma" + "arm" ], "name": "android_profile", "ninja": { @@ -63,9 +61,7 @@ "release", "--android", "--android-cpu", - "arm", - "--rbe", - "--no-goma" + "arm" ], "name": "android_release", "ninja": { @@ -103,9 +99,7 @@ "release", "--android", "--android-cpu", - "arm64", - "--rbe", - "--no-goma" + "arm64" ], "name": "android_release_arm64", "ninja": { @@ -158,9 +152,7 @@ "--runtime-mode", "profile", "--android-cpu", - "arm64", - "--rbe", - "--no-goma" + "arm64" ], "name": "android_profile_arm64", "ninja": { @@ -198,9 +190,7 @@ "profile", "--android", "--android-cpu", - "x64", - "--rbe", - "--no-goma" + "x64" ], "name": "android_profile_x64", "ninja": { @@ -238,9 +228,7 @@ "release", "--android", "--android-cpu", - "x64", - "--rbe", - "--no-goma" + "x64" ], "name": "android_release_x64", "ninja": { diff --git a/ci/builders/linux_android_debug_engine.json b/ci/builders/linux_android_debug_engine.json index 7d3b62ef31091..4fcbfe5e9d427 100644 --- a/ci/builders/linux_android_debug_engine.json +++ b/ci/builders/linux_android_debug_engine.json @@ -20,9 +20,7 @@ "gn": [ "--android", "--android-cpu=x86", - "--runtime-mode=jit_release", - "--rbe", - "--no-goma" + "--runtime-mode=jit_release" ], "name": "android_jit_release_x86", "ninja": { @@ -74,9 +72,7 @@ "gn": [ "--android", "--android-cpu=arm", - "--no-lto", - "--rbe", - "--no-goma" + "--no-lto" ], "name": "android_debug", "ninja": { @@ -127,9 +123,7 @@ "gn": [ "--android", "--android-cpu=arm64", - "--no-lto", - "--rbe", - "--no-goma" + "--no-lto" ], "name": "android_debug_arm64", "ninja": { @@ -150,9 +144,7 @@ "--android", "--android-cpu=arm64", "--no-lto", - "--enable-vulkan-validation-layers", - "--rbe", - "--no-goma" + "--enable-vulkan-validation-layers" ], "name": "android_debug_arm64_validation_layers", "ninja": { @@ -184,9 +176,7 @@ "gn": [ "--android", "--android-cpu=x86", - "--no-lto", - "--rbe", - "--no-goma" + "--no-lto" ], "name": "android_debug_x86", "ninja": { @@ -218,9 +208,7 @@ "gn": [ "--android", "--android-cpu=x64", - "--no-lto", - "--rbe", - "--no-goma" + "--no-lto" ], "name": "android_debug_x64", "ninja": { diff --git a/ci/builders/linux_arm_host_engine.json b/ci/builders/linux_arm_host_engine.json index 72472c095d9ee..2c85d9b84a6a0 100644 --- a/ci/builders/linux_arm_host_engine.json +++ b/ci/builders/linux_arm_host_engine.json @@ -25,9 +25,7 @@ "--no-lto", "--target-os=linux", "--linux-cpu=arm64", - "--prebuilt-dart-sdk", - "--rbe", - "--no-goma" + "--prebuilt-dart-sdk" ], "name": "linux_profile_arm64", "ninja": { @@ -64,9 +62,7 @@ "debug", "--target-os=linux", "--linux-cpu=arm64", - "--prebuilt-dart-sdk", - "--rbe", - "--no-goma" + "--prebuilt-dart-sdk" ], "name": "linux_debug_arm64", "ninja": { @@ -103,9 +99,7 @@ "release", "--target-os=linux", "--linux-cpu=arm64", - "--prebuilt-dart-sdk", - "--rbe", - "--no-goma" + "--prebuilt-dart-sdk" ], "name": "linux_release_arm64", "ninja": { diff --git a/ci/builders/linux_fuchsia.json b/ci/builders/linux_fuchsia.json index a53756825454c..e79853486b2f9 100644 --- a/ci/builders/linux_fuchsia.json +++ b/ci/builders/linux_fuchsia.json @@ -14,9 +14,7 @@ "--fuchsia-cpu", "arm64", "--runtime-mode", - "profile", - "--rbe", - "--no-goma" + "profile" ], "name": "fuchsia_profile_arm64", "ninja": { @@ -40,9 +38,7 @@ "--fuchsia-cpu", "arm64", "--runtime-mode", - "release", - "--rbe", - "--no-goma" + "release" ], "name": "fuchsia_release_arm64", "ninja": { @@ -67,9 +63,7 @@ "arm64", "--runtime-mode", "debug", - "--no-lto", - "--rbe", - "--no-goma" + "--no-lto" ], "name": "fuchsia_debug_arm64", "ninja": { @@ -93,9 +87,7 @@ "--fuchsia-cpu", "x64", "--runtime-mode", - "profile", - "--rbe", - "--no-goma" + "profile" ], "name": "fuchsia_profile_x64", "ninja": { @@ -118,9 +110,7 @@ "--fuchsia-cpu", "x64", "--runtime-mode", - "release", - "--rbe", - "--no-goma" + "release" ], "name": "fuchsia_release_x64", "ninja": { @@ -144,9 +134,7 @@ "x64", "--runtime-mode", "debug", - "--no-lto", - "--rbe", - "--no-goma" + "--no-lto" ], "name": "fuchsia_debug_x64", "ninja": { diff --git a/ci/builders/linux_host_desktop_engine.json b/ci/builders/linux_host_desktop_engine.json index cd455efffebe7..55a45cdb2f884 100644 --- a/ci/builders/linux_host_desktop_engine.json +++ b/ci/builders/linux_host_desktop_engine.json @@ -23,9 +23,7 @@ "--runtime-mode", "debug", "--enable-fontconfig", - "--prebuilt-dart-sdk", - "--rbe", - "--no-goma" + "--prebuilt-dart-sdk" ], "name": "host_debug", "ninja": { @@ -59,9 +57,7 @@ "profile", "--no-lto", "--enable-fontconfig", - "--prebuilt-dart-sdk", - "--rbe", - "--no-goma" + "--prebuilt-dart-sdk" ], "name": "host_profile", "ninja": { @@ -94,9 +90,7 @@ "--runtime-mode", "release", "--enable-fontconfig", - "--prebuilt-dart-sdk", - "--rbe", - "--no-goma" + "--prebuilt-dart-sdk" ], "name": "host_release", "ninja": { diff --git a/ci/builders/linux_host_engine.json b/ci/builders/linux_host_engine.json index 38846c70e5286..aae0ac2835190 100644 --- a/ci/builders/linux_host_engine.json +++ b/ci/builders/linux_host_engine.json @@ -13,9 +13,7 @@ "--runtime-mode", "debug", "--unoptimized", - "--prebuilt-dart-sdk", - "--rbe", - "--no-goma" + "--prebuilt-dart-sdk" ], "name": "host_debug_unopt", "ninja": { @@ -41,9 +39,7 @@ "--unoptimized", "--prebuilt-dart-sdk", "--target-dir", - "host_debug_impeller_vulkan", - "--rbe", - "--no-goma" + "host_debug_impeller_vulkan" ], "name": "host_debug_impeller_vulkan", "ninja": { @@ -95,9 +91,7 @@ "--runtime-mode", "debug", "--prebuilt-dart-sdk", - "--build-embedder-examples", - "--rbe", - "--no-goma" + "--build-embedder-examples" ], "name": "host_debug", "ninja": { @@ -148,9 +142,7 @@ "profile", "--no-lto", "--prebuilt-dart-sdk", - "--build-embedder-examples", - "--rbe", - "--no-goma" + "--build-embedder-examples" ], "name": "host_profile", "ninja": { @@ -200,9 +192,7 @@ "--runtime-mode", "release", "--prebuilt-dart-sdk", - "--build-embedder-examples", - "--rbe", - "--no-goma" + "--build-embedder-examples" ], "name": "host_release", "ninja": { From b08428ac5763c0d1b13a9aff1ba53e52c96ba0e0 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Mon, 25 Sep 2023 16:08:56 -0700 Subject: [PATCH 284/859] [Impeller] Dont blow away coverage hint on advanced blends. (#46219) Advnaced blends are given a fairly accurate coverage hint based on the entity size. We were blowing this value away when applying the stencil coverage, resulting in oversized offscreen textures. This should improve the android advanced blend benchmark --- impeller/entity/contents/content_context.cc | 9 ++- impeller/entity/contents/content_context.h | 3 +- impeller/entity/entity_pass.cc | 11 ++- impeller/entity/entity_unittests.cc | 86 +++++++++++++++++++++ 4 files changed, 104 insertions(+), 5 deletions(-) diff --git a/impeller/entity/contents/content_context.cc b/impeller/entity/contents/content_context.cc index 65ef43e095403..1a4985db5a07e 100644 --- a/impeller/entity/contents/content_context.cc +++ b/impeller/entity/contents/content_context.cc @@ -162,7 +162,8 @@ static std::unique_ptr CreateDefaultPipeline( ContentContext::ContentContext( std::shared_ptr context, - std::shared_ptr typographer_context) + std::shared_ptr typographer_context, + std::shared_ptr render_target_allocator) : context_(std::move(context)), lazy_glyph_atlas_( std::make_shared(std::move(typographer_context))), @@ -170,8 +171,10 @@ ContentContext::ContentContext( #if IMPELLER_ENABLE_3D scene_context_(std::make_shared(context_)), #endif // IMPELLER_ENABLE_3D - render_target_cache_(std::make_shared( - context_->GetResourceAllocator())) { + render_target_cache_(render_target_allocator == nullptr + ? std::make_shared( + context_->GetResourceAllocator()) + : std::move(render_target_allocator)) { if (!context_ || !context_->IsValid()) { return; } diff --git a/impeller/entity/contents/content_context.h b/impeller/entity/contents/content_context.h index 3c72798623758..2778fec4f72c2 100644 --- a/impeller/entity/contents/content_context.h +++ b/impeller/entity/contents/content_context.h @@ -343,7 +343,8 @@ class ContentContext { public: explicit ContentContext( std::shared_ptr context, - std::shared_ptr typographer_context); + std::shared_ptr typographer_context, + std::shared_ptr render_target_allocator = nullptr); ~ContentContext(); diff --git a/impeller/entity/entity_pass.cc b/impeller/entity/entity_pass.cc index 1d8b0a4f3735e..0d91112369ae7 100644 --- a/impeller/entity/entity_pass.cc +++ b/impeller/entity/entity_pass.cc @@ -783,7 +783,16 @@ bool EntityPass::OnRender( // rendered output will actually be used, and so we set this to the current // stencil coverage (which is the max clip bounds). The contents may // optionally use this hint to avoid unnecessary rendering work. - element_entity.GetContents()->SetCoverageHint(current_stencil_coverage); + if (element_entity.GetContents()->GetCoverageHint().has_value()) { + // If the element already has a coverage hint (because its an advanced + // blend), then we need to intersect the stencil coverage hint with the + // existing coverage hint. + element_entity.GetContents()->SetCoverageHint( + current_stencil_coverage->Intersection( + element_entity.GetContents()->GetCoverageHint().value())); + } else { + element_entity.GetContents()->SetCoverageHint(current_stencil_coverage); + } switch (stencil_coverage.type) { case Contents::StencilCoverage::Type::kNoChange: diff --git a/impeller/entity/entity_unittests.cc b/impeller/entity/entity_unittests.cc index 3ff5548509b5e..c76ece221dbd8 100644 --- a/impeller/entity/entity_unittests.cc +++ b/impeller/entity/entity_unittests.cc @@ -7,12 +7,14 @@ #include #include #include +#include #include #include "flutter/testing/testing.h" #include "fml/logging.h" #include "fml/time/time_point.h" #include "gtest/gtest.h" +#include "impeller/core/texture_descriptor.h" #include "impeller/entity/contents/atlas_contents.h" #include "impeller/entity/contents/clip_contents.h" #include "impeller/entity/contents/conical_gradient_contents.h" @@ -42,6 +44,7 @@ #include "impeller/geometry/geometry_asserts.h" #include "impeller/geometry/path_builder.h" #include "impeller/geometry/sigma.h" +#include "impeller/geometry/vector.h" #include "impeller/playground/playground.h" #include "impeller/playground/widgets.h" #include "impeller/renderer/command.h" @@ -2441,6 +2444,89 @@ TEST_P(EntityTest, TextContentsCeilsGlyphScaleToDecimal) { ASSERT_EQ(TextFrame::RoundScaledFontSize(0.0f, 12), 0.0f); } +class TestRenderTargetAllocator : public RenderTargetAllocator { + public: + explicit TestRenderTargetAllocator(std::shared_ptr allocator) + : RenderTargetAllocator(std::move(allocator)) {} + + ~TestRenderTargetAllocator() = default; + + std::shared_ptr CreateTexture( + const TextureDescriptor& desc) override { + allocated_.push_back(desc); + return RenderTargetAllocator::CreateTexture(desc); + } + + void Start() override { RenderTargetAllocator::Start(); } + + void End() override { RenderTargetAllocator::End(); } + + std::vector GetDescriptors() const { return allocated_; } + + private: + std::vector allocated_; +}; + +TEST_P(EntityTest, AdvancedBlendCoverageHintIsNotResetByEntityPass) { + if (GetContext()->GetCapabilities()->SupportsFramebufferFetch()) { + GTEST_SKIP() << "Backends that support framebuffer fetch dont use coverage " + "for advanced blends."; + } + + auto contents = std::make_shared(); + contents->SetGeometry(Geometry::MakeRect({100, 100, 100, 100})); + contents->SetColor(Color::Red()); + + Entity entity; + entity.SetTransformation(Matrix::MakeScale(Vector3(2, 2, 1))); + entity.SetBlendMode(BlendMode::kColorBurn); + entity.SetContents(contents); + + auto coverage = entity.GetCoverage(); + EXPECT_TRUE(coverage.has_value()); + + auto pass = std::make_unique(); + auto test_allocator = std::make_shared( + GetContext()->GetResourceAllocator()); + auto stencil_config = RenderTarget::AttachmentConfig{ + .storage_mode = StorageMode::kDevicePrivate, + .load_action = LoadAction::kClear, + .store_action = StoreAction::kDontCare, + .clear_color = Color::BlackTransparent()}; + auto rt = RenderTarget::CreateOffscreen( + *GetContext(), *test_allocator, ISize::MakeWH(1000, 1000), "Offscreen", + RenderTarget::kDefaultColorAttachmentConfig, stencil_config); + auto content_context = ContentContext( + GetContext(), TypographerContextSkia::Make(), test_allocator); + pass->AddEntity(entity); + + EXPECT_TRUE(pass->Render(content_context, rt)); + + if (test_allocator->GetDescriptors().size() == 6u) { + EXPECT_EQ(test_allocator->GetDescriptors()[0].size, ISize(1000, 1000)); + EXPECT_EQ(test_allocator->GetDescriptors()[1].size, ISize(1000, 1000)); + + EXPECT_EQ(test_allocator->GetDescriptors()[2].size, ISize(200, 200)); + EXPECT_EQ(test_allocator->GetDescriptors()[3].size, ISize(200, 200)); + EXPECT_EQ(test_allocator->GetDescriptors()[4].size, ISize(200, 200)); + EXPECT_EQ(test_allocator->GetDescriptors()[5].size, ISize(200, 200)); + } else if (test_allocator->GetDescriptors().size() == 9u) { + // Onscreen render target. + EXPECT_EQ(test_allocator->GetDescriptors()[0].size, ISize(1000, 1000)); + EXPECT_EQ(test_allocator->GetDescriptors()[1].size, ISize(1000, 1000)); + EXPECT_EQ(test_allocator->GetDescriptors()[2].size, ISize(1000, 1000)); + EXPECT_EQ(test_allocator->GetDescriptors()[3].size, ISize(1000, 1000)); + EXPECT_EQ(test_allocator->GetDescriptors()[4].size, ISize(1000, 1000)); + + EXPECT_EQ(test_allocator->GetDescriptors()[5].size, ISize(200, 200)); + EXPECT_EQ(test_allocator->GetDescriptors()[5].size, ISize(200, 200)); + EXPECT_EQ(test_allocator->GetDescriptors()[6].size, ISize(200, 200)); + EXPECT_EQ(test_allocator->GetDescriptors()[7].size, ISize(200, 200)); + } else { + EXPECT_TRUE(false); + } +} + } // namespace testing } // namespace impeller From 8adcc23259698d20432ba1150d10f978e77bba6a Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 25 Sep 2023 19:23:10 -0400 Subject: [PATCH 285/859] Roll Skia from 00e4d00021a7 to b961fc353715 (6 revisions) (#46280) https://skia.googlesource.com/skia.git/+log/00e4d00021a7..b961fc353715 2023-09-25 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 26148a023702 to 9fc3baf5a19f (7 revisions) 2023-09-25 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 655f1fa58633 to d2408a4517eb (4 revisions) 2023-09-25 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll Dawn from 8bf090f5ff0d to 555b91a7b386 (19 revisions) 2023-09-25 kjlubick@google.com Remove unwanted SkAssert from GrDirectContextPriv 2023-09-25 jvanverth@google.com [graphite] Fix SoftwarePathAtlas storage usage. 2023-09-25 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps and Dawn, add Vulkan-Utility-Libraries If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jonahwilliams@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 698fcbcca9790..de3df1325fd2b 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '00e4d00021a771f7d3e4ae8ef0dbfe3a9755b425', + 'skia_revision': 'b961fc35371508346c7552cb8f79651f154f10c3', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 71b71f83c8e33..db16f7f76a627 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 196bf3fa5cc648e9d0999bfc2ca4da8a +Signature: cb42284d0ee129a14b8b6ff190533956 ==================================================================================================== LIBRARY: etc1 From 4256e0dd56068611cfaff2a3792b22ab6e9e8695 Mon Sep 17 00:00:00 2001 From: Brandon DeRosier Date: Mon, 25 Sep 2023 19:29:22 -0400 Subject: [PATCH 286/859] [Impeller] Support applying color filters on the CPU for the RRect fast path. (#46281) Resolves https://github.com/flutter/flutter/issues/133354. Fixes and speeds up blended rrect blurs. Before: ![Screenshot 2023-09-25 at 3 46 47 PM](https://github.com/flutter/engine/assets/919017/2597e4eb-1fe4-402a-8a73-30bee1ea8424) After: ![Screenshot 2023-09-25 at 3 47 56 PM](https://github.com/flutter/engine/assets/919017/4073c382-f4f1-4cca-a36d-222176f84705) --- impeller/aiks/aiks_unittests.cc | 2 +- impeller/entity/contents/solid_rrect_blur_contents.cc | 6 ++++++ impeller/entity/contents/solid_rrect_blur_contents.h | 4 ++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/impeller/aiks/aiks_unittests.cc b/impeller/aiks/aiks_unittests.cc index caa3372e93780..bf6bf0e5c2a81 100644 --- a/impeller/aiks/aiks_unittests.cc +++ b/impeller/aiks/aiks_unittests.cc @@ -2988,7 +2988,7 @@ TEST_P(AiksTest, CanRenderForegroundAdvancedBlendWithMaskBlur) { canvas.ClipRect(Rect::MakeXYWH(100, 150, 400, 400)); canvas.DrawCircle({400, 400}, 200, { - .color = Color::White(), + .color = Color::Grey(), .color_filter = ColorFilter::MakeBlend( BlendMode::kColor, Color::Green()), .mask_blur_descriptor = diff --git a/impeller/entity/contents/solid_rrect_blur_contents.cc b/impeller/entity/contents/solid_rrect_blur_contents.cc index ec8bc3e61d9ce..d8893b285e12c 100644 --- a/impeller/entity/contents/solid_rrect_blur_contents.cc +++ b/impeller/entity/contents/solid_rrect_blur_contents.cc @@ -117,4 +117,10 @@ bool SolidRRectBlurContents::Render(const ContentContext& renderer, return true; } +bool SolidRRectBlurContents::ApplyColorFilter( + const ColorFilterProc& color_filter_proc) { + color_ = color_filter_proc(color_); + return true; +} + } // namespace impeller diff --git a/impeller/entity/contents/solid_rrect_blur_contents.h b/impeller/entity/contents/solid_rrect_blur_contents.h index ccc681f59fc32..60c41afd1db56 100644 --- a/impeller/entity/contents/solid_rrect_blur_contents.h +++ b/impeller/entity/contents/solid_rrect_blur_contents.h @@ -43,6 +43,10 @@ class SolidRRectBlurContents final : public Contents { const Entity& entity, RenderPass& pass) const override; + // |Contents| + [[nodiscard]] bool ApplyColorFilter( + const ColorFilterProc& color_filter_proc) override; + private: std::optional rect_; Scalar corner_radius_; From bcb95ed38a070bd67b09d70997231bc8e2660bb3 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 25 Sep 2023 20:59:58 -0400 Subject: [PATCH 287/859] Roll Dart SDK from 216b25f9ea6f to 7c749713c688 (1 revision) (#46284) https://dart.googlesource.com/sdk.git/+log/216b25f9ea6f..7c749713c688 2023-09-25 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-198.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jonahwilliams@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index de3df1325fd2b..af059010d4dd1 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '216b25f9ea6f56a94da4a79b96016ed20c1d8dc5', + 'dart_revision': '7c749713c688408d8fee9a58ca6c9c6fbf476f37', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index 6a7aeb0d06d2e..f32695a968c04 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: 8e6c2bff15fa625ee8505b718a9e9cab +Signature: 9da25dd6e83eac28bed2aca3c9542f56 ==================================================================================================== LIBRARY: dart From dd592d3a1b7176ef07f979a0b02c21cee76f9137 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 25 Sep 2023 21:04:04 -0400 Subject: [PATCH 288/859] Roll Fuchsia Linux SDK from uY9WEf2tJxa1Hpp4v... to a56c8yPp4DDlj_Qbl... (#46285) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jonahwilliams@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index af059010d4dd1..1954d4643ee71 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'uY9WEf2tJxa1Hpp4v7RXvPN25swStFm4US-PlU6Xe8wC' + 'version': 'a56c8yPp4DDlj_QblIlLum8BoJiVSDsDsJtweyEsZ7sC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index 53dc415a52861..9615ae04333bb 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: 09e00221d1276a03aee3895d2a3c484a +Signature: 95bdc0e2435d6077de8dce19fd4ec798 ==================================================================================================== LIBRARY: fuchsia_sdk From 04e4e724c363cd515af7050792119a4360c7781e Mon Sep 17 00:00:00 2001 From: godofredoc Date: Mon, 25 Sep 2023 18:27:26 -0700 Subject: [PATCH 289/859] Prepare fuchsia script to coexist with v1 and v2 of fuchsia builders. (#46126) Prepares fuchsia scripts to work correctly when both v1 and v2 of the fuchsia build are running in their respective environments. Bug: https://github.com/flutter/flutter/issues/126461 Bug: https://github.com/flutter/flutter/issues/135189 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- .ci.yaml | 1 + ci/builders/README.md | 3 ++- ci/builders/linux_fuchsia.json | 2 ++ tools/fuchsia/build_fuchsia_artifacts.py | 10 +++++++++- tools/fuchsia/merge_and_upload_debug_symbols.py | 12 +++++++++++- 5 files changed, 25 insertions(+), 3 deletions(-) diff --git a/.ci.yaml b/.ci.yaml index c6c8442e1b72c..3f1c7e5334ff2 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -161,6 +161,7 @@ targets: - name: Linux Fuchsia recipe: engine/engine properties: + add_recipes_cq: "true" build_fuchsia: "true" fuchsia_ctl_version: version:0.0.27 # ensure files from pre-production Fuchsia SDK tests are purged from cache diff --git a/ci/builders/README.md b/ci/builders/README.md index 2bccb7522cf00..73fcf14d41dd1 100644 --- a/ci/builders/README.md +++ b/ci/builders/README.md @@ -122,7 +122,8 @@ The current list of supported magic variables is: folder where logs are being placed. * `${LUCI_WORKDIR}` - translated to the LUCI chroot working directory. * `${LUCI_CLEANUP}` - translated to the LUCI chroot temp directory. -* `${REVISION}` - translated to the engine commit under test. +* `${REVISION}` - translated to the engine commit in postsubmit. In presubmit + it is translated to an empty string. ### Build diff --git a/ci/builders/linux_fuchsia.json b/ci/builders/linux_fuchsia.json index e79853486b2f9..72a72490e303c 100644 --- a/ci/builders/linux_fuchsia.json +++ b/ci/builders/linux_fuchsia.json @@ -164,6 +164,7 @@ "parameters": [ "--engine-version", "${REVISION}", + "--upload", "--target-arch", "arm64", "--out-dir", @@ -181,6 +182,7 @@ "parameters": [ "--engine-version", "${REVISION}", + "--upload", "--target-arch", "x64", "--out-dir", diff --git a/tools/fuchsia/build_fuchsia_artifacts.py b/tools/fuchsia/build_fuchsia_artifacts.py index 4acf13259fac0..2defd41a5c027 100755 --- a/tools/fuchsia/build_fuchsia_artifacts.py +++ b/tools/fuchsia/build_fuchsia_artifacts.py @@ -495,9 +495,17 @@ def main(): if args.copy_unoptimized_debug_artifacts and runtime_mode == 'debug' and optimized: CopyBuildToBucket(runtime_mode, arch, not optimized, product) + # Set revision to HEAD if empty and remove upload. This is to support + # presubmit workflows. + should_upload = args.upload + engine_version = args.engine_version + if not engine_version: + engine_version = 'HEAD' + should_upload = False + # Create and optionally upload CIPD package if args.cipd_dry_run or args.upload: - ProcessCIPDPackage(args.upload, args.engine_version) + ProcessCIPDPackage(should_upload, engine_version) return 0 diff --git a/tools/fuchsia/merge_and_upload_debug_symbols.py b/tools/fuchsia/merge_and_upload_debug_symbols.py index e27fd0137bdff..cec5768d07224 100755 --- a/tools/fuchsia/merge_and_upload_debug_symbols.py +++ b/tools/fuchsia/merge_and_upload_debug_symbols.py @@ -214,7 +214,17 @@ def main(): arch = args.target_arch cipd_def = WriteCIPDDefinition(arch, out_dir, internal_symbol_dirs) - ProcessCIPDPackage(args.upload, cipd_def, args.engine_version, out_dir, arch) + + # Set revision to HEAD if empty and remove upload. This is to support + # presubmit workflows. An empty engine_version means this script is running + # on presubmit. + should_upload = args.upload + engine_version = args.engine_version + if not engine_version: + engine_version = 'HEAD' + should_upload = False + + ProcessCIPDPackage(should_upload, cipd_def, engine_version, out_dir, arch) return 0 From 507f0efe8cf14cffd29142c1292a34cb03e48f41 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 26 Sep 2023 00:49:28 -0400 Subject: [PATCH 290/859] Roll Dart SDK from 7c749713c688 to 7c3588c05f87 (1 revision) (#46288) https://dart.googlesource.com/sdk.git/+log/7c749713c688..7c3588c05f87 2023-09-26 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-199.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jonahwilliams@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 1954d4643ee71..8ed24ba3086b3 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '7c749713c688408d8fee9a58ca6c9c6fbf476f37', + 'dart_revision': '7c3588c05f87f44ed6795b2e13457193f14dae4e', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index f32695a968c04..a22502d012816 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: 9da25dd6e83eac28bed2aca3c9542f56 +Signature: 601fdb9dd42612ba699cbf0563a3c257 ==================================================================================================== LIBRARY: dart From 18e3bc8bf931bead2a855392cc593e6117b80f7d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Sep 2023 05:38:09 +0000 Subject: [PATCH 291/859] Bump actions/checkout from 4.0.0 to 4.1.0 (#46290) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 4.0.0 to 4.1.0.
Release notes

Sourced from actions/checkout's releases.

v4.1.0

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v4.0.0...v4.1.0

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.1.0

v4.0.0

v3.6.0

v3.5.3

v3.5.2

v3.5.1

v3.5.0

v3.4.0

v3.3.0

v3.2.0

v3.1.0

v3.0.2

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.0.0&new-version=4.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- .github/workflows/scorecards-analysis.yml | 2 +- .github/workflows/third_party_scan.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/scorecards-analysis.yml b/.github/workflows/scorecards-analysis.yml index 56a3e054e3dcb..95e9ba1fa6846 100644 --- a/.github/workflows/scorecards-analysis.yml +++ b/.github/workflows/scorecards-analysis.yml @@ -22,7 +22,7 @@ jobs: id-token: write steps: - name: "Checkout code" - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 with: persist-credentials: false - name: "Run analysis" diff --git a/.github/workflows/third_party_scan.yml b/.github/workflows/third_party_scan.yml index cab8acc162744..6a94995ebafd8 100644 --- a/.github/workflows/third_party_scan.yml +++ b/.github/workflows/third_party_scan.yml @@ -25,7 +25,7 @@ jobs: id-token: write steps: - name: "Checkout code" - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 with: persist-credentials: false - name: "setup python" From 3a5ff0ce729cc254174b85e8cf77279aa8d6e456 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 26 Sep 2023 01:38:10 -0400 Subject: [PATCH 292/859] Roll Skia from b961fc353715 to 8264a73430de (1 revision) (#46289) https://skia.googlesource.com/skia.git/+log/b961fc353715..8264a73430de 2023-09-26 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from 2888f630bd2e to d850dc2502db (3 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jonahwilliams@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 8ed24ba3086b3..e73b879db88a6 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'b961fc35371508346c7552cb8f79651f154f10c3', + 'skia_revision': '8264a73430deecddbd339571e83f4e2d25c0cce2', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index db16f7f76a627..12783c0f3b699 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: cb42284d0ee129a14b8b6ff190533956 +Signature: c2eefcde064d0e266da9d32658d43f44 ==================================================================================================== LIBRARY: etc1 From 28a45cd65a4453d6e58b97053f6f35d189745433 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 26 Sep 2023 14:14:24 -0400 Subject: [PATCH 293/859] Roll Skia from 8264a73430de to dd6a4e3655fc (2 revisions) (#46291) https://skia.googlesource.com/skia.git/+log/8264a73430de..dd6a4e3655fc 2023-09-26 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from d850dc2502db to c6648ada1d0a 2023-09-26 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Dawn from 555b91a7b386 to 550366adce61 (8 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jonahwilliams@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index e73b879db88a6..99e1e97d3103f 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '8264a73430deecddbd339571e83f4e2d25c0cce2', + 'skia_revision': 'dd6a4e3655fc5787d05bc4fd34cc48889267f4aa', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From fb5820ca710a42cb8fd4a62cb99838252e42bfe8 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 26 Sep 2023 14:15:41 -0400 Subject: [PATCH 294/859] Roll Fuchsia Mac SDK from we5owZaebdO_3kyjz... to OMrTgAfDg9PKXTzq0... (#46294) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 99e1e97d3103f..1e359cb54489a 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'we5owZaebdO_3kyjzbmpyh37YiP2bGjPyaGIUnxXruUC' + 'version': 'OMrTgAfDg9PKXTzq02S-SPbjInFqsBoiPrFMP-k3TNYC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 560275a95b690a9d8ad13fbdb45b9c59e64e8b58 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Sep 2023 18:32:16 +0000 Subject: [PATCH 295/859] Bump uuid from 4.0.0 to 4.1.0 in /lib/web_ui (#46293) Bumps [uuid](https://github.com/Daegalus/dart-uuid) from 4.0.0 to 4.1.0.
Release notes

Sourced from uuid's releases.

4.1.0

  • [BREAKING CHANGE] In order to enforce lowercase strings in UuidValue, I have made the default const constructor private, and added a fromString factory constructor. Please migrate any direct UuidValue() usage to UuidValue.fromString() or UuidValue.withValidation().

Full Changelog: https://github.com/daegalus/dart-uuid/compare/4.0.0...4.1.0

Changelog

Sourced from uuid's changelog.

v4.1.0

  • [BREAKING CHANGE] In order to enforce lowercase strings in UuidValue, I have made the default const constructor private, and added a fromString factory constructor. Please migrate any direct UuidValue() usage to UuidValue.fromString() or UuidValue.withValidation().
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=uuid&package-manager=pub&previous-version=4.0.0&new-version=4.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- lib/web_ui/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/web_ui/pubspec.yaml b/lib/web_ui/pubspec.yaml index 03a5b79e0245b..fc25009154222 100644 --- a/lib/web_ui/pubspec.yaml +++ b/lib/web_ui/pubspec.yaml @@ -42,7 +42,7 @@ dev_dependencies: test_api: any test_core: any typed_data: any - uuid: 4.0.0 + uuid: 4.1.0 watcher: 1.1.0 web_socket_channel: any webdriver: 3.0.2 From 6e14fd429277918b7f812550df00ce25bd7323b4 Mon Sep 17 00:00:00 2001 From: gaaclarke <30870216+gaaclarke@users.noreply.github.com> Date: Tue, 26 Sep 2023 11:38:43 -0700 Subject: [PATCH 296/859] Clean up the docstring for ColorFilter.matrix (#46298) The first line is important since it is pulled out into https://api.flutter.dev/flutter/dart-ui/ColorFilter-class.html. The existing wording is very confusing about what the input actually is. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- lib/ui/painting.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ui/painting.dart b/lib/ui/painting.dart index ea6fa78fa88ff..6784474e88a31 100644 --- a/lib/ui/painting.dart +++ b/lib/ui/painting.dart @@ -3482,8 +3482,9 @@ class ColorFilter implements ImageFilter { _matrix = null, _type = _kTypeMode; - /// Construct a color filter that transforms a color by a 5x5 matrix, where - /// the fifth row is implicitly added in an identity configuration. + /// Construct a color filter from a 4x5 row-major matrix. The matrix is + /// interpreted as a 5x5 matrix, where the fifth row is the identity + /// configuration. /// /// Every pixel's color value, represented as an `[R, G, B, A]`, is matrix /// multiplied to create a new color: From 81af0ce7d72601f690abed2addd7e1769927030e Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 26 Sep 2023 15:02:22 -0400 Subject: [PATCH 297/859] Roll Skia from dd6a4e3655fc to bc4f22353590 (6 revisions) (#46299) https://skia.googlesource.com/skia.git/+log/dd6a4e3655fc..bc4f22353590 2023-09-26 brianosman@google.com [graphite] Support .000r read-swizzle (to be used for alpha-only) 2023-09-26 armansito@google.com [graphite][dawn] Fix resource leak of GPU-only storage 2023-09-26 kjlubick@google.com Update Skia callsites of GrDirectContexts::MakeGL 2023-09-26 ccameron@chromium.org SkGainmapInfo: Post-launch cleanup 2023-09-26 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from d2408a4517eb to 250d0ebaea5e (5 revisions) 2023-09-26 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 9fc3baf5a19f to c9955641bcc2 (6 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 1e359cb54489a..44c7de99ad76e 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'dd6a4e3655fc5787d05bc4fd34cc48889267f4aa', + 'skia_revision': 'bc4f22353590c00387382b359c8dbda03ab00e18', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 12783c0f3b699..786557432f2c8 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: c2eefcde064d0e266da9d32658d43f44 +Signature: d7d28427699e2e01c70037787c729de6 ==================================================================================================== LIBRARY: etc1 From 182739c7ff3687dd7f6f5eb1f5f140540feb1657 Mon Sep 17 00:00:00 2001 From: gaaclarke <30870216+gaaclarke@users.noreply.github.com> Date: Tue, 26 Sep 2023 12:14:08 -0700 Subject: [PATCH 298/859] [Impeller] fixes behavior for blurred rounded rect clear (#46167) fixes: https://github.com/flutter/flutter/issues/132849 I decided to mimic skia's blend function for clear only in the case for blurred rounded rects since that fixes the listed issue. I'm not sure if there are are other cases where we'd want this behavior. I've added golden tests for the other clear cases too to make sure we didn't break them. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I signed the [CLA]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat --- impeller/aiks/aiks_unittests.cc | 32 +++++++++++++++++++ impeller/entity/contents/content_context.cc | 17 +++++++--- impeller/entity/contents/content_context.h | 12 ++++--- .../contents/solid_rrect_blur_contents.cc | 9 ++++-- 4 files changed, 59 insertions(+), 11 deletions(-) diff --git a/impeller/aiks/aiks_unittests.cc b/impeller/aiks/aiks_unittests.cc index bf6bf0e5c2a81..7cf8b69fbc51d 100644 --- a/impeller/aiks/aiks_unittests.cc +++ b/impeller/aiks/aiks_unittests.cc @@ -3581,5 +3581,37 @@ TEST_P(AiksTest, VerticesGeometryUVPositionData) { ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); } +TEST_P(AiksTest, ClearBlendWithBlur) { + Canvas canvas; + Paint white; + white.color = Color::Blue(); + canvas.DrawRect(Rect::MakeXYWH(0, 0, 600.0, 600.0), white); + + Paint clear; + clear.blend_mode = BlendMode::kClear; + clear.mask_blur_descriptor = Paint::MaskBlurDescriptor{ + .style = FilterContents::BlurStyle::kNormal, + .sigma = Sigma(20), + }; + + canvas.DrawCircle(Point::MakeXY(300.0, 300.0), 200.0, clear); + + ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); +} + +TEST_P(AiksTest, ClearBlend) { + Canvas canvas; + Paint white; + white.color = Color::Blue(); + canvas.DrawRect(Rect::MakeXYWH(0, 0, 600.0, 600.0), white); + + Paint clear; + clear.blend_mode = BlendMode::kClear; + + canvas.DrawCircle(Point::MakeXY(300.0, 300.0), 200.0, clear); + + ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); +} + } // namespace testing } // namespace impeller diff --git a/impeller/entity/contents/content_context.cc b/impeller/entity/contents/content_context.cc index 1a4985db5a07e..1461e1b9cd9cf 100644 --- a/impeller/entity/contents/content_context.cc +++ b/impeller/entity/contents/content_context.cc @@ -38,10 +38,19 @@ void ContentContextOptions::ApplyToPipelineDescriptor( switch (pipeline_blend) { case BlendMode::kClear: - color0.dst_alpha_blend_factor = BlendFactor::kZero; - color0.dst_color_blend_factor = BlendFactor::kZero; - color0.src_alpha_blend_factor = BlendFactor::kZero; - color0.src_color_blend_factor = BlendFactor::kZero; + if (is_for_rrect_blur_clear) { + color0.alpha_blend_op = BlendOperation::kReverseSubtract; + color0.color_blend_op = BlendOperation::kReverseSubtract; + color0.dst_alpha_blend_factor = BlendFactor::kOne; + color0.dst_color_blend_factor = BlendFactor::kOne; + color0.src_alpha_blend_factor = BlendFactor::kDestinationColor; + color0.src_color_blend_factor = BlendFactor::kDestinationColor; + } else { + color0.dst_alpha_blend_factor = BlendFactor::kZero; + color0.dst_color_blend_factor = BlendFactor::kZero; + color0.src_alpha_blend_factor = BlendFactor::kZero; + color0.src_color_blend_factor = BlendFactor::kZero; + } break; case BlendMode::kSource: color0.blending_enabled = false; diff --git a/impeller/entity/contents/content_context.h b/impeller/entity/contents/content_context.h index 2778fec4f72c2..4c4c17c43b194 100644 --- a/impeller/entity/contents/content_context.h +++ b/impeller/entity/contents/content_context.h @@ -308,13 +308,14 @@ struct ContentContextOptions { PixelFormat color_attachment_pixel_format = PixelFormat::kUnknown; bool has_stencil_attachment = true; bool wireframe = false; + bool is_for_rrect_blur_clear = false; struct Hash { constexpr std::size_t operator()(const ContentContextOptions& o) const { - return fml::HashCombine(o.sample_count, o.blend_mode, o.stencil_compare, - o.stencil_operation, o.primitive_type, - o.color_attachment_pixel_format, - o.has_stencil_attachment, o.wireframe); + return fml::HashCombine( + o.sample_count, o.blend_mode, o.stencil_compare, o.stencil_operation, + o.primitive_type, o.color_attachment_pixel_format, + o.has_stencil_attachment, o.wireframe, o.is_for_rrect_blur_clear); } }; @@ -329,7 +330,8 @@ struct ContentContextOptions { lhs.color_attachment_pixel_format == rhs.color_attachment_pixel_format && lhs.has_stencil_attachment == rhs.has_stencil_attachment && - lhs.wireframe == rhs.wireframe; + lhs.wireframe == rhs.wireframe && + lhs.is_for_rrect_blur_clear == rhs.is_for_rrect_blur_clear; } }; diff --git a/impeller/entity/contents/solid_rrect_blur_contents.cc b/impeller/entity/contents/solid_rrect_blur_contents.cc index d8893b285e12c..ffb190cf7a271 100644 --- a/impeller/entity/contents/solid_rrect_blur_contents.cc +++ b/impeller/entity/contents/solid_rrect_blur_contents.cc @@ -88,8 +88,13 @@ bool SolidRRectBlurContents::Render(const ContentContext& renderer, Command cmd; DEBUG_COMMAND_INFO(cmd, "RRect Shadow"); - auto opts = OptionsFromPassAndEntity(pass, entity); + ContentContextOptions opts = OptionsFromPassAndEntity(pass, entity); opts.primitive_type = PrimitiveType::kTriangle; + Color color = color_; + if (entity.GetBlendMode() == BlendMode::kClear) { + opts.is_for_rrect_blur_clear = true; + color = Color::White(); + } cmd.pipeline = renderer.GetRRectBlurPipeline(opts); cmd.stencil_reference = entity.GetStencilDepth(); @@ -102,7 +107,7 @@ bool SolidRRectBlurContents::Render(const ContentContext& renderer, VS::BindFrameInfo(cmd, pass.GetTransientsBuffer().EmplaceUniform(frame_info)); FS::FragInfo frag_info; - frag_info.color = color_; + frag_info.color = color; frag_info.blur_sigma = blur_sigma; frag_info.rect_size = Point(positive_rect.size); frag_info.corner_radius = From f7a8076faa069b44c204616b6d82dcb04c1b6df7 Mon Sep 17 00:00:00 2001 From: Harry Terkelsen <1961493+harryterkelsen@users.noreply.github.com> Date: Tue, 26 Sep 2023 12:31:57 -0700 Subject: [PATCH 299/859] [canvaskit] Use DirectionalLight_Shadow flag for drawing shadows (#46292) Use the DirectionalLight_Shadow flag when drawing shadows in CanvasKit. This fixes bugs with drawing shadows in tests with different device pixel ratios. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I signed the [CLA]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat --- lib/web_ui/lib/src/engine/canvaskit/util.dart | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/web_ui/lib/src/engine/canvaskit/util.dart b/lib/web_ui/lib/src/engine/canvaskit/util.dart index 29855455abd3a..2b2e646dd117b 100644 --- a/lib/web_ui/lib/src/engine/canvaskit/util.dart +++ b/lib/web_ui/lib/src/engine/canvaskit/util.dart @@ -73,10 +73,10 @@ class SkiaShadowFlags { // material spec. const double ckShadowAmbientAlpha = 0.039; const double ckShadowSpotAlpha = 0.25; -const double ckShadowLightRadius = 1.1; -const double ckShadowLightHeight = 600.0; const double ckShadowLightXOffset = 0; const double ckShadowLightYOffset = -450; +const double ckShadowLightHeight = 600; +const double ckShadowLightRadius = 800; const double ckShadowLightXTangent = ckShadowLightXOffset / ckShadowLightHeight; const double ckShadowLightYTangent = ckShadowLightYOffset / ckShadowLightHeight; @@ -161,13 +161,15 @@ void drawSkShadow( bool transparentOccluder, double devicePixelRatio, ) { - final int flags = transparentOccluder + int flags = transparentOccluder ? SkiaShadowFlags.kTransparentOccluderShadowFlags : SkiaShadowFlags.kDefaultShadowFlags; + flags |= SkiaShadowFlags.kDirectionalLight_ShadowFlag; final ui.Color inAmbient = color.withAlpha((color.alpha * ckShadowAmbientAlpha).round()); - final ui.Color inSpot = color.withAlpha((color.alpha * ckShadowSpotAlpha).round()); + final ui.Color inSpot = + color.withAlpha((color.alpha * ckShadowSpotAlpha).round()); final SkTonalColors inTonalColors = SkTonalColors( ambient: makeFreshSkColor(inAmbient), @@ -180,10 +182,10 @@ void drawSkShadow( path.skiaObject, Float32List(3)..[2] = devicePixelRatio * elevation, Float32List(3) - ..[0] = ckShadowLightXOffset - ..[1] = ckShadowLightYOffset - ..[2] = devicePixelRatio * ckShadowLightHeight, - devicePixelRatio * ckShadowLightRadius, + ..[0] = 0 + ..[1] = -1 + ..[2] = 1, + ckShadowLightRadius / ckShadowLightHeight, tonalColors.ambient, tonalColors.spot, flags.toDouble(), From 247931d25e1486f895d3dac0fe7f1b1bd8154bd4 Mon Sep 17 00:00:00 2001 From: Bruno Leroux Date: Tue, 26 Sep 2023 22:39:05 +0200 Subject: [PATCH 300/859] [Android] Fix enableSuggestions set to false not honored (#46037) ## Description This PR fixes an issue where setting `TextField.enableSuggestions` to false was not honored on Android. Several Android devices (Samsung) and/or IMEs (including GBoard) does not disabled suggestions when `InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS `flag is set. The common solution is to rely on the following flag: ~~`InputType.TYPE_TEXT_VARIATION_PASSWORD`~~ `InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD`. Reference: - https://issuetracker.google.com/issues/36934423#comment4 - https://stackoverflow.com/questions/33148168/inputtype-type-text-flag-no-suggestions-in-samsung/33227237#33227237 - Existing comment on the codebase: https://github.com/flutter/engine/blob/53430c7c96a3ef1fc78d63ea6b0c35e5ff46c45e/shell/platform/android/io/flutter/plugin/editing/TextInputPlugin.java#L270 ## Related Issue Fixes https://github.com/flutter/flutter/issues/71679. ## Tests Adds 1 test. --- .../plugin/editing/TextInputPlugin.java | 6 +++- .../plugin/editing/TextInputPluginTest.java | 36 +++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/shell/platform/android/io/flutter/plugin/editing/TextInputPlugin.java b/shell/platform/android/io/flutter/plugin/editing/TextInputPlugin.java index f337132b1c810..4897eaf2f13cd 100644 --- a/shell/platform/android/io/flutter/plugin/editing/TextInputPlugin.java +++ b/shell/platform/android/io/flutter/plugin/editing/TextInputPlugin.java @@ -272,7 +272,11 @@ private static int inputTypeFromTextInputType( textType |= InputType.TYPE_TEXT_VARIATION_PASSWORD; } else { if (autocorrect) textType |= InputType.TYPE_TEXT_FLAG_AUTO_CORRECT; - if (!enableSuggestions) textType |= InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS; + if (!enableSuggestions) { + // Note: both required. Some devices ignore TYPE_TEXT_FLAG_NO_SUGGESTIONS. + textType |= InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS; + textType |= InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD; + } } if (textCapitalization == TextInputChannel.TextCapitalization.CHARACTERS) { diff --git a/shell/platform/android/test/io/flutter/plugin/editing/TextInputPluginTest.java b/shell/platform/android/test/io/flutter/plugin/editing/TextInputPluginTest.java index 881dffc18882c..c4eebd33b939d 100644 --- a/shell/platform/android/test/io/flutter/plugin/editing/TextInputPluginTest.java +++ b/shell/platform/android/test/io/flutter/plugin/editing/TextInputPluginTest.java @@ -1306,6 +1306,42 @@ public void showTextInput_textInputTypeNone() { assertEquals(testImm.isSoftInputVisible(), false); } + @Test + public void inputConnection_textInputTypeMultilineAndSuggestionsDisabled() { + // Regression test for https://github.com/flutter/flutter/issues/71679. + View testView = new View(ctx); + DartExecutor dartExecutor = mock(DartExecutor.class); + TextInputChannel textInputChannel = new TextInputChannel(dartExecutor); + TextInputPlugin textInputPlugin = + new TextInputPlugin(testView, textInputChannel, mock(PlatformViewsController.class)); + textInputPlugin.setTextInputClient( + 0, + new TextInputChannel.Configuration( + false, + false, + false, // Disable suggestions. + true, + false, + TextInputChannel.TextCapitalization.NONE, + new TextInputChannel.InputType(TextInputChannel.TextInputType.MULTILINE, false, false), + null, + null, + null, + null, + null)); + + EditorInfo editorInfo = new EditorInfo(); + InputConnection connection = + textInputPlugin.createInputConnection(testView, mock(KeyboardManager.class), editorInfo); + + assertEquals( + editorInfo.inputType, + InputType.TYPE_CLASS_TEXT + | InputType.TYPE_TEXT_FLAG_MULTI_LINE + | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS + | InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD); + } + // -------- Start: Autofill Tests ------- @Test public void autofill_enabledByDefault() { From 20bdf6a83228053075562632214f96279377d2cf Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Tue, 26 Sep 2023 14:47:13 -0700 Subject: [PATCH 301/859] [ios] Fix app extension not able to find assets from unloaded bundle (#46283) Directly use "flutter_assets" as the default path to find the asset path, this works for app extension when the bundle is unloaded. This PR also adds integration tests for app extensions, which also tests the asset path. Fixes https://github.com/flutter/flutter/issues/124292 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- .../framework/Source/FlutterNSBundleUtils.mm | 21 +- .../Source/FlutterDartProjectTest.mm | 6 +- .../project.pbxproj | 372 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../FlutterAppExtensionTestHost/AppDelegate.h | 9 + .../FlutterAppExtensionTestHost/AppDelegate.m | 38 ++ .../AccentColor.colorset/Contents.json | 11 + .../AppIcon.appiconset/Contents.json | 13 + .../Assets.xcassets/Contents.json | 6 + .../Base.lproj/LaunchScreen.storyboard | 25 ++ .../Base.lproj/Main.storyboard | 24 ++ .../FlutterAppExtensionTestHost/Info.plist | 25 ++ .../SceneDelegate.h | 11 + .../SceneDelegate.m | 52 +++ .../ViewController.h | 9 + .../ViewController.m | 33 ++ .../FlutterAppExtensionTestHost/main.m | 15 + .../Scenarios/Info_Impeller.plist | 29 ++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/WorkspaceSettings.xcsettings | 5 + .../Scenarios.xcodeproj/project.pbxproj | 253 +++++++++++- .../Base.lproj/MainInterface.storyboard | 24 ++ .../ios/Scenarios/ScenariosShare/Info.plist | 18 + .../ScenariosShare/ShareViewController.h | 10 + .../ScenariosShare/ShareViewController.m | 31 ++ .../ScenariosUITests/AppExtensionTests.m | 58 +++ .../ScenariosUITests/GoldenTestManager.m | 1 + .../src/darwin_app_extension_scenario.dart | 44 +++ testing/scenario_app/lib/src/scenarios.dart | 2 + testing/scenario_app/run_ios_tests.sh | 4 +- 32 files changed, 1163 insertions(+), 16 deletions(-) create mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.pbxproj create mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/AppDelegate.h create mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/AppDelegate.m create mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/AccentColor.colorset/Contents.json create mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/Contents.json create mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Base.lproj/LaunchScreen.storyboard create mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Base.lproj/Main.storyboard create mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Info.plist create mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/SceneDelegate.h create mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/SceneDelegate.m create mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/ViewController.h create mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/ViewController.m create mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/main.m create mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/Scenarios/Info_Impeller.plist create mode 100644 testing/scenario_app/ios/Scenarios.xcworkspace/contents.xcworkspacedata create mode 100644 testing/scenario_app/ios/Scenarios.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 testing/scenario_app/ios/Scenarios.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings create mode 100644 testing/scenario_app/ios/Scenarios/ScenariosShare/Base.lproj/MainInterface.storyboard create mode 100644 testing/scenario_app/ios/Scenarios/ScenariosShare/Info.plist create mode 100644 testing/scenario_app/ios/Scenarios/ScenariosShare/ShareViewController.h create mode 100644 testing/scenario_app/ios/Scenarios/ScenariosShare/ShareViewController.m create mode 100644 testing/scenario_app/ios/Scenarios/ScenariosUITests/AppExtensionTests.m create mode 100644 testing/scenario_app/lib/src/darwin_app_extension_scenario.dart diff --git a/shell/platform/darwin/common/framework/Source/FlutterNSBundleUtils.mm b/shell/platform/darwin/common/framework/Source/FlutterNSBundleUtils.mm index 9582f94e266e1..54cf8feeb7d8b 100644 --- a/shell/platform/darwin/common/framework/Source/FlutterNSBundleUtils.mm +++ b/shell/platform/darwin/common/framework/Source/FlutterNSBundleUtils.mm @@ -9,6 +9,7 @@ FLUTTER_ASSERT_ARC const NSString* kDefaultAssetPath = @"Frameworks/App.framework/flutter_assets"; +static NSString* GetFlutterAssetPathFromBundle(NSBundle* bundle); NSBundle* FLTFrameworkBundleInternal(NSString* flutterFrameworkBundleID, NSURL* searchURL) { NSDirectoryEnumerator* frameworkEnumerator = [NSFileManager.defaultManager @@ -29,7 +30,7 @@ } NSBundle* FLTGetApplicationBundle() { - NSBundle* mainBundle = [NSBundle mainBundle]; + NSBundle* mainBundle = NSBundle.mainBundle; // App extension bundle is in .app/PlugIns/Extension.appex. if ([mainBundle.bundleURL.pathExtension isEqualToString:@"appex"]) { // Up two levels. @@ -48,7 +49,7 @@ flutterFrameworkBundle = [NSBundle bundleWithIdentifier:flutterFrameworkBundleID]; } if (flutterFrameworkBundle == nil) { - flutterFrameworkBundle = [NSBundle mainBundle]; + flutterFrameworkBundle = NSBundle.mainBundle; } return flutterFrameworkBundle; } @@ -58,13 +59,23 @@ } NSString* FLTAssetsPathFromBundle(NSBundle* bundle) { + NSString* flutterAssetsPath = GetFlutterAssetPathFromBundle(bundle); + if (flutterAssetsPath.length == 0) { + flutterAssetsPath = GetFlutterAssetPathFromBundle(NSBundle.mainBundle); + } + return flutterAssetsPath; +} + +static NSString* GetFlutterAssetPathFromBundle(NSBundle* bundle) { NSString* flutterAssetsPath = FLTAssetPath(bundle); // Use the raw path solution so that asset path can be returned from unloaded bundles. // See https://github.com/flutter/engine/pull/46073 - NSString* assetsPath = [bundle pathForResource:flutterAssetsPath ofType:@""]; - + NSString* assetsPath = [bundle pathForResource:flutterAssetsPath ofType:nil]; if (assetsPath.length == 0) { - assetsPath = [[NSBundle mainBundle] pathForResource:flutterAssetsPath ofType:@""]; + // In app extension, using full relative path (kDefaultAssetPath) + // returns nil when the app bundle is not loaded. Try to use + // the sub folder name, which can successfully return a valid path. + assetsPath = [bundle pathForResource:@"flutter_assets" ofType:nil]; } return assetsPath; } diff --git a/shell/platform/darwin/ios/framework/Source/FlutterDartProjectTest.mm b/shell/platform/darwin/ios/framework/Source/FlutterDartProjectTest.mm index aecab91f0051c..025bde32aeb2c 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterDartProjectTest.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterDartProjectTest.mm @@ -93,7 +93,7 @@ - (void)testFLTAssetsURLFromBundle { id mockBundle = OCMClassMock([NSBundle class]); OCMStub([mockBundle objectForInfoDictionaryKey:@"FLTAssetsPath"]).andReturn(@"foo/assets"); NSString* resultAssetsPath = @"path/to/foo/assets"; - OCMStub([mockBundle pathForResource:@"foo/assets" ofType:@""]).andReturn(resultAssetsPath); + OCMStub([mockBundle pathForResource:@"foo/assets" ofType:nil]).andReturn(resultAssetsPath); NSString* path = FLTAssetsPathFromBundle(mockBundle); XCTAssertEqualObjects(path, @"path/to/foo/assets"); } @@ -102,9 +102,9 @@ - (void)testFLTAssetsURLFromBundle { id mockBundle = OCMClassMock([NSBundle class]); id mockMainBundle = OCMPartialMock([NSBundle mainBundle]); NSString* resultAssetsPath = @"path/to/foo/assets"; - OCMStub([mockBundle pathForResource:@"Frameworks/App.framework/flutter_assets" ofType:@""]) + OCMStub([mockBundle pathForResource:@"Frameworks/App.framework/flutter_assets" ofType:nil]) .andReturn(nil); - OCMStub([mockMainBundle pathForResource:@"Frameworks/App.framework/flutter_assets" ofType:@""]) + OCMStub([mockMainBundle pathForResource:@"Frameworks/App.framework/flutter_assets" ofType:nil]) .andReturn(resultAssetsPath); NSString* path = FLTAssetsPathFromBundle(mockBundle); XCTAssertEqualObjects(path, @"path/to/foo/assets"); diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.pbxproj b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.pbxproj new file mode 100644 index 0000000000000..b67c72aabae64 --- /dev/null +++ b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.pbxproj @@ -0,0 +1,372 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + 686382C62ABE173000E27AAD /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 686382C52ABE173000E27AAD /* AppDelegate.m */; }; + 686382C92ABE173000E27AAD /* SceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 686382C82ABE173000E27AAD /* SceneDelegate.m */; }; + 686382CC2ABE173000E27AAD /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 686382CB2ABE173000E27AAD /* ViewController.m */; }; + 686382CF2ABE173000E27AAD /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 686382CD2ABE173000E27AAD /* Main.storyboard */; }; + 686382D12ABE173000E27AAD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 686382D02ABE173000E27AAD /* Assets.xcassets */; }; + 686382D42ABE173000E27AAD /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 686382D22ABE173000E27AAD /* LaunchScreen.storyboard */; }; + 686382D72ABE173000E27AAD /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 686382D62ABE173000E27AAD /* main.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 686382C12ABE172F00E27AAD /* FlutterAppExtensionTestHost.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FlutterAppExtensionTestHost.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 686382C42ABE173000E27AAD /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 686382C52ABE173000E27AAD /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 686382C72ABE173000E27AAD /* SceneDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SceneDelegate.h; sourceTree = ""; }; + 686382C82ABE173000E27AAD /* SceneDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SceneDelegate.m; sourceTree = ""; }; + 686382CA2ABE173000E27AAD /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + 686382CB2ABE173000E27AAD /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + 686382CE2ABE173000E27AAD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 686382D02ABE173000E27AAD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 686382D32ABE173000E27AAD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 686382D52ABE173000E27AAD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 686382D62ABE173000E27AAD /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 686382BE2ABE172F00E27AAD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 686382B82ABE172F00E27AAD = { + isa = PBXGroup; + children = ( + 686382C32ABE173000E27AAD /* FlutterAppExtensionTestHost */, + 686382C22ABE172F00E27AAD /* Products */, + ); + sourceTree = ""; + }; + 686382C22ABE172F00E27AAD /* Products */ = { + isa = PBXGroup; + children = ( + 686382C12ABE172F00E27AAD /* FlutterAppExtensionTestHost.app */, + ); + name = Products; + sourceTree = ""; + }; + 686382C32ABE173000E27AAD /* FlutterAppExtensionTestHost */ = { + isa = PBXGroup; + children = ( + 686382C42ABE173000E27AAD /* AppDelegate.h */, + 686382C52ABE173000E27AAD /* AppDelegate.m */, + 686382C72ABE173000E27AAD /* SceneDelegate.h */, + 686382C82ABE173000E27AAD /* SceneDelegate.m */, + 686382CA2ABE173000E27AAD /* ViewController.h */, + 686382CB2ABE173000E27AAD /* ViewController.m */, + 686382CD2ABE173000E27AAD /* Main.storyboard */, + 686382D02ABE173000E27AAD /* Assets.xcassets */, + 686382D22ABE173000E27AAD /* LaunchScreen.storyboard */, + 686382D52ABE173000E27AAD /* Info.plist */, + 686382D62ABE173000E27AAD /* main.m */, + ); + path = FlutterAppExtensionTestHost; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 686382C02ABE172F00E27AAD /* FlutterAppExtensionTestHost */ = { + isa = PBXNativeTarget; + buildConfigurationList = 686382DA2ABE173000E27AAD /* Build configuration list for PBXNativeTarget "FlutterAppExtensionTestHost" */; + buildPhases = ( + 686382BD2ABE172F00E27AAD /* Sources */, + 686382BE2ABE172F00E27AAD /* Frameworks */, + 686382BF2ABE172F00E27AAD /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = FlutterAppExtensionTestHost; + productName = FlutterAppExtensionTestHost; + productReference = 686382C12ABE172F00E27AAD /* FlutterAppExtensionTestHost.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 686382B92ABE172F00E27AAD /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastUpgradeCheck = 1500; + TargetAttributes = { + 686382C02ABE172F00E27AAD = { + CreatedOnToolsVersion = 15.0; + }; + }; + }; + buildConfigurationList = 686382BC2ABE172F00E27AAD /* Build configuration list for PBXProject "FlutterAppExtensionTestHost" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 686382B82ABE172F00E27AAD; + productRefGroup = 686382C22ABE172F00E27AAD /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 686382C02ABE172F00E27AAD /* FlutterAppExtensionTestHost */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 686382BF2ABE172F00E27AAD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 686382D42ABE173000E27AAD /* LaunchScreen.storyboard in Resources */, + 686382D12ABE173000E27AAD /* Assets.xcassets in Resources */, + 686382CF2ABE173000E27AAD /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 686382BD2ABE172F00E27AAD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 686382CC2ABE173000E27AAD /* ViewController.m in Sources */, + 686382C62ABE173000E27AAD /* AppDelegate.m in Sources */, + 686382D72ABE173000E27AAD /* main.m in Sources */, + 686382C92ABE173000E27AAD /* SceneDelegate.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 686382CD2ABE173000E27AAD /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 686382CE2ABE173000E27AAD /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 686382D22ABE173000E27AAD /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 686382D32ABE173000E27AAD /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 686382D82ABE173000E27AAD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 686382D92ABE173000E27AAD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 686382DB2ABE173000E27AAD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = FlutterAppExtensionTestHost/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 16.2; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.FlutterAppExtensionTestHost; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 686382DC2ABE173000E27AAD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = FlutterAppExtensionTestHost/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 16.2; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.FlutterAppExtensionTestHost; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 686382BC2ABE172F00E27AAD /* Build configuration list for PBXProject "FlutterAppExtensionTestHost" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 686382D82ABE173000E27AAD /* Debug */, + 686382D92ABE173000E27AAD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 686382DA2ABE173000E27AAD /* Build configuration list for PBXNativeTarget "FlutterAppExtensionTestHost" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 686382DB2ABE173000E27AAD /* Debug */, + 686382DC2ABE173000E27AAD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 686382B92ABE172F00E27AAD /* Project object */; +} diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000000..919434a6254f0 --- /dev/null +++ b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000000..18d981003d68d --- /dev/null +++ b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/AppDelegate.h b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/AppDelegate.h new file mode 100644 index 0000000000000..99c576ec95059 --- /dev/null +++ b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/AppDelegate.h @@ -0,0 +1,9 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import + +@interface AppDelegate : UIResponder + +@end diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/AppDelegate.m b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/AppDelegate.m new file mode 100644 index 0000000000000..1beee74b03e03 --- /dev/null +++ b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/AppDelegate.m @@ -0,0 +1,38 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import "AppDelegate.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + +- (BOOL)application:(UIApplication*)application + didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { + // Override point for customization after application launch. + return YES; +} + +#pragma mark - UISceneSession lifecycle + +- (UISceneConfiguration*)application:(UIApplication*)application + configurationForConnectingSceneSession:(UISceneSession*)connectingSceneSession + options:(UISceneConnectionOptions*)options { + // Called when a new scene session is being created. + // Use this method to select a configuration to create the new scene with. + return [[UISceneConfiguration alloc] initWithName:@"Default Configuration" + sessionRole:connectingSceneSession.role]; +} + +- (void)application:(UIApplication*)application + didDiscardSceneSessions:(NSSet*)sceneSessions { + // Called when the user discards a scene session. + // If any sessions were discarded while the application was not running, this will be called + // shortly after application:didFinishLaunchingWithOptions. Use this method to release any + // resources that were specific to the discarded scenes, as they will not return. +} + +@end diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/AccentColor.colorset/Contents.json b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000000000..eb87897008164 --- /dev/null +++ b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/AppIcon.appiconset/Contents.json b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000000..13613e3ee1a93 --- /dev/null +++ b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/Contents.json b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/Contents.json new file mode 100644 index 0000000000000..73c00596a7fca --- /dev/null +++ b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Base.lproj/LaunchScreen.storyboard b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000000000..865e9329f3767 --- /dev/null +++ b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Base.lproj/Main.storyboard b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Base.lproj/Main.storyboard new file mode 100644 index 0000000000000..808a21ce779ba --- /dev/null +++ b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Info.plist b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Info.plist new file mode 100644 index 0000000000000..81ed29b76cfbe --- /dev/null +++ b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Info.plist @@ -0,0 +1,25 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + SceneDelegate + UISceneStoryboardFile + Main + + + + + + diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/SceneDelegate.h b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/SceneDelegate.h new file mode 100644 index 0000000000000..6adc5d3a2cd7f --- /dev/null +++ b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/SceneDelegate.h @@ -0,0 +1,11 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import + +@interface SceneDelegate : UIResponder + +@property(strong, nonatomic) UIWindow* window; + +@end diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/SceneDelegate.m b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/SceneDelegate.m new file mode 100644 index 0000000000000..1271efb7faa5f --- /dev/null +++ b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/SceneDelegate.m @@ -0,0 +1,52 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import "SceneDelegate.h" + +@interface SceneDelegate () + +@end + +@implementation SceneDelegate + +- (void)scene:(UIScene*)scene + willConnectToSession:(UISceneSession*)session + options:(UISceneConnectionOptions*)connectionOptions { + // Use this method to optionally configure and attach the UIWindow `window` to the provided + // UIWindowScene `scene`. If using a storyboard, the `window` property will automatically be + // initialized and attached to the scene. This delegate does not imply the connecting scene or + // session are new (see `application:configurationForConnectingSceneSession` instead). +} + +- (void)sceneDidDisconnect:(UIScene*)scene { + // Called as the scene is being released by the system. + // This occurs shortly after the scene enters the background, or when its session is discarded. + // Release any resources associated with this scene that can be re-created the next time the scene + // connects. The scene may re-connect later, as its session was not necessarily discarded (see + // `application:didDiscardSceneSessions` instead). +} + +- (void)sceneDidBecomeActive:(UIScene*)scene { + // Called when the scene has moved from an inactive state to an active state. + // Use this method to restart any tasks that were paused (or not yet started) when the scene was + // inactive. +} + +- (void)sceneWillResignActive:(UIScene*)scene { + // Called when the scene will move from an active state to an inactive state. + // This may occur due to temporary interruptions (ex. an incoming phone call). +} + +- (void)sceneWillEnterForeground:(UIScene*)scene { + // Called as the scene transitions from the background to the foreground. + // Use this method to undo the changes made on entering the background. +} + +- (void)sceneDidEnterBackground:(UIScene*)scene { + // Called as the scene transitions from the foreground to the background. + // Use this method to save data, release shared resources, and store enough scene-specific state + // information to restore the scene back to its current state. +} + +@end diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/ViewController.h b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/ViewController.h new file mode 100644 index 0000000000000..4f235259bfecc --- /dev/null +++ b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/ViewController.h @@ -0,0 +1,9 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import + +@interface ViewController : UIViewController + +@end diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/ViewController.m b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/ViewController.m new file mode 100644 index 0000000000000..b725cc412618f --- /dev/null +++ b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/ViewController.m @@ -0,0 +1,33 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import "ViewController.h" + +@interface ViewController () + +@end + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + UIButton* openShare = + [UIButton systemButtonWithPrimaryAction:[UIAction actionWithHandler:^( + __kindof UIAction* _Nonnull action) { + UIActivityViewController* activityVC = + [[UIActivityViewController alloc] initWithActivityItems:@[ @"text to share" ] + applicationActivities:nil]; + activityVC.excludedActivityTypes = @[ + UIActivityTypePrint, UIActivityTypeCopyToPasteboard, + UIActivityTypeAssignToContact, UIActivityTypeSaveToCameraRoll + ]; // Exclude whichever aren't relevant + [self presentViewController:activityVC animated:YES completion:nil]; + }]]; + openShare.backgroundColor = [UIColor systemPinkColor]; + [openShare setTitle:@"Open Share" forState:UIControlStateNormal]; + [self.view addSubview:openShare]; + openShare.frame = CGRectMake(0, 0, 200, 200); +} + +@end diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/main.m b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/main.m new file mode 100644 index 0000000000000..f98f92491e8a0 --- /dev/null +++ b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/main.m @@ -0,0 +1,15 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import +#import "AppDelegate.h" + +int main(int argc, char* argv[]) { + NSString* appDelegateClassName; + @autoreleasepool { + // Setup code that might create autoreleased objects goes here. + appDelegateClassName = NSStringFromClass([AppDelegate class]); + } + return UIApplicationMain(argc, argv, nil, appDelegateClassName); +} diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/Scenarios/Info_Impeller.plist b/testing/scenario_app/ios/FlutterAppExtensionTestHost/Scenarios/Info_Impeller.plist new file mode 100644 index 0000000000000..2ad0401d1c878 --- /dev/null +++ b/testing/scenario_app/ios/FlutterAppExtensionTestHost/Scenarios/Info_Impeller.plist @@ -0,0 +1,29 @@ + + + + + + + FLTEnableImpeller + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + SceneDelegate + UISceneStoryboardFile + Main + + + + + + diff --git a/testing/scenario_app/ios/Scenarios.xcworkspace/contents.xcworkspacedata b/testing/scenario_app/ios/Scenarios.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000000..00ca3de9d76c0 --- /dev/null +++ b/testing/scenario_app/ios/Scenarios.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/testing/scenario_app/ios/Scenarios.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/testing/scenario_app/ios/Scenarios.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000000..18d981003d68d --- /dev/null +++ b/testing/scenario_app/ios/Scenarios.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/testing/scenario_app/ios/Scenarios.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/testing/scenario_app/ios/Scenarios.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000000000..0c67376ebacb4 --- /dev/null +++ b/testing/scenario_app/ios/Scenarios.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,5 @@ + + + + + diff --git a/testing/scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj b/testing/scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj index ec69054a447da..7402e6958cd9a 100644 --- a/testing/scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj +++ b/testing/scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 52; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -62,6 +62,12 @@ 6860CE252A01B2FF00B68EC5 /* golden_two_platform_view_clip_rrect_iPhone SE (3rd generation)_16.2_simulator.png in Resources */ = {isa = PBXBuildFile; fileRef = 6860CE222A01B2FF00B68EC5 /* golden_two_platform_view_clip_rrect_iPhone SE (3rd generation)_16.2_simulator.png */; }; 6860CE262A01B2FF00B68EC5 /* golden_two_platform_view_clip_rect_iPhone SE (3rd generation)_16.2_simulator.png in Resources */ = {isa = PBXBuildFile; fileRef = 6860CE232A01B2FF00B68EC5 /* golden_two_platform_view_clip_rect_iPhone SE (3rd generation)_16.2_simulator.png */; }; 6860CE272A01B2FF00B68EC5 /* golden_two_platform_view_clip_path_iPhone SE (3rd generation)_16.2_simulator.png in Resources */ = {isa = PBXBuildFile; fileRef = 6860CE242A01B2FF00B68EC5 /* golden_two_platform_view_clip_path_iPhone SE (3rd generation)_16.2_simulator.png */; }; + 686382EC2AC1F9F300E27AAD /* ShareViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 686382EB2AC1F9F300E27AAD /* ShareViewController.m */; }; + 686382EF2AC1F9F300E27AAD /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 686382ED2AC1F9F300E27AAD /* MainInterface.storyboard */; }; + 686382F32AC1F9F300E27AAD /* ScenariosShare.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 686382E82AC1F9F300E27AAD /* ScenariosShare.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 686383132AC202B700E27AAD /* AppExtensionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 686383122AC202B700E27AAD /* AppExtensionTests.m */; }; + 686383152AC2175100E27AAD /* ../../Flutter.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 246B4E4522E3B61000073EBF /* ../../Flutter.xcframework */; }; + 686383162AC2175100E27AAD /* ../../Flutter.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 246B4E4522E3B61000073EBF /* ../../Flutter.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 68A5B63423EB71D300BDBCDB /* PlatformViewGestureRecognizerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 68A5B63323EB71D300BDBCDB /* PlatformViewGestureRecognizerTests.m */; }; 68D4017D2564859300ECD91A /* ContinuousTexture.m in Sources */ = {isa = PBXBuildFile; fileRef = 68D4017C2564859300ECD91A /* ContinuousTexture.m */; }; 68D93AEE2A46097E0054AB6D /* golden_platform_view_with_negative_backdrop_filter_iPhone SE (3rd generation)_16.2_simulator.png in Resources */ = {isa = PBXBuildFile; fileRef = 68D93AED2A46097E0054AB6D /* golden_platform_view_with_negative_backdrop_filter_iPhone SE (3rd generation)_16.2_simulator.png */; }; @@ -83,6 +89,27 @@ remoteGlobalIDString = 248D76C622E388370012F0C1; remoteInfo = Scenarios; }; + 686382F12AC1F9F300E27AAD /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 248D76BF22E388370012F0C1 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 686382E72AC1F9F300E27AAD; + remoteInfo = ScenariosShare; + }; + 6863830A2AC2024200E27AAD /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 686383052AC2024200E27AAD /* FlutterAppExtensionTestHost.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 686382C12ABE172F00E27AAD; + remoteInfo = FlutterAppExtensionTestHost; + }; + 686383102AC2027100E27AAD /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 686383052AC2024200E27AAD /* FlutterAppExtensionTestHost.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 686382C02ABE172F00E27AAD; + remoteInfo = FlutterAppExtensionTestHost; + }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -120,6 +147,28 @@ name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; }; + 686382F42AC1F9F300E27AAD /* Embed Foundation Extensions */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 13; + files = ( + 686382F32AC1F9F300E27AAD /* ScenariosShare.appex in Embed Foundation Extensions */, + ); + name = "Embed Foundation Extensions"; + runOnlyForDeploymentPostprocessing = 0; + }; + 686383172AC2175100E27AAD /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 686383162AC2175100E27AAD /* ../../Flutter.xcframework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ @@ -185,6 +234,13 @@ 6860CE222A01B2FF00B68EC5 /* golden_two_platform_view_clip_rrect_iPhone SE (3rd generation)_16.2_simulator.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "golden_two_platform_view_clip_rrect_iPhone SE (3rd generation)_16.2_simulator.png"; sourceTree = ""; }; 6860CE232A01B2FF00B68EC5 /* golden_two_platform_view_clip_rect_iPhone SE (3rd generation)_16.2_simulator.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "golden_two_platform_view_clip_rect_iPhone SE (3rd generation)_16.2_simulator.png"; sourceTree = ""; }; 6860CE242A01B2FF00B68EC5 /* golden_two_platform_view_clip_path_iPhone SE (3rd generation)_16.2_simulator.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "golden_two_platform_view_clip_path_iPhone SE (3rd generation)_16.2_simulator.png"; sourceTree = ""; }; + 686382E82AC1F9F300E27AAD /* ScenariosShare.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = ScenariosShare.appex; sourceTree = BUILT_PRODUCTS_DIR; }; + 686382EA2AC1F9F300E27AAD /* ShareViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ShareViewController.h; sourceTree = ""; }; + 686382EB2AC1F9F300E27AAD /* ShareViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ShareViewController.m; sourceTree = ""; }; + 686382EE2AC1F9F300E27AAD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/MainInterface.storyboard; sourceTree = ""; }; + 686382F02AC1F9F300E27AAD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 686383052AC2024200E27AAD /* FlutterAppExtensionTestHost.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = FlutterAppExtensionTestHost.xcodeproj; path = ../FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj; sourceTree = ""; }; + 686383122AC202B700E27AAD /* AppExtensionTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppExtensionTests.m; sourceTree = ""; }; 68A5B63323EB71D300BDBCDB /* PlatformViewGestureRecognizerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PlatformViewGestureRecognizerTests.m; sourceTree = ""; }; 68D4017B2564859300ECD91A /* ContinuousTexture.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ContinuousTexture.h; sourceTree = ""; }; 68D4017C2564859300ECD91A /* ContinuousTexture.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ContinuousTexture.m; sourceTree = ""; }; @@ -219,15 +275,25 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 686382E52AC1F9F300E27AAD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 686383152AC2175100E27AAD /* ../../Flutter.xcframework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 248D76BE22E388370012F0C1 = { isa = PBXGroup; children = ( + 686383052AC2024200E27AAD /* FlutterAppExtensionTestHost.xcodeproj */, 248D76C922E388370012F0C1 /* Scenarios */, 248D76E222E388380012F0C1 /* ScenariosTests */, 248D76ED22E388380012F0C1 /* ScenariosUITests */, + 686382E92AC1F9F300E27AAD /* ScenariosShare */, 248D76C822E388370012F0C1 /* Products */, 248D76FC22E388900012F0C1 /* Frameworks */, ); @@ -239,6 +305,7 @@ 248D76C722E388370012F0C1 /* Scenarios.app */, 248D76DF22E388380012F0C1 /* ScenariosTests.xctest */, 248D76EA22E388380012F0C1 /* ScenariosUITests.xctest */, + 686382E82AC1F9F300E27AAD /* ScenariosShare.appex */, ); name = Products; sourceTree = ""; @@ -298,6 +365,7 @@ 246A6610252E693A00EAB0F3 /* RenderingSelectionTest.m */, 0DDEBC88258830B40065D0E8 /* SpawnEngineTest.m */, F26F15B7268B6B5500EC54D3 /* iPadGestureTests.m */, + 686383122AC202B700E27AAD /* AppExtensionTests.m */, ); path = ScenariosUITests; sourceTree = ""; @@ -311,6 +379,25 @@ name = Frameworks; sourceTree = ""; }; + 686382E92AC1F9F300E27AAD /* ScenariosShare */ = { + isa = PBXGroup; + children = ( + 686382EA2AC1F9F300E27AAD /* ShareViewController.h */, + 686382EB2AC1F9F300E27AAD /* ShareViewController.m */, + 686382ED2AC1F9F300E27AAD /* MainInterface.storyboard */, + 686382F02AC1F9F300E27AAD /* Info.plist */, + ); + path = ScenariosShare; + sourceTree = ""; + }; + 686383062AC2024200E27AAD /* Products */ = { + isa = PBXGroup; + children = ( + 6863830B2AC2024200E27AAD /* FlutterAppExtensionTestHost.app */, + ); + name = Products; + sourceTree = ""; + }; F7B464DC2759D02B00079189 /* Goldens */ = { isa = PBXGroup; children = ( @@ -355,10 +442,12 @@ 248D76C422E388370012F0C1 /* Frameworks */, 248D76C522E388370012F0C1 /* Resources */, 246B4E4422E3B5F700073EBF /* Embed Frameworks */, + 686382F42AC1F9F300E27AAD /* Embed Foundation Extensions */, ); buildRules = ( ); dependencies = ( + 686382F22AC1F9F300E27AAD /* PBXTargetDependency */, ); name = Scenarios; productName = Scenarios; @@ -396,6 +485,7 @@ buildRules = ( ); dependencies = ( + 686383112AC2027100E27AAD /* PBXTargetDependency */, 248D76EC22E388380012F0C1 /* PBXTargetDependency */, ); name = ScenariosUITests; @@ -403,6 +493,24 @@ productReference = 248D76EA22E388380012F0C1 /* ScenariosUITests.xctest */; productType = "com.apple.product-type.bundle.ui-testing"; }; + 686382E72AC1F9F300E27AAD /* ScenariosShare */ = { + isa = PBXNativeTarget; + buildConfigurationList = 686382F72AC1F9F300E27AAD /* Build configuration list for PBXNativeTarget "ScenariosShare" */; + buildPhases = ( + 686382E42AC1F9F300E27AAD /* Sources */, + 686382E52AC1F9F300E27AAD /* Frameworks */, + 686382E62AC1F9F300E27AAD /* Resources */, + 686383172AC2175100E27AAD /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = ScenariosShare; + productName = ScenariosShare; + productReference = 686382E82AC1F9F300E27AAD /* ScenariosShare.appex */; + productType = "com.apple.product-type.app-extension"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -426,6 +534,9 @@ LastSwiftMigration = 1030; TestTargetID = 248D76C622E388370012F0C1; }; + 686382E72AC1F9F300E27AAD = { + CreatedOnToolsVersion = 15.0; + }; }; }; buildConfigurationList = 248D76C222E388370012F0C1 /* Build configuration list for PBXProject "Scenarios" */; @@ -439,15 +550,32 @@ mainGroup = 248D76BE22E388370012F0C1; productRefGroup = 248D76C822E388370012F0C1 /* Products */; projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 686383062AC2024200E27AAD /* Products */; + ProjectRef = 686383052AC2024200E27AAD /* FlutterAppExtensionTestHost.xcodeproj */; + }, + ); projectRoot = ""; targets = ( 248D76C622E388370012F0C1 /* Scenarios */, 248D76DE22E388380012F0C1 /* ScenariosTests */, 248D76E922E388380012F0C1 /* ScenariosUITests */, + 686382E72AC1F9F300E27AAD /* ScenariosShare */, ); }; /* End PBXProject section */ +/* Begin PBXReferenceProxy section */ + 6863830B2AC2024200E27AAD /* FlutterAppExtensionTestHost.app */ = { + isa = PBXReferenceProxy; + fileType = wrapper.application; + path = FlutterAppExtensionTestHost.app; + remoteRef = 6863830A2AC2024200E27AAD /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + /* Begin PBXResourcesBuildPhase section */ 248D76C522E388370012F0C1 /* Resources */ = { isa = PBXResourcesBuildPhase; @@ -497,6 +625,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 686382E62AC1F9F300E27AAD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 686382EF2AC1F9F300E27AAD /* MainInterface.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -539,10 +675,19 @@ F26F15B8268B6B5600EC54D3 /* iPadGestureTests.m in Sources */, 246A6611252E693A00EAB0F3 /* RenderingSelectionTest.m in Sources */, 4F06F1B32473296E000AF246 /* LocalizationInitializationTest.m in Sources */, + 686383132AC202B700E27AAD /* AppExtensionTests.m in Sources */, 0DDEBC89258830B40065D0E8 /* SpawnEngineTest.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; + 686382E42AC1F9F300E27AAD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 686382EC2AC1F9F300E27AAD /* ShareViewController.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -556,8 +701,29 @@ target = 248D76C622E388370012F0C1 /* Scenarios */; targetProxy = 248D76EB22E388380012F0C1 /* PBXContainerItemProxy */; }; + 686382F22AC1F9F300E27AAD /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 686382E72AC1F9F300E27AAD /* ScenariosShare */; + targetProxy = 686382F12AC1F9F300E27AAD /* PBXContainerItemProxy */; + }; + 686383112AC2027100E27AAD /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = FlutterAppExtensionTestHost; + targetProxy = 686383102AC2027100E27AAD /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ +/* Begin PBXVariantGroup section */ + 686382ED2AC1F9F300E27AAD /* MainInterface.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 686382EE2AC1F9F300E27AAD /* Base */, + ); + name = MainInterface.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + /* Begin XCBuildConfiguration section */ 248D76F122E388380012F0C1 /* Debug */ = { isa = XCBuildConfiguration; @@ -678,7 +844,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = S8QB4VV633; + DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -701,7 +867,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = S8QB4VV633; + DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -723,7 +889,7 @@ buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = S8QB4VV633; + DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -750,7 +916,7 @@ buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = S8QB4VV633; + DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -776,7 +942,7 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = S8QB4VV633; + DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -802,7 +968,7 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = S8QB4VV633; + DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -824,6 +990,70 @@ }; name = Release; }; + 686382F52AC1F9F300E27AAD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = ""; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = ScenariosShare/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = ScenariosShare; + INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2023 flutter. All rights reserved."; + IPHONEOS_DEPLOYMENT_TARGET = 16.2; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.Scenarios.ScenariosShare; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 686382F62AC1F9F300E27AAD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = ""; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = ScenariosShare/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = ScenariosShare; + INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2023 flutter. All rights reserved."; + IPHONEOS_DEPLOYMENT_TARGET = 16.2; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.Scenarios.ScenariosShare; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -863,6 +1093,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 686382F72AC1F9F300E27AAD /* Build configuration list for PBXNativeTarget "ScenariosShare" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 686382F52AC1F9F300E27AAD /* Debug */, + 686382F62AC1F9F300E27AAD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ }; rootObject = 248D76BF22E388370012F0C1 /* Project object */; diff --git a/testing/scenario_app/ios/Scenarios/ScenariosShare/Base.lproj/MainInterface.storyboard b/testing/scenario_app/ios/Scenarios/ScenariosShare/Base.lproj/MainInterface.storyboard new file mode 100644 index 0000000000000..589bdd9e70de9 --- /dev/null +++ b/testing/scenario_app/ios/Scenarios/ScenariosShare/Base.lproj/MainInterface.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/testing/scenario_app/ios/Scenarios/ScenariosShare/Info.plist b/testing/scenario_app/ios/Scenarios/ScenariosShare/Info.plist new file mode 100644 index 0000000000000..ad33037771e88 --- /dev/null +++ b/testing/scenario_app/ios/Scenarios/ScenariosShare/Info.plist @@ -0,0 +1,18 @@ + + + + + NSExtension + + NSExtensionAttributes + + NSExtensionActivationRule + TRUEPREDICATE + + NSExtensionPrincipalClass + ShareViewController + NSExtensionPointIdentifier + com.apple.share-services + + + diff --git a/testing/scenario_app/ios/Scenarios/ScenariosShare/ShareViewController.h b/testing/scenario_app/ios/Scenarios/ScenariosShare/ShareViewController.h new file mode 100644 index 0000000000000..004a75bd6ad35 --- /dev/null +++ b/testing/scenario_app/ios/Scenarios/ScenariosShare/ShareViewController.h @@ -0,0 +1,10 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import +#import + +@interface ShareViewController : FlutterViewController + +@end diff --git a/testing/scenario_app/ios/Scenarios/ScenariosShare/ShareViewController.m b/testing/scenario_app/ios/Scenarios/ScenariosShare/ShareViewController.m new file mode 100644 index 0000000000000..cea875a76271a --- /dev/null +++ b/testing/scenario_app/ios/Scenarios/ScenariosShare/ShareViewController.m @@ -0,0 +1,31 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import "ShareViewController.h" + +@interface ShareViewController () + +@end + +@implementation ShareViewController + +- (instancetype)init { + FlutterEngine* engine = [[FlutterEngine alloc] initWithName:@"FlutterControllerTest" project:nil]; + [engine run]; + self = [self initWithEngine:engine nibName:nil bundle:nil]; + self.view.accessibilityIdentifier = @"flutter_view"; + + [engine.binaryMessenger + setMessageHandlerOnChannel:@"waiting_for_status" + binaryMessageHandler:^(NSData* _Nullable message, FlutterBinaryReply _Nonnull reply) { + FlutterMethodChannel* channel = [FlutterMethodChannel + methodChannelWithName:@"driver" + binaryMessenger:engine.binaryMessenger + codec:[FlutterJSONMethodCodec sharedInstance]]; + [channel invokeMethod:@"set_scenario" arguments:@{@"name" : @"app_extension"}]; + }]; + return self; +} + +@end diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/AppExtensionTests.m b/testing/scenario_app/ios/Scenarios/ScenariosUITests/AppExtensionTests.m new file mode 100644 index 0000000000000..70d4e0a190a3b --- /dev/null +++ b/testing/scenario_app/ios/Scenarios/ScenariosUITests/AppExtensionTests.m @@ -0,0 +1,58 @@ +// Copyright 2020 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import +#import "GoldenTestManager.h" + +@interface AppExtensionTests : XCTestCase +@property(nonatomic, strong) XCUIApplication* hostApplication; +@end + +@implementation AppExtensionTests + +- (void)setUp { + [super setUp]; + self.continueAfterFailure = NO; + self.hostApplication = + [[XCUIApplication alloc] initWithBundleIdentifier:@"dev.flutter.FlutterAppExtensionTestHost"]; +} + +- (void)testAppExtensionLaunching { + [self.hostApplication launch]; + XCUIElement* button = self.hostApplication.buttons[@"Open Share"]; + if (![button waitForExistenceWithTimeout:10]) { + NSLog(@"%@", self.hostApplication.debugDescription); + XCTFail(@"Failed due to not able to find any button with %@ seconds", @(10)); + } + [button tap]; + BOOL launchedExtensionInFlutter = NO; + // Custom share extension button (like the one in this test) does not have a unique + // identity. They are all identified as `XCElementSnapshotPrivilegedValuePlaceholder`. + // Loop through all the `XCElementSnapshotPrivilegedValuePlaceholder` and find the Flutter one. + for (int i = 0; i < self.hostApplication.collectionViews.cells.count; i++) { + XCUIElement* shareSheetCell = + [self.hostApplication.collectionViews.cells elementBoundByIndex:i]; + if (![shareSheetCell.label isEqualToString:@"XCElementSnapshotPrivilegedValuePlaceholder"]) { + continue; + } + [shareSheetCell tap]; + + XCUIElement* flutterView = self.hostApplication.otherElements[@"flutter_view"]; + if ([flutterView waitForExistenceWithTimeout:10]) { + launchedExtensionInFlutter = YES; + break; + } + + // All the built-in share extensions have a Cancel button. + // Tap the Cancel button to close the built-in extension. + XCUIElement* cancel = self.hostApplication.buttons[@"Cancel"]; + if ([cancel waitForExistenceWithTimeout:10]) { + [cancel tap]; + } + } + // App extension successfully launched flutter view. + XCTAssertTrue(launchedExtensionInFlutter); +} + +@end diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenTestManager.m b/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenTestManager.m index a8d966379a5aa..29915a4cf57b2 100644 --- a/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenTestManager.m +++ b/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenTestManager.m @@ -53,6 +53,7 @@ - (instancetype)initWithLaunchArg:(NSString*)launchArg { @"--two-platform-view-clip-rect" : @"two_platform_view_clip_rect", @"--two-platform-view-clip-rrect" : @"two_platform_view_clip_rrect", @"--two-platform-view-clip-path" : @"two_platform_view_clip_path", + @"--app-extension" : @"app_extension", }; }); _identifier = launchArgsMap[launchArg]; diff --git a/testing/scenario_app/lib/src/darwin_app_extension_scenario.dart b/testing/scenario_app/lib/src/darwin_app_extension_scenario.dart new file mode 100644 index 0000000000000..354810a5d8d23 --- /dev/null +++ b/testing/scenario_app/lib/src/darwin_app_extension_scenario.dart @@ -0,0 +1,44 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'dart:ui'; + +import 'scenario.dart'; + +/// Shows a text that is shown in app extension. +class DarwinAppExtensionScenario extends Scenario { + /// Creates the DarwinAppExtensionScenario scenario. + DarwinAppExtensionScenario(super.view); + + // Semi-arbitrary. + final double _screenWidth = 700; + + @override + void onBeginFrame(Duration duration) { + final SceneBuilder builder = SceneBuilder(); + final PictureRecorder recorder = PictureRecorder(); + final Canvas canvas = Canvas(recorder); + + final ParagraphBuilder paragraphBuilder = + ParagraphBuilder(ParagraphStyle()) + ..pushStyle(TextStyle(fontSize: 80)) + ..addText('flutter Scenarios app extension.') + ..pop(); + final Paragraph paragraph = paragraphBuilder.build(); + + paragraph.layout(ParagraphConstraints(width: _screenWidth)); + + canvas.drawParagraph(paragraph, const Offset(50, 80)); + final Picture picture = recorder.endRecording(); + + builder.addPicture( + Offset.zero, + picture, + willChangeHint: true, + ); + final Scene scene = builder.build(); + view.render(scene); + scene.dispose(); + } +} diff --git a/testing/scenario_app/lib/src/scenarios.dart b/testing/scenario_app/lib/src/scenarios.dart index d9c586023bed2..8e3b15a985fa1 100644 --- a/testing/scenario_app/lib/src/scenarios.dart +++ b/testing/scenario_app/lib/src/scenarios.dart @@ -6,6 +6,7 @@ import 'dart:ui'; import 'animated_color_square.dart'; import 'bogus_font_text.dart'; +import 'darwin_app_extension_scenario.dart'; import 'get_bitmap_scenario.dart'; import 'initial_route_reply.dart'; import 'locale_initialization.dart'; @@ -66,6 +67,7 @@ Map _scenarios = { 'pointer_events': (FlutterView view) => TouchesScenario(view), 'display_texture': (FlutterView view) => DisplayTexture(view), 'get_bitmap': (FlutterView view) => GetBitmapScenario(view), + 'app_extension': (FlutterView view) => DarwinAppExtensionScenario(view), }; Map _currentScenarioParams = {}; diff --git a/testing/scenario_app/run_ios_tests.sh b/testing/scenario_app/run_ios_tests.sh index 3f730deaf3bba..772ea3b96294d 100755 --- a/testing/scenario_app/run_ios_tests.sh +++ b/testing/scenario_app/run_ios_tests.sh @@ -109,7 +109,9 @@ if set -o pipefail && xcodebuild -sdk iphonesimulator \ -skip-testing ScenariosUITests/TwoPlatformViewClipRRectTests/testPlatformView \ -skip-testing ScenariosUITests/TwoPlatformViewsWithOtherBackDropFilterTests/testPlatformView \ -skip-testing ScenariosUITests/UnobstructedPlatformViewTests/testMultiplePlatformViewsWithOverlays \ - INFOPLIST_FILE="Scenarios/Info_Impeller.plist"; then # Plist with FLTEnableImpeller=YES + # Plist with FLTEnableImpeller=YES, all projects in the workspace requires this file. + # For example, FlutterAppExtensionTestHost has a dummy file under the below directory. + INFOPLIST_FILE="Scenarios/Info_Impeller.plist"; then echo "test success." else echo "test failed." From 9c8d1dfbc50868f1195a1c9da9886ed3c1c306f5 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 26 Sep 2023 18:47:19 -0400 Subject: [PATCH 302/859] Roll Fuchsia Linux SDK from a56c8yPp4DDlj_Qbl... to Lg6FR6iDnZeV6y-E8... (#46302) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 44c7de99ad76e..86c8705311323 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'a56c8yPp4DDlj_QblIlLum8BoJiVSDsDsJtweyEsZ7sC' + 'version': 'Lg6FR6iDnZeV6y-E8iVqEsPfDyNRkT_ZnJSGtO2OH2UC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index 9615ae04333bb..abb81b0d9c37c 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: 95bdc0e2435d6077de8dce19fd4ec798 +Signature: 207305b3a9c9f31dccf9873cf4fc9138 ==================================================================================================== LIBRARY: fuchsia_sdk From 25e5bc7d5c3777996dd7160d93ffa6797c285a93 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 26 Sep 2023 20:06:11 -0400 Subject: [PATCH 303/859] Roll Skia from bc4f22353590 to d1215b38667c (4 revisions) (#46306) https://skia.googlesource.com/skia.git/+log/bc4f22353590..d1215b38667c 2023-09-26 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 250d0ebaea5e to e883de340ccc (2 revisions) 2023-09-26 johnstiles@google.com Remove SkMesh::Make calls without child params. 2023-09-26 johnstiles@google.com Add SkMeshSpecification::findChild accessor. 2023-09-26 brianosman@google.com [graphite] Suppress alpha-only image shader logic via runtime effects If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 86c8705311323..3d2c415abd07c 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'bc4f22353590c00387382b359c8dbda03ab00e18', + 'skia_revision': 'd1215b38667cb25279fddf703261bdd8cace002a', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 786557432f2c8..c2fc55d635f4e 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: d7d28427699e2e01c70037787c729de6 +Signature: 5a064a11ff6aa12280e8bbad14878681 ==================================================================================================== LIBRARY: etc1 From fb779ecdd64bd9926bb6c6d538c3b10b36cc183a Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 27 Sep 2023 01:20:18 -0400 Subject: [PATCH 304/859] Roll Skia from d1215b38667c to 76aecbaea259 (1 revision) (#46309) https://skia.googlesource.com/skia.git/+log/d1215b38667c..76aecbaea259 2023-09-27 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Dawn from 550366adce61 to 1ec4835ca75d (26 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 3d2c415abd07c..1034e34b2bd88 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'd1215b38667cb25279fddf703261bdd8cace002a', + 'skia_revision': '76aecbaea2590f92fdc67c2c173ed438bb3bc89d', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 624f40b383893a0cfb5984b4278a7fa7209aee00 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 27 Sep 2023 01:36:14 -0400 Subject: [PATCH 305/859] Roll Dart SDK from 7c3588c05f87 to 6c4eb86ecd25 (3 revisions) (#46310) https://dart.googlesource.com/sdk.git/+log/7c3588c05f87..6c4eb86ecd25 2023-09-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-202.0.dev 2023-09-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-201.0.dev 2023-09-26 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-200.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jacksongardner@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 10 +++++----- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/DEPS b/DEPS index 1034e34b2bd88..2230ea2316859 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '7c3588c05f87f44ed6795b2e13457193f14dae4e', + 'dart_revision': '6c4eb86ecd258fac93e87ef47812c5a8e1899411', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py @@ -67,7 +67,7 @@ vars = { 'dart_browser_launcher_rev': '1f69393d63a2f8d36d00b86cdd20df70c347af82', 'dart_clock_rev': '1e75f08d3428bcd6f4b7cf70e788f24fc9b661e1', 'dart_collection_rev': '91afde43f488eef618454b896301c6ff59af72e0', - 'dart_devtools_rev': '2a1d1975d7ad8773a3e2590d10636432775f23a1', + 'dart_devtools_rev': '61d618843c76b328b1382193378d52eb9f3def04', 'dart_libprotobuf_rev': '24487dd1045c7f3d64a21f38a3f0c06cc4cf2edb', 'dart_perfetto_rev': 'b8da07095979310818f0efde2ef3c69ea70d62c5', 'dart_protobuf_gn_rev': 'ca669f79945418f6229e4fef89b666b2a88cbb10', @@ -337,7 +337,7 @@ deps = { Var('chromium_git') + '/external/github.com/WebAssembly/binaryen.git@a51bd6df919a5b79574f0996a760cc20cb05697e', 'src/third_party/dart/third_party/devtools': - {'dep_type': 'cipd', 'packages': [{'package': 'dart/third_party/flutter/devtools', 'version': 'git_revision:2a1d1975d7ad8773a3e2590d10636432775f23a1'}]}, + {'dep_type': 'cipd', 'packages': [{'package': 'dart/third_party/flutter/devtools', 'version': 'git_revision:61d618843c76b328b1382193378d52eb9f3def04'}]}, 'src/third_party/dart/third_party/pkg/args': Var('dart_git') + '/args.git@5a4e16f1e4c08b01498a9dce8aeda1a60161cd52', @@ -376,7 +376,7 @@ deps = { Var('dart_git') + '/dart_style.git@1a2def95a3c04dafd27b85d17e6e828bd4afa1a3', 'src/third_party/dart/third_party/pkg/dartdoc': - Var('dart_git') + '/dartdoc.git@0e1a6d94a6cb5dd487a19ebb68980e34ac6154ba', + Var('dart_git') + '/dartdoc.git@a3cfdc40a94d169bd7b559dc6f83ceb7f79de4e2', 'src/third_party/dart/third_party/pkg/ffi': Var('dart_git') + '/ffi.git@d36e05af55293bcc511d6b3a99ea4b8cb69f6323', @@ -427,7 +427,7 @@ deps = { Var('dart_git') + '/mockito.git@097e5635a6c1859e03e9c606c2ab4cfa74618bcc', 'src/third_party/dart/third_party/pkg/native': - Var('dart_git') + '/native.git@a5d88093017f5cecf30978a823fe6a8a2ebb8ca5', + Var('dart_git') + '/native.git@be4aaf7b849a64d67756c95b6270b9bfe47f3c7d', 'src/third_party/dart/third_party/pkg/package_config': Var('dart_git') + '/package_config.git@ae7ad83de97aba507fd05e97cc372bc6695c1759', diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index a22502d012816..e26f5f78207d4 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: 601fdb9dd42612ba699cbf0563a3c257 +Signature: cda26f982a3f50966fb6446aa974c3b4 ==================================================================================================== LIBRARY: dart From 3c6f4babb8719b3ae6d511b9f53641d5a7dc7d8e Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 27 Sep 2023 02:19:01 -0400 Subject: [PATCH 306/859] Roll Skia from 76aecbaea259 to 960325c13009 (2 revisions) (#46311) https://skia.googlesource.com/skia.git/+log/76aecbaea259..960325c13009 2023-09-27 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from b3365cad07b5 to d0c5366041fc 2023-09-27 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from d850dc2502db to b3365cad07b5 (4 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 2230ea2316859..fc9f84de8b25f 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '76aecbaea2590f92fdc67c2c173ed438bb3bc89d', + 'skia_revision': '960325c13009948b9cd97c00ae19a71b7f236fb2', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index c2fc55d635f4e..dd9ffa2f69b85 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 5a064a11ff6aa12280e8bbad14878681 +Signature: 3bcff2b24f2444fb2c9c279e13cdfbe8 ==================================================================================================== LIBRARY: etc1 From eaa1dfacb7c8c377c76871f8d660e296f94ad0e5 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 27 Sep 2023 03:42:16 -0400 Subject: [PATCH 307/859] Roll Skia from 960325c13009 to fc629215398f (1 revision) (#46313) https://skia.googlesource.com/skia.git/+log/960325c13009..fc629215398f 2023-09-27 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from c9955641bcc2 to 2c0f9d20f699 (5 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index fc9f84de8b25f..8a1c133b90c12 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '960325c13009948b9cd97c00ae19a71b7f236fb2', + 'skia_revision': 'fc629215398fa2e5a27bf11d58e14ffc9620e74f', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 5e2620b13208916c4ab71a222c86813aa52b5a47 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 27 Sep 2023 04:58:06 -0400 Subject: [PATCH 308/859] Roll Fuchsia Mac SDK from OMrTgAfDg9PKXTzq0... to jQHACBU4Fi2wMElkm... (#46314) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 8a1c133b90c12..2dc22336d65b1 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'OMrTgAfDg9PKXTzq02S-SPbjInFqsBoiPrFMP-k3TNYC' + 'version': 'jQHACBU4Fi2wMElkmHMAJdhp581b6LoYt9OthqJAFo4C' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From ece5e6fb081f253dd06b36394cc95d9c0251c411 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 27 Sep 2023 07:49:25 -0400 Subject: [PATCH 309/859] Roll Dart SDK from 6c4eb86ecd25 to c2a455113e39 (1 revision) (#46317) https://dart.googlesource.com/sdk.git/+log/6c4eb86ecd25..c2a455113e39 2023-09-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-203.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jacksongardner@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 2dc22336d65b1..bbc5f3b1ec43d 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '6c4eb86ecd258fac93e87ef47812c5a8e1899411', + 'dart_revision': 'c2a455113e39a3cbc73e262fd66520e0e6a04a26', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py From ad91ae997ff7da1e1085649f768c1d5a28f1a4fb Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 27 Sep 2023 08:29:01 -0400 Subject: [PATCH 310/859] Roll Skia from fc629215398f to 0f4f31127ac5 (1 revision) (#46318) https://skia.googlesource.com/skia.git/+log/fc629215398f..0f4f31127ac5 2023-09-27 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from e883de340ccc to 5ec10484307a (2 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index bbc5f3b1ec43d..75e401734e737 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'fc629215398fa2e5a27bf11d58e14ffc9620e74f', + 'skia_revision': '0f4f31127ac5b38598af0fceb468f63e0f9c2ef6', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 951c537bf8a91e62927daf8eac28ea588665c9c2 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 27 Sep 2023 09:18:37 -0400 Subject: [PATCH 311/859] Roll Skia from 0f4f31127ac5 to 2991bb799d3f (1 revision) (#46319) https://skia.googlesource.com/skia.git/+log/0f4f31127ac5..2991bb799d3f 2023-09-27 jiulongw@vibe.us Link standard GL function for pthread proxy to work If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 75e401734e737..75d668b66406c 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '0f4f31127ac5b38598af0fceb468f63e0f9c2ef6', + 'skia_revision': '2991bb799d3f2bf29019e318b44d02d272053b29', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index dd9ffa2f69b85..7059b8aea78ab 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 3bcff2b24f2444fb2c9c279e13cdfbe8 +Signature: 6020e668c927317afad6db97318d29d0 ==================================================================================================== LIBRARY: etc1 From 7b83cb8e2828f116afee2bba251c5a55f81f05c0 Mon Sep 17 00:00:00 2001 From: Kevin Lubick Date: Wed, 27 Sep 2023 10:17:05 -0400 Subject: [PATCH 312/859] Update to use GrDirectContexts::MakeGL (#46308) This was added in https://skia-review.googlesource.com/c/skia/+/760017 and the old versions were deprecated. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [ ] I listed at least one issue that this PR fixes in the description above. - [x] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [ ] I updated/added relevant documentation (doc comments with `///`). - [x] I signed the [CLA]. - [ ] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat --- lib/web_ui/skwasm/surface.cpp | 3 ++- shell/common/shell_io_manager.cc | 3 ++- shell/gpu/gpu_surface_gl_skia.cc | 3 ++- testing/test_gl_surface.cc | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/web_ui/skwasm/surface.cpp b/lib/web_ui/skwasm/surface.cpp index f1601bbef976c..cebb4889faf2b 100644 --- a/lib/web_ui/skwasm/surface.cpp +++ b/lib/web_ui/skwasm/surface.cpp @@ -8,6 +8,7 @@ #include "third_party/skia/include/gpu/GrBackendSurface.h" #include "third_party/skia/include/gpu/GrDirectContext.h" #include "third_party/skia/include/gpu/ganesh/gl/GrGLBackendSurface.h" +#include "third_party/skia/include/gpu/ganesh/gl/GrGLDirectContext.h" using namespace Skwasm; @@ -91,7 +92,7 @@ void Surface::_init() { makeCurrent(_glContext); emscripten_webgl_enable_extension(_glContext, "WEBGL_debug_renderer_info"); - _grContext = GrDirectContext::MakeGL(GrGLMakeNativeInterface()); + _grContext = GrDirectContexts::MakeGL(GrGLMakeNativeInterface()); // WebGL should already be clearing the color and stencil buffers, but do it // again here to ensure Skia receives them in the expected state. diff --git a/shell/common/shell_io_manager.cc b/shell/common/shell_io_manager.cc index 4a51c2f8d96d9..ec22661b3763d 100644 --- a/shell/common/shell_io_manager.cc +++ b/shell/common/shell_io_manager.cc @@ -8,6 +8,7 @@ #include "flutter/fml/message_loop.h" #include "flutter/shell/common/context_options.h" +#include "third_party/skia/include/gpu/ganesh/gl/GrGLDirectContext.h" #include "third_party/skia/include/gpu/gl/GrGLInterface.h" namespace flutter { @@ -22,7 +23,7 @@ sk_sp ShellIOManager::CreateCompatibleResourceLoadingContext( const auto options = MakeDefaultContextOptions(ContextType::kResource); - if (auto context = GrDirectContext::MakeGL(gl_interface, options)) { + if (auto context = GrDirectContexts::MakeGL(gl_interface, options)) { // Do not cache textures created by the image decoder. These textures // should be deleted when they are no longer referenced by an SkImage. context->setResourceCacheLimit(0); diff --git a/shell/gpu/gpu_surface_gl_skia.cc b/shell/gpu/gpu_surface_gl_skia.cc index 3118bee005134..04c708808e0a9 100644 --- a/shell/gpu/gpu_surface_gl_skia.cc +++ b/shell/gpu/gpu_surface_gl_skia.cc @@ -20,6 +20,7 @@ #include "third_party/skia/include/gpu/GrContextOptions.h" #include "third_party/skia/include/gpu/ganesh/SkSurfaceGanesh.h" #include "third_party/skia/include/gpu/ganesh/gl/GrGLBackendSurface.h" +#include "third_party/skia/include/gpu/ganesh/gl/GrGLDirectContext.h" #include "third_party/skia/include/gpu/gl/GrGLTypes.h" // These are common defines present on all OpenGL headers. However, we don't @@ -51,7 +52,7 @@ sk_sp GPUSurfaceGLSkia::MakeGLContext( const auto options = MakeDefaultContextOptions(ContextType::kRender, GrBackendApi::kOpenGL); - auto context = GrDirectContext::MakeGL(delegate->GetGLInterface(), options); + auto context = GrDirectContexts::MakeGL(delegate->GetGLInterface(), options); if (!context) { FML_LOG(ERROR) << "Failed to set up Skia Gr context."; diff --git a/testing/test_gl_surface.cc b/testing/test_gl_surface.cc index 8c98bacde9fdc..c70364696277a 100644 --- a/testing/test_gl_surface.cc +++ b/testing/test_gl_surface.cc @@ -20,6 +20,7 @@ #include "third_party/skia/include/gpu/GrBackendSurface.h" #include "third_party/skia/include/gpu/ganesh/SkSurfaceGanesh.h" #include "third_party/skia/include/gpu/ganesh/gl/GrGLBackendSurface.h" +#include "third_party/skia/include/gpu/ganesh/gl/GrGLDirectContext.h" #include "third_party/skia/include/gpu/gl/GrGLAssembleInterface.h" #include "third_party/skia/include/gpu/gl/GrGLTypes.h" @@ -336,7 +337,7 @@ sk_sp TestGLSurface::CreateGrContext() { return nullptr; } - context_ = GrDirectContext::MakeGL(interface); + context_ = GrDirectContexts::MakeGL(interface); return context_; } From 7da06bb38b11dc8f9a952fa23aefc61021604ea3 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Wed, 27 Sep 2023 07:44:51 -0700 Subject: [PATCH 313/859] Do not call DrawTextBlob for performance overlay text when using Impeller (#46307) --- flow/layers/performance_overlay_layer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flow/layers/performance_overlay_layer.cc b/flow/layers/performance_overlay_layer.cc index 1d83281372ee1..55d056476f029 100644 --- a/flow/layers/performance_overlay_layer.cc +++ b/flow/layers/performance_overlay_layer.cc @@ -57,10 +57,10 @@ void VisualizeStopWatch(DlCanvas* canvas, if (impeller_enabled) { canvas->DrawTextFrame(impeller::MakeTextFrameFromTextBlobSkia(text), x + label_x, y + height + label_y, paint); + return; } #endif // IMPELLER_SUPPORTS_RENDERING canvas->DrawTextBlob(text, x + label_x, y + height + label_y, paint); - return; } } From dbffbfcd87eed76e72e4a345f6888c5893f490c1 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Wed, 27 Sep 2023 07:44:54 -0700 Subject: [PATCH 314/859] Declare native wrapper classes in the GPU package as base classes (#46304) This prohibits other implementations of the class interface that can not act as native wrappers. See https://github.com/flutter/flutter/issues/123756 --- lib/gpu/lib/src/context.dart | 2 +- lib/ui/experiments/gpu.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/gpu/lib/src/context.dart b/lib/gpu/lib/src/context.dart index 1c1be14267fbb..a0efc586d16a1 100644 --- a/lib/gpu/lib/src/context.dart +++ b/lib/gpu/lib/src/context.dart @@ -8,7 +8,7 @@ import 'dart:nativewrappers'; /// A handle to a graphics context. Used to create and manage GPU resources. /// /// To obtain the default graphics context, use [getContext]. -class GpuContext extends NativeFieldWrapperClass1 { +base class GpuContext extends NativeFieldWrapperClass1 { /// Creates a new graphics context that corresponds to the default Impeller /// context. GpuContext._createDefault() { diff --git a/lib/ui/experiments/gpu.dart b/lib/ui/experiments/gpu.dart index 282f955e6658e..6b07dc65efc7b 100644 --- a/lib/ui/experiments/gpu.dart +++ b/lib/ui/experiments/gpu.dart @@ -147,7 +147,7 @@ class RasterPipeline {} /// A handle to a graphics context. Used to create and manage GPU resources. /// /// To obtain the default graphics context, use [getGpuContext]. -class GpuContext extends NativeFieldWrapperClass1 { +base class GpuContext extends NativeFieldWrapperClass1 { /// Creates a new graphics context that corresponds to the default Impeller /// context. GpuContext._createDefault() { From c9279ee2ee5a4e44e3ab5286647ca9b167f9cfa0 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 27 Sep 2023 10:47:56 -0400 Subject: [PATCH 315/859] Roll Skia from 2991bb799d3f to 4731ccd6342c (1 revision) (#46321) https://skia.googlesource.com/skia.git/+log/2991bb799d3f..4731ccd6342c 2023-09-27 nicolettep@google.com Reland "[graphite] Add Vulkan BackendTexture creation and deletion methods; unit tests" If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 75d668b66406c..7a2e0e9d0aad0 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '2991bb799d3f2bf29019e318b44d02d272053b29', + 'skia_revision': '4731ccd6342cb5deafc10f2de25830f5f167e7e3', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 7059b8aea78ab..4ac11b354b13d 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 6020e668c927317afad6db97318d29d0 +Signature: 0ca09088227f74a7ae8ead6967859a90 ==================================================================================================== LIBRARY: etc1 From 674ea73963b3098da84b400c8dfd41b68f253a8f Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 27 Sep 2023 11:02:53 -0400 Subject: [PATCH 316/859] Roll Fuchsia Linux SDK from Lg6FR6iDnZeV6y-E8... to 6Y22MutFhgL7ua18F... (#46322) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 7a2e0e9d0aad0..651dfbf6ae007 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'Lg6FR6iDnZeV6y-E8iVqEsPfDyNRkT_ZnJSGtO2OH2UC' + 'version': '6Y22MutFhgL7ua18FzWslqS1baVCAG7l6MuPhp1vEs0C' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index abb81b0d9c37c..ec91bcdb3e2da 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: 207305b3a9c9f31dccf9873cf4fc9138 +Signature: 9e4121654b11dd8e72f7e068c33dcffe ==================================================================================================== LIBRARY: fuchsia_sdk From eb1e48e5a2fb4ee3e16017b8d24acb3ca40af1fe Mon Sep 17 00:00:00 2001 From: Matej Knopp Date: Wed, 27 Sep 2023 17:09:49 +0200 Subject: [PATCH 317/859] [macOS] Synchronise modifiers from mouse events for RawKeyboard (#46230) Fixes https://github.com/flutter/flutter/issues/135349 This has been done for FlutterEmbedderKeyResponder in https://github.com/flutter/engine/pull/37870, but has not been implemented for FlutterChannelKeyResponder, which results in RawKeyboard being out of sync with HardwareKeyboard. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I signed the [CLA]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat --- .../Source/FlutterChannelKeyResponder.mm | 68 +++++++++++++++++++ .../Source/FlutterKeyPrimaryResponder.h | 9 +++ .../Source/FlutterKeyboardManager.mm | 7 +- .../Source/FlutterViewControllerTest.mm | 49 +++++++++++-- 4 files changed, 125 insertions(+), 8 deletions(-) diff --git a/shell/platform/darwin/macos/framework/Source/FlutterChannelKeyResponder.mm b/shell/platform/darwin/macos/framework/Source/FlutterChannelKeyResponder.mm index bcb7aa370ea76..98abd505d4d9b 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterChannelKeyResponder.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterChannelKeyResponder.mm @@ -40,6 +40,74 @@ - (nonnull instancetype)initWithChannel:(nonnull FlutterBasicMessageChannel*)cha return self; } +/// Checks single modifier flag from event flags and sends appropriate key event +/// if it is different from the previous state. +- (void)checkModifierFlag:(NSUInteger)targetMask + forEventFlags:(NSEventModifierFlags)eventFlags + keyCode:(NSUInteger)keyCode + timestamp:(NSTimeInterval)timestamp { + NSAssert((targetMask & (targetMask - 1)) == 0, @"targetMask must only have one bit set"); + if ((eventFlags & targetMask) != (_previouslyPressedFlags & targetMask)) { + uint64_t newFlags = (_previouslyPressedFlags & ~targetMask) | (eventFlags & targetMask); + + // Sets combined flag if either left or right modifier is pressed, unsets otherwise. + auto updateCombinedFlag = [&](uint64_t side1, uint64_t side2, NSEventModifierFlags flag) { + if (newFlags & (side1 | side2)) { + newFlags |= flag; + } else { + newFlags &= ~flag; + } + }; + updateCombinedFlag(flutter::kModifierFlagShiftLeft, flutter::kModifierFlagShiftRight, + NSEventModifierFlagShift); + updateCombinedFlag(flutter::kModifierFlagControlLeft, flutter::kModifierFlagControlRight, + NSEventModifierFlagControl); + updateCombinedFlag(flutter::kModifierFlagAltLeft, flutter::kModifierFlagAltRight, + NSEventModifierFlagOption); + updateCombinedFlag(flutter::kModifierFlagMetaLeft, flutter::kModifierFlagMetaRight, + NSEventModifierFlagCommand); + + NSEvent* event = [NSEvent keyEventWithType:NSEventTypeFlagsChanged + location:NSZeroPoint + modifierFlags:newFlags + timestamp:timestamp + windowNumber:0 + context:nil + characters:@"" + charactersIgnoringModifiers:@"" + isARepeat:NO + keyCode:keyCode]; + [self handleEvent:event + callback:^(BOOL){ + }]; + }; +} + +- (void)syncModifiersIfNeeded:(NSEventModifierFlags)modifierFlags + timestamp:(NSTimeInterval)timestamp { + modifierFlags = modifierFlags & ~0x100; + if (_previouslyPressedFlags == modifierFlags) { + return; + } + + [flutter::modifierFlagToKeyCode + enumerateKeysAndObjectsUsingBlock:^(NSNumber* flag, NSNumber* keyCode, BOOL* stop) { + [self checkModifierFlag:[flag unsignedShortValue] + forEventFlags:modifierFlags + keyCode:[keyCode unsignedShortValue] + timestamp:timestamp]; + }]; + + // Caps lock is not included in the modifierFlagToKeyCode map. + [self checkModifierFlag:NSEventModifierFlagCapsLock + forEventFlags:modifierFlags + keyCode:0x00000039 // kVK_CapsLock + timestamp:timestamp]; + + // At the end we should end up with the same modifier flags as the event. + FML_DCHECK(_previouslyPressedFlags == modifierFlags); +} + - (void)handleEvent:(NSEvent*)event callback:(FlutterAsyncKeyCallback)callback { // Remove the modifier bits that Flutter is not interested in. NSEventModifierFlags modifierFlags = event.modifierFlags & ~0x100; diff --git a/shell/platform/darwin/macos/framework/Source/FlutterKeyPrimaryResponder.h b/shell/platform/darwin/macos/framework/Source/FlutterKeyPrimaryResponder.h index b61c790028a3b..2c8918d45d70c 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterKeyPrimaryResponder.h +++ b/shell/platform/darwin/macos/framework/Source/FlutterKeyPrimaryResponder.h @@ -24,6 +24,15 @@ typedef void (^FlutterAsyncKeyCallback)(BOOL handled); @required - (void)handleEvent:(nonnull NSEvent*)event callback:(nonnull FlutterAsyncKeyCallback)callback; +/** + * Synchronize the modifier flags if necessary. The new modifier flag would usually come from mouse + * event and may be out of sync with current keyboard state if the modifier flags have changed while + * window was not key. + */ +@required +- (void)syncModifiersIfNeeded:(NSEventModifierFlags)modifierFlags + timestamp:(NSTimeInterval)timestamp; + /* A map from macOS key code to logical keyboard. * * The map is assigned on initialization, and updated when the user changes diff --git a/shell/platform/darwin/macos/framework/Source/FlutterKeyboardManager.mm b/shell/platform/darwin/macos/framework/Source/FlutterKeyboardManager.mm index 8812df4e948da..00ba4ac38cc39 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterKeyboardManager.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterKeyboardManager.mm @@ -337,10 +337,9 @@ - (void)buildLayout { - (void)syncModifiersIfNeeded:(NSEventModifierFlags)modifierFlags timestamp:(NSTimeInterval)timestamp { - // The embedder responder is the first element in _primaryResponders. - FlutterEmbedderKeyResponder* embedderResponder = - (FlutterEmbedderKeyResponder*)_primaryResponders[0]; - [embedderResponder syncModifiersIfNeeded:modifierFlags timestamp:timestamp]; + for (id responder in _primaryResponders) { + [responder syncModifiersIfNeeded:modifierFlags timestamp:timestamp]; + } } /** diff --git a/shell/platform/darwin/macos/framework/Source/FlutterViewControllerTest.mm b/shell/platform/darwin/macos/framework/Source/FlutterViewControllerTest.mm index eb28a5b786ad5..7894e9258b9ef 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterViewControllerTest.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterViewControllerTest.mm @@ -957,13 +957,17 @@ - (bool)testMouseDownUpEventsSentToNextResponder { - (bool)testModifierKeysAreSynthesizedOnMouseMove { id engineMock = flutter::testing::CreateMockFlutterEngine(@""); + id binaryMessengerMock = OCMProtocolMock(@protocol(FlutterBinaryMessenger)); + OCMStub( // NOLINT(google-objc-avoid-throwing-exception) + [engineMock binaryMessenger]) + .andReturn(binaryMessengerMock); + // Need to return a real renderer to allow view controller to load. FlutterRenderer* renderer_ = [[FlutterRenderer alloc] initWithFlutterEngine:engineMock]; OCMStub([engineMock renderer]).andReturn(renderer_); // Capture calls to sendKeyEvent - __block NSMutableArray* events = - [[NSMutableArray alloc] init]; + __block NSMutableArray* events = [NSMutableArray array]; OCMStub([[engineMock ignoringNonObjectArgs] sendKeyEvent:FlutterKeyEvent {} callback:nil userData:nil]) @@ -973,6 +977,17 @@ - (bool)testModifierKeysAreSynthesizedOnMouseMove { [events addObject:[[KeyEventWrapper alloc] initWithEvent:event]]; })); + __block NSMutableArray* channelEvents = [NSMutableArray array]; + OCMStub([binaryMessengerMock sendOnChannel:@"flutter/keyevent" + message:[OCMArg any] + binaryReply:[OCMArg any]]) + .andDo((^(NSInvocation* invocation) { + NSData* data; + [invocation getArgument:&data atIndex:3]; + id event = [[FlutterJSONMessageCodec sharedInstance] decode:data]; + [channelEvents addObject:event]; + })); + FlutterViewController* viewController = [[FlutterViewController alloc] initWithEngine:engineMock nibName:@"" bundle:nil]; @@ -987,12 +1002,27 @@ - (bool)testModifierKeysAreSynthesizedOnMouseMove { // For each modifier key, check that key events are synthesized. for (NSNumber* keyCode in flutter::keyCodeToModifierFlag) { FlutterKeyEvent* event; + NSDictionary* channelEvent; NSNumber* logicalKey; NSNumber* physicalKey; - NSNumber* flag = flutter::keyCodeToModifierFlag[keyCode]; + NSEventModifierFlags flag = [flutter::keyCodeToModifierFlag[keyCode] unsignedLongValue]; + + // Cocoa event always contain combined flags. + if (flag & (flutter::kModifierFlagShiftLeft | flutter::kModifierFlagShiftRight)) { + flag |= NSEventModifierFlagShift; + } + if (flag & (flutter::kModifierFlagControlLeft | flutter::kModifierFlagControlRight)) { + flag |= NSEventModifierFlagControl; + } + if (flag & (flutter::kModifierFlagAltLeft | flutter::kModifierFlagAltRight)) { + flag |= NSEventModifierFlagOption; + } + if (flag & (flutter::kModifierFlagMetaLeft | flutter::kModifierFlagMetaRight)) { + flag |= NSEventModifierFlagCommand; + } // Should synthesize down event. - NSEvent* mouseEvent = flutter::testing::CreateMouseEvent([flag unsignedLongValue]); + NSEvent* mouseEvent = flutter::testing::CreateMouseEvent(flag); [viewController mouseMoved:mouseEvent]; EXPECT_EQ([events count], 1u); event = events[0].data; @@ -1003,6 +1033,11 @@ - (bool)testModifierKeysAreSynthesizedOnMouseMove { EXPECT_EQ(event->physical, physicalKey.unsignedLongLongValue); EXPECT_EQ(event->synthesized, true); + channelEvent = channelEvents[0]; + EXPECT_TRUE([channelEvent[@"type"] isEqual:@"keydown"]); + EXPECT_TRUE([channelEvent[@"keyCode"] isEqual:keyCode]); + EXPECT_TRUE([channelEvent[@"modifiers"] isEqual:@(flag)]); + // Should synthesize up event. mouseEvent = flutter::testing::CreateMouseEvent(0x00); [viewController mouseMoved:mouseEvent]; @@ -1015,7 +1050,13 @@ - (bool)testModifierKeysAreSynthesizedOnMouseMove { EXPECT_EQ(event->physical, physicalKey.unsignedLongLongValue); EXPECT_EQ(event->synthesized, true); + channelEvent = channelEvents[1]; + EXPECT_TRUE([channelEvent[@"type"] isEqual:@"keyup"]); + EXPECT_TRUE([channelEvent[@"keyCode"] isEqual:keyCode]); + EXPECT_TRUE([channelEvent[@"modifiers"] isEqual:@(0)]); + [events removeAllObjects]; + [channelEvents removeAllObjects]; }; return true; From f8cbadbd8690521f8926af66fdcbe5c770b9c5ba Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 27 Sep 2023 11:25:48 -0400 Subject: [PATCH 318/859] Roll Dart SDK from c2a455113e39 to 97647bb1666b (1 revision) (#46323) https://dart.googlesource.com/sdk.git/+log/c2a455113e39..97647bb1666b 2023-09-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-204.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jacksongardner@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 651dfbf6ae007..94960c37ee3f5 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': 'c2a455113e39a3cbc73e262fd66520e0e6a04a26', + 'dart_revision': '97647bb1666b998eebe1805ba545b426fa038f41', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py From 85e36eb121c5a8b9cebb7a98f0c766e1ebf8ccc4 Mon Sep 17 00:00:00 2001 From: godofredoc Date: Wed, 27 Sep 2023 08:43:12 -0700 Subject: [PATCH 319/859] Remove fuchsia from recipes cq. (#46324) It was accidentally added back when landing some changes to the v2 version of the build. Bug: https://github.com/flutter/flutter/issues/135596 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- .ci.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.ci.yaml b/.ci.yaml index 3f1c7e5334ff2..c6c8442e1b72c 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -161,7 +161,6 @@ targets: - name: Linux Fuchsia recipe: engine/engine properties: - add_recipes_cq: "true" build_fuchsia: "true" fuchsia_ctl_version: version:0.0.27 # ensure files from pre-production Fuchsia SDK tests are purged from cache From 8d03beff96f47c2b3deac334b98c0479a7a242b1 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Wed, 27 Sep 2023 08:44:58 -0700 Subject: [PATCH 320/859] Declare native wrapper classes in Fuchsia packages as base classes (#46305) This prohibits other implementations of the class interface that can not act as native wrappers. See https://github.com/flutter/flutter/issues/123756 --- shell/platform/fuchsia/dart-pkg/zircon/lib/src/handle.dart | 2 +- .../fuchsia/dart-pkg/zircon/lib/src/handle_disposition.dart | 2 +- .../platform/fuchsia/dart-pkg/zircon/lib/src/handle_waiter.dart | 2 +- shell/platform/fuchsia/dart-pkg/zircon/lib/src/system.dart | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/shell/platform/fuchsia/dart-pkg/zircon/lib/src/handle.dart b/shell/platform/fuchsia/dart-pkg/zircon/lib/src/handle.dart index adfac800bc986..81a6300f25ddd 100644 --- a/shell/platform/fuchsia/dart-pkg/zircon/lib/src/handle.dart +++ b/shell/platform/fuchsia/dart-pkg/zircon/lib/src/handle.dart @@ -8,7 +8,7 @@ part of zircon; // ignore_for_file: public_member_api_docs @pragma('vm:entry-point') -class Handle extends NativeFieldWrapperClass1 { +base class Handle extends NativeFieldWrapperClass1 { // No public constructor - this can only be created from native code. @pragma('vm:entry-point') Handle._(); diff --git a/shell/platform/fuchsia/dart-pkg/zircon/lib/src/handle_disposition.dart b/shell/platform/fuchsia/dart-pkg/zircon/lib/src/handle_disposition.dart index bd3fa0363a70f..a3ce43bbc6cd8 100644 --- a/shell/platform/fuchsia/dart-pkg/zircon/lib/src/handle_disposition.dart +++ b/shell/platform/fuchsia/dart-pkg/zircon/lib/src/handle_disposition.dart @@ -8,7 +8,7 @@ part of zircon; // ignore_for_file: public_member_api_docs @pragma('vm:entry-point') -class HandleDisposition extends NativeFieldWrapperClass1 { +base class HandleDisposition extends NativeFieldWrapperClass1 { @pragma('vm:entry-point') HandleDisposition(int operation, Handle handle, int type, int rights) { _constructor(operation, handle, type, rights); diff --git a/shell/platform/fuchsia/dart-pkg/zircon/lib/src/handle_waiter.dart b/shell/platform/fuchsia/dart-pkg/zircon/lib/src/handle_waiter.dart index dba823a13bb47..49bc437a5049f 100644 --- a/shell/platform/fuchsia/dart-pkg/zircon/lib/src/handle_waiter.dart +++ b/shell/platform/fuchsia/dart-pkg/zircon/lib/src/handle_waiter.dart @@ -10,7 +10,7 @@ part of zircon; typedef AsyncWaitCallback = void Function(int status, int pending); @pragma('vm:entry-point') -class HandleWaiter extends NativeFieldWrapperClass1 { +base class HandleWaiter extends NativeFieldWrapperClass1 { // Private constructor. @pragma('vm:entry-point') HandleWaiter._(); diff --git a/shell/platform/fuchsia/dart-pkg/zircon/lib/src/system.dart b/shell/platform/fuchsia/dart-pkg/zircon/lib/src/system.dart index 9f6cec0b02ea5..ccf1b693608ce 100644 --- a/shell/platform/fuchsia/dart-pkg/zircon/lib/src/system.dart +++ b/shell/platform/fuchsia/dart-pkg/zircon/lib/src/system.dart @@ -193,7 +193,7 @@ class MapResult extends _Result { } @pragma('vm:entry-point') -class System extends NativeFieldWrapperClass1 { +base class System extends NativeFieldWrapperClass1 { // No public constructor - this only has static methods. System._(); From 8fa7a11391f344fddac3ad37a9a17cb049c706ae Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 27 Sep 2023 12:16:21 -0400 Subject: [PATCH 321/859] Roll Skia from 4731ccd6342c to ff5474eed6b4 (1 revision) (#46325) https://skia.googlesource.com/skia.git/+log/4731ccd6342c..ff5474eed6b4 2023-09-27 johnstiles@google.com Remove make_effect_fp from header. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 94960c37ee3f5..c1ea34a920028 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '4731ccd6342cb5deafc10f2de25830f5f167e7e3', + 'skia_revision': 'ff5474eed6b45ff25f5ec7a308696a56442b6a39', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 4ac11b354b13d..dad64d037727b 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 0ca09088227f74a7ae8ead6967859a90 +Signature: ffcfb8e2aec4062c05c96e805e599d4b ==================================================================================================== LIBRARY: etc1 From 4f074f52000b745060364db547ab16c6639dec19 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Wed, 27 Sep 2023 10:11:08 -0700 Subject: [PATCH 322/859] [Impeller] Fallback to no index buffer when tesselation count is large, split up nonZero contours. (#46282) See example app in https://github.com/flutter/flutter/issues/135458 Because tessellation is generally nlogn best case (with allocation complexity as well), we can actually make it faster by breaking it into smaller pieces. For non zero fill modes, the contours can be tessellated individually without losing fidelity. In cases where this isn't possible, we need to check if we exceed the max uint16 index and fall back to no index buffer. Fixes https://github.com/flutter/flutter/issues/135458 I Benchmarked signing my name. ### Before worst raster time 3+ seconds. Visual glitches ![flutter_03](https://github.com/flutter/engine/assets/8975114/7be57bd2-744f-4f0a-af0a-d2bd4fc9efaf) ### After worst raster time 30 ms, looks correct (though my signature is still wrong) ![flutter_04](https://github.com/flutter/engine/assets/8975114/1fdf504e-7b4e-447a-8c29-063dd0ff34d0) --- .../entity/geometry/fill_path_geometry.cc | 27 ++- impeller/geometry/geometry_benchmarks.cc | 4 +- impeller/renderer/renderer_unittests.cc | 8 +- impeller/tessellator/c/tessellator.cc | 8 +- impeller/tessellator/tessellator.cc | 176 +++++++++++++----- impeller/tessellator/tessellator.h | 12 +- impeller/tessellator/tessellator_unittests.cc | 86 +++++++-- 7 files changed, 239 insertions(+), 82 deletions(-) diff --git a/impeller/entity/geometry/fill_path_geometry.cc b/impeller/entity/geometry/fill_path_geometry.cc index b608ed0428ae1..1153572f25c08 100644 --- a/impeller/entity/geometry/fill_path_geometry.cc +++ b/impeller/entity/geometry/fill_path_geometry.cc @@ -3,6 +3,7 @@ // found in the LICENSE file. #include "impeller/entity/geometry/fill_path_geometry.h" +#include "impeller/core/formats.h" namespace impeller { @@ -47,11 +48,17 @@ GeometryResult FillPathGeometry::GetPositionBuffer( const float* vertices, size_t vertices_count, const uint16_t* indices, size_t indices_count) { vertex_buffer.vertex_buffer = host_buffer.Emplace( - vertices, vertices_count * sizeof(float), alignof(float)); - vertex_buffer.index_buffer = host_buffer.Emplace( - indices, indices_count * sizeof(uint16_t), alignof(uint16_t)); - vertex_buffer.vertex_count = indices_count; - vertex_buffer.index_type = IndexType::k16bit; + vertices, vertices_count * sizeof(float) * 2, alignof(float)); + if (indices != nullptr) { + vertex_buffer.index_buffer = host_buffer.Emplace( + indices, indices_count * sizeof(uint16_t), alignof(uint16_t)); + vertex_buffer.vertex_count = indices_count; + vertex_buffer.index_type = IndexType::k16bit; + } else { + vertex_buffer.index_buffer = {}; + vertex_buffer.vertex_count = vertices_count; + vertex_buffer.index_type = IndexType::kNone; + } return true; }); if (tesselation_result != Tessellator::Result::kSuccess) { @@ -112,7 +119,7 @@ GeometryResult FillPathGeometry::GetPositionUVBuffer( [&vertex_builder, &texture_coverage, &effect_transform]( const float* vertices, size_t vertices_count, const uint16_t* indices, size_t indices_count) { - for (auto i = 0u; i < vertices_count; i += 2) { + for (auto i = 0u; i < vertices_count * 2; i += 2) { VS::PerVertexData data; Point vtx = {vertices[i], vertices[i + 1]}; data.position = vtx; @@ -121,9 +128,11 @@ GeometryResult FillPathGeometry::GetPositionUVBuffer( texture_coverage.size; vertex_builder.AppendVertex(data); } - FML_DCHECK(vertex_builder.GetVertexCount() == vertices_count / 2); - for (auto i = 0u; i < indices_count; i++) { - vertex_builder.AppendIndex(indices[i]); + FML_DCHECK(vertex_builder.GetVertexCount() == vertices_count); + if (indices != nullptr) { + for (auto i = 0u; i < indices_count; i++) { + vertex_builder.AppendIndex(indices[i]); + } } return true; }); diff --git a/impeller/geometry/geometry_benchmarks.cc b/impeller/geometry/geometry_benchmarks.cc index d3c1f9ea525c5..8bff21f3282bf 100644 --- a/impeller/geometry/geometry_benchmarks.cc +++ b/impeller/geometry/geometry_benchmarks.cc @@ -35,8 +35,8 @@ static void BM_Polyline(benchmark::State& state, Args&&... args) { if (tessellate) { tess.Tessellate( FillType::kNonZero, polyline, - [](const float* vertices, size_t vertices_size, - const uint16_t* indices, size_t indices_size) { return true; }); + [](const float* vertices, size_t vertices_count, + const uint16_t* indices, size_t indices_count) { return true; }); } } state.counters["SinglePointCount"] = single_point_count; diff --git a/impeller/renderer/renderer_unittests.cc b/impeller/renderer/renderer_unittests.cc index 48772d09198e1..2ecc6fab2a004 100644 --- a/impeller/renderer/renderer_unittests.cc +++ b/impeller/renderer/renderer_unittests.cc @@ -404,14 +404,14 @@ TEST_P(RendererTest, CanRenderInstanced) { .AddRect(Rect::MakeXYWH(10, 10, 100, 100)) .TakePath() .CreatePolyline(1.0f), - [&builder](const float* vertices, size_t vertices_size, - const uint16_t* indices, size_t indices_size) { - for (auto i = 0u; i < vertices_size; i += 2) { + [&builder](const float* vertices, size_t vertices_count, + const uint16_t* indices, size_t indices_count) { + for (auto i = 0u; i < vertices_count * 2; i += 2) { VS::PerVertexData data; data.vtx = {vertices[i], vertices[i + 1]}; builder.AppendVertex(data); } - for (auto i = 0u; i < indices_size; i++) { + for (auto i = 0u; i < indices_count; i++) { builder.AppendIndex(indices[i]); } return true; diff --git a/impeller/tessellator/c/tessellator.cc b/impeller/tessellator/c/tessellator.cc index 1bdbfde66db84..b576d4393e809 100644 --- a/impeller/tessellator/c/tessellator.cc +++ b/impeller/tessellator/c/tessellator.cc @@ -45,14 +45,14 @@ struct Vertices* Tessellate(PathBuilder* builder, std::vector points; if (Tessellator{}.Tessellate( path.GetFillType(), polyline, - [&points](const float* vertices, size_t vertices_size, - const uint16_t* indices, size_t indices_size) { + [&points](const float* vertices, size_t vertices_count, + const uint16_t* indices, size_t indices_count) { // Results are expected to be re-duplicated. std::vector raw_points; - for (auto i = 0u; i < vertices_size; i += 2) { + for (auto i = 0u; i < vertices_count * 2; i += 2) { raw_points.emplace_back(Point{vertices[i], vertices[i + 1]}); } - for (auto i = 0u; i < indices_size; i++) { + for (auto i = 0u; i < indices_count; i++) { auto point = raw_points[indices[i]]; points.push_back(point.x); points.push_back(point.y); diff --git a/impeller/tessellator/tessellator.cc b/impeller/tessellator/tessellator.cc index f6b27215cca31..f7c80fe747ea0 100644 --- a/impeller/tessellator/tessellator.cc +++ b/impeller/tessellator/tessellator.cc @@ -78,51 +78,141 @@ Tessellator::Result Tessellator::Tessellate( constexpr int kVertexSize = 2; constexpr int kPolygonSize = 3; - //---------------------------------------------------------------------------- - /// Feed contour information to the tessellator. - /// - static_assert(sizeof(Point) == 2 * sizeof(float)); - for (size_t contour_i = 0; contour_i < polyline.contours.size(); - contour_i++) { - size_t start_point_index, end_point_index; - std::tie(start_point_index, end_point_index) = - polyline.GetContourPointBounds(contour_i); - - ::tessAddContour(tessellator, // the C tessellator - kVertexSize, // - polyline.points.data() + start_point_index, // - sizeof(Point), // - end_point_index - start_point_index // + // If we have a larger polyline and the fill type is non-zero, we can split + // the tessellation up per contour. Since in general the complexity is at + // least nlog(n), this speeds up the processes substantially. + if (polyline.contours.size() > kMultiContourThreshold && + fill_type == FillType::kNonZero) { + std::vector points; + std::vector data; + + //---------------------------------------------------------------------------- + /// Feed contour information to the tessellator. + /// + size_t total = 0u; + static_assert(sizeof(Point) == 2 * sizeof(float)); + for (size_t contour_i = 0; contour_i < polyline.contours.size(); + contour_i++) { + size_t start_point_index, end_point_index; + std::tie(start_point_index, end_point_index) = + polyline.GetContourPointBounds(contour_i); + + ::tessAddContour(tessellator, // the C tessellator + kVertexSize, // + polyline.points.data() + start_point_index, // + sizeof(Point), // + end_point_index - start_point_index // + ); + + //---------------------------------------------------------------------------- + /// Let's tessellate. + /// + auto result = ::tessTesselate(tessellator, // tessellator + ToTessWindingRule(fill_type), // winding + TESS_POLYGONS, // element type + kPolygonSize, // polygon size + kVertexSize, // vertex size + nullptr // normal (null is automatic) + ); + + if (result != 1) { + return Result::kTessellationError; + } + + int vertex_item_count = tessGetVertexCount(tessellator) * kVertexSize; + auto vertices = tessGetVertices(tessellator); + for (int i = 0; i < vertex_item_count; i += 2) { + points.emplace_back(vertices[i], vertices[i + 1]); + } + + int element_item_count = tessGetElementCount(tessellator) * kPolygonSize; + auto elements = tessGetElements(tessellator); + total += element_item_count; + for (int i = 0; i < element_item_count; i++) { + data.emplace_back(points[elements[i]].x); + data.emplace_back(points[elements[i]].y); + } + points.clear(); + } + if (!callback(data.data(), total, nullptr, 0u)) { + return Result::kInputError; + } + } else { + //---------------------------------------------------------------------------- + /// Feed contour information to the tessellator. + /// + static_assert(sizeof(Point) == 2 * sizeof(float)); + for (size_t contour_i = 0; contour_i < polyline.contours.size(); + contour_i++) { + size_t start_point_index, end_point_index; + std::tie(start_point_index, end_point_index) = + polyline.GetContourPointBounds(contour_i); + + ::tessAddContour(tessellator, // the C tessellator + kVertexSize, // + polyline.points.data() + start_point_index, // + sizeof(Point), // + end_point_index - start_point_index // + ); + } + + //---------------------------------------------------------------------------- + /// Let's tessellate. + /// + auto result = ::tessTesselate(tessellator, // tessellator + ToTessWindingRule(fill_type), // winding + TESS_POLYGONS, // element type + kPolygonSize, // polygon size + kVertexSize, // vertex size + nullptr // normal (null is automatic) ); - } - - //---------------------------------------------------------------------------- - /// Let's tessellate. - /// - auto result = ::tessTesselate(tessellator, // tessellator - ToTessWindingRule(fill_type), // winding - TESS_POLYGONS, // element type - kPolygonSize, // polygon size - kVertexSize, // vertex size - nullptr // normal (null is automatic) - ); - - if (result != 1) { - return Result::kTessellationError; - } - int vertexItemCount = tessGetVertexCount(tessellator) * kVertexSize; - auto vertices = tessGetVertices(tessellator); - int elementItemCount = tessGetElementCount(tessellator) * kPolygonSize; - auto elements = tessGetElements(tessellator); - // libtess uses an int index internally due to usage of -1 as a sentinel - // value. - std::vector indices(elementItemCount); - for (int i = 0; i < elementItemCount; i++) { - indices[i] = static_cast(elements[i]); - } - if (!callback(vertices, vertexItemCount, indices.data(), elementItemCount)) { - return Result::kInputError; + if (result != 1) { + return Result::kTessellationError; + } + + int element_item_count = tessGetElementCount(tessellator) * kPolygonSize; + + // We default to using a 16bit index buffer, but in cases where we generate + // more tessellated data than this can contain we need to fall back to + // dropping the index buffer entirely. Instead code could instead switch to + // a uint32 index buffer, but this is done for simplicity with the other + // fast path above. + if (element_item_count < USHRT_MAX) { + int vertex_item_count = tessGetVertexCount(tessellator); + auto vertices = tessGetVertices(tessellator); + auto elements = tessGetElements(tessellator); + + // libtess uses an int index internally due to usage of -1 as a sentinel + // value. + std::vector indices(element_item_count); + for (int i = 0; i < element_item_count; i++) { + indices[i] = static_cast(elements[i]); + } + if (!callback(vertices, vertex_item_count, indices.data(), + element_item_count)) { + return Result::kInputError; + } + } else { + std::vector points; + std::vector data; + + int vertex_item_count = tessGetVertexCount(tessellator) * kVertexSize; + auto vertices = tessGetVertices(tessellator); + for (int i = 0; i < vertex_item_count; i += 2) { + points.emplace_back(vertices[i], vertices[i + 1]); + } + + int element_item_count = tessGetElementCount(tessellator) * kPolygonSize; + auto elements = tessGetElements(tessellator); + for (int i = 0; i < element_item_count; i++) { + data.emplace_back(points[elements[i]].x); + data.emplace_back(points[elements[i]].y); + } + if (!callback(data.data(), element_item_count, nullptr, 0u)) { + return Result::kInputError; + } + } } return Result::kSuccess; diff --git a/impeller/tessellator/tessellator.h b/impeller/tessellator/tessellator.h index ff93b7091a3f6..b6d444c5a81ba 100644 --- a/impeller/tessellator/tessellator.h +++ b/impeller/tessellator/tessellator.h @@ -44,10 +44,18 @@ class Tessellator { ~Tessellator(); + /// @brief An arbitrary value to determine when a multi-contour non-zero fill + /// path should be split into multiple tessellations. + static constexpr size_t kMultiContourThreshold = 30u; + + /// @brief A callback that returns the results of the tessellation. + /// + /// The index buffer may not be populated, in which case [indices] will + /// be nullptr and indices_count will be 0. using BuilderCallback = std::function; + size_t indices_count)>; //---------------------------------------------------------------------------- /// @brief Generates filled triangles from the polyline. A callback is diff --git a/impeller/tessellator/tessellator_unittests.cc b/impeller/tessellator/tessellator_unittests.cc index 0b943d1391254..8fca675a9a9a6 100644 --- a/impeller/tessellator/tessellator_unittests.cc +++ b/impeller/tessellator/tessellator_unittests.cc @@ -4,6 +4,7 @@ #include "flutter/testing/testing.h" #include "gtest/gtest.h" +#include "impeller/geometry/path.h" #include "impeller/geometry/path_builder.h" #include "impeller/tessellator/tessellator.h" @@ -17,8 +18,8 @@ TEST(TessellatorTest, TessellatorBuilderReturnsCorrectResultStatus) { auto polyline = PathBuilder{}.TakePath().CreatePolyline(1.0f); Tessellator::Result result = t.Tessellate( FillType::kPositive, polyline, - [](const float* vertices, size_t vertices_size, const uint16_t* indices, - size_t indices_size) { return true; }); + [](const float* vertices, size_t vertices_count, + const uint16_t* indices, size_t indices_count) { return true; }); ASSERT_EQ(polyline.points.size(), 0u); ASSERT_EQ(result, Tessellator::Result::kInputError); @@ -29,10 +30,11 @@ TEST(TessellatorTest, TessellatorBuilderReturnsCorrectResultStatus) { Tessellator t; auto polyline = PathBuilder{}.LineTo({0, 0}).TakePath().CreatePolyline(1.0f); - Tessellator::Result result = t.Tessellate( - FillType::kPositive, polyline, - [](const float* vertices, size_t vertices_size, const uint16_t* indices, - size_t indices_size) { return true; }); + Tessellator::Result result = + t.Tessellate(FillType::kPositive, polyline, + [](const float* vertices, size_t vertices_count, + const uint16_t* indices_count, + size_t indices_size) { return true; }); ASSERT_EQ(polyline.points.size(), 1u); ASSERT_EQ(result, Tessellator::Result::kSuccess); } @@ -42,10 +44,11 @@ TEST(TessellatorTest, TessellatorBuilderReturnsCorrectResultStatus) { Tessellator t; auto polyline = PathBuilder{}.AddLine({0, 0}, {0, 1}).TakePath().CreatePolyline(1.0f); - Tessellator::Result result = t.Tessellate( - FillType::kPositive, polyline, - [](const float* vertices, size_t vertices_size, const uint16_t* indices, - size_t indices_size) { return true; }); + Tessellator::Result result = + t.Tessellate(FillType::kPositive, polyline, + [](const float* vertices, size_t vertices_count, + const uint16_t* indices_count, + size_t indices_size) { return true; }); ASSERT_EQ(polyline.points.size(), 2u); ASSERT_EQ(result, Tessellator::Result::kSuccess); @@ -60,10 +63,11 @@ TEST(TessellatorTest, TessellatorBuilderReturnsCorrectResultStatus) { builder.AddLine({coord, coord}, {coord + 1, coord + 1}); } auto polyline = builder.TakePath().CreatePolyline(1.0f); - Tessellator::Result result = t.Tessellate( - FillType::kPositive, polyline, - [](const float* vertices, size_t vertices_size, const uint16_t* indices, - size_t indices_size) { return true; }); + Tessellator::Result result = + t.Tessellate(FillType::kPositive, polyline, + [](const float* vertices, size_t vertices_count, + const uint16_t* indices_count, + size_t indices_size) { return true; }); ASSERT_EQ(polyline.points.size(), 2000u); ASSERT_EQ(result, Tessellator::Result::kSuccess); @@ -74,14 +78,60 @@ TEST(TessellatorTest, TessellatorBuilderReturnsCorrectResultStatus) { Tessellator t; auto polyline = PathBuilder{}.AddLine({0, 0}, {0, 1}).TakePath().CreatePolyline(1.0f); - Tessellator::Result result = t.Tessellate( - FillType::kPositive, polyline, - [](const float* vertices, size_t vertices_size, const uint16_t* indices, - size_t indices_size) { return false; }); + Tessellator::Result result = + t.Tessellate(FillType::kPositive, polyline, + [](const float* vertices, size_t vertices_count, + const uint16_t* indices_count, + size_t indices_size) { return false; }); ASSERT_EQ(polyline.points.size(), 2u); ASSERT_EQ(result, Tessellator::Result::kInputError); } + + // More than 30 contours, non-zero fill mode. + { + Tessellator t; + PathBuilder builder = {}; + for (auto i = 0u; i < Tessellator::kMultiContourThreshold + 1; i++) { + builder.AddCircle(Point(i, i), 4); + } + auto polyline = builder.TakePath().CreatePolyline(1.0f); + bool no_indices = false; + Tessellator::Result result = t.Tessellate( + FillType::kNonZero, polyline, + [&no_indices](const float* vertices, size_t vertices_count, + const uint16_t* indices, size_t indices_count) { + no_indices = indices == nullptr; + return true; + }); + + ASSERT_TRUE(no_indices); + ASSERT_EQ(result, Tessellator::Result::kSuccess); + } + + // More than uint16 points, odd fill mode. + { + Tessellator t; + PathBuilder builder = {}; + for (auto i = 0; i < 1000; i++) { + builder.AddCircle(Point(i, i), 4); + } + auto polyline = builder.TakePath(FillType::kOdd).CreatePolyline(1.0f); + bool no_indices = false; + size_t count = 0u; + Tessellator::Result result = t.Tessellate( + FillType::kOdd, polyline, + [&no_indices, &count](const float* vertices, size_t vertices_count, + const uint16_t* indices, size_t indices_count) { + no_indices = indices == nullptr; + count = vertices_count; + return true; + }); + + ASSERT_TRUE(no_indices); + ASSERT_TRUE(count >= USHRT_MAX); + ASSERT_EQ(result, Tessellator::Result::kSuccess); + } } } // namespace testing From 88575edf29e8c82aefc2d22141a2e5b1556111ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Sharma?= <737941+loic-sharma@users.noreply.github.com> Date: Wed, 27 Sep 2023 10:52:17 -0700 Subject: [PATCH 323/859] [Windows] Improve logic to update swap intervals (#46172) This relands https://github.com/flutter/engine/pull/45310 to unblock the ANGLE roll with the fix for https://github.com/flutter/flutter/issues/134262. ## Background ### Swap interval If the Windows system compositor is enabled, the Windows embedder disables the swap interval so that presenting to a surface does not block until the v-blank. If the Windows system compositor is disabled (which is possible on Windows 7), the Windows embedder enables swap interval to prevent screen tearing. ### GL context threading Our current version of ANGLE allows making a GL context current on multiple threads. However, the latest version of ANGLE errors if a GL context is made current on multiple threads. This is causing the ANGLE roll to fail ([example](https://ci.chromium.org/ui/p/flutter/builders/try/Windows%20Engine%20Drone/203788/overview)). The Windows embedder has two GL context threading issues: 1. At startup, the platform thread creates and binds the GL context. This change ensures the GL context is released from the platform thread so that the raster thread can use the GL context for rendering. 2. When the system compositor updates, the GL context is bound to the platform thread to update the swap interval. This change ensures the swap interval update happens on the raster thread. ### Window resizing Resizing the window recreates the GL surface and resets the swap interval. The previous fix released the current GL context after updating the swap interval (this ensured the platform thread released the GL context at startup). This broke window resizing as it caused the engine to "lose" its GL context during rendering (see https://github.com/flutter/flutter/issues/134262). This reland releases the GL context only if on the startup case. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- .../platform/windows/angle_surface_manager.cc | 20 ++++++++++----- .../platform/windows/angle_surface_manager.h | 20 +++++++++++---- .../windows/flutter_windows_engine.cc | 4 +++ .../platform/windows/flutter_windows_engine.h | 2 +- .../platform/windows/flutter_windows_view.cc | 25 +++++++++++++++++-- .../windows/flutter_windows_view_unittests.cc | 7 ++++++ 6 files changed, 64 insertions(+), 14 deletions(-) diff --git a/shell/platform/windows/angle_surface_manager.cc b/shell/platform/windows/angle_surface_manager.cc index 7deafc2d0bf8c..7005348482856 100644 --- a/shell/platform/windows/angle_surface_manager.cc +++ b/shell/platform/windows/angle_surface_manager.cc @@ -256,6 +256,11 @@ bool AngleSurfaceManager::CreateSurface(WindowsRenderTarget* render_target, surface_height_ = height; render_surface_ = surface; + if (!MakeCurrent()) { + LogEglError("Unable to make surface current to update the swap interval"); + return false; + } + SetVSyncEnabled(vsync_enabled); return true; } @@ -300,11 +305,20 @@ void AngleSurfaceManager::DestroySurface() { render_surface_ = EGL_NO_SURFACE; } +bool AngleSurfaceManager::HasContextCurrent() { + return eglGetCurrentContext() != EGL_NO_CONTEXT; +} + bool AngleSurfaceManager::MakeCurrent() { return (eglMakeCurrent(egl_display_, render_surface_, render_surface_, egl_context_) == EGL_TRUE); } +bool AngleSurfaceManager::ClearCurrent() { + return (eglMakeCurrent(egl_display_, EGL_NO_SURFACE, EGL_NO_SURFACE, + EGL_NO_CONTEXT) == EGL_TRUE); +} + bool AngleSurfaceManager::ClearContext() { return (eglMakeCurrent(egl_display_, nullptr, nullptr, egl_context_) == EGL_TRUE); @@ -328,12 +342,6 @@ EGLSurface AngleSurfaceManager::CreateSurfaceFromHandle( } void AngleSurfaceManager::SetVSyncEnabled(bool enabled) { - if (eglMakeCurrent(egl_display_, render_surface_, render_surface_, - egl_context_) != EGL_TRUE) { - LogEglError("Unable to make surface current to update the swap interval"); - return; - } - // OpenGL swap intervals can be used to prevent screen tearing. // If enabled, the raster thread blocks until the v-blank. // This is unnecessary if DWM composition is enabled. diff --git a/shell/platform/windows/angle_surface_manager.h b/shell/platform/windows/angle_surface_manager.h index 576704f630054..2f6302b9659ed 100644 --- a/shell/platform/windows/angle_surface_manager.h +++ b/shell/platform/windows/angle_surface_manager.h @@ -33,8 +33,10 @@ class AngleSurfaceManager { // Creates an EGLSurface wrapper and backing DirectX 11 SwapChain // associated with window, in the appropriate format for display. - // Target represents the visual entity to bind to. Width and + // Target represents the visual entity to bind to. Width and // height represent dimensions surface is created at. + // + // This binds |egl_context_| to the current thread. virtual bool CreateSurface(WindowsRenderTarget* render_target, EGLint width, EGLint height, @@ -42,8 +44,10 @@ class AngleSurfaceManager { // Resizes backing surface from current size to newly requested size // based on width and height for the specific case when width and height do - // not match current surface dimensions. Target represents the visual entity + // not match current surface dimensions. Target represents the visual entity // to bind to. + // + // This binds |egl_context_| to the current thread. virtual void ResizeSurface(WindowsRenderTarget* render_target, EGLint width, EGLint height, @@ -56,11 +60,17 @@ class AngleSurfaceManager { // Releases the pass-in EGLSurface wrapping and backing resources if not null. virtual void DestroySurface(); - // Binds egl_context_ to the current rendering thread and to the draw and read - // surfaces returning a boolean result reflecting success. + // Check if the current thread has a context bound. + bool HasContextCurrent(); + + // Binds |egl_context_| to the current rendering thread and to the draw and + // read surfaces returning a boolean result reflecting success. bool MakeCurrent(); - // Clears current egl_context_ + // Unbinds the current EGL context from the current thread. + bool ClearCurrent(); + + // Clears the |egl_context_| draw and read surfaces. bool ClearContext(); // Binds egl_resource_context_ to the current rendering thread and to the draw diff --git a/shell/platform/windows/flutter_windows_engine.cc b/shell/platform/windows/flutter_windows_engine.cc index fce1c0531e48c..2e04c14f2446d 100644 --- a/shell/platform/windows/flutter_windows_engine.cc +++ b/shell/platform/windows/flutter_windows_engine.cc @@ -390,6 +390,10 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) { args.aot_data = aot_data_.get(); } + // The platform thread creates OpenGL contexts. These + // must be released to be used by the engine's threads. + FML_DCHECK(!surface_manager_ || !surface_manager_->HasContextCurrent()); + FlutterRendererConfig renderer_config; if (enable_impeller_) { diff --git a/shell/platform/windows/flutter_windows_engine.h b/shell/platform/windows/flutter_windows_engine.h index cdbcd375fd119..04d33e7583d4b 100644 --- a/shell/platform/windows/flutter_windows_engine.h +++ b/shell/platform/windows/flutter_windows_engine.h @@ -199,7 +199,7 @@ class FlutterWindowsEngine { bool MarkExternalTextureFrameAvailable(int64_t texture_id); // Posts the given callback onto the raster thread. - bool PostRasterThreadTask(fml::closure callback); + virtual bool PostRasterThreadTask(fml::closure callback); // Invoke on the embedder's vsync callback to schedule a frame. void OnVsync(intptr_t baton); diff --git a/shell/platform/windows/flutter_windows_view.cc b/shell/platform/windows/flutter_windows_view.cc index d668d2f447b6c..11effebe45f6f 100644 --- a/shell/platform/windows/flutter_windows_view.cc +++ b/shell/platform/windows/flutter_windows_view.cc @@ -594,6 +594,12 @@ void FlutterWindowsView::CreateRenderSurface() { engine_->surface_manager()->CreateSurface(GetRenderTarget(), bounds.width, bounds.height, enable_vsync); + // The EGL context cannot be current on multiple threads. + // Creating the render surface runs on the platform thread and + // makes the EGL context current. Thus, the EGL context must be + // released so that the raster thread can use it for rendering. + engine_->surface_manager()->ClearCurrent(); + resize_target_width_ = bounds.width; resize_target_height_ = bounds.height; } @@ -668,9 +674,24 @@ void FlutterWindowsView::UpdateSemanticsEnabled(bool enabled) { } void FlutterWindowsView::OnDwmCompositionChanged() { - if (engine_->surface_manager()) { - engine_->surface_manager()->SetVSyncEnabled(binding_handler_->NeedsVSync()); + AngleSurfaceManager* surface_manager = engine_->surface_manager(); + if (!surface_manager) { + return; } + + // Update the surface with the new composition state. + // Switch to the raster thread as the render EGL context can only be + // current on a single thread a time. + auto needs_vsync = binding_handler_->NeedsVSync(); + engine_->PostRasterThreadTask([surface_manager, needs_vsync]() { + if (!surface_manager->MakeCurrent()) { + FML_LOG(ERROR) + << "Unable to make surface current to update the swap interval"; + return; + } + + surface_manager->SetVSyncEnabled(needs_vsync); + }); } void FlutterWindowsView::OnWindowStateEvent(HWND hwnd, WindowStateEvent event) { diff --git a/shell/platform/windows/flutter_windows_view_unittests.cc b/shell/platform/windows/flutter_windows_view_unittests.cc index b7ce34c05b3bd..fee0333dbd048 100644 --- a/shell/platform/windows/flutter_windows_view_unittests.cc +++ b/shell/platform/windows/flutter_windows_view_unittests.cc @@ -1287,6 +1287,13 @@ TEST(FlutterWindowsViewTest, UpdatesVSyncOnDwmUpdates) { std::unique_ptr surface_manager = std::make_unique(); + EXPECT_CALL(*engine.get(), PostRasterThreadTask) + .Times(2) + .WillRepeatedly([](fml::closure callback) { + callback(); + return true; + }); + EXPECT_CALL(*window_binding_handler.get(), NeedsVSync) .WillOnce(Return(true)) .WillOnce(Return(false)); From 8d9bca6a71f4e40bc5448e26f626cd5d0102ccf4 Mon Sep 17 00:00:00 2001 From: "auto-submit[bot]" <98614782+auto-submit[bot]@users.noreply.github.com> Date: Wed, 27 Sep 2023 17:57:18 +0000 Subject: [PATCH 324/859] Reverts "[ios] Fix app extension not able to find assets from unloaded bundle" (#46328) Reverts flutter/engine#46283 Initiated by: CaseyHillers This change reverts the following previous change: Directly use "flutter_assets" as the default path to find the asset path, this works for app extension when the bundle is unloaded. This PR also adds integration tests for app extensions, which also tests the asset path. Fixes https://github.com/flutter/flutter/issues/124292 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- .../framework/Source/FlutterNSBundleUtils.mm | 21 +- .../Source/FlutterDartProjectTest.mm | 6 +- .../project.pbxproj | 372 ------------------ .../contents.xcworkspacedata | 7 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - .../FlutterAppExtensionTestHost/AppDelegate.h | 9 - .../FlutterAppExtensionTestHost/AppDelegate.m | 38 -- .../AccentColor.colorset/Contents.json | 11 - .../AppIcon.appiconset/Contents.json | 13 - .../Assets.xcassets/Contents.json | 6 - .../Base.lproj/LaunchScreen.storyboard | 25 -- .../Base.lproj/Main.storyboard | 24 -- .../FlutterAppExtensionTestHost/Info.plist | 25 -- .../SceneDelegate.h | 11 - .../SceneDelegate.m | 52 --- .../ViewController.h | 9 - .../ViewController.m | 33 -- .../FlutterAppExtensionTestHost/main.m | 15 - .../Scenarios/Info_Impeller.plist | 29 -- .../contents.xcworkspacedata | 7 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - .../xcshareddata/WorkspaceSettings.xcsettings | 5 - .../Scenarios.xcodeproj/project.pbxproj | 253 +----------- .../Base.lproj/MainInterface.storyboard | 24 -- .../ios/Scenarios/ScenariosShare/Info.plist | 18 - .../ScenariosShare/ShareViewController.h | 10 - .../ScenariosShare/ShareViewController.m | 31 -- .../ScenariosUITests/AppExtensionTests.m | 58 --- .../ScenariosUITests/GoldenTestManager.m | 1 - .../src/darwin_app_extension_scenario.dart | 44 --- testing/scenario_app/lib/src/scenarios.dart | 2 - testing/scenario_app/run_ios_tests.sh | 4 +- 32 files changed, 16 insertions(+), 1163 deletions(-) delete mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.pbxproj delete mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/AppDelegate.h delete mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/AppDelegate.m delete mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/AccentColor.colorset/Contents.json delete mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/AppIcon.appiconset/Contents.json delete mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/Contents.json delete mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Base.lproj/LaunchScreen.storyboard delete mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Base.lproj/Main.storyboard delete mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Info.plist delete mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/SceneDelegate.h delete mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/SceneDelegate.m delete mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/ViewController.h delete mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/ViewController.m delete mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/main.m delete mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/Scenarios/Info_Impeller.plist delete mode 100644 testing/scenario_app/ios/Scenarios.xcworkspace/contents.xcworkspacedata delete mode 100644 testing/scenario_app/ios/Scenarios.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 testing/scenario_app/ios/Scenarios.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings delete mode 100644 testing/scenario_app/ios/Scenarios/ScenariosShare/Base.lproj/MainInterface.storyboard delete mode 100644 testing/scenario_app/ios/Scenarios/ScenariosShare/Info.plist delete mode 100644 testing/scenario_app/ios/Scenarios/ScenariosShare/ShareViewController.h delete mode 100644 testing/scenario_app/ios/Scenarios/ScenariosShare/ShareViewController.m delete mode 100644 testing/scenario_app/ios/Scenarios/ScenariosUITests/AppExtensionTests.m delete mode 100644 testing/scenario_app/lib/src/darwin_app_extension_scenario.dart diff --git a/shell/platform/darwin/common/framework/Source/FlutterNSBundleUtils.mm b/shell/platform/darwin/common/framework/Source/FlutterNSBundleUtils.mm index 54cf8feeb7d8b..9582f94e266e1 100644 --- a/shell/platform/darwin/common/framework/Source/FlutterNSBundleUtils.mm +++ b/shell/platform/darwin/common/framework/Source/FlutterNSBundleUtils.mm @@ -9,7 +9,6 @@ FLUTTER_ASSERT_ARC const NSString* kDefaultAssetPath = @"Frameworks/App.framework/flutter_assets"; -static NSString* GetFlutterAssetPathFromBundle(NSBundle* bundle); NSBundle* FLTFrameworkBundleInternal(NSString* flutterFrameworkBundleID, NSURL* searchURL) { NSDirectoryEnumerator* frameworkEnumerator = [NSFileManager.defaultManager @@ -30,7 +29,7 @@ } NSBundle* FLTGetApplicationBundle() { - NSBundle* mainBundle = NSBundle.mainBundle; + NSBundle* mainBundle = [NSBundle mainBundle]; // App extension bundle is in .app/PlugIns/Extension.appex. if ([mainBundle.bundleURL.pathExtension isEqualToString:@"appex"]) { // Up two levels. @@ -49,7 +48,7 @@ flutterFrameworkBundle = [NSBundle bundleWithIdentifier:flutterFrameworkBundleID]; } if (flutterFrameworkBundle == nil) { - flutterFrameworkBundle = NSBundle.mainBundle; + flutterFrameworkBundle = [NSBundle mainBundle]; } return flutterFrameworkBundle; } @@ -59,23 +58,13 @@ } NSString* FLTAssetsPathFromBundle(NSBundle* bundle) { - NSString* flutterAssetsPath = GetFlutterAssetPathFromBundle(bundle); - if (flutterAssetsPath.length == 0) { - flutterAssetsPath = GetFlutterAssetPathFromBundle(NSBundle.mainBundle); - } - return flutterAssetsPath; -} - -static NSString* GetFlutterAssetPathFromBundle(NSBundle* bundle) { NSString* flutterAssetsPath = FLTAssetPath(bundle); // Use the raw path solution so that asset path can be returned from unloaded bundles. // See https://github.com/flutter/engine/pull/46073 - NSString* assetsPath = [bundle pathForResource:flutterAssetsPath ofType:nil]; + NSString* assetsPath = [bundle pathForResource:flutterAssetsPath ofType:@""]; + if (assetsPath.length == 0) { - // In app extension, using full relative path (kDefaultAssetPath) - // returns nil when the app bundle is not loaded. Try to use - // the sub folder name, which can successfully return a valid path. - assetsPath = [bundle pathForResource:@"flutter_assets" ofType:nil]; + assetsPath = [[NSBundle mainBundle] pathForResource:flutterAssetsPath ofType:@""]; } return assetsPath; } diff --git a/shell/platform/darwin/ios/framework/Source/FlutterDartProjectTest.mm b/shell/platform/darwin/ios/framework/Source/FlutterDartProjectTest.mm index 025bde32aeb2c..aecab91f0051c 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterDartProjectTest.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterDartProjectTest.mm @@ -93,7 +93,7 @@ - (void)testFLTAssetsURLFromBundle { id mockBundle = OCMClassMock([NSBundle class]); OCMStub([mockBundle objectForInfoDictionaryKey:@"FLTAssetsPath"]).andReturn(@"foo/assets"); NSString* resultAssetsPath = @"path/to/foo/assets"; - OCMStub([mockBundle pathForResource:@"foo/assets" ofType:nil]).andReturn(resultAssetsPath); + OCMStub([mockBundle pathForResource:@"foo/assets" ofType:@""]).andReturn(resultAssetsPath); NSString* path = FLTAssetsPathFromBundle(mockBundle); XCTAssertEqualObjects(path, @"path/to/foo/assets"); } @@ -102,9 +102,9 @@ - (void)testFLTAssetsURLFromBundle { id mockBundle = OCMClassMock([NSBundle class]); id mockMainBundle = OCMPartialMock([NSBundle mainBundle]); NSString* resultAssetsPath = @"path/to/foo/assets"; - OCMStub([mockBundle pathForResource:@"Frameworks/App.framework/flutter_assets" ofType:nil]) + OCMStub([mockBundle pathForResource:@"Frameworks/App.framework/flutter_assets" ofType:@""]) .andReturn(nil); - OCMStub([mockMainBundle pathForResource:@"Frameworks/App.framework/flutter_assets" ofType:nil]) + OCMStub([mockMainBundle pathForResource:@"Frameworks/App.framework/flutter_assets" ofType:@""]) .andReturn(resultAssetsPath); NSString* path = FLTAssetsPathFromBundle(mockBundle); XCTAssertEqualObjects(path, @"path/to/foo/assets"); diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.pbxproj b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.pbxproj deleted file mode 100644 index b67c72aabae64..0000000000000 --- a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.pbxproj +++ /dev/null @@ -1,372 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 56; - objects = { - -/* Begin PBXBuildFile section */ - 686382C62ABE173000E27AAD /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 686382C52ABE173000E27AAD /* AppDelegate.m */; }; - 686382C92ABE173000E27AAD /* SceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 686382C82ABE173000E27AAD /* SceneDelegate.m */; }; - 686382CC2ABE173000E27AAD /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 686382CB2ABE173000E27AAD /* ViewController.m */; }; - 686382CF2ABE173000E27AAD /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 686382CD2ABE173000E27AAD /* Main.storyboard */; }; - 686382D12ABE173000E27AAD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 686382D02ABE173000E27AAD /* Assets.xcassets */; }; - 686382D42ABE173000E27AAD /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 686382D22ABE173000E27AAD /* LaunchScreen.storyboard */; }; - 686382D72ABE173000E27AAD /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 686382D62ABE173000E27AAD /* main.m */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 686382C12ABE172F00E27AAD /* FlutterAppExtensionTestHost.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FlutterAppExtensionTestHost.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 686382C42ABE173000E27AAD /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 686382C52ABE173000E27AAD /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 686382C72ABE173000E27AAD /* SceneDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SceneDelegate.h; sourceTree = ""; }; - 686382C82ABE173000E27AAD /* SceneDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SceneDelegate.m; sourceTree = ""; }; - 686382CA2ABE173000E27AAD /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; - 686382CB2ABE173000E27AAD /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; - 686382CE2ABE173000E27AAD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 686382D02ABE173000E27AAD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 686382D32ABE173000E27AAD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 686382D52ABE173000E27AAD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 686382D62ABE173000E27AAD /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 686382BE2ABE172F00E27AAD /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 686382B82ABE172F00E27AAD = { - isa = PBXGroup; - children = ( - 686382C32ABE173000E27AAD /* FlutterAppExtensionTestHost */, - 686382C22ABE172F00E27AAD /* Products */, - ); - sourceTree = ""; - }; - 686382C22ABE172F00E27AAD /* Products */ = { - isa = PBXGroup; - children = ( - 686382C12ABE172F00E27AAD /* FlutterAppExtensionTestHost.app */, - ); - name = Products; - sourceTree = ""; - }; - 686382C32ABE173000E27AAD /* FlutterAppExtensionTestHost */ = { - isa = PBXGroup; - children = ( - 686382C42ABE173000E27AAD /* AppDelegate.h */, - 686382C52ABE173000E27AAD /* AppDelegate.m */, - 686382C72ABE173000E27AAD /* SceneDelegate.h */, - 686382C82ABE173000E27AAD /* SceneDelegate.m */, - 686382CA2ABE173000E27AAD /* ViewController.h */, - 686382CB2ABE173000E27AAD /* ViewController.m */, - 686382CD2ABE173000E27AAD /* Main.storyboard */, - 686382D02ABE173000E27AAD /* Assets.xcassets */, - 686382D22ABE173000E27AAD /* LaunchScreen.storyboard */, - 686382D52ABE173000E27AAD /* Info.plist */, - 686382D62ABE173000E27AAD /* main.m */, - ); - path = FlutterAppExtensionTestHost; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 686382C02ABE172F00E27AAD /* FlutterAppExtensionTestHost */ = { - isa = PBXNativeTarget; - buildConfigurationList = 686382DA2ABE173000E27AAD /* Build configuration list for PBXNativeTarget "FlutterAppExtensionTestHost" */; - buildPhases = ( - 686382BD2ABE172F00E27AAD /* Sources */, - 686382BE2ABE172F00E27AAD /* Frameworks */, - 686382BF2ABE172F00E27AAD /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = FlutterAppExtensionTestHost; - productName = FlutterAppExtensionTestHost; - productReference = 686382C12ABE172F00E27AAD /* FlutterAppExtensionTestHost.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 686382B92ABE172F00E27AAD /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = 1; - LastUpgradeCheck = 1500; - TargetAttributes = { - 686382C02ABE172F00E27AAD = { - CreatedOnToolsVersion = 15.0; - }; - }; - }; - buildConfigurationList = 686382BC2ABE172F00E27AAD /* Build configuration list for PBXProject "FlutterAppExtensionTestHost" */; - compatibilityVersion = "Xcode 14.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 686382B82ABE172F00E27AAD; - productRefGroup = 686382C22ABE172F00E27AAD /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 686382C02ABE172F00E27AAD /* FlutterAppExtensionTestHost */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 686382BF2ABE172F00E27AAD /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 686382D42ABE173000E27AAD /* LaunchScreen.storyboard in Resources */, - 686382D12ABE173000E27AAD /* Assets.xcassets in Resources */, - 686382CF2ABE173000E27AAD /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 686382BD2ABE172F00E27AAD /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 686382CC2ABE173000E27AAD /* ViewController.m in Sources */, - 686382C62ABE173000E27AAD /* AppDelegate.m in Sources */, - 686382D72ABE173000E27AAD /* main.m in Sources */, - 686382C92ABE173000E27AAD /* SceneDelegate.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 686382CD2ABE173000E27AAD /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 686382CE2ABE173000E27AAD /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 686382D22ABE173000E27AAD /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 686382D32ABE173000E27AAD /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 686382D82ABE173000E27AAD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 17.0; - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 686382D92ABE173000E27AAD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 17.0; - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - SDKROOT = iphoneos; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 686382DB2ABE173000E27AAD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = FlutterAppExtensionTestHost/Info.plist; - INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; - INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; - INFOPLIST_KEY_UIMainStoryboardFile = Main; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 16.2; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.FlutterAppExtensionTestHost; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_EMIT_LOC_STRINGS = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 686382DC2ABE173000E27AAD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = FlutterAppExtensionTestHost/Info.plist; - INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; - INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; - INFOPLIST_KEY_UIMainStoryboardFile = Main; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 16.2; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.FlutterAppExtensionTestHost; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_EMIT_LOC_STRINGS = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 686382BC2ABE172F00E27AAD /* Build configuration list for PBXProject "FlutterAppExtensionTestHost" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 686382D82ABE173000E27AAD /* Debug */, - 686382D92ABE173000E27AAD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 686382DA2ABE173000E27AAD /* Build configuration list for PBXNativeTarget "FlutterAppExtensionTestHost" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 686382DB2ABE173000E27AAD /* Debug */, - 686382DC2ABE173000E27AAD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 686382B92ABE172F00E27AAD /* Project object */; -} diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6254f0..0000000000000 --- a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003d68d..0000000000000 --- a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/AppDelegate.h b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/AppDelegate.h deleted file mode 100644 index 99c576ec95059..0000000000000 --- a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/AppDelegate.h +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#import - -@interface AppDelegate : UIResponder - -@end diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/AppDelegate.m b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/AppDelegate.m deleted file mode 100644 index 1beee74b03e03..0000000000000 --- a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/AppDelegate.m +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#import "AppDelegate.h" - -@interface AppDelegate () - -@end - -@implementation AppDelegate - -- (BOOL)application:(UIApplication*)application - didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { - // Override point for customization after application launch. - return YES; -} - -#pragma mark - UISceneSession lifecycle - -- (UISceneConfiguration*)application:(UIApplication*)application - configurationForConnectingSceneSession:(UISceneSession*)connectingSceneSession - options:(UISceneConnectionOptions*)options { - // Called when a new scene session is being created. - // Use this method to select a configuration to create the new scene with. - return [[UISceneConfiguration alloc] initWithName:@"Default Configuration" - sessionRole:connectingSceneSession.role]; -} - -- (void)application:(UIApplication*)application - didDiscardSceneSessions:(NSSet*)sceneSessions { - // Called when the user discards a scene session. - // If any sessions were discarded while the application was not running, this will be called - // shortly after application:didFinishLaunchingWithOptions. Use this method to release any - // resources that were specific to the discarded scenes, as they will not return. -} - -@end diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/AccentColor.colorset/Contents.json b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/AccentColor.colorset/Contents.json deleted file mode 100644 index eb87897008164..0000000000000 --- a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/AccentColor.colorset/Contents.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "colors" : [ - { - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/AppIcon.appiconset/Contents.json b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 13613e3ee1a93..0000000000000 --- a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "platform" : "ios", - "size" : "1024x1024" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/Contents.json b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/Contents.json deleted file mode 100644 index 73c00596a7fca..0000000000000 --- a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Base.lproj/LaunchScreen.storyboard b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index 865e9329f3767..0000000000000 --- a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Base.lproj/Main.storyboard b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Base.lproj/Main.storyboard deleted file mode 100644 index 808a21ce779ba..0000000000000 --- a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Base.lproj/Main.storyboard +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Info.plist b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Info.plist deleted file mode 100644 index 81ed29b76cfbe..0000000000000 --- a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Info.plist +++ /dev/null @@ -1,25 +0,0 @@ - - - - - UIApplicationSceneManifest - - UIApplicationSupportsMultipleScenes - - UISceneConfigurations - - UIWindowSceneSessionRoleApplication - - - UISceneConfigurationName - Default Configuration - UISceneDelegateClassName - SceneDelegate - UISceneStoryboardFile - Main - - - - - - diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/SceneDelegate.h b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/SceneDelegate.h deleted file mode 100644 index 6adc5d3a2cd7f..0000000000000 --- a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/SceneDelegate.h +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#import - -@interface SceneDelegate : UIResponder - -@property(strong, nonatomic) UIWindow* window; - -@end diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/SceneDelegate.m b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/SceneDelegate.m deleted file mode 100644 index 1271efb7faa5f..0000000000000 --- a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/SceneDelegate.m +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#import "SceneDelegate.h" - -@interface SceneDelegate () - -@end - -@implementation SceneDelegate - -- (void)scene:(UIScene*)scene - willConnectToSession:(UISceneSession*)session - options:(UISceneConnectionOptions*)connectionOptions { - // Use this method to optionally configure and attach the UIWindow `window` to the provided - // UIWindowScene `scene`. If using a storyboard, the `window` property will automatically be - // initialized and attached to the scene. This delegate does not imply the connecting scene or - // session are new (see `application:configurationForConnectingSceneSession` instead). -} - -- (void)sceneDidDisconnect:(UIScene*)scene { - // Called as the scene is being released by the system. - // This occurs shortly after the scene enters the background, or when its session is discarded. - // Release any resources associated with this scene that can be re-created the next time the scene - // connects. The scene may re-connect later, as its session was not necessarily discarded (see - // `application:didDiscardSceneSessions` instead). -} - -- (void)sceneDidBecomeActive:(UIScene*)scene { - // Called when the scene has moved from an inactive state to an active state. - // Use this method to restart any tasks that were paused (or not yet started) when the scene was - // inactive. -} - -- (void)sceneWillResignActive:(UIScene*)scene { - // Called when the scene will move from an active state to an inactive state. - // This may occur due to temporary interruptions (ex. an incoming phone call). -} - -- (void)sceneWillEnterForeground:(UIScene*)scene { - // Called as the scene transitions from the background to the foreground. - // Use this method to undo the changes made on entering the background. -} - -- (void)sceneDidEnterBackground:(UIScene*)scene { - // Called as the scene transitions from the foreground to the background. - // Use this method to save data, release shared resources, and store enough scene-specific state - // information to restore the scene back to its current state. -} - -@end diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/ViewController.h b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/ViewController.h deleted file mode 100644 index 4f235259bfecc..0000000000000 --- a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/ViewController.h +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#import - -@interface ViewController : UIViewController - -@end diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/ViewController.m b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/ViewController.m deleted file mode 100644 index b725cc412618f..0000000000000 --- a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/ViewController.m +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#import "ViewController.h" - -@interface ViewController () - -@end - -@implementation ViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - UIButton* openShare = - [UIButton systemButtonWithPrimaryAction:[UIAction actionWithHandler:^( - __kindof UIAction* _Nonnull action) { - UIActivityViewController* activityVC = - [[UIActivityViewController alloc] initWithActivityItems:@[ @"text to share" ] - applicationActivities:nil]; - activityVC.excludedActivityTypes = @[ - UIActivityTypePrint, UIActivityTypeCopyToPasteboard, - UIActivityTypeAssignToContact, UIActivityTypeSaveToCameraRoll - ]; // Exclude whichever aren't relevant - [self presentViewController:activityVC animated:YES completion:nil]; - }]]; - openShare.backgroundColor = [UIColor systemPinkColor]; - [openShare setTitle:@"Open Share" forState:UIControlStateNormal]; - [self.view addSubview:openShare]; - openShare.frame = CGRectMake(0, 0, 200, 200); -} - -@end diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/main.m b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/main.m deleted file mode 100644 index f98f92491e8a0..0000000000000 --- a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/main.m +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#import -#import "AppDelegate.h" - -int main(int argc, char* argv[]) { - NSString* appDelegateClassName; - @autoreleasepool { - // Setup code that might create autoreleased objects goes here. - appDelegateClassName = NSStringFromClass([AppDelegate class]); - } - return UIApplicationMain(argc, argv, nil, appDelegateClassName); -} diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/Scenarios/Info_Impeller.plist b/testing/scenario_app/ios/FlutterAppExtensionTestHost/Scenarios/Info_Impeller.plist deleted file mode 100644 index 2ad0401d1c878..0000000000000 --- a/testing/scenario_app/ios/FlutterAppExtensionTestHost/Scenarios/Info_Impeller.plist +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - FLTEnableImpeller - - UIApplicationSceneManifest - - UIApplicationSupportsMultipleScenes - - UISceneConfigurations - - UIWindowSceneSessionRoleApplication - - - UISceneConfigurationName - Default Configuration - UISceneDelegateClassName - SceneDelegate - UISceneStoryboardFile - Main - - - - - - diff --git a/testing/scenario_app/ios/Scenarios.xcworkspace/contents.xcworkspacedata b/testing/scenario_app/ios/Scenarios.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 00ca3de9d76c0..0000000000000 --- a/testing/scenario_app/ios/Scenarios.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/testing/scenario_app/ios/Scenarios.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/testing/scenario_app/ios/Scenarios.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003d68d..0000000000000 --- a/testing/scenario_app/ios/Scenarios.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/testing/scenario_app/ios/Scenarios.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/testing/scenario_app/ios/Scenarios.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index 0c67376ebacb4..0000000000000 --- a/testing/scenario_app/ios/Scenarios.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/testing/scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj b/testing/scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj index 7402e6958cd9a..ec69054a447da 100644 --- a/testing/scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj +++ b/testing/scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 54; + objectVersion = 52; objects = { /* Begin PBXBuildFile section */ @@ -62,12 +62,6 @@ 6860CE252A01B2FF00B68EC5 /* golden_two_platform_view_clip_rrect_iPhone SE (3rd generation)_16.2_simulator.png in Resources */ = {isa = PBXBuildFile; fileRef = 6860CE222A01B2FF00B68EC5 /* golden_two_platform_view_clip_rrect_iPhone SE (3rd generation)_16.2_simulator.png */; }; 6860CE262A01B2FF00B68EC5 /* golden_two_platform_view_clip_rect_iPhone SE (3rd generation)_16.2_simulator.png in Resources */ = {isa = PBXBuildFile; fileRef = 6860CE232A01B2FF00B68EC5 /* golden_two_platform_view_clip_rect_iPhone SE (3rd generation)_16.2_simulator.png */; }; 6860CE272A01B2FF00B68EC5 /* golden_two_platform_view_clip_path_iPhone SE (3rd generation)_16.2_simulator.png in Resources */ = {isa = PBXBuildFile; fileRef = 6860CE242A01B2FF00B68EC5 /* golden_two_platform_view_clip_path_iPhone SE (3rd generation)_16.2_simulator.png */; }; - 686382EC2AC1F9F300E27AAD /* ShareViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 686382EB2AC1F9F300E27AAD /* ShareViewController.m */; }; - 686382EF2AC1F9F300E27AAD /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 686382ED2AC1F9F300E27AAD /* MainInterface.storyboard */; }; - 686382F32AC1F9F300E27AAD /* ScenariosShare.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 686382E82AC1F9F300E27AAD /* ScenariosShare.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; - 686383132AC202B700E27AAD /* AppExtensionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 686383122AC202B700E27AAD /* AppExtensionTests.m */; }; - 686383152AC2175100E27AAD /* ../../Flutter.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 246B4E4522E3B61000073EBF /* ../../Flutter.xcframework */; }; - 686383162AC2175100E27AAD /* ../../Flutter.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 246B4E4522E3B61000073EBF /* ../../Flutter.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 68A5B63423EB71D300BDBCDB /* PlatformViewGestureRecognizerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 68A5B63323EB71D300BDBCDB /* PlatformViewGestureRecognizerTests.m */; }; 68D4017D2564859300ECD91A /* ContinuousTexture.m in Sources */ = {isa = PBXBuildFile; fileRef = 68D4017C2564859300ECD91A /* ContinuousTexture.m */; }; 68D93AEE2A46097E0054AB6D /* golden_platform_view_with_negative_backdrop_filter_iPhone SE (3rd generation)_16.2_simulator.png in Resources */ = {isa = PBXBuildFile; fileRef = 68D93AED2A46097E0054AB6D /* golden_platform_view_with_negative_backdrop_filter_iPhone SE (3rd generation)_16.2_simulator.png */; }; @@ -89,27 +83,6 @@ remoteGlobalIDString = 248D76C622E388370012F0C1; remoteInfo = Scenarios; }; - 686382F12AC1F9F300E27AAD /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 248D76BF22E388370012F0C1 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 686382E72AC1F9F300E27AAD; - remoteInfo = ScenariosShare; - }; - 6863830A2AC2024200E27AAD /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 686383052AC2024200E27AAD /* FlutterAppExtensionTestHost.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 686382C12ABE172F00E27AAD; - remoteInfo = FlutterAppExtensionTestHost; - }; - 686383102AC2027100E27AAD /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 686383052AC2024200E27AAD /* FlutterAppExtensionTestHost.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = 686382C02ABE172F00E27AAD; - remoteInfo = FlutterAppExtensionTestHost; - }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -147,28 +120,6 @@ name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; }; - 686382F42AC1F9F300E27AAD /* Embed Foundation Extensions */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 13; - files = ( - 686382F32AC1F9F300E27AAD /* ScenariosShare.appex in Embed Foundation Extensions */, - ); - name = "Embed Foundation Extensions"; - runOnlyForDeploymentPostprocessing = 0; - }; - 686383172AC2175100E27AAD /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - 686383162AC2175100E27AAD /* ../../Flutter.xcframework in Embed Frameworks */, - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ @@ -234,13 +185,6 @@ 6860CE222A01B2FF00B68EC5 /* golden_two_platform_view_clip_rrect_iPhone SE (3rd generation)_16.2_simulator.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "golden_two_platform_view_clip_rrect_iPhone SE (3rd generation)_16.2_simulator.png"; sourceTree = ""; }; 6860CE232A01B2FF00B68EC5 /* golden_two_platform_view_clip_rect_iPhone SE (3rd generation)_16.2_simulator.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "golden_two_platform_view_clip_rect_iPhone SE (3rd generation)_16.2_simulator.png"; sourceTree = ""; }; 6860CE242A01B2FF00B68EC5 /* golden_two_platform_view_clip_path_iPhone SE (3rd generation)_16.2_simulator.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "golden_two_platform_view_clip_path_iPhone SE (3rd generation)_16.2_simulator.png"; sourceTree = ""; }; - 686382E82AC1F9F300E27AAD /* ScenariosShare.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = ScenariosShare.appex; sourceTree = BUILT_PRODUCTS_DIR; }; - 686382EA2AC1F9F300E27AAD /* ShareViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ShareViewController.h; sourceTree = ""; }; - 686382EB2AC1F9F300E27AAD /* ShareViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ShareViewController.m; sourceTree = ""; }; - 686382EE2AC1F9F300E27AAD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/MainInterface.storyboard; sourceTree = ""; }; - 686382F02AC1F9F300E27AAD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 686383052AC2024200E27AAD /* FlutterAppExtensionTestHost.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = FlutterAppExtensionTestHost.xcodeproj; path = ../FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj; sourceTree = ""; }; - 686383122AC202B700E27AAD /* AppExtensionTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppExtensionTests.m; sourceTree = ""; }; 68A5B63323EB71D300BDBCDB /* PlatformViewGestureRecognizerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PlatformViewGestureRecognizerTests.m; sourceTree = ""; }; 68D4017B2564859300ECD91A /* ContinuousTexture.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ContinuousTexture.h; sourceTree = ""; }; 68D4017C2564859300ECD91A /* ContinuousTexture.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ContinuousTexture.m; sourceTree = ""; }; @@ -275,25 +219,15 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 686382E52AC1F9F300E27AAD /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 686383152AC2175100E27AAD /* ../../Flutter.xcframework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 248D76BE22E388370012F0C1 = { isa = PBXGroup; children = ( - 686383052AC2024200E27AAD /* FlutterAppExtensionTestHost.xcodeproj */, 248D76C922E388370012F0C1 /* Scenarios */, 248D76E222E388380012F0C1 /* ScenariosTests */, 248D76ED22E388380012F0C1 /* ScenariosUITests */, - 686382E92AC1F9F300E27AAD /* ScenariosShare */, 248D76C822E388370012F0C1 /* Products */, 248D76FC22E388900012F0C1 /* Frameworks */, ); @@ -305,7 +239,6 @@ 248D76C722E388370012F0C1 /* Scenarios.app */, 248D76DF22E388380012F0C1 /* ScenariosTests.xctest */, 248D76EA22E388380012F0C1 /* ScenariosUITests.xctest */, - 686382E82AC1F9F300E27AAD /* ScenariosShare.appex */, ); name = Products; sourceTree = ""; @@ -365,7 +298,6 @@ 246A6610252E693A00EAB0F3 /* RenderingSelectionTest.m */, 0DDEBC88258830B40065D0E8 /* SpawnEngineTest.m */, F26F15B7268B6B5500EC54D3 /* iPadGestureTests.m */, - 686383122AC202B700E27AAD /* AppExtensionTests.m */, ); path = ScenariosUITests; sourceTree = ""; @@ -379,25 +311,6 @@ name = Frameworks; sourceTree = ""; }; - 686382E92AC1F9F300E27AAD /* ScenariosShare */ = { - isa = PBXGroup; - children = ( - 686382EA2AC1F9F300E27AAD /* ShareViewController.h */, - 686382EB2AC1F9F300E27AAD /* ShareViewController.m */, - 686382ED2AC1F9F300E27AAD /* MainInterface.storyboard */, - 686382F02AC1F9F300E27AAD /* Info.plist */, - ); - path = ScenariosShare; - sourceTree = ""; - }; - 686383062AC2024200E27AAD /* Products */ = { - isa = PBXGroup; - children = ( - 6863830B2AC2024200E27AAD /* FlutterAppExtensionTestHost.app */, - ); - name = Products; - sourceTree = ""; - }; F7B464DC2759D02B00079189 /* Goldens */ = { isa = PBXGroup; children = ( @@ -442,12 +355,10 @@ 248D76C422E388370012F0C1 /* Frameworks */, 248D76C522E388370012F0C1 /* Resources */, 246B4E4422E3B5F700073EBF /* Embed Frameworks */, - 686382F42AC1F9F300E27AAD /* Embed Foundation Extensions */, ); buildRules = ( ); dependencies = ( - 686382F22AC1F9F300E27AAD /* PBXTargetDependency */, ); name = Scenarios; productName = Scenarios; @@ -485,7 +396,6 @@ buildRules = ( ); dependencies = ( - 686383112AC2027100E27AAD /* PBXTargetDependency */, 248D76EC22E388380012F0C1 /* PBXTargetDependency */, ); name = ScenariosUITests; @@ -493,24 +403,6 @@ productReference = 248D76EA22E388380012F0C1 /* ScenariosUITests.xctest */; productType = "com.apple.product-type.bundle.ui-testing"; }; - 686382E72AC1F9F300E27AAD /* ScenariosShare */ = { - isa = PBXNativeTarget; - buildConfigurationList = 686382F72AC1F9F300E27AAD /* Build configuration list for PBXNativeTarget "ScenariosShare" */; - buildPhases = ( - 686382E42AC1F9F300E27AAD /* Sources */, - 686382E52AC1F9F300E27AAD /* Frameworks */, - 686382E62AC1F9F300E27AAD /* Resources */, - 686383172AC2175100E27AAD /* Embed Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = ScenariosShare; - productName = ScenariosShare; - productReference = 686382E82AC1F9F300E27AAD /* ScenariosShare.appex */; - productType = "com.apple.product-type.app-extension"; - }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -534,9 +426,6 @@ LastSwiftMigration = 1030; TestTargetID = 248D76C622E388370012F0C1; }; - 686382E72AC1F9F300E27AAD = { - CreatedOnToolsVersion = 15.0; - }; }; }; buildConfigurationList = 248D76C222E388370012F0C1 /* Build configuration list for PBXProject "Scenarios" */; @@ -550,32 +439,15 @@ mainGroup = 248D76BE22E388370012F0C1; productRefGroup = 248D76C822E388370012F0C1 /* Products */; projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 686383062AC2024200E27AAD /* Products */; - ProjectRef = 686383052AC2024200E27AAD /* FlutterAppExtensionTestHost.xcodeproj */; - }, - ); projectRoot = ""; targets = ( 248D76C622E388370012F0C1 /* Scenarios */, 248D76DE22E388380012F0C1 /* ScenariosTests */, 248D76E922E388380012F0C1 /* ScenariosUITests */, - 686382E72AC1F9F300E27AAD /* ScenariosShare */, ); }; /* End PBXProject section */ -/* Begin PBXReferenceProxy section */ - 6863830B2AC2024200E27AAD /* FlutterAppExtensionTestHost.app */ = { - isa = PBXReferenceProxy; - fileType = wrapper.application; - path = FlutterAppExtensionTestHost.app; - remoteRef = 6863830A2AC2024200E27AAD /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - /* Begin PBXResourcesBuildPhase section */ 248D76C522E388370012F0C1 /* Resources */ = { isa = PBXResourcesBuildPhase; @@ -625,14 +497,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 686382E62AC1F9F300E27AAD /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 686382EF2AC1F9F300E27AAD /* MainInterface.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -675,19 +539,10 @@ F26F15B8268B6B5600EC54D3 /* iPadGestureTests.m in Sources */, 246A6611252E693A00EAB0F3 /* RenderingSelectionTest.m in Sources */, 4F06F1B32473296E000AF246 /* LocalizationInitializationTest.m in Sources */, - 686383132AC202B700E27AAD /* AppExtensionTests.m in Sources */, 0DDEBC89258830B40065D0E8 /* SpawnEngineTest.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 686382E42AC1F9F300E27AAD /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 686382EC2AC1F9F300E27AAD /* ShareViewController.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -701,29 +556,8 @@ target = 248D76C622E388370012F0C1 /* Scenarios */; targetProxy = 248D76EB22E388380012F0C1 /* PBXContainerItemProxy */; }; - 686382F22AC1F9F300E27AAD /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 686382E72AC1F9F300E27AAD /* ScenariosShare */; - targetProxy = 686382F12AC1F9F300E27AAD /* PBXContainerItemProxy */; - }; - 686383112AC2027100E27AAD /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = FlutterAppExtensionTestHost; - targetProxy = 686383102AC2027100E27AAD /* PBXContainerItemProxy */; - }; /* End PBXTargetDependency section */ -/* Begin PBXVariantGroup section */ - 686382ED2AC1F9F300E27AAD /* MainInterface.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 686382EE2AC1F9F300E27AAD /* Base */, - ); - name = MainInterface.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - /* Begin XCBuildConfiguration section */ 248D76F122E388380012F0C1 /* Debug */ = { isa = XCBuildConfiguration; @@ -844,7 +678,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = S8QB4VV633; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -867,7 +701,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = S8QB4VV633; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -889,7 +723,7 @@ buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = S8QB4VV633; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -916,7 +750,7 @@ buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = S8QB4VV633; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -942,7 +776,7 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = S8QB4VV633; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -968,7 +802,7 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = S8QB4VV633; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -990,70 +824,6 @@ }; name = Release; }; - 686382F52AC1F9F300E27AAD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = ""; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = ScenariosShare/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = ScenariosShare; - INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2023 flutter. All rights reserved."; - IPHONEOS_DEPLOYMENT_TARGET = 16.2; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.Scenarios.ScenariosShare; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_EMIT_LOC_STRINGS = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 686382F62AC1F9F300E27AAD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = ""; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = ScenariosShare/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = ScenariosShare; - INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2023 flutter. All rights reserved."; - IPHONEOS_DEPLOYMENT_TARGET = 16.2; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.Scenarios.ScenariosShare; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_EMIT_LOC_STRINGS = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -1093,15 +863,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 686382F72AC1F9F300E27AAD /* Build configuration list for PBXNativeTarget "ScenariosShare" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 686382F52AC1F9F300E27AAD /* Debug */, - 686382F62AC1F9F300E27AAD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; /* End XCConfigurationList section */ }; rootObject = 248D76BF22E388370012F0C1 /* Project object */; diff --git a/testing/scenario_app/ios/Scenarios/ScenariosShare/Base.lproj/MainInterface.storyboard b/testing/scenario_app/ios/Scenarios/ScenariosShare/Base.lproj/MainInterface.storyboard deleted file mode 100644 index 589bdd9e70de9..0000000000000 --- a/testing/scenario_app/ios/Scenarios/ScenariosShare/Base.lproj/MainInterface.storyboard +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/testing/scenario_app/ios/Scenarios/ScenariosShare/Info.plist b/testing/scenario_app/ios/Scenarios/ScenariosShare/Info.plist deleted file mode 100644 index ad33037771e88..0000000000000 --- a/testing/scenario_app/ios/Scenarios/ScenariosShare/Info.plist +++ /dev/null @@ -1,18 +0,0 @@ - - - - - NSExtension - - NSExtensionAttributes - - NSExtensionActivationRule - TRUEPREDICATE - - NSExtensionPrincipalClass - ShareViewController - NSExtensionPointIdentifier - com.apple.share-services - - - diff --git a/testing/scenario_app/ios/Scenarios/ScenariosShare/ShareViewController.h b/testing/scenario_app/ios/Scenarios/ScenariosShare/ShareViewController.h deleted file mode 100644 index 004a75bd6ad35..0000000000000 --- a/testing/scenario_app/ios/Scenarios/ScenariosShare/ShareViewController.h +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#import -#import - -@interface ShareViewController : FlutterViewController - -@end diff --git a/testing/scenario_app/ios/Scenarios/ScenariosShare/ShareViewController.m b/testing/scenario_app/ios/Scenarios/ScenariosShare/ShareViewController.m deleted file mode 100644 index cea875a76271a..0000000000000 --- a/testing/scenario_app/ios/Scenarios/ScenariosShare/ShareViewController.m +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#import "ShareViewController.h" - -@interface ShareViewController () - -@end - -@implementation ShareViewController - -- (instancetype)init { - FlutterEngine* engine = [[FlutterEngine alloc] initWithName:@"FlutterControllerTest" project:nil]; - [engine run]; - self = [self initWithEngine:engine nibName:nil bundle:nil]; - self.view.accessibilityIdentifier = @"flutter_view"; - - [engine.binaryMessenger - setMessageHandlerOnChannel:@"waiting_for_status" - binaryMessageHandler:^(NSData* _Nullable message, FlutterBinaryReply _Nonnull reply) { - FlutterMethodChannel* channel = [FlutterMethodChannel - methodChannelWithName:@"driver" - binaryMessenger:engine.binaryMessenger - codec:[FlutterJSONMethodCodec sharedInstance]]; - [channel invokeMethod:@"set_scenario" arguments:@{@"name" : @"app_extension"}]; - }]; - return self; -} - -@end diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/AppExtensionTests.m b/testing/scenario_app/ios/Scenarios/ScenariosUITests/AppExtensionTests.m deleted file mode 100644 index 70d4e0a190a3b..0000000000000 --- a/testing/scenario_app/ios/Scenarios/ScenariosUITests/AppExtensionTests.m +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2020 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#import -#import "GoldenTestManager.h" - -@interface AppExtensionTests : XCTestCase -@property(nonatomic, strong) XCUIApplication* hostApplication; -@end - -@implementation AppExtensionTests - -- (void)setUp { - [super setUp]; - self.continueAfterFailure = NO; - self.hostApplication = - [[XCUIApplication alloc] initWithBundleIdentifier:@"dev.flutter.FlutterAppExtensionTestHost"]; -} - -- (void)testAppExtensionLaunching { - [self.hostApplication launch]; - XCUIElement* button = self.hostApplication.buttons[@"Open Share"]; - if (![button waitForExistenceWithTimeout:10]) { - NSLog(@"%@", self.hostApplication.debugDescription); - XCTFail(@"Failed due to not able to find any button with %@ seconds", @(10)); - } - [button tap]; - BOOL launchedExtensionInFlutter = NO; - // Custom share extension button (like the one in this test) does not have a unique - // identity. They are all identified as `XCElementSnapshotPrivilegedValuePlaceholder`. - // Loop through all the `XCElementSnapshotPrivilegedValuePlaceholder` and find the Flutter one. - for (int i = 0; i < self.hostApplication.collectionViews.cells.count; i++) { - XCUIElement* shareSheetCell = - [self.hostApplication.collectionViews.cells elementBoundByIndex:i]; - if (![shareSheetCell.label isEqualToString:@"XCElementSnapshotPrivilegedValuePlaceholder"]) { - continue; - } - [shareSheetCell tap]; - - XCUIElement* flutterView = self.hostApplication.otherElements[@"flutter_view"]; - if ([flutterView waitForExistenceWithTimeout:10]) { - launchedExtensionInFlutter = YES; - break; - } - - // All the built-in share extensions have a Cancel button. - // Tap the Cancel button to close the built-in extension. - XCUIElement* cancel = self.hostApplication.buttons[@"Cancel"]; - if ([cancel waitForExistenceWithTimeout:10]) { - [cancel tap]; - } - } - // App extension successfully launched flutter view. - XCTAssertTrue(launchedExtensionInFlutter); -} - -@end diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenTestManager.m b/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenTestManager.m index 29915a4cf57b2..a8d966379a5aa 100644 --- a/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenTestManager.m +++ b/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenTestManager.m @@ -53,7 +53,6 @@ - (instancetype)initWithLaunchArg:(NSString*)launchArg { @"--two-platform-view-clip-rect" : @"two_platform_view_clip_rect", @"--two-platform-view-clip-rrect" : @"two_platform_view_clip_rrect", @"--two-platform-view-clip-path" : @"two_platform_view_clip_path", - @"--app-extension" : @"app_extension", }; }); _identifier = launchArgsMap[launchArg]; diff --git a/testing/scenario_app/lib/src/darwin_app_extension_scenario.dart b/testing/scenario_app/lib/src/darwin_app_extension_scenario.dart deleted file mode 100644 index 354810a5d8d23..0000000000000 --- a/testing/scenario_app/lib/src/darwin_app_extension_scenario.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import 'dart:ui'; - -import 'scenario.dart'; - -/// Shows a text that is shown in app extension. -class DarwinAppExtensionScenario extends Scenario { - /// Creates the DarwinAppExtensionScenario scenario. - DarwinAppExtensionScenario(super.view); - - // Semi-arbitrary. - final double _screenWidth = 700; - - @override - void onBeginFrame(Duration duration) { - final SceneBuilder builder = SceneBuilder(); - final PictureRecorder recorder = PictureRecorder(); - final Canvas canvas = Canvas(recorder); - - final ParagraphBuilder paragraphBuilder = - ParagraphBuilder(ParagraphStyle()) - ..pushStyle(TextStyle(fontSize: 80)) - ..addText('flutter Scenarios app extension.') - ..pop(); - final Paragraph paragraph = paragraphBuilder.build(); - - paragraph.layout(ParagraphConstraints(width: _screenWidth)); - - canvas.drawParagraph(paragraph, const Offset(50, 80)); - final Picture picture = recorder.endRecording(); - - builder.addPicture( - Offset.zero, - picture, - willChangeHint: true, - ); - final Scene scene = builder.build(); - view.render(scene); - scene.dispose(); - } -} diff --git a/testing/scenario_app/lib/src/scenarios.dart b/testing/scenario_app/lib/src/scenarios.dart index 8e3b15a985fa1..d9c586023bed2 100644 --- a/testing/scenario_app/lib/src/scenarios.dart +++ b/testing/scenario_app/lib/src/scenarios.dart @@ -6,7 +6,6 @@ import 'dart:ui'; import 'animated_color_square.dart'; import 'bogus_font_text.dart'; -import 'darwin_app_extension_scenario.dart'; import 'get_bitmap_scenario.dart'; import 'initial_route_reply.dart'; import 'locale_initialization.dart'; @@ -67,7 +66,6 @@ Map _scenarios = { 'pointer_events': (FlutterView view) => TouchesScenario(view), 'display_texture': (FlutterView view) => DisplayTexture(view), 'get_bitmap': (FlutterView view) => GetBitmapScenario(view), - 'app_extension': (FlutterView view) => DarwinAppExtensionScenario(view), }; Map _currentScenarioParams = {}; diff --git a/testing/scenario_app/run_ios_tests.sh b/testing/scenario_app/run_ios_tests.sh index 772ea3b96294d..3f730deaf3bba 100755 --- a/testing/scenario_app/run_ios_tests.sh +++ b/testing/scenario_app/run_ios_tests.sh @@ -109,9 +109,7 @@ if set -o pipefail && xcodebuild -sdk iphonesimulator \ -skip-testing ScenariosUITests/TwoPlatformViewClipRRectTests/testPlatformView \ -skip-testing ScenariosUITests/TwoPlatformViewsWithOtherBackDropFilterTests/testPlatformView \ -skip-testing ScenariosUITests/UnobstructedPlatformViewTests/testMultiplePlatformViewsWithOverlays \ - # Plist with FLTEnableImpeller=YES, all projects in the workspace requires this file. - # For example, FlutterAppExtensionTestHost has a dummy file under the below directory. - INFOPLIST_FILE="Scenarios/Info_Impeller.plist"; then + INFOPLIST_FILE="Scenarios/Info_Impeller.plist"; then # Plist with FLTEnableImpeller=YES echo "test success." else echo "test failed." From f8172d1c95eedf168b4be4a90c6f5ff650ee5242 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 27 Sep 2023 14:08:11 -0400 Subject: [PATCH 325/859] Roll Skia from ff5474eed6b4 to d78aba2524b3 (3 revisions) (#46327) https://skia.googlesource.com/skia.git/+log/ff5474eed6b4..d78aba2524b3 2023-09-27 michaelludwig@google.com [skif] Make SkImageFilters::Crop public 2023-09-27 drott@chromium.org [Fontations] Add pixel comparisons for FreeType vs. Fontations 2023-09-27 johnstiles@google.com Split out MakeChildFP to a separate helper function. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/DEPS b/DEPS index c1ea34a920028..45c93648a4e08 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'ff5474eed6b45ff25f5ec7a308696a56442b6a39', + 'skia_revision': 'd78aba2524b3bf2731aa498dd6d21ab3ffd0f9d6', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index dad64d037727b..4bd0692157264 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: ffcfb8e2aec4062c05c96e805e599d4b +Signature: 5a24e476f92a69dee5c0162df3e01249 ==================================================================================================== LIBRARY: etc1 @@ -385,6 +385,7 @@ FILE: ../../../third_party/skia/modules/pathkit/perf/pathops.bench.js FILE: ../../../third_party/skia/modules/pathkit/perf/perfReporter.js FILE: ../../../third_party/skia/modules/skparagraph/test.html FILE: ../../../third_party/skia/package-lock.json +FILE: ../../../third_party/skia/relnotes/crop-imagefilter.md FILE: ../../../third_party/skia/relnotes/directcontext_gl.md FILE: ../../../third_party/skia/relnotes/directcontext_submit.md FILE: ../../../third_party/skia/relnotes/mesh-child-effect.md @@ -7376,7 +7377,6 @@ ORIGIN: ../../../third_party/skia/src/core/SkMeshPriv.h + ../../../third_party/s ORIGIN: ../../../third_party/skia/src/core/SkYUVAInfoLocation.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/effects/SkBlenders.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/effects/imagefilters/SkCropImageFilter.cpp + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/src/effects/imagefilters/SkCropImageFilter.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/effects/imagefilters/SkRuntimeImageFilter.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/KeyBuilder.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ResourceKey.cpp + ../../../third_party/skia/LICENSE @@ -7594,7 +7594,6 @@ FILE: ../../../third_party/skia/src/core/SkMeshPriv.h FILE: ../../../third_party/skia/src/core/SkYUVAInfoLocation.h FILE: ../../../third_party/skia/src/effects/SkBlenders.cpp FILE: ../../../third_party/skia/src/effects/imagefilters/SkCropImageFilter.cpp -FILE: ../../../third_party/skia/src/effects/imagefilters/SkCropImageFilter.h FILE: ../../../third_party/skia/src/effects/imagefilters/SkRuntimeImageFilter.cpp FILE: ../../../third_party/skia/src/gpu/KeyBuilder.h FILE: ../../../third_party/skia/src/gpu/ResourceKey.cpp @@ -8773,6 +8772,7 @@ ORIGIN: ../../../third_party/skia/fuzz/oss_fuzz/FuzzPrecompile.cpp + ../../../th ORIGIN: ../../../third_party/skia/fuzz/oss_fuzz/FuzzQuadRoots.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/BazelGMRunner.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/BazelNoopRunner.cpp + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/gm/fontations_ft_compare.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/graphite_replay.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/hello_bazel_world.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/png_codec.cpp + ../../../third_party/skia/LICENSE @@ -9038,6 +9038,7 @@ FILE: ../../../third_party/skia/fuzz/oss_fuzz/FuzzPrecompile.cpp FILE: ../../../third_party/skia/fuzz/oss_fuzz/FuzzQuadRoots.cpp FILE: ../../../third_party/skia/gm/BazelGMRunner.cpp FILE: ../../../third_party/skia/gm/BazelNoopRunner.cpp +FILE: ../../../third_party/skia/gm/fontations_ft_compare.cpp FILE: ../../../third_party/skia/gm/graphite_replay.cpp FILE: ../../../third_party/skia/gm/hello_bazel_world.cpp FILE: ../../../third_party/skia/gm/png_codec.cpp From 6b8ba8b4659fe0451c880e4009a5e4e4b96e0314 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 27 Sep 2023 15:11:24 -0400 Subject: [PATCH 326/859] Roll Dart SDK from 97647bb1666b to 80a965ee48ab (1 revision) (#46330) https://dart.googlesource.com/sdk.git/+log/97647bb1666b..80a965ee48ab 2023-09-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-205.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jacksongardner@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 4 ++-- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index 45c93648a4e08..7c4d226d17e92 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '97647bb1666b998eebe1805ba545b426fa038f41', + 'dart_revision': '80a965ee48ab6e71454f26fff734c24cc9464368', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py @@ -72,7 +72,7 @@ vars = { 'dart_perfetto_rev': 'b8da07095979310818f0efde2ef3c69ea70d62c5', 'dart_protobuf_gn_rev': 'ca669f79945418f6229e4fef89b666b2a88cbb10', 'dart_protobuf_rev': 'c16bc891978a1764f0d6d8eca54f420242c78a6a', - 'dart_pub_rev': '1e38c837e4eee40c6d5c5b088e8ed1b512e02980', + 'dart_pub_rev': 'fca927ae2662204805e1646c0c0687369001a41a', 'dart_root_certificates_rev': '692f6d6488af68e0121317a9c2c9eb393eb0ee50', 'dart_tools_rev': '3c248df45b9bf40738579e8616cd7d85f34ba5b1', 'dart_watcher_rev': '1aed03e2a8005f45083fdb38cbd4b684cd23082f', diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index e26f5f78207d4..ab67de4bce7a0 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: cda26f982a3f50966fb6446aa974c3b4 +Signature: b342b432b49d09cf10a2d480bfc2dcef ==================================================================================================== LIBRARY: dart From c0541e828f3377211a5464011b72123da2ede5ca Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Wed, 27 Sep 2023 12:48:19 -0700 Subject: [PATCH 327/859] [Impeller] Match Skia gradient clamping behavior (and document). (#44825) Skia clamps any gradient stops to values of 0.0 to 1.0. Implement this behavior in Impeller and document it in dart:ui (Framework also needs to be documented). This also matches the w3c gradient behavior: https://www.w3.org/TR/2000/CR-SVG-20000802/pservers.html - almost. We might be slightly off with how we're inserting additional stops for 0.0 and 1.0, but at least its closer. Fixes https://github.com/flutter/flutter/issues/132792 --- impeller/display_list/dl_dispatcher.cc | 32 +---- impeller/display_list/skia_conversions.cc | 24 ++++ impeller/display_list/skia_conversions.h | 19 +++ .../skia_conversions_unittests.cc | 133 ++++++++++++++++++ lib/ui/painting.dart | 18 ++- 5 files changed, 195 insertions(+), 31 deletions(-) diff --git a/impeller/display_list/dl_dispatcher.cc b/impeller/display_list/dl_dispatcher.cc index 8f18470b33302..0b19cefb5b79b 100644 --- a/impeller/display_list/dl_dispatcher.cc +++ b/impeller/display_list/dl_dispatcher.cc @@ -271,30 +271,6 @@ static std::vector ToColors(const flutter::DlColor colors[], int count) { return result; } -// Convert display list colors + stops into impeller colors and stops, taking -// care to ensure that the stops always start with 0.0 and end with 1.0. -template -static void ConvertStops(T* gradient, - std::vector* colors, - std::vector* stops) { - FML_DCHECK(gradient->stop_count() >= 2); - - auto* dl_colors = gradient->colors(); - auto* dl_stops = gradient->stops(); - if (dl_stops[0] != 0.0) { - colors->emplace_back(skia_conversions::ToColor(dl_colors[0])); - stops->emplace_back(0); - } - for (auto i = 0; i < gradient->stop_count(); i++) { - colors->emplace_back(skia_conversions::ToColor(dl_colors[i])); - stops->emplace_back(dl_stops[i]); - } - if (stops->back() != 1.0) { - colors->emplace_back(colors->back()); - stops->emplace_back(1.0); - } -} - static std::optional ToColorSourceType( flutter::DlColorSourceType type) { switch (type) { @@ -351,7 +327,7 @@ void DlDispatcher::setColorSource(const flutter::DlColorSource* source) { auto end_point = skia_conversions::ToPoint(linear->end_point()); std::vector colors; std::vector stops; - ConvertStops(linear, &colors, &stops); + skia_conversions::ConvertStops(linear, colors, stops); auto tile_mode = ToTileMode(linear->tile_mode()); auto matrix = ToMatrix(linear->matrix()); @@ -372,7 +348,7 @@ void DlDispatcher::setColorSource(const flutter::DlColorSource* source) { SkScalar focus_radius = conical_gradient->start_radius(); std::vector colors; std::vector stops; - ConvertStops(conical_gradient, &colors, &stops); + skia_conversions::ConvertStops(conical_gradient, colors, stops); auto tile_mode = ToTileMode(conical_gradient->tile_mode()); auto matrix = ToMatrix(conical_gradient->matrix()); @@ -390,7 +366,7 @@ void DlDispatcher::setColorSource(const flutter::DlColorSource* source) { auto radius = radialGradient->radius(); std::vector colors; std::vector stops; - ConvertStops(radialGradient, &colors, &stops); + skia_conversions::ConvertStops(radialGradient, colors, stops); auto tile_mode = ToTileMode(radialGradient->tile_mode()); auto matrix = ToMatrix(radialGradient->matrix()); @@ -409,7 +385,7 @@ void DlDispatcher::setColorSource(const flutter::DlColorSource* source) { auto end_angle = Degrees(sweepGradient->end()); std::vector colors; std::vector stops; - ConvertStops(sweepGradient, &colors, &stops); + skia_conversions::ConvertStops(sweepGradient, colors, stops); auto tile_mode = ToTileMode(sweepGradient->tile_mode()); auto matrix = ToMatrix(sweepGradient->matrix()); diff --git a/impeller/display_list/skia_conversions.cc b/impeller/display_list/skia_conversions.cc index 8b17ad0acf315..56e2f87825ccd 100644 --- a/impeller/display_list/skia_conversions.cc +++ b/impeller/display_list/skia_conversions.cc @@ -189,5 +189,29 @@ std::optional ToPixelFormat(SkColorType type) { return std::nullopt; } +void ConvertStops(const flutter::DlGradientColorSourceBase* gradient, + std::vector& colors, + std::vector& stops) { + FML_DCHECK(gradient->stop_count() >= 2); + + auto* dl_colors = gradient->colors(); + auto* dl_stops = gradient->stops(); + if (dl_stops[0] != 0.0) { + colors.emplace_back(skia_conversions::ToColor(dl_colors[0])); + stops.emplace_back(0); + } + for (auto i = 0; i < gradient->stop_count(); i++) { + colors.emplace_back(skia_conversions::ToColor(dl_colors[i])); + stops.emplace_back(std::clamp(dl_stops[i], 0.0f, 1.0f)); + } + if (dl_stops[gradient->stop_count() - 1] != 1.0) { + colors.emplace_back(colors.back()); + stops.emplace_back(1.0); + } + for (auto i = 1; i < gradient->stop_count(); i++) { + stops[i] = std::clamp(stops[i], stops[i - 1], stops[i]); + } +} + } // namespace skia_conversions } // namespace impeller diff --git a/impeller/display_list/skia_conversions.h b/impeller/display_list/skia_conversions.h index 4b535db6227c3..4eed60fb124d2 100644 --- a/impeller/display_list/skia_conversions.h +++ b/impeller/display_list/skia_conversions.h @@ -5,6 +5,7 @@ #pragma once #include "display_list/dl_color.h" +#include "display_list/effects/dl_color_source.h" #include "impeller/core/formats.h" #include "impeller/geometry/color.h" #include "impeller/geometry/path.h" @@ -47,5 +48,23 @@ Path PathDataFromTextBlob(const sk_sp& blob, std::optional ToPixelFormat(SkColorType type); +/// @brief Convert display list colors + stops into impeller colors and stops, +/// taking care to ensure that the stops monotonically increase from 0.0 to 1.0. +/// +/// The general process is: +/// * Ensure that the first gradient stop value is 0.0. If not, insert a new +/// stop with a value of 0.0 and use the first gradient color as this new +/// stops color. +/// * Ensure the last gradient stop value is 1.0. If not, insert a new stop +/// with a value of 1.0 and use the last gradient color as this stops color. +/// * Clamp all gradient values between the values of 0.0 and 1.0. +/// * For all stop values, ensure that the values are monotonically increasing +/// by clamping each value to a minimum of the previous stop value and itself. +/// For example, with stop values of 0.0, 0.5, 0.4, 1.0, we would clamp such +/// that the values were 0.0, 0.5, 0.5, 1.0. +void ConvertStops(const flutter::DlGradientColorSourceBase* gradient, + std::vector& colors, + std::vector& stops); + } // namespace skia_conversions } // namespace impeller diff --git a/impeller/display_list/skia_conversions_unittests.cc b/impeller/display_list/skia_conversions_unittests.cc index 220e5035f8226..eaf1f571ab7f5 100644 --- a/impeller/display_list/skia_conversions_unittests.cc +++ b/impeller/display_list/skia_conversions_unittests.cc @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "display_list/dl_color.h" +#include "display_list/dl_tile_mode.h" #include "flutter/testing/testing.h" #include "impeller/display_list/skia_conversions.h" #include "impeller/geometry/scalar.h" @@ -23,5 +25,136 @@ TEST(SkiaConversionsTest, ToColor) { ASSERT_TRUE(ScalarNearlyEqual(converted_color.blue, 0x20 * (1.0f / 255))); } +TEST(SkiaConversionsTest, GradientStopConversion) { + // Typical gradient. + std::vector colors = {flutter::DlColor::kBlue(), + flutter::DlColor::kRed(), + flutter::DlColor::kGreen()}; + std::vector stops = {0.0, 0.5, 1.0}; + const auto gradient = + flutter::DlColorSource::MakeLinear(SkPoint::Make(0, 0), // + SkPoint::Make(1.0, 1.0), // + 3, // + colors.data(), // + stops.data(), // + flutter::DlTileMode::kClamp, // + nullptr // + ); + + std::vector converted_colors; + std::vector converted_stops; + skia_conversions::ConvertStops(gradient.get(), converted_colors, + converted_stops); + + ASSERT_TRUE(ScalarNearlyEqual(converted_stops[0], 0.0f)); + ASSERT_TRUE(ScalarNearlyEqual(converted_stops[1], 0.5f)); + ASSERT_TRUE(ScalarNearlyEqual(converted_stops[2], 1.0f)); +} + +TEST(SkiaConversionsTest, GradientMissing0) { + std::vector colors = {flutter::DlColor::kBlue(), + flutter::DlColor::kRed()}; + std::vector stops = {0.5, 1.0}; + const auto gradient = + flutter::DlColorSource::MakeLinear(SkPoint::Make(0, 0), // + SkPoint::Make(1.0, 1.0), // + 2, // + colors.data(), // + stops.data(), // + flutter::DlTileMode::kClamp, // + nullptr // + ); + + std::vector converted_colors; + std::vector converted_stops; + skia_conversions::ConvertStops(gradient.get(), converted_colors, + converted_stops); + + // First color is inserted as blue. + ASSERT_TRUE(ScalarNearlyEqual(converted_colors[0].blue, 1.0f)); + ASSERT_TRUE(ScalarNearlyEqual(converted_stops[0], 0.0f)); + ASSERT_TRUE(ScalarNearlyEqual(converted_stops[1], 0.5f)); + ASSERT_TRUE(ScalarNearlyEqual(converted_stops[2], 1.0f)); +} + +TEST(SkiaConversionsTest, GradientMissingLastValue) { + std::vector colors = {flutter::DlColor::kBlue(), + flutter::DlColor::kRed()}; + std::vector stops = {0.0, .5}; + const auto gradient = + flutter::DlColorSource::MakeLinear(SkPoint::Make(0, 0), // + SkPoint::Make(1.0, 1.0), // + 2, // + colors.data(), // + stops.data(), // + flutter::DlTileMode::kClamp, // + nullptr // + ); + + std::vector converted_colors; + std::vector converted_stops; + skia_conversions::ConvertStops(gradient.get(), converted_colors, + converted_stops); + + // Last color is inserted as red. + ASSERT_TRUE(ScalarNearlyEqual(converted_colors[2].red, 1.0f)); + ASSERT_TRUE(ScalarNearlyEqual(converted_stops[0], 0.0f)); + ASSERT_TRUE(ScalarNearlyEqual(converted_stops[1], 0.5f)); + ASSERT_TRUE(ScalarNearlyEqual(converted_stops[2], 1.0f)); +} + +TEST(SkiaConversionsTest, GradientStopGreaterThan1) { + std::vector colors = {flutter::DlColor::kBlue(), + flutter::DlColor::kGreen(), + flutter::DlColor::kRed()}; + std::vector stops = {0.0, 100, 1.0}; + const auto gradient = + flutter::DlColorSource::MakeLinear(SkPoint::Make(0, 0), // + SkPoint::Make(1.0, 1.0), // + 3, // + colors.data(), // + stops.data(), // + flutter::DlTileMode::kClamp, // + nullptr // + ); + + std::vector converted_colors; + std::vector converted_stops; + skia_conversions::ConvertStops(gradient.get(), converted_colors, + converted_stops); + + // Value is clamped to 1.0 + ASSERT_TRUE(ScalarNearlyEqual(converted_stops[0], 0.0f)); + ASSERT_TRUE(ScalarNearlyEqual(converted_stops[1], 1.0f)); + ASSERT_TRUE(ScalarNearlyEqual(converted_stops[2], 1.0f)); +} + +TEST(SkiaConversionsTest, GradientConversionNonMonotonic) { + std::vector colors = { + flutter::DlColor::kBlue(), flutter::DlColor::kGreen(), + flutter::DlColor::kGreen(), flutter::DlColor::kRed()}; + std::vector stops = {0.0, 0.5, 0.4, 1.0}; + const auto gradient = + flutter::DlColorSource::MakeLinear(SkPoint::Make(0, 0), // + SkPoint::Make(1.0, 1.0), // + 4, // + colors.data(), // + stops.data(), // + flutter::DlTileMode::kClamp, // + nullptr // + ); + + std::vector converted_colors; + std::vector converted_stops; + skia_conversions::ConvertStops(gradient.get(), converted_colors, + converted_stops); + + // Value is clamped to 0.5 + ASSERT_TRUE(ScalarNearlyEqual(converted_stops[0], 0.0f)); + ASSERT_TRUE(ScalarNearlyEqual(converted_stops[1], 0.5f)); + ASSERT_TRUE(ScalarNearlyEqual(converted_stops[2], 0.5f)); + ASSERT_TRUE(ScalarNearlyEqual(converted_stops[3], 1.0f)); +} + } // namespace testing } // namespace impeller diff --git a/lib/ui/painting.dart b/lib/ui/painting.dart index 6784474e88a31..638a257301d3b 100644 --- a/lib/ui/painting.dart +++ b/lib/ui/painting.dart @@ -4191,7 +4191,11 @@ base class Gradient extends Shader { /// If `colorStops` is provided, `colorStops[i]` is a number from 0.0 to 1.0 /// that specifies where `color[i]` begins in the gradient. If `colorStops` is /// not provided, then only two stops, at 0.0 and 1.0, are implied (and - /// `color` must therefore only have two entries). + /// `color` must therefore only have two entries). Stop values less than 0.0 + /// will be rounded up to 0.0 and stop values greater than 1.0 will be rounded + /// down to 1.0. Each stop value must be greater than or equal to the previous + /// stop value. Stop values that do not meet this criteria will be rounded up + /// to the previous stop value. /// /// The behavior before `from` and after `to` is described by the `tileMode` /// argument. For details, see the [TileMode] enum. @@ -4233,7 +4237,11 @@ base class Gradient extends Shader { /// If `colorStops` is provided, `colorStops[i]` is a number from 0.0 to 1.0 /// that specifies where `color[i]` begins in the gradient. If `colorStops` is /// not provided, then only two stops, at 0.0 and 1.0, are implied (and - /// `color` must therefore only have two entries). + /// `color` must therefore only have two entries). Stop values less than 0.0 + /// will be rounded up to 0.0 and stop values greater than 1.0 will be rounded + /// down to 1.0. Each stop value must be greater than or equal to the previous + /// stop value. Stop values that do not meet this criteria will be rounded up + /// to the previous stop value. /// /// The behavior before and after the radius is described by the `tileMode` /// argument. For details, see the [TileMode] enum. @@ -4295,7 +4303,11 @@ base class Gradient extends Shader { /// If `colorStops` is provided, `colorStops[i]` is a number from 0.0 to 1.0 /// that specifies where `color[i]` begins in the gradient. If `colorStops` is /// not provided, then only two stops, at 0.0 and 1.0, are implied (and - /// `color` must therefore only have two entries). + /// `color` must therefore only have two entries). Stop values less than 0.0 + /// will be rounded up to 0.0 and stop values greater than 1.0 will be rounded + /// down to 1.0. Each stop value must be greater than or equal to the previous + /// stop value. Stop values that do not meet this criteria will be rounded up + /// to the previous stop value. /// /// The behavior before `startAngle` and after `endAngle` is described by the /// `tileMode` argument. For details, see the [TileMode] enum. From 784fd763a5c60df8ade6f809dc892ce52eb00e36 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 27 Sep 2023 16:06:40 -0400 Subject: [PATCH 328/859] Roll Skia from d78aba2524b3 to 952e8dd66560 (1 revision) (#46331) https://skia.googlesource.com/skia.git/+log/d78aba2524b3..952e8dd66560 2023-09-27 armansito@google.com [graphite] Fix VelloComputeStep declarations for WGSL If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 7c4d226d17e92..68723403164c7 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'd78aba2524b3bf2731aa498dd6d21ab3ffd0f9d6', + 'skia_revision': '952e8dd665608a748b28d267499042b965fca4e6', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 4bd0692157264..a3061cff1b9d7 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 5a24e476f92a69dee5c0162df3e01249 +Signature: c597a715dc4d0dd9f7de5b5b1fafd88a ==================================================================================================== LIBRARY: etc1 From e5ee44682e2dd5239a5c77580d2fddef518fd0cf Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Wed, 27 Sep 2023 13:09:51 -0700 Subject: [PATCH 329/859] [Impeller] Destroy all per-thread command pools tied to a context before deleting the context (#46286) Vulkan requires that all objects created using a device be destroyed before the device is destroyed. The CommandPoolRecyclerVK maintains a thread-local map of each context's currently active command pool. Before the context deletes the device, it must force cleanup of all such command pools associated with that context. This PR reinstates a mechanism that was used prior to the refactoring that introduced command pool recycling. --- .../backend/vulkan/command_pool_vk.cc | 85 ++++++++++++++++--- .../renderer/backend/vulkan/command_pool_vk.h | 16 +++- .../renderer/backend/vulkan/context_vk.cc | 4 +- .../backend/vulkan/context_vk_unittests.cc | 32 +++++++ 4 files changed, 118 insertions(+), 19 deletions(-) diff --git a/impeller/renderer/backend/vulkan/command_pool_vk.cc b/impeller/renderer/backend/vulkan/command_pool_vk.cc index 2339ad3f74c97..9d6f70d4eeb20 100644 --- a/impeller/renderer/backend/vulkan/command_pool_vk.cc +++ b/impeller/renderer/backend/vulkan/command_pool_vk.cc @@ -59,6 +59,10 @@ class BackgroundCommandPoolVK final { static bool kResetOnBackgroundThread = false; CommandPoolVK::~CommandPoolVK() { + if (!pool_) { + return; + } + auto const context = context_.lock(); if (!context) { return; @@ -84,6 +88,11 @@ vk::UniqueCommandBuffer CommandPoolVK::CreateCommandBuffer() { return {}; } + Lock lock(pool_mutex_); + if (!pool_) { + return {}; + } + auto const device = context->GetDevice(); vk::CommandBufferAllocateInfo info; info.setCommandPool(pool_.get()); @@ -97,17 +106,39 @@ vk::UniqueCommandBuffer CommandPoolVK::CreateCommandBuffer() { } void CommandPoolVK::CollectCommandBuffer(vk::UniqueCommandBuffer&& buffer) { + Lock lock(pool_mutex_); if (!pool_) { - // If the command pool has already been destroyed, just free the buffer. + // If the command pool has already been destroyed, then its buffers have + // already been freed. + buffer.release(); return; } collected_buffers_.push_back(std::move(buffer)); } +void CommandPoolVK::Destroy() { + Lock lock(pool_mutex_); + pool_.reset(); + + // When the command pool is destroyed, all of its command buffers are freed. + // Handles allocated from that pool are now invalid and must be discarded. + for (auto& buffer : collected_buffers_) { + buffer.release(); + } + collected_buffers_.clear(); +} + // Associates a resource with a thread and context. using CommandPoolMap = std::unordered_map>; -FML_THREAD_LOCAL fml::ThreadLocalUniquePtr resources_; +FML_THREAD_LOCAL fml::ThreadLocalUniquePtr tls_command_pool_map; + +// Map each context to a list of all thread-local command pools associated +// with that context. +static Mutex g_all_pools_map_mutex; +static std::unordered_map>> + g_all_pools_map IPLR_GUARDED_BY(g_all_pools_map_mutex); // TODO(matanlurey): Return a status_or<> instead of nullptr when we have one. std::shared_ptr CommandPoolRecyclerVK::Get() { @@ -117,14 +148,13 @@ std::shared_ptr CommandPoolRecyclerVK::Get() { } // If there is a resource in used for this thread and context, return it. - auto resources = resources_.get(); - if (!resources) { - resources = new CommandPoolMap(); - resources_.reset(resources); + if (!tls_command_pool_map.get()) { + tls_command_pool_map.reset(new CommandPoolMap()); } + CommandPoolMap& pool_map = *tls_command_pool_map.get(); auto const hash = strong_context->GetHash(); - auto const it = resources->find(hash); - if (it != resources->end()) { + auto const it = pool_map.find(hash); + if (it != pool_map.end()) { return it->second; } @@ -136,7 +166,13 @@ std::shared_ptr CommandPoolRecyclerVK::Get() { auto const resource = std::make_shared(std::move(*pool), context_); - resources->emplace(hash, resource); + pool_map.emplace(hash, resource); + + { + Lock all_pools_lock(g_all_pools_map_mutex); + g_all_pools_map[strong_context.get()].push_back(resource); + } + return resource; } @@ -199,11 +235,34 @@ CommandPoolRecyclerVK::~CommandPoolRecyclerVK() { } void CommandPoolRecyclerVK::Dispose() { - auto const resources = resources_.get(); - if (!resources) { - return; + CommandPoolMap* pool_map = tls_command_pool_map.get(); + if (pool_map) { + pool_map->clear(); + } +} + +void CommandPoolRecyclerVK::DestroyThreadLocalPools(const ContextVK* context) { + // Delete the context's entry in this thread's command pool map. + if (tls_command_pool_map.get()) { + tls_command_pool_map.get()->erase(context->GetHash()); + } + + // Destroy all other thread-local CommandPoolVK instances associated with + // this context. + Lock all_pools_lock(g_all_pools_map_mutex); + auto found = g_all_pools_map.find(context); + if (found != g_all_pools_map.end()) { + for (auto& weak_pool : found->second) { + auto pool = weak_pool.lock(); + if (!pool) { + continue; + } + // Delete all objects held by this pool. The destroyed pool will still + // remain in its thread's TLS map until that thread exits. + pool->Destroy(); + } + g_all_pools_map.erase(found); } - resources->clear(); } } // namespace impeller diff --git a/impeller/renderer/backend/vulkan/command_pool_vk.h b/impeller/renderer/backend/vulkan/command_pool_vk.h index de7aa8b78ffcc..d9ea54bf3643b 100644 --- a/impeller/renderer/backend/vulkan/command_pool_vk.h +++ b/impeller/renderer/backend/vulkan/command_pool_vk.h @@ -29,7 +29,6 @@ class CommandPoolRecyclerVK; /// @see |CommandPoolRecyclerVK| class CommandPoolVK final { public: - CommandPoolVK(CommandPoolVK&&) = default; ~CommandPoolVK(); /// @brief Creates a resource that manages the life of a command pool. @@ -54,14 +53,19 @@ class CommandPoolVK final { /// @see |GarbageCollectBuffersIfAble| void CollectCommandBuffer(vk::UniqueCommandBuffer&& buffer); + /// @brief Delete all Vulkan objects in this command pool. + void Destroy(); + private: FML_DISALLOW_COPY_AND_ASSIGN(CommandPoolVK); - vk::UniqueCommandPool pool_; + Mutex pool_mutex_; + vk::UniqueCommandPool pool_ IPLR_GUARDED_BY(pool_mutex_); std::weak_ptr& context_; // Used to retain a reference on these until the pool is reset. - std::vector collected_buffers_; + std::vector collected_buffers_ + IPLR_GUARDED_BY(pool_mutex_); }; //------------------------------------------------------------------------------ @@ -93,6 +97,12 @@ class CommandPoolRecyclerVK final public: ~CommandPoolRecyclerVK(); + /// @brief Clean up resources held by all per-thread command pools + /// associated with the given context. + /// + /// @param[in] context The context. + static void DestroyThreadLocalPools(const ContextVK* context); + /// @brief Creates a recycler for the given |ContextVK|. /// /// @param[in] context The context to create the recycler for. diff --git a/impeller/renderer/backend/vulkan/context_vk.cc b/impeller/renderer/backend/vulkan/context_vk.cc index 0a7b0db2bfabd..5a8b0e98c85b2 100644 --- a/impeller/renderer/backend/vulkan/context_vk.cc +++ b/impeller/renderer/backend/vulkan/context_vk.cc @@ -113,9 +113,7 @@ ContextVK::~ContextVK() { if (device_holder_ && device_holder_->device) { [[maybe_unused]] auto result = device_holder_->device->waitIdle(); } - if (command_pool_recycler_) { - command_pool_recycler_.get()->Dispose(); - } + CommandPoolRecyclerVK::DestroyThreadLocalPools(this); } Context::BackendType ContextVK::GetBackendType() const { diff --git a/impeller/renderer/backend/vulkan/context_vk_unittests.cc b/impeller/renderer/backend/vulkan/context_vk_unittests.cc index e658d94911865..25128aa347966 100644 --- a/impeller/renderer/backend/vulkan/context_vk_unittests.cc +++ b/impeller/renderer/backend/vulkan/context_vk_unittests.cc @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "flutter/fml/synchronization/waitable_event.h" #include "flutter/testing/testing.h" // IWYU pragma: keep #include "impeller/renderer/backend/vulkan/command_pool_vk.h" #include "impeller/renderer/backend/vulkan/context_vk.h" @@ -25,6 +26,37 @@ TEST(ContextVKTest, DeletesCommandPools) { ASSERT_FALSE(weak_context.lock()); } +TEST(ContextVKTest, DeletesCommandPoolsOnAllThreads) { + std::weak_ptr weak_context; + std::weak_ptr weak_pool_main; + + std::shared_ptr context = MockVulkanContextBuilder().Build(); + weak_pool_main = context->GetCommandPoolRecycler()->Get(); + weak_context = context; + ASSERT_TRUE(weak_pool_main.lock()); + ASSERT_TRUE(weak_context.lock()); + + // Start a second thread that obtains a command pool. + fml::AutoResetWaitableEvent latch1, latch2; + std::weak_ptr weak_pool_thread; + std::thread thread([&]() { + weak_pool_thread = context->GetCommandPoolRecycler()->Get(); + latch1.Signal(); + latch2.Wait(); + }); + + // Delete the ContextVK on the main thread. + latch1.Wait(); + context.reset(); + ASSERT_FALSE(weak_pool_main.lock()); + ASSERT_FALSE(weak_context.lock()); + + // Stop the second thread and check that its command pool has been deleted. + latch2.Signal(); + thread.join(); + ASSERT_FALSE(weak_pool_thread.lock()); +} + TEST(ContextVKTest, DeletePipelineAfterContext) { std::shared_ptr> pipeline; std::shared_ptr> functions; From 533ff7724cb92971c546c8188b74dd2d3a1b554a Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 27 Sep 2023 16:53:28 -0400 Subject: [PATCH 330/859] Roll Skia from 952e8dd66560 to b048b468d641 (1 revision) (#46332) https://skia.googlesource.com/skia.git/+log/952e8dd66560..b048b468d641 2023-09-27 kjlubick@google.com Don't build fontations gm for WASM If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 68723403164c7..157dd4060163f 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '952e8dd665608a748b28d267499042b965fca4e6', + 'skia_revision': 'b048b468d641e92a52954137ba503f2cde9c411d', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 2e7c82562e5f81c358f91e21b62af5d2aacbd255 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 27 Sep 2023 17:52:17 -0400 Subject: [PATCH 331/859] Roll Fuchsia Mac SDK from jQHACBU4Fi2wMElkm... to U334SygIkffMJVmdu... (#46333) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 157dd4060163f..3bd2e618b23a2 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'jQHACBU4Fi2wMElkmHMAJdhp581b6LoYt9OthqJAFo4C' + 'version': 'U334SygIkffMJVmduVhvR7c4L4qnQHz_9dPjcYKDwEsC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From b5b138f9ba10b148aba8b179cb1ad2ca15bdb974 Mon Sep 17 00:00:00 2001 From: chunhtai <47866232+chunhtai@users.noreply.github.com> Date: Wed, 27 Sep 2023 15:59:08 -0700 Subject: [PATCH 332/859] =?UTF-8?q?Revert=20"[Impeller]=20Fixes=20stroke?= =?UTF-8?q?=20path=20geometry=20that=20can=20draw=20outside=20o=E2=80=A6?= =?UTF-8?q?=20(#46334)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …f path if the path ends at sharp turn. (#45252)" This reverts commit 343dfe85c7e810574bd80c71ff774947d495d0b4. introduced a regression https://github.com/flutter/flutter/issues/135225 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- impeller/aiks/aiks_unittests.cc | 47 ------------------ impeller/core/formats.h | 22 --------- .../entity/geometry/stroke_path_geometry.cc | 49 ++++--------------- impeller/geometry/path.cc | 22 ++------- impeller/geometry/path.h | 15 ------ impeller/geometry/path_component.h | 9 ---- 6 files changed, 13 insertions(+), 151 deletions(-) diff --git a/impeller/aiks/aiks_unittests.cc b/impeller/aiks/aiks_unittests.cc index 7cf8b69fbc51d..4950aae8496fc 100644 --- a/impeller/aiks/aiks_unittests.cc +++ b/impeller/aiks/aiks_unittests.cc @@ -1205,37 +1205,6 @@ TEST_P(AiksTest, CanRenderRoundedRectWithNonUniformRadii) { ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); } -TEST_P(AiksTest, CanRenderStrokePathThatEndsAtSharpTurn) { - Canvas canvas; - - Paint paint; - paint.color = Color::Red(); - paint.style = Paint::Style::kStroke; - paint.stroke_width = 200; - - Rect rect = {100, 100, 200, 200}; - PathBuilder builder; - builder.AddArc(rect, Degrees(0), Degrees(90), false); - - canvas.DrawPath(builder.TakePath(), paint); - ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); -} - -TEST_P(AiksTest, CanRenderStrokePathWithCubicLine) { - Canvas canvas; - - Paint paint; - paint.color = Color::Red(); - paint.style = Paint::Style::kStroke; - paint.stroke_width = 20; - - PathBuilder builder; - builder.AddCubicCurve({0, 200}, {50, 400}, {350, 0}, {400, 200}); - - canvas.DrawPath(builder.TakePath(), paint); - ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); -} - TEST_P(AiksTest, CanRenderDifferencePaths) { Canvas canvas; @@ -2047,22 +2016,6 @@ TEST_P(AiksTest, DrawRectStrokesRenderCorrectly) { ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); } -TEST_P(AiksTest, DrawRectStrokesWithBevelJoinRenderCorrectly) { - Canvas canvas; - Paint paint; - paint.color = Color::Red(); - paint.style = Paint::Style::kStroke; - paint.stroke_width = 10; - paint.stroke_join = Join::kBevel; - - canvas.Translate({100, 100}); - canvas.DrawPath( - PathBuilder{}.AddRect(Rect::MakeSize(Size{100, 100})).TakePath(), - {paint}); - - ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); -} - TEST_P(AiksTest, SaveLayerDrawsBehindSubsequentEntities) { // Compare with https://fiddle.skia.org/c/9e03de8567ffb49e7e83f53b64bcf636 Canvas canvas; diff --git a/impeller/core/formats.h b/impeller/core/formats.h index 0e8d0d7d86a43..6cc151e81939c 100644 --- a/impeller/core/formats.h +++ b/impeller/core/formats.h @@ -325,33 +325,11 @@ enum class IndexType { kNone, }; -/// Decides how backend draws pixels based on input vertices. enum class PrimitiveType { - /// Draws a triage for each separate set of three vertices. - /// - /// Vertices [A, B, C, D, E, F] will produce triages - /// [ABC, DEF]. kTriangle, - - /// Draws a triage for every adjacent three vertices. - /// - /// Vertices [A, B, C, D, E, F] will produce triages - /// [ABC, BCD, CDE, DEF]. kTriangleStrip, - - /// Draws a line for each separate set of two vertices. - /// - /// Vertices [A, B, C] will produce discontinued line - /// [AB, BC]. kLine, - - /// Draws a continuous line that connect every input vertices - /// - /// Vertices [A, B, C] will produce one continuous line - /// [ABC]. kLineStrip, - - /// Draws a point at each input vertex. kPoint, // Triangle fans are implementation dependent and need extra extensions // checks. Hence, they are not supported here. diff --git a/impeller/entity/geometry/stroke_path_geometry.cc b/impeller/entity/geometry/stroke_path_geometry.cc index 9b5ab6877cd99..43648a548e29e 100644 --- a/impeller/entity/geometry/stroke_path_geometry.cc +++ b/impeller/entity/geometry/stroke_path_geometry.cc @@ -253,7 +253,6 @@ StrokePathGeometry::CreateSolidStrokeVertices( for (size_t contour_i = 0; contour_i < polyline.contours.size(); contour_i++) { auto contour = polyline.contours[contour_i]; - size_t contour_component_i = 0; size_t contour_start_point_i, contour_end_point_i; std::tie(contour_start_point_i, contour_end_point_i) = polyline.GetContourPointBounds(contour_i); @@ -309,55 +308,27 @@ StrokePathGeometry::CreateSolidStrokeVertices( // Generate contour geometry. for (size_t point_i = contour_start_point_i + 1; point_i < contour_end_point_i; point_i++) { - if ((contour_component_i + 1 >= contour.components.size()) && - contour.components[contour_component_i + 1].component_start_index <= - point_i) { - // The point_i has entered the next component in this contour. - contour_component_i += 1; - } // Generate line rect. vtx.position = polyline.points[point_i - 1] + offset; vtx_builder.AppendVertex(vtx); vtx.position = polyline.points[point_i - 1] - offset; vtx_builder.AppendVertex(vtx); + vtx.position = polyline.points[point_i] + offset; + vtx_builder.AppendVertex(vtx); + vtx.position = polyline.points[point_i] - offset; + vtx_builder.AppendVertex(vtx); - auto is_end_of_contour = point_i == contour_end_point_i - 1; - - if (!contour.components[contour_component_i].is_curve) { - // For line components, two additional points need to be appended prior - // to appending a join connecting the next component. - vtx.position = polyline.points[point_i] + offset; - vtx_builder.AppendVertex(vtx); - vtx.position = polyline.points[point_i] - offset; - vtx_builder.AppendVertex(vtx); + if (point_i < contour_end_point_i - 1) { + compute_offset(point_i + 1); - if (!is_end_of_contour) { - compute_offset(point_i + 1); - // Generate join from the current line to the next line. - join_proc(vtx_builder, polyline.points[point_i], previous_offset, - offset, scaled_miter_limit, scale); - } - } else { - // For curve components, the polyline is detailed enough such that - // it can avoid worrying about joins altogether. - if (!is_end_of_contour) { - compute_offset(point_i + 1); - } else { - // If this is a curve and is the end of the contour, two end points - // need to be drawn with the contour end_direction. - auto end_offset = - Vector2(-contour.end_direction.y, contour.end_direction.x) * - stroke_width * 0.5; - vtx.position = polyline.points[contour_end_point_i - 1] + end_offset; - vtx_builder.AppendVertex(vtx); - vtx.position = polyline.points[contour_end_point_i - 1] - end_offset; - vtx_builder.AppendVertex(vtx); - } + // Generate join from the current line to the next line. + join_proc(vtx_builder, polyline.points[point_i], previous_offset, + offset, scaled_miter_limit, scale); } } // Generate end cap or join. - if (!contour.is_closed) { + if (!polyline.contours[contour_i].is_closed) { auto cap_offset = Vector2(-contour.end_direction.y, contour.end_direction.x) * stroke_width * 0.5; // Clockwise normal diff --git a/impeller/geometry/path.cc b/impeller/geometry/path.cc index 863b220455382..ff2c39d6ecaf0 100644 --- a/impeller/geometry/path.cc +++ b/impeller/geometry/path.cc @@ -324,10 +324,9 @@ Path::Polyline Path::CreatePolyline(Scalar scale) const { return Vector2(0, -1); }; - std::vector components; std::optional previous_path_component_index; auto end_contour = [&polyline, &previous_path_component_index, - &get_path_component, &components]() { + &get_path_component]() { // Whenever a contour has ended, extract the exact end direction from the // last component. if (polyline.contours.empty()) { @@ -340,8 +339,6 @@ Path::Polyline Path::CreatePolyline(Scalar scale) const { auto& contour = polyline.contours.back(); contour.end_direction = Vector2(0, 1); - contour.components = components; - components.clear(); size_t previous_index = previous_path_component_index.value(); while (!std::holds_alternative( @@ -366,26 +363,14 @@ Path::Polyline Path::CreatePolyline(Scalar scale) const { const auto& component = components_[component_i]; switch (component.type) { case ComponentType::kLinear: - components.push_back({ - .component_start_index = polyline.points.size(), - .is_curve = false, - }); collect_points(linears_[component.index].CreatePolyline()); previous_path_component_index = component_i; break; case ComponentType::kQuadratic: - components.push_back({ - .component_start_index = polyline.points.size(), - .is_curve = true, - }); collect_points(quads_[component.index].CreatePolyline(scale)); previous_path_component_index = component_i; break; case ComponentType::kCubic: - components.push_back({ - .component_start_index = polyline.points.size(), - .is_curve = true, - }); collect_points(cubics_[component.index].CreatePolyline(scale)); previous_path_component_index = component_i; break; @@ -401,14 +386,13 @@ Path::Polyline Path::CreatePolyline(Scalar scale) const { const auto& contour = contours_[component.index]; polyline.contours.push_back({.start_index = polyline.points.size(), .is_closed = contour.is_closed, - .start_direction = start_direction, - .components = components}); + .start_direction = start_direction}); previous_contour_point = std::nullopt; collect_points({contour.destination}); break; } + end_contour(); } - end_contour(); return polyline; } diff --git a/impeller/geometry/path.h b/impeller/geometry/path.h index bbbb207793d5f..757c5c03d9548 100644 --- a/impeller/geometry/path.h +++ b/impeller/geometry/path.h @@ -61,17 +61,8 @@ class Path { }; struct PolylineContour { - struct Component { - size_t component_start_index; - /// Denotes whether this component is a curve. - /// - /// This is set to true when this component is generated from - /// QuadraticComponent or CubicPathComponent. - bool is_curve; - }; /// Index that denotes the first point of this contour. size_t start_index; - /// Denotes whether the last point of this contour is connected to the first /// point of this contour or not. bool is_closed; @@ -80,12 +71,6 @@ class Path { Vector2 start_direction; /// The direction of the contour's end cap. Vector2 end_direction; - - /// Distinct components in this contour. - /// - /// If this contour is generated from multiple path components, each - /// path component forms a component in this vector. - std::vector components; }; /// One or more contours represented as a series of points and indices in diff --git a/impeller/geometry/path_component.h b/impeller/geometry/path_component.h index a8b0d4fa9bd68..c2a808cf18d2a 100644 --- a/impeller/geometry/path_component.h +++ b/impeller/geometry/path_component.h @@ -47,13 +47,9 @@ struct LinearPathComponent { std::optional GetEndDirection() const; }; -// A component that represets a Quadratic Bézier curve. struct QuadraticPathComponent { - // Start point. Point p1; - // Control point. Point cp; - // End point. Point p2; QuadraticPathComponent() {} @@ -91,15 +87,10 @@ struct QuadraticPathComponent { std::optional GetEndDirection() const; }; -// A component that represets a Cubic Bézier curve. struct CubicPathComponent { - // Start point. Point p1; - // The first control point. Point cp1; - // The second control point. Point cp2; - // End point. Point p2; CubicPathComponent() {} From 91ccb7dd112a1737bb4ab12c2df997c979aa1c64 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Wed, 27 Sep 2023 17:02:04 -0700 Subject: [PATCH 333/859] =?UTF-8?q?Reland=20"Reverts=20"[ios]=20Fix=20app?= =?UTF-8?q?=20extension=20not=20able=20to=20find=20assets=20from=E2=80=A6?= =?UTF-8?q?=20(#46329)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Relands https://github.com/flutter/engine/pull/46283 The original PR had a bug where the relative assets path is reset after not being found in the `bundle`. It should not be reset unless it was not found inside the info.plist in `bundle` Fixes https://github.com/flutter/flutter/issues/124292 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- .../framework/Source/FlutterNSBundleUtils.mm | 23 +- .../Source/FlutterDartProjectTest.mm | 19 +- .../project.pbxproj | 372 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../FlutterAppExtensionTestHost/AppDelegate.h | 9 + .../FlutterAppExtensionTestHost/AppDelegate.m | 38 ++ .../AccentColor.colorset/Contents.json | 11 + .../AppIcon.appiconset/Contents.json | 13 + .../Assets.xcassets/Contents.json | 6 + .../Base.lproj/LaunchScreen.storyboard | 25 ++ .../Base.lproj/Main.storyboard | 24 ++ .../FlutterAppExtensionTestHost/Info.plist | 25 ++ .../SceneDelegate.h | 11 + .../SceneDelegate.m | 52 +++ .../ViewController.h | 9 + .../ViewController.m | 33 ++ .../FlutterAppExtensionTestHost/main.m | 15 + .../Scenarios/Info_Impeller.plist | 29 ++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/WorkspaceSettings.xcsettings | 5 + .../Scenarios.xcodeproj/project.pbxproj | 253 +++++++++++- .../Base.lproj/MainInterface.storyboard | 24 ++ .../ios/Scenarios/ScenariosShare/Info.plist | 18 + .../ScenariosShare/ShareViewController.h | 10 + .../ScenariosShare/ShareViewController.m | 31 ++ .../ScenariosUITests/AppExtensionTests.m | 58 +++ .../ScenariosUITests/GoldenTestManager.m | 1 + .../src/darwin_app_extension_scenario.dart | 44 +++ testing/scenario_app/lib/src/scenarios.dart | 2 + testing/scenario_app/run_ios_tests.sh | 4 +- 32 files changed, 1177 insertions(+), 17 deletions(-) create mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.pbxproj create mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/AppDelegate.h create mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/AppDelegate.m create mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/AccentColor.colorset/Contents.json create mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/Contents.json create mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Base.lproj/LaunchScreen.storyboard create mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Base.lproj/Main.storyboard create mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Info.plist create mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/SceneDelegate.h create mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/SceneDelegate.m create mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/ViewController.h create mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/ViewController.m create mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/main.m create mode 100644 testing/scenario_app/ios/FlutterAppExtensionTestHost/Scenarios/Info_Impeller.plist create mode 100644 testing/scenario_app/ios/Scenarios.xcworkspace/contents.xcworkspacedata create mode 100644 testing/scenario_app/ios/Scenarios.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 testing/scenario_app/ios/Scenarios.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings create mode 100644 testing/scenario_app/ios/Scenarios/ScenariosShare/Base.lproj/MainInterface.storyboard create mode 100644 testing/scenario_app/ios/Scenarios/ScenariosShare/Info.plist create mode 100644 testing/scenario_app/ios/Scenarios/ScenariosShare/ShareViewController.h create mode 100644 testing/scenario_app/ios/Scenarios/ScenariosShare/ShareViewController.m create mode 100644 testing/scenario_app/ios/Scenarios/ScenariosUITests/AppExtensionTests.m create mode 100644 testing/scenario_app/lib/src/darwin_app_extension_scenario.dart diff --git a/shell/platform/darwin/common/framework/Source/FlutterNSBundleUtils.mm b/shell/platform/darwin/common/framework/Source/FlutterNSBundleUtils.mm index 9582f94e266e1..c96b1a9af181e 100644 --- a/shell/platform/darwin/common/framework/Source/FlutterNSBundleUtils.mm +++ b/shell/platform/darwin/common/framework/Source/FlutterNSBundleUtils.mm @@ -9,6 +9,7 @@ FLUTTER_ASSERT_ARC const NSString* kDefaultAssetPath = @"Frameworks/App.framework/flutter_assets"; +static NSString* GetFlutterAssetsPathFromBundle(NSBundle* bundle, NSString* relativeAssetsPath); NSBundle* FLTFrameworkBundleInternal(NSString* flutterFrameworkBundleID, NSURL* searchURL) { NSDirectoryEnumerator* frameworkEnumerator = [NSFileManager.defaultManager @@ -29,7 +30,7 @@ } NSBundle* FLTGetApplicationBundle() { - NSBundle* mainBundle = [NSBundle mainBundle]; + NSBundle* mainBundle = NSBundle.mainBundle; // App extension bundle is in .app/PlugIns/Extension.appex. if ([mainBundle.bundleURL.pathExtension isEqualToString:@"appex"]) { // Up two levels. @@ -48,7 +49,7 @@ flutterFrameworkBundle = [NSBundle bundleWithIdentifier:flutterFrameworkBundleID]; } if (flutterFrameworkBundle == nil) { - flutterFrameworkBundle = [NSBundle mainBundle]; + flutterFrameworkBundle = NSBundle.mainBundle; } return flutterFrameworkBundle; } @@ -58,13 +59,23 @@ } NSString* FLTAssetsPathFromBundle(NSBundle* bundle) { - NSString* flutterAssetsPath = FLTAssetPath(bundle); + NSString* relativeAssetsPath = FLTAssetPath(bundle); + NSString* flutterAssetsPath = GetFlutterAssetsPathFromBundle(bundle, relativeAssetsPath); + if (flutterAssetsPath.length == 0) { + flutterAssetsPath = GetFlutterAssetsPathFromBundle(NSBundle.mainBundle, relativeAssetsPath); + } + return flutterAssetsPath; +} + +static NSString* GetFlutterAssetsPathFromBundle(NSBundle* bundle, NSString* relativeAssetsPath) { // Use the raw path solution so that asset path can be returned from unloaded bundles. // See https://github.com/flutter/engine/pull/46073 - NSString* assetsPath = [bundle pathForResource:flutterAssetsPath ofType:@""]; - + NSString* assetsPath = [bundle pathForResource:relativeAssetsPath ofType:nil]; if (assetsPath.length == 0) { - assetsPath = [[NSBundle mainBundle] pathForResource:flutterAssetsPath ofType:@""]; + // In app extension, using full relative path (kDefaultAssetPath) + // returns nil when the app bundle is not loaded. Try to use + // the sub folder name, which can successfully return a valid path. + assetsPath = [bundle pathForResource:@"flutter_assets" ofType:nil]; } return assetsPath; } diff --git a/shell/platform/darwin/ios/framework/Source/FlutterDartProjectTest.mm b/shell/platform/darwin/ios/framework/Source/FlutterDartProjectTest.mm index aecab91f0051c..7de95d4771ae8 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterDartProjectTest.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterDartProjectTest.mm @@ -93,21 +93,34 @@ - (void)testFLTAssetsURLFromBundle { id mockBundle = OCMClassMock([NSBundle class]); OCMStub([mockBundle objectForInfoDictionaryKey:@"FLTAssetsPath"]).andReturn(@"foo/assets"); NSString* resultAssetsPath = @"path/to/foo/assets"; - OCMStub([mockBundle pathForResource:@"foo/assets" ofType:@""]).andReturn(resultAssetsPath); + OCMStub([mockBundle pathForResource:@"foo/assets" ofType:nil]).andReturn(resultAssetsPath); NSString* path = FLTAssetsPathFromBundle(mockBundle); XCTAssertEqualObjects(path, @"path/to/foo/assets"); } + { + // Found asset path in info.plist, is not overriden by main bundle + id mockBundle = OCMClassMock([NSBundle class]); + id mockMainBundle = OCMPartialMock(NSBundle.mainBundle); + OCMStub([mockBundle objectForInfoDictionaryKey:@"FLTAssetsPath"]).andReturn(@"foo/assets"); + OCMStub([mockMainBundle objectForInfoDictionaryKey:@"FLTAssetsPath"]).andReturn(nil); + NSString* resultAssetsPath = @"path/to/foo/assets"; + OCMStub([mockBundle pathForResource:@"foo/assets" ofType:nil]).andReturn(resultAssetsPath); + NSString* path = FLTAssetsPathFromBundle(mockBundle); + XCTAssertEqualObjects(path, @"path/to/foo/assets"); + [mockMainBundle stopMocking]; + } { // No asset path in info.plist, defaults to main bundle id mockBundle = OCMClassMock([NSBundle class]); id mockMainBundle = OCMPartialMock([NSBundle mainBundle]); NSString* resultAssetsPath = @"path/to/foo/assets"; - OCMStub([mockBundle pathForResource:@"Frameworks/App.framework/flutter_assets" ofType:@""]) + OCMStub([mockBundle pathForResource:@"Frameworks/App.framework/flutter_assets" ofType:nil]) .andReturn(nil); - OCMStub([mockMainBundle pathForResource:@"Frameworks/App.framework/flutter_assets" ofType:@""]) + OCMStub([mockMainBundle pathForResource:@"Frameworks/App.framework/flutter_assets" ofType:nil]) .andReturn(resultAssetsPath); NSString* path = FLTAssetsPathFromBundle(mockBundle); XCTAssertEqualObjects(path, @"path/to/foo/assets"); + [mockMainBundle stopMocking]; } } diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.pbxproj b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.pbxproj new file mode 100644 index 0000000000000..b67c72aabae64 --- /dev/null +++ b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.pbxproj @@ -0,0 +1,372 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + 686382C62ABE173000E27AAD /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 686382C52ABE173000E27AAD /* AppDelegate.m */; }; + 686382C92ABE173000E27AAD /* SceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 686382C82ABE173000E27AAD /* SceneDelegate.m */; }; + 686382CC2ABE173000E27AAD /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 686382CB2ABE173000E27AAD /* ViewController.m */; }; + 686382CF2ABE173000E27AAD /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 686382CD2ABE173000E27AAD /* Main.storyboard */; }; + 686382D12ABE173000E27AAD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 686382D02ABE173000E27AAD /* Assets.xcassets */; }; + 686382D42ABE173000E27AAD /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 686382D22ABE173000E27AAD /* LaunchScreen.storyboard */; }; + 686382D72ABE173000E27AAD /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 686382D62ABE173000E27AAD /* main.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 686382C12ABE172F00E27AAD /* FlutterAppExtensionTestHost.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FlutterAppExtensionTestHost.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 686382C42ABE173000E27AAD /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 686382C52ABE173000E27AAD /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 686382C72ABE173000E27AAD /* SceneDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SceneDelegate.h; sourceTree = ""; }; + 686382C82ABE173000E27AAD /* SceneDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SceneDelegate.m; sourceTree = ""; }; + 686382CA2ABE173000E27AAD /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + 686382CB2ABE173000E27AAD /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + 686382CE2ABE173000E27AAD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 686382D02ABE173000E27AAD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 686382D32ABE173000E27AAD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 686382D52ABE173000E27AAD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 686382D62ABE173000E27AAD /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 686382BE2ABE172F00E27AAD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 686382B82ABE172F00E27AAD = { + isa = PBXGroup; + children = ( + 686382C32ABE173000E27AAD /* FlutterAppExtensionTestHost */, + 686382C22ABE172F00E27AAD /* Products */, + ); + sourceTree = ""; + }; + 686382C22ABE172F00E27AAD /* Products */ = { + isa = PBXGroup; + children = ( + 686382C12ABE172F00E27AAD /* FlutterAppExtensionTestHost.app */, + ); + name = Products; + sourceTree = ""; + }; + 686382C32ABE173000E27AAD /* FlutterAppExtensionTestHost */ = { + isa = PBXGroup; + children = ( + 686382C42ABE173000E27AAD /* AppDelegate.h */, + 686382C52ABE173000E27AAD /* AppDelegate.m */, + 686382C72ABE173000E27AAD /* SceneDelegate.h */, + 686382C82ABE173000E27AAD /* SceneDelegate.m */, + 686382CA2ABE173000E27AAD /* ViewController.h */, + 686382CB2ABE173000E27AAD /* ViewController.m */, + 686382CD2ABE173000E27AAD /* Main.storyboard */, + 686382D02ABE173000E27AAD /* Assets.xcassets */, + 686382D22ABE173000E27AAD /* LaunchScreen.storyboard */, + 686382D52ABE173000E27AAD /* Info.plist */, + 686382D62ABE173000E27AAD /* main.m */, + ); + path = FlutterAppExtensionTestHost; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 686382C02ABE172F00E27AAD /* FlutterAppExtensionTestHost */ = { + isa = PBXNativeTarget; + buildConfigurationList = 686382DA2ABE173000E27AAD /* Build configuration list for PBXNativeTarget "FlutterAppExtensionTestHost" */; + buildPhases = ( + 686382BD2ABE172F00E27AAD /* Sources */, + 686382BE2ABE172F00E27AAD /* Frameworks */, + 686382BF2ABE172F00E27AAD /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = FlutterAppExtensionTestHost; + productName = FlutterAppExtensionTestHost; + productReference = 686382C12ABE172F00E27AAD /* FlutterAppExtensionTestHost.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 686382B92ABE172F00E27AAD /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastUpgradeCheck = 1500; + TargetAttributes = { + 686382C02ABE172F00E27AAD = { + CreatedOnToolsVersion = 15.0; + }; + }; + }; + buildConfigurationList = 686382BC2ABE172F00E27AAD /* Build configuration list for PBXProject "FlutterAppExtensionTestHost" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 686382B82ABE172F00E27AAD; + productRefGroup = 686382C22ABE172F00E27AAD /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 686382C02ABE172F00E27AAD /* FlutterAppExtensionTestHost */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 686382BF2ABE172F00E27AAD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 686382D42ABE173000E27AAD /* LaunchScreen.storyboard in Resources */, + 686382D12ABE173000E27AAD /* Assets.xcassets in Resources */, + 686382CF2ABE173000E27AAD /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 686382BD2ABE172F00E27AAD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 686382CC2ABE173000E27AAD /* ViewController.m in Sources */, + 686382C62ABE173000E27AAD /* AppDelegate.m in Sources */, + 686382D72ABE173000E27AAD /* main.m in Sources */, + 686382C92ABE173000E27AAD /* SceneDelegate.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 686382CD2ABE173000E27AAD /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 686382CE2ABE173000E27AAD /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 686382D22ABE173000E27AAD /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 686382D32ABE173000E27AAD /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 686382D82ABE173000E27AAD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 686382D92ABE173000E27AAD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 686382DB2ABE173000E27AAD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = FlutterAppExtensionTestHost/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 16.2; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.FlutterAppExtensionTestHost; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 686382DC2ABE173000E27AAD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = FlutterAppExtensionTestHost/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 16.2; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.FlutterAppExtensionTestHost; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 686382BC2ABE172F00E27AAD /* Build configuration list for PBXProject "FlutterAppExtensionTestHost" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 686382D82ABE173000E27AAD /* Debug */, + 686382D92ABE173000E27AAD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 686382DA2ABE173000E27AAD /* Build configuration list for PBXNativeTarget "FlutterAppExtensionTestHost" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 686382DB2ABE173000E27AAD /* Debug */, + 686382DC2ABE173000E27AAD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 686382B92ABE172F00E27AAD /* Project object */; +} diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000000..919434a6254f0 --- /dev/null +++ b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000000..18d981003d68d --- /dev/null +++ b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/AppDelegate.h b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/AppDelegate.h new file mode 100644 index 0000000000000..99c576ec95059 --- /dev/null +++ b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/AppDelegate.h @@ -0,0 +1,9 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import + +@interface AppDelegate : UIResponder + +@end diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/AppDelegate.m b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/AppDelegate.m new file mode 100644 index 0000000000000..1beee74b03e03 --- /dev/null +++ b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/AppDelegate.m @@ -0,0 +1,38 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import "AppDelegate.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + +- (BOOL)application:(UIApplication*)application + didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { + // Override point for customization after application launch. + return YES; +} + +#pragma mark - UISceneSession lifecycle + +- (UISceneConfiguration*)application:(UIApplication*)application + configurationForConnectingSceneSession:(UISceneSession*)connectingSceneSession + options:(UISceneConnectionOptions*)options { + // Called when a new scene session is being created. + // Use this method to select a configuration to create the new scene with. + return [[UISceneConfiguration alloc] initWithName:@"Default Configuration" + sessionRole:connectingSceneSession.role]; +} + +- (void)application:(UIApplication*)application + didDiscardSceneSessions:(NSSet*)sceneSessions { + // Called when the user discards a scene session. + // If any sessions were discarded while the application was not running, this will be called + // shortly after application:didFinishLaunchingWithOptions. Use this method to release any + // resources that were specific to the discarded scenes, as they will not return. +} + +@end diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/AccentColor.colorset/Contents.json b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000000000..eb87897008164 --- /dev/null +++ b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/AppIcon.appiconset/Contents.json b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000000..13613e3ee1a93 --- /dev/null +++ b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/Contents.json b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/Contents.json new file mode 100644 index 0000000000000..73c00596a7fca --- /dev/null +++ b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Base.lproj/LaunchScreen.storyboard b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000000000..865e9329f3767 --- /dev/null +++ b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Base.lproj/Main.storyboard b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Base.lproj/Main.storyboard new file mode 100644 index 0000000000000..808a21ce779ba --- /dev/null +++ b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Info.plist b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Info.plist new file mode 100644 index 0000000000000..81ed29b76cfbe --- /dev/null +++ b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/Info.plist @@ -0,0 +1,25 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + SceneDelegate + UISceneStoryboardFile + Main + + + + + + diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/SceneDelegate.h b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/SceneDelegate.h new file mode 100644 index 0000000000000..6adc5d3a2cd7f --- /dev/null +++ b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/SceneDelegate.h @@ -0,0 +1,11 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import + +@interface SceneDelegate : UIResponder + +@property(strong, nonatomic) UIWindow* window; + +@end diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/SceneDelegate.m b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/SceneDelegate.m new file mode 100644 index 0000000000000..1271efb7faa5f --- /dev/null +++ b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/SceneDelegate.m @@ -0,0 +1,52 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import "SceneDelegate.h" + +@interface SceneDelegate () + +@end + +@implementation SceneDelegate + +- (void)scene:(UIScene*)scene + willConnectToSession:(UISceneSession*)session + options:(UISceneConnectionOptions*)connectionOptions { + // Use this method to optionally configure and attach the UIWindow `window` to the provided + // UIWindowScene `scene`. If using a storyboard, the `window` property will automatically be + // initialized and attached to the scene. This delegate does not imply the connecting scene or + // session are new (see `application:configurationForConnectingSceneSession` instead). +} + +- (void)sceneDidDisconnect:(UIScene*)scene { + // Called as the scene is being released by the system. + // This occurs shortly after the scene enters the background, or when its session is discarded. + // Release any resources associated with this scene that can be re-created the next time the scene + // connects. The scene may re-connect later, as its session was not necessarily discarded (see + // `application:didDiscardSceneSessions` instead). +} + +- (void)sceneDidBecomeActive:(UIScene*)scene { + // Called when the scene has moved from an inactive state to an active state. + // Use this method to restart any tasks that were paused (or not yet started) when the scene was + // inactive. +} + +- (void)sceneWillResignActive:(UIScene*)scene { + // Called when the scene will move from an active state to an inactive state. + // This may occur due to temporary interruptions (ex. an incoming phone call). +} + +- (void)sceneWillEnterForeground:(UIScene*)scene { + // Called as the scene transitions from the background to the foreground. + // Use this method to undo the changes made on entering the background. +} + +- (void)sceneDidEnterBackground:(UIScene*)scene { + // Called as the scene transitions from the foreground to the background. + // Use this method to save data, release shared resources, and store enough scene-specific state + // information to restore the scene back to its current state. +} + +@end diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/ViewController.h b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/ViewController.h new file mode 100644 index 0000000000000..4f235259bfecc --- /dev/null +++ b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/ViewController.h @@ -0,0 +1,9 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import + +@interface ViewController : UIViewController + +@end diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/ViewController.m b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/ViewController.m new file mode 100644 index 0000000000000..b725cc412618f --- /dev/null +++ b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/ViewController.m @@ -0,0 +1,33 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import "ViewController.h" + +@interface ViewController () + +@end + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + UIButton* openShare = + [UIButton systemButtonWithPrimaryAction:[UIAction actionWithHandler:^( + __kindof UIAction* _Nonnull action) { + UIActivityViewController* activityVC = + [[UIActivityViewController alloc] initWithActivityItems:@[ @"text to share" ] + applicationActivities:nil]; + activityVC.excludedActivityTypes = @[ + UIActivityTypePrint, UIActivityTypeCopyToPasteboard, + UIActivityTypeAssignToContact, UIActivityTypeSaveToCameraRoll + ]; // Exclude whichever aren't relevant + [self presentViewController:activityVC animated:YES completion:nil]; + }]]; + openShare.backgroundColor = [UIColor systemPinkColor]; + [openShare setTitle:@"Open Share" forState:UIControlStateNormal]; + [self.view addSubview:openShare]; + openShare.frame = CGRectMake(0, 0, 200, 200); +} + +@end diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/main.m b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/main.m new file mode 100644 index 0000000000000..f98f92491e8a0 --- /dev/null +++ b/testing/scenario_app/ios/FlutterAppExtensionTestHost/FlutterAppExtensionTestHost/main.m @@ -0,0 +1,15 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import +#import "AppDelegate.h" + +int main(int argc, char* argv[]) { + NSString* appDelegateClassName; + @autoreleasepool { + // Setup code that might create autoreleased objects goes here. + appDelegateClassName = NSStringFromClass([AppDelegate class]); + } + return UIApplicationMain(argc, argv, nil, appDelegateClassName); +} diff --git a/testing/scenario_app/ios/FlutterAppExtensionTestHost/Scenarios/Info_Impeller.plist b/testing/scenario_app/ios/FlutterAppExtensionTestHost/Scenarios/Info_Impeller.plist new file mode 100644 index 0000000000000..2ad0401d1c878 --- /dev/null +++ b/testing/scenario_app/ios/FlutterAppExtensionTestHost/Scenarios/Info_Impeller.plist @@ -0,0 +1,29 @@ + + + + + + + FLTEnableImpeller + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + SceneDelegate + UISceneStoryboardFile + Main + + + + + + diff --git a/testing/scenario_app/ios/Scenarios.xcworkspace/contents.xcworkspacedata b/testing/scenario_app/ios/Scenarios.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000000..00ca3de9d76c0 --- /dev/null +++ b/testing/scenario_app/ios/Scenarios.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/testing/scenario_app/ios/Scenarios.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/testing/scenario_app/ios/Scenarios.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000000..18d981003d68d --- /dev/null +++ b/testing/scenario_app/ios/Scenarios.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/testing/scenario_app/ios/Scenarios.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/testing/scenario_app/ios/Scenarios.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000000000..0c67376ebacb4 --- /dev/null +++ b/testing/scenario_app/ios/Scenarios.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,5 @@ + + + + + diff --git a/testing/scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj b/testing/scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj index ec69054a447da..7402e6958cd9a 100644 --- a/testing/scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj +++ b/testing/scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 52; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -62,6 +62,12 @@ 6860CE252A01B2FF00B68EC5 /* golden_two_platform_view_clip_rrect_iPhone SE (3rd generation)_16.2_simulator.png in Resources */ = {isa = PBXBuildFile; fileRef = 6860CE222A01B2FF00B68EC5 /* golden_two_platform_view_clip_rrect_iPhone SE (3rd generation)_16.2_simulator.png */; }; 6860CE262A01B2FF00B68EC5 /* golden_two_platform_view_clip_rect_iPhone SE (3rd generation)_16.2_simulator.png in Resources */ = {isa = PBXBuildFile; fileRef = 6860CE232A01B2FF00B68EC5 /* golden_two_platform_view_clip_rect_iPhone SE (3rd generation)_16.2_simulator.png */; }; 6860CE272A01B2FF00B68EC5 /* golden_two_platform_view_clip_path_iPhone SE (3rd generation)_16.2_simulator.png in Resources */ = {isa = PBXBuildFile; fileRef = 6860CE242A01B2FF00B68EC5 /* golden_two_platform_view_clip_path_iPhone SE (3rd generation)_16.2_simulator.png */; }; + 686382EC2AC1F9F300E27AAD /* ShareViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 686382EB2AC1F9F300E27AAD /* ShareViewController.m */; }; + 686382EF2AC1F9F300E27AAD /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 686382ED2AC1F9F300E27AAD /* MainInterface.storyboard */; }; + 686382F32AC1F9F300E27AAD /* ScenariosShare.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 686382E82AC1F9F300E27AAD /* ScenariosShare.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 686383132AC202B700E27AAD /* AppExtensionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 686383122AC202B700E27AAD /* AppExtensionTests.m */; }; + 686383152AC2175100E27AAD /* ../../Flutter.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 246B4E4522E3B61000073EBF /* ../../Flutter.xcframework */; }; + 686383162AC2175100E27AAD /* ../../Flutter.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 246B4E4522E3B61000073EBF /* ../../Flutter.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 68A5B63423EB71D300BDBCDB /* PlatformViewGestureRecognizerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 68A5B63323EB71D300BDBCDB /* PlatformViewGestureRecognizerTests.m */; }; 68D4017D2564859300ECD91A /* ContinuousTexture.m in Sources */ = {isa = PBXBuildFile; fileRef = 68D4017C2564859300ECD91A /* ContinuousTexture.m */; }; 68D93AEE2A46097E0054AB6D /* golden_platform_view_with_negative_backdrop_filter_iPhone SE (3rd generation)_16.2_simulator.png in Resources */ = {isa = PBXBuildFile; fileRef = 68D93AED2A46097E0054AB6D /* golden_platform_view_with_negative_backdrop_filter_iPhone SE (3rd generation)_16.2_simulator.png */; }; @@ -83,6 +89,27 @@ remoteGlobalIDString = 248D76C622E388370012F0C1; remoteInfo = Scenarios; }; + 686382F12AC1F9F300E27AAD /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 248D76BF22E388370012F0C1 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 686382E72AC1F9F300E27AAD; + remoteInfo = ScenariosShare; + }; + 6863830A2AC2024200E27AAD /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 686383052AC2024200E27AAD /* FlutterAppExtensionTestHost.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 686382C12ABE172F00E27AAD; + remoteInfo = FlutterAppExtensionTestHost; + }; + 686383102AC2027100E27AAD /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 686383052AC2024200E27AAD /* FlutterAppExtensionTestHost.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 686382C02ABE172F00E27AAD; + remoteInfo = FlutterAppExtensionTestHost; + }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -120,6 +147,28 @@ name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; }; + 686382F42AC1F9F300E27AAD /* Embed Foundation Extensions */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 13; + files = ( + 686382F32AC1F9F300E27AAD /* ScenariosShare.appex in Embed Foundation Extensions */, + ); + name = "Embed Foundation Extensions"; + runOnlyForDeploymentPostprocessing = 0; + }; + 686383172AC2175100E27AAD /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 686383162AC2175100E27AAD /* ../../Flutter.xcframework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ @@ -185,6 +234,13 @@ 6860CE222A01B2FF00B68EC5 /* golden_two_platform_view_clip_rrect_iPhone SE (3rd generation)_16.2_simulator.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "golden_two_platform_view_clip_rrect_iPhone SE (3rd generation)_16.2_simulator.png"; sourceTree = ""; }; 6860CE232A01B2FF00B68EC5 /* golden_two_platform_view_clip_rect_iPhone SE (3rd generation)_16.2_simulator.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "golden_two_platform_view_clip_rect_iPhone SE (3rd generation)_16.2_simulator.png"; sourceTree = ""; }; 6860CE242A01B2FF00B68EC5 /* golden_two_platform_view_clip_path_iPhone SE (3rd generation)_16.2_simulator.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "golden_two_platform_view_clip_path_iPhone SE (3rd generation)_16.2_simulator.png"; sourceTree = ""; }; + 686382E82AC1F9F300E27AAD /* ScenariosShare.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = ScenariosShare.appex; sourceTree = BUILT_PRODUCTS_DIR; }; + 686382EA2AC1F9F300E27AAD /* ShareViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ShareViewController.h; sourceTree = ""; }; + 686382EB2AC1F9F300E27AAD /* ShareViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ShareViewController.m; sourceTree = ""; }; + 686382EE2AC1F9F300E27AAD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/MainInterface.storyboard; sourceTree = ""; }; + 686382F02AC1F9F300E27AAD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 686383052AC2024200E27AAD /* FlutterAppExtensionTestHost.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = FlutterAppExtensionTestHost.xcodeproj; path = ../FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj; sourceTree = ""; }; + 686383122AC202B700E27AAD /* AppExtensionTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppExtensionTests.m; sourceTree = ""; }; 68A5B63323EB71D300BDBCDB /* PlatformViewGestureRecognizerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PlatformViewGestureRecognizerTests.m; sourceTree = ""; }; 68D4017B2564859300ECD91A /* ContinuousTexture.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ContinuousTexture.h; sourceTree = ""; }; 68D4017C2564859300ECD91A /* ContinuousTexture.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ContinuousTexture.m; sourceTree = ""; }; @@ -219,15 +275,25 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 686382E52AC1F9F300E27AAD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 686383152AC2175100E27AAD /* ../../Flutter.xcframework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 248D76BE22E388370012F0C1 = { isa = PBXGroup; children = ( + 686383052AC2024200E27AAD /* FlutterAppExtensionTestHost.xcodeproj */, 248D76C922E388370012F0C1 /* Scenarios */, 248D76E222E388380012F0C1 /* ScenariosTests */, 248D76ED22E388380012F0C1 /* ScenariosUITests */, + 686382E92AC1F9F300E27AAD /* ScenariosShare */, 248D76C822E388370012F0C1 /* Products */, 248D76FC22E388900012F0C1 /* Frameworks */, ); @@ -239,6 +305,7 @@ 248D76C722E388370012F0C1 /* Scenarios.app */, 248D76DF22E388380012F0C1 /* ScenariosTests.xctest */, 248D76EA22E388380012F0C1 /* ScenariosUITests.xctest */, + 686382E82AC1F9F300E27AAD /* ScenariosShare.appex */, ); name = Products; sourceTree = ""; @@ -298,6 +365,7 @@ 246A6610252E693A00EAB0F3 /* RenderingSelectionTest.m */, 0DDEBC88258830B40065D0E8 /* SpawnEngineTest.m */, F26F15B7268B6B5500EC54D3 /* iPadGestureTests.m */, + 686383122AC202B700E27AAD /* AppExtensionTests.m */, ); path = ScenariosUITests; sourceTree = ""; @@ -311,6 +379,25 @@ name = Frameworks; sourceTree = ""; }; + 686382E92AC1F9F300E27AAD /* ScenariosShare */ = { + isa = PBXGroup; + children = ( + 686382EA2AC1F9F300E27AAD /* ShareViewController.h */, + 686382EB2AC1F9F300E27AAD /* ShareViewController.m */, + 686382ED2AC1F9F300E27AAD /* MainInterface.storyboard */, + 686382F02AC1F9F300E27AAD /* Info.plist */, + ); + path = ScenariosShare; + sourceTree = ""; + }; + 686383062AC2024200E27AAD /* Products */ = { + isa = PBXGroup; + children = ( + 6863830B2AC2024200E27AAD /* FlutterAppExtensionTestHost.app */, + ); + name = Products; + sourceTree = ""; + }; F7B464DC2759D02B00079189 /* Goldens */ = { isa = PBXGroup; children = ( @@ -355,10 +442,12 @@ 248D76C422E388370012F0C1 /* Frameworks */, 248D76C522E388370012F0C1 /* Resources */, 246B4E4422E3B5F700073EBF /* Embed Frameworks */, + 686382F42AC1F9F300E27AAD /* Embed Foundation Extensions */, ); buildRules = ( ); dependencies = ( + 686382F22AC1F9F300E27AAD /* PBXTargetDependency */, ); name = Scenarios; productName = Scenarios; @@ -396,6 +485,7 @@ buildRules = ( ); dependencies = ( + 686383112AC2027100E27AAD /* PBXTargetDependency */, 248D76EC22E388380012F0C1 /* PBXTargetDependency */, ); name = ScenariosUITests; @@ -403,6 +493,24 @@ productReference = 248D76EA22E388380012F0C1 /* ScenariosUITests.xctest */; productType = "com.apple.product-type.bundle.ui-testing"; }; + 686382E72AC1F9F300E27AAD /* ScenariosShare */ = { + isa = PBXNativeTarget; + buildConfigurationList = 686382F72AC1F9F300E27AAD /* Build configuration list for PBXNativeTarget "ScenariosShare" */; + buildPhases = ( + 686382E42AC1F9F300E27AAD /* Sources */, + 686382E52AC1F9F300E27AAD /* Frameworks */, + 686382E62AC1F9F300E27AAD /* Resources */, + 686383172AC2175100E27AAD /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = ScenariosShare; + productName = ScenariosShare; + productReference = 686382E82AC1F9F300E27AAD /* ScenariosShare.appex */; + productType = "com.apple.product-type.app-extension"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -426,6 +534,9 @@ LastSwiftMigration = 1030; TestTargetID = 248D76C622E388370012F0C1; }; + 686382E72AC1F9F300E27AAD = { + CreatedOnToolsVersion = 15.0; + }; }; }; buildConfigurationList = 248D76C222E388370012F0C1 /* Build configuration list for PBXProject "Scenarios" */; @@ -439,15 +550,32 @@ mainGroup = 248D76BE22E388370012F0C1; productRefGroup = 248D76C822E388370012F0C1 /* Products */; projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 686383062AC2024200E27AAD /* Products */; + ProjectRef = 686383052AC2024200E27AAD /* FlutterAppExtensionTestHost.xcodeproj */; + }, + ); projectRoot = ""; targets = ( 248D76C622E388370012F0C1 /* Scenarios */, 248D76DE22E388380012F0C1 /* ScenariosTests */, 248D76E922E388380012F0C1 /* ScenariosUITests */, + 686382E72AC1F9F300E27AAD /* ScenariosShare */, ); }; /* End PBXProject section */ +/* Begin PBXReferenceProxy section */ + 6863830B2AC2024200E27AAD /* FlutterAppExtensionTestHost.app */ = { + isa = PBXReferenceProxy; + fileType = wrapper.application; + path = FlutterAppExtensionTestHost.app; + remoteRef = 6863830A2AC2024200E27AAD /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + /* Begin PBXResourcesBuildPhase section */ 248D76C522E388370012F0C1 /* Resources */ = { isa = PBXResourcesBuildPhase; @@ -497,6 +625,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 686382E62AC1F9F300E27AAD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 686382EF2AC1F9F300E27AAD /* MainInterface.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -539,10 +675,19 @@ F26F15B8268B6B5600EC54D3 /* iPadGestureTests.m in Sources */, 246A6611252E693A00EAB0F3 /* RenderingSelectionTest.m in Sources */, 4F06F1B32473296E000AF246 /* LocalizationInitializationTest.m in Sources */, + 686383132AC202B700E27AAD /* AppExtensionTests.m in Sources */, 0DDEBC89258830B40065D0E8 /* SpawnEngineTest.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; + 686382E42AC1F9F300E27AAD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 686382EC2AC1F9F300E27AAD /* ShareViewController.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -556,8 +701,29 @@ target = 248D76C622E388370012F0C1 /* Scenarios */; targetProxy = 248D76EB22E388380012F0C1 /* PBXContainerItemProxy */; }; + 686382F22AC1F9F300E27AAD /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 686382E72AC1F9F300E27AAD /* ScenariosShare */; + targetProxy = 686382F12AC1F9F300E27AAD /* PBXContainerItemProxy */; + }; + 686383112AC2027100E27AAD /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = FlutterAppExtensionTestHost; + targetProxy = 686383102AC2027100E27AAD /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ +/* Begin PBXVariantGroup section */ + 686382ED2AC1F9F300E27AAD /* MainInterface.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 686382EE2AC1F9F300E27AAD /* Base */, + ); + name = MainInterface.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + /* Begin XCBuildConfiguration section */ 248D76F122E388380012F0C1 /* Debug */ = { isa = XCBuildConfiguration; @@ -678,7 +844,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = S8QB4VV633; + DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -701,7 +867,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = S8QB4VV633; + DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -723,7 +889,7 @@ buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = S8QB4VV633; + DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -750,7 +916,7 @@ buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = S8QB4VV633; + DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -776,7 +942,7 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = S8QB4VV633; + DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -802,7 +968,7 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = S8QB4VV633; + DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -824,6 +990,70 @@ }; name = Release; }; + 686382F52AC1F9F300E27AAD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = ""; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = ScenariosShare/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = ScenariosShare; + INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2023 flutter. All rights reserved."; + IPHONEOS_DEPLOYMENT_TARGET = 16.2; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.Scenarios.ScenariosShare; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 686382F62AC1F9F300E27AAD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = ""; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = ScenariosShare/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = ScenariosShare; + INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2023 flutter. All rights reserved."; + IPHONEOS_DEPLOYMENT_TARGET = 16.2; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.Scenarios.ScenariosShare; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -863,6 +1093,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 686382F72AC1F9F300E27AAD /* Build configuration list for PBXNativeTarget "ScenariosShare" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 686382F52AC1F9F300E27AAD /* Debug */, + 686382F62AC1F9F300E27AAD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ }; rootObject = 248D76BF22E388370012F0C1 /* Project object */; diff --git a/testing/scenario_app/ios/Scenarios/ScenariosShare/Base.lproj/MainInterface.storyboard b/testing/scenario_app/ios/Scenarios/ScenariosShare/Base.lproj/MainInterface.storyboard new file mode 100644 index 0000000000000..589bdd9e70de9 --- /dev/null +++ b/testing/scenario_app/ios/Scenarios/ScenariosShare/Base.lproj/MainInterface.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/testing/scenario_app/ios/Scenarios/ScenariosShare/Info.plist b/testing/scenario_app/ios/Scenarios/ScenariosShare/Info.plist new file mode 100644 index 0000000000000..ad33037771e88 --- /dev/null +++ b/testing/scenario_app/ios/Scenarios/ScenariosShare/Info.plist @@ -0,0 +1,18 @@ + + + + + NSExtension + + NSExtensionAttributes + + NSExtensionActivationRule + TRUEPREDICATE + + NSExtensionPrincipalClass + ShareViewController + NSExtensionPointIdentifier + com.apple.share-services + + + diff --git a/testing/scenario_app/ios/Scenarios/ScenariosShare/ShareViewController.h b/testing/scenario_app/ios/Scenarios/ScenariosShare/ShareViewController.h new file mode 100644 index 0000000000000..004a75bd6ad35 --- /dev/null +++ b/testing/scenario_app/ios/Scenarios/ScenariosShare/ShareViewController.h @@ -0,0 +1,10 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import +#import + +@interface ShareViewController : FlutterViewController + +@end diff --git a/testing/scenario_app/ios/Scenarios/ScenariosShare/ShareViewController.m b/testing/scenario_app/ios/Scenarios/ScenariosShare/ShareViewController.m new file mode 100644 index 0000000000000..cea875a76271a --- /dev/null +++ b/testing/scenario_app/ios/Scenarios/ScenariosShare/ShareViewController.m @@ -0,0 +1,31 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import "ShareViewController.h" + +@interface ShareViewController () + +@end + +@implementation ShareViewController + +- (instancetype)init { + FlutterEngine* engine = [[FlutterEngine alloc] initWithName:@"FlutterControllerTest" project:nil]; + [engine run]; + self = [self initWithEngine:engine nibName:nil bundle:nil]; + self.view.accessibilityIdentifier = @"flutter_view"; + + [engine.binaryMessenger + setMessageHandlerOnChannel:@"waiting_for_status" + binaryMessageHandler:^(NSData* _Nullable message, FlutterBinaryReply _Nonnull reply) { + FlutterMethodChannel* channel = [FlutterMethodChannel + methodChannelWithName:@"driver" + binaryMessenger:engine.binaryMessenger + codec:[FlutterJSONMethodCodec sharedInstance]]; + [channel invokeMethod:@"set_scenario" arguments:@{@"name" : @"app_extension"}]; + }]; + return self; +} + +@end diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/AppExtensionTests.m b/testing/scenario_app/ios/Scenarios/ScenariosUITests/AppExtensionTests.m new file mode 100644 index 0000000000000..70d4e0a190a3b --- /dev/null +++ b/testing/scenario_app/ios/Scenarios/ScenariosUITests/AppExtensionTests.m @@ -0,0 +1,58 @@ +// Copyright 2020 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import +#import "GoldenTestManager.h" + +@interface AppExtensionTests : XCTestCase +@property(nonatomic, strong) XCUIApplication* hostApplication; +@end + +@implementation AppExtensionTests + +- (void)setUp { + [super setUp]; + self.continueAfterFailure = NO; + self.hostApplication = + [[XCUIApplication alloc] initWithBundleIdentifier:@"dev.flutter.FlutterAppExtensionTestHost"]; +} + +- (void)testAppExtensionLaunching { + [self.hostApplication launch]; + XCUIElement* button = self.hostApplication.buttons[@"Open Share"]; + if (![button waitForExistenceWithTimeout:10]) { + NSLog(@"%@", self.hostApplication.debugDescription); + XCTFail(@"Failed due to not able to find any button with %@ seconds", @(10)); + } + [button tap]; + BOOL launchedExtensionInFlutter = NO; + // Custom share extension button (like the one in this test) does not have a unique + // identity. They are all identified as `XCElementSnapshotPrivilegedValuePlaceholder`. + // Loop through all the `XCElementSnapshotPrivilegedValuePlaceholder` and find the Flutter one. + for (int i = 0; i < self.hostApplication.collectionViews.cells.count; i++) { + XCUIElement* shareSheetCell = + [self.hostApplication.collectionViews.cells elementBoundByIndex:i]; + if (![shareSheetCell.label isEqualToString:@"XCElementSnapshotPrivilegedValuePlaceholder"]) { + continue; + } + [shareSheetCell tap]; + + XCUIElement* flutterView = self.hostApplication.otherElements[@"flutter_view"]; + if ([flutterView waitForExistenceWithTimeout:10]) { + launchedExtensionInFlutter = YES; + break; + } + + // All the built-in share extensions have a Cancel button. + // Tap the Cancel button to close the built-in extension. + XCUIElement* cancel = self.hostApplication.buttons[@"Cancel"]; + if ([cancel waitForExistenceWithTimeout:10]) { + [cancel tap]; + } + } + // App extension successfully launched flutter view. + XCTAssertTrue(launchedExtensionInFlutter); +} + +@end diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenTestManager.m b/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenTestManager.m index a8d966379a5aa..29915a4cf57b2 100644 --- a/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenTestManager.m +++ b/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenTestManager.m @@ -53,6 +53,7 @@ - (instancetype)initWithLaunchArg:(NSString*)launchArg { @"--two-platform-view-clip-rect" : @"two_platform_view_clip_rect", @"--two-platform-view-clip-rrect" : @"two_platform_view_clip_rrect", @"--two-platform-view-clip-path" : @"two_platform_view_clip_path", + @"--app-extension" : @"app_extension", }; }); _identifier = launchArgsMap[launchArg]; diff --git a/testing/scenario_app/lib/src/darwin_app_extension_scenario.dart b/testing/scenario_app/lib/src/darwin_app_extension_scenario.dart new file mode 100644 index 0000000000000..354810a5d8d23 --- /dev/null +++ b/testing/scenario_app/lib/src/darwin_app_extension_scenario.dart @@ -0,0 +1,44 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'dart:ui'; + +import 'scenario.dart'; + +/// Shows a text that is shown in app extension. +class DarwinAppExtensionScenario extends Scenario { + /// Creates the DarwinAppExtensionScenario scenario. + DarwinAppExtensionScenario(super.view); + + // Semi-arbitrary. + final double _screenWidth = 700; + + @override + void onBeginFrame(Duration duration) { + final SceneBuilder builder = SceneBuilder(); + final PictureRecorder recorder = PictureRecorder(); + final Canvas canvas = Canvas(recorder); + + final ParagraphBuilder paragraphBuilder = + ParagraphBuilder(ParagraphStyle()) + ..pushStyle(TextStyle(fontSize: 80)) + ..addText('flutter Scenarios app extension.') + ..pop(); + final Paragraph paragraph = paragraphBuilder.build(); + + paragraph.layout(ParagraphConstraints(width: _screenWidth)); + + canvas.drawParagraph(paragraph, const Offset(50, 80)); + final Picture picture = recorder.endRecording(); + + builder.addPicture( + Offset.zero, + picture, + willChangeHint: true, + ); + final Scene scene = builder.build(); + view.render(scene); + scene.dispose(); + } +} diff --git a/testing/scenario_app/lib/src/scenarios.dart b/testing/scenario_app/lib/src/scenarios.dart index d9c586023bed2..8e3b15a985fa1 100644 --- a/testing/scenario_app/lib/src/scenarios.dart +++ b/testing/scenario_app/lib/src/scenarios.dart @@ -6,6 +6,7 @@ import 'dart:ui'; import 'animated_color_square.dart'; import 'bogus_font_text.dart'; +import 'darwin_app_extension_scenario.dart'; import 'get_bitmap_scenario.dart'; import 'initial_route_reply.dart'; import 'locale_initialization.dart'; @@ -66,6 +67,7 @@ Map _scenarios = { 'pointer_events': (FlutterView view) => TouchesScenario(view), 'display_texture': (FlutterView view) => DisplayTexture(view), 'get_bitmap': (FlutterView view) => GetBitmapScenario(view), + 'app_extension': (FlutterView view) => DarwinAppExtensionScenario(view), }; Map _currentScenarioParams = {}; diff --git a/testing/scenario_app/run_ios_tests.sh b/testing/scenario_app/run_ios_tests.sh index 3f730deaf3bba..772ea3b96294d 100755 --- a/testing/scenario_app/run_ios_tests.sh +++ b/testing/scenario_app/run_ios_tests.sh @@ -109,7 +109,9 @@ if set -o pipefail && xcodebuild -sdk iphonesimulator \ -skip-testing ScenariosUITests/TwoPlatformViewClipRRectTests/testPlatformView \ -skip-testing ScenariosUITests/TwoPlatformViewsWithOtherBackDropFilterTests/testPlatformView \ -skip-testing ScenariosUITests/UnobstructedPlatformViewTests/testMultiplePlatformViewsWithOverlays \ - INFOPLIST_FILE="Scenarios/Info_Impeller.plist"; then # Plist with FLTEnableImpeller=YES + # Plist with FLTEnableImpeller=YES, all projects in the workspace requires this file. + # For example, FlutterAppExtensionTestHost has a dummy file under the below directory. + INFOPLIST_FILE="Scenarios/Info_Impeller.plist"; then echo "test success." else echo "test failed." From decba203e92267ef4dc149644548a0ee1172d906 Mon Sep 17 00:00:00 2001 From: Harry Terkelsen <1961493+harryterkelsen@users.noreply.github.com> Date: Wed, 27 Sep 2023 17:12:19 -0700 Subject: [PATCH 334/859] [canvaskit] Do not double-apply ImageFilter transform to children (#46336) Fixes an issue seen in the "widgets.image_filter_matrix" golden here: https://flutter-gold.skia.org/search?crs=github&issue=135249&patchsets=3 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I signed the [CLA]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat --- lib/web_ui/lib/src/engine/canvaskit/layer.dart | 11 ++++++----- lib/web_ui/test/ui/filters_test.dart | 10 ++++++++++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/lib/web_ui/lib/src/engine/canvaskit/layer.dart b/lib/web_ui/lib/src/engine/canvaskit/layer.dart index 74f8148b2c895..f54d7acd026b8 100644 --- a/lib/web_ui/lib/src/engine/canvaskit/layer.dart +++ b/lib/web_ui/lib/src/engine/canvaskit/layer.dart @@ -400,13 +400,14 @@ class ImageFilterEngineLayer extends ContainerLayer @override void preroll(PrerollContext prerollContext, Matrix4 matrix) { - final Matrix4 transform = - (_filter as CkManagedSkImageFilterConvertible).transform; - final Matrix4 childMatrix = matrix.multiplied(transform); - prerollContext.mutatorsStack.pushTransform(transform); + final Matrix4 childMatrix = Matrix4.copy(matrix); + childMatrix.translate(_offset.dx, _offset.dy); + prerollContext.mutatorsStack + .pushTransform(Matrix4.translationValues(_offset.dx, _offset.dy, 0.0)); final ui.Rect childPaintBounds = prerollChildren(prerollContext, childMatrix); - _filter.imageFilter((SkImageFilter filter) { + (_filter as CkManagedSkImageFilterConvertible) + .imageFilter((SkImageFilter filter) { paintBounds = rectFromSkIRect(filter.getOutputBounds(toSkRect(childPaintBounds))); }); diff --git a/lib/web_ui/test/ui/filters_test.dart b/lib/web_ui/test/ui/filters_test.dart index de8cbec340644..a2151002c8e92 100644 --- a/lib/web_ui/test/ui/filters_test.dart +++ b/lib/web_ui/test/ui/filters_test.dart @@ -78,6 +78,16 @@ Future testMain() async { await matchGoldenFile('ui_filter_matrix_imagefilter.png', region: region); }); + test('resizing matrix filter', () async { + await drawTestImageWithPaint(ui.Paint() + ..imageFilter = ui.ImageFilter.matrix( + Matrix4.diagonal3Values(0.5, 0.5, 1).toFloat64(), + filterQuality: ui.FilterQuality.high, + )); + await matchGoldenFile('ui_filter_matrix_imagefilter_scaled.png', + region: region); + }); + test('composed filters', () async { final ui.ImageFilter filter = ui.ImageFilter.compose( outer: ui.ImageFilter.matrix( From 2c2e6892f53790f552940b1b1ee9801c66c953f1 Mon Sep 17 00:00:00 2001 From: Jackson Gardner Date: Wed, 27 Sep 2023 17:13:36 -0700 Subject: [PATCH 335/859] Rollback Dart SDK to 3.2.0-119. (#46339) This is a manual rollback to unblock the engine -> framework roller, until https://dart-review.googlesource.com/c/sdk/+/328180 makes its way into a rollable SDK version --- DEPS | 12 ++++++------ ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/DEPS b/DEPS index 3bd2e618b23a2..d2a36a2be94dc 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '80a965ee48ab6e71454f26fff734c24cc9464368', + 'dart_revision': '7c3588c05f87f44ed6795b2e13457193f14dae4e', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py @@ -67,12 +67,12 @@ vars = { 'dart_browser_launcher_rev': '1f69393d63a2f8d36d00b86cdd20df70c347af82', 'dart_clock_rev': '1e75f08d3428bcd6f4b7cf70e788f24fc9b661e1', 'dart_collection_rev': '91afde43f488eef618454b896301c6ff59af72e0', - 'dart_devtools_rev': '61d618843c76b328b1382193378d52eb9f3def04', + 'dart_devtools_rev': '2a1d1975d7ad8773a3e2590d10636432775f23a1', 'dart_libprotobuf_rev': '24487dd1045c7f3d64a21f38a3f0c06cc4cf2edb', 'dart_perfetto_rev': 'b8da07095979310818f0efde2ef3c69ea70d62c5', 'dart_protobuf_gn_rev': 'ca669f79945418f6229e4fef89b666b2a88cbb10', 'dart_protobuf_rev': 'c16bc891978a1764f0d6d8eca54f420242c78a6a', - 'dart_pub_rev': 'fca927ae2662204805e1646c0c0687369001a41a', + 'dart_pub_rev': '1e38c837e4eee40c6d5c5b088e8ed1b512e02980', 'dart_root_certificates_rev': '692f6d6488af68e0121317a9c2c9eb393eb0ee50', 'dart_tools_rev': '3c248df45b9bf40738579e8616cd7d85f34ba5b1', 'dart_watcher_rev': '1aed03e2a8005f45083fdb38cbd4b684cd23082f', @@ -337,7 +337,7 @@ deps = { Var('chromium_git') + '/external/github.com/WebAssembly/binaryen.git@a51bd6df919a5b79574f0996a760cc20cb05697e', 'src/third_party/dart/third_party/devtools': - {'dep_type': 'cipd', 'packages': [{'package': 'dart/third_party/flutter/devtools', 'version': 'git_revision:61d618843c76b328b1382193378d52eb9f3def04'}]}, + {'dep_type': 'cipd', 'packages': [{'package': 'dart/third_party/flutter/devtools', 'version': 'git_revision:2a1d1975d7ad8773a3e2590d10636432775f23a1'}]}, 'src/third_party/dart/third_party/pkg/args': Var('dart_git') + '/args.git@5a4e16f1e4c08b01498a9dce8aeda1a60161cd52', @@ -376,7 +376,7 @@ deps = { Var('dart_git') + '/dart_style.git@1a2def95a3c04dafd27b85d17e6e828bd4afa1a3', 'src/third_party/dart/third_party/pkg/dartdoc': - Var('dart_git') + '/dartdoc.git@a3cfdc40a94d169bd7b559dc6f83ceb7f79de4e2', + Var('dart_git') + '/dartdoc.git@0e1a6d94a6cb5dd487a19ebb68980e34ac6154ba', 'src/third_party/dart/third_party/pkg/ffi': Var('dart_git') + '/ffi.git@d36e05af55293bcc511d6b3a99ea4b8cb69f6323', @@ -427,7 +427,7 @@ deps = { Var('dart_git') + '/mockito.git@097e5635a6c1859e03e9c606c2ab4cfa74618bcc', 'src/third_party/dart/third_party/pkg/native': - Var('dart_git') + '/native.git@be4aaf7b849a64d67756c95b6270b9bfe47f3c7d', + Var('dart_git') + '/native.git@a5d88093017f5cecf30978a823fe6a8a2ebb8ca5', 'src/third_party/dart/third_party/pkg/package_config': Var('dart_git') + '/package_config.git@ae7ad83de97aba507fd05e97cc372bc6695c1759', diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index ab67de4bce7a0..a22502d012816 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: b342b432b49d09cf10a2d480bfc2dcef +Signature: 601fdb9dd42612ba699cbf0563a3c257 ==================================================================================================== LIBRARY: dart From 8de6ede78642e4f0943062aefe66c43a58a597ab Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 27 Sep 2023 21:13:04 -0400 Subject: [PATCH 336/859] Roll Skia from b048b468d641 to 4441cde55a79 (1 revision) (#46341) https://skia.googlesource.com/skia.git/+log/b048b468d641..4441cde55a79 2023-09-28 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 5ec10484307a to 89aea904c65f (4 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index d2a36a2be94dc..0f7982d9a76a2 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'b048b468d641e92a52954137ba503f2cde9c411d', + 'skia_revision': '4441cde55a79e8426aed78c34e83efeafd2289b4', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 75903708c9d94080db88f2d6d708915a44718ed6 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 27 Sep 2023 21:53:17 -0400 Subject: [PATCH 337/859] Roll Dart SDK from 7c3588c05f87 to 86c577329bf7 (8 revisions) (#46342) https://dart.googlesource.com/sdk.git/+log/7c3588c05f87..86c577329bf7 2023-09-28 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-207.0.dev 2023-09-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-206.0.dev 2023-09-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-205.0.dev 2023-09-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-204.0.dev 2023-09-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-203.0.dev 2023-09-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-202.0.dev 2023-09-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-201.0.dev 2023-09-26 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-200.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jacksongardner@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 12 ++++++------ ci/licenses_golden/licenses_dart | 4 +++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/DEPS b/DEPS index 0f7982d9a76a2..ced067077d042 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '7c3588c05f87f44ed6795b2e13457193f14dae4e', + 'dart_revision': '86c577329bf79eb1213494fadb2b35f0c14e8406', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py @@ -67,12 +67,12 @@ vars = { 'dart_browser_launcher_rev': '1f69393d63a2f8d36d00b86cdd20df70c347af82', 'dart_clock_rev': '1e75f08d3428bcd6f4b7cf70e788f24fc9b661e1', 'dart_collection_rev': '91afde43f488eef618454b896301c6ff59af72e0', - 'dart_devtools_rev': '2a1d1975d7ad8773a3e2590d10636432775f23a1', + 'dart_devtools_rev': '11ec4ae1036408018143b58d80d6feadbee56a6c', 'dart_libprotobuf_rev': '24487dd1045c7f3d64a21f38a3f0c06cc4cf2edb', 'dart_perfetto_rev': 'b8da07095979310818f0efde2ef3c69ea70d62c5', 'dart_protobuf_gn_rev': 'ca669f79945418f6229e4fef89b666b2a88cbb10', 'dart_protobuf_rev': 'c16bc891978a1764f0d6d8eca54f420242c78a6a', - 'dart_pub_rev': '1e38c837e4eee40c6d5c5b088e8ed1b512e02980', + 'dart_pub_rev': 'fca927ae2662204805e1646c0c0687369001a41a', 'dart_root_certificates_rev': '692f6d6488af68e0121317a9c2c9eb393eb0ee50', 'dart_tools_rev': '3c248df45b9bf40738579e8616cd7d85f34ba5b1', 'dart_watcher_rev': '1aed03e2a8005f45083fdb38cbd4b684cd23082f', @@ -337,7 +337,7 @@ deps = { Var('chromium_git') + '/external/github.com/WebAssembly/binaryen.git@a51bd6df919a5b79574f0996a760cc20cb05697e', 'src/third_party/dart/third_party/devtools': - {'dep_type': 'cipd', 'packages': [{'package': 'dart/third_party/flutter/devtools', 'version': 'git_revision:2a1d1975d7ad8773a3e2590d10636432775f23a1'}]}, + {'dep_type': 'cipd', 'packages': [{'package': 'dart/third_party/flutter/devtools', 'version': 'git_revision:11ec4ae1036408018143b58d80d6feadbee56a6c'}]}, 'src/third_party/dart/third_party/pkg/args': Var('dart_git') + '/args.git@5a4e16f1e4c08b01498a9dce8aeda1a60161cd52', @@ -376,7 +376,7 @@ deps = { Var('dart_git') + '/dart_style.git@1a2def95a3c04dafd27b85d17e6e828bd4afa1a3', 'src/third_party/dart/third_party/pkg/dartdoc': - Var('dart_git') + '/dartdoc.git@0e1a6d94a6cb5dd487a19ebb68980e34ac6154ba', + Var('dart_git') + '/dartdoc.git@a3cfdc40a94d169bd7b559dc6f83ceb7f79de4e2', 'src/third_party/dart/third_party/pkg/ffi': Var('dart_git') + '/ffi.git@d36e05af55293bcc511d6b3a99ea4b8cb69f6323', @@ -427,7 +427,7 @@ deps = { Var('dart_git') + '/mockito.git@097e5635a6c1859e03e9c606c2ab4cfa74618bcc', 'src/third_party/dart/third_party/pkg/native': - Var('dart_git') + '/native.git@a5d88093017f5cecf30978a823fe6a8a2ebb8ca5', + Var('dart_git') + '/native.git@be4aaf7b849a64d67756c95b6270b9bfe47f3c7d', 'src/third_party/dart/third_party/pkg/package_config': Var('dart_git') + '/package_config.git@ae7ad83de97aba507fd05e97cc372bc6695c1759', diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index a22502d012816..5eb7db3fc0d3e 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: 601fdb9dd42612ba699cbf0563a3c257 +Signature: cb184c8b7cf360adfdf525e98bbac43c ==================================================================================================== LIBRARY: dart @@ -4501,6 +4501,7 @@ ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/string_helper.dart ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/string_stringref_patch.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/sync_star_patch.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/typed_data.dart + ../../../third_party/dart/LICENSE +ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/wasm_types_patch.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/weak_patch.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm_js_compatibility/lib/typed_data.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm_js_compatibility/lib/typed_data_patch.dart + ../../../third_party/dart/LICENSE @@ -4549,6 +4550,7 @@ FILE: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/string_helper.dart FILE: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/string_stringref_patch.dart FILE: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/sync_star_patch.dart FILE: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/typed_data.dart +FILE: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/wasm_types_patch.dart FILE: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/weak_patch.dart FILE: ../../../third_party/dart/sdk/lib/_internal/wasm_js_compatibility/lib/typed_data.dart FILE: ../../../third_party/dart/sdk/lib/_internal/wasm_js_compatibility/lib/typed_data_patch.dart From 3acb708f73e29802c45e62fb0a845548d11ec219 Mon Sep 17 00:00:00 2001 From: "auto-submit[bot]" <98614782+auto-submit[bot]@users.noreply.github.com> Date: Thu, 28 Sep 2023 02:52:26 +0000 Subject: [PATCH 338/859] Reverts "Roll Dart SDK from 7c3588c05f87 to 86c577329bf7 (8 revisions)" (#46345) Reverts flutter/engine#46342 Initiated by: zanderso This change reverts the following previous change: https://dart.googlesource.com/sdk.git/+log/7c3588c05f87..86c577329bf7 2023-09-28 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-207.0.dev 2023-09-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-206.0.dev 2023-09-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-205.0.dev 2023-09-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-204.0.dev 2023-09-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-203.0.dev 2023-09-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-202.0.dev 2023-09-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-201.0.dev 2023-09-26 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-200.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jacksongardner@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 12 ++++++------ ci/licenses_golden/licenses_dart | 4 +--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/DEPS b/DEPS index ced067077d042..0f7982d9a76a2 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '86c577329bf79eb1213494fadb2b35f0c14e8406', + 'dart_revision': '7c3588c05f87f44ed6795b2e13457193f14dae4e', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py @@ -67,12 +67,12 @@ vars = { 'dart_browser_launcher_rev': '1f69393d63a2f8d36d00b86cdd20df70c347af82', 'dart_clock_rev': '1e75f08d3428bcd6f4b7cf70e788f24fc9b661e1', 'dart_collection_rev': '91afde43f488eef618454b896301c6ff59af72e0', - 'dart_devtools_rev': '11ec4ae1036408018143b58d80d6feadbee56a6c', + 'dart_devtools_rev': '2a1d1975d7ad8773a3e2590d10636432775f23a1', 'dart_libprotobuf_rev': '24487dd1045c7f3d64a21f38a3f0c06cc4cf2edb', 'dart_perfetto_rev': 'b8da07095979310818f0efde2ef3c69ea70d62c5', 'dart_protobuf_gn_rev': 'ca669f79945418f6229e4fef89b666b2a88cbb10', 'dart_protobuf_rev': 'c16bc891978a1764f0d6d8eca54f420242c78a6a', - 'dart_pub_rev': 'fca927ae2662204805e1646c0c0687369001a41a', + 'dart_pub_rev': '1e38c837e4eee40c6d5c5b088e8ed1b512e02980', 'dart_root_certificates_rev': '692f6d6488af68e0121317a9c2c9eb393eb0ee50', 'dart_tools_rev': '3c248df45b9bf40738579e8616cd7d85f34ba5b1', 'dart_watcher_rev': '1aed03e2a8005f45083fdb38cbd4b684cd23082f', @@ -337,7 +337,7 @@ deps = { Var('chromium_git') + '/external/github.com/WebAssembly/binaryen.git@a51bd6df919a5b79574f0996a760cc20cb05697e', 'src/third_party/dart/third_party/devtools': - {'dep_type': 'cipd', 'packages': [{'package': 'dart/third_party/flutter/devtools', 'version': 'git_revision:11ec4ae1036408018143b58d80d6feadbee56a6c'}]}, + {'dep_type': 'cipd', 'packages': [{'package': 'dart/third_party/flutter/devtools', 'version': 'git_revision:2a1d1975d7ad8773a3e2590d10636432775f23a1'}]}, 'src/third_party/dart/third_party/pkg/args': Var('dart_git') + '/args.git@5a4e16f1e4c08b01498a9dce8aeda1a60161cd52', @@ -376,7 +376,7 @@ deps = { Var('dart_git') + '/dart_style.git@1a2def95a3c04dafd27b85d17e6e828bd4afa1a3', 'src/third_party/dart/third_party/pkg/dartdoc': - Var('dart_git') + '/dartdoc.git@a3cfdc40a94d169bd7b559dc6f83ceb7f79de4e2', + Var('dart_git') + '/dartdoc.git@0e1a6d94a6cb5dd487a19ebb68980e34ac6154ba', 'src/third_party/dart/third_party/pkg/ffi': Var('dart_git') + '/ffi.git@d36e05af55293bcc511d6b3a99ea4b8cb69f6323', @@ -427,7 +427,7 @@ deps = { Var('dart_git') + '/mockito.git@097e5635a6c1859e03e9c606c2ab4cfa74618bcc', 'src/third_party/dart/third_party/pkg/native': - Var('dart_git') + '/native.git@be4aaf7b849a64d67756c95b6270b9bfe47f3c7d', + Var('dart_git') + '/native.git@a5d88093017f5cecf30978a823fe6a8a2ebb8ca5', 'src/third_party/dart/third_party/pkg/package_config': Var('dart_git') + '/package_config.git@ae7ad83de97aba507fd05e97cc372bc6695c1759', diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index 5eb7db3fc0d3e..a22502d012816 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: cb184c8b7cf360adfdf525e98bbac43c +Signature: 601fdb9dd42612ba699cbf0563a3c257 ==================================================================================================== LIBRARY: dart @@ -4501,7 +4501,6 @@ ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/string_helper.dart ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/string_stringref_patch.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/sync_star_patch.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/typed_data.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/wasm_types_patch.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/weak_patch.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm_js_compatibility/lib/typed_data.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm_js_compatibility/lib/typed_data_patch.dart + ../../../third_party/dart/LICENSE @@ -4550,7 +4549,6 @@ FILE: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/string_helper.dart FILE: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/string_stringref_patch.dart FILE: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/sync_star_patch.dart FILE: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/typed_data.dart -FILE: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/wasm_types_patch.dart FILE: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/weak_patch.dart FILE: ../../../third_party/dart/sdk/lib/_internal/wasm_js_compatibility/lib/typed_data.dart FILE: ../../../third_party/dart/sdk/lib/_internal/wasm_js_compatibility/lib/typed_data_patch.dart From 17af6c76f4f3adf78363d0cc7bd31c377e344f27 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 27 Sep 2023 23:25:44 -0400 Subject: [PATCH 339/859] Roll Skia from 4441cde55a79 to 704217de51e1 (1 revision) (#46346) https://skia.googlesource.com/skia.git/+log/4441cde55a79..704217de51e1 2023-09-28 armansito@google.com Roll vello from 4435398 to ee3a076 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 0f7982d9a76a2..65342fffb22cc 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '4441cde55a79e8426aed78c34e83efeafd2289b4', + 'skia_revision': '704217de51e1be9979aeb4b6878bd1c0cf400883', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index a3061cff1b9d7..756df1d28c5e0 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: c597a715dc4d0dd9f7de5b5b1fafd88a +Signature: b7f4f99b87cc14867a24e0985ee43136 ==================================================================================================== LIBRARY: etc1 From 77329db3cdc1e72793487812ca50ce98fd6c7d98 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 28 Sep 2023 01:17:05 -0400 Subject: [PATCH 340/859] Roll Skia from 704217de51e1 to f3e5eddda2fa (1 revision) (#46350) https://skia.googlesource.com/skia.git/+log/704217de51e1..f3e5eddda2fa 2023-09-28 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Dawn from 1ec4835ca75d to 1b2986736fd2 (14 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 65342fffb22cc..161fccac57e6b 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '704217de51e1be9979aeb4b6878bd1c0cf400883', + 'skia_revision': 'f3e5eddda2fa964bc6b130e467e86e28019b8ebf', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 4b26269007de4d939d7050462d969d939ea3c298 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 28 Sep 2023 02:14:19 -0400 Subject: [PATCH 341/859] Roll Skia from f3e5eddda2fa to 1f4e5c374172 (2 revisions) (#46351) https://skia.googlesource.com/skia.git/+log/f3e5eddda2fa..1f4e5c374172 2023-09-28 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from d0c5366041fc to 8248cceea329 2023-09-28 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from b3365cad07b5 to d0c5366041fc (1 revision) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 161fccac57e6b..d372d8b941d55 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'f3e5eddda2fa964bc6b130e467e86e28019b8ebf', + 'skia_revision': '1f4e5c374172a0fb00bb134038e2238fdcd997cb', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 756df1d28c5e0..9d9f8f7c89f7f 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: b7f4f99b87cc14867a24e0985ee43136 +Signature: 604ec4dd7397ac65b8eb30ff2e4a142e ==================================================================================================== LIBRARY: etc1 From 69d6f6648fed3384656b4ac838b2ac25648d24d1 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 28 Sep 2023 03:13:47 -0400 Subject: [PATCH 342/859] Roll Skia from 1f4e5c374172 to d410e03a6b9b (1 revision) (#46353) https://skia.googlesource.com/skia.git/+log/1f4e5c374172..d410e03a6b9b 2023-09-28 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 2c0f9d20f699 to 929ace8da386 (5 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index d372d8b941d55..9380bc39db19f 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '1f4e5c374172a0fb00bb134038e2238fdcd997cb', + 'skia_revision': 'd410e03a6b9b0e7f77fe4bb562f396a97345d070', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From ef29c38651fbc810f66111a143aaa1874cbf5a11 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 28 Sep 2023 04:39:34 -0400 Subject: [PATCH 343/859] Roll Fuchsia Linux SDK from 6Y22MutFhgL7ua18F... to cu6apvEZ2P6zhishc... (#46355) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 74 ++++++++++++++--------------- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/DEPS b/DEPS index 9380bc39db19f..7e75f75d5b6a1 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': '6Y22MutFhgL7ua18FzWslqS1baVCAG7l6MuPhp1vEs0C' + 'version': 'cu6apvEZ2P6zhishcExZHv7qWi62MO8R3JOnclnglFAC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index ec91bcdb3e2da..09a7ec8838f1e 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: 9e4121654b11dd8e72f7e068c33dcffe +Signature: a4b4aa9727fa603af70228ec58ead9a7 ==================================================================================================== LIBRARY: fuchsia_sdk @@ -542,18 +542,18 @@ FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/lib/libpthread.so FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/lib/librt.so FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/lib/libzircon.so FILE: ../../../fuchsia/sdk/linux/data/config/symbol_index/config.json -FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/arm64/release/content_checklist_path -FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/arm64/release/package_manifest.json -FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/riscv64/release/content_checklist_path -FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/riscv64/release/package_manifest.json -FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/x64/release/content_checklist_path -FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/x64/release/package_manifest.json -FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/arm64/release/content_checklist_path -FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/arm64/release/package_manifest.json -FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/riscv64/release/content_checklist_path -FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/riscv64/release/package_manifest.json -FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/x64/release/content_checklist_path -FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/x64/release/package_manifest.json +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/arm64-api15/release/content_checklist_path +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/arm64-api15/release/package_manifest.json +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/riscv64-api15/release/content_checklist_path +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/riscv64-api15/release/package_manifest.json +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/x64-api15/release/content_checklist_path +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/x64-api15/release/package_manifest.json +FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/arm64-api15/release/content_checklist_path +FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/arm64-api15/release/package_manifest.json +FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/riscv64-api15/release/content_checklist_path +FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/riscv64-api15/release/package_manifest.json +FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/x64-api15/release/content_checklist_path +FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/x64-api15/release/package_manifest.json FILE: ../../../fuchsia/sdk/linux/pkg/async-default/async-default.ifs FILE: ../../../fuchsia/sdk/linux/pkg/driver_runtime_shared_lib/driver_runtime.ifs FILE: ../../../fuchsia/sdk/linux/pkg/fdio/fdio.ifs @@ -2367,18 +2367,18 @@ FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/lib/libpthread.so FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/lib/librt.so FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/lib/libzircon.so FILE: ../../../fuchsia/sdk/linux/data/config/symbol_index/config.json -FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/arm64/release/content_checklist_path -FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/arm64/release/package_manifest.json -FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/riscv64/release/content_checklist_path -FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/riscv64/release/package_manifest.json -FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/x64/release/content_checklist_path -FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/x64/release/package_manifest.json -FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/arm64/release/content_checklist_path -FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/arm64/release/package_manifest.json -FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/riscv64/release/content_checklist_path -FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/riscv64/release/package_manifest.json -FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/x64/release/content_checklist_path -FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/x64/release/package_manifest.json +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/arm64-api15/release/content_checklist_path +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/arm64-api15/release/package_manifest.json +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/riscv64-api15/release/content_checklist_path +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/riscv64-api15/release/package_manifest.json +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/x64-api15/release/content_checklist_path +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/x64-api15/release/package_manifest.json +FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/arm64-api15/release/content_checklist_path +FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/arm64-api15/release/package_manifest.json +FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/riscv64-api15/release/content_checklist_path +FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/riscv64-api15/release/package_manifest.json +FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/x64-api15/release/content_checklist_path +FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/x64-api15/release/package_manifest.json FILE: ../../../fuchsia/sdk/linux/pkg/async-default/async-default.ifs FILE: ../../../fuchsia/sdk/linux/pkg/driver_runtime_shared_lib/driver_runtime.ifs FILE: ../../../fuchsia/sdk/linux/pkg/fdio/fdio.ifs @@ -4988,18 +4988,18 @@ FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/lib/libpthread.so FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/lib/librt.so FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/lib/libzircon.so FILE: ../../../fuchsia/sdk/linux/data/config/symbol_index/config.json -FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/arm64/release/content_checklist_path -FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/arm64/release/package_manifest.json -FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/riscv64/release/content_checklist_path -FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/riscv64/release/package_manifest.json -FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/x64/release/content_checklist_path -FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/x64/release/package_manifest.json -FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/arm64/release/content_checklist_path -FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/arm64/release/package_manifest.json -FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/riscv64/release/content_checklist_path -FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/riscv64/release/package_manifest.json -FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/x64/release/content_checklist_path -FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/x64/release/package_manifest.json +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/arm64-api15/release/content_checklist_path +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/arm64-api15/release/package_manifest.json +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/riscv64-api15/release/content_checklist_path +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/riscv64-api15/release/package_manifest.json +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/x64-api15/release/content_checklist_path +FILE: ../../../fuchsia/sdk/linux/packages/heapdump-collector/x64-api15/release/package_manifest.json +FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/arm64-api15/release/content_checklist_path +FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/arm64-api15/release/package_manifest.json +FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/riscv64-api15/release/content_checklist_path +FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/riscv64-api15/release/package_manifest.json +FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/x64-api15/release/content_checklist_path +FILE: ../../../fuchsia/sdk/linux/packages/realm_builder_server/x64-api15/release/package_manifest.json FILE: ../../../fuchsia/sdk/linux/pkg/async-default/async-default.ifs FILE: ../../../fuchsia/sdk/linux/pkg/driver_runtime_shared_lib/driver_runtime.ifs FILE: ../../../fuchsia/sdk/linux/pkg/fdio/fdio.ifs From 69a94d567919ea2c37fc9adb1cb457a35a71b9a8 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 28 Sep 2023 06:27:26 -0400 Subject: [PATCH 344/859] Roll Fuchsia Mac SDK from U334SygIkffMJVmdu... to 4WW3KRrAbuY7VeGT0... (#46357) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 7e75f75d5b6a1..74dbe20bad71e 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'U334SygIkffMJVmduVhvR7c4L4qnQHz_9dPjcYKDwEsC' + 'version': '4WW3KRrAbuY7VeGT0pBFAQktetsyx-3C0mKMNxCd0uYC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From dff7d2246c8fd1a3c4473d24ee682677d5c5000b Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 28 Sep 2023 09:03:33 -0400 Subject: [PATCH 345/859] Roll Skia from d410e03a6b9b to cfac8410d773 (1 revision) (#46362) https://skia.googlesource.com/skia.git/+log/d410e03a6b9b..cfac8410d773 2023-09-28 kjlubick@google.com Expand //:core and introduce //:png_decode_codec et al If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 74dbe20bad71e..3e02d7ec859d6 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'd410e03a6b9b0e7f77fe4bb562f396a97345d070', + 'skia_revision': 'cfac8410d773b9098677608a8fd0f5f2832192a5', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 9d9f8f7c89f7f..6d7b50e3f4049 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 604ec4dd7397ac65b8eb30ff2e4a142e +Signature: 3e19909ad278fb496d69dbe776a0e0e8 ==================================================================================================== LIBRARY: etc1 From b46e9061f6add6a7de9880db3a81dc2f1cb942f2 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 28 Sep 2023 09:46:56 -0400 Subject: [PATCH 346/859] Roll Skia from cfac8410d773 to 267bb43e822d (1 revision) (#46363) https://skia.googlesource.com/skia.git/+log/cfac8410d773..267bb43e822d 2023-09-28 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 89aea904c65f to 34349287c876 (2 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 3e02d7ec859d6..f374d18d92f1e 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'cfac8410d773b9098677608a8fd0f5f2832192a5', + 'skia_revision': '267bb43e822d827737b04b07cdd2015c6a081b40', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 4989618dc04d54dd52ba16df063fb7acf5bd3ce9 Mon Sep 17 00:00:00 2001 From: Bruno Leroux Date: Thu, 28 Sep 2023 16:08:12 +0200 Subject: [PATCH 347/859] =?UTF-8?q?[Android]=20Rename=20`allowChannelBuffe?= =?UTF-8?q?rOverflow`=20to=20`setWarnsOnChannelOv=E2=80=A6=20(#46361)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description This PR is a follow-up to https://github.com/flutter/engine/pull/44434 which introduces the `allowChannelBufferOverflow` function. It renames this function to `setWarnsOnChannelOverflow`. The previous naming was inspired by the framework side implementation. https://github.com/flutter/engine/blob/93e8901490e78c7ba7e319cce4470d9c6478c6dc/lib/ui/channel_buffers.dart#L574 During the review of the iOS/macOS implementation, https://github.com/flutter/engine/pull/44848#discussion_r1310463864, we agreed that the existing naming is confusing because it implies that overflow will be allowed, but this not the case this function is used to enable/disable error messages when a channel overflows. ## Related Issue Follow-up for https://github.com/flutter/flutter/issues/132386. ## Tests Updates 1 test. --- .../flutter/plugin/common/BasicMessageChannel.java | 14 +++++++------- .../io/flutter/plugin/common/MethodChannel.java | 6 +++--- .../flutter/plugin/common/MethodChannelTest.java | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/shell/platform/android/io/flutter/plugin/common/BasicMessageChannel.java b/shell/platform/android/io/flutter/plugin/common/BasicMessageChannel.java index fa21c71e95072..ea6612d782b36 100644 --- a/shell/platform/android/io/flutter/plugin/common/BasicMessageChannel.java +++ b/shell/platform/android/io/flutter/plugin/common/BasicMessageChannel.java @@ -144,11 +144,11 @@ public void resizeChannelBuffer(int newSize) { /** * Toggles whether the channel should show warning messages when discarding messages due to - * overflow. When 'allowed' is true the channel is expected to overflow and warning messages will + * overflow. When 'warns' is false the channel is expected to overflow and warning messages will * not be shown. */ - public void allowChannelBufferOverflow(boolean allowed) { - allowChannelBufferOverflow(messenger, name, allowed); + public void setWarnsOnChannelOverflow(boolean warns) { + setWarnsOnChannelOverflow(messenger, name, warns); } private static ByteBuffer packetFromEncodedMessage(ByteBuffer message) { @@ -182,13 +182,13 @@ public static void resizeChannelBuffer( /** * Toggles whether the channel should show warning messages when discarding messages due to - * overflow. When 'allowed' is true the channel is expected to overflow and warning messages will + * overflow. When 'warns' is false the channel is expected to overflow and warning messages will * not be shown. */ - public static void allowChannelBufferOverflow( - @NonNull BinaryMessenger messenger, @NonNull String channel, boolean allowed) { + public static void setWarnsOnChannelOverflow( + @NonNull BinaryMessenger messenger, @NonNull String channel, boolean warns) { final StandardMethodCodec codec = StandardMethodCodec.INSTANCE; - Object[] arguments = {channel, allowed}; + Object[] arguments = {channel, !warns}; MethodCall methodCall = new MethodCall("overflow", Arrays.asList(arguments)); ByteBuffer message = codec.encodeMethodCall(methodCall); ByteBuffer packet = packetFromEncodedMessage(message); diff --git a/shell/platform/android/io/flutter/plugin/common/MethodChannel.java b/shell/platform/android/io/flutter/plugin/common/MethodChannel.java index 3aa2698ad460e..3191aa4e3ad66 100644 --- a/shell/platform/android/io/flutter/plugin/common/MethodChannel.java +++ b/shell/platform/android/io/flutter/plugin/common/MethodChannel.java @@ -159,11 +159,11 @@ public void resizeChannelBuffer(int newSize) { /** * Toggles whether the channel should show warning messages when discarding messages due to - * overflow. When 'allowed' is true the channel is expected to overflow and warning messages will + * overflow. When 'warns' is false the channel is expected to overflow and warning messages will * not be shown. */ - public void allowChannelBufferOverflow(boolean allowed) { - BasicMessageChannel.allowChannelBufferOverflow(messenger, name, allowed); + public void setWarnsOnChannelOverflow(boolean warns) { + BasicMessageChannel.setWarnsOnChannelOverflow(messenger, name, warns); } /** A handler of incoming method calls. */ diff --git a/shell/platform/android/test/io/flutter/plugin/common/MethodChannelTest.java b/shell/platform/android/test/io/flutter/plugin/common/MethodChannelTest.java index 8f8836f6148df..df1fa2108c296 100644 --- a/shell/platform/android/test/io/flutter/plugin/common/MethodChannelTest.java +++ b/shell/platform/android/test/io/flutter/plugin/common/MethodChannelTest.java @@ -56,7 +56,7 @@ public void overflowChannelBufferMessageIsWellformed() { String channel = "flutter/test"; MethodChannel rawChannel = new MethodChannel(dartExecutor, channel); - rawChannel.allowChannelBufferOverflow(true); + rawChannel.setWarnsOnChannelOverflow(false); // Created from the following Dart code: // MethodCall methodCall = const MethodCall('overflow', ['flutter/test', true]); From e19ac95d10a84937bb7d14725e410392dd46d6a9 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 28 Sep 2023 10:23:24 -0400 Subject: [PATCH 348/859] Roll Skia from 267bb43e822d to bcbcb109bad6 (1 revision) (#46365) https://skia.googlesource.com/skia.git/+log/267bb43e822d..bcbcb109bad6 2023-09-28 kjlubick@google.com Apply buildifier fixes If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index f374d18d92f1e..78a65771e4cef 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '267bb43e822d827737b04b07cdd2015c6a081b40', + 'skia_revision': 'bcbcb109bad669fcaf063f95916d67c3459b2097', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 923897bca40b747e8c1c2d489a3c3325e06b86a3 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 28 Sep 2023 11:38:04 -0400 Subject: [PATCH 349/859] Manual roll Dart SDK from 7c3588c05f87 to 077d768accfa (11 revisions) (#46366) Manual roll requested by zra@google.com https://dart.googlesource.com/sdk.git/+log/7c3588c05f87..077d768accfa 2023-09-28 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-210.0.dev 2023-09-28 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-209.0.dev 2023-09-28 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-208.0.dev 2023-09-28 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-207.0.dev 2023-09-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-206.0.dev 2023-09-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-205.0.dev 2023-09-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-204.0.dev 2023-09-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-203.0.dev 2023-09-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-202.0.dev 2023-09-27 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-201.0.dev 2023-09-26 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-200.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jacksongardner@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 12 ++++++------ ci/licenses_golden/licenses_dart | 4 +++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/DEPS b/DEPS index 78a65771e4cef..acdaa861aeafa 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '7c3588c05f87f44ed6795b2e13457193f14dae4e', + 'dart_revision': '077d768accfa3419b8b57cf779cca8228b417faa', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py @@ -67,12 +67,12 @@ vars = { 'dart_browser_launcher_rev': '1f69393d63a2f8d36d00b86cdd20df70c347af82', 'dart_clock_rev': '1e75f08d3428bcd6f4b7cf70e788f24fc9b661e1', 'dart_collection_rev': '91afde43f488eef618454b896301c6ff59af72e0', - 'dart_devtools_rev': '2a1d1975d7ad8773a3e2590d10636432775f23a1', + 'dart_devtools_rev': '11ec4ae1036408018143b58d80d6feadbee56a6c', 'dart_libprotobuf_rev': '24487dd1045c7f3d64a21f38a3f0c06cc4cf2edb', 'dart_perfetto_rev': 'b8da07095979310818f0efde2ef3c69ea70d62c5', 'dart_protobuf_gn_rev': 'ca669f79945418f6229e4fef89b666b2a88cbb10', 'dart_protobuf_rev': 'c16bc891978a1764f0d6d8eca54f420242c78a6a', - 'dart_pub_rev': '1e38c837e4eee40c6d5c5b088e8ed1b512e02980', + 'dart_pub_rev': 'fca927ae2662204805e1646c0c0687369001a41a', 'dart_root_certificates_rev': '692f6d6488af68e0121317a9c2c9eb393eb0ee50', 'dart_tools_rev': '3c248df45b9bf40738579e8616cd7d85f34ba5b1', 'dart_watcher_rev': '1aed03e2a8005f45083fdb38cbd4b684cd23082f', @@ -337,7 +337,7 @@ deps = { Var('chromium_git') + '/external/github.com/WebAssembly/binaryen.git@a51bd6df919a5b79574f0996a760cc20cb05697e', 'src/third_party/dart/third_party/devtools': - {'dep_type': 'cipd', 'packages': [{'package': 'dart/third_party/flutter/devtools', 'version': 'git_revision:2a1d1975d7ad8773a3e2590d10636432775f23a1'}]}, + {'dep_type': 'cipd', 'packages': [{'package': 'dart/third_party/flutter/devtools', 'version': 'git_revision:11ec4ae1036408018143b58d80d6feadbee56a6c'}]}, 'src/third_party/dart/third_party/pkg/args': Var('dart_git') + '/args.git@5a4e16f1e4c08b01498a9dce8aeda1a60161cd52', @@ -376,7 +376,7 @@ deps = { Var('dart_git') + '/dart_style.git@1a2def95a3c04dafd27b85d17e6e828bd4afa1a3', 'src/third_party/dart/third_party/pkg/dartdoc': - Var('dart_git') + '/dartdoc.git@0e1a6d94a6cb5dd487a19ebb68980e34ac6154ba', + Var('dart_git') + '/dartdoc.git@a3cfdc40a94d169bd7b559dc6f83ceb7f79de4e2', 'src/third_party/dart/third_party/pkg/ffi': Var('dart_git') + '/ffi.git@d36e05af55293bcc511d6b3a99ea4b8cb69f6323', @@ -427,7 +427,7 @@ deps = { Var('dart_git') + '/mockito.git@097e5635a6c1859e03e9c606c2ab4cfa74618bcc', 'src/third_party/dart/third_party/pkg/native': - Var('dart_git') + '/native.git@a5d88093017f5cecf30978a823fe6a8a2ebb8ca5', + Var('dart_git') + '/native.git@be4aaf7b849a64d67756c95b6270b9bfe47f3c7d', 'src/third_party/dart/third_party/pkg/package_config': Var('dart_git') + '/package_config.git@ae7ad83de97aba507fd05e97cc372bc6695c1759', diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index a22502d012816..f463b1c0dbf13 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: 601fdb9dd42612ba699cbf0563a3c257 +Signature: fdaa9367efe1c4a57d9abc0eb91db374 ==================================================================================================== LIBRARY: dart @@ -4501,6 +4501,7 @@ ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/string_helper.dart ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/string_stringref_patch.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/sync_star_patch.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/typed_data.dart + ../../../third_party/dart/LICENSE +ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/wasm_types_patch.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/weak_patch.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm_js_compatibility/lib/typed_data.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm_js_compatibility/lib/typed_data_patch.dart + ../../../third_party/dart/LICENSE @@ -4549,6 +4550,7 @@ FILE: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/string_helper.dart FILE: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/string_stringref_patch.dart FILE: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/sync_star_patch.dart FILE: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/typed_data.dart +FILE: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/wasm_types_patch.dart FILE: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/weak_patch.dart FILE: ../../../third_party/dart/sdk/lib/_internal/wasm_js_compatibility/lib/typed_data.dart FILE: ../../../third_party/dart/sdk/lib/_internal/wasm_js_compatibility/lib/typed_data_patch.dart From 8bbbd5db93cb0da3676b77ac627d202925af1bd6 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 28 Sep 2023 12:05:04 -0400 Subject: [PATCH 350/859] Roll Skia from bcbcb109bad6 to d8a71d549262 (1 revision) (#46367) https://skia.googlesource.com/skia.git/+log/bcbcb109bad6..d8a71d549262 2023-09-28 jmbetancourt@google.com expose getSlotInfo to JS skottie bindings If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index acdaa861aeafa..99d35b877d35e 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'bcbcb109bad669fcaf063f95916d67c3459b2097', + 'skia_revision': 'd8a71d549262a41161908ea54790fa9ab10dc7ac', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 6d7b50e3f4049..64b87cc1a193f 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 3e19909ad278fb496d69dbe776a0e0e8 +Signature: eca53560b3fc7923df8e91b89c6a742d ==================================================================================================== LIBRARY: etc1 From 1e94d4dcb06f63b5eb73a6835d7b6e0216489e49 Mon Sep 17 00:00:00 2001 From: Matej Knopp Date: Thu, 28 Sep 2023 19:28:47 +0200 Subject: [PATCH 351/859] [macOS] performKeyEquivalent cleanup (#45946) https://github.com/flutter/engine/pull/40706 added a duplicate `NSEvent (KeyEquivalentMarker)` category. This PR removes it. It also removes the call to `markAsKeyEquivalent` from `FlutterViewController`. That call is internal to `FlutterTextInputPlugin` and classes outside should not be calling it. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- .../framework/Source/FlutterViewController.mm | 51 +++---------------- .../Source/FlutterViewControllerTest.mm | 7 +++ 2 files changed, 14 insertions(+), 44 deletions(-) diff --git a/shell/platform/darwin/macos/framework/Source/FlutterViewController.mm b/shell/platform/darwin/macos/framework/Source/FlutterViewController.mm index 5c22fe6c01d71..7e7e0c9cc684c 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterViewController.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterViewController.mm @@ -164,8 +164,6 @@ @interface FlutterViewWrapper : NSView - (void)setBackgroundColor:(NSColor*)color; -- (BOOL)performKeyEquivalent:(NSEvent*)event; - @end /** @@ -242,37 +240,6 @@ - (void)onKeyboardLayoutChanged; @end -#pragma mark - NSEvent (KeyEquivalentMarker) protocol - -@interface NSEvent (KeyEquivalentMarker) - -// Internally marks that the event was received through performKeyEquivalent:. -// When text editing is active, keyboard events that have modifier keys pressed -// are received through performKeyEquivalent: instead of keyDown:. If such event -// is passed to TextInputContext but doesn't result in a text editing action it -// needs to be forwarded by FlutterKeyboardManager to the next responder. -- (void)markAsKeyEquivalent; - -// Returns YES if the event is marked as a key equivalent. -- (BOOL)isKeyEquivalent; - -@end - -@implementation NSEvent (KeyEquivalentMarker) - -// This field doesn't need a value because only its address is used as a unique identifier. -static char markerKey; - -- (void)markAsKeyEquivalent { - objc_setAssociatedObject(self, &markerKey, @true, OBJC_ASSOCIATION_RETAIN); -} - -- (BOOL)isKeyEquivalent { - return [objc_getAssociatedObject(self, &markerKey) boolValue] == YES; -} - -@end - #pragma mark - Private dependant functions namespace { @@ -312,19 +279,15 @@ - (void)setBackgroundColor:(NSColor*)color { } - (BOOL)performKeyEquivalent:(NSEvent*)event { - if ([_controller isDispatchingKeyEvent:event]) { - // When NSWindow is nextResponder, keyboard manager will send to it - // unhandled events (through [NSWindow keyDown:]). If event has both - // control and cmd modifiers set (i.e. cmd+control+space - emoji picker) - // NSWindow will then send this event as performKeyEquivalent: to first - // responder, which might be FlutterTextInputPlugin. If that's the case, the - // plugin must not handle the event, otherwise the emoji picker would not - // work (due to first responder returning YES from performKeyEquivalent:) - // and there would be an infinite loop, because FlutterViewController will - // send the event back to [keyboardManager handleEvent:]. + // Do not intercept the event if flutterView is not first responder, otherwise this would + // interfere with TextInputPlugin, which also handles key equivalents. + // + // Also do not intercept the event if key equivalent is a product of an event being + // redispatched by the TextInputPlugin, in which case it needs to bubble up so that menus + // can handle key equivalents. + if (self.window.firstResponder != _flutterView || [_controller isDispatchingKeyEvent:event]) { return NO; } - [event markAsKeyEquivalent]; [_flutterView keyDown:event]; return YES; } diff --git a/shell/platform/darwin/macos/framework/Source/FlutterViewControllerTest.mm b/shell/platform/darwin/macos/framework/Source/FlutterViewControllerTest.mm index 7894e9258b9ef..7c0a96a1f8920 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterViewControllerTest.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterViewControllerTest.mm @@ -331,6 +331,13 @@ - (bool)testCtrlTabKeyEventIsPropagated { const uint64_t kPhysicalKeyTab = 0x7002b; [viewController viewWillAppear]; // Initializes the event channel. + // Creates a NSWindow so that FlutterView view can be first responder. + NSWindow* window = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 800, 600) + styleMask:NSBorderlessWindowMask + backing:NSBackingStoreBuffered + defer:NO]; + window.contentView = viewController.view; + [window makeFirstResponder:viewController.flutterView]; [viewController.view performKeyEquivalent:event]; EXPECT_TRUE(called); From a72958fb38626752832479140500100032350a3d Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Thu, 28 Sep 2023 18:45:11 +0100 Subject: [PATCH 352/859] Revert "[macOS] performKeyEquivalent cleanup (#45946)" (#46374) This broke some keyboard shortcut handling (e.g. cmd-a to select all). This reverts commit 0087948c0f843c5d18952ec0b2fbb0ad12f54dc9. ## Pre-launch Checklist - [ ] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [ ] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [ ] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [ ] I listed at least one issue that this PR fixes in the description above. - [ ] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [ ] I updated/added relevant documentation (doc comments with `///`). - [ ] I signed the [CLA]. - [ ] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat --- .../framework/Source/FlutterViewController.mm | 51 ++++++++++++++++--- .../Source/FlutterViewControllerTest.mm | 7 --- 2 files changed, 44 insertions(+), 14 deletions(-) diff --git a/shell/platform/darwin/macos/framework/Source/FlutterViewController.mm b/shell/platform/darwin/macos/framework/Source/FlutterViewController.mm index 7e7e0c9cc684c..5c22fe6c01d71 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterViewController.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterViewController.mm @@ -164,6 +164,8 @@ @interface FlutterViewWrapper : NSView - (void)setBackgroundColor:(NSColor*)color; +- (BOOL)performKeyEquivalent:(NSEvent*)event; + @end /** @@ -240,6 +242,37 @@ - (void)onKeyboardLayoutChanged; @end +#pragma mark - NSEvent (KeyEquivalentMarker) protocol + +@interface NSEvent (KeyEquivalentMarker) + +// Internally marks that the event was received through performKeyEquivalent:. +// When text editing is active, keyboard events that have modifier keys pressed +// are received through performKeyEquivalent: instead of keyDown:. If such event +// is passed to TextInputContext but doesn't result in a text editing action it +// needs to be forwarded by FlutterKeyboardManager to the next responder. +- (void)markAsKeyEquivalent; + +// Returns YES if the event is marked as a key equivalent. +- (BOOL)isKeyEquivalent; + +@end + +@implementation NSEvent (KeyEquivalentMarker) + +// This field doesn't need a value because only its address is used as a unique identifier. +static char markerKey; + +- (void)markAsKeyEquivalent { + objc_setAssociatedObject(self, &markerKey, @true, OBJC_ASSOCIATION_RETAIN); +} + +- (BOOL)isKeyEquivalent { + return [objc_getAssociatedObject(self, &markerKey) boolValue] == YES; +} + +@end + #pragma mark - Private dependant functions namespace { @@ -279,15 +312,19 @@ - (void)setBackgroundColor:(NSColor*)color { } - (BOOL)performKeyEquivalent:(NSEvent*)event { - // Do not intercept the event if flutterView is not first responder, otherwise this would - // interfere with TextInputPlugin, which also handles key equivalents. - // - // Also do not intercept the event if key equivalent is a product of an event being - // redispatched by the TextInputPlugin, in which case it needs to bubble up so that menus - // can handle key equivalents. - if (self.window.firstResponder != _flutterView || [_controller isDispatchingKeyEvent:event]) { + if ([_controller isDispatchingKeyEvent:event]) { + // When NSWindow is nextResponder, keyboard manager will send to it + // unhandled events (through [NSWindow keyDown:]). If event has both + // control and cmd modifiers set (i.e. cmd+control+space - emoji picker) + // NSWindow will then send this event as performKeyEquivalent: to first + // responder, which might be FlutterTextInputPlugin. If that's the case, the + // plugin must not handle the event, otherwise the emoji picker would not + // work (due to first responder returning YES from performKeyEquivalent:) + // and there would be an infinite loop, because FlutterViewController will + // send the event back to [keyboardManager handleEvent:]. return NO; } + [event markAsKeyEquivalent]; [_flutterView keyDown:event]; return YES; } diff --git a/shell/platform/darwin/macos/framework/Source/FlutterViewControllerTest.mm b/shell/platform/darwin/macos/framework/Source/FlutterViewControllerTest.mm index 7c0a96a1f8920..7894e9258b9ef 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterViewControllerTest.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterViewControllerTest.mm @@ -331,13 +331,6 @@ - (bool)testCtrlTabKeyEventIsPropagated { const uint64_t kPhysicalKeyTab = 0x7002b; [viewController viewWillAppear]; // Initializes the event channel. - // Creates a NSWindow so that FlutterView view can be first responder. - NSWindow* window = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 800, 600) - styleMask:NSBorderlessWindowMask - backing:NSBackingStoreBuffered - defer:NO]; - window.contentView = viewController.view; - [window makeFirstResponder:viewController.flutterView]; [viewController.view performKeyEquivalent:event]; EXPECT_TRUE(called); From ad55a0adea2e45245176817dbd70ae20a5e9bf8b Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 28 Sep 2023 14:44:14 -0400 Subject: [PATCH 353/859] Roll Skia from d8a71d549262 to 33502f9b0c7d (2 revisions) (#46375) https://skia.googlesource.com/skia.git/+log/d8a71d549262..33502f9b0c7d 2023-09-28 michaelludwig@google.com Revert "[skif] Draw FilterResults directly for layer restoration" 2023-09-28 michaelludwig@google.com [skif] Draw FilterResults directly for layer restoration If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 99d35b877d35e..7fa2d975ae7ee 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'd8a71d549262a41161908ea54790fa9ab10dc7ac', + 'skia_revision': '33502f9b0c7d845adceb4907d1c7dc1f22b3fd4c', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From eec1b07425527a37aea09667e9b7967c2142f863 Mon Sep 17 00:00:00 2001 From: Matej Knopp Date: Thu, 28 Sep 2023 21:05:55 +0200 Subject: [PATCH 354/859] [macOS] FlutterTextInputPlugin should clip to bounds (#46142) Fixes https://github.com/flutter/flutter/issues/135219 (formerly https://github.com/flutter/flutter/issues/128956) [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- .../darwin/macos/framework/Source/FlutterTextInputPlugin.h | 5 +++++ .../darwin/macos/framework/Source/FlutterTextInputPlugin.mm | 1 + .../macos/framework/Source/FlutterTextInputPluginTest.mm | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.h b/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.h index dedfc661884f6..70a8ff5156068 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.h +++ b/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.h @@ -9,6 +9,11 @@ @class FlutterTextField; +@interface NSView (ClipsToBounds) +// This property is available since macOS 10.9 but only declared in macOS 14 SDK. +@property BOOL clipsToBounds API_AVAILABLE(macos(10.9)); +@end + /** * A plugin to handle text input. * diff --git a/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.mm b/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.mm index f6460f2309f37..1d195efe26326 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.mm @@ -342,6 +342,7 @@ - (instancetype)initWithViewController:(FlutterViewController*)viewController { // The view needs an empty frame otherwise it is visible on dark background. // https://github.com/flutter/flutter/issues/118504 self = [super initWithFrame:NSZeroRect]; + self.clipsToBounds = YES; if (self != nil) { _flutterViewController = viewController; _channel = [FlutterMethodChannel methodChannelWithName:kTextInputChannel diff --git a/shell/platform/darwin/macos/framework/Source/FlutterTextInputPluginTest.mm b/shell/platform/darwin/macos/framework/Source/FlutterTextInputPluginTest.mm index 00bbb68dc69ae..9c656c0ca9601 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterTextInputPluginTest.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterTextInputPluginTest.mm @@ -1962,7 +1962,7 @@ - (bool)testSelectorsAreForwardedToFramework { ASSERT_FALSE(window.firstResponder == viewController.textInputPlugin); } -TEST(FlutterTextInputPluginTest, HasZeroSize) { +TEST(FlutterTextInputPluginTest, HasZeroSizeAndClipsToBounds) { id engineMock = flutter::testing::CreateMockFlutterEngine(@""); id binaryMessengerMock = OCMProtocolMock(@protocol(FlutterBinaryMessenger)); OCMStub( // NOLINT(google-objc-avoid-throwing-exception) @@ -1977,6 +1977,7 @@ - (bool)testSelectorsAreForwardedToFramework { [[FlutterTextInputPlugin alloc] initWithViewController:viewController]; ASSERT_TRUE(NSIsEmptyRect(plugin.frame)); + ASSERT_TRUE(plugin.clipsToBounds); } } // namespace flutter::testing From 71b214e4443569bffc1ea62ac257af58f2d4f0bf Mon Sep 17 00:00:00 2001 From: AJI Date: Fri, 29 Sep 2023 04:06:51 +0800 Subject: [PATCH 355/859] Fix damage calculation when not providing populate_existing_damage for gl embedder (#45611) # Description This PR fixes the `gl_populate_existing_damage` in embedder.cc, which currently returns an empty rectangle when a full repaint is needed. This leads to the `frame_damage` being considered empty in rasterizer.cc, causing incorrect partial repaint within Flutter when `gl_populate_existing_damage` is not provided by the embedder. # Related Issue https://github.com/flutter/flutter/issues/119601 # Tests Add a new test. Also fixes damage calculation related tests in EmbedderTest by * Use a new Dart embedder fixture entry point `render_gradient_retained` which retains the old layer to make sure layer tree diff happens. * Add `latch.Wait()` after `SetGLPresentCallback` to make sure assertions have been executed. * Make `existing_damage_rects` static since it should be valid after `populate_existing_damage` returns. --- shell/gpu/gpu_surface_gl_delegate.h | 2 - .../android/android_surface_gl_skia.cc | 1 - shell/platform/embedder/embedder.cc | 22 +- shell/platform/embedder/fixtures/main.dart | 22 ++ .../embedder/tests/embedder_gl_unittests.cc | 213 ++++++++++++++++-- 5 files changed, 220 insertions(+), 40 deletions(-) diff --git a/shell/gpu/gpu_surface_gl_delegate.h b/shell/gpu/gpu_surface_gl_delegate.h index dee0c682969a0..39a58e6a708a6 100644 --- a/shell/gpu/gpu_surface_gl_delegate.h +++ b/shell/gpu/gpu_surface_gl_delegate.h @@ -27,8 +27,6 @@ struct GLFrameInfo { struct GLFBOInfo { // The frame buffer's ID. uint32_t fbo_id; - // This boolean flags whether the returned FBO supports partial repaint. - const bool partial_repaint_enabled; // The frame buffer's existing damage (i.e. damage since it was last used). const std::optional existing_damage; }; diff --git a/shell/platform/android/android_surface_gl_skia.cc b/shell/platform/android/android_surface_gl_skia.cc index d6ec0c3cf3d96..6a5dda8a06082 100644 --- a/shell/platform/android/android_surface_gl_skia.cc +++ b/shell/platform/android/android_surface_gl_skia.cc @@ -166,7 +166,6 @@ GLFBOInfo AndroidSurfaceGLSkia::GLContextFBO(GLFrameInfo frame_info) const { // The default window bound framebuffer on Android. return GLFBOInfo{ .fbo_id = 0, - .partial_repaint_enabled = onscreen_surface_->SupportsPartialRepaint(), .existing_damage = onscreen_surface_->InitialDamage(), }; } diff --git a/shell/platform/embedder/embedder.cc b/shell/platform/embedder/embedder.cc index eb6b4edb85bbf..972390e7c3e8e 100644 --- a/shell/platform/embedder/embedder.cc +++ b/shell/platform/embedder/embedder.cc @@ -363,8 +363,7 @@ InferOpenGLPlatformViewCreationCallback( if (!populate_existing_damage) { return flutter::GLFBOInfo{ .fbo_id = static_cast(id), - .partial_repaint_enabled = false, - .existing_damage = SkIRect::MakeEmpty(), + .existing_damage = std::nullopt, }; } @@ -372,29 +371,22 @@ InferOpenGLPlatformViewCreationCallback( FlutterDamage existing_damage; populate_existing_damage(user_data, id, &existing_damage); - bool partial_repaint_enabled = true; - SkIRect existing_damage_rect; + std::optional existing_damage_rect = std::nullopt; // Verify that at least one damage rectangle was provided. if (existing_damage.num_rects <= 0 || existing_damage.damage == nullptr) { FML_LOG(INFO) << "No damage was provided. Forcing full repaint."; - existing_damage_rect = SkIRect::MakeEmpty(); - partial_repaint_enabled = false; - } else if (existing_damage.num_rects > 1) { - // Log message notifying users that multi-damage is not yet available in - // case they try to make use of it. - FML_LOG(INFO) << "Damage with multiple rectangles not yet supported. " - "Repainting the whole frame."; - existing_damage_rect = SkIRect::MakeEmpty(); - partial_repaint_enabled = false; } else { - existing_damage_rect = FlutterRectToSkIRect(*(existing_damage.damage)); + existing_damage_rect = SkIRect::MakeEmpty(); + for (size_t i = 0; i < existing_damage.num_rects; i++) { + existing_damage_rect->join( + FlutterRectToSkIRect(existing_damage.damage[i])); + } } // Pass the information about this FBO to the rendering backend. return flutter::GLFBOInfo{ .fbo_id = static_cast(id), - .partial_repaint_enabled = partial_repaint_enabled, .existing_damage = existing_damage_rect, }; }; diff --git a/shell/platform/embedder/fixtures/main.dart b/shell/platform/embedder/fixtures/main.dart index c48de1daaab81..81cc224868c11 100644 --- a/shell/platform/embedder/fixtures/main.dart +++ b/shell/platform/embedder/fixtures/main.dart @@ -1298,3 +1298,25 @@ void channel_listener_response() async { }); signalNativeTest(); } + +@pragma('vm:entry-point') +void render_gradient_retained() { + OffsetEngineLayer? offsetLayer; // Retain the offset layer. + PlatformDispatcher.instance.onBeginFrame = (Duration duration) { + Size size = Size(800.0, 600.0); + + SceneBuilder builder = SceneBuilder(); + + offsetLayer = builder.pushOffset(0.0, 0.0, oldLayer: offsetLayer); + + // display_list_layer will comparing the display_list + // no need to retain the picture + builder.addPicture( + Offset(0.0, 0.0), CreateGradientBox(size)); // gradient - flutter + + builder.pop(); + + PlatformDispatcher.instance.views.first.render(builder.build()); + }; + PlatformDispatcher.instance.scheduleFrame(); +} diff --git a/shell/platform/embedder/tests/embedder_gl_unittests.cc b/shell/platform/embedder/tests/embedder_gl_unittests.cc index d233f836d9a74..dfca7ff6fb8a0 100644 --- a/shell/platform/embedder/tests/embedder_gl_unittests.cc +++ b/shell/platform/embedder/tests/embedder_gl_unittests.cc @@ -3655,7 +3655,7 @@ TEST_F(EmbedderTest, EmbedderConfigBuilder builder(context); builder.SetOpenGLRendererConfig(SkISize::Make(800, 600)); - builder.SetDartEntrypoint("render_gradient"); + builder.SetDartEntrypoint("render_gradient_retained"); builder.GetRendererConfig().open_gl.populate_existing_damage = [](void* context, const intptr_t id, FlutterDamage* existing_damage) -> void { @@ -3668,7 +3668,8 @@ TEST_F(EmbedderTest, .SetGLPopulateExistingDamageCallback( [](const intptr_t id, FlutterDamage* existing_damage_ptr) { const size_t num_rects = 1; - FlutterRect existing_damage_rects[num_rects] = { + // The array must be valid after the callback returns. + static FlutterRect existing_damage_rects[num_rects] = { FlutterRect{0, 0, 800, 600}}; existing_damage_ptr->num_rects = num_rects; existing_damage_ptr->damage = existing_damage_rects; @@ -3677,9 +3678,11 @@ TEST_F(EmbedderTest, auto engine = builder.LaunchEngine(); ASSERT_TRUE(engine.is_valid()); + fml::AutoResetWaitableEvent latch; + // First frame should be entirely rerendered. static_cast(context).SetGLPresentCallback( - [](FlutterPresentInfo present_info) { + [&](FlutterPresentInfo present_info) { const size_t num_rects = 1; ASSERT_EQ(present_info.frame_damage.num_rects, num_rects); ASSERT_EQ(present_info.frame_damage.damage->left, 0); @@ -3692,6 +3695,8 @@ TEST_F(EmbedderTest, ASSERT_EQ(present_info.buffer_damage.damage->top, 0); ASSERT_EQ(present_info.buffer_damage.damage->right, 800); ASSERT_EQ(present_info.buffer_damage.damage->bottom, 600); + + latch.Signal(); }); // Send a window metrics events so frames may be scheduled. @@ -3702,12 +3707,13 @@ TEST_F(EmbedderTest, event.pixel_ratio = 1.0; ASSERT_EQ(FlutterEngineSendWindowMetricsEvent(engine.get(), &event), kSuccess); + latch.Wait(); // Because it's the same as the first frame, the second frame damage should // be empty but, because there was a full existing buffer damage, the buffer // damage should be the entire screen. static_cast(context).SetGLPresentCallback( - [](FlutterPresentInfo present_info) { + [&](FlutterPresentInfo present_info) { const size_t num_rects = 1; ASSERT_EQ(present_info.frame_damage.num_rects, num_rects); ASSERT_EQ(present_info.frame_damage.damage->left, 0); @@ -3720,10 +3726,13 @@ TEST_F(EmbedderTest, ASSERT_EQ(present_info.buffer_damage.damage->top, 0); ASSERT_EQ(present_info.buffer_damage.damage->right, 800); ASSERT_EQ(present_info.buffer_damage.damage->bottom, 600); + + latch.Signal(); }); ASSERT_EQ(FlutterEngineSendWindowMetricsEvent(engine.get(), &event), kSuccess); + latch.Wait(); } TEST_F(EmbedderTest, PresentInfoReceivesEmptyDamage) { @@ -3731,7 +3740,7 @@ TEST_F(EmbedderTest, PresentInfoReceivesEmptyDamage) { EmbedderConfigBuilder builder(context); builder.SetOpenGLRendererConfig(SkISize::Make(800, 600)); - builder.SetDartEntrypoint("render_gradient"); + builder.SetDartEntrypoint("render_gradient_retained"); builder.GetRendererConfig().open_gl.populate_existing_damage = [](void* context, const intptr_t id, FlutterDamage* existing_damage) -> void { @@ -3744,7 +3753,8 @@ TEST_F(EmbedderTest, PresentInfoReceivesEmptyDamage) { .SetGLPopulateExistingDamageCallback( [](const intptr_t id, FlutterDamage* existing_damage_ptr) { const size_t num_rects = 1; - FlutterRect existing_damage_rects[num_rects] = { + // The array must be valid after the callback returns. + static FlutterRect existing_damage_rects[num_rects] = { FlutterRect{0, 0, 0, 0}}; existing_damage_ptr->num_rects = num_rects; existing_damage_ptr->damage = existing_damage_rects; @@ -3753,9 +3763,11 @@ TEST_F(EmbedderTest, PresentInfoReceivesEmptyDamage) { auto engine = builder.LaunchEngine(); ASSERT_TRUE(engine.is_valid()); + fml::AutoResetWaitableEvent latch; + // First frame should be entirely rerendered. static_cast(context).SetGLPresentCallback( - [](FlutterPresentInfo present_info) { + [&](FlutterPresentInfo present_info) { const size_t num_rects = 1; ASSERT_EQ(present_info.frame_damage.num_rects, num_rects); ASSERT_EQ(present_info.frame_damage.damage->left, 0); @@ -3768,6 +3780,8 @@ TEST_F(EmbedderTest, PresentInfoReceivesEmptyDamage) { ASSERT_EQ(present_info.buffer_damage.damage->top, 0); ASSERT_EQ(present_info.buffer_damage.damage->right, 800); ASSERT_EQ(present_info.buffer_damage.damage->bottom, 600); + + latch.Signal(); }); // Send a window metrics events so frames may be scheduled. @@ -3778,11 +3792,12 @@ TEST_F(EmbedderTest, PresentInfoReceivesEmptyDamage) { event.pixel_ratio = 1.0; ASSERT_EQ(FlutterEngineSendWindowMetricsEvent(engine.get(), &event), kSuccess); + latch.Wait(); // Because it's the same as the first frame, the second frame should not be // rerendered assuming there is no existing damage. static_cast(context).SetGLPresentCallback( - [](FlutterPresentInfo present_info) { + [&](FlutterPresentInfo present_info) { const size_t num_rects = 1; ASSERT_EQ(present_info.frame_damage.num_rects, num_rects); ASSERT_EQ(present_info.frame_damage.damage->left, 0); @@ -3795,10 +3810,13 @@ TEST_F(EmbedderTest, PresentInfoReceivesEmptyDamage) { ASSERT_EQ(present_info.buffer_damage.damage->top, 0); ASSERT_EQ(present_info.buffer_damage.damage->right, 0); ASSERT_EQ(present_info.buffer_damage.damage->bottom, 0); + + latch.Signal(); }); ASSERT_EQ(FlutterEngineSendWindowMetricsEvent(engine.get(), &event), kSuccess); + latch.Wait(); } TEST_F(EmbedderTest, PresentInfoReceivesPartialDamage) { @@ -3806,7 +3824,7 @@ TEST_F(EmbedderTest, PresentInfoReceivesPartialDamage) { EmbedderConfigBuilder builder(context); builder.SetOpenGLRendererConfig(SkISize::Make(800, 600)); - builder.SetDartEntrypoint("render_gradient"); + builder.SetDartEntrypoint("render_gradient_retained"); builder.GetRendererConfig().open_gl.populate_existing_damage = [](void* context, const intptr_t id, FlutterDamage* existing_damage) -> void { @@ -3817,9 +3835,10 @@ TEST_F(EmbedderTest, PresentInfoReceivesPartialDamage) { // Return existing damage as only part of the screen on purpose. static_cast(context) .SetGLPopulateExistingDamageCallback( - [](const intptr_t id, FlutterDamage* existing_damage_ptr) { + [&](const intptr_t id, FlutterDamage* existing_damage_ptr) { const size_t num_rects = 1; - FlutterRect existing_damage_rects[num_rects] = { + // The array must be valid after the callback returns. + static FlutterRect existing_damage_rects[num_rects] = { FlutterRect{200, 150, 400, 300}}; existing_damage_ptr->num_rects = num_rects; existing_damage_ptr->damage = existing_damage_rects; @@ -3828,9 +3847,11 @@ TEST_F(EmbedderTest, PresentInfoReceivesPartialDamage) { auto engine = builder.LaunchEngine(); ASSERT_TRUE(engine.is_valid()); + fml::AutoResetWaitableEvent latch; + // First frame should be entirely rerendered. static_cast(context).SetGLPresentCallback( - [](FlutterPresentInfo present_info) { + [&](FlutterPresentInfo present_info) { const size_t num_rects = 1; ASSERT_EQ(present_info.frame_damage.num_rects, num_rects); ASSERT_EQ(present_info.frame_damage.damage->left, 0); @@ -3843,6 +3864,8 @@ TEST_F(EmbedderTest, PresentInfoReceivesPartialDamage) { ASSERT_EQ(present_info.buffer_damage.damage->top, 0); ASSERT_EQ(present_info.buffer_damage.damage->right, 800); ASSERT_EQ(present_info.buffer_damage.damage->bottom, 600); + + latch.Signal(); }); // Send a window metrics events so frames may be scheduled. @@ -3853,12 +3876,13 @@ TEST_F(EmbedderTest, PresentInfoReceivesPartialDamage) { event.pixel_ratio = 1.0; ASSERT_EQ(FlutterEngineSendWindowMetricsEvent(engine.get(), &event), kSuccess); + latch.Wait(); // Because it's the same as the first frame, the second frame damage should be // empty but, because there was a partial existing damage, the buffer damage // should represent that partial damage area. static_cast(context).SetGLPresentCallback( - [](FlutterPresentInfo present_info) { + [&](FlutterPresentInfo present_info) { const size_t num_rects = 1; ASSERT_EQ(present_info.frame_damage.num_rects, num_rects); ASSERT_EQ(present_info.frame_damage.damage->left, 0); @@ -3871,10 +3895,13 @@ TEST_F(EmbedderTest, PresentInfoReceivesPartialDamage) { ASSERT_EQ(present_info.buffer_damage.damage->top, 150); ASSERT_EQ(present_info.buffer_damage.damage->right, 400); ASSERT_EQ(present_info.buffer_damage.damage->bottom, 300); + + latch.Signal(); }); ASSERT_EQ(FlutterEngineSendWindowMetricsEvent(engine.get(), &event), kSuccess); + latch.Wait(); } TEST_F(EmbedderTest, PopulateExistingDamageReceivesValidID) { @@ -3882,7 +3909,7 @@ TEST_F(EmbedderTest, PopulateExistingDamageReceivesValidID) { EmbedderConfigBuilder builder(context); builder.SetOpenGLRendererConfig(SkISize::Make(800, 600)); - builder.SetDartEntrypoint("render_gradient"); + builder.SetDartEntrypoint("render_gradient_retained"); builder.GetRendererConfig().open_gl.populate_existing_damage = [](void* context, const intptr_t id, FlutterDamage* existing_damage) -> void { @@ -3900,6 +3927,8 @@ TEST_F(EmbedderTest, PopulateExistingDamageReceivesValidID) { [window_fbo_id = window_fbo_id](intptr_t id, FlutterDamage* existing_damage) { ASSERT_EQ(id, window_fbo_id); + existing_damage->num_rects = 0; + existing_damage->damage = nullptr; }); // Send a window metrics events so frames may be scheduled. @@ -3917,7 +3946,7 @@ TEST_F(EmbedderTest, PopulateExistingDamageReceivesInvalidID) { EmbedderConfigBuilder builder(context); builder.SetOpenGLRendererConfig(SkISize::Make(800, 600)); - builder.SetDartEntrypoint("render_gradient"); + builder.SetDartEntrypoint("render_gradient_retained"); builder.GetRendererConfig().open_gl.populate_existing_damage = [](void* context, const intptr_t id, FlutterDamage* existing_damage) -> void { @@ -3946,6 +3975,8 @@ TEST_F(EmbedderTest, PopulateExistingDamageReceivesInvalidID) { [window_fbo_id = window_fbo_id](intptr_t id, FlutterDamage* existing_damage) { ASSERT_NE(id, window_fbo_id); + existing_damage->num_rects = 0; + existing_damage->damage = nullptr; }); // Send a window metrics events so frames may be scheduled. @@ -4510,24 +4541,162 @@ TEST_F(EmbedderTest, ExternalTextureGLRefreshedTooOften) { glFinish(); } -TEST_F(EmbedderTest, - PresentInfoReceivesNoDamageWhenPopulateExistingDamageIsUndefined) { +TEST_F( + EmbedderTest, + PresentInfoReceivesFullScreenDamageWhenPopulateExistingDamageIsNotProvided) { auto& context = GetEmbedderContext(EmbedderTestContextType::kOpenGLContext); EmbedderConfigBuilder builder(context); builder.SetOpenGLRendererConfig(SkISize::Make(800, 600)); - builder.SetDartEntrypoint("render_gradient"); + builder.SetDartEntrypoint("render_gradient_retained"); builder.GetRendererConfig().open_gl.populate_existing_damage = nullptr; auto engine = builder.LaunchEngine(); ASSERT_TRUE(engine.is_valid()); - // No damage should be passed. + fml::AutoResetWaitableEvent latch; + + // First frame should be entirely rerendered. + static_cast(context).SetGLPresentCallback( + [&](FlutterPresentInfo present_info) { + const size_t num_rects = 1; + ASSERT_EQ(present_info.frame_damage.num_rects, num_rects); + ASSERT_EQ(present_info.frame_damage.damage->left, 0); + ASSERT_EQ(present_info.frame_damage.damage->top, 0); + ASSERT_EQ(present_info.frame_damage.damage->right, 800); + ASSERT_EQ(present_info.frame_damage.damage->bottom, 600); + + ASSERT_EQ(present_info.buffer_damage.num_rects, num_rects); + ASSERT_EQ(present_info.buffer_damage.damage->left, 0); + ASSERT_EQ(present_info.buffer_damage.damage->top, 0); + ASSERT_EQ(present_info.buffer_damage.damage->right, 800); + ASSERT_EQ(present_info.buffer_damage.damage->bottom, 600); + + latch.Signal(); + }); + + // Send a window metrics events so frames may be scheduled. + FlutterWindowMetricsEvent event = {}; + event.struct_size = sizeof(event); + event.width = 800; + event.height = 600; + event.pixel_ratio = 1.0; + ASSERT_EQ(FlutterEngineSendWindowMetricsEvent(engine.get(), &event), + kSuccess); + latch.Wait(); + + // Since populate_existing_damage is not provided, the partial repaint + // functionality is actually disabled. So, the next frame should be entirely + // new frame. + static_cast(context).SetGLPresentCallback( + [&](FlutterPresentInfo present_info) { + const size_t num_rects = 1; + ASSERT_EQ(present_info.frame_damage.num_rects, num_rects); + ASSERT_EQ(present_info.frame_damage.damage->left, 0); + ASSERT_EQ(present_info.frame_damage.damage->top, 0); + ASSERT_EQ(present_info.frame_damage.damage->right, 800); + ASSERT_EQ(present_info.frame_damage.damage->bottom, 600); + + ASSERT_EQ(present_info.buffer_damage.num_rects, num_rects); + ASSERT_EQ(present_info.buffer_damage.damage->left, 0); + ASSERT_EQ(present_info.buffer_damage.damage->top, 0); + ASSERT_EQ(present_info.buffer_damage.damage->right, 800); + ASSERT_EQ(present_info.buffer_damage.damage->bottom, 600); + + latch.Signal(); + }); + + ASSERT_EQ(FlutterEngineSendWindowMetricsEvent(engine.get(), &event), + kSuccess); + latch.Wait(); +} + +TEST_F(EmbedderTest, + PresentInfoReceivesJoinedDamageWhenExistingDamageContainsMultipleRects) { + auto& context = GetEmbedderContext(EmbedderTestContextType::kOpenGLContext); + + EmbedderConfigBuilder builder(context); + builder.SetOpenGLRendererConfig(SkISize::Make(800, 600)); + builder.SetDartEntrypoint("render_gradient_retained"); + builder.GetRendererConfig().open_gl.populate_existing_damage = + [](void* context, const intptr_t id, + FlutterDamage* existing_damage) -> void { + return reinterpret_cast(context) + ->GLPopulateExistingDamage(id, existing_damage); + }; + + // Return existing damage as the entire screen on purpose. + static_cast(context) + .SetGLPopulateExistingDamageCallback( + [](const intptr_t id, FlutterDamage* existing_damage_ptr) { + const size_t num_rects = 2; + // The array must be valid after the callback returns. + static FlutterRect existing_damage_rects[num_rects] = { + FlutterRect{100, 150, 200, 250}, + FlutterRect{200, 250, 300, 350}, + }; + existing_damage_ptr->num_rects = num_rects; + existing_damage_ptr->damage = existing_damage_rects; + }); + + auto engine = builder.LaunchEngine(); + ASSERT_TRUE(engine.is_valid()); + + fml::AutoResetWaitableEvent latch; + + // First frame should be entirely rerendered. static_cast(context).SetGLPresentCallback( - [](FlutterPresentInfo present_info) { - ASSERT_EQ(present_info.frame_damage.damage, nullptr); - ASSERT_EQ(present_info.buffer_damage.damage, nullptr); + [&](FlutterPresentInfo present_info) { + const size_t num_rects = 1; + ASSERT_EQ(present_info.frame_damage.num_rects, num_rects); + ASSERT_EQ(present_info.frame_damage.damage->left, 0); + ASSERT_EQ(present_info.frame_damage.damage->top, 0); + ASSERT_EQ(present_info.frame_damage.damage->right, 800); + ASSERT_EQ(present_info.frame_damage.damage->bottom, 600); + + ASSERT_EQ(present_info.buffer_damage.num_rects, num_rects); + ASSERT_EQ(present_info.buffer_damage.damage->left, 0); + ASSERT_EQ(present_info.buffer_damage.damage->top, 0); + ASSERT_EQ(present_info.buffer_damage.damage->right, 800); + ASSERT_EQ(present_info.buffer_damage.damage->bottom, 600); + + latch.Signal(); }); + + // Send a window metrics events so frames may be scheduled. + FlutterWindowMetricsEvent event = {}; + event.struct_size = sizeof(event); + event.width = 800; + event.height = 600; + event.pixel_ratio = 1.0; + ASSERT_EQ(FlutterEngineSendWindowMetricsEvent(engine.get(), &event), + kSuccess); + latch.Wait(); + + // Because it's the same as the first frame, the second frame damage should + // be empty but, because there was a full existing buffer damage, the buffer + // damage should be the entire screen. + static_cast(context).SetGLPresentCallback( + [&](FlutterPresentInfo present_info) { + const size_t num_rects = 1; + ASSERT_EQ(present_info.frame_damage.num_rects, num_rects); + ASSERT_EQ(present_info.frame_damage.damage->left, 0); + ASSERT_EQ(present_info.frame_damage.damage->top, 0); + ASSERT_EQ(present_info.frame_damage.damage->right, 0); + ASSERT_EQ(present_info.frame_damage.damage->bottom, 0); + + ASSERT_EQ(present_info.buffer_damage.num_rects, num_rects); + ASSERT_EQ(present_info.buffer_damage.damage->left, 100); + ASSERT_EQ(present_info.buffer_damage.damage->top, 150); + ASSERT_EQ(present_info.buffer_damage.damage->right, 300); + ASSERT_EQ(present_info.buffer_damage.damage->bottom, 350); + + latch.Signal(); + }); + + ASSERT_EQ(FlutterEngineSendWindowMetricsEvent(engine.get(), &event), + kSuccess); + latch.Wait(); } INSTANTIATE_TEST_SUITE_P( From 56fe7d64fa164e3fe4db4c1d4ffb4e2ce5cbc94a Mon Sep 17 00:00:00 2001 From: Joel Winarske Date: Thu, 28 Sep 2023 13:10:09 -0700 Subject: [PATCH 356/859] [Impeller] Fix OpenGLES EGL_BAD_ACCESS due to context being current on multiple threads. (#46287) On Linux setting the EGL context from one thread, then setting from another thread will trigger a EGL_BAD_ACCESS error. The resolution is to clear the context after use on the thread that set it. https://github.com/flutter/flutter/issues/130619 --- shell/platform/embedder/embedder_surface_gl_impeller.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/platform/embedder/embedder_surface_gl_impeller.cc b/shell/platform/embedder/embedder_surface_gl_impeller.cc index 20a2a5184e133..340725d2b9d3b 100644 --- a/shell/platform/embedder/embedder_surface_gl_impeller.cc +++ b/shell/platform/embedder/embedder_surface_gl_impeller.cc @@ -86,13 +86,13 @@ EmbedderSurfaceGLImpeller::EmbedderSurfaceGLImpeller( return; } - worker_->SetReactionsAllowedOnCurrentThread(true); auto worker_id = impeller_context_->AddReactorWorker(worker_); if (!worker_id.has_value()) { FML_LOG(ERROR) << "Could not add reactor worker."; return; } + gl_dispatch_table_.gl_clear_current_callback(); FML_LOG(ERROR) << "Using the Impeller rendering backend (OpenGL)."; valid_ = true; } From 18d9cc964ccf6ae12a84a2122a5c737fa362c812 Mon Sep 17 00:00:00 2001 From: gaaclarke <30870216+gaaclarke@users.noreply.github.com> Date: Thu, 28 Sep 2023 13:17:48 -0700 Subject: [PATCH 357/859] Removed unnecessary dynamic dispatch (#46369) Small performance tweak. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- display_list/dl_canvas.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/display_list/dl_canvas.h b/display_list/dl_canvas.h index 5cd06146c78c3..9ba279a15b590 100644 --- a/display_list/dl_canvas.h +++ b/display_list/dl_canvas.h @@ -85,8 +85,8 @@ class DlCanvas { virtual void TransformReset() = 0; virtual void Transform(const SkMatrix* matrix) = 0; virtual void Transform(const SkM44* matrix44) = 0; - virtual void Transform(const SkMatrix& matrix) { Transform(&matrix); } - virtual void Transform(const SkM44& matrix44) { Transform(&matrix44); } + void Transform(const SkMatrix& matrix) { Transform(&matrix); } + void Transform(const SkM44& matrix44) { Transform(&matrix44); } virtual void SetTransform(const SkMatrix* matrix) = 0; virtual void SetTransform(const SkM44* matrix44) = 0; virtual void SetTransform(const SkMatrix& matrix) { SetTransform(&matrix); } @@ -179,12 +179,11 @@ class DlCanvas { SrcRectConstraint constraint = SrcRectConstraint::kFast) { DrawImageRect(image, SkRect::Make(src), dst, sampling, paint, constraint); } - virtual void DrawImageRect( - const sk_sp& image, - const SkRect& dst, - DlImageSampling sampling, - const DlPaint* paint = nullptr, - SrcRectConstraint constraint = SrcRectConstraint::kFast) { + void DrawImageRect(const sk_sp& image, + const SkRect& dst, + DlImageSampling sampling, + const DlPaint* paint = nullptr, + SrcRectConstraint constraint = SrcRectConstraint::kFast) { DrawImageRect(image, image->bounds(), dst, sampling, paint, constraint); } virtual void DrawImageNine(const sk_sp& image, From 962489e3b175d6baf7c70ff499a77b5eea2e9a20 Mon Sep 17 00:00:00 2001 From: Matej Knopp Date: Thu, 28 Sep 2023 22:37:47 +0200 Subject: [PATCH 358/859] [macOS] TextInputPlugin should mark navigation events in IME popover as handled (#46141) Fixes https://github.com/flutter/flutter/issues/134699 Because of NSTextInputContext API limitations it is not straightforward to determine whether `TextInputPlugin` has handled a text equivalent event or whether it should pass it on. Previously we marked all event that didn't result in a TextInputClient action as unhandled, but that's does not work for arrow key events while the IME popover is active. This PR will mark arrow keys event as handled if there is active composition. *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].* [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- .../framework/Source/FlutterTextInputPlugin.h | 1 + .../Source/FlutterTextInputPlugin.mm | 10 ++- .../Source/FlutterTextInputPluginTest.mm | 87 +++++++++++++++++++ 3 files changed, 97 insertions(+), 1 deletion(-) diff --git a/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.h b/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.h index 70a8ff5156068..fb099aa1136d2 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.h +++ b/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.h @@ -69,5 +69,6 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result; - (NSRect)firstRectForCharacterRange:(NSRange)range actualRange:(NSRangePointer)actualRange; - (NSDictionary*)editingState; +@property(nonatomic) NSTextInputContext* textInputContext; @property(readwrite, nonatomic) NSString* customRunLoopMode; @end diff --git a/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.mm b/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.mm index 1d195efe26326..19c779ec2a992 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.mm @@ -621,7 +621,15 @@ - (BOOL)handleKeyEvent:(NSEvent*)event { // text command (indicated by calling doCommandBySelector) or might not (for example, Cmd+Q). In // the latter case, this command somehow has not been executed yet and Flutter must dispatch it to // the next responder. See https://github.com/flutter/flutter/issues/106354 . - if (event.isKeyEquivalent && !_eventProducedOutput) { + // The event is also not redispatched if there is IME composition active, because it might be + // handled by the IME. See https://github.com/flutter/flutter/issues/134699 + + // both NSEventModifierFlagNumericPad and NSEventModifierFlagFunction are set for arrow keys. + bool is_navigation = event.modifierFlags & NSEventModifierFlagFunction && + event.modifierFlags & NSEventModifierFlagNumericPad; + bool is_navigation_in_ime = is_navigation && self.hasMarkedText; + + if (event.isKeyEquivalent && !is_navigation_in_ime && !_eventProducedOutput) { return NO; } return res; diff --git a/shell/platform/darwin/macos/framework/Source/FlutterTextInputPluginTest.mm b/shell/platform/darwin/macos/framework/Source/FlutterTextInputPluginTest.mm index 9c656c0ca9601..4a6afa2e3fccf 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterTextInputPluginTest.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterTextInputPluginTest.mm @@ -1361,6 +1361,89 @@ - (bool)testPerformKeyEquivalent { return true; } +- (bool)handleArrowKeyWhenImePopoverIsActive { + id engineMock = flutter::testing::CreateMockFlutterEngine(@""); + id binaryMessengerMock = OCMProtocolMock(@protocol(FlutterBinaryMessenger)); + OCMStub( // NOLINT(google-objc-avoid-throwing-exception) + [engineMock binaryMessenger]) + .andReturn(binaryMessengerMock); + OCMStub([[engineMock ignoringNonObjectArgs] sendKeyEvent:FlutterKeyEvent {} + callback:nil + userData:nil]); + + NSTextInputContext* textInputContext = OCMClassMock([NSTextInputContext class]); + OCMStub([textInputContext handleEvent:[OCMArg any]]).andReturn(YES); + + FlutterViewController* viewController = [[FlutterViewController alloc] initWithEngine:engineMock + nibName:@"" + bundle:nil]; + + FlutterTextInputPlugin* plugin = + [[FlutterTextInputPlugin alloc] initWithViewController:viewController]; + + plugin.textInputContext = textInputContext; + + NSDictionary* setClientConfig = @{ + @"inputAction" : @"action", + @"enableDeltaModel" : @"true", + @"inputType" : @{@"name" : @"inputName"}, + }; + [plugin handleMethodCall:[FlutterMethodCall methodCallWithMethodName:@"TextInput.setClient" + arguments:@[ @(1), setClientConfig ]] + result:^(id){ + }]; + + [plugin handleMethodCall:[FlutterMethodCall methodCallWithMethodName:@"TextInput.show" + arguments:@[]] + result:^(id){ + }]; + + // Set marked text, simulate active IME popover. + [plugin setMarkedText:@"m" + selectedRange:NSMakeRange(0, 1) + replacementRange:NSMakeRange(NSNotFound, 0)]; + + // Right arrow key. This, unlike the key below should be handled by the plugin. + NSEvent* event = [NSEvent keyEventWithType:NSEventTypeKeyDown + location:NSZeroPoint + modifierFlags:0xa00100 + timestamp:0 + windowNumber:0 + context:nil + characters:@"\uF702" + charactersIgnoringModifiers:@"\uF702" + isARepeat:NO + keyCode:0x4]; + + // Plugin should mark the event as key equivalent. + [plugin performKeyEquivalent:event]; + + if ([plugin handleKeyEvent:event] != true) { + return false; + } + + // CTRL+H (delete backwards) + event = [NSEvent keyEventWithType:NSEventTypeKeyDown + location:NSZeroPoint + modifierFlags:0x40101 + timestamp:0 + windowNumber:0 + context:nil + characters:@"\uF702" + charactersIgnoringModifiers:@"\uF702" + isARepeat:NO + keyCode:0x4]; + + // Plugin should mark the event as key equivalent. + [plugin performKeyEquivalent:event]; + + if ([plugin handleKeyEvent:event] != false) { + return false; + } + + return true; +} + - (bool)unhandledKeyEquivalent { id engineMock = flutter::testing::CreateMockFlutterEngine(@""); id binaryMessengerMock = OCMProtocolMock(@protocol(FlutterBinaryMessenger)); @@ -1814,6 +1897,10 @@ - (bool)testSelectorsAreForwardedToFramework { ASSERT_TRUE([[FlutterInputPluginTestObjc alloc] testPerformKeyEquivalent]); } +TEST(FlutterTextInputPluginTest, HandleArrowKeyWhenImePopoverIsActive) { + ASSERT_TRUE([[FlutterInputPluginTestObjc alloc] handleArrowKeyWhenImePopoverIsActive]); +} + TEST(FlutterTextInputPluginTest, UnhandledKeyEquivalent) { ASSERT_TRUE([[FlutterInputPluginTestObjc alloc] unhandledKeyEquivalent]); } From 2a3a2487c19de34d13ea8bec9583ef8fda055cf9 Mon Sep 17 00:00:00 2001 From: Matej Knopp Date: Thu, 28 Sep 2023 22:41:11 +0200 Subject: [PATCH 359/859] Reland: [macOS] performKeyEquivalent cleanup (#46377) Fixes the issue in original PR where `FlutterViewWrapper` does not pass the key equivalent to subviews thus prevents `TextInputPlugin` from receiving it. Also adds a regression test for this scenario. Note that key equivalent flow does not respect the regular responder chain. It is passed from root view to down to subviews and if unhandled will be forwarded to menus. Original message: https://github.com/flutter/engine/pull/40706 added a duplicate `NSEvent (KeyEquivalentMarker)` category. This PR removes it. It also removes the call to `markAsKeyEquivalent` from `FlutterViewController`. That call is internal to `FlutterTextInputPlugin` and classes outside should not be calling it. *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].* [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- .../framework/Source/FlutterViewController.mm | 53 +++------------- .../Source/FlutterViewControllerTest.mm | 63 +++++++++++++++++++ 2 files changed, 71 insertions(+), 45 deletions(-) diff --git a/shell/platform/darwin/macos/framework/Source/FlutterViewController.mm b/shell/platform/darwin/macos/framework/Source/FlutterViewController.mm index 5c22fe6c01d71..15d36a777fda0 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterViewController.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterViewController.mm @@ -164,8 +164,6 @@ @interface FlutterViewWrapper : NSView - (void)setBackgroundColor:(NSColor*)color; -- (BOOL)performKeyEquivalent:(NSEvent*)event; - @end /** @@ -242,37 +240,6 @@ - (void)onKeyboardLayoutChanged; @end -#pragma mark - NSEvent (KeyEquivalentMarker) protocol - -@interface NSEvent (KeyEquivalentMarker) - -// Internally marks that the event was received through performKeyEquivalent:. -// When text editing is active, keyboard events that have modifier keys pressed -// are received through performKeyEquivalent: instead of keyDown:. If such event -// is passed to TextInputContext but doesn't result in a text editing action it -// needs to be forwarded by FlutterKeyboardManager to the next responder. -- (void)markAsKeyEquivalent; - -// Returns YES if the event is marked as a key equivalent. -- (BOOL)isKeyEquivalent; - -@end - -@implementation NSEvent (KeyEquivalentMarker) - -// This field doesn't need a value because only its address is used as a unique identifier. -static char markerKey; - -- (void)markAsKeyEquivalent { - objc_setAssociatedObject(self, &markerKey, @true, OBJC_ASSOCIATION_RETAIN); -} - -- (BOOL)isKeyEquivalent { - return [objc_getAssociatedObject(self, &markerKey) boolValue] == YES; -} - -@end - #pragma mark - Private dependant functions namespace { @@ -312,19 +279,15 @@ - (void)setBackgroundColor:(NSColor*)color { } - (BOOL)performKeyEquivalent:(NSEvent*)event { - if ([_controller isDispatchingKeyEvent:event]) { - // When NSWindow is nextResponder, keyboard manager will send to it - // unhandled events (through [NSWindow keyDown:]). If event has both - // control and cmd modifiers set (i.e. cmd+control+space - emoji picker) - // NSWindow will then send this event as performKeyEquivalent: to first - // responder, which might be FlutterTextInputPlugin. If that's the case, the - // plugin must not handle the event, otherwise the emoji picker would not - // work (due to first responder returning YES from performKeyEquivalent:) - // and there would be an infinite loop, because FlutterViewController will - // send the event back to [keyboardManager handleEvent:]. - return NO; + // Do not intercept the event if flutterView is not first responder, otherwise this would + // interfere with TextInputPlugin, which also handles key equivalents. + // + // Also do not intercept the event if key equivalent is a product of an event being + // redispatched by the TextInputPlugin, in which case it needs to bubble up so that menus + // can handle key equivalents. + if (self.window.firstResponder != _flutterView || [_controller isDispatchingKeyEvent:event]) { + return [super performKeyEquivalent:event]; } - [event markAsKeyEquivalent]; [_flutterView keyDown:event]; return YES; } diff --git a/shell/platform/darwin/macos/framework/Source/FlutterViewControllerTest.mm b/shell/platform/darwin/macos/framework/Source/FlutterViewControllerTest.mm index 7894e9258b9ef..76d11595a720c 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterViewControllerTest.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterViewControllerTest.mm @@ -60,6 +60,7 @@ - (bool)testKeyEventsAreSentToFramework; - (bool)testKeyEventsArePropagatedIfNotHandled; - (bool)testKeyEventsAreNotPropagatedIfHandled; - (bool)testCtrlTabKeyEventIsPropagated; +- (bool)testKeyEquivalentIsPassedToTextInputPlugin; - (bool)testFlagsChangedEventsArePropagatedIfNotHandled; - (bool)testKeyboardIsRestartedOnEngineRestart; - (bool)testTrackpadGesturesAreSentToFramework; @@ -215,6 +216,10 @@ id MockGestureEvent(NSEventType type, NSEventPhase phase, double magnification, ASSERT_TRUE([[FlutterViewControllerTestObjC alloc] testCtrlTabKeyEventIsPropagated]); } +TEST(FlutterViewControllerTest, TestKeyEquivalentIsPassedToTextInputPlugin) { + ASSERT_TRUE([[FlutterViewControllerTestObjC alloc] testKeyEquivalentIsPassedToTextInputPlugin]); +} + TEST(FlutterViewControllerTest, TestFlagsChangedEventsArePropagatedIfNotHandled) { ASSERT_TRUE( [[FlutterViewControllerTestObjC alloc] testFlagsChangedEventsArePropagatedIfNotHandled]); @@ -331,6 +336,64 @@ - (bool)testCtrlTabKeyEventIsPropagated { const uint64_t kPhysicalKeyTab = 0x7002b; [viewController viewWillAppear]; // Initializes the event channel. + // Creates a NSWindow so that FlutterView view can be first responder. + NSWindow* window = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 800, 600) + styleMask:NSBorderlessWindowMask + backing:NSBackingStoreBuffered + defer:NO]; + window.contentView = viewController.view; + [window makeFirstResponder:viewController.flutterView]; + [viewController.view performKeyEquivalent:event]; + + EXPECT_TRUE(called); + EXPECT_EQ(last_event.type, kFlutterKeyEventTypeDown); + EXPECT_EQ(last_event.physical, kPhysicalKeyTab); + return true; +} + +- (bool)testKeyEquivalentIsPassedToTextInputPlugin { + id engineMock = flutter::testing::CreateMockFlutterEngine(@""); + __block bool called = false; + __block FlutterKeyEvent last_event; + OCMStub([[engineMock ignoringNonObjectArgs] sendKeyEvent:FlutterKeyEvent {} + callback:nil + userData:nil]) + .andDo((^(NSInvocation* invocation) { + FlutterKeyEvent* event; + [invocation getArgument:&event atIndex:2]; + called = true; + last_event = *event; + })); + FlutterViewController* viewController = [[FlutterViewController alloc] initWithEngine:engineMock + nibName:@"" + bundle:nil]; + // Ctrl+tab + NSEvent* event = [NSEvent keyEventWithType:NSEventTypeKeyDown + location:NSZeroPoint + modifierFlags:0x40101 + timestamp:0 + windowNumber:0 + context:nil + characters:@"" + charactersIgnoringModifiers:@"" + isARepeat:NO + keyCode:48]; + const uint64_t kPhysicalKeyTab = 0x7002b; + + [viewController viewWillAppear]; // Initializes the event channel. + + NSWindow* window = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 800, 600) + styleMask:NSBorderlessWindowMask + backing:NSBackingStoreBuffered + defer:NO]; + window.contentView = viewController.view; + + [viewController.view addSubview:viewController.textInputPlugin]; + + // Make the textInputPlugin first responder. This should still result in + // view controller reporting the key event. + [window makeFirstResponder:viewController.textInputPlugin]; + [viewController.view performKeyEquivalent:event]; EXPECT_TRUE(called); From f9264f0908b329e6eb4e3542aa197a094b553377 Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Thu, 28 Sep 2023 13:44:31 -0700 Subject: [PATCH 360/859] Add initial support for 4x MSAA in OpenGLES backend. (#46381) Initial support _towards_ https://github.com/flutter/flutter/issues/130045. This updates the `PROC_TABLE`, and adds (and supports) `Type::kRenderBufferMultisampled`. The type remains unused in the actual engine, and will be in a follow-up PR once we like this one! /cc @chinmaygarde --- impeller/renderer/backend/gles/gles.h | 2 + .../renderer/backend/gles/proc_table_gles.h | 16 ++++---- .../renderer/backend/gles/render_pass_gles.cc | 3 -- .../renderer/backend/gles/texture_gles.cc | 39 ++++++++++++++++++- impeller/renderer/backend/gles/texture_gles.h | 1 + 5 files changed, 48 insertions(+), 13 deletions(-) diff --git a/impeller/renderer/backend/gles/gles.h b/impeller/renderer/backend/gles/gles.h index 599e3c9433c97..9bacfc87db4b3 100644 --- a/impeller/renderer/backend/gles/gles.h +++ b/impeller/renderer/backend/gles/gles.h @@ -4,6 +4,8 @@ #pragma once +// IWYU pragma: begin_exports #include "GLES3/gl3.h" #define GL_GLEXT_PROTOTYPES #include "GLES2/gl2ext.h" +// IWYU pragma: end_exports diff --git a/impeller/renderer/backend/gles/proc_table_gles.h b/impeller/renderer/backend/gles/proc_table_gles.h index 0af40009cdf13..eac2b77e59bb1 100644 --- a/impeller/renderer/backend/gles/proc_table_gles.h +++ b/impeller/renderer/backend/gles/proc_table_gles.h @@ -6,12 +6,10 @@ #include #include -#include #include "flutter/fml/logging.h" #include "flutter/fml/macros.h" #include "flutter/fml/mapping.h" -#include "flutter/fml/trace_event.h" #include "impeller/renderer/backend/gles/capabilities_gles.h" #include "impeller/renderer/backend/gles/description_gles.h" #include "impeller/renderer/backend/gles/gles.h" @@ -170,11 +168,13 @@ struct GLProc { #define FOR_EACH_IMPELLER_GLES3_PROC(PROC) PROC(BlitFramebuffer); -#define FOR_EACH_IMPELLER_EXT_PROC(PROC) \ - PROC(DiscardFramebufferEXT); \ - PROC(PushDebugGroupKHR); \ - PROC(PopDebugGroupKHR); \ - PROC(ObjectLabelKHR); +#define FOR_EACH_IMPELLER_EXT_PROC(PROC) \ + PROC(DiscardFramebufferEXT); \ + PROC(FramebufferTexture2DMultisampleEXT) \ + PROC(PushDebugGroupKHR); \ + PROC(PopDebugGroupKHR); \ + PROC(ObjectLabelKHR); \ + PROC(RenderbufferStorageMultisampleEXT); enum class DebugResourceType { kTexture, @@ -188,7 +188,7 @@ enum class DebugResourceType { class ProcTableGLES { public: using Resolver = std::function; - ProcTableGLES(Resolver resolver); + explicit ProcTableGLES(Resolver resolver); ~ProcTableGLES(); diff --git a/impeller/renderer/backend/gles/render_pass_gles.cc b/impeller/renderer/backend/gles/render_pass_gles.cc index 65ce6c2108189..735f8a85495f5 100644 --- a/impeller/renderer/backend/gles/render_pass_gles.cc +++ b/impeller/renderer/backend/gles/render_pass_gles.cc @@ -4,10 +4,7 @@ #include "impeller/renderer/backend/gles/render_pass_gles.h" -#include - #include "flutter/fml/trace_event.h" -#include "impeller/base/config.h" #include "impeller/base/validation.h" #include "impeller/renderer/backend/gles/device_buffer_gles.h" #include "impeller/renderer/backend/gles/formats_gles.h" diff --git a/impeller/renderer/backend/gles/texture_gles.cc b/impeller/renderer/backend/gles/texture_gles.cc index 6c01e6b143e71..1ea904c602f0a 100644 --- a/impeller/renderer/backend/gles/texture_gles.cc +++ b/impeller/renderer/backend/gles/texture_gles.cc @@ -10,7 +10,6 @@ #include "flutter/fml/mapping.h" #include "flutter/fml/trace_event.h" #include "impeller/base/allocation.h" -#include "impeller/base/config.h" #include "impeller/base/validation.h" #include "impeller/core/formats.h" #include "impeller/renderer/backend/gles/formats_gles.h" @@ -33,6 +32,8 @@ HandleType ToHandleType(TextureGLES::Type type) { case TextureGLES::Type::kTexture: return HandleType::kTexture; case TextureGLES::Type::kRenderBuffer: + // MSAA textures are treated as render buffers. + case TextureGLES::Type::kRenderBufferMultisampled: return HandleType::kRenderBuffer; } FML_UNREACHABLE(); @@ -383,7 +384,7 @@ void TextureGLES::InitializeContentsIfNecessary() const { } } break; - case Type::kRenderBuffer: + case Type::kRenderBuffer: { auto render_buffer_format = ToRenderBufferFormat(GetTextureDescriptor().format); if (!render_buffer_format.has_value()) { @@ -399,7 +400,27 @@ void TextureGLES::InitializeContentsIfNecessary() const { size.height // height ); } + } break; + case Type::kRenderBufferMultisampled: { + auto render_buffer_msaa = + ToRenderBufferFormat(GetTextureDescriptor().format); + if (!render_buffer_msaa.has_value()) { + VALIDATION_LOG << "Invalid format for render-buffer MSAA image."; + return; + } + gl.BindRenderbuffer(GL_RENDERBUFFER, handle.value()); + { + TRACE_EVENT0("impeller", "RenderBufferStorageInitialization"); + gl.RenderbufferStorageMultisampleEXT( + GL_RENDERBUFFER, // target + 4, // samples + render_buffer_msaa.value(), // internal format + size.width, // width + size.height // height + ); + } break; + } } } @@ -426,6 +447,8 @@ bool TextureGLES::Bind() const { gl.BindTexture(target.value(), handle.value()); } break; case Type::kRenderBuffer: + // MSAA textures are treated as render buffers. + case Type::kRenderBufferMultisampled: gl.BindRenderbuffer(GL_RENDERBUFFER, handle.value()); break; } @@ -510,6 +533,18 @@ bool TextureGLES::SetAsFramebufferAttachment(GLenum target, handle.value() // render-buffer ); break; + case Type::kRenderBufferMultisampled: + // Assume that when MSAA is enabled, we're using 4x MSAA. + FML_DCHECK(GetTextureDescriptor().sample_count == SampleCount::kCount4); + gl.FramebufferTexture2DMultisampleEXT( + target, // target + ToAttachmentPoint(point), // attachment + GL_TEXTURE_2D, // textarget + handle.value(), // texture + 0, // level + 4 // samples + ); + break; } return true; } diff --git a/impeller/renderer/backend/gles/texture_gles.h b/impeller/renderer/backend/gles/texture_gles.h index e2d2ae32c496e..effee19d80fbd 100644 --- a/impeller/renderer/backend/gles/texture_gles.h +++ b/impeller/renderer/backend/gles/texture_gles.h @@ -18,6 +18,7 @@ class TextureGLES final : public Texture, enum class Type { kTexture, kRenderBuffer, + kRenderBufferMultisampled, }; enum class IsWrapped { From d73732cc92b64d544a08adf1efd728de49076549 Mon Sep 17 00:00:00 2001 From: gaaclarke <30870216+gaaclarke@users.noreply.github.com> Date: Thu, 28 Sep 2023 14:16:50 -0700 Subject: [PATCH 361/859] Remove opacity layer dcheck. (#46160) In https://github.com/flutter/flutter/issues/132849 it was found that rendering happens fine when this dcheck is removed. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- flow/layers/opacity_layer.cc | 2 -- flow/layers/opacity_layer_unittests.cc | 8 -------- 2 files changed, 10 deletions(-) diff --git a/flow/layers/opacity_layer.cc b/flow/layers/opacity_layer.cc index 8b55dff69aa92..cf6138fd67045 100644 --- a/flow/layers/opacity_layer.cc +++ b/flow/layers/opacity_layer.cc @@ -36,8 +36,6 @@ void OpacityLayer::Diff(DiffContext* context, const Layer* old_layer) { } void OpacityLayer::Preroll(PrerollContext* context) { - FML_DCHECK(!layers().empty()); // We can't be a leaf. - auto mutator = context->state_stack.save(); mutator.translate(offset_); mutator.applyOpacity(SkRect(), DlColor::toOpacity(alpha_)); diff --git a/flow/layers/opacity_layer_unittests.cc b/flow/layers/opacity_layer_unittests.cc index 71ccdc15c8476..f69ac4ec57f4f 100644 --- a/flow/layers/opacity_layer_unittests.cc +++ b/flow/layers/opacity_layer_unittests.cc @@ -27,14 +27,6 @@ namespace testing { using OpacityLayerTest = LayerTest; #ifndef NDEBUG -TEST_F(OpacityLayerTest, LeafLayer) { - auto layer = - std::make_shared(SK_AlphaOPAQUE, SkPoint::Make(0.0f, 0.0f)); - - EXPECT_DEATH_IF_SUPPORTED(layer->Preroll(preroll_context()), - "\\!layers\\(\\)\\.empty\\(\\)"); -} - TEST_F(OpacityLayerTest, PaintingEmptyLayerDies) { auto mock_layer = std::make_shared(SkPath()); auto layer = From a656ddfa092c46119d5027de6ceb94aede6c063d Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 28 Sep 2023 17:23:01 -0400 Subject: [PATCH 362/859] Roll Fuchsia Linux SDK from cu6apvEZ2P6zhishc... to l2RxJKPfYn7QzGOoL... (#46382) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 7fa2d975ae7ee..f9814f12b8a9b 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'cu6apvEZ2P6zhishcExZHv7qWi62MO8R3JOnclnglFAC' + 'version': 'l2RxJKPfYn7QzGOoLPUPk0FyRZxbYTRv1JiQJgUbm9sC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index 09a7ec8838f1e..9922af8743dce 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: a4b4aa9727fa603af70228ec58ead9a7 +Signature: 02ffea6fdf329c5632a665b4146b152e ==================================================================================================== LIBRARY: fuchsia_sdk From d27b9e8d18f70759123792d54e578767165eeaa2 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 28 Sep 2023 18:18:07 -0400 Subject: [PATCH 363/859] Roll Skia from 33502f9b0c7d to 08485e753e3a (1 revision) (#46384) https://skia.googlesource.com/skia.git/+log/33502f9b0c7d..08485e753e3a 2023-09-28 johnstiles@google.com Add emitTextureSamplersForFPs method to ProgramBuilder. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index f9814f12b8a9b..44c399e9e63c2 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '33502f9b0c7d845adceb4907d1c7dc1f22b3fd4c', + 'skia_revision': '08485e753e3a9fd181a73e46ca90103bc98c88c9', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 64b87cc1a193f..2cf646b7824a1 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: eca53560b3fc7923df8e91b89c6a742d +Signature: f10e3168dbc640f0f780edafc3c54bba ==================================================================================================== LIBRARY: etc1 From bf92985666f6bf2e11f6a7c27031c4bfd0034354 Mon Sep 17 00:00:00 2001 From: Brandon DeRosier Date: Thu, 28 Sep 2023 15:25:05 -0700 Subject: [PATCH 364/859] Bump impeller-cmake to head (#46385) Weekly bump --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 44c399e9e63c2..bb0d70a08ed14 100644 --- a/DEPS +++ b/DEPS @@ -936,7 +936,7 @@ deps = { }, 'src/third_party/impeller-cmake-example': { - 'url': Var('github_git') + '/bdero/impeller-cmake-example.git' + '@' + 'c2286827ae68e3c2694410e0047cab42dac3312f', + 'url': Var('github_git') + '/bdero/impeller-cmake-example.git' + '@' + '7771b9b54df660fd5b749d44eb294beadd369bd6', 'condition': 'download_impeller_cmake_example', }, From 68b918d8b7f765b3412922f89148f04ced1d345e Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Thu, 28 Sep 2023 15:39:06 -0700 Subject: [PATCH 365/859] [Impeller] revert stencil config changes. (#46386) This was an experiment that didn't really pan out. Revert the changes to simplify rendering logic. --- impeller/aiks/picture.cc | 20 +++++++------------- impeller/entity/contents/content_context.cc | 10 ++-------- impeller/renderer/render_target.cc | 10 ---------- 3 files changed, 9 insertions(+), 31 deletions(-) diff --git a/impeller/aiks/picture.cc b/impeller/aiks/picture.cc index d7a6d4085811f..faa5c34e377d1 100644 --- a/impeller/aiks/picture.cc +++ b/impeller/aiks/picture.cc @@ -66,23 +66,17 @@ std::shared_ptr Picture::RenderToTexture( size, // size "Picture Snapshot MSAA", // label RenderTarget:: - kDefaultColorAttachmentConfigMSAA // color_attachment_config -#ifndef FML_OS_ANDROID // Reduce PSO variants for Vulkan. - , - std::nullopt // stencil_attachment_config -#endif // FML_OS_ANDROID + kDefaultColorAttachmentConfigMSAA, // color_attachment_config + std::nullopt // stencil_attachment_config ); } else { target = RenderTarget::CreateOffscreen( - *impeller_context, // context - render_target_allocator, // allocator - size, // size - "Picture Snapshot", // label - RenderTarget::kDefaultColorAttachmentConfig // color_attachment_config -#ifndef FML_OS_ANDROID // Reduce PSO variants for Vulkan. - , + *impeller_context, // context + render_target_allocator, // allocator + size, // size + "Picture Snapshot", // label + RenderTarget::kDefaultColorAttachmentConfig, // color_attachment_config std::nullopt // stencil_attachment_config -#endif // FML_OS_ANDROID ); } if (!target.IsValid()) { diff --git a/impeller/entity/contents/content_context.cc b/impeller/entity/contents/content_context.cc index 1461e1b9cd9cf..a5c1e4d26d216 100644 --- a/impeller/entity/contents/content_context.cc +++ b/impeller/entity/contents/content_context.cc @@ -382,21 +382,15 @@ std::shared_ptr ContentContext::MakeSubpass( subpass_target = RenderTarget::CreateOffscreenMSAA( *context, *GetRenderTargetCache(), texture_size, SPrintF("%s Offscreen", label.c_str()), - RenderTarget::kDefaultColorAttachmentConfigMSAA // -#ifndef FML_OS_ANDROID // Reduce PSO variants for Vulkan. - , + RenderTarget::kDefaultColorAttachmentConfigMSAA, std::nullopt // stencil_attachment_config -#endif // FML_OS_ANDROID ); } else { subpass_target = RenderTarget::CreateOffscreen( *context, *GetRenderTargetCache(), texture_size, SPrintF("%s Offscreen", label.c_str()), - RenderTarget::kDefaultColorAttachmentConfig // -#ifndef FML_OS_ANDROID // Reduce PSO variants for Vulkan. - , + RenderTarget::kDefaultColorAttachmentConfig, // std::nullopt // stencil_attachment_config -#endif // FML_OS_ANDROID ); } auto subpass_texture = subpass_target.GetRenderTargetTexture(); diff --git a/impeller/renderer/render_target.cc b/impeller/renderer/render_target.cc index 636601ddd3874..87d158e0447d3 100644 --- a/impeller/renderer/render_target.cc +++ b/impeller/renderer/render_target.cc @@ -231,11 +231,6 @@ RenderTarget RenderTarget::CreateOffscreen( return {}; } -// Dont force additional PSO variants on Vulkan. -#ifdef FML_OS_ANDROID - FML_DCHECK(stencil_attachment_config.has_value()); -#endif // FML_OS_ANDROID - RenderTarget target; PixelFormat pixel_format = context.GetCapabilities()->GetDefaultColorFormat(); TextureDescriptor color_tex0; @@ -278,11 +273,6 @@ RenderTarget RenderTarget::CreateOffscreenMSAA( return {}; } -// Dont force additional PSO variants on Vulkan. -#ifdef FML_OS_ANDROID - FML_DCHECK(stencil_attachment_config.has_value()); -#endif // FML_OS_ANDROID - RenderTarget target; PixelFormat pixel_format = context.GetCapabilities()->GetDefaultColorFormat(); From baf6b18c4305ae4cc823dc91354d651c5d4482fd Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 28 Sep 2023 19:05:04 -0400 Subject: [PATCH 366/859] Roll Fuchsia Mac SDK from 4WW3KRrAbuY7VeGT0... to Ta8wiQnzbBc7fAGeR... (#46387) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index bb0d70a08ed14..1ffcae81bb09e 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': '4WW3KRrAbuY7VeGT0pBFAQktetsyx-3C0mKMNxCd0uYC' + 'version': 'Ta8wiQnzbBc7fAGeRwzTcFoaZb8YvK33VnytyclyC7EC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 28ef693fde67142e6f2cfd2774524cc70b8718d4 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 29 Sep 2023 01:30:16 -0400 Subject: [PATCH 367/859] Roll Skia from 08485e753e3a to 75033613a49f (2 revisions) (#46396) https://skia.googlesource.com/skia.git/+log/08485e753e3a..75033613a49f 2023-09-29 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from d0c5366041fc to c8eb90e92f62 (2 revisions) 2023-09-29 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Dawn from 1b2986736fd2 to a42cebae4e42 (19 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 1ffcae81bb09e..61e3a1b3198fc 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '08485e753e3a9fd181a73e46ca90103bc98c88c9', + 'skia_revision': '75033613a49f10b5f69d3a11fbf038daae80b76a', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 2cf646b7824a1..fb02f03636626 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: f10e3168dbc640f0f780edafc3c54bba +Signature: 6426ae1ecbca3a045062fc7fc5647dc9 ==================================================================================================== LIBRARY: etc1 From dd60e2a919845fc16838d18dcd847280f71f9b7e Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 29 Sep 2023 03:35:58 -0400 Subject: [PATCH 368/859] Roll Skia from 75033613a49f to a80c164ffb8a (3 revisions) (#46399) https://skia.googlesource.com/skia.git/+log/75033613a49f..a80c164ffb8a 2023-09-29 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 929ace8da386 to 1cab871c2207 (8 revisions) 2023-09-29 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from c8eb90e92f62 to a17b968c91ef 2023-09-29 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 34349287c876 to 4d31920a095a (5 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 61e3a1b3198fc..06c97e16278e5 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '75033613a49f10b5f69d3a11fbf038daae80b76a', + 'skia_revision': 'a80c164ffb8a26aa29020be39993581a6761ab6c', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 559a80bab14032b62db0de23f2e05c3dcd3e9e18 Mon Sep 17 00:00:00 2001 From: Matej Knopp Date: Fri, 29 Sep 2023 11:02:42 +0200 Subject: [PATCH 369/859] [macOS] Ensure first responder is consistent during and after text input (#46032) Fixes https://github.com/flutter/flutter/issues/134906 Fixes https://github.com/flutter/flutter/issues/133832 This ensures that there are only two first responder widgets - `FlutterView` when text input is not active and `TextInputPlugin` when text input is active. The PR also prevents `FlutterView` stealing first responder status on mouse click events during text input. Previously when `TextInputClient` resigned it made `nextResponder` the first responder, but that was incorrect - `nextResponder` being the superview (`FlutterViewWrapper`). ## Pre-launch Checklist - [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [X] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [X] I listed at least one issue that this PR fixes in the description above. - [X] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [X] I updated/added relevant documentation (doc comments with `///`). - [X] I signed the [CLA]. - [X] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat --- .../Source/FlutterTextInputPlugin.mm | 5 +-- .../Source/FlutterTextInputPluginTest.mm | 35 +++++++++++++++++++ .../macos/framework/Source/FlutterView.h | 12 +++++-- .../macos/framework/Source/FlutterView.mm | 14 ++++---- .../framework/Source/FlutterViewController.mm | 15 ++++++-- .../macos/framework/Source/FlutterViewTest.mm | 12 ++++--- 6 files changed, 73 insertions(+), 20 deletions(-) diff --git a/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.mm b/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.mm index 19c779ec2a992..6a9c948ab5c08 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.mm @@ -384,10 +384,7 @@ - (void)dealloc { - (void)resignAndRemoveFromSuperview { if (self.superview != nil) { - // With accessiblity enabled TextInputPlugin is inside _client, so take the - // nextResponder from the _client. - NSResponder* nextResponder = _client != nil ? _client.nextResponder : self.nextResponder; - [self.window makeFirstResponder:nextResponder]; + [self.window makeFirstResponder:_flutterViewController.flutterView]; [self removeFromSuperview]; } } diff --git a/shell/platform/darwin/macos/framework/Source/FlutterTextInputPluginTest.mm b/shell/platform/darwin/macos/framework/Source/FlutterTextInputPluginTest.mm index 4a6afa2e3fccf..165a4b5bb110e 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterTextInputPluginTest.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterTextInputPluginTest.mm @@ -2049,6 +2049,41 @@ - (bool)testSelectorsAreForwardedToFramework { ASSERT_FALSE(window.firstResponder == viewController.textInputPlugin); } +TEST(FlutterTextInputPluginTest, FirstResponderIsCorrect) { + FlutterEngine* engine = CreateTestEngine(); + FlutterViewController* viewController = [[FlutterViewController alloc] initWithEngine:engine + nibName:nil + bundle:nil]; + [viewController loadView]; + + NSWindow* window = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 800, 600) + styleMask:NSBorderlessWindowMask + backing:NSBackingStoreBuffered + defer:NO]; + window.contentView = viewController.view; + + ASSERT_TRUE(viewController.flutterView.acceptsFirstResponder); + + [window makeFirstResponder:viewController.flutterView]; + + [viewController.textInputPlugin + handleMethodCall:[FlutterMethodCall methodCallWithMethodName:@"TextInput.show" arguments:@[]] + result:^(id){ + }]; + + ASSERT_TRUE(window.firstResponder == viewController.textInputPlugin); + + ASSERT_FALSE(viewController.flutterView.acceptsFirstResponder); + + [viewController.textInputPlugin + handleMethodCall:[FlutterMethodCall methodCallWithMethodName:@"TextInput.hide" arguments:@[]] + result:^(id){ + }]; + + ASSERT_TRUE(viewController.flutterView.acceptsFirstResponder); + ASSERT_TRUE(window.firstResponder == viewController.flutterView); +} + TEST(FlutterTextInputPluginTest, HasZeroSizeAndClipsToBounds) { id engineMock = flutter::testing::CreateMockFlutterEngine(@""); id binaryMessengerMock = OCMProtocolMock(@protocol(FlutterBinaryMessenger)); diff --git a/shell/platform/darwin/macos/framework/Source/FlutterView.h b/shell/platform/darwin/macos/framework/Source/FlutterView.h index 6948b880fcf9b..d82f34c51b0cb 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterView.h +++ b/shell/platform/darwin/macos/framework/Source/FlutterView.h @@ -23,13 +23,19 @@ typedef int64_t FlutterViewId; constexpr FlutterViewId kFlutterImplicitViewId = 0ll; /** - * Listener for view resizing. + * Delegate for FlutterView. */ -@protocol FlutterViewReshapeListener +@protocol FlutterViewDelegate /** * Called when the view's backing store changes size. */ - (void)viewDidReshape:(nonnull NSView*)view; + +/** + * Called to determine whether the view should accept first responder status. + */ +- (BOOL)viewShouldAcceptFirstResponder:(nonnull NSView*)view; + @end /** @@ -43,7 +49,7 @@ constexpr FlutterViewId kFlutterImplicitViewId = 0ll; */ - (nullable instancetype)initWithMTLDevice:(nonnull id)device commandQueue:(nonnull id)commandQueue - reshapeListener:(nonnull id)reshapeListener + delegate:(nonnull id)delegate threadSynchronizer:(nonnull FlutterThreadSynchronizer*)threadSynchronizer viewId:(int64_t)viewId NS_DESIGNATED_INITIALIZER; diff --git a/shell/platform/darwin/macos/framework/Source/FlutterView.mm b/shell/platform/darwin/macos/framework/Source/FlutterView.mm index 89bbdb9153828..79607d0f759e8 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterView.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterView.mm @@ -11,7 +11,7 @@ @interface FlutterView () { int64_t _viewId; - __weak id _reshapeListener; + __weak id _viewDelegate; FlutterThreadSynchronizer* _threadSynchronizer; FlutterSurfaceManager* _surfaceManager; } @@ -22,7 +22,7 @@ @implementation FlutterView - (instancetype)initWithMTLDevice:(id)device commandQueue:(id)commandQueue - reshapeListener:(id)reshapeListener + delegate:(id)delegate threadSynchronizer:(FlutterThreadSynchronizer*)threadSynchronizer viewId:(int64_t)viewId { self = [super initWithFrame:NSZeroRect]; @@ -31,7 +31,7 @@ - (instancetype)initWithMTLDevice:(id)device [self setBackgroundColor:[NSColor blackColor]]; [self setLayerContentsRedrawPolicy:NSViewLayerContentsRedrawDuringViewResize]; _viewId = viewId; - _reshapeListener = reshapeListener; + _viewDelegate = delegate; _threadSynchronizer = threadSynchronizer; _surfaceManager = [[FlutterSurfaceManager alloc] initWithDevice:device commandQueue:commandQueue @@ -54,7 +54,7 @@ - (void)reshaped { [_threadSynchronizer beginResizeForView:_viewId size:scaledSize notify:^{ - [_reshapeListener viewDidReshape:self]; + [_viewDelegate viewDidReshape:self]; }]; } @@ -89,7 +89,9 @@ - (BOOL)acceptsFirstMouse:(NSEvent*)event { } - (BOOL)acceptsFirstResponder { - return YES; + // This is to ensure that FlutterView does not take first responder status from TextInputPlugin + // on mouse clicks. + return [_viewDelegate viewShouldAcceptFirstResponder:self]; } - (void)cursorUpdate:(NSEvent*)event { @@ -104,7 +106,7 @@ - (void)cursorUpdate:(NSEvent*)event { - (void)viewDidChangeBackingProperties { [super viewDidChangeBackingProperties]; // Force redraw - [_reshapeListener viewDidReshape:self]; + [_viewDelegate viewDidReshape:self]; } - (BOOL)layer:(CALayer*)layer diff --git a/shell/platform/darwin/macos/framework/Source/FlutterViewController.mm b/shell/platform/darwin/macos/framework/Source/FlutterViewController.mm index 15d36a777fda0..3ad17b76cbea4 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterViewController.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterViewController.mm @@ -169,7 +169,7 @@ - (void)setBackgroundColor:(NSColor*)color; /** * Private interface declaration for FlutterViewController. */ -@interface FlutterViewController () +@interface FlutterViewController () /** * The tracking area used to generate hover events, if enabled. @@ -831,7 +831,7 @@ - (nonnull FlutterView*)createFlutterViewWithMTLDevice:(id)device commandQueue:(id)commandQueue { return [[FlutterView alloc] initWithMTLDevice:device commandQueue:commandQueue - reshapeListener:self + delegate:self threadSynchronizer:_threadSynchronizer viewId:_viewId]; } @@ -851,15 +851,24 @@ - (NSString*)lookupKeyForAsset:(NSString*)asset fromPackage:(NSString*)package { return [FlutterDartProject lookupKeyForAsset:asset fromPackage:package]; } -#pragma mark - FlutterViewReshapeListener +#pragma mark - FlutterViewDelegate /** * Responds to view reshape by notifying the engine of the change in dimensions. */ - (void)viewDidReshape:(NSView*)view { + FML_DCHECK(view == _flutterView); [_engine updateWindowMetricsForViewController:self]; } +- (BOOL)viewShouldAcceptFirstResponder:(NSView*)view { + FML_DCHECK(view == _flutterView); + // Only allow FlutterView to become first responder if TextInputPlugin is + // not active. Otherwise a mouse event inside FlutterView would cause the + // TextInputPlugin to lose first responder status. + return !_textInputPlugin.isFirstResponder; +} + #pragma mark - FlutterPluginRegistry - (id)registrarForPlugin:(NSString*)pluginName { diff --git a/shell/platform/darwin/macos/framework/Source/FlutterViewTest.mm b/shell/platform/darwin/macos/framework/Source/FlutterViewTest.mm index 0d6e7cb550400..65620a53824e4 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterViewTest.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterViewTest.mm @@ -10,25 +10,29 @@ constexpr int64_t kImplicitViewId = 0ll; -@interface TestReshapeListener : NSObject +@interface TestFlutterViewDelegate : NSObject @end -@implementation TestReshapeListener +@implementation TestFlutterViewDelegate - (void)viewDidReshape:(nonnull NSView*)view { } +- (BOOL)viewShouldAcceptFirstResponder:(NSView*)view { + return YES; +} + @end TEST(FlutterView, ShouldInheritContentsScaleReturnsYes) { id device = MTLCreateSystemDefaultDevice(); id queue = [device newCommandQueue]; - TestReshapeListener* listener = [[TestReshapeListener alloc] init]; + TestFlutterViewDelegate* delegate = [[TestFlutterViewDelegate alloc] init]; FlutterThreadSynchronizer* threadSynchronizer = [[FlutterThreadSynchronizer alloc] init]; FlutterView* view = [[FlutterView alloc] initWithMTLDevice:device commandQueue:queue - reshapeListener:listener + delegate:delegate threadSynchronizer:threadSynchronizer viewId:kImplicitViewId]; EXPECT_EQ([view layer:view.layer shouldInheritContentsScale:3.0 fromWindow:view.window], YES); From 9d3c0f6a72dee5ec8cf51a51ebed40dc5dd80ccb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Sep 2023 10:05:05 +0000 Subject: [PATCH 370/859] Bump webdriver from 3.0.2 to 3.0.3 in /lib/web_ui (#46400) Bumps [webdriver](https://github.com/google/webdriver.dart) from 3.0.2 to 3.0.3.
Changelog

Sourced from webdriver's changelog.

3.0.3

  • Include a content-type header when sending requests from async_html.dart. The content-type is necessary for compatibility with GeckoDriver 0.27.0 and newer versions. The content-type header was already being sent in IO clients for a long time, so only the HTML client had to be updated.
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=webdriver&package-manager=pub&previous-version=3.0.2&new-version=3.0.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- lib/web_ui/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/web_ui/pubspec.yaml b/lib/web_ui/pubspec.yaml index fc25009154222..42d44d2894061 100644 --- a/lib/web_ui/pubspec.yaml +++ b/lib/web_ui/pubspec.yaml @@ -45,7 +45,7 @@ dev_dependencies: uuid: 4.1.0 watcher: 1.1.0 web_socket_channel: any - webdriver: 3.0.2 + webdriver: 3.0.3 webkit_inspection_protocol: any yaml: 3.0.0 web_test_utils: From 4fddd94153df8f969d781871ab26451e2cd13037 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 29 Sep 2023 06:13:13 -0400 Subject: [PATCH 371/859] Roll Fuchsia Linux SDK from l2RxJKPfYn7QzGOoL... to vbw3Gwj-6eN7rSqb4... (#46401) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 06c97e16278e5..7fb0f6a9278ec 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'l2RxJKPfYn7QzGOoLPUPk0FyRZxbYTRv1JiQJgUbm9sC' + 'version': 'vbw3Gwj-6eN7rSqb4Vr1B7xwLqxAr-xRKPqVeFzcDfkC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index 9922af8743dce..7e8f208cf612f 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: 02ffea6fdf329c5632a665b4146b152e +Signature: 2f15626dca5f8554954a67155eeff57e ==================================================================================================== LIBRARY: fuchsia_sdk From d71cdd75d6774dfc137f29156ef1ec186ee17117 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 29 Sep 2023 07:41:54 -0400 Subject: [PATCH 372/859] Roll Fuchsia Mac SDK from Ta8wiQnzbBc7fAGeR... to mR_mhiacGiD-ObsoG... (#46403) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 7fb0f6a9278ec..f5078b49fe5a1 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'Ta8wiQnzbBc7fAGeRwzTcFoaZb8YvK33VnytyclyC7EC' + 'version': 'mR_mhiacGiD-ObsoGowsGOUk-oAV9_nF3T0cqej6BZsC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From a4871c291249f41fdcb0deb6fa4c6139ce7846bb Mon Sep 17 00:00:00 2001 From: gaaclarke <30870216+gaaclarke@users.noreply.github.com> Date: Fri, 29 Sep 2023 09:24:27 -0700 Subject: [PATCH 373/859] [Impeller] Implements canvas recorder with trace serializer (#46376) This implements a portion of impeller canvas recorder that just prints log statements to understand what is getting rendered in impeller when executing code from the framework. Eventually this should get moved to the displaylist layer when we have golden and interactive tests at that layer. This was useful for me to debug a fidelity issue, the hope is that others will find it useful and can expand it as necessary. Eventually the recordings can be used to generate tests. design doc: [go/impeller-canvas-recorder](http://goto.google.com/impeller-canvas-recorder) ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [ ] I listed at least one issue that this PR fixes in the description above. - [x] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I signed the [CLA]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat --- ci/licenses_golden/excluded_files | 2 + ci/licenses_golden/licenses_flutter | 8 + impeller/aiks/BUILD.gn | 19 ++ impeller/aiks/canvas_recorder.h | 290 ++++++++++++++++++ impeller/aiks/canvas_recorder_unittests.cc | 236 ++++++++++++++ impeller/aiks/canvas_type.h | 22 ++ impeller/aiks/image_filter.h | 44 +++ impeller/aiks/trace_serializer.cc | 226 ++++++++++++++ impeller/aiks/trace_serializer.h | 64 ++++ impeller/aiks/trace_serializer_unittests.cc | 20 ++ impeller/display_list/dl_dispatcher.h | 4 +- impeller/display_list/nine_patch_converter.cc | 2 +- impeller/display_list/nine_patch_converter.h | 4 +- impeller/tools/impeller.gni | 3 + tools/gn | 9 + 15 files changed, 948 insertions(+), 5 deletions(-) create mode 100644 impeller/aiks/canvas_recorder.h create mode 100644 impeller/aiks/canvas_recorder_unittests.cc create mode 100644 impeller/aiks/canvas_type.h create mode 100644 impeller/aiks/trace_serializer.cc create mode 100644 impeller/aiks/trace_serializer.h create mode 100644 impeller/aiks/trace_serializer_unittests.cc diff --git a/ci/licenses_golden/excluded_files b/ci/licenses_golden/excluded_files index feed60b197fdf..eb856b479e043 100644 --- a/ci/licenses_golden/excluded_files +++ b/ci/licenses_golden/excluded_files @@ -122,8 +122,10 @@ ../../../flutter/impeller/.gitignore ../../../flutter/impeller/README.md ../../../flutter/impeller/aiks/aiks_unittests.cc +../../../flutter/impeller/aiks/canvas_recorder_unittests.cc ../../../flutter/impeller/aiks/canvas_unittests.cc ../../../flutter/impeller/aiks/testing +../../../flutter/impeller/aiks/trace_serializer_unittests.cc ../../../flutter/impeller/archivist/archivist_unittests.cc ../../../flutter/impeller/base/README.md ../../../flutter/impeller/base/base_unittests.cc diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index 578a160f57053..a8c4fb89fe059 100644 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -1027,6 +1027,8 @@ ORIGIN: ../../../flutter/impeller/aiks/aiks_playground_inspector.cc + ../../../f ORIGIN: ../../../flutter/impeller/aiks/aiks_playground_inspector.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/aiks/canvas.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/aiks/canvas.h + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/aiks/canvas_recorder.h + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/aiks/canvas_type.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/aiks/color_filter.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/aiks/color_filter.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/aiks/color_source.cc + ../../../flutter/LICENSE @@ -1043,6 +1045,8 @@ ORIGIN: ../../../flutter/impeller/aiks/picture.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/aiks/picture.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/aiks/picture_recorder.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/aiks/picture_recorder.h + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/aiks/trace_serializer.cc + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/aiks/trace_serializer.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/archivist/archivable.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/archivist/archivable.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/archivist/archive.cc + ../../../flutter/LICENSE @@ -3778,6 +3782,8 @@ FILE: ../../../flutter/impeller/aiks/aiks_playground_inspector.cc FILE: ../../../flutter/impeller/aiks/aiks_playground_inspector.h FILE: ../../../flutter/impeller/aiks/canvas.cc FILE: ../../../flutter/impeller/aiks/canvas.h +FILE: ../../../flutter/impeller/aiks/canvas_recorder.h +FILE: ../../../flutter/impeller/aiks/canvas_type.h FILE: ../../../flutter/impeller/aiks/color_filter.cc FILE: ../../../flutter/impeller/aiks/color_filter.h FILE: ../../../flutter/impeller/aiks/color_source.cc @@ -3794,6 +3800,8 @@ FILE: ../../../flutter/impeller/aiks/picture.cc FILE: ../../../flutter/impeller/aiks/picture.h FILE: ../../../flutter/impeller/aiks/picture_recorder.cc FILE: ../../../flutter/impeller/aiks/picture_recorder.h +FILE: ../../../flutter/impeller/aiks/trace_serializer.cc +FILE: ../../../flutter/impeller/aiks/trace_serializer.h FILE: ../../../flutter/impeller/archivist/archivable.cc FILE: ../../../flutter/impeller/archivist/archivable.h FILE: ../../../flutter/impeller/archivist/archive.cc diff --git a/impeller/aiks/BUILD.gn b/impeller/aiks/BUILD.gn index ea963093336ba..f341021bdf5d3 100644 --- a/impeller/aiks/BUILD.gn +++ b/impeller/aiks/BUILD.gn @@ -4,12 +4,18 @@ import("../tools/impeller.gni") +config("impeller_canvas_recorder_config") { + defines = [ "IMPELLER_TRACE_CANVAS" ] +} + impeller_component("aiks") { sources = [ "aiks_context.cc", "aiks_context.h", "canvas.cc", "canvas.h", + "canvas_recorder.h", + "canvas_type.h", "color_filter.cc", "color_filter.h", "color_source.cc", @@ -26,6 +32,7 @@ impeller_component("aiks") { "picture.h", "picture_recorder.cc", "picture_recorder.h", + "trace_serializer.h", ] public_deps = [ @@ -35,6 +42,11 @@ impeller_component("aiks") { ] deps = [ "//flutter/fml" ] + + if (impeller_trace_canvas) { + sources += [ "trace_serializer.cc" ] + public_configs = [ ":impeller_canvas_recorder_config" ] + } } impeller_component("aiks_playground") { @@ -60,10 +72,12 @@ impeller_component("aiks_unittests") { sources = [ "aiks_unittests.cc", + "canvas_recorder_unittests.cc", "canvas_unittests.cc", "testing/context_mock.h", "testing/context_spy.cc", "testing/context_spy.h", + "trace_serializer_unittests.cc", ] deps = [ ":aiks", @@ -75,6 +89,11 @@ impeller_component("aiks_unittests") { "//flutter/impeller/typographer/backends/stb:typographer_stb_backend", "//flutter/testing:testing_lib", ] + + if (!impeller_trace_canvas) { + sources += [ "trace_serializer.cc" ] + public_configs = [ ":impeller_canvas_recorder_config" ] + } } impeller_component("aiks_unittests_golden") { diff --git a/impeller/aiks/canvas_recorder.h b/impeller/aiks/canvas_recorder.h new file mode 100644 index 0000000000000..56601207f86ad --- /dev/null +++ b/impeller/aiks/canvas_recorder.h @@ -0,0 +1,290 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#pragma once + +#include + +#include "impeller/aiks/canvas.h" + +#define FLT_CANVAS_RECORDER_OP_ARG(name) CanvasRecorderOp::name, &Canvas::name + +namespace impeller { + +/// TODO(tbd): These are very similar to `flutter::DisplayListOpType`. When +/// golden tests can be written at a higher level, migrate these to +/// flutter::DisplayListOpType. +enum CanvasRecorderOp : uint16_t { + New, + Save, + SaveLayer, + Restore, + RestoreToCount, + ResetTransform, + Transform, + Concat, + PreConcat, + Translate, + Scale2, + Scale3, + Skew, + Rotate, + DrawPath, + DrawPaint, + DrawRect, + DrawRRect, + DrawCircle, + DrawPoints, + DrawImage, + DrawImageRect, + ClipPath, + ClipRect, + ClipRRect, + DrawPicture, + DrawTextFrame, + DrawVertices, + DrawAtlas, +}; + +/// Static polymorphic replacement for impeller::Canvas that records methods +/// called on an impeller::Canvas and forwards it to a real instance. +/// TODO(https://github.com/flutter/flutter/issues/135718): Move this recorder +/// to the DisplayList level when golden tests can be written at the ui.Canvas +/// layer. +template +class CanvasRecorder { + public: +#ifndef IMPELLER_TRACE_CANVAS + // Canvas recorder should only be used when IMPELLER_TRACE_CANVAS is defined + // (never in production code). + static_assert(false); +#endif + + CanvasRecorder() : canvas_() { serializer_.Write(CanvasRecorderOp::New); } + + explicit CanvasRecorder(Rect cull_rect) : canvas_(cull_rect) { + serializer_.Write(CanvasRecorderOp::New); + } + + explicit CanvasRecorder(IRect cull_rect) : canvas_(cull_rect) { + serializer_.Write(CanvasRecorderOp::New); + } + + ~CanvasRecorder() {} + + const Serializer& GetSerializer() const { return serializer_; } + + template + ReturnType ExecuteAndSerialize(CanvasRecorderOp op, + ReturnType (Canvas::*canvasMethod)()) { + serializer_.Write(op); + return (canvas_.*canvasMethod)(); + } + + template + auto ExecuteAndSerialize(CanvasRecorderOp op, + FuncType canvasMethod, + Args&&... args) + -> decltype((std::declval().* + canvasMethod)(std::forward(args)...)) { + // Serialize each argument + (serializer_.Write(std::forward(args)), ...); + serializer_.Write(op); + return (canvas_.*canvasMethod)(std::forward(args)...); + } + + ////////////////////////////////////////////////////////////////////////////// + // Canvas Static Polymorphism //////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////////// + + void Save() { + return ExecuteAndSerialize(CanvasRecorderOp::Save, &Canvas::Save); + } + + void SaveLayer( + const Paint& paint, + std::optional bounds = std::nullopt, + const std::shared_ptr& backdrop_filter = nullptr) { + return ExecuteAndSerialize(FLT_CANVAS_RECORDER_OP_ARG(SaveLayer), paint, + bounds, backdrop_filter); + } + + bool Restore() { + return ExecuteAndSerialize(FLT_CANVAS_RECORDER_OP_ARG(Restore)); + } + + size_t GetSaveCount() const { return canvas_.GetSaveCount(); } + + void RestoreToCount(size_t count) { + return ExecuteAndSerialize(FLT_CANVAS_RECORDER_OP_ARG(RestoreToCount), + count); + } + + const Matrix& GetCurrentTransformation() const { + return canvas_.GetCurrentTransformation(); + } + + const std::optional GetCurrentLocalCullingBounds() const { + return canvas_.GetCurrentLocalCullingBounds(); + } + + void ResetTransform() { + return ExecuteAndSerialize(FLT_CANVAS_RECORDER_OP_ARG(ResetTransform)); + } + + void Transform(const Matrix& xformation) { + return ExecuteAndSerialize(FLT_CANVAS_RECORDER_OP_ARG(Transform), + xformation); + } + + void Concat(const Matrix& xformation) { + return ExecuteAndSerialize(FLT_CANVAS_RECORDER_OP_ARG(Concat), xformation); + } + + void PreConcat(const Matrix& xformation) { + return ExecuteAndSerialize(FLT_CANVAS_RECORDER_OP_ARG(PreConcat), + xformation); + } + + void Translate(const Vector3& offset) { + return ExecuteAndSerialize(FLT_CANVAS_RECORDER_OP_ARG(Translate), offset); + } + + void Scale(const Vector2& scale) { + return ExecuteAndSerialize( + CanvasRecorderOp::Scale2, + static_cast(&Canvas::Scale), scale); + } + + void Scale(const Vector3& scale) { + return ExecuteAndSerialize( + CanvasRecorderOp::Scale3, + static_cast(&Canvas::Scale), scale); + } + + void Skew(Scalar sx, Scalar sy) { + return ExecuteAndSerialize(FLT_CANVAS_RECORDER_OP_ARG(Skew), sx, sy); + } + + void Rotate(Radians radians) { + return ExecuteAndSerialize(FLT_CANVAS_RECORDER_OP_ARG(Rotate), radians); + } + + void DrawPath(const Path& path, const Paint& paint) { + return ExecuteAndSerialize(FLT_CANVAS_RECORDER_OP_ARG(DrawPath), path, + paint); + } + + void DrawPaint(const Paint& paint) { + return ExecuteAndSerialize(FLT_CANVAS_RECORDER_OP_ARG(DrawPaint), paint); + } + + void DrawRect(Rect rect, const Paint& paint) { + return ExecuteAndSerialize(FLT_CANVAS_RECORDER_OP_ARG(DrawRect), rect, + paint); + } + + void DrawRRect(Rect rect, Scalar corner_radius, const Paint& paint) { + return ExecuteAndSerialize(FLT_CANVAS_RECORDER_OP_ARG(DrawRRect), rect, + corner_radius, paint); + } + + void DrawCircle(Point center, Scalar radius, const Paint& paint) { + return ExecuteAndSerialize(FLT_CANVAS_RECORDER_OP_ARG(DrawCircle), center, + radius, paint); + } + + void DrawPoints(std::vector points, + Scalar radius, + const Paint& paint, + PointStyle point_style) { + return ExecuteAndSerialize(FLT_CANVAS_RECORDER_OP_ARG(DrawPoints), points, + radius, paint, point_style); + } + + void DrawImage(const std::shared_ptr& image, + Point offset, + const Paint& paint, + SamplerDescriptor sampler = {}) { + return ExecuteAndSerialize(FLT_CANVAS_RECORDER_OP_ARG(DrawImage), image, + offset, paint, sampler); + } + + void DrawImageRect(const std::shared_ptr& image, + Rect source, + Rect dest, + const Paint& paint, + SamplerDescriptor sampler = {}) { + return ExecuteAndSerialize(FLT_CANVAS_RECORDER_OP_ARG(DrawImageRect), image, + source, dest, paint, sampler); + } + + void ClipPath( + const Path& path, + Entity::ClipOperation clip_op = Entity::ClipOperation::kIntersect) { + return ExecuteAndSerialize(FLT_CANVAS_RECORDER_OP_ARG(ClipPath), path, + clip_op); + } + + void ClipRect( + const Rect& rect, + Entity::ClipOperation clip_op = Entity::ClipOperation::kIntersect) { + return ExecuteAndSerialize(FLT_CANVAS_RECORDER_OP_ARG(ClipRect), rect, + clip_op); + } + + void ClipRRect( + const Rect& rect, + Scalar corner_radius, + Entity::ClipOperation clip_op = Entity::ClipOperation::kIntersect) { + return ExecuteAndSerialize(FLT_CANVAS_RECORDER_OP_ARG(ClipRRect), rect, + corner_radius, clip_op); + } + + void DrawPicture(const Picture& picture) { + return ExecuteAndSerialize(FLT_CANVAS_RECORDER_OP_ARG(DrawPicture), + picture); + } + + void DrawTextFrame(const std::shared_ptr& text_frame, + Point position, + const Paint& paint) { + return ExecuteAndSerialize(FLT_CANVAS_RECORDER_OP_ARG(DrawTextFrame), + text_frame, position, paint); + } + + void DrawVertices(const std::shared_ptr& vertices, + BlendMode blend_mode, + const Paint& paint) { + return ExecuteAndSerialize(FLT_CANVAS_RECORDER_OP_ARG(DrawVertices), + vertices, blend_mode, paint); + } + + void DrawAtlas(const std::shared_ptr& atlas, + std::vector transforms, + std::vector texture_coordinates, + std::vector colors, + BlendMode blend_mode, + SamplerDescriptor sampler, + std::optional cull_rect, + const Paint& paint) { + return ExecuteAndSerialize(FLT_CANVAS_RECORDER_OP_ARG(DrawAtlas), // + atlas, // + transforms, // + texture_coordinates, // + colors, // + blend_mode, // + sampler, // + cull_rect, // + paint); + } + + Picture EndRecordingAsPicture() { return canvas_.EndRecordingAsPicture(); } + + private: + Canvas canvas_; + Serializer serializer_; +}; + +} // namespace impeller diff --git a/impeller/aiks/canvas_recorder_unittests.cc b/impeller/aiks/canvas_recorder_unittests.cc new file mode 100644 index 0000000000000..041fc185dac23 --- /dev/null +++ b/impeller/aiks/canvas_recorder_unittests.cc @@ -0,0 +1,236 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "flutter/testing/testing.h" +#include "impeller/aiks/canvas_recorder.h" +namespace impeller { +namespace testing { + +namespace { +class Serializer { + public: + void Write(CanvasRecorderOp op) { last_op_ = op; } + + void Write(const Paint& paint) {} + + void Write(const std::optional optional_rect) {} + + void Write(const std::shared_ptr& image_filter) {} + + void Write(size_t size) {} + + void Write(const Matrix& matrix) {} + + void Write(const Vector3& vec3) {} + + void Write(const Vector2& vec2) {} + + void Write(const Radians& vec2) {} + + void Write(const Path& path) {} + + void Write(const std::vector& points) {} + + void Write(const PointStyle& point_style) {} + + void Write(const std::shared_ptr& image) {} + + void Write(const SamplerDescriptor& sampler) {} + + void Write(const Entity::ClipOperation& clip_op) {} + + void Write(const Picture& clip_op) {} + + void Write(const std::shared_ptr& text_frame) {} + + void Write(const std::shared_ptr& vertices) {} + + void Write(const BlendMode& blend_mode) {} + + void Write(const std::vector& matrices) {} + + void Write(const std::vector& matrices) {} + + void Write(const std::vector& matrices) {} + + CanvasRecorderOp last_op_; +}; +} // namespace + +TEST(CanvasRecorder, Save) { + CanvasRecorder recorder; + recorder.Save(); + ASSERT_EQ(recorder.GetSerializer().last_op_, CanvasRecorderOp::Save); +} + +TEST(CanvasRecorder, SaveLayer) { + CanvasRecorder recorder; + Paint paint; + recorder.SaveLayer(paint); + ASSERT_EQ(recorder.GetSerializer().last_op_, CanvasRecorderOp::SaveLayer); +} + +TEST(CanvasRecorder, Restore) { + CanvasRecorder recorder; + recorder.Restore(); + ASSERT_EQ(recorder.GetSerializer().last_op_, CanvasRecorderOp::Restore); +} + +TEST(CanvasRecorder, RestoreToCount) { + CanvasRecorder recorder; + recorder.Save(); + recorder.RestoreToCount(0); + ASSERT_EQ(recorder.GetSerializer().last_op_, + CanvasRecorderOp::RestoreToCount); +} + +TEST(CanvasRecorder, ResetTransform) { + CanvasRecorder recorder; + recorder.ResetTransform(); + ASSERT_EQ(recorder.GetSerializer().last_op_, + CanvasRecorderOp::ResetTransform); +} + +TEST(CanvasRecorder, Transform) { + CanvasRecorder recorder; + recorder.Transform(Matrix()); + ASSERT_EQ(recorder.GetSerializer().last_op_, CanvasRecorderOp::Transform); +} + +TEST(CanvasRecorder, Concat) { + CanvasRecorder recorder; + recorder.Concat(Matrix()); + ASSERT_EQ(recorder.GetSerializer().last_op_, CanvasRecorderOp::Concat); +} + +TEST(CanvasRecorder, PreConcat) { + CanvasRecorder recorder; + recorder.PreConcat(Matrix()); + ASSERT_EQ(recorder.GetSerializer().last_op_, CanvasRecorderOp::PreConcat); +} + +TEST(CanvasRecorder, Translate) { + CanvasRecorder recorder; + recorder.Translate(Vector3()); + ASSERT_EQ(recorder.GetSerializer().last_op_, CanvasRecorderOp::Translate); +} + +TEST(CanvasRecorder, Scale2) { + CanvasRecorder recorder; + recorder.Scale(Vector2()); + ASSERT_EQ(recorder.GetSerializer().last_op_, CanvasRecorderOp::Scale2); +} + +TEST(CanvasRecorder, Scale3) { + CanvasRecorder recorder; + recorder.Scale(Vector3()); + ASSERT_EQ(recorder.GetSerializer().last_op_, CanvasRecorderOp::Scale3); +} + +TEST(CanvasRecorder, Skew) { + CanvasRecorder recorder; + recorder.Skew(0, 0); + ASSERT_EQ(recorder.GetSerializer().last_op_, CanvasRecorderOp::Skew); +} + +TEST(CanvasRecorder, Rotate) { + CanvasRecorder recorder; + recorder.Rotate(Radians(0)); + ASSERT_EQ(recorder.GetSerializer().last_op_, CanvasRecorderOp::Rotate); +} + +TEST(CanvasRecorder, DrawPath) { + CanvasRecorder recorder; + recorder.DrawPath(Path(), Paint()); + ASSERT_EQ(recorder.GetSerializer().last_op_, CanvasRecorderOp::DrawPath); +} + +TEST(CanvasRecorder, DrawPaint) { + CanvasRecorder recorder; + recorder.DrawPaint(Paint()); + ASSERT_EQ(recorder.GetSerializer().last_op_, CanvasRecorderOp::DrawPaint); +} + +TEST(CanvasRecorder, DrawRect) { + CanvasRecorder recorder; + recorder.DrawRect(Rect(), Paint()); + ASSERT_EQ(recorder.GetSerializer().last_op_, CanvasRecorderOp::DrawRect); +} + +TEST(CanvasRecorder, DrawRRect) { + CanvasRecorder recorder; + recorder.DrawRRect(Rect(), 0, Paint()); + ASSERT_EQ(recorder.GetSerializer().last_op_, CanvasRecorderOp::DrawRRect); +} + +TEST(CanvasRecorder, DrawCircle) { + CanvasRecorder recorder; + recorder.DrawCircle(Point(), 0, Paint()); + ASSERT_EQ(recorder.GetSerializer().last_op_, CanvasRecorderOp::DrawCircle); +} + +TEST(CanvasRecorder, DrawPoints) { + CanvasRecorder recorder; + recorder.DrawPoints(std::vector{}, 0, Paint(), PointStyle::kRound); + ASSERT_EQ(recorder.GetSerializer().last_op_, CanvasRecorderOp::DrawPoints); +} + +TEST(CanvasRecorder, DrawImage) { + CanvasRecorder recorder; + recorder.DrawImage({}, {}, {}, {}); + ASSERT_EQ(recorder.GetSerializer().last_op_, CanvasRecorderOp::DrawImage); +} + +TEST(CanvasRecorder, DrawImageRect) { + CanvasRecorder recorder; + recorder.DrawImageRect({}, {}, {}, {}, {}); + ASSERT_EQ(recorder.GetSerializer().last_op_, CanvasRecorderOp::DrawImageRect); +} + +TEST(CanvasRecorder, ClipPath) { + CanvasRecorder recorder; + recorder.ClipPath({}); + ASSERT_EQ(recorder.GetSerializer().last_op_, CanvasRecorderOp::ClipPath); +} + +TEST(CanvasRecorder, ClipRect) { + CanvasRecorder recorder; + recorder.ClipRect({}); + ASSERT_EQ(recorder.GetSerializer().last_op_, CanvasRecorderOp::ClipRect); +} + +TEST(CanvasRecorder, ClipRRect) { + CanvasRecorder recorder; + recorder.ClipRRect({}, 0); + ASSERT_EQ(recorder.GetSerializer().last_op_, CanvasRecorderOp::ClipRRect); +} + +TEST(CanvasRecorder, DrawPicture) { + CanvasRecorder recorder; + recorder.DrawPicture({}); + ASSERT_EQ(recorder.GetSerializer().last_op_, CanvasRecorderOp::DrawPicture); +} + +TEST(CanvasRecorder, DrawTextFrame) { + CanvasRecorder recorder; + recorder.DrawTextFrame({}, {}, {}); + ASSERT_EQ(recorder.GetSerializer().last_op_, CanvasRecorderOp::DrawTextFrame); +} + +TEST(CanvasRecorder, DrawVertices) { + CanvasRecorder recorder; + auto geometry = std::shared_ptr( + new VerticesGeometry({}, {}, {}, {}, {}, {})); + recorder.DrawVertices(geometry, {}, {}); + ASSERT_EQ(recorder.GetSerializer().last_op_, CanvasRecorderOp::DrawVertices); +} + +TEST(CanvasRecorder, DrawAtlas) { + CanvasRecorder recorder; + recorder.DrawAtlas({}, {}, {}, {}, {}, {}, {}, {}); + ASSERT_EQ(recorder.GetSerializer().last_op_, CanvasRecorderOp::DrawAtlas); +} + +} // namespace testing +} // namespace impeller diff --git a/impeller/aiks/canvas_type.h b/impeller/aiks/canvas_type.h new file mode 100644 index 0000000000000..a6992163a77ba --- /dev/null +++ b/impeller/aiks/canvas_type.h @@ -0,0 +1,22 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#pragma once + +#include "impeller/aiks/canvas.h" +#include "impeller/aiks/canvas_recorder.h" +#include "impeller/aiks/trace_serializer.h" + +namespace impeller { + +/// CanvasType defines what is the concrete type of the Canvas to be used. When +/// the recorder is enabled it will be swapped out in place of the Canvas at +/// compile-time. +#ifdef IMPELLER_TRACE_CANVAS +using CanvasType = CanvasRecorder; +#else +using CanvasType = Canvas; +#endif + +} // namespace impeller diff --git a/impeller/aiks/image_filter.h b/impeller/aiks/image_filter.h index 0c5bdd3889717..e3e6908df515c 100644 --- a/impeller/aiks/image_filter.h +++ b/impeller/aiks/image_filter.h @@ -15,6 +15,25 @@ namespace impeller { struct Paint; +class LocalMatrixImageFilter; +class BlurImageFilter; +class DilateImageFilter; +class ErodeImageFilter; +class MatrixImageFilter; +class ComposeImageFilter; +class ColorImageFilter; + +class ImageFilterVisitor { + public: + virtual void Visit(const BlurImageFilter& filter) = 0; + virtual void Visit(const LocalMatrixImageFilter& filter) = 0; + virtual void Visit(const DilateImageFilter& filter) = 0; + virtual void Visit(const ErodeImageFilter& filter) = 0; + virtual void Visit(const MatrixImageFilter& filter) = 0; + virtual void Visit(const ComposeImageFilter& filter) = 0; + virtual void Visit(const ColorImageFilter& filter) = 0; +}; + /******************************************************************************* ******* ImageFilter ******************************************************************************/ @@ -65,6 +84,8 @@ class ImageFilter { const FilterInput::Ref& input) const = 0; virtual std::shared_ptr Clone() const = 0; + + virtual void Visit(ImageFilterVisitor& visitor) = 0; }; /******************************************************************************* @@ -87,6 +108,9 @@ class BlurImageFilter : public ImageFilter { // |ImageFilter| std::shared_ptr Clone() const override; + // |ImageFilter| + void Visit(ImageFilterVisitor& visitor) override { visitor.Visit(*this); } + private: Sigma sigma_x_; Sigma sigma_y_; @@ -111,6 +135,9 @@ class DilateImageFilter : public ImageFilter { // |ImageFilter| std::shared_ptr Clone() const override; + // |ImageFilter| + void Visit(ImageFilterVisitor& visitor) override { visitor.Visit(*this); } + private: Radius radius_x_; Radius radius_y_; @@ -133,6 +160,9 @@ class ErodeImageFilter : public ImageFilter { // |ImageFilter| std::shared_ptr Clone() const override; + // |ImageFilter| + void Visit(ImageFilterVisitor& visitor) override { visitor.Visit(*this); } + private: Radius radius_x_; Radius radius_y_; @@ -155,6 +185,11 @@ class MatrixImageFilter : public ImageFilter { // |ImageFilter| std::shared_ptr Clone() const override; + // |ImageFilter| + void Visit(ImageFilterVisitor& visitor) override { visitor.Visit(*this); } + + const Matrix& GetMatrix() const { return matrix_; } + private: Matrix matrix_; SamplerDescriptor sampler_descriptor_; @@ -177,6 +212,9 @@ class ComposeImageFilter : public ImageFilter { // |ImageFilter| std::shared_ptr Clone() const override; + // |ImageFilter| + void Visit(ImageFilterVisitor& visitor) override { visitor.Visit(*this); } + private: std::shared_ptr inner_; std::shared_ptr outer_; @@ -199,6 +237,9 @@ class ColorImageFilter : public ImageFilter { // |ImageFilter| std::shared_ptr Clone() const override; + // |ImageFilter| + void Visit(ImageFilterVisitor& visitor) override { visitor.Visit(*this); } + private: std::shared_ptr color_filter_; }; @@ -221,6 +262,9 @@ class LocalMatrixImageFilter : public ImageFilter { // |ImageFilter| std::shared_ptr Clone() const override; + // |ImageFilter| + void Visit(ImageFilterVisitor& visitor) override { visitor.Visit(*this); } + private: Matrix matrix_; std::shared_ptr internal_filter_; diff --git a/impeller/aiks/trace_serializer.cc b/impeller/aiks/trace_serializer.cc new file mode 100644 index 0000000000000..e3f87c8eea3dd --- /dev/null +++ b/impeller/aiks/trace_serializer.cc @@ -0,0 +1,226 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "impeller/aiks/trace_serializer.h" +#include "flutter/fml/logging.h" + +namespace impeller { + +namespace { + +class ImageFilterTraceVisitor : public ImageFilterVisitor { + public: + explicit ImageFilterTraceVisitor(std::ostream& os) : os_(os) {} + void Visit(const BlurImageFilter& filter) override { + os_ << "BlurImageFilter"; + } + void Visit(const LocalMatrixImageFilter& filter) override { + os_ << "LocalMatrixImageFilter"; + } + void Visit(const DilateImageFilter& filter) override { + os_ << "DilateImageFilter"; + } + void Visit(const ErodeImageFilter& filter) override { + os_ << "ErodeImageFilter"; + } + void Visit(const MatrixImageFilter& filter) override { + os_ << "{MatrixImageFilter matrix: " << filter.GetMatrix() << "}"; + } + void Visit(const ComposeImageFilter& filter) override { + os_ << "ComposeImageFilter"; + } + void Visit(const ColorImageFilter& filter) override { + os_ << "ColorImageFilter"; + } + + private: + std::ostream& os_; +}; + +std::ostream& operator<<(std::ostream& os, + const std::shared_ptr& image_filter) { + if (image_filter) { + os << "["; + ImageFilterTraceVisitor visitor(os); + image_filter->Visit(visitor); + os << "]"; + } else { + os << "[None]"; + } + return os; +} + +std::ostream& operator<<(std::ostream& os, const Paint& paint) { + os << "{" << std::endl; + os << " color: [" << paint.color << "]" << std::endl; + os << " color_source:" + << "[ColorSource]" << std::endl; + os << " dither: [" << paint.dither << "]" << std::endl; + os << " stroke_width: [" << paint.stroke_width << "]" << std::endl; + os << " stroke_cap: " + << "[Paint::Cap]" << std::endl; + os << " stroke_join: " + << "[Paint::Join]" << std::endl; + os << " stroke_miter: [" << paint.stroke_miter << "]" << std::endl; + os << " style:" + << "[Paint::Style]" << std::endl; + os << " blend_mode: [" << BlendModeToString(paint.blend_mode) << "]" + << std::endl; + os << " invert_colors: [" << paint.invert_colors << "]" << std::endl; + os << " image_filter: " << paint.image_filter << std::endl; + os << " color_filter: " << paint.color_filter << std::endl; + os << " mask_blur_descriptor: " + << "[std::optional]" << std::endl; + os << "}"; + return os; +} +} // namespace + +#define FLT_CANVAS_RECORDER_OP_TO_STRING(name) \ + case CanvasRecorderOp::name: \ + return #name + +namespace { +std::string_view CanvasRecorderOpToString(CanvasRecorderOp op) { + switch (op) { + FLT_CANVAS_RECORDER_OP_TO_STRING(New); + FLT_CANVAS_RECORDER_OP_TO_STRING(Save); + FLT_CANVAS_RECORDER_OP_TO_STRING(SaveLayer); + FLT_CANVAS_RECORDER_OP_TO_STRING(Restore); + FLT_CANVAS_RECORDER_OP_TO_STRING(RestoreToCount); + FLT_CANVAS_RECORDER_OP_TO_STRING(ResetTransform); + FLT_CANVAS_RECORDER_OP_TO_STRING(Transform); + FLT_CANVAS_RECORDER_OP_TO_STRING(Concat); + FLT_CANVAS_RECORDER_OP_TO_STRING(PreConcat); + FLT_CANVAS_RECORDER_OP_TO_STRING(Translate); + FLT_CANVAS_RECORDER_OP_TO_STRING(Scale2); + FLT_CANVAS_RECORDER_OP_TO_STRING(Scale3); + FLT_CANVAS_RECORDER_OP_TO_STRING(Skew); + FLT_CANVAS_RECORDER_OP_TO_STRING(Rotate); + FLT_CANVAS_RECORDER_OP_TO_STRING(DrawPath); + FLT_CANVAS_RECORDER_OP_TO_STRING(DrawPaint); + FLT_CANVAS_RECORDER_OP_TO_STRING(DrawRect); + FLT_CANVAS_RECORDER_OP_TO_STRING(DrawRRect); + FLT_CANVAS_RECORDER_OP_TO_STRING(DrawCircle); + FLT_CANVAS_RECORDER_OP_TO_STRING(DrawPoints); + FLT_CANVAS_RECORDER_OP_TO_STRING(DrawImage); + FLT_CANVAS_RECORDER_OP_TO_STRING(DrawImageRect); + FLT_CANVAS_RECORDER_OP_TO_STRING(ClipPath); + FLT_CANVAS_RECORDER_OP_TO_STRING(ClipRect); + FLT_CANVAS_RECORDER_OP_TO_STRING(ClipRRect); + FLT_CANVAS_RECORDER_OP_TO_STRING(DrawPicture); + FLT_CANVAS_RECORDER_OP_TO_STRING(DrawTextFrame); + FLT_CANVAS_RECORDER_OP_TO_STRING(DrawVertices); + FLT_CANVAS_RECORDER_OP_TO_STRING(DrawAtlas); + } +} +} // namespace + +TraceSerializer::TraceSerializer() {} + +void TraceSerializer::Write(CanvasRecorderOp op) { + if (op == CanvasRecorderOp::New) { + FML_LOG(ERROR) << "######################################################"; + } else { + FML_LOG(ERROR) << CanvasRecorderOpToString(op) << ":" << buffer_.str(); + buffer_.str(""); + buffer_.clear(); + } +} + +void TraceSerializer::Write(const Paint& paint) { + buffer_ << "[" << paint << "] "; +} + +void TraceSerializer::Write(const std::optional optional_rect) { + if (optional_rect.has_value()) { + buffer_ << "[" << optional_rect.value() << "] "; + } else { + buffer_ << "[None] "; + } +} + +void TraceSerializer::Write(const std::shared_ptr& image_filter) { + buffer_ << image_filter << " "; +} + +void TraceSerializer::Write(size_t size) { + buffer_ << "[" << size << "] "; +} + +void TraceSerializer::Write(const Matrix& matrix) { + buffer_ << "[" << matrix << "] "; +} + +void TraceSerializer::Write(const Vector3& vec3) { + buffer_ << "[" << vec3 << "] "; +} + +void TraceSerializer::Write(const Vector2& vec2) { + buffer_ << "[" << vec2 << "] "; +} + +void TraceSerializer::Write(const Radians& radians) { + buffer_ << "[" << radians.radians << "] "; +} + +void TraceSerializer::Write(const Path& path) { + buffer_ << "[Path] "; +} + +void TraceSerializer::Write(const std::vector& points) { + buffer_ << "[std::vector] "; +} + +void TraceSerializer::Write(const PointStyle& point_style) { + buffer_ << "[PointStyle] "; +} + +void TraceSerializer::Write(const std::shared_ptr& image) { + buffer_ << "[std::shared_ptr] "; +} + +void TraceSerializer::Write(const SamplerDescriptor& sampler) { + buffer_ << "[SamplerDescriptor] "; +} + +void TraceSerializer::Write(const Entity::ClipOperation& clip_op) { + switch (clip_op) { + case Entity::ClipOperation::kDifference: + buffer_ << "[kDifference] "; + break; + case Entity::ClipOperation::kIntersect: + buffer_ << "[kIntersect] "; + break; + } +} + +void TraceSerializer::Write(const Picture& clip_op) { + buffer_ << "[Picture] "; +} + +void TraceSerializer::Write(const std::shared_ptr& text_frame) { + buffer_ << "[std::shared_ptr] "; +} + +void TraceSerializer::Write(const std::shared_ptr& vertices) { + buffer_ << "[std::shared_ptr] "; +} + +void TraceSerializer::Write(const BlendMode& blend_mode) { + buffer_ << "[" << BlendModeToString(blend_mode) << "] "; +} + +void TraceSerializer::Write(const std::vector& matrices) { + buffer_ << "[std::vector] "; +} + +void TraceSerializer::Write(const std::vector& matrices) { + buffer_ << "[std::vector] "; +} + +void TraceSerializer::Write(const std::vector& matrices) { + buffer_ << "[std::vector] "; +} +} // namespace impeller diff --git a/impeller/aiks/trace_serializer.h b/impeller/aiks/trace_serializer.h new file mode 100644 index 0000000000000..9232de504a375 --- /dev/null +++ b/impeller/aiks/trace_serializer.h @@ -0,0 +1,64 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#pragma once + +#include +#include "impeller/aiks/canvas_recorder.h" + +namespace impeller { + +class TraceSerializer { + public: + TraceSerializer(); + + void Write(CanvasRecorderOp op); + + void Write(const Paint& paint); + + void Write(const std::optional optional_rect); + + void Write(const std::shared_ptr& image_filter); + + void Write(size_t size); + + void Write(const Matrix& matrix); + + void Write(const Vector3& vec3); + + void Write(const Vector2& vec2); + + void Write(const Radians& vec2); + + void Write(const Path& path); + + void Write(const std::vector& points); + + void Write(const PointStyle& point_style); + + void Write(const std::shared_ptr& image); + + void Write(const SamplerDescriptor& sampler); + + void Write(const Entity::ClipOperation& clip_op); + + void Write(const Picture& clip_op); + + void Write(const std::shared_ptr& text_frame); + + void Write(const std::shared_ptr& vertices); + + void Write(const BlendMode& blend_mode); + + void Write(const std::vector& matrices); + + void Write(const std::vector& matrices); + + void Write(const std::vector& matrices); + + private: + std::stringstream buffer_; +}; + +} // namespace impeller diff --git a/impeller/aiks/trace_serializer_unittests.cc b/impeller/aiks/trace_serializer_unittests.cc new file mode 100644 index 0000000000000..8bfaa47629bec --- /dev/null +++ b/impeller/aiks/trace_serializer_unittests.cc @@ -0,0 +1,20 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include +#include "flutter/testing/testing.h" +#include "impeller/aiks/trace_serializer.h" +namespace impeller { +namespace testing { + +TEST(TraceSerializer, Save) { + CanvasRecorder recorder; + std::ostringstream ss; + fml::LogMessage::CaptureNextLog(&ss); + recorder.Save(); + ASSERT_TRUE(ss.str().size() > 0); +} + +} // namespace testing +} // namespace impeller diff --git a/impeller/display_list/dl_dispatcher.h b/impeller/display_list/dl_dispatcher.h index 0dc3b7ce72461..8f0136a020917 100644 --- a/impeller/display_list/dl_dispatcher.h +++ b/impeller/display_list/dl_dispatcher.h @@ -6,7 +6,7 @@ #include "flutter/display_list/dl_op_receiver.h" #include "flutter/fml/macros.h" -#include "impeller/aiks/canvas.h" +#include "impeller/aiks/canvas_type.h" #include "impeller/aiks/paint.h" namespace impeller { @@ -226,7 +226,7 @@ class DlDispatcher final : public flutter::DlOpReceiver { private: Paint paint_; - Canvas canvas_; + CanvasType canvas_; Matrix initial_matrix_; FML_DISALLOW_COPY_AND_ASSIGN(DlDispatcher); diff --git a/impeller/display_list/nine_patch_converter.cc b/impeller/display_list/nine_patch_converter.cc index 4a4536999ac6e..21f3097937541 100644 --- a/impeller/display_list/nine_patch_converter.cc +++ b/impeller/display_list/nine_patch_converter.cc @@ -61,7 +61,7 @@ void NinePatchConverter::DrawNinePatch(const std::shared_ptr& image, Rect center, Rect dst, const SamplerDescriptor& sampler, - Canvas* canvas, + CanvasType* canvas, Paint* paint) { if (dst.IsEmpty()) { return; diff --git a/impeller/display_list/nine_patch_converter.h b/impeller/display_list/nine_patch_converter.h index 422a8943a0bd6..45caf719df677 100644 --- a/impeller/display_list/nine_patch_converter.h +++ b/impeller/display_list/nine_patch_converter.h @@ -7,7 +7,7 @@ #include #include "flutter/fml/macros.h" -#include "impeller/aiks/canvas.h" +#include "impeller/aiks/canvas_type.h" #include "impeller/aiks/image.h" #include "impeller/aiks/paint.h" #include "impeller/core/sampler_descriptor.h" @@ -26,7 +26,7 @@ class NinePatchConverter { Rect center, Rect dst, const SamplerDescriptor& sampler, - Canvas* canvas, + CanvasType* canvas, Paint* paint); private: diff --git a/impeller/tools/impeller.gni b/impeller/tools/impeller.gni index f2d33b0c28e4a..65b1f56254e28 100644 --- a/impeller/tools/impeller.gni +++ b/impeller/tools/impeller.gni @@ -44,6 +44,9 @@ declare_args() { # Enable experimental 3D scene rendering. impeller_enable_3d = false + + # Enable to get trace statements for canvas usage. + impeller_trace_canvas = false } declare_args() { diff --git a/tools/gn b/tools/gn index 5b481d6f33129..196219d35d611 100755 --- a/tools/gn +++ b/tools/gn @@ -672,6 +672,9 @@ def to_gn_args(args): if args.enable_impeller_3d: gn_args['impeller_enable_3d'] = True + if args.enable_impeller_trace_canvas: + gn_args['impeller_trace_canvas'] = True + if args.enable_impeller_vulkan: gn_args['impeller_enable_vulkan'] = True @@ -1223,6 +1226,12 @@ def parse_args(args): help='Enables experimental 3d support.' ) + parser.add_argument( + '--enable-impeller-trace-canvas', + default=False, + action='store_true', + help='Enables tracing calls to Canvas.' + ) parser.add_argument( '--malioc-path', type=str, help='The path to the malioc tool.' ) From e95b5afd908648d28e6518e63994acc33db741ac Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 29 Sep 2023 12:30:41 -0400 Subject: [PATCH 374/859] Roll Skia from a80c164ffb8a to 9f8242377455 (1 revision) (#46406) https://skia.googlesource.com/skia.git/+log/a80c164ffb8a..9f8242377455 2023-09-29 johnstiles@google.com Fix latent bug in fragmentProcessorHasCoordsParam. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index f5078b49fe5a1..1edf114ced498 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'a80c164ffb8a26aa29020be39993581a6761ab6c', + 'skia_revision': '9f8242377455ccfa4ffba67f0b3bd59bc2bf038b', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index fb02f03636626..25eb348fc2473 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 6426ae1ecbca3a045062fc7fc5647dc9 +Signature: 9ce3f52001ef96b98a0b5345f5b02fda ==================================================================================================== LIBRARY: etc1 From 3fbd0228382ac645fa7db255af4aa4ca0b6e308b Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 29 Sep 2023 13:15:01 -0400 Subject: [PATCH 375/859] Roll Skia from 9f8242377455 to 2d4045f55fd5 (3 revisions) (#46408) https://skia.googlesource.com/skia.git/+log/9f8242377455..2d4045f55fd5 2023-09-29 johnstiles@google.com Add support for null child FPs to SkMesh. 2023-09-29 johnstiles@google.com Pass mesh children into MeshOp and Mesh geometry processor. 2023-09-29 kjlubick@google.com Add fontations gm to Bazel build of viewer If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 1edf114ced498..b401c412c61a0 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '9f8242377455ccfa4ffba67f0b3bd59bc2bf038b', + 'skia_revision': '2d4045f55fd50a6b712a869736a7f89aceaa94e6', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 25eb348fc2473..28bb68ba1bdb9 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 9ce3f52001ef96b98a0b5345f5b02fda +Signature: 5eba63831d1cf75d2eb86d0949f7404a ==================================================================================================== LIBRARY: etc1 From ae34483d26615288f19c329ceb3642f9dde3f77f Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 29 Sep 2023 13:28:12 -0400 Subject: [PATCH 376/859] Manual roll Dart SDK from 077d768accfa to e042e83c85a5 (3 revisions) (#46409) Manual roll requested by zra@google.com https://dart.googlesource.com/sdk.git/+log/077d768accfa..e042e83c85a5 2023-09-29 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-213.0.dev 2023-09-29 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-212.0.dev 2023-09-28 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-211.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jacksongardner@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index b401c412c61a0..3a688e7060740 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '077d768accfa3419b8b57cf779cca8228b417faa', + 'dart_revision': 'e042e83c85a552f01ab2caeab0ddb71105ababa5', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index f463b1c0dbf13..88c6efa074c32 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: fdaa9367efe1c4a57d9abc0eb91db374 +Signature: ed07e002ff0f4c270c3658c46a4abb14 ==================================================================================================== LIBRARY: dart From eb101f9c5960dc0c3809236cecb6cbd4a4d1937a Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Fri, 29 Sep 2023 10:52:05 -0700 Subject: [PATCH 377/859] [Impeller] simplify invert colors flag by supporting composed color filters. (#46391) Fixes https://github.com/flutter/flutter/issues/135699 To avoid the ugly complicated code for conditionally applying both colorfilters, make the dl dispatcher handle merging these filters together in a defined order. The original bug is caused by not checking for invert colors in a CPU fast path. --- impeller/aiks/aiks_unittests.cc | 36 +++++++++++++++++++-- impeller/aiks/canvas.cc | 1 - impeller/aiks/color_filter.cc | 45 ++++++++++++++++++++++++++ impeller/aiks/color_filter.h | 28 ++++++++++++++++ impeller/aiks/paint.cc | 24 -------------- impeller/aiks/paint.h | 4 --- impeller/display_list/dl_dispatcher.cc | 36 +++++++++++++++------ 7 files changed, 133 insertions(+), 41 deletions(-) diff --git a/impeller/aiks/aiks_unittests.cc b/impeller/aiks/aiks_unittests.cc index 4950aae8496fc..f1557d2c6ad8e 100644 --- a/impeller/aiks/aiks_unittests.cc +++ b/impeller/aiks/aiks_unittests.cc @@ -13,6 +13,7 @@ #include "flutter/testing/testing.h" #include "impeller/aiks/aiks_playground.h" #include "impeller/aiks/canvas.h" +#include "impeller/aiks/color_filter.h" #include "impeller/aiks/image.h" #include "impeller/aiks/image_filter.h" #include "impeller/aiks/paint_pass_delegate.h" @@ -123,16 +124,47 @@ TEST_P(AiksTest, CanRenderImage) { ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); } -TEST_P(AiksTest, CanRenderInvertedImage) { +constexpr ColorMatrix kColorInversion = {.array = { + -1.0, 0, 0, 1.0, 0, // + 0, -1.0, 0, 1.0, 0, // + 0, 0, -1.0, 1.0, 0, // + 1.0, 1.0, 1.0, 1.0, 0 // + }}; + +TEST_P(AiksTest, CanRenderMergedColorFilterImage) { Canvas canvas; Paint paint; auto image = std::make_shared(CreateTextureForFixture("kalimba.jpg")); paint.color = Color::Red(); - paint.invert_colors = true; + paint.color_filter = ColorFilter::MakeComposed( + ColorFilter::MakeMatrix(kColorInversion), + ColorFilter::MakeBlend(BlendMode::kSourceOver, Color::Yellow())); canvas.DrawImage(image, Point::MakeXY(100.0, 100.0), paint); ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); } +TEST_P(AiksTest, CanRenderMergedColorFilter) { + Canvas canvas; + Paint paint; + paint.color = Color::Red(); + paint.color_filter = ColorFilter::MakeComposed( + ColorFilter::MakeMatrix(kColorInversion), + ColorFilter::MakeBlend(BlendMode::kSourceOver, Color::Yellow())); + canvas.DrawRect(Rect::MakeLTRB(0, 0, 100, 100), paint); + ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); +} + +TEST_P(AiksTest, CanRenderMergedColorFilterDrawPaint) { + Canvas canvas; + Paint paint; + paint.color = Color::Red(); + paint.color_filter = ColorFilter::MakeComposed( + ColorFilter::MakeMatrix(kColorInversion), + ColorFilter::MakeBlend(BlendMode::kSourceOver, Color::Yellow())); + canvas.DrawPaint(paint); + ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); +} + namespace { bool GenerateMipmap(const std::shared_ptr& context, std::shared_ptr texture, diff --git a/impeller/aiks/canvas.cc b/impeller/aiks/canvas.cc index ae4c9d512037f..80f0cc734809e 100644 --- a/impeller/aiks/canvas.cc +++ b/impeller/aiks/canvas.cc @@ -4,7 +4,6 @@ #include "impeller/aiks/canvas.h" -#include #include #include diff --git a/impeller/aiks/color_filter.cc b/impeller/aiks/color_filter.cc index 87f7022e1cd1f..b5498a195408b 100644 --- a/impeller/aiks/color_filter.cc +++ b/impeller/aiks/color_filter.cc @@ -3,7 +3,10 @@ // found in the LICENSE file. #include "impeller/aiks/color_filter.h" + +#include #include "impeller/entity/contents/filters/color_filter_contents.h" +#include "impeller/entity/contents/filters/filter_contents.h" #include "impeller/entity/contents/filters/inputs/filter_input.h" #include "impeller/geometry/color.h" @@ -34,6 +37,12 @@ std::shared_ptr ColorFilter::MakeLinearToSrgb() { return std::make_shared(); } +std::shared_ptr ColorFilter::MakeComposed( + const std::shared_ptr& outer, + const std::shared_ptr& inner) { + return std::make_shared(outer, inner); +} + /******************************************************************************* ******* BlendColorFilter ******************************************************************************/ @@ -142,4 +151,40 @@ std::shared_ptr LinearToSrgbColorFilter::Clone() const { return std::make_shared(*this); } +/******************************************************************************* + ******* ComposedColorFilter + ******************************************************************************/ + +ComposedColorFilter::ComposedColorFilter( + const std::shared_ptr& outer, + const std::shared_ptr& inner) + : outer_(outer), inner_(inner) {} + +ComposedColorFilter::~ComposedColorFilter() = default; + +std::shared_ptr +ComposedColorFilter::WrapWithGPUColorFilter( + std::shared_ptr input, + ColorFilterContents::AbsorbOpacity absorb_opacity) const { + std::shared_ptr inner = inner_->WrapWithGPUColorFilter( + input, ColorFilterContents::AbsorbOpacity::kNo); + return outer_->WrapWithGPUColorFilter(FilterInput::Make(inner), + absorb_opacity); +} + +// |ColorFilter| +ColorFilter::ColorFilterProc ComposedColorFilter::GetCPUColorFilterProc() + const { + return [inner = inner_, outer = outer_](Color color) { + auto inner_proc = inner->GetCPUColorFilterProc(); + auto outer_proc = outer->GetCPUColorFilterProc(); + return outer_proc(inner_proc(color)); + }; +} + +// |ColorFilter| +std::shared_ptr ComposedColorFilter::Clone() const { + return std::make_shared(outer_, inner_); +} + } // namespace impeller diff --git a/impeller/aiks/color_filter.h b/impeller/aiks/color_filter.h index 1c5bf32dd9f8a..84dfbbd19b40d 100644 --- a/impeller/aiks/color_filter.h +++ b/impeller/aiks/color_filter.h @@ -34,6 +34,10 @@ class ColorFilter { static std::shared_ptr MakeLinearToSrgb(); + static std::shared_ptr MakeComposed( + const std::shared_ptr& outer, + const std::shared_ptr& inner); + /// @brief Wraps the given filter input with a GPU-based filter that will /// perform the color operation. The given input will first be /// rendered to a texture and then filtered. @@ -147,4 +151,28 @@ class LinearToSrgbColorFilter final : public ColorFilter { std::shared_ptr Clone() const override; }; +/// @brief Applies color filters as f(g(x)), where x is the input color. +class ComposedColorFilter final : public ColorFilter { + public: + ComposedColorFilter(const std::shared_ptr& outer, + const std::shared_ptr& inner); + + ~ComposedColorFilter() override; + + // |ColorFilter| + std::shared_ptr WrapWithGPUColorFilter( + std::shared_ptr input, + ColorFilterContents::AbsorbOpacity absorb_opacity) const override; + + // |ColorFilter| + ColorFilterProc GetCPUColorFilterProc() const override; + + // |ColorFilter| + std::shared_ptr Clone() const override; + + private: + std::shared_ptr outer_; + std::shared_ptr inner_; +}; + } // namespace impeller diff --git a/impeller/aiks/paint.cc b/impeller/aiks/paint.cc index 66a3f7280f70a..f9651f31c0ee0 100644 --- a/impeller/aiks/paint.cc +++ b/impeller/aiks/paint.cc @@ -59,7 +59,6 @@ std::shared_ptr Paint::CreateContentsForGeometry( std::shared_ptr Paint::WithFilters( std::shared_ptr input) const { input = WithColorFilter(input, ColorFilterContents::AbsorbOpacity::kYes); - input = WithInvertFilter(input); auto image_filter = WithImageFilter(input, Matrix(), Entity::RenderingMode::kDirect); if (image_filter) { @@ -121,33 +120,10 @@ std::shared_ptr Paint::WithColorFilter( if (input->ApplyColorFilter(color_filter->GetCPUColorFilterProc())) { return input; } - return color_filter->WrapWithGPUColorFilter(FilterInput::Make(input), absorb_opacity); } -/// A color matrix which inverts colors. -// clang-format off -constexpr ColorMatrix kColorInversion = { - .array = { - -1.0, 0, 0, 1.0, 0, // - 0, -1.0, 0, 1.0, 0, // - 0, 0, -1.0, 1.0, 0, // - 1.0, 1.0, 1.0, 1.0, 0 // - } -}; -// clang-format on - -std::shared_ptr Paint::WithInvertFilter( - std::shared_ptr input) const { - if (!invert_colors) { - return input; - } - - return ColorFilterContents::MakeColorMatrix( - {FilterInput::Make(std::move(input))}, kColorInversion); -} - std::shared_ptr Paint::MaskBlurDescriptor::CreateMaskBlur( std::shared_ptr color_source_contents, const std::shared_ptr& color_filter) const { diff --git a/impeller/aiks/paint.h b/impeller/aiks/paint.h index c2e907a1cc5b0..0fba8a628d12b 100644 --- a/impeller/aiks/paint.h +++ b/impeller/aiks/paint.h @@ -61,7 +61,6 @@ struct Paint { Scalar stroke_miter = 4.0; Style style = Style::kFill; BlendMode blend_mode = BlendMode::kSourceOver; - bool invert_colors = false; std::shared_ptr image_filter; std::shared_ptr color_filter; @@ -108,9 +107,6 @@ struct Paint { std::shared_ptr input, ColorFilterContents::AbsorbOpacity absorb_opacity = ColorFilterContents::AbsorbOpacity::kNo) const; - - std::shared_ptr WithInvertFilter( - std::shared_ptr input) const; }; } // namespace impeller diff --git a/impeller/display_list/dl_dispatcher.cc b/impeller/display_list/dl_dispatcher.cc index 0b19cefb5b79b..c0b610157e1c6 100644 --- a/impeller/display_list/dl_dispatcher.cc +++ b/impeller/display_list/dl_dispatcher.cc @@ -8,7 +8,6 @@ #include #include #include -#include #include #include @@ -16,20 +15,13 @@ #include "flutter/fml/trace_event.h" #include "impeller/aiks/color_filter.h" #include "impeller/core/formats.h" -#include "impeller/display_list/dl_image_impeller.h" #include "impeller/display_list/dl_vertices_geometry.h" #include "impeller/display_list/nine_patch_converter.h" #include "impeller/display_list/skia_conversions.h" -#include "impeller/entity/contents/conical_gradient_contents.h" #include "impeller/entity/contents/filters/filter_contents.h" #include "impeller/entity/contents/filters/inputs/filter_input.h" -#include "impeller/entity/contents/linear_gradient_contents.h" -#include "impeller/entity/contents/radial_gradient_contents.h" #include "impeller/entity/contents/runtime_effect_contents.h" -#include "impeller/entity/contents/sweep_gradient_contents.h" -#include "impeller/entity/contents/tiled_texture_contents.h" #include "impeller/entity/entity.h" -#include "impeller/entity/geometry/geometry.h" #include "impeller/geometry/path.h" #include "impeller/geometry/path_builder.h" #include "impeller/geometry/scalar.h" @@ -41,6 +33,18 @@ namespace impeller { +/// A color matrix which inverts colors. +// clang-format off +constexpr ColorMatrix kColorInversion = { + .array = { + -1.0, 0, 0, 1.0, 0, // + 0, -1.0, 0, 1.0, 0, // + 0, 0, -1.0, 1.0, 0, // + 1.0, 1.0, 1.0, 1.0, 0 // + } +}; +// clang-format on + #define UNIMPLEMENTED \ FML_DLOG(ERROR) << "Unimplemented detail in " << __FUNCTION__; @@ -484,12 +488,24 @@ static std::shared_ptr ToColorFilter( // |flutter::DlOpReceiver| void DlDispatcher::setColorFilter(const flutter::DlColorFilter* filter) { // Needs https://github.com/flutter/flutter/issues/95434 - paint_.color_filter = ToColorFilter(filter); + if (paint_.color_filter) { + auto color_filter = ToColorFilter(filter); + paint_.color_filter = + ColorFilter::MakeComposed(paint_.color_filter, color_filter); + } else { + paint_.color_filter = ToColorFilter(filter); + } } // |flutter::DlOpReceiver| void DlDispatcher::setInvertColors(bool invert) { - paint_.invert_colors = invert; + if (paint_.color_filter) { + auto invert_filter = ColorFilter::MakeMatrix(kColorInversion); + paint_.color_filter = + ColorFilter::MakeComposed(invert_filter, paint_.color_filter); + } else { + paint_.color_filter = ColorFilter::MakeMatrix(kColorInversion); + } } // |flutter::DlOpReceiver| From 5c5cd7a995d83ed3a95604fde67aba97bb3932f0 Mon Sep 17 00:00:00 2001 From: "auto-submit[bot]" <98614782+auto-submit[bot]@users.noreply.github.com> Date: Fri, 29 Sep 2023 18:01:26 +0000 Subject: [PATCH 378/859] Reverts "[Impeller] simplify invert colors flag by supporting composed color filters." (#46414) Reverts flutter/engine#46391 Initiated by: jonahwilliams This change reverts the following previous change: Original Description: Fixes https://github.com/flutter/flutter/issues/135699 To avoid the ugly complicated code for conditionally applying both colorfilters, make the dl dispatcher handle merging these filters together in a defined order. The original bug is caused by not checking for invert colors in a CPU fast path. --- impeller/aiks/aiks_unittests.cc | 36 ++------------------- impeller/aiks/canvas.cc | 1 + impeller/aiks/color_filter.cc | 45 -------------------------- impeller/aiks/color_filter.h | 28 ---------------- impeller/aiks/paint.cc | 24 ++++++++++++++ impeller/aiks/paint.h | 4 +++ impeller/display_list/dl_dispatcher.cc | 36 ++++++--------------- 7 files changed, 41 insertions(+), 133 deletions(-) diff --git a/impeller/aiks/aiks_unittests.cc b/impeller/aiks/aiks_unittests.cc index f1557d2c6ad8e..4950aae8496fc 100644 --- a/impeller/aiks/aiks_unittests.cc +++ b/impeller/aiks/aiks_unittests.cc @@ -13,7 +13,6 @@ #include "flutter/testing/testing.h" #include "impeller/aiks/aiks_playground.h" #include "impeller/aiks/canvas.h" -#include "impeller/aiks/color_filter.h" #include "impeller/aiks/image.h" #include "impeller/aiks/image_filter.h" #include "impeller/aiks/paint_pass_delegate.h" @@ -124,47 +123,16 @@ TEST_P(AiksTest, CanRenderImage) { ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); } -constexpr ColorMatrix kColorInversion = {.array = { - -1.0, 0, 0, 1.0, 0, // - 0, -1.0, 0, 1.0, 0, // - 0, 0, -1.0, 1.0, 0, // - 1.0, 1.0, 1.0, 1.0, 0 // - }}; - -TEST_P(AiksTest, CanRenderMergedColorFilterImage) { +TEST_P(AiksTest, CanRenderInvertedImage) { Canvas canvas; Paint paint; auto image = std::make_shared(CreateTextureForFixture("kalimba.jpg")); paint.color = Color::Red(); - paint.color_filter = ColorFilter::MakeComposed( - ColorFilter::MakeMatrix(kColorInversion), - ColorFilter::MakeBlend(BlendMode::kSourceOver, Color::Yellow())); + paint.invert_colors = true; canvas.DrawImage(image, Point::MakeXY(100.0, 100.0), paint); ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); } -TEST_P(AiksTest, CanRenderMergedColorFilter) { - Canvas canvas; - Paint paint; - paint.color = Color::Red(); - paint.color_filter = ColorFilter::MakeComposed( - ColorFilter::MakeMatrix(kColorInversion), - ColorFilter::MakeBlend(BlendMode::kSourceOver, Color::Yellow())); - canvas.DrawRect(Rect::MakeLTRB(0, 0, 100, 100), paint); - ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); -} - -TEST_P(AiksTest, CanRenderMergedColorFilterDrawPaint) { - Canvas canvas; - Paint paint; - paint.color = Color::Red(); - paint.color_filter = ColorFilter::MakeComposed( - ColorFilter::MakeMatrix(kColorInversion), - ColorFilter::MakeBlend(BlendMode::kSourceOver, Color::Yellow())); - canvas.DrawPaint(paint); - ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); -} - namespace { bool GenerateMipmap(const std::shared_ptr& context, std::shared_ptr texture, diff --git a/impeller/aiks/canvas.cc b/impeller/aiks/canvas.cc index 80f0cc734809e..ae4c9d512037f 100644 --- a/impeller/aiks/canvas.cc +++ b/impeller/aiks/canvas.cc @@ -4,6 +4,7 @@ #include "impeller/aiks/canvas.h" +#include #include #include diff --git a/impeller/aiks/color_filter.cc b/impeller/aiks/color_filter.cc index b5498a195408b..87f7022e1cd1f 100644 --- a/impeller/aiks/color_filter.cc +++ b/impeller/aiks/color_filter.cc @@ -3,10 +3,7 @@ // found in the LICENSE file. #include "impeller/aiks/color_filter.h" - -#include #include "impeller/entity/contents/filters/color_filter_contents.h" -#include "impeller/entity/contents/filters/filter_contents.h" #include "impeller/entity/contents/filters/inputs/filter_input.h" #include "impeller/geometry/color.h" @@ -37,12 +34,6 @@ std::shared_ptr ColorFilter::MakeLinearToSrgb() { return std::make_shared(); } -std::shared_ptr ColorFilter::MakeComposed( - const std::shared_ptr& outer, - const std::shared_ptr& inner) { - return std::make_shared(outer, inner); -} - /******************************************************************************* ******* BlendColorFilter ******************************************************************************/ @@ -151,40 +142,4 @@ std::shared_ptr LinearToSrgbColorFilter::Clone() const { return std::make_shared(*this); } -/******************************************************************************* - ******* ComposedColorFilter - ******************************************************************************/ - -ComposedColorFilter::ComposedColorFilter( - const std::shared_ptr& outer, - const std::shared_ptr& inner) - : outer_(outer), inner_(inner) {} - -ComposedColorFilter::~ComposedColorFilter() = default; - -std::shared_ptr -ComposedColorFilter::WrapWithGPUColorFilter( - std::shared_ptr input, - ColorFilterContents::AbsorbOpacity absorb_opacity) const { - std::shared_ptr inner = inner_->WrapWithGPUColorFilter( - input, ColorFilterContents::AbsorbOpacity::kNo); - return outer_->WrapWithGPUColorFilter(FilterInput::Make(inner), - absorb_opacity); -} - -// |ColorFilter| -ColorFilter::ColorFilterProc ComposedColorFilter::GetCPUColorFilterProc() - const { - return [inner = inner_, outer = outer_](Color color) { - auto inner_proc = inner->GetCPUColorFilterProc(); - auto outer_proc = outer->GetCPUColorFilterProc(); - return outer_proc(inner_proc(color)); - }; -} - -// |ColorFilter| -std::shared_ptr ComposedColorFilter::Clone() const { - return std::make_shared(outer_, inner_); -} - } // namespace impeller diff --git a/impeller/aiks/color_filter.h b/impeller/aiks/color_filter.h index 84dfbbd19b40d..1c5bf32dd9f8a 100644 --- a/impeller/aiks/color_filter.h +++ b/impeller/aiks/color_filter.h @@ -34,10 +34,6 @@ class ColorFilter { static std::shared_ptr MakeLinearToSrgb(); - static std::shared_ptr MakeComposed( - const std::shared_ptr& outer, - const std::shared_ptr& inner); - /// @brief Wraps the given filter input with a GPU-based filter that will /// perform the color operation. The given input will first be /// rendered to a texture and then filtered. @@ -151,28 +147,4 @@ class LinearToSrgbColorFilter final : public ColorFilter { std::shared_ptr Clone() const override; }; -/// @brief Applies color filters as f(g(x)), where x is the input color. -class ComposedColorFilter final : public ColorFilter { - public: - ComposedColorFilter(const std::shared_ptr& outer, - const std::shared_ptr& inner); - - ~ComposedColorFilter() override; - - // |ColorFilter| - std::shared_ptr WrapWithGPUColorFilter( - std::shared_ptr input, - ColorFilterContents::AbsorbOpacity absorb_opacity) const override; - - // |ColorFilter| - ColorFilterProc GetCPUColorFilterProc() const override; - - // |ColorFilter| - std::shared_ptr Clone() const override; - - private: - std::shared_ptr outer_; - std::shared_ptr inner_; -}; - } // namespace impeller diff --git a/impeller/aiks/paint.cc b/impeller/aiks/paint.cc index f9651f31c0ee0..66a3f7280f70a 100644 --- a/impeller/aiks/paint.cc +++ b/impeller/aiks/paint.cc @@ -59,6 +59,7 @@ std::shared_ptr Paint::CreateContentsForGeometry( std::shared_ptr Paint::WithFilters( std::shared_ptr input) const { input = WithColorFilter(input, ColorFilterContents::AbsorbOpacity::kYes); + input = WithInvertFilter(input); auto image_filter = WithImageFilter(input, Matrix(), Entity::RenderingMode::kDirect); if (image_filter) { @@ -120,10 +121,33 @@ std::shared_ptr Paint::WithColorFilter( if (input->ApplyColorFilter(color_filter->GetCPUColorFilterProc())) { return input; } + return color_filter->WrapWithGPUColorFilter(FilterInput::Make(input), absorb_opacity); } +/// A color matrix which inverts colors. +// clang-format off +constexpr ColorMatrix kColorInversion = { + .array = { + -1.0, 0, 0, 1.0, 0, // + 0, -1.0, 0, 1.0, 0, // + 0, 0, -1.0, 1.0, 0, // + 1.0, 1.0, 1.0, 1.0, 0 // + } +}; +// clang-format on + +std::shared_ptr Paint::WithInvertFilter( + std::shared_ptr input) const { + if (!invert_colors) { + return input; + } + + return ColorFilterContents::MakeColorMatrix( + {FilterInput::Make(std::move(input))}, kColorInversion); +} + std::shared_ptr Paint::MaskBlurDescriptor::CreateMaskBlur( std::shared_ptr color_source_contents, const std::shared_ptr& color_filter) const { diff --git a/impeller/aiks/paint.h b/impeller/aiks/paint.h index 0fba8a628d12b..c2e907a1cc5b0 100644 --- a/impeller/aiks/paint.h +++ b/impeller/aiks/paint.h @@ -61,6 +61,7 @@ struct Paint { Scalar stroke_miter = 4.0; Style style = Style::kFill; BlendMode blend_mode = BlendMode::kSourceOver; + bool invert_colors = false; std::shared_ptr image_filter; std::shared_ptr color_filter; @@ -107,6 +108,9 @@ struct Paint { std::shared_ptr input, ColorFilterContents::AbsorbOpacity absorb_opacity = ColorFilterContents::AbsorbOpacity::kNo) const; + + std::shared_ptr WithInvertFilter( + std::shared_ptr input) const; }; } // namespace impeller diff --git a/impeller/display_list/dl_dispatcher.cc b/impeller/display_list/dl_dispatcher.cc index c0b610157e1c6..0b19cefb5b79b 100644 --- a/impeller/display_list/dl_dispatcher.cc +++ b/impeller/display_list/dl_dispatcher.cc @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -15,13 +16,20 @@ #include "flutter/fml/trace_event.h" #include "impeller/aiks/color_filter.h" #include "impeller/core/formats.h" +#include "impeller/display_list/dl_image_impeller.h" #include "impeller/display_list/dl_vertices_geometry.h" #include "impeller/display_list/nine_patch_converter.h" #include "impeller/display_list/skia_conversions.h" +#include "impeller/entity/contents/conical_gradient_contents.h" #include "impeller/entity/contents/filters/filter_contents.h" #include "impeller/entity/contents/filters/inputs/filter_input.h" +#include "impeller/entity/contents/linear_gradient_contents.h" +#include "impeller/entity/contents/radial_gradient_contents.h" #include "impeller/entity/contents/runtime_effect_contents.h" +#include "impeller/entity/contents/sweep_gradient_contents.h" +#include "impeller/entity/contents/tiled_texture_contents.h" #include "impeller/entity/entity.h" +#include "impeller/entity/geometry/geometry.h" #include "impeller/geometry/path.h" #include "impeller/geometry/path_builder.h" #include "impeller/geometry/scalar.h" @@ -33,18 +41,6 @@ namespace impeller { -/// A color matrix which inverts colors. -// clang-format off -constexpr ColorMatrix kColorInversion = { - .array = { - -1.0, 0, 0, 1.0, 0, // - 0, -1.0, 0, 1.0, 0, // - 0, 0, -1.0, 1.0, 0, // - 1.0, 1.0, 1.0, 1.0, 0 // - } -}; -// clang-format on - #define UNIMPLEMENTED \ FML_DLOG(ERROR) << "Unimplemented detail in " << __FUNCTION__; @@ -488,24 +484,12 @@ static std::shared_ptr ToColorFilter( // |flutter::DlOpReceiver| void DlDispatcher::setColorFilter(const flutter::DlColorFilter* filter) { // Needs https://github.com/flutter/flutter/issues/95434 - if (paint_.color_filter) { - auto color_filter = ToColorFilter(filter); - paint_.color_filter = - ColorFilter::MakeComposed(paint_.color_filter, color_filter); - } else { - paint_.color_filter = ToColorFilter(filter); - } + paint_.color_filter = ToColorFilter(filter); } // |flutter::DlOpReceiver| void DlDispatcher::setInvertColors(bool invert) { - if (paint_.color_filter) { - auto invert_filter = ColorFilter::MakeMatrix(kColorInversion); - paint_.color_filter = - ColorFilter::MakeComposed(invert_filter, paint_.color_filter); - } else { - paint_.color_filter = ColorFilter::MakeMatrix(kColorInversion); - } + paint_.invert_colors = invert; } // |flutter::DlOpReceiver| From 8eb1e783ec8420e0c6ee59c44561daebd97c87ba Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 29 Sep 2023 14:46:03 -0400 Subject: [PATCH 379/859] Manual roll Dart SDK from e042e83c85a5 to 955a3a964621 (2 revisions) (#46412) Manual roll requested by zra@google.com https://dart.googlesource.com/sdk.git/+log/e042e83c85a5..955a3a964621 2023-09-29 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-215.0.dev 2023-09-29 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-214.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jacksongardner@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 3a688e7060740..7902f367a50da 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': 'e042e83c85a552f01ab2caeab0ddb71105ababa5', + 'dart_revision': '955a3a964621fb2e23aeeda09ff27b2ae3759b05', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index 88c6efa074c32..a294efd4c6ad1 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: ed07e002ff0f4c270c3658c46a4abb14 +Signature: ecaab46c30aeea6e2c966ec14d3be4ef ==================================================================================================== LIBRARY: dart From ad5288d743736da136ff1d2eb3a76f198687f640 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 29 Sep 2023 16:46:27 -0400 Subject: [PATCH 380/859] Roll Skia from 2d4045f55fd5 to a063eaeaf1e0 (6 revisions) (#46420) https://skia.googlesource.com/skia.git/+log/2d4045f55fd5..a063eaeaf1e0 2023-09-29 michaelludwig@google.com Revert "Reland "[skif] Draw FilterResults directly for layer restoration"" 2023-09-29 kjlubick@google.com Add CI jobs to test external_client build of "buffet" options 2023-09-29 kjlubick@google.com Revert "Add fontations gm to Bazel build of viewer" 2023-09-29 kjlubick@google.com Add fast-reject when SkStream implements getLength() but not getPosition() 2023-09-29 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 4d31920a095a to 8ac5d8e1a9fe (3 revisions) 2023-09-29 michaelludwig@google.com Reland "[skif] Draw FilterResults directly for layer restoration" If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 7902f367a50da..93a8e5dca6083 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '2d4045f55fd50a6b712a869736a7f89aceaa94e6', + 'skia_revision': 'a063eaeaf1e09e4d6f42e0f44a5723622a46d21c', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 28bb68ba1bdb9..867f09a497f38 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 5eba63831d1cf75d2eb86d0949f7404a +Signature: 15d0323f44700161d228b63108d8020e ==================================================================================================== LIBRARY: etc1 From d25bfa120e016f8d83a569eacb12817b77c2bf1f Mon Sep 17 00:00:00 2001 From: Jackson Gardner Date: Fri, 29 Sep 2023 13:52:36 -0700 Subject: [PATCH 381/859] Use `dart:_wasm` constructs to avoid dependence on `WebAssembly.Function` (#46388) Use the newly exposed functionality in `dart:_wasm` to fix up two different hacks we have: 1) When creating an image from an image source, use `wasm:import` instead of `@Native` and pass the image source directly as an externref. (Direct wasm binding instead of a JS interop shim, yay). 2) When binding the surface callback, previously we were wrapping the callback in a JS function, and then using `WebAssembly.Function` to create a wasm function wrapper around that. Now, we can create a `WasmFuncRef` that is a direct reference to a dart function and pass that over. Now there are no intermediary JavaScript layers when skwasm calls back to us, and we no longer are dependent on the type reflection flag in Chrome. This fixes https://github.com/flutter/flutter/issues/134556 --- lib/web_ui/dev/test_dart2wasm.js | 3 +- .../skwasm/skwasm_impl/raw/raw_image.dart | 49 ++++------- .../skwasm/skwasm_impl/raw/skwasm_module.dart | 31 +------ .../engine/skwasm/skwasm_impl/surface.dart | 84 +++++++++++-------- web_sdk/sdk_rewriter.dart | 3 + web_sdk/test/sdk_rewriter_test.dart | 1 + 6 files changed, 74 insertions(+), 97 deletions(-) diff --git a/lib/web_ui/dev/test_dart2wasm.js b/lib/web_ui/dev/test_dart2wasm.js index b48e2403a3535..e1d1c32c164f9 100644 --- a/lib/web_ui/dev/test_dart2wasm.js +++ b/lib/web_ui/dev/test_dart2wasm.js @@ -64,7 +64,8 @@ window.onload = async function () { const skwasmInstance = await skwasm(); window._flutter_skwasmInstance = skwasmInstance; resolve({ - "skwasm": skwasmInstance.asm ?? skwasmInstance.wasmExports, + "skwasm": skwasmInstance.wasmExports, + "skwasmWrapper": skwasmInstance, "ffi": { "memory": skwasmInstance.wasmMemory, } diff --git a/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/raw/raw_image.dart b/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/raw/raw_image.dart index 8b6c968e9375c..c0cd2e25db51c 100644 --- a/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/raw/raw_image.dart +++ b/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/raw/raw_image.dart @@ -5,6 +5,7 @@ @DefaultAsset('skwasm') library skwasm_impl; +import 'dart:_wasm'; import 'dart:ffi'; import 'dart:js_interop'; @@ -39,45 +40,27 @@ external ImageHandle imageCreateFromPixels( int rowByteCount, ); -// We actually want this function to look something like this: -// -// @Native(symbol: 'image_createFromTextureSource', isLeaf: true) -// external ImageHandle imageCreateFromTextureSource( -// JSAny textureSource, -// int width, -// int height, -// SurfaceHandle handle, -// ); -// -// However, this doesn't work because we cannot use extern refs as part of @Native -// annotations currently. For now, we can use JS interop to expose this function -// instead. -extension SkwasmImageExtension on SkwasmInstance { - @JS('wasmExports.image_createFromTextureSource') - external JSNumber imageCreateFromTextureSource( - JSAny textureSource, - JSNumber width, - JSNumber height, - JSNumber surfaceHandle, - ); -} +// We use a wasm import directly here instead of @Native since this uses an externref +// in the function signature. ImageHandle imageCreateFromTextureSource( JSAny frame, int width, int height, SurfaceHandle handle ) => ImageHandle.fromAddress( - skwasmInstance.imageCreateFromTextureSource( - frame, - width.toJS, - height.toJS, - handle.address.toJS, - ).toDartInt + imageCreateFromTextureSourceImpl( + externRefForJSAny(frame), + width.toWasmI32(), + height.toWasmI32(), + handle.address.toWasmI32(), + ).toIntUnsigned() +); +@pragma('wasm:import', 'skwasm.image_createFromTextureSource') +external WasmI32 imageCreateFromTextureSourceImpl( + WasmExternRef? frame, + WasmI32 width, + WasmI32 height, + WasmI32 surfaceHandle, ); @Native(symbol:'image_ref', isLeaf: true) diff --git a/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/raw/skwasm_module.dart b/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/raw/skwasm_module.dart index 3063a557aaed1..d162f190dbe70 100644 --- a/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/raw/skwasm_module.dart +++ b/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/raw/skwasm_module.dart @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +import 'dart:_wasm'; import 'dart:js_interop'; @JS() @@ -17,37 +18,11 @@ extension WebAssemblyMemoryExtension on WebAssemblyMemory { class SkwasmInstance {} extension SkwasmInstanceExtension on SkwasmInstance { - external JSNumber getEmptyTableSlot(); - - // The function here *must* be a directly exported wasm function, not a - // JavaScript function. If you actually need to add a JavaScript function, - // use `addFunction` instead. - external void setWasmTableEntry(JSNumber index, JSAny function); - - external JSNumber addFunction(WebAssemblyFunction function); - external void removeFunction(JSNumber functionPointer); - external WebAssemblyMemory get wasmMemory; } @JS('window._flutter_skwasmInstance') external SkwasmInstance get skwasmInstance; -@JS() -@staticInterop -@anonymous -class WebAssemblyFunctionType { - external factory WebAssemblyFunctionType({ - required JSArray parameters, - required JSArray results, - }); -} - -@JS('WebAssembly.Function') -@staticInterop -class WebAssemblyFunction { - external factory WebAssemblyFunction( - WebAssemblyFunctionType functionType, - JSFunction function - ); -} +@pragma('wasm:import', 'skwasmWrapper.addFunction') +external WasmI32 addFunction(WasmFuncRef function); diff --git a/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/surface.dart b/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/surface.dart index 4827c78b00f77..34af06d0d1fd7 100644 --- a/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/surface.dart +++ b/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/surface.dart @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +import 'dart:_wasm'; import 'dart:async'; import 'dart:ffi'; import 'dart:js_interop'; @@ -11,7 +12,52 @@ import 'package:ui/src/engine.dart'; import 'package:ui/src/engine/skwasm/skwasm_impl.dart'; import 'package:ui/ui.dart' as ui; +@pragma('wasm:export') +WasmVoid callbackHandler(WasmI32 callbackId, WasmI32 context, WasmExternRef? jsContext) { + // Actually hide this call behind whether skwasm is enabled. Otherwise, the SkwasmCallbackHandler + // won't actually be tree-shaken, and we end up with skwasm imports in non-skwasm builds. + if (FlutterConfiguration.flutterWebUseSkwasm) { + SkwasmCallbackHandler.instance.handleCallback(callbackId, context, jsContext); + } + return WasmVoid(); +} + +// This class handles callbacks coming from Skwasm by keeping a map of callback IDs to Completers +class SkwasmCallbackHandler { + SkwasmCallbackHandler._withCallbackPointer(this.callbackPointer); + + factory SkwasmCallbackHandler._() { + final WasmFuncRef wasmFunction = WasmFunction.fromFunction(callbackHandler); + final int functionIndex = addFunction(wasmFunction).toIntUnsigned(); + return SkwasmCallbackHandler._withCallbackPointer( + OnRenderCallbackHandle.fromAddress(functionIndex) + ); + } + static SkwasmCallbackHandler instance = SkwasmCallbackHandler._(); + final OnRenderCallbackHandle callbackPointer; + final Map> _pendingCallbacks = >{}; + + // Returns a future that will resolve when Skwasm calls back with the given callbackID + Future registerCallback(int callbackId) { + final Completer completer = Completer(); + _pendingCallbacks[callbackId] = completer; + return completer.future; + } + + void handleCallback(WasmI32 callbackId, WasmI32 context, WasmExternRef? jsContext) { + // Skwasm can either callback with a JS object (an externref) or it can call back + // with a simple integer, which usually refers to a pointer on its heap. In order + // to coerce these into a single type, we just make the completers take a JSAny + // that either contains the JS object or a JSNumber that contains the integer value. + final Completer completer = _pendingCallbacks.remove(callbackId.toIntUnsigned())!; + if (!jsContext.isNull) { + completer.complete(jsContext!.toJS); + } else { + completer.complete(context.toIntUnsigned().toJS); + } + } +} class SkwasmSurface { factory SkwasmSurface() { @@ -25,32 +71,16 @@ class SkwasmSurface { SkwasmSurface._fromHandle(this.handle) : threadId = surfaceGetThreadId(handle); final SurfaceHandle handle; - OnRenderCallbackHandle _callbackHandle = nullptr; - final Map> _pendingCallbacks = >{}; final int threadId; void _initialize() { - final WebAssemblyFunction wasmFunction = WebAssemblyFunction( - WebAssemblyFunctionType( - parameters: [ - 'i32'.toJS, - 'i32'.toJS, - 'externref'.toJS - ].toJS, - results: [].toJS - ), - _callbackHandler.toJS, - ); - _callbackHandle = OnRenderCallbackHandle.fromAddress( - skwasmInstance.addFunction(wasmFunction).toDartInt, - ); - surfaceSetCallbackHandler(handle, _callbackHandle); + surfaceSetCallbackHandler(handle, SkwasmCallbackHandler.instance.callbackPointer); } Future renderPicture(SkwasmPicture picture) async { final int callbackId = surfaceRenderPicture(handle, picture.handle); - final DomImageBitmap bitmap = (await _registerCallback(callbackId)) as DomImageBitmap; + final DomImageBitmap bitmap = (await SkwasmCallbackHandler.instance.registerCallback(callbackId)) as DomImageBitmap; return bitmap; } @@ -60,7 +90,7 @@ class SkwasmSurface { image.handle, format.index, ); - final int context = (await _registerCallback(callbackId) as JSNumber).toDartInt; + final int context = (await SkwasmCallbackHandler.instance.registerCallback(callbackId) as JSNumber).toDartInt; final SkDataHandle dataHandle = SkDataHandle.fromAddress(context); final int byteCount = skDataGetSize(dataHandle); final Pointer dataPointer = skDataGetConstPointer(dataHandle).cast(); @@ -72,23 +102,7 @@ class SkwasmSurface { return ByteData.sublistView(output); } - Future _registerCallback(int callbackId) { - final Completer completer = Completer(); - _pendingCallbacks[callbackId] = completer; - return completer.future; - } - - void _callbackHandler(JSNumber callbackId, JSNumber context, JSAny? jsContext) { - final Completer completer = _pendingCallbacks.remove(callbackId.toDartInt)!; - if (jsContext.isUndefinedOrNull) { - completer.complete(context); - } else { - completer.complete(jsContext); - } - } - void dispose() { surfaceDestroy(handle); - skwasmInstance.removeFunction(_callbackHandle.address.toJS); } } diff --git a/web_sdk/sdk_rewriter.dart b/web_sdk/sdk_rewriter.dart index 96b37598a6fcc..da1aa102a14fa 100644 --- a/web_sdk/sdk_rewriter.dart +++ b/web_sdk/sdk_rewriter.dart @@ -178,6 +178,9 @@ List getExtraImportsForLibrary(String libraryName) { extraImports.add(entry.value); } } + if (libraryName == 'skwasm_impl') { + extraImports.add("import 'dart:_wasm';"); + } return extraImports; } diff --git a/web_sdk/test/sdk_rewriter_test.dart b/web_sdk/test/sdk_rewriter_test.dart index 2eb2c0795dcf6..95cfe8256f9cd 100644 --- a/web_sdk/test/sdk_rewriter_test.dart +++ b/web_sdk/test/sdk_rewriter_test.dart @@ -184,6 +184,7 @@ void printSomething() { "import 'dart:_web_unicode';", "import 'dart:_web_test_fonts';", "import 'dart:_web_locale_keymap' as locale_keymap;", + "import 'dart:_wasm';", ]); // Other libraries (should not have extra imports). From 67d27ff4d71e03cab4314bc04fbda85ef9c29955 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Fri, 29 Sep 2023 14:11:16 -0700 Subject: [PATCH 382/859] [Impeller] Redo simplify invert colors. (#46416) Now with fewer state bugs. Fixes https://github.com/flutter/flutter/issues/135699 --- impeller/aiks/aiks_unittests.cc | 30 +++++++++++++- impeller/aiks/canvas.cc | 1 - impeller/aiks/color_filter.cc | 45 +++++++++++++++++++++ impeller/aiks/color_filter.h | 28 +++++++++++++ impeller/aiks/paint.cc | 54 ++++++++++++++------------ impeller/aiks/paint.h | 5 +-- impeller/display_list/dl_dispatcher.cc | 9 ----- 7 files changed, 133 insertions(+), 39 deletions(-) diff --git a/impeller/aiks/aiks_unittests.cc b/impeller/aiks/aiks_unittests.cc index 4950aae8496fc..849cf648b1f8e 100644 --- a/impeller/aiks/aiks_unittests.cc +++ b/impeller/aiks/aiks_unittests.cc @@ -13,6 +13,7 @@ #include "flutter/testing/testing.h" #include "impeller/aiks/aiks_playground.h" #include "impeller/aiks/canvas.h" +#include "impeller/aiks/color_filter.h" #include "impeller/aiks/image.h" #include "impeller/aiks/image_filter.h" #include "impeller/aiks/paint_pass_delegate.h" @@ -123,16 +124,43 @@ TEST_P(AiksTest, CanRenderImage) { ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); } -TEST_P(AiksTest, CanRenderInvertedImage) { +TEST_P(AiksTest, CanRenderInvertedImageWithColorFilter) { Canvas canvas; Paint paint; auto image = std::make_shared(CreateTextureForFixture("kalimba.jpg")); paint.color = Color::Red(); + paint.color_filter = + ColorFilter::MakeBlend(BlendMode::kSourceOver, Color::Yellow()); paint.invert_colors = true; + canvas.DrawImage(image, Point::MakeXY(100.0, 100.0), paint); ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); } +TEST_P(AiksTest, CanRenderColorFilterWithInvertColors) { + Canvas canvas; + Paint paint; + paint.color = Color::Red(); + paint.color_filter = + ColorFilter::MakeBlend(BlendMode::kSourceOver, Color::Yellow()); + paint.invert_colors = true; + + canvas.DrawRect(Rect::MakeLTRB(0, 0, 100, 100), paint); + ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); +} + +TEST_P(AiksTest, CanRenderColorFilterWithInvertColorsDrawPaint) { + Canvas canvas; + Paint paint; + paint.color = Color::Red(); + paint.color_filter = + ColorFilter::MakeBlend(BlendMode::kSourceOver, Color::Yellow()); + paint.invert_colors = true; + + canvas.DrawPaint(paint); + ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); +} + namespace { bool GenerateMipmap(const std::shared_ptr& context, std::shared_ptr texture, diff --git a/impeller/aiks/canvas.cc b/impeller/aiks/canvas.cc index ae4c9d512037f..80f0cc734809e 100644 --- a/impeller/aiks/canvas.cc +++ b/impeller/aiks/canvas.cc @@ -4,7 +4,6 @@ #include "impeller/aiks/canvas.h" -#include #include #include diff --git a/impeller/aiks/color_filter.cc b/impeller/aiks/color_filter.cc index 87f7022e1cd1f..b5498a195408b 100644 --- a/impeller/aiks/color_filter.cc +++ b/impeller/aiks/color_filter.cc @@ -3,7 +3,10 @@ // found in the LICENSE file. #include "impeller/aiks/color_filter.h" + +#include #include "impeller/entity/contents/filters/color_filter_contents.h" +#include "impeller/entity/contents/filters/filter_contents.h" #include "impeller/entity/contents/filters/inputs/filter_input.h" #include "impeller/geometry/color.h" @@ -34,6 +37,12 @@ std::shared_ptr ColorFilter::MakeLinearToSrgb() { return std::make_shared(); } +std::shared_ptr ColorFilter::MakeComposed( + const std::shared_ptr& outer, + const std::shared_ptr& inner) { + return std::make_shared(outer, inner); +} + /******************************************************************************* ******* BlendColorFilter ******************************************************************************/ @@ -142,4 +151,40 @@ std::shared_ptr LinearToSrgbColorFilter::Clone() const { return std::make_shared(*this); } +/******************************************************************************* + ******* ComposedColorFilter + ******************************************************************************/ + +ComposedColorFilter::ComposedColorFilter( + const std::shared_ptr& outer, + const std::shared_ptr& inner) + : outer_(outer), inner_(inner) {} + +ComposedColorFilter::~ComposedColorFilter() = default; + +std::shared_ptr +ComposedColorFilter::WrapWithGPUColorFilter( + std::shared_ptr input, + ColorFilterContents::AbsorbOpacity absorb_opacity) const { + std::shared_ptr inner = inner_->WrapWithGPUColorFilter( + input, ColorFilterContents::AbsorbOpacity::kNo); + return outer_->WrapWithGPUColorFilter(FilterInput::Make(inner), + absorb_opacity); +} + +// |ColorFilter| +ColorFilter::ColorFilterProc ComposedColorFilter::GetCPUColorFilterProc() + const { + return [inner = inner_, outer = outer_](Color color) { + auto inner_proc = inner->GetCPUColorFilterProc(); + auto outer_proc = outer->GetCPUColorFilterProc(); + return outer_proc(inner_proc(color)); + }; +} + +// |ColorFilter| +std::shared_ptr ComposedColorFilter::Clone() const { + return std::make_shared(outer_, inner_); +} + } // namespace impeller diff --git a/impeller/aiks/color_filter.h b/impeller/aiks/color_filter.h index 1c5bf32dd9f8a..84dfbbd19b40d 100644 --- a/impeller/aiks/color_filter.h +++ b/impeller/aiks/color_filter.h @@ -34,6 +34,10 @@ class ColorFilter { static std::shared_ptr MakeLinearToSrgb(); + static std::shared_ptr MakeComposed( + const std::shared_ptr& outer, + const std::shared_ptr& inner); + /// @brief Wraps the given filter input with a GPU-based filter that will /// perform the color operation. The given input will first be /// rendered to a texture and then filtered. @@ -147,4 +151,28 @@ class LinearToSrgbColorFilter final : public ColorFilter { std::shared_ptr Clone() const override; }; +/// @brief Applies color filters as f(g(x)), where x is the input color. +class ComposedColorFilter final : public ColorFilter { + public: + ComposedColorFilter(const std::shared_ptr& outer, + const std::shared_ptr& inner); + + ~ComposedColorFilter() override; + + // |ColorFilter| + std::shared_ptr WrapWithGPUColorFilter( + std::shared_ptr input, + ColorFilterContents::AbsorbOpacity absorb_opacity) const override; + + // |ColorFilter| + ColorFilterProc GetCPUColorFilterProc() const override; + + // |ColorFilter| + std::shared_ptr Clone() const override; + + private: + std::shared_ptr outer_; + std::shared_ptr inner_; +}; + } // namespace impeller diff --git a/impeller/aiks/paint.cc b/impeller/aiks/paint.cc index 66a3f7280f70a..332973e3c2a99 100644 --- a/impeller/aiks/paint.cc +++ b/impeller/aiks/paint.cc @@ -14,6 +14,18 @@ namespace impeller { +/// A color matrix which inverts colors. +// clang-format off +constexpr ColorMatrix kColorInversion = { + .array = { + -1.0, 0, 0, 1.0, 0, // + 0, -1.0, 0, 1.0, 0, // + 0, 0, -1.0, 1.0, 0, // + 1.0, 1.0, 1.0, 1.0, 0 // + } +}; +// clang-format on + std::shared_ptr Paint::CreateContentsForEntity(const Path& path, bool cover) const { std::unique_ptr geometry; @@ -38,6 +50,7 @@ std::shared_ptr Paint::CreateContentsForGeometry( // Attempt to apply the color filter on the CPU first. // Note: This is not just an optimization; some color sources rely on // CPU-applied color filters to behave properly. + auto color_filter = GetColorFilter(); bool needs_color_filter = !!color_filter; if (color_filter && contents->ApplyColorFilter(color_filter->GetCPUColorFilterProc())) { @@ -59,7 +72,6 @@ std::shared_ptr Paint::CreateContentsForGeometry( std::shared_ptr Paint::WithFilters( std::shared_ptr input) const { input = WithColorFilter(input, ColorFilterContents::AbsorbOpacity::kYes); - input = WithInvertFilter(input); auto image_filter = WithImageFilter(input, Matrix(), Entity::RenderingMode::kDirect); if (image_filter) { @@ -111,6 +123,7 @@ std::shared_ptr Paint::WithColorFilter( return input; } + auto color_filter = GetColorFilter(); if (!color_filter) { return input; } @@ -121,33 +134,10 @@ std::shared_ptr Paint::WithColorFilter( if (input->ApplyColorFilter(color_filter->GetCPUColorFilterProc())) { return input; } - return color_filter->WrapWithGPUColorFilter(FilterInput::Make(input), absorb_opacity); } -/// A color matrix which inverts colors. -// clang-format off -constexpr ColorMatrix kColorInversion = { - .array = { - -1.0, 0, 0, 1.0, 0, // - 0, -1.0, 0, 1.0, 0, // - 0, 0, -1.0, 1.0, 0, // - 1.0, 1.0, 1.0, 1.0, 0 // - } -}; -// clang-format on - -std::shared_ptr Paint::WithInvertFilter( - std::shared_ptr input) const { - if (!invert_colors) { - return input; - } - - return ColorFilterContents::MakeColorMatrix( - {FilterInput::Make(std::move(input))}, kColorInversion); -} - std::shared_ptr Paint::MaskBlurDescriptor::CreateMaskBlur( std::shared_ptr color_source_contents, const std::shared_ptr& color_filter) const { @@ -208,8 +198,22 @@ std::shared_ptr Paint::MaskBlurDescriptor::CreateMaskBlur( return FilterContents::MakeBorderMaskBlur(input, sigma, sigma, style); } +std::shared_ptr Paint::GetColorFilter() const { + if (invert_colors && color_filter) { + auto filter = ColorFilter::MakeMatrix(kColorInversion); + return ColorFilter::MakeComposed(filter, color_filter); + } + if (invert_colors) { + return ColorFilter::MakeMatrix(kColorInversion); + } + if (color_filter) { + return color_filter; + } + return nullptr; +} + bool Paint::HasColorFilter() const { - return !!color_filter; + return !!color_filter || invert_colors; } } // namespace impeller diff --git a/impeller/aiks/paint.h b/impeller/aiks/paint.h index c2e907a1cc5b0..bf96842b783c9 100644 --- a/impeller/aiks/paint.h +++ b/impeller/aiks/paint.h @@ -67,6 +67,8 @@ struct Paint { std::shared_ptr color_filter; std::optional mask_blur_descriptor; + std::shared_ptr GetColorFilter() const; + /// @brief Wrap this paint's configured filters to the given contents. /// @param[in] input The contents to wrap with paint's filters. /// @return The filter-wrapped contents. If there are no filters that need @@ -108,9 +110,6 @@ struct Paint { std::shared_ptr input, ColorFilterContents::AbsorbOpacity absorb_opacity = ColorFilterContents::AbsorbOpacity::kNo) const; - - std::shared_ptr WithInvertFilter( - std::shared_ptr input) const; }; } // namespace impeller diff --git a/impeller/display_list/dl_dispatcher.cc b/impeller/display_list/dl_dispatcher.cc index 0b19cefb5b79b..7796efc26b8b6 100644 --- a/impeller/display_list/dl_dispatcher.cc +++ b/impeller/display_list/dl_dispatcher.cc @@ -8,7 +8,6 @@ #include #include #include -#include #include #include @@ -16,20 +15,13 @@ #include "flutter/fml/trace_event.h" #include "impeller/aiks/color_filter.h" #include "impeller/core/formats.h" -#include "impeller/display_list/dl_image_impeller.h" #include "impeller/display_list/dl_vertices_geometry.h" #include "impeller/display_list/nine_patch_converter.h" #include "impeller/display_list/skia_conversions.h" -#include "impeller/entity/contents/conical_gradient_contents.h" #include "impeller/entity/contents/filters/filter_contents.h" #include "impeller/entity/contents/filters/inputs/filter_input.h" -#include "impeller/entity/contents/linear_gradient_contents.h" -#include "impeller/entity/contents/radial_gradient_contents.h" #include "impeller/entity/contents/runtime_effect_contents.h" -#include "impeller/entity/contents/sweep_gradient_contents.h" -#include "impeller/entity/contents/tiled_texture_contents.h" #include "impeller/entity/entity.h" -#include "impeller/entity/geometry/geometry.h" #include "impeller/geometry/path.h" #include "impeller/geometry/path_builder.h" #include "impeller/geometry/scalar.h" @@ -483,7 +475,6 @@ static std::shared_ptr ToColorFilter( // |flutter::DlOpReceiver| void DlDispatcher::setColorFilter(const flutter::DlColorFilter* filter) { - // Needs https://github.com/flutter/flutter/issues/95434 paint_.color_filter = ToColorFilter(filter); } From f9ec39014ac9973f5d36ff56a4021391fa97d5c3 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 29 Sep 2023 17:28:56 -0400 Subject: [PATCH 383/859] Roll Dart SDK from 955a3a964621 to 0931bb8a43c8 (1 revision) (#46423) https://dart.googlesource.com/sdk.git/+log/955a3a964621..0931bb8a43c8 2023-09-29 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-216.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jacksongardner@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 93a8e5dca6083..a2a0feb88887d 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '955a3a964621fb2e23aeeda09ff27b2ae3759b05', + 'dart_revision': '0931bb8a43c820f337abbb4d39ffa0fa974812fc', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index a294efd4c6ad1..b7b3f95554684 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: ecaab46c30aeea6e2c966ec14d3be4ef +Signature: 8bdd1f0ace0c7446a3eb2b03933aeb32 ==================================================================================================== LIBRARY: dart From f2363d03b5fea7f2e8aac72ef39dd572967ea4e9 Mon Sep 17 00:00:00 2001 From: Tong Mu Date: Fri, 29 Sep 2023 14:43:55 -0700 Subject: [PATCH 384/859] Multi-view Rasterizer (#45512) This PR refactors `Rasterizer` so that it's more suitable for multi-view. Design doc: [flutter.dev/go/multi-view-pipeline-and-rasterizer](http://flutter.dev/go/multi-view-pipeline-and-rasterizer) With this change, `Rasterizer::DrawToSurfaces` has a structure that can handle drawing to multiple views, although the lack of some functionality still blocks it, mostly related to `ExternalViewEmbedder` and `RasterCache`. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- flow/compositor_context.h | 19 +- flow/frame_timings.cc | 4 + flow/frame_timings.h | 7 + flow/layers/layer_tree.h | 21 ++ runtime/runtime_delegate.h | 2 +- shell/common/animator.cc | 42 ++-- shell/common/animator.h | 18 +- shell/common/animator_unittests.cc | 4 +- shell/common/engine.cc | 4 +- shell/common/engine.h | 3 +- shell/common/pipeline.h | 14 -- shell/common/rasterizer.cc | 349 ++++++++++++++++++--------- shell/common/rasterizer.h | 203 ++++++++++++---- shell/common/rasterizer_unittests.cc | 177 ++++++++------ shell/common/shell.cc | 17 +- shell/common/shell.h | 4 +- shell/common/shell_unittests.cc | 18 +- 17 files changed, 584 insertions(+), 322 deletions(-) diff --git a/flow/compositor_context.h b/flow/compositor_context.h index 04bb29a1f19e4..453259cd67279 100644 --- a/flow/compositor_context.h +++ b/flow/compositor_context.h @@ -23,18 +23,19 @@ namespace flutter { class LayerTree; +// The result status of CompositorContext::ScopedFrame::Raster. enum class RasterStatus { // Frame has been successfully rasterized. kSuccess, - // Frame is submitted twice. This is only used on Android when - // switching the background surface to FlutterImageView. + // Frame has been submited, but must be submitted again. This is only used + // on Android when switching the background surface to FlutterImageView. // // On Android, the first frame doesn't make the image available // to the ImageReader right away. The second frame does. // // TODO(egarciad): https://github.com/flutter/flutter/issues/65652 kResubmit, - // Frame is dropped and a new frame with the same layer tree is + // Frame has be dropped and a new frame with the same layer tree must be // attempted. // // This is currently used to wait for the thread merger to merge @@ -44,18 +45,6 @@ enum class RasterStatus { // with separate threads for rasterization and platform tasks, // potentially leading to different performance characteristics. kSkipAndRetry, - // Frame has been successfully rasterized, but there are additional items in - // the pipeline waiting to be consumed. This is currently - // only used when thread configuration change occurs. - kEnqueuePipeline, - // Failed to rasterize the frame. - kFailed, - // Layer tree was discarded due to LayerTreeDiscardCallback or inability to - // access the GPU. - kDiscarded, - // Drawing was yielded to allow the correct thread to draw as a result of the - // RasterThreadMerger. - kYielded, }; class FrameDamage { diff --git a/flow/frame_timings.cc b/flow/frame_timings.cc index eed35fd4c755a..339374d77b837 100644 --- a/flow/frame_timings.cc +++ b/flow/frame_timings.cc @@ -254,4 +254,8 @@ const char* FrameTimingsRecorder::GetFrameNumberTraceArg() const { return frame_number_trace_arg_val_.c_str(); } +void FrameTimingsRecorder::AssertInState(State state) const { + FML_DCHECK(state_ == state); +} + } // namespace flutter diff --git a/flow/frame_timings.h b/flow/frame_timings.h index e477a80b8f955..c81bcc3362298 100644 --- a/flow/frame_timings.h +++ b/flow/frame_timings.h @@ -116,6 +116,13 @@ class FrameTimingsRecorder { /// Returns the recorded time from when `RecordRasterEnd` is called. FrameTiming GetRecordedTime() const; + /// Asserts in unopt builds that the recorder is current at the specified + /// state. + /// + /// Instead of adding a `GetState` method and asserting on the result, this + /// method prevents other logic from relying on the state. + void AssertInState(State state) const; + private: FML_FRIEND_TEST(FrameTimingsRecorderTest, ThrowWhenRecordBuildBeforeVsync); FML_FRIEND_TEST(FrameTimingsRecorderTest, diff --git a/flow/layers/layer_tree.h b/flow/layers/layer_tree.h index 5f573da2099a0..af162d58e0c4f 100644 --- a/flow/layers/layer_tree.h +++ b/flow/layers/layer_tree.h @@ -94,6 +94,27 @@ class LayerTree { FML_DISALLOW_COPY_AND_ASSIGN(LayerTree); }; +// The information to draw a layer tree to a specified view. +struct LayerTreeTask { + public: + LayerTreeTask(int64_t view_id, + std::unique_ptr layer_tree, + float device_pixel_ratio) + : view_id(view_id), + layer_tree(std::move(layer_tree)), + device_pixel_ratio(device_pixel_ratio) {} + + /// The target view to draw to. + int64_t view_id; + /// The target layer tree to be drawn. + std::unique_ptr layer_tree; + /// The pixel ratio of the target view. + float device_pixel_ratio; + + private: + FML_DISALLOW_COPY_AND_ASSIGN(LayerTreeTask); +}; + } // namespace flutter #endif // FLUTTER_FLOW_LAYERS_LAYER_TREE_H_ diff --git a/runtime/runtime_delegate.h b/runtime/runtime_delegate.h index a036d4723cb34..bc3de031f4411 100644 --- a/runtime/runtime_delegate.h +++ b/runtime/runtime_delegate.h @@ -23,7 +23,7 @@ class RuntimeDelegate { public: virtual std::string DefaultRouteName() = 0; - virtual void ScheduleFrame(bool regenerate_layer_tree = true) = 0; + virtual void ScheduleFrame(bool regenerate_layer_trees = true) = 0; virtual void Render(std::unique_ptr layer_tree, float device_pixel_ratio) = 0; diff --git a/shell/common/animator.cc b/shell/common/animator.cc index b0d8f62a22033..3dd925cee6213 100644 --- a/shell/common/animator.cc +++ b/shell/common/animator.cc @@ -4,6 +4,7 @@ #include "flutter/shell/common/animator.h" +#include "flutter/common/constants.h" #include "flutter/flow/frame_timings.h" #include "flutter/fml/time/time_point.h" #include "flutter/fml/trace_event.h" @@ -28,12 +29,12 @@ Animator::Animator(Delegate& delegate, task_runners_(task_runners), waiter_(std::move(waiter)), #if SHELL_ENABLE_METAL - layer_tree_pipeline_(std::make_shared(2)), + layer_tree_pipeline_(std::make_shared(2)), #else // SHELL_ENABLE_METAL // TODO(dnfield): We should remove this logic and set the pipeline depth // back to 2 in this case. See // https://github.com/flutter/engine/pull/9132 for discussion. - layer_tree_pipeline_(std::make_shared( + layer_tree_pipeline_(std::make_shared( task_runners.GetPlatformTaskRunner() == task_runners.GetRasterTaskRunner() ? 1 @@ -84,7 +85,7 @@ void Animator::BeginFrame( } frame_scheduled_ = false; - regenerate_layer_tree_ = false; + regenerate_layer_trees_ = false; pending_frame_semaphore_.Signal(); if (!producer_continuation_) { @@ -143,7 +144,6 @@ void Animator::BeginFrame( void Animator::Render(std::unique_ptr layer_tree, float device_pixel_ratio) { has_rendered_ = true; - last_layer_tree_size_ = layer_tree->frame_size(); if (!frame_timings_recorder_) { // Framework can directly call render with a built scene. @@ -161,12 +161,16 @@ void Animator::Render(std::unique_ptr layer_tree, delegate_.OnAnimatorUpdateLatestFrameTargetTime( frame_timings_recorder_->GetVsyncTargetTime()); - auto layer_tree_item = std::make_unique( - std::move(layer_tree), std::move(frame_timings_recorder_), - device_pixel_ratio); + // TODO(dkwingsmt): Currently only supports a single window. + // See https://github.com/flutter/flutter/issues/135530, item 2. + int64_t view_id = kFlutterImplicitViewId; + std::vector> layer_trees_tasks; + layer_trees_tasks.push_back(std::make_unique( + view_id, std::move(layer_tree), device_pixel_ratio)); // Commit the pending continuation. PipelineProduceResult result = - producer_continuation_.Complete(std::move(layer_tree_item)); + producer_continuation_.Complete(std::make_unique( + std::move(layer_trees_tasks), std::move(frame_timings_recorder_))); if (!result.success) { FML_DLOG(INFO) << "No pending continuation to commit"; @@ -188,15 +192,15 @@ const std::weak_ptr Animator::GetVsyncWaiter() const { return weak; } -bool Animator::CanReuseLastLayerTree() { - return !regenerate_layer_tree_; +bool Animator::CanReuseLastLayerTrees() { + return !regenerate_layer_trees_; } -void Animator::DrawLastLayerTree( +void Animator::DrawLastLayerTrees( std::unique_ptr frame_timings_recorder) { // This method is very cheap, but this makes it explicitly clear in trace // files. - TRACE_EVENT0("flutter", "Animator::DrawLastLayerTree"); + TRACE_EVENT0("flutter", "Animator::DrawLastLayerTrees"); pending_frame_semaphore_.Signal(); // In this case BeginFrame doesn't get called, we need to @@ -206,18 +210,18 @@ void Animator::DrawLastLayerTree( const auto now = fml::TimePoint::Now(); frame_timings_recorder->RecordBuildStart(now); frame_timings_recorder->RecordBuildEnd(now); - delegate_.OnAnimatorDrawLastLayerTree(std::move(frame_timings_recorder)); + delegate_.OnAnimatorDrawLastLayerTrees(std::move(frame_timings_recorder)); } -void Animator::RequestFrame(bool regenerate_layer_tree) { - if (regenerate_layer_tree) { +void Animator::RequestFrame(bool regenerate_layer_trees) { + if (regenerate_layer_trees) { // This event will be closed by BeginFrame. BeginFrame will only be called - // if regenerating the layer tree. If a frame has been requested to update + // if regenerating the layer trees. If a frame has been requested to update // an external texture, this will be false and no BeginFrame call will // happen. TRACE_EVENT_ASYNC_BEGIN0("flutter", "Frame Request Pending", frame_request_number_); - regenerate_layer_tree_ = true; + regenerate_layer_trees_ = true; } if (!pending_frame_semaphore_.TryWait()) { @@ -248,8 +252,8 @@ void Animator::AwaitVSync() { [self = weak_factory_.GetWeakPtr()]( std::unique_ptr frame_timings_recorder) { if (self) { - if (self->CanReuseLastLayerTree()) { - self->DrawLastLayerTree(std::move(frame_timings_recorder)); + if (self->CanReuseLastLayerTrees()) { + self->DrawLastLayerTrees(std::move(frame_timings_recorder)); } else { self->BeginFrame(std::move(frame_timings_recorder)); } diff --git a/shell/common/animator.h b/shell/common/animator.h index 4e6295957bdcc..8a92705ede9e6 100644 --- a/shell/common/animator.h +++ b/shell/common/animator.h @@ -39,10 +39,9 @@ class Animator final { virtual void OnAnimatorUpdateLatestFrameTargetTime( fml::TimePoint frame_target_time) = 0; - virtual void OnAnimatorDraw( - std::shared_ptr pipeline) = 0; + virtual void OnAnimatorDraw(std::shared_ptr pipeline) = 0; - virtual void OnAnimatorDrawLastLayerTree( + virtual void OnAnimatorDrawLastLayerTrees( std::unique_ptr frame_timings_recorder) = 0; }; @@ -52,7 +51,7 @@ class Animator final { ~Animator(); - void RequestFrame(bool regenerate_layer_tree = true); + void RequestFrame(bool regenerate_layer_trees = true); void Render(std::unique_ptr layer_tree, float device_pixel_ratio); @@ -85,9 +84,9 @@ class Animator final { private: void BeginFrame(std::unique_ptr frame_timings_recorder); - bool CanReuseLastLayerTree(); + bool CanReuseLastLayerTrees(); - void DrawLastLayerTree( + void DrawLastLayerTrees( std::unique_ptr frame_timings_recorder); void AwaitVSync(); @@ -102,12 +101,11 @@ class Animator final { std::unique_ptr frame_timings_recorder_; uint64_t frame_request_number_ = 1; fml::TimeDelta dart_frame_deadline_; - std::shared_ptr layer_tree_pipeline_; + std::shared_ptr layer_tree_pipeline_; fml::Semaphore pending_frame_semaphore_; - LayerTreePipeline::ProducerContinuation producer_continuation_; - bool regenerate_layer_tree_ = false; + FramePipeline::ProducerContinuation producer_continuation_; + bool regenerate_layer_trees_ = false; bool frame_scheduled_ = false; - SkISize last_layer_tree_size_ = {0, 0}; std::deque trace_flow_ids_; bool has_rendered_ = false; diff --git a/shell/common/animator_unittests.cc b/shell/common/animator_unittests.cc index 459c77b0ec672..9190659fc6f55 100644 --- a/shell/common/animator_unittests.cc +++ b/shell/common/animator_unittests.cc @@ -41,10 +41,10 @@ class FakeAnimatorDelegate : public Animator::Delegate { MOCK_METHOD(void, OnAnimatorDraw, - (std::shared_ptr pipeline), + (std::shared_ptr pipeline), (override)); - void OnAnimatorDrawLastLayerTree( + void OnAnimatorDrawLastLayerTrees( std::unique_ptr frame_timings_recorder) override {} bool notify_idle_called_ = false; diff --git a/shell/common/engine.cc b/shell/common/engine.cc index 920122c9a23dc..ea0cb43d9be18 100644 --- a/shell/common/engine.cc +++ b/shell/common/engine.cc @@ -455,8 +455,8 @@ std::string Engine::DefaultRouteName() { return "/"; } -void Engine::ScheduleFrame(bool regenerate_layer_tree) { - animator_->RequestFrame(regenerate_layer_tree); +void Engine::ScheduleFrame(bool regenerate_layer_trees) { + animator_->RequestFrame(regenerate_layer_trees); } void Engine::Render(std::unique_ptr layer_tree, diff --git a/shell/common/engine.h b/shell/common/engine.h index f7d888de425f2..a60d8b81f8ed4 100644 --- a/shell/common/engine.h +++ b/shell/common/engine.h @@ -29,7 +29,6 @@ #include "flutter/shell/common/display_manager.h" #include "flutter/shell/common/platform_view.h" #include "flutter/shell/common/pointer_data_dispatcher.h" -#include "flutter/shell/common/rasterizer.h" #include "flutter/shell/common/run_configuration.h" #include "flutter/shell/common/shell_io_manager.h" @@ -828,7 +827,7 @@ class Engine final : public RuntimeDelegate, PointerDataDispatcher::Delegate { void SetAccessibilityFeatures(int32_t flags); // |RuntimeDelegate| - void ScheduleFrame(bool regenerate_layer_tree) override; + void ScheduleFrame(bool regenerate_layer_trees) override; /// Schedule a frame with the default parameter of regenerating the layer /// tree. diff --git a/shell/common/pipeline.h b/shell/common/pipeline.h index c76ccbedbcd49..72401eec40cd5 100644 --- a/shell/common/pipeline.h +++ b/shell/common/pipeline.h @@ -253,20 +253,6 @@ class Pipeline { FML_DISALLOW_COPY_AND_ASSIGN(Pipeline); }; -struct LayerTreeItem { - LayerTreeItem(std::unique_ptr layer_tree, - std::unique_ptr frame_timings_recorder, - float device_pixel_ratio) - : layer_tree(std::move(layer_tree)), - frame_timings_recorder(std::move(frame_timings_recorder)), - device_pixel_ratio(device_pixel_ratio) {} - std::unique_ptr layer_tree; - std::unique_ptr frame_timings_recorder; - float device_pixel_ratio; -}; - -using LayerTreePipeline = Pipeline; - } // namespace flutter #endif // FLUTTER_SHELL_COMMON_PIPELINE_H_ diff --git a/shell/common/rasterizer.cc b/shell/common/rasterizer.cc index 9a7e6e16552b0..7ab349d353f37 100644 --- a/shell/common/rasterizer.cc +++ b/shell/common/rasterizer.cc @@ -42,7 +42,8 @@ static constexpr std::chrono::milliseconds kSkiaCleanupExpiration(15000); Rasterizer::Rasterizer(Delegate& delegate, MakeGpuImageBehavior gpu_image_behavior) - : delegate_(delegate), + : is_torn_down_(false), + delegate_(delegate), gpu_image_behavior_(gpu_image_behavior), compositor_context_(std::make_unique(*this)), user_override_resource_cache_bytes_(false), @@ -108,6 +109,7 @@ void Rasterizer::TeardownExternalViewEmbedder() { } void Rasterizer::Teardown() { + is_torn_down_ = true; if (surface_) { auto context_switch = surface_->MakeRenderContextCurrent(); if (context_switch->GetResult()) { @@ -119,7 +121,7 @@ void Rasterizer::Teardown() { surface_.reset(); } - last_layer_tree_.reset(); + view_records_.clear(); if (raster_thread_merger_.get() != nullptr && raster_thread_merger_.get()->IsMerged()) { @@ -129,6 +131,20 @@ void Rasterizer::Teardown() { } } +bool Rasterizer::IsTornDown() { + return is_torn_down_; +} + +std::optional Rasterizer::GetLastDrawStatus( + int64_t view_id) { + auto found = view_records_.find(view_id); + if (found != view_records_.end()) { + return found->second.last_draw_status; + } else { + return std::optional(); + } +} + void Rasterizer::EnableThreadMergerIfNeeded() { if (raster_thread_merger_) { raster_thread_merger_->Enable(); @@ -161,11 +177,7 @@ void Rasterizer::NotifyLowMemoryWarning() const { } void Rasterizer::CollectView(int64_t view_id) { - // TODO(dkwingsmt): When Rasterizer supports multi-view, this method should - // correctly clear the view corresponding to the ID. - if (view_id == kFlutterImplicitViewId) { - last_layer_tree_.reset(); - } + view_records_.erase(view_id); } std::shared_ptr Rasterizer::GetTextureRegistry() { @@ -176,74 +188,79 @@ GrDirectContext* Rasterizer::GetGrContext() { return surface_ ? surface_->GetContext() : nullptr; } -flutter::LayerTree* Rasterizer::GetLastLayerTree() { - return last_layer_tree_.get(); +flutter::LayerTree* Rasterizer::GetLastLayerTree(int64_t view_id) { + auto found = view_records_.find(view_id); + if (found == view_records_.end()) { + return nullptr; + } + auto& last_task = found->second.last_successful_task; + if (last_task == nullptr) { + return nullptr; + } + return last_task->layer_tree.get(); } -void Rasterizer::DrawLastLayerTree( +void Rasterizer::DrawLastLayerTrees( std::unique_ptr frame_timings_recorder) { - if (!last_layer_tree_ || !surface_) { + if (!surface_) { + return; + } + std::vector> tasks; + for (auto& [view_id, view_record] : view_records_) { + if (view_record.last_successful_task) { + tasks.push_back(std::move(view_record.last_successful_task)); + } + } + if (tasks.empty()) { return; } - RasterStatus raster_status = DrawToSurface( - *frame_timings_recorder, *last_layer_tree_, last_device_pixel_ratio_); + + DoDrawResult result = + DrawToSurfaces(*frame_timings_recorder, std::move(tasks)); // EndFrame should perform cleanups for the external_view_embedder. if (external_view_embedder_ && external_view_embedder_->GetUsedThisFrame()) { - bool should_resubmit_frame = ShouldResubmitFrame(raster_status); + bool should_resubmit_frame = ShouldResubmitFrame(result); external_view_embedder_->SetUsedThisFrame(false); external_view_embedder_->EndFrame(should_resubmit_frame, raster_thread_merger_); } } -RasterStatus Rasterizer::Draw( - const std::shared_ptr& pipeline) { +DrawStatus Rasterizer::Draw(const std::shared_ptr& pipeline) { TRACE_EVENT0("flutter", "GPURasterizer::Draw"); if (raster_thread_merger_ && !raster_thread_merger_->IsOnRasterizingThread()) { // we yield and let this frame be serviced on the right thread. - return RasterStatus::kYielded; + return DrawStatus::kYielded; } FML_DCHECK(delegate_.GetTaskRunners() .GetRasterTaskRunner() ->RunsTasksOnCurrentThread()); DoDrawResult draw_result; - LayerTreePipeline::Consumer consumer = - [&draw_result, this, - &delegate = delegate_](std::unique_ptr item) { - // TODO(dkwingsmt): Use a proper view ID when Rasterizer supports - // multi-view. - int64_t view_id = kFlutterImplicitViewId; - std::unique_ptr layer_tree = std::move(item->layer_tree); - std::unique_ptr frame_timings_recorder = - std::move(item->frame_timings_recorder); - float device_pixel_ratio = item->device_pixel_ratio; - if (delegate.ShouldDiscardLayerTree(view_id, *layer_tree.get())) { - draw_result.raster_status = RasterStatus::kDiscarded; - } else { - draw_result = DoDraw(std::move(frame_timings_recorder), - std::move(layer_tree), device_pixel_ratio); - } - }; + FramePipeline::Consumer consumer = [&draw_result, + this](std::unique_ptr item) { + draw_result = DoDraw(std::move(item->frame_timings_recorder), + std::move(item->layer_tree_tasks)); + }; PipelineConsumeResult consume_result = pipeline->Consume(consumer); if (consume_result == PipelineConsumeResult::NoneAvailable) { - return RasterStatus::kFailed; + return DrawStatus::kPipelineEmpty; } // if the raster status is to resubmit the frame, we push the frame to the // front of the queue and also change the consume status to more available. - bool should_resubmit_frame = ShouldResubmitFrame(draw_result.raster_status); + bool should_resubmit_frame = ShouldResubmitFrame(draw_result); if (should_resubmit_frame) { auto front_continuation = pipeline->ProduceIfEmpty(); - PipelineProduceResult pipeline_result = front_continuation.Complete( - std::move(draw_result.resubmitted_layer_tree_item)); + PipelineProduceResult pipeline_result = + front_continuation.Complete(std::move(draw_result.resubmitted_item)); if (pipeline_result.success) { consume_result = PipelineConsumeResult::MoreAvailable; } - } else if (draw_result.raster_status == RasterStatus::kEnqueuePipeline) { + } else if (draw_result.status == DoDrawStatus::kEnqueuePipeline) { consume_result = PipelineConsumeResult::MoreAvailable; } @@ -270,12 +287,29 @@ RasterStatus Rasterizer::Draw( break; } - return draw_result.raster_status; + return ToDrawStatus(draw_result.status); +} + +bool Rasterizer::ShouldResubmitFrame(const DoDrawResult& result) { + if (result.resubmitted_item) { + FML_CHECK(!result.resubmitted_item->layer_tree_tasks.empty()); + return true; + } + return false; } -bool Rasterizer::ShouldResubmitFrame(const RasterStatus& raster_status) { - return raster_status == RasterStatus::kResubmit || - raster_status == RasterStatus::kSkipAndRetry; +DrawStatus Rasterizer::ToDrawStatus(DoDrawStatus status) { + switch (status) { + case DoDrawStatus::kEnqueuePipeline: + return DrawStatus::kDone; + case DoDrawStatus::kNotSetUp: + return DrawStatus::kNotSetUp; + case DoDrawStatus::kGpuUnavailable: + return DrawStatus::kGpuUnavailable; + case DoDrawStatus::kDone: + return DrawStatus::kDone; + } + FML_UNREACHABLE(); } namespace { @@ -393,42 +427,31 @@ fml::Milliseconds Rasterizer::GetFrameBudget() const { Rasterizer::DoDrawResult Rasterizer::DoDraw( std::unique_ptr frame_timings_recorder, - std::unique_ptr layer_tree, - float device_pixel_ratio) { + std::vector> tasks) { TRACE_EVENT_WITH_FRAME_NUMBER(frame_timings_recorder, "flutter", "Rasterizer::DoDraw", /*flow_id_count=*/0, /*flow_ids=*/nullptr); FML_DCHECK(delegate_.GetTaskRunners() .GetRasterTaskRunner() ->RunsTasksOnCurrentThread()); + frame_timings_recorder->AssertInState(FrameTimingsRecorder::State::kBuildEnd); - if (!layer_tree || !surface_) { - return DoDrawResult{ - .raster_status = RasterStatus::kFailed, - }; + if (tasks.empty()) { + return DoDrawResult{DoDrawStatus::kDone}; + } + if (!surface_) { + return DoDrawResult{DoDrawStatus::kNotSetUp}; } PersistentCache* persistent_cache = PersistentCache::GetCacheForProcess(); persistent_cache->ResetStoredNewShaders(); - RasterStatus raster_status = - DrawToSurface(*frame_timings_recorder, *layer_tree, device_pixel_ratio); - if (raster_status == RasterStatus::kSuccess) { - last_layer_tree_ = std::move(layer_tree); - last_device_pixel_ratio_ = device_pixel_ratio; - } else if (ShouldResubmitFrame(raster_status)) { - return DoDrawResult{ - .raster_status = raster_status, - .resubmitted_layer_tree_item = std::make_unique( - std::move(layer_tree), - frame_timings_recorder->CloneUntil( - FrameTimingsRecorder::State::kBuildEnd), - device_pixel_ratio), - }; - } else if (raster_status == RasterStatus::kDiscarded) { - return DoDrawResult{ - .raster_status = raster_status, - }; + DoDrawResult result = + DrawToSurfaces(*frame_timings_recorder, std::move(tasks)); + + FML_DCHECK(result.status != DoDrawStatus::kEnqueuePipeline); + if (result.status == DoDrawStatus::kGpuUnavailable) { + return DoDrawResult{DoDrawStatus::kGpuUnavailable}; } if (persistent_cache->IsDumpingSkp() && @@ -497,73 +520,162 @@ Rasterizer::DoDrawResult Rasterizer::DoDraw( if (raster_thread_merger_->DecrementLease() == fml::RasterThreadStatus::kUnmergedNow) { return DoDrawResult{ - .raster_status = RasterStatus::kEnqueuePipeline, + .status = DoDrawStatus::kEnqueuePipeline, + .resubmitted_item = std::move(result.resubmitted_item), }; } } - return DoDrawResult{ - .raster_status = raster_status, - }; + return result; } -RasterStatus Rasterizer::DrawToSurface( +Rasterizer::DoDrawResult Rasterizer::DrawToSurfaces( FrameTimingsRecorder& frame_timings_recorder, - flutter::LayerTree& layer_tree, - float device_pixel_ratio) { - TRACE_EVENT0("flutter", "Rasterizer::DrawToSurface"); + std::vector> tasks) { + TRACE_EVENT0("flutter", "Rasterizer::DrawToSurfaces"); FML_DCHECK(surface_); + frame_timings_recorder.AssertInState(FrameTimingsRecorder::State::kBuildEnd); - RasterStatus raster_status; + DoDrawResult result{ + .status = DoDrawStatus::kDone, + }; if (surface_->AllowsDrawingWhenGpuDisabled()) { - raster_status = DrawToSurfaceUnsafe(frame_timings_recorder, layer_tree, - device_pixel_ratio); + result.resubmitted_item = + DrawToSurfacesUnsafe(frame_timings_recorder, std::move(tasks)); } else { delegate_.GetIsGpuDisabledSyncSwitch()->Execute( fml::SyncSwitch::Handlers() - .SetIfTrue([&] { raster_status = RasterStatus::kDiscarded; }) + .SetIfTrue([&] { + result.status = DoDrawStatus::kGpuUnavailable; + frame_timings_recorder.RecordRasterStart(fml::TimePoint::Now()); + frame_timings_recorder.RecordRasterEnd(); + }) .SetIfFalse([&] { - raster_status = DrawToSurfaceUnsafe( - frame_timings_recorder, layer_tree, device_pixel_ratio); + result.resubmitted_item = DrawToSurfacesUnsafe( + frame_timings_recorder, std::move(tasks)); })); } + frame_timings_recorder.AssertInState(FrameTimingsRecorder::State::kRasterEnd); - return raster_status; + return result; } -/// Unsafe because it assumes we have access to the GPU which isn't the case -/// when iOS is backgrounded, for example. -/// \see Rasterizer::DrawToSurface -RasterStatus Rasterizer::DrawToSurfaceUnsafe( +std::unique_ptr Rasterizer::DrawToSurfacesUnsafe( FrameTimingsRecorder& frame_timings_recorder, - flutter::LayerTree& layer_tree, - float device_pixel_ratio) { - FML_DCHECK(surface_); + std::vector> tasks) { + // TODO(dkwingsmt): The rasterizer only supports rendering a single view + // and that view must be the implicit view. Properly support multi-view + // in the future. + // See https://github.com/flutter/flutter/issues/135530, item 2 & 4. + FML_CHECK(tasks.size() == 1u) << "Unexpected size of " << tasks.size(); + FML_DCHECK(tasks.front()->view_id == kFlutterImplicitViewId); compositor_context_->ui_time().SetLapTime( frame_timings_recorder.GetBuildDuration()); - DlCanvas* embedder_root_canvas = nullptr; + // First traverse: Filter out discarded trees + auto task_iter = tasks.begin(); + while (task_iter != tasks.end()) { + LayerTreeTask& task = **task_iter; + if (delegate_.ShouldDiscardLayerTree(task.view_id, *task.layer_tree)) { + EnsureViewRecord(task.view_id).last_draw_status = + DrawSurfaceStatus::kDiscarded; + task_iter = tasks.erase(task_iter); + } else { + ++task_iter; + } + } + if (tasks.empty()) { + frame_timings_recorder.RecordRasterStart(fml::TimePoint::Now()); + frame_timings_recorder.RecordRasterEnd(); + return nullptr; + } + if (external_view_embedder_) { FML_DCHECK(!external_view_embedder_->GetUsedThisFrame()); external_view_embedder_->SetUsedThisFrame(true); external_view_embedder_->BeginFrame( - layer_tree.frame_size(), surface_->GetContext(), device_pixel_ratio, - raster_thread_merger_); - embedder_root_canvas = external_view_embedder_->GetRootCanvas(); + // TODO(dkwingsmt): Add all views here. + // See https://github.com/flutter/flutter/issues/135530, item 4. + tasks.front()->layer_tree->frame_size(), surface_->GetContext(), + tasks.front()->device_pixel_ratio, raster_thread_merger_); + } + + std::optional presentation_time = std::nullopt; + // TODO (https://github.com/flutter/flutter/issues/105596): this can be in + // the past and might need to get snapped to future as this frame could + // have been resubmitted. `presentation_time` on SubmitInfo is not set + // in this case. + { + const auto vsync_target_time = frame_timings_recorder.GetVsyncTargetTime(); + if (vsync_target_time > fml::TimePoint::Now()) { + presentation_time = vsync_target_time; + } } frame_timings_recorder.RecordRasterStart(fml::TimePoint::Now()); + // Second traverse: draw all layer trees. + std::vector> resubmitted_tasks; + for (std::unique_ptr& task : tasks) { + int64_t view_id = task->view_id; + std::unique_ptr layer_tree = std::move(task->layer_tree); + float device_pixel_ratio = task->device_pixel_ratio; + + DrawSurfaceStatus status = DrawToSurfaceUnsafe( + view_id, *layer_tree, device_pixel_ratio, presentation_time); + FML_DCHECK(status != DrawSurfaceStatus::kDiscarded); + + auto& view_record = EnsureViewRecord(task->view_id); + view_record.last_draw_status = status; + if (status == DrawSurfaceStatus::kSuccess) { + view_record.last_successful_task = std::make_unique( + view_id, std::move(layer_tree), device_pixel_ratio); + } else if (status == DrawSurfaceStatus::kRetry) { + resubmitted_tasks.push_back(std::make_unique( + view_id, std::move(layer_tree), device_pixel_ratio)); + } + } + // TODO(dkwingsmt): Pass in raster cache(s) for all views. + // See https://github.com/flutter/flutter/issues/135530, item 4. + frame_timings_recorder.RecordRasterEnd(&compositor_context_->raster_cache()); + FireNextFrameCallbackIfPresent(); + + if (surface_->GetContext()) { + surface_->GetContext()->performDeferredCleanup(kSkiaCleanupExpiration); + } + + if (resubmitted_tasks.empty()) { + return nullptr; + } else { + return std::make_unique( + std::move(resubmitted_tasks), + frame_timings_recorder.CloneUntil( + FrameTimingsRecorder::State::kBuildEnd)); + } +} + +/// \see Rasterizer::DrawToSurfaces +DrawSurfaceStatus Rasterizer::DrawToSurfaceUnsafe( + int64_t view_id, + flutter::LayerTree& layer_tree, + float device_pixel_ratio, + std::optional presentation_time) { + FML_DCHECK(surface_); + + DlCanvas* embedder_root_canvas = nullptr; + if (external_view_embedder_) { + // TODO(dkwingsmt): Add view ID here. + embedder_root_canvas = external_view_embedder_->GetRootCanvas(); + } + // On Android, the external view embedder deletes surfaces in `BeginFrame`. // // Deleting a surface also clears the GL context. Therefore, acquire the // frame after calling `BeginFrame` as this operation resets the GL context. auto frame = surface_->AcquireFrame(layer_tree.frame_size()); if (frame == nullptr) { - frame_timings_recorder.RecordRasterEnd( - &compositor_context_->raster_cache()); - return RasterStatus::kFailed; + return DrawSurfaceStatus::kFailed; } // If the external view embedder has specified an optional root surface, the @@ -604,7 +716,7 @@ RasterStatus Rasterizer::DrawToSurfaceUnsafe( damage = std::make_unique(); auto existing_damage = frame->framebuffer_info().existing_damage; if (existing_damage.has_value() && !force_full_repaint) { - damage->SetPreviousLayerTree(last_layer_tree_.get()); + damage->SetPreviousLayerTree(GetLastLayerTree(view_id)); damage->AddAdditionalDamage(existing_damage.value()); damage->SetClipAlignment( frame->framebuffer_info().horizontal_clip_alignment, @@ -618,25 +730,17 @@ RasterStatus Rasterizer::DrawToSurfaceUnsafe( ignore_raster_cache = false; } - RasterStatus raster_status = + RasterStatus frame_status = compositor_frame->Raster(layer_tree, // layer tree ignore_raster_cache, // ignore raster cache damage.get() // frame damage ); - if (raster_status == RasterStatus::kFailed || - raster_status == RasterStatus::kSkipAndRetry) { - return raster_status; + if (frame_status == RasterStatus::kSkipAndRetry) { + return DrawSurfaceStatus::kRetry; } SurfaceFrame::SubmitInfo submit_info; - // TODO (https://github.com/flutter/flutter/issues/105596): this can be in - // the past and might need to get snapped to future as this frame could - // have been resubmitted. `presentation_time` on `submit_info` is not set - // in this case. - const auto presentation_time = frame_timings_recorder.GetVsyncTargetTime(); - if (presentation_time > fml::TimePoint::Now()) { - submit_info.presentation_time = presentation_time; - } + submit_info.presentation_time = presentation_time; if (damage) { submit_info.frame_damage = damage->GetFrameDamage(); submit_info.buffer_damage = damage->GetBufferDamage(); @@ -655,22 +759,23 @@ RasterStatus Rasterizer::DrawToSurfaceUnsafe( // Do not update raster cache metrics for kResubmit because that status // indicates that the frame was not actually painted. - if (raster_status != RasterStatus::kResubmit) { + if (frame_status != RasterStatus::kResubmit) { compositor_context_->raster_cache().EndFrame(); } - frame_timings_recorder.RecordRasterEnd( - &compositor_context_->raster_cache()); - FireNextFrameCallbackIfPresent(); - - if (surface_->GetContext()) { - surface_->GetContext()->performDeferredCleanup(kSkiaCleanupExpiration); + if (frame_status == RasterStatus::kResubmit) { + return DrawSurfaceStatus::kRetry; + } else { + FML_CHECK(frame_status == RasterStatus::kSuccess); + return DrawSurfaceStatus::kSuccess; } - - return raster_status; } - return RasterStatus::kFailed; + return DrawSurfaceStatus::kFailed; +} + +Rasterizer::ViewRecord& Rasterizer::EnsureViewRecord(int64_t view_id) { + return view_records_[view_id]; } static sk_sp ScreenshotLayerTreeAsPicture( @@ -760,7 +865,11 @@ sk_sp Rasterizer::ScreenshotLayerTreeAsImage( Rasterizer::Screenshot Rasterizer::ScreenshotLastLayerTree( Rasterizer::ScreenshotType type, bool base64_encode) { - auto* layer_tree = GetLastLayerTree(); + // TODO(dkwingsmt): Support screenshotting all last layer trees + // when the shell protocol supports multi-views. + // https://github.com/flutter/flutter/issues/135534 + // https://github.com/flutter/flutter/issues/135535 + auto* layer_tree = GetLastLayerTree(kFlutterImplicitViewId); if (layer_tree == nullptr) { FML_LOG(ERROR) << "Last layer tree was null when screenshotting."; return {}; diff --git a/shell/common/rasterizer.h b/shell/common/rasterizer.h index a54dd677a2fdb..e5acbaf8357a9 100644 --- a/shell/common/rasterizer.h +++ b/shell/common/rasterizer.h @@ -7,6 +7,7 @@ #include #include +#include #include "flutter/common/settings.h" #include "flutter/common/task_runners.h" @@ -48,6 +49,54 @@ class AiksContext; namespace flutter { +// The result status of Rasterizer::Draw. This is only used for unit tests. +enum class DrawStatus { + // The drawing was done without any specified status. + kDone, + // Failed to rasterize the frame because the Rasterizer is not set up. + kNotSetUp, + // Nothing was done, because the call was not on the raster thread. Yielded to + // let this frame be serviced on the right thread. + kYielded, + // Nothing was done, because the pipeline was empty. + kPipelineEmpty, + // Nothing was done, because the GPU was unavailable. + kGpuUnavailable, +}; + +// The result status of drawing to a view. This is only used for unit tests. +enum class DrawSurfaceStatus { + // The layer tree was successfully rasterized. + kSuccess, + // The layer tree must be submitted again. + // + // This can occur on Android when switching the background surface to + // FlutterImageView. On Android, the first frame doesn't make the image + // available to the ImageReader right away. The second frame does. + // TODO(egarciad): https://github.com/flutter/flutter/issues/65652 + // + // This can also occur when the frame is dropped to wait for the thread + // merger to merge the raster and platform threads. + kRetry, + // Failed to rasterize the frame. + kFailed, + // Layer tree was discarded because its size does not match the view size. + // This typically occurs during resizing. + kDiscarded, +}; + +// The information to draw to all views of a frame. +struct FrameItem { + FrameItem(std::vector> tasks, + std::unique_ptr frame_timings_recorder) + : layer_tree_tasks(std::move(tasks)), + frame_timings_recorder(std::move(frame_timings_recorder)) {} + std::vector> layer_tree_tasks; + std::unique_ptr frame_timings_recorder; +}; + +using FramePipeline = Pipeline; + //------------------------------------------------------------------------------ /// The rasterizer is a component owned by the shell that resides on the raster /// task runner. Each shell owns exactly one instance of a rasterizer. The @@ -180,6 +229,7 @@ class Rasterizer final : public SnapshotDelegate, /// collects associated resources. No more rendering may occur /// till the next call to `Rasterizer::Setup` with a new render /// surface. Calling a teardown without a setup is user error. + /// Calling this method multiple times is safe. /// void Teardown(); @@ -211,45 +261,46 @@ class Rasterizer final : public SnapshotDelegate, //---------------------------------------------------------------------------- /// @brief Deallocate the resources for displaying a view. /// - /// This method should be called when a view is removed. + /// This method must be called when a view is removed. /// /// The rasterizer don't need views to be registered. Last-frame /// states for views are recorded when layer trees are rasterized - /// to the view and used during `Rasterizer::DrawLastLayerTree`. + /// to the view and used during `Rasterizer::DrawLastLayerTrees`. /// /// @param[in] view_id The ID of the view. /// void CollectView(int64_t view_id); //---------------------------------------------------------------------------- - /// @brief Sometimes, it may be necessary to render the same frame again - /// without having to wait for the framework to build a whole new - /// layer tree describing the same contents. One such case is when - /// external textures (video or camera streams for example) are - /// updated in an otherwise static layer tree. To support this use - /// case, the rasterizer holds onto the last rendered layer tree. + /// @brief Returns the last successfully drawn layer tree for the given + /// view, or nullptr if there isn't any. This is useful during + /// `DrawLastLayerTrees` and computing frame damage. /// /// @bug https://github.com/flutter/flutter/issues/33939 /// /// @return A pointer to the last layer or `nullptr` if this rasterizer - /// has never rendered a frame. + /// has never rendered a frame to the given view. /// - flutter::LayerTree* GetLastLayerTree(); + flutter::LayerTree* GetLastLayerTree(int64_t view_id); //---------------------------------------------------------------------------- - /// @brief Draws a last layer tree to the render surface. This may seem - /// entirely redundant at first glance. After all, on surface loss - /// and re-acquisition, the framework generates a new layer tree. - /// Otherwise, why render the same contents to the screen again? - /// This is used as an optimization in cases where there are - /// external textures (video or camera streams for example) in - /// referenced in the layer tree. These textures may be updated at - /// a cadence different from that of the Flutter application. - /// Flutter can re-render the layer tree with just the updated - /// textures instead of waiting for the framework to do the work - /// to generate the layer tree describing the same contents. - /// - void DrawLastLayerTree( + /// @brief Draws the last layer trees with their last configuration. This + /// may seem entirely redundant at first glance. After all, on + /// surface loss and re-acquisition, the framework generates a new + /// layer tree. Otherwise, why render the same contents to the + /// screen again? This is used as an optimization in cases where + /// there are external textures (video or camera streams for + /// example) in referenced in the layer tree. These textures may + /// be updated at a cadence different from that of the Flutter + /// application. Flutter can re-render the layer tree with just + /// the updated textures instead of waiting for the framework to + /// do the work to generate the layer tree describing the same + /// contents. + /// + /// Calling this method clears all last layer trees + /// (GetLastLayerTree). + /// + void DrawLastLayerTrees( std::unique_ptr frame_timings_recorder); // |SnapshotDelegate| @@ -286,7 +337,7 @@ class Rasterizer final : public SnapshotDelegate, /// @param[in] pipeline The layer tree pipeline to take the next layer tree /// to render from. /// - RasterStatus Draw(const std::shared_ptr& pipeline); + DrawStatus Draw(const std::shared_ptr& pipeline); //---------------------------------------------------------------------------- /// @brief The type of the screenshot to obtain of the previously @@ -511,18 +562,54 @@ class Rasterizer final : public SnapshotDelegate, /// void DisableThreadMergerIfNeeded(); + //---------------------------------------------------------------------------- + /// @brief Returns whether TearDown has been called. + /// + /// This method is used only in unit tests. + /// + bool IsTornDown(); + + //---------------------------------------------------------------------------- + /// @brief Returns the last status of drawing the specific view. + /// + /// This method is used only in unit tests. + /// + std::optional GetLastDrawStatus(int64_t view_id); + private: - // The result of `DoDraw`. - // - // Normally `DoDraw` returns simply a raster status. However, sometimes we - // need to attempt to rasterize the layer tree again. This happens when - // layer_tree has not successfully rasterized due to changes in the thread - // configuration, in which case the resubmitted task will be inserted to the - // front of the pipeline. + // The result status of DoDraw, DrawToSurfaces, and DrawToSurfacesUnsafe. + enum class DoDrawStatus { + // The drawing was done without any specified status. + kDone, + // Frame has been successfully rasterized, but there are additional items + // in the pipeline waiting to be consumed. This is currently only used when + // thread configuration change occurs. + kEnqueuePipeline, + // Failed to rasterize the frame because the Rasterizer is not set up. + kNotSetUp, + // Nothing was done, because GPU was unavailable. + kGpuUnavailable, + }; + + // The result of DoDraw. struct DoDrawResult { - RasterStatus raster_status = RasterStatus::kFailed; + // The overall status of the drawing process. + // + // The status of drawing a specific view is available at GetLastDrawStatus. + DoDrawStatus status = DoDrawStatus::kDone; + + // The frame item that needs to be submitted again. + // + // See RasterStatus::kResubmit and kSkipAndRetry for when it happens. + // + // If `resubmitted_item` is not null, its `tasks` is guaranteed to be + // non-empty. + std::unique_ptr resubmitted_item; + }; - std::unique_ptr resubmitted_layer_tree_item; + struct ViewRecord { + std::unique_ptr last_successful_task; + std::optional last_draw_status; }; // |SnapshotDelegate| @@ -580,32 +667,58 @@ class Rasterizer final : public SnapshotDelegate, GrDirectContext* surface_context, bool compressed); + // This method starts with the frame timing recorder at build end. This + // method might push it to raster end and get the recorded time, or abort in + // the middle and not get the recorded time. DoDrawResult DoDraw( std::unique_ptr frame_timings_recorder, - std::unique_ptr layer_tree, - float device_pixel_ratio); + std::vector> tasks); - RasterStatus DrawToSurface(FrameTimingsRecorder& frame_timings_recorder, - flutter::LayerTree& layer_tree, - float device_pixel_ratio); + // This method pushes the frame timing recorder from build end to raster end. + DoDrawResult DrawToSurfaces( + FrameTimingsRecorder& frame_timings_recorder, + std::vector> tasks); + + // Draws the specified layer trees to views, assuming we have access to the + // GPU. + // + // If any layer trees need resubmitting, this method returns the frame item to + // be resubmitted. Otherwise, it returns nullptr. + // + // Unsafe because it assumes we have access to the GPU which isn't the case + // when iOS is backgrounded, for example. + // + // This method pushes the frame timing recorder from build end to raster end. + std::unique_ptr DrawToSurfacesUnsafe( + FrameTimingsRecorder& frame_timings_recorder, + std::vector> tasks); + + // Draws the layer tree to the specified view, assuming we have access to the + // GPU. + // + // This method is not affiliated with the frame timing recorder, but must be + // included between the RasterStart and RasterEnd. + DrawSurfaceStatus DrawToSurfaceUnsafe( + int64_t view_id, + flutter::LayerTree& layer_tree, + float device_pixel_ratio, + std::optional presentation_time); - RasterStatus DrawToSurfaceUnsafe(FrameTimingsRecorder& frame_timings_recorder, - flutter::LayerTree& layer_tree, - float device_pixel_ratio); + ViewRecord& EnsureViewRecord(int64_t view_id); void FireNextFrameCallbackIfPresent(); - static bool ShouldResubmitFrame(const RasterStatus& raster_status); + static bool ShouldResubmitFrame(const DoDrawResult& result); + static DrawStatus ToDrawStatus(DoDrawStatus status); + bool is_torn_down_; Delegate& delegate_; MakeGpuImageBehavior gpu_image_behavior_; std::weak_ptr impeller_context_; std::unique_ptr surface_; std::unique_ptr snapshot_surface_producer_; std::unique_ptr compositor_context_; - // This is the last successfully rasterized layer tree. - std::unique_ptr last_layer_tree_; - float last_device_pixel_ratio_; + std::unordered_map view_records_; fml::closure next_frame_callback_; bool user_override_resource_cache_bytes_; std::optional max_cache_bytes_; diff --git a/shell/common/rasterizer_unittests.cc b/shell/common/rasterizer_unittests.cc index 545df3b6d3854..1e21d0d8f1ecb 100644 --- a/shell/common/rasterizer_unittests.cc +++ b/shell/common/rasterizer_unittests.cc @@ -32,6 +32,17 @@ namespace flutter { namespace { constexpr float kDevicePixelRatio = 2.0f; +constexpr int64_t kImplicitViewId = 0; + +std::vector> SingleLayerTreeList( + int64_t view_id, + std::unique_ptr layer_tree, + float pixel_ratio) { + std::vector> tasks; + tasks.push_back(std::make_unique( + view_id, std::move(layer_tree), pixel_ratio)); + return tasks; +} class MockDelegate : public Rasterizer::Delegate { public: @@ -152,7 +163,7 @@ TEST(RasterizerTest, drawEmptyPipeline) { rasterizer->Setup(std::move(surface)); fml::AutoResetWaitableEvent latch; thread_host.raster_thread->GetTaskRunner()->PostTask([&] { - auto pipeline = std::make_shared(/*depth=*/10); + auto pipeline = std::make_shared(/*depth=*/10); ON_CALL(delegate, ShouldDiscardLayerTree).WillByDefault(Return(false)); rasterizer->Draw(pipeline); latch.Signal(); @@ -214,13 +225,14 @@ TEST(RasterizerTest, rasterizer->Setup(std::move(surface)); fml::AutoResetWaitableEvent latch; thread_host.raster_thread->GetTaskRunner()->PostTask([&] { - auto pipeline = std::make_shared(/*depth=*/10); + auto pipeline = std::make_shared(/*depth=*/10); auto layer_tree = std::make_unique(/*config=*/LayerTree::Config(), /*frame_size=*/SkISize()); - auto layer_tree_item = std::make_unique( - std::move(layer_tree), CreateFinishedBuildRecorder(), - kDevicePixelRatio); + auto layer_tree_item = std::make_unique( + SingleLayerTreeList(kImplicitViewId, std::move(layer_tree), + kDevicePixelRatio), + CreateFinishedBuildRecorder()); PipelineProduceResult result = pipeline->Produce().Complete(std::move(layer_tree_item)); EXPECT_TRUE(result.success); @@ -281,12 +293,13 @@ TEST( rasterizer->Setup(std::move(surface)); fml::AutoResetWaitableEvent latch; thread_host.raster_thread->GetTaskRunner()->PostTask([&] { - auto pipeline = std::make_shared(/*depth=*/10); + auto pipeline = std::make_shared(/*depth=*/10); auto layer_tree = std::make_unique( /*config=*/LayerTree::Config(), /*frame_size=*/SkISize()); - auto layer_tree_item = std::make_unique( - std::move(layer_tree), CreateFinishedBuildRecorder(), - kDevicePixelRatio); + auto layer_tree_item = std::make_unique( + SingleLayerTreeList(kImplicitViewId, std::move(layer_tree), + kDevicePixelRatio), + CreateFinishedBuildRecorder()); PipelineProduceResult result = pipeline->Produce().Complete(std::move(layer_tree_item)); EXPECT_TRUE(result.success); @@ -353,11 +366,13 @@ TEST( rasterizer->Setup(std::move(surface)); - auto pipeline = std::make_shared(/*depth=*/10); + auto pipeline = std::make_shared(/*depth=*/10); auto layer_tree = std::make_unique(/*config=*/LayerTree::Config(), /*frame_size=*/SkISize()); - auto layer_tree_item = std::make_unique( - std::move(layer_tree), CreateFinishedBuildRecorder(), kDevicePixelRatio); + auto layer_tree_item = std::make_unique( + SingleLayerTreeList(kImplicitViewId, std::move(layer_tree), + kDevicePixelRatio), + CreateFinishedBuildRecorder()); PipelineProduceResult result = pipeline->Produce().Complete(std::move(layer_tree_item)); EXPECT_TRUE(result.success); @@ -406,7 +421,7 @@ TEST(RasterizerTest, /*frame_size=*/SkISize::Make(800, 600)); EXPECT_CALL(*surface, AllowsDrawingWhenGpuDisabled()) .WillRepeatedly(Return(true)); - // Prepare two frames for Draw() and DrawLastLayerTree(). + // Prepare two frames for Draw() and DrawLastLayerTrees(). EXPECT_CALL(*surface, AcquireFrame(SkISize())) .WillOnce(Return(ByMove(std::move(surface_frame1)))) .WillOnce(Return(ByMove(std::move(surface_frame2)))); @@ -427,11 +442,13 @@ TEST(RasterizerTest, rasterizer->Setup(std::move(surface)); - auto pipeline = std::make_shared(/*depth=*/10); + auto pipeline = std::make_shared(/*depth=*/10); auto layer_tree = std::make_unique(/*config=*/LayerTree::Config(), /*frame_size=*/SkISize()); - auto layer_tree_item = std::make_unique( - std::move(layer_tree), CreateFinishedBuildRecorder(), kDevicePixelRatio); + auto layer_tree_item = std::make_unique( + SingleLayerTreeList(kImplicitViewId, std::move(layer_tree), + kDevicePixelRatio), + CreateFinishedBuildRecorder()); PipelineProduceResult result = pipeline->Produce().Complete(std::move(layer_tree_item)); EXPECT_TRUE(result.success); @@ -441,9 +458,9 @@ TEST(RasterizerTest, ON_CALL(delegate, ShouldDiscardLayerTree).WillByDefault(Return(false)); rasterizer->Draw(pipeline); - // The DrawLastLayerTree() will respectively call BeginFrame(), SubmitFrame() + // The DrawLastLayerTrees() will respectively call BeginFrame(), SubmitFrame() // and EndFrame() one more time, totally 2 times. - rasterizer->DrawLastLayerTree(CreateFinishedBuildRecorder()); + rasterizer->DrawLastLayerTrees(CreateFinishedBuildRecorder()); } TEST(RasterizerTest, externalViewEmbedderDoesntEndFrameWhenNoSurfaceIsSet) { @@ -476,12 +493,13 @@ TEST(RasterizerTest, externalViewEmbedderDoesntEndFrameWhenNoSurfaceIsSet) { fml::AutoResetWaitableEvent latch; thread_host.raster_thread->GetTaskRunner()->PostTask([&] { - auto pipeline = std::make_shared(/*depth=*/10); + auto pipeline = std::make_shared(/*depth=*/10); auto layer_tree = std::make_unique( /*config=*/LayerTree::Config(), /*frame_size=*/SkISize()); - auto layer_tree_item = std::make_unique( - std::move(layer_tree), CreateFinishedBuildRecorder(), - kDevicePixelRatio); + auto layer_tree_item = std::make_unique( + SingleLayerTreeList(kImplicitViewId, std::move(layer_tree), + kDevicePixelRatio), + CreateFinishedBuildRecorder()); PipelineProduceResult result = pipeline->Produce().Complete(std::move(layer_tree_item)); EXPECT_TRUE(result.success); @@ -507,6 +525,10 @@ TEST(RasterizerTest, externalViewEmbedderDoesntEndFrameWhenNotUsedThisFrame) { ON_CALL(delegate, GetSettings()).WillByDefault(ReturnRef(settings)); EXPECT_CALL(delegate, GetTaskRunners()) .WillRepeatedly(ReturnRef(task_runners)); + auto is_gpu_disabled_sync_switch = + std::make_shared(false); + ON_CALL(delegate, GetIsGpuDisabledSyncSwitch()) + .WillByDefault(Return(is_gpu_disabled_sync_switch)); auto rasterizer = std::make_unique(delegate); auto surface = std::make_unique>(); @@ -532,19 +554,22 @@ TEST(RasterizerTest, externalViewEmbedderDoesntEndFrameWhenNotUsedThisFrame) { fml::AutoResetWaitableEvent latch; thread_host.raster_thread->GetTaskRunner()->PostTask([&] { - auto pipeline = std::make_shared(/*depth=*/10); + auto pipeline = std::make_shared(/*depth=*/10); auto layer_tree = std::make_unique( /*config=*/LayerTree::Config(), /*frame_size=*/SkISize()); - auto layer_tree_item = std::make_unique( - std::move(layer_tree), CreateFinishedBuildRecorder(), - kDevicePixelRatio); + auto layer_tree_item = std::make_unique( + SingleLayerTreeList(kImplicitViewId, std::move(layer_tree), + kDevicePixelRatio), + CreateFinishedBuildRecorder()); PipelineProduceResult result = pipeline->Produce().Complete(std::move(layer_tree_item)); EXPECT_TRUE(result.success); // Always discard the layer tree. ON_CALL(delegate, ShouldDiscardLayerTree).WillByDefault(Return(true)); - RasterStatus status = rasterizer->Draw(pipeline); - EXPECT_EQ(status, RasterStatus::kDiscarded); + DrawStatus status = rasterizer->Draw(pipeline); + EXPECT_EQ(status, DrawStatus::kDone); + EXPECT_EQ(rasterizer->GetLastDrawStatus(kImplicitViewId), + DrawSurfaceStatus::kDiscarded); latch.Signal(); }); latch.Wait(); @@ -585,10 +610,10 @@ TEST(RasterizerTest, externalViewEmbedderDoesntEndFrameWhenPipelineIsEmpty) { fml::AutoResetWaitableEvent latch; thread_host.raster_thread->GetTaskRunner()->PostTask([&] { - auto pipeline = std::make_shared(/*depth=*/10); + auto pipeline = std::make_shared(/*depth=*/10); ON_CALL(delegate, ShouldDiscardLayerTree).WillByDefault(Return(false)); - RasterStatus status = rasterizer->Draw(pipeline); - EXPECT_EQ(status, RasterStatus::kFailed); + DrawStatus status = rasterizer->Draw(pipeline); + EXPECT_EQ(status, DrawStatus::kPipelineEmpty); latch.Signal(); }); latch.Wait(); @@ -635,12 +660,13 @@ TEST(RasterizerTest, rasterizer->Setup(std::move(surface)); fml::AutoResetWaitableEvent latch; thread_host.raster_thread->GetTaskRunner()->PostTask([&] { - auto pipeline = std::make_shared(/*depth=*/10); + auto pipeline = std::make_shared(/*depth=*/10); auto layer_tree = std::make_unique( /*config=*/LayerTree::Config(), /*frame_size=*/SkISize()); - auto layer_tree_item = std::make_unique( - std::move(layer_tree), CreateFinishedBuildRecorder(), - kDevicePixelRatio); + auto layer_tree_item = std::make_unique( + SingleLayerTreeList(kImplicitViewId, std::move(layer_tree), + kDevicePixelRatio), + CreateFinishedBuildRecorder()); PipelineProduceResult result = pipeline->Produce().Complete(std::move(layer_tree_item)); EXPECT_TRUE(result.success); @@ -693,18 +719,19 @@ TEST( rasterizer->Setup(std::move(surface)); fml::AutoResetWaitableEvent latch; thread_host.raster_thread->GetTaskRunner()->PostTask([&] { - auto pipeline = std::make_shared(/*depth=*/10); + auto pipeline = std::make_shared(/*depth=*/10); auto layer_tree = std::make_unique( /*config=*/LayerTree::Config(), /*frame_size=*/SkISize()); - auto layer_tree_item = std::make_unique( - std::move(layer_tree), CreateFinishedBuildRecorder(), - kDevicePixelRatio); + auto layer_tree_item = std::make_unique( + SingleLayerTreeList(kImplicitViewId, std::move(layer_tree), + kDevicePixelRatio), + CreateFinishedBuildRecorder()); PipelineProduceResult result = pipeline->Produce().Complete(std::move(layer_tree_item)); EXPECT_TRUE(result.success); ON_CALL(delegate, ShouldDiscardLayerTree).WillByDefault(Return(false)); - RasterStatus status = rasterizer->Draw(pipeline); - EXPECT_EQ(status, RasterStatus::kSuccess); + DrawStatus status = rasterizer->Draw(pipeline); + EXPECT_EQ(status, DrawStatus::kDone); latch.Signal(); }); latch.Wait(); @@ -751,18 +778,19 @@ TEST( rasterizer->Setup(std::move(surface)); fml::AutoResetWaitableEvent latch; thread_host.raster_thread->GetTaskRunner()->PostTask([&] { - auto pipeline = std::make_shared(/*depth=*/10); + auto pipeline = std::make_shared(/*depth=*/10); auto layer_tree = std::make_unique( /*config=*/LayerTree::Config(), /*frame_size=*/SkISize()); - auto layer_tree_item = std::make_unique( - std::move(layer_tree), CreateFinishedBuildRecorder(), - kDevicePixelRatio); + auto layer_tree_item = std::make_unique( + SingleLayerTreeList(kImplicitViewId, std::move(layer_tree), + kDevicePixelRatio), + CreateFinishedBuildRecorder()); PipelineProduceResult result = pipeline->Produce().Complete(std::move(layer_tree_item)); EXPECT_TRUE(result.success); ON_CALL(delegate, ShouldDiscardLayerTree).WillByDefault(Return(false)); - RasterStatus status = rasterizer->Draw(pipeline); - EXPECT_EQ(status, RasterStatus::kSuccess); + DrawStatus status = rasterizer->Draw(pipeline); + EXPECT_EQ(status, DrawStatus::kDone); latch.Signal(); }); latch.Wait(); @@ -808,18 +836,19 @@ TEST( rasterizer->Setup(std::move(surface)); fml::AutoResetWaitableEvent latch; thread_host.raster_thread->GetTaskRunner()->PostTask([&] { - auto pipeline = std::make_shared(/*depth=*/10); + auto pipeline = std::make_shared(/*depth=*/10); auto layer_tree = std::make_unique( /*config=*/LayerTree::Config(), /*frame_size=*/SkISize()); - auto layer_tree_item = std::make_unique( - std::move(layer_tree), CreateFinishedBuildRecorder(), - kDevicePixelRatio); + auto layer_tree_item = std::make_unique( + SingleLayerTreeList(kImplicitViewId, std::move(layer_tree), + kDevicePixelRatio), + CreateFinishedBuildRecorder()); PipelineProduceResult result = pipeline->Produce().Complete(std::move(layer_tree_item)); EXPECT_TRUE(result.success); ON_CALL(delegate, ShouldDiscardLayerTree).WillByDefault(Return(false)); - RasterStatus status = rasterizer->Draw(pipeline); - EXPECT_EQ(status, RasterStatus::kDiscarded); + DrawStatus status = rasterizer->Draw(pipeline); + EXPECT_EQ(status, DrawStatus::kGpuUnavailable); latch.Signal(); }); latch.Wait(); @@ -864,18 +893,21 @@ TEST( rasterizer->Setup(std::move(surface)); fml::AutoResetWaitableEvent latch; thread_host.raster_thread->GetTaskRunner()->PostTask([&] { - auto pipeline = std::make_shared(/*depth=*/10); + auto pipeline = std::make_shared(/*depth=*/10); auto layer_tree = std::make_unique( /*config=*/LayerTree::Config(), /*frame_size=*/SkISize()); - auto layer_tree_item = std::make_unique( - std::move(layer_tree), CreateFinishedBuildRecorder(), - kDevicePixelRatio); + auto layer_tree_item = std::make_unique( + SingleLayerTreeList(kImplicitViewId, std::move(layer_tree), + kDevicePixelRatio), + CreateFinishedBuildRecorder()); PipelineProduceResult result = pipeline->Produce().Complete(std::move(layer_tree_item)); EXPECT_TRUE(result.success); ON_CALL(delegate, ShouldDiscardLayerTree).WillByDefault(Return(false)); - RasterStatus status = rasterizer->Draw(pipeline); - EXPECT_EQ(status, RasterStatus::kFailed); + DrawStatus status = rasterizer->Draw(pipeline); + EXPECT_EQ(status, DrawStatus::kDone); + EXPECT_EQ(rasterizer->GetLastDrawStatus(kImplicitViewId), + DrawSurfaceStatus::kFailed); latch.Signal(); }); latch.Wait(); @@ -942,13 +974,14 @@ TEST(RasterizerTest, thread_host.raster_thread->GetTaskRunner()->PostTask([&] { rasterizer->Setup(std::move(surface)); - auto pipeline = std::make_shared(/*depth=*/10); + auto pipeline = std::make_shared(/*depth=*/10); for (int i = 0; i < 2; i++) { auto layer_tree = std::make_unique( /*config=*/LayerTree::Config(), /*frame_size=*/SkISize()); - auto layer_tree_item = std::make_unique( - std::move(layer_tree), CreateFinishedBuildRecorder(timestamps[i]), - kDevicePixelRatio); + auto layer_tree_item = std::make_unique( + SingleLayerTreeList(kImplicitViewId, std::move(layer_tree), + kDevicePixelRatio), + CreateFinishedBuildRecorder(timestamps[i])); PipelineProduceResult result = pipeline->Produce().Complete(std::move(layer_tree_item)); EXPECT_TRUE(result.success); @@ -1113,13 +1146,14 @@ TEST(RasterizerTest, presentationTimeSetWhenVsyncTargetInFuture) { thread_host.raster_thread->GetTaskRunner()->PostTask([&] { rasterizer->Setup(std::move(surface)); - auto pipeline = std::make_shared(/*depth=*/10); + auto pipeline = std::make_shared(/*depth=*/10); for (int i = 0; i < 2; i++) { auto layer_tree = std::make_unique( /*config=*/LayerTree::Config(), /*frame_size=*/SkISize()); - auto layer_tree_item = std::make_unique( - std::move(layer_tree), CreateFinishedBuildRecorder(timestamps[i]), - kDevicePixelRatio); + auto layer_tree_item = std::make_unique( + SingleLayerTreeList(kImplicitViewId, std::move(layer_tree), + kDevicePixelRatio), + CreateFinishedBuildRecorder(timestamps[i])); PipelineProduceResult result = pipeline->Produce().Complete(std::move(layer_tree_item)); EXPECT_TRUE(result.success); @@ -1196,12 +1230,13 @@ TEST(RasterizerTest, presentationTimeNotSetWhenVsyncTargetInPast) { thread_host.raster_thread->GetTaskRunner()->PostTask([&] { rasterizer->Setup(std::move(surface)); - auto pipeline = std::make_shared(/*depth=*/10); + auto pipeline = std::make_shared(/*depth=*/10); auto layer_tree = std::make_unique( /*config=*/LayerTree::Config(), /*frame_size=*/SkISize()); - auto layer_tree_item = std::make_unique( - std::move(layer_tree), CreateFinishedBuildRecorder(first_timestamp), - kDevicePixelRatio); + auto layer_tree_item = std::make_unique( + SingleLayerTreeList(kImplicitViewId, std::move(layer_tree), + kDevicePixelRatio), + CreateFinishedBuildRecorder(first_timestamp)); PipelineProduceResult result = pipeline->Produce().Complete(std::move(layer_tree_item)); EXPECT_TRUE(result.success); diff --git a/shell/common/shell.cc b/shell/common/shell.cc index 82db9dea4ff64..44e5d2a65e110 100644 --- a/shell/common/shell.cc +++ b/shell/common/shell.cc @@ -1220,16 +1220,16 @@ void Shell::OnAnimatorUpdateLatestFrameTargetTime( } // |Animator::Delegate| -void Shell::OnAnimatorDraw(std::shared_ptr pipeline) { +void Shell::OnAnimatorDraw(std::shared_ptr pipeline) { FML_DCHECK(is_set_up_); task_runners_.GetRasterTaskRunner()->PostTask(fml::MakeCopyable( [&waiting_for_first_frame = waiting_for_first_frame_, &waiting_for_first_frame_condition = waiting_for_first_frame_condition_, rasterizer = rasterizer_->GetWeakPtr(), - weak_pipeline = std::weak_ptr(pipeline)]() mutable { + weak_pipeline = std::weak_ptr(pipeline)]() mutable { if (rasterizer) { - std::shared_ptr pipeline = weak_pipeline.lock(); + std::shared_ptr pipeline = weak_pipeline.lock(); if (pipeline) { rasterizer->Draw(pipeline); } @@ -1243,7 +1243,7 @@ void Shell::OnAnimatorDraw(std::shared_ptr pipeline) { } // |Animator::Delegate| -void Shell::OnAnimatorDrawLastLayerTree( +void Shell::OnAnimatorDrawLastLayerTrees( std::unique_ptr frame_timings_recorder) { FML_DCHECK(is_set_up_); @@ -1251,7 +1251,7 @@ void Shell::OnAnimatorDrawLastLayerTree( [rasterizer = rasterizer_->GetWeakPtr(), frame_timings_recorder = std::move(frame_timings_recorder)]() mutable { if (rasterizer) { - rasterizer->DrawLastLayerTree(std::move(frame_timings_recorder)); + rasterizer->DrawLastLayerTrees(std::move(frame_timings_recorder)); } }); @@ -1971,7 +1971,8 @@ bool Shell::OnServiceProtocolRenderFrameWithRasterStats( // TODO(dkwingsmt): This method only handles view #0, including the snapshot // and the frame size. We need to adapt this method to multi-view. // https://github.com/flutter/flutter/issues/131892 - if (auto last_layer_tree = rasterizer_->GetLastLayerTree()) { + int64_t view_id = kFlutterImplicitViewId; + if (auto last_layer_tree = rasterizer_->GetLastLayerTree(view_id)) { auto& allocator = response->GetAllocator(); response->SetObject(); response->AddMember("type", "RenderFrameWithRasterStats", allocator); @@ -1986,7 +1987,7 @@ bool Shell::OnServiceProtocolRenderFrameWithRasterStats( frame_timings_recorder->RecordBuildEnd(now); last_layer_tree->enable_leaf_layer_tracing(true); - rasterizer_->DrawLastLayerTree(std::move(frame_timings_recorder)); + rasterizer_->DrawLastLayerTrees(std::move(frame_timings_recorder)); last_layer_tree->enable_leaf_layer_tracing(false); rapidjson::Value snapshots; @@ -2002,7 +2003,7 @@ bool Shell::OnServiceProtocolRenderFrameWithRasterStats( response->AddMember("snapshots", snapshots, allocator); - const auto& frame_size = ExpectedFrameSize(kFlutterImplicitViewId); + const auto& frame_size = ExpectedFrameSize(view_id); response->AddMember("frame_width", frame_size.width(), allocator); response->AddMember("frame_height", frame_size.height(), allocator); diff --git a/shell/common/shell.h b/shell/common/shell.h index d3bb7f0bd620c..133fecc4d0f43 100644 --- a/shell/common/shell.h +++ b/shell/common/shell.h @@ -650,10 +650,10 @@ class Shell final : public PlatformView::Delegate, fml::TimePoint frame_target_time) override; // |Animator::Delegate| - void OnAnimatorDraw(std::shared_ptr pipeline) override; + void OnAnimatorDraw(std::shared_ptr pipeline) override; // |Animator::Delegate| - void OnAnimatorDrawLastLayerTree( + void OnAnimatorDrawLastLayerTrees( std::unique_ptr frame_timings_recorder) override; // |Engine::Delegate| diff --git a/shell/common/shell_unittests.cc b/shell/common/shell_unittests.cc index 2371fa9113aa7..f899d5c5ede97 100644 --- a/shell/common/shell_unittests.cc +++ b/shell/common/shell_unittests.cc @@ -310,30 +310,26 @@ static bool ValidateShell(Shell* shell) { return true; } -static bool RasterizerHasLayerTree(Shell* shell) { +static bool RasterizerIsTornDown(Shell* shell) { fml::AutoResetWaitableEvent latch; - bool has_layer_tree = false; + bool is_torn_down = false; fml::TaskRunner::RunNowOrPostTask( shell->GetTaskRunners().GetRasterTaskRunner(), - [shell, &latch, &has_layer_tree]() { - has_layer_tree = shell->GetRasterizer()->GetLastLayerTree() != nullptr; + [shell, &latch, &is_torn_down]() { + is_torn_down = shell->GetRasterizer()->IsTornDown(); latch.Signal(); }); latch.Wait(); - return has_layer_tree; + return is_torn_down; } static void ValidateDestroyPlatformView(Shell* shell) { ASSERT_TRUE(shell != nullptr); ASSERT_TRUE(shell->IsSetup()); - // To validate destroy platform view, we must ensure the rasterizer has a - // layer tree before the platform view is destroyed. - ASSERT_TRUE(RasterizerHasLayerTree(shell)); - + ASSERT_FALSE(RasterizerIsTornDown(shell)); ShellTest::PlatformViewNotifyDestroyed(shell); - // Validate the layer tree is destroyed - ASSERT_FALSE(RasterizerHasLayerTree(shell)); + ASSERT_TRUE(RasterizerIsTornDown(shell)); } static std::string CreateFlagsString(std::vector& flags) { From a32ffc23b21f3cf7c4bd4c77419d802c21cbffcc Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 29 Sep 2023 18:49:52 -0400 Subject: [PATCH 385/859] Roll Fuchsia Linux SDK from vbw3Gwj-6eN7rSqb4... to U0lgvzao-MdzfEvoT... (#46424) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index a2a0feb88887d..e25c3dc352cd9 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'vbw3Gwj-6eN7rSqb4Vr1B7xwLqxAr-xRKPqVeFzcDfkC' + 'version': 'U0lgvzao-MdzfEvoTk7uXH2Dkc-1RGRfcDSEXVWJe-oC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', From e8f8a8456ace76ea2502664f3eea3fb20dc34fb2 Mon Sep 17 00:00:00 2001 From: Casey Hillers Date: Fri, 29 Sep 2023 15:56:07 -0700 Subject: [PATCH 386/859] Disable enableHardwareBufferRenderingTarget (#46425) * Causing flickering in web views * Follow up of cl/569435819 for Google to unblock the rolls --- .../io/flutter/plugin/platform/PlatformViewsController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java b/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java index 0e7ad70aee29d..b5559a3a9e23a 100644 --- a/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java +++ b/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java @@ -147,7 +147,7 @@ public class PlatformViewsController implements PlatformViewsAccessibilityDelega // Whether software rendering is used. private boolean usesSoftwareRendering = false; - private static boolean enableHardwareBufferRenderingTarget = true; + private static boolean enableHardwareBufferRenderingTarget = false; private final PlatformViewsChannel.PlatformViewsHandler channelHandler = new PlatformViewsChannel.PlatformViewsHandler() { From 7e9b8ce8feb88d09775bf0a29fd967c46dff0d4e Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 29 Sep 2023 20:18:05 -0400 Subject: [PATCH 387/859] Roll Fuchsia Mac SDK from mR_mhiacGiD-ObsoG... to vSGsxh_81aaf5CdfW... (#46427) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index e25c3dc352cd9..bd9928aefa227 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'mR_mhiacGiD-ObsoGowsGOUk-oAV9_nF3T0cqej6BZsC' + 'version': 'vSGsxh_81aaf5CdfWc9Hapq2EEMypPerrvWMDBoWK58C' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 14afacf81c68a78ee780c5df5b6196be2e3f2940 Mon Sep 17 00:00:00 2001 From: John McCutchan Date: Fri, 29 Sep 2023 17:33:33 -0700 Subject: [PATCH 388/859] Add an AndroidManifest.xml flag to disable ImageReader backed Platform Views (#46430) An internal customer is seeing flickering on some high FPS phones. While we try and reproduce / gain more knowledge of this problem this PR adds a AndroidManifest.xml flag to disable their usage. The boolean flag is: ``` "io.flutter.embedding.android.DisableImageReaderPlatformViews" ``` Adding the following to your manifest will disable their usage: ``` ``` --- common/settings.h | 3 +++ shell/common/switches.cc | 11 +++++++++++ shell/common/switches.h | 3 +++ shell/common/switches_unittests.cc | 19 +++++++++++++++++++ .../embedding/engine/FlutterEngine.java | 2 ++ .../flutter/embedding/engine/FlutterJNI.java | 11 +++++++++++ .../embedding/engine/FlutterShellArgs.java | 8 ++++++++ .../engine/loader/FlutterLoader.java | 5 +++++ .../platform/PlatformViewsController.java | 6 ++++++ .../android/platform_view_android_jni_impl.cc | 10 ++++++++++ 10 files changed, 78 insertions(+) diff --git a/common/settings.h b/common/settings.h index eb07585a33fb0..af002c93006c4 100644 --- a/common/settings.h +++ b/common/settings.h @@ -218,6 +218,9 @@ struct Settings { bool enable_impeller = false; #endif + // Indicates if image reader backed platform views are disabled. + bool disable_image_reader_platform_views = false; + // Requests a particular backend to be used (ex "opengles" or "vulkan") std::optional impeller_backend; diff --git a/shell/common/switches.cc b/shell/common/switches.cc index f9cbb548cc0f5..655742109ae0b 100644 --- a/shell/common/switches.cc +++ b/shell/common/switches.cc @@ -455,6 +455,17 @@ Settings SettingsFromCommandLine(const fml::CommandLine& command_line) { } } + { + std::string disable_image_reader_platform_views_value; + if (command_line.GetOptionValue( + FlagForSwitch(Switch::DisableImageReaderPlatformViews), + &disable_image_reader_platform_views_value)) { + settings.disable_image_reader_platform_views = + disable_image_reader_platform_views_value.empty() || + "true" == disable_image_reader_platform_views_value; + } + } + { std::string impeller_backend_value; if (command_line.GetOptionValue(FlagForSwitch(Switch::ImpellerBackend), diff --git a/shell/common/switches.h b/shell/common/switches.h index 7dd04fc7e12e4..c6048705f3121 100644 --- a/shell/common/switches.h +++ b/shell/common/switches.h @@ -280,6 +280,9 @@ DEF_SWITCH(LeakVM, "When the last shell shuts down, the shared VM is leaked by default " "(the leak_vm in VM settings is true). To clean up the leak VM, set " "this value to false.") +DEF_SWITCH(DisableImageReaderPlatformViews, + "disable-image-reader-platform-views", + "Disables the use of ImageReader backed Platform Views on Android.") DEF_SWITCH( MsaaSamples, "msaa-samples", diff --git a/shell/common/switches_unittests.cc b/shell/common/switches_unittests.cc index 617c0a891cfa7..dc80e87a93b5d 100644 --- a/shell/common/switches_unittests.cc +++ b/shell/common/switches_unittests.cc @@ -123,6 +123,25 @@ TEST(SwitchesTest, NoEnableImpeller) { } } +TEST(SwitchesTest, DisableImageReaderPlatformViews) { + { + // enable + fml::CommandLine command_line = fml::CommandLineFromInitializerList( + {"command", "--disable-image-reader-platform-views"}); + EXPECT_TRUE(command_line.HasOption("disable-image-reader-platform-views")); + Settings settings = SettingsFromCommandLine(command_line); + EXPECT_EQ(settings.disable_image_reader_platform_views, true); + } + { + // disable + fml::CommandLine command_line = fml::CommandLineFromInitializerList( + {"command", "--disable-image-reader-platform-views=false"}); + EXPECT_TRUE(command_line.HasOption("disable-image-reader-platform-views")); + Settings settings = SettingsFromCommandLine(command_line); + EXPECT_EQ(settings.disable_image_reader_platform_views, false); + } +} + } // namespace testing } // namespace flutter diff --git a/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java b/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java index a3a463be04553..2bfa379f39c1e 100644 --- a/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java +++ b/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java @@ -367,6 +367,8 @@ public FlutterEngine( this.renderer = new FlutterRenderer(flutterJNI); this.platformViewsController = platformViewsController; + this.platformViewsController.setDisableImageReaderPlatformViews( + flutterJNI.getDisableImageReaderPlatformViews()); this.platformViewsController.onAttachedToJNI(); this.pluginRegistry = diff --git a/shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java b/shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java index 1d66eeff9dc45..e4337e97b637d 100644 --- a/shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java +++ b/shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java @@ -237,6 +237,17 @@ public boolean getIsSoftwareRenderingEnabled() { return nativeGetIsSoftwareRenderingEnabled(); } + private native boolean nativeGetDisableImageReaderPlatformViews(); + + /** + * Checks launch settings for whether image reader platform views are disabled. + * + *

The value is the same per program. + */ + @UiThread + public boolean getDisableImageReaderPlatformViews() { + return nativeGetDisableImageReaderPlatformViews(); + } /** * VM Service URI for the VM instance. * diff --git a/shell/platform/android/io/flutter/embedding/engine/FlutterShellArgs.java b/shell/platform/android/io/flutter/embedding/engine/FlutterShellArgs.java index b3775217a86fe..b1b6bc139a7fc 100644 --- a/shell/platform/android/io/flutter/embedding/engine/FlutterShellArgs.java +++ b/shell/platform/android/io/flutter/embedding/engine/FlutterShellArgs.java @@ -20,6 +20,7 @@ */ @SuppressWarnings({"WeakerAccess", "unused"}) public class FlutterShellArgs { + private static final String TAG = "FlutterShellArgs"; public static final String ARG_KEY_TRACE_STARTUP = "trace-startup"; public static final String ARG_TRACE_STARTUP = "--trace-startup"; public static final String ARG_KEY_START_PAUSED = "start-paused"; @@ -38,6 +39,10 @@ public class FlutterShellArgs { public static final String ARG_SKIA_DETERMINISTIC_RENDERING = "--skia-deterministic-rendering"; public static final String ARG_KEY_TRACE_SKIA = "trace-skia"; public static final String ARG_TRACE_SKIA = "--trace-skia"; + public static final String ARG_KEY_DISABLE_IMAGE_READER_PLATFORM_VIEWS = + "disable-image-reader-platform-views"; + public static final String ARG_DISABLE_IMAGE_READER_PLATFORM_VIEWS = + "--disable-image-reader-platform-views"; public static final String ARG_KEY_TRACE_SKIA_ALLOWLIST = "trace-skia-allowlist"; public static final String ARG_TRACE_SKIA_ALLOWLIST = "--trace-skia-allowlist="; public static final String ARG_KEY_TRACE_SYSTRACE = "trace-systrace"; @@ -128,6 +133,9 @@ public static FlutterShellArgs fromIntent(@NonNull Intent intent) { if (intent.getBooleanExtra(ARG_KEY_ENABLE_IMPELLER, false)) { args.add(ARG_ENABLE_IMPELLER); } + if (intent.getBooleanExtra(ARG_KEY_DISABLE_IMAGE_READER_PLATFORM_VIEWS, false)) { + args.add(ARG_DISABLE_IMAGE_READER_PLATFORM_VIEWS); + } if (intent.getBooleanExtra(ARG_KEY_ENABLE_VULKAN_VALIDATION, false)) { args.add(ARG_ENABLE_VULKAN_VALIDATION); } diff --git a/shell/platform/android/io/flutter/embedding/engine/loader/FlutterLoader.java b/shell/platform/android/io/flutter/embedding/engine/loader/FlutterLoader.java index 2b880ba3e9883..da114ae3978d7 100644 --- a/shell/platform/android/io/flutter/embedding/engine/loader/FlutterLoader.java +++ b/shell/platform/android/io/flutter/embedding/engine/loader/FlutterLoader.java @@ -45,6 +45,8 @@ public class FlutterLoader { "io.flutter.embedding.android.EnableVulkanValidation"; private static final String IMPELLER_BACKEND_META_DATA_KEY = "io.flutter.embedding.android.ImpellerBackend"; + private static final String DISABLE_IMAGE_READER_PLATFORM_VIEWS_KEY = + "io.flutter.embedding.android.DisableImageReaderPlatformViews"; /** * Set whether leave or clean up the VM after the last shell shuts down. It can be set from app's @@ -331,6 +333,9 @@ public void ensureInitializationComplete( if (metaData.getBoolean(ENABLE_IMPELLER_META_DATA_KEY, false)) { shellArgs.add("--enable-impeller"); } + if (metaData.getBoolean(DISABLE_IMAGE_READER_PLATFORM_VIEWS_KEY, false)) { + shellArgs.add("--disable-image-reader-platform-views"); + } if (metaData.getBoolean( ENABLE_VULKAN_VALIDATION_META_DATA_KEY, areValidationLayersOnByDefault())) { shellArgs.add("--enable-vulkan-validation"); diff --git a/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java b/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java index b5559a3a9e23a..e2e87b57c1bdd 100644 --- a/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java +++ b/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java @@ -773,6 +773,10 @@ public void setSoftwareRendering(boolean useSoftwareRendering) { usesSoftwareRendering = useSoftwareRendering; } + public void setDisableImageReaderPlatformViews(boolean disableImageReaderPlatformViews) { + enableHardwareBufferRenderingTarget = !disableImageReaderPlatformViews; + } + /** * Detaches this platform views controller. * @@ -972,9 +976,11 @@ private static PlatformViewRenderTarget makePlatformViewRenderTarget( TextureRegistry textureRegistry) { if (enableHardwareBufferRenderingTarget && Build.VERSION.SDK_INT >= 29) { final TextureRegistry.ImageTextureEntry textureEntry = textureRegistry.createImageTexture(); + Log.i(TAG, "PlatformView is using ImageReader backend"); return new ImageReaderPlatformViewRenderTarget(textureEntry); } final TextureRegistry.SurfaceTextureEntry textureEntry = textureRegistry.createSurfaceTexture(); + Log.i(TAG, "PlatformView is using SurfaceTexture backend"); return new SurfaceTexturePlatformViewRenderTarget(textureEntry); } diff --git a/shell/platform/android/platform_view_android_jni_impl.cc b/shell/platform/android/platform_view_android_jni_impl.cc index aefb58e6a1da0..43a2f63fa378c 100644 --- a/shell/platform/android/platform_view_android_jni_impl.cc +++ b/shell/platform/android/platform_view_android_jni_impl.cc @@ -483,6 +483,11 @@ static jboolean GetIsSoftwareRendering(JNIEnv* env, jobject jcaller) { return FlutterMain::Get().GetSettings().enable_software_rendering; } +static jboolean GetDisableImageReaderPlatformViews(JNIEnv* env, + jobject jcaller) { + return FlutterMain::Get().GetSettings().disable_image_reader_platform_views; +} + static void RegisterTexture(JNIEnv* env, jobject jcaller, jlong shell_holder, @@ -778,6 +783,11 @@ bool RegisterApi(JNIEnv* env) { .signature = "()Z", .fnPtr = reinterpret_cast(&GetIsSoftwareRendering), }, + { + .name = "nativeGetDisableImageReaderPlatformViews", + .signature = "()Z", + .fnPtr = reinterpret_cast(&GetDisableImageReaderPlatformViews), + }, { .name = "nativeRegisterTexture", .signature = "(JJLjava/lang/ref/" From 0827db8094de5bbbefa23db8b230c6cbd4f21823 Mon Sep 17 00:00:00 2001 From: gaaclarke <30870216+gaaclarke@users.noreply.github.com> Date: Fri, 29 Sep 2023 18:00:38 -0700 Subject: [PATCH 389/859] [Impeller] fixed subpass filter coverage with image filters (#46431) fixes: https://github.com/flutter/flutter/issues/135777 fixes: https://github.com/flutter/flutter/issues/135766 fixes: https://github.com/flutter/flutter/issues/135212 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I signed the [CLA]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat --- impeller/aiks/aiks_unittests.cc | 19 +++++++++++++++++++ impeller/entity/entity_pass.cc | 4 ++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/impeller/aiks/aiks_unittests.cc b/impeller/aiks/aiks_unittests.cc index 849cf648b1f8e..a4d7cdaff2c0f 100644 --- a/impeller/aiks/aiks_unittests.cc +++ b/impeller/aiks/aiks_unittests.cc @@ -3590,6 +3590,25 @@ TEST_P(AiksTest, ClearBlend) { clear.blend_mode = BlendMode::kClear; canvas.DrawCircle(Point::MakeXY(300.0, 300.0), 200.0, clear); +} + +TEST_P(AiksTest, MatrixImageFilterMagnify) { + Canvas canvas; + canvas.Scale(GetContentScale()); + auto image = std::make_shared(CreateTextureForFixture("airplane.jpg")); + canvas.Translate({600, -200}); + canvas.SaveLayer({ + .image_filter = std::make_shared( + Matrix{ + 2, 0, 0, 0, // + 0, 2, 0, 0, // + 0, 0, 2, 0, // + 0, 0, 0, 1 // + }, + SamplerDescriptor{}), + }); + canvas.DrawImage(image, {0, 0}, Paint{.color = Color(1.0, 1.0, 1.0, 0.5)}); + canvas.Restore(); ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); } diff --git a/impeller/entity/entity_pass.cc b/impeller/entity/entity_pass.cc index 0d91112369ae7..bc312cd6bcb1a 100644 --- a/impeller/entity/entity_pass.cc +++ b/impeller/entity/entity_pass.cc @@ -202,8 +202,8 @@ std::optional EntityPass::GetSubpassCoverage( // has deviated too much from the parent pass to safely intersect with the // pass coverage limit. coverage_limit = - (image_filter && image_filter->IsTranslationOnly() ? std::nullopt - : coverage_limit); + (image_filter && !image_filter->IsTranslationOnly() ? std::nullopt + : coverage_limit); auto entities_coverage = subpass.GetElementsCoverage(coverage_limit); // The entities don't cover anything. There is nothing to do. From 38c94d48c09e170835c185d171302e04d23ffc52 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 29 Sep 2023 21:27:03 -0400 Subject: [PATCH 390/859] Roll Dart SDK from 0931bb8a43c8 to 9aca08d40398 (1 revision) (#46432) https://dart.googlesource.com/sdk.git/+log/0931bb8a43c8..9aca08d40398 2023-09-30 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-217.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jacksongardner@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index bd9928aefa227..5c049809670d8 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '0931bb8a43c820f337abbb4d39ffa0fa974812fc', + 'dart_revision': '9aca08d40398186ee4533e0d7b62b2a3ab6283ef', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index b7b3f95554684..ea0545ace71f9 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: 8bdd1f0ace0c7446a3eb2b03933aeb32 +Signature: 8ea9728707a99334f879db79627b0dc2 ==================================================================================================== LIBRARY: dart From 7b463055d286292afb2a2e46a87d8e1c14e940e2 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Fri, 29 Sep 2023 18:53:23 -0700 Subject: [PATCH 391/859] [Impeller] Apply the transform to PointFieldGeometry coverage (#46428) Fixes https://github.com/flutter/flutter/issues/134068 --- impeller/entity/entity_unittests.cc | 8 ++++++++ impeller/entity/geometry/point_field_geometry.cc | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/impeller/entity/entity_unittests.cc b/impeller/entity/entity_unittests.cc index c76ece221dbd8..ca094aa0fe54f 100644 --- a/impeller/entity/entity_unittests.cc +++ b/impeller/entity/entity_unittests.cc @@ -2417,6 +2417,14 @@ TEST_P(EntityTest, PointFieldGeometryDivisions) { ASSERT_EQ(PointFieldGeometry::ComputeCircleDivisions(20000.0, true), 140u); } +TEST_P(EntityTest, PointFieldGeometryCoverage) { + std::vector points = {{10, 20}, {100, 200}}; + auto geometry = Geometry::MakePointField(points, 5.0, false); + ASSERT_EQ(*geometry->GetCoverage(Matrix()), Rect::MakeLTRB(5, 15, 105, 205)); + ASSERT_EQ(*geometry->GetCoverage(Matrix::MakeTranslation({30, 0, 0})), + Rect::MakeLTRB(35, 15, 135, 205)); +} + TEST_P(EntityTest, ColorFilterContentsWithLargeGeometry) { Entity entity; entity.SetTransformation(Matrix::MakeScale(GetContentScale())); diff --git a/impeller/entity/geometry/point_field_geometry.cc b/impeller/entity/geometry/point_field_geometry.cc index 81fe3885d916b..9821bad91ad7b 100644 --- a/impeller/entity/geometry/point_field_geometry.cc +++ b/impeller/entity/geometry/point_field_geometry.cc @@ -287,8 +287,9 @@ std::optional PointFieldGeometry::GetCoverage( right = std::max(right, it->x); bottom = std::max(bottom, it->y); } - return Rect::MakeLTRB(left - radius_, top - radius_, right + radius_, - bottom + radius_); + auto coverage = Rect::MakeLTRB(left - radius_, top - radius_, + right + radius_, bottom + radius_); + return coverage.TransformBounds(transform); } return std::nullopt; } From 69d1a319b5dd3527fa1f59e4fb31b8dbacf58207 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 30 Sep 2023 01:28:33 -0400 Subject: [PATCH 392/859] Roll Dart SDK from 9aca08d40398 to 4574906880c1 (1 revision) (#46435) https://dart.googlesource.com/sdk.git/+log/9aca08d40398..4574906880c1 2023-09-30 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-218.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jacksongardner@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 5c049809670d8..16bbcc69bdca2 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '9aca08d40398186ee4533e0d7b62b2a3ab6283ef', + 'dart_revision': '4574906880c1aad311e8153ef612c94d27e1add1', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index ea0545ace71f9..de020f2040d43 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: 8ea9728707a99334f879db79627b0dc2 +Signature: bb5b5af01a6378a3c134c7bbe6270f40 ==================================================================================================== LIBRARY: dart From 64f3dec6a240ed6564ee6a562430a1520f80a7a8 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 30 Sep 2023 03:38:34 -0400 Subject: [PATCH 393/859] Roll Skia from a063eaeaf1e0 to 20a431090e24 (1 revision) (#46436) https://skia.googlesource.com/skia.git/+log/a063eaeaf1e0..20a431090e24 2023-09-30 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 8ac5d8e1a9fe to 285e37076672 (10 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,bungeman@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 16bbcc69bdca2..7db6cfc16126f 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'a063eaeaf1e09e4d6f42e0f44a5723622a46d21c', + 'skia_revision': '20a431090e24b620c32b8389d3a183f34cfc8c8c', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 9e1fbf12b631d3d98f872b2525ce2ff36542f56a Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 30 Sep 2023 07:38:38 -0400 Subject: [PATCH 394/859] Roll Fuchsia Linux SDK from U0lgvzao-MdzfEvoT... to ZDxyy9-hcaVyv65as... (#46437) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/excluded_files | 3 +++ ci/licenses_golden/licenses_fuchsia | 8 +++++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 7db6cfc16126f..b5944e7ed6189 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'U0lgvzao-MdzfEvoTk7uXH2Dkc-1RGRfcDSEXVWJe-oC' + 'version': 'ZDxyy9-hcaVyv65asxhtfwtXtfyaZYBqjH6MJML32U0C' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/excluded_files b/ci/licenses_golden/excluded_files index eb856b479e043..a1a02cd2ee787 100644 --- a/ci/licenses_golden/excluded_files +++ b/ci/licenses_golden/excluded_files @@ -472,6 +472,9 @@ ../../../fuchsia/sdk/linux/arch/riscv64/sysroot/dist/lib/ld.so.1 ../../../fuchsia/sdk/linux/arch/x64/sysroot/dist/lib/asan/ld.so.1 ../../../fuchsia/sdk/linux/arch/x64/sysroot/dist/lib/ld.so.1 +../../../fuchsia/sdk/linux/bind/fuchsia.arm.platform/meta.json +../../../fuchsia/sdk/linux/bind/fuchsia.platform/meta.json +../../../fuchsia/sdk/linux/bind/fuchsia/meta.json ../../../fuchsia/sdk/linux/dart/sl4f/meta.json ../../../fuchsia/sdk/linux/data/config/symbol_index/meta.json ../../../fuchsia/sdk/linux/docs diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index 7e8f208cf612f..843b6d0682aa9 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: 2f15626dca5f8554954a67155eeff57e +Signature: e3242778b09e2c82476696df61543ba7 ==================================================================================================== LIBRARY: fuchsia_sdk @@ -2447,6 +2447,7 @@ ORIGIN: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/lookup.h + .. ORIGIN: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/clock.h + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/scheduler.h + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/utc.h + ../../../fuchsia/sdk/linux/LICENSE +ORIGIN: ../../../fuchsia/sdk/linux/bind/fuchsia.platform/fuchsia.platform.bind + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/dart/sl4f/lib/sl4f.dart + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/dart/sl4f/lib/src/audio.dart + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/dart/sl4f/lib/src/device_log.dart + ../../../fuchsia/sdk/linux/LICENSE @@ -2745,6 +2746,7 @@ FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/lookup.h FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/clock.h FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/scheduler.h FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/utc.h +FILE: ../../../fuchsia/sdk/linux/bind/fuchsia.platform/fuchsia.platform.bind FILE: ../../../fuchsia/sdk/linux/dart/sl4f/lib/sl4f.dart FILE: ../../../fuchsia/sdk/linux/dart/sl4f/lib/src/audio.dart FILE: ../../../fuchsia/sdk/linux/dart/sl4f/lib/src/device_log.dart @@ -3065,6 +3067,7 @@ ORIGIN: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/boot/crash-re ORIGIN: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/string_view.h + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls-next.h + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/testonly-syscalls.h + ../../../fuchsia/sdk/linux/LICENSE +ORIGIN: ../../../fuchsia/sdk/linux/bind/fuchsia.arm.platform/fuchsia.arm.platform.bind + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/dart/sl4f/lib/src/component.dart + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/dart/sl4f/lib/src/device.dart + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/dart/sl4f/lib/src/diagnostics.dart + ../../../fuchsia/sdk/linux/LICENSE @@ -3239,6 +3242,7 @@ FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/boot/crash-reas FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/string_view.h FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls-next.h FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/testonly-syscalls.h +FILE: ../../../fuchsia/sdk/linux/bind/fuchsia.arm.platform/fuchsia.arm.platform.bind FILE: ../../../fuchsia/sdk/linux/dart/sl4f/lib/src/component.dart FILE: ../../../fuchsia/sdk/linux/dart/sl4f/lib/src/device.dart FILE: ../../../fuchsia/sdk/linux/dart/sl4f/lib/src/diagnostics.dart @@ -3756,6 +3760,7 @@ ORIGIN: ../../../fuchsia/sdk/linux/arch/riscv64/sysroot/include/zircon/errors.h ORIGIN: ../../../fuchsia/sdk/linux/arch/riscv64/sysroot/include/zircon/syscalls/internal/cdecls.inc + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/errors.h + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/internal/cdecls.inc + ../../../fuchsia/sdk/linux/LICENSE +ORIGIN: ../../../fuchsia/sdk/linux/bind/fuchsia/fuchsia.bind + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/dart/sl4f/lib/src/performance_publish.dart + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/dart/sl4f/lib/src/trace_processing/metrics/power_metrics.dart + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/fidl/fuchsia.accessibility.semantics/overview.fidl + ../../../fuchsia/sdk/linux/LICENSE @@ -4012,6 +4017,7 @@ FILE: ../../../fuchsia/sdk/linux/arch/riscv64/sysroot/include/zircon/errors.h FILE: ../../../fuchsia/sdk/linux/arch/riscv64/sysroot/include/zircon/syscalls/internal/cdecls.inc FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/errors.h FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/internal/cdecls.inc +FILE: ../../../fuchsia/sdk/linux/bind/fuchsia/fuchsia.bind FILE: ../../../fuchsia/sdk/linux/dart/sl4f/lib/src/performance_publish.dart FILE: ../../../fuchsia/sdk/linux/dart/sl4f/lib/src/trace_processing/metrics/power_metrics.dart FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.accessibility.semantics/overview.fidl From f4be41a32373de587ee97a17d54364daa9eb098b Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 30 Sep 2023 08:52:56 -0400 Subject: [PATCH 395/859] Roll Fuchsia Mac SDK from vSGsxh_81aaf5CdfW... to DEmzJ6vnZAAUzsm81... (#46438) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index b5944e7ed6189..2d728097ffe9d 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'vSGsxh_81aaf5CdfWc9Hapq2EEMypPerrvWMDBoWK58C' + 'version': 'DEmzJ6vnZAAUzsm81jmaUsqGdiXWCGSNaoEQ7NKl-yUC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 495efa33b4feda1a4f3103a8e0d9bfd69f4aa372 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 30 Sep 2023 09:22:35 -0400 Subject: [PATCH 396/859] Roll Dart SDK from 4574906880c1 to c4e955c13ed5 (1 revision) (#46439) https://dart.googlesource.com/sdk.git/+log/4574906880c1..c4e955c13ed5 2023-09-30 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-219.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jacksongardner@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/excluded_files | 1 + ci/licenses_golden/licenses_dart | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 2d728097ffe9d..d045c4028be4a 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '4574906880c1aad311e8153ef612c94d27e1add1', + 'dart_revision': 'c4e955c13ed56b7c774973e28e772d17d8624d2f', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/excluded_files b/ci/licenses_golden/excluded_files index a1a02cd2ee787..b4d58de3f1185 100644 --- a/ci/licenses_golden/excluded_files +++ b/ci/licenses_golden/excluded_files @@ -1664,6 +1664,7 @@ ../../../third_party/dart/runtime/vm/compiler/assembler/assembler_ia32_test.cc ../../../third_party/dart/runtime/vm/compiler/assembler/assembler_riscv_test.cc ../../../third_party/dart/runtime/vm/compiler/assembler/assembler_test.cc +../../../third_party/dart/runtime/vm/compiler/assembler/assembler_test.h ../../../third_party/dart/runtime/vm/compiler/assembler/assembler_x64_test.cc ../../../third_party/dart/runtime/vm/compiler/assembler/disassembler_test.cc ../../../third_party/dart/runtime/vm/compiler/backend/bce_test.cc diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index de020f2040d43..a8baa2faf8a3e 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: bb5b5af01a6378a3c134c7bbe6270f40 +Signature: 8c54b29320d3f4e18d8477c31abd3aa4 ==================================================================================================== LIBRARY: dart From 5f616e061ab17ff984c4f3fa9f372ef7aba5f324 Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Sat, 30 Sep 2023 09:43:58 -0700 Subject: [PATCH 397/859] [Impeller] Make some Open GL errors non-fatal, check in debug mode (not unopt). (#46434) Closes https://github.com/flutter/flutter/issues/135767. --- impeller/BUILD.gn | 4 ---- .../renderer/backend/gles/proc_table_gles.cc | 14 +++++++++++++ .../renderer/backend/gles/proc_table_gles.h | 20 ++++++++++++++----- impeller/tools/impeller.gni | 3 --- 4 files changed, 29 insertions(+), 12 deletions(-) diff --git a/impeller/BUILD.gn b/impeller/BUILD.gn index 4e9707f467984..c89a89f7f34ea 100644 --- a/impeller/BUILD.gn +++ b/impeller/BUILD.gn @@ -38,10 +38,6 @@ config("impeller_public_config") { defines += [ "IMPELLER_TRACE_ALL_GL_CALLS" ] } - if (impeller_error_check_all_gl_calls) { - defines += [ "IMPELLER_ERROR_CHECK_ALL_GL_CALLS" ] - } - if (is_win) { defines += [ # TODO(dnfield): https://github.com/flutter/flutter/issues/50053 diff --git a/impeller/renderer/backend/gles/proc_table_gles.cc b/impeller/renderer/backend/gles/proc_table_gles.cc index b3c8a8ff434f4..5a5212ad4c9e7 100644 --- a/impeller/renderer/backend/gles/proc_table_gles.cc +++ b/impeller/renderer/backend/gles/proc_table_gles.cc @@ -32,6 +32,20 @@ const char* GLErrorToString(GLenum value) { return "Unknown."; } +bool GLErrorIsFatal(GLenum value) { + switch (value) { + case GL_NO_ERROR: + return false; + case GL_INVALID_ENUM: + case GL_INVALID_VALUE: + case GL_INVALID_OPERATION: + case GL_INVALID_FRAMEBUFFER_OPERATION: + case GL_OUT_OF_MEMORY: + return true; + } + return false; +} + ProcTableGLES::Resolver WrappedResolver( const ProcTableGLES::Resolver& resolver) { return [resolver](const char* function_name) -> void* { diff --git a/impeller/renderer/backend/gles/proc_table_gles.h b/impeller/renderer/backend/gles/proc_table_gles.h index eac2b77e59bb1..b9b22d3187b2d 100644 --- a/impeller/renderer/backend/gles/proc_table_gles.h +++ b/impeller/renderer/backend/gles/proc_table_gles.h @@ -17,6 +17,7 @@ namespace impeller { const char* GLErrorToString(GLenum value); +bool GLErrorIsFatal(GLenum value); struct AutoErrorCheck { const PFNGLGETERRORPROC error_fn; @@ -28,9 +29,18 @@ struct AutoErrorCheck { ~AutoErrorCheck() { if (error_fn) { auto error = error_fn(); - FML_CHECK(error == GL_NO_ERROR) - << "GL Error " << GLErrorToString(error) << "(" << error << ")" - << " encountered on call to " << name; + if (error == GL_NO_ERROR) { + return; + } + if (GLErrorIsFatal(error)) { + FML_LOG(FATAL) << "Fatal GL Error " << GLErrorToString(error) << "(" + << error << ")" + << " encountered on call to " << name; + } else { + FML_LOG(ERROR) << "GL Error " << GLErrorToString(error) << "(" << error + << ")" + << " encountered on call to " << name; + } } } }; @@ -63,9 +73,9 @@ struct GLProc { /// template auto operator()(Args&&... args) const { -#ifdef IMPELLER_ERROR_CHECK_ALL_GL_CALLS +#ifdef IMPELLER_DEBUG AutoErrorCheck error(error_fn, name); -#endif // IMPELLER_ERROR_CHECK_ALL_GL_CALLS +#endif // IMPELLER_DEBUG #ifdef IMPELLER_TRACE_ALL_GL_CALLS TRACE_EVENT0("impeller", name); #endif // IMPELLER_TRACE_ALL_GL_CALLS diff --git a/impeller/tools/impeller.gni b/impeller/tools/impeller.gni index 65b1f56254e28..4ec7119240273 100644 --- a/impeller/tools/impeller.gni +++ b/impeller/tools/impeller.gni @@ -39,9 +39,6 @@ declare_args() { # overhead may be substantial, this is not enabled by default. impeller_trace_all_gl_calls = false - # Call glGetError after each OpenGL call and log failures. - impeller_error_check_all_gl_calls = is_debug - # Enable experimental 3D scene rendering. impeller_enable_3d = false From d28172f1e9e3e61164b6ad0f2d9365ba029b8ae8 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 30 Sep 2023 17:23:07 -0400 Subject: [PATCH 398/859] Roll Dart SDK from c4e955c13ed5 to c9b521394392 (1 revision) (#46441) https://dart.googlesource.com/sdk.git/+log/c4e955c13ed5..c9b521394392 2023-09-30 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-220.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jacksongardner@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index d045c4028be4a..a8047c7a4537d 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': 'c4e955c13ed56b7c774973e28e772d17d8624d2f', + 'dart_revision': 'c9b5213943928daf77454b11ff87b2fcf75f961e', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py From 87ede4ba31f21deee634be7f2d7e1b0322e25e3d Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Sat, 30 Sep 2023 16:49:17 -0700 Subject: [PATCH 399/859] [Impeller] disable texture to texture blit in GLES. (#46443) These are failing with a GL_INVALID_OPERATION. --- impeller/renderer/backend/gles/context_gles.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/impeller/renderer/backend/gles/context_gles.cc b/impeller/renderer/backend/gles/context_gles.cc index 3ab34acc40bd9..df65f5a1e09e0 100644 --- a/impeller/renderer/backend/gles/context_gles.cc +++ b/impeller/renderer/backend/gles/context_gles.cc @@ -65,8 +65,7 @@ ContextGLES::ContextGLES(std::unique_ptr gl, .SetSupportsOffscreenMSAA(false) .SetSupportsSSBO(false) .SetSupportsBufferToTextureBlits(false) - .SetSupportsTextureToTextureBlits( - reactor_->GetProcTable().BlitFramebuffer.IsAvailable()) + .SetSupportsTextureToTextureBlits(false) .SetSupportsFramebufferFetch(false) .SetDefaultColorFormat(PixelFormat::kR8G8B8A8UNormInt) .SetDefaultStencilFormat(PixelFormat::kS8UInt) From c7a2dcc846584cf7e8d5e2f0c724092d10cee4bb Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 30 Sep 2023 20:18:24 -0400 Subject: [PATCH 400/859] Roll Fuchsia Linux SDK from ZDxyy9-hcaVyv65as... to rZzd2cREE1_AwHJK8... (#46444) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index a8047c7a4537d..d18f8f5967380 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'ZDxyy9-hcaVyv65asxhtfwtXtfyaZYBqjH6MJML32U0C' + 'version': 'rZzd2cREE1_AwHJK8Yu19Hk2YxlYZJEqTVkX2NGv7MIC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', From 4a5f67446396ec9bb1b7ab000a88e690dce81181 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 30 Sep 2023 21:27:07 -0400 Subject: [PATCH 401/859] Roll Fuchsia Mac SDK from DEmzJ6vnZAAUzsm81... to Et_e4YYLaN6JyhtnC... (#46445) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index d18f8f5967380..4542828b609e3 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'DEmzJ6vnZAAUzsm81jmaUsqGdiXWCGSNaoEQ7NKl-yUC' + 'version': 'Et_e4YYLaN6JyhtnC13lDb02YbBEcszscZOALJlA32AC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From b8b0c5c69ebcebd434dee4f333cb1de62ef0fe54 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sun, 1 Oct 2023 08:54:37 -0400 Subject: [PATCH 402/859] Roll Fuchsia Linux SDK from rZzd2cREE1_AwHJK8... to WKLlWqrdEL9WmoxzI... (#46446) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 4542828b609e3..503751265393b 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'rZzd2cREE1_AwHJK8Yu19Hk2YxlYZJEqTVkX2NGv7MIC' + 'version': 'WKLlWqrdEL9WmoxzIGrhV-b3CNcCqcVe1Cc0bbRMHh4C' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', From 13b65bb284a635ac1b56df7e33dcb83157d5d05c Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sun, 1 Oct 2023 10:05:58 -0400 Subject: [PATCH 403/859] Roll Fuchsia Mac SDK from Et_e4YYLaN6JyhtnC... to xavNitWHYl39nmCPT... (#46447) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 503751265393b..366ed3e61c27f 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'Et_e4YYLaN6JyhtnC13lDb02YbBEcszscZOALJlA32AC' + 'version': 'xavNitWHYl39nmCPT5Dvkzz8QQjiQ8I6lUXDPolwCa4C' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 6a7d6bd0c851f7331e993aff34683e2b5c19c547 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sun, 1 Oct 2023 18:24:24 -0400 Subject: [PATCH 404/859] Roll Skia from 20a431090e24 to a2e605c42ba8 (1 revision) (#46449) https://skia.googlesource.com/skia.git/+log/20a431090e24..a2e605c42ba8 2023-10-01 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 285e37076672 to 1e918eeb6193 (1 revision) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,djsollen@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 366ed3e61c27f..e16edd12191b9 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '20a431090e24b620c32b8389d3a183f34cfc8c8c', + 'skia_revision': 'a2e605c42ba8697a88d387f5420c7d421a5efaca', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From e56c11f62473f3410d3e2b829535ed663d3d79c9 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sun, 1 Oct 2023 21:36:24 -0400 Subject: [PATCH 405/859] Roll Fuchsia Linux SDK from WKLlWqrdEL9WmoxzI... to 9injtwYqcyVLXJ22h... (#46450) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index e16edd12191b9..319b17ebee832 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'WKLlWqrdEL9WmoxzIGrhV-b3CNcCqcVe1Cc0bbRMHh4C' + 'version': '9injtwYqcyVLXJ22hUfWSg8xW_KLa9oMULpoYC6NhMcC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', From 6581621e0bd17bde7182a966a95007343da45576 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sun, 1 Oct 2023 22:40:18 -0400 Subject: [PATCH 406/859] Roll Fuchsia Mac SDK from xavNitWHYl39nmCPT... to NPmdUQgciCMzpu-RR... (#46451) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 319b17ebee832..e6791e1e52a02 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'xavNitWHYl39nmCPT5Dvkzz8QQjiQ8I6lUXDPolwCa4C' + 'version': 'NPmdUQgciCMzpu-RRhfoexjubainxTF8VSJX20tvOWAC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 1c81dde6fba4bfa82fd38e0a8b329fed75b20c93 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 2 Oct 2023 01:32:25 -0400 Subject: [PATCH 407/859] Roll Skia from a2e605c42ba8 to 7bd63cc5cba3 (1 revision) (#46452) https://skia.googlesource.com/skia.git/+log/a2e605c42ba8..7bd63cc5cba3 2023-10-02 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from c8eb90e92f62 to a17b968c91ef (1 revision) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,djsollen@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index e6791e1e52a02..7e053faabd763 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'a2e605c42ba8697a88d387f5420c7d421a5efaca', + 'skia_revision': '7bd63cc5cba36774675254de780bb66dada0396f', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 867f09a497f38..0a6fa31bd1e00 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 15d0323f44700161d228b63108d8020e +Signature: 645ea373ecb267059575a0b15451c785 ==================================================================================================== LIBRARY: etc1 From 39d87f216e908f1e329fa20e8056deb49c034425 Mon Sep 17 00:00:00 2001 From: Bruno Leroux Date: Mon, 2 Oct 2023 07:36:16 +0200 Subject: [PATCH 408/859] =?UTF-8?q?[Linux]=20Rename=20'set=5Fallow=5Fchann?= =?UTF-8?q?el=5Foverflow'=20to=20'set=5Fwarns=5Fon=5Fchannel=5F=E2=80=A6?= =?UTF-8?q?=20(#46360)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description This PR is a follow-up to https://github.com/flutter/engine/pull/44636 which introduces the `set_allow_channel_overflow` function. It renames this function to `set_warns_on_channel_overflow`. The previous naming was inspired by the framework side implementation. https://github.com/flutter/engine/blob/93e8901490e78c7ba7e319cce4470d9c6478c6dc/lib/ui/channel_buffers.dart#L574 During the review of the iOS/macOS implementation, https://github.com/flutter/engine/pull/44848#discussion_r1310463864, we agreed that the existing naming is confusing because it implies that overflow will be allowed, but this not the case this function is used to enable/disable error messages when a channel overflows. ## Related Issue Follow-up for https://github.com/flutter/flutter/issues/132386. ## Tests Updates 2 tests. --- shell/platform/linux/fl_binary_messenger.cc | 30 +++++++++---------- .../linux/fl_binary_messenger_test.cc | 18 +++++------ .../linux/fl_keyboard_manager_test.cc | 8 ++--- .../flutter_linux/fl_binary_messenger.h | 14 ++++----- .../linux/testing/mock_binary_messenger.cc | 12 ++++---- .../linux/testing/mock_binary_messenger.h | 4 +-- 6 files changed, 43 insertions(+), 43 deletions(-) diff --git a/shell/platform/linux/fl_binary_messenger.cc b/shell/platform/linux/fl_binary_messenger.cc index dae96402cbb0b..3a1a998e59721 100644 --- a/shell/platform/linux/fl_binary_messenger.cc +++ b/shell/platform/linux/fl_binary_messenger.cc @@ -359,28 +359,28 @@ static void resize_channel(FlBinaryMessenger* messenger, nullptr); } -// Called when a response is received for the allow channel overflow message. -static void set_allow_channel_overflowl_response_cb(GObject* object, - GAsyncResult* result, - gpointer user_data) { +// Called when a response is received for the warns on overflow message. +static void set_warns_on_channel_overflow_response_cb(GObject* object, + GAsyncResult* result, + gpointer user_data) { g_autoptr(GError) error = nullptr; if (!finish_method(object, result, &error)) { - g_warning("Failed to set allow channel overflow: %s", error->message); + g_warning("Failed to set warns on channel overflow: %s", error->message); } } -static void set_allow_channel_overflow(FlBinaryMessenger* messenger, - const gchar* channel, - bool allowed) { +static void set_warns_on_channel_overflow(FlBinaryMessenger* messenger, + const gchar* channel, + bool warns) { g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new(); g_autoptr(FlValue) args = fl_value_new_list(); fl_value_append_take(args, fl_value_new_string(channel)); - fl_value_append_take(args, fl_value_new_bool(allowed)); + fl_value_append_take(args, fl_value_new_bool(!warns)); g_autoptr(GBytes) message = fl_method_codec_encode_method_call( FL_METHOD_CODEC(codec), kOverflowMethod, args, nullptr); fl_binary_messenger_send_on_channel( messenger, kControlChannelName, message, nullptr, - set_allow_channel_overflowl_response_cb, nullptr); + set_warns_on_channel_overflow_response_cb, nullptr); } static void fl_binary_messenger_impl_class_init( @@ -395,7 +395,7 @@ static void fl_binary_messenger_impl_iface_init( iface->send_on_channel = send_on_channel; iface->send_on_channel_finish = send_on_channel_finish; iface->resize_channel = resize_channel; - iface->set_allow_channel_overflow = set_allow_channel_overflow; + iface->set_warns_on_channel_overflow = set_warns_on_channel_overflow; } static void fl_binary_messenger_impl_init(FlBinaryMessengerImpl* self) { @@ -481,12 +481,12 @@ G_MODULE_EXPORT void fl_binary_messenger_resize_channel(FlBinaryMessenger* self, new_size); } -G_MODULE_EXPORT void fl_binary_messenger_set_allow_channel_overflow( +G_MODULE_EXPORT void fl_binary_messenger_set_warns_on_channel_overflow( FlBinaryMessenger* self, const gchar* channel, - bool allowed) { + bool warns) { g_return_if_fail(FL_IS_BINARY_MESSENGER(self)); - return FL_BINARY_MESSENGER_GET_IFACE(self)->set_allow_channel_overflow( - self, channel, allowed); + return FL_BINARY_MESSENGER_GET_IFACE(self)->set_warns_on_channel_overflow( + self, channel, warns); } diff --git a/shell/platform/linux/fl_binary_messenger_test.cc b/shell/platform/linux/fl_binary_messenger_test.cc index d045cd2c0e96c..d27e07d8af9bf 100644 --- a/shell/platform/linux/fl_binary_messenger_test.cc +++ b/shell/platform/linux/fl_binary_messenger_test.cc @@ -136,9 +136,9 @@ static void resize_channel(FlBinaryMessenger* messenger, // Fake implementation. Do nothing. } -static void set_allow_channel_overflow(FlBinaryMessenger* messenger, - const gchar* channel, - bool allowed) { +static void set_warns_on_channel_overflow(FlBinaryMessenger* messenger, + const gchar* channel, + bool warns) { // Fake implementation. Do nothing. } @@ -149,7 +149,7 @@ static void fl_fake_binary_messenger_iface_init( iface->send_on_channel = send_on_channel; iface->send_on_channel_finish = send_on_channel_finish; iface->resize_channel = resize_channel; - iface->set_allow_channel_overflow = set_allow_channel_overflow; + iface->set_warns_on_channel_overflow = set_warns_on_channel_overflow; } static void fl_fake_binary_messenger_init(FlFakeBinaryMessenger* self) {} @@ -455,7 +455,7 @@ TEST(FlBinaryMessengerTest, ResizeChannel) { } // Checks if the 'overflow' command is sent and is well-formed. -TEST(FlBinaryMessengerTest, AllowOverflowChannel) { +TEST(FlBinaryMessengerTest, WarnsOnOverflowChannel) { g_autoptr(FlEngine) engine = make_mock_engine(); FlutterEngineProcTable* embedder_api = fl_engine_get_embedder_api(engine); @@ -495,8 +495,8 @@ TEST(FlBinaryMessengerTest, AllowOverflowChannel) { EXPECT_EQ(error, nullptr); FlBinaryMessenger* messenger = fl_binary_messenger_new(engine); - fl_binary_messenger_set_allow_channel_overflow(messenger, "flutter/test", - true); + fl_binary_messenger_set_warns_on_channel_overflow(messenger, "flutter/test", + false); EXPECT_TRUE(called); } @@ -542,8 +542,8 @@ TEST(FlBinaryMessengerTest, ControlChannelErrorResponse) { return kInvalidArguments; })); - fl_binary_messenger_set_allow_channel_overflow(messenger, "flutter/test", - true); + fl_binary_messenger_set_warns_on_channel_overflow(messenger, "flutter/test", + false); EXPECT_TRUE(called); diff --git a/shell/platform/linux/fl_keyboard_manager_test.cc b/shell/platform/linux/fl_keyboard_manager_test.cc index 89beae62e8ca6..2add32bd73f4f 100644 --- a/shell/platform/linux/fl_keyboard_manager_test.cc +++ b/shell/platform/linux/fl_keyboard_manager_test.cc @@ -222,10 +222,10 @@ static void fl_mock_binary_messenger_resize_channel( // Mock implementation. Do nothing. } -static void fl_mock_binary_messenger_set_allow_channel_overflow( +static void fl_mock_binary_messenger_set_warns_on_channel_overflow( FlBinaryMessenger* messenger, const gchar* channel, - bool allowed) { + bool warns) { // Mock implementation. Do nothing. } @@ -251,8 +251,8 @@ static void fl_mock_key_binary_messenger_iface_init( iface->send_on_channel_finish = fl_mock_key_binary_messenger_send_on_channel_finish; iface->resize_channel = fl_mock_binary_messenger_resize_channel; - iface->set_allow_channel_overflow = - fl_mock_binary_messenger_set_allow_channel_overflow; + iface->set_warns_on_channel_overflow = + fl_mock_binary_messenger_set_warns_on_channel_overflow; } static void fl_mock_key_binary_messenger_init(FlMockKeyBinaryMessenger* self) {} diff --git a/shell/platform/linux/public/flutter_linux/fl_binary_messenger.h b/shell/platform/linux/public/flutter_linux/fl_binary_messenger.h index e9f202d0db5f7..9509d572c33c6 100644 --- a/shell/platform/linux/public/flutter_linux/fl_binary_messenger.h +++ b/shell/platform/linux/public/flutter_linux/fl_binary_messenger.h @@ -98,9 +98,9 @@ struct _FlBinaryMessengerInterface { const gchar* channel, int64_t new_size); - void (*set_allow_channel_overflow)(FlBinaryMessenger* messenger, - const gchar* channel, - bool allowed); + void (*set_warns_on_channel_overflow)(FlBinaryMessenger* messenger, + const gchar* channel, + bool warns); }; struct _FlBinaryMessengerResponseHandleClass { @@ -210,19 +210,19 @@ void fl_binary_messenger_resize_channel(FlBinaryMessenger* messenger, int64_t new_size); /** - * fl_binary_messenger_set_allow_channel_overflow: + * fl_binary_messenger_set_warns_on_channel_overflow: * @messenger: an #FlBinaryMessenger. * @channel: channel to be allowed to overflow silently. - * @allowed: when true the channel is expected to overflow and warning messages + * @warns: when false, the channel is expected to overflow and warning messages * will not be shown. * * Sends a message to the control channel asking to allow or disallow a channel * to overflow silently. */ -void fl_binary_messenger_set_allow_channel_overflow( +void fl_binary_messenger_set_warns_on_channel_overflow( FlBinaryMessenger* messenger, const gchar* channel, - bool allowed); + bool warns); G_END_DECLS diff --git a/shell/platform/linux/testing/mock_binary_messenger.cc b/shell/platform/linux/testing/mock_binary_messenger.cc index b836a49cc6e98..eacbee1d6e27c 100644 --- a/shell/platform/linux/testing/mock_binary_messenger.cc +++ b/shell/platform/linux/testing/mock_binary_messenger.cc @@ -131,14 +131,14 @@ static void fl_mock_binary_messenger_resize_channel( self->mock->fl_binary_messenger_resize_channel(messenger, channel, new_size); } -static void fl_mock_binary_messenger_set_allow_channel_overflow( +static void fl_mock_binary_messenger_set_warns_on_channel_overflow( FlBinaryMessenger* messenger, const gchar* channel, - bool allowed) { + bool warns) { g_return_if_fail(FL_IS_MOCK_BINARY_MESSENGER(messenger)); FlMockBinaryMessenger* self = FL_MOCK_BINARY_MESSENGER(messenger); - self->mock->fl_binary_messenger_set_allow_channel_overflow(messenger, channel, - allowed); + self->mock->fl_binary_messenger_set_warns_on_channel_overflow(messenger, + channel, warns); } static void fl_mock_binary_messenger_iface_init( @@ -150,8 +150,8 @@ static void fl_mock_binary_messenger_iface_init( iface->send_on_channel_finish = fl_mock_binary_messenger_send_on_channel_finish; iface->resize_channel = fl_mock_binary_messenger_resize_channel; - iface->set_allow_channel_overflow = - fl_mock_binary_messenger_set_allow_channel_overflow; + iface->set_warns_on_channel_overflow = + fl_mock_binary_messenger_set_warns_on_channel_overflow; } static void fl_mock_binary_messenger_init(FlMockBinaryMessenger* self) {} diff --git a/shell/platform/linux/testing/mock_binary_messenger.h b/shell/platform/linux/testing/mock_binary_messenger.h index e26a3cf1c7463..61761276a8d88 100644 --- a/shell/platform/linux/testing/mock_binary_messenger.h +++ b/shell/platform/linux/testing/mock_binary_messenger.h @@ -59,10 +59,10 @@ class MockBinaryMessenger { int64_t new_size)); MOCK_METHOD(void, - fl_binary_messenger_set_allow_channel_overflow, + fl_binary_messenger_set_warns_on_channel_overflow, (FlBinaryMessenger * messenger, const gchar* channel, - bool allowed)); + bool warns)); bool HasMessageHandler(const gchar* channel) const; From 12d16fe0653739b2f6488c3f2f40e65544917c2b Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 2 Oct 2023 02:09:11 -0400 Subject: [PATCH 409/859] Roll Skia from 7bd63cc5cba3 to 0fef7d25a55f (1 revision) (#46453) https://skia.googlesource.com/skia.git/+log/7bd63cc5cba3..0fef7d25a55f 2023-10-02 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from a17b968c91ef to f16639bc3b92 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,djsollen@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 7e053faabd763..75e47bc674603 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '7bd63cc5cba36774675254de780bb66dada0396f', + 'skia_revision': '0fef7d25a55f52cfb7153b4990e288a8e36f2a2a', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From bf5101f4eab89aa8cfd4f89fda918526ff8d3a0d Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 2 Oct 2023 09:23:36 -0400 Subject: [PATCH 410/859] Roll Dart SDK from c9b521394392 to 311a337a4b1a (1 revision) (#46457) https://dart.googlesource.com/sdk.git/+log/c9b521394392..311a337a4b1a 2023-10-02 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-221.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jacksongardner@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 75e47bc674603..001b59c4598ac 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': 'c9b5213943928daf77454b11ff87b2fcf75f961e', + 'dart_revision': '311a337a4b1ab48e3b31a4047af85bc21b41c85b', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index a8baa2faf8a3e..35e56f7aafa61 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: 8c54b29320d3f4e18d8477c31abd3aa4 +Signature: 013e157da2c48663fdb2b2fc7d361672 ==================================================================================================== LIBRARY: dart From a43d8a96efe158d55fc8e38a5b0ed1d7385ed10c Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 2 Oct 2023 10:21:19 -0400 Subject: [PATCH 411/859] Roll Fuchsia Linux SDK from 9injtwYqcyVLXJ22h... to ZzYmXHUmcE0gMgZn1... (#46458) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 001b59c4598ac..b21eab798fdba 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': '9injtwYqcyVLXJ22hUfWSg8xW_KLa9oMULpoYC6NhMcC' + 'version': 'ZzYmXHUmcE0gMgZn1dSOpa8s2pvw8vYnsx5ysSeLPtUC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', From cb9621535bef85fff08d8f4aca0c16c98767fb86 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 2 Oct 2023 10:26:48 -0400 Subject: [PATCH 412/859] Roll Skia from 0fef7d25a55f to e72023890373 (1 revision) (#46460) https://skia.googlesource.com/skia.git/+log/0fef7d25a55f..e72023890373 2023-10-02 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 1e918eeb6193 to 1e40b8e966f5 (3 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,djsollen@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index b21eab798fdba..179259b50a58d 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '0fef7d25a55f52cfb7153b4990e288a8e36f2a2a', + 'skia_revision': 'e72023890373c2cf39e403b07e5a799d266d110a', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From aecf42f4f02cb68501edb860648bd3f52a95f5d9 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 2 Oct 2023 11:47:05 -0400 Subject: [PATCH 413/859] Roll Skia from e72023890373 to 3a7a3bbd27d4 (1 revision) (#46464) https://skia.googlesource.com/skia.git/+log/e72023890373..3a7a3bbd27d4 2023-10-02 fmalita@chromium.org [skottie] Add support for custom text locales If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,djsollen@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 179259b50a58d..4c5fb1ca98a48 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'e72023890373c2cf39e403b07e5a799d266d110a', + 'skia_revision': '3a7a3bbd27d494e95451d50950c9df6952707340', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 0a6fa31bd1e00..1dc0a77efa4bd 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 645ea373ecb267059575a0b15451c785 +Signature: 9ba905d44609a1721204374f418a1a82 ==================================================================================================== LIBRARY: etc1 From 39552ffd7e45def34655ec43f273e21acea3048a Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 2 Oct 2023 12:01:12 -0400 Subject: [PATCH 414/859] Roll Fuchsia Mac SDK from NPmdUQgciCMzpu-RR... to xq7mAZt0ekqth1hZV... (#46465) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 4c5fb1ca98a48..79e9a2bdad703 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'NPmdUQgciCMzpu-RRhfoexjubainxTF8VSJX20tvOWAC' + 'version': 'xq7mAZt0ekqth1hZV8wiZM56TmNEvt9IBE4R9JT0Yb4C' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 7c64ee8f27a37307871924dd2ec8e516e2d601d8 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 2 Oct 2023 12:32:14 -0400 Subject: [PATCH 415/859] Roll Skia from 3a7a3bbd27d4 to 53848cbd4e30 (3 revisions) (#46466) https://skia.googlesource.com/skia.git/+log/3a7a3bbd27d4..53848cbd4e30 2023-10-02 johnstiles@google.com Factor out `invokeFP` so that it can be called by outside code. 2023-10-02 herb@google.com Add a quadratic crossings finder for testing 2023-10-02 kjlubick@google.com Replace exec_tools -> tools and update to Bazel 6.3.2 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,djsollen@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 79e9a2bdad703..1f7bd16217fbb 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '3a7a3bbd27d494e95451d50950c9df6952707340', + 'skia_revision': '53848cbd4e30122addc1493b0655774817e6723e', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 1dc0a77efa4bd..52675d582704c 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 9ba905d44609a1721204374f418a1a82 +Signature: 4fcd5d455df5ceca35557c5a207efcbb ==================================================================================================== LIBRARY: etc1 @@ -8825,11 +8825,13 @@ ORIGIN: ../../../third_party/skia/include/private/chromium/SkImageChromium.h + . ORIGIN: ../../../third_party/skia/include/private/gpu/ganesh/GrTextureGenerator.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/private/gpu/graphite/ContextOptionsPriv.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/bentleyottmann/include/BentleyOttmann1.h + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/modules/bentleyottmann/include/BruteForceCrossings.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/bentleyottmann/include/EventQueue.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/bentleyottmann/include/Int96.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/bentleyottmann/include/Point.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/bentleyottmann/include/Segment.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/bentleyottmann/src/BentleyOttmann1.cpp + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/modules/bentleyottmann/src/BruteForceCrossings.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/bentleyottmann/src/EventQueue.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/bentleyottmann/src/Int96.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/bentleyottmann/src/Point.cpp + ../../../third_party/skia/LICENSE @@ -9091,11 +9093,13 @@ FILE: ../../../third_party/skia/include/private/chromium/SkImageChromium.h FILE: ../../../third_party/skia/include/private/gpu/ganesh/GrTextureGenerator.h FILE: ../../../third_party/skia/include/private/gpu/graphite/ContextOptionsPriv.h FILE: ../../../third_party/skia/modules/bentleyottmann/include/BentleyOttmann1.h +FILE: ../../../third_party/skia/modules/bentleyottmann/include/BruteForceCrossings.h FILE: ../../../third_party/skia/modules/bentleyottmann/include/EventQueue.h FILE: ../../../third_party/skia/modules/bentleyottmann/include/Int96.h FILE: ../../../third_party/skia/modules/bentleyottmann/include/Point.h FILE: ../../../third_party/skia/modules/bentleyottmann/include/Segment.h FILE: ../../../third_party/skia/modules/bentleyottmann/src/BentleyOttmann1.cpp +FILE: ../../../third_party/skia/modules/bentleyottmann/src/BruteForceCrossings.cpp FILE: ../../../third_party/skia/modules/bentleyottmann/src/EventQueue.cpp FILE: ../../../third_party/skia/modules/bentleyottmann/src/Int96.cpp FILE: ../../../third_party/skia/modules/bentleyottmann/src/Point.cpp From 961a8fa3d1740854fd3d314bc21606aebb1c8d95 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 2 Oct 2023 13:15:35 -0400 Subject: [PATCH 416/859] Roll Skia from 53848cbd4e30 to b5b5ee1d0a93 (2 revisions) (#46467) https://skia.googlesource.com/skia.git/+log/53848cbd4e30..b5b5ee1d0a93 2023-10-02 fmalita@chromium.org [skottie] Add missing SkUnicode include 2023-10-02 kjlubick@google.com Enforce IWYU on more src/core files If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,djsollen@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 1f7bd16217fbb..f9db7e8784906 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '53848cbd4e30122addc1493b0655774817e6723e', + 'skia_revision': 'b5b5ee1d0a932ebf84161f3733dddde0d10c1f34', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 52675d582704c..09fd878eff447 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 4fcd5d455df5ceca35557c5a207efcbb +Signature: a8ae01bb1e2d4d49b1fb170a4edcc8cb ==================================================================================================== LIBRARY: etc1 From 6c90b3048809d0418c65bb95f994a76f2dc9bf26 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 2 Oct 2023 14:14:18 -0400 Subject: [PATCH 417/859] Roll Skia from b5b5ee1d0a93 to fcd1b7521805 (1 revision) (#46468) https://skia.googlesource.com/skia.git/+log/b5b5ee1d0a93..fcd1b7521805 2023-10-02 johnstiles@google.com Create ProgramImpls for child FPs. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,djsollen@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index f9db7e8784906..2b11d1cb865e4 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'b5b5ee1d0a932ebf84161f3733dddde0d10c1f34', + 'skia_revision': 'fcd1b7521805ab1cde2947be6118f329e4ace14d', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 09fd878eff447..5eb62d66afcdc 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: a8ae01bb1e2d4d49b1fb170a4edcc8cb +Signature: 872e98b33bc7fbb2b59d6f1a9ad7d921 ==================================================================================================== LIBRARY: etc1 From 8cafeb683f04adbfe6950762ec2368d863c527f6 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 2 Oct 2023 15:50:08 -0400 Subject: [PATCH 418/859] Roll Skia from fcd1b7521805 to 064f144adedd (1 revision) (#46472) https://skia.googlesource.com/skia.git/+log/fcd1b7521805..064f144adedd 2023-10-02 jvanverth@google.com Rename SoftwarePathAtlas to RasterPathAtlas. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,djsollen@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 2b11d1cb865e4..3cd9fb727aa78 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'fcd1b7521805ab1cde2947be6118f329e4ace14d', + 'skia_revision': '064f144adedd8ad8ac9c613c54e6354268041912', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 5eb62d66afcdc..51bda541c2875 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 872e98b33bc7fbb2b59d6f1a9ad7d921 +Signature: 7ff9cd9634b1d7d54fbae96d5ff535a9 ==================================================================================================== LIBRARY: etc1 @@ -8952,6 +8952,8 @@ ORIGIN: ../../../third_party/skia/src/gpu/graphite/PathAtlas.cpp + ../../../thir ORIGIN: ../../../third_party/skia/src/gpu/graphite/PathAtlas.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/graphite/ProxyCache.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/graphite/ProxyCache.h + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/gpu/graphite/RasterPathAtlas.cpp + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/gpu/graphite/RasterPathAtlas.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/graphite/ReadSwizzle.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/graphite/YUVABackendTextures.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/graphite/YUVATextureProxies.cpp + ../../../third_party/skia/LICENSE @@ -9220,6 +9222,8 @@ FILE: ../../../third_party/skia/src/gpu/graphite/PathAtlas.cpp FILE: ../../../third_party/skia/src/gpu/graphite/PathAtlas.h FILE: ../../../third_party/skia/src/gpu/graphite/ProxyCache.cpp FILE: ../../../third_party/skia/src/gpu/graphite/ProxyCache.h +FILE: ../../../third_party/skia/src/gpu/graphite/RasterPathAtlas.cpp +FILE: ../../../third_party/skia/src/gpu/graphite/RasterPathAtlas.h FILE: ../../../third_party/skia/src/gpu/graphite/ReadSwizzle.h FILE: ../../../third_party/skia/src/gpu/graphite/YUVABackendTextures.cpp FILE: ../../../third_party/skia/src/gpu/graphite/YUVATextureProxies.cpp From 846f30c27d68f7bbc53d681d45233e980a70447a Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 2 Oct 2023 17:28:22 -0400 Subject: [PATCH 419/859] Roll Dart SDK from 311a337a4b1a to b121fbe079e8 (1 revision) (#46477) https://dart.googlesource.com/sdk.git/+log/311a337a4b1a..b121fbe079e8 2023-10-02 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-222.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jacksongardner@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 3cd9fb727aa78..595063717e756 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '311a337a4b1ab48e3b31a4047af85bc21b41c85b', + 'dart_revision': 'b121fbe079e896867f4772a11b95e9779e2d06cf', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index 35e56f7aafa61..9f177fa5a8445 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: 013e157da2c48663fdb2b2fc7d361672 +Signature: a2f0a662efbd08fea0b06e83e7203769 ==================================================================================================== LIBRARY: dart From 75998e2de59b4b82ffa14c2d9f00aead295c5ae2 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 2 Oct 2023 19:46:23 -0400 Subject: [PATCH 420/859] Roll Skia from 064f144adedd to 1ec5c024f61e (1 revision) (#46481) https://skia.googlesource.com/skia.git/+log/064f144adedd..1ec5c024f61e 2023-10-02 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 1e40b8e966f5 to 9849247aab3a (12 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,djsollen@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 595063717e756..c5672320325d6 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '064f144adedd8ad8ac9c613c54e6354268041912', + 'skia_revision': '1ec5c024f61eb0c37cabf35837909c80822fd911', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From b232714d4d89dec1ad7cfa36d6c30c1f042464f1 Mon Sep 17 00:00:00 2001 From: John McCutchan Date: Mon, 2 Oct 2023 19:23:51 -0600 Subject: [PATCH 421/859] Restrict ImageReader backed Platform Views to Android 33+ (#46478) This is necessary to be able to access the fence associated with each frame that is produced. This API is not available below 33. --- .../engine/renderer/FlutterRenderer.java | 40 ++++++++++++++----- .../ImageReaderPlatformViewRenderTarget.java | 23 ++--------- .../platform/PlatformViewsController.java | 2 +- 3 files changed, 35 insertions(+), 30 deletions(-) diff --git a/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java b/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java index 6a0f3686ec5c9..1ab9699c3fe2d 100644 --- a/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java +++ b/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java @@ -8,6 +8,7 @@ import android.graphics.Bitmap; import android.graphics.Rect; import android.graphics.SurfaceTexture; +import android.hardware.SyncFence; import android.media.Image; import android.os.Build; import android.os.Handler; @@ -21,6 +22,7 @@ import io.flutter.embedding.engine.renderer.FlutterRenderer.ImageTextureRegistryEntry; import io.flutter.view.TextureRegistry; import io.flutter.view.TextureRegistry.ImageTextureEntry; +import java.io.IOException; import java.lang.ref.WeakReference; import java.nio.ByteBuffer; import java.util.ArrayList; @@ -223,15 +225,18 @@ public void run() { this.textureWrapper = new SurfaceTextureWrapper(surfaceTexture, onFrameConsumed); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { - // The callback relies on being executed on the UI thread (unsynchronised read of + // The callback relies on being executed on the UI thread (unsynchronised read + // of // mNativeView // and also the engine code check for platform thread in // Shell::OnPlatformViewMarkTextureFrameAvailable), // so we explicitly pass a Handler for the current thread. this.surfaceTexture().setOnFrameAvailableListener(onFrameListener, new Handler()); } else { - // Android documentation states that the listener can be called on an arbitrary thread. - // But in practice, versions of Android that predate the newer API will call the listener + // Android documentation states that the listener can be called on an arbitrary + // thread. + // But in practice, versions of Android that predate the newer API will call the + // listener // on the thread where the SurfaceTexture was constructed. this.surfaceTexture().setOnFrameAvailableListener(onFrameListener); } @@ -371,24 +376,36 @@ public void pushImage(Image image) { synchronized (this) { toClose = this.image; this.image = image; + if (image != null) { + // Mark that we have a new frame available. + markTextureFrameAvailable(id); + } } // Close the previously pushed buffer. if (toClose != null) { toClose.close(); } - if (image != null) { - // Mark that we have a new frame available. - markTextureFrameAvailable(id); - } } @Override + @TargetApi(33) public Image acquireLatestImage() { Image r; synchronized (this) { r = this.image; this.image = null; } + if (r != null) { + try { + SyncFence fence = r.getFence(); + boolean signaled = fence.awaitForever(); + if (!signaled) { + Log.e(TAG, "acquireLatestImage failed to wait on image fence."); + } + } catch (IOException e) { + Log.e(TAG, "acquireLatestImage failed calling Image.getFence: " + e); + } + } return r; } @@ -479,9 +496,12 @@ public void stopRenderingToSurface() { if (surface != null) { flutterJNI.onSurfaceDestroyed(); - // TODO(mattcarroll): the source of truth for this call should be FlutterJNI, which is where - // the call to onFlutterUiDisplayed() comes from. However, no such native callback exists yet, - // so until the engine and FlutterJNI are configured to call us back when rendering stops, + // TODO(mattcarroll): the source of truth for this call should be FlutterJNI, + // which is where + // the call to onFlutterUiDisplayed() comes from. However, no such native + // callback exists yet, + // so until the engine and FlutterJNI are configured to call us back when + // rendering stops, // we will manually monitor that change here. if (isDisplayingFlutterUi) { flutterUiDisplayListener.onFlutterUiNoLongerDisplayed(); diff --git a/shell/platform/android/io/flutter/plugin/platform/ImageReaderPlatformViewRenderTarget.java b/shell/platform/android/io/flutter/plugin/platform/ImageReaderPlatformViewRenderTarget.java index 4ba58fce13b5f..60b2d73e70bbd 100644 --- a/shell/platform/android/io/flutter/plugin/platform/ImageReaderPlatformViewRenderTarget.java +++ b/shell/platform/android/io/flutter/plugin/platform/ImageReaderPlatformViewRenderTarget.java @@ -12,7 +12,7 @@ import io.flutter.Log; import io.flutter.view.TextureRegistry.ImageTextureEntry; -@TargetApi(29) +@TargetApi(33) public class ImageReaderPlatformViewRenderTarget implements PlatformViewRenderTarget { private ImageTextureEntry textureEntry; private ImageReader reader; @@ -72,33 +72,18 @@ protected ImageReader createImageReader33() { return reader; } - @TargetApi(29) - protected ImageReader createImageReader29() { - final ImageReader reader = - ImageReader.newInstance( - bufferWidth, - bufferHeight, - ImageFormat.PRIVATE, - MAX_IMAGES, - HardwareBuffer.USAGE_GPU_SAMPLED_IMAGE); - reader.setOnImageAvailableListener(this.onImageAvailableListener, onImageAvailableHandler); - return reader; - } - protected ImageReader createImageReader() { if (Build.VERSION.SDK_INT >= 33) { return createImageReader33(); - } else if (Build.VERSION.SDK_INT >= 29) { - return createImageReader29(); } throw new UnsupportedOperationException( - "ImageReaderPlatformViewRenderTarget requires API version 29+"); + "ImageReaderPlatformViewRenderTarget requires API version 33+"); } public ImageReaderPlatformViewRenderTarget(ImageTextureEntry textureEntry) { - if (Build.VERSION.SDK_INT < 29) { + if (Build.VERSION.SDK_INT < 33) { throw new UnsupportedOperationException( - "ImageReaderPlatformViewRenderTarget requires API version 29+"); + "ImageReaderPlatformViewRenderTarget requires API version 33+"); } this.textureEntry = textureEntry; } diff --git a/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java b/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java index e2e87b57c1bdd..d5a1621d1e21f 100644 --- a/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java +++ b/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java @@ -974,7 +974,7 @@ private void unlockInputConnection(@NonNull VirtualDisplayController controller) private static PlatformViewRenderTarget makePlatformViewRenderTarget( TextureRegistry textureRegistry) { - if (enableHardwareBufferRenderingTarget && Build.VERSION.SDK_INT >= 29) { + if (enableHardwareBufferRenderingTarget && Build.VERSION.SDK_INT >= 33) { final TextureRegistry.ImageTextureEntry textureEntry = textureRegistry.createImageTexture(); Log.i(TAG, "PlatformView is using ImageReader backend"); return new ImageReaderPlatformViewRenderTarget(textureEntry); From b9da6ee4fa7d0ddbc661478d529ea62c5667e57c Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 2 Oct 2023 23:04:15 -0400 Subject: [PATCH 422/859] Roll Fuchsia Linux SDK from ZzYmXHUmcE0gMgZn1... to HZHIjaqYGV-JOwWfn... (#46483) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index c5672320325d6..6161e88d3a4f6 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'ZzYmXHUmcE0gMgZn1dSOpa8s2pvw8vYnsx5ysSeLPtUC' + 'version': 'HZHIjaqYGV-JOwWfn9gF0GskTRjiKyM6xInWpm3obzgC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index 843b6d0682aa9..b131c4da0b9fa 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: e3242778b09e2c82476696df61543ba7 +Signature: 5d0552eaa9233599d8efcccc097464f9 ==================================================================================================== LIBRARY: fuchsia_sdk From ff2978deba99f2be8ab3a2555b7f3b39ea9a7922 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 3 Oct 2023 00:36:11 -0400 Subject: [PATCH 423/859] Roll Fuchsia Mac SDK from xq7mAZt0ekqth1hZV... to ujelFOdQOKGYzoj26... (#46485) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 6161e88d3a4f6..c67aa79f62c21 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'xq7mAZt0ekqth1hZV8wiZM56TmNEvt9IBE4R9JT0Yb4C' + 'version': 'ujelFOdQOKGYzoj2611R_EIV-eZEfkKK5BQq3iXbw5EC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 1734b65b16128541f6e01457ff27b015a7ff5726 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 3 Oct 2023 01:31:47 -0400 Subject: [PATCH 424/859] Roll Dart SDK from b121fbe079e8 to a4a29db16711 (1 revision) (#46487) https://dart.googlesource.com/sdk.git/+log/b121fbe079e8..a4a29db16711 2023-10-03 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-223.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jacksongardner@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index c67aa79f62c21..8a2f09eb6b6da 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': 'b121fbe079e896867f4772a11b95e9779e2d06cf', + 'dart_revision': 'a4a29db16711b5f038603b4f46926f74860e5524', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index 9f177fa5a8445..bd4cdb09d89c0 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: a2f0a662efbd08fea0b06e83e7203769 +Signature: ad0ac18b25a0ebd730cd983e55cdc2e9 ==================================================================================================== LIBRARY: dart From 14487dd50cb9935301af2f0a5c793dd447d5d06b Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 3 Oct 2023 01:31:50 -0400 Subject: [PATCH 425/859] Roll Skia from 1ec5c024f61e to ef4abc18ef53 (2 revisions) (#46486) https://skia.googlesource.com/skia.git/+log/1ec5c024f61e..ef4abc18ef53 2023-10-03 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from a17b968c91ef to 0387aac67124 (4 revisions) 2023-10-03 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 7f4d495c89c2 to 5b6f768198ce (1 revision) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,djsollen@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 8a2f09eb6b6da..b2a3c5f637c37 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '1ec5c024f61eb0c37cabf35837909c80822fd911', + 'skia_revision': 'ef4abc18ef53adf514596154db2864821c014ff4', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 51bda541c2875..f7e2bf5ed5bc9 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 7ff9cd9634b1d7d54fbae96d5ff535a9 +Signature: c5d6e48093d4a24d7bcd87ba9b3e06ed ==================================================================================================== LIBRARY: etc1 From 5a7ed22f096d93fd513e5778f4a1de1daebc2b21 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Oct 2023 05:45:23 +0000 Subject: [PATCH 426/859] Bump actions/setup-python from 4.7.0 to 4.7.1 (#46488) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4.7.0 to 4.7.1.

Release notes

Sourced from actions/setup-python's releases.

v4.7.1

What's Changed

Full Changelog: https://github.com/actions/setup-python/compare/v4...v4.7.1

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/setup-python&package-manager=github_actions&previous-version=4.7.0&new-version=4.7.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- .github/workflows/third_party_scan.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/third_party_scan.yml b/.github/workflows/third_party_scan.yml index 6a94995ebafd8..bd5c36e995806 100644 --- a/.github/workflows/third_party_scan.yml +++ b/.github/workflows/third_party_scan.yml @@ -29,7 +29,7 @@ jobs: with: persist-credentials: false - name: "setup python" - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 + uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 with: python-version: '3.7.7' # install the python version needed - name: "extract and flatten deps" From 5a22f1ce3045a7a6232f8b187d0e7eabbfdef752 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 3 Oct 2023 02:09:38 -0400 Subject: [PATCH 427/859] Roll Skia from ef4abc18ef53 to 59f62253759a (1 revision) (#46490) https://skia.googlesource.com/skia.git/+log/ef4abc18ef53..59f62253759a 2023-10-03 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from 0387aac67124 to a8668278beb9 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,djsollen@google.com,jacksongardner@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index b2a3c5f637c37..71596533e8c11 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'ef4abc18ef53adf514596154db2864821c014ff4', + 'skia_revision': '59f62253759a9fb725b1bd0dbc4048b05959dd26', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 2f2984e92f188edaa3e17ece0cf8f728e83266fe Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 3 Oct 2023 08:37:16 -0400 Subject: [PATCH 428/859] Roll Skia from 59f62253759a to a05b5edb3119 (1 revision) (#46494) https://skia.googlesource.com/skia.git/+log/59f62253759a..a05b5edb3119 2023-10-03 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 9849247aab3a to 5d68d7e207a5 (6 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 71596533e8c11..a722e903148df 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '59f62253759a9fb725b1bd0dbc4048b05959dd26', + 'skia_revision': 'a05b5edb311927da46e3ce970ba48bb748f8733d', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From f5fc78cc87204874017ae55546579082b54249e7 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 3 Oct 2023 09:29:05 -0400 Subject: [PATCH 429/859] Roll Skia from a05b5edb3119 to 63af3585fc68 (1 revision) (#46495) https://skia.googlesource.com/skia.git/+log/a05b5edb3119..63af3585fc68 2023-10-03 sharaks@google.com Update Skia milestone to 120 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index a722e903148df..c9f3f044608bf 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'a05b5edb311927da46e3ce970ba48bb748f8733d', + 'skia_revision': '63af3585fc68c56ef86aa7dd2ab4c1ef58d936cc', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index f7e2bf5ed5bc9..c917e92a88bd7 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: c5d6e48093d4a24d7bcd87ba9b3e06ed +Signature: 71e97670122346d3f1e9e4c36b420d71 ==================================================================================================== LIBRARY: etc1 From 901ac876ceb5048eb6518822879ec45bf779493d Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 3 Oct 2023 09:33:18 -0400 Subject: [PATCH 430/859] Roll Dart SDK from a4a29db16711 to 86d84b3d61d6 (1 revision) (#46496) https://dart.googlesource.com/sdk.git/+log/a4a29db16711..86d84b3d61d6 2023-10-03 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-224.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC chinmaygarde@google.com,dart-vm-team@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index c9f3f044608bf..deed9143dde99 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': 'a4a29db16711b5f038603b4f46926f74860e5524', + 'dart_revision': '86d84b3d61d688b84e386c443f6060763e3ba1b4', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py From 0d583b2cbf9650a38edcf1af78de47a6860bd04f Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 3 Oct 2023 11:01:35 -0400 Subject: [PATCH 431/859] Roll Skia from 63af3585fc68 to 30132659083d (1 revision) (#46498) https://skia.googlesource.com/skia.git/+log/63af3585fc68..30132659083d 2023-10-03 robertphillips@google.com [graphite] Add PaintParamsKeyBuilder::addBlock helper If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index deed9143dde99..12c3aa1beff28 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '63af3585fc68c56ef86aa7dd2ab4c1ef58d936cc', + 'skia_revision': '30132659083d025f1218679ea51e960808e4f56a', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index c917e92a88bd7..97dc66ab06b81 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 71e97670122346d3f1e9e4c36b420d71 +Signature: d69b6e8ce8708dc2d664a217c6abbb2f ==================================================================================================== LIBRARY: etc1 From 96495cc675a61f63d5b17f29393e3e955c804a7e Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 3 Oct 2023 11:45:07 -0400 Subject: [PATCH 432/859] Roll Skia from 30132659083d to 37a2a8c95f34 (4 revisions) (#46501) https://skia.googlesource.com/skia.git/+log/30132659083d..37a2a8c95f34 2023-10-03 johnstiles@google.com Remove IthTexureSampler helper. 2023-10-03 egdaniel@google.com [Graphite] Add public query for current cache usage. 2023-10-03 sharaks@google.com Merge 9 release notes into RELEASE_NOTES.md 2023-10-03 fmalita@chromium.org [skottie] Stage locale change If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 11 +---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/DEPS b/DEPS index 12c3aa1beff28..57201a9416e14 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '30132659083d025f1218679ea51e960808e4f56a', + 'skia_revision': '37a2a8c95f34af7a8715a83fafe37c2203c08d3f', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 97dc66ab06b81..d481eb0686c3b 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: d69b6e8ce8708dc2d664a217c6abbb2f +Signature: 9942a543a516ffcf0d69f9e5bf226b0d ==================================================================================================== LIBRARY: etc1 @@ -385,15 +385,6 @@ FILE: ../../../third_party/skia/modules/pathkit/perf/pathops.bench.js FILE: ../../../third_party/skia/modules/pathkit/perf/perfReporter.js FILE: ../../../third_party/skia/modules/skparagraph/test.html FILE: ../../../third_party/skia/package-lock.json -FILE: ../../../third_party/skia/relnotes/crop-imagefilter.md -FILE: ../../../third_party/skia/relnotes/directcontext_gl.md -FILE: ../../../third_party/skia/relnotes/directcontext_submit.md -FILE: ../../../third_party/skia/relnotes/mesh-child-effect.md -FILE: ../../../third_party/skia/relnotes/mesh-child-params.md -FILE: ../../../third_party/skia/relnotes/minify-mesh.md -FILE: ../../../third_party/skia/relnotes/patheffects.md -FILE: ../../../third_party/skia/relnotes/shadowflags.md -FILE: ../../../third_party/skia/relnotes/skpicture_png.md FILE: ../../../third_party/skia/src/gpu/gpu_workaround_list.txt FILE: ../../../third_party/skia/src/sksl/generated/sksl_compute.minified.sksl FILE: ../../../third_party/skia/src/sksl/generated/sksl_compute.unoptimized.sksl From 383752d395aa4adf5931c50b75f015495640c2f4 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 3 Oct 2023 11:49:02 -0400 Subject: [PATCH 433/859] Roll Fuchsia Linux SDK from HZHIjaqYGV-JOwWfn... to SQrHxRVqMo5arcS3p... (#46499) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC chinmaygarde@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 57201a9416e14..14210b7bce711 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'HZHIjaqYGV-JOwWfn9gF0GskTRjiKyM6xInWpm3obzgC' + 'version': 'SQrHxRVqMo5arcS3pKfvDqGxWx4HHmM4X-0BsKXuSmMC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', From 924df0d91c7eec2b350999b7add6a19ae0992529 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 3 Oct 2023 12:31:44 -0400 Subject: [PATCH 434/859] Roll Skia from 37a2a8c95f34 to 93c6a6dd404d (2 revisions) (#46502) https://skia.googlesource.com/skia.git/+log/37a2a8c95f34..93c6a6dd404d 2023-10-03 robertphillips@google.com [graphite] Add an AddDitherBlock helper function 2023-10-03 penghuang@chromium.org graphite: caching wgpu::BindGroupLayout in graphite pipeline objects If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 14210b7bce711..9e357ed889783 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '37a2a8c95f34af7a8715a83fafe37c2203c08d3f', + 'skia_revision': '93c6a6dd404df867f37b7296371b68b48dd8f45f', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index d481eb0686c3b..0fcd894139d3b 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 9942a543a516ffcf0d69f9e5bf226b0d +Signature: 33041bc734ed913adb2ba8cf14e94fb6 ==================================================================================================== LIBRARY: etc1 From 939d8439d0d9658fc2ae5d1eeac0ee2a59322c88 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 3 Oct 2023 13:12:04 -0400 Subject: [PATCH 435/859] Roll Fuchsia Mac SDK from ujelFOdQOKGYzoj26... to d4QNzZ6FjCCXUQtkT... (#46505) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC chinmaygarde@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 9e357ed889783..16e26b34410f4 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'ujelFOdQOKGYzoj2611R_EIV-eZEfkKK5BQq3iXbw5EC' + 'version': 'd4QNzZ6FjCCXUQtkThU8YeOax4hQsasnTl-l-iNR7lYC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 5740d9df97d1dec7aae0a84836796712511d46f8 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 3 Oct 2023 13:17:06 -0400 Subject: [PATCH 436/859] Roll Skia from 93c6a6dd404d to a114c3d5672b (2 revisions) (#46507) https://skia.googlesource.com/skia.git/+log/93c6a6dd404d..a114c3d5672b 2023-10-03 fmalita@chromium.org [canvaskit] Handle unicode input in Skottie WYSIWYG bindings 2023-10-03 lovisolo@google.com [bazel] Add //:gen_compile_flags_txt_linux_amd64 utility. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 16e26b34410f4..ba5fbdd37088d 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '93c6a6dd404df867f37b7296371b68b48dd8f45f', + 'skia_revision': 'a114c3d5672b1c317f599a9444bae334b0b9f48b', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 0fcd894139d3b..f8a8a324cb337 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 33041bc734ed913adb2ba8cf14e94fb6 +Signature: ab7897faa69061eb475c6802b7c049ba ==================================================================================================== LIBRARY: etc1 From 177c066a89680ec7601bbd4d465c766be4e3787f Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 3 Oct 2023 13:21:51 -0400 Subject: [PATCH 437/859] Roll Dart SDK from 86d84b3d61d6 to 318c46832196 (1 revision) (#46508) https://dart.googlesource.com/sdk.git/+log/86d84b3d61d6..318c46832196 2023-10-03 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-225.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC chinmaygarde@google.com,dart-vm-team@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index ba5fbdd37088d..b6d074647720e 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '86d84b3d61d688b84e386c443f6060763e3ba1b4', + 'dart_revision': '318c46832196b496253a82ac9ef073fcb920f3d1', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py From 124a56dd9e230154230ae3030945308c9f3afe88 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 3 Oct 2023 14:05:05 -0400 Subject: [PATCH 438/859] Roll Skia from a114c3d5672b to cb4cfa571393 (1 revision) (#46510) https://skia.googlesource.com/skia.git/+log/a114c3d5672b..cb4cfa571393 2023-10-03 fmalita@chromium.org [skottie] More locale staging If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index b6d074647720e..60b95aa7f06d8 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'a114c3d5672b1c317f599a9444bae334b0b9f48b', + 'skia_revision': 'cb4cfa571393de849c0680d556735c37ae6af321', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index f8a8a324cb337..dd4875b740715 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: ab7897faa69061eb475c6802b7c049ba +Signature: bd5ca597a924be09836da77d87c623ca ==================================================================================================== LIBRARY: etc1 From 927020b337aa7645df55123f0aa95459a6febc8a Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 3 Oct 2023 14:51:27 -0400 Subject: [PATCH 439/859] Roll Skia from cb4cfa571393 to 3a227c225839 (3 revisions) (#46511) https://skia.googlesource.com/skia.git/+log/cb4cfa571393..3a227c225839 2023-10-03 lovisolo@google.com [bazel] Move //gm/surface_manager to //tools/testrunners/surface_manager. 2023-10-03 lovisolo@google.com [bazel] Fix broken GrDirectContext::flushAndSync() call in GaneshGLSurfaceManager.cpp. 2023-10-03 robertphillips@google.com [graphite] Add ability to directly invoke the basic blending methods If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/excluded_files | 1 - ci/licenses_golden/licenses_skia | 12 +----------- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/DEPS b/DEPS index 60b95aa7f06d8..940761059ea97 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'cb4cfa571393de849c0680d556735c37ae6af321', + 'skia_revision': '3a227c22583927e0d1b423448aa250b177b31ea3', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/excluded_files b/ci/licenses_golden/excluded_files index b4d58de3f1185..4867cbe913422 100644 --- a/ci/licenses_golden/excluded_files +++ b/ci/licenses_golden/excluded_files @@ -2647,7 +2647,6 @@ ../../../third_party/skia/gm/BUILD.bazel ../../../third_party/skia/gm/android_gm_test.bzl ../../../third_party/skia/gm/png_codec.bzl -../../../third_party/skia/gm/surface_manager/BUILD.bazel ../../../third_party/skia/gm/vias/BUILD.bazel ../../../third_party/skia/gn/BUILD.bazel ../../../third_party/skia/gn/__init__.py diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index dd4875b740715..f0c4d30c7a13a 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: bd5ca597a924be09836da77d87c623ca +Signature: a8bda9316b6f137083ea4201aa3e20ef ==================================================================================================== LIBRARY: etc1 @@ -8641,7 +8641,6 @@ LIBRARY: skia ORIGIN: ../../../third_party/skia/gm/coordclampshader.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/fontations.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/imagefiltersunpremul.cpp + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/gm/surface_manager/SurfaceManager.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/vias/Draw.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/ports/SkFontMgr_data.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/ports/SkTypeface_fontations.h + ../../../third_party/skia/LICENSE @@ -8683,7 +8682,6 @@ TYPE: LicenseType.bsd FILE: ../../../third_party/skia/gm/coordclampshader.cpp FILE: ../../../third_party/skia/gm/fontations.cpp FILE: ../../../third_party/skia/gm/imagefiltersunpremul.cpp -FILE: ../../../third_party/skia/gm/surface_manager/SurfaceManager.h FILE: ../../../third_party/skia/gm/vias/Draw.h FILE: ../../../third_party/skia/include/ports/SkFontMgr_data.h FILE: ../../../third_party/skia/include/ports/SkTypeface_fontations.h @@ -8769,10 +8767,6 @@ ORIGIN: ../../../third_party/skia/gm/hello_bazel_world.cpp + ../../../third_part ORIGIN: ../../../third_party/skia/gm/png_codec.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/rippleshadergm.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/scaledrects.cpp + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/gm/surface_manager/GaneshGLSurfaceManager.cpp + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/gm/surface_manager/GaneshVulkanSurfaceManager.cpp + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/gm/surface_manager/RasterSurfaceManager.cpp + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/gm/surface_manager/SurfaceManager.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/vias/SimpleVias.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/workingspace.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/android/SkCanvasAndroid.h + ../../../third_party/skia/LICENSE @@ -9039,10 +9033,6 @@ FILE: ../../../third_party/skia/gm/hello_bazel_world.cpp FILE: ../../../third_party/skia/gm/png_codec.cpp FILE: ../../../third_party/skia/gm/rippleshadergm.cpp FILE: ../../../third_party/skia/gm/scaledrects.cpp -FILE: ../../../third_party/skia/gm/surface_manager/GaneshGLSurfaceManager.cpp -FILE: ../../../third_party/skia/gm/surface_manager/GaneshVulkanSurfaceManager.cpp -FILE: ../../../third_party/skia/gm/surface_manager/RasterSurfaceManager.cpp -FILE: ../../../third_party/skia/gm/surface_manager/SurfaceManager.cpp FILE: ../../../third_party/skia/gm/vias/SimpleVias.cpp FILE: ../../../third_party/skia/gm/workingspace.cpp FILE: ../../../third_party/skia/include/android/SkCanvasAndroid.h From 1fee0b59bf4045b00e0debb460a9601ab4ee5f9d Mon Sep 17 00:00:00 2001 From: Brandon DeRosier Date: Tue, 3 Oct 2023 12:02:44 -0700 Subject: [PATCH 440/859] [Impeller] Fix framebuffer blend UVs. (#46489) Fixes b/303120488. There's no need to use the `GetCoverageUVs` utility in this case. Correct usage here would require the geometry to match the coverage rectangle of the snapshot in pass space with no further transformations to the geometry. We should just render the snapshot texture as-is with simple 0/1 UVs and the snapshot's transform. --- impeller/aiks/aiks_unittests.cc | 20 ++++++++++++++++++ .../contents/framebuffer_blend_contents.cc | 21 +++++++------------ 2 files changed, 28 insertions(+), 13 deletions(-) diff --git a/impeller/aiks/aiks_unittests.cc b/impeller/aiks/aiks_unittests.cc index a4d7cdaff2c0f..695a7b26a1de2 100644 --- a/impeller/aiks/aiks_unittests.cc +++ b/impeller/aiks/aiks_unittests.cc @@ -1608,6 +1608,26 @@ TEST_P(AiksTest, DrawPaintWithAdvancedBlendOverFilter) { ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); } +TEST_P(AiksTest, DrawAdvancedBlendPartlyOffscreen) { + std::vector colors = {Color{0.9568, 0.2627, 0.2118, 1.0}, + Color{0.1294, 0.5882, 0.9529, 1.0}}; + std::vector stops = {0.0, 1.0}; + + Paint paint = { + .color_source = ColorSource::MakeLinearGradient( + {0, 0}, {100, 100}, std::move(colors), std::move(stops), + Entity::TileMode::kRepeat, Matrix::MakeScale(Vector3(0.3, 0.3, 0.3))), + .blend_mode = BlendMode::kLighten, + }; + + Canvas canvas; + canvas.DrawPaint({.color = Color::Blue()}); + canvas.Scale(Vector2(2, 2)); + canvas.ClipRect(Rect::MakeLTRB(0, 0, 200, 200)); + canvas.DrawCircle({100, 100}, 100, paint); + ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); +} + #define BLEND_MODE_TUPLE(blend_mode) {#blend_mode, BlendMode::k##blend_mode}, struct BlendModeSelection { diff --git a/impeller/entity/contents/framebuffer_blend_contents.cc b/impeller/entity/contents/framebuffer_blend_contents.cc index 3ced8b52d9d76..c571c0a349a24 100644 --- a/impeller/entity/contents/framebuffer_blend_contents.cc +++ b/impeller/entity/contents/framebuffer_blend_contents.cc @@ -48,6 +48,7 @@ bool FramebufferBlendContents::Render(const ContentContext& renderer, std::nullopt, // sampler_descriptor true, // msaa_enabled "FramebufferBlendContents Snapshot"); // label + if (!src_snapshot.has_value()) { return true; } @@ -56,21 +57,16 @@ bool FramebufferBlendContents::Render(const ContentContext& renderer, return true; } Rect src_coverage = coverage.value(); - auto maybe_src_uvs = src_snapshot->GetCoverageUVs(src_coverage); - if (!maybe_src_uvs.has_value()) { - return true; - } - std::array src_uvs = maybe_src_uvs.value(); auto size = src_coverage.size; VertexBufferBuilder vtx_builder; vtx_builder.AddVertices({ - {Point(0, 0), src_uvs[0]}, - {Point(size.width, 0), src_uvs[1]}, - {Point(size.width, size.height), src_uvs[3]}, - {Point(0, 0), src_uvs[0]}, - {Point(size.width, size.height), src_uvs[3]}, - {Point(0, size.height), src_uvs[2]}, + {Point(0, 0), Point(0, 0)}, + {Point(size.width, 0), Point(1, 0)}, + {Point(size.width, size.height), Point(1, 1)}, + {Point(0, 0), Point(0, 0)}, + {Point(size.width, size.height), Point(1, 1)}, + {Point(0, size.height), Point(0, 1)}, }); auto vtx_buffer = vtx_builder.CreateVertexBuffer(host_buffer); @@ -147,8 +143,7 @@ bool FramebufferBlendContents::Render(const ContentContext& renderer, FS::BindTextureSamplerSrc(cmd, src_snapshot->texture, src_sampler); frame_info.mvp = Matrix::MakeOrthographic(pass.GetRenderTargetSize()) * - entity.GetTransformation() * - Matrix::MakeTranslation(src_coverage.origin); + src_snapshot->transform; frame_info.src_y_coord_scale = src_snapshot->texture->GetYCoordScale(); VS::BindFrameInfo(cmd, host_buffer.EmplaceUniform(frame_info)); From 4218d5aadfdf4d959bbff283ad5d8e567fe98448 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 3 Oct 2023 15:34:05 -0400 Subject: [PATCH 441/859] Roll Skia from 3a227c225839 to 22d1ae035048 (1 revision) (#46513) https://skia.googlesource.com/skia.git/+log/3a227c225839..22d1ae035048 2023-10-03 johnstiles@google.com Move the FP child-impl array into MeshGP::Impl. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 940761059ea97..912c300184b2e 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '3a227c22583927e0d1b423448aa250b177b31ea3', + 'skia_revision': '22d1ae035048c43fec4590790358d2d987a0a4f4', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index f0c4d30c7a13a..ee6302c18dd96 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: a8bda9316b6f137083ea4201aa3e20ef +Signature: 2334131f8270769a06bc123e18477372 ==================================================================================================== LIBRARY: etc1 From 7b19abbb2e81d9dd3b1596e6e5cc31c8b3421c1e Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 3 Oct 2023 16:22:06 -0400 Subject: [PATCH 442/859] Roll Skia from 22d1ae035048 to d8ec08c6d49d (1 revision) (#46515) https://skia.googlesource.com/skia.git/+log/22d1ae035048..d8ec08c6d49d 2023-10-03 lovisolo@google.com [bazel] SurfaceManager: Add SurfaceOptions struct. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 912c300184b2e..d8c99b7b8703f 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '22d1ae035048c43fec4590790358d2d987a0a4f4', + 'skia_revision': 'd8ec08c6d49de02491f35bc58339f0827adf3d14', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index ee6302c18dd96..1139288eaad98 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 2334131f8270769a06bc123e18477372 +Signature: a6371a6ee8721a9b184426132ac1c7a7 ==================================================================================================== LIBRARY: etc1 From 9992458066449fe577db53a074007951021e0929 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 3 Oct 2023 17:09:15 -0400 Subject: [PATCH 443/859] Roll Skia from d8ec08c6d49d to b708dd7d1092 (1 revision) (#46518) https://skia.googlesource.com/skia.git/+log/d8ec08c6d49d..b708dd7d1092 2023-10-03 lehoangquyen@chromium.org graphite-dawn: only wait for wgpu::RenderPipeline on 1st use If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index d8c99b7b8703f..180e994f1702e 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'd8ec08c6d49de02491f35bc58339f0827adf3d14', + 'skia_revision': 'b708dd7d109232f6e9c7eb6823eed5f5959dfa09', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 1139288eaad98..fe5a117b1db45 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: a6371a6ee8721a9b184426132ac1c7a7 +Signature: 4015261b075c10fefce9e2201da110d9 ==================================================================================================== LIBRARY: etc1 From d1b6da80d78506a5fe87079353248bf026362c83 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 3 Oct 2023 18:06:04 -0400 Subject: [PATCH 444/859] Roll Skia from b708dd7d1092 to c66c89c56549 (1 revision) (#46521) https://skia.googlesource.com/skia.git/+log/b708dd7d1092..c66c89c56549 2023-10-03 lovisolo@google.com Replace int Benchmark::calculateLoops(int) with bool Benchmark::shouldLoop(). If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 180e994f1702e..5eed70397fbf8 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'b708dd7d109232f6e9c7eb6823eed5f5959dfa09', + 'skia_revision': 'c66c89c56549d84827a4fb458b3a224a6e27bc06', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From c862162ac67a7795ad823360b1540560c2515141 Mon Sep 17 00:00:00 2001 From: Brandon DeRosier Date: Tue, 3 Oct 2023 15:06:07 -0700 Subject: [PATCH 445/859] [Impeller] Stencil -> Clip (#46519) The days of using the stencil buffer for clip tracking may be numbered, so move away from mentioning the stencil buffer for concepts that are actually about clips. --- impeller/aiks/canvas.cc | 40 ++--- impeller/aiks/canvas.h | 4 +- impeller/entity/contents/atlas_contents.cc | 6 +- impeller/entity/contents/clip_contents.cc | 40 +++-- impeller/entity/contents/clip_contents.h | 12 +- .../contents/conical_gradient_contents.cc | 4 +- impeller/entity/contents/contents.cc | 14 +- impeller/entity/contents/contents.h | 18 +-- .../contents/filters/blend_filter_contents.cc | 20 +-- .../border_mask_blur_filter_contents.cc | 4 +- .../filters/color_matrix_filter_contents.cc | 4 +- .../filters/gaussian_blur_filter_contents.cc | 12 +- .../filters/linear_to_srgb_filter_contents.cc | 4 +- .../filters/local_matrix_filter_contents.cc | 2 +- .../filters/matrix_filter_contents.cc | 2 +- .../filters/morphology_filter_contents.cc | 4 +- .../filters/srgb_to_linear_filter_contents.cc | 4 +- .../filters/yuv_to_rgb_filter_contents.cc | 4 +- .../contents/framebuffer_blend_contents.cc | 2 +- .../contents/linear_gradient_contents.cc | 4 +- .../contents/radial_gradient_contents.cc | 4 +- .../contents/runtime_effect_contents.cc | 2 +- .../entity/contents/solid_color_contents.cc | 2 +- .../contents/solid_rrect_blur_contents.cc | 2 +- .../contents/sweep_gradient_contents.cc | 4 +- impeller/entity/contents/text_contents.cc | 2 +- impeller/entity/contents/texture_contents.cc | 2 +- .../entity/contents/tiled_texture_contents.cc | 2 +- impeller/entity/contents/vertices_contents.cc | 4 +- impeller/entity/entity.cc | 24 +-- impeller/entity/entity.h | 14 +- impeller/entity/entity_pass.cc | 139 +++++++++--------- impeller/entity/entity_pass.h | 32 ++-- impeller/entity/entity_unittests.cc | 16 +- 34 files changed, 224 insertions(+), 229 deletions(-) diff --git a/impeller/aiks/canvas.cc b/impeller/aiks/canvas.cc index 80f0cc734809e..e8271ca6428c0 100644 --- a/impeller/aiks/canvas.cc +++ b/impeller/aiks/canvas.cc @@ -61,7 +61,7 @@ void Canvas::Save(bool create_subpass, auto entry = CanvasStackEntry{}; entry.xformation = xformation_stack_.back().xformation; entry.cull_rect = xformation_stack_.back().cull_rect; - entry.stencil_depth = xformation_stack_.back().stencil_depth; + entry.clip_depth = xformation_stack_.back().clip_depth; if (create_subpass) { entry.rendering_mode = Entity::RenderingMode::kSubpass; auto subpass = std::make_unique(); @@ -82,7 +82,7 @@ void Canvas::Save(bool create_subpass, subpass->SetBlendMode(blend_mode); current_pass_ = GetCurrentPass().AddSubpass(std::move(subpass)); current_pass_->SetTransformation(xformation_stack_.back().xformation); - current_pass_->SetStencilDepth(xformation_stack_.back().stencil_depth); + current_pass_->SetClipDepth(xformation_stack_.back().clip_depth); } xformation_stack_.emplace_back(entry); } @@ -172,7 +172,7 @@ void Canvas::RestoreToCount(size_t count) { void Canvas::DrawPath(const Path& path, const Paint& paint) { Entity entity; entity.SetTransformation(GetCurrentTransformation()); - entity.SetStencilDepth(GetStencilDepth()); + entity.SetClipDepth(GetClipDepth()); entity.SetBlendMode(paint.blend_mode); entity.SetContents(paint.WithFilters(paint.CreateContentsForEntity(path))); @@ -182,7 +182,7 @@ void Canvas::DrawPath(const Path& path, const Paint& paint) { void Canvas::DrawPaint(const Paint& paint) { Entity entity; entity.SetTransformation(GetCurrentTransformation()); - entity.SetStencilDepth(GetStencilDepth()); + entity.SetClipDepth(GetClipDepth()); entity.SetBlendMode(paint.blend_mode); entity.SetContents(paint.CreateContentsForEntity({}, true)); @@ -216,7 +216,7 @@ bool Canvas::AttemptDrawBlurredRRect(const Rect& rect, Entity entity; entity.SetTransformation(GetCurrentTransformation()); - entity.SetStencilDepth(GetStencilDepth()); + entity.SetClipDepth(GetClipDepth()); entity.SetBlendMode(new_paint.blend_mode); entity.SetContents(new_paint.WithFilters(std::move(contents))); @@ -237,7 +237,7 @@ void Canvas::DrawRect(Rect rect, const Paint& paint) { Entity entity; entity.SetTransformation(GetCurrentTransformation()); - entity.SetStencilDepth(GetStencilDepth()); + entity.SetClipDepth(GetClipDepth()); entity.SetBlendMode(paint.blend_mode); entity.SetContents(paint.WithFilters( paint.CreateContentsForGeometry(Geometry::MakeRect(rect)))); @@ -256,7 +256,7 @@ void Canvas::DrawRRect(Rect rect, Scalar corner_radius, const Paint& paint) { if (paint.style == Paint::Style::kFill) { Entity entity; entity.SetTransformation(GetCurrentTransformation()); - entity.SetStencilDepth(GetStencilDepth()); + entity.SetClipDepth(GetClipDepth()); entity.SetBlendMode(paint.blend_mode); entity.SetContents(paint.WithFilters( paint.CreateContentsForGeometry(Geometry::MakeFillPath(path)))); @@ -370,11 +370,11 @@ void Canvas::ClipGeometry(std::unique_ptr geometry, Entity entity; entity.SetTransformation(GetCurrentTransformation()); entity.SetContents(std::move(contents)); - entity.SetStencilDepth(GetStencilDepth()); + entity.SetClipDepth(GetClipDepth()); GetCurrentPass().AddEntity(entity); - ++xformation_stack_.back().stencil_depth; + ++xformation_stack_.back().clip_depth; xformation_stack_.back().contains_clips = true; } @@ -409,7 +409,7 @@ void Canvas::RestoreClip() { // This path is empty because ClipRestoreContents just generates a quad that // takes up the full render target. entity.SetContents(std::make_shared()); - entity.SetStencilDepth(GetStencilDepth()); + entity.SetClipDepth(GetClipDepth()); GetCurrentPass().AddEntity(entity); } @@ -424,7 +424,7 @@ void Canvas::DrawPoints(std::vector points, Entity entity; entity.SetTransformation(GetCurrentTransformation()); - entity.SetStencilDepth(GetStencilDepth()); + entity.SetClipDepth(GetClipDepth()); entity.SetBlendMode(paint.blend_mode); entity.SetContents(paint.WithFilters(paint.CreateContentsForGeometry( Geometry::MakePointField(std::move(points), radius, @@ -443,15 +443,15 @@ void Canvas::DrawPicture(const Picture& picture) { pass->IterateAllElements([&](auto& element) -> bool { if (auto entity = std::get_if(&element)) { - entity->IncrementStencilDepth(GetStencilDepth()); + entity->IncrementStencilDepth(GetClipDepth()); entity->SetTransformation(GetCurrentTransformation() * entity->GetTransformation()); return true; } if (auto subpass = std::get_if>(&element)) { - subpass->get()->SetStencilDepth(subpass->get()->GetStencilDepth() + - GetStencilDepth()); + subpass->get()->SetClipDepth(subpass->get()->GetClipDepth() + + GetClipDepth()); return true; } @@ -502,7 +502,7 @@ void Canvas::DrawImageRect(const std::shared_ptr& image, Entity entity; entity.SetBlendMode(paint.blend_mode); - entity.SetStencilDepth(GetStencilDepth()); + entity.SetClipDepth(GetClipDepth()); entity.SetContents(paint.WithFilters(contents)); entity.SetTransformation(GetCurrentTransformation()); @@ -524,8 +524,8 @@ EntityPass& Canvas::GetCurrentPass() { return *current_pass_; } -size_t Canvas::GetStencilDepth() const { - return xformation_stack_.back().stencil_depth; +size_t Canvas::GetClipDepth() const { + return xformation_stack_.back().clip_depth; } void Canvas::SaveLayer(const Paint& paint, @@ -549,7 +549,7 @@ void Canvas::DrawTextFrame(const std::shared_ptr& text_frame, Point position, const Paint& paint) { Entity entity; - entity.SetStencilDepth(GetStencilDepth()); + entity.SetClipDepth(GetClipDepth()); entity.SetBlendMode(paint.blend_mode); auto text_contents = std::make_shared(); @@ -600,7 +600,7 @@ void Canvas::DrawVertices(const std::shared_ptr& vertices, Entity entity; entity.SetTransformation(GetCurrentTransformation()); - entity.SetStencilDepth(GetStencilDepth()); + entity.SetClipDepth(GetClipDepth()); entity.SetBlendMode(paint.blend_mode); // If there are no vertex color or texture coordinates. Or if there @@ -673,7 +673,7 @@ void Canvas::DrawAtlas(const std::shared_ptr& atlas, Entity entity; entity.SetTransformation(GetCurrentTransformation()); - entity.SetStencilDepth(GetStencilDepth()); + entity.SetClipDepth(GetClipDepth()); entity.SetBlendMode(paint.blend_mode); entity.SetContents(paint.WithFilters(contents)); diff --git a/impeller/aiks/canvas.h b/impeller/aiks/canvas.h index a7a5652229b03..22c154f3cb3e0 100644 --- a/impeller/aiks/canvas.h +++ b/impeller/aiks/canvas.h @@ -34,7 +34,7 @@ struct CanvasStackEntry { Matrix xformation; // |cull_rect| is conservative screen-space bounds of the clipped output area std::optional cull_rect; - size_t stencil_depth = 0u; + size_t clip_depth = 0u; Entity::RenderingMode rendering_mode = Entity::RenderingMode::kDirect; bool contains_clips = false; }; @@ -171,7 +171,7 @@ class Canvas { EntityPass& GetCurrentPass(); - size_t GetStencilDepth() const; + size_t GetClipDepth() const; void ClipGeometry(std::unique_ptr geometry, Entity::ClipOperation clip_op); diff --git a/impeller/entity/contents/atlas_contents.cc b/impeller/entity/contents/atlas_contents.cc index 1363e169faea7..f92c3dbd3449b 100644 --- a/impeller/entity/contents/atlas_contents.cc +++ b/impeller/entity/contents/atlas_contents.cc @@ -250,7 +250,7 @@ bool AtlasContents::Render(const ContentContext& renderer, DEBUG_COMMAND_INFO( cmd, SPrintF("DrawAtlas Blend (%s)", BlendModeToString(blend_mode_))); cmd.BindVertices(vtx_buffer); - cmd.stencil_reference = entity.GetStencilDepth(); + cmd.stencil_reference = entity.GetClipDepth(); auto options = OptionsFromPass(pass); cmd.pipeline = renderer.GetPorterDuffBlendPipeline(options); @@ -425,7 +425,7 @@ bool AtlasTextureContents::Render(const ContentContext& renderer, auto options = OptionsFromPassAndEntity(pass, entity); cmd.pipeline = renderer.GetTexturePipeline(options); - cmd.stencil_reference = entity.GetStencilDepth(); + cmd.stencil_reference = entity.GetClipDepth(); cmd.BindVertices(vertex_builder.CreateVertexBuffer(host_buffer)); VS::BindFrameInfo(cmd, host_buffer.EmplaceUniform(frame_info)); FS::BindTextureSampler(cmd, texture, @@ -515,7 +515,7 @@ bool AtlasColorContents::Render(const ContentContext& renderer, auto opts = OptionsFromPassAndEntity(pass, entity); opts.blend_mode = BlendMode::kSourceOver; cmd.pipeline = renderer.GetGeometryColorPipeline(opts); - cmd.stencil_reference = entity.GetStencilDepth(); + cmd.stencil_reference = entity.GetClipDepth(); cmd.BindVertices(vertex_builder.CreateVertexBuffer(host_buffer)); VS::BindFrameInfo(cmd, host_buffer.EmplaceUniform(frame_info)); FS::BindFragInfo(cmd, host_buffer.EmplaceUniform(frag_info)); diff --git a/impeller/entity/contents/clip_contents.cc b/impeller/entity/contents/clip_contents.cc index 21c2eb1aa2469..241049a0788cf 100644 --- a/impeller/entity/contents/clip_contents.cc +++ b/impeller/entity/contents/clip_contents.cc @@ -34,31 +34,29 @@ std::optional ClipContents::GetCoverage(const Entity& entity) const { return std::nullopt; }; -Contents::StencilCoverage ClipContents::GetStencilCoverage( +Contents::ClipCoverage ClipContents::GetClipCoverage( const Entity& entity, - const std::optional& current_stencil_coverage) const { - if (!current_stencil_coverage.has_value()) { - return {.type = StencilCoverage::Type::kAppend, .coverage = std::nullopt}; + const std::optional& current_clip_coverage) const { + if (!current_clip_coverage.has_value()) { + return {.type = ClipCoverage::Type::kAppend, .coverage = std::nullopt}; } switch (clip_op_) { case Entity::ClipOperation::kDifference: // This can be optimized further by considering cases when the bounds of // the current stencil will shrink. - return {.type = StencilCoverage::Type::kAppend, - .coverage = current_stencil_coverage}; + return {.type = ClipCoverage::Type::kAppend, + .coverage = current_clip_coverage}; case Entity::ClipOperation::kIntersect: if (!geometry_) { - return {.type = StencilCoverage::Type::kAppend, - .coverage = std::nullopt}; + return {.type = ClipCoverage::Type::kAppend, .coverage = std::nullopt}; } auto coverage = geometry_->GetCoverage(entity.GetTransformation()); - if (!coverage.has_value() || !current_stencil_coverage.has_value()) { - return {.type = StencilCoverage::Type::kAppend, - .coverage = std::nullopt}; + if (!coverage.has_value() || !current_clip_coverage.has_value()) { + return {.type = ClipCoverage::Type::kAppend, .coverage = std::nullopt}; } return { - .type = StencilCoverage::Type::kAppend, - .coverage = current_stencil_coverage->Intersection(coverage.value()), + .type = ClipCoverage::Type::kAppend, + .coverage = current_clip_coverage->Intersection(coverage.value()), }; } FML_UNREACHABLE(); @@ -66,7 +64,7 @@ Contents::StencilCoverage ClipContents::GetStencilCoverage( bool ClipContents::ShouldRender( const Entity& entity, - const std::optional& stencil_coverage) const { + const std::optional& clip_coverage) const { return true; } @@ -87,7 +85,7 @@ bool ClipContents::Render(const ContentContext& renderer, auto options = OptionsFromPass(pass); options.blend_mode = BlendMode::kDestination; - cmd.stencil_reference = entity.GetStencilDepth(); + cmd.stencil_reference = entity.GetClipDepth(); options.stencil_compare = CompareFunction::kEqual; options.stencil_operation = StencilOperation::kIncrementClamp; @@ -113,7 +111,7 @@ bool ClipContents::Render(const ContentContext& renderer, { DEBUG_COMMAND_INFO(cmd, "Difference Clip (Punch)"); - cmd.stencil_reference = entity.GetStencilDepth() + 1; + cmd.stencil_reference = entity.GetClipDepth() + 1; options.stencil_compare = CompareFunction::kEqual; options.stencil_operation = StencilOperation::kDecrementClamp; } @@ -155,15 +153,15 @@ std::optional ClipRestoreContents::GetCoverage( return std::nullopt; }; -Contents::StencilCoverage ClipRestoreContents::GetStencilCoverage( +Contents::ClipCoverage ClipRestoreContents::GetClipCoverage( const Entity& entity, - const std::optional& current_stencil_coverage) const { - return {.type = StencilCoverage::Type::kRestore, .coverage = std::nullopt}; + const std::optional& current_clip_coverage) const { + return {.type = ClipCoverage::Type::kRestore, .coverage = std::nullopt}; } bool ClipRestoreContents::ShouldRender( const Entity& entity, - const std::optional& stencil_coverage) const { + const std::optional& clip_coverage) const { return true; } @@ -186,7 +184,7 @@ bool ClipRestoreContents::Render(const ContentContext& renderer, options.stencil_operation = StencilOperation::kSetToReferenceValue; options.primitive_type = PrimitiveType::kTriangleStrip; cmd.pipeline = renderer.GetClipPipeline(options); - cmd.stencil_reference = entity.GetStencilDepth(); + cmd.stencil_reference = entity.GetClipDepth(); // Create a rect that covers either the given restore area, or the whole // render target texture. diff --git a/impeller/entity/contents/clip_contents.h b/impeller/entity/contents/clip_contents.h index 3b0faac98bc60..36f292251042f 100644 --- a/impeller/entity/contents/clip_contents.h +++ b/impeller/entity/contents/clip_contents.h @@ -29,13 +29,13 @@ class ClipContents final : public Contents { std::optional GetCoverage(const Entity& entity) const override; // |Contents| - StencilCoverage GetStencilCoverage( + ClipCoverage GetClipCoverage( const Entity& entity, - const std::optional& current_stencil_coverage) const override; + const std::optional& current_clip_coverage) const override; // |Contents| bool ShouldRender(const Entity& entity, - const std::optional& stencil_coverage) const override; + const std::optional& clip_coverage) const override; // |Contents| bool Render(const ContentContext& renderer, @@ -70,13 +70,13 @@ class ClipRestoreContents final : public Contents { std::optional GetCoverage(const Entity& entity) const override; // |Contents| - StencilCoverage GetStencilCoverage( + ClipCoverage GetClipCoverage( const Entity& entity, - const std::optional& current_stencil_coverage) const override; + const std::optional& current_clip_coverage) const override; // |Contents| bool ShouldRender(const Entity& entity, - const std::optional& stencil_coverage) const override; + const std::optional& clip_coverage) const override; // |Contents| bool Render(const ContentContext& renderer, diff --git a/impeller/entity/contents/conical_gradient_contents.cc b/impeller/entity/contents/conical_gradient_contents.cc index dc61c3794b3fd..8447364a395b4 100644 --- a/impeller/entity/contents/conical_gradient_contents.cc +++ b/impeller/entity/contents/conical_gradient_contents.cc @@ -100,7 +100,7 @@ bool ConicalGradientContents::RenderSSBO(const ContentContext& renderer, Command cmd; DEBUG_COMMAND_INFO(cmd, "ConicalGradientSSBOFill"); - cmd.stencil_reference = entity.GetStencilDepth(); + cmd.stencil_reference = entity.GetClipDepth(); auto geometry_result = GetGeometry()->GetPositionBuffer(renderer, entity, pass); @@ -168,7 +168,7 @@ bool ConicalGradientContents::RenderTexture(const ContentContext& renderer, Command cmd; DEBUG_COMMAND_INFO(cmd, "ConicalGradientFill"); - cmd.stencil_reference = entity.GetStencilDepth(); + cmd.stencil_reference = entity.GetClipDepth(); auto options = OptionsFromPassAndEntity(pass, entity); if (geometry_result.prevent_overdraw) { diff --git a/impeller/entity/contents/contents.cc b/impeller/entity/contents/contents.cc index a181e22302b21..aefdfe16974c1 100644 --- a/impeller/entity/contents/contents.cc +++ b/impeller/entity/contents/contents.cc @@ -49,11 +49,11 @@ bool Contents::IsOpaque() const { return false; } -Contents::StencilCoverage Contents::GetStencilCoverage( +Contents::ClipCoverage Contents::GetClipCoverage( const Entity& entity, - const std::optional& current_stencil_coverage) const { - return {.type = StencilCoverage::Type::kNoChange, - .coverage = current_stencil_coverage}; + const std::optional& current_clip_coverage) const { + return {.type = ClipCoverage::Type::kNoChange, + .coverage = current_clip_coverage}; } std::optional Contents::RenderToSnapshot( @@ -133,8 +133,8 @@ bool Contents::ApplyColorFilter( } bool Contents::ShouldRender(const Entity& entity, - const std::optional& stencil_coverage) const { - if (!stencil_coverage.has_value()) { + const std::optional& clip_coverage) const { + if (!clip_coverage.has_value()) { return false; } @@ -145,7 +145,7 @@ bool Contents::ShouldRender(const Entity& entity, if (coverage == Rect::MakeMaximum()) { return true; } - return stencil_coverage->IntersectsWithRect(coverage.value()); + return clip_coverage->IntersectsWithRect(coverage.value()); } void Contents::SetCoverageHint(std::optional coverage_hint) { diff --git a/impeller/entity/contents/contents.h b/impeller/entity/contents/contents.h index b9dec5db2d12e..e06af8a2a0638 100644 --- a/impeller/entity/contents/contents.h +++ b/impeller/entity/contents/contents.h @@ -36,7 +36,7 @@ class Contents { /// unpremultiplied color. using ColorFilterProc = std::function; - struct StencilCoverage { + struct ClipCoverage { enum class Type { kNoChange, kAppend, kRestore }; Type type = Type::kNoChange; @@ -89,18 +89,18 @@ class Contents { virtual bool IsOpaque() const; //---------------------------------------------------------------------------- - /// @brief Given the current screen space bounding rectangle of the stencil, - /// return the expected stencil coverage after this draw call. This - /// should only be implemented for contents that may write to the - /// stencil buffer. + /// @brief Given the current screen space bounding rectangle of the clip + /// buffer, return the expected clip coverage after this draw call. + /// This should only be implemented for contents that may write to the + /// clip buffer. /// - virtual StencilCoverage GetStencilCoverage( + virtual ClipCoverage GetClipCoverage( const Entity& entity, - const std::optional& current_stencil_coverage) const; + const std::optional& current_clip_coverage) const; //---------------------------------------------------------------------------- /// @brief Render this contents to a snapshot, respecting the entity's - /// transform, path, stencil depth, and blend mode. + /// transform, path, clip depth, and blend mode. /// The result texture size is always the size of /// `GetCoverage(entity)`. /// @@ -113,7 +113,7 @@ class Contents { const std::string& label = "Snapshot") const; virtual bool ShouldRender(const Entity& entity, - const std::optional& stencil_coverage) const; + const std::optional& clip_coverage) const; //---------------------------------------------------------------------------- /// @brief Return the color source's intrinsic size, if available. diff --git a/impeller/entity/contents/filters/blend_filter_contents.cc b/impeller/entity/contents/filters/blend_filter_contents.cc index 7e50634e4d185..7525bda593f43 100644 --- a/impeller/entity/contents/filters/blend_filter_contents.cc +++ b/impeller/entity/contents/filters/blend_filter_contents.cc @@ -114,7 +114,7 @@ static std::optional AdvancedBlend( return std::nullopt; } return Entity::FromSnapshot(dst_snapshot, entity.GetBlendMode(), - entity.GetStencilDepth()); + entity.GetClipDepth()); } auto maybe_src_uvs = src_snapshot->GetCoverageUVs(coverage); if (!maybe_src_uvs.has_value()) { @@ -122,7 +122,7 @@ static std::optional AdvancedBlend( return std::nullopt; } return Entity::FromSnapshot(dst_snapshot, entity.GetBlendMode(), - entity.GetStencilDepth()); + entity.GetClipDepth()); } src_uvs = maybe_src_uvs.value(); } @@ -242,7 +242,7 @@ static std::optional AdvancedBlend( ? 1.0f : dst_snapshot->opacity) * alpha.value_or(1.0)}, - entity.GetBlendMode(), entity.GetStencilDepth()); + entity.GetBlendMode(), entity.GetClipDepth()); } std::optional BlendFilterContents::CreateForegroundAdvancedBlend( @@ -294,7 +294,7 @@ std::optional BlendFilterContents::CreateForegroundAdvancedBlend( DEBUG_COMMAND_INFO(cmd, SPrintF("Foreground Advanced Blend Filter (%s)", BlendModeToString(blend_mode))); cmd.BindVertices(vtx_buffer); - cmd.stencil_reference = entity.GetStencilDepth(); + cmd.stencil_reference = entity.GetClipDepth(); auto options = OptionsFromPass(pass); switch (blend_mode) { @@ -391,7 +391,7 @@ std::optional BlendFilterContents::CreateForegroundAdvancedBlend( Entity sub_entity; sub_entity.SetContents(std::move(contents)); - sub_entity.SetStencilDepth(entity.GetStencilDepth()); + sub_entity.SetClipDepth(entity.GetClipDepth()); return sub_entity; } @@ -416,7 +416,7 @@ std::optional BlendFilterContents::CreateForegroundPorterDuffBlend( Entity foreground_entity; foreground_entity.SetBlendMode(entity.GetBlendMode()); - foreground_entity.SetStencilDepth(entity.GetStencilDepth()); + foreground_entity.SetClipDepth(entity.GetClipDepth()); foreground_entity.SetContents(std::move(contents)); return foreground_entity; } @@ -429,7 +429,7 @@ std::optional BlendFilterContents::CreateForegroundPorterDuffBlend( if (blend_mode == BlendMode::kDestination) { return Entity::FromSnapshot(dst_snapshot, entity.GetBlendMode(), - entity.GetStencilDepth()); + entity.GetClipDepth()); } RenderProc render_proc = [foreground_color, coverage, dst_snapshot, @@ -467,7 +467,7 @@ std::optional BlendFilterContents::CreateForegroundPorterDuffBlend( DEBUG_COMMAND_INFO(cmd, SPrintF("Foreground PorterDuff Blend Filter (%s)", BlendModeToString(blend_mode))); cmd.BindVertices(vtx_buffer); - cmd.stencil_reference = entity.GetStencilDepth(); + cmd.stencil_reference = entity.GetClipDepth(); auto options = OptionsFromPass(pass); cmd.pipeline = renderer.GetPorterDuffBlendPipeline(options); @@ -519,7 +519,7 @@ std::optional BlendFilterContents::CreateForegroundPorterDuffBlend( Entity sub_entity; sub_entity.SetContents(std::move(contents)); - sub_entity.SetStencilDepth(entity.GetStencilDepth()); + sub_entity.SetClipDepth(entity.GetClipDepth()); return sub_entity; } @@ -672,7 +672,7 @@ static std::optional PipelineBlend( ? 1.0f : dst_snapshot->opacity) * alpha.value_or(1.0)}, - entity.GetBlendMode(), entity.GetStencilDepth()); + entity.GetBlendMode(), entity.GetClipDepth()); } #define BLEND_CASE(mode) \ diff --git a/impeller/entity/contents/filters/border_mask_blur_filter_contents.cc b/impeller/entity/contents/filters/border_mask_blur_filter_contents.cc index 2da237445980b..fa3d22b45cdbb 100644 --- a/impeller/entity/contents/filters/border_mask_blur_filter_contents.cc +++ b/impeller/entity/contents/filters/border_mask_blur_filter_contents.cc @@ -114,7 +114,7 @@ std::optional BorderMaskBlurFilterContents::RenderFilter( cmd.pipeline = renderer.GetBorderMaskBlurPipeline(options); cmd.BindVertices(vtx_buffer); - cmd.stencil_reference = entity.GetStencilDepth(); + cmd.stencil_reference = entity.GetClipDepth(); VS::FrameInfo frame_info; frame_info.mvp = Matrix::MakeOrthographic(pass.GetRenderTargetSize()) * @@ -146,7 +146,7 @@ std::optional BorderMaskBlurFilterContents::RenderFilter( Entity sub_entity; sub_entity.SetContents(std::move(contents)); - sub_entity.SetStencilDepth(entity.GetStencilDepth()); + sub_entity.SetClipDepth(entity.GetClipDepth()); sub_entity.SetBlendMode(entity.GetBlendMode()); return sub_entity; } diff --git a/impeller/entity/contents/filters/color_matrix_filter_contents.cc b/impeller/entity/contents/filters/color_matrix_filter_contents.cc index 98024afa53207..4c19bf19ebe83 100644 --- a/impeller/entity/contents/filters/color_matrix_filter_contents.cc +++ b/impeller/entity/contents/filters/color_matrix_filter_contents.cc @@ -57,7 +57,7 @@ std::optional ColorMatrixFilterContents::RenderFilter( const Entity& entity, RenderPass& pass) -> bool { Command cmd; DEBUG_COMMAND_INFO(cmd, "Color Matrix Filter"); - cmd.stencil_reference = entity.GetStencilDepth(); + cmd.stencil_reference = entity.GetClipDepth(); auto options = OptionsFromPassAndEntity(pass, entity); cmd.pipeline = renderer.GetColorMatrixColorFilterPipeline(options); @@ -117,7 +117,7 @@ std::optional ColorMatrixFilterContents::RenderFilter( Entity sub_entity; sub_entity.SetContents(std::move(contents)); - sub_entity.SetStencilDepth(entity.GetStencilDepth()); + sub_entity.SetClipDepth(entity.GetClipDepth()); sub_entity.SetBlendMode(entity.GetBlendMode()); return sub_entity; } diff --git a/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc b/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc index 8e3c9569305bf..6b97bda6bfec0 100644 --- a/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc +++ b/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc @@ -104,17 +104,15 @@ std::optional DirectionalGaussianBlurFilterContents::RenderFilter( } if (blur_sigma_.sigma < kEhCloseEnough) { - return Entity::FromSnapshot( - input_snapshot.value(), entity.GetBlendMode(), - entity.GetStencilDepth()); // No blur to render. + return Entity::FromSnapshot(input_snapshot.value(), entity.GetBlendMode(), + entity.GetClipDepth()); // No blur to render. } // If the radius length is < .5, the shader will take at most 1 sample, // resulting in no blur. if (transformed_blur_radius_length < .5) { - return Entity::FromSnapshot( - input_snapshot.value(), entity.GetBlendMode(), - entity.GetStencilDepth()); // No blur to render. + return Entity::FromSnapshot(input_snapshot.value(), entity.GetBlendMode(), + entity.GetClipDepth()); // No blur to render. } // A matrix that rotates the snapshot space such that the blur direction is @@ -273,7 +271,7 @@ std::optional DirectionalGaussianBlurFilterContents::RenderFilter( (scaled_size / floored_size)), .sampler_descriptor = sampler_desc, .opacity = input_snapshot->opacity}, - entity.GetBlendMode(), entity.GetStencilDepth()); + entity.GetBlendMode(), entity.GetClipDepth()); } std::optional DirectionalGaussianBlurFilterContents::GetFilterCoverage( diff --git a/impeller/entity/contents/filters/linear_to_srgb_filter_contents.cc b/impeller/entity/contents/filters/linear_to_srgb_filter_contents.cc index df6f5e0c0e19c..f06f5a80a80b7 100644 --- a/impeller/entity/contents/filters/linear_to_srgb_filter_contents.cc +++ b/impeller/entity/contents/filters/linear_to_srgb_filter_contents.cc @@ -47,7 +47,7 @@ std::optional LinearToSrgbFilterContents::RenderFilter( const Entity& entity, RenderPass& pass) -> bool { Command cmd; DEBUG_COMMAND_INFO(cmd, "Linear to sRGB Filter"); - cmd.stencil_reference = entity.GetStencilDepth(); + cmd.stencil_reference = entity.GetClipDepth(); auto options = OptionsFromPassAndEntity(pass, entity); cmd.pipeline = renderer.GetLinearToSrgbFilterPipeline(options); @@ -98,7 +98,7 @@ std::optional LinearToSrgbFilterContents::RenderFilter( Entity sub_entity; sub_entity.SetContents(std::move(contents)); - sub_entity.SetStencilDepth(entity.GetStencilDepth()); + sub_entity.SetClipDepth(entity.GetClipDepth()); sub_entity.SetBlendMode(entity.GetBlendMode()); return sub_entity; } diff --git a/impeller/entity/contents/filters/local_matrix_filter_contents.cc b/impeller/entity/contents/filters/local_matrix_filter_contents.cc index 709af709fc739..7f96fd1c7ba1e 100644 --- a/impeller/entity/contents/filters/local_matrix_filter_contents.cc +++ b/impeller/entity/contents/filters/local_matrix_filter_contents.cc @@ -28,7 +28,7 @@ std::optional LocalMatrixFilterContents::RenderFilter( const std::optional& coverage_hint) const { return Entity::FromSnapshot( inputs[0]->GetSnapshot("LocalMatrix", renderer, entity), - entity.GetBlendMode(), entity.GetStencilDepth()); + entity.GetBlendMode(), entity.GetClipDepth()); } } // namespace impeller diff --git a/impeller/entity/contents/filters/matrix_filter_contents.cc b/impeller/entity/contents/filters/matrix_filter_contents.cc index 612e2e7b43eda..d88edc298e3b9 100644 --- a/impeller/entity/contents/filters/matrix_filter_contents.cc +++ b/impeller/entity/contents/filters/matrix_filter_contents.cc @@ -65,7 +65,7 @@ std::optional MatrixFilterContents::RenderFilter( snapshot->sampler_descriptor = sampler_descriptor_; return Entity::FromSnapshot(snapshot, entity.GetBlendMode(), - entity.GetStencilDepth()); + entity.GetClipDepth()); } std::optional MatrixFilterContents::GetFilterCoverage( diff --git a/impeller/entity/contents/filters/morphology_filter_contents.cc b/impeller/entity/contents/filters/morphology_filter_contents.cc index 4fd83270c3df8..bf7a69e15ef0a 100644 --- a/impeller/entity/contents/filters/morphology_filter_contents.cc +++ b/impeller/entity/contents/filters/morphology_filter_contents.cc @@ -59,7 +59,7 @@ std::optional DirectionalMorphologyFilterContents::RenderFilter( if (radius_.radius < kEhCloseEnough) { return Entity::FromSnapshot(input_snapshot.value(), entity.GetBlendMode(), - entity.GetStencilDepth()); + entity.GetClipDepth()); } auto maybe_input_uvs = input_snapshot->GetCoverageUVs(coverage); @@ -153,7 +153,7 @@ std::optional DirectionalMorphologyFilterContents::RenderFilter( .transform = Matrix::MakeTranslation(coverage.origin), .sampler_descriptor = sampler_desc, .opacity = input_snapshot->opacity}, - entity.GetBlendMode(), entity.GetStencilDepth()); + entity.GetBlendMode(), entity.GetClipDepth()); } std::optional DirectionalMorphologyFilterContents::GetFilterCoverage( diff --git a/impeller/entity/contents/filters/srgb_to_linear_filter_contents.cc b/impeller/entity/contents/filters/srgb_to_linear_filter_contents.cc index 253089a85a26f..9fb789c1edbc3 100644 --- a/impeller/entity/contents/filters/srgb_to_linear_filter_contents.cc +++ b/impeller/entity/contents/filters/srgb_to_linear_filter_contents.cc @@ -47,7 +47,7 @@ std::optional SrgbToLinearFilterContents::RenderFilter( const Entity& entity, RenderPass& pass) -> bool { Command cmd; DEBUG_COMMAND_INFO(cmd, "sRGB to Linear Filter"); - cmd.stencil_reference = entity.GetStencilDepth(); + cmd.stencil_reference = entity.GetClipDepth(); auto options = OptionsFromPassAndEntity(pass, entity); cmd.pipeline = renderer.GetSrgbToLinearFilterPipeline(options); @@ -98,7 +98,7 @@ std::optional SrgbToLinearFilterContents::RenderFilter( Entity sub_entity; sub_entity.SetContents(std::move(contents)); - sub_entity.SetStencilDepth(entity.GetStencilDepth()); + sub_entity.SetClipDepth(entity.GetClipDepth()); sub_entity.SetBlendMode(entity.GetBlendMode()); return sub_entity; } diff --git a/impeller/entity/contents/filters/yuv_to_rgb_filter_contents.cc b/impeller/entity/contents/filters/yuv_to_rgb_filter_contents.cc index 5b944ca68e023..c35c5fd0cdd84 100644 --- a/impeller/entity/contents/filters/yuv_to_rgb_filter_contents.cc +++ b/impeller/entity/contents/filters/yuv_to_rgb_filter_contents.cc @@ -75,7 +75,7 @@ std::optional YUVToRGBFilterContents::RenderFilter( const Entity& entity, RenderPass& pass) -> bool { Command cmd; DEBUG_COMMAND_INFO(cmd, "YUV to RGB Filter"); - cmd.stencil_reference = entity.GetStencilDepth(); + cmd.stencil_reference = entity.GetClipDepth(); auto options = OptionsFromPassAndEntity(pass, entity); cmd.pipeline = renderer.GetYUVToRGBFilterPipeline(options); @@ -133,7 +133,7 @@ std::optional YUVToRGBFilterContents::RenderFilter( Entity sub_entity; sub_entity.SetContents(std::move(contents)); - sub_entity.SetStencilDepth(entity.GetStencilDepth()); + sub_entity.SetClipDepth(entity.GetClipDepth()); sub_entity.SetBlendMode(entity.GetBlendMode()); return sub_entity; } diff --git a/impeller/entity/contents/framebuffer_blend_contents.cc b/impeller/entity/contents/framebuffer_blend_contents.cc index c571c0a349a24..6ff44cbe2c20b 100644 --- a/impeller/entity/contents/framebuffer_blend_contents.cc +++ b/impeller/entity/contents/framebuffer_blend_contents.cc @@ -76,7 +76,7 @@ bool FramebufferBlendContents::Render(const ContentContext& renderer, Command cmd; DEBUG_COMMAND_INFO(cmd, "Framebuffer Advanced Blend Filter"); cmd.BindVertices(vtx_buffer); - cmd.stencil_reference = entity.GetStencilDepth(); + cmd.stencil_reference = entity.GetClipDepth(); switch (blend_mode_) { case BlendMode::kScreen: diff --git a/impeller/entity/contents/linear_gradient_contents.cc b/impeller/entity/contents/linear_gradient_contents.cc index b35ee0d9084e8..4432494cd97e9 100644 --- a/impeller/entity/contents/linear_gradient_contents.cc +++ b/impeller/entity/contents/linear_gradient_contents.cc @@ -101,7 +101,7 @@ bool LinearGradientContents::RenderTexture(const ContentContext& renderer, Command cmd; DEBUG_COMMAND_INFO(cmd, "LinearGradientFill"); - cmd.stencil_reference = entity.GetStencilDepth(); + cmd.stencil_reference = entity.GetClipDepth(); auto options = OptionsFromPassAndEntity(pass, entity); if (geometry_result.prevent_overdraw) { @@ -162,7 +162,7 @@ bool LinearGradientContents::RenderSSBO(const ContentContext& renderer, Command cmd; DEBUG_COMMAND_INFO(cmd, "LinearGradientSSBOFill"); - cmd.stencil_reference = entity.GetStencilDepth(); + cmd.stencil_reference = entity.GetClipDepth(); auto geometry_result = GetGeometry()->GetPositionBuffer(renderer, entity, pass); diff --git a/impeller/entity/contents/radial_gradient_contents.cc b/impeller/entity/contents/radial_gradient_contents.cc index 86cc1d616730d..1513aa5652d66 100644 --- a/impeller/entity/contents/radial_gradient_contents.cc +++ b/impeller/entity/contents/radial_gradient_contents.cc @@ -99,7 +99,7 @@ bool RadialGradientContents::RenderSSBO(const ContentContext& renderer, Command cmd; DEBUG_COMMAND_INFO(cmd, "RadialGradientSSBOFill"); - cmd.stencil_reference = entity.GetStencilDepth(); + cmd.stencil_reference = entity.GetClipDepth(); auto geometry_result = GetGeometry()->GetPositionBuffer(renderer, entity, pass); @@ -160,7 +160,7 @@ bool RadialGradientContents::RenderTexture(const ContentContext& renderer, Command cmd; DEBUG_COMMAND_INFO(cmd, "RadialGradientFill"); - cmd.stencil_reference = entity.GetStencilDepth(); + cmd.stencil_reference = entity.GetClipDepth(); auto options = OptionsFromPassAndEntity(pass, entity); if (geometry_result.prevent_overdraw) { diff --git a/impeller/entity/contents/runtime_effect_contents.cc b/impeller/entity/contents/runtime_effect_contents.cc index 15bdd7333c6e5..b4629f141e4f9 100644 --- a/impeller/entity/contents/runtime_effect_contents.cc +++ b/impeller/entity/contents/runtime_effect_contents.cc @@ -153,7 +153,7 @@ bool RuntimeEffectContents::Render(const ContentContext& renderer, Command cmd; DEBUG_COMMAND_INFO(cmd, "RuntimeEffectContents"); cmd.pipeline = pipeline; - cmd.stencil_reference = entity.GetStencilDepth(); + cmd.stencil_reference = entity.GetClipDepth(); cmd.BindVertices(geometry_result.vertex_buffer); //-------------------------------------------------------------------------- diff --git a/impeller/entity/contents/solid_color_contents.cc b/impeller/entity/contents/solid_color_contents.cc index 7ee05315596bf..071e3f3e86c7b 100644 --- a/impeller/entity/contents/solid_color_contents.cc +++ b/impeller/entity/contents/solid_color_contents.cc @@ -54,7 +54,7 @@ bool SolidColorContents::Render(const ContentContext& renderer, Command cmd; DEBUG_COMMAND_INFO(cmd, "Solid Fill"); - cmd.stencil_reference = entity.GetStencilDepth(); + cmd.stencil_reference = entity.GetClipDepth(); auto geometry_result = GetGeometry()->GetPositionBuffer(renderer, entity, pass); diff --git a/impeller/entity/contents/solid_rrect_blur_contents.cc b/impeller/entity/contents/solid_rrect_blur_contents.cc index ffb190cf7a271..e4043f67f2105 100644 --- a/impeller/entity/contents/solid_rrect_blur_contents.cc +++ b/impeller/entity/contents/solid_rrect_blur_contents.cc @@ -96,7 +96,7 @@ bool SolidRRectBlurContents::Render(const ContentContext& renderer, color = Color::White(); } cmd.pipeline = renderer.GetRRectBlurPipeline(opts); - cmd.stencil_reference = entity.GetStencilDepth(); + cmd.stencil_reference = entity.GetClipDepth(); cmd.BindVertices(vtx_builder.CreateVertexBuffer(pass.GetTransientsBuffer())); diff --git a/impeller/entity/contents/sweep_gradient_contents.cc b/impeller/entity/contents/sweep_gradient_contents.cc index 32cb87a4eab0b..88343ee64179c 100644 --- a/impeller/entity/contents/sweep_gradient_contents.cc +++ b/impeller/entity/contents/sweep_gradient_contents.cc @@ -105,7 +105,7 @@ bool SweepGradientContents::RenderSSBO(const ContentContext& renderer, Command cmd; DEBUG_COMMAND_INFO(cmd, "SweepGradientSSBOFill"); - cmd.stencil_reference = entity.GetStencilDepth(); + cmd.stencil_reference = entity.GetClipDepth(); auto geometry_result = GetGeometry()->GetPositionBuffer(renderer, entity, pass); @@ -167,7 +167,7 @@ bool SweepGradientContents::RenderTexture(const ContentContext& renderer, Command cmd; DEBUG_COMMAND_INFO(cmd, "SweepGradientFill"); - cmd.stencil_reference = entity.GetStencilDepth(); + cmd.stencil_reference = entity.GetClipDepth(); auto options = OptionsFromPassAndEntity(pass, entity); if (geometry_result.prevent_overdraw) { diff --git a/impeller/entity/contents/text_contents.cc b/impeller/entity/contents/text_contents.cc index c17c47ae20b31..dbd3d89960539 100644 --- a/impeller/entity/contents/text_contents.cc +++ b/impeller/entity/contents/text_contents.cc @@ -98,7 +98,7 @@ bool TextContents::Render(const ContentContext& renderer, } else { cmd.pipeline = renderer.GetGlyphAtlasColorPipeline(opts); } - cmd.stencil_reference = entity.GetStencilDepth(); + cmd.stencil_reference = entity.GetClipDepth(); using VS = GlyphAtlasPipeline::VertexShader; using FS = GlyphAtlasPipeline::FragmentShader; diff --git a/impeller/entity/contents/texture_contents.cc b/impeller/entity/contents/texture_contents.cc index 5d4d886d243fb..01f3d4df8d0d3 100644 --- a/impeller/entity/contents/texture_contents.cc +++ b/impeller/entity/contents/texture_contents.cc @@ -170,7 +170,7 @@ bool TextureContents::Render(const ContentContext& renderer, cmd.pipeline = renderer.GetTexturePipeline(pipeline_options); #endif // IMPELLER_ENABLE_OPENGLES - cmd.stencil_reference = entity.GetStencilDepth(); + cmd.stencil_reference = entity.GetClipDepth(); cmd.BindVertices(vertex_builder.CreateVertexBuffer(host_buffer)); VS::BindFrameInfo(cmd, host_buffer.EmplaceUniform(frame_info)); if (is_external_texture) { diff --git a/impeller/entity/contents/tiled_texture_contents.cc b/impeller/entity/contents/tiled_texture_contents.cc index 67155fe2b9450..0b54d4ba0144e 100644 --- a/impeller/entity/contents/tiled_texture_contents.cc +++ b/impeller/entity/contents/tiled_texture_contents.cc @@ -145,7 +145,7 @@ bool TiledTextureContents::Render(const ContentContext& renderer, DEBUG_COMMAND_INFO(cmd, "TextureFill"); } - cmd.stencil_reference = entity.GetStencilDepth(); + cmd.stencil_reference = entity.GetClipDepth(); auto options = OptionsFromPassAndEntity(pass, entity); if (geometry_result.prevent_overdraw) { diff --git a/impeller/entity/contents/vertices_contents.cc b/impeller/entity/contents/vertices_contents.cc index 8567516b02fb0..41d8432a71dda 100644 --- a/impeller/entity/contents/vertices_contents.cc +++ b/impeller/entity/contents/vertices_contents.cc @@ -137,7 +137,7 @@ bool VerticesUVContents::Render(const ContentContext& renderer, auto opts = OptionsFromPassAndEntity(pass, entity); opts.primitive_type = geometry_result.type; cmd.pipeline = renderer.GetTexturePipeline(opts); - cmd.stencil_reference = entity.GetStencilDepth(); + cmd.stencil_reference = entity.GetClipDepth(); cmd.BindVertices(geometry_result.vertex_buffer); VS::FrameInfo frame_info; @@ -187,7 +187,7 @@ bool VerticesColorContents::Render(const ContentContext& renderer, auto opts = OptionsFromPassAndEntity(pass, entity); opts.primitive_type = geometry_result.type; cmd.pipeline = renderer.GetGeometryColorPipeline(opts); - cmd.stencil_reference = entity.GetStencilDepth(); + cmd.stencil_reference = entity.GetClipDepth(); cmd.BindVertices(geometry_result.vertex_buffer); VS::FrameInfo frame_info; diff --git a/impeller/entity/entity.cc b/impeller/entity/entity.cc index b7ebc2af966c9..5bd509263b55f 100644 --- a/impeller/entity/entity.cc +++ b/impeller/entity/entity.cc @@ -21,7 +21,7 @@ namespace impeller { std::optional Entity::FromSnapshot( const std::optional& snapshot, BlendMode blend_mode, - uint32_t stencil_depth) { + uint32_t clip_depth) { if (!snapshot.has_value()) { return std::nullopt; } @@ -36,7 +36,7 @@ std::optional Entity::FromSnapshot( Entity entity; entity.SetBlendMode(blend_mode); - entity.SetStencilDepth(stencil_depth); + entity.SetClipDepth(clip_depth); entity.SetTransformation(snapshot->transform); entity.SetContents(contents); return entity; @@ -62,16 +62,16 @@ std::optional Entity::GetCoverage() const { return contents_->GetCoverage(*this); } -Contents::StencilCoverage Entity::GetStencilCoverage( - const std::optional& current_stencil_coverage) const { +Contents::ClipCoverage Entity::GetClipCoverage( + const std::optional& current_clip_coverage) const { if (!contents_) { return {}; } - return contents_->GetStencilCoverage(*this, current_stencil_coverage); + return contents_->GetClipCoverage(*this, current_clip_coverage); } -bool Entity::ShouldRender(const std::optional& stencil_coverage) const { - return contents_->ShouldRender(*this, stencil_coverage); +bool Entity::ShouldRender(const std::optional& clip_coverage) const { + return contents_->ShouldRender(*this, clip_coverage); } void Entity::SetContents(std::shared_ptr contents) { @@ -82,16 +82,16 @@ const std::shared_ptr& Entity::GetContents() const { return contents_; } -void Entity::SetStencilDepth(uint32_t depth) { - stencil_depth_ = depth; +void Entity::SetClipDepth(uint32_t depth) { + clip_depth_ = depth; } -uint32_t Entity::GetStencilDepth() const { - return stencil_depth_; +uint32_t Entity::GetClipDepth() const { + return clip_depth_; } void Entity::IncrementStencilDepth(uint32_t increment) { - stencil_depth_ += increment; + clip_depth_ += increment; } void Entity::SetBlendMode(BlendMode blend_mode) { diff --git a/impeller/entity/entity.h b/impeller/entity/entity.h index 8cbcfaa9440b7..9b210d0c19482 100644 --- a/impeller/entity/entity.h +++ b/impeller/entity/entity.h @@ -65,7 +65,7 @@ class Entity { static std::optional FromSnapshot( const std::optional& snapshot, BlendMode blend_mode = BlendMode::kSourceOver, - uint32_t stencil_depth = 0); + uint32_t clip_depth = 0); Entity(); @@ -77,20 +77,20 @@ class Entity { std::optional GetCoverage() const; - Contents::StencilCoverage GetStencilCoverage( - const std::optional& current_stencil_coverage) const; + Contents::ClipCoverage GetClipCoverage( + const std::optional& current_clip_coverage) const; - bool ShouldRender(const std::optional& stencil_coverage) const; + bool ShouldRender(const std::optional& clip_coverage) const; void SetContents(std::shared_ptr contents); const std::shared_ptr& GetContents() const; - void SetStencilDepth(uint32_t stencil_depth); + void SetClipDepth(uint32_t clip_depth); void IncrementStencilDepth(uint32_t increment); - uint32_t GetStencilDepth() const; + uint32_t GetClipDepth() const; void SetBlendMode(BlendMode blend_mode); @@ -116,7 +116,7 @@ class Entity { Matrix transformation_; std::shared_ptr contents_; BlendMode blend_mode_ = BlendMode::kSourceOver; - uint32_t stencil_depth_ = 0u; + uint32_t clip_depth_ = 0u; mutable Capture capture_; }; diff --git a/impeller/entity/entity_pass.cc b/impeller/entity/entity_pass.cc index bc312cd6bcb1a..c6af10254f7d6 100644 --- a/impeller/entity/entity_pass.cc +++ b/impeller/entity/entity_pass.cc @@ -352,9 +352,9 @@ bool EntityPass::Render(ContentContext& renderer, return true; }); - StencilCoverageStack stencil_coverage_stack = {StencilCoverageLayer{ + ClipCoverageStack clip_coverage_stack = {ClipCoverageLayer{ .coverage = Rect::MakeSize(root_render_target.GetRenderTargetSize()), - .stencil_depth = 0}}; + .clip_depth = 0}}; bool supports_onscreen_backdrop_reads = renderer.GetDeviceCapabilities().SupportsReadFromOnscreenTexture() && @@ -378,7 +378,7 @@ bool EntityPass::Render(ContentContext& renderer, Point(), // global_pass_position Point(), // local_pass_position 0, // pass_depth - stencil_coverage_stack // stencil_coverage_stack + clip_coverage_stack // clip_coverage_stack )) { // Validation error messages are triggered for all `OnRender()` failure // cases. @@ -490,7 +490,7 @@ bool EntityPass::Render(ContentContext& renderer, Point(), // global_pass_position Point(), // local_pass_position 0, // pass_depth - stencil_coverage_stack); // stencil_coverage_stack + clip_coverage_stack); // clip_coverage_stack } EntityPass::EntityResult EntityPass::GetEntityForElement( @@ -501,8 +501,8 @@ EntityPass::EntityResult EntityPass::GetEntityForElement( ISize root_pass_size, Point global_pass_position, uint32_t pass_depth, - StencilCoverageStack& stencil_coverage_stack, - size_t stencil_depth_floor) const { + ClipCoverageStack& clip_coverage_stack, + size_t clip_depth_floor) const { Entity element_entity; //-------------------------------------------------------------------------- @@ -546,8 +546,8 @@ EntityPass::EntityResult EntityPass::GetEntityForElement( global_pass_position, // global_pass_position Point(), // local_pass_position pass_depth, // pass_depth - stencil_coverage_stack, // stencil_coverage_stack - stencil_depth_, // stencil_depth_floor + clip_coverage_stack, // clip_coverage_stack + clip_depth_, // clip_depth_floor nullptr, // backdrop_filter_contents pass_context.GetRenderPass(pass_depth) // collapsed_parent_pass )) { @@ -581,14 +581,14 @@ EntityPass::EntityResult EntityPass::GetEntityForElement( pass_context.EndPass(); } - if (stencil_coverage_stack.empty()) { + if (clip_coverage_stack.empty()) { // The current clip is empty. This means the pass texture won't be // visible, so skip it. capture.CreateChild("Subpass Entity (Skipped: Empty clip A)"); return EntityPass::EntityResult::Skip(); } - auto stencil_coverage_back = stencil_coverage_stack.back().coverage; - if (!stencil_coverage_back.has_value()) { + auto clip_coverage_back = clip_coverage_stack.back().coverage; + if (!clip_coverage_back.has_value()) { capture.CreateChild("Subpass Entity (Skipped: Empty clip B)"); return EntityPass::EntityResult::Skip(); } @@ -599,7 +599,7 @@ EntityPass::EntityResult EntityPass::GetEntityForElement( Rect(global_pass_position, Size(pass_context.GetPassTarget() .GetRenderTarget() .GetRenderTargetSize())) - .Intersection(stencil_coverage_back.value()); + .Intersection(clip_coverage_back.value()); if (!coverage_limit.has_value()) { capture.CreateChild("Subpass Entity (Skipped: Empty coverage limit A)"); return EntityPass::EntityResult::Skip(); @@ -652,8 +652,8 @@ EntityPass::EntityResult EntityPass::GetEntityForElement( subpass_coverage->origin - global_pass_position, // local_pass_position ++pass_depth, // pass_depth - stencil_coverage_stack, // stencil_coverage_stack - subpass->stencil_depth_, // stencil_depth_floor + clip_coverage_stack, // clip_coverage_stack + subpass->clip_depth_, // clip_depth_floor subpass_backdrop_filter_contents // backdrop_filter_contents )) { // Validation error messages are triggered for all `OnRender()` failure @@ -686,7 +686,7 @@ EntityPass::EntityResult EntityPass::GetEntityForElement( capture.CreateChild("Entity (Subpass texture)"); element_entity.SetCapture(subpass_texture_capture); element_entity.SetContents(std::move(offscreen_texture_contents)); - element_entity.SetStencilDepth(subpass->stencil_depth_); + element_entity.SetClipDepth(subpass->clip_depth_); element_entity.SetBlendMode(subpass->blend_mode_); element_entity.SetTransformation(subpass_texture_capture.AddMatrix( "Transform", Matrix::MakeTranslation(Vector3(subpass_coverage->origin - @@ -706,8 +706,8 @@ bool EntityPass::OnRender( Point global_pass_position, Point local_pass_position, uint32_t pass_depth, - StencilCoverageStack& stencil_coverage_stack, - size_t stencil_depth_floor, + ClipCoverageStack& clip_coverage_stack, + size_t clip_depth_floor, std::shared_ptr backdrop_filter_contents, const std::optional& collapsed_parent_pass) const { @@ -728,8 +728,8 @@ bool EntityPass::OnRender( pass_context.GetRenderPass(pass_depth); } - auto render_element = [&stencil_depth_floor, &pass_context, &pass_depth, - &renderer, &stencil_coverage_stack, + auto render_element = [&clip_depth_floor, &pass_context, &pass_depth, + &renderer, &clip_coverage_stack, &global_pass_position](Entity& element_entity) { auto result = pass_context.GetRenderPass(pass_depth); @@ -762,78 +762,77 @@ bool EntityPass::OnRender( } } - auto current_stencil_coverage = stencil_coverage_stack.back().coverage; - if (current_stencil_coverage.has_value()) { + auto current_clip_coverage = clip_coverage_stack.back().coverage; + if (current_clip_coverage.has_value()) { // Entity transforms are relative to the current pass position, so we need - // to check stencil coverage in the same space. - current_stencil_coverage->origin -= global_pass_position; + // to check clip coverage in the same space. + current_clip_coverage->origin -= global_pass_position; } - if (!element_entity.ShouldRender(current_stencil_coverage)) { + if (!element_entity.ShouldRender(current_clip_coverage)) { return true; // Nothing to render. } - auto stencil_coverage = - element_entity.GetStencilCoverage(current_stencil_coverage); - if (stencil_coverage.coverage.has_value()) { - stencil_coverage.coverage->origin += global_pass_position; + auto clip_coverage = element_entity.GetClipCoverage(current_clip_coverage); + if (clip_coverage.coverage.has_value()) { + clip_coverage.coverage->origin += global_pass_position; } // The coverage hint tells the rendered Contents which portion of the // rendered output will actually be used, and so we set this to the current - // stencil coverage (which is the max clip bounds). The contents may + // clip coverage (which is the max clip bounds). The contents may // optionally use this hint to avoid unnecessary rendering work. if (element_entity.GetContents()->GetCoverageHint().has_value()) { // If the element already has a coverage hint (because its an advanced - // blend), then we need to intersect the stencil coverage hint with the + // blend), then we need to intersect the clip coverage hint with the // existing coverage hint. element_entity.GetContents()->SetCoverageHint( - current_stencil_coverage->Intersection( + current_clip_coverage->Intersection( element_entity.GetContents()->GetCoverageHint().value())); } else { - element_entity.GetContents()->SetCoverageHint(current_stencil_coverage); + element_entity.GetContents()->SetCoverageHint(current_clip_coverage); } - switch (stencil_coverage.type) { - case Contents::StencilCoverage::Type::kNoChange: + switch (clip_coverage.type) { + case Contents::ClipCoverage::Type::kNoChange: break; - case Contents::StencilCoverage::Type::kAppend: { - auto op = stencil_coverage_stack.back().coverage; - stencil_coverage_stack.push_back(StencilCoverageLayer{ - .coverage = stencil_coverage.coverage, - .stencil_depth = element_entity.GetStencilDepth() + 1}); - FML_DCHECK(stencil_coverage_stack.back().stencil_depth == - stencil_coverage_stack.size() - 1); + case Contents::ClipCoverage::Type::kAppend: { + auto op = clip_coverage_stack.back().coverage; + clip_coverage_stack.push_back( + ClipCoverageLayer{.coverage = clip_coverage.coverage, + .clip_depth = element_entity.GetClipDepth() + 1}); + FML_DCHECK(clip_coverage_stack.back().clip_depth == + clip_coverage_stack.size() - 1); if (!op.has_value()) { - // Running this append op won't impact the stencil because the whole - // screen is already being clipped, so skip it. + // Running this append op won't impact the clip buffer because the + // whole screen is already being clipped, so skip it. return true; } } break; - case Contents::StencilCoverage::Type::kRestore: { - if (stencil_coverage_stack.back().stencil_depth <= - element_entity.GetStencilDepth()) { - // Drop stencil restores that will do nothing. + case Contents::ClipCoverage::Type::kRestore: { + if (clip_coverage_stack.back().clip_depth <= + element_entity.GetClipDepth()) { + // Drop clip restores that will do nothing. return true; } - auto restoration_depth = element_entity.GetStencilDepth(); - FML_DCHECK(restoration_depth < stencil_coverage_stack.size()); + auto restoration_depth = element_entity.GetClipDepth(); + FML_DCHECK(restoration_depth < clip_coverage_stack.size()); // We only need to restore the area that covers the coverage of the - // stencil rect at target depth + 1. + // clip rect at target depth + 1. std::optional restore_coverage = - (restoration_depth + 1 < stencil_coverage_stack.size()) - ? stencil_coverage_stack[restoration_depth + 1].coverage + (restoration_depth + 1 < clip_coverage_stack.size()) + ? clip_coverage_stack[restoration_depth + 1].coverage : std::nullopt; if (restore_coverage.has_value()) { // Make the coverage rectangle relative to the current pass. restore_coverage->origin -= global_pass_position; } - stencil_coverage_stack.resize(restoration_depth + 1); + clip_coverage_stack.resize(restoration_depth + 1); - if (!stencil_coverage_stack.back().coverage.has_value()) { + if (!clip_coverage_stack.back().coverage.has_value()) { // Running this restore op won't make anything renderable, so skip it. return true; } @@ -856,8 +855,8 @@ bool EntityPass::OnRender( } #endif - element_entity.SetStencilDepth(element_entity.GetStencilDepth() - - stencil_depth_floor); + element_entity.SetClipDepth(element_entity.GetClipDepth() - + clip_depth_floor); if (!element_entity.Render(renderer, *result.pass)) { VALIDATION_LOG << "Failed to render entity."; return false; @@ -879,7 +878,7 @@ bool EntityPass::OnRender( backdrop_entity.SetContents(std::move(backdrop_filter_contents)); backdrop_entity.SetTransformation( Matrix::MakeTranslation(Vector3(-local_pass_position))); - backdrop_entity.SetStencilDepth(stencil_depth_floor); + backdrop_entity.SetClipDepth(clip_depth_floor); render_element(backdrop_entity); } @@ -900,15 +899,15 @@ bool EntityPass::OnRender( } EntityResult result = - GetEntityForElement(element, // element - renderer, // renderer - capture, // capture - pass_context, // pass_context - root_pass_size, // root_pass_size - global_pass_position, // global_pass_position - pass_depth, // pass_depth - stencil_coverage_stack, // stencil_coverage_stack - stencil_depth_floor); // stencil_depth_floor + GetEntityForElement(element, // element + renderer, // renderer + capture, // capture + pass_context, // pass_context + root_pass_size, // root_pass_size + global_pass_position, // global_pass_position + pass_depth, // pass_depth + clip_coverage_stack, // clip_coverage_stack + clip_depth_floor); // clip_depth_floor switch (result.status) { case EntityResult::kSuccess: @@ -1126,12 +1125,12 @@ void EntityPass::SetTransformation(Matrix xformation) { xformation_ = xformation; } -void EntityPass::SetStencilDepth(size_t stencil_depth) { - stencil_depth_ = stencil_depth; +void EntityPass::SetClipDepth(size_t clip_depth) { + clip_depth_ = clip_depth; } -size_t EntityPass::GetStencilDepth() { - return stencil_depth_; +size_t EntityPass::GetClipDepth() { + return clip_depth_; } void EntityPass::SetBlendMode(BlendMode blend_mode) { diff --git a/impeller/entity/entity_pass.h b/impeller/entity/entity_pass.h index d09649abfd9d0..522f4f9562b6e 100644 --- a/impeller/entity/entity_pass.h +++ b/impeller/entity/entity_pass.h @@ -43,12 +43,12 @@ class EntityPass { const Matrix& effect_transform, Entity::RenderingMode rendering_mode)>; - struct StencilCoverageLayer { + struct ClipCoverageLayer { std::optional coverage; - size_t stencil_depth; + size_t clip_depth; }; - using StencilCoverageStack = std::vector; + using ClipCoverageStack = std::vector; EntityPass(); @@ -129,9 +129,9 @@ class EntityPass { void SetTransformation(Matrix xformation); - void SetStencilDepth(size_t stencil_depth); + void SetClipDepth(size_t clip_depth); - size_t GetStencilDepth(); + size_t GetClipDepth(); void SetBlendMode(BlendMode blend_mode); @@ -182,8 +182,8 @@ class EntityPass { ISize root_pass_size, Point global_pass_position, uint32_t pass_depth, - StencilCoverageStack& stencil_coverage_stack, - size_t stencil_depth_floor) const; + ClipCoverageStack& clip_coverage_stack, + size_t clip_depth_floor) const; //---------------------------------------------------------------------------- /// @brief OnRender is the internal command recording routine for @@ -217,20 +217,20 @@ class EntityPass { /// and debugging purposes. This can vary /// depending on whether passes are /// collapsed or not. - /// @param[in] stencil_coverage_stack A global stack of coverage rectangles - /// for the stencil buffer at each depth. + /// @param[in] clip_coverage_stack A global stack of coverage rectangles + /// for the clip buffer at each depth. /// Higher depths are more restrictive. /// Used to cull Elements that we /// know won't result in a visible /// change. - /// @param[in] stencil_depth_floor The stencil depth that a value of + /// @param[in] clip_depth_floor The clip depth that a value of /// zero corresponds to in the given - /// `pass_target` stencil buffer. + /// `pass_target` clip buffer. /// When new `pass_target`s are created - /// for subpasses, their stencils are + /// for subpasses, their clip buffers are /// initialized at zero, and so this /// value is used to offset Entity clip - /// depths to match the stencil. + /// depths to match the clip buffer. /// @param[in] backdrop_filter_contents Optional. Is supplied, this contents /// is rendered prior to anything else in /// the `EntityPass`, offset by the @@ -249,8 +249,8 @@ class EntityPass { Point global_pass_position, Point local_pass_position, uint32_t pass_depth, - StencilCoverageStack& stencil_coverage_stack, - size_t stencil_depth_floor = 0, + ClipCoverageStack& clip_coverage_stack, + size_t clip_depth_floor = 0, std::shared_ptr backdrop_filter_contents = nullptr, const std::optional& collapsed_parent_pass = std::nullopt) const; @@ -261,7 +261,7 @@ class EntityPass { EntityPass* superpass_ = nullptr; Matrix xformation_; - size_t stencil_depth_ = 0u; + size_t clip_depth_ = 0u; BlendMode blend_mode_ = BlendMode::kSourceOver; bool flood_clip_ = false; bool enable_offscreen_debug_checkerboard_ = false; diff --git a/impeller/entity/entity_unittests.cc b/impeller/entity/entity_unittests.cc index ca094aa0fe54f..0eb86e8b9fc27 100644 --- a/impeller/entity/entity_unittests.cc +++ b/impeller/entity/entity_unittests.cc @@ -1631,12 +1631,12 @@ TEST_P(EntityTest, ClipContentsShouldRenderIsCorrect) { } } -TEST_P(EntityTest, ClipContentsGetStencilCoverageIsCorrect) { +TEST_P(EntityTest, ClipContentsGetClipCoverageIsCorrect) { // Intersection: No stencil coverage, no geometry. { auto clip = std::make_shared(); clip->SetClipOperation(Entity::ClipOperation::kIntersect); - auto result = clip->GetStencilCoverage(Entity{}, Rect{}); + auto result = clip->GetClipCoverage(Entity{}, Rect{}); ASSERT_FALSE(result.coverage.has_value()); } @@ -1647,7 +1647,7 @@ TEST_P(EntityTest, ClipContentsGetStencilCoverageIsCorrect) { clip->SetClipOperation(Entity::ClipOperation::kIntersect); clip->SetGeometry(Geometry::MakeFillPath( PathBuilder{}.AddRect(Rect::MakeLTRB(0, 0, 100, 100)).TakePath())); - auto result = clip->GetStencilCoverage(Entity{}, Rect{}); + auto result = clip->GetClipCoverage(Entity{}, Rect{}); ASSERT_FALSE(result.coverage.has_value()); } @@ -1657,7 +1657,7 @@ TEST_P(EntityTest, ClipContentsGetStencilCoverageIsCorrect) { auto clip = std::make_shared(); clip->SetClipOperation(Entity::ClipOperation::kIntersect); auto result = - clip->GetStencilCoverage(Entity{}, Rect::MakeLTRB(0, 0, 100, 100)); + clip->GetClipCoverage(Entity{}, Rect::MakeLTRB(0, 0, 100, 100)); ASSERT_FALSE(result.coverage.has_value()); } @@ -1669,11 +1669,11 @@ TEST_P(EntityTest, ClipContentsGetStencilCoverageIsCorrect) { clip->SetGeometry(Geometry::MakeFillPath( PathBuilder{}.AddRect(Rect::MakeLTRB(0, 0, 50, 50)).TakePath())); auto result = - clip->GetStencilCoverage(Entity{}, Rect::MakeLTRB(0, 0, 100, 100)); + clip->GetClipCoverage(Entity{}, Rect::MakeLTRB(0, 0, 100, 100)); ASSERT_TRUE(result.coverage.has_value()); ASSERT_RECT_NEAR(result.coverage.value(), Rect::MakeLTRB(0, 0, 50, 50)); - ASSERT_EQ(result.type, Contents::StencilCoverage::Type::kAppend); + ASSERT_EQ(result.type, Contents::ClipCoverage::Type::kAppend); } // Difference: With stencil coverage, with geometry. @@ -1683,11 +1683,11 @@ TEST_P(EntityTest, ClipContentsGetStencilCoverageIsCorrect) { clip->SetGeometry(Geometry::MakeFillPath( PathBuilder{}.AddRect(Rect::MakeLTRB(0, 0, 50, 50)).TakePath())); auto result = - clip->GetStencilCoverage(Entity{}, Rect::MakeLTRB(0, 0, 100, 100)); + clip->GetClipCoverage(Entity{}, Rect::MakeLTRB(0, 0, 100, 100)); ASSERT_TRUE(result.coverage.has_value()); ASSERT_RECT_NEAR(result.coverage.value(), Rect::MakeLTRB(0, 0, 100, 100)); - ASSERT_EQ(result.type, Contents::StencilCoverage::Type::kAppend); + ASSERT_EQ(result.type, Contents::ClipCoverage::Type::kAppend); } } From 064c901b8b2d384d8b5855e502e5bb4c095d6e8a Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Tue, 3 Oct 2023 16:06:09 -0600 Subject: [PATCH 446/859] Opt out `flutter/third_party/**` from clang-tidy checks explicitly. (#46514) See https://github.com/flutter/flutter/issues/134969. /cc @zanderso --- ci/licenses_golden/excluded_files | 1 + third_party/.clang-tidy | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 third_party/.clang-tidy diff --git a/ci/licenses_golden/excluded_files b/ci/licenses_golden/excluded_files index 4867cbe913422..44865d3cf1466 100644 --- a/ci/licenses_golden/excluded_files +++ b/ci/licenses_golden/excluded_files @@ -389,6 +389,7 @@ ../../../flutter/sky/tools/install_framework_headers.py ../../../flutter/sky/tools/objcopy.py ../../../flutter/testing +../../../flutter/third_party/.clang-tidy ../../../flutter/third_party/accessibility/README.md ../../../flutter/third_party/accessibility/ax/ax_enum_util_unittest.cc ../../../flutter/third_party/accessibility/ax/ax_event_generator_unittest.cc diff --git a/third_party/.clang-tidy b/third_party/.clang-tidy new file mode 100644 index 0000000000000..ef7500e1a8539 --- /dev/null +++ b/third_party/.clang-tidy @@ -0,0 +1,4 @@ +# Disable all checks in this folder. +# +# We cannot ask third_party code to conform to our lints. +Checks: "-*" From 1a6e6fa83ea2f8ab9073adc47009bd902ff6ab1a Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 3 Oct 2023 18:11:32 -0400 Subject: [PATCH 447/859] Roll Dart SDK from 318c46832196 to 817f77ceba40 (1 revision) (#46520) https://dart.googlesource.com/sdk.git/+log/318c46832196..817f77ceba40 2023-10-03 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-226.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC chinmaygarde@google.com,dart-vm-team@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 5eed70397fbf8..6d7d64a88c0cc 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '318c46832196b496253a82ac9ef073fcb920f3d1', + 'dart_revision': '817f77ceba40e25ee48eef6136f796fa07d76803', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index bd4cdb09d89c0..aa203ba4284c7 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: ad0ac18b25a0ebd730cd983e55cdc2e9 +Signature: bea8b5a4e00d6d17c00dc46504da979f ==================================================================================================== LIBRARY: dart From ead066afdcd1ad60d6e0908929290fb73c392ca4 Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Tue, 3 Oct 2023 16:14:20 -0600 Subject: [PATCH 448/859] [Impeller] Invoke `glDebugMessageControl` before `glPushDebugGroup` (#46392) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes https://github.com/flutter/flutter/issues/135715. I plan to add tests before submitting once https://github.com/flutter/engine/pull/46433 lands, probably something around `glDebugMessageControl` being emitted once per context, since that's what we need to keep working for Pixel phones. ## Output
Screenshot of app running locally, showing lack of off-screen MSAA ![flutter_01](https://github.com/flutter/engine/assets/168174/23642582-ce4c-47dc-8edf-7e6cfd12a074)
```shell $ fl run --enable-impeller --local-engine=$ENGINE/out/android_debug_unopt_arm64 --local-engine-host=$ENGINE/out/host_debug_unopt_arm64 Launching lib/main.dart on Pixel 5 in debug mode... Running Gradle task 'assembleDebug'... 33.7s ✓ Built build/app/outputs/flutter-apk/app-debug.apk. Installing build/app/outputs/flutter-apk/app-debug.apk... 17.8s E/flutter (17749): [ERROR:flutter/shell/platform/android/android_context_gl_impeller.cc(80)] Using the Impeller rendering backend (OpenGLES). Syncing files to device Pixel 5... 70ms Flutter run key commands. r Hot reload. 🔥🔥🔥 R Hot restart. h List all available interactive commands. d Detach (terminate "flutter run" but leave application running). c Clear the screen q Quit (terminate the application on the device). A Dart VM Service on Pixel 5 is available at: http://127.0.0.1:57181/CrsakIgCHFY=/ I/cle_opacity_foo(17749): Compiler allocated 4413KB to compile void android.view.ViewRootImpl.performTraversals() The Flutter DevTools debugger and profiler on Pixel 5 is available at: http://127.0.0.1:9101?uri=http://127.0.0.1:57181/CrsakIgCHFY=/ ``` --- .../renderer/backend/gles/blit_pass_gles.cc | 8 +------- .../renderer/backend/gles/description_gles.h | 3 ++- .../backend/gles/pipeline_library_gles.cc | 1 + .../renderer/backend/gles/proc_table_gles.cc | 2 ++ .../renderer/backend/gles/proc_table_gles.h | 1 + impeller/renderer/backend/gles/reactor_gles.cc | 18 ++++++++++++++++++ impeller/renderer/backend/gles/reactor_gles.h | 8 ++++---- .../renderer/backend/gles/render_pass_gles.cc | 1 + 8 files changed, 30 insertions(+), 12 deletions(-) diff --git a/impeller/renderer/backend/gles/blit_pass_gles.cc b/impeller/renderer/backend/gles/blit_pass_gles.cc index 797f28364b790..92364c4c7cf20 100644 --- a/impeller/renderer/backend/gles/blit_pass_gles.cc +++ b/impeller/renderer/backend/gles/blit_pass_gles.cc @@ -4,19 +4,13 @@ #include "impeller/renderer/backend/gles/blit_pass_gles.h" -#include #include #include "flutter/fml/trace_event.h" -#include "impeller/base/config.h" -#include "impeller/base/validation.h" +#include "fml/closure.h" #include "impeller/core/formats.h" #include "impeller/renderer/backend/gles/blit_command_gles.h" -#include "impeller/renderer/backend/gles/device_buffer_gles.h" -#include "impeller/renderer/backend/gles/formats_gles.h" -#include "impeller/renderer/backend/gles/pipeline_gles.h" #include "impeller/renderer/backend/gles/proc_table_gles.h" -#include "impeller/renderer/backend/gles/texture_gles.h" namespace impeller { diff --git a/impeller/renderer/backend/gles/description_gles.h b/impeller/renderer/backend/gles/description_gles.h index 7630d431c9282..bac5935b7298e 100644 --- a/impeller/renderer/backend/gles/description_gles.h +++ b/impeller/renderer/backend/gles/description_gles.h @@ -16,7 +16,7 @@ class ProcTableGLES; class DescriptionGLES { public: - DescriptionGLES(const ProcTableGLES& gl); + explicit DescriptionGLES(const ProcTableGLES& gl); ~DescriptionGLES(); @@ -28,6 +28,7 @@ class DescriptionGLES { bool HasExtension(const std::string& ext) const; + /// @brief Returns whether GLES includes the debug extension. bool HasDebugExtension() const; private: diff --git a/impeller/renderer/backend/gles/pipeline_library_gles.cc b/impeller/renderer/backend/gles/pipeline_library_gles.cc index 8ad3bcc9aaa7c..b0190826e5771 100644 --- a/impeller/renderer/backend/gles/pipeline_library_gles.cc +++ b/impeller/renderer/backend/gles/pipeline_library_gles.cc @@ -9,6 +9,7 @@ #include "flutter/fml/container.h" #include "flutter/fml/trace_event.h" +#include "fml/closure.h" #include "impeller/base/promise.h" #include "impeller/renderer/backend/gles/pipeline_gles.h" #include "impeller/renderer/backend/gles/shader_function_gles.h" diff --git a/impeller/renderer/backend/gles/proc_table_gles.cc b/impeller/renderer/backend/gles/proc_table_gles.cc index 5a5212ad4c9e7..1a13757354725 100644 --- a/impeller/renderer/backend/gles/proc_table_gles.cc +++ b/impeller/renderer/backend/gles/proc_table_gles.cc @@ -322,6 +322,7 @@ void ProcTableGLES::PushDebugGroup(const std::string& label) const { if (debug_label_max_length_ <= 0) { return; } + UniqueID id; const auto label_length = std::min(debug_label_max_length_ - 1, label.size()); @@ -336,6 +337,7 @@ void ProcTableGLES::PopDebugGroup() const { if (debug_label_max_length_ <= 0) { return; } + PopDebugGroupKHR(); } diff --git a/impeller/renderer/backend/gles/proc_table_gles.h b/impeller/renderer/backend/gles/proc_table_gles.h index b9b22d3187b2d..e3f5e30b49cdb 100644 --- a/impeller/renderer/backend/gles/proc_table_gles.h +++ b/impeller/renderer/backend/gles/proc_table_gles.h @@ -179,6 +179,7 @@ struct GLProc { #define FOR_EACH_IMPELLER_GLES3_PROC(PROC) PROC(BlitFramebuffer); #define FOR_EACH_IMPELLER_EXT_PROC(PROC) \ + PROC(DebugMessageControlKHR); \ PROC(DiscardFramebufferEXT); \ PROC(FramebufferTexture2DMultisampleEXT) \ PROC(PushDebugGroupKHR); \ diff --git a/impeller/renderer/backend/gles/reactor_gles.cc b/impeller/renderer/backend/gles/reactor_gles.cc index f4d9ca9396233..81d1afb4bc697 100644 --- a/impeller/renderer/backend/gles/reactor_gles.cc +++ b/impeller/renderer/backend/gles/reactor_gles.cc @@ -7,6 +7,7 @@ #include #include "flutter/fml/trace_event.h" +#include "fml/logging.h" #include "impeller/base/validation.h" namespace impeller { @@ -233,6 +234,13 @@ bool ReactorGLES::ConsolidateHandles() { bool ReactorGLES::FlushOps() { TRACE_EVENT0("impeller", __FUNCTION__); + +#ifdef IMPELLER_DEBUG + // glDebugMessageControl sometimes must be called before glPushDebugGroup: + // https://github.com/flutter/flutter/issues/135715#issuecomment-1740153506 + SetupDebugGroups(); +#endif + // Do NOT hold the ops or handles locks while performing operations in case // the ops enqueue more ops. decltype(ops_) ops; @@ -247,6 +255,16 @@ bool ReactorGLES::FlushOps() { return true; } +void ReactorGLES::SetupDebugGroups() { + // Setup of a default active debug group: Filter everything in. + proc_table_->DebugMessageControlKHR(GL_DONT_CARE, // source + GL_DONT_CARE, // type + GL_DONT_CARE, // severity + 0, // count + nullptr, // ids + GL_TRUE); // enabled +} + void ReactorGLES::SetDebugLabel(const HandleGLES& handle, std::string label) { if (!can_set_debug_labels_) { return; diff --git a/impeller/renderer/backend/gles/reactor_gles.h b/impeller/renderer/backend/gles/reactor_gles.h index 70d3bda65b77f..801542b4fb27a 100644 --- a/impeller/renderer/backend/gles/reactor_gles.h +++ b/impeller/renderer/backend/gles/reactor_gles.h @@ -8,7 +8,6 @@ #include #include -#include "flutter/fml/closure.h" #include "flutter/fml/macros.h" #include "impeller/base/thread.h" #include "impeller/renderer/backend/gles/handle_gles.h" @@ -30,7 +29,7 @@ class ReactorGLES { using Ref = std::shared_ptr; - ReactorGLES(std::unique_ptr gl); + explicit ReactorGLES(std::unique_ptr gl); ~ReactorGLES(); @@ -63,8 +62,7 @@ class ReactorGLES { LiveHandle() = default; - explicit LiveHandle(std::optional p_name) - : name(std::move(p_name)) {} + explicit LiveHandle(std::optional p_name) : name(p_name) {} constexpr bool IsLive() const { return name.has_value(); } }; @@ -100,6 +98,8 @@ class ReactorGLES { bool FlushOps(); + void SetupDebugGroups(); + FML_DISALLOW_COPY_AND_ASSIGN(ReactorGLES); }; diff --git a/impeller/renderer/backend/gles/render_pass_gles.cc b/impeller/renderer/backend/gles/render_pass_gles.cc index 735f8a85495f5..aa25492524c33 100644 --- a/impeller/renderer/backend/gles/render_pass_gles.cc +++ b/impeller/renderer/backend/gles/render_pass_gles.cc @@ -5,6 +5,7 @@ #include "impeller/renderer/backend/gles/render_pass_gles.h" #include "flutter/fml/trace_event.h" +#include "fml/closure.h" #include "impeller/base/validation.h" #include "impeller/renderer/backend/gles/device_buffer_gles.h" #include "impeller/renderer/backend/gles/formats_gles.h" From d4c9196a52cd58df50649c23f70d6931dcc48ca0 Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Tue, 3 Oct 2023 16:23:25 -0600 Subject: [PATCH 449/859] [Impeller] Implement a `MockGLES`, that provides trampolines for `ProcGLESTable` (#46433) Unblocks testing https://github.com/flutter/flutter/issues/135715. See `README.md` for details. I made one non-testing change to the proc_table itself, which is if a function call will fail, we will print out what is about to fail in the validation log. It was useful when debugging the test creation itself, and it's only enabled when GL call checks are enabled anyway. @gaaclarke I originally implemented it with `FML_THREAD_LOCAL`, but figured doing a global lock essentially was the same thing, and would prevent parallel test runs from stepping on each-other in weird ways? /cc @chinmaygarde for visibility. --- ci/licenses_golden/excluded_files | 1 + impeller/BUILD.gn | 4 + impeller/renderer/backend/gles/BUILD.gn | 14 ++ .../renderer/backend/gles/proc_table_gles.h | 13 +- impeller/renderer/backend/gles/test/README.md | 48 ++++++ .../renderer/backend/gles/test/mock_gles.cc | 147 ++++++++++++++++++ .../renderer/backend/gles/test/mock_gles.h | 57 +++++++ .../backend/gles/test/mock_gles_unittests.cc | 48 ++++++ 8 files changed, 331 insertions(+), 1 deletion(-) create mode 100644 impeller/renderer/backend/gles/test/README.md create mode 100644 impeller/renderer/backend/gles/test/mock_gles.cc create mode 100644 impeller/renderer/backend/gles/test/mock_gles.h create mode 100644 impeller/renderer/backend/gles/test/mock_gles_unittests.cc diff --git a/ci/licenses_golden/excluded_files b/ci/licenses_golden/excluded_files index 44865d3cf1466..e9dec480e9a60 100644 --- a/ci/licenses_golden/excluded_files +++ b/ci/licenses_golden/excluded_files @@ -154,6 +154,7 @@ ../../../flutter/impeller/golden_tests_harvester/test ../../../flutter/impeller/image/README.md ../../../flutter/impeller/playground +../../../flutter/impeller/renderer/backend/gles/test ../../../flutter/impeller/renderer/backend/vulkan/blit_command_vk_unittests.cc ../../../flutter/impeller/renderer/backend/vulkan/command_encoder_vk_unittests.cc ../../../flutter/impeller/renderer/backend/vulkan/command_pool_vk_unittests.cc diff --git a/impeller/BUILD.gn b/impeller/BUILD.gn index c89a89f7f34ea..9214c02f119b0 100644 --- a/impeller/BUILD.gn +++ b/impeller/BUILD.gn @@ -109,6 +109,10 @@ impeller_component("impeller_unittests") { deps += [ "//flutter/impeller/renderer/backend/vulkan:vulkan_unittests" ] } + if (impeller_enable_opengles) { + deps += [ "//flutter/impeller/renderer/backend/gles:gles_unittests" ] + } + if (glfw_vulkan_library != "") { deps += [ "//third_party/swiftshader", diff --git a/impeller/renderer/backend/gles/BUILD.gn b/impeller/renderer/backend/gles/BUILD.gn index 7141abc3304ed..39b112fcb9295 100644 --- a/impeller/renderer/backend/gles/BUILD.gn +++ b/impeller/renderer/backend/gles/BUILD.gn @@ -2,6 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("//flutter/vulkan/config.gni") import("../../../tools/impeller.gni") config("gles_config") { @@ -10,6 +11,19 @@ config("gles_config") { include_dirs = [ "//third_party/angle/include" ] } +impeller_component("gles_unittests") { + testonly = true + sources = [ + "test/mock_gles.cc", + "test/mock_gles.h", + "test/mock_gles_unittests.cc", + ] + deps = [ + ":gles", + "//flutter/testing:testing_lib", + ] +} + impeller_component("gles") { public_configs = [] diff --git a/impeller/renderer/backend/gles/proc_table_gles.h b/impeller/renderer/backend/gles/proc_table_gles.h index e3f5e30b49cdb..831c909e7a6e6 100644 --- a/impeller/renderer/backend/gles/proc_table_gles.h +++ b/impeller/renderer/backend/gles/proc_table_gles.h @@ -21,6 +21,9 @@ bool GLErrorIsFatal(GLenum value); struct AutoErrorCheck { const PFNGLGETERRORPROC error_fn; + + // TODO(matanlurey) Change to string_view. + // https://github.com/flutter/flutter/issues/135922 const char* name; AutoErrorCheck(PFNGLGETERRORPROC error, const char* name) @@ -49,6 +52,9 @@ template struct GLProc { using GLFunctionType = T; + // TODO(matanlurey) Change to string_view. + // https://github.com/flutter/flutter/issues/135922 + //---------------------------------------------------------------------------- /// The name of the GL function. /// @@ -75,6 +81,11 @@ struct GLProc { auto operator()(Args&&... args) const { #ifdef IMPELLER_DEBUG AutoErrorCheck error(error_fn, name); + // We check for the existence of extensions, and reset the function pointer + // but it's still called unconditionally below, and will segfault. This + // validation log will at least give us a hint as to what's going on. + FML_CHECK(IsAvailable()) << "GL function " << name << " is not available. " + << "This is likely due to a missing extension."; #endif // IMPELLER_DEBUG #ifdef IMPELLER_TRACE_ALL_GL_CALLS TRACE_EVENT0("impeller", name); @@ -85,7 +96,6 @@ struct GLProc { constexpr bool IsAvailable() const { return function != nullptr; } void Reset() { - name = nullptr; function = nullptr; error_fn = nullptr; } @@ -200,6 +210,7 @@ class ProcTableGLES { public: using Resolver = std::function; explicit ProcTableGLES(Resolver resolver); + ProcTableGLES(ProcTableGLES&& other) = default; ~ProcTableGLES(); diff --git a/impeller/renderer/backend/gles/test/README.md b/impeller/renderer/backend/gles/test/README.md new file mode 100644 index 0000000000000..dd9d028e1b8bd --- /dev/null +++ b/impeller/renderer/backend/gles/test/README.md @@ -0,0 +1,48 @@ +# `MockGLES` + +This directory contains a mock implementation of the GLES backend. + +Most functions are implemented as no-ops, have a default implementation that is not configurable, or just record the call. The latter is useful for testing: + +```cc +TEST(MockGLES, Example) { + // Creates a mock GLES implementation and sets it as the current one. + auto mock_gles = MockGLES::Init(); + auto& gl = mock_gles->GetProcTable(); + + // Call the proc table methods as usual, or pass the proc table to a class + // that needs it. + gl.PushDebugGroupKHR(GL_DEBUG_SOURCE_APPLICATION_KHR, 0, -1, "test"); + gl.PopDebugGroupKHR(); + + // Method names are recorded and can be inspected. + // + // Note that many built-ins, like glGetString, are not recorded (otherwise the // logs would be much bigger and less useful). + auto calls = mock_gles->GetCapturedCalls(); + EXPECT_EQ(calls, std::vector( + {"PushDebugGroupKHR", "PopDebugGroupKHR"})); +} +``` + +To add a new function, do the following: + +1. Add a new top-level method to [`mock_gles.cc`](mock_gles.cc): + + ```cc + void glFooBar() { + recordCall("glFooBar"); + } + ``` + +2. Edit the `kMockResolver`, and add a new `else if` clause: + + ```diff + + else if (strcmp(name, "glFooBar") == 0) { + + return reinterpret_cast(&glFooBar); + } else { + return reinterpret_cast(&glDoNothing); + } + ``` + +It's possible we'll want to add a more sophisticated mechanism for mocking +besides capturing calls, but this is a good start. PRs welcome! diff --git a/impeller/renderer/backend/gles/test/mock_gles.cc b/impeller/renderer/backend/gles/test/mock_gles.cc new file mode 100644 index 0000000000000..3d4f9802b92fb --- /dev/null +++ b/impeller/renderer/backend/gles/test/mock_gles.cc @@ -0,0 +1,147 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include + +#include "GLES3/gl3.h" +#include "fml/logging.h" +#include "impeller/renderer/backend/gles/proc_table_gles.h" +#include "impeller/renderer/backend/gles/test/mock_gles.h" + +namespace impeller { +namespace testing { + +// OpenGLES is not thread safe. +// +// This mutex is used to ensure that only one test is using the mock at a time. +static std::mutex g_test_lock; + +static std::weak_ptr g_mock_gles; + +// Has friend visibility into MockGLES to record calls. +void RecordGLCall(const char* name) { + if (auto mock_gles = g_mock_gles.lock()) { + mock_gles->RecordCall(name); + } +} + +template +struct CheckSameSignature : std::false_type {}; + +template +struct CheckSameSignature : std::true_type {}; + +// This is a stub function that does nothing/records nothing. +void doNothing() {} + +auto const kMockVendor = (unsigned char*)"MockGLES"; +auto const kMockVersion = (unsigned char*)"3.0"; +auto const kExtensions = std::vector{ + (unsigned char*)"GL_KHR_debug" // +}; + +const unsigned char* mockGetString(GLenum name) { + switch (name) { + case GL_VENDOR: + return kMockVendor; + case GL_VERSION: + return kMockVersion; + case GL_SHADING_LANGUAGE_VERSION: + return kMockVersion; + default: + return (unsigned char*)""; + } +} + +static_assert(CheckSameSignature::value); + +const unsigned char* mockGetStringi(GLenum name, GLuint index) { + switch (name) { + case GL_EXTENSIONS: + return kExtensions[index]; + default: + return (unsigned char*)""; + } +} + +static_assert(CheckSameSignature::value); + +void mockGetIntegerv(GLenum name, int* value) { + switch (name) { + case GL_NUM_EXTENSIONS: { + *value = kExtensions.size(); + } break; + case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS: + *value = 8; + break; + default: + *value = 0; + break; + } +} + +static_assert(CheckSameSignature::value); + +GLenum mockGetError() { + return GL_NO_ERROR; +} + +static_assert(CheckSameSignature::value); + +void mockPopDebugGroupKHR() { + RecordGLCall("PopDebugGroupKHR"); +} + +static_assert(CheckSameSignature::value); + +void mockPushDebugGroupKHR(GLenum source, + GLuint id, + GLsizei length, + const GLchar* message) { + RecordGLCall("PushDebugGroupKHR"); +} + +static_assert(CheckSameSignature::value); + +std::shared_ptr MockGLES::Init() { + // If we cannot obtain a lock, MockGLES is already being used elsewhere. + FML_CHECK(g_test_lock.try_lock()) + << "MockGLES is already being used by another test."; + auto mock_gles = std::shared_ptr(new MockGLES()); + g_mock_gles = mock_gles; + return mock_gles; +} + +const ProcTableGLES::Resolver kMockResolver = [](const char* name) { + if (strcmp(name, "glPopDebugGroupKHR") == 0) { + return reinterpret_cast(&mockPopDebugGroupKHR); + } else if (strcmp(name, "glPushDebugGroupKHR") == 0) { + return reinterpret_cast(&mockPushDebugGroupKHR); + } else if (strcmp(name, "glGetString") == 0) { + return reinterpret_cast(&mockGetString); + } else if (strcmp(name, "glGetStringi") == 0) { + return reinterpret_cast(&mockGetStringi); + } else if (strcmp(name, "glGetIntegerv") == 0) { + return reinterpret_cast(&mockGetIntegerv); + } else if (strcmp(name, "glGetError") == 0) { + return reinterpret_cast(&mockGetError); + } else { + return reinterpret_cast(&doNothing); + } +}; + +MockGLES::MockGLES() : proc_table_(kMockResolver) {} + +MockGLES::~MockGLES() { + g_test_lock.unlock(); +} + +} // namespace testing +} // namespace impeller diff --git a/impeller/renderer/backend/gles/test/mock_gles.h b/impeller/renderer/backend/gles/test/mock_gles.h new file mode 100644 index 0000000000000..ec548edce16d3 --- /dev/null +++ b/impeller/renderer/backend/gles/test/mock_gles.h @@ -0,0 +1,57 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include +#include "fml/macros.h" +#include "impeller/renderer/backend/gles/proc_table_gles.h" + +namespace impeller { +namespace testing { + +/// @brief Provides a mocked version of the |ProcTableGLES| class. +/// +/// Typically, Open GLES at runtime will be provided the host's GLES bindings +/// (as function pointers). This class maintains a set of function pointers that +/// appear to be GLES functions, but are actually just stubs that record +/// invocations. +/// +/// See `README.md` for more information. +class MockGLES final { + public: + /// @brief Returns an initialized |MockGLES| instance. + /// + /// This method overwrites mocked global GLES function pointers to record + /// invocations on this instance of |MockGLES|. As such, it should only be + /// called once per test. + static std::shared_ptr Init(); + + /// @brief Returns a configured |ProcTableGLES| instance. + const ProcTableGLES& GetProcTable() const { return proc_table_; } + + /// @brief Returns a vector of the names of all recorded calls. + /// + /// Calls are cleared after this method is called. + std::vector GetCapturedCalls() { + std::vector calls = captured_calls_; + captured_calls_.clear(); + return calls; + } + + ~MockGLES(); + + private: + friend void RecordGLCall(const char* name); + + MockGLES(); + + void RecordCall(const char* name) { captured_calls_.emplace_back(name); } + + const ProcTableGLES proc_table_; + std::vector captured_calls_; + + FML_DISALLOW_COPY_AND_ASSIGN(MockGLES); +}; + +} // namespace testing +} // namespace impeller diff --git a/impeller/renderer/backend/gles/test/mock_gles_unittests.cc b/impeller/renderer/backend/gles/test/mock_gles_unittests.cc new file mode 100644 index 0000000000000..a6c248b04ffcf --- /dev/null +++ b/impeller/renderer/backend/gles/test/mock_gles_unittests.cc @@ -0,0 +1,48 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "flutter/testing/testing.h" // IWYU pragma: keep +#include "gtest/gtest.h" +#include "impeller/renderer/backend/gles/proc_table_gles.h" +#include "impeller/renderer/backend/gles/test/mock_gles.h" + +namespace impeller { +namespace testing { + +// This test just checks that the proc table is initialized correctly. +// +// If this test doesn't pass, no test that uses the proc table will pass. +TEST(MockGLES, CanInitialize) { + auto mock_gles = MockGLES::Init(); + + EXPECT_EQ(mock_gles->GetProcTable().GetString(GL_VENDOR), + (unsigned char*)"MockGLES"); +} + +// Tests we can call two functions and capture the calls. +TEST(MockGLES, CapturesPushAndPopDebugGroup) { + auto mock_gles = MockGLES::Init(); + + auto& gl = mock_gles->GetProcTable(); + gl.PushDebugGroupKHR(GL_DEBUG_SOURCE_APPLICATION_KHR, 0, -1, "test"); + gl.PopDebugGroupKHR(); + + auto calls = mock_gles->GetCapturedCalls(); + EXPECT_EQ(calls, std::vector( + {"PushDebugGroupKHR", "PopDebugGroupKHR"})); +} + +// Tests that if we call a function we have not mocked, it's OK. +TEST(MockGLES, CanCallUnmockedFunction) { + auto mock_gles = MockGLES::Init(); + + auto& gl = mock_gles->GetProcTable(); + gl.DeleteFramebuffers(1, nullptr); + + // Test should still complete. + // If we end up mocking DeleteFramebuffers, delete this test. +} + +} // namespace testing +} // namespace impeller From 3c6ce68d24ea76e07278829dc51743cc3239803c Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 3 Oct 2023 18:51:04 -0400 Subject: [PATCH 450/859] Roll Skia from c66c89c56549 to 4cc56b6b3453 (1 revision) (#46525) https://skia.googlesource.com/skia.git/+log/c66c89c56549..4cc56b6b3453 2023-10-03 jvanverth@google.com Move some functionality for PathAtlas into Compute and Raster. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 6d7d64a88c0cc..4a93d513f37d2 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'c66c89c56549d84827a4fb458b3a224a6e27bc06', + 'skia_revision': '4cc56b6b3453f1b4cc772b9cb0589a7725a97be0', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index fe5a117b1db45..c4a62f7764d20 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 4015261b075c10fefce9e2201da110d9 +Signature: 57a2fcac3a6eb59d57b3ef208038deed ==================================================================================================== LIBRARY: etc1 From 0c37086ceb7e4b1ad97d65f0f6536d17c1163630 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 3 Oct 2023 19:48:07 -0400 Subject: [PATCH 451/859] Roll Skia from 4cc56b6b3453 to ee415cab7955 (1 revision) (#46527) https://skia.googlesource.com/skia.git/+log/4cc56b6b3453..ee415cab7955 2023-10-03 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll ANGLE from 1cab871c2207 to f29f73d9f063 (20 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 4a93d513f37d2..d9e4923aa1ff8 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '4cc56b6b3453f1b4cc772b9cb0589a7725a97be0', + 'skia_revision': 'ee415cab7955b77185a22c76bf8f49082e7c4ddf', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 66ee125c4ef990af6cfbba4379b85ce1fb488216 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 3 Oct 2023 21:19:49 -0400 Subject: [PATCH 452/859] Roll Skia from ee415cab7955 to aec80c6c8983 (1 revision) (#46528) https://skia.googlesource.com/skia.git/+log/ee415cab7955..aec80c6c8983 2023-10-04 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 5d68d7e207a5 to c572662924c3 (6 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index d9e4923aa1ff8..f3f8cb4efc67b 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'ee415cab7955b77185a22c76bf8f49082e7c4ddf', + 'skia_revision': 'aec80c6c8983f974ef76ed73c9dce9ed87ee006d', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 7e0e8898c7dd856fac4a1589731f363b6baf0094 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 3 Oct 2023 21:51:18 -0400 Subject: [PATCH 453/859] Roll Dart SDK from 817f77ceba40 to c819e51c8a94 (1 revision) (#46529) https://dart.googlesource.com/sdk.git/+log/817f77ceba40..c819e51c8a94 2023-10-04 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-227.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC chinmaygarde@google.com,dart-vm-team@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index f3f8cb4efc67b..b18bf61db05e0 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '817f77ceba40e25ee48eef6136f796fa07d76803', + 'dart_revision': 'c819e51c8a942561f2ace36dfe22378880a39d3f', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py @@ -427,7 +427,7 @@ deps = { Var('dart_git') + '/mockito.git@097e5635a6c1859e03e9c606c2ab4cfa74618bcc', 'src/third_party/dart/third_party/pkg/native': - Var('dart_git') + '/native.git@be4aaf7b849a64d67756c95b6270b9bfe47f3c7d', + Var('dart_git') + '/native.git@7aaa0259c48df8fef4afc222a3c40569a0e881ef', 'src/third_party/dart/third_party/pkg/package_config': Var('dart_git') + '/package_config.git@ae7ad83de97aba507fd05e97cc372bc6695c1759', From 3139f3bb08eaf576392359967d2c7edb0a08e853 Mon Sep 17 00:00:00 2001 From: Jia Hao Date: Wed, 4 Oct 2023 02:29:17 +0000 Subject: [PATCH 454/859] [Impeller] Don't define `CanvasRecorder` if `IMPELLER_TRACE_CANVAS` is not set. (#46476) Internal bug: b/303067268 https://github.com/flutter/engine/pull/46376 is causing a breakage to the internal engine build because of https://github.com/flutter/engine/blob/150d1b6ab51f34c07e21fc32ef76e4842edd4d04/impeller/aiks/canvas_recorder.h#L58-L62. Internally, we do not set `IMPELLER_TRACE_CANVAS`. It looks like the cause is that the internal toolchain causes the `static_assert` to be compiled even though the template is not instantiated. @chingjun helped me to figure out the following: https://stackoverflow.com/questions/5246049/c11-static-assert-and-template-instantiation points us to the spec. In the later version (ISO/IEC 14882:2017(E)): > The program is ill-formed, no diagnostic required, if ... no valid specialization can be generated for a template or a substatement of a constexpr if statement (9.4.1) within a template and the template is not instantiated,
The relevant section ![The relevant section of the spec](https://github.com/flutter/engine/assets/7111741/4503efcd-9479-4c7a-b4a1-7302dea1653b)
Interpretation: the compiler can either choose to emit the error caused by the `static_assert` or not. Currently the compiler used by the build here on LUCI does not; internally it does. For example, the following links shows that simply changing the Clang version affects whether the error appears or not for a minimal template. - ok: https://godbolt.org/z/n9nYrcvcP - not ok: https://godbolt.org/z/fWcvdcn35 Hence, `#ifdef` out the class instead of using a `static_assert` for more consistent behavior across these two toolchains. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- impeller/aiks/canvas_recorder.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/impeller/aiks/canvas_recorder.h b/impeller/aiks/canvas_recorder.h index 56601207f86ad..62711c13fcc92 100644 --- a/impeller/aiks/canvas_recorder.h +++ b/impeller/aiks/canvas_recorder.h @@ -47,6 +47,9 @@ enum CanvasRecorderOp : uint16_t { DrawAtlas, }; +// Canvas recorder should only be used when IMPELLER_TRACE_CANVAS is defined +// (never in production code). +#ifdef IMPELLER_TRACE_CANVAS /// Static polymorphic replacement for impeller::Canvas that records methods /// called on an impeller::Canvas and forwards it to a real instance. /// TODO(https://github.com/flutter/flutter/issues/135718): Move this recorder @@ -55,12 +58,6 @@ enum CanvasRecorderOp : uint16_t { template class CanvasRecorder { public: -#ifndef IMPELLER_TRACE_CANVAS - // Canvas recorder should only be used when IMPELLER_TRACE_CANVAS is defined - // (never in production code). - static_assert(false); -#endif - CanvasRecorder() : canvas_() { serializer_.Write(CanvasRecorderOp::New); } explicit CanvasRecorder(Rect cull_rect) : canvas_(cull_rect) { @@ -286,5 +283,6 @@ class CanvasRecorder { Canvas canvas_; Serializer serializer_; }; +#endif } // namespace impeller From 099b7cff2fc25bd71c22042baa628287c8b5a7ff Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 4 Oct 2023 00:34:19 -0400 Subject: [PATCH 455/859] Roll Fuchsia Linux SDK from SQrHxRVqMo5arcS3p... to tpiob-Qyh6oYiIznS... (#46532) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC chinmaygarde@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index b18bf61db05e0..1eb45e6776378 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'SQrHxRVqMo5arcS3pKfvDqGxWx4HHmM4X-0BsKXuSmMC' + 'version': 'tpiob-Qyh6oYiIznSegK2s0Qm_-Qx2oaFuWMiK66AaoC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index b131c4da0b9fa..5cdb73c8c5fa7 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: 5d0552eaa9233599d8efcccc097464f9 +Signature: cadc5509477b0c63164ca1f5a1c54689 ==================================================================================================== LIBRARY: fuchsia_sdk @@ -3756,10 +3756,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. LIBRARY: fuchsia_sdk ORIGIN: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/errors.h + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/internal/cdecls.inc + ../../../fuchsia/sdk/linux/LICENSE +ORIGIN: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/iob.h + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/arch/riscv64/sysroot/include/zircon/errors.h + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/arch/riscv64/sysroot/include/zircon/syscalls/internal/cdecls.inc + ../../../fuchsia/sdk/linux/LICENSE +ORIGIN: ../../../fuchsia/sdk/linux/arch/riscv64/sysroot/include/zircon/syscalls/iob.h + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/errors.h + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/internal/cdecls.inc + ../../../fuchsia/sdk/linux/LICENSE +ORIGIN: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/iob.h + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/bind/fuchsia/fuchsia.bind + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/dart/sl4f/lib/src/performance_publish.dart + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/dart/sl4f/lib/src/trace_processing/metrics/power_metrics.dart + ../../../fuchsia/sdk/linux/LICENSE @@ -4013,10 +4016,13 @@ ORIGIN: ../../../fuchsia/sdk/linux/pkg/vulkan/client.shard.cml + ../../../fuchsi TYPE: LicenseType.bsd FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/errors.h FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/internal/cdecls.inc +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/iob.h FILE: ../../../fuchsia/sdk/linux/arch/riscv64/sysroot/include/zircon/errors.h FILE: ../../../fuchsia/sdk/linux/arch/riscv64/sysroot/include/zircon/syscalls/internal/cdecls.inc +FILE: ../../../fuchsia/sdk/linux/arch/riscv64/sysroot/include/zircon/syscalls/iob.h FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/errors.h FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/internal/cdecls.inc +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/iob.h FILE: ../../../fuchsia/sdk/linux/bind/fuchsia/fuchsia.bind FILE: ../../../fuchsia/sdk/linux/dart/sl4f/lib/src/performance_publish.dart FILE: ../../../fuchsia/sdk/linux/dart/sl4f/lib/src/trace_processing/metrics/power_metrics.dart @@ -4360,6 +4366,8 @@ ORIGIN: ../../../fuchsia/sdk/linux/pkg/inspect/offer.shard.cml + ../../../fuchsi ORIGIN: ../../../fuchsia/sdk/linux/pkg/inspect/use.shard.cml + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/pkg/sync_cpp/include/lib/sync/cpp/mutex.h + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/pkg/sys_service_cpp/service_handler.cc + ../../../fuchsia/sdk/linux/LICENSE +ORIGIN: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/iob.h + ../../../fuchsia/sdk/linux/LICENSE +ORIGIN: ../../../fuchsia/sdk/linux/pkg/zx/iob.cc + ../../../fuchsia/sdk/linux/LICENSE TYPE: LicenseType.bsd FILE: ../../../fuchsia/sdk/linux/dart/sl4f/lib/src/flatland_example.dart FILE: ../../../fuchsia/sdk/linux/dart/sl4f/lib/src/media_session.dart @@ -4425,6 +4433,8 @@ FILE: ../../../fuchsia/sdk/linux/pkg/inspect/offer.shard.cml FILE: ../../../fuchsia/sdk/linux/pkg/inspect/use.shard.cml FILE: ../../../fuchsia/sdk/linux/pkg/sync_cpp/include/lib/sync/cpp/mutex.h FILE: ../../../fuchsia/sdk/linux/pkg/sys_service_cpp/service_handler.cc +FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/iob.h +FILE: ../../../fuchsia/sdk/linux/pkg/zx/iob.cc ---------------------------------------------------------------------------------------------------- Copyright 2023 The Fuchsia Authors. All rights reserved. From 90985e9fa5d62a41f800f8e4885011230e29b90a Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 4 Oct 2023 01:25:08 -0400 Subject: [PATCH 456/859] Roll Skia from aec80c6c8983 to 417a6383c59a (1 revision) (#46533) https://skia.googlesource.com/skia.git/+log/aec80c6c8983..417a6383c59a 2023-10-04 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 5b6f768198ce to 400ac3a175a6 (1 revision) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 1eb45e6776378..f2e4355949bca 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'aec80c6c8983f974ef76ed73c9dce9ed87ee006d', + 'skia_revision': '417a6383c59aaed72d9d0265958f4b617eef23d1', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 5ac518bd9462e255ddfaa8128d044ceb6316856a Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 4 Oct 2023 01:33:06 -0400 Subject: [PATCH 457/859] Roll Dart SDK from c819e51c8a94 to 8c7e38cd3903 (1 revision) (#46534) https://dart.googlesource.com/sdk.git/+log/c819e51c8a94..8c7e38cd3903 2023-10-04 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-228.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC chinmaygarde@google.com,dart-vm-team@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index f2e4355949bca..c932e4437bc35 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': 'c819e51c8a942561f2ace36dfe22378880a39d3f', + 'dart_revision': '8c7e38cd390325a279949286aeb343a0dcfaa7a1', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py From 6316f889c6c6ec7d9ff8296d94bf59f8aec8319b Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 4 Oct 2023 01:46:18 -0400 Subject: [PATCH 458/859] Roll Fuchsia Mac SDK from d4QNzZ6FjCCXUQtkT... to pzOoo5Zcrqst6Cl3X... (#46536) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC chinmaygarde@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index c932e4437bc35..62b9a9553bbb8 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'd4QNzZ6FjCCXUQtkThU8YeOax4hQsasnTl-l-iNR7lYC' + 'version': 'pzOoo5Zcrqst6Cl3XUxm1hieFQHbQt6VmtiNGalmmekC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 5e14cbedd05da00a96dfbdd3bdfb56d3db6dfbdf Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 4 Oct 2023 02:16:05 -0400 Subject: [PATCH 459/859] Roll Skia from 417a6383c59a to 8d45e7f1d4a4 (2 revisions) (#46537) https://skia.googlesource.com/skia.git/+log/417a6383c59a..8d45e7f1d4a4 2023-10-04 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from c97b5ae9f547 to e12f70e0a324 2023-10-04 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from 0387aac67124 to c97b5ae9f547 (4 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 62b9a9553bbb8..8038eb56f2b9e 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '417a6383c59aaed72d9d0265958f4b617eef23d1', + 'skia_revision': '8d45e7f1d4a4ae3963bac5006b405609d257c334', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index c4a62f7764d20..023d88ee13ca1 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 57a2fcac3a6eb59d57b3ef208038deed +Signature: ef0464bf77333db403337fbfc92f5482 ==================================================================================================== LIBRARY: etc1 From a57da3a3830019c9b96a212e767b6638fb11d5f1 Mon Sep 17 00:00:00 2001 From: Brandon DeRosier Date: Tue, 3 Oct 2023 23:27:23 -0700 Subject: [PATCH 460/859] [Impeller] Clarify coverage space. (#46524) Update the coverage docstrings to clarify which space the coordinates are given in. Up until now, I've been using the phrase "screen space" to convey that coverage is counted in framebuffer pixels and is unaffected by the subpass transform basis. But a more accurate way to describe this would be "pass space", since it counts pixels relative to the top left corner of the framebuffer that the Entity is being drawn to during rendering. --- impeller/entity/contents/contents.h | 14 ++++++++++++-- impeller/entity/entity.h | 2 ++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/impeller/entity/contents/contents.h b/impeller/entity/contents/contents.h index e06af8a2a0638..6a25261ac0c4e 100644 --- a/impeller/entity/contents/contents.h +++ b/impeller/entity/contents/contents.h @@ -66,7 +66,14 @@ class Contents { RenderPass& pass) const = 0; //---------------------------------------------------------------------------- - /// @brief Get the screen space bounding rectangle that this contents affects. + /// @brief Get the area of the render pass that will be affected when this + /// contents is rendered. + /// + /// During rendering, coverage coordinates count pixels from the top + /// left corner of the framebuffer. + /// + /// @return The coverage rectangle. An `std::nullopt` result means that + /// rendering this contents has no effect on the output color. /// virtual std::optional GetCoverage(const Entity& entity) const = 0; @@ -89,11 +96,14 @@ class Contents { virtual bool IsOpaque() const; //---------------------------------------------------------------------------- - /// @brief Given the current screen space bounding rectangle of the clip + /// @brief Given the current pass space bounding rectangle of the clip /// buffer, return the expected clip coverage after this draw call. /// This should only be implemented for contents that may write to the /// clip buffer. /// + /// During rendering, coverage coordinates count pixels from the top + /// left corner of the framebuffer. + /// virtual ClipCoverage GetClipCoverage( const Entity& entity, const std::optional& current_clip_coverage) const; diff --git a/impeller/entity/entity.h b/impeller/entity/entity.h index 9b210d0c19482..26fa0b3974e14 100644 --- a/impeller/entity/entity.h +++ b/impeller/entity/entity.h @@ -71,8 +71,10 @@ class Entity { ~Entity(); + /// @brief Get the global transformation matrix for this Entity. const Matrix& GetTransformation() const; + /// @brief Set the global transformation matrix for this Entity. void SetTransformation(const Matrix& transformation); std::optional GetCoverage() const; From 0ad9e54fbfbd0c774ba6f19ae1e85e73bf4ab553 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 4 Oct 2023 04:55:15 -0400 Subject: [PATCH 461/859] Roll Skia from 8d45e7f1d4a4 to 387853af198f (1 revision) (#46539) https://skia.googlesource.com/skia.git/+log/8d45e7f1d4a4..387853af198f 2023-10-04 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from f29f73d9f063 to ffb323805790 (2 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 8038eb56f2b9e..99d25193dfd60 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '8d45e7f1d4a4ae3963bac5006b405609d257c334', + 'skia_revision': '387853af198f03b4634239fb92cac5d49fe37100', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 894182ebc2e0ed46bec9c368ce0018454c73a10b Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 4 Oct 2023 05:21:23 -0400 Subject: [PATCH 462/859] Roll Dart SDK from 8c7e38cd3903 to 49561debc8d4 (1 revision) (#46540) https://dart.googlesource.com/sdk.git/+log/8c7e38cd3903..49561debc8d4 2023-10-04 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-229.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC chinmaygarde@google.com,dart-vm-team@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 98 ++++++++++++++++++++++++++++++------------------------------ 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/DEPS b/DEPS index 99d25193dfd60..19ad7ff3275c5 100644 --- a/DEPS +++ b/DEPS @@ -57,16 +57,16 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '8c7e38cd390325a279949286aeb343a0dcfaa7a1', + 'dart_revision': '49561debc8d49d3a9d8163102e20596850dbeaaf', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py 'dart_binaryen_rev': 'a51bd6df919a5b79574f0996a760cc20cb05697e', 'dart_boringssl_gen_rev': 'a468ba9fec3f59edf46a7db98caaca893e1e4d96', 'dart_boringssl_rev': '74646566e93de7551bfdfc5f49de7462f13d1d05', - 'dart_browser_launcher_rev': '1f69393d63a2f8d36d00b86cdd20df70c347af82', - 'dart_clock_rev': '1e75f08d3428bcd6f4b7cf70e788f24fc9b661e1', - 'dart_collection_rev': '91afde43f488eef618454b896301c6ff59af72e0', + 'dart_browser_launcher_rev': '25bc94aac66240aea01a77f0c7af1f173db0f099', + 'dart_clock_rev': '200a0209927ea7c4737309e7e9076ec8b97e9c4b', + 'dart_collection_rev': 'd27bfaf7994ee690be6ed424b8ee288c7aa672f6', 'dart_devtools_rev': '11ec4ae1036408018143b58d80d6feadbee56a6c', 'dart_libprotobuf_rev': '24487dd1045c7f3d64a21f38a3f0c06cc4cf2edb', 'dart_perfetto_rev': 'b8da07095979310818f0efde2ef3c69ea70d62c5', @@ -74,11 +74,11 @@ vars = { 'dart_protobuf_rev': 'c16bc891978a1764f0d6d8eca54f420242c78a6a', 'dart_pub_rev': 'fca927ae2662204805e1646c0c0687369001a41a', 'dart_root_certificates_rev': '692f6d6488af68e0121317a9c2c9eb393eb0ee50', - 'dart_tools_rev': '3c248df45b9bf40738579e8616cd7d85f34ba5b1', - 'dart_watcher_rev': '1aed03e2a8005f45083fdb38cbd4b684cd23082f', - 'dart_webdev_rev': '3078f48fb56a1036bc0f2a08ac51567291d8a837', + 'dart_tools_rev': 'f318c80fc6507cbfff851971cb7ad6edd061b6ea', + 'dart_watcher_rev': 'c480e2de63b045505c9114d2c2031e6fa63f11c8', + 'dart_webdev_rev': '7c2c2d70e05a5012b52e95b209aedce7acb62f94', 'dart_webkit_inspection_protocol_rev': '82f0c1c46dfdba5edf7c5fa84456233121dd69e1', - 'dart_yaml_edit_rev': '4a9734dda12f63ef9eee4121f87ff4401e25a607', + 'dart_yaml_edit_rev': 'a7e7fbad5ee263cc681681c1a6eb9e6df5336ad6', 'dart_zlib_rev': '14dd4c4455602c9b71a1a89b5cafd1f4030d2e3f', 'ocmock_rev': 'c4ec0e3a7a9f56cfdbd0aa01f4f97bb4b75c5ef8', # v3.7.1 @@ -340,22 +340,22 @@ deps = { {'dep_type': 'cipd', 'packages': [{'package': 'dart/third_party/flutter/devtools', 'version': 'git_revision:11ec4ae1036408018143b58d80d6feadbee56a6c'}]}, 'src/third_party/dart/third_party/pkg/args': - Var('dart_git') + '/args.git@5a4e16f1e4c08b01498a9dce8aeda1a60161cd52', + Var('dart_git') + '/args.git@df9b428e53e889835257c8475538e09834ffd022', 'src/third_party/dart/third_party/pkg/async': - Var('dart_git') + '/async.git@75efa6cc08b2fc906fac4b6fdfdbcf6da7d0a2da', + Var('dart_git') + '/async.git@def44823a35fc13312d3147cbbd5425a73e7e243', 'src/third_party/dart/third_party/pkg/bazel_worker': - Var('dart_git') + '/bazel_worker.git@159e67182044b2d5edd89d12a873487d1d1343c1', + Var('dart_git') + '/bazel_worker.git@b1b6a6605f0255eb1bf4aaf5aaf36f0d635e1b20', 'src/third_party/dart/third_party/pkg/boolean_selector': - Var('dart_git') + '/boolean_selector.git@f255921c7155da2167e8c96e04e527180787aafb', + Var('dart_git') + '/boolean_selector.git@9431e01c34a2859d329b6c599b1ed05ac0919b0b', 'src/third_party/dart/third_party/pkg/browser_launcher': Var('dart_git') + '/browser_launcher.git' + '@' + Var('dart_browser_launcher_rev'), 'src/third_party/dart/third_party/pkg/cli_util': - Var('dart_git') + '/cli_util.git@44118e35e55c75f84fbc5ead051424ee1e73e406', + Var('dart_git') + '/cli_util.git@9e48f0d390996089aef5d5d05a8ed6a07f6abf6a', 'src/third_party/dart/third_party/pkg/clock': Var('dart_git') + '/clock.git' + '@' + Var('dart_clock_rev'), @@ -364,79 +364,79 @@ deps = { Var('dart_git') + '/collection.git' + '@' + Var('dart_collection_rev'), 'src/third_party/dart/third_party/pkg/convert': - Var('dart_git') + '/convert.git@c058c8f4ebfdc09a5122db7988acd9e117a7da48', + Var('dart_git') + '/convert.git@140b2f0d0b5f9ee0ef9ec950e123bd84d25cbde9', 'src/third_party/dart/third_party/pkg/crypto': - Var('dart_git') + '/crypto.git@1e26879c8f166850288e8722c590a465b4461f1f', + Var('dart_git') + '/crypto.git@b38dd6285989698968bdf8e8f5fe517b1cbd5a33', 'src/third_party/dart/third_party/pkg/csslib': - Var('dart_git') + '/csslib.git@bd30a1a773ec66d3e435dfc53fc140f1967716da', + Var('dart_git') + '/csslib.git@f6b68dd9ed9da297f5df4cd31a39787bf35432b3', 'src/third_party/dart/third_party/pkg/dart_style': Var('dart_git') + '/dart_style.git@1a2def95a3c04dafd27b85d17e6e828bd4afa1a3', 'src/third_party/dart/third_party/pkg/dartdoc': - Var('dart_git') + '/dartdoc.git@a3cfdc40a94d169bd7b559dc6f83ceb7f79de4e2', + Var('dart_git') + '/dartdoc.git@59947b1495f6fc30fb106ae1a0a8d60d86c82f14', 'src/third_party/dart/third_party/pkg/ffi': - Var('dart_git') + '/ffi.git@d36e05af55293bcc511d6b3a99ea4b8cb69f6323', + Var('dart_git') + '/ffi.git@ee70dd4a5b396d1a1df0094a8955ac130cb406ce', 'src/third_party/dart/third_party/pkg/file': Var('dart_git') + '/external/github.com/google/file.dart@a18ad1ce88eaeb5a11a13ef8fc25d1e78b546c59', 'src/third_party/dart/third_party/pkg/fixnum': - Var('dart_git') + '/fixnum.git@87ed0658f32f992dc7360b77513eadfa7056aa9d', + Var('dart_git') + '/fixnum.git@ef0a587c520844f906e369281d9816208250ef59', 'src/third_party/dart/third_party/pkg/glob': - Var('dart_git') + '/glob.git@9c1996f9f9326d776fe151f292912113b8b64aa3', + Var('dart_git') + '/glob.git@00465333cc4110e077cb256b4fa7eff4797bc856', 'src/third_party/dart/third_party/pkg/html': - Var('dart_git') + '/html.git@a1b193e95f13c995e7f7200ce0d363de5952e383', + Var('dart_git') + '/html.git@49e2c8e9b3bc9fcf25a8eb290c026d3c94c5d175', 'src/third_party/dart/third_party/pkg/http': - Var('dart_git') + '/http.git@12516197c28a0763b1f90c26b87660810bf58cc8', + Var('dart_git') + '/http.git@88ec75eb603ce3d66911ac0df1b48e6582965131', 'src/third_party/dart/third_party/pkg/http_multi_server': - Var('dart_git') + '/http_multi_server.git@9d62ea396d7d282592edf994378f67fcde982ce8', + Var('dart_git') + '/http_multi_server.git@03041aabc9ffa4c730c4221bf6ff1ef8bcd27cef', 'src/third_party/dart/third_party/pkg/http_parser': - Var('dart_git') + '/http_parser.git@d2d03e7dfa3b7a99515b16f827650d6e210799b5', + Var('dart_git') + '/http_parser.git@c557f570fd53fed11914fe98c9dc20872e6eeca6', 'src/third_party/dart/third_party/pkg/intl': Var('dart_git') + '/intl.git@5d65e3808ce40e6282e40881492607df4e35669f', 'src/third_party/dart/third_party/pkg/json_rpc_2': - Var('dart_git') + '/json_rpc_2.git@50a37863be221f43ef07533c0c154ae676fc5df0', + Var('dart_git') + '/json_rpc_2.git@0521afb58b9aeb90beda8fa5b00b98b998ec9ba6', 'src/third_party/dart/third_party/pkg/leak_tracker': Var('dart_git') + '/leak_tracker.git@098bafcf99a5220e3c352d895d991e163568ee03', 'src/third_party/dart/third_party/pkg/logging': - Var('dart_git') + '/logging.git@bcaad0f781a889d6e5cf8fc564fd0722c446b96e', + Var('dart_git') + '/logging.git@642ed2124f7ef7abc819a0e22ae0c7afdb5398d3', 'src/third_party/dart/third_party/pkg/markdown': - Var('dart_git') + '/markdown.git@6cfd6f17651a8ba31b5a268f1139bb2c039dd4d4', + Var('dart_git') + '/markdown.git@ae766d52d22b54c05240989871b14ede1848b345', 'src/third_party/dart/third_party/pkg/matcher': - Var('dart_git') + '/matcher.git@80910d6698576ba486ace6e5fdf0e27324f138db', + Var('dart_git') + '/matcher.git@11daad9d3b62539feca5decfa465ccdfb87dde86', 'src/third_party/dart/third_party/pkg/mime': - Var('dart_git') + '/mime.git@37ef637c35896e289fdd37c0ea4680df4ab9f543', + Var('dart_git') + '/mime.git@f3b9c490cf2bc322fa8246051a6c14a31e75535b', 'src/third_party/dart/third_party/pkg/mockito': - Var('dart_git') + '/mockito.git@097e5635a6c1859e03e9c606c2ab4cfa74618bcc', + Var('dart_git') + '/mockito.git@610c3dcecba91509a7a0b10e460fe48a455583f9', 'src/third_party/dart/third_party/pkg/native': Var('dart_git') + '/native.git@7aaa0259c48df8fef4afc222a3c40569a0e881ef', 'src/third_party/dart/third_party/pkg/package_config': - Var('dart_git') + '/package_config.git@ae7ad83de97aba507fd05e97cc372bc6695c1759', + Var('dart_git') + '/package_config.git@100533d2f836583f281c9dfa11a00d6842c176d4', 'src/third_party/dart/third_party/pkg/path': - Var('dart_git') + '/path.git@96d9183ad4f9e48109fa8d4b8269cf75f13922dd', + Var('dart_git') + '/path.git@abcf38c9c769db46c64dceab921d7e30f42bc373', 'src/third_party/dart/third_party/pkg/pool': - Var('dart_git') + '/pool.git@a5bee3540a2b5b3a3c34038667e7cd7bb514dc62', + Var('dart_git') + '/pool.git@4bcc7de71ea7d1aa11144ccf1fcbc2597841d742', 'src/third_party/dart/third_party/pkg/protobuf': Var('dart_git') + '/protobuf.git' + '@' + Var('dart_protobuf_rev'), @@ -445,58 +445,58 @@ deps = { Var('dart_git') + '/pub.git' + '@' + Var('dart_pub_rev'), 'src/third_party/dart/third_party/pkg/pub_semver': - Var('dart_git') + '/pub_semver.git@f0be74a446f971db478e68b59ea62e393d6df3bd', + Var('dart_git') + '/pub_semver.git@8e5a58fd4231854b35ac585ff81c242885334843', 'src/third_party/dart/third_party/pkg/shelf': - Var('dart_git') + '/shelf.git@485197819b93a9f9342c389f1715fb8e17a7ac0f', + Var('dart_git') + '/shelf.git@c15fc6f6ae11079d7796b0bf8c93135a5a112d82', 'src/third_party/dart/third_party/pkg/source_map_stack_trace': - Var('dart_git') + '/source_map_stack_trace.git@196d7bfa58ef307687907c323ab8e5fb1f382afa', + Var('dart_git') + '/source_map_stack_trace.git@73d449cb90f9faf3ccacde0635f55230c6060024', 'src/third_party/dart/third_party/pkg/source_maps': - Var('dart_git') + '/source_maps.git@eb3d40a6193adc63da958ed9451e3218bd6e95a0', + Var('dart_git') + '/source_maps.git@fc6aa16cc3548dec5642057a7fbbce01d64f4a19', 'src/third_party/dart/third_party/pkg/source_span': - Var('dart_git') + '/source_span.git@48d0f574ee0a92a241c865d47f461803a664b5ba', + Var('dart_git') + '/source_span.git@92e50bf0c15bea00218e5fdb2881d2570de1932b', 'src/third_party/dart/third_party/pkg/sse': - Var('dart_git') + '/sse.git@eeb2588ce56a5b2f1e4bbd88c2b35c910c505b71', + Var('dart_git') + '/sse.git@606387e1abe5ea311e38779f28ec71af22691c0b', 'src/third_party/dart/third_party/pkg/stack_trace': - Var('dart_git') + '/stack_trace.git@bcf2a0b1b7d4abaeedcb8b18ff41e4994aea1b17', + Var('dart_git') + '/stack_trace.git@1c36cd76eb9a1e2d4ed056fb3133f78a79df2b9b', 'src/third_party/dart/third_party/pkg/stream_channel': - Var('dart_git') + '/stream_channel.git@0ce7ab69c3a2ab83cdeb9dc60e1bacbb83abc165', + Var('dart_git') + '/stream_channel.git@bf74065c1f40377367eea8c9aedb9a8db8eb3339', 'src/third_party/dart/third_party/pkg/string_scanner': - Var('dart_git') + '/string_scanner.git@da9142cf9809e7e1364144b8193ec60d87f0a4b8', + Var('dart_git') + '/string_scanner.git@616424cae99d90ffc66c9862b3c1f0d3fc70bac1', 'src/third_party/dart/third_party/pkg/tar': Var('dart_git') + '/external/github.com/simolus3/tar.git@3c68cba8e51c569428222b9185469249206172c6', 'src/third_party/dart/third_party/pkg/term_glyph': - Var('dart_git') + '/term_glyph.git@1b28285a7e818b8e87c4d2119d968c5b36d73c7a', + Var('dart_git') + '/term_glyph.git@19abf84eedbbd6c61f1cdc5c1d1cabd3dc624b2e', 'src/third_party/dart/third_party/pkg/test': - Var('dart_git') + '/test.git@8191a355cefe5e6073e597d139bfb46e4b00c493', + Var('dart_git') + '/test.git@367aa397ab1cb08755f8a7582ab21101ceb9d29b', 'src/third_party/dart/third_party/pkg/test_reflective_loader': - Var('dart_git') + '/test_reflective_loader.git@45c57d62fb08471681cd0b0a1c3b131bf0122929', + Var('dart_git') + '/test_reflective_loader.git@8593eb160f796179f77c8edb6fde050433810211', 'src/third_party/dart/third_party/pkg/tools': Var('dart_git') + '/tools.git' + '@' + Var('dart_tools_rev'), 'src/third_party/dart/third_party/pkg/typed_data': - Var('dart_git') + '/typed_data.git@80e8943524a627f7ff421ace824f38105983e89a', + Var('dart_git') + '/typed_data.git@d1c15ed29d10568cd713fba77d01c4d79b03ccf8', 'src/third_party/dart/third_party/pkg/usage': - Var('dart_git') + '/usage.git@7b12d510b5abde8a216437b8430ccfd02273625c', + Var('dart_git') + '/usage.git@d7d2964433f26b9a3c60dc9c6677f00c005ee9fb', 'src/third_party/dart/third_party/pkg/watcher': Var('dart_git') + '/watcher.git' + '@' + Var('dart_watcher_rev'), 'src/third_party/dart/third_party/pkg/web_socket_channel': - Var('dart_git') + '/web_socket_channel.git@af945f1ad3ac4193ed70b4ebfbdcba3b9f0198bc', + Var('dart_git') + '/web_socket_channel.git@364013da737f40b4f12ea741bda9ce57b4c96f9e', 'src/third_party/dart/third_party/pkg/webdev': Var('dart_git') + '/webdev.git' + '@' + Var('dart_webdev_rev'), @@ -505,7 +505,7 @@ deps = { Var('dart_git') + '/external/github.com/google/webkit_inspection_protocol.dart.git' + '@' + Var('dart_webkit_inspection_protocol_rev'), 'src/third_party/dart/third_party/pkg/yaml': - Var('dart_git') + '/yaml.git@ae001879aa377afee2e70cf11b8716d6cc3e2658', + Var('dart_git') + '/yaml.git@9f0d64934c07bc27438074616455618b7103582d', 'src/third_party/dart/third_party/pkg/yaml_edit': Var('dart_git') + '/yaml_edit.git' + '@' + Var('dart_yaml_edit_rev'), From 431fd5862f01f41799b9212a6ccab59fa187737b Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 4 Oct 2023 10:22:24 -0400 Subject: [PATCH 463/859] Roll Skia from 387853af198f to 49657f39d457 (1 revision) (#46544) https://skia.googlesource.com/skia.git/+log/387853af198f..49657f39d457 2023-10-04 robertphillips@google.com [graphite] Add ImageShaderBlock::AddBlock If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 19ad7ff3275c5..41786c055c3bb 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '387853af198f03b4634239fb92cac5d49fe37100', + 'skia_revision': '49657f39d45743ff24575f49db876ef0efeed5b2', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 023d88ee13ca1..034b1706d35dc 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: ef0464bf77333db403337fbfc92f5482 +Signature: 0a37c303db2f6f63968d36120c2cac3f ==================================================================================================== LIBRARY: etc1 From 0ba222dbb5041b10829314e91ae6e257def73cca Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 4 Oct 2023 14:25:33 -0400 Subject: [PATCH 464/859] Roll Fuchsia Mac SDK from pzOoo5Zcrqst6Cl3X... to Q0h8rkXPNpWBnlAnS... (#46553) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC chinmaygarde@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 41786c055c3bb..7956aad4bd22b 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'pzOoo5Zcrqst6Cl3XUxm1hieFQHbQt6VmtiNGalmmekC' + 'version': 'Q0h8rkXPNpWBnlAnSLNL5A6pto3js8axhJn5AUck6jEC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From ca61fc90423dbc72478f52b80686c1ead7a2b07f Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 4 Oct 2023 14:42:00 -0400 Subject: [PATCH 465/859] Roll Skia from 49657f39d457 to f6b7864d0325 (5 revisions) (#46554) https://skia.googlesource.com/skia.git/+log/49657f39d457..f6b7864d0325 2023-10-04 kjlubick@google.com Disable `__google_cxa_guard_acquire` on Windows as it is POSIX specific 2023-10-04 robertphillips@google.com [graphite] Allow zero Paint uniforms 2023-10-04 robertphillips@google.com [graphite] Add SolidColorShader::AddBlock 2023-10-04 drott@chromium.org Enable VSCode rust-analyzer to find Fontations project 2023-10-04 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from c572662924c3 to d9ae2b91952e (5 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 7956aad4bd22b..7296693eb4d5f 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '49657f39d45743ff24575f49db876ef0efeed5b2', + 'skia_revision': 'f6b7864d032568206ff8f7274da80d7f928a8f7d', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 034b1706d35dc..8a4ef13c6c92c 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 0a37c303db2f6f63968d36120c2cac3f +Signature: d72beebe131c4417117b05ec3c646820 ==================================================================================================== LIBRARY: etc1 @@ -317,6 +317,7 @@ ORIGIN: ../../../third_party/skia/LICENSE TYPE: LicenseType.bsd FILE: ../../../third_party/skia/.bazelignore FILE: ../../../third_party/skia/.bazelproject +FILE: ../../../third_party/skia/Cargo.toml FILE: ../../../third_party/skia/RELEASE_NOTES.md FILE: ../../../third_party/skia/go.mod FILE: ../../../third_party/skia/go.sum @@ -386,6 +387,7 @@ FILE: ../../../third_party/skia/modules/pathkit/perf/perfReporter.js FILE: ../../../third_party/skia/modules/skparagraph/test.html FILE: ../../../third_party/skia/package-lock.json FILE: ../../../third_party/skia/src/gpu/gpu_workaround_list.txt +FILE: ../../../third_party/skia/src/ports/fontations/Cargo.toml FILE: ../../../third_party/skia/src/sksl/generated/sksl_compute.minified.sksl FILE: ../../../third_party/skia/src/sksl/generated/sksl_compute.unoptimized.sksl FILE: ../../../third_party/skia/src/sksl/generated/sksl_frag.minified.sksl From 7a2b2c6508488135d333765b4251ff2212ff7606 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 4 Oct 2023 15:26:00 -0400 Subject: [PATCH 466/859] Roll Skia from f6b7864d0325 to b3d65351b9ae (1 revision) (#46556) https://skia.googlesource.com/skia.git/+log/f6b7864d0325..b3d65351b9ae 2023-10-04 robertphillips@google.com [graphite] Remove initial colorshader from PaintKey If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 7296693eb4d5f..550d5943a64b6 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'f6b7864d032568206ff8f7274da80d7f928a8f7d', + 'skia_revision': 'b3d65351b9ae9f7c3d7a04d9476493fdc55c3b47', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 8a4ef13c6c92c..1e1f585503670 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: d72beebe131c4417117b05ec3c646820 +Signature: 05074b5180bdba7a81c1ca88a8c2126e ==================================================================================================== LIBRARY: etc1 From b2eaae9a8b49925fccacb49e8d7c2c77e41109fa Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 4 Oct 2023 15:51:14 -0400 Subject: [PATCH 467/859] Roll Fuchsia Linux SDK from tpiob-Qyh6oYiIznS... to z_GRSMyHRsHjrpY48... (#46557) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC chinmaygarde@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 550d5943a64b6..5b63872ea73f9 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'tpiob-Qyh6oYiIznSegK2s0Qm_-Qx2oaFuWMiK66AaoC' + 'version': 'z_GRSMyHRsHjrpY48puQrM75okLbiRu2OqBeF0bI5SsC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index 5cdb73c8c5fa7..98e7226da65b0 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: cadc5509477b0c63164ca1f5a1c54689 +Signature: 851b3937fdef6e5331cd58b8a1140094 ==================================================================================================== LIBRARY: fuchsia_sdk From 0dee34f79124144c92a6e4111adb83424d582689 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 4 Oct 2023 16:01:23 -0400 Subject: [PATCH 468/859] Roll Dart SDK from 49561debc8d4 to b8fceaea291c (1 revision) (#46559) https://dart.googlesource.com/sdk.git/+log/49561debc8d4..b8fceaea291c 2023-10-04 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-230.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC chinmaygarde@google.com,dart-vm-team@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 5b63872ea73f9..3a9734fabe8ee 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '49561debc8d49d3a9d8163102e20596850dbeaaf', + 'dart_revision': 'b8fceaea291c28d123ca4b217e85bd8a74e8ddf8', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index aa203ba4284c7..ca51ae19898cf 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: bea8b5a4e00d6d17c00dc46504da979f +Signature: e1928630fb546e7bae4379c72685ad9d ==================================================================================================== LIBRARY: dart From a57cc4ad58484c5d7a60d899031a4814ab194b82 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 4 Oct 2023 16:38:05 -0400 Subject: [PATCH 469/859] Roll Skia from b3d65351b9ae to d061d21eed0d (2 revisions) (#46562) https://skia.googlesource.com/skia.git/+log/b3d65351b9ae..d061d21eed0d 2023-10-04 armansito@google.com Do not build canvas_state_lib if vello shaders are enabled 2023-10-04 lovisolo@google.com [bazel] Add //bench/BazelBenchmarkRunner.cpp and some sample targets. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 3a9734fabe8ee..fbf5406d8c677 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'b3d65351b9ae9f7c3d7a04d9476493fdc55c3b47', + 'skia_revision': 'd061d21eed0df97161063f1ceadc376568a100d9', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 66d6ad7ac98c00108948c16d4078ee66f0e43e56 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 4 Oct 2023 17:22:20 -0400 Subject: [PATCH 470/859] Roll Skia from d061d21eed0d to 073737b7f4ab (2 revisions) (#46563) https://skia.googlesource.com/skia.git/+log/d061d21eed0d..073737b7f4ab 2023-10-04 egdaniel@google.com Make sure not to share texture allocations for offscreens going to a Vk SecondaryCB. 2023-10-04 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll vulkan-deps from d9ae2b91952e to 548271dcec9f (11 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index fbf5406d8c677..38de5b293c294 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'd061d21eed0df97161063f1ceadc376568a100d9', + 'skia_revision': '073737b7f4ab6093caca9fd4097af33e68f0ce9a', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 1e1f585503670..0b54e0792f858 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 05074b5180bdba7a81c1ca88a8c2126e +Signature: f59f5ea26717a2ff7d5b493371200522 ==================================================================================================== LIBRARY: etc1 From 4289e36f25c7ae8e4027cd3e9bc315c72bae86c8 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Wed, 4 Oct 2023 14:41:53 -0700 Subject: [PATCH 471/859] [ios] Link PlatformView back to semantics tree (#46471) The PlatformView does not have a semantics container when added to semantics tree, this PR gives it a semantics container to ensure accessibility traversal works. This fixes https://github.com/flutter/flutter/issues/135504, which is a regression of https://github.com/flutter/engine/commit/b8332e3c4870512a941d685d7d375b1d2d62983c Before https://github.com/flutter/engine/commit/b8332e3c4870512a941d685d7d375b1d2d62983c, the traversal works because the PlatformView is added to the accessibilityElements of the FlutterPlatFormViewSemanticsContainer, which implicitly made the FlutterPlatFormViewSemanticsContainer as the PlatformVIew's AccessibilityContainer. Now we use the PlatformVIew as the nativeAccessibility of the FlutterPlatFormViewSemanticsContainer, we need to expilicitly set the container. This needs to be cherry-picked since the commit caused the regression was cherry-picked in https://github.com/flutter/engine/commit/b8332e3c4870512a941d685d7d375b1d2d62983c [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- ci/licenses_golden/licenses_flutter | 6 + shell/platform/darwin/ios/BUILD.gn | 3 + .../framework/Source/FlutterPlatformViews.mm | 19 ++- .../Source/FlutterPlatformViewsTest.mm | 9 + .../Source/FlutterPlatformViews_Internal.h | 13 +- .../FlutterTouchInterceptingView_Test.h | 14 ++ .../ios/framework/Source/SemanticsObject.h | 4 +- .../ios/framework/Source/SemanticsObject.mm | 13 +- .../framework/Source/SemanticsObjectTest.mm | 155 +----------------- .../Source/SemanticsObjectTestMocks.h | 95 +++++++++++ .../Source/SemanticsObjectTest_mrc.mm | 89 ++++++++++ .../framework/Source/accessibility_bridge.mm | 2 +- 12 files changed, 254 insertions(+), 168 deletions(-) create mode 100644 shell/platform/darwin/ios/framework/Source/FlutterTouchInterceptingView_Test.h create mode 100644 shell/platform/darwin/ios/framework/Source/SemanticsObjectTestMocks.h create mode 100644 shell/platform/darwin/ios/framework/Source/SemanticsObjectTest_mrc.mm diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index a8c4fb89fe059..4f39204140091 100644 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -2702,6 +2702,7 @@ ORIGIN: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterTextI ORIGIN: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterTextureRegistryRelay.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterTextureRegistryRelay.mm + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterTextureRegistryRelayTest.mm + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterTouchInterceptingView_Test.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterUIPressProxy.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterUIPressProxy.mm + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterUmbrellaImport.m + ../../../flutter/LICENSE @@ -2723,6 +2724,8 @@ ORIGIN: ../../../flutter/shell/platform/darwin/ios/framework/Source/KeyCodeMap_I ORIGIN: ../../../flutter/shell/platform/darwin/ios/framework/Source/SemanticsObject.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/darwin/ios/framework/Source/SemanticsObject.mm + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/darwin/ios/framework/Source/SemanticsObjectTest.mm + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/shell/platform/darwin/ios/framework/Source/SemanticsObjectTestMocks.h + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/shell/platform/darwin/ios/framework/Source/SemanticsObjectTest_mrc.mm + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/darwin/ios/framework/Source/UIViewController+FlutterScreenAndSceneIfLoaded.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/darwin/ios/framework/Source/UIViewController+FlutterScreenAndSceneIfLoaded.mm + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/darwin/ios/framework/Source/UIViewController_FlutterScreenAndSceneIfLoadedTest.mm + ../../../flutter/LICENSE @@ -5475,6 +5478,7 @@ FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterTextInp FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterTextureRegistryRelay.h FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterTextureRegistryRelay.mm FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterTextureRegistryRelayTest.mm +FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterTouchInterceptingView_Test.h FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterUIPressProxy.h FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterUIPressProxy.mm FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterUmbrellaImport.m @@ -5496,6 +5500,8 @@ FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/KeyCodeMap_Int FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/SemanticsObject.h FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/SemanticsObject.mm FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/SemanticsObjectTest.mm +FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/SemanticsObjectTestMocks.h +FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/SemanticsObjectTest_mrc.mm FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/UIViewController+FlutterScreenAndSceneIfLoaded.h FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/UIViewController+FlutterScreenAndSceneIfLoaded.mm FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/UIViewController_FlutterScreenAndSceneIfLoadedTest.mm diff --git a/shell/platform/darwin/ios/BUILD.gn b/shell/platform/darwin/ios/BUILD.gn index fe180c2af422f..b8bd60198ae0a 100644 --- a/shell/platform/darwin/ios/BUILD.gn +++ b/shell/platform/darwin/ios/BUILD.gn @@ -238,8 +238,11 @@ source_set("ios_test_flutter_mrc") { "framework/Source/FlutterEngineTest_mrc.mm", "framework/Source/FlutterPlatformPluginTest.mm", "framework/Source/FlutterPlatformViewsTest.mm", + "framework/Source/FlutterTouchInterceptingView_Test.h", "framework/Source/FlutterViewControllerTest_mrc.mm", "framework/Source/FlutterViewTest.mm", + "framework/Source/SemanticsObjectTestMocks.h", + "framework/Source/SemanticsObjectTest_mrc.mm", "framework/Source/VsyncWaiterIosTest.mm", "framework/Source/accessibility_bridge_test.mm", "platform_message_handler_ios_test.mm", diff --git a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm index bf7e607878d1b..6c3bcd9ccdaab 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm @@ -406,10 +406,15 @@ static bool ClipRRectContainsPlatformViewBoundingRect(const SkRRect& clip_rrect, } UIView* FlutterPlatformViewsController::GetPlatformViewByID(int64_t view_id) { + return [GetFlutterTouchInterceptingViewByID(view_id) embeddedView]; +} + +FlutterTouchInterceptingView* FlutterPlatformViewsController::GetFlutterTouchInterceptingViewByID( + int64_t view_id) { if (views_.empty()) { return nil; } - return [touch_interceptors_[view_id].get() embeddedView]; + return touch_interceptors_[view_id].get(); } long FlutterPlatformViewsController::FindFirstResponderPlatformViewId() { @@ -957,6 +962,10 @@ @implementation FlutterTouchInterceptingView { fml::scoped_nsobject _delayingRecognizer; FlutterPlatformViewGestureRecognizersBlockingPolicy _blockingPolicy; UIView* _embeddedView; + // The used as the accessiblityContainer. + // The `accessiblityContainer` is used in UIKit to determine the parent of this accessibility + // node. + NSObject* _flutterAccessibilityContainer; } - (instancetype)initWithEmbeddedView:(UIView*)embeddedView platformViewsController: @@ -1035,6 +1044,14 @@ - (void)touchesCancelled:(NSSet*)touches withEvent:(UIEvent*)event { - (void)touchesEnded:(NSSet*)touches withEvent:(UIEvent*)event { } +- (void)setFlutterAccessibilityContainer:(NSObject*)flutterAccessibilityContainer { + _flutterAccessibilityContainer = flutterAccessibilityContainer; +} + +- (id)accessibilityContainer { + return _flutterAccessibilityContainer; +} + @end @implementation DelayingGestureRecognizer { diff --git a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViewsTest.mm b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViewsTest.mm index 1e6dad56089aa..c55111136df9b 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViewsTest.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViewsTest.mm @@ -11,6 +11,7 @@ #import "flutter/shell/platform/darwin/ios/framework/Headers/FlutterPlatformViews.h" #import "flutter/shell/platform/darwin/ios/framework/Headers/FlutterViewController.h" #import "flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h" +#import "flutter/shell/platform/darwin/ios/framework/Source/FlutterTouchInterceptingView_Test.h" #import "flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController_Internal.h" #import "flutter/shell/platform/darwin/ios/platform_view_ios.h" @@ -3099,4 +3100,12 @@ - (void)testOnlyPlatformViewsAreRemovedWhenReset { XCTAssertEqual(mockFlutterView.subviews.firstObject, someView); } +- (void)testFlutterTouchInterceptingViewLinksToAccessibilityContainer { + FlutterTouchInterceptingView* touchInteceptorView = + [[[FlutterTouchInterceptingView alloc] init] autorelease]; + NSObject* container = [[[NSObject alloc] init] autorelease]; + [touchInteceptorView setFlutterAccessibilityContainer:container]; + XCTAssertEqualObjects([touchInteceptorView accessibilityContainer], container); +} + @end diff --git a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h index 43cb43cf4e33b..e18569868115f 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h +++ b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h @@ -12,6 +12,7 @@ #import "flutter/shell/platform/darwin/common/framework/Headers/FlutterChannels.h" #import "flutter/shell/platform/darwin/ios/framework/Headers/FlutterPlatformViews.h" #import "flutter/shell/platform/darwin/ios/framework/Headers/FlutterPlugin.h" +#import "flutter/shell/platform/darwin/ios/framework/Source/SemanticsObject.h" #import "flutter/shell/platform/darwin/ios/ios_context.h" @class FlutterTouchInterceptingView; @@ -230,10 +231,17 @@ class FlutterPlatformViewsController { // Returns the `FlutterPlatformView`'s `view` object associated with the view_id. // // If the `FlutterPlatformViewsController` does not contain any `FlutterPlatformView` object or - // a `FlutterPlatformView` object asscociated with the view_id cannot be found, the method + // a `FlutterPlatformView` object associated with the view_id cannot be found, the method // returns nil. UIView* GetPlatformViewByID(int64_t view_id); + // Returns the `FlutterTouchInterceptingView` with the view_id. + // + // If the `FlutterPlatformViewsController` does not contain any `FlutterPlatformView` object or + // a `FlutterPlatformView` object associated with the view_id cannot be found, the method + // returns nil. + FlutterTouchInterceptingView* GetFlutterTouchInterceptingViewByID(int64_t view_id); + PostPrerollResult PostPrerollAction( const fml::RefPtr& raster_thread_merger); @@ -424,6 +432,9 @@ class FlutterPlatformViewsController { // Get embedded view - (UIView*)embeddedView; + +// Sets flutterAccessibilityContainer as this view's accessibilityContainer. +- (void)setFlutterAccessibilityContainer:(NSObject*)flutterAccessibilityContainer; @end @interface UIView (FirstResponder) diff --git a/shell/platform/darwin/ios/framework/Source/FlutterTouchInterceptingView_Test.h b/shell/platform/darwin/ios/framework/Source/FlutterTouchInterceptingView_Test.h new file mode 100644 index 0000000000000..52f4f465c0f16 --- /dev/null +++ b/shell/platform/darwin/ios/framework/Source/FlutterTouchInterceptingView_Test.h @@ -0,0 +1,14 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import "flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h" + +#ifndef SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_FLUTTER_TOUCH_INTERCEPTING_VIEW_TEST_H_ +#define SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_FLUTTER_TOUCH_INTERCEPTING_VIEW_TEST_H_ + +@interface FlutterTouchInterceptingView (Tests) +- (id)accessibilityContainer; +@end + +#endif // SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_FLUTTER_TOUCH_INTERCEPTING_VIEW_TESTS_H_ diff --git a/shell/platform/darwin/ios/framework/Source/SemanticsObject.h b/shell/platform/darwin/ios/framework/Source/SemanticsObject.h index f7c611dec2ced..8a431193d1a8d 100644 --- a/shell/platform/darwin/ios/framework/Source/SemanticsObject.h +++ b/shell/platform/darwin/ios/framework/Source/SemanticsObject.h @@ -18,6 +18,7 @@ constexpr float kScrollExtentMaxForInf = 1000; @class FlutterCustomAccessibilityAction; @class FlutterPlatformViewSemanticsContainer; +@class FlutterTouchInterceptingView; /** * A node in the iOS semantics tree. This object is a wrapper over a native accessibiliy @@ -171,7 +172,8 @@ constexpr float kScrollExtentMaxForInf = 1000; - (instancetype)initWithBridge:(fml::WeakPtr)bridge uid:(int32_t)uid - platformView:(UIView*)platformView NS_DESIGNATED_INITIALIZER; + platformView:(FlutterTouchInterceptingView*)platformView + NS_DESIGNATED_INITIALIZER; @end diff --git a/shell/platform/darwin/ios/framework/Source/SemanticsObject.mm b/shell/platform/darwin/ios/framework/Source/SemanticsObject.mm index 5889a32463892..8f278fe31a721 100644 --- a/shell/platform/darwin/ios/framework/Source/SemanticsObject.mm +++ b/shell/platform/darwin/ios/framework/Source/SemanticsObject.mm @@ -157,9 +157,7 @@ @interface FlutterScrollableSemanticsObject () @property(nonatomic, retain) FlutterSemanticsScrollView* scrollView; @end -@implementation FlutterScrollableSemanticsObject { - fml::scoped_nsobject _container; -} +@implementation FlutterScrollableSemanticsObject - (instancetype)initWithBridge:(fml::WeakPtr)bridge uid:(int32_t)uid { @@ -865,9 +863,10 @@ @implementation FlutterPlatformViewSemanticsContainer - (instancetype)initWithBridge:(fml::WeakPtr)bridge uid:(int32_t)uid - platformView:(nonnull UIView*)platformView { + platformView:(nonnull FlutterTouchInterceptingView*)platformView { if (self = [super initWithBridge:bridge uid:uid]) { _platformView = [platformView retain]; + [platformView setFlutterAccessibilityContainer:self]; } return self; } @@ -882,12 +881,6 @@ - (id)nativeAccessibility { return _platformView; } -#pragma mark - UIAccessibilityContainer overrides - -- (NSArray*)accessibilityElements { - return @[ _platformView ]; -} - @end @implementation SemanticsObjectContainer { diff --git a/shell/platform/darwin/ios/framework/Source/SemanticsObjectTest.mm b/shell/platform/darwin/ios/framework/Source/SemanticsObjectTest.mm index 2a3f7e799e40f..3d7f2cdf0163e 100644 --- a/shell/platform/darwin/ios/framework/Source/SemanticsObjectTest.mm +++ b/shell/platform/darwin/ios/framework/Source/SemanticsObjectTest.mm @@ -7,97 +7,13 @@ #import "flutter/shell/platform/darwin/common/framework/Headers/FlutterMacros.h" #import "flutter/shell/platform/darwin/ios/framework/Source/SemanticsObject.h" +#import "flutter/shell/platform/darwin/ios/framework/Source/SemanticsObjectTestMocks.h" FLUTTER_ASSERT_ARC -const CGRect kScreenSize = CGRectMake(0, 0, 600, 800); - -namespace flutter { -namespace { - -class SemanticsActionObservation { - public: - SemanticsActionObservation(int32_t observed_id, SemanticsAction observed_action) - : id(observed_id), action(observed_action) {} - - int32_t id; - SemanticsAction action; -}; - -class MockAccessibilityBridge : public AccessibilityBridgeIos { - public: - MockAccessibilityBridge() : observations({}) { - view_ = [[UIView alloc] initWithFrame:kScreenSize]; - window_ = [[UIWindow alloc] initWithFrame:kScreenSize]; - [window_ addSubview:view_]; - } - bool isVoiceOverRunning() const override { return isVoiceOverRunningValue; } - UIView* view() const override { return view_; } - UIView* textInputView() override { return nil; } - void DispatchSemanticsAction(int32_t id, SemanticsAction action) override { - SemanticsActionObservation observation(id, action); - observations.push_back(observation); - } - void DispatchSemanticsAction(int32_t id, - SemanticsAction action, - fml::MallocMapping args) override { - SemanticsActionObservation observation(id, action); - observations.push_back(observation); - } - void AccessibilityObjectDidBecomeFocused(int32_t id) override {} - void AccessibilityObjectDidLoseFocus(int32_t id) override {} - std::shared_ptr GetPlatformViewsController() const override { - return nil; - } - std::vector observations; - bool isVoiceOverRunningValue; - - private: - UIView* view_; - UIWindow* window_; -}; - -class MockAccessibilityBridgeNoWindow : public AccessibilityBridgeIos { - public: - MockAccessibilityBridgeNoWindow() : observations({}) { - view_ = [[UIView alloc] initWithFrame:kScreenSize]; - } - bool isVoiceOverRunning() const override { return isVoiceOverRunningValue; } - UIView* view() const override { return view_; } - UIView* textInputView() override { return nil; } - void DispatchSemanticsAction(int32_t id, SemanticsAction action) override { - SemanticsActionObservation observation(id, action); - observations.push_back(observation); - } - void DispatchSemanticsAction(int32_t id, - SemanticsAction action, - fml::MallocMapping args) override { - SemanticsActionObservation observation(id, action); - observations.push_back(observation); - } - void AccessibilityObjectDidBecomeFocused(int32_t id) override {} - void AccessibilityObjectDidLoseFocus(int32_t id) override {} - std::shared_ptr GetPlatformViewsController() const override { - return nil; - } - std::vector observations; - bool isVoiceOverRunningValue; - - private: - UIView* view_; -}; -} // namespace -} // namespace flutter - @interface SemanticsObjectTest : XCTestCase @end -@interface SemanticsObject (Tests) -- (BOOL)accessibilityScrollToVisible; -- (BOOL)accessibilityScrollToVisibleWithChild:(id)child; -- (id)_accessibilityHitTest:(CGPoint)point withEvent:(UIEvent*)event; -@end - @implementation SemanticsObjectTest - (void)testCreate { @@ -203,54 +119,6 @@ - (void)testAccessibilityHitTestNoFocusableItem { XCTAssertNil(hitTestResult); } -- (void)testAccessibilityHitTestSearchCanReturnPlatformView { - fml::WeakPtrFactory factory( - new flutter::MockAccessibilityBridge()); - fml::WeakPtr bridge = factory.GetWeakPtr(); - SemanticsObject* object0 = [[SemanticsObject alloc] initWithBridge:bridge uid:0]; - SemanticsObject* object1 = [[SemanticsObject alloc] initWithBridge:bridge uid:1]; - SemanticsObject* object3 = [[SemanticsObject alloc] initWithBridge:bridge uid:3]; - UIView* platformView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)]; - FlutterPlatformViewSemanticsContainer* platformViewSemanticsContainer = - [[FlutterPlatformViewSemanticsContainer alloc] initWithBridge:bridge - uid:1 - platformView:platformView]; - - object0.children = @[ object1 ]; - object0.childrenInHitTestOrder = @[ object1 ]; - object1.children = @[ platformViewSemanticsContainer, object3 ]; - object1.childrenInHitTestOrder = @[ platformViewSemanticsContainer, object3 ]; - - flutter::SemanticsNode node0; - node0.id = 0; - node0.rect = SkRect::MakeXYWH(0, 0, 200, 200); - node0.label = "0"; - [object0 setSemanticsNode:&node0]; - - flutter::SemanticsNode node1; - node1.id = 1; - node1.rect = SkRect::MakeXYWH(0, 0, 200, 200); - node1.label = "1"; - [object1 setSemanticsNode:&node1]; - - flutter::SemanticsNode node2; - node2.id = 2; - node2.rect = SkRect::MakeXYWH(0, 0, 100, 100); - node2.label = "2"; - [platformViewSemanticsContainer setSemanticsNode:&node2]; - - flutter::SemanticsNode node3; - node3.id = 3; - node3.rect = SkRect::MakeXYWH(0, 0, 200, 200); - node3.label = "3"; - [object3 setSemanticsNode:&node3]; - - CGPoint point = CGPointMake(10, 10); - id hitTestResult = [object0 _accessibilityHitTest:point withEvent:nil]; - - XCTAssertEqual(hitTestResult, platformView); -} - - (void)testAccessibilityScrollToVisible { fml::WeakPtrFactory factory( new flutter::MockAccessibilityBridge()); @@ -897,27 +765,6 @@ - (void)testShouldDispatchShowOnScreenActionForHidden { XCTAssertTrue(bridge->observations[0].action == flutter::SemanticsAction::kShowOnScreen); } -- (void)testFlutterPlatformViewSemanticsContainer { - fml::WeakPtrFactory factory( - new flutter::MockAccessibilityBridge()); - fml::WeakPtr bridge = factory.GetWeakPtr(); - __weak UIView* weakPlatformView; - @autoreleasepool { - UIView* platformView = [[UIView alloc] init]; - - FlutterPlatformViewSemanticsContainer* container = - [[FlutterPlatformViewSemanticsContainer alloc] initWithBridge:bridge - uid:1 - platformView:platformView]; - XCTAssertEqualObjects(container.accessibilityElements, @[ platformView ]); - weakPlatformView = platformView; - XCTAssertNotNil(weakPlatformView); - } - // Check if there's no more strong references to `platformView` after container and platformView - // are released. - XCTAssertNil(weakPlatformView); -} - - (void)testFlutterSwitchSemanticsObjectMatchesUISwitch { fml::WeakPtrFactory factory( new flutter::MockAccessibilityBridge()); diff --git a/shell/platform/darwin/ios/framework/Source/SemanticsObjectTestMocks.h b/shell/platform/darwin/ios/framework/Source/SemanticsObjectTestMocks.h new file mode 100644 index 0000000000000..0f0c0303d4a98 --- /dev/null +++ b/shell/platform/darwin/ios/framework/Source/SemanticsObjectTestMocks.h @@ -0,0 +1,95 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_SEMANTICS_OBJECT_TEST_MOCKS_H_ +#define SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_SEMANTICS_OBJECT_TEST_MOCKS_H_ + +#import "flutter/shell/platform/darwin/ios/framework/Source/SemanticsObject.h" + +const CGRect kScreenSize = CGRectMake(0, 0, 600, 800); + +namespace flutter { +namespace { + +class SemanticsActionObservation { + public: + SemanticsActionObservation(int32_t observed_id, SemanticsAction observed_action) + : id(observed_id), action(observed_action) {} + + int32_t id; + SemanticsAction action; +}; + +class MockAccessibilityBridge : public AccessibilityBridgeIos { + public: + MockAccessibilityBridge() : observations({}) { + view_ = [[UIView alloc] initWithFrame:kScreenSize]; + window_ = [[UIWindow alloc] initWithFrame:kScreenSize]; + [window_ addSubview:view_]; + } + bool isVoiceOverRunning() const override { return isVoiceOverRunningValue; } + UIView* view() const override { return view_; } + UIView* textInputView() override { return nil; } + void DispatchSemanticsAction(int32_t id, SemanticsAction action) override { + SemanticsActionObservation observation(id, action); + observations.push_back(observation); + } + void DispatchSemanticsAction(int32_t id, + SemanticsAction action, + fml::MallocMapping args) override { + SemanticsActionObservation observation(id, action); + observations.push_back(observation); + } + void AccessibilityObjectDidBecomeFocused(int32_t id) override {} + void AccessibilityObjectDidLoseFocus(int32_t id) override {} + std::shared_ptr GetPlatformViewsController() const override { + return nil; + } + std::vector observations; + bool isVoiceOverRunningValue; + + private: + UIView* view_; + UIWindow* window_; +}; + +class MockAccessibilityBridgeNoWindow : public AccessibilityBridgeIos { + public: + MockAccessibilityBridgeNoWindow() : observations({}) { + view_ = [[UIView alloc] initWithFrame:kScreenSize]; + } + bool isVoiceOverRunning() const override { return isVoiceOverRunningValue; } + UIView* view() const override { return view_; } + UIView* textInputView() override { return nil; } + void DispatchSemanticsAction(int32_t id, SemanticsAction action) override { + SemanticsActionObservation observation(id, action); + observations.push_back(observation); + } + void DispatchSemanticsAction(int32_t id, + SemanticsAction action, + fml::MallocMapping args) override { + SemanticsActionObservation observation(id, action); + observations.push_back(observation); + } + void AccessibilityObjectDidBecomeFocused(int32_t id) override {} + void AccessibilityObjectDidLoseFocus(int32_t id) override {} + std::shared_ptr GetPlatformViewsController() const override { + return nil; + } + std::vector observations; + bool isVoiceOverRunningValue; + + private: + UIView* view_; +}; +} // namespace +} // namespace flutter + +@interface SemanticsObject (Tests) +- (BOOL)accessibilityScrollToVisible; +- (BOOL)accessibilityScrollToVisibleWithChild:(id)child; +- (id)_accessibilityHitTest:(CGPoint)point withEvent:(UIEvent*)event; +@end + +#endif // SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_SEMANTICS_OBJECT_TEST_MOCKS_H_ diff --git a/shell/platform/darwin/ios/framework/Source/SemanticsObjectTest_mrc.mm b/shell/platform/darwin/ios/framework/Source/SemanticsObjectTest_mrc.mm new file mode 100644 index 0000000000000..0567e37c0e30e --- /dev/null +++ b/shell/platform/darwin/ios/framework/Source/SemanticsObjectTest_mrc.mm @@ -0,0 +1,89 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import +#import + +#import "flutter/shell/platform/darwin/common/framework/Headers/FlutterMacros.h" +#import "flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h" +#import "flutter/shell/platform/darwin/ios/framework/Source/FlutterTouchInterceptingView_Test.h" +#import "flutter/shell/platform/darwin/ios/framework/Source/SemanticsObject.h" +#import "flutter/shell/platform/darwin/ios/framework/Source/SemanticsObjectTestMocks.h" + +FLUTTER_ASSERT_NOT_ARC + +@interface SemanticsObjectTestMRC : XCTestCase +@end + +@implementation SemanticsObjectTestMRC + +- (void)testAccessibilityHitTestSearchCanReturnPlatformView { + fml::WeakPtrFactory factory( + new flutter::MockAccessibilityBridge()); + fml::WeakPtr bridge = factory.GetWeakPtr(); + SemanticsObject* object0 = [[[SemanticsObject alloc] initWithBridge:bridge uid:0] autorelease]; + SemanticsObject* object1 = [[[SemanticsObject alloc] initWithBridge:bridge uid:1] autorelease]; + SemanticsObject* object3 = [[[SemanticsObject alloc] initWithBridge:bridge uid:3] autorelease]; + FlutterTouchInterceptingView* platformView = + [[[FlutterTouchInterceptingView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)] autorelease]; + FlutterPlatformViewSemanticsContainer* platformViewSemanticsContainer = + [[[FlutterPlatformViewSemanticsContainer alloc] initWithBridge:bridge + uid:1 + platformView:platformView] autorelease]; + + object0.children = @[ object1 ]; + object0.childrenInHitTestOrder = @[ object1 ]; + object1.children = @[ platformViewSemanticsContainer, object3 ]; + object1.childrenInHitTestOrder = @[ platformViewSemanticsContainer, object3 ]; + + flutter::SemanticsNode node0; + node0.id = 0; + node0.rect = SkRect::MakeXYWH(0, 0, 200, 200); + node0.label = "0"; + [object0 setSemanticsNode:&node0]; + + flutter::SemanticsNode node1; + node1.id = 1; + node1.rect = SkRect::MakeXYWH(0, 0, 200, 200); + node1.label = "1"; + [object1 setSemanticsNode:&node1]; + + flutter::SemanticsNode node2; + node2.id = 2; + node2.rect = SkRect::MakeXYWH(0, 0, 100, 100); + node2.label = "2"; + [platformViewSemanticsContainer setSemanticsNode:&node2]; + + flutter::SemanticsNode node3; + node3.id = 3; + node3.rect = SkRect::MakeXYWH(0, 0, 200, 200); + node3.label = "3"; + [object3 setSemanticsNode:&node3]; + + CGPoint point = CGPointMake(10, 10); + id hitTestResult = [object0 _accessibilityHitTest:point withEvent:nil]; + + XCTAssertEqual(hitTestResult, platformView); +} + +- (void)testFlutterPlatformViewSemanticsContainer { + fml::WeakPtrFactory factory( + new flutter::MockAccessibilityBridge()); + fml::WeakPtr bridge = factory.GetWeakPtr(); + FlutterTouchInterceptingView* platformView = + [[[FlutterTouchInterceptingView alloc] init] autorelease]; + @autoreleasepool { + FlutterPlatformViewSemanticsContainer* container = + [[[FlutterPlatformViewSemanticsContainer alloc] initWithBridge:bridge + uid:1 + platformView:platformView] autorelease]; + XCTAssertEqualObjects(platformView.accessibilityContainer, container); + XCTAssertEqual(platformView.retainCount, 2u); + } + // Check if there's no more strong references to `platformView` after container and platformView + // are released. + XCTAssertEqual(platformView.retainCount, 1u); +} + +@end diff --git a/shell/platform/darwin/ios/framework/Source/accessibility_bridge.mm b/shell/platform/darwin/ios/framework/Source/accessibility_bridge.mm index bf19109e92d07..27b33ad4ca3d4 100644 --- a/shell/platform/darwin/ios/framework/Source/accessibility_bridge.mm +++ b/shell/platform/darwin/ios/framework/Source/accessibility_bridge.mm @@ -279,7 +279,7 @@ static void ReplaceSemanticsObject(SemanticsObject* oldObject, return [[[FlutterPlatformViewSemanticsContainer alloc] initWithBridge:weak_ptr uid:node.id - platformView:weak_ptr->GetPlatformViewsController()->GetPlatformViewByID( + platformView:weak_ptr->GetPlatformViewsController()->GetFlutterTouchInterceptingViewByID( node.platformViewId)] autorelease]; } else { return [[[FlutterSemanticsObject alloc] initWithBridge:weak_ptr uid:node.id] autorelease]; From c6344d4298403ffcc5bf9657c2e0525096ee0171 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Wed, 4 Oct 2023 14:57:52 -0700 Subject: [PATCH 472/859] Update buildroot to 5d60bd2. (#46564) Pulls in the changes to format GN files. --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 38de5b293c294..017e5c032fe36 100644 --- a/DEPS +++ b/DEPS @@ -262,7 +262,7 @@ allowed_hosts = [ ] deps = { - 'src': 'https://github.com/flutter/buildroot.git' + '@' + '9780f253156165c515962f5f0c56235d34617689', + 'src': 'https://github.com/flutter/buildroot.git' + '@' + '5d60bd2eb4642b64d00c845e5ca9f1ea41fd6db6', # Fuchsia compatibility # From 6957f525794f942c5e6c7cb4ddf41df1527630c2 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 5 Oct 2023 13:46:51 +1300 Subject: [PATCH 473/859] Use GdkEvent methods to access values, direct access is removed in GTK4. (#46526) This should have no effect on the current implementation, and will be one less thing needed when we migrate to GTK4. --- shell/platform/linux/fl_key_event.cc | 26 +++--- shell/platform/linux/fl_scrolling_manager.cc | 63 ++++++++------ shell/platform/linux/fl_view.cc | 86 +++++++++++++------- 3 files changed, 110 insertions(+), 65 deletions(-) diff --git a/shell/platform/linux/fl_key_event.cc b/shell/platform/linux/fl_key_event.cc index db258f9187f20..228186f09cb65 100644 --- a/shell/platform/linux/fl_key_event.cc +++ b/shell/platform/linux/fl_key_event.cc @@ -9,21 +9,27 @@ static void dispose_origin_from_gdk_event(gpointer origin) { gdk_event_free(reinterpret_cast(origin)); } -FlKeyEvent* fl_key_event_new_from_gdk_event(GdkEvent* raw_event) { - g_return_val_if_fail(raw_event != nullptr, nullptr); - GdkEventKey* event = reinterpret_cast(raw_event); - GdkEventType type = event->type; +FlKeyEvent* fl_key_event_new_from_gdk_event(GdkEvent* event) { + g_return_val_if_fail(event != nullptr, nullptr); + GdkEventType type = gdk_event_get_event_type(event); g_return_val_if_fail(type == GDK_KEY_PRESS || type == GDK_KEY_RELEASE, nullptr); FlKeyEvent* result = g_new(FlKeyEvent, 1); - result->time = event->time; + guint16 keycode = 0; + gdk_event_get_keycode(event, &keycode); + guint keyval = 0; + gdk_event_get_keyval(event, &keyval); + GdkModifierType state = static_cast(0); + gdk_event_get_state(event, &state); + + result->time = gdk_event_get_time(event); result->is_press = type == GDK_KEY_PRESS; - result->keycode = event->hardware_keycode; - result->keyval = event->keyval; - result->state = event->state; - result->string = g_strdup(event->string); - result->group = event->group; + result->keycode = keycode; + result->keyval = keyval; + result->state = state; + result->string = g_strdup(event->key.string); + result->group = event->key.group; result->origin = event; result->dispose_origin = dispose_origin_from_gdk_event; diff --git a/shell/platform/linux/fl_scrolling_manager.cc b/shell/platform/linux/fl_scrolling_manager.cc index f75efec4440c6..f819c6052a3f1 100644 --- a/shell/platform/linux/fl_scrolling_manager.cc +++ b/shell/platform/linux/fl_scrolling_manager.cc @@ -65,20 +65,31 @@ void fl_scrolling_manager_set_last_mouse_position(FlScrollingManager* self, } void fl_scrolling_manager_handle_scroll_event(FlScrollingManager* self, - GdkEventScroll* event, + GdkEventScroll* scroll_event, gint scale_factor) { + GdkEvent* event = reinterpret_cast(scroll_event); + + guint event_time = gdk_event_get_time(event); + gdouble event_x = 0.0, event_y = 0.0; + gdk_event_get_coords(event, &event_x, &event_y); gdouble scroll_delta_x = 0.0, scroll_delta_y = 0.0; - if (event->direction == GDK_SCROLL_SMOOTH) { - scroll_delta_x = event->delta_x; - scroll_delta_y = event->delta_y; - } else if (event->direction == GDK_SCROLL_UP) { - scroll_delta_y = -1; - } else if (event->direction == GDK_SCROLL_DOWN) { - scroll_delta_y = 1; - } else if (event->direction == GDK_SCROLL_LEFT) { - scroll_delta_x = -1; - } else if (event->direction == GDK_SCROLL_RIGHT) { - scroll_delta_x = 1; + GdkScrollDirection event_direction = GDK_SCROLL_SMOOTH; + if (gdk_event_get_scroll_direction(event, &event_direction)) { + if (event_direction == GDK_SCROLL_UP) { + scroll_delta_x = 0; + scroll_delta_y = -1; + } else if (event_direction == GDK_SCROLL_DOWN) { + scroll_delta_x = 0; + scroll_delta_y = 1; + } else if (event_direction == GDK_SCROLL_LEFT) { + scroll_delta_x = -1; + scroll_delta_y = 0; + } else if (event_direction == GDK_SCROLL_RIGHT) { + scroll_delta_x = 1; + scroll_delta_y = 0; + } + } else { + gdk_event_get_scroll_deltas(event, &scroll_delta_x, &scroll_delta_y); } // The multiplier is taken from the Chromium source @@ -87,14 +98,14 @@ void fl_scrolling_manager_handle_scroll_event(FlScrollingManager* self, scroll_delta_x *= kScrollOffsetMultiplier * scale_factor; scroll_delta_y *= kScrollOffsetMultiplier * scale_factor; - if (gdk_device_get_source(gdk_event_get_source_device( - reinterpret_cast(event))) == GDK_SOURCE_TOUCHPAD) { + if (gdk_device_get_source(gdk_event_get_source_device(event)) == + GDK_SOURCE_TOUCHPAD) { scroll_delta_x *= -1; scroll_delta_y *= -1; - if (event->is_stop) { + if (gdk_event_is_scroll_stop_event(event)) { fl_scrolling_view_delegate_send_pointer_pan_zoom_event( - self->view_delegate, event->time * kMicrosecondsPerMillisecond, - event->x * scale_factor, event->y * scale_factor, kPanZoomEnd, + self->view_delegate, event_time * kMicrosecondsPerMillisecond, + event_x * scale_factor, event_y * scale_factor, kPanZoomEnd, self->pan_x, self->pan_y, 0, 0); self->pan_started = FALSE; } else { @@ -102,28 +113,28 @@ void fl_scrolling_manager_handle_scroll_event(FlScrollingManager* self, self->pan_x = 0; self->pan_y = 0; fl_scrolling_view_delegate_send_pointer_pan_zoom_event( - self->view_delegate, event->time * kMicrosecondsPerMillisecond, - event->x * scale_factor, event->y * scale_factor, kPanZoomStart, 0, - 0, 0, 0); + self->view_delegate, event_time * kMicrosecondsPerMillisecond, + event_x * scale_factor, event_y * scale_factor, kPanZoomStart, 0, 0, + 0, 0); self->pan_started = TRUE; } self->pan_x += scroll_delta_x; self->pan_y += scroll_delta_y; fl_scrolling_view_delegate_send_pointer_pan_zoom_event( - self->view_delegate, event->time * kMicrosecondsPerMillisecond, - event->x * scale_factor, event->y * scale_factor, kPanZoomUpdate, + self->view_delegate, event_time * kMicrosecondsPerMillisecond, + event_x * scale_factor, event_y * scale_factor, kPanZoomUpdate, self->pan_x, self->pan_y, 1, 0); } } else { - self->last_x = event->x * scale_factor; - self->last_y = event->y * scale_factor; + self->last_x = event_x * scale_factor; + self->last_y = event_y * scale_factor; fl_scrolling_view_delegate_send_mouse_pointer_event( self->view_delegate, FlutterPointerPhase::kMove /* arbitrary value, phase will be ignored as this is a discrete scroll event */ , - event->time * kMicrosecondsPerMillisecond, event->x * scale_factor, - event->y * scale_factor, scroll_delta_x, scroll_delta_y, 0); + event_time * kMicrosecondsPerMillisecond, event_x * scale_factor, + event_y * scale_factor, scroll_delta_x, scroll_delta_y, 0); } } diff --git a/shell/platform/linux/fl_view.cc b/shell/platform/linux/fl_view.cc index b341114076de7..e41bbebdabec9 100644 --- a/shell/platform/linux/fl_view.cc +++ b/shell/platform/linux/fl_view.cc @@ -125,9 +125,18 @@ static void init_scrolling(FlView* self) { } // Converts a GDK button event into a Flutter event and sends it to the engine. -static gboolean send_pointer_button_event(FlView* self, GdkEventButton* event) { +static gboolean send_pointer_button_event(FlView* self, GdkEvent* event) { + guint event_time = gdk_event_get_time(event); + GdkEventType event_type = gdk_event_get_event_type(event); + GdkModifierType event_state = static_cast(0); + gdk_event_get_state(event, &event_state); + guint event_button = 0; + gdk_event_get_button(event, &event_button); + gdouble event_x = 0.0, event_y = 0.0; + gdk_event_get_coords(event, &event_x, &event_y); + int64_t button; - switch (event->button) { + switch (event_button) { case 1: button = kFlutterPointerButtonMousePrimary; break; @@ -142,7 +151,7 @@ static gboolean send_pointer_button_event(FlView* self, GdkEventButton* event) { } int old_button_state = self->button_state; FlutterPointerPhase phase = kMove; - if (event->type == GDK_BUTTON_PRESS) { + if (event_type == GDK_BUTTON_PRESS) { // Drop the event if Flutter already thinks the button is down. if ((self->button_state & button) != 0) { return FALSE; @@ -150,7 +159,7 @@ static gboolean send_pointer_button_event(FlView* self, GdkEventButton* event) { self->button_state ^= button; phase = old_button_state == 0 ? kDown : kMove; - } else if (event->type == GDK_BUTTON_RELEASE) { + } else if (event_type == GDK_BUTTON_RELEASE) { // Drop the event if Flutter already thinks the button is up. if ((self->button_state & button) == 0) { return FALSE; @@ -165,15 +174,13 @@ static gboolean send_pointer_button_event(FlView* self, GdkEventButton* event) { } gint scale_factor = gtk_widget_get_scale_factor(GTK_WIDGET(self)); - fl_scrolling_manager_set_last_mouse_position(self->scrolling_manager, - event->x * scale_factor, - event->y * scale_factor); + fl_scrolling_manager_set_last_mouse_position( + self->scrolling_manager, event_x * scale_factor, event_y * scale_factor); fl_keyboard_manager_sync_modifier_if_needed(self->keyboard_manager, - event->state, event->time); + event_state, event_time); fl_engine_send_mouse_pointer_event( - self->engine, phase, event->time * kMicrosecondsPerMillisecond, - event->x * scale_factor, event->y * scale_factor, 0, 0, - self->button_state); + self->engine, phase, event_time * kMicrosecondsPerMillisecond, + event_x * scale_factor, event_y * scale_factor, 0, 0, self->button_state); return TRUE; } @@ -286,8 +293,9 @@ static void fl_view_keyboard_delegate_iface_init( std::unique_ptr in_event) { FlKeyEvent* event = in_event.release(); GdkEvent* gdk_event = reinterpret_cast(event->origin); - GdkEventType type = gdk_event->type; - g_return_if_fail(type == GDK_KEY_PRESS || type == GDK_KEY_RELEASE); + GdkEventType event_type = gdk_event_get_event_type(gdk_event); + g_return_if_fail(event_type == GDK_KEY_PRESS || + event_type == GDK_KEY_RELEASE); gdk_event_put(gdk_event); fl_key_event_dispose(event); }; @@ -352,23 +360,27 @@ static void fl_view_text_input_delegate_iface_init( // Signal handler for GtkWidget::button-press-event static gboolean button_press_event_cb(GtkWidget* widget, - GdkEventButton* event, + GdkEventButton* button_event, FlView* self) { + GdkEvent* event = reinterpret_cast(button_event); + // Flutter doesn't handle double and triple click events. - if (event->type == GDK_DOUBLE_BUTTON_PRESS || - event->type == GDK_TRIPLE_BUTTON_PRESS) { + GdkEventType event_type = gdk_event_get_event_type(event); + if (event_type == GDK_DOUBLE_BUTTON_PRESS || + event_type == GDK_TRIPLE_BUTTON_PRESS) { return FALSE; } - check_pointer_inside(self, reinterpret_cast(event)); + check_pointer_inside(self, event); return send_pointer_button_event(self, event); } // Signal handler for GtkWidget::button-release-event static gboolean button_release_event_cb(GtkWidget* widget, - GdkEventButton* event, + GdkEventButton* button_event, FlView* self) { + GdkEvent* event = reinterpret_cast(button_event); return send_pointer_button_event(self, event); } @@ -387,44 +399,60 @@ static gboolean scroll_event_cb(GtkWidget* widget, // Signal handler for GtkWidget::motion-notify-event static gboolean motion_notify_event_cb(GtkWidget* widget, - GdkEventMotion* event, + GdkEventMotion* motion_event, FlView* self) { + GdkEvent* event = reinterpret_cast(motion_event); + if (self->engine == nullptr) { return FALSE; } - check_pointer_inside(self, reinterpret_cast(event)); + guint event_time = gdk_event_get_time(event); + GdkModifierType event_state = static_cast(0); + gdk_event_get_state(event, &event_state); + gdouble event_x = 0.0, event_y = 0.0; + gdk_event_get_coords(event, &event_x, &event_y); + + check_pointer_inside(self, event); gint scale_factor = gtk_widget_get_scale_factor(GTK_WIDGET(self)); fl_keyboard_manager_sync_modifier_if_needed(self->keyboard_manager, - event->state, event->time); + event_state, event_time); fl_engine_send_mouse_pointer_event( self->engine, self->button_state != 0 ? kMove : kHover, - event->time * kMicrosecondsPerMillisecond, event->x * scale_factor, - event->y * scale_factor, 0, 0, self->button_state); + event_time * kMicrosecondsPerMillisecond, event_x * scale_factor, + event_y * scale_factor, 0, 0, self->button_state); return TRUE; } // Signal handler for GtkWidget::enter-notify-event static gboolean enter_notify_event_cb(GtkWidget* widget, - GdkEventCrossing* event, + GdkEventCrossing* crossing_event, FlView* self) { + GdkEvent* event = reinterpret_cast(crossing_event); + if (self->engine == nullptr) { return FALSE; } - check_pointer_inside(self, reinterpret_cast(event)); + check_pointer_inside(self, event); return TRUE; } // Signal handler for GtkWidget::leave-notify-event static gboolean leave_notify_event_cb(GtkWidget* widget, - GdkEventCrossing* event, + GdkEventCrossing* crossing_event, FlView* self) { - if (event->mode != GDK_CROSSING_NORMAL) { + GdkEvent* event = reinterpret_cast(crossing_event); + + guint event_time = gdk_event_get_time(event); + gdouble event_x = 0.0, event_y = 0.0; + gdk_event_get_coords(event, &event_x, &event_y); + + if (crossing_event->mode != GDK_CROSSING_NORMAL) { return FALSE; } @@ -438,8 +466,8 @@ static gboolean leave_notify_event_cb(GtkWidget* widget, if (self->pointer_inside && self->button_state == 0) { gint scale_factor = gtk_widget_get_scale_factor(GTK_WIDGET(self)); fl_engine_send_mouse_pointer_event( - self->engine, kRemove, event->time * kMicrosecondsPerMillisecond, - event->x * scale_factor, event->y * scale_factor, 0, 0, + self->engine, kRemove, event_time * kMicrosecondsPerMillisecond, + event_x * scale_factor, event_y * scale_factor, 0, 0, self->button_state); self->pointer_inside = FALSE; } From 33d403990c640f1c73e8f3deb8f6a21cc9bf3a1e Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 4 Oct 2023 20:55:24 -0400 Subject: [PATCH 474/859] Roll Skia from 073737b7f4ab to 10b86aa8d8b7 (1 revision) (#46570) https://skia.googlesource.com/skia.git/+log/073737b7f4ab..10b86aa8d8b7 2023-10-04 jvanverth@google.com Disable GrTessellationPathRenderer on webgl with intel driver If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 017e5c032fe36..8e86e387d8a33 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '073737b7f4ab6093caca9fd4097af33e68f0ce9a', + 'skia_revision': '10b86aa8d8b7d7fde93271614668d0442aa6ddf2', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 0b54e0792f858..96e3f4e97f79c 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: f59f5ea26717a2ff7d5b493371200522 +Signature: 0d393cafb3ee18cd193ec71df85354dc ==================================================================================================== LIBRARY: etc1 From 50426a15c50d543ffd83156334e15ea1f3aea06f Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 4 Oct 2023 22:20:21 -0400 Subject: [PATCH 475/859] Roll Dart SDK from b8fceaea291c to 368fd3846df0 (1 revision) (#46571) https://dart.googlesource.com/sdk.git/+log/b8fceaea291c..368fd3846df0 2023-10-04 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-231.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC chinmaygarde@google.com,dart-vm-team@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 8e86e387d8a33..af7d16e8c6534 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': 'b8fceaea291c28d123ca4b217e85bd8a74e8ddf8', + 'dart_revision': '368fd3846df0fc5c9cefbba7fb4b2cec72327cfa', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py From 85d522809e2c74ff529b5440ba06307869083312 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 4 Oct 2023 23:10:24 -0400 Subject: [PATCH 476/859] Roll Skia from 10b86aa8d8b7 to 0206ca4badc0 (1 revision) (#46572) https://skia.googlesource.com/skia.git/+log/10b86aa8d8b7..0206ca4badc0 2023-10-05 armansito@google.com [graphite][viewer] Context options and UI for path renderer strategy If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index af7d16e8c6534..a1ea4eed9c56e 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '10b86aa8d8b7d7fde93271614668d0442aa6ddf2', + 'skia_revision': '0206ca4badc02de44a6d2990ad649db16bad0997', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 96e3f4e97f79c..77932fc117888 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 0d393cafb3ee18cd193ec71df85354dc +Signature: 02fbbdb814fdcf11afc81a119c6f40f8 ==================================================================================================== LIBRARY: etc1 From dda7dd4be12f7b3fb5e3c414b6ac9e42fd3a93d2 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 4 Oct 2023 23:51:00 -0400 Subject: [PATCH 477/859] Roll Skia from 0206ca4badc0 to 7e025304e846 (1 revision) (#46574) https://skia.googlesource.com/skia.git/+log/0206ca4badc0..7e025304e846 2023-10-05 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 548271dcec9f to ff2054861dc4 (10 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index a1ea4eed9c56e..ec88224f5a36a 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '0206ca4badc02de44a6d2990ad649db16bad0997', + 'skia_revision': '7e025304e84620c3c26903cc118f12978c2c9940', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From df2e8634c2eac30f4c2af6500d121793de298f95 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 5 Oct 2023 01:28:30 -0400 Subject: [PATCH 478/859] Roll Skia from 7e025304e846 to e9b5e455ff8d (1 revision) (#46575) https://skia.googlesource.com/skia.git/+log/7e025304e846..e9b5e455ff8d 2023-10-05 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from c97b5ae9f547 to e12f70e0a324 (1 revision) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index ec88224f5a36a..2e644285806ff 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '7e025304e84620c3c26903cc118f12978c2c9940', + 'skia_revision': 'e9b5e455ff8d108fd21630eade500220beb45c94', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 77932fc117888..6ab93ceaaac2e 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 02fbbdb814fdcf11afc81a119c6f40f8 +Signature: 31c8e2caa3f4cd9c8ac9536d6503e41d ==================================================================================================== LIBRARY: etc1 From 9f17e4217772ad22c5e01d1618b3586c379272b8 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 5 Oct 2023 02:05:05 -0400 Subject: [PATCH 479/859] Roll Skia from e9b5e455ff8d to f0cbcb892b2b (1 revision) (#46577) https://skia.googlesource.com/skia.git/+log/e9b5e455ff8d..f0cbcb892b2b 2023-10-05 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from e12f70e0a324 to 98777c2e9e16 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 2e644285806ff..d1ab24f82c037 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'e9b5e455ff8d108fd21630eade500220beb45c94', + 'skia_revision': 'f0cbcb892b2bea91d7672305bbac7630d211163e', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 34005352c07737e2905cd6d5448f358491270042 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 5 Oct 2023 03:06:00 -0400 Subject: [PATCH 480/859] Roll Fuchsia Mac SDK from Q0h8rkXPNpWBnlAnS... to -RGP9v0n9shWn5yg1... (#46578) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC chinmaygarde@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index d1ab24f82c037..ee02e73ff92fe 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'Q0h8rkXPNpWBnlAnSLNL5A6pto3js8axhJn5AUck6jEC' + 'version': '-RGP9v0n9shWn5yg11uhSfeSxWKITjtZcfzyAnSQpjAC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From a1f0b7920151e3854f93672271d8b7d96def9983 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 5 Oct 2023 03:30:22 -0400 Subject: [PATCH 481/859] Roll Skia from f0cbcb892b2b to 2be211c972d5 (1 revision) (#46579) https://skia.googlesource.com/skia.git/+log/f0cbcb892b2b..2be211c972d5 2023-10-05 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from ffb323805790 to 3d75b794df0f (7 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index ee02e73ff92fe..ecbb57b6aabe5 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'f0cbcb892b2bea91d7672305bbac7630d211163e', + 'skia_revision': '2be211c972d5ae9e4b532b50d6e88dee1804b791', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 9cb8a51dfe6a1ec14ae5d8125e599eac0a9d0f7b Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 5 Oct 2023 04:40:23 -0400 Subject: [PATCH 482/859] Roll Fuchsia Linux SDK from z_GRSMyHRsHjrpY48... to bnd4FFub2R9Q4mlAC... (#46580) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC chinmaygarde@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index ecbb57b6aabe5..b3025827bb461 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'z_GRSMyHRsHjrpY48puQrM75okLbiRu2OqBeF0bI5SsC' + 'version': 'bnd4FFub2R9Q4mlACUBYwX_BXVW9fGB2dKIgkjI_V7IC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index 98e7226da65b0..4f0a341af2761 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: 851b3937fdef6e5331cd58b8a1140094 +Signature: a5564d09f645ecd5585b06d44af67877 ==================================================================================================== LIBRARY: fuchsia_sdk @@ -4359,6 +4359,7 @@ ORIGIN: ../../../fuchsia/sdk/linux/pkg/driver_testing_cpp/driver_runtime.cc + .. ORIGIN: ../../../fuchsia/sdk/linux/pkg/driver_testing_cpp/environment_variables.cc + ../../../fuchsia/sdk/linux/LICENSE 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/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 @@ -4426,6 +4427,7 @@ FILE: ../../../fuchsia/sdk/linux/pkg/driver_testing_cpp/driver_runtime.cc 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/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 From 8c56ca73f127defbb41bd9295321ed4efb61773d Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 5 Oct 2023 10:11:24 -0400 Subject: [PATCH 483/859] Roll Skia from 2be211c972d5 to 09c71755bc6c (1 revision) (#46584) https://skia.googlesource.com/skia.git/+log/2be211c972d5..09c71755bc6c 2023-10-05 robertphillips@google.com [graphite] Deduplicate the paint color uniform If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index b3025827bb461..e811a666bca10 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '2be211c972d5ae9e4b532b50d6e88dee1804b791', + 'skia_revision': '09c71755bc6c922a79d9a6f5b6e062e7fa1403aa', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 6ab93ceaaac2e..860612baa44a2 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 31c8e2caa3f4cd9c8ac9536d6503e41d +Signature: ae7a4ba40bc970202723867089957aa9 ==================================================================================================== LIBRARY: etc1 From b718fbbb8a88d23c27a9a954ef47f09529d109b7 Mon Sep 17 00:00:00 2001 From: Kevin Lubick Date: Thu, 5 Oct 2023 10:21:39 -0400 Subject: [PATCH 484/859] Replace use of Skia's Base64 Encoding/Decoding logic with a copy of the equivalent code (#46543) Skia would like to remove SkBase64.h from its public API. This ports the same functionality into Flutter's codebase with tests. The implementation was copied from [Skia](https://github.com/google/skia/blob/387853af198f03b4634239fb92cac5d49fe37100/src/utils/SkBase64.cpp) then modified to match Flutter's style and have readable tests. In a follow-up PR, I would like to add a function to pre-flight the calculation needed to figure out how many bytes are needed to be allocated, to avoid the clunky double API call (see the TODOs). I chose to put the code in `//shell/common` at the suggestion of Flutter devs, but it needs to be in its own source_set because it is used in a few other places (for now) and we want to avoid dependency cycles. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [ ] I listed at least one issue that this PR fixes in the description above. - [x] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I signed the [CLA]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat --- ci/licenses_golden/excluded_files | 1 + ci/licenses_golden/licenses_flutter | 4 + common/graphics/BUILD.gn | 1 + common/graphics/persistent_cache.cc | 16 +- flow/BUILD.gn | 1 + .../performance_overlay_layer_unittests.cc | 8 +- shell/common/BUILD.gn | 12 ++ shell/common/base64.cc | 157 ++++++++++++++++++ shell/common/base64.h | 53 ++++++ shell/common/base64_unittests.cc | 120 +++++++++++++ shell/common/rasterizer.cc | 8 +- shell/common/shell.cc | 8 +- 12 files changed, 372 insertions(+), 17 deletions(-) create mode 100644 shell/common/base64.cc create mode 100644 shell/common/base64.h create mode 100644 shell/common/base64_unittests.cc diff --git a/ci/licenses_golden/excluded_files b/ci/licenses_golden/excluded_files index e9dec480e9a60..13b5089450a68 100644 --- a/ci/licenses_golden/excluded_files +++ b/ci/licenses_golden/excluded_files @@ -232,6 +232,7 @@ ../../../flutter/runtime/no_dart_plugin_registrant_unittests.cc ../../../flutter/runtime/type_conversions_unittests.cc ../../../flutter/shell/common/animator_unittests.cc +../../../flutter/shell/common/base64_unittests.cc ../../../flutter/shell/common/context_options_unittests.cc ../../../flutter/shell/common/dl_op_spy_unittests.cc ../../../flutter/shell/common/engine_unittests.cc diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index 4f39204140091..182f1b441f212 100644 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -2247,6 +2247,8 @@ ORIGIN: ../../../flutter/runtime/test_font_data.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/runtime/test_font_data.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/common/animator.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/common/animator.h + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/shell/common/base64.cc + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/shell/common/base64.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/common/context_options.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/common/context_options.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/common/dart_native_benchmarks.cc + ../../../flutter/LICENSE @@ -5010,6 +5012,8 @@ FILE: ../../../flutter/runtime/test_font_data.cc FILE: ../../../flutter/runtime/test_font_data.h FILE: ../../../flutter/shell/common/animator.cc FILE: ../../../flutter/shell/common/animator.h +FILE: ../../../flutter/shell/common/base64.cc +FILE: ../../../flutter/shell/common/base64.h FILE: ../../../flutter/shell/common/context_options.cc FILE: ../../../flutter/shell/common/context_options.h FILE: ../../../flutter/shell/common/dart_native_benchmarks.cc diff --git a/common/graphics/BUILD.gn b/common/graphics/BUILD.gn index 70fbc1ad5a614..61d410d4f864d 100644 --- a/common/graphics/BUILD.gn +++ b/common/graphics/BUILD.gn @@ -24,6 +24,7 @@ source_set("graphics") { "//flutter/assets", "//flutter/display_list", "//flutter/fml", + "//flutter/shell/common:base64", "//flutter/shell/version:version", "//third_party/boringssl", "//third_party/rapidjson", diff --git a/common/graphics/persistent_cache.cc b/common/graphics/persistent_cache.cc index 50d09bb8fcbc6..0d24125d1f00b 100644 --- a/common/graphics/persistent_cache.cc +++ b/common/graphics/persistent_cache.cc @@ -18,11 +18,11 @@ #include "flutter/fml/mapping.h" #include "flutter/fml/paths.h" #include "flutter/fml/trace_event.h" +#include "flutter/shell/common/base64.h" #include "flutter/shell/version/version.h" #include "openssl/sha.h" #include "rapidjson/document.h" #include "third_party/skia/include/gpu/GrDirectContext.h" -#include "third_party/skia/include/utils/SkBase64.h" namespace flutter { @@ -169,21 +169,21 @@ sk_sp ParseBase32(const std::string& input) { } sk_sp ParseBase64(const std::string& input) { - SkBase64::Error error; + Base64::Error error; size_t output_len; - error = SkBase64::Decode(input.c_str(), input.length(), nullptr, &output_len); - if (error != SkBase64::Error::kNoError) { - FML_LOG(ERROR) << "Base64 decode error: " << error; + error = Base64::Decode(input.c_str(), input.length(), nullptr, &output_len); + if (error != Base64::Error::kNone) { + FML_LOG(ERROR) << "Base64 decode error: " << (int)error; FML_LOG(ERROR) << "Base64 can't decode: " << input; return nullptr; } sk_sp data = SkData::MakeUninitialized(output_len); void* output = data->writable_data(); - error = SkBase64::Decode(input.c_str(), input.length(), output, &output_len); - if (error != SkBase64::Error::kNoError) { - FML_LOG(ERROR) << "Base64 decode error: " << error; + error = Base64::Decode(input.c_str(), input.length(), output, &output_len); + if (error != Base64::Error::kNone) { + FML_LOG(ERROR) << "Base64 decode error: " << (int)error; FML_LOG(ERROR) << "Base64 can't decode: " << input; return nullptr; } diff --git a/flow/BUILD.gn b/flow/BUILD.gn index a75605749c7aa..492126c2a3086 100644 --- a/flow/BUILD.gn +++ b/flow/BUILD.gn @@ -188,6 +188,7 @@ if (enable_unittests) { "//flutter/common/graphics", "//flutter/display_list/testing:display_list_testing", "//flutter/fml", + "//flutter/shell/common:base64", "//flutter/testing:skia", "//flutter/testing:testing_lib", "//third_party/dart/runtime:libdart_jit", # for tracing diff --git a/flow/layers/performance_overlay_layer_unittests.cc b/flow/layers/performance_overlay_layer_unittests.cc index e1bbb29893268..0c4f7e11d3a2a 100644 --- a/flow/layers/performance_overlay_layer_unittests.cc +++ b/flow/layers/performance_overlay_layer_unittests.cc @@ -10,6 +10,7 @@ #include "flutter/flow/flow_test_utils.h" #include "flutter/flow/raster_cache.h" #include "flutter/flow/testing/layer_test.h" +#include "flutter/shell/common/base64.h" #include "flutter/testing/mock_canvas.h" #include "third_party/skia/include/core/SkData.h" #include "third_party/skia/include/core/SkImage.h" @@ -18,7 +19,6 @@ #include "third_party/skia/include/core/SkSurface.h" #include "third_party/skia/include/core/SkTextBlob.h" #include "third_party/skia/include/encode/SkPngEncoder.h" -#include "third_party/skia/include/utils/SkBase64.h" namespace flutter { namespace testing { @@ -111,11 +111,13 @@ static void TestPerformanceOverlayLayerGold(int refresh_rate) { wstream.write(snapshot_data->data(), snapshot_data->size()); wstream.flush(); + // TODO(kjlubick) We shouldn't need to call Encode once to pre-flight the + // encode length. It should be ceil(4/3 * sksl.value->size()). size_t b64_size = - SkBase64::Encode(snapshot_data->data(), snapshot_data->size(), nullptr); + Base64::Encode(snapshot_data->data(), snapshot_data->size(), nullptr); sk_sp b64_data = SkData::MakeUninitialized(b64_size + 1); char* b64_char = static_cast(b64_data->writable_data()); - SkBase64::Encode(snapshot_data->data(), snapshot_data->size(), b64_char); + Base64::Encode(snapshot_data->data(), snapshot_data->size(), b64_char); b64_char[b64_size] = 0; // make it null terminated for printing EXPECT_TRUE(golden_data_matches) diff --git a/shell/common/BUILD.gn b/shell/common/BUILD.gn index c5a4db91e4333..31d89012a58d3 100644 --- a/shell/common/BUILD.gn +++ b/shell/common/BUILD.gn @@ -143,6 +143,7 @@ source_set("common") { "//flutter/fml", "//flutter/lib/ui", "//flutter/runtime", + "//flutter/shell/common:base64", "//flutter/shell/profiling", "//third_party/dart/runtime:dart_api", "//third_party/skia", @@ -158,6 +159,15 @@ source_set("common") { } } +# These are in their own source_set to avoid a dependency cycle with //common/graphics +source_set("base64") { + sources = [ + "base64.cc", + "base64.h", + ] + deps = [ "//flutter/fml" ] +} + template("shell_host_executable") { executable(target_name) { testonly = true @@ -293,6 +303,7 @@ if (enable_unittests) { sources = [ "animator_unittests.cc", + "base64_unittests.cc", "context_options_unittests.cc", "dl_op_spy_unittests.cc", "engine_unittests.cc", @@ -312,6 +323,7 @@ if (enable_unittests) { ":shell_unittests_fixtures", "//flutter/assets", "//flutter/common/graphics", + "//flutter/shell/common:base64", "//flutter/shell/profiling:profiling_unittests", "//flutter/shell/version", "//flutter/testing:fixture_test", diff --git a/shell/common/base64.cc b/shell/common/base64.cc new file mode 100644 index 0000000000000..f026f9b8fc2bb --- /dev/null +++ b/shell/common/base64.cc @@ -0,0 +1,157 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "flutter/shell/common/base64.h" + +#include "flutter/fml/logging.h" + +#include + +#define DecodePad -2 +#define EncodePad 64 + +static const char kDefaultEncode[] = + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "abcdefghijklmnopqrstuvwxyz" + "0123456789+/="; + +static const signed char kDecodeData[] = { + 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, + -1, -1, DecodePad, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51}; + +namespace flutter { + +Base64::Error Base64::Decode(const void* srcv, + size_t srcLength, + void* dstv, + size_t* dstLength) { + const unsigned char* src = static_cast(srcv); + unsigned char* dst = static_cast(dstv); + + int i = 0; + bool padTwo = false; + bool padThree = false; + char unsigned const* const end = src + srcLength; + while (src < end) { + unsigned char bytes[4] = {0, 0, 0, 0}; + int byte = 0; + do { + unsigned char srcByte = *src++; + if (srcByte == 0) { + *dstLength = i; + return Error::kNone; + } + if (srcByte <= ' ') { + continue; // treat as white space + } + if (srcByte < '+' || srcByte > 'z') { + return Error::kBadChar; + } + signed char decoded = kDecodeData[srcByte - '+']; + bytes[byte] = decoded; + if (decoded != DecodePad) { + if (decoded < 0) { + return Error::kBadChar; + } + byte++; + if (*src) { + continue; + } + if (byte == 0) { + *dstLength = i; + return Error::kNone; + } + if (byte == 4) { + break; + } + } + // As an optimization, if we find an equals sign + // we assume all future bytes to read are the + // appropriate number of padding equals signs. + if (byte < 2) { + return Error::kBadPadding; + } + padThree = true; + if (byte == 2) { + padTwo = true; + } + break; + } while (byte < 4); + int two = 0; + int three = 0; + if (dst) { + int one = (uint8_t)(bytes[0] << 2); + two = bytes[1]; + one |= two >> 4; + two = (uint8_t)((two << 4) & 0xFF); + three = bytes[2]; + two |= three >> 2; + three = (uint8_t)((three << 6) & 0xFF); + three |= bytes[3]; + FML_DCHECK(one < 256 && two < 256 && three < 256); + dst[i] = (unsigned char)one; + } + i++; + if (padTwo) { + break; + } + if (dst) { + dst[i] = (unsigned char)two; + } + i++; + if (padThree) { + break; + } + if (dst) { + dst[i] = (unsigned char)three; + } + i++; + } + *dstLength = i; + return Error::kNone; +} + +size_t Base64::Encode(const void* srcv, size_t length, void* dstv) { + const unsigned char* src = static_cast(srcv); + unsigned char* dst = static_cast(dstv); + + const char* encode = kDefaultEncode; + if (dst) { + size_t remainder = length % 3; + char unsigned const* const end = &src[length - remainder]; + while (src < end) { + unsigned a = *src++; + unsigned b = *src++; + unsigned c = *src++; + int d = c & 0x3F; + c = (c >> 6 | b << 2) & 0x3F; + b = (b >> 4 | a << 4) & 0x3F; + a = a >> 2; + *dst++ = encode[a]; + *dst++ = encode[b]; + *dst++ = encode[c]; + *dst++ = encode[d]; + } + if (remainder > 0) { + int k1 = 0; + int k2 = EncodePad; + int a = (uint8_t)*src++; + if (remainder == 2) { + int b = *src++; + k1 = b >> 4; + k2 = (b << 2) & 0x3F; + } + *dst++ = encode[a >> 2]; + *dst++ = encode[(k1 | a << 4) & 0x3F]; + *dst++ = encode[k2]; + *dst++ = encode[EncodePad]; + } + } + return (length + 2) / 3 * 4; +} + +} // namespace flutter diff --git a/shell/common/base64.h b/shell/common/base64.h new file mode 100644 index 0000000000000..9e24cea437887 --- /dev/null +++ b/shell/common/base64.h @@ -0,0 +1,53 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef FLUTTER_SHELL_COMMON_BASE64_H_ +#define FLUTTER_SHELL_COMMON_BASE64_H_ + +#include + +namespace flutter { + +struct Base64 { + public: + enum class Error { + kNone, + kBadPadding, + kBadChar, + }; + + /** + Base64 encodes src into dst. + + Normally this is called once with 'dst' nullptr to get the required size, + then again with an allocated 'dst' pointer to do the actual encoding. + + @param dst nullptr or a pointer to a buffer large enough to receive the + result + + @return the required length of dst for encoding. + */ + static size_t Encode(const void* src, size_t length, void* dst); + + /** + Base64 decodes src into dst. + + Normally this is called once with 'dst' nullptr to get the required size, + then again with an allocated 'dst' pointer to do the actual encoding. + + @param dst nullptr or a pointer to a buffer large enough to receive the + result + + @param dstLength assigned the length dst is required to be. Must not be + nullptr. + */ + [[nodiscard]] static Error Decode(const void* src, + size_t srcLength, + void* dst, + size_t* dstLength); +}; + +} // namespace flutter + +#endif // FLUTTER_SHELL_COMMON_BASE64_H_ diff --git a/shell/common/base64_unittests.cc b/shell/common/base64_unittests.cc new file mode 100644 index 0000000000000..89ae026d034c1 --- /dev/null +++ b/shell/common/base64_unittests.cc @@ -0,0 +1,120 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "flutter/shell/common/base64.h" + +#include "fml/logging.h" +#include "gtest/gtest.h" + +#include + +namespace flutter { +namespace testing { + +TEST(Base64, EncodeStrings) { + auto test = [](const std::string& input, const std::string& output) { + char buffer[256]; + size_t len = Base64::Encode(input.c_str(), input.length(), &buffer); + FML_CHECK(len <= 256); + std::string actual(buffer, len); + ASSERT_STREQ(actual.c_str(), output.c_str()); + }; + // Some arbitrary strings + test("apple", "YXBwbGU="); + test("BANANA", "QkFOQU5B"); + test("Cherry Pie", "Q2hlcnJ5IFBpZQ=="); + test("fLoCcInAuCiNiHiLiPiLiFiCaTiOn", + "ZkxvQ2NJbkF1Q2lOaUhpTGlQaUxpRmlDYVRpT24="); + test("", ""); +} + +TEST(Base64, EncodeBytes) { + auto test = [](const uint8_t input[], size_t num, const std::string& output) { + char buffer[512]; + size_t len = Base64::Encode(input, num, &buffer); + FML_CHECK(len <= 512); + std::string actual(buffer, len); + ASSERT_STREQ(actual.c_str(), output.c_str()); + }; + // Some arbitrary raw bytes + uint8_t e[] = {0x02, 0x71, 0x82, 0x81, 0x82, 0x84, 0x59}; + test(e, sizeof(e), "AnGCgYKEWQ=="); + + uint8_t pi[] = {0x03, 0x24, 0x3F, 0x6A, 0x88, 0x85}; + test(pi, sizeof(pi), "AyQ/aoiF"); + + uint8_t bytes[256]; + for (int i = 0; i < 256; i++) { + bytes[i] = i; + } + test(bytes, sizeof(bytes), + "AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gIS" + "IjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFV" + "WV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJ" + "iouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8v" + "b6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8P" + "Hy8/T19vf4+fr7/P3+/w=="); +} + +TEST(Base64, DecodeStringsSuccess) { + auto test = [](const std::string& input, const std::string& output) { + char buffer[256]; + size_t len = 0; + auto err = Base64::Decode(input.c_str(), input.length(), &buffer, &len); + ASSERT_EQ(err, Base64::Error::kNone); + FML_CHECK(len <= 256); + std::string actual(buffer, len); + ASSERT_STREQ(actual.c_str(), output.c_str()); + }; + // Some arbitrary strings + test("ZGF0ZQ==", "date"); + test("RWdncGxhbnQ=", "Eggplant"); + test("RmlzaCAmIENoaXBz", "Fish & Chips"); + test("U3VQZVJjQWxJZlJhR2lMaVN0SWNFeFBpQWxJZE9jSW9Vcw==", + "SuPeRcAlIfRaGiLiStIcExPiAlIdOcIoUs"); + + // Spaces are ignored + test("Y X Bwb GU=", "apple"); +} + +TEST(Base64, DecodeStringsHasErrors) { + auto test = [](const std::string& input, Base64::Error expectedError) { + char buffer[256]; + size_t len = 0; + auto err = Base64::Decode(input.c_str(), input.length(), &buffer, &len); + ASSERT_EQ(err, expectedError) << input; + }; + + test("Nuts&Bolts", Base64::Error::kBadChar); + test("Error!", Base64::Error::kBadChar); + test(":", Base64::Error::kBadChar); + + test("RmlzaCAmIENoaXBz=", Base64::Error::kBadPadding); + // Some cases of bad padding may be ignored due to an internal optimization + // test("ZGF0ZQ=", Base64::Error::kBadPadding); + // test("RWdncGxhbnQ", Base64::Error::kBadPadding); +} + +TEST(Base64, DecodeBytes) { + auto test = [](const std::string& input, const uint8_t output[], size_t num) { + char buffer[256]; + size_t len = 0; + auto err = Base64::Decode(input.c_str(), input.length(), &buffer, &len); + ASSERT_EQ(err, Base64::Error::kNone); + FML_CHECK(len <= 256); + ASSERT_EQ(num, len) << input; + for (int i = 0; i < int(len); i++) { + ASSERT_EQ(uint8_t(buffer[i]), output[i]) << input << i; + } + }; + // Some arbitrary raw bytes, same as the byte output above + uint8_t e[] = {0x02, 0x71, 0x82, 0x81, 0x82, 0x84, 0x59}; + test("AnGCgYKEWQ==", e, sizeof(e)); + + uint8_t pi[] = {0x03, 0x24, 0x3F, 0x6A, 0x88, 0x85}; + test("AyQ/aoiF", pi, sizeof(pi)); +} + +} // namespace testing +} // namespace flutter \ No newline at end of file diff --git a/shell/common/rasterizer.cc b/shell/common/rasterizer.cc index 7ab349d353f37..10c6429304ed5 100644 --- a/shell/common/rasterizer.cc +++ b/shell/common/rasterizer.cc @@ -14,6 +14,7 @@ #include "flutter/flow/layers/offscreen_surface.h" #include "flutter/fml/time/time_delta.h" #include "flutter/fml/time/time_point.h" +#include "flutter/shell/common/base64.h" #include "flutter/shell/common/serialization_callbacks.h" #include "fml/make_copyable.h" #include "third_party/skia/include/core/SkColorSpace.h" @@ -32,7 +33,6 @@ #include "third_party/skia/include/gpu/GrDirectContext.h" #include "third_party/skia/include/gpu/GrTypes.h" #include "third_party/skia/include/gpu/ganesh/SkSurfaceGanesh.h" -#include "third_party/skia/include/utils/SkBase64.h" namespace flutter { @@ -910,9 +910,11 @@ Rasterizer::Screenshot Rasterizer::ScreenshotLastLayerTree( } if (base64_encode) { - size_t b64_size = SkBase64::Encode(data->data(), data->size(), nullptr); + // TODO(kjlubick) We shouldn't need to call Encode once to pre-flight the + // encode length. It should be ceil(4/3 * sksl.value->size()). + size_t b64_size = Base64::Encode(data->data(), data->size(), nullptr); auto b64_data = SkData::MakeUninitialized(b64_size); - SkBase64::Encode(data->data(), data->size(), b64_data->writable_data()); + Base64::Encode(data->data(), data->size(), b64_data->writable_data()); return Rasterizer::Screenshot{b64_data, layer_tree->frame_size(), format}; } diff --git a/shell/common/shell.cc b/shell/common/shell.cc index 44e5d2a65e110..20fcebeeb7d70 100644 --- a/shell/common/shell.cc +++ b/shell/common/shell.cc @@ -23,6 +23,7 @@ #include "flutter/fml/paths.h" #include "flutter/fml/trace_event.h" #include "flutter/runtime/dart_vm.h" +#include "flutter/shell/common/base64.h" #include "flutter/shell/common/engine.h" #include "flutter/shell/common/skia_event_tracer_impl.h" #include "flutter/shell/common/switches.h" @@ -39,7 +40,6 @@ #include "third_party/skia/include/codec/SkWbmpDecoder.h" #include "third_party/skia/include/codec/SkWebpDecoder.h" #include "third_party/skia/include/core/SkGraphics.h" -#include "third_party/skia/include/utils/SkBase64.h" #include "third_party/tonic/common/log.h" namespace flutter { @@ -1840,11 +1840,13 @@ bool Shell::OnServiceProtocolGetSkSLs( PersistentCache* persistent_cache = PersistentCache::GetCacheForProcess(); std::vector sksls = persistent_cache->LoadSkSLs(); for (const auto& sksl : sksls) { + // TODO(kjlubick) We shouldn't need to call Encode once to pre-flight the + // encode length. It should be ceil(4/3 * sksl.value->size()). size_t b64_size = - SkBase64::Encode(sksl.value->data(), sksl.value->size(), nullptr); + Base64::Encode(sksl.value->data(), sksl.value->size(), nullptr); sk_sp b64_data = SkData::MakeUninitialized(b64_size + 1); char* b64_char = static_cast(b64_data->writable_data()); - SkBase64::Encode(sksl.value->data(), sksl.value->size(), b64_char); + Base64::Encode(sksl.value->data(), sksl.value->size(), b64_char); b64_char[b64_size] = 0; // make it null terminated for printing rapidjson::Value shader_value(b64_char, response->GetAllocator()); std::string_view key_view(reinterpret_cast(sksl.key->data()), From e0d3cf89b626a4137dd3eaa8a17afb3b334c29a4 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 5 Oct 2023 10:57:24 -0400 Subject: [PATCH 485/859] Roll Skia from 09c71755bc6c to 0f2af25f15ee (2 revisions) (#46586) https://skia.googlesource.com/skia.git/+log/09c71755bc6c..0f2af25f15ee 2023-10-05 robertphillips@google.com [graphite] Add BlendModeBlenderBlock::AddBlock 2023-10-05 michaelludwig@google.com Reland "Reland "[skif] Draw FilterResults directly for layer restoration"" If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index e811a666bca10..2152b79476188 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '09c71755bc6c922a79d9a6f5b6e062e7fa1403aa', + 'skia_revision': '0f2af25f15ee799bdd20b99e4364f14e9a102993', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 860612baa44a2..2b33117aba735 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: ae7a4ba40bc970202723867089957aa9 +Signature: aad9b500e58c02d34f507dd9712d9760 ==================================================================================================== LIBRARY: etc1 From 357e1057ba85860aabee0b840d1df5766ef8513d Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 5 Oct 2023 15:43:04 -0400 Subject: [PATCH 486/859] Roll Fuchsia Mac SDK from -RGP9v0n9shWn5yg1... to th0Ks2IEZYh6fe8G5... (#46593) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC chinmaygarde@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 2152b79476188..de913c8f66140 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': '-RGP9v0n9shWn5yg11uhSfeSxWKITjtZcfzyAnSQpjAC' + 'version': 'th0Ks2IEZYh6fe8G5Zqu1UyM0gHL1NDidMfddpUpdl0C' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 29ddcfed5c82953b9136bcd90c612fef48db8183 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 5 Oct 2023 17:28:15 -0400 Subject: [PATCH 487/859] Roll Fuchsia Linux SDK from bnd4FFub2R9Q4mlAC... to eI_FBTaRgvoBQaK5n... (#46599) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC chinmaygarde@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index de913c8f66140..b4cc96874d8bf 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'bnd4FFub2R9Q4mlACUBYwX_BXVW9fGB2dKIgkjI_V7IC' + 'version': 'eI_FBTaRgvoBQaK5nsE0K-AujC35ZpysI402bk_1T8wC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index 4f0a341af2761..6fdc20ab69dba 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: a5564d09f645ecd5585b06d44af67877 +Signature: 0adaf5679bd328bdeebd7a443b551386 ==================================================================================================== LIBRARY: fuchsia_sdk From 3836d31f9f41815601d1a78624e46d2c3931dbfb Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 6 Oct 2023 04:22:53 -0400 Subject: [PATCH 488/859] Roll Fuchsia Mac SDK from th0Ks2IEZYh6fe8G5... to 14dOVccxXOO5RPJJB... (#46611) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC chinmaygarde@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index b4cc96874d8bf..691b5c8d4546e 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'th0Ks2IEZYh6fe8G5Zqu1UyM0gHL1NDidMfddpUpdl0C' + 'version': '14dOVccxXOO5RPJJBeUl3_APVpvAC_DpEmdgFup3dkkC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 986cd26d94463ee156be79997aa14d2377f0e70b Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 6 Oct 2023 06:19:22 -0400 Subject: [PATCH 489/859] Roll Fuchsia Linux SDK from eI_FBTaRgvoBQaK5n... to K7K76tME-CSGhYlFm... (#46614) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC chinmaygarde@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 691b5c8d4546e..ac62ae3cfd73e 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'eI_FBTaRgvoBQaK5nsE0K-AujC35ZpysI402bk_1T8wC' + 'version': 'K7K76tME-CSGhYlFmsC4nS5xdnOj6UVJPDnp1M7Xs-oC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index 6fdc20ab69dba..ce60370226e2a 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: 0adaf5679bd328bdeebd7a443b551386 +Signature: c3477bd0325b8d94925741c2651875ba ==================================================================================================== LIBRARY: fuchsia_sdk From d5cf300816f39842bf21ab44c8e6ff930cec21d7 Mon Sep 17 00:00:00 2001 From: Brandon DeRosier Date: Fri, 6 Oct 2023 09:05:20 -0700 Subject: [PATCH 490/859] [Impeller] Track clip coverage per-pass when not collapsing. (#46597) Resolves https://github.com/flutter/flutter/issues/135916. Big credits to @gaaclarke for the repros and investigation around this. Moves back to tracking clip coverage per-pass when not collapsing. This is especially important for SaveLayers with MatrixImageFilters, which can transform the rendered layer texture and thereby move elements inside or outside of existing parent clips. This should have little to no performance impact, since we should already be generating correct minimal subpass textures based on correct subpass coverage computation. Before: Screenshot 2023-10-05 at 1 25 29 PM https://github.com/flutter/engine/assets/919017/9284f055-bee1-40cd-8b7e-f478b00d01da After: Screenshot 2023-10-05 at 1 24 17 PM https://github.com/flutter/engine/assets/919017/0fbd1f96-8920-472c-bb0e-4414187fc72d --- impeller/aiks/aiks_unittests.cc | 45 ++++++++++++++++--- .../filters/matrix_filter_contents.cc | 2 +- impeller/entity/entity_pass.cc | 20 ++++++--- impeller/entity/entity_pass.h | 16 ++++++- 4 files changed, 67 insertions(+), 16 deletions(-) diff --git a/impeller/aiks/aiks_unittests.cc b/impeller/aiks/aiks_unittests.cc index 695a7b26a1de2..1a50dbe3e9406 100644 --- a/impeller/aiks/aiks_unittests.cc +++ b/impeller/aiks/aiks_unittests.cc @@ -3619,15 +3619,46 @@ TEST_P(AiksTest, MatrixImageFilterMagnify) { canvas.Translate({600, -200}); canvas.SaveLayer({ .image_filter = std::make_shared( - Matrix{ - 2, 0, 0, 0, // - 0, 2, 0, 0, // - 0, 0, 2, 0, // - 0, 0, 0, 1 // - }, + Matrix::MakeScale({2, 2, 2}), SamplerDescriptor{}), + }); + canvas.DrawImage(image, {0, 0}, + Paint{.color = Color::White().WithAlpha(0.5)}); + canvas.Restore(); + + ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); +} + +// Render a white circle at the top left corner of the screen. +TEST_P(AiksTest, MatrixImageFilterDoesntCullWhenTranslatedFromOffscreen) { + Canvas canvas; + canvas.Scale(GetContentScale()); + canvas.Translate({100, 100}); + // Draw a circle in a SaveLayer at -300, but move it back on-screen with a + // +300 translation applied by a SaveLayer image filter. + canvas.SaveLayer({ + .image_filter = std::make_shared( + Matrix::MakeTranslation({300, 0}), SamplerDescriptor{}), + }); + canvas.DrawCircle({-300, 0}, 100, {.color = Color::Green()}); + canvas.Restore(); + + ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); +} + +// Render a white circle at the top left corner of the screen. +TEST_P(AiksTest, + MatrixImageFilterDoesntCullWhenScaledAndTranslatedFromOffscreen) { + Canvas canvas; + canvas.Scale(GetContentScale()); + canvas.Translate({100, 100}); + // Draw a circle in a SaveLayer at -300, but move it back on-screen with a + // +300 translation applied by a SaveLayer image filter. + canvas.SaveLayer({ + .image_filter = std::make_shared( + Matrix::MakeTranslation({300, 0}) * Matrix::MakeScale({2, 2, 2}), SamplerDescriptor{}), }); - canvas.DrawImage(image, {0, 0}, Paint{.color = Color(1.0, 1.0, 1.0, 0.5)}); + canvas.DrawCircle({-150, 0}, 50, {.color = Color::Green()}); canvas.Restore(); ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); diff --git a/impeller/entity/contents/filters/matrix_filter_contents.cc b/impeller/entity/contents/filters/matrix_filter_contents.cc index d88edc298e3b9..c16bcdb88d698 100644 --- a/impeller/entity/contents/filters/matrix_filter_contents.cc +++ b/impeller/entity/contents/filters/matrix_filter_contents.cc @@ -45,7 +45,7 @@ std::optional MatrixFilterContents::RenderFilter( // scaled up, then translations applied by the matrix should be magnified // accordingly. // - // To accomplish this, we sandwitch the filter's matrix within the CTM in both + // To accomplish this, we sandwich the filter's matrix within the CTM in both // cases. But notice that for the subpass backdrop filter case, we use the // "effect transform" instead of the Entity's transform! // diff --git a/impeller/entity/entity_pass.cc b/impeller/entity/entity_pass.cc index c6af10254f7d6..bb065b959e146 100644 --- a/impeller/entity/entity_pass.cc +++ b/impeller/entity/entity_pass.cc @@ -198,12 +198,10 @@ std::optional EntityPass::GetSubpassCoverage( std::shared_ptr image_filter = subpass.delegate_->WithImageFilter(Rect(), subpass.xformation_); - // If the filter graph transforms the basis of the subpass, then its space - // has deviated too much from the parent pass to safely intersect with the - // pass coverage limit. - coverage_limit = - (image_filter && !image_filter->IsTranslationOnly() ? std::nullopt - : coverage_limit); + // If the subpass has an image filter, then its coverage space may deviate + // from the parent pass and make intersecting with the pass coverage limit + // unsafe. + coverage_limit = image_filter ? std::nullopt : coverage_limit; auto entities_coverage = subpass.GetElementsCoverage(coverage_limit); // The entities don't cover anything. There is nothing to do. @@ -641,6 +639,14 @@ EntityPass::EntityResult EntityPass::GetEntityForElement( auto subpass_capture = capture.CreateChild("EntityPass"); subpass_capture.AddRect("Coverage", *subpass_coverage, {.readonly = true}); + // Start non-collapsed subpasses with a fresh clip coverage stack limited by + // the subpass coverage. This is important because image filters applied to + // save layers may transform the subpass texture after it's rendered, + // causing parent clip coverage to get misaligned with the actual area that + // the subpass will affect in the parent pass. + ClipCoverageStack subpass_clip_coverage_stack = {ClipCoverageLayer{ + .coverage = subpass_coverage, .clip_depth = subpass->clip_depth_}}; + // Stencil textures aren't shared between EntityPasses (as much of the // time they are transient). if (!subpass->OnRender( @@ -652,7 +658,7 @@ EntityPass::EntityResult EntityPass::GetEntityForElement( subpass_coverage->origin - global_pass_position, // local_pass_position ++pass_depth, // pass_depth - clip_coverage_stack, // clip_coverage_stack + subpass_clip_coverage_stack, // clip_coverage_stack subpass->clip_depth_, // clip_depth_floor subpass_backdrop_filter_contents // backdrop_filter_contents )) { diff --git a/impeller/entity/entity_pass.h b/impeller/entity/entity_pass.h index 522f4f9562b6e..261d3272b14aa 100644 --- a/impeller/entity/entity_pass.h +++ b/impeller/entity/entity_pass.h @@ -142,7 +142,21 @@ class EntityPass { void SetEnableOffscreenCheckerboard(bool enabled); //---------------------------------------------------------------------------- - /// @brief Get the coverage of an unfiltered subpass. + /// @brief Computes the coverage of a given subpass. This is used to + /// determine the texture size of a given subpass before it's rendered + /// to and passed through the subpass ImageFilter, if any. + /// + /// @param[in] subpass The EntityPass for which to compute + /// pre-filteredcoverage. + /// @param[in] coverage_limit Confines coverage to a specified area. This + /// hint is used to trim coverage to the root + /// framebuffer area. `std::nullopt` means there + /// is no limit. + /// + /// @return The screen space pixel area that the subpass contents will render + /// into, prior to being transformed by the subpass ImageFilter, if + /// any. `std::nullopt` means rendering the subpass will have no + /// effect on the color attachment. /// std::optional GetSubpassCoverage( const EntityPass& subpass, From a933ef856e130c6498772769702b325fdfeaa00e Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Fri, 6 Oct 2023 12:03:11 -0700 Subject: [PATCH 491/859] [Impeller] Refactor CapabilitiesGLES into a Capabilties. (#46621) From https://github.com/flutter/engine/pull/46585 For Framebuffer fetch and other changes we should refactor the CapabilitiesGLES into a regular capabilities. --- impeller/renderer/backend/gles/BUILD.gn | 1 + .../backend/gles/capabilities_gles.cc | 56 +++++++++++++++++ .../renderer/backend/gles/capabilities_gles.h | 63 ++++++++++++++++++- .../renderer/backend/gles/context_gles.cc | 23 +------ impeller/renderer/backend/gles/context_gles.h | 5 +- .../renderer/backend/gles/proc_table_gles.cc | 9 ++- .../renderer/backend/gles/proc_table_gles.h | 4 +- .../gles/test/capabilities_unittests.cc | 38 +++++++++++ 8 files changed, 169 insertions(+), 30 deletions(-) create mode 100644 impeller/renderer/backend/gles/test/capabilities_unittests.cc diff --git a/impeller/renderer/backend/gles/BUILD.gn b/impeller/renderer/backend/gles/BUILD.gn index 39b112fcb9295..2877f2c72a684 100644 --- a/impeller/renderer/backend/gles/BUILD.gn +++ b/impeller/renderer/backend/gles/BUILD.gn @@ -14,6 +14,7 @@ config("gles_config") { impeller_component("gles_unittests") { testonly = true sources = [ + "test/capabilities_unittests.cc", "test/mock_gles.cc", "test/mock_gles.h", "test/mock_gles_unittests.cc", diff --git a/impeller/renderer/backend/gles/capabilities_gles.cc b/impeller/renderer/backend/gles/capabilities_gles.cc index fff4e5889808e..e639b1428bf86 100644 --- a/impeller/renderer/backend/gles/capabilities_gles.cc +++ b/impeller/renderer/backend/gles/capabilities_gles.cc @@ -103,4 +103,60 @@ size_t CapabilitiesGLES::GetMaxTextureUnits(ShaderStage stage) const { FML_UNREACHABLE(); } +bool CapabilitiesGLES::SupportsOffscreenMSAA() const { + return false; +} + +bool CapabilitiesGLES::SupportsSSBO() const { + return false; +} + +bool CapabilitiesGLES::SupportsBufferToTextureBlits() const { + return false; +} + +bool CapabilitiesGLES::SupportsTextureToTextureBlits() const { + return false; +} + +bool CapabilitiesGLES::SupportsFramebufferFetch() const { + return false; +} + +bool CapabilitiesGLES::SupportsCompute() const { + return false; +} + +bool CapabilitiesGLES::SupportsComputeSubgroups() const { + return false; +} + +bool CapabilitiesGLES::SupportsReadFromOnscreenTexture() const { + return false; +} + +bool CapabilitiesGLES::SupportsReadFromResolve() const { + return false; +} + +bool CapabilitiesGLES::SupportsDecalSamplerAddressMode() const { + return false; +} + +bool CapabilitiesGLES::SupportsDeviceTransientTextures() const { + return false; +} + +PixelFormat CapabilitiesGLES::GetDefaultColorFormat() const { + return PixelFormat::kR8G8B8A8UNormInt; +} + +PixelFormat CapabilitiesGLES::GetDefaultStencilFormat() const { + return PixelFormat::kS8UInt; +} + +PixelFormat CapabilitiesGLES::GetDefaultDepthStencilFormat() const { + return PixelFormat::kD24UnormS8Uint; +} + } // namespace impeller diff --git a/impeller/renderer/backend/gles/capabilities_gles.h b/impeller/renderer/backend/gles/capabilities_gles.h index edcfb99892c9c..b6ba0850c7b67 100644 --- a/impeller/renderer/backend/gles/capabilities_gles.h +++ b/impeller/renderer/backend/gles/capabilities_gles.h @@ -6,16 +6,31 @@ #include -#include "flutter/fml/macros.h" +#include "impeller/base/backend_cast.h" #include "impeller/core/shader_types.h" #include "impeller/geometry/size.h" +#include "impeller/renderer/capabilities.h" namespace impeller { class ProcTableGLES; -struct CapabilitiesGLES { - CapabilitiesGLES(const ProcTableGLES& gl); +//------------------------------------------------------------------------------ +/// @brief The Vulkan layers and extensions wrangler. +/// +class CapabilitiesGLES final + : public Capabilities, + public BackendCast { + public: + explicit CapabilitiesGLES(const ProcTableGLES& gl); + + CapabilitiesGLES(const CapabilitiesGLES&) = delete; + + CapabilitiesGLES(CapabilitiesGLES&&) = delete; + + CapabilitiesGLES& operator=(const CapabilitiesGLES&) = delete; + + CapabilitiesGLES& operator=(CapabilitiesGLES&&) = delete; // Must be at least 8. size_t max_combined_texture_image_units = 8; @@ -57,6 +72,48 @@ struct CapabilitiesGLES { size_t num_shader_binary_formats = 0; size_t GetMaxTextureUnits(ShaderStage stage) const; + + // |Capabilities| + bool SupportsOffscreenMSAA() const override; + + // |Capabilities| + bool SupportsSSBO() const override; + + // |Capabilities| + bool SupportsBufferToTextureBlits() const override; + + // |Capabilities| + bool SupportsTextureToTextureBlits() const override; + + // |Capabilities| + bool SupportsFramebufferFetch() const override; + + // |Capabilities| + bool SupportsCompute() const override; + + // |Capabilities| + bool SupportsComputeSubgroups() const override; + + // |Capabilities| + bool SupportsReadFromOnscreenTexture() const override; + + // |Capabilities| + bool SupportsReadFromResolve() const override; + + // |Capabilities| + bool SupportsDecalSamplerAddressMode() const override; + + // |Capabilities| + bool SupportsDeviceTransientTextures() const override; + + // |Capabilities| + PixelFormat GetDefaultColorFormat() const override; + + // |Capabilities| + PixelFormat GetDefaultStencilFormat() const override; + + // |Capabilities| + PixelFormat GetDefaultDepthStencilFormat() const override; }; } // namespace impeller diff --git a/impeller/renderer/backend/gles/context_gles.cc b/impeller/renderer/backend/gles/context_gles.cc index df65f5a1e09e0..8d98d41144133 100644 --- a/impeller/renderer/backend/gles/context_gles.cc +++ b/impeller/renderer/backend/gles/context_gles.cc @@ -6,6 +6,7 @@ #include "impeller/base/config.h" #include "impeller/base/validation.h" +#include "impeller/renderer/backend/gles/command_buffer_gles.h" namespace impeller { @@ -58,27 +59,7 @@ ContextGLES::ContextGLES(std::unique_ptr gl, std::shared_ptr(new SamplerLibraryGLES()); } - // Create the device capabilities. - { - device_capabilities_ = - CapabilitiesBuilder() - .SetSupportsOffscreenMSAA(false) - .SetSupportsSSBO(false) - .SetSupportsBufferToTextureBlits(false) - .SetSupportsTextureToTextureBlits(false) - .SetSupportsFramebufferFetch(false) - .SetDefaultColorFormat(PixelFormat::kR8G8B8A8UNormInt) - .SetDefaultStencilFormat(PixelFormat::kS8UInt) - .SetDefaultDepthStencilFormat(PixelFormat::kD24UnormS8Uint) - .SetSupportsCompute(false) - .SetSupportsComputeSubgroups(false) - .SetSupportsReadFromResolve(false) - .SetSupportsReadFromOnscreenTexture(false) - .SetSupportsDecalSamplerAddressMode(false) - .SetSupportsDeviceTransientTextures(false) - .Build(); - } - + device_capabilities_ = reactor_->GetProcTable().GetCapabilities(); is_valid_ = true; } diff --git a/impeller/renderer/backend/gles/context_gles.h b/impeller/renderer/backend/gles/context_gles.h index 92054cb413bee..56da6c55a8092 100644 --- a/impeller/renderer/backend/gles/context_gles.h +++ b/impeller/renderer/backend/gles/context_gles.h @@ -7,7 +7,7 @@ #include "flutter/fml/macros.h" #include "impeller/base/backend_cast.h" #include "impeller/renderer/backend/gles/allocator_gles.h" -#include "impeller/renderer/backend/gles/command_buffer_gles.h" +#include "impeller/renderer/backend/gles/capabilities_gles.h" #include "impeller/renderer/backend/gles/pipeline_library_gles.h" #include "impeller/renderer/backend/gles/reactor_gles.h" #include "impeller/renderer/backend/gles/sampler_library_gles.h" @@ -44,6 +44,9 @@ class ContextGLES final : public Context, std::shared_ptr pipeline_library_; std::shared_ptr sampler_library_; std::shared_ptr resource_allocator_; + // Note: This is stored separately from the ProcTableGLES CapabilitiesGLES + // in order to satisfy the Context::GetCapabilities signature which returns + // a reference. std::shared_ptr device_capabilities_; bool is_valid_ = false; diff --git a/impeller/renderer/backend/gles/proc_table_gles.cc b/impeller/renderer/backend/gles/proc_table_gles.cc index 1a13757354725..7bfbf4dce3f10 100644 --- a/impeller/renderer/backend/gles/proc_table_gles.cc +++ b/impeller/renderer/backend/gles/proc_table_gles.cc @@ -9,6 +9,8 @@ #include "impeller/base/allocation.h" #include "impeller/base/comparable.h" #include "impeller/base/validation.h" +#include "impeller/renderer/backend/gles/capabilities_gles.h" +#include "impeller/renderer/capabilities.h" namespace impeller { @@ -125,7 +127,7 @@ ProcTableGLES::ProcTableGLES(Resolver resolver) { DiscardFramebufferEXT.Reset(); } - capabilities_ = std::make_unique(*this); + capabilities_ = std::make_shared(*this); is_valid_ = true; } @@ -148,8 +150,9 @@ const DescriptionGLES* ProcTableGLES::GetDescription() const { return description_.get(); } -const CapabilitiesGLES* ProcTableGLES::GetCapabilities() const { - return capabilities_.get(); +const std::shared_ptr& ProcTableGLES::GetCapabilities() + const { + return capabilities_; } static const char* FramebufferStatusToString(GLenum status) { diff --git a/impeller/renderer/backend/gles/proc_table_gles.h b/impeller/renderer/backend/gles/proc_table_gles.h index 831c909e7a6e6..22945e6283850 100644 --- a/impeller/renderer/backend/gles/proc_table_gles.h +++ b/impeller/renderer/backend/gles/proc_table_gles.h @@ -229,7 +229,7 @@ class ProcTableGLES { const DescriptionGLES* GetDescription() const; - const CapabilitiesGLES* GetCapabilities() const; + const std::shared_ptr& GetCapabilities() const; std::string DescribeCurrentFramebuffer() const; @@ -248,7 +248,7 @@ class ProcTableGLES { private: bool is_valid_ = false; std::unique_ptr description_; - std::unique_ptr capabilities_; + std::shared_ptr capabilities_; GLint debug_label_max_length_ = 0; FML_DISALLOW_COPY_AND_ASSIGN(ProcTableGLES); diff --git a/impeller/renderer/backend/gles/test/capabilities_unittests.cc b/impeller/renderer/backend/gles/test/capabilities_unittests.cc new file mode 100644 index 0000000000000..0bbc1b93e9775 --- /dev/null +++ b/impeller/renderer/backend/gles/test/capabilities_unittests.cc @@ -0,0 +1,38 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "flutter/testing/testing.h" // IWYU pragma: keep +#include "gtest/gtest.h" +#include "impeller/renderer/backend/gles/proc_table_gles.h" +#include "impeller/renderer/backend/gles/test/mock_gles.h" + +namespace impeller { +namespace testing { + +TEST(CapabilitiesGLES, CanInitializeWithDefaults) { + auto mock_gles = MockGLES::Init(); + + auto capabilities = mock_gles->GetProcTable().GetCapabilities(); + + EXPECT_FALSE(capabilities->SupportsOffscreenMSAA()); + EXPECT_FALSE(capabilities->SupportsSSBO()); + EXPECT_FALSE(capabilities->SupportsBufferToTextureBlits()); + EXPECT_FALSE(capabilities->SupportsTextureToTextureBlits()); + EXPECT_FALSE(capabilities->SupportsFramebufferFetch()); + EXPECT_FALSE(capabilities->SupportsCompute()); + EXPECT_FALSE(capabilities->SupportsComputeSubgroups()); + EXPECT_FALSE(capabilities->SupportsReadFromOnscreenTexture()); + EXPECT_FALSE(capabilities->SupportsReadFromResolve()); + EXPECT_FALSE(capabilities->SupportsDecalSamplerAddressMode()); + EXPECT_FALSE(capabilities->SupportsDeviceTransientTextures()); + + EXPECT_EQ(capabilities->GetDefaultColorFormat(), + PixelFormat::kR8G8B8A8UNormInt); + EXPECT_EQ(capabilities->GetDefaultStencilFormat(), PixelFormat::kS8UInt); + EXPECT_EQ(capabilities->GetDefaultDepthStencilFormat(), + PixelFormat::kD24UnormS8Uint); +} + +} // namespace testing +} // namespace impeller From 1dc9674c09dc61452a73b73140f6fac997556e1c Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Fri, 6 Oct 2023 13:49:08 -0700 Subject: [PATCH 492/859] [Impeller] Ensure known geometry has simple bounds computation. (#46623) Computing the bounds of an RRect can be really slow if you don't actually know that it is an RRect, and shows up in the traces for flutter gallery on wembly. This change should be semantically equivalent and is only an optimization to avoid recomputing the same value we already know. --- impeller/aiks/canvas.cc | 13 ++++-- impeller/display_list/dl_unittests.cc | 60 +++++++++++++++++++++++++++ 2 files changed, 69 insertions(+), 4 deletions(-) diff --git a/impeller/aiks/canvas.cc b/impeller/aiks/canvas.cc index e8271ca6428c0..d4d3829972fea 100644 --- a/impeller/aiks/canvas.cc +++ b/impeller/aiks/canvas.cc @@ -252,6 +252,7 @@ void Canvas::DrawRRect(Rect rect, Scalar corner_radius, const Paint& paint) { auto path = PathBuilder{} .SetConvexity(Convexity::kConvex) .AddRoundedRect(rect, corner_radius) + .SetBounds(rect) .TakePath(); if (paint.style == Paint::Style::kFill) { Entity entity; @@ -273,10 +274,13 @@ void Canvas::DrawCircle(Point center, Scalar radius, const Paint& paint) { paint)) { return; } - auto circle_path = PathBuilder{} - .AddCircle(center, radius) - .SetConvexity(Convexity::kConvex) - .TakePath(); + auto circle_path = + PathBuilder{} + .AddCircle(center, radius) + .SetConvexity(Convexity::kConvex) + .SetBounds(Rect::MakeLTRB(center.x - radius, center.y - radius, + center.x + radius, center.y + radius)) + .TakePath(); DrawPath(circle_path, paint); } @@ -317,6 +321,7 @@ void Canvas::ClipRRect(const Rect& rect, auto path = PathBuilder{} .SetConvexity(Convexity::kConvex) .AddRoundedRect(rect, corner_radius) + .SetBounds(rect) .TakePath(); std::optional inner_rect = (corner_radius * 2 < rect.size.width && diff --git a/impeller/display_list/dl_unittests.cc b/impeller/display_list/dl_unittests.cc index 896989c34ef3d..c59ca6b01056d 100644 --- a/impeller/display_list/dl_unittests.cc +++ b/impeller/display_list/dl_unittests.cc @@ -21,6 +21,7 @@ #include "impeller/display_list/dl_dispatcher.h" #include "impeller/display_list/dl_image_impeller.h" #include "impeller/display_list/dl_playground.h" +#include "impeller/entity/contents/clip_contents.h" #include "impeller/entity/contents/solid_color_contents.h" #include "impeller/entity/contents/solid_rrect_blur_contents.h" #include "impeller/geometry/constants.h" @@ -1681,6 +1682,65 @@ TEST_P(DisplayListTest, DrawVerticesBlendModes) { ASSERT_TRUE(OpenPlaygroundHere(callback)); } +template +static std::optional GetCoverageOfFirstEntity(const Picture& picture) { + std::optional coverage; + picture.pass->IterateAllEntities([&coverage](Entity& entity) { + if (std::static_pointer_cast(entity.GetContents())) { + auto contents = std::static_pointer_cast(entity.GetContents()); + Entity entity; + coverage = contents->GetCoverage(entity); + return false; + } + return true; + }); + return coverage; +} + +TEST(DisplayListTest, RRectBoundsComputation) { + SkRRect rrect = SkRRect::MakeRectXY(SkRect::MakeLTRB(0, 0, 100, 100), 4, 4); + SkPath path = SkPath().addRRect(rrect); + + flutter::DlPaint paint; + flutter::DisplayListBuilder builder; + + builder.DrawPath(path, paint); + auto display_list = builder.Build(); + + DlDispatcher dispatcher; + display_list->Dispatch(dispatcher); + auto picture = dispatcher.EndRecordingAsPicture(); + + std::optional coverage = + GetCoverageOfFirstEntity(picture); + + // Validate that the RRect coverage is _exactly_ the same as the input rect. + ASSERT_TRUE(coverage.has_value()); + ASSERT_EQ(coverage.value_or(Rect::MakeMaximum()), + Rect::MakeLTRB(0, 0, 100, 100)); +} + +TEST(DisplayListTest, CircleBoundsComputation) { + SkPath path = SkPath().addCircle(0, 0, 5); + + flutter::DlPaint paint; + flutter::DisplayListBuilder builder; + + builder.DrawPath(path, paint); + auto display_list = builder.Build(); + + DlDispatcher dispatcher; + display_list->Dispatch(dispatcher); + auto picture = dispatcher.EndRecordingAsPicture(); + + std::optional coverage = + GetCoverageOfFirstEntity(picture); + + ASSERT_TRUE(coverage.has_value()); + ASSERT_EQ(coverage.value_or(Rect::MakeMaximum()), + Rect::MakeLTRB(-5, -5, 5, 5)); +} + #ifdef IMPELLER_ENABLE_3D TEST_P(DisplayListTest, SceneColorSource) { // Load up the scene. From 14139def27442664ec122a333f711b5f54a2eddd Mon Sep 17 00:00:00 2001 From: Kevin Lubick Date: Fri, 6 Oct 2023 16:50:20 -0400 Subject: [PATCH 493/859] Add Base64::EncodedSize to tidy up allocations (#46624) As a follow-up to #46543, this adds a dedicated function to compute the size of the buffer needed to encode data using Base64 instead of calling the encode function with nullptr. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [ ] I listed at least one issue that this PR fixes in the description above. - [x] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I signed the [CLA]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat --- .../performance_overlay_layer_unittests.cc | 5 +- shell/common/base64.cc | 59 +++++++++---------- shell/common/base64.h | 20 ++++--- shell/common/base64_unittests.cc | 2 + shell/common/rasterizer.cc | 4 +- shell/common/shell.cc | 5 +- 6 files changed, 47 insertions(+), 48 deletions(-) diff --git a/flow/layers/performance_overlay_layer_unittests.cc b/flow/layers/performance_overlay_layer_unittests.cc index 0c4f7e11d3a2a..7537302d80fe7 100644 --- a/flow/layers/performance_overlay_layer_unittests.cc +++ b/flow/layers/performance_overlay_layer_unittests.cc @@ -111,10 +111,7 @@ static void TestPerformanceOverlayLayerGold(int refresh_rate) { wstream.write(snapshot_data->data(), snapshot_data->size()); wstream.flush(); - // TODO(kjlubick) We shouldn't need to call Encode once to pre-flight the - // encode length. It should be ceil(4/3 * sksl.value->size()). - size_t b64_size = - Base64::Encode(snapshot_data->data(), snapshot_data->size(), nullptr); + size_t b64_size = Base64::EncodedSize(snapshot_data->size()); sk_sp b64_data = SkData::MakeUninitialized(b64_size + 1); char* b64_char = static_cast(b64_data->writable_data()); Base64::Encode(snapshot_data->data(), snapshot_data->size(), b64_char); diff --git a/shell/common/base64.cc b/shell/common/base64.cc index f026f9b8fc2bb..3232446705b39 100644 --- a/shell/common/base64.cc +++ b/shell/common/base64.cc @@ -116,42 +116,41 @@ Base64::Error Base64::Decode(const void* srcv, } size_t Base64::Encode(const void* srcv, size_t length, void* dstv) { + FML_DCHECK(dstv); const unsigned char* src = static_cast(srcv); unsigned char* dst = static_cast(dstv); const char* encode = kDefaultEncode; - if (dst) { - size_t remainder = length % 3; - char unsigned const* const end = &src[length - remainder]; - while (src < end) { - unsigned a = *src++; - unsigned b = *src++; - unsigned c = *src++; - int d = c & 0x3F; - c = (c >> 6 | b << 2) & 0x3F; - b = (b >> 4 | a << 4) & 0x3F; - a = a >> 2; - *dst++ = encode[a]; - *dst++ = encode[b]; - *dst++ = encode[c]; - *dst++ = encode[d]; - } - if (remainder > 0) { - int k1 = 0; - int k2 = EncodePad; - int a = (uint8_t)*src++; - if (remainder == 2) { - int b = *src++; - k1 = b >> 4; - k2 = (b << 2) & 0x3F; - } - *dst++ = encode[a >> 2]; - *dst++ = encode[(k1 | a << 4) & 0x3F]; - *dst++ = encode[k2]; - *dst++ = encode[EncodePad]; + size_t remainder = length % 3; + char unsigned const* const end = &src[length - remainder]; + while (src < end) { + unsigned a = *src++; + unsigned b = *src++; + unsigned c = *src++; + int d = c & 0x3F; + c = (c >> 6 | b << 2) & 0x3F; + b = (b >> 4 | a << 4) & 0x3F; + a = a >> 2; + *dst++ = encode[a]; + *dst++ = encode[b]; + *dst++ = encode[c]; + *dst++ = encode[d]; + } + if (remainder > 0) { + int k1 = 0; + int k2 = EncodePad; + int a = (uint8_t)*src++; + if (remainder == 2) { + int b = *src++; + k1 = b >> 4; + k2 = (b << 2) & 0x3F; } + *dst++ = encode[a >> 2]; + *dst++ = encode[(k1 | a << 4) & 0x3F]; + *dst++ = encode[k2]; + *dst++ = encode[EncodePad]; } - return (length + 2) / 3 * 4; + return EncodedSize(length); } } // namespace flutter diff --git a/shell/common/base64.h b/shell/common/base64.h index 9e24cea437887..18f8a56dad539 100644 --- a/shell/common/base64.h +++ b/shell/common/base64.h @@ -20,21 +20,27 @@ struct Base64 { /** Base64 encodes src into dst. - Normally this is called once with 'dst' nullptr to get the required size, - then again with an allocated 'dst' pointer to do the actual encoding. - - @param dst nullptr or a pointer to a buffer large enough to receive the - result + @param dst a pointer to a buffer large enough to receive the result. @return the required length of dst for encoding. */ static size_t Encode(const void* src, size_t length, void* dst); + /** + Returns the length of the buffer that needs to be allocated to encode + srcDataLength bytes. + */ + static size_t EncodedSize(size_t srcDataLength) { + // Take the floor of division by 3 to find the number of groups that need to + // be encoded. Each group takes 4 bytes to be represented in base64. + return ((srcDataLength + 2) / 3) * 4; + } + /** Base64 decodes src into dst. - Normally this is called once with 'dst' nullptr to get the required size, - then again with an allocated 'dst' pointer to do the actual encoding. + This can be called once with 'dst' nullptr to get the required size, + then again with an allocated 'dst' pointer to do the actual decoding. @param dst nullptr or a pointer to a buffer large enough to receive the result diff --git a/shell/common/base64_unittests.cc b/shell/common/base64_unittests.cc index 89ae026d034c1..c9b3a04d5e4a1 100644 --- a/shell/common/base64_unittests.cc +++ b/shell/common/base64_unittests.cc @@ -17,6 +17,7 @@ TEST(Base64, EncodeStrings) { char buffer[256]; size_t len = Base64::Encode(input.c_str(), input.length(), &buffer); FML_CHECK(len <= 256); + ASSERT_EQ(len, Base64::EncodedSize(input.length())); std::string actual(buffer, len); ASSERT_STREQ(actual.c_str(), output.c_str()); }; @@ -34,6 +35,7 @@ TEST(Base64, EncodeBytes) { char buffer[512]; size_t len = Base64::Encode(input, num, &buffer); FML_CHECK(len <= 512); + ASSERT_EQ(len, Base64::EncodedSize(num)); std::string actual(buffer, len); ASSERT_STREQ(actual.c_str(), output.c_str()); }; diff --git a/shell/common/rasterizer.cc b/shell/common/rasterizer.cc index 10c6429304ed5..0fc4d884c97bf 100644 --- a/shell/common/rasterizer.cc +++ b/shell/common/rasterizer.cc @@ -910,9 +910,7 @@ Rasterizer::Screenshot Rasterizer::ScreenshotLastLayerTree( } if (base64_encode) { - // TODO(kjlubick) We shouldn't need to call Encode once to pre-flight the - // encode length. It should be ceil(4/3 * sksl.value->size()). - size_t b64_size = Base64::Encode(data->data(), data->size(), nullptr); + size_t b64_size = Base64::EncodedSize(data->size()); auto b64_data = SkData::MakeUninitialized(b64_size); Base64::Encode(data->data(), data->size(), b64_data->writable_data()); return Rasterizer::Screenshot{b64_data, layer_tree->frame_size(), format}; diff --git a/shell/common/shell.cc b/shell/common/shell.cc index 20fcebeeb7d70..fc006308dec19 100644 --- a/shell/common/shell.cc +++ b/shell/common/shell.cc @@ -1840,10 +1840,7 @@ bool Shell::OnServiceProtocolGetSkSLs( PersistentCache* persistent_cache = PersistentCache::GetCacheForProcess(); std::vector sksls = persistent_cache->LoadSkSLs(); for (const auto& sksl : sksls) { - // TODO(kjlubick) We shouldn't need to call Encode once to pre-flight the - // encode length. It should be ceil(4/3 * sksl.value->size()). - size_t b64_size = - Base64::Encode(sksl.value->data(), sksl.value->size(), nullptr); + size_t b64_size = Base64::EncodedSize(sksl.value->size()); sk_sp b64_data = SkData::MakeUninitialized(b64_size + 1); char* b64_char = static_cast(b64_data->writable_data()); Base64::Encode(sksl.value->data(), sksl.value->size(), b64_char); From 3548653852c4af498af90194709b5cbea8b01009 Mon Sep 17 00:00:00 2001 From: Alexander Aprelev Date: Fri, 6 Oct 2023 15:01:28 -0600 Subject: [PATCH 494/859] [fuchsia] Remove hardcoded fuchsia-imported packages 2.12 sdk version (#46629) Use sdk version from imported package pubspec.yaml instead. This unblocks dart->engine roll that currently is failing https://ci.chromium.org/ui/p/flutter/builders/try/Linux%20Fuchsia/83386/overview. --- shell/platform/fuchsia/dart/BUILD.gn | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/shell/platform/fuchsia/dart/BUILD.gn b/shell/platform/fuchsia/dart/BUILD.gn index 995f37bb60c4f..7ef6b7e661c6f 100644 --- a/shell/platform/fuchsia/dart/BUILD.gn +++ b/shell/platform/fuchsia/dart/BUILD.gn @@ -62,7 +62,7 @@ dart_library("async_helper") { package_root = "//third_party/dart/pkg/async_helper" package_name = "async_helper" - language_version = "2.12" + pubspec = "$package_root/pubspec.yaml" deps = [] @@ -76,7 +76,7 @@ dart_library("meta") { package_root = "//third_party/dart/pkg/meta" package_name = "meta" - language_version = "2.12" + pubspec = "$package_root/pubspec.yaml" deps = [] @@ -91,7 +91,7 @@ dart_library("expect") { package_root = "//third_party/dart/pkg/expect" package_name = "expect" - language_version = "2.12" + pubspec = "$package_root/pubspec.yaml" deps = [ ":meta" ] @@ -106,7 +106,7 @@ dart_library("litetest") { package_root = "//flutter/testing/litetest" package_name = "litetest" - language_version = "2.12" + pubspec = "$package_root/pubspec.yaml" source_dir = "lib" @@ -128,7 +128,7 @@ dart_library("args") { package_root = "//third_party/dart/third_party/pkg/args" package_name = "args" - language_version = "2.18" + pubspec = "$package_root/pubspec.yaml" deps = [] @@ -152,7 +152,7 @@ dart_library("collection") { package_root = "//third_party/dart/third_party/pkg/collection" package_name = "collection" - language_version = "2.12" + pubspec = "$package_root/pubspec.yaml" deps = [] @@ -192,7 +192,7 @@ dart_library("logging") { package_root = "//third_party/dart/third_party/pkg/logging" package_name = "logging" - language_version = "2.12" + pubspec = "$package_root/pubspec.yaml" deps = [] @@ -208,7 +208,7 @@ dart_library("path") { package_root = "//third_party/dart/third_party/pkg/path" package_name = "path" - language_version = "2.12" + pubspec = "$package_root/pubspec.yaml" deps = [] @@ -233,7 +233,7 @@ dart_library("stack_trace") { package_root = "//third_party/dart/third_party/pkg/stack_trace" package_name = "stack_trace" - language_version = "2.12" + pubspec = "$package_root/pubspec.yaml" deps = [ ":path" ] @@ -255,7 +255,7 @@ dart_library("matcher") { package_root = "//third_party/dart/third_party/pkg/matcher" package_name = "matcher" - language_version = "2.12" + pubspec = "$package_root/pubspec.yaml" deps = [ ":stack_trace" ] @@ -299,8 +299,7 @@ dart_library("quiver") { package_root = "//third_party/pkg/quiver" package_name = "quiver" - # The current version of this library is not null safe - language_version = "2.17" + pubspec = "$package_root/pubspec.yaml" deps = [ ":matcher", @@ -368,7 +367,7 @@ dart_library("vector_math") { package_root = "//third_party/pkg/vector_math" package_name = "vector_math" - language_version = "2.12" + pubspec = "$package_root/pubspec.yaml" deps = [] From 1ac96a66065c26e0014f23bc16249762c34d9e59 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 6 Oct 2023 18:25:01 -0400 Subject: [PATCH 495/859] Roll Skia from 0f2af25f15ee to d86da2a029d8 (7 revisions) (#46587) https://skia.googlesource.com/skia.git/+log/0f2af25f15ee..d86da2a029d8 2023-10-05 brianosman@google.com Fix link errors in shared-library builds when using SkRuntimeEffect inner classes 2023-10-05 johnstiles@google.com Incorporate child effects into the mesh key and proxy handlers. 2023-10-05 johnstiles@google.com Set up texture bindings for SkMesh child effects. 2023-10-05 johnstiles@google.com Emit shader code and uniforms for a mesh's child processors. 2023-10-05 rmistry@google.com Sync depot_tools to HEAD to fix RecreateSKPs bot sync failures 2023-10-05 jvanverth@google.com [graphite] Progress towards caching rasterPathAtlas masks. 2023-10-05 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll vulkan-deps from ff2054861dc4 to 404a76d9bf0e (5 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index ac62ae3cfd73e..5fec24e2c8657 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '0f2af25f15ee799bdd20b99e4364f14e9a102993', + 'skia_revision': 'd86da2a029d871842d23b143cef0a1c41b9fa4ea', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 2b33117aba735..d11dfcf570873 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: aad9b500e58c02d34f507dd9712d9760 +Signature: 5403ba875f3c376fc4909ab25af23332 ==================================================================================================== LIBRARY: etc1 From edb54a7be4e1fd264045b17c6fac8be284237360 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 6 Oct 2023 19:02:50 -0400 Subject: [PATCH 496/859] Roll Fuchsia Mac SDK from 14dOVccxXOO5RPJJB... to GXgrnmetc14RPdheo... (#46634) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC chinmaygarde@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 5fec24e2c8657..f66a380ca4055 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': '14dOVccxXOO5RPJJBeUl3_APVpvAC_DpEmdgFup3dkkC' + 'version': 'GXgrnmetc14RPdheorFF2QUaTvtY-2ceYTD6nFzY6ogC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From a4eb69281bfe6286576d51aa92c71f6dcefdd55a Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 6 Oct 2023 19:30:23 -0400 Subject: [PATCH 497/859] Roll Skia from d86da2a029d8 to 2f67f1f18562 (36 revisions) (#46636) Roll Skia from d86da2a029d8 to 2f67f1f18562 (36 revisions) https://skia.googlesource.com/skia.git/+log/d86da2a029d8..2f67f1f18562 2023-10-06 kjlubick@google.com Add dedicated function to calculate length of Base64 encoded string 2023-10-06 bungeman@google.com [pathops] Simplify trivial paths to empty 2023-10-06 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 44a79902f2c1 to 01742293d0f2 (11 revisions) 2023-10-06 johnstiles@google.com Add fuzzer for SkSL-to-WGSL. 2023-10-06 johnstiles@google.com Add fuzzer for runtime blenders. 2023-10-06 johnstiles@google.com Add fuzzer for runtime color filters. 2023-10-06 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll Dawn from a42cebae4e42 to ac72499c0a8a (91 revisions) 2023-10-06 kjlubick@google.com Split codec-related parts out of tools/Resources.h 2023-10-06 drott@chromium.org [Fontations] Borrow glyph mask flag implementation from FreeType 2023-10-06 jvanverth@google.com Try to fix Dawn roll again. 2023-10-06 drott@chromium.org [Fontations] FFI Interface for accessing CPAL and COLRv0 info 2023-10-06 jvanverth@google.com Disable Tint's use of //build directory to fix Dawn roll 2023-10-06 johnstiles@google.com Add workaround for dropped clear in VKDMSAA. 2023-10-06 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 3d75b794df0f to 8c341cfdef74 (3 revisions) 2023-10-06 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 46c5d45d5955 to 44a79902f2c1 (15 revisions) 2023-10-06 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from e12f70e0a324 to 8d9cef29be25 (3 revisions) 2023-10-06 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from 535363447183 to 8d9cef29be25 2023-10-06 jvanverth@google.com [graphite] Revise PathAtlas::onAddShape interface. 2023-10-05 lovisolo@google.com [bazel] BazelBenchmarkRunner.cpp: Write results.json output file in Perf's new JSON format. 2023-10-05 johnstiles@google.com Factor out FuzzCreateValidInputsForRuntimeEffect to FuzzCommon. 2023-10-05 johnstiles@google.com Disable broken GMs on Adreno 5xx/6xx + Vulkan. 2023-10-05 kjlubick@google.com Split ToolUtils into a few files for easier modularization 2023-10-05 kjlubick@google.com Enforce IWYU on ToolUtils.h 2023-10-05 bungeman@google.com Revert "[pdf] Simplify filled paths" 2023-10-05 johnstiles@google.com Outset the rect passed to SkMesh::MakeIndexed. 2023-10-05 kjlubick@google.com Use buildifier to reformat all Bazel files 2023-10-05 robertphillips@google.com [graphite] Short circuit key generation for simple paints 2023-10-05 johnstiles@google.com Add saturate to list of supported WGSL intrinsics. 2023-10-05 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 404a76d9bf0e to 46c5d45d5955 (1 revision) 2023-10-05 bungeman@google.com [pdf] Simplify filled paths 2023-10-05 kjlubick@google.com Make SkReadBuffer *not* call SkImages::DeferredFromEncodedData by default 2023-10-05 armansito@google.com [graphite][dawn][viewer] Support turning vsync off 2023-10-05 lovisolo@google.com [bazel] BazelBenchmarkRunner.cpp: Add more flags and better validation. 2023-10-05 robertphillips@google.com [graphite] Add CoeffBlenderBlock::AddBlock 2023-10-05 robertphillips@google.com [graphite] Add ColorSpaceTransformBlock::AddBlock 2023-10-05 johnstiles@google.com Enable child effects in SkMesh programs. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose ... --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 47 ++++++++++++++++++++++++++++++-- sky/packages/sky_engine/LICENSE | 32 ++++++++++++++++++++++ 3 files changed, 78 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index f66a380ca4055..5ca415438c73e 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'd86da2a029d871842d23b143cef0a1c41b9fa4ea', + 'skia_revision': '2f67f1f18562ddd6b43bf7eaca6a17bfcd0a71df', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index d11dfcf570873..354aa40597f33 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 5403ba875f3c376fc4909ab25af23332 +Signature: 349f2b2727ab66f3e2b6faa50843433b ==================================================================================================== LIBRARY: etc1 @@ -386,6 +386,8 @@ FILE: ../../../third_party/skia/modules/pathkit/perf/pathops.bench.js FILE: ../../../third_party/skia/modules/pathkit/perf/perfReporter.js FILE: ../../../third_party/skia/modules/skparagraph/test.html FILE: ../../../third_party/skia/package-lock.json +FILE: ../../../third_party/skia/relnotes/mesh.md +FILE: ../../../third_party/skia/relnotes/readbuffer-deserial.md FILE: ../../../third_party/skia/src/gpu/gpu_workaround_list.txt FILE: ../../../third_party/skia/src/ports/fontations/Cargo.toml FILE: ../../../third_party/skia/src/sksl/generated/sksl_compute.minified.sksl @@ -9355,6 +9357,47 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==================================================================================================== +==================================================================================================== +LIBRARY: skia +ORIGIN: ../../../third_party/skia/fuzz/oss_fuzz/FuzzSKSL2WGSL.cpp + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/fuzz/oss_fuzz/FuzzSkRuntimeBlender.cpp + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/fuzz/oss_fuzz/FuzzSkRuntimeColorFilter.cpp + ../../../third_party/skia/LICENSE +TYPE: LicenseType.bsd +FILE: ../../../third_party/skia/fuzz/oss_fuzz/FuzzSKSL2WGSL.cpp +FILE: ../../../third_party/skia/fuzz/oss_fuzz/FuzzSkRuntimeBlender.cpp +FILE: ../../../third_party/skia/fuzz/oss_fuzz/FuzzSkRuntimeColorFilter.cpp +---------------------------------------------------------------------------------------------------- +Copyright 2023 Google, LLC + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + * Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +==================================================================================================== + ==================================================================================================== LIBRARY: skia ORIGIN: ../../../third_party/skia/src/shaders/SkCoordClampShader.cpp + ../../../third_party/skia/LICENSE @@ -9392,4 +9435,4 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==================================================================================================== -Total license count: 67 +Total license count: 68 diff --git a/sky/packages/sky_engine/LICENSE b/sky/packages/sky_engine/LICENSE index 37913ed761eae..09e21e1ec1f76 100644 --- a/sky/packages/sky_engine/LICENSE +++ b/sky/packages/sky_engine/LICENSE @@ -28118,6 +28118,38 @@ skia Copyright 2023 Google LLC. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + * Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +skia + +Copyright 2023 Google, LLC + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: From 6cc0699643f128ee31896cc58cf7c1bcadac6b65 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 6 Oct 2023 21:02:06 -0400 Subject: [PATCH 498/859] Roll Dart SDK from 368fd3846df0 to 46bad70d0f7e (7 revisions) (#46639) https://dart.googlesource.com/sdk.git/+log/368fd3846df0..46bad70d0f7e 2023-10-06 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-238.0.dev 2023-10-06 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-237.0.dev 2023-10-06 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-236.0.dev 2023-10-05 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-235.0.dev 2023-10-05 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-234.0.dev 2023-10-05 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-233.0.dev 2023-10-05 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.2.0-232.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC chinmaygarde@google.com,dart-vm-team@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 42 ++++++++++++++++---------------- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/DEPS b/DEPS index 5ca415438c73e..b0f6335beeeed 100644 --- a/DEPS +++ b/DEPS @@ -57,14 +57,14 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '368fd3846df0fc5c9cefbba7fb4b2cec72327cfa', + 'dart_revision': '46bad70d0f7e50e542976ef6d250e7cc3ba40fc8', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py 'dart_binaryen_rev': 'a51bd6df919a5b79574f0996a760cc20cb05697e', 'dart_boringssl_gen_rev': 'a468ba9fec3f59edf46a7db98caaca893e1e4d96', 'dart_boringssl_rev': '74646566e93de7551bfdfc5f49de7462f13d1d05', - 'dart_browser_launcher_rev': '25bc94aac66240aea01a77f0c7af1f173db0f099', + 'dart_browser_launcher_rev': 'c2871b2e03aa4490caf476c274996e2bc20c5451', 'dart_clock_rev': '200a0209927ea7c4737309e7e9076ec8b97e9c4b', 'dart_collection_rev': 'd27bfaf7994ee690be6ed424b8ee288c7aa672f6', 'dart_devtools_rev': '11ec4ae1036408018143b58d80d6feadbee56a6c', @@ -75,7 +75,7 @@ vars = { 'dart_pub_rev': 'fca927ae2662204805e1646c0c0687369001a41a', 'dart_root_certificates_rev': '692f6d6488af68e0121317a9c2c9eb393eb0ee50', 'dart_tools_rev': 'f318c80fc6507cbfff851971cb7ad6edd061b6ea', - 'dart_watcher_rev': 'c480e2de63b045505c9114d2c2031e6fa63f11c8', + 'dart_watcher_rev': '3998cdd37ecacd3a1715cdc76110b025bffbd1f6', 'dart_webdev_rev': '7c2c2d70e05a5012b52e95b209aedce7acb62f94', 'dart_webkit_inspection_protocol_rev': '82f0c1c46dfdba5edf7c5fa84456233121dd69e1', 'dart_yaml_edit_rev': 'a7e7fbad5ee263cc681681c1a6eb9e6df5336ad6', @@ -349,13 +349,13 @@ deps = { Var('dart_git') + '/bazel_worker.git@b1b6a6605f0255eb1bf4aaf5aaf36f0d635e1b20', 'src/third_party/dart/third_party/pkg/boolean_selector': - Var('dart_git') + '/boolean_selector.git@9431e01c34a2859d329b6c599b1ed05ac0919b0b', + Var('dart_git') + '/boolean_selector.git@479e1c110355a6c13f88922c9fdec353225fc825', 'src/third_party/dart/third_party/pkg/browser_launcher': Var('dart_git') + '/browser_launcher.git' + '@' + Var('dart_browser_launcher_rev'), 'src/third_party/dart/third_party/pkg/cli_util': - Var('dart_git') + '/cli_util.git@9e48f0d390996089aef5d5d05a8ed6a07f6abf6a', + Var('dart_git') + '/cli_util.git@56c1235ba516dbabb3e2b1d4fe76603630f9f5d1', 'src/third_party/dart/third_party/pkg/clock': Var('dart_git') + '/clock.git' + '@' + Var('dart_clock_rev'), @@ -364,10 +364,10 @@ deps = { Var('dart_git') + '/collection.git' + '@' + Var('dart_collection_rev'), 'src/third_party/dart/third_party/pkg/convert': - Var('dart_git') + '/convert.git@140b2f0d0b5f9ee0ef9ec950e123bd84d25cbde9', + Var('dart_git') + '/convert.git@03242b2058af45456e07a5648fe9b9ef40ca57d9', 'src/third_party/dart/third_party/pkg/crypto': - Var('dart_git') + '/crypto.git@b38dd6285989698968bdf8e8f5fe517b1cbd5a33', + Var('dart_git') + '/crypto.git@36ead7c6f748448cde9149bc96292adb844c4601', 'src/third_party/dart/third_party/pkg/csslib': Var('dart_git') + '/csslib.git@f6b68dd9ed9da297f5df4cd31a39787bf35432b3', @@ -379,13 +379,13 @@ deps = { Var('dart_git') + '/dartdoc.git@59947b1495f6fc30fb106ae1a0a8d60d86c82f14', 'src/third_party/dart/third_party/pkg/ffi': - Var('dart_git') + '/ffi.git@ee70dd4a5b396d1a1df0094a8955ac130cb406ce', + Var('dart_git') + '/ffi.git@2faec288966d8f564049adb86a7ca43fd6e01fbf', 'src/third_party/dart/third_party/pkg/file': Var('dart_git') + '/external/github.com/google/file.dart@a18ad1ce88eaeb5a11a13ef8fc25d1e78b546c59', 'src/third_party/dart/third_party/pkg/fixnum': - Var('dart_git') + '/fixnum.git@ef0a587c520844f906e369281d9816208250ef59', + Var('dart_git') + '/fixnum.git@ef45eb556524eadcd72ecdbbed87951288bcd9e7', 'src/third_party/dart/third_party/pkg/glob': Var('dart_git') + '/glob.git@00465333cc4110e077cb256b4fa7eff4797bc856', @@ -415,28 +415,28 @@ deps = { Var('dart_git') + '/logging.git@642ed2124f7ef7abc819a0e22ae0c7afdb5398d3', 'src/third_party/dart/third_party/pkg/markdown': - Var('dart_git') + '/markdown.git@ae766d52d22b54c05240989871b14ede1848b345', + Var('dart_git') + '/markdown.git@4e2e9701d87058311857d06fd7f5df54e8f86c53', 'src/third_party/dart/third_party/pkg/matcher': - Var('dart_git') + '/matcher.git@11daad9d3b62539feca5decfa465ccdfb87dde86', + Var('dart_git') + '/matcher.git@356e5f68d3484d44b9ef3b814ed95f9de17c7afd', 'src/third_party/dart/third_party/pkg/mime': - Var('dart_git') + '/mime.git@f3b9c490cf2bc322fa8246051a6c14a31e75535b', + Var('dart_git') + '/mime.git@af3e5fe753b957e95f03838f8a63782582c413ca', 'src/third_party/dart/third_party/pkg/mockito': - Var('dart_git') + '/mockito.git@610c3dcecba91509a7a0b10e460fe48a455583f9', + Var('dart_git') + '/mockito.git@49859e4e4ae23ffd29181cd4235c44b5a9a6dab0', 'src/third_party/dart/third_party/pkg/native': - Var('dart_git') + '/native.git@7aaa0259c48df8fef4afc222a3c40569a0e881ef', + Var('dart_git') + '/native.git@fd21f5b9a2bcc7ee8fc252c50d5518cb4146fdf5', 'src/third_party/dart/third_party/pkg/package_config': Var('dart_git') + '/package_config.git@100533d2f836583f281c9dfa11a00d6842c176d4', 'src/third_party/dart/third_party/pkg/path': - Var('dart_git') + '/path.git@abcf38c9c769db46c64dceab921d7e30f42bc373', + Var('dart_git') + '/path.git@4ca27d4e88d47f2d96c3113940a97321b6aa7175', 'src/third_party/dart/third_party/pkg/pool': - Var('dart_git') + '/pool.git@4bcc7de71ea7d1aa11144ccf1fcbc2597841d742', + Var('dart_git') + '/pool.git@5ccef15fcd4690d96e22e60c3962f4c97d9430f9', 'src/third_party/dart/third_party/pkg/protobuf': Var('dart_git') + '/protobuf.git' + '@' + Var('dart_protobuf_rev'), @@ -460,22 +460,22 @@ deps = { Var('dart_git') + '/source_span.git@92e50bf0c15bea00218e5fdb2881d2570de1932b', 'src/third_party/dart/third_party/pkg/sse': - Var('dart_git') + '/sse.git@606387e1abe5ea311e38779f28ec71af22691c0b', + Var('dart_git') + '/sse.git@e190744aab3260887e99f94078858ac6ea0e9bc5', 'src/third_party/dart/third_party/pkg/stack_trace': - Var('dart_git') + '/stack_trace.git@1c36cd76eb9a1e2d4ed056fb3133f78a79df2b9b', + Var('dart_git') + '/stack_trace.git@634589f915f7b236dba8aca0f581cf792e5a6e03', 'src/third_party/dart/third_party/pkg/stream_channel': - Var('dart_git') + '/stream_channel.git@bf74065c1f40377367eea8c9aedb9a8db8eb3339', + Var('dart_git') + '/stream_channel.git@ffdb20840d05a276699b50fdfc70cf668bfed6e2', 'src/third_party/dart/third_party/pkg/string_scanner': - Var('dart_git') + '/string_scanner.git@616424cae99d90ffc66c9862b3c1f0d3fc70bac1', + Var('dart_git') + '/string_scanner.git@9c525f78fbc4189ee4dc3171a5c79e925b58f58b', 'src/third_party/dart/third_party/pkg/tar': Var('dart_git') + '/external/github.com/simolus3/tar.git@3c68cba8e51c569428222b9185469249206172c6', 'src/third_party/dart/third_party/pkg/term_glyph': - Var('dart_git') + '/term_glyph.git@19abf84eedbbd6c61f1cdc5c1d1cabd3dc624b2e', + Var('dart_git') + '/term_glyph.git@cff80de129b2e69c11e3a9d7c6ea0447fc37865b', 'src/third_party/dart/third_party/pkg/test': Var('dart_git') + '/test.git@367aa397ab1cb08755f8a7582ab21101ceb9d29b', diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index ca51ae19898cf..5ac599a6832d2 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: e1928630fb546e7bae4379c72685ad9d +Signature: 127d760e2487843b40f3505641064150 ==================================================================================================== LIBRARY: dart From 222b9495fc28791014c4389fae49a3ed8783431c Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 6 Oct 2023 21:47:00 -0400 Subject: [PATCH 499/859] Roll Fuchsia Linux SDK from K7K76tME-CSGhYlFm... to a-BbzDtY3w8UXYgbK... (#46641) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC chinmaygarde@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index b0f6335beeeed..3685c4599f321 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'K7K76tME-CSGhYlFmsC4nS5xdnOj6UVJPDnp1M7Xs-oC' + 'version': 'a-BbzDtY3w8UXYgbKZI4BKjc61kI90tytahfKAhzyCgC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index ce60370226e2a..a26af45a7d8bb 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: c3477bd0325b8d94925741c2651875ba +Signature: f355ef5893d9f4b0c53bd805e1d99272 ==================================================================================================== LIBRARY: fuchsia_sdk From 471148c1dc89492145d557742292b2319145fabf Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 6 Oct 2023 23:46:31 -0400 Subject: [PATCH 500/859] Roll Skia from 2f67f1f18562 to 15de5cc6a095 (1 revision) (#46644) https://skia.googlesource.com/skia.git/+log/2f67f1f18562..15de5cc6a095 2023-10-07 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from 8d9cef29be25 to 2e3e38a84286 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 3685c4599f321..263081618aab7 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '2f67f1f18562ddd6b43bf7eaca6a17bfcd0a71df', + 'skia_revision': '15de5cc6a09549d768ca9b0aead2a98a5ba1bb72', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 293bdc113130b16086397fb1a69afd9172df51e4 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 7 Oct 2023 00:54:21 -0400 Subject: [PATCH 501/859] Roll Dart SDK from 46bad70d0f7e to 7ba556c43d35 (1 revision) (#46645) https://dart.googlesource.com/sdk.git/+log/46bad70d0f7e..7ba556c43d35 2023-10-07 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-0.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC chinmaygarde@google.com,dart-vm-team@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 4 ++-- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index 263081618aab7..c417fab5cf307 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '46bad70d0f7e50e542976ef6d250e7cc3ba40fc8', + 'dart_revision': '7ba556c43d35388424c900124a4035497f86b885', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py @@ -376,7 +376,7 @@ deps = { Var('dart_git') + '/dart_style.git@1a2def95a3c04dafd27b85d17e6e828bd4afa1a3', 'src/third_party/dart/third_party/pkg/dartdoc': - Var('dart_git') + '/dartdoc.git@59947b1495f6fc30fb106ae1a0a8d60d86c82f14', + Var('dart_git') + '/dartdoc.git@524b2b677d977b3ef1b25a7fcefaa1f0b82bef20', 'src/third_party/dart/third_party/pkg/ffi': Var('dart_git') + '/ffi.git@2faec288966d8f564049adb86a7ca43fd6e01fbf', diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index 5ac599a6832d2..69084811bb29a 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: 127d760e2487843b40f3505641064150 +Signature: 927afe41ea1670682957ff1fe345c21d ==================================================================================================== LIBRARY: dart From acbb1abc2ca306402306c4676b96d11cd1f39368 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 7 Oct 2023 04:31:13 -0400 Subject: [PATCH 502/859] Roll Dart SDK from 7ba556c43d35 to a88ed8cafd27 (1 revision) (#46647) https://dart.googlesource.com/sdk.git/+log/7ba556c43d35..a88ed8cafd27 2023-10-07 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-1.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC chinmaygarde@google.com,dart-vm-team@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index c417fab5cf307..48a7635989e04 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '7ba556c43d35388424c900124a4035497f86b885', + 'dart_revision': 'a88ed8cafd27d769e10fe4d864821d3c8466d713', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py From 27d8da076585e017ec7816853bd834a78011a9cf Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 7 Oct 2023 04:42:59 -0400 Subject: [PATCH 503/859] Roll Skia from 15de5cc6a095 to 6ce883877068 (1 revision) (#46648) https://skia.googlesource.com/skia.git/+log/15de5cc6a095..6ce883877068 2023-10-07 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 01742293d0f2 to e270e4bc5b00 (6 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 48a7635989e04..94d396663dfe0 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '15de5cc6a09549d768ca9b0aead2a98a5ba1bb72', + 'skia_revision': '6ce883877068231158a044eb8b086a7bb0c492a5', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 2dfc005204542657e9dd30a392a2571a879e2a7b Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 7 Oct 2023 07:39:24 -0400 Subject: [PATCH 504/859] Roll Fuchsia Mac SDK from GXgrnmetc14RPdheo... to NRLsjEUCmIz2f1Wox... (#46649) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC chinmaygarde@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 94d396663dfe0..83b099b37a0c2 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'GXgrnmetc14RPdheorFF2QUaTvtY-2ceYTD6nFzY6ogC' + 'version': 'NRLsjEUCmIz2f1Wox-1eKHbGaXHM8Mb-cvPTiqHFqCwC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From c651be0e8fc34c36e7d6be66b806eebde6b1b595 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 7 Oct 2023 10:32:20 -0400 Subject: [PATCH 505/859] Roll Fuchsia Linux SDK from a-BbzDtY3w8UXYgbK... to nX88TgPdoM6PK1wBq... (#46651) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC chinmaygarde@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 83b099b37a0c2..26157dc44c970 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'a-BbzDtY3w8UXYgbKZI4BKjc61kI90tytahfKAhzyCgC' + 'version': 'nX88TgPdoM6PK1wBqJqW61RA_mtK-kv3NI1bNRPO78AC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index a26af45a7d8bb..0a40d2803d19f 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: f355ef5893d9f4b0c53bd805e1d99272 +Signature: 105b10072bae009ec3bf85ca53c2704c ==================================================================================================== LIBRARY: fuchsia_sdk From eac07420baf01063089c64f049a194f27358c07a Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 7 Oct 2023 10:44:09 -0400 Subject: [PATCH 506/859] Roll Skia from 6ce883877068 to 99d9d571f4dd (1 revision) (#46652) https://skia.googlesource.com/skia.git/+log/6ce883877068..99d9d571f4dd 2023-10-07 yangguang@jwzg.com support compression textures in webgl If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 26157dc44c970..b3d162c35b8fa 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '6ce883877068231158a044eb8b086a7bb0c492a5', + 'skia_revision': '99d9d571f4dda3154df77f33f5a0bd2b49bd170b', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 354aa40597f33..89019dd1aa3bb 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 349f2b2727ab66f3e2b6faa50843433b +Signature: 2e0cebf348b8573bd35373179a1156b4 ==================================================================================================== LIBRARY: etc1 From c4d92751a090f1d2b1939eddfb054ac4af3260fe Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Sat, 7 Oct 2023 08:32:05 -0700 Subject: [PATCH 507/859] [Impeller] Add IMPELLER_DEBUG around group. (#46642) These tracing functions aren't free! --- impeller/renderer/backend/gles/proc_table_gles.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/impeller/renderer/backend/gles/proc_table_gles.cc b/impeller/renderer/backend/gles/proc_table_gles.cc index 7bfbf4dce3f10..2541424ad9439 100644 --- a/impeller/renderer/backend/gles/proc_table_gles.cc +++ b/impeller/renderer/backend/gles/proc_table_gles.cc @@ -322,6 +322,7 @@ bool ProcTableGLES::SetDebugLabel(DebugResourceType type, } void ProcTableGLES::PushDebugGroup(const std::string& label) const { +#ifdef IMPELLER_DEBUG if (debug_label_max_length_ <= 0) { return; } @@ -334,14 +335,17 @@ void ProcTableGLES::PushDebugGroup(const std::string& label) const { label_length, // length label.data() // message ); +#endif // IMPELLER_DEBUG } void ProcTableGLES::PopDebugGroup() const { +#ifdef IMPELLER_DEBUG if (debug_label_max_length_ <= 0) { return; } PopDebugGroupKHR(); +#endif // IMPELLER_DEBUG } std::string ProcTableGLES::GetProgramInfoLogString(GLuint program) const { From 81499da072b4e16746191fda1778aa90a4666748 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 7 Oct 2023 17:27:24 -0400 Subject: [PATCH 508/859] Roll Skia from 99d9d571f4dd to 3d77b5de5984 (1 revision) (#46653) https://skia.googlesource.com/skia.git/+log/99d9d571f4dd..3d77b5de5984 2023-10-07 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from e270e4bc5b00 to 950351496ad2 (1 revision) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,djsollen@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index b3d162c35b8fa..64d0d194e00b9 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '99d9d571f4dda3154df77f33f5a0bd2b49bd170b', + 'skia_revision': '3d77b5de598447326d12a69790e488d6efcd8087', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 8cb219c70b8a4a0990bdb477605fe7a1f9c1779f Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 7 Oct 2023 20:13:24 -0400 Subject: [PATCH 509/859] Roll Fuchsia Mac SDK from NRLsjEUCmIz2f1Wox... to qf94AgyANg4i0Supy... (#46654) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC chinmaygarde@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 64d0d194e00b9..12e84250f0e1a 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'NRLsjEUCmIz2f1Wox-1eKHbGaXHM8Mb-cvPTiqHFqCwC' + 'version': 'qf94AgyANg4i0SupyLHVTKhPCmAC0zhqiAum8YdPRGIC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From add785f34a7d1622bcc4f1602b9cc99648554e21 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 7 Oct 2023 23:09:11 -0400 Subject: [PATCH 510/859] Roll Fuchsia Linux SDK from nX88TgPdoM6PK1wBq... to 8ri3ggb_SASX6KpNn... (#46655) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC chinmaygarde@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 12e84250f0e1a..285000253586b 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'nX88TgPdoM6PK1wBqJqW61RA_mtK-kv3NI1bNRPO78AC' + 'version': '8ri3ggb_SASX6KpNnqJqZSb4lGBNEt9SiejhQFkJQpsC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', From 7d3789804706d96553661743f4e6fa9901e81266 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sun, 8 Oct 2023 06:21:22 -0400 Subject: [PATCH 511/859] Roll Skia from 3d77b5de5984 to a04f2cfaf4d4 (1 revision) (#46656) https://skia.googlesource.com/skia.git/+log/3d77b5de5984..a04f2cfaf4d4 2023-10-08 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 950351496ad2 to 2490319767dc (2 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,johnstiles@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 285000253586b..9048556c17eb8 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '3d77b5de598447326d12a69790e488d6efcd8087', + 'skia_revision': 'a04f2cfaf4d42fa4ea6bfc60a9d51e462694ee36', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From b57d44254a9cc8a748e08e4a0c049f60a72cc72a Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sun, 8 Oct 2023 07:01:21 -0400 Subject: [PATCH 512/859] Roll Skia from a04f2cfaf4d4 to ac67f4882568 (1 revision) (#46657) https://skia.googlesource.com/skia.git/+log/a04f2cfaf4d4..ac67f4882568 2023-10-08 skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com Update SKP version If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,johnstiles@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 9048556c17eb8..fd49ca3e9963a 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'a04f2cfaf4d42fa4ea6bfc60a9d51e462694ee36', + 'skia_revision': 'ac67f488256896b143cedaf25c694d2f2635096b', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From ffa8d09db70a7c6f20cc4c408d8ad43c82b03ecf Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sun, 8 Oct 2023 08:53:23 -0400 Subject: [PATCH 513/859] Roll Fuchsia Mac SDK from qf94AgyANg4i0Supy... to gaFsjQCR8UjK8EX-b... (#46658) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC chinmaygarde@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index fd49ca3e9963a..592066c72dc89 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'qf94AgyANg4i0SupyLHVTKhPCmAC0zhqiAum8YdPRGIC' + 'version': 'gaFsjQCR8UjK8EX-bo-jq_imv_EK3SdrPzPmnX9OQxsC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 78589309b1dc1b65174328fff058022299e145e2 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sun, 8 Oct 2023 11:44:22 -0400 Subject: [PATCH 514/859] Roll Fuchsia Linux SDK from 8ri3ggb_SASX6KpNn... to TTQty3yF7hRg2UFT8... (#46659) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC chinmaygarde@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 592066c72dc89..1193feeb626b6 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': '8ri3ggb_SASX6KpNnqJqZSb4lGBNEt9SiejhQFkJQpsC' + 'version': 'TTQty3yF7hRg2UFT8AktI79P8O7JDiB3ZkwQquY6xnMC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', From 4a9b149b0930400c037b023ae035d930c097ea7e Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sun, 8 Oct 2023 19:10:16 -0400 Subject: [PATCH 515/859] Roll Skia from ac67f4882568 to fedfbe6383f0 (1 revision) (#46660) https://skia.googlesource.com/skia.git/+log/ac67f4882568..fedfbe6383f0 2023-10-08 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 2490319767dc to b0cc4b135321 (2 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,johnstiles@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 1193feeb626b6..57044abc2da31 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'ac67f488256896b143cedaf25c694d2f2635096b', + 'skia_revision': 'fedfbe6383f06da1aedce350e38c1ab69cd12935', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From b55c9f4d1697588e8db51d73309214213c42f9e7 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sun, 8 Oct 2023 21:29:38 -0400 Subject: [PATCH 516/859] Roll Fuchsia Mac SDK from gaFsjQCR8UjK8EX-b... to nN0l08yRbt0zE3R7a... (#46661) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC chinmaygarde@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 57044abc2da31..e57003d8acd49 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'gaFsjQCR8UjK8EX-bo-jq_imv_EK3SdrPzPmnX9OQxsC' + 'version': 'nN0l08yRbt0zE3R7atTM1ht2kU88zKuwTglffftlr40C' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 4bc3e018a2eed0aa6e4f9026196858ebdfe6a46a Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 9 Oct 2023 00:23:37 -0400 Subject: [PATCH 517/859] Roll Fuchsia Linux SDK from TTQty3yF7hRg2UFT8... to 0ObCmDD14Cel45cU-... (#46662) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC chinmaygarde@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index e57003d8acd49..8f17b331c7989 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'TTQty3yF7hRg2UFT8AktI79P8O7JDiB3ZkwQquY6xnMC' + 'version': '0ObCmDD14Cel45cU-rHu3Mt5p2qqG9HOjfD14YA_jBgC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', From 7374ddc05e41a6185891da358dbac88ec75cf734 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 9 Oct 2023 01:21:22 -0400 Subject: [PATCH 518/859] Roll Skia from fedfbe6383f0 to 0507cc73ca2a (1 revision) (#46663) https://skia.googlesource.com/skia.git/+log/fedfbe6383f0..0507cc73ca2a 2023-10-09 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Dawn from ac72499c0a8a to d3e7b9b7ad6a (10 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,johnstiles@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 8f17b331c7989..5659271a90e5a 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'fedfbe6383f06da1aedce350e38c1ab69cd12935', + 'skia_revision': '0507cc73ca2ab0a9019d067e074a4d6db54bc122', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 7e9efe9015000204b52843357e9efe2ec9fd1671 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 9 Oct 2023 02:04:51 -0400 Subject: [PATCH 519/859] Roll Skia from 0507cc73ca2a to c844143823fb (1 revision) (#46664) https://skia.googlesource.com/skia.git/+log/0507cc73ca2a..c844143823fb 2023-10-09 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from 8d9cef29be25 to 2e3e38a84286 (4 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,johnstiles@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 5659271a90e5a..bb16b868c5087 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '0507cc73ca2ab0a9019d067e074a4d6db54bc122', + 'skia_revision': 'c844143823fb9d0842251d981cb1197e6382db23', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 89019dd1aa3bb..32bf8524be279 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 2e0cebf348b8573bd35373179a1156b4 +Signature: 0b0663172f2ae6e684b50afda518f51b ==================================================================================================== LIBRARY: etc1 From 248c09473e22dc41a64e90672239b5c574b7ed61 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 9 Oct 2023 02:42:17 -0400 Subject: [PATCH 520/859] Roll Skia from c844143823fb to 9fd74b688561 (1 revision) (#46665) https://skia.googlesource.com/skia.git/+log/c844143823fb..9fd74b688561 2023-10-09 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from 2e3e38a84286 to 82c735972077 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,johnstiles@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index bb16b868c5087..5d5ba9fd8afc5 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'c844143823fb9d0842251d981cb1197e6382db23', + 'skia_revision': '9fd74b6885613df347bd2d65ef6da42cb83d81d9', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From f01502f29348795fb5acf09b60973030eed70ffb Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 9 Oct 2023 03:28:58 -0400 Subject: [PATCH 521/859] Roll Skia from 9fd74b688561 to 871c976c0ecc (1 revision) (#46666) https://skia.googlesource.com/skia.git/+log/9fd74b688561..871c976c0ecc 2023-10-09 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 8c341cfdef74 to 0afc3ec95439 (8 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,johnstiles@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 5d5ba9fd8afc5..e1f33d74650ed 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '9fd74b6885613df347bd2d65ef6da42cb83d81d9', + 'skia_revision': '871c976c0ecc98ac7deb2f8b6d43ab0a741b41c5', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 2775d366e774b50ad5c2615fbbd2fcc91ae21f85 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 9 Oct 2023 07:47:38 -0400 Subject: [PATCH 522/859] Roll Skia from 871c976c0ecc to 3b83cd44d9ee (1 revision) (#46669) https://skia.googlesource.com/skia.git/+log/871c976c0ecc..3b83cd44d9ee 2023-10-09 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from b0cc4b135321 to d3dc8dfdccca (1 revision) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,johnstiles@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index e1f33d74650ed..678142f5f151d 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '871c976c0ecc98ac7deb2f8b6d43ab0a741b41c5', + 'skia_revision': '3b83cd44d9ee077f0f4726237d553008c9513d09', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From d6d63a83385d03e8d7d21cf639ca116573481dcc Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 9 Oct 2023 09:30:11 -0400 Subject: [PATCH 523/859] Roll Skia from 3b83cd44d9ee to c5541e2bd213 (2 revisions) (#46673) https://skia.googlesource.com/skia.git/+log/3b83cd44d9ee..c5541e2bd213 2023-10-09 kjlubick@google.com Make tests which depend on modular Bazel build 2023-10-09 kjlubick@google.com Remove tests based on flag-based Bazel rules If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,johnstiles@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 678142f5f151d..4782a363b7ff0 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '3b83cd44d9ee077f0f4726237d553008c9513d09', + 'skia_revision': 'c5541e2bd2131c1f87ab7f765d3219e8513e71e2', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 1378b0c4a0c09d2436e0f8c415859fe11faf701e Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 9 Oct 2023 09:32:18 -0400 Subject: [PATCH 524/859] Roll Dart SDK from a88ed8cafd27 to a6e43b0b9e0c (1 revision) (#46674) https://dart.googlesource.com/sdk.git/+log/a88ed8cafd27..a6e43b0b9e0c 2023-10-09 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-2.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC chinmaygarde@google.com,dart-vm-team@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 4 ++-- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index 4782a363b7ff0..a60173a4926ba 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': 'a88ed8cafd27d769e10fe4d864821d3c8466d713', + 'dart_revision': 'a6e43b0b9e0cd6c16dff5b507e50ee6cd286c729', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py @@ -472,7 +472,7 @@ deps = { Var('dart_git') + '/string_scanner.git@9c525f78fbc4189ee4dc3171a5c79e925b58f58b', 'src/third_party/dart/third_party/pkg/tar': - Var('dart_git') + '/external/github.com/simolus3/tar.git@3c68cba8e51c569428222b9185469249206172c6', + Var('dart_git') + '/external/github.com/simolus3/tar.git@748f6e680206752cc8e7a3c30af78a86da9830bd', 'src/third_party/dart/third_party/pkg/term_glyph': Var('dart_git') + '/term_glyph.git@cff80de129b2e69c11e3a9d7c6ea0447fc37865b', diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index 69084811bb29a..353b793e7cb97 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: 927afe41ea1670682957ff1fe345c21d +Signature: 116a50d0facb820efdab648f654d3c41 ==================================================================================================== LIBRARY: dart From 6c2f203f8673eae0b966dca29104c588741b534d Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 9 Oct 2023 10:07:00 -0400 Subject: [PATCH 525/859] Roll Fuchsia Mac SDK from nN0l08yRbt0zE3R7a... to YDaOfbTjc-WMEZXZx... (#46675) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC chinmaygarde@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index a60173a4926ba..bfc0b94d5e008 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'nN0l08yRbt0zE3R7atTM1ht2kU88zKuwTglffftlr40C' + 'version': 'YDaOfbTjc-WMEZXZxms1hUFLu3b8fF2bl4utB6CupF4C' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From d381882eba8a29052ae3647b72fbdd4004753e75 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 9 Oct 2023 11:38:07 -0400 Subject: [PATCH 526/859] Roll Skia from c5541e2bd213 to 4135182b6a56 (1 revision) (#46677) https://skia.googlesource.com/skia.git/+log/c5541e2bd213..4135182b6a56 2023-10-09 michaelludwig@google.com [skif] Refactor Functors,ContextInfo,Context into virtual Backend, and Context If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,johnstiles@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index bfc0b94d5e008..baeb1bc9a12ea 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'c5541e2bd2131c1f87ab7f765d3219e8513e71e2', + 'skia_revision': '4135182b6a560c560d0efd51f039c3f3bdf94032', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 32bf8524be279..b5ac2e4aa926b 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 0b0663172f2ae6e684b50afda518f51b +Signature: 7ca130c40c6197c00e37662a72fc0fe5 ==================================================================================================== LIBRARY: etc1 From 85873fbf913b1a549c7782ea1ead73b993c1f446 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 9 Oct 2023 13:01:19 -0400 Subject: [PATCH 527/859] Roll Fuchsia Linux SDK from 0ObCmDD14Cel45cU-... to 3JmrIr49bTV2DIWsW... (#46679) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC chinmaygarde@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index baeb1bc9a12ea..ebcf36456d54f 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': '0ObCmDD14Cel45cU-rHu3Mt5p2qqG9HOjfD14YA_jBgC' + 'version': '3JmrIr49bTV2DIWsWui83SA0yEU8Fepw0tsrtaKPBhEC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', From 0945525a35961d97d848b014a849f81e646a782d Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 9 Oct 2023 13:13:24 -0400 Subject: [PATCH 528/859] Roll Skia from 4135182b6a56 to ef4c093143d2 (2 revisions) (#46680) https://skia.googlesource.com/skia.git/+log/4135182b6a56..ef4c093143d2 2023-10-09 nscobie@google.com Force RRectEffect to always use scale when in reduced shader mode 2023-10-09 robertphillips@google.com [graphite] Update remaining childless Blocks to be AddBlock-style If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,johnstiles@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index ebcf36456d54f..8e6657c1dbd18 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '4135182b6a560c560d0efd51f039c3f3bdf94032', + 'skia_revision': 'ef4c093143d22558d66cfd9e05cbe670eb3c3daa', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index b5ac2e4aa926b..d4bf64edb0e80 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 7ca130c40c6197c00e37662a72fc0fe5 +Signature: b6e704f8713eabcd3b49cfe7b8e24d6e ==================================================================================================== LIBRARY: etc1 From a99fcbd4830317357917c35aa5f7937b40d57377 Mon Sep 17 00:00:00 2001 From: ColdPaleLight Date: Tue, 10 Oct 2023 01:21:30 +0800 Subject: [PATCH 529/859] [Impeller] Optionally support SamplerAddressMode::kDecal on the OpenGLES backend (#46650) fix https://github.com/flutter/flutter/issues/129358 --- impeller/entity/contents/atlas_contents.cc | 2 + .../contents/filters/blend_filter_contents.cc | 6 + .../filters/morphology_filter_contents.cc | 2 + .../shaders/blending/advanced_blend.glsl | 8 +- .../shaders/blending/porter_duff_blend.frag | 8 +- .../entity/shaders/morphology_filter.frag | 11 +- .../backend/gles/capabilities_gles.cc | 8 +- .../renderer/backend/gles/capabilities_gles.h | 3 + .../renderer/backend/gles/context_gles.cc | 6 +- impeller/renderer/backend/gles/gles.h | 1 + .../renderer/backend/gles/sampler_gles.cc | 20 +- .../backend/gles/sampler_library_gles.cc | 16 +- .../backend/gles/sampler_library_gles.h | 3 + .../gles/test/capabilities_unittests.cc | 10 + .../renderer/backend/gles/test/mock_gles.cc | 12 +- .../renderer/backend/gles/test/mock_gles.h | 5 +- impeller/tools/malioc.json | 439 +++++++++--------- 17 files changed, 306 insertions(+), 254 deletions(-) diff --git a/impeller/entity/contents/atlas_contents.cc b/impeller/entity/contents/atlas_contents.cc index f92c3dbd3449b..34030ac95a9f0 100644 --- a/impeller/entity/contents/atlas_contents.cc +++ b/impeller/entity/contents/atlas_contents.cc @@ -262,6 +262,8 @@ bool AtlasContents::Render(const ContentContext& renderer, dst_sampler_descriptor.width_address_mode = SamplerAddressMode::kDecal; dst_sampler_descriptor.height_address_mode = SamplerAddressMode::kDecal; } + frag_info.supports_decal_sampler_address_mode = + renderer.GetDeviceCapabilities().SupportsDecalSamplerAddressMode(); auto dst_sampler = renderer.GetContext()->GetSamplerLibrary()->GetSampler( dst_sampler_descriptor); FS::BindTextureSamplerDst(cmd, texture_, dst_sampler); diff --git a/impeller/entity/contents/filters/blend_filter_contents.cc b/impeller/entity/contents/filters/blend_filter_contents.cc index 7525bda593f43..44c33c5d38e91 100644 --- a/impeller/entity/contents/filters/blend_filter_contents.cc +++ b/impeller/entity/contents/filters/blend_filter_contents.cc @@ -181,6 +181,8 @@ static std::optional AdvancedBlend( dst_sampler_descriptor.width_address_mode = SamplerAddressMode::kDecal; dst_sampler_descriptor.height_address_mode = SamplerAddressMode::kDecal; } + blend_info.supports_decal_sampler_address_mode = + renderer.GetDeviceCapabilities().SupportsDecalSamplerAddressMode(); auto dst_sampler = renderer.GetContext()->GetSamplerLibrary()->GetSampler( dst_sampler_descriptor); FS::BindTextureSamplerDst(cmd, dst_snapshot->texture, dst_sampler); @@ -355,6 +357,8 @@ std::optional BlendFilterContents::CreateForegroundAdvancedBlend( dst_sampler_descriptor.width_address_mode = SamplerAddressMode::kDecal; dst_sampler_descriptor.height_address_mode = SamplerAddressMode::kDecal; } + blend_info.supports_decal_sampler_address_mode = + renderer.GetDeviceCapabilities().SupportsDecalSamplerAddressMode(); auto dst_sampler = renderer.GetContext()->GetSamplerLibrary()->GetSampler( dst_sampler_descriptor); FS::BindTextureSamplerDst(cmd, dst_snapshot->texture, dst_sampler); @@ -479,6 +483,8 @@ std::optional BlendFilterContents::CreateForegroundPorterDuffBlend( dst_sampler_descriptor.width_address_mode = SamplerAddressMode::kDecal; dst_sampler_descriptor.height_address_mode = SamplerAddressMode::kDecal; } + frag_info.supports_decal_sampler_address_mode = + renderer.GetDeviceCapabilities().SupportsDecalSamplerAddressMode(); auto dst_sampler = renderer.GetContext()->GetSamplerLibrary()->GetSampler( dst_sampler_descriptor); FS::BindTextureSamplerDst(cmd, dst_snapshot->texture, dst_sampler); diff --git a/impeller/entity/contents/filters/morphology_filter_contents.cc b/impeller/entity/contents/filters/morphology_filter_contents.cc index bf7a69e15ef0a..d8f087a49cb57 100644 --- a/impeller/entity/contents/filters/morphology_filter_contents.cc +++ b/impeller/entity/contents/filters/morphology_filter_contents.cc @@ -127,6 +127,8 @@ std::optional DirectionalMorphologyFilterContents::RenderFilter( sampler_descriptor.width_address_mode = SamplerAddressMode::kDecal; sampler_descriptor.height_address_mode = SamplerAddressMode::kDecal; } + frag_info.supports_decal_sampler_address_mode = + renderer.GetDeviceCapabilities().SupportsDecalSamplerAddressMode(); FS::BindTextureSampler( cmd, input_snapshot->texture, diff --git a/impeller/entity/shaders/blending/advanced_blend.glsl b/impeller/entity/shaders/blending/advanced_blend.glsl index c2e26d59bf7b3..9a11dce29f789 100644 --- a/impeller/entity/shaders/blending/advanced_blend.glsl +++ b/impeller/entity/shaders/blending/advanced_blend.glsl @@ -12,6 +12,7 @@ uniform BlendInfo { float16_t src_input_alpha; float16_t color_factor; f16vec4 color; // This color input is expected to be unpremultiplied. + float supports_decal_sampler_address_mode; } blend_info; @@ -24,9 +25,12 @@ in vec2 v_src_texture_coords; out f16vec4 frag_color; f16vec4 Sample(f16sampler2D texture_sampler, vec2 texture_coords) { -// gles 2.0 is the only backend without native decal support. #ifdef IMPELLER_TARGET_OPENGLES - return IPSampleDecal(texture_sampler, texture_coords); + if (blend_info.supports_decal_sampler_address_mode > 0.0) { + return texture(texture_sampler, texture_coords); + } else { + return IPHalfSampleDecal(texture_sampler, texture_coords); + } #else return texture(texture_sampler, texture_coords); #endif diff --git a/impeller/entity/shaders/blending/porter_duff_blend.frag b/impeller/entity/shaders/blending/porter_duff_blend.frag index a24b523c07005..7e3498ff0d33c 100644 --- a/impeller/entity/shaders/blending/porter_duff_blend.frag +++ b/impeller/entity/shaders/blending/porter_duff_blend.frag @@ -19,6 +19,7 @@ uniform FragInfo { float16_t dst_coeff_src_color; float16_t input_alpha; float16_t output_alpha; + float supports_decal_sampler_address_mode; } frag_info; @@ -28,9 +29,12 @@ in f16vec4 v_color; out f16vec4 frag_color; f16vec4 Sample(f16sampler2D texture_sampler, vec2 texture_coords) { -// gles 2.0 is the only backend without native decal support. #ifdef IMPELLER_TARGET_OPENGLES - return IPSampleDecal(texture_sampler, texture_coords); + if (frag_info.supports_decal_sampler_address_mode > 0.0) { + return texture(texture_sampler, texture_coords); + } else { + return IPHalfSampleDecal(texture_sampler, texture_coords); + } #else return texture(texture_sampler, texture_coords); #endif diff --git a/impeller/entity/shaders/morphology_filter.frag b/impeller/entity/shaders/morphology_filter.frag index 8f2d01f98ee0d..29428d0774b7f 100644 --- a/impeller/entity/shaders/morphology_filter.frag +++ b/impeller/entity/shaders/morphology_filter.frag @@ -19,6 +19,7 @@ uniform FragInfo { f16vec2 uv_offset; float16_t radius; float16_t morph_type; + float supports_decal_sampler_address_mode; } frag_info; @@ -32,11 +33,15 @@ void main() { for (float16_t i = -frag_info.radius; i <= frag_info.radius; i++) { vec2 texture_coords = v_texture_coords + frag_info.uv_offset * i; -// gles 2.0 is the only backend without native decal support. + f16vec4 color; #ifdef IMPELLER_TARGET_OPENGLES - f16vec4 color = IPHalfSampleDecal(texture_sampler, texture_coords); + if (frag_info.supports_decal_sampler_address_mode > 0.0) { + color = texture(texture_sampler, texture_coords); + } else { + color = IPHalfSampleDecal(texture_sampler, texture_coords); + } #else - f16vec4 color = texture(texture_sampler, texture_coords); + color = texture(texture_sampler, texture_coords); #endif if (frag_info.morph_type == kMorphTypeDilate) { diff --git a/impeller/renderer/backend/gles/capabilities_gles.cc b/impeller/renderer/backend/gles/capabilities_gles.cc index e639b1428bf86..45ad42e5ba447 100644 --- a/impeller/renderer/backend/gles/capabilities_gles.cc +++ b/impeller/renderer/backend/gles/capabilities_gles.cc @@ -86,6 +86,12 @@ CapabilitiesGLES::CapabilitiesGLES(const ProcTableGLES& gl) { gl.GetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &value); num_shader_binary_formats = value; } + + if (gl.GetDescription()->HasExtension("GL_EXT_texture_border_clamp") || + gl.GetDescription()->HasExtension("GL_NV_texture_border_clamp") || + gl.GetDescription()->HasExtension("GL_OES_texture_border_clamp")) { + supports_decal_sampler_address_mode_ = true; + } } size_t CapabilitiesGLES::GetMaxTextureUnits(ShaderStage stage) const { @@ -140,7 +146,7 @@ bool CapabilitiesGLES::SupportsReadFromResolve() const { } bool CapabilitiesGLES::SupportsDecalSamplerAddressMode() const { - return false; + return supports_decal_sampler_address_mode_; } bool CapabilitiesGLES::SupportsDeviceTransientTextures() const { diff --git a/impeller/renderer/backend/gles/capabilities_gles.h b/impeller/renderer/backend/gles/capabilities_gles.h index b6ba0850c7b67..20685f1565422 100644 --- a/impeller/renderer/backend/gles/capabilities_gles.h +++ b/impeller/renderer/backend/gles/capabilities_gles.h @@ -114,6 +114,9 @@ class CapabilitiesGLES final // |Capabilities| PixelFormat GetDefaultDepthStencilFormat() const override; + + private: + bool supports_decal_sampler_address_mode_ = false; }; } // namespace impeller diff --git a/impeller/renderer/backend/gles/context_gles.cc b/impeller/renderer/backend/gles/context_gles.cc index 8d98d41144133..6896d6609777e 100644 --- a/impeller/renderer/backend/gles/context_gles.cc +++ b/impeller/renderer/backend/gles/context_gles.cc @@ -53,13 +53,15 @@ ContextGLES::ContextGLES(std::unique_ptr gl, } } + device_capabilities_ = reactor_->GetProcTable().GetCapabilities(); + // Create the sampler library. { sampler_library_ = - std::shared_ptr(new SamplerLibraryGLES()); + std::shared_ptr(new SamplerLibraryGLES( + device_capabilities_->SupportsDecalSamplerAddressMode())); } - device_capabilities_ = reactor_->GetProcTable().GetCapabilities(); is_valid_ = true; } diff --git a/impeller/renderer/backend/gles/gles.h b/impeller/renderer/backend/gles/gles.h index 9bacfc87db4b3..e14116ef52b50 100644 --- a/impeller/renderer/backend/gles/gles.h +++ b/impeller/renderer/backend/gles/gles.h @@ -6,6 +6,7 @@ // IWYU pragma: begin_exports #include "GLES3/gl3.h" +#define GL_CLAMP_TO_BORDER 0x812D #define GL_GLEXT_PROTOTYPES #include "GLES2/gl2ext.h" // IWYU pragma: end_exports diff --git a/impeller/renderer/backend/gles/sampler_gles.cc b/impeller/renderer/backend/gles/sampler_gles.cc index f1a54debcbc19..19d4e0ff8f623 100644 --- a/impeller/renderer/backend/gles/sampler_gles.cc +++ b/impeller/renderer/backend/gles/sampler_gles.cc @@ -53,7 +53,8 @@ static GLint ToParam(MinMagFilter minmag_filter, FML_UNREACHABLE(); } -static GLint ToAddressMode(SamplerAddressMode mode) { +static GLint ToAddressMode(SamplerAddressMode mode, + bool supports_decal_sampler_address_mode) { switch (mode) { case SamplerAddressMode::kClampToEdge: return GL_CLAMP_TO_EDGE; @@ -62,7 +63,10 @@ static GLint ToAddressMode(SamplerAddressMode mode) { case SamplerAddressMode::kMirror: return GL_MIRRORED_REPEAT; case SamplerAddressMode::kDecal: - break; // Unsupported. + if (supports_decal_sampler_address_mode) { + return GL_CLAMP_TO_BORDER; + } + break; } FML_UNREACHABLE(); } @@ -96,10 +100,14 @@ bool SamplerGLES::ConfigureBoundTexture(const TextureGLES& texture, ToParam(desc.min_filter, mip_filter)); gl.TexParameteri(target.value(), GL_TEXTURE_MAG_FILTER, ToParam(desc.mag_filter)); - gl.TexParameteri(target.value(), GL_TEXTURE_WRAP_S, - ToAddressMode(desc.width_address_mode)); - gl.TexParameteri(target.value(), GL_TEXTURE_WRAP_T, - ToAddressMode(desc.height_address_mode)); + gl.TexParameteri( + target.value(), GL_TEXTURE_WRAP_S, + ToAddressMode(desc.width_address_mode, + gl.GetCapabilities()->SupportsDecalSamplerAddressMode())); + gl.TexParameteri( + target.value(), GL_TEXTURE_WRAP_T, + ToAddressMode(desc.height_address_mode, + gl.GetCapabilities()->SupportsDecalSamplerAddressMode())); return true; } diff --git a/impeller/renderer/backend/gles/sampler_library_gles.cc b/impeller/renderer/backend/gles/sampler_library_gles.cc index 7f4cd3d243180..6012203897a2b 100644 --- a/impeller/renderer/backend/gles/sampler_library_gles.cc +++ b/impeller/renderer/backend/gles/sampler_library_gles.cc @@ -11,7 +11,9 @@ namespace impeller { -SamplerLibraryGLES::SamplerLibraryGLES() = default; +SamplerLibraryGLES::SamplerLibraryGLES(bool supports_decal_sampler_address_mode) + : supports_decal_sampler_address_mode_( + supports_decal_sampler_address_mode) {} // |SamplerLibrary| SamplerLibraryGLES::~SamplerLibraryGLES() = default; @@ -19,14 +21,12 @@ SamplerLibraryGLES::~SamplerLibraryGLES() = default; // |SamplerLibrary| std::shared_ptr SamplerLibraryGLES::GetSampler( SamplerDescriptor descriptor) { - // TODO(bdero): Change this validation once optional support for kDecal is - // added to the OpenGLES backend: - // https://github.com/flutter/flutter/issues/129358 - if (descriptor.width_address_mode == SamplerAddressMode::kDecal || - descriptor.height_address_mode == SamplerAddressMode::kDecal || - descriptor.depth_address_mode == SamplerAddressMode::kDecal) { + if (!supports_decal_sampler_address_mode_ && + (descriptor.width_address_mode == SamplerAddressMode::kDecal || + descriptor.height_address_mode == SamplerAddressMode::kDecal || + descriptor.depth_address_mode == SamplerAddressMode::kDecal)) { VALIDATION_LOG << "SamplerAddressMode::kDecal is not supported by the " - "OpenGLES backend."; + "current OpenGLES backend."; return nullptr; } diff --git a/impeller/renderer/backend/gles/sampler_library_gles.h b/impeller/renderer/backend/gles/sampler_library_gles.h index 43794426d9ed5..e23af540731f3 100644 --- a/impeller/renderer/backend/gles/sampler_library_gles.h +++ b/impeller/renderer/backend/gles/sampler_library_gles.h @@ -12,6 +12,7 @@ namespace impeller { class SamplerLibraryGLES final : public SamplerLibrary { public: + explicit SamplerLibraryGLES(bool supports_decal_sampler_address_mode); // |SamplerLibrary| ~SamplerLibraryGLES() override; @@ -26,6 +27,8 @@ class SamplerLibraryGLES final : public SamplerLibrary { std::shared_ptr GetSampler( SamplerDescriptor descriptor) override; + bool supports_decal_sampler_address_mode_ = false; + FML_DISALLOW_COPY_AND_ASSIGN(SamplerLibraryGLES); }; diff --git a/impeller/renderer/backend/gles/test/capabilities_unittests.cc b/impeller/renderer/backend/gles/test/capabilities_unittests.cc index 0bbc1b93e9775..189f54caf69f8 100644 --- a/impeller/renderer/backend/gles/test/capabilities_unittests.cc +++ b/impeller/renderer/backend/gles/test/capabilities_unittests.cc @@ -34,5 +34,15 @@ TEST(CapabilitiesGLES, CanInitializeWithDefaults) { PixelFormat::kD24UnormS8Uint); } +TEST(CapabilitiesGLES, SupportsDecalSamplerAddressMode) { + auto const extensions = std::vector{ + reinterpret_cast("GL_KHR_debug"), // + reinterpret_cast("GL_EXT_texture_border_clamp"), // + }; + auto mock_gles = MockGLES::Init(extensions); + auto capabilities = mock_gles->GetProcTable().GetCapabilities(); + EXPECT_TRUE(capabilities->SupportsDecalSamplerAddressMode()); +} + } // namespace testing } // namespace impeller diff --git a/impeller/renderer/backend/gles/test/mock_gles.cc b/impeller/renderer/backend/gles/test/mock_gles.cc index 3d4f9802b92fb..1abf7e8721d46 100644 --- a/impeller/renderer/backend/gles/test/mock_gles.cc +++ b/impeller/renderer/backend/gles/test/mock_gles.cc @@ -19,6 +19,8 @@ static std::mutex g_test_lock; static std::weak_ptr g_mock_gles; +static std::vector g_extensions; + // Has friend visibility into MockGLES to record calls. void RecordGLCall(const char* name) { if (auto mock_gles = g_mock_gles.lock()) { @@ -37,7 +39,7 @@ void doNothing() {} auto const kMockVendor = (unsigned char*)"MockGLES"; auto const kMockVersion = (unsigned char*)"3.0"; -auto const kExtensions = std::vector{ +auto const kExtensions = std::vector{ (unsigned char*)"GL_KHR_debug" // }; @@ -60,7 +62,7 @@ static_assert(CheckSameSignature::value); -std::shared_ptr MockGLES::Init() { +std::shared_ptr MockGLES::Init( + const std::optional>& extensions) { // If we cannot obtain a lock, MockGLES is already being used elsewhere. FML_CHECK(g_test_lock.try_lock()) << "MockGLES is already being used by another test."; + g_extensions = extensions.value_or(kExtensions); auto mock_gles = std::shared_ptr(new MockGLES()); g_mock_gles = mock_gles; return mock_gles; diff --git a/impeller/renderer/backend/gles/test/mock_gles.h b/impeller/renderer/backend/gles/test/mock_gles.h index ec548edce16d3..fb2971500ff85 100644 --- a/impeller/renderer/backend/gles/test/mock_gles.h +++ b/impeller/renderer/backend/gles/test/mock_gles.h @@ -3,6 +3,7 @@ // found in the LICENSE file. #include +#include #include "fml/macros.h" #include "impeller/renderer/backend/gles/proc_table_gles.h" @@ -24,7 +25,9 @@ class MockGLES final { /// This method overwrites mocked global GLES function pointers to record /// invocations on this instance of |MockGLES|. As such, it should only be /// called once per test. - static std::shared_ptr Init(); + static std::shared_ptr Init( + const std::optional>& extensions = + std::nullopt); /// @brief Returns a configured |ProcTableGLES| instance. const ProcTableGLES& GetProcTable() const { return proc_table_; } diff --git a/impeller/tools/malioc.json b/impeller/tools/malioc.json index 392449302a8c0..3f20eb41b8865 100644 --- a/impeller/tools/malioc.json +++ b/impeller/tools/malioc.json @@ -3820,7 +3820,7 @@ "longest_path_cycles": [ 0.609375, 0.609375, - 0.4375, + 0.46875, 0.5, 0.0, 0.5, @@ -3842,24 +3842,23 @@ "shortest_path_cycles": [ 0.34375, 0.34375, - 0.3125, - 0.1875, + 0.265625, + 0.0, 0.0, 0.25, - 0.0 + 0.25 ], "total_bound_pipelines": [ - "arith_total", - "arith_fma" + "texture" ], "total_cycles": [ 0.609375, 0.609375, - 0.484375, + 0.578125, 0.5, 0.0, 0.5, - 0.5 + 1.0 ] }, "stack_spill_bytes": 0, @@ -3882,7 +3881,7 @@ "arithmetic" ], "longest_path_cycles": [ - 8.90999984741211, + 9.569999694824219, 2.0, 2.0 ], @@ -3895,7 +3894,7 @@ "arithmetic" ], "shortest_path_cycles": [ - 5.28000020980835, + 4.949999809265137, 1.0, 0.0 ], @@ -3903,13 +3902,13 @@ "arithmetic" ], "total_cycles": [ - 9.666666984558105, + 11.0, 2.0, - 2.0 + 4.0 ] }, "thread_occupancy": 100, - "uniform_registers_used": 1, + "uniform_registers_used": 2, "work_registers_used": 3 } } @@ -3936,9 +3935,9 @@ "arith_cvt" ], "longest_path_cycles": [ - 0.578125, + 0.637499988079071, 0.28125, - 0.578125, + 0.637499988079071, 0.5625, 0.0, 0.5, @@ -3958,26 +3957,25 @@ "arith_cvt" ], "shortest_path_cycles": [ - 0.453125, + 0.40625, 0.25, - 0.453125, - 0.375, + 0.40625, + 0.1875, 0.0, 0.25, - 0.0 + 0.25 ], "total_bound_pipelines": [ - "arith_total", - "arith_cvt" + "texture" ], "total_cycles": [ - 0.625, + 0.75, 0.28125, - 0.625, + 0.75, 0.5625, 0.0, 0.5, - 0.5 + 1.0 ] }, "stack_spill_bytes": 0, @@ -4000,7 +3998,7 @@ "arithmetic" ], "longest_path_cycles": [ - 9.569999694824219, + 10.229999542236328, 2.0, 2.0 ], @@ -4013,7 +4011,7 @@ "arithmetic" ], "shortest_path_cycles": [ - 7.920000076293945, + 7.590000152587891, 1.0, 0.0 ], @@ -4021,13 +4019,13 @@ "arithmetic" ], "total_cycles": [ - 10.333333015441895, + 11.666666984558105, 2.0, - 2.0 + 4.0 ] }, "thread_occupancy": 100, - "uniform_registers_used": 1, + "uniform_registers_used": 2, "work_registers_used": 2 } } @@ -4051,13 +4049,12 @@ "performance": { "longest_path_bound_pipelines": [ "arith_total", - "arith_cvt", - "arith_sfu" + "arith_cvt" ], "longest_path_cycles": [ - 0.5625, + 0.625, 0.25, - 0.5625, + 0.625, 0.5625, 0.0, 0.5, @@ -4077,26 +4074,25 @@ "arith_cvt" ], "shortest_path_cycles": [ - 0.4375, + 0.390625, 0.21875, - 0.4375, - 0.375, + 0.390625, + 0.1875, 0.0, 0.25, - 0.0 + 0.25 ], "total_bound_pipelines": [ - "arith_total", - "arith_cvt" + "texture" ], "total_cycles": [ - 0.609375, + 0.737500011920929, 0.25, - 0.609375, + 0.737500011920929, 0.5625, 0.0, 0.5, - 0.5 + 1.0 ] }, "stack_spill_bytes": 0, @@ -4119,7 +4115,7 @@ "arithmetic" ], "longest_path_cycles": [ - 9.569999694824219, + 10.229999542236328, 2.0, 2.0 ], @@ -4132,7 +4128,7 @@ "arithmetic" ], "shortest_path_cycles": [ - 7.920000076293945, + 7.590000152587891, 1.0, 0.0 ], @@ -4140,13 +4136,13 @@ "arithmetic" ], "total_cycles": [ - 10.333333015441895, + 11.666666984558105, 2.0, - 2.0 + 4.0 ] }, "thread_occupancy": 100, - "uniform_registers_used": 1, + "uniform_registers_used": 2, "work_registers_used": 2 } } @@ -4173,9 +4169,9 @@ "texture" ], "longest_path_cycles": [ - 0.375, + 0.40625, 0.1875, - 0.34375, + 0.40625, 0.375, 0.0, 0.5, @@ -4191,29 +4187,29 @@ "texture" ], "shortest_path_bound_pipelines": [ - "varying" + "varying", + "texture" ], "shortest_path_cycles": [ - 0.21875, + 0.171875, 0.15625, - 0.21875, - 0.1875, + 0.171875, + 0.0, 0.0, 0.25, - 0.0 + 0.25 ], "total_bound_pipelines": [ - "varying", "texture" ], "total_cycles": [ - 0.390625, + 0.515625, 0.1875, - 0.390625, + 0.515625, 0.375, 0.0, 0.5, - 0.5 + 1.0 ] }, "stack_spill_bytes": 0, @@ -4236,7 +4232,7 @@ "arithmetic" ], "longest_path_cycles": [ - 4.619999885559082, + 5.28000020980835, 2.0, 2.0 ], @@ -4249,7 +4245,7 @@ "arithmetic" ], "shortest_path_cycles": [ - 2.640000104904175, + 2.309999942779541, 1.0, 0.0 ], @@ -4257,13 +4253,13 @@ "arithmetic" ], "total_cycles": [ - 5.0, + 6.333333492279053, 2.0, - 2.0 + 4.0 ] }, "thread_occupancy": 100, - "uniform_registers_used": 1, + "uniform_registers_used": 2, "work_registers_used": 2 } } @@ -4292,7 +4288,7 @@ "longest_path_cycles": [ 0.375, 0.234375, - 0.3125, + 0.375, 0.375, 0.0, 0.5, @@ -4308,29 +4304,29 @@ "texture" ], "shortest_path_bound_pipelines": [ - "varying" + "varying", + "texture" ], "shortest_path_cycles": [ 0.203125, 0.203125, - 0.1875, - 0.1875, + 0.140625, + 0.0, 0.0, 0.25, - 0.0 + 0.25 ], "total_bound_pipelines": [ - "varying", "texture" ], "total_cycles": [ - 0.375, + 0.484375, 0.234375, - 0.359375, + 0.484375, 0.375, 0.0, 0.5, - 0.5 + 1.0 ] }, "stack_spill_bytes": 0, @@ -4353,7 +4349,7 @@ "arithmetic" ], "longest_path_cycles": [ - 4.949999809265137, + 5.610000133514404, 2.0, 2.0 ], @@ -4366,7 +4362,7 @@ "arithmetic" ], "shortest_path_cycles": [ - 2.9700000286102295, + 2.640000104904175, 1.0, 0.0 ], @@ -4374,13 +4370,13 @@ "arithmetic" ], "total_cycles": [ - 5.333333492279053, + 6.666666507720947, 2.0, - 2.0 + 4.0 ] }, "thread_occupancy": 100, - "uniform_registers_used": 1, + "uniform_registers_used": 2, "work_registers_used": 2 } } @@ -4409,7 +4405,7 @@ "longest_path_cycles": [ 0.375, 0.28125, - 0.3125, + 0.375, 0.375, 0.0, 0.5, @@ -4427,29 +4423,29 @@ "shortest_path_bound_pipelines": [ "arith_total", "arith_fma", - "varying" + "varying", + "texture" ], "shortest_path_cycles": [ 0.25, 0.25, - 0.1875, - 0.1875, + 0.140625, + 0.0, 0.0, 0.25, - 0.0 + 0.25 ], "total_bound_pipelines": [ - "varying", "texture" ], "total_cycles": [ - 0.375, + 0.484375, 0.28125, - 0.359375, + 0.484375, 0.375, 0.0, 0.5, - 0.5 + 1.0 ] }, "stack_spill_bytes": 0, @@ -4472,7 +4468,7 @@ "arithmetic" ], "longest_path_cycles": [ - 4.949999809265137, + 5.610000133514404, 2.0, 2.0 ], @@ -4485,7 +4481,7 @@ "arithmetic" ], "shortest_path_cycles": [ - 2.9700000286102295, + 2.640000104904175, 1.0, 0.0 ], @@ -4493,13 +4489,13 @@ "arithmetic" ], "total_cycles": [ - 5.333333492279053, + 6.666666507720947, 2.0, - 2.0 + 4.0 ] }, "thread_occupancy": 100, - "uniform_registers_used": 1, + "uniform_registers_used": 2, "work_registers_used": 2 } } @@ -4528,7 +4524,7 @@ "longest_path_cycles": [ 0.453125, 0.453125, - 0.359375, + 0.421875, 0.375, 0.0, 0.5, @@ -4550,24 +4546,23 @@ "shortest_path_cycles": [ 0.421875, 0.421875, - 0.234375, 0.1875, 0.0, + 0.0, 0.25, - 0.0 + 0.25 ], "total_bound_pipelines": [ - "varying", "texture" ], "total_cycles": [ + 0.53125, 0.453125, - 0.453125, - 0.40625, + 0.53125, 0.375, 0.0, 0.5, - 0.5 + 1.0 ] }, "stack_spill_bytes": 0, @@ -4590,7 +4585,7 @@ "arithmetic" ], "longest_path_cycles": [ - 5.940000057220459, + 6.599999904632568, 2.0, 2.0 ], @@ -4603,7 +4598,7 @@ "arithmetic" ], "shortest_path_cycles": [ - 4.289999961853027, + 3.9600000381469727, 1.0, 0.0 ], @@ -4611,13 +4606,13 @@ "arithmetic" ], "total_cycles": [ - 6.666666507720947, + 8.0, 2.0, - 2.0 + 4.0 ] }, "thread_occupancy": 100, - "uniform_registers_used": 1, + "uniform_registers_used": 2, "work_registers_used": 4 } } @@ -4646,7 +4641,7 @@ "longest_path_cycles": [ 0.71875, 0.71875, - 0.59375, + 0.625, 0.5625, 0.0, 0.5, @@ -4666,26 +4661,25 @@ "arith_cvt" ], "shortest_path_cycles": [ - 0.453125, + 0.40625, 0.34375, - 0.453125, - 0.1875, + 0.40625, + 0.0, 0.0, 0.25, - 0.0 + 0.25 ], "total_bound_pipelines": [ - "arith_total", - "arith_fma" + "texture" ], "total_cycles": [ + 0.78125, 0.71875, - 0.71875, - 0.6875, + 0.78125, 0.5625, 0.0, 0.5, - 0.5 + 1.0 ] }, "stack_spill_bytes": 0, @@ -4708,7 +4702,7 @@ "arithmetic" ], "longest_path_cycles": [ - 10.5600004196167, + 11.220000267028809, 2.0, 2.0 ], @@ -4721,7 +4715,7 @@ "arithmetic" ], "shortest_path_cycles": [ - 5.940000057220459, + 5.610000133514404, 1.0, 0.0 ], @@ -4729,13 +4723,13 @@ "arithmetic" ], "total_cycles": [ - 11.666666984558105, + 13.0, 2.0, - 2.0 + 4.0 ] }, "thread_occupancy": 100, - "uniform_registers_used": 1, + "uniform_registers_used": 2, "work_registers_used": 3 } } @@ -4762,9 +4756,9 @@ "texture" ], "longest_path_cycles": [ - 0.375, + 0.40625, 0.1875, - 0.34375, + 0.40625, 0.375, 0.0, 0.5, @@ -4780,29 +4774,29 @@ "texture" ], "shortest_path_bound_pipelines": [ - "varying" + "varying", + "texture" ], "shortest_path_cycles": [ - 0.21875, + 0.171875, 0.15625, - 0.21875, - 0.1875, + 0.171875, + 0.0, 0.0, 0.25, - 0.0 + 0.25 ], "total_bound_pipelines": [ - "varying", "texture" ], "total_cycles": [ - 0.390625, + 0.515625, 0.1875, - 0.390625, + 0.515625, 0.375, 0.0, 0.5, - 0.5 + 1.0 ] }, "stack_spill_bytes": 0, @@ -4825,7 +4819,7 @@ "arithmetic" ], "longest_path_cycles": [ - 4.619999885559082, + 5.28000020980835, 2.0, 2.0 ], @@ -4838,7 +4832,7 @@ "arithmetic" ], "shortest_path_cycles": [ - 2.640000104904175, + 2.309999942779541, 1.0, 0.0 ], @@ -4846,13 +4840,13 @@ "arithmetic" ], "total_cycles": [ - 5.0, + 6.333333492279053, 2.0, - 2.0 + 4.0 ] }, "thread_occupancy": 100, - "uniform_registers_used": 1, + "uniform_registers_used": 2, "work_registers_used": 2 } } @@ -4881,7 +4875,7 @@ "longest_path_cycles": [ 0.609375, 0.609375, - 0.4375, + 0.46875, 0.5, 0.0, 0.5, @@ -4903,24 +4897,23 @@ "shortest_path_cycles": [ 0.34375, 0.34375, - 0.3125, - 0.1875, + 0.265625, + 0.0, 0.0, 0.25, - 0.0 + 0.25 ], "total_bound_pipelines": [ - "arith_total", - "arith_fma" + "texture" ], "total_cycles": [ 0.609375, 0.609375, - 0.484375, + 0.578125, 0.5, 0.0, 0.5, - 0.5 + 1.0 ] }, "stack_spill_bytes": 0, @@ -4943,7 +4936,7 @@ "arithmetic" ], "longest_path_cycles": [ - 8.90999984741211, + 9.569999694824219, 2.0, 2.0 ], @@ -4956,7 +4949,7 @@ "arithmetic" ], "shortest_path_cycles": [ - 5.28000020980835, + 4.949999809265137, 1.0, 0.0 ], @@ -4964,13 +4957,13 @@ "arithmetic" ], "total_cycles": [ - 9.666666984558105, + 11.0, 2.0, - 2.0 + 4.0 ] }, "thread_occupancy": 100, - "uniform_registers_used": 1, + "uniform_registers_used": 2, "work_registers_used": 3 } } @@ -4999,7 +4992,7 @@ "longest_path_cycles": [ 0.375, 0.203125, - 0.3125, + 0.375, 0.375, 0.0, 0.5, @@ -5015,29 +5008,29 @@ "texture" ], "shortest_path_bound_pipelines": [ - "varying" + "varying", + "texture" ], "shortest_path_cycles": [ - 0.1875, 0.171875, - 0.1875, - 0.1875, + 0.171875, + 0.140625, + 0.0, 0.0, 0.25, - 0.0 + 0.25 ], "total_bound_pipelines": [ - "varying", "texture" ], "total_cycles": [ - 0.375, + 0.484375, 0.203125, - 0.359375, + 0.484375, 0.375, 0.0, 0.5, - 0.5 + 1.0 ] }, "stack_spill_bytes": 0, @@ -5060,7 +5053,7 @@ "arithmetic" ], "longest_path_cycles": [ - 4.949999809265137, + 5.610000133514404, 2.0, 2.0 ], @@ -5073,7 +5066,7 @@ "arithmetic" ], "shortest_path_cycles": [ - 2.9700000286102295, + 2.640000104904175, 1.0, 0.0 ], @@ -5081,13 +5074,13 @@ "arithmetic" ], "total_cycles": [ - 5.333333492279053, + 6.666666507720947, 2.0, - 2.0 + 4.0 ] }, "thread_occupancy": 100, - "uniform_registers_used": 1, + "uniform_registers_used": 2, "work_registers_used": 2 } } @@ -5116,7 +5109,7 @@ "longest_path_cycles": [ 0.453125, 0.453125, - 0.375, + 0.4375, 0.375, 0.0, 0.5, @@ -5138,24 +5131,23 @@ "shortest_path_cycles": [ 0.421875, 0.421875, - 0.25, - 0.1875, + 0.203125, + 0.0, 0.0, 0.25, - 0.0 + 0.25 ], "total_bound_pipelines": [ - "varying", "texture" ], "total_cycles": [ + 0.546875, 0.453125, - 0.453125, - 0.421875, + 0.546875, 0.375, 0.0, 0.5, - 0.5 + 1.0 ] }, "stack_spill_bytes": 0, @@ -5178,7 +5170,7 @@ "arithmetic" ], "longest_path_cycles": [ - 6.269999980926514, + 6.929999828338623, 2.0, 2.0 ], @@ -5191,7 +5183,7 @@ "arithmetic" ], "shortest_path_cycles": [ - 4.289999961853027, + 3.9600000381469727, 1.0, 0.0 ], @@ -5199,13 +5191,13 @@ "arithmetic" ], "total_cycles": [ - 6.666666507720947, + 8.0, 2.0, - 2.0 + 4.0 ] }, "thread_occupancy": 100, - "uniform_registers_used": 1, + "uniform_registers_used": 2, "work_registers_used": 4 } } @@ -5234,7 +5226,7 @@ "longest_path_cycles": [ 0.71875, 0.71875, - 0.59375, + 0.625, 0.5625, 0.0, 0.5, @@ -5254,26 +5246,25 @@ "arith_cvt" ], "shortest_path_cycles": [ - 0.453125, + 0.40625, 0.34375, - 0.453125, - 0.1875, + 0.40625, + 0.0, 0.0, 0.25, - 0.0 + 0.25 ], "total_bound_pipelines": [ - "arith_total", - "arith_fma" + "texture" ], "total_cycles": [ + 0.78125, 0.71875, - 0.71875, - 0.6875, + 0.78125, 0.5625, 0.0, 0.5, - 0.5 + 1.0 ] }, "stack_spill_bytes": 0, @@ -5296,7 +5287,7 @@ "arithmetic" ], "longest_path_cycles": [ - 10.890000343322754, + 11.550000190734863, 2.0, 2.0 ], @@ -5309,7 +5300,7 @@ "arithmetic" ], "shortest_path_cycles": [ - 5.940000057220459, + 5.610000133514404, 1.0, 0.0 ], @@ -5317,13 +5308,13 @@ "arithmetic" ], "total_cycles": [ - 11.666666984558105, + 13.0, 2.0, - 2.0 + 4.0 ] }, "thread_occupancy": 100, - "uniform_registers_used": 1, + "uniform_registers_used": 2, "work_registers_used": 3 } } @@ -5352,7 +5343,7 @@ "longest_path_cycles": [ 0.375, 0.25, - 0.3125, + 0.375, 0.375, 0.0, 0.5, @@ -5368,29 +5359,29 @@ "texture" ], "shortest_path_bound_pipelines": [ - "varying" + "varying", + "texture" ], "shortest_path_cycles": [ 0.21875, 0.21875, - 0.1875, - 0.1875, + 0.140625, + 0.0, 0.0, 0.25, - 0.0 + 0.25 ], "total_bound_pipelines": [ - "varying", "texture" ], "total_cycles": [ - 0.375, + 0.484375, 0.25, - 0.359375, + 0.484375, 0.375, 0.0, 0.5, - 0.5 + 1.0 ] }, "stack_spill_bytes": 0, @@ -5413,7 +5404,7 @@ "arithmetic" ], "longest_path_cycles": [ - 4.949999809265137, + 5.610000133514404, 2.0, 2.0 ], @@ -5426,7 +5417,7 @@ "arithmetic" ], "shortest_path_cycles": [ - 2.9700000286102295, + 2.640000104904175, 1.0, 0.0 ], @@ -5434,13 +5425,13 @@ "arithmetic" ], "total_cycles": [ - 5.333333492279053, + 6.666666507720947, 2.0, - 2.0 + 4.0 ] }, "thread_occupancy": 100, - "uniform_registers_used": 1, + "uniform_registers_used": 2, "work_registers_used": 2 } } @@ -5469,7 +5460,7 @@ "longest_path_cycles": [ 0.75, 0.75, - 0.515625, + 0.578125, 0.5625, 0.0, 0.5, @@ -5491,24 +5482,23 @@ "shortest_path_cycles": [ 0.71875, 0.71875, - 0.390625, - 0.375, + 0.34375, + 0.1875, 0.0, 0.25, - 0.0 + 0.25 ], "total_bound_pipelines": [ - "arith_total", - "arith_fma" + "texture" ], "total_cycles": [ 0.75, 0.75, - 0.5625, + 0.6875, 0.5625, 0.0, 0.5, - 0.5 + 1.0 ] }, "stack_spill_bytes": 0, @@ -5531,7 +5521,7 @@ "arithmetic" ], "longest_path_cycles": [ - 8.90999984741211, + 9.569999694824219, 2.0, 2.0 ], @@ -5544,7 +5534,7 @@ "arithmetic" ], "shortest_path_cycles": [ - 6.929999828338623, + 6.599999904632568, 1.0, 0.0 ], @@ -5552,13 +5542,13 @@ "arithmetic" ], "total_cycles": [ - 9.333333015441895, + 10.666666984558105, 2.0, - 2.0 + 4.0 ] }, "thread_occupancy": 100, - "uniform_registers_used": 1, + "uniform_registers_used": 2, "work_registers_used": 4 } } @@ -8354,17 +8344,16 @@ 0.0 ], "total_bound_pipelines": [ - "arith_total", - "arith_cvt" + "texture" ], "total_cycles": [ - 0.359375, + 0.390625, 0.078125, - 0.359375, + 0.390625, 0.0625, 0.0, 0.25, - 0.25 + 0.5 ] }, "stack_spill_bytes": 0, @@ -8409,14 +8398,14 @@ "arithmetic" ], "total_cycles": [ - 4.0, + 4.666666507720947, 1.0, - 1.0 + 2.0 ] }, "thread_occupancy": 100, "uniform_registers_used": 1, - "work_registers_used": 4 + "work_registers_used": 3 } } } From 653a71720e67c5b5d527932c896e48a6d8e2c5b9 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 9 Oct 2023 15:03:13 -0400 Subject: [PATCH 530/859] Roll Skia from ef4c093143d2 to 26d70e6999f6 (1 revision) (#46684) https://skia.googlesource.com/skia.git/+log/ef4c093143d2..26d70e6999f6 2023-10-09 kjlubick@google.com Move third_party/vulkanmemoryallocator -> src/gpu/vk If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,johnstiles@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/excluded_files | 1 + ci/licenses_golden/licenses_skia | 45 +++++-------------------------- sky/packages/sky_engine/LICENSE | 30 --------------------- 4 files changed, 8 insertions(+), 70 deletions(-) diff --git a/DEPS b/DEPS index 8e6657c1dbd18..98797c6f497a4 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'ef4c093143d22558d66cfd9e05cbe670eb3c3daa', + 'skia_revision': '26d70e6999f628e3acd320863c06a56c4995a146', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/excluded_files b/ci/licenses_golden/excluded_files index 13b5089450a68..bbe5923f36da8 100644 --- a/ci/licenses_golden/excluded_files +++ b/ci/licenses_golden/excluded_files @@ -2860,6 +2860,7 @@ ../../../third_party/skia/src/gpu/mtl/BUILD.bazel ../../../third_party/skia/src/gpu/tessellate/BUILD.bazel ../../../third_party/skia/src/gpu/vk/BUILD.bazel +../../../third_party/skia/src/gpu/vk/vulkanmemoryallocator/BUILD.bazel ../../../third_party/skia/src/image/BUILD.bazel ../../../third_party/skia/src/lazy/BUILD.bazel ../../../third_party/skia/src/opts/BUILD.bazel diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index d4bf64edb0e80..cb9443dba2eae 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: b6e704f8713eabcd3b49cfe7b8e24d6e +Signature: a7f5ef9e2a9211f4a13973779990d3ee ==================================================================================================== LIBRARY: etc1 @@ -4961,43 +4961,6 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==================================================================================================== -==================================================================================================== -LIBRARY: vulkanmemoryallocator -ORIGIN: ../../../third_party/skia/third_party/vulkanmemoryallocator/GrVulkanMemoryAllocator.cpp + ../../../third_party/skia/third_party/vulkanmemoryallocator/LICENSE -ORIGIN: ../../../third_party/skia/third_party/vulkanmemoryallocator/GrVulkanMemoryAllocator.h + ../../../third_party/skia/third_party/vulkanmemoryallocator/LICENSE -TYPE: LicenseType.bsd -FILE: ../../../third_party/skia/third_party/vulkanmemoryallocator/GrVulkanMemoryAllocator.cpp -FILE: ../../../third_party/skia/third_party/vulkanmemoryallocator/GrVulkanMemoryAllocator.h ----------------------------------------------------------------------------------------------------- -Copyright 2018 Google Inc. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -==================================================================================================== - ==================================================================================================== LIBRARY: skia ORIGIN: ../../../third_party/skia/fuzz/FuzzCommon.cpp + ../../../third_party/skia/LICENSE @@ -5189,6 +5152,8 @@ ORIGIN: ../../../third_party/skia/src/gpu/ganesh/vk/GrVkSamplerYcbcrConversion.h ORIGIN: ../../../third_party/skia/src/gpu/ganesh/vk/GrVkTypesPriv.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/vk/VulkanAMDMemoryAllocator.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/vk/VulkanAMDMemoryAllocator.h + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/gpu/vk/vulkanmemoryallocator/VulkanMemoryAllocatorWrapper.cpp + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/gpu/vk/vulkanmemoryallocator/VulkanMemoryAllocatorWrapper.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/image/SkImage_Lazy.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/opts/SkBitmapProcState_opts.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/opts/SkOpts_hsw.cpp + ../../../third_party/skia/LICENSE @@ -5401,6 +5366,8 @@ FILE: ../../../third_party/skia/src/gpu/ganesh/vk/GrVkSamplerYcbcrConversion.h FILE: ../../../third_party/skia/src/gpu/ganesh/vk/GrVkTypesPriv.cpp FILE: ../../../third_party/skia/src/gpu/vk/VulkanAMDMemoryAllocator.cpp FILE: ../../../third_party/skia/src/gpu/vk/VulkanAMDMemoryAllocator.h +FILE: ../../../third_party/skia/src/gpu/vk/vulkanmemoryallocator/VulkanMemoryAllocatorWrapper.cpp +FILE: ../../../third_party/skia/src/gpu/vk/vulkanmemoryallocator/VulkanMemoryAllocatorWrapper.h FILE: ../../../third_party/skia/src/image/SkImage_Lazy.h FILE: ../../../third_party/skia/src/opts/SkBitmapProcState_opts.h FILE: ../../../third_party/skia/src/opts/SkOpts_hsw.cpp @@ -9435,4 +9402,4 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==================================================================================================== -Total license count: 68 +Total license count: 67 diff --git a/sky/packages/sky_engine/LICENSE b/sky/packages/sky_engine/LICENSE index 09e21e1ec1f76..f3c636c95a0f9 100644 --- a/sky/packages/sky_engine/LICENSE +++ b/sky/packages/sky_engine/LICENSE @@ -26454,36 +26454,6 @@ copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -vulkanmemoryallocator - -Copyright 2018 Google Inc. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR From 636e7aa0b7c4ff55d8bc0fd6b4fe56253c4e1d1e Mon Sep 17 00:00:00 2001 From: Jim Graham Date: Mon, 9 Oct 2023 12:10:05 -0700 Subject: [PATCH 531/859] [Impeller] Run DisplayList render tests. (#46422) Revisiting this project as it may help with [attribute] X [rendering op] matrix testing of Impeller. It's not an exhaustive combinatorial test of all combinations of rendering attributes, but it attempts each op with each attribute both default and non-default. For Impeller it only tests that the rendering produced output (i.e wasn't a NOP due to missing implementation), that the output changed if the given attribute was supposed to change the output, and that it rendered within the computed bounds that the rest of the engine will be assuming. These changes will not result in any automatic CI testing of Impeller as is since they are only run on the Metal backend which is not enabled by default. Running `out/host_[variant]/display_list_rendertests --enable-metal` manually on a Mac host, though, will run the tests through Impeller and there will be a lot of error output. Also, there is one known crash as reported in https://github.com/flutter/flutter/issues/135766 --- ci/licenses_golden/licenses_flutter | 8 +- display_list/testing/BUILD.gn | 9 +- .../testing/dl_rendering_unittests.cc | 1975 ++++++++++------- display_list/testing/dl_test_surface_metal.cc | 69 + display_list/testing/dl_test_surface_metal.h | 20 +- .../testing/dl_test_surface_provider.cc | 11 + .../testing/dl_test_surface_provider.h | 24 + impeller/golden_tests/BUILD.gn | 5 +- .../golden_playground_test_mac.cc | 15 +- impeller/golden_tests/golden_tests.cc | 14 +- impeller/golden_tests/metal_screenshot.h | 8 +- impeller/golden_tests/metal_screenshot.mm | 4 + ...l_screenshoter.h => metal_screenshotter.h} | 10 +- ...screenshoter.mm => metal_screenshotter.mm} | 12 +- 14 files changed, 1310 insertions(+), 874 deletions(-) rename impeller/golden_tests/{metal_screenshoter.h => metal_screenshotter.h} (78%) rename impeller/golden_tests/{metal_screenshoter.mm => metal_screenshotter.mm} (84%) diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index 182f1b441f212..9d4461c3deff6 100644 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -1417,8 +1417,8 @@ ORIGIN: ../../../flutter/impeller/golden_tests/golden_tests.cc + ../../../flutte ORIGIN: ../../../flutter/impeller/golden_tests/main.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/golden_tests/metal_screenshot.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/golden_tests/metal_screenshot.mm + ../../../flutter/LICENSE -ORIGIN: ../../../flutter/impeller/golden_tests/metal_screenshoter.h + ../../../flutter/LICENSE -ORIGIN: ../../../flutter/impeller/golden_tests/metal_screenshoter.mm + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/golden_tests/metal_screenshotter.h + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/golden_tests/metal_screenshotter.mm + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/golden_tests/working_directory.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/golden_tests/working_directory.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/golden_tests_harvester/bin/golden_tests_harvester.dart + ../../../flutter/LICENSE @@ -4177,8 +4177,8 @@ FILE: ../../../flutter/impeller/golden_tests/golden_tests.cc FILE: ../../../flutter/impeller/golden_tests/main.cc FILE: ../../../flutter/impeller/golden_tests/metal_screenshot.h FILE: ../../../flutter/impeller/golden_tests/metal_screenshot.mm -FILE: ../../../flutter/impeller/golden_tests/metal_screenshoter.h -FILE: ../../../flutter/impeller/golden_tests/metal_screenshoter.mm +FILE: ../../../flutter/impeller/golden_tests/metal_screenshotter.h +FILE: ../../../flutter/impeller/golden_tests/metal_screenshotter.mm FILE: ../../../flutter/impeller/golden_tests/working_directory.cc FILE: ../../../flutter/impeller/golden_tests/working_directory.h FILE: ../../../flutter/impeller/golden_tests_harvester/bin/golden_tests_harvester.dart diff --git a/display_list/testing/BUILD.gn b/display_list/testing/BUILD.gn index e1965e8c4ad8f..1839219b1e8e3 100644 --- a/display_list/testing/BUILD.gn +++ b/display_list/testing/BUILD.gn @@ -69,6 +69,10 @@ source_set("display_list_surface_provider") { "//flutter/testing:testing_lib", ] + if (is_mac) { + deps += [ "//flutter/impeller/golden_tests:metal_screenshot" ] + } + public_configs = [ ":surface_provider_config" ] if (is_android) { @@ -99,6 +103,9 @@ source_set("display_list_surface_provider") { "dl_test_surface_metal.cc", "dl_test_surface_metal.h", ] - deps += [ "//flutter/testing:metal" ] + deps += [ + "//flutter/impeller/display_list", + "//flutter/testing:metal", + ] } } diff --git a/display_list/testing/dl_rendering_unittests.cc b/display_list/testing/dl_rendering_unittests.cc index bb3ff367243eb..72ab52870a900 100644 --- a/display_list/testing/dl_rendering_unittests.cc +++ b/display_list/testing/dl_rendering_unittests.cc @@ -20,9 +20,11 @@ #include "third_party/skia/include/core/SkBBHFactory.h" #include "third_party/skia/include/core/SkColorFilter.h" #include "third_party/skia/include/core/SkPictureRecorder.h" +#include "third_party/skia/include/core/SkStream.h" #include "third_party/skia/include/core/SkSurface.h" #include "third_party/skia/include/effects/SkGradientShader.h" #include "third_party/skia/include/effects/SkImageFilters.h" +#include "third_party/skia/include/encode/SkPngEncoder.h" #include "third_party/skia/include/gpu/GrDirectContext.h" #include "third_party/skia/include/gpu/GrRecordingContext.h" #include "third_party/skia/include/gpu/GrTypes.h" @@ -156,6 +158,63 @@ class SkImageSampling { SkSamplingOptions(SkCubicResampler{1 / 3.0f, 1 / 3.0f}); }; +static void DrawCheckerboard(DlCanvas* canvas) { + DlPaint p0, p1; + p0.setDrawStyle(DlDrawStyle::kFill); + p0.setColor(DlColor(0xff00fe00)); // off-green + p1.setDrawStyle(DlDrawStyle::kFill); + p1.setColor(DlColor::kBlue()); + // Some pixels need some transparency for DstIn testing + p1.setAlpha(128); + int cbdim = 5; + int width = canvas->GetBaseLayerSize().width(); + int height = canvas->GetBaseLayerSize().height(); + for (int y = 0; y < width; y += cbdim) { + for (int x = 0; x < height; x += cbdim) { + DlPaint& cellp = ((x + y) & 1) == 0 ? p0 : p1; + canvas->DrawRect(SkRect::MakeXYWH(x, y, cbdim, cbdim), cellp); + } + } +} + +static void DrawCheckerboard(SkCanvas* canvas) { + DlSkCanvasAdapter dl_canvas(canvas); + DrawCheckerboard(&dl_canvas); +} + +static std::shared_ptr MakeColorSource( + const sk_sp& image) { + return std::make_shared(image, // + DlTileMode::kRepeat, // + DlTileMode::kRepeat, // + DlImageSampling::kLinear); +} + +static sk_sp MakeColorSource(const sk_sp& image) { + return image->makeShader(SkTileMode::kRepeat, // + SkTileMode::kRepeat, // + SkImageSampling::kLinear); +} + +// Used to show "INFO" warnings about tests that are omitted on certain +// backends, but only once for the entire test run to avoid warning spam +class OncePerBackendWarning { + public: + explicit OncePerBackendWarning(const std::string& warning) + : warning_(warning) {} + + void warn(const std::string& name) { + if (warnings_sent_.find(name) == warnings_sent_.end()) { + warnings_sent_.insert(name); + FML_LOG(INFO) << warning_ << " on " << name; + } + } + + private: + std::string warning_; + std::set warnings_sent_; +}; + // A class to specify how much tolerance to allow in bounds estimates. // For some attributes, the machinery must make some conservative // assumptions as to the extent of the bounds, but some of our test @@ -271,22 +330,46 @@ class BoundsTolerance { SkScalar discrete_offset_ = 0; }; -using SkSetup = const std::function; -using SkRenderer = const std::function; -using DlSetup = const std::function; -using DlRenderer = const std::function; -static const SkSetup kEmptySkSetup = [](SkCanvas*, SkPaint&) {}; -static const SkRenderer kEmptySkRenderer = [](SkCanvas*, const SkPaint&) {}; -static const DlSetup kEmptyDlSetup = [](DlCanvas*, DlPaint&) {}; -static const DlRenderer kEmptyDlRenderer = [](DlCanvas*, const DlPaint&) {}; +template +struct RenderContext { + C canvas; + P paint; + I image; +}; +using SkSetupContext = RenderContext>; +using DlSetupContext = RenderContext>; +using SkRenderContext = + RenderContext>; +using DlRenderContext = + RenderContext>; + +using SkSetup = const std::function; +using SkRenderer = const std::function; +using DlSetup = const std::function; +using DlRenderer = const std::function; +static const SkSetup kEmptySkSetup = [](const SkSetupContext&) {}; +static const SkRenderer kEmptySkRenderer = [](const SkRenderContext&) {}; +static const DlSetup kEmptyDlSetup = [](const DlSetupContext&) {}; +static const DlRenderer kEmptyDlRenderer = [](const DlRenderContext&) {}; using PixelFormat = DlSurfaceProvider::PixelFormat; using BackendType = DlSurfaceProvider::BackendType; class RenderResult { public: - explicit RenderResult(const sk_sp& surface, - bool take_snapshot = false) { + virtual ~RenderResult() = default; + + virtual sk_sp image() const = 0; + virtual int width() const = 0; + virtual int height() const = 0; + virtual const uint32_t* addr32(int x, int y) const = 0; + virtual void write(const std::string& path) const = 0; +}; + +class SkRenderResult final : public RenderResult { + public: + explicit SkRenderResult(const sk_sp& surface, + bool take_snapshot = false) { SkImageInfo info = surface->imageInfo(); info = SkImageInfo::MakeN32Premul(info.dimensions()); addr_ = malloc(info.computeMinByteSize() * info.height()); @@ -296,12 +379,20 @@ class RenderResult { image_ = surface->makeImageSnapshot(); } } - ~RenderResult() { free(addr_); } + ~SkRenderResult() override { free(addr_); } - sk_sp image() const { return image_; } - int width() const { return pixmap_.width(); } - int height() const { return pixmap_.height(); } - const uint32_t* addr32(int x, int y) const { return pixmap_.addr32(x, y); } + sk_sp image() const override { return image_; } + int width() const override { return pixmap_.width(); } + int height() const override { return pixmap_.height(); } + const uint32_t* addr32(int x, int y) const override { + return pixmap_.addr32(x, y); + } + void write(const std::string& path) const { + auto stream = SkFILEWStream(path.c_str()); + SkPngEncoder::Options options; + SkPngEncoder::Encode(&stream, pixmap_, options); + stream.flush(); + } private: sk_sp image_; @@ -309,6 +400,29 @@ class RenderResult { void* addr_ = nullptr; }; +class ImpellerRenderResult final : public RenderResult { + public: + explicit ImpellerRenderResult(sk_sp screenshot, + SkRect render_bounds) + : screenshot_(std::move(screenshot)), render_bounds_(render_bounds) {} + ~ImpellerRenderResult() override = default; + + sk_sp image() const override { return nullptr; }; + int width() const override { return screenshot_->width(); }; + int height() const override { return screenshot_->height(); } + const uint32_t* addr32(int x, int y) const override { + return screenshot_->addr32(x, y); + } + void write(const std::string& path) const override { + screenshot_->write(path); + } + const SkRect& render_bounds() const { return render_bounds_; } + + private: + const sk_sp screenshot_; + SkRect render_bounds_; +}; + struct RenderJobInfo { int width = kTestWidth; int height = kTestHeight; @@ -319,6 +433,7 @@ struct RenderJobInfo { struct JobRenderer { virtual void Render(SkCanvas* canvas, const RenderJobInfo& info) = 0; + virtual bool targets_impeller() const { return false; } }; struct MatrixClipJobRenderer : public JobRenderer { @@ -340,21 +455,25 @@ struct MatrixClipJobRenderer : public JobRenderer { }; struct SkJobRenderer : public MatrixClipJobRenderer { - explicit SkJobRenderer(const SkSetup& sk_setup = kEmptySkSetup, - const SkRenderer& sk_render = kEmptySkRenderer, - const SkRenderer& sk_restore = kEmptySkRenderer) - : sk_setup_(sk_setup), sk_render_(sk_render), sk_restore_(sk_restore) {} + explicit SkJobRenderer(const SkSetup& sk_setup, + const SkRenderer& sk_render, + const SkRenderer& sk_restore, + const sk_sp& sk_image) + : sk_setup_(sk_setup), + sk_render_(sk_render), + sk_restore_(sk_restore), + sk_image_(sk_image) {} void Render(SkCanvas* canvas, const RenderJobInfo& info) override { FML_DCHECK(info.opacity == SK_Scalar1); SkPaint paint; - sk_setup_(canvas, paint); + sk_setup_({canvas, paint, sk_image_}); setup_paint_ = paint; setup_matrix_ = canvas->getTotalMatrix(); setup_clip_bounds_ = canvas->getDeviceClipBounds(); is_setup_ = true; - sk_render_(canvas, paint); - sk_restore_(canvas, paint); + sk_render_({canvas, paint, sk_image_}); + sk_restore_({canvas, paint, sk_image_}); } sk_sp MakePicture(const RenderJobInfo& info) { @@ -374,14 +493,19 @@ struct SkJobRenderer : public MatrixClipJobRenderer { const SkSetup sk_setup_; const SkRenderer sk_render_; const SkRenderer sk_restore_; + sk_sp sk_image_; SkPaint setup_paint_; }; struct DlJobRenderer : public MatrixClipJobRenderer { - explicit DlJobRenderer(const DlSetup& dl_setup = kEmptyDlSetup, - const DlRenderer& dl_render = kEmptyDlRenderer, - const DlRenderer& dl_restore = kEmptyDlRenderer) - : dl_setup_(dl_setup), dl_render_(dl_render), dl_restore_(dl_restore) {} + explicit DlJobRenderer(const DlSetup& dl_setup, + const DlRenderer& dl_render, + const DlRenderer& dl_restore, + const sk_sp& dl_image) + : dl_setup_(dl_setup), + dl_render_(dl_render), + dl_restore_(dl_restore), + dl_image_(dl_image) {} void Render(SkCanvas* sk_canvas, const RenderJobInfo& info) override { DlSkCanvasAdapter canvas(sk_canvas); @@ -391,13 +515,13 @@ struct DlJobRenderer : public MatrixClipJobRenderer { void Render(DlCanvas* canvas, const RenderJobInfo& info) { FML_DCHECK(info.opacity == SK_Scalar1); DlPaint paint; - dl_setup_(canvas, paint); + dl_setup_({canvas, paint, dl_image_}); setup_paint_ = paint; setup_matrix_ = canvas->GetTransform(); setup_clip_bounds_ = canvas->GetDestinationClipBounds().roundOut(); is_setup_ = true; - dl_render_(canvas, paint); - dl_restore_(canvas, paint); + dl_render_({canvas, paint, dl_image_}); + dl_restore_({canvas, paint, dl_image_}); } sk_sp MakeDisplayList(const RenderJobInfo& info) { @@ -411,10 +535,15 @@ struct DlJobRenderer : public MatrixClipJobRenderer { return setup_paint_; } + bool targets_impeller() const override { + return dl_image_->impeller_texture() != nullptr; + } + private: const DlSetup dl_setup_; const DlRenderer dl_render_; const DlRenderer dl_restore_; + const sk_sp dl_image_; DlPaint setup_paint_; }; @@ -474,18 +603,24 @@ class RenderEnvironment { DlSetup& dl_setup, DlRenderer& dl_renderer, DlColor bg = DlColor::kTransparent()) { - SkJobRenderer sk_job(sk_setup, sk_renderer); + SkJobRenderer sk_job(sk_setup, sk_renderer, kEmptySkRenderer, kTestSkImage); RenderJobInfo info = { .bg = bg, }; ref_sk_result_ = getResult(info, sk_job); - DlJobRenderer dl_job(dl_setup, dl_renderer); + DlJobRenderer dl_job(dl_setup, dl_renderer, kEmptyDlRenderer, kTestDlImage); ref_dl_result_ = getResult(info, dl_job); ref_dl_paint_ = dl_job.setup_paint(); ref_matrix_ = dl_job.setup_matrix(); ref_clip_bounds_ = dl_job.setup_clip_bounds(); ASSERT_EQ(sk_job.setup_matrix(), ref_matrix_); ASSERT_EQ(sk_job.setup_clip_bounds(), ref_clip_bounds_); + if (provider_->supports_impeller()) { + test_impeller_image_ = makeTestImpellerImage(provider_); + DlJobRenderer imp_job(dl_setup, dl_renderer, kEmptyDlRenderer, + test_impeller_image_); + ref_impeller_result_ = getImpellerResult(info, imp_job); + } } std::unique_ptr getResult(const RenderJobInfo& info, @@ -504,7 +639,7 @@ class RenderEnvironment { GrAsDirectContext(surface->recordingContext())) { dContext->flushAndSubmit(surface.get(), GrSyncCpu::kYes); } - return std::make_unique(surface); + return std::make_unique(surface); } std::unique_ptr getResult(sk_sp dl) const { @@ -513,9 +648,25 @@ class RenderEnvironment { return getResult(info, job); } + std::unique_ptr getImpellerResult( + const RenderJobInfo& info, + DlJobRenderer& renderer) const { + FML_DCHECK(info.scale == SK_Scalar1); + + DisplayListBuilder builder; + builder.Clear(info.bg); + auto render_dl = renderer.MakeDisplayList(info); + builder.DrawDisplayList(render_dl); + auto dl = builder.Build(); + auto snap = provider_->ImpellerSnapshot(dl, kTestWidth, kTestHeight); + return std::make_unique(std::move(snap), + render_dl->bounds()); + } + const DlSurfaceProvider* provider() const { return provider_; } bool valid() const { return provider_->supports(format_); } const std::string backend_name() const { return provider_->backend_name(); } + bool supports_impeller() const { return provider_->supports_impeller(); } PixelFormat format() const { return format_; } const DlPaint& ref_dl_paint() const { return ref_dl_paint_; } @@ -523,6 +674,13 @@ class RenderEnvironment { const SkIRect& ref_clip_bounds() const { return ref_clip_bounds_; } const RenderResult* ref_sk_result() const { return ref_sk_result_.get(); } const RenderResult* ref_dl_result() const { return ref_dl_result_.get(); } + const ImpellerRenderResult* ref_impeller_result() const { + return ref_impeller_result_.get(); + } + + const sk_sp sk_image() const { return kTestSkImage; } + const sk_sp dl_image() const { return kTestDlImage; } + const sk_sp impeller_image() const { return test_impeller_image_; } private: sk_sp getSurface(int width, int height) const { @@ -551,8 +709,31 @@ class RenderEnvironment { SkIRect ref_clip_bounds_; std::unique_ptr ref_sk_result_; std::unique_ptr ref_dl_result_; + std::unique_ptr ref_impeller_result_; + sk_sp test_impeller_image_; + + static const sk_sp kTestSkImage; + static const sk_sp kTestDlImage; + static const sk_sp makeTestSkImage() { + sk_sp surface = SkSurfaces::Raster( + SkImageInfo::MakeN32Premul(kRenderWidth, kRenderHeight)); + DrawCheckerboard(surface->getCanvas()); + return surface->makeImageSnapshot(); + } + static const sk_sp makeTestImpellerImage( + const DlSurfaceProvider* provider) { + FML_DCHECK(provider->supports_impeller()); + DisplayListBuilder builder(SkRect::MakeWH(kRenderWidth, kRenderHeight)); + DrawCheckerboard(&builder); + return provider->MakeImpellerImage(builder.Build(), // + kRenderWidth, kRenderHeight); + } }; +const sk_sp RenderEnvironment::kTestSkImage = makeTestSkImage(); +const sk_sp RenderEnvironment::kTestDlImage = + DlImage::Make(kTestSkImage); + class CaseParameters { public: explicit CaseParameters(std::string info) @@ -640,6 +821,7 @@ class TestParameters { : sk_renderer_(sk_renderer), dl_renderer_(dl_renderer), flags_(flags) {} bool uses_paint() const { return !flags_.ignores_paint(); } + bool uses_gradient() const { return flags_.applies_shader(); } bool should_match(const RenderEnvironment& env, const CaseParameters& caseP, @@ -661,7 +843,12 @@ class TestParameters { const DlPaint& ref_attr = env.ref_dl_paint(); if (flags_.applies_anti_alias() && // ref_attr.isAntiAlias() != attr.isAntiAlias()) { - return false; + if (renderer.targets_impeller()) { + // Impeller only does MSAA, ignoring the AA attribute + // https://github.com/flutter/flutter/issues/104721 + } else { + return false; + } } if (flags_.applies_dither() && // ref_attr.isDither() != attr.isDither()) { @@ -701,10 +888,16 @@ class TestParameters { flags_.WithPathEffect(attr.getPathEffect().get(), is_stroked); if (flags_.applies_path_effect() && // ref_attr.getPathEffect() != attr.getPathEffect()) { - switch (attr.getPathEffect()->type()) { - case DlPathEffectType::kDash: { - if (is_stroked && !ignores_dashes()) { - return false; + if (renderer.targets_impeller()) { + // Impeller ignores DlPathEffect objects: + // https://github.com/flutter/flutter/issues/109736 + } else { + switch (attr.getPathEffect()->type()) { + case DlPathEffectType::kDash: { + if (is_stroked && !ignores_dashes()) { + return false; + } + break; } } } @@ -886,16 +1079,53 @@ class TestParameters { class CanvasCompareTester { public: - static std::vector> kTestProviders; + static std::vector kTestBackends; + static std::string kTempDirectory; + + static std::unique_ptr GetProvider(BackendType type) { + auto provider = DlSurfaceProvider::Create(type); + if (provider == nullptr) { + FML_LOG(ERROR) << "provider " << DlSurfaceProvider::BackendName(type) + << " not supported (ignoring)"; + return nullptr; + } + provider->InitializeSurface(kTestWidth, kTestHeight, + PixelFormat::kN32PremulPixelFormat); + return provider; + } + + static bool AddProvider(BackendType type) { + auto provider = GetProvider(type); + if (!provider) { + return false; + } + CanvasCompareTester::kTestBackends.push_back(type); + return true; + } static BoundsTolerance DefaultTolerance; static void RenderAll(const TestParameters& params, const BoundsTolerance& tolerance = DefaultTolerance) { - for (auto& provider : kTestProviders) { + for (auto& back_end : kTestBackends) { + auto provider = GetProvider(back_end); RenderEnvironment env = RenderEnvironment::MakeN32(provider.get()); env.init_ref(params.sk_renderer(), params.dl_renderer()); quickCompareToReference(env, "default"); + if (env.supports_impeller()) { + auto impeller_result = env.ref_impeller_result(); + if (!checkPixels(impeller_result, impeller_result->render_bounds(), + "Impeller reference")) { + std::string test_name = + ::testing::UnitTest::GetInstance()->current_test_info()->name(); + impeller_result->write( + to_png_filename(test_name + " (Impeller reference)")); + } + } else { + static OncePerBackendWarning warnings("No Impeller output tests"); + warnings.warn(env.backend_name()); + } + RenderWithTransforms(params, env, tolerance); RenderWithClips(params, env, tolerance); RenderWithSaveRestore(params, env, tolerance); @@ -913,113 +1143,113 @@ class CanvasCompareTester { SkRect::MakeXYWH(kRenderCenterX - 1, kRenderCenterY - 1, 2, 2); SkRect rect = SkRect::MakeXYWH(kRenderCenterX, kRenderCenterY, 10, 10); DlColor alpha_layer_color = DlColor::kCyan().withAlpha(0x7f); - SkRenderer sk_safe_restore = [=](SkCanvas* cv, const SkPaint& p) { + SkRenderer sk_safe_restore = [=](const SkRenderContext& ctx) { // Draw another primitive to disable peephole optimizations - cv->drawRect(kRenderBounds.makeOffset(500, 500), SkPaint()); - cv->restore(); + ctx.canvas->drawRect(kRenderBounds.makeOffset(500, 500), SkPaint()); + ctx.canvas->restore(); }; - DlRenderer dl_safe_restore = [=](DlCanvas* cv, const DlPaint& p) { + DlRenderer dl_safe_restore = [=](const DlRenderContext& ctx) { // Draw another primitive to disable peephole optimizations // As the rendering op rejection in the DisplayList Builder // gets smarter and smarter, this operation has had to get // sneakier and sneakier about specifying an operation that // won't practically show up in the output, but technically // can't be culled. - cv->DrawRect( + ctx.canvas->DrawRect( SkRect::MakeXYWH(kRenderCenterX, kRenderCenterY, 0.0001, 0.0001), DlPaint()); - cv->Restore(); + ctx.canvas->Restore(); }; - SkRenderer sk_opt_restore = [=](SkCanvas* cv, const SkPaint& p) { + SkRenderer sk_opt_restore = [=](const SkRenderContext& ctx) { // Just a simple restore to allow peephole optimizations to occur - cv->restore(); + ctx.canvas->restore(); }; - DlRenderer dl_opt_restore = [=](DlCanvas* cv, const DlPaint& p) { + DlRenderer dl_opt_restore = [=](const DlRenderContext& ctx) { // Just a simple restore to allow peephole optimizations to occur - cv->Restore(); + ctx.canvas->Restore(); }; SkRect layer_bounds = kRenderBounds.makeInset(15, 15); RenderWith(testP, env, tolerance, CaseParameters( "With prior save/clip/restore", - [=](SkCanvas* cv, SkPaint& p) { - cv->save(); - cv->clipRect(clip, SkClipOp::kIntersect, false); + [=](const SkSetupContext& ctx) { + ctx.canvas->save(); + ctx.canvas->clipRect(clip, SkClipOp::kIntersect, false); SkPaint p2; - cv->drawRect(rect, p2); + ctx.canvas->drawRect(rect, p2); p2.setBlendMode(SkBlendMode::kClear); - cv->drawRect(rect, p2); - cv->restore(); + ctx.canvas->drawRect(rect, p2); + ctx.canvas->restore(); }, - [=](DlCanvas* cv, DlPaint& p) { - cv->Save(); - cv->ClipRect(clip, ClipOp::kIntersect, false); + [=](const DlSetupContext& ctx) { + ctx.canvas->Save(); + ctx.canvas->ClipRect(clip, ClipOp::kIntersect, false); DlPaint p2; - cv->DrawRect(rect, p2); + ctx.canvas->DrawRect(rect, p2); p2.setBlendMode(DlBlendMode::kClear); - cv->DrawRect(rect, p2); - cv->Restore(); + ctx.canvas->DrawRect(rect, p2); + ctx.canvas->Restore(); })); RenderWith(testP, env, tolerance, CaseParameters( "saveLayer no paint, no bounds", - [=](SkCanvas* cv, SkPaint& p) { // - cv->saveLayer(nullptr, nullptr); + [=](const SkSetupContext& ctx) { + ctx.canvas->saveLayer(nullptr, nullptr); }, - [=](DlCanvas* cv, DlPaint& p) { // - cv->SaveLayer(nullptr, nullptr); + [=](const DlSetupContext& ctx) { + ctx.canvas->SaveLayer(nullptr, nullptr); }) .with_restore(sk_safe_restore, dl_safe_restore, false)); RenderWith(testP, env, tolerance, CaseParameters( "saveLayer no paint, with bounds", - [=](SkCanvas* cv, SkPaint& p) { // - cv->saveLayer(layer_bounds, nullptr); + [=](const SkSetupContext& ctx) { + ctx.canvas->saveLayer(layer_bounds, nullptr); }, - [=](DlCanvas* cv, DlPaint& p) { // - cv->SaveLayer(&layer_bounds, nullptr); + [=](const DlSetupContext& ctx) { + ctx.canvas->SaveLayer(&layer_bounds, nullptr); }) .with_restore(sk_safe_restore, dl_safe_restore, true)); RenderWith(testP, env, tolerance, CaseParameters( "saveLayer with alpha, no bounds", - [=](SkCanvas* cv, SkPaint& p) { + [=](const SkSetupContext& ctx) { SkPaint save_p; save_p.setColor(ToSk(alpha_layer_color)); - cv->saveLayer(nullptr, &save_p); + ctx.canvas->saveLayer(nullptr, &save_p); }, - [=](DlCanvas* cv, DlPaint& p) { + [=](const DlSetupContext& ctx) { DlPaint save_p; save_p.setColor(alpha_layer_color); - cv->SaveLayer(nullptr, &save_p); + ctx.canvas->SaveLayer(nullptr, &save_p); }) .with_restore(sk_safe_restore, dl_safe_restore, true)); RenderWith(testP, env, tolerance, CaseParameters( "saveLayer with peephole alpha, no bounds", - [=](SkCanvas* cv, SkPaint& p) { + [=](const SkSetupContext& ctx) { SkPaint save_p; save_p.setColor(ToSk(alpha_layer_color)); - cv->saveLayer(nullptr, &save_p); + ctx.canvas->saveLayer(nullptr, &save_p); }, - [=](DlCanvas* cv, DlPaint& p) { + [=](const DlSetupContext& ctx) { DlPaint save_p; save_p.setColor(alpha_layer_color); - cv->SaveLayer(nullptr, &save_p); + ctx.canvas->SaveLayer(nullptr, &save_p); }) .with_restore(sk_opt_restore, dl_opt_restore, true, true)); RenderWith(testP, env, tolerance, CaseParameters( "saveLayer with alpha and bounds", - [=](SkCanvas* cv, SkPaint& p) { + [=](const SkSetupContext& ctx) { SkPaint save_p; save_p.setColor(ToSk(alpha_layer_color)); - cv->saveLayer(layer_bounds, &save_p); + ctx.canvas->saveLayer(layer_bounds, &save_p); }, - [=](DlCanvas* cv, DlPaint& p) { + [=](const DlSetupContext& ctx) { DlPaint save_p; save_p.setColor(alpha_layer_color); - cv->SaveLayer(&layer_bounds, &save_p); + ctx.canvas->SaveLayer(&layer_bounds, &save_p); }) .with_restore(sk_safe_restore, dl_safe_restore, true)); { @@ -1032,21 +1262,21 @@ class CanvasCompareTester { // a non-opaque color to avoid that problem. RenderEnvironment backdrop_env = RenderEnvironment::MakeN32(env.provider()); - SkSetup sk_backdrop_setup = [=](SkCanvas* cv, SkPaint& p) { + SkSetup sk_backdrop_setup = [=](const SkSetupContext& ctx) { SkPaint setup_p; - setup_p.setShader(kTestSkImageColorSource); - cv->drawPaint(setup_p); + setup_p.setShader(MakeColorSource(ctx.image)); + ctx.canvas->drawPaint(setup_p); }; - DlSetup dl_backdrop_setup = [=](DlCanvas* cv, DlPaint& p) { + DlSetup dl_backdrop_setup = [=](const DlSetupContext& ctx) { DlPaint setup_p; - setup_p.setColorSource(&kTestDlImageColorSource); - cv->DrawPaint(setup_p); + setup_p.setColorSource(MakeColorSource(ctx.image)); + ctx.canvas->DrawPaint(setup_p); }; - SkSetup sk_content_setup = [=](SkCanvas* cv, SkPaint& p) { - p.setAlpha(p.getAlpha() / 2); + SkSetup sk_content_setup = [=](const SkSetupContext& ctx) { + ctx.paint.setAlpha(ctx.paint.getAlpha() / 2); }; - DlSetup dl_content_setup = [=](DlCanvas* cv, DlPaint& p) { - p.setAlpha(p.getAlpha() / 2); + DlSetup dl_content_setup = [=](const DlSetupContext& ctx) { + ctx.paint.setAlpha(ctx.paint.getAlpha() / 2); }; backdrop_env.init_ref(sk_backdrop_setup, testP.sk_renderer(), dl_backdrop_setup, testP.dl_renderer()); @@ -1058,48 +1288,49 @@ class CanvasCompareTester { RenderWith(testP, backdrop_env, tolerance, CaseParameters( "saveLayer with backdrop", - [=](SkCanvas* cv, SkPaint& p) { - sk_backdrop_setup(cv, p); - cv->saveLayer(SkCanvas::SaveLayerRec( + [=](const SkSetupContext& ctx) { + sk_backdrop_setup(ctx); + ctx.canvas->saveLayer(SkCanvas::SaveLayerRec( nullptr, nullptr, sk_backdrop.get(), 0)); - sk_content_setup(cv, p); + sk_content_setup(ctx); }, - [=](DlCanvas* cv, DlPaint& p) { - dl_backdrop_setup(cv, p); - cv->SaveLayer(nullptr, nullptr, &dl_backdrop); - dl_content_setup(cv, p); + [=](const DlSetupContext& ctx) { + dl_backdrop_setup(ctx); + ctx.canvas->SaveLayer(nullptr, nullptr, &dl_backdrop); + dl_content_setup(ctx); }) .with_restore(sk_safe_restore, dl_safe_restore, true)); RenderWith(testP, backdrop_env, tolerance, CaseParameters( "saveLayer with bounds and backdrop", - [=](SkCanvas* cv, SkPaint& p) { - sk_backdrop_setup(cv, p); - cv->saveLayer(SkCanvas::SaveLayerRec( + [=](const SkSetupContext& ctx) { + sk_backdrop_setup(ctx); + ctx.canvas->saveLayer(SkCanvas::SaveLayerRec( &layer_bounds, nullptr, sk_backdrop.get(), 0)); - sk_content_setup(cv, p); + sk_content_setup(ctx); }, - [=](DlCanvas* cv, DlPaint& p) { - dl_backdrop_setup(cv, p); - cv->SaveLayer(&layer_bounds, nullptr, &dl_backdrop); - dl_content_setup(cv, p); + [=](const DlSetupContext& ctx) { + dl_backdrop_setup(ctx); + ctx.canvas->SaveLayer(&layer_bounds, nullptr, + &dl_backdrop); + dl_content_setup(ctx); }) .with_restore(sk_safe_restore, dl_safe_restore, true)); RenderWith(testP, backdrop_env, tolerance, CaseParameters( "clipped saveLayer with backdrop", - [=](SkCanvas* cv, SkPaint& p) { - sk_backdrop_setup(cv, p); - cv->clipRect(layer_bounds); - cv->saveLayer(SkCanvas::SaveLayerRec( + [=](const SkSetupContext& ctx) { + sk_backdrop_setup(ctx); + ctx.canvas->clipRect(layer_bounds); + ctx.canvas->saveLayer(SkCanvas::SaveLayerRec( nullptr, nullptr, sk_backdrop.get(), 0)); - sk_content_setup(cv, p); + sk_content_setup(ctx); }, - [=](DlCanvas* cv, DlPaint& p) { - dl_backdrop_setup(cv, p); - cv->ClipRect(layer_bounds); - cv->SaveLayer(nullptr, nullptr, &dl_backdrop); - dl_content_setup(cv, p); + [=](const DlSetupContext& ctx) { + dl_backdrop_setup(ctx); + ctx.canvas->ClipRect(layer_bounds); + ctx.canvas->SaveLayer(nullptr, nullptr, &dl_backdrop); + dl_content_setup(ctx); }) .with_restore(sk_safe_restore, dl_safe_restore, true)); } @@ -1120,17 +1351,17 @@ class CanvasCompareTester { RenderWith(testP, env, tolerance, CaseParameters( "saveLayer ColorFilter, no bounds", - [=](SkCanvas* cv, SkPaint& p) { + [=](const SkSetupContext& ctx) { SkPaint save_p; save_p.setColorFilter(sk_alpha_rotate_filter); - cv->saveLayer(nullptr, &save_p); - p.setStrokeWidth(5.0); + ctx.canvas->saveLayer(nullptr, &save_p); + ctx.paint.setStrokeWidth(5.0); }, - [=](DlCanvas* cv, DlPaint& p) { + [=](const DlSetupContext& ctx) { DlPaint save_p; save_p.setColorFilter(&dl_alpha_rotate_filter); - cv->SaveLayer(nullptr, &save_p); - p.setStrokeWidth(5.0); + ctx.canvas->SaveLayer(nullptr, &save_p); + ctx.paint.setStrokeWidth(5.0); }) .with_restore(sk_safe_restore, dl_safe_restore, true)); } @@ -1138,17 +1369,17 @@ class CanvasCompareTester { RenderWith(testP, env, tolerance, CaseParameters( "saveLayer ColorFilter and bounds", - [=](SkCanvas* cv, SkPaint& p) { + [=](const SkSetupContext& ctx) { SkPaint save_p; save_p.setColorFilter(sk_alpha_rotate_filter); - cv->saveLayer(kRenderBounds, &save_p); - p.setStrokeWidth(5.0); + ctx.canvas->saveLayer(kRenderBounds, &save_p); + ctx.paint.setStrokeWidth(5.0); }, - [=](DlCanvas* cv, DlPaint& p) { + [=](const DlSetupContext& ctx) { DlPaint save_p; save_p.setColorFilter(&dl_alpha_rotate_filter); - cv->SaveLayer(&kRenderBounds, &save_p); - p.setStrokeWidth(5.0); + ctx.canvas->SaveLayer(&kRenderBounds, &save_p); + ctx.paint.setStrokeWidth(5.0); }) .with_restore(sk_safe_restore, dl_safe_restore, true)); } @@ -1171,17 +1402,17 @@ class CanvasCompareTester { RenderWith(testP, env, tolerance, CaseParameters( "saveLayer ImageFilter, no bounds", - [=](SkCanvas* cv, SkPaint& p) { + [=](const SkSetupContext& ctx) { SkPaint save_p; save_p.setImageFilter(sk_cf_image_filter); - cv->saveLayer(nullptr, &save_p); - p.setStrokeWidth(5.0); + ctx.canvas->saveLayer(nullptr, &save_p); + ctx.paint.setStrokeWidth(5.0); }, - [=](DlCanvas* cv, DlPaint& p) { + [=](const DlSetupContext& ctx) { DlPaint save_p; save_p.setImageFilter(&dl_cf_image_filter); - cv->SaveLayer(nullptr, &save_p); - p.setStrokeWidth(5.0); + ctx.canvas->SaveLayer(nullptr, &save_p); + ctx.paint.setStrokeWidth(5.0); }) .with_restore(sk_safe_restore, dl_safe_restore, true)); } @@ -1189,17 +1420,17 @@ class CanvasCompareTester { RenderWith(testP, env, tolerance, CaseParameters( "saveLayer ImageFilter and bounds", - [=](SkCanvas* cv, SkPaint& p) { + [=](const SkSetupContext& ctx) { SkPaint save_p; save_p.setImageFilter(sk_cf_image_filter); - cv->saveLayer(kRenderBounds, &save_p); - p.setStrokeWidth(5.0); + ctx.canvas->saveLayer(kRenderBounds, &save_p); + ctx.paint.setStrokeWidth(5.0); }, - [=](DlCanvas* cv, DlPaint& p) { + [=](const DlSetupContext& ctx) { DlPaint save_p; save_p.setImageFilter(&dl_cf_image_filter); - cv->SaveLayer(&kRenderBounds, &save_p); - p.setStrokeWidth(5.0); + ctx.canvas->SaveLayer(&kRenderBounds, &save_p); + ctx.paint.setStrokeWidth(5.0); }) .with_restore(sk_safe_restore, dl_safe_restore, true)); } @@ -1218,48 +1449,56 @@ class CanvasCompareTester { RenderEnvironment aa_env = RenderEnvironment::MakeN32(env.provider()); // Tweak the bounds tolerance for the displacement of 1/10 of a pixel const BoundsTolerance aa_tolerance = tolerance.addBoundsPadding(1, 1); - auto sk_aa_setup = [=](SkCanvas* cv, SkPaint& p, bool is_aa) { - cv->translate(0.1, 0.1); - p.setAntiAlias(is_aa); - p.setStrokeWidth(5.0); + auto sk_aa_setup = [=](SkSetupContext ctx, bool is_aa) { + ctx.canvas->translate(0.1, 0.1); + ctx.paint.setAntiAlias(is_aa); + ctx.paint.setStrokeWidth(5.0); }; - auto dl_aa_setup = [=](DlCanvas* cv, DlPaint& p, bool is_aa) { - cv->Translate(0.1, 0.1); - p.setAntiAlias(is_aa); - p.setStrokeWidth(5.0); + auto dl_aa_setup = [=](DlSetupContext ctx, bool is_aa) { + ctx.canvas->Translate(0.1, 0.1); + ctx.paint.setAntiAlias(is_aa); + ctx.paint.setStrokeWidth(5.0); }; aa_env.init_ref( - [=](SkCanvas* cv, SkPaint& p) { sk_aa_setup(cv, p, false); }, + [=](const SkSetupContext& ctx) { sk_aa_setup(ctx, false); }, testP.sk_renderer(), - [=](DlCanvas* cv, DlPaint& p) { dl_aa_setup(cv, p, false); }, + [=](const DlSetupContext& ctx) { dl_aa_setup(ctx, false); }, testP.dl_renderer()); quickCompareToReference(aa_env, "AntiAlias"); RenderWith( testP, aa_env, aa_tolerance, CaseParameters( "AntiAlias == True", - [=](SkCanvas* cv, SkPaint& p) { sk_aa_setup(cv, p, true); }, - [=](DlCanvas* cv, DlPaint& p) { dl_aa_setup(cv, p, true); })); + [=](const SkSetupContext& ctx) { sk_aa_setup(ctx, true); }, + [=](const DlSetupContext& ctx) { dl_aa_setup(ctx, true); })); RenderWith( testP, aa_env, aa_tolerance, CaseParameters( "AntiAlias == False", - [=](SkCanvas* cv, SkPaint& p) { sk_aa_setup(cv, p, false); }, - [=](DlCanvas* cv, DlPaint& p) { dl_aa_setup(cv, p, false); })); + [=](const SkSetupContext& ctx) { sk_aa_setup(ctx, false); }, + [=](const DlSetupContext& ctx) { dl_aa_setup(ctx, false); })); } - RenderWith( + RenderWith( // testP, env, tolerance, CaseParameters( "Color == Blue", - [=](SkCanvas*, SkPaint& p) { p.setColor(SK_ColorBLUE); }, - [=](DlCanvas*, DlPaint& p) { p.setColor(DlColor::kBlue()); })); - RenderWith( + [=](const SkSetupContext& ctx) { + ctx.paint.setColor(SK_ColorBLUE); + }, + [=](const DlSetupContext& ctx) { + ctx.paint.setColor(DlColor::kBlue()); + })); + RenderWith( // testP, env, tolerance, CaseParameters( "Color == Green", - [=](SkCanvas*, SkPaint& p) { p.setColor(SK_ColorGREEN); }, - [=](DlCanvas*, DlPaint& p) { p.setColor(DlColor::kGreen()); })); + [=](const SkSetupContext& ctx) { + ctx.paint.setColor(SK_ColorGREEN); + }, + [=](const DlSetupContext& ctx) { + ctx.paint.setColor(DlColor::kGreen()); + })); RenderWithStrokes(testP, env, tolerance); @@ -1271,25 +1510,25 @@ class CanvasCompareTester { RenderWith(testP, env, tolerance, CaseParameters( "Blend == SrcIn", - [=](SkCanvas*, SkPaint& p) { - p.setBlendMode(SkBlendMode::kSrcIn); - p.setColor(ToSk(blendable_color)); + [=](const SkSetupContext& ctx) { + ctx.paint.setBlendMode(SkBlendMode::kSrcIn); + ctx.paint.setColor(blendable_color.argb()); }, - [=](DlCanvas*, DlPaint& p) { - p.setBlendMode(DlBlendMode::kSrcIn); - p.setColor(blendable_color); + [=](const DlSetupContext& ctx) { + ctx.paint.setBlendMode(DlBlendMode::kSrcIn); + ctx.paint.setColor(blendable_color); }) .with_bg(bg)); RenderWith(testP, env, tolerance, CaseParameters( "Blend == DstIn", - [=](SkCanvas*, SkPaint& p) { - p.setBlendMode(SkBlendMode::kDstIn); - p.setColor(ToSk(blendable_color)); + [=](const SkSetupContext& ctx) { + ctx.paint.setBlendMode(SkBlendMode::kDstIn); + ctx.paint.setColor(blendable_color.argb()); }, - [=](DlCanvas*, DlPaint& p) { - p.setBlendMode(DlBlendMode::kDstIn); - p.setColor(blendable_color); + [=](const DlSetupContext& ctx) { + ctx.paint.setBlendMode(DlBlendMode::kDstIn); + ctx.paint.setColor(blendable_color); }) .with_bg(bg)); } @@ -1299,13 +1538,13 @@ class CanvasCompareTester { // like a non-trivial stroke width and a shader rather than a color // (for drawPaint) so we create a new environment for these tests. RenderEnvironment blur_env = RenderEnvironment::MakeN32(env.provider()); - SkSetup sk_blur_setup = [=](SkCanvas*, SkPaint& p) { - p.setShader(kTestSkImageColorSource); - p.setStrokeWidth(5.0); + SkSetup sk_blur_setup = [=](const SkSetupContext& ctx) { + ctx.paint.setShader(MakeColorSource(ctx.image)); + ctx.paint.setStrokeWidth(5.0); }; - DlSetup dl_blur_setup = [=](DlCanvas*, DlPaint& p) { - p.setColorSource(&kTestDlImageColorSource); - p.setStrokeWidth(5.0); + DlSetup dl_blur_setup = [=](const DlSetupContext& ctx) { + ctx.paint.setColorSource(MakeColorSource(ctx.image)); + ctx.paint.setStrokeWidth(5.0); }; blur_env.init_ref(sk_blur_setup, testP.sk_renderer(), // dl_blur_setup, testP.dl_renderer()); @@ -1318,13 +1557,13 @@ class CanvasCompareTester { RenderWith(testP, blur_env, blur_5_tolerance, CaseParameters( "ImageFilter == Decal Blur 5", - [=](SkCanvas* cv, SkPaint& p) { - sk_blur_setup(cv, p); - p.setImageFilter(sk_filter_decal_5); + [=](const SkSetupContext& ctx) { + sk_blur_setup(ctx); + ctx.paint.setImageFilter(sk_filter_decal_5); }, - [=](DlCanvas* cv, DlPaint& p) { - dl_blur_setup(cv, p); - p.setImageFilter(&dl_filter_decal_5); + [=](const DlSetupContext& ctx) { + dl_blur_setup(ctx); + ctx.paint.setImageFilter(&dl_filter_decal_5); })); } DlBlurImageFilter dl_filter_clamp_5(5.0, 5.0, DlTileMode::kClamp); @@ -1334,13 +1573,13 @@ class CanvasCompareTester { RenderWith(testP, blur_env, blur_5_tolerance, CaseParameters( "ImageFilter == Clamp Blur 5", - [=](SkCanvas* cv, SkPaint& p) { - sk_blur_setup(cv, p); - p.setImageFilter(sk_filter_clamp_5); + [=](const SkSetupContext& ctx) { + sk_blur_setup(ctx); + ctx.paint.setImageFilter(sk_filter_clamp_5); }, - [=](DlCanvas* cv, DlPaint& p) { - dl_blur_setup(cv, p); - p.setImageFilter(&dl_filter_clamp_5); + [=](const DlSetupContext& ctx) { + dl_blur_setup(ctx); + ctx.paint.setImageFilter(&dl_filter_clamp_5); })); } } @@ -1350,13 +1589,13 @@ class CanvasCompareTester { // like a non-trivial stroke width and a shader rather than a color // (for drawPaint) so we create a new environment for these tests. RenderEnvironment dilate_env = RenderEnvironment::MakeN32(env.provider()); - SkSetup sk_dilate_setup = [=](SkCanvas*, SkPaint& p) { - p.setShader(kTestSkImageColorSource); - p.setStrokeWidth(5.0); + SkSetup sk_dilate_setup = [=](const SkSetupContext& ctx) { + ctx.paint.setShader(MakeColorSource(ctx.image)); + ctx.paint.setStrokeWidth(5.0); }; - DlSetup dl_dilate_setup = [=](DlCanvas*, DlPaint& p) { - p.setColorSource(&kTestDlImageColorSource); - p.setStrokeWidth(5.0); + DlSetup dl_dilate_setup = [=](const DlSetupContext& ctx) { + ctx.paint.setColorSource(MakeColorSource(ctx.image)); + ctx.paint.setStrokeWidth(5.0); }; dilate_env.init_ref(sk_dilate_setup, testP.sk_renderer(), // dl_dilate_setup, testP.dl_renderer()); @@ -1366,13 +1605,13 @@ class CanvasCompareTester { RenderWith(testP, dilate_env, tolerance, CaseParameters( "ImageFilter == Dilate 5", - [=](SkCanvas* cv, SkPaint& p) { - sk_dilate_setup(cv, p); - p.setImageFilter(sk_dilate_filter_5); + [=](const SkSetupContext& ctx) { + sk_dilate_setup(ctx); + ctx.paint.setImageFilter(sk_dilate_filter_5); }, - [=](DlCanvas* cv, DlPaint& p) { - dl_dilate_setup(cv, p); - p.setImageFilter(&dl_dilate_filter_5); + [=](const DlSetupContext& ctx) { + dl_dilate_setup(ctx); + ctx.paint.setImageFilter(&dl_dilate_filter_5); })); } @@ -1381,13 +1620,13 @@ class CanvasCompareTester { // like a non-trivial stroke width and a shader rather than a color // (for drawPaint) so we create a new environment for these tests. RenderEnvironment erode_env = RenderEnvironment::MakeN32(env.provider()); - SkSetup sk_erode_setup = [=](SkCanvas*, SkPaint& p) { - p.setShader(kTestSkImageColorSource); - p.setStrokeWidth(6.0); + SkSetup sk_erode_setup = [=](const SkSetupContext& ctx) { + ctx.paint.setShader(MakeColorSource(ctx.image)); + ctx.paint.setStrokeWidth(6.0); }; - DlSetup dl_erode_setup = [=](DlCanvas*, DlPaint& p) { - p.setColorSource(&kTestDlImageColorSource); - p.setStrokeWidth(6.0); + DlSetup dl_erode_setup = [=](const DlSetupContext& ctx) { + ctx.paint.setColorSource(MakeColorSource(ctx.image)); + ctx.paint.setStrokeWidth(6.0); }; erode_env.init_ref(sk_erode_setup, testP.sk_renderer(), // dl_erode_setup, testP.dl_renderer()); @@ -1399,13 +1638,13 @@ class CanvasCompareTester { RenderWith(testP, erode_env, tolerance, CaseParameters( "ImageFilter == Erode 1", - [=](SkCanvas* cv, SkPaint& p) { - sk_erode_setup(cv, p); - p.setImageFilter(sk_erode_filter_1); + [=](const SkSetupContext& ctx) { + sk_erode_setup(ctx); + ctx.paint.setImageFilter(sk_erode_filter_1); }, - [=](DlCanvas* cv, DlPaint& p) { - dl_erode_setup(cv, p); - p.setImageFilter(&dl_erode_filter_1); + [=](const DlSetupContext& ctx) { + dl_erode_setup(ctx); + ctx.paint.setImageFilter(&dl_erode_filter_1); })); } @@ -1431,31 +1670,31 @@ class CanvasCompareTester { RenderWith(testP, env, tolerance, CaseParameters( "ColorFilter == RotateRGB", - [=](SkCanvas*, SkPaint& p) { - p.setColor(ToSk(DlColor::kYellow())); - p.setColorFilter(sk_color_filter); + [=](const SkSetupContext& ctx) { + ctx.paint.setColor(SK_ColorYELLOW); + ctx.paint.setColorFilter(sk_color_filter); }, - [=](DlCanvas*, DlPaint& p) { - p.setColor(DlColor::kYellow()); - p.setColorFilter(&dl_color_filter); + [=](const DlSetupContext& ctx) { + ctx.paint.setColor(DlColor::kYellow()); + ctx.paint.setColorFilter(&dl_color_filter); }) .with_bg(bg)); } { DlColor bg = DlColor::kWhite(); - RenderWith( - testP, env, tolerance, - CaseParameters( - "ColorFilter == Invert", - [=](SkCanvas*, SkPaint& p) { - p.setColor(ToSk(DlColor::kYellow())); - p.setColorFilter(SkColorFilters::Matrix(invert_color_matrix)); - }, - [=](DlCanvas*, DlPaint& p) { - p.setColor(DlColor::kYellow()); - p.setInvertColors(true); - }) - .with_bg(bg)); + RenderWith(testP, env, tolerance, + CaseParameters( + "ColorFilter == Invert", + [=](const SkSetupContext& ctx) { + ctx.paint.setColor(SK_ColorYELLOW); + ctx.paint.setColorFilter( + SkColorFilters::Matrix(invert_color_matrix)); + }, + [=](const DlSetupContext& ctx) { + ctx.paint.setColor(DlColor::kYellow()); + ctx.paint.setInvertColors(true); + }) + .with_bg(bg)); } } @@ -1468,13 +1707,13 @@ class CanvasCompareTester { RenderWith(testP, env, blur_5_tolerance, CaseParameters( "MaskFilter == Blur 5", - [=](SkCanvas*, SkPaint& p) { - p.setStrokeWidth(5.0); - p.setMaskFilter(sk_mask_filter); + [=](const SkSetupContext& ctx) { + ctx.paint.setStrokeWidth(5.0); + ctx.paint.setMaskFilter(sk_mask_filter); }, - [=](DlCanvas*, DlPaint& p) { - p.setStrokeWidth(5.0); - p.setMaskFilter(&dl_mask_filter); + [=](const DlSetupContext& ctx) { + ctx.paint.setStrokeWidth(5.0); + ctx.paint.setMaskFilter(&dl_mask_filter); })); } } @@ -1505,12 +1744,68 @@ class CanvasCompareTester { auto sk_gradient = SkGradientShader::MakeLinear( end_points, sk_colors, stops, 3, SkTileMode::kMirror, 0, nullptr); { - RenderWith( - testP, env, tolerance, - CaseParameters( - "LinearGradient GYB", - [=](SkCanvas*, SkPaint& p) { p.setShader(sk_gradient); }, - [=](DlCanvas*, DlPaint& p) { p.setColorSource(dl_gradient); })); + RenderWith(testP, env, tolerance, + CaseParameters( + "LinearGradient GYB", + [=](const SkSetupContext& ctx) { + ctx.paint.setShader(sk_gradient); + }, + [=](const DlSetupContext& ctx) { + ctx.paint.setColorSource(dl_gradient); + })); + } + + if (testP.uses_gradient()) { + // Dithering is only applied to gradients so we reuse the gradient + // created above in these setup methods. Also, thin stroked + // primitives (mainly drawLine and drawPoints) do not show much + // dithering so we use a non-trivial stroke width as well. + RenderEnvironment dither_env = + RenderEnvironment::Make565(env.provider()); + if (!dither_env.valid()) { + // Currently only happens on Metal backend + static OncePerBackendWarning warnings("Skipping Dithering tests"); + warnings.warn(dither_env.backend_name()); + } else { + DlColor dither_bg = DlColor::kBlack(); + SkSetup sk_dither_setup = [=](const SkSetupContext& ctx) { + ctx.paint.setShader(sk_gradient); + ctx.paint.setAlpha(0xf0); + ctx.paint.setStrokeWidth(5.0); + }; + DlSetup dl_dither_setup = [=](const DlSetupContext& ctx) { + ctx.paint.setColorSource(dl_gradient); + ctx.paint.setAlpha(0xf0); + ctx.paint.setStrokeWidth(5.0); + }; + dither_env.init_ref(sk_dither_setup, testP.sk_renderer(), + dl_dither_setup, testP.dl_renderer(), dither_bg); + quickCompareToReference(dither_env, "dither"); + RenderWith(testP, dither_env, tolerance, + CaseParameters( + "Dither == True", + [=](const SkSetupContext& ctx) { + sk_dither_setup(ctx); + ctx.paint.setDither(true); + }, + [=](const DlSetupContext& ctx) { + dl_dither_setup(ctx); + ctx.paint.setDither(true); + }) + .with_bg(dither_bg)); + RenderWith(testP, dither_env, tolerance, + CaseParameters( + "Dither = False", + [=](const SkSetupContext& ctx) { + sk_dither_setup(ctx); + ctx.paint.setDither(false); + }, + [=](const DlSetupContext& ctx) { + dl_dither_setup(ctx); + ctx.paint.setDither(false); + }) + .with_bg(dither_bg)); + } } } } @@ -1526,11 +1821,11 @@ class CanvasCompareTester { RenderWith(testP, env, tolerance, CaseParameters( "Fill", - [=](SkCanvas*, SkPaint& p) { // - p.setStyle(SkPaint::kFill_Style); + [=](const SkSetupContext& ctx) { + ctx.paint.setStyle(SkPaint::kFill_Style); }, - [=](DlCanvas*, DlPaint& p) { // - p.setDrawStyle(DlDrawStyle::kFill); + [=](const DlSetupContext& ctx) { + ctx.paint.setDrawStyle(DlDrawStyle::kFill); })); // Skia on HW produces a strong miter consistent with width=1.0 // for any width less than a pixel, but the bounds computations of @@ -1544,40 +1839,40 @@ class CanvasCompareTester { RenderWith(testP, env, tolerance, CaseParameters( "Stroke + defaults", - [=](SkCanvas*, SkPaint& p) { // + [=](const SkSetupContext& ctx) { if (no_hairlines) { - p.setStrokeWidth(1.0); + ctx.paint.setStrokeWidth(1.0); } - p.setStyle(SkPaint::kStroke_Style); + ctx.paint.setStyle(SkPaint::kStroke_Style); }, - [=](DlCanvas*, DlPaint& p) { // + [=](const DlSetupContext& ctx) { if (no_hairlines) { - p.setStrokeWidth(1.0); + ctx.paint.setStrokeWidth(1.0); } - p.setDrawStyle(DlDrawStyle::kStroke); + ctx.paint.setDrawStyle(DlDrawStyle::kStroke); })); RenderWith(testP, env, tolerance, CaseParameters( "Fill + unnecessary StrokeWidth 10", - [=](SkCanvas*, SkPaint& p) { - p.setStyle(SkPaint::kFill_Style); - p.setStrokeWidth(10.0); + [=](const SkSetupContext& ctx) { + ctx.paint.setStyle(SkPaint::kFill_Style); + ctx.paint.setStrokeWidth(10.0); }, - [=](DlCanvas*, DlPaint& p) { - p.setDrawStyle(DlDrawStyle::kFill); - p.setStrokeWidth(10.0); + [=](const DlSetupContext& ctx) { + ctx.paint.setDrawStyle(DlDrawStyle::kFill); + ctx.paint.setStrokeWidth(10.0); })); RenderEnvironment stroke_base_env = RenderEnvironment::MakeN32(env.provider()); - SkSetup sk_stroke_setup = [=](SkCanvas*, SkPaint& p) { - p.setStyle(SkPaint::kStroke_Style); - p.setStrokeWidth(5.0); + SkSetup sk_stroke_setup = [=](const SkSetupContext& ctx) { + ctx.paint.setStyle(SkPaint::kStroke_Style); + ctx.paint.setStrokeWidth(5.0); }; - DlSetup dl_stroke_setup = [=](DlCanvas*, DlPaint& p) { - p.setDrawStyle(DlDrawStyle::kStroke); - p.setStrokeWidth(5.0); + DlSetup dl_stroke_setup = [=](const DlSetupContext& ctx) { + ctx.paint.setDrawStyle(DlDrawStyle::kStroke); + ctx.paint.setStrokeWidth(5.0); }; stroke_base_env.init_ref(sk_stroke_setup, testP.sk_renderer(), dl_stroke_setup, testP.dl_renderer()); @@ -1586,110 +1881,110 @@ class CanvasCompareTester { RenderWith(testP, stroke_base_env, tolerance, CaseParameters( "Stroke Width 10", - [=](SkCanvas*, SkPaint& p) { - p.setStyle(SkPaint::kStroke_Style); - p.setStrokeWidth(10.0); + [=](const SkSetupContext& ctx) { + ctx.paint.setStyle(SkPaint::kStroke_Style); + ctx.paint.setStrokeWidth(10.0); }, - [=](DlCanvas*, DlPaint& p) { - p.setDrawStyle(DlDrawStyle::kStroke); - p.setStrokeWidth(10.0); + [=](const DlSetupContext& ctx) { + ctx.paint.setDrawStyle(DlDrawStyle::kStroke); + ctx.paint.setStrokeWidth(10.0); })); RenderWith(testP, stroke_base_env, tolerance, CaseParameters( "Stroke Width 5", - [=](SkCanvas*, SkPaint& p) { - p.setStyle(SkPaint::kStroke_Style); - p.setStrokeWidth(5.0); + [=](const SkSetupContext& ctx) { + ctx.paint.setStyle(SkPaint::kStroke_Style); + ctx.paint.setStrokeWidth(5.0); }, - [=](DlCanvas*, DlPaint& p) { - p.setDrawStyle(DlDrawStyle::kStroke); - p.setStrokeWidth(5.0); + [=](const DlSetupContext& ctx) { + ctx.paint.setDrawStyle(DlDrawStyle::kStroke); + ctx.paint.setStrokeWidth(5.0); })); RenderWith(testP, stroke_base_env, tolerance, CaseParameters( "Stroke Width 5, Square Cap", - [=](SkCanvas*, SkPaint& p) { - p.setStyle(SkPaint::kStroke_Style); - p.setStrokeWidth(5.0); - p.setStrokeCap(SkPaint::kSquare_Cap); + [=](const SkSetupContext& ctx) { + ctx.paint.setStyle(SkPaint::kStroke_Style); + ctx.paint.setStrokeWidth(5.0); + ctx.paint.setStrokeCap(SkPaint::kSquare_Cap); }, - [=](DlCanvas*, DlPaint& p) { - p.setDrawStyle(DlDrawStyle::kStroke); - p.setStrokeWidth(5.0); - p.setStrokeCap(DlStrokeCap::kSquare); + [=](const DlSetupContext& ctx) { + ctx.paint.setDrawStyle(DlDrawStyle::kStroke); + ctx.paint.setStrokeWidth(5.0); + ctx.paint.setStrokeCap(DlStrokeCap::kSquare); })); RenderWith(testP, stroke_base_env, tolerance, CaseParameters( "Stroke Width 5, Round Cap", - [=](SkCanvas*, SkPaint& p) { - p.setStyle(SkPaint::kStroke_Style); - p.setStrokeWidth(5.0); - p.setStrokeCap(SkPaint::kRound_Cap); + [=](const SkSetupContext& ctx) { + ctx.paint.setStyle(SkPaint::kStroke_Style); + ctx.paint.setStrokeWidth(5.0); + ctx.paint.setStrokeCap(SkPaint::kRound_Cap); }, - [=](DlCanvas*, DlPaint& p) { - p.setDrawStyle(DlDrawStyle::kStroke); - p.setStrokeWidth(5.0); - p.setStrokeCap(DlStrokeCap::kRound); + [=](const DlSetupContext& ctx) { + ctx.paint.setDrawStyle(DlDrawStyle::kStroke); + ctx.paint.setStrokeWidth(5.0); + ctx.paint.setStrokeCap(DlStrokeCap::kRound); })); RenderWith(testP, stroke_base_env, tolerance, CaseParameters( "Stroke Width 5, Bevel Join", - [=](SkCanvas*, SkPaint& p) { - p.setStyle(SkPaint::kStroke_Style); - p.setStrokeWidth(5.0); - p.setStrokeJoin(SkPaint::kBevel_Join); + [=](const SkSetupContext& ctx) { + ctx.paint.setStyle(SkPaint::kStroke_Style); + ctx.paint.setStrokeWidth(5.0); + ctx.paint.setStrokeJoin(SkPaint::kBevel_Join); }, - [=](DlCanvas*, DlPaint& p) { - p.setDrawStyle(DlDrawStyle::kStroke); - p.setStrokeWidth(5.0); - p.setStrokeJoin(DlStrokeJoin::kBevel); + [=](const DlSetupContext& ctx) { + ctx.paint.setDrawStyle(DlDrawStyle::kStroke); + ctx.paint.setStrokeWidth(5.0); + ctx.paint.setStrokeJoin(DlStrokeJoin::kBevel); })); RenderWith(testP, stroke_base_env, tolerance, CaseParameters( "Stroke Width 5, Round Join", - [=](SkCanvas*, SkPaint& p) { - p.setStyle(SkPaint::kStroke_Style); - p.setStrokeWidth(5.0); - p.setStrokeJoin(SkPaint::kRound_Join); + [=](const SkSetupContext& ctx) { + ctx.paint.setStyle(SkPaint::kStroke_Style); + ctx.paint.setStrokeWidth(5.0); + ctx.paint.setStrokeJoin(SkPaint::kRound_Join); }, - [=](DlCanvas*, DlPaint& p) { - p.setDrawStyle(DlDrawStyle::kStroke); - p.setStrokeWidth(5.0); - p.setStrokeJoin(DlStrokeJoin::kRound); + [=](const DlSetupContext& ctx) { + ctx.paint.setDrawStyle(DlDrawStyle::kStroke); + ctx.paint.setStrokeWidth(5.0); + ctx.paint.setStrokeJoin(DlStrokeJoin::kRound); })); RenderWith(testP, stroke_base_env, tolerance, CaseParameters( "Stroke Width 5, Miter 10", - [=](SkCanvas*, SkPaint& p) { - p.setStyle(SkPaint::kStroke_Style); - p.setStrokeWidth(5.0); - p.setStrokeMiter(10.0); - p.setStrokeJoin(SkPaint::kMiter_Join); + [=](const SkSetupContext& ctx) { + ctx.paint.setStyle(SkPaint::kStroke_Style); + ctx.paint.setStrokeWidth(5.0); + ctx.paint.setStrokeMiter(10.0); + ctx.paint.setStrokeJoin(SkPaint::kMiter_Join); }, - [=](DlCanvas*, DlPaint& p) { - p.setDrawStyle(DlDrawStyle::kStroke); - p.setStrokeWidth(5.0); - p.setStrokeMiter(10.0); - p.setStrokeJoin(DlStrokeJoin::kMiter); + [=](const DlSetupContext& ctx) { + ctx.paint.setDrawStyle(DlDrawStyle::kStroke); + ctx.paint.setStrokeWidth(5.0); + ctx.paint.setStrokeMiter(10.0); + ctx.paint.setStrokeJoin(DlStrokeJoin::kMiter); })); RenderWith(testP, stroke_base_env, tolerance, CaseParameters( "Stroke Width 5, Miter 0", - [=](SkCanvas*, SkPaint& p) { - p.setStyle(SkPaint::kStroke_Style); - p.setStrokeWidth(5.0); - p.setStrokeMiter(0.0); - p.setStrokeJoin(SkPaint::kMiter_Join); + [=](const SkSetupContext& ctx) { + ctx.paint.setStyle(SkPaint::kStroke_Style); + ctx.paint.setStrokeWidth(5.0); + ctx.paint.setStrokeMiter(0.0); + ctx.paint.setStrokeJoin(SkPaint::kMiter_Join); }, - [=](DlCanvas*, DlPaint& p) { - p.setDrawStyle(DlDrawStyle::kStroke); - p.setStrokeWidth(5.0); - p.setStrokeMiter(0.0); - p.setStrokeJoin(DlStrokeJoin::kMiter); + [=](const DlSetupContext& ctx) { + ctx.paint.setDrawStyle(DlDrawStyle::kStroke); + ctx.paint.setStrokeWidth(5.0); + ctx.paint.setStrokeMiter(0.0); + ctx.paint.setStrokeJoin(DlStrokeJoin::kMiter); })); { @@ -1701,34 +1996,34 @@ class CanvasCompareTester { RenderWith(testP, stroke_base_env, tolerance, CaseParameters( "PathEffect without forced stroking == Dash-29-2", - [=](SkCanvas*, SkPaint& p) { + [=](const SkSetupContext& ctx) { // Provide some non-trivial stroke size to get dashed - p.setStrokeWidth(5.0); - p.setPathEffect(sk_dash_effect); + ctx.paint.setStrokeWidth(5.0); + ctx.paint.setPathEffect(sk_dash_effect); }, - [=](DlCanvas*, DlPaint& p) { + [=](const DlSetupContext& ctx) { // Provide some non-trivial stroke size to get dashed - p.setStrokeWidth(5.0); - p.setPathEffect(dl_dash_effect); + ctx.paint.setStrokeWidth(5.0); + ctx.paint.setPathEffect(dl_dash_effect); })); } { RenderWith(testP, stroke_base_env, tolerance, CaseParameters( "PathEffect == Dash-29-2", - [=](SkCanvas*, SkPaint& p) { + [=](const SkSetupContext& ctx) { // Need stroke style to see dashing properly - p.setStyle(SkPaint::kStroke_Style); + ctx.paint.setStyle(SkPaint::kStroke_Style); // Provide some non-trivial stroke size to get dashed - p.setStrokeWidth(5.0); - p.setPathEffect(sk_dash_effect); + ctx.paint.setStrokeWidth(5.0); + ctx.paint.setPathEffect(sk_dash_effect); }, - [=](DlCanvas*, DlPaint& p) { + [=](const DlSetupContext& ctx) { // Need stroke style to see dashing properly - p.setDrawStyle(DlDrawStyle::kStroke); + ctx.paint.setDrawStyle(DlDrawStyle::kStroke); // Provide some non-trivial stroke size to get dashed - p.setStrokeWidth(5.0); - p.setPathEffect(dl_dash_effect); + ctx.paint.setStrokeWidth(5.0); + ctx.paint.setPathEffect(dl_dash_effect); })); } dl_dash_effect = DlDashPathEffect::Make(test_dashes_2, 2, 0.0f); @@ -1737,19 +2032,19 @@ class CanvasCompareTester { RenderWith(testP, stroke_base_env, tolerance, CaseParameters( "PathEffect == Dash-17-1.5", - [=](SkCanvas*, SkPaint& p) { + [=](const SkSetupContext& ctx) { // Need stroke style to see dashing properly - p.setStyle(SkPaint::kStroke_Style); + ctx.paint.setStyle(SkPaint::kStroke_Style); // Provide some non-trivial stroke size to get dashed - p.setStrokeWidth(5.0); - p.setPathEffect(sk_dash_effect); + ctx.paint.setStrokeWidth(5.0); + ctx.paint.setPathEffect(sk_dash_effect); }, - [=](DlCanvas*, DlPaint& p) { + [=](const DlSetupContext& ctx) { // Need stroke style to see dashing properly - p.setDrawStyle(DlDrawStyle::kStroke); + ctx.paint.setDrawStyle(DlDrawStyle::kStroke); // Provide some non-trivial stroke size to get dashed - p.setStrokeWidth(5.0); - p.setPathEffect(dl_dash_effect); + ctx.paint.setStrokeWidth(5.0); + ctx.paint.setPathEffect(dl_dash_effect); })); } } @@ -1762,26 +2057,30 @@ class CanvasCompareTester { // bounds, then the estimate under rotation or skewing will be off // so we scale the padding by about 5% to compensate. BoundsTolerance skewed_tolerance = tolerance.mulScale(1.05, 1.05); - RenderWith(testP, env, tolerance, - CaseParameters( - "Translate 5, 10", // - [=](SkCanvas* c, SkPaint&) { c->translate(5, 10); }, - [=](DlCanvas* c, DlPaint&) { c->Translate(5, 10); })); - RenderWith(testP, env, tolerance, - CaseParameters( - "Scale +5%", // - [=](SkCanvas* c, SkPaint&) { c->scale(1.05, 1.05); }, - [=](DlCanvas* c, DlPaint&) { c->Scale(1.05, 1.05); })); - RenderWith(testP, env, skewed_tolerance, - CaseParameters( - "Rotate 5 degrees", // - [=](SkCanvas* c, SkPaint&) { c->rotate(5); }, - [=](DlCanvas* c, DlPaint&) { c->Rotate(5); })); - RenderWith(testP, env, skewed_tolerance, - CaseParameters( - "Skew 5%", // - [=](SkCanvas* c, SkPaint&) { c->skew(0.05, 0.05); }, - [=](DlCanvas* c, DlPaint&) { c->Skew(0.05, 0.05); })); + RenderWith( // + testP, env, tolerance, + CaseParameters( + "Translate 5, 10", // + [=](const SkSetupContext& ctx) { ctx.canvas->translate(5, 10); }, + [=](const DlSetupContext& ctx) { ctx.canvas->Translate(5, 10); })); + RenderWith( // + testP, env, tolerance, + CaseParameters( + "Scale +5%", // + [=](const SkSetupContext& ctx) { ctx.canvas->scale(1.05, 1.05); }, + [=](const DlSetupContext& ctx) { ctx.canvas->Scale(1.05, 1.05); })); + RenderWith( // + testP, env, skewed_tolerance, + CaseParameters( + "Rotate 5 degrees", // + [=](const SkSetupContext& ctx) { ctx.canvas->rotate(5); }, + [=](const DlSetupContext& ctx) { ctx.canvas->Rotate(5); })); + RenderWith( // + testP, env, skewed_tolerance, + CaseParameters( + "Skew 5%", // + [=](const SkSetupContext& ctx) { ctx.canvas->skew(0.05, 0.05); }, + [=](const DlSetupContext& ctx) { ctx.canvas->Skew(0.05, 0.05); })); { // This rather odd transform can cause slight differences in // computing in-bounds samples depending on which base rendering @@ -1794,11 +2093,12 @@ class CanvasCompareTester { SkMatrix tx = SkMatrix::MakeAll(1.0 + tweak, tweak, 5, // tweak, 1.0 + tweak, 10, // 0, 0, 1); - RenderWith(testP, env, skewed_tolerance, - CaseParameters( - "Transform 2D Affine", - [=](SkCanvas* c, SkPaint&) { c->concat(tx); }, - [=](DlCanvas* c, DlPaint&) { c->Transform(tx); })); + RenderWith( // + testP, env, skewed_tolerance, + CaseParameters( + "Transform 2D Affine", + [=](const SkSetupContext& ctx) { ctx.canvas->concat(tx); }, + [=](const DlSetupContext& ctx) { ctx.canvas->Transform(tx); })); } { SkM44 m44 = SkM44(1, 0, 0, kRenderCenterX, // @@ -1810,11 +2110,12 @@ class CanvasCompareTester { m44.preConcat( SkM44::Rotate({0, 1, 0}, math::kPi / 45)); // 4 degrees around Y m44.preTranslate(-kRenderCenterX, -kRenderCenterY); - RenderWith(testP, env, skewed_tolerance, - CaseParameters( - "Transform Full Perspective", - [=](SkCanvas* c, SkPaint&) { c->concat(m44); }, - [=](DlCanvas* c, DlPaint&) { c->Transform(m44); })); + RenderWith( // + testP, env, skewed_tolerance, + CaseParameters( + "Transform Full Perspective", + [=](const SkSetupContext& ctx) { ctx.canvas->concat(m44); }, + [=](const DlSetupContext& ctx) { ctx.canvas->Transform(m44); })); } } @@ -1835,29 +2136,29 @@ class CanvasCompareTester { RenderWith(testP, env, intersect_tolerance, CaseParameters( "Hard ClipRect inset by 15.4", - [=](SkCanvas* c, SkPaint&) { - c->clipRect(r_clip, SkClipOp::kIntersect, false); + [=](const SkSetupContext& ctx) { + ctx.canvas->clipRect(r_clip, SkClipOp::kIntersect, false); }, - [=](DlCanvas* c, DlPaint&) { - c->ClipRect(r_clip, ClipOp::kIntersect, false); + [=](const DlSetupContext& ctx) { + ctx.canvas->ClipRect(r_clip, ClipOp::kIntersect, false); })); RenderWith(testP, env, intersect_tolerance, CaseParameters( "AntiAlias ClipRect inset by 15.4", - [=](SkCanvas* c, SkPaint&) { - c->clipRect(r_clip, SkClipOp::kIntersect, true); + [=](const SkSetupContext& ctx) { + ctx.canvas->clipRect(r_clip, SkClipOp::kIntersect, true); }, - [=](DlCanvas* c, DlPaint&) { - c->ClipRect(r_clip, ClipOp::kIntersect, true); + [=](const DlSetupContext& ctx) { + ctx.canvas->ClipRect(r_clip, ClipOp::kIntersect, true); })); RenderWith(testP, env, diff_tolerance, CaseParameters( "Hard ClipRect Diff, inset by 15.4", - [=](SkCanvas* c, SkPaint&) { - c->clipRect(r_clip, SkClipOp::kDifference, false); + [=](const SkSetupContext& ctx) { + ctx.canvas->clipRect(r_clip, SkClipOp::kDifference, false); }, - [=](DlCanvas* c, DlPaint&) { - c->ClipRect(r_clip, ClipOp::kDifference, false); + [=](const DlSetupContext& ctx) { + ctx.canvas->ClipRect(r_clip, ClipOp::kDifference, false); }) .with_diff_clip()); // This test RR clip used to use very small radii, but due to @@ -1869,29 +2170,31 @@ class CanvasCompareTester { RenderWith(testP, env, intersect_tolerance, CaseParameters( "Hard ClipRRect with radius of 15.4", - [=](SkCanvas* c, SkPaint&) { - c->clipRRect(rr_clip, SkClipOp::kIntersect, false); + [=](const SkSetupContext& ctx) { + ctx.canvas->clipRRect(rr_clip, SkClipOp::kIntersect, + false); }, - [=](DlCanvas* c, DlPaint&) { - c->ClipRRect(rr_clip, ClipOp::kIntersect, false); + [=](const DlSetupContext& ctx) { + ctx.canvas->ClipRRect(rr_clip, ClipOp::kIntersect, false); })); RenderWith(testP, env, intersect_tolerance, CaseParameters( "AntiAlias ClipRRect with radius of 15.4", - [=](SkCanvas* c, SkPaint&) { - c->clipRRect(rr_clip, SkClipOp::kIntersect, true); + [=](const SkSetupContext& ctx) { + ctx.canvas->clipRRect(rr_clip, SkClipOp::kIntersect, true); }, - [=](DlCanvas* c, DlPaint&) { - c->ClipRRect(rr_clip, ClipOp::kIntersect, true); + [=](const DlSetupContext& ctx) { + ctx.canvas->ClipRRect(rr_clip, ClipOp::kIntersect, true); })); RenderWith(testP, env, diff_tolerance, CaseParameters( "Hard ClipRRect Diff, with radius of 15.4", - [=](SkCanvas* c, SkPaint&) { - c->clipRRect(rr_clip, SkClipOp::kDifference, false); + [=](const SkSetupContext& ctx) { + ctx.canvas->clipRRect(rr_clip, SkClipOp::kDifference, + false); }, - [=](DlCanvas* c, DlPaint&) { - c->ClipRRect(rr_clip, ClipOp::kDifference, false); + [=](const DlSetupContext& ctx) { + ctx.canvas->ClipRRect(rr_clip, ClipOp::kDifference, false); }) .with_diff_clip()); SkPath path_clip = SkPath(); @@ -1901,38 +2204,56 @@ class CanvasCompareTester { RenderWith(testP, env, intersect_tolerance, CaseParameters( "Hard ClipPath inset by 15.4", - [=](SkCanvas* c, SkPaint&) { - c->clipPath(path_clip, SkClipOp::kIntersect, false); + [=](const SkSetupContext& ctx) { + ctx.canvas->clipPath(path_clip, SkClipOp::kIntersect, + false); }, - [=](DlCanvas* c, DlPaint&) { - c->ClipPath(path_clip, ClipOp::kIntersect, false); + [=](const DlSetupContext& ctx) { + ctx.canvas->ClipPath(path_clip, ClipOp::kIntersect, false); })); RenderWith(testP, env, intersect_tolerance, CaseParameters( "AntiAlias ClipPath inset by 15.4", - [=](SkCanvas* c, SkPaint&) { - c->clipPath(path_clip, SkClipOp::kIntersect, true); + [=](const SkSetupContext& ctx) { + ctx.canvas->clipPath(path_clip, SkClipOp::kIntersect, + true); }, - [=](DlCanvas* c, DlPaint&) { - c->ClipPath(path_clip, ClipOp::kIntersect, true); + [=](const DlSetupContext& ctx) { + ctx.canvas->ClipPath(path_clip, ClipOp::kIntersect, true); })); - RenderWith(testP, env, diff_tolerance, - CaseParameters( - "Hard ClipPath Diff, inset by 15.4", - [=](SkCanvas* c, SkPaint&) { - c->clipPath(path_clip, SkClipOp::kDifference, false); - }, - [=](DlCanvas* c, DlPaint&) { - c->ClipPath(path_clip, ClipOp::kDifference, false); - }) - .with_diff_clip()); + RenderWith( + testP, env, diff_tolerance, + CaseParameters( + "Hard ClipPath Diff, inset by 15.4", + [=](const SkSetupContext& ctx) { + ctx.canvas->clipPath(path_clip, SkClipOp::kDifference, false); + }, + [=](const DlSetupContext& ctx) { + ctx.canvas->ClipPath(path_clip, ClipOp::kDifference, false); + }) + .with_diff_clip()); + } + + static std::string to_png_filename(const std::string& desc) { + if (kTempDirectory.length() == 0) { + kTempDirectory = fml::CreateTemporaryDirectory(); + } + + std::string ret = kTempDirectory + "/"; + for (const char& ch : desc) { + ret += (ch == ':' || ch == ' ') ? '_' : ch; + } + return ret + ".png"; } static void RenderWith(const TestParameters& testP, const RenderEnvironment& env, const BoundsTolerance& tolerance_in, const CaseParameters& caseP) { - const std::string info = env.backend_name() + ": " + caseP.info(); + std::string test_name = + ::testing::UnitTest::GetInstance()->current_test_info()->name(); + const std::string info = + env.backend_name() + ": " + test_name + " (" + caseP.info() + ")"; const DlColor bg = caseP.bg(); RenderJobInfo base_info = { .bg = bg, @@ -1940,15 +2261,16 @@ class CanvasCompareTester { // sk_result is a direct rendering via SkCanvas to SkSurface // DisplayList mechanisms are not involved in this operation - // SkPaint sk_paint; SkJobRenderer sk_job(caseP.sk_setup(), // testP.sk_renderer(), // - caseP.sk_restore()); + caseP.sk_restore(), // + env.sk_image()); auto sk_result = env.getResult(base_info, sk_job); DlJobRenderer dl_job(caseP.dl_setup(), // testP.dl_renderer(), // - caseP.dl_restore()); + caseP.dl_restore(), // + env.dl_image()); auto dl_result = env.getResult(base_info, dl_job); EXPECT_EQ(sk_job.setup_matrix(), dl_job.setup_matrix()); @@ -1968,10 +2290,49 @@ class CanvasCompareTester { if (testP.should_match(env, caseP, dl_job.setup_paint(), dl_job)) { quickCompareToReference(env.ref_sk_result(), sk_result.get(), true, - info + " (attribute has no effect)"); + info + " (attribute should not have effect)"); } else { quickCompareToReference(env.ref_sk_result(), sk_result.get(), false, - info + " (attribute affects rendering)"); + info + " (attribute should affect rendering)"); + } + + if (env.supports_impeller()) { + DlJobRenderer imp_job(caseP.dl_setup(), // + testP.dl_renderer(), // + caseP.dl_restore(), // + env.impeller_image()); + auto imp_result = env.getImpellerResult(base_info, imp_job); + std::string imp_info = info + " (Impeller)"; + bool success = checkPixels(imp_result.get(), imp_result->render_bounds(), + imp_info, bg); + if (testP.should_match(env, caseP, imp_job.setup_paint(), imp_job)) { + success = success && // + quickCompareToReference( // + env.ref_impeller_result(), imp_result.get(), true, + imp_info + " (attribute should not have effect)"); + } else { + success = success && // + quickCompareToReference( // + env.ref_impeller_result(), imp_result.get(), false, + imp_info + " (attribute should affect rendering)"); + } + if (!success) { + FML_LOG(ERROR) << "Impeller issue encountered for: " << *display_list; + std::string filename = to_png_filename(info + " (Impeller Output)"); + imp_result->write(filename); + FML_LOG(ERROR) << "output saved in: " << filename; + std::string src_filename = to_png_filename(info + " (Impeller Input)"); + env.ref_impeller_result()->write(src_filename); + FML_LOG(ERROR) << "compare to reference without attributes: " + << src_filename; + std::string sk_filename = to_png_filename(info + " (Skia Output)"); + sk_result->write(sk_filename); + FML_LOG(ERROR) << "and to Skia reference with attributes: " + << sk_filename; + std::string sk_src_filename = to_png_filename(info + " (Skia Input)"); + env.ref_sk_result()->write(sk_src_filename); + FML_LOG(ERROR) << "operating on Skia source image: " << sk_src_filename; + } } quickCompareToReference(sk_result.get(), dl_result.get(), true, @@ -2156,14 +2517,16 @@ class CanvasCompareTester { ASSERT_LE(pixels_different, 1) << info; } - static void checkPixels(const RenderResult* ref_result, + static bool checkPixels(const RenderResult* ref_result, const SkRect ref_bounds, const std::string& info, - const DlColor bg) { + const DlColor bg = DlColor::kTransparent()) { uint32_t untouched = bg.premultipliedArgb(); int pixels_touched = 0; int pixels_oob = 0; SkIRect i_bounds = ref_bounds.roundOut(); + EXPECT_EQ(ref_result->width(), kTestWidth) << info; + EXPECT_EQ(ref_result->height(), kTestWidth) << info; for (int y = 0; y < kTestHeight; y++) { const uint32_t* ref_row = ref_result->addr32(0, y); for (int x = 0; x < kTestWidth; x++) { @@ -2175,8 +2538,9 @@ class CanvasCompareTester { } } } - ASSERT_EQ(pixels_oob, 0) << info; - ASSERT_GT(pixels_touched, 0) << info; + EXPECT_EQ(pixels_oob, 0) << info; + EXPECT_GT(pixels_touched, 0) << info; + return pixels_oob == 0 && pixels_touched > 0; } static int countModifiedTransparentPixels(const RenderResult* ref_result, @@ -2202,14 +2566,14 @@ class CanvasCompareTester { info + " reference rendering"); } - static void quickCompareToReference(const RenderResult* ref_result, + static bool quickCompareToReference(const RenderResult* ref_result, const RenderResult* test_result, bool should_match, const std::string& info) { int w = test_result->width(); int h = test_result->height(); - ASSERT_EQ(w, ref_result->width()) << info; - ASSERT_EQ(h, ref_result->height()) << info; + EXPECT_EQ(w, ref_result->width()) << info; + EXPECT_EQ(h, ref_result->height()) << info; int pixels_different = 0; for (int y = 0; y < h; y++) { const uint32_t* ref_row = ref_result->addr32(0, y); @@ -2224,9 +2588,11 @@ class CanvasCompareTester { } } if (should_match) { - ASSERT_EQ(pixels_different, 0) << info; + EXPECT_EQ(pixels_different, 0) << info; + return pixels_different == 0; } else { - ASSERT_NE(pixels_different, 0) << info; + EXPECT_NE(pixels_different, 0) << info; + return pixels_different != 0; } } @@ -2343,31 +2709,6 @@ class CanvasCompareTester { } } - static const sk_sp kTestImage; - static const sk_sp makeTestImage() { - sk_sp surface = SkSurfaces::Raster( - SkImageInfo::MakeN32Premul(kRenderWidth, kRenderHeight)); - SkCanvas* canvas = surface->getCanvas(); - SkPaint p0, p1; - p0.setStyle(SkPaint::kFill_Style); - p0.setColor(SkColorSetARGB(0xff, 0x00, 0xfe, 0x00)); // off-green - p1.setStyle(SkPaint::kFill_Style); - p1.setColor(SK_ColorBLUE); - // Some pixels need some transparency for DstIn testing - p1.setAlpha(128); - int cbdim = 5; - for (int y = 0; y < kRenderHeight; y += cbdim) { - for (int x = 0; x < kRenderWidth; x += cbdim) { - SkPaint& cellp = ((x + y) & 1) == 0 ? p0 : p1; - canvas->drawRect(SkRect::MakeXYWH(x, y, cbdim, cbdim), cellp); - } - } - return surface->makeImageSnapshot(); - } - - static const DlImageColorSource kTestDlImageColorSource; - static const sk_sp kTestSkImageColorSource; - static sk_sp MakeTextBlob(const std::string& string, SkScalar font_height) { SkFont font(SkTypeface::MakeFromName("ahem", SkFontStyle::Normal()), @@ -2377,30 +2718,20 @@ class CanvasCompareTester { } }; -std::vector> - CanvasCompareTester::kTestProviders; +std::vector CanvasCompareTester::kTestBackends; +std::string CanvasCompareTester::kTempDirectory = ""; BoundsTolerance CanvasCompareTester::DefaultTolerance = BoundsTolerance().addAbsolutePadding(1, 1); -const sk_sp CanvasCompareTester::kTestImage = makeTestImage(); -const DlImageColorSource CanvasCompareTester::kTestDlImageColorSource( - DlImage::Make(kTestImage), - DlTileMode::kRepeat, - DlTileMode::kRepeat, - DlImageSampling::kLinear); -const sk_sp CanvasCompareTester::kTestSkImageColorSource = - kTestImage->makeShader(SkTileMode::kRepeat, - SkTileMode::kRepeat, - SkImageSampling::kLinear); - // Eventually this bare bones testing::Test fixture will subsume the // CanvasCompareTester and the TestParameters could then become just // configuration calls made upon the fixture. template -class DisplayListCanvasTestBase : public BaseT, protected DisplayListOpFlags { +class DisplayListRenderingTestBase : public BaseT, + protected DisplayListOpFlags { public: - DisplayListCanvasTestBase() = default; + DisplayListRenderingTestBase() = default; static bool StartsWith(std::string str, std::string prefix) { if (prefix.length() > str.length()) { @@ -2414,17 +2745,6 @@ class DisplayListCanvasTestBase : public BaseT, protected DisplayListOpFlags { return true; } - static void AddProvider(BackendType type, const std::string& name) { - auto provider = DlSurfaceProvider::Create(type); - if (provider == nullptr) { - FML_LOG(ERROR) << "provider " << name << " not supported (ignoring)"; - return; - } - provider->InitializeSurface(kTestWidth, kTestHeight, - PixelFormat::kN32PremulPixelFormat); - CanvasCompareTester::kTestProviders.push_back(std::move(provider)); - } - static void SetUpTestSuite() { bool do_software = true; bool do_opengl = false; @@ -2446,84 +2766,77 @@ class DisplayListCanvasTestBase : public BaseT, protected DisplayListOpFlags { } } if (do_software) { - AddProvider(BackendType::kSoftwareBackend, "Software"); + CanvasCompareTester::AddProvider(BackendType::kSoftwareBackend); } if (do_opengl) { - AddProvider(BackendType::kOpenGlBackend, "OpenGL"); + CanvasCompareTester::AddProvider(BackendType::kOpenGlBackend); } if (do_metal) { - AddProvider(BackendType::kMetalBackend, "Metal"); + CanvasCompareTester::AddProvider(BackendType::kMetalBackend); } std::string providers = ""; - auto begin = CanvasCompareTester::kTestProviders.cbegin(); - auto end = CanvasCompareTester::kTestProviders.cend(); - while (begin != end) { - providers += " " + (*begin++)->backend_name(); + for (auto& back_end : CanvasCompareTester::kTestBackends) { + providers += " " + DlSurfaceProvider::BackendName(back_end); } FML_LOG(INFO) << "Running tests on [" << providers << " ]"; } - static void TearDownTestSuite() { - // Deleting these provider objects allows Metal to clean up its - // resources before the exit handler reports them as leaks. - CanvasCompareTester::kTestProviders.clear(); - } - private: - FML_DISALLOW_COPY_AND_ASSIGN(DisplayListCanvasTestBase); + FML_DISALLOW_COPY_AND_ASSIGN(DisplayListRenderingTestBase); }; -using DisplayListCanvas = DisplayListCanvasTestBase<::testing::Test>; +using DisplayListRendering = DisplayListRenderingTestBase<::testing::Test>; -TEST_F(DisplayListCanvas, DrawPaint) { +TEST_F(DisplayListRendering, DrawPaint) { CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { // - canvas->drawPaint(paint); + [=](const SkRenderContext& ctx) { // + ctx.canvas->drawPaint(ctx.paint); }, - [=](DlCanvas* canvas, const DlPaint& paint) { // - canvas->DrawPaint(paint); + [=](const DlRenderContext& ctx) { // + ctx.canvas->DrawPaint(ctx.paint); }, kDrawPaintFlags)); } -TEST_F(DisplayListCanvas, DrawOpaqueColor) { +TEST_F(DisplayListRendering, DrawOpaqueColor) { // We use a non-opaque color to avoid obliterating any backdrop filter output CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { + [=](const SkRenderContext& ctx) { // DrawColor is not tested against attributes because it is supposed // to ignore them. So, if the paint has an alpha, it is because we // are doing a saveLayer+backdrop test and we need to not flood over // the backdrop output with a solid color. So, we perform an alpha // drawColor for that case only. - SkColor color = SkColorSetA(SK_ColorMAGENTA, paint.getAlpha()); - canvas->drawColor(color); + SkColor color = SkColorSetA(SK_ColorMAGENTA, ctx.paint.getAlpha()); + ctx.canvas->drawColor(color); }, - [=](DlCanvas* canvas, const DlPaint& paint) { + [=](const DlRenderContext& ctx) { // DrawColor is not tested against attributes because it is supposed // to ignore them. So, if the paint has an alpha, it is because we // are doing a saveLayer+backdrop test and we need to not flood over // the backdrop output with a solid color. So, we transfer the alpha // from the paint for that case only. - canvas->DrawColor(DlColor::kMagenta().withAlpha(paint.getAlpha())); + ctx.canvas->DrawColor( + DlColor::kMagenta().withAlpha(ctx.paint.getAlpha())); }, kDrawColorFlags)); } -TEST_F(DisplayListCanvas, DrawAlphaColor) { +TEST_F(DisplayListRendering, DrawAlphaColor) { // We use a non-opaque color to avoid obliterating any backdrop filter output CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { - canvas->drawColor(0x7FFF00FF); + [=](const SkRenderContext& ctx) { + ctx.canvas->drawColor(0x7FFF00FF); }, - [=](DlCanvas* canvas, const DlPaint& paint) { - canvas->DrawColor(DlColor::kMagenta().withAlpha(0x7f)); + [=](const DlRenderContext& ctx) { + ctx.canvas->DrawColor(DlColor(0x7FFF00FF)); }, kDrawColorFlags)); } -TEST_F(DisplayListCanvas, DrawDiagonalLines) { +TEST_F(DisplayListRendering, DrawDiagonalLines) { SkPoint p1 = SkPoint::Make(kRenderLeft, kRenderTop); SkPoint p2 = SkPoint::Make(kRenderRight, kRenderBottom); SkPoint p3 = SkPoint::Make(kRenderLeft, kRenderBottom); @@ -2537,125 +2850,125 @@ TEST_F(DisplayListCanvas, DrawDiagonalLines) { CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { // + [=](const SkRenderContext& ctx) { // // Skia requires kStroke style on horizontal and vertical // lines to get the bounds correct. // See https://bugs.chromium.org/p/skia/issues/detail?id=12446 - SkPaint p = paint; + SkPaint p = ctx.paint; p.setStyle(SkPaint::kStroke_Style); - canvas->drawLine(p1, p2, p); - canvas->drawLine(p3, p4, p); - canvas->drawLine(p5, p6, p); - canvas->drawLine(p7, p8, p); + ctx.canvas->drawLine(p1, p2, p); + ctx.canvas->drawLine(p3, p4, p); + ctx.canvas->drawLine(p5, p6, p); + ctx.canvas->drawLine(p7, p8, p); }, - [=](DlCanvas* canvas, const DlPaint& paint) { // - canvas->DrawLine(p1, p2, paint); - canvas->DrawLine(p3, p4, paint); - canvas->DrawLine(p5, p6, paint); - canvas->DrawLine(p7, p8, paint); + [=](const DlRenderContext& ctx) { // + ctx.canvas->DrawLine(p1, p2, ctx.paint); + ctx.canvas->DrawLine(p3, p4, ctx.paint); + ctx.canvas->DrawLine(p5, p6, ctx.paint); + ctx.canvas->DrawLine(p7, p8, ctx.paint); }, kDrawLineFlags) .set_draw_line()); } -TEST_F(DisplayListCanvas, DrawHorizontalLine) { +TEST_F(DisplayListRendering, DrawHorizontalLine) { SkPoint p1 = SkPoint::Make(kRenderLeft, kRenderCenterY); SkPoint p2 = SkPoint::Make(kRenderRight, kRenderCenterY); CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { // + [=](const SkRenderContext& ctx) { // // Skia requires kStroke style on horizontal and vertical // lines to get the bounds correct. // See https://bugs.chromium.org/p/skia/issues/detail?id=12446 - SkPaint p = paint; + SkPaint p = ctx.paint; p.setStyle(SkPaint::kStroke_Style); - canvas->drawLine(p1, p2, p); + ctx.canvas->drawLine(p1, p2, p); }, - [=](DlCanvas* canvas, const DlPaint& paint) { // - canvas->DrawLine(p1, p2, paint); + [=](const DlRenderContext& ctx) { // + ctx.canvas->DrawLine(p1, p2, ctx.paint); }, kDrawHVLineFlags) .set_draw_line() .set_horizontal_line()); } -TEST_F(DisplayListCanvas, DrawVerticalLine) { +TEST_F(DisplayListRendering, DrawVerticalLine) { SkPoint p1 = SkPoint::Make(kRenderCenterX, kRenderTop); SkPoint p2 = SkPoint::Make(kRenderCenterY, kRenderBottom); CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { // + [=](const SkRenderContext& ctx) { // // Skia requires kStroke style on horizontal and vertical // lines to get the bounds correct. // See https://bugs.chromium.org/p/skia/issues/detail?id=12446 - SkPaint p = paint; + SkPaint p = ctx.paint; p.setStyle(SkPaint::kStroke_Style); - canvas->drawLine(p1, p2, p); + ctx.canvas->drawLine(p1, p2, p); }, - [=](DlCanvas* canvas, const DlPaint& paint) { // - canvas->DrawLine(p1, p2, paint); + [=](const DlRenderContext& ctx) { // + ctx.canvas->DrawLine(p1, p2, ctx.paint); }, kDrawHVLineFlags) .set_draw_line() .set_vertical_line()); } -TEST_F(DisplayListCanvas, DrawRect) { +TEST_F(DisplayListRendering, DrawRect) { // Bounds are offset by 0.5 pixels to induce AA CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { // - canvas->drawRect(kRenderBounds.makeOffset(0.5, 0.5), paint); + [=](const SkRenderContext& ctx) { // + ctx.canvas->drawRect(kRenderBounds.makeOffset(0.5, 0.5), ctx.paint); }, - [=](DlCanvas* canvas, const DlPaint& paint) { // - canvas->DrawRect(kRenderBounds.makeOffset(0.5, 0.5), paint); + [=](const DlRenderContext& ctx) { // + ctx.canvas->DrawRect(kRenderBounds.makeOffset(0.5, 0.5), ctx.paint); }, kDrawRectFlags)); } -TEST_F(DisplayListCanvas, DrawOval) { +TEST_F(DisplayListRendering, DrawOval) { SkRect rect = kRenderBounds.makeInset(0, 10); CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { // - canvas->drawOval(rect, paint); + [=](const SkRenderContext& ctx) { // + ctx.canvas->drawOval(rect, ctx.paint); }, - [=](DlCanvas* canvas, const DlPaint& paint) { // - canvas->DrawOval(rect, paint); + [=](const DlRenderContext& ctx) { // + ctx.canvas->DrawOval(rect, ctx.paint); }, kDrawOvalFlags)); } -TEST_F(DisplayListCanvas, DrawCircle) { +TEST_F(DisplayListRendering, DrawCircle) { CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { // - canvas->drawCircle(kTestCenter, kRenderRadius, paint); + [=](const SkRenderContext& ctx) { // + ctx.canvas->drawCircle(kTestCenter, kRenderRadius, ctx.paint); }, - [=](DlCanvas* canvas, const DlPaint& paint) { // - canvas->DrawCircle(kTestCenter, kRenderRadius, paint); + [=](const DlRenderContext& ctx) { // + ctx.canvas->DrawCircle(kTestCenter, kRenderRadius, ctx.paint); }, kDrawCircleFlags)); } -TEST_F(DisplayListCanvas, DrawRRect) { +TEST_F(DisplayListRendering, DrawRRect) { SkRRect rrect = SkRRect::MakeRectXY(kRenderBounds, kRenderCornerRadius, kRenderCornerRadius); CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { // - canvas->drawRRect(rrect, paint); + [=](const SkRenderContext& ctx) { // + ctx.canvas->drawRRect(rrect, ctx.paint); }, - [=](DlCanvas* canvas, const DlPaint& paint) { // - canvas->DrawRRect(rrect, paint); + [=](const DlRenderContext& ctx) { // + ctx.canvas->DrawRRect(rrect, ctx.paint); }, kDrawRRectFlags)); } -TEST_F(DisplayListCanvas, DrawDRRect) { +TEST_F(DisplayListRendering, DrawDRRect) { SkRRect outer = SkRRect::MakeRectXY(kRenderBounds, kRenderCornerRadius, kRenderCornerRadius); SkRect inner_bounds = kRenderBounds.makeInset(30.0, 30.0); @@ -2663,16 +2976,16 @@ TEST_F(DisplayListCanvas, DrawDRRect) { kRenderCornerRadius); CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { // - canvas->drawDRRect(outer, inner, paint); + [=](const SkRenderContext& ctx) { // + ctx.canvas->drawDRRect(outer, inner, ctx.paint); }, - [=](DlCanvas* canvas, const DlPaint& paint) { // - canvas->DrawDRRect(outer, inner, paint); + [=](const DlRenderContext& ctx) { // + ctx.canvas->DrawDRRect(outer, inner, ctx.paint); }, kDrawDRRectFlags)); } -TEST_F(DisplayListCanvas, DrawPath) { +TEST_F(DisplayListRendering, DrawPath) { SkPath path; // unclosed lines to show some caps @@ -2697,29 +3010,29 @@ TEST_F(DisplayListCanvas, DrawPath) { CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { // - canvas->drawPath(path, paint); + [=](const SkRenderContext& ctx) { // + ctx.canvas->drawPath(path, ctx.paint); }, - [=](DlCanvas* canvas, const DlPaint& paint) { // - canvas->DrawPath(path, paint); + [=](const DlRenderContext& ctx) { // + ctx.canvas->DrawPath(path, ctx.paint); }, kDrawPathFlags) .set_draw_path()); } -TEST_F(DisplayListCanvas, DrawArc) { +TEST_F(DisplayListRendering, DrawArc) { CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { // - canvas->drawArc(kRenderBounds, 60, 330, false, paint); + [=](const SkRenderContext& ctx) { // + ctx.canvas->drawArc(kRenderBounds, 60, 330, false, ctx.paint); }, - [=](DlCanvas* canvas, const DlPaint& paint) { // - canvas->DrawArc(kRenderBounds, 60, 330, false, paint); + [=](const DlRenderContext& ctx) { // + ctx.canvas->DrawArc(kRenderBounds, 60, 330, false, ctx.paint); }, kDrawArcNoCenterFlags)); } -TEST_F(DisplayListCanvas, DrawArcCenter) { +TEST_F(DisplayListRendering, DrawArcCenter) { // Center arcs that inscribe nearly a whole circle except for a small // arc extent gap have 2 angles that may appear or disappear at the // various miter limits tested (0, 4, and 10). @@ -2732,17 +3045,17 @@ TEST_F(DisplayListCanvas, DrawArcCenter) { // Limit == 10, edge and center corners all miter CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { // - canvas->drawArc(kRenderBounds, 60, 360 - 12, true, paint); + [=](const SkRenderContext& ctx) { // + ctx.canvas->drawArc(kRenderBounds, 60, 360 - 12, true, ctx.paint); }, - [=](DlCanvas* canvas, const DlPaint& paint) { // - canvas->DrawArc(kRenderBounds, 60, 360 - 12, true, paint); + [=](const DlRenderContext& ctx) { // + ctx.canvas->DrawArc(kRenderBounds, 60, 360 - 12, true, ctx.paint); }, kDrawArcWithCenterFlags) .set_draw_arc_center()); } -TEST_F(DisplayListCanvas, DrawPointsAsPoints) { +TEST_F(DisplayListRendering, DrawPointsAsPoints) { // The +/- 16 points are designed to fall just inside the clips // that are tested against so we avoid lots of undrawn pixels // in the accumulated bounds. @@ -2777,23 +3090,25 @@ TEST_F(DisplayListCanvas, DrawPointsAsPoints) { CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { // + [=](const SkRenderContext& ctx) { // Skia requires kStroke style on horizontal and vertical // lines to get the bounds correct. // See https://bugs.chromium.org/p/skia/issues/detail?id=12446 - SkPaint p = paint; + SkPaint p = ctx.paint; p.setStyle(SkPaint::kStroke_Style); - canvas->drawPoints(SkCanvas::kPoints_PointMode, count, points, p); + auto mode = SkCanvas::kPoints_PointMode; + ctx.canvas->drawPoints(mode, count, points, p); }, - [=](DlCanvas* canvas, const DlPaint& paint) { // - canvas->DrawPoints(PointMode::kPoints, count, points, paint); + [=](const DlRenderContext& ctx) { + auto mode = PointMode::kPoints; + ctx.canvas->DrawPoints(mode, count, points, ctx.paint); }, kDrawPointsAsPointsFlags) .set_draw_line() .set_ignores_dashes()); } -TEST_F(DisplayListCanvas, DrawPointsAsLines) { +TEST_F(DisplayListRendering, DrawPointsAsLines) { const SkScalar x0 = kRenderLeft + 1; const SkScalar x1 = kRenderLeft + 16; const SkScalar x2 = kRenderRight - 16; @@ -2827,21 +3142,23 @@ TEST_F(DisplayListCanvas, DrawPointsAsLines) { ASSERT_TRUE((count & 1) == 0); CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { // + [=](const SkRenderContext& ctx) { // Skia requires kStroke style on horizontal and vertical // lines to get the bounds correct. // See https://bugs.chromium.org/p/skia/issues/detail?id=12446 - SkPaint p = paint; + SkPaint p = ctx.paint; p.setStyle(SkPaint::kStroke_Style); - canvas->drawPoints(SkCanvas::kLines_PointMode, count, points, p); + auto mode = SkCanvas::kLines_PointMode; + ctx.canvas->drawPoints(mode, count, points, p); }, - [=](DlCanvas* canvas, const DlPaint& paint) { // - canvas->DrawPoints(PointMode::kLines, count, points, paint); + [=](const DlRenderContext& ctx) { + auto mode = PointMode::kLines; + ctx.canvas->DrawPoints(mode, count, points, ctx.paint); }, kDrawPointsAsLinesFlags)); } -TEST_F(DisplayListCanvas, DrawPointsAsPolygon) { +TEST_F(DisplayListRendering, DrawPointsAsPolygon) { const SkPoint points1[] = { // RenderBounds box with a diamond SkPoint::Make(kRenderLeft, kRenderTop), @@ -2858,22 +3175,23 @@ TEST_F(DisplayListCanvas, DrawPointsAsPolygon) { CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { // + [=](const SkRenderContext& ctx) { // Skia requires kStroke style on horizontal and vertical // lines to get the bounds correct. // See https://bugs.chromium.org/p/skia/issues/detail?id=12446 - SkPaint p = paint; + SkPaint p = ctx.paint; p.setStyle(SkPaint::kStroke_Style); - canvas->drawPoints(SkCanvas::kPolygon_PointMode, count1, points1, - p); + auto mode = SkCanvas::kPolygon_PointMode; + ctx.canvas->drawPoints(mode, count1, points1, p); }, - [=](DlCanvas* canvas, const DlPaint& paint) { // - canvas->DrawPoints(PointMode::kPolygon, count1, points1, paint); + [=](const DlRenderContext& ctx) { + auto mode = PointMode::kPolygon; + ctx.canvas->DrawPoints(mode, count1, points1, ctx.paint); }, kDrawPointsAsPolygonFlags)); } -TEST_F(DisplayListCanvas, DrawVerticesWithColors) { +TEST_F(DisplayListRendering, DrawVerticesWithColors) { // Cover as many sides of the box with only 6 vertices: // +----------+ // |xxxxxxxxxx| @@ -2909,16 +3227,18 @@ TEST_F(DisplayListCanvas, DrawVerticesWithColors) { CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { // - canvas->drawVertices(sk_vertices, SkBlendMode::kSrcOver, paint); + [=](const SkRenderContext& ctx) { + ctx.canvas->drawVertices(sk_vertices, SkBlendMode::kSrcOver, + ctx.paint); }, - [=](DlCanvas* canvas, const DlPaint& paint) { // - canvas->DrawVertices(dl_vertices, DlBlendMode::kSrcOver, paint); + [=](const DlRenderContext& ctx) { + ctx.canvas->DrawVertices(dl_vertices, DlBlendMode::kSrcOver, + ctx.paint); }, kDrawVerticesFlags)); } -TEST_F(DisplayListCanvas, DrawVerticesWithImage) { +TEST_F(DisplayListRendering, DrawVerticesWithImage) { // Cover as many sides of the box with only 6 vertices: // +----------+ // |xxxxxxxxxx| @@ -2953,181 +3273,175 @@ TEST_F(DisplayListCanvas, DrawVerticesWithImage) { CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { // - SkPaint v_paint = paint; + [=](const SkRenderContext& ctx) { // + SkPaint v_paint = ctx.paint; if (v_paint.getShader() == nullptr) { - v_paint.setShader(CanvasCompareTester::kTestSkImageColorSource); + v_paint.setShader(MakeColorSource(ctx.image)); } - canvas->drawVertices(sk_vertices, SkBlendMode::kSrcOver, v_paint); + ctx.canvas->drawVertices(sk_vertices, SkBlendMode::kSrcOver, + v_paint); }, - [=](DlCanvas* canvas, const DlPaint& paint) { // - DlPaint v_paint = paint; + [=](const DlRenderContext& ctx) { // + DlPaint v_paint = ctx.paint; if (v_paint.getColorSource() == nullptr) { - v_paint.setColorSource( - &CanvasCompareTester::kTestDlImageColorSource); + v_paint.setColorSource(MakeColorSource(ctx.image)); } - canvas->DrawVertices(dl_vertices, DlBlendMode::kSrcOver, v_paint); + ctx.canvas->DrawVertices(dl_vertices, DlBlendMode::kSrcOver, + v_paint); }, kDrawVerticesFlags)); } -TEST_F(DisplayListCanvas, DrawImageNearest) { +TEST_F(DisplayListRendering, DrawImageNearest) { CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { // - canvas->drawImage(CanvasCompareTester::kTestImage, // - kRenderLeft, kRenderTop, - SkImageSampling::kNearestNeighbor, &paint); + [=](const SkRenderContext& ctx) { + ctx.canvas->drawImage(ctx.image, kRenderLeft, kRenderTop, + SkImageSampling::kNearestNeighbor, + &ctx.paint); }, - [=](DlCanvas* canvas, const DlPaint& paint) { - canvas->DrawImage(DlImage::Make(CanvasCompareTester::kTestImage), - SkPoint::Make(kRenderLeft, kRenderTop), - DlImageSampling::kNearestNeighbor, &paint); + [=](const DlRenderContext& ctx) { + ctx.canvas->DrawImage(ctx.image, // + SkPoint::Make(kRenderLeft, kRenderTop), + DlImageSampling::kNearestNeighbor, + &ctx.paint); }, kDrawImageWithPaintFlags)); } -TEST_F(DisplayListCanvas, DrawImageNearestNoPaint) { +TEST_F(DisplayListRendering, DrawImageNearestNoPaint) { CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { // - canvas->drawImage(CanvasCompareTester::kTestImage, // - kRenderLeft, kRenderTop, - SkImageSampling::kNearestNeighbor, nullptr); + [=](const SkRenderContext& ctx) { + ctx.canvas->drawImage(ctx.image, kRenderLeft, kRenderTop, + SkImageSampling::kNearestNeighbor, nullptr); }, - [=](DlCanvas* canvas, const DlPaint& paint) { - canvas->DrawImage(DlImage::Make(CanvasCompareTester::kTestImage), - SkPoint::Make(kRenderLeft, kRenderTop), - DlImageSampling::kNearestNeighbor, nullptr); + [=](const DlRenderContext& ctx) { + ctx.canvas->DrawImage(ctx.image, + SkPoint::Make(kRenderLeft, kRenderTop), + DlImageSampling::kNearestNeighbor, nullptr); }, kDrawImageFlags)); } -TEST_F(DisplayListCanvas, DrawImageLinear) { +TEST_F(DisplayListRendering, DrawImageLinear) { CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { // - canvas->drawImage(CanvasCompareTester::kTestImage, // - kRenderLeft, kRenderTop, SkImageSampling::kLinear, - &paint); + [=](const SkRenderContext& ctx) { + ctx.canvas->drawImage(ctx.image, kRenderLeft, kRenderTop, + SkImageSampling::kLinear, &ctx.paint); }, - [=](DlCanvas* canvas, const DlPaint& paint) { - canvas->DrawImage(DlImage::Make(CanvasCompareTester::kTestImage), - SkPoint::Make(kRenderLeft, kRenderTop), - DlImageSampling::kLinear, &paint); + [=](const DlRenderContext& ctx) { + ctx.canvas->DrawImage(ctx.image, + SkPoint::Make(kRenderLeft, kRenderTop), + DlImageSampling::kLinear, &ctx.paint); }, kDrawImageWithPaintFlags)); } -TEST_F(DisplayListCanvas, DrawImageRectNearest) { +TEST_F(DisplayListRendering, DrawImageRectNearest) { SkRect src = SkRect::MakeIWH(kRenderWidth, kRenderHeight).makeInset(5, 5); SkRect dst = kRenderBounds.makeInset(10.5, 10.5); CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { // - canvas->drawImageRect(CanvasCompareTester::kTestImage, src, dst, - SkImageSampling::kNearestNeighbor, &paint, - SkCanvas::kFast_SrcRectConstraint); + [=](const SkRenderContext& ctx) { + ctx.canvas->drawImageRect( + ctx.image, src, dst, SkImageSampling::kNearestNeighbor, + &ctx.paint, SkCanvas::kFast_SrcRectConstraint); }, - [=](DlCanvas* canvas, const DlPaint& paint) { // - canvas->DrawImageRect( - DlImage::Make(CanvasCompareTester::kTestImage), src, dst, - DlImageSampling::kNearestNeighbor, &paint, - DlCanvas::SrcRectConstraint::kFast); + [=](const DlRenderContext& ctx) { + ctx.canvas->DrawImageRect( + ctx.image, src, dst, DlImageSampling::kNearestNeighbor, + &ctx.paint, DlCanvas::SrcRectConstraint::kFast); }, kDrawImageRectWithPaintFlags)); } -TEST_F(DisplayListCanvas, DrawImageRectNearestNoPaint) { +TEST_F(DisplayListRendering, DrawImageRectNearestNoPaint) { SkRect src = SkRect::MakeIWH(kRenderWidth, kRenderHeight).makeInset(5, 5); SkRect dst = kRenderBounds.makeInset(10.5, 10.5); CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { // - canvas->drawImageRect(CanvasCompareTester::kTestImage, src, dst, - SkImageSampling::kNearestNeighbor, nullptr, - SkCanvas::kFast_SrcRectConstraint); + [=](const SkRenderContext& ctx) { + ctx.canvas->drawImageRect( + ctx.image, src, dst, SkImageSampling::kNearestNeighbor, // + nullptr, SkCanvas::kFast_SrcRectConstraint); }, - [=](DlCanvas* canvas, const DlPaint& paint) { // - canvas->DrawImageRect( - DlImage::Make(CanvasCompareTester::kTestImage), src, dst, - DlImageSampling::kNearestNeighbor, nullptr, - DlCanvas::SrcRectConstraint::kFast); + [=](const DlRenderContext& ctx) { + ctx.canvas->DrawImageRect( + ctx.image, src, dst, DlImageSampling::kNearestNeighbor, // + nullptr, DlCanvas::SrcRectConstraint::kFast); }, kDrawImageRectFlags)); } -TEST_F(DisplayListCanvas, DrawImageRectLinear) { +TEST_F(DisplayListRendering, DrawImageRectLinear) { SkRect src = SkRect::MakeIWH(kRenderWidth, kRenderHeight).makeInset(5, 5); SkRect dst = kRenderBounds.makeInset(10.5, 10.5); CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { // - canvas->drawImageRect(CanvasCompareTester::kTestImage, src, dst, - SkImageSampling::kLinear, &paint, - SkCanvas::kFast_SrcRectConstraint); + [=](const SkRenderContext& ctx) { + ctx.canvas->drawImageRect( + ctx.image, src, dst, SkImageSampling::kLinear, // + &ctx.paint, SkCanvas::kFast_SrcRectConstraint); }, - [=](DlCanvas* canvas, const DlPaint& paint) { // - canvas->DrawImageRect( - DlImage::Make(CanvasCompareTester::kTestImage), src, dst, - DlImageSampling::kLinear, &paint, - DlCanvas::SrcRectConstraint::kFast); + [=](const DlRenderContext& ctx) { // + ctx.canvas->DrawImageRect( + ctx.image, src, dst, DlImageSampling::kLinear, // + &ctx.paint, DlCanvas::SrcRectConstraint::kFast); }, kDrawImageRectWithPaintFlags)); } -TEST_F(DisplayListCanvas, DrawImageNineNearest) { +TEST_F(DisplayListRendering, DrawImageNineNearest) { SkIRect src = SkIRect::MakeWH(kRenderWidth, kRenderHeight).makeInset(25, 25); SkRect dst = kRenderBounds.makeInset(10.5, 10.5); - sk_sp image = CanvasCompareTester::kTestImage; CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { - canvas->drawImageNine(image.get(), src, dst, SkFilterMode::kNearest, - &paint); + [=](const SkRenderContext& ctx) { + ctx.canvas->drawImageNine(ctx.image.get(), src, dst, + SkFilterMode::kNearest, &ctx.paint); }, - [=](DlCanvas* canvas, const DlPaint& paint) { - canvas->DrawImageNine(DlImage::Make(image), src, dst, - DlFilterMode::kNearest, &paint); + [=](const DlRenderContext& ctx) { + ctx.canvas->DrawImageNine(ctx.image, src, dst, + DlFilterMode::kNearest, &ctx.paint); }, kDrawImageNineWithPaintFlags)); } -TEST_F(DisplayListCanvas, DrawImageNineNearestNoPaint) { +TEST_F(DisplayListRendering, DrawImageNineNearestNoPaint) { SkIRect src = SkIRect::MakeWH(kRenderWidth, kRenderHeight).makeInset(25, 25); SkRect dst = kRenderBounds.makeInset(10.5, 10.5); - sk_sp image = CanvasCompareTester::kTestImage; CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { - canvas->drawImageNine(image.get(), src, dst, SkFilterMode::kNearest, - nullptr); + [=](const SkRenderContext& ctx) { + ctx.canvas->drawImageNine(ctx.image.get(), src, dst, + SkFilterMode::kNearest, nullptr); }, - [=](DlCanvas* canvas, const DlPaint& paint) { - canvas->DrawImageNine(DlImage::Make(image), src, dst, - DlFilterMode::kNearest, nullptr); + [=](const DlRenderContext& ctx) { + ctx.canvas->DrawImageNine(ctx.image, src, dst, + DlFilterMode::kNearest, nullptr); }, kDrawImageNineFlags)); } -TEST_F(DisplayListCanvas, DrawImageNineLinear) { +TEST_F(DisplayListRendering, DrawImageNineLinear) { SkIRect src = SkIRect::MakeWH(kRenderWidth, kRenderHeight).makeInset(25, 25); SkRect dst = kRenderBounds.makeInset(10.5, 10.5); - sk_sp image = CanvasCompareTester::kTestImage; CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { - canvas->drawImageNine(image.get(), src, dst, SkFilterMode::kLinear, - &paint); + [=](const SkRenderContext& ctx) { + ctx.canvas->drawImageNine(ctx.image.get(), src, dst, + SkFilterMode::kLinear, &ctx.paint); }, - [=](DlCanvas* canvas, const DlPaint& paint) { - canvas->DrawImageNine(DlImage::Make(image), src, dst, - DlFilterMode::kLinear, &paint); + [=](const DlRenderContext& ctx) { + ctx.canvas->DrawImageNine(ctx.image, src, dst, + DlFilterMode::kLinear, &ctx.paint); }, kDrawImageNineWithPaintFlags)); } -TEST_F(DisplayListCanvas, DrawAtlasNearest) { +TEST_F(DisplayListRendering, DrawAtlasNearest) { const SkRSXform xform[] = { // clang-format off { 1.2f, 0.0f, kRenderLeft, kRenderTop}, @@ -3156,25 +3470,24 @@ TEST_F(DisplayListCanvas, DrawAtlasNearest) { DlColor::kYellow(), DlColor::kMagenta(), }; - const sk_sp image = CanvasCompareTester::kTestImage; const DlImageSampling dl_sampling = DlImageSampling::kNearestNeighbor; const SkSamplingOptions sk_sampling = SkImageSampling::kNearestNeighbor; CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { - canvas->drawAtlas(image.get(), xform, tex, sk_colors, 4, - SkBlendMode::kSrcOver, sk_sampling, nullptr, - &paint); + [=](const SkRenderContext& ctx) { + ctx.canvas->drawAtlas(ctx.image.get(), xform, tex, sk_colors, 4, + SkBlendMode::kSrcOver, sk_sampling, nullptr, + &ctx.paint); }, - [=](DlCanvas* canvas, const DlPaint& paint) { - canvas->DrawAtlas(DlImage::Make(image), xform, tex, dl_colors, 4, - DlBlendMode::kSrcOver, dl_sampling, nullptr, - &paint); + [=](const DlRenderContext& ctx) { + ctx.canvas->DrawAtlas(ctx.image, xform, tex, dl_colors, 4, + DlBlendMode::kSrcOver, dl_sampling, nullptr, + &ctx.paint); }, kDrawAtlasWithPaintFlags)); } -TEST_F(DisplayListCanvas, DrawAtlasNearestNoPaint) { +TEST_F(DisplayListRendering, DrawAtlasNearestNoPaint) { const SkRSXform xform[] = { // clang-format off { 1.2f, 0.0f, kRenderLeft, kRenderTop}, @@ -3203,25 +3516,24 @@ TEST_F(DisplayListCanvas, DrawAtlasNearestNoPaint) { DlColor::kYellow(), DlColor::kMagenta(), }; - const sk_sp image = CanvasCompareTester::kTestImage; const DlImageSampling dl_sampling = DlImageSampling::kNearestNeighbor; const SkSamplingOptions sk_sampling = SkImageSampling::kNearestNeighbor; CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { - canvas->drawAtlas(image.get(), xform, tex, sk_colors, 4, - SkBlendMode::kSrcOver, sk_sampling, // - nullptr, nullptr); + [=](const SkRenderContext& ctx) { + ctx.canvas->drawAtlas(ctx.image.get(), xform, tex, sk_colors, 4, + SkBlendMode::kSrcOver, sk_sampling, // + nullptr, nullptr); }, - [=](DlCanvas* canvas, const DlPaint& paint) { - canvas->DrawAtlas(DlImage::Make(image), xform, tex, dl_colors, 4, - DlBlendMode::kSrcOver, dl_sampling, nullptr, - nullptr); + [=](const DlRenderContext& ctx) { + ctx.canvas->DrawAtlas(ctx.image, xform, tex, dl_colors, 4, + DlBlendMode::kSrcOver, dl_sampling, // + nullptr, nullptr); }, kDrawAtlasFlags)); } -TEST_F(DisplayListCanvas, DrawAtlasLinear) { +TEST_F(DisplayListRendering, DrawAtlasLinear) { const SkRSXform xform[] = { // clang-format off { 1.2f, 0.0f, kRenderLeft, kRenderTop}, @@ -3250,20 +3562,19 @@ TEST_F(DisplayListCanvas, DrawAtlasLinear) { DlColor::kYellow(), DlColor::kMagenta(), }; - const sk_sp image = CanvasCompareTester::kTestImage; const DlImageSampling dl_sampling = DlImageSampling::kLinear; const SkSamplingOptions sk_sampling = SkImageSampling::kLinear; CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { - canvas->drawAtlas(image.get(), xform, tex, sk_colors, 2, // - SkBlendMode::kSrcOver, sk_sampling, nullptr, - &paint); + [=](const SkRenderContext& ctx) { + ctx.canvas->drawAtlas(ctx.image.get(), xform, tex, sk_colors, 2, + SkBlendMode::kSrcOver, sk_sampling, // + nullptr, &ctx.paint); }, - [=](DlCanvas* canvas, const DlPaint& paint) { - canvas->DrawAtlas(DlImage::Make(image), xform, tex, dl_colors, 2, - DlBlendMode::kSrcOver, dl_sampling, nullptr, - &paint); + [=](const DlRenderContext& ctx) { + ctx.canvas->DrawAtlas(ctx.image, xform, tex, dl_colors, 2, + DlBlendMode::kSrcOver, dl_sampling, // + nullptr, &ctx.paint); }, kDrawAtlasWithPaintFlags)); } @@ -3287,21 +3598,21 @@ sk_sp makeTestDisplayList() { return builder.Build(); } -TEST_F(DisplayListCanvas, DrawDisplayList) { +TEST_F(DisplayListRendering, DrawDisplayList) { sk_sp display_list = makeTestDisplayList(); CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { // - DlSkCanvasAdapter(canvas).DrawDisplayList(display_list); + [=](const SkRenderContext& ctx) { // + DlSkCanvasAdapter(ctx.canvas).DrawDisplayList(display_list); }, - [=](DlCanvas* canvas, const DlPaint& paint) { // - canvas->DrawDisplayList(display_list); + [=](const DlRenderContext& ctx) { // + ctx.canvas->DrawDisplayList(display_list); }, kDrawDisplayListFlags) .set_draw_display_list()); } -TEST_F(DisplayListCanvas, DrawTextBlob) { +TEST_F(DisplayListRendering, DrawTextBlob) { // TODO(https://github.com/flutter/flutter/issues/82202): Remove once the // performance overlay can use Fuchsia's font manager instead of the empty // default. @@ -3314,15 +3625,17 @@ TEST_F(DisplayListCanvas, DrawTextBlob) { SkScalar render_y_2_3 = kRenderTop + kRenderHeight * 0.6; CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { // - canvas->drawTextBlob(blob, kRenderLeft, render_y_1_3, paint); - canvas->drawTextBlob(blob, kRenderLeft, render_y_2_3, paint); - canvas->drawTextBlob(blob, kRenderLeft, kRenderBottom, paint); + [=](const SkRenderContext& ctx) { + auto paint = ctx.paint; + ctx.canvas->drawTextBlob(blob, kRenderLeft, render_y_1_3, paint); + ctx.canvas->drawTextBlob(blob, kRenderLeft, render_y_2_3, paint); + ctx.canvas->drawTextBlob(blob, kRenderLeft, kRenderBottom, paint); }, - [=](DlCanvas* canvas, const DlPaint& paint) { // - canvas->DrawTextBlob(blob, kRenderLeft, render_y_1_3, paint); - canvas->DrawTextBlob(blob, kRenderLeft, render_y_2_3, paint); - canvas->DrawTextBlob(blob, kRenderLeft, kRenderBottom, paint); + [=](const DlRenderContext& ctx) { + auto paint = ctx.paint; + ctx.canvas->DrawTextBlob(blob, kRenderLeft, render_y_1_3, paint); + ctx.canvas->DrawTextBlob(blob, kRenderLeft, render_y_2_3, paint); + ctx.canvas->DrawTextBlob(blob, kRenderLeft, kRenderBottom, paint); }, kDrawTextBlobFlags) .set_draw_text_blob(), @@ -3335,7 +3648,7 @@ TEST_F(DisplayListCanvas, DrawTextBlob) { #endif // OS_FUCHSIA } -TEST_F(DisplayListCanvas, DrawShadow) { +TEST_F(DisplayListRendering, DrawShadow) { SkPath path; path.addRoundRect( { @@ -3350,18 +3663,18 @@ TEST_F(DisplayListCanvas, DrawShadow) { CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { // - DlSkCanvasDispatcher::DrawShadow(canvas, path, color, elevation, + [=](const SkRenderContext& ctx) { // + DlSkCanvasDispatcher::DrawShadow(ctx.canvas, path, color, elevation, false, 1.0); }, - [=](DlCanvas* canvas, const DlPaint& paint) { // - canvas->DrawShadow(path, color, elevation, false, 1.0); + [=](const DlRenderContext& ctx) { // + ctx.canvas->DrawShadow(path, color, elevation, false, 1.0); }, kDrawShadowFlags), CanvasCompareTester::DefaultTolerance.addBoundsPadding(3, 3)); } -TEST_F(DisplayListCanvas, DrawShadowTransparentOccluder) { +TEST_F(DisplayListRendering, DrawShadowTransparentOccluder) { SkPath path; path.addRoundRect( { @@ -3376,18 +3689,18 @@ TEST_F(DisplayListCanvas, DrawShadowTransparentOccluder) { CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { // - DlSkCanvasDispatcher::DrawShadow(canvas, path, color, elevation, + [=](const SkRenderContext& ctx) { // + DlSkCanvasDispatcher::DrawShadow(ctx.canvas, path, color, elevation, true, 1.0); }, - [=](DlCanvas* canvas, const DlPaint& paint) { // - canvas->DrawShadow(path, color, elevation, true, 1.0); + [=](const DlRenderContext& ctx) { // + ctx.canvas->DrawShadow(path, color, elevation, true, 1.0); }, kDrawShadowFlags), CanvasCompareTester::DefaultTolerance.addBoundsPadding(3, 3)); } -TEST_F(DisplayListCanvas, DrawShadowDpr) { +TEST_F(DisplayListRendering, DrawShadowDpr) { SkPath path; path.addRoundRect( { @@ -3402,18 +3715,18 @@ TEST_F(DisplayListCanvas, DrawShadowDpr) { CanvasCompareTester::RenderAll( // TestParameters( - [=](SkCanvas* canvas, const SkPaint& paint) { // - DlSkCanvasDispatcher::DrawShadow(canvas, path, color, elevation, + [=](const SkRenderContext& ctx) { // + DlSkCanvasDispatcher::DrawShadow(ctx.canvas, path, color, elevation, false, 1.5); }, - [=](DlCanvas* canvas, const DlPaint& paint) { // - canvas->DrawShadow(path, color, elevation, false, 1.5); + [=](const DlRenderContext& ctx) { // + ctx.canvas->DrawShadow(path, color, elevation, false, 1.5); }, kDrawShadowFlags), CanvasCompareTester::DefaultTolerance.addBoundsPadding(3, 3)); } -TEST_F(DisplayListCanvas, SaveLayerClippedContentStillFilters) { +TEST_F(DisplayListRendering, SaveLayerClippedContentStillFilters) { // draw rect is just outside of render bounds on the right const SkRect draw_rect = SkRect::MakeLTRB( // kRenderRight + 1, // @@ -3422,35 +3735,36 @@ TEST_F(DisplayListCanvas, SaveLayerClippedContentStillFilters) { kRenderBottom // ); TestParameters test_params( - [=](SkCanvas* canvas, const SkPaint& paint) { + [=](const SkRenderContext& ctx) { auto layer_filter = SkImageFilters::Blur(10.0f, 10.0f, SkTileMode::kDecal, nullptr); SkPaint layer_paint; layer_paint.setImageFilter(layer_filter); - canvas->save(); - canvas->clipRect(kRenderBounds, SkClipOp::kIntersect, false); - canvas->saveLayer(&kTestBounds, &layer_paint); - canvas->drawRect(draw_rect, paint); - canvas->restore(); - canvas->restore(); + ctx.canvas->save(); + ctx.canvas->clipRect(kRenderBounds, SkClipOp::kIntersect, false); + ctx.canvas->saveLayer(&kTestBounds, &layer_paint); + ctx.canvas->drawRect(draw_rect, ctx.paint); + ctx.canvas->restore(); + ctx.canvas->restore(); }, - [=](DlCanvas* canvas, const DlPaint& paint) { + [=](const DlRenderContext& ctx) { auto layer_filter = DlBlurImageFilter::Make(10.0f, 10.0f, DlTileMode::kDecal); DlPaint layer_paint; layer_paint.setImageFilter(layer_filter); - canvas->Save(); - canvas->ClipRect(kRenderBounds, ClipOp::kIntersect, false); - canvas->SaveLayer(&kTestBounds, &layer_paint); - canvas->DrawRect(draw_rect, paint); - canvas->Restore(); - canvas->Restore(); + ctx.canvas->Save(); + ctx.canvas->ClipRect(kRenderBounds, ClipOp::kIntersect, false); + ctx.canvas->SaveLayer(&kTestBounds, &layer_paint); + ctx.canvas->DrawRect(draw_rect, ctx.paint); + ctx.canvas->Restore(); + ctx.canvas->Restore(); }, kSaveLayerWithPaintFlags); CaseParameters case_params("Filtered SaveLayer with clipped content"); BoundsTolerance tolerance = BoundsTolerance().addAbsolutePadding(6.0f, 6.0f); - for (auto& provider : CanvasCompareTester::kTestProviders) { + for (auto& back_end : CanvasCompareTester::kTestBackends) { + auto provider = CanvasCompareTester::GetProvider(back_end); RenderEnvironment env = RenderEnvironment::MakeN32(provider.get()); env.init_ref(test_params.sk_renderer(), test_params.dl_renderer()); CanvasCompareTester::quickCompareToReference(env, "default"); @@ -3458,7 +3772,7 @@ TEST_F(DisplayListCanvas, SaveLayerClippedContentStillFilters) { } } -TEST_F(DisplayListCanvas, SaveLayerConsolidation) { +TEST_F(DisplayListRendering, SaveLayerConsolidation) { float commutable_color_matrix[]{ // clang-format off 0, 1, 0, 0, 0, @@ -3498,12 +3812,6 @@ TEST_F(DisplayListCanvas, SaveLayerConsolidation) { std::make_shared(contract_matrix, DlImageSampling::kLinear), }; - std::vector> environments; - for (auto& provider : CanvasCompareTester::kTestProviders) { - auto env = std::make_unique( - provider.get(), PixelFormat::kN32PremulPixelFormat); - environments.push_back(std::move(env)); - } auto render_content = [](DisplayListBuilder& builder) { builder.DrawRect( @@ -3563,12 +3871,15 @@ TEST_F(DisplayListCanvas, SaveLayerConsolidation) { } }; - auto test_attributes = [test_attributes_env, &environments]( - DlPaint& paint1, DlPaint& paint2, - const DlPaint& paint_both, bool same, - bool rev_same, const std::string& desc1, - const std::string& desc2) { - for (auto& env : environments) { + auto test_attributes = [test_attributes_env](DlPaint& paint1, DlPaint& paint2, + const DlPaint& paint_both, + bool same, bool rev_same, + const std::string& desc1, + const std::string& desc2) { + for (auto& back_end : CanvasCompareTester::kTestBackends) { + auto provider = CanvasCompareTester::GetProvider(back_end); + auto env = std::make_unique( + provider.get(), PixelFormat::kN32PremulPixelFormat); test_attributes_env(paint1, paint2, paint_both, // same, rev_same, desc1, desc2, env.get()); } @@ -3641,15 +3952,8 @@ TEST_F(DisplayListCanvas, SaveLayerConsolidation) { } } -TEST_F(DisplayListCanvas, MatrixColorFilterModifyTransparencyCheck) { - std::vector> environments; - for (auto& provider : CanvasCompareTester::kTestProviders) { - auto env = std::make_unique( - provider.get(), PixelFormat::kN32PremulPixelFormat); - environments.push_back(std::move(env)); - } - - auto test_matrix = [&environments](int element, SkScalar value) { +TEST_F(DisplayListRendering, MatrixColorFilterModifyTransparencyCheck) { + auto test_matrix = [](int element, SkScalar value) { // clang-format off float matrix[] = { 1, 0, 0, 0, 0, @@ -3685,7 +3989,10 @@ TEST_F(DisplayListCanvas, MatrixColorFilterModifyTransparencyCheck) { builder2.Restore(); auto display_list2 = builder2.Build(); - for (auto& env : environments) { + for (auto& back_end : CanvasCompareTester::kTestBackends) { + auto provider = CanvasCompareTester::GetProvider(back_end); + auto env = std::make_unique( + provider.get(), PixelFormat::kN32PremulPixelFormat); auto results1 = env->getResult(display_list1); auto results2 = env->getResult(display_list2); CanvasCompareTester::quickCompareToReference( @@ -3715,15 +4022,8 @@ TEST_F(DisplayListCanvas, MatrixColorFilterModifyTransparencyCheck) { } } -TEST_F(DisplayListCanvas, MatrixColorFilterOpacityCommuteCheck) { - std::vector> environments; - for (auto& provider : CanvasCompareTester::kTestProviders) { - auto env = std::make_unique( - provider.get(), PixelFormat::kN32PremulPixelFormat); - environments.push_back(std::move(env)); - } - - auto test_matrix = [&environments](int element, SkScalar value) { +TEST_F(DisplayListRendering, MatrixColorFilterOpacityCommuteCheck) { + auto test_matrix = [](int element, SkScalar value) { // clang-format off float matrix[] = { 1, 0, 0, 0, 0, @@ -3760,7 +4060,10 @@ TEST_F(DisplayListCanvas, MatrixColorFilterOpacityCommuteCheck) { builder2.Restore(); auto display_list2 = builder2.Build(); - for (auto& env : environments) { + for (auto& back_end : CanvasCompareTester::kTestBackends) { + auto provider = CanvasCompareTester::GetProvider(back_end); + auto env = std::make_unique( + provider.get(), PixelFormat::kN32PremulPixelFormat); auto results1 = env->getResult(display_list1); auto results2 = env->getResult(display_list2); if (!filter || filter->can_commute_with_opacity()) { @@ -3832,15 +4135,8 @@ static std::string BlendModeToString(DlBlendMode mode) { } } -TEST_F(DisplayListCanvas, BlendColorFilterModifyTransparencyCheck) { - std::vector> environments; - for (auto& provider : CanvasCompareTester::kTestProviders) { - auto env = std::make_unique( - provider.get(), PixelFormat::kN32PremulPixelFormat); - environments.push_back(std::move(env)); - } - - auto test_mode_color = [&environments](DlBlendMode mode, DlColor color) { +TEST_F(DisplayListRendering, BlendColorFilterModifyTransparencyCheck) { + auto test_mode_color = [](DlBlendMode mode, DlColor color) { std::stringstream desc_str; std::string mode_string = BlendModeToString(mode); desc_str << "blend[" << mode_string << ", " << color << "]"; @@ -3869,7 +4165,10 @@ TEST_F(DisplayListCanvas, BlendColorFilterModifyTransparencyCheck) { builder2.Restore(); auto display_list2 = builder2.Build(); - for (auto& env : environments) { + for (auto& back_end : CanvasCompareTester::kTestBackends) { + auto provider = CanvasCompareTester::GetProvider(back_end); + auto env = std::make_unique( + provider.get(), PixelFormat::kN32PremulPixelFormat); auto results1 = env->getResult(display_list1); auto results2 = env->getResult(display_list2); int modified_transparent_pixels = @@ -3894,15 +4193,8 @@ TEST_F(DisplayListCanvas, BlendColorFilterModifyTransparencyCheck) { #undef TEST_MODE } -TEST_F(DisplayListCanvas, BlendColorFilterOpacityCommuteCheck) { - std::vector> environments; - for (auto& provider : CanvasCompareTester::kTestProviders) { - auto env = std::make_unique( - provider.get(), PixelFormat::kN32PremulPixelFormat); - environments.push_back(std::move(env)); - } - - auto test_mode_color = [&environments](DlBlendMode mode, DlColor color) { +TEST_F(DisplayListRendering, BlendColorFilterOpacityCommuteCheck) { + auto test_mode_color = [](DlBlendMode mode, DlColor color) { std::stringstream desc_str; std::string mode_string = BlendModeToString(mode); desc_str << "blend[" << mode_string << ", " << color << "]"; @@ -3937,7 +4229,10 @@ TEST_F(DisplayListCanvas, BlendColorFilterOpacityCommuteCheck) { builder2.Restore(); auto display_list2 = builder2.Build(); - for (auto& env : environments) { + for (auto& back_end : CanvasCompareTester::kTestBackends) { + auto provider = CanvasCompareTester::GetProvider(back_end); + auto env = std::make_unique( + provider.get(), PixelFormat::kN32PremulPixelFormat); auto results1 = env->getResult(display_list1); auto results2 = env->getResult(display_list2); if (filter.can_commute_with_opacity()) { @@ -3964,11 +4259,11 @@ TEST_F(DisplayListCanvas, BlendColorFilterOpacityCommuteCheck) { #undef TEST_MODE } -class DisplayListNopTest : public DisplayListCanvas { +class DisplayListNopTest : public DisplayListRendering { // The following code uses the acronym MTB for "modifies_transparent_black" protected: - DisplayListNopTest() : DisplayListCanvas() { + DisplayListNopTest() : DisplayListRendering() { test_src_colors = { DlColor::kBlack().withAlpha(0), // transparent black DlColor::kBlack().withAlpha(0x7f), // half transparent black @@ -4086,7 +4381,7 @@ class DisplayListNopTest : public DisplayListCanvas { auto surface = SkSurfaces::Raster(SkImageInfo::MakeN32Premul(w, h)); SkCanvas* canvas = surface->getCanvas(); renderer(canvas); - return std::make_unique(surface, snapshot); + return std::make_unique(surface, snapshot); } int check_color_result(DlColor dst_color, @@ -4193,7 +4488,8 @@ class DisplayListNopTest : public DisplayListCanvas { SkPaint sk_paint; sk_paint.setBlendMode(sk_mode); sk_paint.setColor(ToSk(color)); - for (auto& provider : CanvasCompareTester::kTestProviders) { + for (auto& back_end : CanvasCompareTester::kTestBackends) { + auto provider = CanvasCompareTester::GetProvider(back_end); auto result_surface = provider->MakeOffscreenSurface( test_image->width(), test_image->height(), DlSurfaceProvider::kN32PremulPixelFormat); @@ -4207,8 +4503,8 @@ class DisplayListNopTest : public DisplayListCanvas { direct_context->flushAndSubmit(result_surface->sk_surface().get(), GrSyncCpu::kYes); } - auto result_pixels = - std::make_unique(result_surface->sk_surface()); + const std::unique_ptr result_pixels = + std::make_unique(result_surface->sk_surface()); int all_flags = check_image_result(test_data, result_pixels, dl, desc); report_results(all_flags, dl, desc); @@ -4255,7 +4551,8 @@ class DisplayListNopTest : public DisplayListCanvas { sk_paint.setColor(ToSk(color)); sk_paint.setColorFilter(ToSk(color_filter)); sk_paint.setImageFilter(ToSk(image_filter)); - for (auto& provider : CanvasCompareTester::kTestProviders) { + for (auto& back_end : CanvasCompareTester::kTestBackends) { + auto provider = CanvasCompareTester::GetProvider(back_end); auto result_surface = provider->MakeOffscreenSurface( w, h, DlSurfaceProvider::kN32PremulPixelFormat); SkCanvas* result_canvas = result_surface->sk_surface()->getCanvas(); @@ -4269,8 +4566,8 @@ class DisplayListNopTest : public DisplayListCanvas { direct_context->flushAndSubmit(result_surface->sk_surface().get(), GrSyncCpu::kYes); } - auto result_pixels = - std::make_unique(result_surface->sk_surface()); + std::unique_ptr result_pixels = + std::make_unique(result_surface->sk_surface()); int all_flags = check_image_result(test_image_dst_data, result_pixels, dl, desc); diff --git a/display_list/testing/dl_test_surface_metal.cc b/display_list/testing/dl_test_surface_metal.cc index 01048e783cc1a..2cce8f4e5ec4d 100644 --- a/display_list/testing/dl_test_surface_metal.cc +++ b/display_list/testing/dl_test_surface_metal.cc @@ -3,6 +3,9 @@ // found in the LICENSE file. #include "flutter/display_list/testing/dl_test_surface_metal.h" +#include "flutter/impeller/display_list/dl_dispatcher.h" +#include "flutter/impeller/display_list/dl_image_impeller.h" +#include "flutter/impeller/typographer/backends/skia/typographer_context_skia.h" #include "third_party/skia/include/core/SkCanvas.h" #include "third_party/skia/include/core/SkSurface.h" @@ -54,5 +57,71 @@ std::shared_ptr DlMetalSurfaceProvider::MakeOffscreenSurface( return std::make_shared(std::move(surface)); } +class DlMetalPixelData : public DlPixelData { + using MetalScreenshot = impeller::testing::MetalScreenshot; + + public: + explicit DlMetalPixelData(std::unique_ptr screenshot) + : screenshot_(std::move(screenshot)), + addr_(reinterpret_cast(screenshot_->GetBytes())), + ints_per_row_(screenshot_->GetBytesPerRow() / 4) { + FML_DCHECK(screenshot_->GetBytesPerRow() == ints_per_row_ * 4); + } + ~DlMetalPixelData() override = default; + + const uint32_t* addr32(int x, int y) const override { + return addr_ + (y * ints_per_row_) + x; + } + size_t width() const override { return screenshot_->GetWidth(); } + size_t height() const override { return screenshot_->GetHeight(); } + void write(const std::string& path) const override { + screenshot_->WriteToPNG(path); + } + + private: + std::unique_ptr screenshot_; + const uint32_t* addr_; + const uint32_t ints_per_row_; +}; + +sk_sp DlMetalSurfaceProvider::ImpellerSnapshot( + const sk_sp& list, + int width, + int height) const { + InitScreenShotter(); + impeller::DlDispatcher dispatcher; + dispatcher.drawColor(flutter::DlColor::kTransparent(), + flutter::DlBlendMode::kSrc); + list->Dispatch(dispatcher); + auto picture = dispatcher.EndRecordingAsPicture(); + return sk_make_sp(snapshotter_->MakeScreenshot( + *aiks_context_, picture, {width, height}, false)); +} + +sk_sp DlMetalSurfaceProvider::MakeImpellerImage( + const sk_sp& list, + int width, + int height) const { + InitScreenShotter(); + impeller::DlDispatcher dispatcher; + dispatcher.drawColor(flutter::DlColor::kTransparent(), + flutter::DlBlendMode::kSrc); + list->Dispatch(dispatcher); + auto picture = dispatcher.EndRecordingAsPicture(); + std::shared_ptr image = + picture.ToImage(*aiks_context_, {width, height}); + std::shared_ptr texture = image->GetTexture(); + return impeller::DlImageImpeller::Make(texture); +} + +void DlMetalSurfaceProvider::InitScreenShotter() const { + if (!snapshotter_) { + snapshotter_.reset(new MetalScreenshotter()); + auto typographer = impeller::TypographerContextSkia::Make(); + aiks_context_.reset(new impeller::AiksContext( + snapshotter_->GetPlayground().GetContext(), typographer)); + } +} + } // namespace testing } // namespace flutter diff --git a/display_list/testing/dl_test_surface_metal.h b/display_list/testing/dl_test_surface_metal.h index 619d4de7dbb87..04843066bdc75 100644 --- a/display_list/testing/dl_test_surface_metal.h +++ b/display_list/testing/dl_test_surface_metal.h @@ -6,12 +6,15 @@ #define FLUTTER_DISPLAY_LIST_TESTING_DL_TEST_SURFACE_METAL_H_ #include "flutter/display_list/testing/dl_test_surface_provider.h" - +#include "flutter/fml/platform/darwin/scoped_nsautorelease_pool.h" +#include "flutter/impeller/golden_tests/metal_screenshotter.h" #include "flutter/testing/test_metal_surface.h" namespace flutter { namespace testing { +using MetalScreenshotter = impeller::testing::MetalScreenshotter; + class DlMetalSurfaceProvider : public DlSurfaceProvider { public: explicit DlMetalSurfaceProvider() : DlSurfaceProvider() {} @@ -30,10 +33,25 @@ class DlMetalSurfaceProvider : public DlSurfaceProvider { bool supports(PixelFormat format) const override { return format == kN32PremulPixelFormat; } + bool supports_impeller() const override { return true; } + sk_sp ImpellerSnapshot(const sk_sp& list, + int width, + int height) const override; + virtual sk_sp MakeImpellerImage(const sk_sp& list, + int width, + int height) const override; private: + // This must be placed before any other members that may use the + // autorelease pool. + fml::ScopedNSAutoreleasePool autorelease_pool_; + std::unique_ptr metal_context_; std::shared_ptr metal_surface_; + mutable std::unique_ptr snapshotter_; + mutable std::unique_ptr aiks_context_; + + void InitScreenShotter() const; }; } // namespace testing diff --git a/display_list/testing/dl_test_surface_provider.cc b/display_list/testing/dl_test_surface_provider.cc index f3b611c62e8ee..ab7d75c0901e7 100644 --- a/display_list/testing/dl_test_surface_provider.cc +++ b/display_list/testing/dl_test_surface_provider.cc @@ -23,6 +23,17 @@ namespace flutter { namespace testing { +std::string DlSurfaceProvider::BackendName(BackendType type) { + switch (type) { + case kMetalBackend: + return "Metal"; + case kOpenGlBackend: + return "OpenGL"; + case kSoftwareBackend: + return "Software"; + } +} + std::unique_ptr DlSurfaceProvider::Create( BackendType backend_type) { switch (backend_type) { diff --git a/display_list/testing/dl_test_surface_provider.h b/display_list/testing/dl_test_surface_provider.h index 57055b93d3c19..1ad4af789cb43 100644 --- a/display_list/testing/dl_test_surface_provider.h +++ b/display_list/testing/dl_test_surface_provider.h @@ -7,6 +7,8 @@ #include +#include "flutter/display_list/display_list.h" +#include "flutter/display_list/image/dl_image.h" #include "flutter/fml/mapping.h" #include "flutter/testing/testing.h" @@ -15,6 +17,16 @@ namespace flutter { namespace testing { +class DlPixelData : public SkRefCnt { + public: + virtual ~DlPixelData() = default; + + virtual const uint32_t* addr32(int x, int y) const = 0; + virtual size_t width() const = 0; + virtual size_t height() const = 0; + virtual void write(const std::string& path) const = 0; +}; + class DlSurfaceInstance { public: virtual ~DlSurfaceInstance() = default; @@ -53,12 +65,14 @@ class DlSurfaceProvider { FML_DCHECK(false); } + static std::string BackendName(BackendType type); static std::unique_ptr Create(BackendType backend_type); virtual ~DlSurfaceProvider() = default; virtual const std::string backend_name() const = 0; virtual BackendType backend_type() const = 0; virtual bool supports(PixelFormat format) const = 0; + virtual bool supports_impeller() const { return false; } virtual bool InitializeSurface( size_t width, size_t height, @@ -70,6 +84,16 @@ class DlSurfaceProvider { PixelFormat format = kN32PremulPixelFormat) const = 0; virtual bool Snapshot(std::string& filename) const; + virtual sk_sp ImpellerSnapshot(const sk_sp& list, + int width, + int height) const { + return nullptr; + } + virtual sk_sp MakeImpellerImage(const sk_sp& list, + int width, + int height) const { + return nullptr; + } protected: DlSurfaceProvider() = default; diff --git a/impeller/golden_tests/BUILD.gn b/impeller/golden_tests/BUILD.gn index 6682a0732725a..0e1c7bd216e17 100644 --- a/impeller/golden_tests/BUILD.gn +++ b/impeller/golden_tests/BUILD.gn @@ -47,12 +47,13 @@ if (is_mac) { sources = [ "metal_screenshot.h", "metal_screenshot.mm", - "metal_screenshoter.h", - "metal_screenshoter.mm", + "metal_screenshotter.h", + "metal_screenshotter.mm", ] deps = [ "//flutter/impeller/aiks", + "//flutter/impeller/display_list", "//flutter/impeller/playground", "//flutter/impeller/renderer/backend/metal:metal", ] diff --git a/impeller/golden_tests/golden_playground_test_mac.cc b/impeller/golden_tests/golden_playground_test_mac.cc index e7f0c0fb7b6b7..1ffc25388b585 100644 --- a/impeller/golden_tests/golden_playground_test_mac.cc +++ b/impeller/golden_tests/golden_playground_test_mac.cc @@ -10,7 +10,7 @@ #include "flutter/impeller/aiks/picture.h" #include "flutter/impeller/golden_tests/golden_digest.h" -#include "flutter/impeller/golden_tests/metal_screenshoter.h" +#include "flutter/impeller/golden_tests/metal_screenshotter.h" #include "impeller/typographer/backends/skia/typographer_context_skia.h" #include "impeller/typographer/typographer_context.h" @@ -85,8 +85,9 @@ bool SaveScreenshot(std::unique_ptr screenshot) { } // namespace struct GoldenPlaygroundTest::GoldenPlaygroundTestImpl { - GoldenPlaygroundTestImpl() : screenshoter(new testing::MetalScreenshoter()) {} - std::unique_ptr screenshoter; + GoldenPlaygroundTestImpl() + : screenshotter(new testing::MetalScreenshotter()) {} + std::unique_ptr screenshotter; ISize window_size = ISize{1024, 768}; }; @@ -140,8 +141,8 @@ PlaygroundBackend GoldenPlaygroundTest::GetBackend() const { bool GoldenPlaygroundTest::OpenPlaygroundHere(Picture picture) { AiksContext renderer(GetContext(), typographer_context_); - auto screenshot = pimpl_->screenshoter->MakeScreenshot(renderer, picture, - pimpl_->window_size); + auto screenshot = pimpl_->screenshotter->MakeScreenshot(renderer, picture, + pimpl_->window_size); return SaveScreenshot(std::move(screenshot)); } @@ -178,11 +179,11 @@ std::shared_ptr GoldenPlaygroundTest::OpenAssetAsRuntimeStage( } std::shared_ptr GoldenPlaygroundTest::GetContext() const { - return pimpl_->screenshoter->GetPlayground().GetContext(); + return pimpl_->screenshotter->GetPlayground().GetContext(); } Point GoldenPlaygroundTest::GetContentScale() const { - return pimpl_->screenshoter->GetPlayground().GetContentScale(); + return pimpl_->screenshotter->GetPlayground().GetContentScale(); } Scalar GoldenPlaygroundTest::GetSecondsElapsed() const { diff --git a/impeller/golden_tests/golden_tests.cc b/impeller/golden_tests/golden_tests.cc index d57bbf751d5d5..9919aa5160ff8 100644 --- a/impeller/golden_tests/golden_tests.cc +++ b/impeller/golden_tests/golden_tests.cc @@ -13,7 +13,7 @@ #include "impeller/geometry/path_builder.h" #include "impeller/golden_tests/golden_digest.h" #include "impeller/golden_tests/metal_screenshot.h" -#include "impeller/golden_tests/metal_screenshoter.h" +#include "impeller/golden_tests/metal_screenshotter.h" #include "impeller/golden_tests/working_directory.h" namespace impeller { @@ -50,14 +50,14 @@ bool SaveScreenshot(std::unique_ptr screenshot) { class GoldenTests : public ::testing::Test { public: - GoldenTests() : screenshoter_(new MetalScreenshoter()) {} + GoldenTests() : screenshotter_(new MetalScreenshotter()) {} - MetalScreenshoter& Screenshoter() { return *screenshoter_; } + MetalScreenshotter& Screenshotter() { return *screenshotter_; } void SetUp() override { testing::GoldenDigest::Instance()->AddDimension( "gpu_string", - Screenshoter().GetPlayground().GetContext()->DescribeGpuModel()); + Screenshotter().GetPlayground().GetContext()->DescribeGpuModel()); } private: @@ -65,7 +65,7 @@ class GoldenTests : public ::testing::Test { // autorelease pool. fml::ScopedNSAutoreleasePool autorelease_pool_; - std::unique_ptr screenshoter_; + std::unique_ptr screenshotter_; }; TEST_F(GoldenTests, ConicalGradient) { @@ -82,8 +82,8 @@ TEST_F(GoldenTests, ConicalGradient) { Picture picture = canvas.EndRecordingAsPicture(); auto aiks_context = - AiksContext(Screenshoter().GetPlayground().GetContext(), nullptr); - auto screenshot = Screenshoter().MakeScreenshot(aiks_context, picture); + AiksContext(Screenshotter().GetPlayground().GetContext(), nullptr); + auto screenshot = Screenshotter().MakeScreenshot(aiks_context, picture); ASSERT_TRUE(SaveScreenshot(std::move(screenshot))); } } // namespace testing diff --git a/impeller/golden_tests/metal_screenshot.h b/impeller/golden_tests/metal_screenshot.h index 30253989801de..93b25b0b2ce07 100644 --- a/impeller/golden_tests/metal_screenshot.h +++ b/impeller/golden_tests/metal_screenshot.h @@ -13,9 +13,7 @@ namespace impeller { namespace testing { -class MetalScreenshoter; - -/// A screenshot that was produced from `MetalScreenshoter`. +/// A screenshot that was produced from `MetalScreenshotter`. class MetalScreenshot { public: ~MetalScreenshot(); @@ -26,10 +24,12 @@ class MetalScreenshot { size_t GetWidth() const; + size_t GetBytesPerRow() const; + bool WriteToPNG(const std::string& path) const; private: - friend class MetalScreenshoter; + friend class MetalScreenshotter; explicit MetalScreenshot(CGImageRef cgImage); FML_DISALLOW_COPY_AND_ASSIGN(MetalScreenshot); CGImageRef cg_image_; diff --git a/impeller/golden_tests/metal_screenshot.mm b/impeller/golden_tests/metal_screenshot.mm index 9a26bf08d3e5e..767ee93cb4132 100644 --- a/impeller/golden_tests/metal_screenshot.mm +++ b/impeller/golden_tests/metal_screenshot.mm @@ -29,6 +29,10 @@ return CGImageGetWidth(cg_image_); } +size_t MetalScreenshot::GetBytesPerRow() const { + return CGImageGetBytesPerRow(cg_image_); +} + bool MetalScreenshot::WriteToPNG(const std::string& path) const { bool result = false; NSURL* output_url = diff --git a/impeller/golden_tests/metal_screenshoter.h b/impeller/golden_tests/metal_screenshotter.h similarity index 78% rename from impeller/golden_tests/metal_screenshoter.h rename to impeller/golden_tests/metal_screenshotter.h index 961d3186f5c81..c013cf27d3f48 100644 --- a/impeller/golden_tests/metal_screenshoter.h +++ b/impeller/golden_tests/metal_screenshotter.h @@ -12,15 +12,17 @@ namespace impeller { namespace testing { -/// Converts `Picture`s to `MetalScreenshot`s with the playground backend. -class MetalScreenshoter { +/// Converts `Picture`s and `DisplayList`s to `MetalScreenshot`s with the +/// playground backend. +class MetalScreenshotter { public: - MetalScreenshoter(); + MetalScreenshotter(); std::unique_ptr MakeScreenshot(AiksContext& aiks_context, const Picture& picture, const ISize& size = {300, - 300}); + 300}, + bool scale_content = true); const PlaygroundImpl& GetPlayground() const { return *playground_; } diff --git a/impeller/golden_tests/metal_screenshoter.mm b/impeller/golden_tests/metal_screenshotter.mm similarity index 84% rename from impeller/golden_tests/metal_screenshoter.mm rename to impeller/golden_tests/metal_screenshotter.mm index 1d01b65386a8a..5cd6e0014c61d 100644 --- a/impeller/golden_tests/metal_screenshoter.mm +++ b/impeller/golden_tests/metal_screenshotter.mm @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "flutter/impeller/golden_tests/metal_screenshoter.h" +#include "flutter/impeller/golden_tests/metal_screenshotter.h" #include #include "impeller/renderer/backend/metal/context_mtl.h" @@ -13,17 +13,19 @@ namespace impeller { namespace testing { -MetalScreenshoter::MetalScreenshoter() { +MetalScreenshotter::MetalScreenshotter() { FML_CHECK(::glfwInit() == GLFW_TRUE); playground_ = PlaygroundImpl::Create(PlaygroundBackend::kMetal, PlaygroundSwitches{}); } -std::unique_ptr MetalScreenshoter::MakeScreenshot( +std::unique_ptr MetalScreenshotter::MakeScreenshot( AiksContext& aiks_context, const Picture& picture, - const ISize& size) { - Vector2 content_scale = playground_->GetContentScale(); + const ISize& size, + bool scale_content) { + Vector2 content_scale = + scale_content ? playground_->GetContentScale() : Vector2{1, 1}; std::shared_ptr image = picture.ToImage( aiks_context, ISize(size.width * content_scale.x, size.height * content_scale.y)); From 9b97627346165bc4999f1bac0034d4b2d01e6c0c Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 9 Oct 2023 15:49:11 -0400 Subject: [PATCH 532/859] Roll Skia from 26d70e6999f6 to bd77f099b4f9 (3 revisions) (#46685) https://skia.googlesource.com/skia.git/+log/26d70e6999f6..bd77f099b4f9 2023-10-09 johnstiles@google.com Revert "Disable color type RG_88 on Apple M1 GPUs." 2023-10-09 johnstiles@google.com Disable color type RG_88 on Apple M1 GPUs. 2023-10-09 johnstiles@google.com Disable indirect draws in ANGLE + D3D. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,johnstiles@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 98797c6f497a4..804f6f442dd47 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '26d70e6999f628e3acd320863c06a56c4995a146', + 'skia_revision': 'bd77f099b4f9a978c0fac6f24dd2fd0e9fa6eaa3', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index cb9443dba2eae..be8af7cffa788 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: a7f5ef9e2a9211f4a13973779990d3ee +Signature: 763519d9ff45472f2d96ffab6b792318 ==================================================================================================== LIBRARY: etc1 From da77b18a890fbd3f0cab509925c0587566c67c05 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 9 Oct 2023 16:37:17 -0400 Subject: [PATCH 533/859] Roll Skia from bd77f099b4f9 to e56387226035 (1 revision) (#46687) https://skia.googlesource.com/skia.git/+log/bd77f099b4f9..e56387226035 2023-10-09 kjlubick@google.com Remove #ifdef SK_VULKAN from GrDirectContext by moving MakeVulkan factories If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,johnstiles@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 804f6f442dd47..061669af01d0d 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'bd77f099b4f9a978c0fac6f24dd2fd0e9fa6eaa3', + 'skia_revision': 'e56387226035f916fe2bf62274ba55d25533aa30', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index be8af7cffa788..deed615cfd27a 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 763519d9ff45472f2d96ffab6b792318 +Signature: ecd9c9ae5d506a88a09f143104c2fdf1 ==================================================================================================== LIBRARY: etc1 @@ -388,6 +388,7 @@ FILE: ../../../third_party/skia/modules/skparagraph/test.html FILE: ../../../third_party/skia/package-lock.json FILE: ../../../third_party/skia/relnotes/mesh.md FILE: ../../../third_party/skia/relnotes/readbuffer-deserial.md +FILE: ../../../third_party/skia/relnotes/vk-directcontext.md FILE: ../../../third_party/skia/src/gpu/gpu_workaround_list.txt FILE: ../../../third_party/skia/src/ports/fontations/Cargo.toml FILE: ../../../third_party/skia/src/sksl/generated/sksl_compute.minified.sksl @@ -8767,6 +8768,7 @@ ORIGIN: ../../../third_party/skia/include/gpu/ganesh/gl/GrGLBackendSurface.h + . ORIGIN: ../../../third_party/skia/include/gpu/ganesh/gl/GrGLDirectContext.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/gpu/ganesh/mtl/SkSurfaceMetal.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/gpu/ganesh/vk/GrVkBackendSurface.h + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/include/gpu/ganesh/vk/GrVkDirectContext.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/gpu/graphite/BackendSemaphore.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/gpu/graphite/Image.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/gpu/graphite/Surface.h + ../../../third_party/skia/LICENSE @@ -8895,6 +8897,7 @@ ORIGIN: ../../../third_party/skia/src/gpu/ganesh/surface/SkSurface_AndroidFactor ORIGIN: ../../../third_party/skia/src/gpu/ganesh/vk/AHardwareBufferVk.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/vk/GrVkBackendSurface.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/vk/GrVkBackendSurfacePriv.h + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/gpu/ganesh/vk/GrVkDirectContext.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/graphite/AtlasProvider.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/graphite/AtlasProvider.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/graphite/BackendSemaphore.cpp + ../../../third_party/skia/LICENSE @@ -9033,6 +9036,7 @@ FILE: ../../../third_party/skia/include/gpu/ganesh/gl/GrGLBackendSurface.h FILE: ../../../third_party/skia/include/gpu/ganesh/gl/GrGLDirectContext.h FILE: ../../../third_party/skia/include/gpu/ganesh/mtl/SkSurfaceMetal.h FILE: ../../../third_party/skia/include/gpu/ganesh/vk/GrVkBackendSurface.h +FILE: ../../../third_party/skia/include/gpu/ganesh/vk/GrVkDirectContext.h FILE: ../../../third_party/skia/include/gpu/graphite/BackendSemaphore.h FILE: ../../../third_party/skia/include/gpu/graphite/Image.h FILE: ../../../third_party/skia/include/gpu/graphite/Surface.h @@ -9161,6 +9165,7 @@ FILE: ../../../third_party/skia/src/gpu/ganesh/surface/SkSurface_AndroidFactorie FILE: ../../../third_party/skia/src/gpu/ganesh/vk/AHardwareBufferVk.cpp FILE: ../../../third_party/skia/src/gpu/ganesh/vk/GrVkBackendSurface.cpp FILE: ../../../third_party/skia/src/gpu/ganesh/vk/GrVkBackendSurfacePriv.h +FILE: ../../../third_party/skia/src/gpu/ganesh/vk/GrVkDirectContext.cpp FILE: ../../../third_party/skia/src/gpu/graphite/AtlasProvider.cpp FILE: ../../../third_party/skia/src/gpu/graphite/AtlasProvider.h FILE: ../../../third_party/skia/src/gpu/graphite/BackendSemaphore.cpp From 5d3cf44c73acd5b9af0905a2cfdb36696502e717 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Mon, 9 Oct 2023 13:39:21 -0700 Subject: [PATCH 534/859] Remove obsolete tests that were time sensitive. (#46686) These were always filtered away. On Fuchsia, where the filters were not in place, there was an ifdef guard. Followup to https://github.com/flutter/flutter/issues/80457#issuecomment-1753419263 --------- Co-authored-by: Zachary Anderson --- ci/licenses_golden/excluded_files | 1 - fml/BUILD.gn | 1 - fml/message_loop_impl_unittests.cc | 43 ---------- fml/message_loop_unittests.cc | 123 ----------------------------- testing/run_tests.py | 3 +- 5 files changed, 1 insertion(+), 170 deletions(-) delete mode 100644 fml/message_loop_impl_unittests.cc diff --git a/ci/licenses_golden/excluded_files b/ci/licenses_golden/excluded_files index bbe5923f36da8..13f417392e5b8 100644 --- a/ci/licenses_golden/excluded_files +++ b/ci/licenses_golden/excluded_files @@ -97,7 +97,6 @@ ../../../flutter/fml/memory/ref_counted_unittest.cc ../../../flutter/fml/memory/task_runner_checker_unittest.cc ../../../flutter/fml/memory/weak_ptr_unittest.cc -../../../flutter/fml/message_loop_impl_unittests.cc ../../../flutter/fml/message_loop_task_queues_merge_unmerge_unittests.cc ../../../flutter/fml/message_loop_task_queues_unittests.cc ../../../flutter/fml/message_loop_unittests.cc diff --git a/fml/BUILD.gn b/fml/BUILD.gn index 887d7637b7bb7..0b4338435c375 100644 --- a/fml/BUILD.gn +++ b/fml/BUILD.gn @@ -337,7 +337,6 @@ if (enable_unittests) { "memory/ref_counted_unittest.cc", "memory/task_runner_checker_unittest.cc", "memory/weak_ptr_unittest.cc", - "message_loop_impl_unittests.cc", "message_loop_task_queues_merge_unmerge_unittests.cc", "message_loop_task_queues_unittests.cc", "message_loop_unittests.cc", diff --git a/fml/message_loop_impl_unittests.cc b/fml/message_loop_impl_unittests.cc deleted file mode 100644 index 1846f8c9d46bc..0000000000000 --- a/fml/message_loop_impl_unittests.cc +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#define FML_USED_ON_EMBEDDER - -#include "flutter/fml/message_loop_impl.h" - -#include "flutter/fml/time/time_delta.h" -#include "flutter/fml/time/time_point.h" -#include "gtest/gtest.h" - -#define TIMESENSITIVE(x) TimeSensitiveTest_##x - -TEST(MessageLoopImpl, TIMESENSITIVE(WakeUpTimersAreSingletons)) { - auto loop_impl = fml::MessageLoopImpl::Create(); - - const auto t1 = fml::TimeDelta::FromMilliseconds(10); - const auto t2 = fml::TimeDelta::FromMilliseconds(30); - - const auto begin = fml::TimePoint::Now(); - - // Register a task scheduled in the future. This schedules a WakeUp call on - // the MessageLoopImpl with that fml::TimePoint. - loop_impl->PostTask( - [&]() { - auto delta = fml::TimePoint::Now() - begin; - auto ms = delta.ToMillisecondsF(); - ASSERT_GE(ms, 20); - ASSERT_LE(ms, 40); - - loop_impl->Terminate(); - }, - begin + t1); - - // Call WakeUp manually to change the WakeUp time further in the future. If - // the timer is correctly set up to be rearmed instead of a task being - // scheduled for each WakeUp, the above task will be executed at t2 instead of - // t1 now. - loop_impl->WakeUp(begin + t2); - - loop_impl->Run(); -} diff --git a/fml/message_loop_unittests.cc b/fml/message_loop_unittests.cc index 222810d406021..5e64e407f81f8 100644 --- a/fml/message_loop_unittests.cc +++ b/fml/message_loop_unittests.cc @@ -17,7 +17,6 @@ #include "flutter/fml/time/chrono_timestamp_provider.h" #include "gtest/gtest.h" -#define TIMESENSITIVE(x) TimeSensitiveTest_##x #if FML_OS_WIN #define PLATFORM_SPECIFIC_CAPTURE(...) [ __VA_ARGS__, count ] #else @@ -155,128 +154,6 @@ TEST(MessageLoop, CheckRunsTaskOnCurrentThread) { thread.join(); } -TEST(MessageLoop, TIMESENSITIVE(SingleDelayedTaskByDelta)) { -#if defined(OS_FUCHSIA) - GTEST_SKIP() - << "This test does not work on Fuchsia. https://fxbug.dev/110020 "; -#else - - bool checked = false; - std::thread thread([&checked]() { - fml::MessageLoop::EnsureInitializedForCurrentThread(); - auto& loop = fml::MessageLoop::GetCurrent(); - auto begin = fml::ChronoTicksSinceEpoch(); - loop.GetTaskRunner()->PostDelayedTask( - [begin, &checked]() { - auto delta = fml::ChronoTicksSinceEpoch() - begin; - auto ms = delta.ToMillisecondsF(); - ASSERT_GE(ms, 3); - ASSERT_LE(ms, 7); - checked = true; - fml::MessageLoop::GetCurrent().Terminate(); - }, - fml::TimeDelta::FromMilliseconds(5)); - loop.Run(); - }); - thread.join(); - ASSERT_TRUE(checked); -#endif // OS_FUCHSIA -} - -TEST(MessageLoop, TIMESENSITIVE(SingleDelayedTaskForTime)) { -#if defined(OS_FUCHSIA) - GTEST_SKIP() - << "This test does not work on Fuchsia. https://fxbug.dev/110020 "; -#else - - bool checked = false; - std::thread thread([&checked]() { - fml::MessageLoop::EnsureInitializedForCurrentThread(); - auto& loop = fml::MessageLoop::GetCurrent(); - auto begin = fml::ChronoTicksSinceEpoch(); - loop.GetTaskRunner()->PostTaskForTime( - [begin, &checked]() { - auto delta = fml::ChronoTicksSinceEpoch() - begin; - auto ms = delta.ToMillisecondsF(); - ASSERT_GE(ms, 3); - ASSERT_LE(ms, 7); - checked = true; - fml::MessageLoop::GetCurrent().Terminate(); - }, - fml::ChronoTicksSinceEpoch() + fml::TimeDelta::FromMilliseconds(5)); - loop.Run(); - }); - thread.join(); - ASSERT_TRUE(checked); -#endif // OS_FUCHSIA -} - -TEST(MessageLoop, TIMESENSITIVE(MultipleDelayedTasksWithIncreasingDeltas)) { -#if defined(OS_FUCHSIA) - GTEST_SKIP() - << "This test does not work on Fuchsia. https://fxbug.dev/110020 "; -#else - - const auto count = 10; - int checked = false; - std::thread thread(PLATFORM_SPECIFIC_CAPTURE(&checked)() { - fml::MessageLoop::EnsureInitializedForCurrentThread(); - auto& loop = fml::MessageLoop::GetCurrent(); - for (int target_ms = 0 + 2; target_ms < count + 2; target_ms++) { - auto begin = fml::ChronoTicksSinceEpoch(); - loop.GetTaskRunner()->PostDelayedTask( - PLATFORM_SPECIFIC_CAPTURE(begin, target_ms, &checked)() { - auto delta = fml::ChronoTicksSinceEpoch() - begin; - auto ms = delta.ToMillisecondsF(); - ASSERT_GE(ms, target_ms - 2); - ASSERT_LE(ms, target_ms + 2); - checked++; - if (checked == count) { - fml::MessageLoop::GetCurrent().Terminate(); - } - }, - fml::TimeDelta::FromMilliseconds(target_ms)); - } - loop.Run(); - }); - thread.join(); - ASSERT_EQ(checked, count); -#endif // OS_FUCHSIA -} - -TEST(MessageLoop, TIMESENSITIVE(MultipleDelayedTasksWithDecreasingDeltas)) { -#if defined(OS_FUCHSIA) - GTEST_SKIP() - << "This test does not work on Fuchsia. https://fxbug.dev/110020 "; -#else - - const auto count = 10; - int checked = false; - std::thread thread(PLATFORM_SPECIFIC_CAPTURE(&checked)() { - fml::MessageLoop::EnsureInitializedForCurrentThread(); - auto& loop = fml::MessageLoop::GetCurrent(); - for (int target_ms = count + 2; target_ms > 0 + 2; target_ms--) { - auto begin = fml::ChronoTicksSinceEpoch(); - loop.GetTaskRunner()->PostDelayedTask( - PLATFORM_SPECIFIC_CAPTURE(begin, target_ms, &checked)() { - auto delta = fml::ChronoTicksSinceEpoch() - begin; - auto ms = delta.ToMillisecondsF(); - ASSERT_GE(ms, target_ms - 2); - ASSERT_LE(ms, target_ms + 2); - checked++; - if (checked == count) { - fml::MessageLoop::GetCurrent().Terminate(); - } - }, - fml::TimeDelta::FromMilliseconds(target_ms)); - } - loop.Run(); - }); - thread.join(); - ASSERT_EQ(checked, count); -#endif // OS_FUCHSIA -} - TEST(MessageLoop, TaskObserverFire) { bool started = false; bool terminated = false; diff --git a/testing/run_tests.py b/testing/run_tests.py index 9a0e24f4f1022..898201cecf5bd 100755 --- a/testing/run_tests.py +++ b/testing/run_tests.py @@ -41,7 +41,6 @@ ROBOTO_FONT_PATH = os.path.join(FONTS_DIR, 'Roboto-Regular.ttf') FONT_SUBSET_DIR = os.path.join(BUILDROOT_DIR, 'flutter', 'tools', 'font-subset') -FML_UNITTESTS_FILTER = '--gtest_filter=-*TimeSensitiveTest*' ENCODING = 'UTF-8' logger = logging.getLogger(__name__) @@ -402,7 +401,7 @@ def make_test(name, flags=None, extra_env=None): make_test('embedder_a11y_unittests'), make_test('embedder_proctable_unittests'), make_test('embedder_unittests'), - make_test('fml_unittests', flags=[FML_UNITTESTS_FILTER] + repeat_flags), + make_test('fml_unittests'), make_test('no_dart_plugin_registrant_unittests'), make_test('runtime_unittests'), make_test('testing_unittests'), From 2edcd3cba930502fa79aa5b57fc153358069e77d Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 9 Oct 2023 17:33:31 -0400 Subject: [PATCH 535/859] Roll Skia from e56387226035 to f45ac4569300 (1 revision) (#46690) https://skia.googlesource.com/skia.git/+log/e56387226035..f45ac4569300 2023-10-09 herb@google.com Add slope comparison for Segments If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,johnstiles@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 061669af01d0d..11cca86bee6a0 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'e56387226035f916fe2bf62274ba55d25533aa30', + 'skia_revision': 'f45ac4569300c567cf285051a62b9c7aa1657cd0', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index deed615cfd27a..9723f24b5f10d 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: ecd9c9ae5d506a88a09f143104c2fdf1 +Signature: 59dccf1dff7dca3e094cb8944da3b1b4 ==================================================================================================== LIBRARY: etc1 From 73498808aa3cdce31d9e9b2a14b1d09aeadf9ad6 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 9 Oct 2023 17:35:14 -0400 Subject: [PATCH 536/859] Roll Dart SDK from a6e43b0b9e0c to 078162ecf493 (1 revision) (#46691) https://dart.googlesource.com/sdk.git/+log/a6e43b0b9e0c..078162ecf493 2023-10-09 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-3.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC chinmaygarde@google.com,dart-vm-team@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 11cca86bee6a0..f2775a96bfebf 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': 'a6e43b0b9e0cd6c16dff5b507e50ee6cd286c729', + 'dart_revision': '078162ecf493383d92774c2d1f239082bfc4dfe2', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index 353b793e7cb97..f90bb54093bbc 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: 116a50d0facb820efdab648f654d3c41 +Signature: 94354ad90a04da08cf4fa3b7ab5555cd ==================================================================================================== LIBRARY: dart From 60792c6391b3d0403c5007df2c67e2559a5edb43 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 9 Oct 2023 20:35:23 -0400 Subject: [PATCH 537/859] Roll Skia from f45ac4569300 to f4f3c909993d (1 revision) (#46694) https://skia.googlesource.com/skia.git/+log/f45ac4569300..f4f3c909993d 2023-10-09 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from d3dc8dfdccca to 4039a4c6188f (4 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,johnstiles@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index f2775a96bfebf..3d8ad914e3051 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'f45ac4569300c567cf285051a62b9c7aa1657cd0', + 'skia_revision': 'f4f3c909993df833b8e56a4cf9735e8d85f236f9', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 908f32a726ca94d290a8aea15bc2b4ae1a116b97 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 9 Oct 2023 21:30:13 -0400 Subject: [PATCH 538/859] Roll Dart SDK from 078162ecf493 to a471147f6237 (1 revision) (#46695) https://dart.googlesource.com/sdk.git/+log/078162ecf493..a471147f6237 2023-10-10 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-4.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC chinmaygarde@google.com,dart-vm-team@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 3d8ad914e3051..ab3f5a18fc4bf 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '078162ecf493383d92774c2d1f239082bfc4dfe2', + 'dart_revision': 'a471147f6237b52ca1951df3db7f7d1b6e9db526', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index f90bb54093bbc..e722022406287 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: 94354ad90a04da08cf4fa3b7ab5555cd +Signature: c34931134b5196fbe2a4ac6dfd04a299 ==================================================================================================== LIBRARY: dart From 00d15738270ab0c41c619547e8eb48a7baf487cc Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 9 Oct 2023 22:47:10 -0400 Subject: [PATCH 539/859] Roll Fuchsia Mac SDK from YDaOfbTjc-WMEZXZx... to EYr1hCR6hxkSGhtis... (#46698) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC chinmaygarde@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index ab3f5a18fc4bf..b3e74a4e6e5f3 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'YDaOfbTjc-WMEZXZxms1hUFLu3b8fF2bl4utB6CupF4C' + 'version': 'EYr1hCR6hxkSGhtis6Jsd4HKgC8lSbjnOoNM6Puti18C' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From fcfab37d1d8dd8bbc89e79ed3a9aff1fa3df1168 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 10 Oct 2023 01:30:55 -0400 Subject: [PATCH 540/859] Roll Skia from f4f3c909993d to 4378ce41f461 (1 revision) (#46699) https://skia.googlesource.com/skia.git/+log/f4f3c909993d..4378ce41f461 2023-10-10 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from 2e3e38a84286 to f9f3328bcef8 (8 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,johnstiles@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index b3e74a4e6e5f3..ecb5b6d4b1679 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'f4f3c909993df833b8e56a4cf9735e8d85f236f9', + 'skia_revision': '4378ce41f4616b2061a2bbc3d4d2f57be9955031', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 9723f24b5f10d..a543ae1a9877b 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 59dccf1dff7dca3e094cb8944da3b1b4 +Signature: fb5883a71c45eeef7a1dfd4e67517a74 ==================================================================================================== LIBRARY: etc1 From ac2751009d59fe1484029a9319447405e35c5b35 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 10 Oct 2023 01:48:15 -0400 Subject: [PATCH 541/859] Roll Fuchsia Linux SDK from 3JmrIr49bTV2DIWsW... to dCjN58uZQBmAFWSxN... (#46700) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC chinmaygarde@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/excluded_files | 1 + ci/licenses_golden/licenses_fuchsia | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index ecb5b6d4b1679..4e17da0cf755d 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': '3JmrIr49bTV2DIWsWui83SA0yEU8Fepw0tsrtaKPBhEC' + 'version': 'dCjN58uZQBmAFWSxN7mYaGjc1w2sj-1Hni3eXw7yQJIC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/excluded_files b/ci/licenses_golden/excluded_files index 13f417392e5b8..fd649bd5f90a3 100644 --- a/ci/licenses_golden/excluded_files +++ b/ci/licenses_golden/excluded_files @@ -475,6 +475,7 @@ ../../../fuchsia/sdk/linux/arch/x64/sysroot/dist/lib/asan/ld.so.1 ../../../fuchsia/sdk/linux/arch/x64/sysroot/dist/lib/ld.so.1 ../../../fuchsia/sdk/linux/bind/fuchsia.arm.platform/meta.json +../../../fuchsia/sdk/linux/bind/fuchsia.nxp.platform/meta.json ../../../fuchsia/sdk/linux/bind/fuchsia.platform/meta.json ../../../fuchsia/sdk/linux/bind/fuchsia/meta.json ../../../fuchsia/sdk/linux/dart/sl4f/meta.json diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index 0a40d2803d19f..a884317aef5da 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: 105b10072bae009ec3bf85ca53c2704c +Signature: 3fdbb9ad111415128349d46321811de6 ==================================================================================================== LIBRARY: fuchsia_sdk @@ -3068,6 +3068,7 @@ ORIGIN: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/string_view.h ORIGIN: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls-next.h + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/testonly-syscalls.h + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/bind/fuchsia.arm.platform/fuchsia.arm.platform.bind + ../../../fuchsia/sdk/linux/LICENSE +ORIGIN: ../../../fuchsia/sdk/linux/bind/fuchsia.nxp.platform/fuchsia.nxp.platform.bind + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/dart/sl4f/lib/src/component.dart + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/dart/sl4f/lib/src/device.dart + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/dart/sl4f/lib/src/diagnostics.dart + ../../../fuchsia/sdk/linux/LICENSE @@ -3243,6 +3244,7 @@ FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/string_view.h FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls-next.h FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/testonly-syscalls.h FILE: ../../../fuchsia/sdk/linux/bind/fuchsia.arm.platform/fuchsia.arm.platform.bind +FILE: ../../../fuchsia/sdk/linux/bind/fuchsia.nxp.platform/fuchsia.nxp.platform.bind FILE: ../../../fuchsia/sdk/linux/dart/sl4f/lib/src/component.dart FILE: ../../../fuchsia/sdk/linux/dart/sl4f/lib/src/device.dart FILE: ../../../fuchsia/sdk/linux/dart/sl4f/lib/src/diagnostics.dart From 44875f208b91181c9506ae0b41293cbbfd9142ff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Oct 2023 06:02:15 +0000 Subject: [PATCH 542/859] Bump ossf/scorecard-action from 2.1.3 to 2.3.0 (#46701) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.1.3 to 2.3.0.
Release notes

Sourced from ossf/scorecard-action's releases.

v2.3.0

What's Changed

Documentation

New Contributors

Full Changelog: https://github.com/ossf/scorecard-action/compare/v2.2.0...v2.3.0

v2.2.0

What's Changed

Scorecard Result Viewer

Thanks to contributions from @​cynthia-sg and @​tegioz at CLOMonitor, there is a new Scorecard Result visualization page at https://securityscorecards.dev/viewer/?uri=<project-url>.

As an example, you can see our own score visualized here Checkout our README to learn how to link your README badge to the new visualization page.

Publishing Results

This release contains two fixes which will improve the user experience when publish_results is true

Docs

New Contributors

Full Changelog: https://github.com/ossf/scorecard-action/compare/v2.1.3...v2.2.0

Commits
  • 483ef80 :seedling: Bump docker tag for v2.3.0 release. (#1271)
  • 5d35913 :seedling: Bump github.com/ossf/scorecard/v4 from v4.11.0 to v4.13.0 (#1270)
  • 49787a6 :seedling: Bump distroless/base from 46c5b9b to a35b652 (#1269)
  • 4283c75 :seedling: Bump github/codeql-action from 2.21.8 to 2.21.9 (#1268)
  • 709ecd0 :seedling: Bump golang from 6974950 to c416cee (#1266)
  • 25bb02c :seedling: Bump actions/checkout from 4.0.0 to 4.1.0 (#1267)
  • b687393 :seedling: Bump github/codeql-action from 2.21.5 to 2.21.8 (#1265)
  • 6a1c21f :seedling: Bump golang from cffaba7 to 6974950 (#1264)
  • 2dee8c1 :seedling: Bump github.com/sigstore/cosign/v2 from 2.1.1 to 2.2.0 (#1254)
  • e79dcb6 :seedling: Upgrade to go 1.20 (#1262)
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ossf/scorecard-action&package-manager=github_actions&previous-version=2.1.3&new-version=2.3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- .github/workflows/scorecards-analysis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scorecards-analysis.yml b/.github/workflows/scorecards-analysis.yml index 95e9ba1fa6846..f74e8d5c75f29 100644 --- a/.github/workflows/scorecards-analysis.yml +++ b/.github/workflows/scorecards-analysis.yml @@ -26,7 +26,7 @@ jobs: with: persist-credentials: false - name: "Run analysis" - uses: ossf/scorecard-action@80e868c13c90f172d68d1f4501dee99e2479f7af + uses: ossf/scorecard-action@483ef80eb98fb506c348f7d62e28055e49fe2398 with: results_file: results.sarif results_format: sarif From c52e6c4fe78431adf62b5ce2d02b793187add174 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 10 Oct 2023 02:25:22 -0400 Subject: [PATCH 543/859] Roll Skia from 4378ce41f461 to c969e4aff32c (1 revision) (#46702) https://skia.googlesource.com/skia.git/+log/4378ce41f461..c969e4aff32c 2023-10-10 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from f9f3328bcef8 to 4cd74d52e02d If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,chinmaygarde@google.com,johnstiles@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 4e17da0cf755d..c46c5dce9a6d8 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '4378ce41f4616b2061a2bbc3d4d2f57be9955031', + 'skia_revision': 'c969e4aff32ca47ef0755c2a7d269a7a532a5ff3', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 2cea11c79cdb2d8b6cd1a2efc4b19e69e5a12805 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 10 Oct 2023 05:23:22 -0400 Subject: [PATCH 544/859] Roll Dart SDK from a471147f6237 to 0023fc324ff0 (1 revision) (#46704) https://dart.googlesource.com/sdk.git/+log/a471147f6237..0023fc324ff0 2023-10-10 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-5.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jsimmons@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index c46c5dce9a6d8..626ba1da148c4 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': 'a471147f6237b52ca1951df3db7f7d1b6e9db526', + 'dart_revision': '0023fc324ff08c77cd56d90a1db8af55879c9d38', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py From 72ae59f5d311c91ddbf2a83cbc5babdd1ce3cf8d Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 10 Oct 2023 08:52:22 -0400 Subject: [PATCH 545/859] Roll Skia from c969e4aff32c to ea839690b97d (1 revision) (#46708) https://skia.googlesource.com/skia.git/+log/c969e4aff32c..ea839690b97d 2023-10-10 kjlubick@google.com Remove GrSurfaceInfo If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/DEPS b/DEPS index 626ba1da148c4..3081fed57a383 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'c969e4aff32ca47ef0755c2a7d269a7a532a5ff3', + 'skia_revision': 'ea839690b97d34e9e24b4237dd0a1522073d8591', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index a543ae1a9877b..76fda2896d081 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: fb5883a71c45eeef7a1dfd4e67517a74 +Signature: 7dc84feb910de83ff45abc19a3297659 ==================================================================================================== LIBRARY: etc1 @@ -386,6 +386,7 @@ FILE: ../../../third_party/skia/modules/pathkit/perf/pathops.bench.js FILE: ../../../third_party/skia/modules/pathkit/perf/perfReporter.js FILE: ../../../third_party/skia/modules/skparagraph/test.html FILE: ../../../third_party/skia/package-lock.json +FILE: ../../../third_party/skia/relnotes/grsurface-info.md FILE: ../../../third_party/skia/relnotes/mesh.md FILE: ../../../third_party/skia/relnotes/readbuffer-deserial.md FILE: ../../../third_party/skia/relnotes/vk-directcontext.md @@ -7314,7 +7315,6 @@ ORIGIN: ../../../third_party/skia/gm/mesh.cpp + ../../../third_party/skia/LICENS ORIGIN: ../../../third_party/skia/include/core/SkBlender.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/core/SkMesh.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/effects/SkBlenders.h + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/include/gpu/GrSurfaceInfo.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/gpu/ShaderErrorHandler.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/gpu/gl/egl/GrGLMakeEGLInterface.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/gpu/gl/glx/GrGLMakeGLXInterface.h + ../../../third_party/skia/LICENSE @@ -7351,7 +7351,6 @@ ORIGIN: ../../../third_party/skia/src/gpu/ganesh/GrMeshDrawTarget.cpp + ../../.. ORIGIN: ../../../third_party/skia/src/gpu/ganesh/GrMeshDrawTarget.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/GrOpsTypes.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/GrPersistentCacheUtils.cpp + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/src/gpu/ganesh/GrSurfaceInfo.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/GrWritePixelsRenderTask.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/GrWritePixelsRenderTask.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/GrYUVATextureProxies.cpp + ../../../third_party/skia/LICENSE @@ -7531,7 +7530,6 @@ FILE: ../../../third_party/skia/gm/mesh.cpp FILE: ../../../third_party/skia/include/core/SkBlender.h FILE: ../../../third_party/skia/include/core/SkMesh.h FILE: ../../../third_party/skia/include/effects/SkBlenders.h -FILE: ../../../third_party/skia/include/gpu/GrSurfaceInfo.h FILE: ../../../third_party/skia/include/gpu/ShaderErrorHandler.h FILE: ../../../third_party/skia/include/gpu/gl/egl/GrGLMakeEGLInterface.h FILE: ../../../third_party/skia/include/gpu/gl/glx/GrGLMakeGLXInterface.h @@ -7568,7 +7566,6 @@ FILE: ../../../third_party/skia/src/gpu/ganesh/GrMeshDrawTarget.cpp FILE: ../../../third_party/skia/src/gpu/ganesh/GrMeshDrawTarget.h FILE: ../../../third_party/skia/src/gpu/ganesh/GrOpsTypes.h FILE: ../../../third_party/skia/src/gpu/ganesh/GrPersistentCacheUtils.cpp -FILE: ../../../third_party/skia/src/gpu/ganesh/GrSurfaceInfo.cpp FILE: ../../../third_party/skia/src/gpu/ganesh/GrWritePixelsRenderTask.cpp FILE: ../../../third_party/skia/src/gpu/ganesh/GrWritePixelsRenderTask.h FILE: ../../../third_party/skia/src/gpu/ganesh/GrYUVATextureProxies.cpp From defcdb4ac9a69fb65c19dd7d54c9e375299fbd4b Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 10 Oct 2023 09:23:10 -0400 Subject: [PATCH 546/859] Roll Dart SDK from 0023fc324ff0 to 0732be6b823a (1 revision) (#46709) https://dart.googlesource.com/sdk.git/+log/0023fc324ff0..0732be6b823a 2023-10-10 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-6.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jsimmons@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 3081fed57a383..746a293ee360c 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '0023fc324ff08c77cd56d90a1db8af55879c9d38', + 'dart_revision': '0732be6b823a506ffedebb91493bf3a4f584ba6f', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py From af91e5a79bf16bfec8cb9e730d9d07de4685af51 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 10 Oct 2023 09:53:23 -0400 Subject: [PATCH 547/859] Roll Skia from ea839690b97d to 6cfbb3a0809e (2 revisions) (#46710) https://skia.googlesource.com/skia.git/+log/ea839690b97d..6cfbb3a0809e 2023-10-10 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 4039a4c6188f to 457fc7591f3c (6 revisions) 2023-10-10 kjlubick@google.com Remove SkBase64 from public API If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/DEPS b/DEPS index 746a293ee360c..4177a5eab13aa 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'ea839690b97d34e9e24b4237dd0a1522073d8591', + 'skia_revision': '6cfbb3a0809e4d6d77bdf5dd43a4722efd193429', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 76fda2896d081..890681e1f29b5 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 7dc84feb910de83ff45abc19a3297659 +Signature: c8de6749e6f74d4cf0c5d1678c656e3c ==================================================================================================== LIBRARY: etc1 @@ -386,6 +386,7 @@ FILE: ../../../third_party/skia/modules/pathkit/perf/pathops.bench.js FILE: ../../../third_party/skia/modules/pathkit/perf/perfReporter.js FILE: ../../../third_party/skia/modules/skparagraph/test.html FILE: ../../../third_party/skia/package-lock.json +FILE: ../../../third_party/skia/relnotes/base64.md FILE: ../../../third_party/skia/relnotes/grsurface-info.md FILE: ../../../third_party/skia/relnotes/mesh.md FILE: ../../../third_party/skia/relnotes/readbuffer-deserial.md @@ -645,10 +646,11 @@ ORIGIN: ../../../third_party/skia/include/private/base/SkNoncopyable.h + ../../. ORIGIN: ../../../third_party/skia/include/private/base/SkPoint_impl.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/private/base/SkTDArray.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/private/base/SkTemplates.h + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/include/utils/SkBase64.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/utils/SkCamera.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/utils/SkParse.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/utils/SkParsePath.h + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/base/SkBase64.cpp + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/base/SkBase64.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/base/SkBuffer.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/base/SkBuffer.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/base/SkDeque.cpp + ../../../third_party/skia/LICENSE @@ -741,7 +743,6 @@ ORIGIN: ../../../third_party/skia/src/ports/SkTypeface_mac_ct.cpp + ../../../thi ORIGIN: ../../../third_party/skia/src/shaders/SkBitmapProcShader.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/shaders/SkBlendShader.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/shaders/SkShader.cpp + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/src/utils/SkBase64.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/utils/SkCamera.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/utils/SkParse.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/utils/SkParseColor.cpp + ../../../third_party/skia/LICENSE @@ -791,10 +792,11 @@ FILE: ../../../third_party/skia/include/private/base/SkNoncopyable.h FILE: ../../../third_party/skia/include/private/base/SkPoint_impl.h FILE: ../../../third_party/skia/include/private/base/SkTDArray.h FILE: ../../../third_party/skia/include/private/base/SkTemplates.h -FILE: ../../../third_party/skia/include/utils/SkBase64.h FILE: ../../../third_party/skia/include/utils/SkCamera.h FILE: ../../../third_party/skia/include/utils/SkParse.h FILE: ../../../third_party/skia/include/utils/SkParsePath.h +FILE: ../../../third_party/skia/src/base/SkBase64.cpp +FILE: ../../../third_party/skia/src/base/SkBase64.h FILE: ../../../third_party/skia/src/base/SkBuffer.cpp FILE: ../../../third_party/skia/src/base/SkBuffer.h FILE: ../../../third_party/skia/src/base/SkDeque.cpp @@ -887,7 +889,6 @@ FILE: ../../../third_party/skia/src/ports/SkTypeface_mac_ct.cpp FILE: ../../../third_party/skia/src/shaders/SkBitmapProcShader.h FILE: ../../../third_party/skia/src/shaders/SkBlendShader.cpp FILE: ../../../third_party/skia/src/shaders/SkShader.cpp -FILE: ../../../third_party/skia/src/utils/SkBase64.cpp FILE: ../../../third_party/skia/src/utils/SkCamera.cpp FILE: ../../../third_party/skia/src/utils/SkParse.cpp FILE: ../../../third_party/skia/src/utils/SkParseColor.cpp From c7016b03d7548604d3a38c4329dbae472b140d99 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 10 Oct 2023 10:30:25 -0400 Subject: [PATCH 548/859] Roll Skia from 6cfbb3a0809e to c497dae2fedb (2 revisions) (#46711) https://skia.googlesource.com/skia.git/+log/6cfbb3a0809e..c497dae2fedb 2023-10-10 johnstiles@google.com Fix filename spelling. 2023-10-10 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Dawn from d3e7b9b7ad6a to 3b1bca8c657b (14 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 4177a5eab13aa..01a30e9e9165f 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '6cfbb3a0809e4d6d77bdf5dd43a4722efd193429', + 'skia_revision': 'c497dae2fedb127770ae44a607e0a5b4d296e72f', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 490c85465e36fcad00e2171577b8464c3bfc98a6 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 10 Oct 2023 11:26:25 -0400 Subject: [PATCH 549/859] Roll Fuchsia Mac SDK from EYr1hCR6hxkSGhtis... to oTiMPVe_PvyCYnlqR... (#46713) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jsimmons@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 01a30e9e9165f..91e3e64b4c8b0 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'EYr1hCR6hxkSGhtis6Jsd4HKgC8lSbjnOoNM6Puti18C' + 'version': 'oTiMPVe_PvyCYnlqRZoQj2wnTcOeuoGspBRwax43t0MC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 4a1660992fc1cde6fdd0f1069df051e4562de4be Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 10 Oct 2023 12:10:09 -0400 Subject: [PATCH 550/859] Roll Skia from c497dae2fedb to c634411c51e6 (1 revision) (#46714) https://skia.googlesource.com/skia.git/+log/c497dae2fedb..c634411c51e6 2023-10-10 lokokung@google.com [webgpu-headers] Add macros to prepare for removing signalValue arg. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 91e3e64b4c8b0..200920f53dbd7 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'c497dae2fedb127770ae44a607e0a5b4d296e72f', + 'skia_revision': 'c634411c51e63bbdaaa82bbadf5e7f0de35f5a61', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 890681e1f29b5..16b5624c191ed 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: c8de6749e6f74d4cf0c5d1678c656e3c +Signature: d22c58a2a6558945585bfc81d7517149 ==================================================================================================== LIBRARY: etc1 From 2d63ae2563277252b5b0915e078a745223f985b6 Mon Sep 17 00:00:00 2001 From: gaaclarke <30870216+gaaclarke@users.noreply.github.com> Date: Tue, 10 Oct 2023 09:10:12 -0700 Subject: [PATCH 551/859] [Impeller] made window size parametric in playground/golden tests (#46682) In https://github.com/flutter/flutter/issues/136058#issuecomment-1751507094 it was seen that some bugs manifest only with viewports of certain sizes. This allows writers of tests to adjust the window size for playgrounds and golden image tests. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- impeller/golden_tests/golden_playground_test.h | 3 +++ impeller/golden_tests/golden_playground_test_mac.cc | 4 ++++ impeller/golden_tests/golden_playground_test_stub.cc | 2 ++ impeller/playground/playground.h | 4 ++-- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/impeller/golden_tests/golden_playground_test.h b/impeller/golden_tests/golden_playground_test.h index 9754d943be655..0124d86108ea9 100644 --- a/impeller/golden_tests/golden_playground_test.h +++ b/impeller/golden_tests/golden_playground_test.h @@ -57,6 +57,9 @@ class GoldenPlaygroundTest ISize GetWindowSize() const; + protected: + void SetWindowSize(ISize size); + private: #if FML_OS_MACOSX // This must be placed first so that the autorelease pool is not destroyed diff --git a/impeller/golden_tests/golden_playground_test_mac.cc b/impeller/golden_tests/golden_playground_test_mac.cc index 1ffc25388b585..686b1956987cd 100644 --- a/impeller/golden_tests/golden_playground_test_mac.cc +++ b/impeller/golden_tests/golden_playground_test_mac.cc @@ -194,4 +194,8 @@ ISize GoldenPlaygroundTest::GetWindowSize() const { return pimpl_->window_size; } +void GoldenPlaygroundTest::GoldenPlaygroundTest::SetWindowSize(ISize size) { + pimpl_->window_size = size; +} + } // namespace impeller diff --git a/impeller/golden_tests/golden_playground_test_stub.cc b/impeller/golden_tests/golden_playground_test_stub.cc index fe7a931c112f9..7827d9c5e1007 100644 --- a/impeller/golden_tests/golden_playground_test_stub.cc +++ b/impeller/golden_tests/golden_playground_test_stub.cc @@ -64,4 +64,6 @@ ISize GoldenPlaygroundTest::GetWindowSize() const { return ISize(); } +void GoldenPlaygroundTest::SetWindowSize(ISize size) {} + } // namespace impeller diff --git a/impeller/playground/playground.h b/impeller/playground/playground.h index 039777a590a55..27b483f6d2da3 100644 --- a/impeller/playground/playground.h +++ b/impeller/playground/playground.h @@ -92,6 +92,8 @@ class Playground { virtual bool ShouldKeepRendering() const; + void SetWindowSize(ISize size); + private: struct GLFWInitializer; @@ -105,8 +107,6 @@ class Playground { void SetCursorPosition(Point pos); - void SetWindowSize(ISize size); - FML_DISALLOW_COPY_AND_ASSIGN(Playground); }; From 1d0988fe18d17d0e708ec4e91efa3b51b54934be Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 10 Oct 2023 12:52:59 -0400 Subject: [PATCH 552/859] Roll Skia from c634411c51e6 to f0653c4a2df5 (1 revision) (#46716) https://skia.googlesource.com/skia.git/+log/c634411c51e6..f0653c4a2df5 2023-10-10 johnstiles@google.com Remove GMVerifier class from DM. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/DEPS b/DEPS index 200920f53dbd7..b161a397a1172 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'c634411c51e63bbdaaa82bbadf5e7f0de35f5a61', + 'skia_revision': 'f0653c4a2df51afc85bdea0ffa404de4b1b368f0', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 16b5624c191ed..8ed2b01998ef8 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: d22c58a2a6558945585bfc81d7517149 +Signature: 7b9cb92153281c1533ce0578c796f09c ==================================================================================================== LIBRARY: etc1 @@ -6392,8 +6392,6 @@ ORIGIN: ../../../third_party/skia/gm/exoticformats.cpp + ../../../third_party/sk ORIGIN: ../../../third_party/skia/gm/rsxtext.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/skbug_9819.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/strokerect_anisotropic.cpp + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/gm/verifiers/gmverifier.cpp + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/gm/verifiers/gmverifier.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/widebuttcaps.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/core/SkM44.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/core/SkSamplingOptions.h + ../../../third_party/skia/LICENSE @@ -6525,8 +6523,6 @@ FILE: ../../../third_party/skia/gm/exoticformats.cpp FILE: ../../../third_party/skia/gm/rsxtext.cpp FILE: ../../../third_party/skia/gm/skbug_9819.cpp FILE: ../../../third_party/skia/gm/strokerect_anisotropic.cpp -FILE: ../../../third_party/skia/gm/verifiers/gmverifier.cpp -FILE: ../../../third_party/skia/gm/verifiers/gmverifier.h FILE: ../../../third_party/skia/gm/widebuttcaps.cpp FILE: ../../../third_party/skia/include/core/SkM44.h FILE: ../../../third_party/skia/include/core/SkSamplingOptions.h From b2fc0e76dc77b15020fe26dad58b313f815716d0 Mon Sep 17 00:00:00 2001 From: Jim Graham Date: Tue, 10 Oct 2023 10:12:48 -0700 Subject: [PATCH 553/859] use TextFrame calls for Impeller in rendertests (#46696) Switch the impeller testing in rendertests to use TextFrame objects rather than TextBlob objects when drawing to an Impeller-managed destination. Previously the DrawText tests would generate over 200 errors because none of the attribute variants would render anything at all. After this fix the number of failures in the DrawText calls is down to 1 which points out that wrapping a DrawTextFrame call in a nothing saveLayer somehow affects the glyph positioning (in a not very appealing manner). --- display_list/BUILD.gn | 1 + .../testing/dl_rendering_unittests.cc | 94 ++++++++++++++----- testing/display_list_testing.cc | 24 +++-- third_party/txt/src/skia/paragraph_skia.cc | 2 +- 4 files changed, 92 insertions(+), 29 deletions(-) diff --git a/display_list/BUILD.gn b/display_list/BUILD.gn index 736e13dc5c7bb..1ec13109d0d83 100644 --- a/display_list/BUILD.gn +++ b/display_list/BUILD.gn @@ -155,6 +155,7 @@ if (enable_unittests) { "//flutter/common/graphics", "//flutter/display_list/testing:display_list_surface_provider", "//flutter/display_list/testing:display_list_testing", + "//flutter/impeller/typographer/backends/skia:typographer_skia_backend", "//flutter/testing", ] diff --git a/display_list/testing/dl_rendering_unittests.cc b/display_list/testing/dl_rendering_unittests.cc index 72ab52870a900..1704db6488361 100644 --- a/display_list/testing/dl_rendering_unittests.cc +++ b/display_list/testing/dl_rendering_unittests.cc @@ -16,6 +16,9 @@ #include "flutter/fml/math.h" #include "flutter/testing/display_list_testing.h" #include "flutter/testing/testing.h" +#ifdef IMPELLER_SUPPORTS_RENDERING +#include "flutter/impeller/typographer/backends/skia/text_frame_skia.h" +#endif // IMPELLER_SUPPORTS_RENDERING #include "third_party/skia/include/core/SkBBHFactory.h" #include "third_party/skia/include/core/SkColorFilter.h" @@ -592,16 +595,11 @@ class RenderEnvironment { return RenderEnvironment(provider, PixelFormat::kN32PremulPixelFormat); } - void init_ref(SkRenderer& sk_renderer, - DlRenderer& dl_renderer, - DlColor bg = DlColor::kTransparent()) { - init_ref(kEmptySkSetup, sk_renderer, kEmptyDlSetup, dl_renderer, bg); - } - void init_ref(SkSetup& sk_setup, SkRenderer& sk_renderer, DlSetup& dl_setup, DlRenderer& dl_renderer, + DlRenderer& imp_renderer, DlColor bg = DlColor::kTransparent()) { SkJobRenderer sk_job(sk_setup, sk_renderer, kEmptySkRenderer, kTestSkImage); RenderJobInfo info = { @@ -617,7 +615,7 @@ class RenderEnvironment { ASSERT_EQ(sk_job.setup_clip_bounds(), ref_clip_bounds_); if (provider_->supports_impeller()) { test_impeller_image_ = makeTestImpellerImage(provider_); - DlJobRenderer imp_job(dl_setup, dl_renderer, kEmptyDlRenderer, + DlJobRenderer imp_job(dl_setup, imp_renderer, kEmptyDlRenderer, test_impeller_image_); ref_impeller_result_ = getImpellerResult(info, imp_job); } @@ -818,11 +816,34 @@ class TestParameters { TestParameters(const SkRenderer& sk_renderer, const DlRenderer& dl_renderer, const DisplayListAttributeFlags& flags) - : sk_renderer_(sk_renderer), dl_renderer_(dl_renderer), flags_(flags) {} + : TestParameters(sk_renderer, dl_renderer, dl_renderer, flags) {} + + TestParameters(const SkRenderer& sk_renderer, + const DlRenderer& dl_renderer, + const DlRenderer& imp_renderer, + const DisplayListAttributeFlags& flags) + : sk_renderer_(sk_renderer), + dl_renderer_(dl_renderer), + imp_renderer_(imp_renderer), + flags_(flags) {} bool uses_paint() const { return !flags_.ignores_paint(); } bool uses_gradient() const { return flags_.applies_shader(); } + bool impeller_compatible(const DlPaint& paint) const { + if (is_draw_text_blob()) { + // Non-color text is rendered as paths + if (paint.getColorSourcePtr() && !paint.getColorSourcePtr()->asColor()) { + return false; + } + // Non-filled text (stroke or stroke and fill) is rendered as paths + if (paint.getDrawStyle() != DlDrawStyle::kFill) { + return false; + } + } + return true; + } + bool should_match(const RenderEnvironment& env, const CaseParameters& caseP, const DlPaint& attr, @@ -1015,6 +1036,7 @@ class TestParameters { const SkRenderer& sk_renderer() const { return sk_renderer_; } const DlRenderer& dl_renderer() const { return dl_renderer_; } + const DlRenderer& imp_renderer() const { return imp_renderer_; } // Tests that call drawTextBlob with an sk_ref paint attribute will cause // those attributes to be stored in an internal Skia cache so we need @@ -1065,6 +1087,7 @@ class TestParameters { private: const SkRenderer sk_renderer_; const DlRenderer dl_renderer_; + const DlRenderer imp_renderer_; const DisplayListAttributeFlags flags_; bool is_draw_text_blob_ = false; @@ -1110,7 +1133,8 @@ class CanvasCompareTester { for (auto& back_end : kTestBackends) { auto provider = GetProvider(back_end); RenderEnvironment env = RenderEnvironment::MakeN32(provider.get()); - env.init_ref(params.sk_renderer(), params.dl_renderer()); + env.init_ref(kEmptySkSetup, params.sk_renderer(), // + kEmptyDlSetup, params.dl_renderer(), params.imp_renderer()); quickCompareToReference(env, "default"); if (env.supports_impeller()) { auto impeller_result = env.ref_impeller_result(); @@ -1279,7 +1303,8 @@ class CanvasCompareTester { ctx.paint.setAlpha(ctx.paint.getAlpha() / 2); }; backdrop_env.init_ref(sk_backdrop_setup, testP.sk_renderer(), - dl_backdrop_setup, testP.dl_renderer()); + dl_backdrop_setup, testP.dl_renderer(), + testP.imp_renderer()); quickCompareToReference(backdrop_env, "backdrop"); DlBlurImageFilter dl_backdrop(5, 5, DlTileMode::kDecal); @@ -1463,7 +1488,7 @@ class CanvasCompareTester { [=](const SkSetupContext& ctx) { sk_aa_setup(ctx, false); }, testP.sk_renderer(), [=](const DlSetupContext& ctx) { dl_aa_setup(ctx, false); }, - testP.dl_renderer()); + testP.dl_renderer(), testP.imp_renderer()); quickCompareToReference(aa_env, "AntiAlias"); RenderWith( testP, aa_env, aa_tolerance, @@ -1547,7 +1572,8 @@ class CanvasCompareTester { ctx.paint.setStrokeWidth(5.0); }; blur_env.init_ref(sk_blur_setup, testP.sk_renderer(), // - dl_blur_setup, testP.dl_renderer()); + dl_blur_setup, testP.dl_renderer(), + testP.imp_renderer()); quickCompareToReference(blur_env, "blur"); DlBlurImageFilter dl_filter_decal_5(5.0, 5.0, DlTileMode::kDecal); auto sk_filter_decal_5 = @@ -1598,7 +1624,8 @@ class CanvasCompareTester { ctx.paint.setStrokeWidth(5.0); }; dilate_env.init_ref(sk_dilate_setup, testP.sk_renderer(), // - dl_dilate_setup, testP.dl_renderer()); + dl_dilate_setup, testP.dl_renderer(), + testP.imp_renderer()); quickCompareToReference(dilate_env, "dilate"); DlDilateImageFilter dl_dilate_filter_5(5.0, 5.0); auto sk_dilate_filter_5 = SkImageFilters::Dilate(5.0, 5.0, nullptr); @@ -1629,7 +1656,8 @@ class CanvasCompareTester { ctx.paint.setStrokeWidth(6.0); }; erode_env.init_ref(sk_erode_setup, testP.sk_renderer(), // - dl_erode_setup, testP.dl_renderer()); + dl_erode_setup, testP.dl_renderer(), + testP.imp_renderer()); quickCompareToReference(erode_env, "erode"); // do not erode too much, because some tests assert there are enough // pixels that are changed. @@ -1779,7 +1807,8 @@ class CanvasCompareTester { ctx.paint.setStrokeWidth(5.0); }; dither_env.init_ref(sk_dither_setup, testP.sk_renderer(), - dl_dither_setup, testP.dl_renderer(), dither_bg); + dl_dither_setup, testP.dl_renderer(), + testP.imp_renderer(), dither_bg); quickCompareToReference(dither_env, "dither"); RenderWith(testP, dither_env, tolerance, CaseParameters( @@ -1875,7 +1904,8 @@ class CanvasCompareTester { ctx.paint.setStrokeWidth(5.0); }; stroke_base_env.init_ref(sk_stroke_setup, testP.sk_renderer(), - dl_stroke_setup, testP.dl_renderer()); + dl_stroke_setup, testP.dl_renderer(), + testP.imp_renderer()); quickCompareToReference(stroke_base_env, "stroke"); RenderWith(testP, stroke_base_env, tolerance, @@ -2296,10 +2326,16 @@ class CanvasCompareTester { info + " (attribute should affect rendering)"); } - if (env.supports_impeller()) { - DlJobRenderer imp_job(caseP.dl_setup(), // - testP.dl_renderer(), // - caseP.dl_restore(), // + // If either the reference setup or the test setup contain attributes + // that Impeller doesn't support, we skip the Impeller testing. This + // is mostly stroked or patterned text which is vectored through drawPath + // for Impeller. + if (env.supports_impeller() && + testP.impeller_compatible(dl_job.setup_paint()) && + testP.impeller_compatible(env.ref_dl_paint())) { + DlJobRenderer imp_job(caseP.dl_setup(), // + testP.imp_renderer(), // + caseP.dl_restore(), // env.impeller_image()); auto imp_result = env.getImpellerResult(base_info, imp_job); std::string imp_info = info + " (Impeller)"; @@ -2317,7 +2353,8 @@ class CanvasCompareTester { imp_info + " (attribute should affect rendering)"); } if (!success) { - FML_LOG(ERROR) << "Impeller issue encountered for: " << *display_list; + FML_LOG(ERROR) << "Impeller issue encountered for: " + << *imp_job.MakeDisplayList(base_info); std::string filename = to_png_filename(info + " (Impeller Output)"); imp_result->write(filename); FML_LOG(ERROR) << "output saved in: " << filename; @@ -3621,6 +3658,9 @@ TEST_F(DisplayListRendering, DrawTextBlob) { #else sk_sp blob = CanvasCompareTester::MakeTextBlob("Testing", kRenderHeight * 0.33f); +#ifdef IMPELLER_SUPPORTS_RENDERING + auto frame = impeller::MakeTextFrameFromTextBlobSkia(blob); +#endif // IMPELLER_SUPPORTS_RENDERING SkScalar render_y_1_3 = kRenderTop + kRenderHeight * 0.3; SkScalar render_y_2_3 = kRenderTop + kRenderHeight * 0.6; CanvasCompareTester::RenderAll( // @@ -3637,6 +3677,14 @@ TEST_F(DisplayListRendering, DrawTextBlob) { ctx.canvas->DrawTextBlob(blob, kRenderLeft, render_y_2_3, paint); ctx.canvas->DrawTextBlob(blob, kRenderLeft, kRenderBottom, paint); }, +#ifdef IMPELLER_SUPPORTS_RENDERING + [=](const DlRenderContext& ctx) { + auto paint = ctx.paint; + ctx.canvas->DrawTextFrame(frame, kRenderLeft, render_y_1_3, paint); + ctx.canvas->DrawTextFrame(frame, kRenderLeft, render_y_2_3, paint); + ctx.canvas->DrawTextFrame(frame, kRenderLeft, kRenderBottom, paint); + }, +#endif // IMPELLER_SUPPORTS_RENDERING kDrawTextBlobFlags) .set_draw_text_blob(), // From examining the bounds differential for the "Default" case, the @@ -3766,7 +3814,9 @@ TEST_F(DisplayListRendering, SaveLayerClippedContentStillFilters) { for (auto& back_end : CanvasCompareTester::kTestBackends) { auto provider = CanvasCompareTester::GetProvider(back_end); RenderEnvironment env = RenderEnvironment::MakeN32(provider.get()); - env.init_ref(test_params.sk_renderer(), test_params.dl_renderer()); + env.init_ref(kEmptySkSetup, test_params.sk_renderer(), // + kEmptyDlSetup, test_params.dl_renderer(), + test_params.imp_renderer()); CanvasCompareTester::quickCompareToReference(env, "default"); CanvasCompareTester::RenderWith(test_params, env, tolerance, case_params); } diff --git a/testing/display_list_testing.cc b/testing/display_list_testing.cc index c18d618209280..1fa3561ddd45e 100644 --- a/testing/display_list_testing.cc +++ b/testing/display_list_testing.cc @@ -287,6 +287,17 @@ static std::ostream& operator<<(std::ostream& os, const SkTextBlob* blob) { return os << "&SkTextBlob(ID: " << blob->uniqueID() << ", " << blob->bounds() << ")"; } +static std::ostream& operator<<(std::ostream& os, + const impeller::TextFrame* frame) { + if (frame == nullptr) { + return os << "no text"; + } + auto bounds = frame->GetBounds(); + return os << "&TextFrame(" + << bounds.GetLeft() << ", " << bounds.GetTop() << " => " + << bounds.GetRight() << ", " << bounds.GetBottom() << ")"; +} + std::ostream& operator<<(std::ostream& os, const DlVertexMode& mode) { switch (mode) { case DlVertexMode::kTriangles: return os << "VertexMode::kTriangles"; @@ -860,12 +871,13 @@ void DisplayListStreamDispatcher::drawTextBlob(const sk_sp blob, << x << ", " << y << ");" << std::endl; } -void DisplayListStreamDispatcher::drawTextFrame(const std::shared_ptr& text_frame, - SkScalar x, - SkScalar y) { - startl() << "drawTextFrame(" - << text_frame.get() << ", " - << x << ", " << y << ");" << std::endl; +void DisplayListStreamDispatcher::drawTextFrame( + const std::shared_ptr& text_frame, + SkScalar x, + SkScalar y) { + startl() << "drawTextFrame(" + << text_frame.get() << ", " + << x << ", " << y << ");" << std::endl; } void DisplayListStreamDispatcher::drawShadow(const SkPath& path, diff --git a/third_party/txt/src/skia/paragraph_skia.cc b/third_party/txt/src/skia/paragraph_skia.cc index d1dc525909a25..67d67b1a04d2b 100644 --- a/third_party/txt/src/skia/paragraph_skia.cc +++ b/third_party/txt/src/skia/paragraph_skia.cc @@ -213,7 +213,7 @@ class DisplayListParagraphPainter : public skt::ParagraphPainter { // filters rely on having the glyph coverage, whereas regular text is // drawn as rectangular texture samples. return ((paint.getColorSource() && !paint.getColorSource()->asColor()) || - paint.getDrawStyle() == DlDrawStyle::kStroke); + paint.getDrawStyle() != DlDrawStyle::kFill); } DlPaint toDlPaint(const DecorationStyle& decor_style, From c8fedbc6c5cb7875f774ec7df68742ff001dfeba Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 10 Oct 2023 14:22:49 -0400 Subject: [PATCH 554/859] Roll Skia from f0653c4a2df5 to 475286f0f6f1 (2 revisions) (#46721) https://skia.googlesource.com/skia.git/+log/f0653c4a2df5..475286f0f6f1 2023-10-10 nigeltao@google.com SkWuffsCodec: add another "Roll third_party/wuffs" workaround 2023-10-10 johnstiles@google.com Fix fuzzer-discovered assertion in WGSL code generator. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index b161a397a1172..14c2069daf802 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'f0653c4a2df51afc85bdea0ffa404de4b1b368f0', + 'skia_revision': '475286f0f6f1aa711478328e70eceb1d90b36b68', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 8ed2b01998ef8..c9ff21c742ba8 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 7b9cb92153281c1533ce0578c796f09c +Signature: 3db78332e108f2388e744755df815e3e ==================================================================================================== LIBRARY: etc1 From 4820f84ccc6fbaa94760baf44f16ff3885efa61f Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Tue, 10 Oct 2023 12:10:11 -0700 Subject: [PATCH 555/859] [Impeller] Implement framebuffer fetch support for OpenGLES. (#46585) https://github.com/flutter/flutter/issues/120223 for OpenGLES. Checks for support of the framebuffer fetch extension: https://registry.khronos.org/OpenGL/extensions/EXT/EXT_shader_framebuffer_fetch.txt . This is supported on a Pixel 6 at least, we should double check the distribution of the extension. ![d3c](https://github.com/flutter/engine/assets/8975114/d2392dc8-e1b1-4084-ac5d-c5744c651a39) --- impeller/compiler/compiler.cc | 4 + impeller/compiler/impellerc_main.cc | 1 + impeller/compiler/source_options.h | 5 + impeller/compiler/switches.cc | 5 +- impeller/compiler/switches.h | 3 +- impeller/entity/BUILD.gn | 13 +- .../contents/framebuffer_blend_contents.cc | 8 +- .../blending/ios/framebuffer_blend.glsl | 25 +- .../backend/gles/capabilities_gles.cc | 22 +- .../renderer/backend/gles/capabilities_gles.h | 1 + .../backend/gles/pipeline_library_gles.h | 2 +- .../gles/test/capabilities_unittests.cc | 11 + impeller/tools/impeller.gni | 24 +- impeller/tools/malioc.json | 1207 ----------------- .../android/android_context_gl_impeller.cc | 4 + 15 files changed, 94 insertions(+), 1241 deletions(-) diff --git a/impeller/compiler/compiler.cc b/impeller/compiler/compiler.cc index a5a2afb6d6ed0..fa8cbc865d658 100644 --- a/impeller/compiler/compiler.cc +++ b/impeller/compiler/compiler.cc @@ -155,6 +155,10 @@ static CompilerBackend CreateGLSLCompiler(const spirv_cross::ParsedIR& ir, ? source_options.gles_language_version : 100; sl_options.es = true; + if (source_options.require_framebuffer_fetch && + source_options.type == SourceType::kFragmentShader) { + gl_compiler->remap_ext_framebuffer_fetch(0, 0, true); + } gl_compiler->set_variable_type_remap_callback( [&](const spirv_cross::SPIRType& type, const std::string& var_name, std::string& name_of_type) { diff --git a/impeller/compiler/impellerc_main.cc b/impeller/compiler/impellerc_main.cc index 14a78f6429a26..f09f323fae4f7 100644 --- a/impeller/compiler/impellerc_main.cc +++ b/impeller/compiler/impellerc_main.cc @@ -76,6 +76,7 @@ bool Main(const fml::CommandLine& command_line) { options.gles_language_version = switches.gles_language_version; options.metal_version = switches.metal_version; options.use_half_textures = switches.use_half_textures; + options.require_framebuffer_fetch = switches.require_framebuffer_fetch; Reflector::Options reflector_options; reflector_options.target_platform = switches.target_platform; diff --git a/impeller/compiler/source_options.h b/impeller/compiler/source_options.h index 797cb70a026f1..6c30194b58c24 100644 --- a/impeller/compiler/source_options.h +++ b/impeller/compiler/source_options.h @@ -33,6 +33,11 @@ struct SourceOptions { /// opengl semantics. Only used on metal targets. bool use_half_textures = false; + /// @brief Whether the GLSL framebuffer fetch extension will be required. + /// + /// Only used on OpenGLES targets. + bool require_framebuffer_fetch = false; + SourceOptions(); ~SourceOptions(); diff --git a/impeller/compiler/switches.cc b/impeller/compiler/switches.cc index 8be5b2b6ee974..c539ed423228f 100644 --- a/impeller/compiler/switches.cc +++ b/impeller/compiler/switches.cc @@ -75,6 +75,7 @@ void Switches::PrintHelp(std::ostream& stream) { stream << "[optional] --use-half-textures (force openGL semantics when " "targeting metal)" << std::endl; + stream << "[optional] --require-framebuffer-fetch" << std::endl; } Switches::Switches() = default; @@ -136,7 +137,9 @@ Switches::Switches(const fml::CommandLine& command_line) command_line.GetOptionValueWithDefault("metal-version", "1.2")), entry_point( command_line.GetOptionValueWithDefault("entry-point", "main")), - use_half_textures(command_line.HasOption("use-half-textures")) { + use_half_textures(command_line.HasOption("use-half-textures")), + require_framebuffer_fetch( + command_line.HasOption("require-framebuffer-fetch")) { auto language = command_line.GetOptionValueWithDefault("source-language", "glsl"); std::transform(language.begin(), language.end(), language.begin(), diff --git a/impeller/compiler/switches.h b/impeller/compiler/switches.h index 66884370b091d..e82bab6a07dac 100644 --- a/impeller/compiler/switches.h +++ b/impeller/compiler/switches.h @@ -37,12 +37,13 @@ struct Switches { std::string metal_version = ""; std::string entry_point = ""; bool use_half_textures = false; + bool require_framebuffer_fetch = false; Switches(); ~Switches(); - Switches(const fml::CommandLine& command_line); + explicit Switches(const fml::CommandLine& command_line); bool AreValid(std::ostream& explain) const; diff --git a/impeller/entity/BUILD.gn b/impeller/entity/BUILD.gn index cf26434a97fb2..b82162b305b10 100644 --- a/impeller/entity/BUILD.gn +++ b/impeller/entity/BUILD.gn @@ -103,6 +103,10 @@ impeller_shaders("modern_entity_shaders") { impeller_shaders("framebuffer_blend_entity_shaders") { name = "framebuffer_blend" + require_framebuffer_fetch = true + + # malioc does not support analyzing shaders that use the framebuffer fetch extension on some GPUs. + analyze = false if (is_mac && !is_ios) { # Note: this needs to correspond to the Apple7 Support family @@ -110,15 +114,6 @@ impeller_shaders("framebuffer_blend_entity_shaders") { metal_version = "2.3" } - # This version is to disable malioc checks. - if (impeller_enable_opengles) { - gles_language_version = 460 - } - - if (impeller_enable_vulkan) { - vulkan_language_version = 130 - } - shaders = [ "shaders/blending/ios/framebuffer_blend.vert", "shaders/blending/ios/framebuffer_blend_color.frag", diff --git a/impeller/entity/contents/framebuffer_blend_contents.cc b/impeller/entity/contents/framebuffer_blend_contents.cc index 6ff44cbe2c20b..1930497da2196 100644 --- a/impeller/entity/contents/framebuffer_blend_contents.cc +++ b/impeller/entity/contents/framebuffer_blend_contents.cc @@ -132,12 +132,10 @@ bool FramebufferBlendContents::Render(const ContentContext& renderer, FS::FragInfo frag_info; auto src_sampler_descriptor = src_snapshot->sampler_descriptor; - if (!renderer.GetDeviceCapabilities().SupportsDecalSamplerAddressMode()) { - // No known devices that support framebuffer fetch but not decal tile mode. - return false; + if (renderer.GetDeviceCapabilities().SupportsDecalSamplerAddressMode()) { + src_sampler_descriptor.width_address_mode = SamplerAddressMode::kDecal; + src_sampler_descriptor.height_address_mode = SamplerAddressMode::kDecal; } - src_sampler_descriptor.width_address_mode = SamplerAddressMode::kDecal; - src_sampler_descriptor.height_address_mode = SamplerAddressMode::kDecal; auto src_sampler = renderer.GetContext()->GetSamplerLibrary()->GetSampler( src_sampler_descriptor); FS::BindTextureSamplerSrc(cmd, src_snapshot->texture, src_sampler); diff --git a/impeller/entity/shaders/blending/ios/framebuffer_blend.glsl b/impeller/entity/shaders/blending/ios/framebuffer_blend.glsl index f67506b5603e2..67bd9cad8370e 100644 --- a/impeller/entity/shaders/blending/ios/framebuffer_blend.glsl +++ b/impeller/entity/shaders/blending/ios/framebuffer_blend.glsl @@ -9,7 +9,6 @@ #include #include -#ifdef IMPELLER_TARGET_METAL layout(set = 0, binding = 0, input_attachment_index = 0) uniform subpassInput uSub; @@ -17,12 +16,6 @@ layout(set = 0, vec4 ReadDestination() { return subpassLoad(uSub); } -#else - -vec4 ReadDestination() { - return vec4(0); -} -#endif uniform sampler2D texture_sampler_src; @@ -35,12 +28,20 @@ in vec2 v_src_texture_coords; out vec4 frag_color; +vec4 Sample(sampler2D texture_sampler, vec2 texture_coords) { +// gles 2.0 is the only backend without native decal support. +#ifdef IMPELLER_TARGET_OPENGLES + return IPSampleDecal(texture_sampler, texture_coords); +#else + return texture(texture_sampler, texture_coords); +#endif +} + void main() { - f16vec4 dst_sample = f16vec4(ReadDestination()); - f16vec4 dst = dst_sample; - f16vec4 src = f16vec4(texture(texture_sampler_src, // sampler - v_src_texture_coords // texture coordinates - )) * + f16vec4 dst = f16vec4(ReadDestination()); + f16vec4 src = f16vec4(Sample(texture_sampler_src, // sampler + v_src_texture_coords // texture coordinates + )) * frag_info.src_input_alpha; f16vec4 blended = mix(src, f16vec4(Blend(dst.rgb, src.rgb), dst.a), dst.a); diff --git a/impeller/renderer/backend/gles/capabilities_gles.cc b/impeller/renderer/backend/gles/capabilities_gles.cc index 45ad42e5ba447..37bd3e665d90d 100644 --- a/impeller/renderer/backend/gles/capabilities_gles.cc +++ b/impeller/renderer/backend/gles/capabilities_gles.cc @@ -8,6 +8,17 @@ namespace impeller { +// https://registry.khronos.org/OpenGL/extensions/EXT/EXT_shader_framebuffer_fetch.txt +static const constexpr char* kFramebufferFetchExt = + "GL_EXT_shader_framebuffer_fetch"; + +static const constexpr char* kTextureBorderClampExt = + "GL_EXT_texture_border_clamp"; +static const constexpr char* kNvidiaTextureBorderClampExt = + "GL_NV_texture_border_clamp"; +static const constexpr char* kOESTextureBorderClampExt = + "GL_OES_texture_border_clamp"; + CapabilitiesGLES::CapabilitiesGLES(const ProcTableGLES& gl) { { GLint value = 0; @@ -87,9 +98,12 @@ CapabilitiesGLES::CapabilitiesGLES(const ProcTableGLES& gl) { num_shader_binary_formats = value; } - if (gl.GetDescription()->HasExtension("GL_EXT_texture_border_clamp") || - gl.GetDescription()->HasExtension("GL_NV_texture_border_clamp") || - gl.GetDescription()->HasExtension("GL_OES_texture_border_clamp")) { + supports_framebuffer_fetch_ = + gl.GetDescription()->HasExtension(kFramebufferFetchExt); + + if (gl.GetDescription()->HasExtension(kTextureBorderClampExt) || + gl.GetDescription()->HasExtension(kNvidiaTextureBorderClampExt) || + gl.GetDescription()->HasExtension(kOESTextureBorderClampExt)) { supports_decal_sampler_address_mode_ = true; } } @@ -126,7 +140,7 @@ bool CapabilitiesGLES::SupportsTextureToTextureBlits() const { } bool CapabilitiesGLES::SupportsFramebufferFetch() const { - return false; + return supports_framebuffer_fetch_; } bool CapabilitiesGLES::SupportsCompute() const { diff --git a/impeller/renderer/backend/gles/capabilities_gles.h b/impeller/renderer/backend/gles/capabilities_gles.h index 20685f1565422..3bcd0cfd85d27 100644 --- a/impeller/renderer/backend/gles/capabilities_gles.h +++ b/impeller/renderer/backend/gles/capabilities_gles.h @@ -116,6 +116,7 @@ class CapabilitiesGLES final PixelFormat GetDefaultDepthStencilFormat() const override; private: + bool supports_framebuffer_fetch_ = false; bool supports_decal_sampler_address_mode_ = false; }; diff --git a/impeller/renderer/backend/gles/pipeline_library_gles.h b/impeller/renderer/backend/gles/pipeline_library_gles.h index aca495418eabb..75f5d0e4fe8f5 100644 --- a/impeller/renderer/backend/gles/pipeline_library_gles.h +++ b/impeller/renderer/backend/gles/pipeline_library_gles.h @@ -23,7 +23,7 @@ class PipelineLibraryGLES final : public PipelineLibrary { ReactorGLES::Ref reactor_; PipelineMap pipelines_; - PipelineLibraryGLES(ReactorGLES::Ref reactor); + explicit PipelineLibraryGLES(ReactorGLES::Ref reactor); // |PipelineLibrary| bool IsValid() const override; diff --git a/impeller/renderer/backend/gles/test/capabilities_unittests.cc b/impeller/renderer/backend/gles/test/capabilities_unittests.cc index 189f54caf69f8..5a82cf5b4c9b6 100644 --- a/impeller/renderer/backend/gles/test/capabilities_unittests.cc +++ b/impeller/renderer/backend/gles/test/capabilities_unittests.cc @@ -44,5 +44,16 @@ TEST(CapabilitiesGLES, SupportsDecalSamplerAddressMode) { EXPECT_TRUE(capabilities->SupportsDecalSamplerAddressMode()); } +TEST(CapabilitiesGLES, SupportsFramebufferFetch) { + auto const extensions = std::vector{ + reinterpret_cast("GL_KHR_debug"), // + reinterpret_cast( + "GL_EXT_shader_framebuffer_fetch"), // + }; + auto mock_gles = MockGLES::Init(extensions); + auto capabilities = mock_gles->GetProcTable().GetCapabilities(); + EXPECT_TRUE(capabilities->SupportsFramebufferFetch()); +} + } // namespace testing } // namespace impeller diff --git a/impeller/tools/impeller.gni b/impeller/tools/impeller.gni index 4ec7119240273..35758f3013b46 100644 --- a/impeller/tools/impeller.gni +++ b/impeller/tools/impeller.gni @@ -321,6 +321,10 @@ template("impellerc") { if (defined(invoker.use_half_textures) && invoker.use_half_textures) { args += [ "--use-half-textures" ] } + if (defined(invoker.require_framebuffer_fetch) && + invoker.require_framebuffer_fetch) { + args += [ "--require-framebuffer-fetch" ] + } if (json) { args += [ "--json" ] @@ -506,6 +510,12 @@ template("_impeller_shaders_gles") { assert(defined(invoker.name), "Name of the shader library must be specified.") assert(defined(invoker.analyze), "Whether to analyze must be specified.") + require_framebuffer_fetch = false + if (defined(invoker.require_framebuffer_fetch) && + invoker.require_framebuffer_fetch) { + require_framebuffer_fetch = invoker.require_framebuffer_fetch + } + shaders_base_name = string_join("", [ invoker.name, @@ -515,6 +525,7 @@ template("_impeller_shaders_gles") { impellerc(impellerc_gles) { shaders = invoker.shaders sl_file_extension = "gles" + require_framebuffer_fetch = require_framebuffer_fetch if (defined(invoker.gles_language_version)) { gles_language_version = invoker.gles_language_version } @@ -690,11 +701,14 @@ template("_impeller_shaders_vk") { # # The SPIR-V version required by the shaders. # -# @param[options] use_half_textures +# @param[optional] use_half_textures # # Whether the metal shader is using half-precision textures and requires # openGL semantics when compilig SPIR-V. # +# @param[optional] require_framebuffer_fetch +# +# Whether to require the framebuffer fetch extension for GLES fragment shaders. template("impeller_shaders") { if (defined(invoker.metal_version)) { metal_version = invoker.metal_version @@ -705,9 +719,16 @@ template("impeller_shaders") { use_half_textures = true } + require_framebuffer_fetch = false + if (defined(invoker.require_framebuffer_fetch) && + invoker.require_framebuffer_fetch) { + require_framebuffer_fetch = true + } + not_needed([ "metal_version", "use_half_textures", + "require_framebuffer_fetch", ]) enable_opengles = impeller_enable_opengles @@ -737,6 +758,7 @@ template("impeller_shaders") { gles_shaders = "gles_$target_name" _impeller_shaders_gles(gles_shaders) { name = invoker.name + require_framebuffer_fetch = require_framebuffer_fetch if (defined(invoker.gles_language_version)) { gles_language_version = invoker.gles_language_version } diff --git a/impeller/tools/malioc.json b/impeller/tools/malioc.json index 3f20eb41b8865..17828b671dec7 100644 --- a/impeller/tools/malioc.json +++ b/impeller/tools/malioc.json @@ -2176,1213 +2176,6 @@ } } }, - "flutter/impeller/entity/framebuffer_blend.vert.vkspv": { - "Mali-G78": { - "core": "Mali-G78", - "filename": "flutter/impeller/entity/framebuffer_blend.vert.vkspv", - "has_uniform_computation": true, - "type": "Vertex", - "variants": { - "Position": { - "fp16_arithmetic": 0, - "has_stack_spilling": false, - "performance": { - "longest_path_bound_pipelines": [ - "load_store" - ], - "longest_path_cycles": [ - 0.125, - 0.125, - 0.0, - 0.0, - 2.0, - 0.0 - ], - "pipelines": [ - "arith_total", - "arith_fma", - "arith_cvt", - "arith_sfu", - "load_store", - "texture" - ], - "shortest_path_bound_pipelines": [ - "load_store" - ], - "shortest_path_cycles": [ - 0.125, - 0.125, - 0.0, - 0.0, - 2.0, - 0.0 - ], - "total_bound_pipelines": [ - "load_store" - ], - "total_cycles": [ - 0.125, - 0.125, - 0.0, - 0.0, - 2.0, - 0.0 - ] - }, - "stack_spill_bytes": 0, - "thread_occupancy": 100, - "uniform_registers_used": 30, - "work_registers_used": 32 - }, - "Varying": { - "fp16_arithmetic": 0, - "has_stack_spilling": false, - "performance": { - "longest_path_bound_pipelines": [ - "load_store" - ], - "longest_path_cycles": [ - 0.015625, - 0.015625, - 0.015625, - 0.0, - 3.0, - 0.0 - ], - "pipelines": [ - "arith_total", - "arith_fma", - "arith_cvt", - "arith_sfu", - "load_store", - "texture" - ], - "shortest_path_bound_pipelines": [ - "load_store" - ], - "shortest_path_cycles": [ - 0.015625, - 0.015625, - 0.015625, - 0.0, - 3.0, - 0.0 - ], - "total_bound_pipelines": [ - "load_store" - ], - "total_cycles": [ - 0.015625, - 0.015625, - 0.015625, - 0.0, - 3.0, - 0.0 - ] - }, - "stack_spill_bytes": 0, - "thread_occupancy": 100, - "uniform_registers_used": 22, - "work_registers_used": 8 - } - } - } - }, - "flutter/impeller/entity/framebuffer_blend_color.frag.vkspv": { - "Mali-G78": { - "core": "Mali-G78", - "filename": "flutter/impeller/entity/framebuffer_blend_color.frag.vkspv", - "has_side_effects": false, - "has_uniform_computation": true, - "modifies_coverage": false, - "reads_color_buffer": false, - "type": "Fragment", - "uses_late_zs_test": false, - "uses_late_zs_update": false, - "variants": { - "Main": { - "fp16_arithmetic": 100, - "has_stack_spilling": false, - "performance": { - "longest_path_bound_pipelines": [ - "varying", - "texture" - ], - "longest_path_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "pipelines": [ - "arith_total", - "arith_fma", - "arith_cvt", - "arith_sfu", - "load_store", - "varying", - "texture" - ], - "shortest_path_bound_pipelines": [ - "varying", - "texture" - ], - "shortest_path_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "total_bound_pipelines": [ - "varying", - "texture" - ], - "total_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ] - }, - "stack_spill_bytes": 0, - "thread_occupancy": 100, - "uniform_registers_used": 4, - "work_registers_used": 6 - } - } - } - }, - "flutter/impeller/entity/framebuffer_blend_colorburn.frag.vkspv": { - "Mali-G78": { - "core": "Mali-G78", - "filename": "flutter/impeller/entity/framebuffer_blend_colorburn.frag.vkspv", - "has_side_effects": false, - "has_uniform_computation": true, - "modifies_coverage": false, - "reads_color_buffer": false, - "type": "Fragment", - "uses_late_zs_test": false, - "uses_late_zs_update": false, - "variants": { - "Main": { - "fp16_arithmetic": 100, - "has_stack_spilling": false, - "performance": { - "longest_path_bound_pipelines": [ - "varying", - "texture" - ], - "longest_path_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "pipelines": [ - "arith_total", - "arith_fma", - "arith_cvt", - "arith_sfu", - "load_store", - "varying", - "texture" - ], - "shortest_path_bound_pipelines": [ - "varying", - "texture" - ], - "shortest_path_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "total_bound_pipelines": [ - "varying", - "texture" - ], - "total_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ] - }, - "stack_spill_bytes": 0, - "thread_occupancy": 100, - "uniform_registers_used": 4, - "work_registers_used": 6 - } - } - } - }, - "flutter/impeller/entity/framebuffer_blend_colordodge.frag.vkspv": { - "Mali-G78": { - "core": "Mali-G78", - "filename": "flutter/impeller/entity/framebuffer_blend_colordodge.frag.vkspv", - "has_side_effects": false, - "has_uniform_computation": true, - "modifies_coverage": false, - "reads_color_buffer": false, - "type": "Fragment", - "uses_late_zs_test": false, - "uses_late_zs_update": false, - "variants": { - "Main": { - "fp16_arithmetic": 100, - "has_stack_spilling": false, - "performance": { - "longest_path_bound_pipelines": [ - "varying", - "texture" - ], - "longest_path_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "pipelines": [ - "arith_total", - "arith_fma", - "arith_cvt", - "arith_sfu", - "load_store", - "varying", - "texture" - ], - "shortest_path_bound_pipelines": [ - "varying", - "texture" - ], - "shortest_path_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "total_bound_pipelines": [ - "varying", - "texture" - ], - "total_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ] - }, - "stack_spill_bytes": 0, - "thread_occupancy": 100, - "uniform_registers_used": 4, - "work_registers_used": 6 - } - } - } - }, - "flutter/impeller/entity/framebuffer_blend_darken.frag.vkspv": { - "Mali-G78": { - "core": "Mali-G78", - "filename": "flutter/impeller/entity/framebuffer_blend_darken.frag.vkspv", - "has_side_effects": false, - "has_uniform_computation": true, - "modifies_coverage": false, - "reads_color_buffer": false, - "type": "Fragment", - "uses_late_zs_test": false, - "uses_late_zs_update": false, - "variants": { - "Main": { - "fp16_arithmetic": 100, - "has_stack_spilling": false, - "performance": { - "longest_path_bound_pipelines": [ - "varying", - "texture" - ], - "longest_path_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "pipelines": [ - "arith_total", - "arith_fma", - "arith_cvt", - "arith_sfu", - "load_store", - "varying", - "texture" - ], - "shortest_path_bound_pipelines": [ - "varying", - "texture" - ], - "shortest_path_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "total_bound_pipelines": [ - "varying", - "texture" - ], - "total_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ] - }, - "stack_spill_bytes": 0, - "thread_occupancy": 100, - "uniform_registers_used": 4, - "work_registers_used": 6 - } - } - } - }, - "flutter/impeller/entity/framebuffer_blend_difference.frag.vkspv": { - "Mali-G78": { - "core": "Mali-G78", - "filename": "flutter/impeller/entity/framebuffer_blend_difference.frag.vkspv", - "has_side_effects": false, - "has_uniform_computation": true, - "modifies_coverage": false, - "reads_color_buffer": false, - "type": "Fragment", - "uses_late_zs_test": false, - "uses_late_zs_update": false, - "variants": { - "Main": { - "fp16_arithmetic": 100, - "has_stack_spilling": false, - "performance": { - "longest_path_bound_pipelines": [ - "varying", - "texture" - ], - "longest_path_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "pipelines": [ - "arith_total", - "arith_fma", - "arith_cvt", - "arith_sfu", - "load_store", - "varying", - "texture" - ], - "shortest_path_bound_pipelines": [ - "varying", - "texture" - ], - "shortest_path_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "total_bound_pipelines": [ - "varying", - "texture" - ], - "total_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ] - }, - "stack_spill_bytes": 0, - "thread_occupancy": 100, - "uniform_registers_used": 4, - "work_registers_used": 6 - } - } - } - }, - "flutter/impeller/entity/framebuffer_blend_exclusion.frag.vkspv": { - "Mali-G78": { - "core": "Mali-G78", - "filename": "flutter/impeller/entity/framebuffer_blend_exclusion.frag.vkspv", - "has_side_effects": false, - "has_uniform_computation": true, - "modifies_coverage": false, - "reads_color_buffer": false, - "type": "Fragment", - "uses_late_zs_test": false, - "uses_late_zs_update": false, - "variants": { - "Main": { - "fp16_arithmetic": 100, - "has_stack_spilling": false, - "performance": { - "longest_path_bound_pipelines": [ - "varying", - "texture" - ], - "longest_path_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "pipelines": [ - "arith_total", - "arith_fma", - "arith_cvt", - "arith_sfu", - "load_store", - "varying", - "texture" - ], - "shortest_path_bound_pipelines": [ - "varying", - "texture" - ], - "shortest_path_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "total_bound_pipelines": [ - "varying", - "texture" - ], - "total_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ] - }, - "stack_spill_bytes": 0, - "thread_occupancy": 100, - "uniform_registers_used": 4, - "work_registers_used": 6 - } - } - } - }, - "flutter/impeller/entity/framebuffer_blend_hardlight.frag.vkspv": { - "Mali-G78": { - "core": "Mali-G78", - "filename": "flutter/impeller/entity/framebuffer_blend_hardlight.frag.vkspv", - "has_side_effects": false, - "has_uniform_computation": true, - "modifies_coverage": false, - "reads_color_buffer": false, - "type": "Fragment", - "uses_late_zs_test": false, - "uses_late_zs_update": false, - "variants": { - "Main": { - "fp16_arithmetic": 100, - "has_stack_spilling": false, - "performance": { - "longest_path_bound_pipelines": [ - "varying", - "texture" - ], - "longest_path_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "pipelines": [ - "arith_total", - "arith_fma", - "arith_cvt", - "arith_sfu", - "load_store", - "varying", - "texture" - ], - "shortest_path_bound_pipelines": [ - "varying", - "texture" - ], - "shortest_path_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "total_bound_pipelines": [ - "varying", - "texture" - ], - "total_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ] - }, - "stack_spill_bytes": 0, - "thread_occupancy": 100, - "uniform_registers_used": 4, - "work_registers_used": 6 - } - } - } - }, - "flutter/impeller/entity/framebuffer_blend_hue.frag.vkspv": { - "Mali-G78": { - "core": "Mali-G78", - "filename": "flutter/impeller/entity/framebuffer_blend_hue.frag.vkspv", - "has_side_effects": false, - "has_uniform_computation": true, - "modifies_coverage": false, - "reads_color_buffer": false, - "type": "Fragment", - "uses_late_zs_test": false, - "uses_late_zs_update": false, - "variants": { - "Main": { - "fp16_arithmetic": 100, - "has_stack_spilling": false, - "performance": { - "longest_path_bound_pipelines": [ - "varying", - "texture" - ], - "longest_path_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "pipelines": [ - "arith_total", - "arith_fma", - "arith_cvt", - "arith_sfu", - "load_store", - "varying", - "texture" - ], - "shortest_path_bound_pipelines": [ - "varying", - "texture" - ], - "shortest_path_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "total_bound_pipelines": [ - "varying", - "texture" - ], - "total_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ] - }, - "stack_spill_bytes": 0, - "thread_occupancy": 100, - "uniform_registers_used": 4, - "work_registers_used": 6 - } - } - } - }, - "flutter/impeller/entity/framebuffer_blend_lighten.frag.vkspv": { - "Mali-G78": { - "core": "Mali-G78", - "filename": "flutter/impeller/entity/framebuffer_blend_lighten.frag.vkspv", - "has_side_effects": false, - "has_uniform_computation": true, - "modifies_coverage": false, - "reads_color_buffer": false, - "type": "Fragment", - "uses_late_zs_test": false, - "uses_late_zs_update": false, - "variants": { - "Main": { - "fp16_arithmetic": 100, - "has_stack_spilling": false, - "performance": { - "longest_path_bound_pipelines": [ - "varying", - "texture" - ], - "longest_path_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "pipelines": [ - "arith_total", - "arith_fma", - "arith_cvt", - "arith_sfu", - "load_store", - "varying", - "texture" - ], - "shortest_path_bound_pipelines": [ - "varying", - "texture" - ], - "shortest_path_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "total_bound_pipelines": [ - "varying", - "texture" - ], - "total_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ] - }, - "stack_spill_bytes": 0, - "thread_occupancy": 100, - "uniform_registers_used": 4, - "work_registers_used": 6 - } - } - } - }, - "flutter/impeller/entity/framebuffer_blend_luminosity.frag.vkspv": { - "Mali-G78": { - "core": "Mali-G78", - "filename": "flutter/impeller/entity/framebuffer_blend_luminosity.frag.vkspv", - "has_side_effects": false, - "has_uniform_computation": true, - "modifies_coverage": false, - "reads_color_buffer": false, - "type": "Fragment", - "uses_late_zs_test": false, - "uses_late_zs_update": false, - "variants": { - "Main": { - "fp16_arithmetic": 100, - "has_stack_spilling": false, - "performance": { - "longest_path_bound_pipelines": [ - "varying", - "texture" - ], - "longest_path_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "pipelines": [ - "arith_total", - "arith_fma", - "arith_cvt", - "arith_sfu", - "load_store", - "varying", - "texture" - ], - "shortest_path_bound_pipelines": [ - "varying", - "texture" - ], - "shortest_path_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "total_bound_pipelines": [ - "varying", - "texture" - ], - "total_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ] - }, - "stack_spill_bytes": 0, - "thread_occupancy": 100, - "uniform_registers_used": 4, - "work_registers_used": 6 - } - } - } - }, - "flutter/impeller/entity/framebuffer_blend_multiply.frag.vkspv": { - "Mali-G78": { - "core": "Mali-G78", - "filename": "flutter/impeller/entity/framebuffer_blend_multiply.frag.vkspv", - "has_side_effects": false, - "has_uniform_computation": true, - "modifies_coverage": false, - "reads_color_buffer": false, - "type": "Fragment", - "uses_late_zs_test": false, - "uses_late_zs_update": false, - "variants": { - "Main": { - "fp16_arithmetic": 100, - "has_stack_spilling": false, - "performance": { - "longest_path_bound_pipelines": [ - "varying", - "texture" - ], - "longest_path_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "pipelines": [ - "arith_total", - "arith_fma", - "arith_cvt", - "arith_sfu", - "load_store", - "varying", - "texture" - ], - "shortest_path_bound_pipelines": [ - "varying", - "texture" - ], - "shortest_path_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "total_bound_pipelines": [ - "varying", - "texture" - ], - "total_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ] - }, - "stack_spill_bytes": 0, - "thread_occupancy": 100, - "uniform_registers_used": 4, - "work_registers_used": 6 - } - } - } - }, - "flutter/impeller/entity/framebuffer_blend_overlay.frag.vkspv": { - "Mali-G78": { - "core": "Mali-G78", - "filename": "flutter/impeller/entity/framebuffer_blend_overlay.frag.vkspv", - "has_side_effects": false, - "has_uniform_computation": true, - "modifies_coverage": false, - "reads_color_buffer": false, - "type": "Fragment", - "uses_late_zs_test": false, - "uses_late_zs_update": false, - "variants": { - "Main": { - "fp16_arithmetic": 100, - "has_stack_spilling": false, - "performance": { - "longest_path_bound_pipelines": [ - "varying", - "texture" - ], - "longest_path_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "pipelines": [ - "arith_total", - "arith_fma", - "arith_cvt", - "arith_sfu", - "load_store", - "varying", - "texture" - ], - "shortest_path_bound_pipelines": [ - "varying", - "texture" - ], - "shortest_path_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "total_bound_pipelines": [ - "varying", - "texture" - ], - "total_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ] - }, - "stack_spill_bytes": 0, - "thread_occupancy": 100, - "uniform_registers_used": 4, - "work_registers_used": 6 - } - } - } - }, - "flutter/impeller/entity/framebuffer_blend_saturation.frag.vkspv": { - "Mali-G78": { - "core": "Mali-G78", - "filename": "flutter/impeller/entity/framebuffer_blend_saturation.frag.vkspv", - "has_side_effects": false, - "has_uniform_computation": true, - "modifies_coverage": false, - "reads_color_buffer": false, - "type": "Fragment", - "uses_late_zs_test": false, - "uses_late_zs_update": false, - "variants": { - "Main": { - "fp16_arithmetic": 100, - "has_stack_spilling": false, - "performance": { - "longest_path_bound_pipelines": [ - "varying", - "texture" - ], - "longest_path_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "pipelines": [ - "arith_total", - "arith_fma", - "arith_cvt", - "arith_sfu", - "load_store", - "varying", - "texture" - ], - "shortest_path_bound_pipelines": [ - "varying", - "texture" - ], - "shortest_path_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "total_bound_pipelines": [ - "varying", - "texture" - ], - "total_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ] - }, - "stack_spill_bytes": 0, - "thread_occupancy": 100, - "uniform_registers_used": 4, - "work_registers_used": 6 - } - } - } - }, - "flutter/impeller/entity/framebuffer_blend_screen.frag.vkspv": { - "Mali-G78": { - "core": "Mali-G78", - "filename": "flutter/impeller/entity/framebuffer_blend_screen.frag.vkspv", - "has_side_effects": false, - "has_uniform_computation": true, - "modifies_coverage": false, - "reads_color_buffer": false, - "type": "Fragment", - "uses_late_zs_test": false, - "uses_late_zs_update": false, - "variants": { - "Main": { - "fp16_arithmetic": 100, - "has_stack_spilling": false, - "performance": { - "longest_path_bound_pipelines": [ - "varying", - "texture" - ], - "longest_path_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "pipelines": [ - "arith_total", - "arith_fma", - "arith_cvt", - "arith_sfu", - "load_store", - "varying", - "texture" - ], - "shortest_path_bound_pipelines": [ - "varying", - "texture" - ], - "shortest_path_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "total_bound_pipelines": [ - "varying", - "texture" - ], - "total_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ] - }, - "stack_spill_bytes": 0, - "thread_occupancy": 100, - "uniform_registers_used": 4, - "work_registers_used": 6 - } - } - } - }, - "flutter/impeller/entity/framebuffer_blend_softlight.frag.vkspv": { - "Mali-G78": { - "core": "Mali-G78", - "filename": "flutter/impeller/entity/framebuffer_blend_softlight.frag.vkspv", - "has_side_effects": false, - "has_uniform_computation": true, - "modifies_coverage": false, - "reads_color_buffer": false, - "type": "Fragment", - "uses_late_zs_test": false, - "uses_late_zs_update": false, - "variants": { - "Main": { - "fp16_arithmetic": 100, - "has_stack_spilling": false, - "performance": { - "longest_path_bound_pipelines": [ - "varying", - "texture" - ], - "longest_path_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "pipelines": [ - "arith_total", - "arith_fma", - "arith_cvt", - "arith_sfu", - "load_store", - "varying", - "texture" - ], - "shortest_path_bound_pipelines": [ - "varying", - "texture" - ], - "shortest_path_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ], - "total_bound_pipelines": [ - "varying", - "texture" - ], - "total_cycles": [ - 0.0625, - 0.0625, - 0.0, - 0.0, - 0.0, - 0.25, - 0.25 - ] - }, - "stack_spill_bytes": 0, - "thread_occupancy": 100, - "uniform_registers_used": 4, - "work_registers_used": 6 - } - } - } - }, "flutter/impeller/entity/gaussian_blur.vert.vkspv": { "Mali-G78": { "core": "Mali-G78", diff --git a/shell/platform/android/android_context_gl_impeller.cc b/shell/platform/android/android_context_gl_impeller.cc index a2a555000ae09..83c1bb4fedd91 100644 --- a/shell/platform/android/android_context_gl_impeller.cc +++ b/shell/platform/android/android_context_gl_impeller.cc @@ -10,6 +10,7 @@ #include "flutter/impeller/toolkit/egl/context.h" #include "flutter/impeller/toolkit/egl/surface.h" #include "impeller/entity/gles/entity_shaders_gles.h" +#include "impeller/entity/gles/framebuffer_blend_shaders_gles.h" #if IMPELLER_ENABLE_3D #include "impeller/scene/shaders/gles/scene_shaders_gles.h" // nogcncheck @@ -60,6 +61,9 @@ static std::shared_ptr CreateImpellerContext( std::vector> shader_mappings = { std::make_shared(impeller_entity_shaders_gles_data, impeller_entity_shaders_gles_length), + std::make_shared( + impeller_framebuffer_blend_shaders_gles_data, + impeller_framebuffer_blend_shaders_gles_length), #if IMPELLER_ENABLE_3D std::make_shared(impeller_scene_shaders_gles_data, impeller_scene_shaders_gles_length), From ad1bf8c60f6fc2e8d76be37b994ed427c476c14f Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 10 Oct 2023 15:31:20 -0400 Subject: [PATCH 556/859] Roll Skia from 475286f0f6f1 to 06145491fd17 (1 revision) (#46728) https://skia.googlesource.com/skia.git/+log/475286f0f6f1..06145491fd17 2023-10-10 jvanverth@google.com [graphite] Add caching for RasterPathAtlas. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 14c2069daf802..10c83a142f7aa 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '475286f0f6f1aa711478328e70eceb1d90b36b68', + 'skia_revision': '06145491fd178fd7a92bd4dfbee99ccbb578d42f', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index c9ff21c742ba8..7c3d68b4ffd6e 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 3db78332e108f2388e744755df815e3e +Signature: 4a4949218f693a1592bf1308dfdd43d3 ==================================================================================================== LIBRARY: etc1 From 897db9460a7ccb7eb527c4314c39ce2d26ddd7cd Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Tue, 10 Oct 2023 13:11:51 -0700 Subject: [PATCH 557/859] Remove workaround for older versions of MSVC. (#46689) We don't use the MSVC frontend now anyway. And haven't for a while. --- fml/message_loop_unittests.cc | 46 ++++++++++++++--------------------- 1 file changed, 18 insertions(+), 28 deletions(-) diff --git a/fml/message_loop_unittests.cc b/fml/message_loop_unittests.cc index 5e64e407f81f8..df762f4249f3e 100644 --- a/fml/message_loop_unittests.cc +++ b/fml/message_loop_unittests.cc @@ -17,12 +17,6 @@ #include "flutter/fml/time/chrono_timestamp_provider.h" #include "gtest/gtest.h" -#if FML_OS_WIN -#define PLATFORM_SPECIFIC_CAPTURE(...) [ __VA_ARGS__, count ] -#else -#define PLATFORM_SPECIFIC_CAPTURE(...) [__VA_ARGS__] -#endif - TEST(MessageLoop, GetCurrent) { std::thread thread([]() { fml::MessageLoop::EnsureInitializedForCurrentThread(); @@ -88,15 +82,14 @@ TEST(MessageLoop, NonDelayedTasksAreRunInOrder) { auto& loop = fml::MessageLoop::GetCurrent(); size_t current = 0; for (size_t i = 0; i < count; i++) { - loop.GetTaskRunner()->PostTask( - PLATFORM_SPECIFIC_CAPTURE(&terminated, i, ¤t)() { - ASSERT_EQ(current, i); - current++; - if (count == i + 1) { - fml::MessageLoop::GetCurrent().Terminate(); - terminated = true; - } - }); + loop.GetTaskRunner()->PostTask([&terminated, i, ¤t]() { + ASSERT_EQ(current, i); + current++; + if (count == i + 1) { + fml::MessageLoop::GetCurrent().Terminate(); + terminated = true; + } + }); } loop.Run(); ASSERT_EQ(current, count); @@ -119,7 +112,7 @@ TEST(MessageLoop, DelayedTasksAtSameTimeAreRunInOrder) { fml::ChronoTicksSinceEpoch() + fml::TimeDelta::FromMilliseconds(2); for (size_t i = 0; i < count; i++) { loop.GetTaskRunner()->PostTaskForTime( - PLATFORM_SPECIFIC_CAPTURE(&terminated, i, ¤t)() { + [&terminated, i, ¤t]() { ASSERT_EQ(current, i); current++; if (count == i + 1) { @@ -163,19 +156,16 @@ TEST(MessageLoop, TaskObserverFire) { auto& loop = fml::MessageLoop::GetCurrent(); size_t task_count = 0; size_t obs_count = 0; - auto obs = PLATFORM_SPECIFIC_CAPTURE(&obs_count)() { - obs_count++; - }; + auto obs = [&obs_count]() { obs_count++; }; for (size_t i = 0; i < count; i++) { - loop.GetTaskRunner()->PostTask( - PLATFORM_SPECIFIC_CAPTURE(&terminated, i, &task_count)() { - ASSERT_EQ(task_count, i); - task_count++; - if (count == i + 1) { - fml::MessageLoop::GetCurrent().Terminate(); - terminated = true; - } - }); + loop.GetTaskRunner()->PostTask([&terminated, i, &task_count]() { + ASSERT_EQ(task_count, i); + task_count++; + if (count == i + 1) { + fml::MessageLoop::GetCurrent().Terminate(); + terminated = true; + } + }); } loop.AddTaskObserver(0, obs); loop.Run(); From 9c2ff34a6d5346164405a8f40ad9a2eca029b0a5 Mon Sep 17 00:00:00 2001 From: godofredoc Date: Tue, 10 Oct 2023 13:28:52 -0700 Subject: [PATCH 558/859] Use x86 machines for ios builds. (#46726) This is to workaround rosetta not being installed in dart-internal machines and to unblock beta releases. Bug: https://github.com/flutter/flutter/issues/136219 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- ci/builders/mac_ios_engine.json | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/ci/builders/mac_ios_engine.json b/ci/builders/mac_ios_engine.json index 600f495929b0c..3dfc5c4d559b4 100644 --- a/ci/builders/mac_ios_engine.json +++ b/ci/builders/mac_ios_engine.json @@ -3,8 +3,8 @@ { "drone_dimensions": [ "device_type=none", - "mac_model=Macmini8,1", - "os=Mac-12" + "os=Mac-12", + "cpu=x86" ], "gn": [ "--ios", @@ -26,7 +26,8 @@ { "drone_dimensions": [ "device_type=none", - "os=Mac-12" + "os=Mac-12", + "cpu=x86" ], "gn": [ "--ios", @@ -49,7 +50,8 @@ { "drone_dimensions": [ "device_type=none", - "os=Mac-12" + "os=Mac-12", + "cpu=x86" ], "gn": [ "--ios", @@ -72,7 +74,8 @@ { "drone_dimensions": [ "device_type=none", - "os=Mac-12" + "os=Mac-12", + "cpu=x86" ], "gn": [ "--ios", @@ -96,7 +99,8 @@ { "drone_dimensions": [ "device_type=none", - "os=Mac-12" + "os=Mac-12", + "cpu=x86" ], "gn": [ "--ios", @@ -120,8 +124,8 @@ { "drone_dimensions": [ "device_type=none", - "mac_model=Macmini8,1", - "os=Mac-12" + "os=Mac-12", + "cpu=x86" ], "gn": [ "--ios", @@ -144,7 +148,8 @@ { "drone_dimensions": [ "device_type=none", - "os=Mac-12" + "os=Mac-12", + "cpu=x86" ], "gn": [ "--ios", @@ -168,7 +173,8 @@ { "drone_dimensions": [ "device_type=none", - "os=Mac-12" + "os=Mac-12", + "cpu=x86" ], "gn": [ "--ios", @@ -192,7 +198,8 @@ { "drone_dimensions": [ "device_type=none", - "os=Mac-12" + "os=Mac-12", + "cpu=x86" ], "gn": [ "--ios", @@ -217,7 +224,8 @@ { "drone_dimensions": [ "device_type=none", - "os=Mac-12" + "os=Mac-12", + "cpu=x86" ], "gn": [ "--ios", From adcac2db2b3674d5090a6959215726848b4499b7 Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Tue, 10 Oct 2023 13:36:43 -0700 Subject: [PATCH 559/859] Prepare to move new folders into `third_party/` by adding a `.gitignore`. (#46729) As part of https://github.com/flutter/flutter/issues/67373, we'll be adding, for example `third_party/glfw`. This PR will by default ignore folders, except for ones that have internal repo-sourced code (which are unlikely to change much, if at all during this transition). _/cc @Hixie, @chinmaygarde FYI only_. --- .gitignore | 3 --- ci/licenses_golden/excluded_files | 2 ++ third_party/.gitignore | 23 +++++++++++++++++++++++ third_party/README.md | 24 ++++++++++++++++++++++++ 4 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 third_party/.gitignore create mode 100644 third_party/README.md diff --git a/.gitignore b/.gitignore index c66ae6504bef8..a19d20d383802 100644 --- a/.gitignore +++ b/.gitignore @@ -28,9 +28,6 @@ pubspec.lock docs/doxygen/ xcuserdata -third_party/gn/ -third_party/ninja/ninja* - # Miscellaneous *.class *.lock diff --git a/ci/licenses_golden/excluded_files b/ci/licenses_golden/excluded_files index fd649bd5f90a3..9177724366207 100644 --- a/ci/licenses_golden/excluded_files +++ b/ci/licenses_golden/excluded_files @@ -391,6 +391,8 @@ ../../../flutter/sky/tools/objcopy.py ../../../flutter/testing ../../../flutter/third_party/.clang-tidy +../../../flutter/third_party/.gitignore +../../../flutter/third_party/README.md ../../../flutter/third_party/accessibility/README.md ../../../flutter/third_party/accessibility/ax/ax_enum_util_unittest.cc ../../../flutter/third_party/accessibility/ax/ax_event_generator_unittest.cc diff --git a/third_party/.gitignore b/third_party/.gitignore new file mode 100644 index 0000000000000..45ae89eb3d05d --- /dev/null +++ b/third_party/.gitignore @@ -0,0 +1,23 @@ +# Ignore everything by default, as these come from gclient/DEPS. +# We'll explicitly include the folders we want to track. +* + +# Include the .gitignore file itself and .clang-tidy. +!.gitignore +!.clang-tidy +!README.md + +# Allow custom README.flutter files in each folder. +**/README.flutter + +# Include folders that have hand-written code (not DEPS). +!accessibility/ +!canvaskit/ +!ninja/ +!spring_animation/ +!test_shaders/ +!tonic/ +!txt/ +!web_locale_keymap/ +!web_test_fonts/ +!web_unicode/ diff --git a/third_party/README.md b/third_party/README.md new file mode 100644 index 0000000000000..ae435e36c8efb --- /dev/null +++ b/third_party/README.md @@ -0,0 +1,24 @@ +# `flutter/third_party` + +This directory contains third-party code that is a combination of: + +- Code that is vendored into the Flutter repository, from an external source. + For example, we might have `third_party/glfw`, which contains the GLFW + library, vendored from an external repository. + + > 💡 **TIP**: See [`DEPS`](../DEPS) for where these sources are declared. + +- Code that originates from another repository, but is copied (sometimes with + alterations) into the Flutter repository. For an example, see + [`third_party/spring_animation`](spring_animation/README.md). + +- Code that is licensed separately from the rest of the Flutter repository. + For example, see [`third_party/txt`](txt/). + +When adding a new _externally_ sourced third-party library, update `.gitignore`: + +```diff +# Ignores all third_party/ directories except for the ones we want to track. + ++ !{folder_name}/ +``` From d0cf1819b3b387c2ac0f13ace0f12aba354036bc Mon Sep 17 00:00:00 2001 From: John McCutchan Date: Tue, 10 Oct 2023 14:36:56 -0600 Subject: [PATCH 560/859] Fix high FPS screen flicker of Platform Views when using ImageReaderPlatformViewRenderTarget (#46724) The root bug (b/300627634) was that we were holding onto HardwareBuffers after the owning Image was closed. This CL refactors the C++ code to properly hold a reference to the Image until it is safe to dispose of. This CL also refactors the Impeller GL and Skia GL code paths to share more code. --- .../hardware_buffer_external_texture.cc | 76 +++--- .../hardware_buffer_external_texture.h | 16 +- .../hardware_buffer_external_texture_gl.cc | 223 ++++++++++-------- .../hardware_buffer_external_texture_gl.h | 56 +++-- .../hardware_buffer_external_texture_vk.cc | 32 ++- .../hardware_buffer_external_texture_vk.h | 3 + .../engine/renderer/FlutterRenderer.java | 23 +- .../ImageReaderPlatformViewRenderTarget.java | 4 +- .../platform/PlatformViewsController.java | 14 +- .../platform/android/platform_view_android.cc | 4 +- 10 files changed, 273 insertions(+), 178 deletions(-) diff --git a/shell/platform/android/hardware_buffer_external_texture.cc b/shell/platform/android/hardware_buffer_external_texture.cc index 0b5d54a20785a..e26a7e51cd6dd 100644 --- a/shell/platform/android/hardware_buffer_external_texture.cc +++ b/shell/platform/android/hardware_buffer_external_texture.cc @@ -3,6 +3,8 @@ #include #include + +#include "flutter/shell/platform/android/jni/platform_view_android_jni.h" #include "flutter/shell/platform/android/ndk_helpers.h" namespace flutter { @@ -23,6 +25,7 @@ void HardwareBufferExternalTexture::Paint(PaintContext& context, if (state_ == AttachmentState::kDetached) { return; } + Attach(context); const bool should_process_frame = (!freeze && new_frame_ready_) || dl_image_ == nullptr; if (should_process_frame) { @@ -39,7 +42,7 @@ void HardwareBufferExternalTexture::Paint(PaintContext& context, flutter::DlCanvas::SrcRectConstraint::kStrict // enforce edges ); } else { - FML_LOG(WARNING) + FML_LOG(ERROR) << "No DlImage available for HardwareBufferExternalTexture to paint."; } } @@ -57,53 +60,56 @@ void HardwareBufferExternalTexture::OnGrContextCreated() { state_ = AttachmentState::kUninitialized; } -AHardwareBuffer* HardwareBufferExternalTexture::GetLatestHardwareBuffer() { +// Implementing flutter::ContextListener. +void HardwareBufferExternalTexture::OnGrContextDestroyed() { + if (state_ == AttachmentState::kAttached) { + dl_image_.reset(); + Detach(); + } + state_ = AttachmentState::kDetached; +} + +JavaLocalRef HardwareBufferExternalTexture::AcquireLatestImage() { JNIEnv* env = fml::jni::AttachCurrentThread(); FML_CHECK(env != nullptr); // ImageTextureEntry.acquireLatestImage. JavaLocalRef image_java = jni_facade_->ImageTextureEntryAcquireLatestImage( JavaLocalRef(image_texture_entry_)); - if (image_java.obj() == nullptr) { - return nullptr; - } + return image_java; +} - // Image.getHardwareBuffer. - JavaLocalRef hardware_buffer_java = - jni_facade_->ImageGetHardwareBuffer(image_java); - if (hardware_buffer_java.obj() == nullptr) { - jni_facade_->ImageClose(image_java); - return nullptr; +void HardwareBufferExternalTexture::CloseImage( + const fml::jni::JavaRef& image) { + if (image.obj() == nullptr) { + return; } + jni_facade_->ImageClose(JavaLocalRef(image)); +} - // Convert into NDK HardwareBuffer. - AHardwareBuffer* latest_hardware_buffer = - NDKHelpers::AHardwareBuffer_fromHardwareBuffer( - env, hardware_buffer_java.obj()); - if (latest_hardware_buffer == nullptr) { - jni_facade_->HardwareBufferClose(hardware_buffer_java); - jni_facade_->ImageClose(image_java); - return nullptr; +void HardwareBufferExternalTexture::CloseHardwareBuffer( + const fml::jni::JavaRef& hardware_buffer) { + if (hardware_buffer.obj() == nullptr) { + return; } - - // Keep hardware buffer alive. - NDKHelpers::AHardwareBuffer_acquire(latest_hardware_buffer); - - // Now that we have referenced the native hardware buffer, close the Java - // Image and HardwareBuffer objects. - jni_facade_->HardwareBufferClose(hardware_buffer_java); - jni_facade_->ImageClose(image_java); - - return latest_hardware_buffer; + jni_facade_->HardwareBufferClose(JavaLocalRef(hardware_buffer)); } -// Implementing flutter::ContextListener. -void HardwareBufferExternalTexture::OnGrContextDestroyed() { - if (state_ == AttachmentState::kAttached) { - dl_image_.reset(); - Detach(); +JavaLocalRef HardwareBufferExternalTexture::HardwareBufferFor( + const fml::jni::JavaRef& image) { + if (image.obj() == nullptr) { + return JavaLocalRef(); } - state_ = AttachmentState::kDetached; + // Image.getHardwareBuffer. + return jni_facade_->ImageGetHardwareBuffer(JavaLocalRef(image)); +} + +AHardwareBuffer* HardwareBufferExternalTexture::AHardwareBufferFor( + const fml::jni::JavaRef& hardware_buffer) { + JNIEnv* env = fml::jni::AttachCurrentThread(); + FML_CHECK(env != nullptr); + return NDKHelpers::AHardwareBuffer_fromHardwareBuffer(env, + hardware_buffer.obj()); } } // namespace flutter diff --git a/shell/platform/android/hardware_buffer_external_texture.h b/shell/platform/android/hardware_buffer_external_texture.h index 5f93923fb9fa1..6a0ec78977e1a 100644 --- a/shell/platform/android/hardware_buffer_external_texture.h +++ b/shell/platform/android/hardware_buffer_external_texture.h @@ -7,6 +7,7 @@ #include "flutter/common/graphics/texture.h" #include "flutter/fml/logging.h" +#include "flutter/shell/platform/android/jni/platform_view_android_jni.h" #include "flutter/shell/platform/android/platform_view_android_jni_impl.h" #include @@ -20,10 +21,11 @@ class HardwareBufferExternalTexture : public flutter::Texture { public: explicit HardwareBufferExternalTexture( int64_t id, - const fml::jni::ScopedJavaGlobalRef& - hardware_buffer_texture_entry, + const fml::jni::ScopedJavaGlobalRef& image_texture_entry, const std::shared_ptr& jni_facade); + virtual ~HardwareBufferExternalTexture() = default; + // |flutter::Texture|. void Paint(PaintContext& context, const SkRect& bounds, @@ -43,10 +45,16 @@ class HardwareBufferExternalTexture : public flutter::Texture { void OnGrContextDestroyed() override; protected: - virtual void ProcessFrame(PaintContext& context, const SkRect& bounds) = 0; + virtual void Attach(PaintContext& context) = 0; virtual void Detach() = 0; + virtual void ProcessFrame(PaintContext& context, const SkRect& bounds) = 0; - AHardwareBuffer* GetLatestHardwareBuffer(); + JavaLocalRef AcquireLatestImage(); + void CloseImage(const fml::jni::JavaRef& image); + JavaLocalRef HardwareBufferFor(const fml::jni::JavaRef& image); + void CloseHardwareBuffer(const fml::jni::JavaRef& hardware_buffer); + AHardwareBuffer* AHardwareBufferFor( + const fml::jni::JavaRef& hardware_buffer); fml::jni::ScopedJavaGlobalRef image_texture_entry_; std::shared_ptr jni_facade_; diff --git a/shell/platform/android/hardware_buffer_external_texture_gl.cc b/shell/platform/android/hardware_buffer_external_texture_gl.cc index 2dfe278433d08..3eb0defe19d98 100644 --- a/shell/platform/android/hardware_buffer_external_texture_gl.cc +++ b/shell/platform/android/hardware_buffer_external_texture_gl.cc @@ -6,15 +6,16 @@ #include #include -#include "flutter/common/graphics/texture.h" -#include "flutter/shell/platform/android/ndk_helpers.h" -#include "impeller/core/formats.h" -#include "impeller/display_list/dl_image_impeller.h" -#include "impeller/renderer/backend/gles/texture_gles.h" -#include "impeller/toolkit/egl/image.h" -#include "impeller/toolkit/gles/texture.h" +#include "flutter/common/graphics/texture.h" #include "flutter/display_list/effects/dl_color_source.h" +#include "flutter/flow/layers/layer.h" +#include "flutter/impeller/core/formats.h" +#include "flutter/impeller/display_list/dl_image_impeller.h" +#include "flutter/impeller/renderer/backend/gles/texture_gles.h" +#include "flutter/impeller/toolkit/egl/image.h" +#include "flutter/impeller/toolkit/gles/texture.h" +#include "flutter/shell/platform/android/ndk_helpers.h" #include "third_party/skia/include/core/SkAlphaType.h" #include "third_party/skia/include/core/SkColorSpace.h" #include "third_party/skia/include/core/SkColorType.h" @@ -27,122 +28,164 @@ namespace flutter { +HardwareBufferExternalTextureGL::HardwareBufferExternalTextureGL( + int64_t id, + const fml::jni::ScopedJavaGlobalRef& image_texture_entry, + const std::shared_ptr& jni_facade) + : HardwareBufferExternalTexture(id, image_texture_entry, jni_facade) {} + +void HardwareBufferExternalTextureGL::Attach(PaintContext& context) { + if (state_ == AttachmentState::kUninitialized) { + if (!android_image_.is_null()) { + JavaLocalRef hardware_buffer = HardwareBufferFor(android_image_); + AHardwareBuffer* hardware_buffer_ahw = + AHardwareBufferFor(hardware_buffer); + egl_image_ = CreateEGLImage(hardware_buffer_ahw); + CloseHardwareBuffer(hardware_buffer); + } + state_ = AttachmentState::kAttached; + } +} + void HardwareBufferExternalTextureGL::Detach() { - image_.reset(); - texture_.reset(); + egl_image_.reset(); +} + +bool HardwareBufferExternalTextureGL::MaybeSwapImages() { + JavaLocalRef image = AcquireLatestImage(); + if (image.is_null()) { + return false; + } + // NOTE: In the following code it is important that old_android_image is + // not closed until after the update of egl_image_ otherwise the image might + // be closed before the old EGLImage referencing it has been deleted. After + // an image is closed the underlying HardwareBuffer may be recycled and used + // for a future frame. + JavaLocalRef old_android_image(android_image_); + android_image_.Reset(image); + JavaLocalRef hardware_buffer = HardwareBufferFor(image); + egl_image_ = CreateEGLImage(AHardwareBufferFor(hardware_buffer)); + CloseHardwareBuffer(hardware_buffer); + // IMPORTANT: We only close the old image after egl_image_ stops referencing + // it. + CloseImage(old_android_image); + return true; +} + +impeller::UniqueEGLImageKHR HardwareBufferExternalTextureGL::CreateEGLImage( + AHardwareBuffer* hardware_buffer) { + if (hardware_buffer == nullptr) { + return impeller::UniqueEGLImageKHR(); + } + + EGLDisplay display = eglGetCurrentDisplay(); + FML_CHECK(display != EGL_NO_DISPLAY); + + EGLClientBuffer client_buffer = + NDKHelpers::eglGetNativeClientBufferANDROID(hardware_buffer); + FML_DCHECK(client_buffer != nullptr); + if (client_buffer == nullptr) { + FML_LOG(ERROR) << "eglGetNativeClientBufferAndroid returned null."; + return impeller::UniqueEGLImageKHR(); + } + + impeller::EGLImageKHRWithDisplay maybe_image = + impeller::EGLImageKHRWithDisplay{ + eglCreateImageKHR(display, EGL_NO_CONTEXT, EGL_NATIVE_BUFFER_ANDROID, + client_buffer, 0), + display}; + + return impeller::UniqueEGLImageKHR(maybe_image); } -void HardwareBufferExternalTextureGL::ProcessFrame(PaintContext& context, - const SkRect& bounds) { +HardwareBufferExternalTextureGLSkia::HardwareBufferExternalTextureGLSkia( + const std::shared_ptr& context, + int64_t id, + const fml::jni::ScopedJavaGlobalRef& image_texture_entry, + const std::shared_ptr& jni_facade) + : HardwareBufferExternalTextureGL(id, image_texture_entry, jni_facade) {} + +void HardwareBufferExternalTextureGLSkia::Attach(PaintContext& context) { if (state_ == AttachmentState::kUninitialized) { + // After this call state_ will be AttachmentState::kAttached and egl_image_ + // will have been created if we still have an Image associated with us. + HardwareBufferExternalTextureGL::Attach(context); GLuint texture_name; glGenTextures(1, &texture_name); texture_.reset(impeller::GLTexture{texture_name}); - state_ = AttachmentState::kAttached; } - glBindTexture(GL_TEXTURE_EXTERNAL_OES, texture_.get().texture_name); - - EGLDisplay display = eglGetCurrentDisplay(); - FML_CHECK(display != EGL_NO_DISPLAY); +} - image_.reset(); +void HardwareBufferExternalTextureGLSkia::Detach() { + HardwareBufferExternalTextureGL::Detach(); + texture_.reset(); +} - AHardwareBuffer* latest_hardware_buffer = GetLatestHardwareBuffer(); - if (latest_hardware_buffer == nullptr) { - FML_LOG(WARNING) << "GetLatestHardwareBuffer returned null."; +void HardwareBufferExternalTextureGLSkia::ProcessFrame(PaintContext& context, + const SkRect& bounds) { + const bool swapped = MaybeSwapImages(); + if (!swapped && !egl_image_.is_valid()) { + // Nothing to do. return; } + BindImageToTexture(egl_image_, texture_.get().texture_name); + dl_image_ = CreateDlImage(context, bounds); +} - EGLClientBuffer client_buffer = - NDKHelpers::eglGetNativeClientBufferANDROID(latest_hardware_buffer); - if (client_buffer == nullptr) { - FML_LOG(WARNING) << "eglGetNativeClientBufferAndroid returned null."; - NDKHelpers::AHardwareBuffer_release(latest_hardware_buffer); +void HardwareBufferExternalTextureGLSkia::BindImageToTexture( + const impeller::UniqueEGLImageKHR& image, + GLuint tex) { + if (!image.is_valid() || tex == 0) { return; } - FML_CHECK(client_buffer != nullptr); - image_.reset(impeller::EGLImageKHRWithDisplay{ - eglCreateImageKHR(display, EGL_NO_CONTEXT, EGL_NATIVE_BUFFER_ANDROID, - client_buffer, 0), - display}); - FML_CHECK(image_.get().image != EGL_NO_IMAGE_KHR); + glBindTexture(GL_TEXTURE_EXTERNAL_OES, tex); glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, - (GLeglImageOES)image_.get().image); - - // Drop our temporary reference to the hardware buffer as the call to - // eglCreateImageKHR now has the reference. - NDKHelpers::AHardwareBuffer_release(latest_hardware_buffer); + (GLeglImageOES)image.get().image); +} +sk_sp HardwareBufferExternalTextureGLSkia::CreateDlImage( + PaintContext& context, + const SkRect& bounds) { GrGLTextureInfo textureInfo = {GL_TEXTURE_EXTERNAL_OES, texture_.get().texture_name, GL_RGBA8_OES}; auto backendTexture = GrBackendTextures::MakeGL(1, 1, skgpu::Mipmapped::kNo, textureInfo); - dl_image_ = DlImage::Make(SkImages::BorrowTextureFrom( + return DlImage::Make(SkImages::BorrowTextureFrom( context.gr_context, backendTexture, kTopLeft_GrSurfaceOrigin, kRGBA_8888_SkColorType, kPremul_SkAlphaType, nullptr)); } -HardwareBufferExternalTextureGL::HardwareBufferExternalTextureGL( - const std::shared_ptr& context, - int64_t id, - const fml::jni::ScopedJavaGlobalRef& image_texture_entry, - const std::shared_ptr& jni_facade) - : HardwareBufferExternalTexture(id, image_texture_entry, jni_facade) {} - -HardwareBufferExternalTextureGL::~HardwareBufferExternalTextureGL() {} - -HardwareBufferExternalTextureImpellerGL:: - HardwareBufferExternalTextureImpellerGL( +HardwareBufferExternalTextureGLImpeller:: + HardwareBufferExternalTextureGLImpeller( const std::shared_ptr& context, int64_t id, - const fml::jni::ScopedJavaGlobalRef& - hardware_buffer_texture_entry, + const fml::jni::ScopedJavaGlobalRef& image_textury_entry, const std::shared_ptr& jni_facade) - : HardwareBufferExternalTexture(id, - hardware_buffer_texture_entry, - jni_facade), + : HardwareBufferExternalTextureGL(id, image_textury_entry, jni_facade), impeller_context_(context) {} -HardwareBufferExternalTextureImpellerGL:: - ~HardwareBufferExternalTextureImpellerGL() {} +void HardwareBufferExternalTextureGLImpeller::Detach() {} -void HardwareBufferExternalTextureImpellerGL::Detach() { - egl_image_.reset(); +void HardwareBufferExternalTextureGLImpeller::Attach(PaintContext& context) { + if (state_ == AttachmentState::kUninitialized) { + HardwareBufferExternalTextureGL::Attach(context); + } } -void HardwareBufferExternalTextureImpellerGL::ProcessFrame( +void HardwareBufferExternalTextureGLImpeller::ProcessFrame( PaintContext& context, const SkRect& bounds) { - EGLDisplay display = eglGetCurrentDisplay(); - FML_CHECK(display != EGL_NO_DISPLAY); - - if (state_ == AttachmentState::kUninitialized) { - // First processed frame we are attached. - state_ = AttachmentState::kAttached; - } - - AHardwareBuffer* latest_hardware_buffer = GetLatestHardwareBuffer(); - if (latest_hardware_buffer == nullptr) { - FML_LOG(ERROR) << "GetLatestHardwareBuffer returned null."; - return; - } - - EGLClientBuffer client_buffer = - NDKHelpers::eglGetNativeClientBufferANDROID(latest_hardware_buffer); - if (client_buffer == nullptr) { - FML_LOG(ERROR) << "eglGetNativeClientBufferAndroid returned null."; - NDKHelpers::AHardwareBuffer_release(latest_hardware_buffer); + const bool swapped = MaybeSwapImages(); + if (!swapped && !egl_image_.is_valid()) { + // Nothing to do. return; } + dl_image_ = CreateDlImage(context, bounds); +} - FML_CHECK(client_buffer != nullptr); - egl_image_.reset(impeller::EGLImageKHRWithDisplay{ - eglCreateImageKHR(display, EGL_NO_CONTEXT, EGL_NATIVE_BUFFER_ANDROID, - client_buffer, 0), - display}); - FML_CHECK(egl_image_.get().image != EGL_NO_IMAGE_KHR); - - // Create the texture. +sk_sp HardwareBufferExternalTextureGLImpeller::CreateDlImage( + PaintContext& context, + const SkRect& bounds) { impeller::TextureDescriptor desc; desc.type = impeller::TextureType::kTextureExternalOES; desc.storage_mode = impeller::StorageMode::kDevicePrivate; @@ -156,18 +199,12 @@ void HardwareBufferExternalTextureImpellerGL::ProcessFrame( texture->SetCoordinateSystem( impeller::TextureCoordinateSystem::kUploadFromHost); if (!texture->Bind()) { - FML_LOG(ERROR) << "Could not bind texture."; - NDKHelpers::AHardwareBuffer_release(latest_hardware_buffer); - return; + return nullptr; } // Associate the hardware buffer image with the texture. glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, (GLeglImageOES)egl_image_.get().image); - - dl_image_ = impeller::DlImageImpeller::Make(texture); - - // Release the reference acquired by GetLatestHardwareBuffer. - NDKHelpers::AHardwareBuffer_release(latest_hardware_buffer); + return impeller::DlImageImpeller::Make(texture); } } // namespace flutter diff --git a/shell/platform/android/hardware_buffer_external_texture_gl.h b/shell/platform/android/hardware_buffer_external_texture_gl.h index c8e05e0c750e7..0a81fde0d1321 100644 --- a/shell/platform/android/hardware_buffer_external_texture_gl.h +++ b/shell/platform/android/hardware_buffer_external_texture_gl.h @@ -5,6 +5,7 @@ #ifndef FLUTTER_SHELL_PLATFORM_ANDROID_HARDWARE_BUFFER_EXTERNAL_TEXTURE_GL_H_ #define FLUTTER_SHELL_PLATFORM_ANDROID_HARDWARE_BUFFER_EXTERNAL_TEXTURE_GL_H_ +#include "flutter/fml/platform/android/scoped_java_ref.h" #include "flutter/shell/platform/android/hardware_buffer_external_texture.h" #include "flutter/impeller/renderer/backend/gles/context_gles.h" @@ -15,51 +16,76 @@ #include "flutter/impeller/toolkit/gles/texture.h" #include "flutter/shell/platform/android/android_context_gl_skia.h" +#include "flutter/shell/platform/android/ndk_helpers.h" namespace flutter { class HardwareBufferExternalTextureGL : public HardwareBufferExternalTexture { public: HardwareBufferExternalTextureGL( - const std::shared_ptr& context, int64_t id, - const fml::jni::ScopedJavaGlobalRef& - hardware_buffer_texture_entry, + const fml::jni::ScopedJavaGlobalRef& image_textury_entry, const std::shared_ptr& jni_facade); - ~HardwareBufferExternalTextureGL() override; + protected: + void Attach(PaintContext& context) override; + void Detach() override; + + // Returns true if a new image was acquired and android_image_ and egl_image_ + // were updated. + bool MaybeSwapImages(); + impeller::UniqueEGLImageKHR CreateEGLImage(AHardwareBuffer* buffer); + + fml::jni::ScopedJavaGlobalRef android_image_; + impeller::UniqueEGLImageKHR egl_image_; + + FML_DISALLOW_COPY_AND_ASSIGN(HardwareBufferExternalTextureGL); +}; + +class HardwareBufferExternalTextureGLSkia + : public HardwareBufferExternalTextureGL { + public: + HardwareBufferExternalTextureGLSkia( + const std::shared_ptr& context, + int64_t id, + const fml::jni::ScopedJavaGlobalRef& image_textury_entry, + const std::shared_ptr& jni_facade); private: - void ProcessFrame(PaintContext& context, const SkRect& bounds) override; + void Attach(PaintContext& context) override; void Detach() override; + void ProcessFrame(PaintContext& context, const SkRect& bounds) override; + + void BindImageToTexture(const impeller::UniqueEGLImageKHR& image, GLuint tex); + sk_sp CreateDlImage(PaintContext& context, + const SkRect& bounds); - impeller::UniqueEGLImageKHR image_; impeller::UniqueGLTexture texture_; - FML_DISALLOW_COPY_AND_ASSIGN(HardwareBufferExternalTextureGL); + FML_DISALLOW_COPY_AND_ASSIGN(HardwareBufferExternalTextureGLSkia); }; -class HardwareBufferExternalTextureImpellerGL - : public HardwareBufferExternalTexture { +class HardwareBufferExternalTextureGLImpeller + : public HardwareBufferExternalTextureGL { public: - HardwareBufferExternalTextureImpellerGL( + HardwareBufferExternalTextureGLImpeller( const std::shared_ptr& context, int64_t id, const fml::jni::ScopedJavaGlobalRef& hardware_buffer_texture_entry, const std::shared_ptr& jni_facade); - ~HardwareBufferExternalTextureImpellerGL() override; - private: + void Attach(PaintContext& context) override; void ProcessFrame(PaintContext& context, const SkRect& bounds) override; void Detach() override; - const std::shared_ptr impeller_context_; + sk_sp CreateDlImage(PaintContext& context, + const SkRect& bounds); - impeller::UniqueEGLImageKHR egl_image_; + const std::shared_ptr impeller_context_; - FML_DISALLOW_COPY_AND_ASSIGN(HardwareBufferExternalTextureImpellerGL); + FML_DISALLOW_COPY_AND_ASSIGN(HardwareBufferExternalTextureGLImpeller); }; } // namespace flutter diff --git a/shell/platform/android/hardware_buffer_external_texture_vk.cc b/shell/platform/android/hardware_buffer_external_texture_vk.cc index 9ba52e43e7547..d02a4f545af97 100644 --- a/shell/platform/android/hardware_buffer_external_texture_vk.cc +++ b/shell/platform/android/hardware_buffer_external_texture_vk.cc @@ -1,12 +1,12 @@ #include "flutter/shell/platform/android/hardware_buffer_external_texture_vk.h" +#include "flutter/impeller/core/formats.h" +#include "flutter/impeller/core/texture_descriptor.h" +#include "flutter/impeller/display_list/dl_image_impeller.h" #include "flutter/impeller/renderer/backend/vulkan/android_hardware_buffer_texture_source_vk.h" #include "flutter/impeller/renderer/backend/vulkan/texture_vk.h" #include "flutter/shell/platform/android/ndk_helpers.h" -#include "impeller/core/formats.h" -#include "impeller/core/texture_descriptor.h" -#include "impeller/display_list/dl_image_impeller.h" namespace flutter { @@ -20,18 +20,25 @@ HardwareBufferExternalTextureVK::HardwareBufferExternalTextureVK( HardwareBufferExternalTextureVK::~HardwareBufferExternalTextureVK() {} -void HardwareBufferExternalTextureVK::ProcessFrame(PaintContext& context, - const SkRect& bounds) { +void HardwareBufferExternalTextureVK::Attach(PaintContext& context) { if (state_ == AttachmentState::kUninitialized) { // First processed frame we are attached. state_ = AttachmentState::kAttached; } +} + +void HardwareBufferExternalTextureVK::Detach() {} - AHardwareBuffer* latest_hardware_buffer = GetLatestHardwareBuffer(); - if (latest_hardware_buffer == nullptr) { - FML_LOG(WARNING) << "GetLatestHardwareBuffer returned null."; +void HardwareBufferExternalTextureVK::ProcessFrame(PaintContext& context, + const SkRect& bounds) { + JavaLocalRef image = AcquireLatestImage(); + if (image.is_null()) { return; } + JavaLocalRef old_android_image(android_image_); + android_image_.Reset(image); + JavaLocalRef hardware_buffer = HardwareBufferFor(android_image_); + AHardwareBuffer* latest_hardware_buffer = AHardwareBufferFor(hardware_buffer); AHardwareBuffer_Desc hb_desc = {}; flutter::NDKHelpers::AHardwareBuffer_describe(latest_hardware_buffer, @@ -54,11 +61,10 @@ void HardwareBufferExternalTextureVK::ProcessFrame(PaintContext& context, std::make_shared(impeller_context_, texture_source); dl_image_ = impeller::DlImageImpeller::Make(texture); - - // GetLatestHardwareBuffer keeps a reference on the hardware buffer, drop it. - NDKHelpers::AHardwareBuffer_release(latest_hardware_buffer); + CloseHardwareBuffer(hardware_buffer); + // IMPORTANT: We only close the old image after texture stops referencing + // it. + CloseImage(old_android_image); } -void HardwareBufferExternalTextureVK::Detach() {} - } // namespace flutter diff --git a/shell/platform/android/hardware_buffer_external_texture_vk.h b/shell/platform/android/hardware_buffer_external_texture_vk.h index 76c2779eff28d..f4cd12a1ffb00 100644 --- a/shell/platform/android/hardware_buffer_external_texture_vk.h +++ b/shell/platform/android/hardware_buffer_external_texture_vk.h @@ -26,10 +26,13 @@ class HardwareBufferExternalTextureVK : public HardwareBufferExternalTexture { ~HardwareBufferExternalTextureVK() override; private: + void Attach(PaintContext& context) override; void ProcessFrame(PaintContext& context, const SkRect& bounds) override; void Detach() override; const std::shared_ptr impeller_context_; + + fml::jni::ScopedJavaGlobalRef android_image_; }; } // namespace flutter diff --git a/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java b/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java index 1ab9699c3fe2d..e71e36488169d 100644 --- a/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java +++ b/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java @@ -19,7 +19,6 @@ import androidx.annotation.VisibleForTesting; import io.flutter.Log; import io.flutter.embedding.engine.FlutterJNI; -import io.flutter.embedding.engine.renderer.FlutterRenderer.ImageTextureRegistryEntry; import io.flutter.view.TextureRegistry; import io.flutter.view.TextureRegistry.ImageTextureEntry; import java.io.IOException; @@ -372,19 +371,23 @@ public void release() { @Override @TargetApi(19) public void pushImage(Image image) { + if (released) { + return; + } Image toClose; synchronized (this) { toClose = this.image; this.image = image; - if (image != null) { - // Mark that we have a new frame available. - markTextureFrameAvailable(id); - } } // Close the previously pushed buffer. if (toClose != null) { + Log.e(TAG, "Dropping PlatformView Frame"); toClose.close(); } + if (image != null) { + // Mark that we have a new frame available. + markTextureFrameAvailable(id); + } } @Override @@ -398,12 +401,14 @@ public Image acquireLatestImage() { if (r != null) { try { SyncFence fence = r.getFence(); - boolean signaled = fence.awaitForever(); - if (!signaled) { - Log.e(TAG, "acquireLatestImage failed to wait on image fence."); + if (fence.getSignalTime() == SyncFence.SIGNAL_TIME_PENDING) { + boolean signaled = fence.awaitForever(); + if (!signaled) { + Log.e(TAG, "acquireLatestImage image's fence was never signalled."); + } } } catch (IOException e) { - Log.e(TAG, "acquireLatestImage failed calling Image.getFence: " + e); + // Drop. } } return r; diff --git a/shell/platform/android/io/flutter/plugin/platform/ImageReaderPlatformViewRenderTarget.java b/shell/platform/android/io/flutter/plugin/platform/ImageReaderPlatformViewRenderTarget.java index 60b2d73e70bbd..79690179a8189 100644 --- a/shell/platform/android/io/flutter/plugin/platform/ImageReaderPlatformViewRenderTarget.java +++ b/shell/platform/android/io/flutter/plugin/platform/ImageReaderPlatformViewRenderTarget.java @@ -19,7 +19,7 @@ public class ImageReaderPlatformViewRenderTarget implements PlatformViewRenderTa private int bufferWidth = 0; private int bufferHeight = 0; private static final String TAG = "ImageReaderPlatformViewRenderTarget"; - private static final int MAX_IMAGES = 3; + private static final int MAX_IMAGES = 4; private void closeReader() { if (this.reader != null) { @@ -40,7 +40,7 @@ public void onImageAvailable(ImageReader reader) { try { image = reader.acquireLatestImage(); } catch (IllegalStateException e) { - Log.e(TAG, "New image available but it could not be acquired: " + e.toString()); + Log.e(TAG, "onImageAvailable acquireLatestImage failed: " + e.toString()); } if (image == null) { return; diff --git a/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java b/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java index d5a1621d1e21f..820a8629b4350 100644 --- a/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java +++ b/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java @@ -147,7 +147,7 @@ public class PlatformViewsController implements PlatformViewsAccessibilityDelega // Whether software rendering is used. private boolean usesSoftwareRendering = false; - private static boolean enableHardwareBufferRenderingTarget = false; + private static boolean enableHardwareBufferRenderingTarget = true; private final PlatformViewsChannel.PlatformViewsHandler channelHandler = new PlatformViewsChannel.PlatformViewsHandler() { @@ -181,12 +181,14 @@ public long createForTextureLayer( } if (textureRegistry == null) { throw new IllegalStateException( - "Texture registry is null. This means that platform views controller was detached, view id: " + "Texture registry is null. This means that platform views controller was detached," + + " view id: " + viewId); } if (flutterView == null) { throw new IllegalStateException( - "Flutter view is null. This means the platform views controller doesn't have an attached view, view id: " + "Flutter view is null. This means the platform views controller doesn't have an" + + " attached view, view id: " + viewId); } @@ -195,7 +197,8 @@ public long createForTextureLayer( final View embeddedView = platformView.getView(); if (embeddedView.getParent() != null) { throw new IllegalStateException( - "The Android view returned from PlatformView#getView() was already added to a parent view."); + "The Android view returned from PlatformView#getView() was already added to a" + + " parent view."); } // The newer Texture Layer Hybrid Composition mode isn't suppported if any of the @@ -1098,7 +1101,8 @@ void initializePlatformViewIfNeeded(int viewId) { } if (embeddedView.getParent() != null) { throw new IllegalStateException( - "The Android view returned from PlatformView#getView() was already added to a parent view."); + "The Android view returned from PlatformView#getView() was already added to a parent" + + " view."); } final FlutterMutatorView parentView = new FlutterMutatorView( diff --git a/shell/platform/android/platform_view_android.cc b/shell/platform/android/platform_view_android.cc index ac6111c343ada..434c44db634a1 100644 --- a/shell/platform/android/platform_view_android.cc +++ b/shell/platform/android/platform_view_android.cc @@ -324,13 +324,13 @@ void PlatformViewAndroid::RegisterImageTexture( if (android_context_->RenderingApi() == AndroidRenderingAPI::kOpenGLES) { if (android_context_->GetImpellerContext()) { // Impeller GLES. - RegisterTexture(std::make_shared( + RegisterTexture(std::make_shared( std::static_pointer_cast( android_context_->GetImpellerContext()), texture_id, image_texture_entry, jni_facade_)); } else { // Legacy GL. - RegisterTexture(std::make_shared( + RegisterTexture(std::make_shared( std::static_pointer_cast(android_context_), texture_id, image_texture_entry, jni_facade_)); } From c2ad385a98a4578bf8936c3bda9b40d912c20512 Mon Sep 17 00:00:00 2001 From: Brandon DeRosier Date: Tue, 10 Oct 2023 13:55:05 -0700 Subject: [PATCH 561/859] [Impeller] Don't cull readbacks outside the damage rect. (#46705) Resolves https://github.com/flutter/flutter/issues/136058. The damage rect properly expands to include the backdrop filter readback area to a certain extent, but it suddenly gets excluded once it no longer partially overlaps with the damage rect. This caused the illusion of EntityPass improperly culling the backdrop entity, leading me into a bit of a wild goose chase. Before: https://github.com/flutter/engine/assets/919017/94b8c077-0945-4a2c-96e0-27230d980c38 After: https://github.com/flutter/engine/assets/919017/f1c78365-6e9b-46cb-9e69-33472d488831 --- flow/diff_context.cc | 22 ++++++++++------ flow/diff_context.h | 15 ++++++++--- flow/layers/backdrop_filter_layer.cc | 2 +- .../layers/backdrop_filter_layer_unittests.cc | 26 ++++++++++++++++++- 4 files changed, 51 insertions(+), 14 deletions(-) diff --git a/flow/diff_context.cc b/flow/diff_context.cc index 612fe563fa9c6..54cbc5e80742b 100644 --- a/flow/diff_context.cc +++ b/flow/diff_context.cc @@ -123,12 +123,16 @@ Damage DiffContext::ComputeDamage(const SkIRect& accumulated_buffer_damage, SkRect frame_damage(damage_); for (const auto& r : readbacks_) { - SkRect rect = SkRect::Make(r.rect); - if (rect.intersects(frame_damage)) { - frame_damage.join(rect); - } - if (rect.intersects(buffer_damage)) { - buffer_damage.join(rect); + SkRect paint_rect = SkRect::Make(r.paint_rect); + SkRect readback_rect = SkRect::Make(r.readback_rect); + // Changes either in readback or paint rect require repainting both readback + // and paint rect. + if (paint_rect.intersects(frame_damage) || + readback_rect.intersects(frame_damage)) { + frame_damage.join(readback_rect); + frame_damage.join(paint_rect); + buffer_damage.join(readback_rect); + buffer_damage.join(paint_rect); } } @@ -220,9 +224,11 @@ void DiffContext::AddExistingPaintRegion(const PaintRegion& region) { } } -void DiffContext::AddReadbackRegion(const SkIRect& rect) { +void DiffContext::AddReadbackRegion(const SkIRect& paint_rect, + const SkIRect& readback_rect) { Readback readback; - readback.rect = rect; + readback.paint_rect = paint_rect; + readback.readback_rect = readback_rect; readback.position = rects_->size(); // Push empty rect as a placeholder for position in current subtree rects_->push_back(SkRect::MakeEmpty()); diff --git a/flow/diff_context.h b/flow/diff_context.h index 029fb49f933fc..0eff8ef5db4f6 100644 --- a/flow/diff_context.h +++ b/flow/diff_context.h @@ -123,8 +123,12 @@ class DiffContext { // The idea of readback region is that if any part of the readback region // needs to be repainted, then the whole readback region must be repainted; // - // Readback rect is in screen coordinates. - void AddReadbackRegion(const SkIRect& rect); + // paint_rect - rectangle where the filter paints contents (in screen + // coordinates) + // readback_rect - rectangle where the filter samples from (in screen + // coordinates) + void AddReadbackRegion(const SkIRect& paint_rect, + const SkIRect& readback_rect); // Returns the paint region for current subtree; Each rect in paint region is // in screen coordinates; Once a layer accumulates the paint regions of its @@ -261,8 +265,11 @@ class DiffContext { // determine if subtree has any readback size_t position; - // readback area, in screen coordinates - SkIRect rect; + // Paint region of the filter performing readback, in screen coordinates. + SkIRect paint_rect; + + // Readback area of the filter, in screen coordinates. + SkIRect readback_rect; }; std::vector readbacks_; diff --git a/flow/layers/backdrop_filter_layer.cc b/flow/layers/backdrop_filter_layer.cc index 44c3fca4a6acd..32707c4f77e6d 100644 --- a/flow/layers/backdrop_filter_layer.cc +++ b/flow/layers/backdrop_filter_layer.cc @@ -31,7 +31,7 @@ void BackdropFilterLayer::Diff(DiffContext* context, const Layer* old_layer) { SkIRect filter_input_bounds; // in screen coordinates filter_->get_input_device_bounds( filter_target_bounds, context->GetTransform3x3(), filter_input_bounds); - context->AddReadbackRegion(filter_input_bounds); + context->AddReadbackRegion(filter_target_bounds, filter_input_bounds); } DiffChildren(context, prev); diff --git a/flow/layers/backdrop_filter_layer_unittests.cc b/flow/layers/backdrop_filter_layer_unittests.cc index e73433889ff5d..5e38f74db9f44 100644 --- a/flow/layers/backdrop_filter_layer_unittests.cc +++ b/flow/layers/backdrop_filter_layer_unittests.cc @@ -469,7 +469,6 @@ TEST_F(BackdropLayerDiffTest, BackdropLayer) { auto path1 = SkPath().addRect(SkRect::MakeLTRB(180, 180, 190, 190)); l4.root()->Add(std::make_shared(path1)); damage = DiffLayerTree(l4, l3); - EXPECT_EQ(damage.frame_damage, SkIRect::MakeLTRB(180, 180, 190, 190)); MockLayerTree l5; @@ -482,6 +481,31 @@ TEST_F(BackdropLayerDiffTest, BackdropLayer) { EXPECT_EQ(damage.frame_damage, SkIRect::MakeLTRB(0, 0, 190, 190)); } +TEST_F(BackdropLayerDiffTest, ReadbackOutsideOfPaintArea) { + auto filter = DlMatrixImageFilter(SkMatrix::Translate(50, 50), + DlImageSampling::kLinear); + + MockLayerTree l1(SkISize::Make(100, 100)); + + auto clip = std::make_shared(SkRect::MakeLTRB(60, 60, 80, 80), + Clip::hardEdge); + clip->Add(std::make_shared(filter.shared(), + DlBlendMode::kSrcOver)); + l1.root()->Add(clip); + auto damage = DiffLayerTree(l1, MockLayerTree(SkISize::Make(100, 100))); + + EXPECT_EQ(damage.frame_damage, SkIRect::MakeLTRB(60 - 50, 60 - 50, 80, 80)); + + MockLayerTree l2(SkISize::Make(100, 100)); + // path inside readback area must trigger whole readback repaint + filter + // repaint. + auto path2 = SkPath().addRect(SkRect::MakeXYWH(60 - 50, 60 - 50, 10, 10)); + l2.root()->Add(clip); + l2.root()->Add(std::make_shared(path2)); + damage = DiffLayerTree(l2, l1); + EXPECT_EQ(damage.frame_damage, SkIRect::MakeLTRB(60 - 50, 60 - 50, 80, 80)); +} + TEST_F(BackdropLayerDiffTest, BackdropLayerInvalidTransform) { auto filter = DlBlurImageFilter(10, 10, DlTileMode::kClamp); From 179baa4d9f2af52571329e07f75a7be26b626009 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 10 Oct 2023 16:59:08 -0400 Subject: [PATCH 562/859] Roll Fuchsia Linux SDK from dCjN58uZQBmAFWSxN... to FX5YzwP_ZEnPP0b3v... (#46734) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jsimmons@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 10c83a142f7aa..057caa1b037b8 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'dCjN58uZQBmAFWSxN7mYaGjc1w2sj-1Hni3eXw7yQJIC' + 'version': 'FX5YzwP_ZEnPP0b3vecN_Wn22Bhvzfw3D5dhME9tkXwC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', From 83c12473899bc752d74604878c6379978dc42f7a Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Tue, 10 Oct 2023 16:04:13 -0700 Subject: [PATCH 563/859] [Impeller] log specific framebuffer incomplete error. (#46692) This is much easier to debug if we know the actual error code. --- impeller/renderer/backend/gles/BUILD.gn | 1 + .../renderer/backend/gles/formats_gles.cc | 17 ++++++++++- impeller/renderer/backend/gles/formats_gles.h | 2 ++ .../renderer/backend/gles/render_pass_gles.cc | 6 ++-- .../gles/test/formats_gles_unittests.cc | 28 +++++++++++++++++++ 5 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 impeller/renderer/backend/gles/test/formats_gles_unittests.cc diff --git a/impeller/renderer/backend/gles/BUILD.gn b/impeller/renderer/backend/gles/BUILD.gn index 2877f2c72a684..1d783c0f8c841 100644 --- a/impeller/renderer/backend/gles/BUILD.gn +++ b/impeller/renderer/backend/gles/BUILD.gn @@ -15,6 +15,7 @@ impeller_component("gles_unittests") { testonly = true sources = [ "test/capabilities_unittests.cc", + "test/formats_gles_unittests.cc", "test/mock_gles.cc", "test/mock_gles.h", "test/mock_gles_unittests.cc", diff --git a/impeller/renderer/backend/gles/formats_gles.cc b/impeller/renderer/backend/gles/formats_gles.cc index 7d5f3b832d946..0f8b719b40869 100644 --- a/impeller/renderer/backend/gles/formats_gles.cc +++ b/impeller/renderer/backend/gles/formats_gles.cc @@ -6,6 +6,21 @@ namespace impeller { -// +std::string DebugToFramebufferError(int status) { + switch (status) { + case GL_FRAMEBUFFER_UNDEFINED: + return "GL_FRAMEBUFFER_UNDEFINED"; + case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT: + return "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT"; + case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: + return "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT"; + case GL_FRAMEBUFFER_UNSUPPORTED: + return "GL_FRAMEBUFFER_UNSUPPORTED"; + case GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: + return "GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE"; + default: + return "Unknown error code: " + std::to_string(status); + } +} } // namespace impeller diff --git a/impeller/renderer/backend/gles/formats_gles.h b/impeller/renderer/backend/gles/formats_gles.h index 4e789707af294..ea56ebb6e516f 100644 --- a/impeller/renderer/backend/gles/formats_gles.h +++ b/impeller/renderer/backend/gles/formats_gles.h @@ -194,4 +194,6 @@ constexpr std::optional ToTextureTarget(TextureType type) { FML_UNREACHABLE(); } +std::string DebugToFramebufferError(int status); + } // namespace impeller diff --git a/impeller/renderer/backend/gles/render_pass_gles.cc b/impeller/renderer/backend/gles/render_pass_gles.cc index aa25492524c33..eafa6385d06f6 100644 --- a/impeller/renderer/backend/gles/render_pass_gles.cc +++ b/impeller/renderer/backend/gles/render_pass_gles.cc @@ -193,8 +193,10 @@ struct RenderPassData { } } - if (gl.CheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) { - VALIDATION_LOG << "Could not create a complete frambuffer."; + auto status = gl.CheckFramebufferStatus(GL_FRAMEBUFFER); + if (status != GL_FRAMEBUFFER_COMPLETE) { + VALIDATION_LOG << "Could not create a complete frambuffer: " + << DebugToFramebufferError(status); return false; } } diff --git a/impeller/renderer/backend/gles/test/formats_gles_unittests.cc b/impeller/renderer/backend/gles/test/formats_gles_unittests.cc new file mode 100644 index 0000000000000..4e0fd114e80e3 --- /dev/null +++ b/impeller/renderer/backend/gles/test/formats_gles_unittests.cc @@ -0,0 +1,28 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "flutter/testing/testing.h" // IWYU pragma: keep +#include "gtest/gtest.h" +#include "impeller/renderer/backend/gles/formats_gles.h" + +namespace impeller { +namespace testing { + +TEST(FormatsGLES, CanFormatFramebufferErrorMessage) { + ASSERT_EQ(DebugToFramebufferError(GL_FRAMEBUFFER_UNDEFINED), + "GL_FRAMEBUFFER_UNDEFINED"); + ASSERT_EQ(DebugToFramebufferError(GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT), + "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT"); + ASSERT_EQ( + DebugToFramebufferError(GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT), + "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT"); + ASSERT_EQ(DebugToFramebufferError(GL_FRAMEBUFFER_UNSUPPORTED), + "GL_FRAMEBUFFER_UNSUPPORTED"); + ASSERT_EQ(DebugToFramebufferError(GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE), + "GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE"); + ASSERT_EQ(DebugToFramebufferError(0), "Unknown error code: 0"); +} + +} // namespace testing +} // namespace impeller From 91ab645f4c9b2dbd6abd0d2d4a09f93ab83a8342 Mon Sep 17 00:00:00 2001 From: Brandon DeRosier Date: Tue, 10 Oct 2023 17:53:33 -0700 Subject: [PATCH 564/859] [Impeller] Guard calls to extension proc DebugMessageControlKHR. (#46747) Quick fix to unblock the `impeller-cmake-example` build. Calls to ES3 and extension procs need to be guarded. --- impeller/renderer/backend/gles/reactor_gles.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/impeller/renderer/backend/gles/reactor_gles.cc b/impeller/renderer/backend/gles/reactor_gles.cc index 81d1afb4bc697..dfd26f3dde09d 100644 --- a/impeller/renderer/backend/gles/reactor_gles.cc +++ b/impeller/renderer/backend/gles/reactor_gles.cc @@ -257,12 +257,14 @@ bool ReactorGLES::FlushOps() { void ReactorGLES::SetupDebugGroups() { // Setup of a default active debug group: Filter everything in. - proc_table_->DebugMessageControlKHR(GL_DONT_CARE, // source - GL_DONT_CARE, // type - GL_DONT_CARE, // severity - 0, // count - nullptr, // ids - GL_TRUE); // enabled + if (proc_table_->DebugMessageControlKHR.IsAvailable()) { + proc_table_->DebugMessageControlKHR(GL_DONT_CARE, // source + GL_DONT_CARE, // type + GL_DONT_CARE, // severity + 0, // count + nullptr, // ids + GL_TRUE); // enabled + } } void ReactorGLES::SetDebugLabel(const HandleGLES& handle, std::string label) { From bd76ea0c81ec4527d0c85770e20c204b86e24837 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 10 Oct 2023 20:58:16 -0400 Subject: [PATCH 565/859] Roll Skia from 06145491fd17 to 4935bed4260d (3 revisions) (#46748) https://skia.googlesource.com/skia.git/+log/06145491fd17..4935bed4260d 2023-10-11 lovisolo@google.com [bazel] Move test runners under //tools/testrunners. 2023-10-10 vigneshv@google.com SkAvifCodec: Do not use libavif internal headers 2023-10-10 johnstiles@google.com Move SwizzleComponent::Type into Swizzle header. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/excluded_files | 2 -- ci/licenses_golden/licenses_skia | 10 +--------- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/DEPS b/DEPS index 057caa1b037b8..55d136a23dfb2 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '06145491fd178fd7a92bd4dfbee99ccbb578d42f', + 'skia_revision': '4935bed4260d2c90ec6dad0155314b3ecd889801', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/excluded_files b/ci/licenses_golden/excluded_files index 9177724366207..de5f863f24377 100644 --- a/ci/licenses_golden/excluded_files +++ b/ci/licenses_golden/excluded_files @@ -2650,9 +2650,7 @@ ../../../third_party/skia/experimental ../../../third_party/skia/fuzz/README.md ../../../third_party/skia/gm/BUILD.bazel -../../../third_party/skia/gm/android_gm_test.bzl ../../../third_party/skia/gm/png_codec.bzl -../../../third_party/skia/gm/vias/BUILD.bazel ../../../third_party/skia/gn/BUILD.bazel ../../../third_party/skia/gn/__init__.py ../../../third_party/skia/gn/bazel_build.py diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 7c3d68b4ffd6e..767a049a50adc 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 4a4949218f693a1592bf1308dfdd43d3 +Signature: b01ab1f7f13ff28c50159876260e9ed9 ==================================================================================================== LIBRARY: etc1 @@ -8607,7 +8607,6 @@ LIBRARY: skia ORIGIN: ../../../third_party/skia/gm/coordclampshader.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/fontations.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/imagefiltersunpremul.cpp + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/gm/vias/Draw.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/ports/SkFontMgr_data.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/ports/SkTypeface_fontations.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/private/SkGainmapInfo.h + ../../../third_party/skia/LICENSE @@ -8648,7 +8647,6 @@ TYPE: LicenseType.bsd FILE: ../../../third_party/skia/gm/coordclampshader.cpp FILE: ../../../third_party/skia/gm/fontations.cpp FILE: ../../../third_party/skia/gm/imagefiltersunpremul.cpp -FILE: ../../../third_party/skia/gm/vias/Draw.h FILE: ../../../third_party/skia/include/ports/SkFontMgr_data.h FILE: ../../../third_party/skia/include/ports/SkTypeface_fontations.h FILE: ../../../third_party/skia/include/private/SkGainmapInfo.h @@ -8725,15 +8723,12 @@ ORIGIN: ../../../third_party/skia/fuzz/FuzzQuadRoots.cpp + ../../../third_party/ ORIGIN: ../../../third_party/skia/fuzz/oss_fuzz/FuzzCubicRoots.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/fuzz/oss_fuzz/FuzzPrecompile.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/fuzz/oss_fuzz/FuzzQuadRoots.cpp + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/gm/BazelGMRunner.cpp + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/gm/BazelNoopRunner.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/fontations_ft_compare.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/graphite_replay.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/hello_bazel_world.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/png_codec.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/rippleshadergm.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/scaledrects.cpp + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/gm/vias/SimpleVias.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/workingspace.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/android/SkCanvasAndroid.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/android/SkHeifDecoder.h + ../../../third_party/skia/LICENSE @@ -8993,15 +8988,12 @@ FILE: ../../../third_party/skia/fuzz/FuzzQuadRoots.cpp FILE: ../../../third_party/skia/fuzz/oss_fuzz/FuzzCubicRoots.cpp FILE: ../../../third_party/skia/fuzz/oss_fuzz/FuzzPrecompile.cpp FILE: ../../../third_party/skia/fuzz/oss_fuzz/FuzzQuadRoots.cpp -FILE: ../../../third_party/skia/gm/BazelGMRunner.cpp -FILE: ../../../third_party/skia/gm/BazelNoopRunner.cpp FILE: ../../../third_party/skia/gm/fontations_ft_compare.cpp FILE: ../../../third_party/skia/gm/graphite_replay.cpp FILE: ../../../third_party/skia/gm/hello_bazel_world.cpp FILE: ../../../third_party/skia/gm/png_codec.cpp FILE: ../../../third_party/skia/gm/rippleshadergm.cpp FILE: ../../../third_party/skia/gm/scaledrects.cpp -FILE: ../../../third_party/skia/gm/vias/SimpleVias.cpp FILE: ../../../third_party/skia/gm/workingspace.cpp FILE: ../../../third_party/skia/include/android/SkCanvasAndroid.h FILE: ../../../third_party/skia/include/android/SkHeifDecoder.h From cae80d4f53d90ae9b45db7fe7e8711517ee49f4e Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Tue, 10 Oct 2023 19:21:54 -0600 Subject: [PATCH 566/859] Move //third_party/glfw to //flutter/third_party/glfw (#46733) As part of eliminating the Flutter buildroot (#67373), we are moving all third-party dependencies from //third_party to //flutter/third_party. This is the engine-side follow-up to flutter/buildroot#777. Once all third-party dependencies have been migrated, tooling and config will be moved and the buildroot will be eliminated altogether. Issue: https://github.com/flutter/flutter/issues/136284 No tests changed because there is no semantic change to this PR. This is simply relocating a dependency. --- DEPS | 4 +- ci/licenses.sh | 2 +- ci/licenses_golden/excluded_files | 30 +- ci/licenses_golden/licenses_flutter | 636 ++++++++++++++++++++++- ci/licenses_golden/licenses_third_party | 638 +----------------------- ci/licenses_golden/tool_signature | 2 +- examples/glfw/BUILD.gn | 2 +- examples/glfw_drm/BUILD.gn | 2 +- examples/vulkan_glfw/BUILD.gn | 2 +- impeller/BUILD.gn | 2 +- impeller/playground/BUILD.gn | 2 +- shell/platform/glfw/BUILD.gn | 2 +- tools/licenses/lib/paths.dart | 4 +- 13 files changed, 664 insertions(+), 664 deletions(-) diff --git a/DEPS b/DEPS index 55d136a23dfb2..b0384d42d47dc 100644 --- a/DEPS +++ b/DEPS @@ -262,7 +262,7 @@ allowed_hosts = [ ] deps = { - 'src': 'https://github.com/flutter/buildroot.git' + '@' + '5d60bd2eb4642b64d00c845e5ca9f1ea41fd6db6', + 'src': 'https://github.com/flutter/buildroot.git' + '@' + '1d2965f9b0f784abea8ddbeb54827afa9ed196b9', # Fuchsia compatibility # @@ -282,7 +282,7 @@ deps = { 'src/third_party/libcxxabi': Var('llvm_git') + '/llvm-project/libcxxabi' + '@' + '2ce528fb5e0f92e57c97ec3ff53b75359d33af12', - 'src/third_party/glfw': + 'src/flutter/third_party/glfw': Var('fuchsia_git') + '/third_party/glfw' + '@' + 'dd8a678a66f1967372e5a5e3deac41ebf65ee127', 'src/third_party/shaderc': diff --git a/ci/licenses.sh b/ci/licenses.sh index c38b08126996d..2989505ae17ce 100755 --- a/ci/licenses.sh +++ b/ci/licenses.sh @@ -156,7 +156,7 @@ function verify_licenses() ( local actualLicenseCount actualLicenseCount="$(tail -n 1 flutter/ci/licenses_golden/licenses_flutter | tr -dc '0-9')" - local expectedLicenseCount=20 # When changing this number: Update the error message below as well describing the newly expected license types. + local expectedLicenseCount=39 # When changing this number: Update the error message below as well describing the newly expected license types. if [[ $actualLicenseCount -ne $expectedLicenseCount ]]; then echo "=============================== ERROR ===============================" diff --git a/ci/licenses_golden/excluded_files b/ci/licenses_golden/excluded_files index de5f863f24377..7bfa23f637b9c 100644 --- a/ci/licenses_golden/excluded_files +++ b/ci/licenses_golden/excluded_files @@ -430,6 +430,21 @@ ../../../flutter/third_party/accessibility/gfx/geometry/vector2d_unittest.cc ../../../flutter/third_party/accessibility/gfx/range/range_unittest.cc ../../../flutter/third_party/accessibility/gfx/test +../../../flutter/third_party/glfw/.appveyor.yml +../../../flutter/third_party/glfw/.git +../../../flutter/third_party/glfw/.gitattributes +../../../flutter/third_party/glfw/.github +../../../flutter/third_party/glfw/.gitignore +../../../flutter/third_party/glfw/.mailmap +../../../flutter/third_party/glfw/CMake +../../../flutter/third_party/glfw/CMakeLists.txt +../../../flutter/third_party/glfw/CONTRIBUTORS.md +../../../flutter/third_party/glfw/README.md +../../../flutter/third_party/glfw/deps +../../../flutter/third_party/glfw/docs +../../../flutter/third_party/glfw/examples +../../../flutter/third_party/glfw/src/CMakeLists.txt +../../../flutter/third_party/glfw/tests ../../../flutter/third_party/gn ../../../flutter/third_party/ninja ../../../flutter/third_party/spring_animation/README.md @@ -2021,21 +2036,6 @@ ../../../third_party/freetype2/src/winfonts/rules.mk ../../../third_party/freetype2/tests ../../../third_party/freetype2/vms_make.com -../../../third_party/glfw/.appveyor.yml -../../../third_party/glfw/.git -../../../third_party/glfw/.gitattributes -../../../third_party/glfw/.github -../../../third_party/glfw/.gitignore -../../../third_party/glfw/.mailmap -../../../third_party/glfw/CMake -../../../third_party/glfw/CMakeLists.txt -../../../third_party/glfw/CONTRIBUTORS.md -../../../third_party/glfw/README.md -../../../third_party/glfw/deps -../../../third_party/glfw/docs -../../../third_party/glfw/examples -../../../third_party/glfw/src/CMakeLists.txt -../../../third_party/glfw/tests ../../../third_party/google_fonts_for_unit_tests ../../../third_party/googletest ../../../third_party/gradle diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index 9d4461c3deff6..c43e6abab3442 100644 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -277,6 +277,331 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================================================== +==================================================================================================== +LIBRARY: glfw +ORIGIN: ../../../flutter/third_party/glfw/src/mappings.h +ORIGIN: ../../../flutter/third_party/glfw/src/mappings.h.in +TYPE: LicenseType.unknown +FILE: ../../../flutter/third_party/glfw/src/mappings.h +FILE: ../../../flutter/third_party/glfw/src/mappings.h.in +---------------------------------------------------------------------------------------------------- +Copyright (C) 1997-2013 Sam Lantinga + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the +use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would + be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + +3. This notice may not be removed or altered from any source distribution. +==================================================================================================== + +==================================================================================================== +LIBRARY: glfw +ORIGIN: ../../../flutter/third_party/glfw/LICENSE.md +TYPE: LicenseType.unknown +FILE: ../../../flutter/third_party/glfw/src/glfw.rc.in +---------------------------------------------------------------------------------------------------- +Copyright (c) 2002-2006 Marcus Geelnard + +Copyright (c) 2006-2019 Camilla Löwy + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would + be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not + be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source + distribution. +==================================================================================================== + +==================================================================================================== +LIBRARY: glfw +ORIGIN: ../../../flutter/third_party/glfw/src/context.c +TYPE: LicenseType.unknown +FILE: ../../../flutter/third_party/glfw/src/context.c +---------------------------------------------------------------------------------------------------- +Copyright (c) 2002-2006 Marcus Geelnard +Copyright (c) 2006-2016 Camilla Löwy + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would + be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not + be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source + distribution. +==================================================================================================== + +==================================================================================================== +LIBRARY: glfw +ORIGIN: ../../../flutter/third_party/glfw/src/linux_joystick.c +ORIGIN: ../../../flutter/third_party/glfw/src/posix_thread.c +ORIGIN: ../../../flutter/third_party/glfw/src/posix_thread.h +ORIGIN: ../../../flutter/third_party/glfw/src/posix_time.c +ORIGIN: ../../../flutter/third_party/glfw/src/posix_time.h +ORIGIN: ../../../flutter/third_party/glfw/src/win32_thread.c +ORIGIN: ../../../flutter/third_party/glfw/src/win32_thread.h +ORIGIN: ../../../flutter/third_party/glfw/src/win32_time.c +ORIGIN: ../../../flutter/third_party/glfw/src/win32_time.h +ORIGIN: ../../../flutter/third_party/glfw/src/xkb_unicode.c +TYPE: LicenseType.unknown +FILE: ../../../flutter/third_party/glfw/src/linux_joystick.c +FILE: ../../../flutter/third_party/glfw/src/posix_thread.c +FILE: ../../../flutter/third_party/glfw/src/posix_thread.h +FILE: ../../../flutter/third_party/glfw/src/posix_time.c +FILE: ../../../flutter/third_party/glfw/src/posix_time.h +FILE: ../../../flutter/third_party/glfw/src/win32_thread.c +FILE: ../../../flutter/third_party/glfw/src/win32_thread.h +FILE: ../../../flutter/third_party/glfw/src/win32_time.c +FILE: ../../../flutter/third_party/glfw/src/win32_time.h +FILE: ../../../flutter/third_party/glfw/src/xkb_unicode.c +---------------------------------------------------------------------------------------------------- +Copyright (c) 2002-2006 Marcus Geelnard +Copyright (c) 2006-2017 Camilla Löwy + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would + be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not + be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source + distribution. +==================================================================================================== + +==================================================================================================== +LIBRARY: glfw +ORIGIN: ../../../flutter/third_party/glfw/include/GLFW/glfw3native.h +ORIGIN: ../../../flutter/third_party/glfw/src/init.c +ORIGIN: ../../../flutter/third_party/glfw/src/platform.c +ORIGIN: ../../../flutter/third_party/glfw/src/platform.h +ORIGIN: ../../../flutter/third_party/glfw/src/vulkan.c +TYPE: LicenseType.unknown +FILE: ../../../flutter/third_party/glfw/include/GLFW/glfw3native.h +FILE: ../../../flutter/third_party/glfw/src/init.c +FILE: ../../../flutter/third_party/glfw/src/platform.c +FILE: ../../../flutter/third_party/glfw/src/platform.h +FILE: ../../../flutter/third_party/glfw/src/vulkan.c +---------------------------------------------------------------------------------------------------- +Copyright (c) 2002-2006 Marcus Geelnard +Copyright (c) 2006-2018 Camilla Löwy + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would + be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not + be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source + distribution. +==================================================================================================== + +==================================================================================================== +LIBRARY: glfw +ORIGIN: ../../../flutter/third_party/glfw/include/GLFW/glfw3.h +ORIGIN: ../../../flutter/third_party/glfw/src/cocoa_monitor.m +ORIGIN: ../../../flutter/third_party/glfw/src/egl_context.c +ORIGIN: ../../../flutter/third_party/glfw/src/glx_context.c +ORIGIN: ../../../flutter/third_party/glfw/src/input.c +ORIGIN: ../../../flutter/third_party/glfw/src/internal.h +ORIGIN: ../../../flutter/third_party/glfw/src/monitor.c +ORIGIN: ../../../flutter/third_party/glfw/src/wgl_context.c +ORIGIN: ../../../flutter/third_party/glfw/src/win32_init.c +ORIGIN: ../../../flutter/third_party/glfw/src/win32_joystick.c +ORIGIN: ../../../flutter/third_party/glfw/src/win32_monitor.c +ORIGIN: ../../../flutter/third_party/glfw/src/win32_platform.h +ORIGIN: ../../../flutter/third_party/glfw/src/win32_window.c +ORIGIN: ../../../flutter/third_party/glfw/src/x11_init.c +ORIGIN: ../../../flutter/third_party/glfw/src/x11_monitor.c +ORIGIN: ../../../flutter/third_party/glfw/src/x11_platform.h +ORIGIN: ../../../flutter/third_party/glfw/src/x11_window.c +TYPE: LicenseType.unknown +FILE: ../../../flutter/third_party/glfw/include/GLFW/glfw3.h +FILE: ../../../flutter/third_party/glfw/src/cocoa_monitor.m +FILE: ../../../flutter/third_party/glfw/src/egl_context.c +FILE: ../../../flutter/third_party/glfw/src/glx_context.c +FILE: ../../../flutter/third_party/glfw/src/input.c +FILE: ../../../flutter/third_party/glfw/src/internal.h +FILE: ../../../flutter/third_party/glfw/src/monitor.c +FILE: ../../../flutter/third_party/glfw/src/wgl_context.c +FILE: ../../../flutter/third_party/glfw/src/win32_init.c +FILE: ../../../flutter/third_party/glfw/src/win32_joystick.c +FILE: ../../../flutter/third_party/glfw/src/win32_monitor.c +FILE: ../../../flutter/third_party/glfw/src/win32_platform.h +FILE: ../../../flutter/third_party/glfw/src/win32_window.c +FILE: ../../../flutter/third_party/glfw/src/x11_init.c +FILE: ../../../flutter/third_party/glfw/src/x11_monitor.c +FILE: ../../../flutter/third_party/glfw/src/x11_platform.h +FILE: ../../../flutter/third_party/glfw/src/x11_window.c +---------------------------------------------------------------------------------------------------- +Copyright (c) 2002-2006 Marcus Geelnard +Copyright (c) 2006-2019 Camilla Löwy + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would + be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not + be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source + distribution. +==================================================================================================== + +==================================================================================================== +LIBRARY: glfw +ORIGIN: ../../../flutter/third_party/glfw/src/window.c +TYPE: LicenseType.unknown +FILE: ../../../flutter/third_party/glfw/src/window.c +---------------------------------------------------------------------------------------------------- +Copyright (c) 2002-2006 Marcus Geelnard +Copyright (c) 2006-2019 Camilla Löwy +Copyright (c) 2012 Torsten Walluhn + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would + be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not + be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source + distribution. +==================================================================================================== + +==================================================================================================== +LIBRARY: glfw +ORIGIN: ../../../flutter/third_party/glfw/src/cocoa_joystick.h +ORIGIN: ../../../flutter/third_party/glfw/src/null_joystick.h +ORIGIN: ../../../flutter/third_party/glfw/src/win32_joystick.h +TYPE: LicenseType.unknown +FILE: ../../../flutter/third_party/glfw/src/cocoa_joystick.h +FILE: ../../../flutter/third_party/glfw/src/null_joystick.h +FILE: ../../../flutter/third_party/glfw/src/win32_joystick.h +---------------------------------------------------------------------------------------------------- +Copyright (c) 2006-2017 Camilla Löwy + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would + be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not + be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source + distribution. +==================================================================================================== + +==================================================================================================== +LIBRARY: glfw +ORIGIN: ../../../flutter/third_party/glfw/src/mappings.h +ORIGIN: ../../../flutter/third_party/glfw/src/mappings.h.in +TYPE: LicenseType.unknown +FILE: ../../../flutter/third_party/glfw/src/mappings.h +FILE: ../../../flutter/third_party/glfw/src/mappings.h.in +---------------------------------------------------------------------------------------------------- +Copyright (c) 2006-2018 Camilla Löwy + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would + be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not + be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source + distribution. +==================================================================================================== + ==================================================================================================== LIBRARY: accessibility ORIGIN: ../../../flutter/third_party/accessibility/gfx/geometry/insets.cc + ../../../flutter/third_party/accessibility/LICENSE @@ -312,6 +637,125 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==================================================================================================== +==================================================================================================== +LIBRARY: glfw +ORIGIN: ../../../flutter/third_party/glfw/src/cocoa_time.c +TYPE: LicenseType.unknown +FILE: ../../../flutter/third_party/glfw/src/cocoa_time.c +---------------------------------------------------------------------------------------------------- +Copyright (c) 2009-2016 Camilla Löwy + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would + be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not + be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source + distribution. +==================================================================================================== + +==================================================================================================== +LIBRARY: glfw +ORIGIN: ../../../flutter/third_party/glfw/src/cocoa_init.m +ORIGIN: ../../../flutter/third_party/glfw/src/cocoa_platform.h +ORIGIN: ../../../flutter/third_party/glfw/src/cocoa_window.m +ORIGIN: ../../../flutter/third_party/glfw/src/nsgl_context.m +TYPE: LicenseType.unknown +FILE: ../../../flutter/third_party/glfw/src/cocoa_init.m +FILE: ../../../flutter/third_party/glfw/src/cocoa_platform.h +FILE: ../../../flutter/third_party/glfw/src/cocoa_window.m +FILE: ../../../flutter/third_party/glfw/src/nsgl_context.m +---------------------------------------------------------------------------------------------------- +Copyright (c) 2009-2019 Camilla Löwy + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would + be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not + be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source + distribution. +==================================================================================================== + +==================================================================================================== +LIBRARY: glfw +ORIGIN: ../../../flutter/third_party/glfw/src/cocoa_joystick.m +TYPE: LicenseType.unknown +FILE: ../../../flutter/third_party/glfw/src/cocoa_joystick.m +---------------------------------------------------------------------------------------------------- +Copyright (c) 2009-2019 Camilla Löwy +Copyright (c) 2012 Torsten Walluhn + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would + be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not + be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source + distribution. +==================================================================================================== + +==================================================================================================== +LIBRARY: glfw +ORIGIN: ../../../flutter/third_party/glfw/src/cocoa_time.h +TYPE: LicenseType.unknown +FILE: ../../../flutter/third_party/glfw/src/cocoa_time.h +---------------------------------------------------------------------------------------------------- +Copyright (c) 2009-2021 Camilla Löwy + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would + be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not + be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source + distribution. +==================================================================================================== + ==================================================================================================== LIBRARY: accessibility ORIGIN: ../../../flutter/third_party/accessibility/base/win/scoped_bstr.cc + ../../../flutter/third_party/accessibility/LICENSE @@ -530,6 +974,44 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==================================================================================================== +==================================================================================================== +LIBRARY: glfw +ORIGIN: ../../../flutter/third_party/glfw/src/linux_joystick.h +ORIGIN: ../../../flutter/third_party/glfw/src/wl_init.c +ORIGIN: ../../../flutter/third_party/glfw/src/wl_monitor.c +ORIGIN: ../../../flutter/third_party/glfw/src/wl_platform.h +ORIGIN: ../../../flutter/third_party/glfw/src/wl_window.c +ORIGIN: ../../../flutter/third_party/glfw/src/xkb_unicode.h +TYPE: LicenseType.unknown +FILE: ../../../flutter/third_party/glfw/src/linux_joystick.h +FILE: ../../../flutter/third_party/glfw/src/wl_init.c +FILE: ../../../flutter/third_party/glfw/src/wl_monitor.c +FILE: ../../../flutter/third_party/glfw/src/wl_platform.h +FILE: ../../../flutter/third_party/glfw/src/wl_window.c +FILE: ../../../flutter/third_party/glfw/src/xkb_unicode.h +---------------------------------------------------------------------------------------------------- +Copyright (c) 2014 Jonas Ådahl + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would + be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not + be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source + distribution. +==================================================================================================== + ==================================================================================================== LIBRARY: accessibility ORIGIN: ../../../flutter/third_party/accessibility/base/win/windows_types.h + ../../../flutter/third_party/accessibility/LICENSE @@ -565,6 +1047,158 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==================================================================================================== +==================================================================================================== +LIBRARY: glfw +ORIGIN: ../../../flutter/third_party/glfw/src/null_init.c +ORIGIN: ../../../flutter/third_party/glfw/src/null_platform.h +ORIGIN: ../../../flutter/third_party/glfw/src/osmesa_context.c +TYPE: LicenseType.unknown +FILE: ../../../flutter/third_party/glfw/src/null_init.c +FILE: ../../../flutter/third_party/glfw/src/null_platform.h +FILE: ../../../flutter/third_party/glfw/src/osmesa_context.c +---------------------------------------------------------------------------------------------------- +Copyright (c) 2016 Google Inc. +Copyright (c) 2016-2017 Camilla Löwy + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would + be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not + be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source + distribution. +==================================================================================================== + +==================================================================================================== +LIBRARY: glfw +ORIGIN: ../../../flutter/third_party/glfw/src/null_monitor.c +ORIGIN: ../../../flutter/third_party/glfw/src/null_window.c +TYPE: LicenseType.unknown +FILE: ../../../flutter/third_party/glfw/src/null_monitor.c +FILE: ../../../flutter/third_party/glfw/src/null_window.c +---------------------------------------------------------------------------------------------------- +Copyright (c) 2016 Google Inc. +Copyright (c) 2016-2019 Camilla Löwy + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would + be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not + be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source + distribution. +==================================================================================================== + +==================================================================================================== +LIBRARY: glfw +ORIGIN: ../../../flutter/third_party/glfw/src/null_joystick.c +TYPE: LicenseType.unknown +FILE: ../../../flutter/third_party/glfw/src/null_joystick.c +---------------------------------------------------------------------------------------------------- +Copyright (c) 2016-2017 Camilla Löwy + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would + be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not + be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source + distribution. +==================================================================================================== + +==================================================================================================== +LIBRARY: glfw +ORIGIN: ../../../flutter/third_party/glfw/src/posix_module.c +ORIGIN: ../../../flutter/third_party/glfw/src/win32_module.c +TYPE: LicenseType.unknown +FILE: ../../../flutter/third_party/glfw/src/posix_module.c +FILE: ../../../flutter/third_party/glfw/src/win32_module.c +---------------------------------------------------------------------------------------------------- +Copyright (c) 2021 Camilla Löwy + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would + be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not + be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source + distribution. +==================================================================================================== + +==================================================================================================== +LIBRARY: glfw +ORIGIN: ../../../flutter/third_party/glfw/src/posix_poll.c +ORIGIN: ../../../flutter/third_party/glfw/src/posix_poll.h +TYPE: LicenseType.unknown +FILE: ../../../flutter/third_party/glfw/src/posix_poll.c +FILE: ../../../flutter/third_party/glfw/src/posix_poll.h +---------------------------------------------------------------------------------------------------- +Copyright (c) 2022 Camilla Löwy + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would + be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not + be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source + distribution. +==================================================================================================== + ==================================================================================================== LIBRARY: web_locale_keymap ORIGIN: ../../../flutter/third_party/web_locale_keymap/lib/web_locale_keymap.dart + ../../../flutter/third_party/web_locale_keymap/License.txt @@ -6851,4 +7485,4 @@ use or other dealings in these Data Files or Software without prior written authorization of the copyright holder. ==================================================================================================== -Total license count: 20 +Total license count: 39 diff --git a/ci/licenses_golden/licenses_third_party b/ci/licenses_golden/licenses_third_party index 468830592f309..2f295074189c8 100644 --- a/ci/licenses_golden/licenses_third_party +++ b/ci/licenses_golden/licenses_third_party @@ -1,4 +1,4 @@ -Signature: 0e74d276e12eb0bcc1bfbdbbfabc2574 +Signature: 22b6a63b18dd5d72500a4009598eba44 ==================================================================================================== LIBRARY: angle @@ -11944,35 +11944,6 @@ use or other dealings in these Data Files or Software without prior written authorization of the copyright holder. ==================================================================================================== -==================================================================================================== -LIBRARY: glfw -ORIGIN: ../../../third_party/glfw/src/mappings.h -ORIGIN: ../../../third_party/glfw/src/mappings.h.in -TYPE: LicenseType.unknown -FILE: ../../../third_party/glfw/src/mappings.h -FILE: ../../../third_party/glfw/src/mappings.h.in ----------------------------------------------------------------------------------------------------- -Copyright (C) 1997-2013 Sam Lantinga - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the -use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would - be appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - -3. This notice may not be removed or altered from any source distribution. -==================================================================================================== - ==================================================================================================== LIBRARY: icu ORIGIN: ../../../third_party/icu/source/common/locavailable.cpp + ../../../third_party/icu/LICENSE @@ -32647,240 +32618,6 @@ use or other dealings in these Data Files or Software without prior written authorization of the copyright holder. ==================================================================================================== -==================================================================================================== -LIBRARY: glfw -ORIGIN: ../../../third_party/glfw/LICENSE.md -TYPE: LicenseType.unknown -FILE: ../../../third_party/glfw/src/glfw.rc.in ----------------------------------------------------------------------------------------------------- -Copyright (c) 2002-2006 Marcus Geelnard - -Copyright (c) 2006-2019 Camilla Löwy - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would - be appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and must not - be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source - distribution. -==================================================================================================== - -==================================================================================================== -LIBRARY: glfw -ORIGIN: ../../../third_party/glfw/src/context.c -TYPE: LicenseType.unknown -FILE: ../../../third_party/glfw/src/context.c ----------------------------------------------------------------------------------------------------- -Copyright (c) 2002-2006 Marcus Geelnard -Copyright (c) 2006-2016 Camilla Löwy - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would - be appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and must not - be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source - distribution. -==================================================================================================== - -==================================================================================================== -LIBRARY: glfw -ORIGIN: ../../../third_party/glfw/src/linux_joystick.c -ORIGIN: ../../../third_party/glfw/src/posix_thread.c -ORIGIN: ../../../third_party/glfw/src/posix_thread.h -ORIGIN: ../../../third_party/glfw/src/posix_time.c -ORIGIN: ../../../third_party/glfw/src/posix_time.h -ORIGIN: ../../../third_party/glfw/src/win32_thread.c -ORIGIN: ../../../third_party/glfw/src/win32_thread.h -ORIGIN: ../../../third_party/glfw/src/win32_time.c -ORIGIN: ../../../third_party/glfw/src/win32_time.h -ORIGIN: ../../../third_party/glfw/src/xkb_unicode.c -TYPE: LicenseType.unknown -FILE: ../../../third_party/glfw/src/linux_joystick.c -FILE: ../../../third_party/glfw/src/posix_thread.c -FILE: ../../../third_party/glfw/src/posix_thread.h -FILE: ../../../third_party/glfw/src/posix_time.c -FILE: ../../../third_party/glfw/src/posix_time.h -FILE: ../../../third_party/glfw/src/win32_thread.c -FILE: ../../../third_party/glfw/src/win32_thread.h -FILE: ../../../third_party/glfw/src/win32_time.c -FILE: ../../../third_party/glfw/src/win32_time.h -FILE: ../../../third_party/glfw/src/xkb_unicode.c ----------------------------------------------------------------------------------------------------- -Copyright (c) 2002-2006 Marcus Geelnard -Copyright (c) 2006-2017 Camilla Löwy - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would - be appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and must not - be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source - distribution. -==================================================================================================== - -==================================================================================================== -LIBRARY: glfw -ORIGIN: ../../../third_party/glfw/include/GLFW/glfw3native.h -ORIGIN: ../../../third_party/glfw/src/init.c -ORIGIN: ../../../third_party/glfw/src/platform.c -ORIGIN: ../../../third_party/glfw/src/platform.h -ORIGIN: ../../../third_party/glfw/src/vulkan.c -TYPE: LicenseType.unknown -FILE: ../../../third_party/glfw/include/GLFW/glfw3native.h -FILE: ../../../third_party/glfw/src/init.c -FILE: ../../../third_party/glfw/src/platform.c -FILE: ../../../third_party/glfw/src/platform.h -FILE: ../../../third_party/glfw/src/vulkan.c ----------------------------------------------------------------------------------------------------- -Copyright (c) 2002-2006 Marcus Geelnard -Copyright (c) 2006-2018 Camilla Löwy - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would - be appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and must not - be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source - distribution. -==================================================================================================== - -==================================================================================================== -LIBRARY: glfw -ORIGIN: ../../../third_party/glfw/include/GLFW/glfw3.h -ORIGIN: ../../../third_party/glfw/src/cocoa_monitor.m -ORIGIN: ../../../third_party/glfw/src/egl_context.c -ORIGIN: ../../../third_party/glfw/src/glx_context.c -ORIGIN: ../../../third_party/glfw/src/input.c -ORIGIN: ../../../third_party/glfw/src/internal.h -ORIGIN: ../../../third_party/glfw/src/monitor.c -ORIGIN: ../../../third_party/glfw/src/wgl_context.c -ORIGIN: ../../../third_party/glfw/src/win32_init.c -ORIGIN: ../../../third_party/glfw/src/win32_joystick.c -ORIGIN: ../../../third_party/glfw/src/win32_monitor.c -ORIGIN: ../../../third_party/glfw/src/win32_platform.h -ORIGIN: ../../../third_party/glfw/src/win32_window.c -ORIGIN: ../../../third_party/glfw/src/x11_init.c -ORIGIN: ../../../third_party/glfw/src/x11_monitor.c -ORIGIN: ../../../third_party/glfw/src/x11_platform.h -ORIGIN: ../../../third_party/glfw/src/x11_window.c -TYPE: LicenseType.unknown -FILE: ../../../third_party/glfw/include/GLFW/glfw3.h -FILE: ../../../third_party/glfw/src/cocoa_monitor.m -FILE: ../../../third_party/glfw/src/egl_context.c -FILE: ../../../third_party/glfw/src/glx_context.c -FILE: ../../../third_party/glfw/src/input.c -FILE: ../../../third_party/glfw/src/internal.h -FILE: ../../../third_party/glfw/src/monitor.c -FILE: ../../../third_party/glfw/src/wgl_context.c -FILE: ../../../third_party/glfw/src/win32_init.c -FILE: ../../../third_party/glfw/src/win32_joystick.c -FILE: ../../../third_party/glfw/src/win32_monitor.c -FILE: ../../../third_party/glfw/src/win32_platform.h -FILE: ../../../third_party/glfw/src/win32_window.c -FILE: ../../../third_party/glfw/src/x11_init.c -FILE: ../../../third_party/glfw/src/x11_monitor.c -FILE: ../../../third_party/glfw/src/x11_platform.h -FILE: ../../../third_party/glfw/src/x11_window.c ----------------------------------------------------------------------------------------------------- -Copyright (c) 2002-2006 Marcus Geelnard -Copyright (c) 2006-2019 Camilla Löwy - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would - be appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and must not - be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source - distribution. -==================================================================================================== - -==================================================================================================== -LIBRARY: glfw -ORIGIN: ../../../third_party/glfw/src/window.c -TYPE: LicenseType.unknown -FILE: ../../../third_party/glfw/src/window.c ----------------------------------------------------------------------------------------------------- -Copyright (c) 2002-2006 Marcus Geelnard -Copyright (c) 2006-2019 Camilla Löwy -Copyright (c) 2012 Torsten Walluhn - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would - be appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and must not - be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source - distribution. -==================================================================================================== - ==================================================================================================== LIBRARY: boringssl ORIGIN: ../../../third_party/boringssl/src/crypto/fipsmodule/aes/aes.c @@ -34450,68 +34187,6 @@ OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==================================================================================================== -==================================================================================================== -LIBRARY: glfw -ORIGIN: ../../../third_party/glfw/src/cocoa_joystick.h -ORIGIN: ../../../third_party/glfw/src/null_joystick.h -ORIGIN: ../../../third_party/glfw/src/win32_joystick.h -TYPE: LicenseType.unknown -FILE: ../../../third_party/glfw/src/cocoa_joystick.h -FILE: ../../../third_party/glfw/src/null_joystick.h -FILE: ../../../third_party/glfw/src/win32_joystick.h ----------------------------------------------------------------------------------------------------- -Copyright (c) 2006-2017 Camilla Löwy - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would - be appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and must not - be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source - distribution. -==================================================================================================== - -==================================================================================================== -LIBRARY: glfw -ORIGIN: ../../../third_party/glfw/src/mappings.h -ORIGIN: ../../../third_party/glfw/src/mappings.h.in -TYPE: LicenseType.unknown -FILE: ../../../third_party/glfw/src/mappings.h -FILE: ../../../third_party/glfw/src/mappings.h.in ----------------------------------------------------------------------------------------------------- -Copyright (c) 2006-2018 Camilla Löwy - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would - be appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and must not - be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source - distribution. -==================================================================================================== - ==================================================================================================== LIBRARY: khronos ORIGIN: ../../../third_party/khronos/noninclude/GL/glxext.h @@ -35170,97 +34845,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ==================================================================================================== -==================================================================================================== -LIBRARY: glfw -ORIGIN: ../../../third_party/glfw/src/cocoa_time.c -TYPE: LicenseType.unknown -FILE: ../../../third_party/glfw/src/cocoa_time.c ----------------------------------------------------------------------------------------------------- -Copyright (c) 2009-2016 Camilla Löwy - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would - be appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and must not - be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source - distribution. -==================================================================================================== - -==================================================================================================== -LIBRARY: glfw -ORIGIN: ../../../third_party/glfw/src/cocoa_init.m -ORIGIN: ../../../third_party/glfw/src/cocoa_platform.h -ORIGIN: ../../../third_party/glfw/src/cocoa_window.m -ORIGIN: ../../../third_party/glfw/src/nsgl_context.m -TYPE: LicenseType.unknown -FILE: ../../../third_party/glfw/src/cocoa_init.m -FILE: ../../../third_party/glfw/src/cocoa_platform.h -FILE: ../../../third_party/glfw/src/cocoa_window.m -FILE: ../../../third_party/glfw/src/nsgl_context.m ----------------------------------------------------------------------------------------------------- -Copyright (c) 2009-2019 Camilla Löwy - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would - be appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and must not - be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source - distribution. -==================================================================================================== - -==================================================================================================== -LIBRARY: glfw -ORIGIN: ../../../third_party/glfw/src/cocoa_joystick.m -TYPE: LicenseType.unknown -FILE: ../../../third_party/glfw/src/cocoa_joystick.m ----------------------------------------------------------------------------------------------------- -Copyright (c) 2009-2019 Camilla Löwy -Copyright (c) 2012 Torsten Walluhn - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would - be appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and must not - be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source - distribution. -==================================================================================================== - ==================================================================================================== LIBRARY: libcxx LIBRARY: libcxxabi @@ -35332,34 +34916,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. ==================================================================================================== -==================================================================================================== -LIBRARY: glfw -ORIGIN: ../../../third_party/glfw/src/cocoa_time.h -TYPE: LicenseType.unknown -FILE: ../../../third_party/glfw/src/cocoa_time.h ----------------------------------------------------------------------------------------------------- -Copyright (c) 2009-2021 Camilla Löwy - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would - be appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and must not - be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source - distribution. -==================================================================================================== - ==================================================================================================== LIBRARY: libXNVCtrl ORIGIN: ../../../third_party/angle/src/third_party/libXNVCtrl/NVCtrl.h @@ -36120,44 +35676,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ==================================================================================================== -==================================================================================================== -LIBRARY: glfw -ORIGIN: ../../../third_party/glfw/src/linux_joystick.h -ORIGIN: ../../../third_party/glfw/src/wl_init.c -ORIGIN: ../../../third_party/glfw/src/wl_monitor.c -ORIGIN: ../../../third_party/glfw/src/wl_platform.h -ORIGIN: ../../../third_party/glfw/src/wl_window.c -ORIGIN: ../../../third_party/glfw/src/xkb_unicode.h -TYPE: LicenseType.unknown -FILE: ../../../third_party/glfw/src/linux_joystick.h -FILE: ../../../third_party/glfw/src/wl_init.c -FILE: ../../../third_party/glfw/src/wl_monitor.c -FILE: ../../../third_party/glfw/src/wl_platform.h -FILE: ../../../third_party/glfw/src/wl_window.c -FILE: ../../../third_party/glfw/src/xkb_unicode.h ----------------------------------------------------------------------------------------------------- -Copyright (c) 2014 Jonas Ådahl - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would - be appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and must not - be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source - distribution. -==================================================================================================== - ==================================================================================================== LIBRARY: boringssl ORIGIN: ../../../third_party/boringssl/src/crypto/bio/socket_helper.c @@ -36621,70 +36139,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ==================================================================================================== -==================================================================================================== -LIBRARY: glfw -ORIGIN: ../../../third_party/glfw/src/null_init.c -ORIGIN: ../../../third_party/glfw/src/null_platform.h -ORIGIN: ../../../third_party/glfw/src/osmesa_context.c -TYPE: LicenseType.unknown -FILE: ../../../third_party/glfw/src/null_init.c -FILE: ../../../third_party/glfw/src/null_platform.h -FILE: ../../../third_party/glfw/src/osmesa_context.c ----------------------------------------------------------------------------------------------------- -Copyright (c) 2016 Google Inc. -Copyright (c) 2016-2017 Camilla Löwy - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would - be appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and must not - be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source - distribution. -==================================================================================================== - -==================================================================================================== -LIBRARY: glfw -ORIGIN: ../../../third_party/glfw/src/null_monitor.c -ORIGIN: ../../../third_party/glfw/src/null_window.c -TYPE: LicenseType.unknown -FILE: ../../../third_party/glfw/src/null_monitor.c -FILE: ../../../third_party/glfw/src/null_window.c ----------------------------------------------------------------------------------------------------- -Copyright (c) 2016 Google Inc. -Copyright (c) 2016-2019 Camilla Löwy - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would - be appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and must not - be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source - distribution. -==================================================================================================== - ==================================================================================================== LIBRARY: boringssl ORIGIN: ../../../third_party/boringssl/src/crypto/bytestring/asn1_compat.c @@ -36746,34 +36200,6 @@ OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ==================================================================================================== -==================================================================================================== -LIBRARY: glfw -ORIGIN: ../../../third_party/glfw/src/null_joystick.c -TYPE: LicenseType.unknown -FILE: ../../../third_party/glfw/src/null_joystick.c ----------------------------------------------------------------------------------------------------- -Copyright (c) 2016-2017 Camilla Löwy - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would - be appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and must not - be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source - distribution. -==================================================================================================== - ==================================================================================================== LIBRARY: boringssl ORIGIN: ../../../third_party/boringssl/crypto_test_data.cc @@ -37380,36 +36806,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ==================================================================================================== -==================================================================================================== -LIBRARY: glfw -ORIGIN: ../../../third_party/glfw/src/posix_module.c -ORIGIN: ../../../third_party/glfw/src/win32_module.c -TYPE: LicenseType.unknown -FILE: ../../../third_party/glfw/src/posix_module.c -FILE: ../../../third_party/glfw/src/win32_module.c ----------------------------------------------------------------------------------------------------- -Copyright (c) 2021 Camilla Löwy - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would - be appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and must not - be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source - distribution. -==================================================================================================== - ==================================================================================================== LIBRARY: ceval ORIGIN: ../../../third_party/angle/src/third_party/ceval/LICENSE @@ -37504,36 +36900,6 @@ FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. ==================================================================================================== -==================================================================================================== -LIBRARY: glfw -ORIGIN: ../../../third_party/glfw/src/posix_poll.c -ORIGIN: ../../../third_party/glfw/src/posix_poll.h -TYPE: LicenseType.unknown -FILE: ../../../third_party/glfw/src/posix_poll.c -FILE: ../../../third_party/glfw/src/posix_poll.h ----------------------------------------------------------------------------------------------------- -Copyright (c) 2022 Camilla Löwy - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would - be appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and must not - be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source - distribution. -==================================================================================================== - ==================================================================================================== LIBRARY: boringssl ORIGIN: ../../../third_party/boringssl/src/crypto/asn1/posix_time.c @@ -61899,4 +61265,4 @@ freely, subject to the following restrictions: 3. This notice may not be removed or altered from any source distribution. ==================================================================================================== -Total license count: 868 +Total license count: 849 diff --git a/ci/licenses_golden/tool_signature b/ci/licenses_golden/tool_signature index bb1142c385e9a..12e514691e32b 100644 --- a/ci/licenses_golden/tool_signature +++ b/ci/licenses_golden/tool_signature @@ -1,2 +1,2 @@ -Signature: 575f2a41ff152394b7e539742fa248e6 +Signature: 2da12666eedd83b571506f27f8445d99 diff --git a/examples/glfw/BUILD.gn b/examples/glfw/BUILD.gn index 2ff312c0ee8b5..178bac61e4e05 100644 --- a/examples/glfw/BUILD.gn +++ b/examples/glfw/BUILD.gn @@ -12,7 +12,7 @@ if (build_embedder_examples) { deps = [ "//flutter/shell/platform/embedder:embedder", - "//third_party/glfw", + "//flutter/third_party/glfw", ] } } diff --git a/examples/glfw_drm/BUILD.gn b/examples/glfw_drm/BUILD.gn index 784e5654e5e69..afa204c76c709 100644 --- a/examples/glfw_drm/BUILD.gn +++ b/examples/glfw_drm/BUILD.gn @@ -12,7 +12,7 @@ if (build_embedder_examples) { deps = [ "//flutter/shell/platform/embedder:embedder", - "//third_party/glfw", + "//flutter/third_party/glfw", ] libs = [ "EGL" ] diff --git a/examples/vulkan_glfw/BUILD.gn b/examples/vulkan_glfw/BUILD.gn index 021d09f1efed9..cea552f66e2d5 100644 --- a/examples/vulkan_glfw/BUILD.gn +++ b/examples/vulkan_glfw/BUILD.gn @@ -9,7 +9,7 @@ executable("vulkan_glfw") { deps = [ "//flutter/shell/platform/embedder:embedder", - "//third_party/glfw", + "//flutter/third_party/glfw", "//third_party/vulkan-deps/vulkan-headers/src:vulkan_headers", ] } diff --git a/impeller/BUILD.gn b/impeller/BUILD.gn index 9214c02f119b0..696226f8fe334 100644 --- a/impeller/BUILD.gn +++ b/impeller/BUILD.gn @@ -2,7 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//third_party/glfw/glfw_args.gni") +import("//flutter/third_party/glfw/glfw_args.gni") import("tools/impeller.gni") config("impeller_public_config") { diff --git a/impeller/playground/BUILD.gn b/impeller/playground/BUILD.gn index 08e47647dc7e3..25408c569b7ac 100644 --- a/impeller/playground/BUILD.gn +++ b/impeller/playground/BUILD.gn @@ -47,7 +47,7 @@ impeller_component("playground") { "../scene/shaders", "imgui:imgui_impeller_backend", "//flutter/fml", - "//third_party/glfw", + "//flutter/third_party/glfw", "//third_party/imgui:imgui_glfw", ] diff --git a/shell/platform/glfw/BUILD.gn b/shell/platform/glfw/BUILD.gn index 9d23979d957b1..1bf6d587f05b2 100644 --- a/shell/platform/glfw/BUILD.gn +++ b/shell/platform/glfw/BUILD.gn @@ -59,7 +59,7 @@ source_set("flutter_glfw") { "//flutter/shell/platform/common/client_wrapper:client_wrapper", "//flutter/shell/platform/embedder:embedder_as_internal_library", "//flutter/shell/platform/glfw/client_wrapper:client_wrapper_glfw", - "//third_party/glfw", + "//flutter/third_party/glfw", "//third_party/rapidjson", ] diff --git a/tools/licenses/lib/paths.dart b/tools/licenses/lib/paths.dart index 4118cecee57eb..1e79b9e0e5b67 100644 --- a/tools/licenses/lib/paths.dart +++ b/tools/licenses/lib/paths.dart @@ -29,6 +29,8 @@ final Set skippedPaths = { r'flutter/lib/web_ui/dev', // these are build tools; they do not end up in Engine artifacts r'flutter/prebuilts', r'flutter/sky/packages/sky_engine/LICENSE', + r'flutter/third_party/glfw/deps', // Only used by examples and tests; not linked in build. + r'flutter/third_party/glfw/docs', r'flutter/third_party/gn', r'flutter/third_party/ninja', // build system r'flutter/third_party/test_shaders', // for tests only @@ -98,8 +100,6 @@ final Set skippedPaths = { r'third_party/fontconfig', // not used in standard configurations r'third_party/freetype2/builds', r'third_party/freetype2/src/tools', - r'third_party/glfw/deps', // Only used by examples and tests; not linked in build. - r'third_party/glfw/docs', r'third_party/gradle', r'third_party/harfbuzz/docs', r'third_party/harfbuzz/util', // utils are command line tools that do not end up in the binary From 55317a87578a20cc83956b057a5faac3c6ef260b Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Tue, 10 Oct 2023 18:24:16 -0700 Subject: [PATCH 567/859] Remove support for `Paint.enableDithering=false` in `dart:ui`. (#46745) Work towards https://github.com/flutter/flutter/issues/112498. No behavioral changes to existing code, except `Paint.enableDithering = false` will no longer be an option. --- .../test/to_string_test.dart | 4 +-- lib/ui/painting.dart | 30 ++++--------------- lib/web_ui/lib/painting.dart | 1 - testing/dart/canvas_test.dart | 23 +------------- 4 files changed, 7 insertions(+), 51 deletions(-) diff --git a/flutter_frontend_server/test/to_string_test.dart b/flutter_frontend_server/test/to_string_test.dart index 53957fdae1b78..ded3b98362730 100644 --- a/flutter_frontend_server/test/to_string_test.dart +++ b/flutter_frontend_server/test/to_string_test.dart @@ -45,9 +45,7 @@ Future main(List args) async { ])); final ProcessResult runResult = Process.runSync(dart, [regularDill]); checkProcessResult(runResult); - // TODO(matanlurey): "dither: true" is now present by default, until it is - // remove entirely. See https://github.com/flutter/flutter/issues/112498. - String paintString = '"Paint.toString":"Paint(Color(0xffffffff); dither: true)"'; + String paintString = '"Paint.toString":"Paint(Color(0xffffffff))"'; if (buildDir.contains('release')) { paintString = '"Paint.toString":"Instance of \'Paint\'"'; } diff --git a/lib/ui/painting.dart b/lib/ui/painting.dart index 638a257301d3b..cfb5e2348f06f 100644 --- a/lib/ui/painting.dart +++ b/lib/ui/painting.dart @@ -1091,9 +1091,8 @@ class Paint { /// Constructs an empty [Paint] object with all fields initialized to /// their defaults. Paint() { - if (enableDithering) { - _dither = true; - } + // TODO(matanlurey): Remove as part of https://github.com/flutter/flutter/issues/112498. + _enableDithering(); } // Paint objects are encoded in two buffers: @@ -1479,27 +1478,11 @@ class Paint { _data.setInt32(_kInvertColorOffset, value ? 1 : 0, _kFakeHostEndian); } - bool get _dither { - return _data.getInt32(_kDitherOffset, _kFakeHostEndian) == 1; - } - set _dither(bool value) { - _data.setInt32(_kDitherOffset, value ? 1 : 0, _kFakeHostEndian); + // TODO(matanlurey): Remove as part of https://github.com/flutter/flutter/issues/112498. + void _enableDithering() { + _data.setInt32(_kDitherOffset, 1, _kFakeHostEndian); } - /// Whether to dither the output when drawing some elements such as gradients. - /// - /// It is not expected that this flag will be used in the future; please leave - /// feedback in if there is - /// a use case for this flag to remain long term. - @Deprecated( - 'Dithering is now enabled by default on some elements (such as gradients) ' - 'and further support for dithering is expected to be handled by custom ' - 'shaders, so this flag is being removed: ' - 'https://github.com/flutter/flutter/issues/112498.' - 'This feature was deprecated after 3.14.0-0.1.pre.' - ) - static bool enableDithering = true; - @override String toString() { if (const bool.fromEnvironment('dart.vm.product')) { @@ -1562,9 +1545,6 @@ class Paint { if (invertColors) { result.write('${semicolon}invert: $invertColors'); } - if (_dither) { - result.write('${semicolon}dither: $_dither'); - } result.write(')'); return result.toString(); } diff --git a/lib/web_ui/lib/painting.dart b/lib/web_ui/lib/painting.dart index 026f20bfe6bad..c050e43dec611 100644 --- a/lib/web_ui/lib/painting.dart +++ b/lib/web_ui/lib/painting.dart @@ -217,7 +217,6 @@ enum Clip { abstract class Paint { factory Paint() => engine.renderer.createPaint(); - static bool enableDithering = false; BlendMode get blendMode; set blendMode(BlendMode value); PaintingStyle get style; diff --git a/testing/dart/canvas_test.dart b/testing/dart/canvas_test.dart index 716233fa8a783..6732423695d2b 100644 --- a/testing/dart/canvas_test.dart +++ b/testing/dart/canvas_test.dart @@ -202,28 +202,7 @@ void main() { ); } - test('Simple gradient', () async { - // TODO(matanl): While deprecated, we still don't want to accidentally - // change the behavior of the old API, - // https://github.com/flutter/flutter/issues/112498. - // ignore: deprecated_member_use - Paint.enableDithering = false; - final Image image = await toImage((Canvas canvas) { - final Paint paint = Paint()..shader = makeGradient(); - canvas.drawPaint(paint); - }, 100, 100); - expect(image.width, equals(100)); - expect(image.height, equals(100)); - - final bool areEqual = - await fuzzyGoldenImageCompare(image, 'canvas_test_gradient.png'); - expect(areEqual, true); - }, skip: !Platform.isLinux); // https://github.com/flutter/flutter/issues/53784 - - test('Simple dithered gradient', () async { - // TODO(matanl): Reword this test once we remove the deprecated API. - // ignore: deprecated_member_use - Paint.enableDithering = true; + test('Simple gradient, which is implicitly dithered', () async { final Image image = await toImage((Canvas canvas) { final Paint paint = Paint()..shader = makeGradient(); canvas.drawPaint(paint); From 5cab0064f2e03c6cde317b030e3665b05163e84f Mon Sep 17 00:00:00 2001 From: Brandon DeRosier Date: Tue, 10 Oct 2023 19:22:10 -0700 Subject: [PATCH 568/859] [Impeller] Allow pipeline variant sets to have differing defaults. (#46751) Track default prototype options along side pipeline variant sets, allowing differing defaults to be assigned during ContentContext construction. --- impeller/entity/contents/content_context.cc | 182 +++++++------------- impeller/entity/contents/content_context.h | 79 +++++++-- 2 files changed, 123 insertions(+), 138 deletions(-) diff --git a/impeller/entity/contents/content_context.cc b/impeller/entity/contents/content_context.cc index a5c1e4d26d216..f531345342660 100644 --- a/impeller/entity/contents/content_context.cc +++ b/impeller/entity/contents/content_context.cc @@ -187,142 +187,84 @@ ContentContext::ContentContext( if (!context_ || !context_->IsValid()) { return; } - default_options_ = ContentContextOptions{ + auto options = ContentContextOptions{ .sample_count = SampleCount::kCount4, .color_attachment_pixel_format = context_->GetCapabilities()->GetDefaultColorFormat()}; #ifdef IMPELLER_DEBUG - checkerboard_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); + checkerboard_pipelines_.CreateDefault(*context_, options); #endif // IMPELLER_DEBUG - solid_fill_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); + solid_fill_pipelines_.CreateDefault(*context_, options); if (context_->GetCapabilities()->SupportsSSBO()) { - linear_gradient_ssbo_fill_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - radial_gradient_ssbo_fill_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - conical_gradient_ssbo_fill_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - sweep_gradient_ssbo_fill_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); + linear_gradient_ssbo_fill_pipelines_.CreateDefault(*context_, options); + radial_gradient_ssbo_fill_pipelines_.CreateDefault(*context_, options); + conical_gradient_ssbo_fill_pipelines_.CreateDefault(*context_, options); + sweep_gradient_ssbo_fill_pipelines_.CreateDefault(*context_, options); } else { - linear_gradient_fill_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - radial_gradient_fill_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - conical_gradient_fill_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - sweep_gradient_fill_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); + linear_gradient_fill_pipelines_.CreateDefault(*context_, options); + radial_gradient_fill_pipelines_.CreateDefault(*context_, options); + conical_gradient_fill_pipelines_.CreateDefault(*context_, options); + sweep_gradient_fill_pipelines_.CreateDefault(*context_, options); } if (context_->GetCapabilities()->SupportsFramebufferFetch()) { - framebuffer_blend_color_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - framebuffer_blend_colorburn_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - framebuffer_blend_colordodge_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - framebuffer_blend_darken_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - framebuffer_blend_difference_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - framebuffer_blend_exclusion_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - framebuffer_blend_hardlight_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - framebuffer_blend_hue_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - framebuffer_blend_lighten_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - framebuffer_blend_luminosity_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - framebuffer_blend_multiply_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - framebuffer_blend_overlay_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - framebuffer_blend_saturation_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - framebuffer_blend_screen_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - framebuffer_blend_softlight_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); + framebuffer_blend_color_pipelines_.CreateDefault(*context_, options); + framebuffer_blend_colorburn_pipelines_.CreateDefault(*context_, options); + framebuffer_blend_colordodge_pipelines_.CreateDefault(*context_, options); + framebuffer_blend_darken_pipelines_.CreateDefault(*context_, options); + framebuffer_blend_difference_pipelines_.CreateDefault(*context_, options); + framebuffer_blend_exclusion_pipelines_.CreateDefault(*context_, options); + framebuffer_blend_hardlight_pipelines_.CreateDefault(*context_, options); + framebuffer_blend_hue_pipelines_.CreateDefault(*context_, options); + framebuffer_blend_lighten_pipelines_.CreateDefault(*context_, options); + framebuffer_blend_luminosity_pipelines_.CreateDefault(*context_, options); + framebuffer_blend_multiply_pipelines_.CreateDefault(*context_, options); + framebuffer_blend_overlay_pipelines_.CreateDefault(*context_, options); + framebuffer_blend_saturation_pipelines_.CreateDefault(*context_, options); + framebuffer_blend_screen_pipelines_.CreateDefault(*context_, options); + framebuffer_blend_softlight_pipelines_.CreateDefault(*context_, options); } - blend_color_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - blend_colorburn_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - blend_colordodge_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - blend_darken_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - blend_difference_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - blend_exclusion_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - blend_hardlight_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - blend_hue_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - blend_lighten_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - blend_luminosity_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - blend_multiply_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - blend_overlay_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - blend_saturation_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - blend_screen_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - blend_softlight_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - - rrect_blur_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - texture_blend_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - texture_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - position_uv_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - tiled_texture_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - gaussian_blur_noalpha_decal_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - gaussian_blur_noalpha_nodecal_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - border_mask_blur_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - morphology_filter_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - color_matrix_color_filter_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - linear_to_srgb_filter_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - srgb_to_linear_filter_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - glyph_atlas_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - glyph_atlas_color_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - geometry_color_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - yuv_to_rgb_filter_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); - porter_duff_blend_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); + blend_color_pipelines_.CreateDefault(*context_, options); + blend_colorburn_pipelines_.CreateDefault(*context_, options); + blend_colordodge_pipelines_.CreateDefault(*context_, options); + blend_darken_pipelines_.CreateDefault(*context_, options); + blend_difference_pipelines_.CreateDefault(*context_, options); + blend_exclusion_pipelines_.CreateDefault(*context_, options); + blend_hardlight_pipelines_.CreateDefault(*context_, options); + blend_hue_pipelines_.CreateDefault(*context_, options); + blend_lighten_pipelines_.CreateDefault(*context_, options); + blend_luminosity_pipelines_.CreateDefault(*context_, options); + blend_multiply_pipelines_.CreateDefault(*context_, options); + blend_overlay_pipelines_.CreateDefault(*context_, options); + blend_saturation_pipelines_.CreateDefault(*context_, options); + blend_screen_pipelines_.CreateDefault(*context_, options); + blend_softlight_pipelines_.CreateDefault(*context_, options); + + rrect_blur_pipelines_.CreateDefault(*context_, options); + texture_blend_pipelines_.CreateDefault(*context_, options); + texture_pipelines_.CreateDefault(*context_, options); + position_uv_pipelines_.CreateDefault(*context_, options); + tiled_texture_pipelines_.CreateDefault(*context_, options); + gaussian_blur_noalpha_decal_pipelines_.CreateDefault(*context_, options); + gaussian_blur_noalpha_nodecal_pipelines_.CreateDefault(*context_, options); + border_mask_blur_pipelines_.CreateDefault(*context_, options); + morphology_filter_pipelines_.CreateDefault(*context_, options); + color_matrix_color_filter_pipelines_.CreateDefault(*context_, options); + linear_to_srgb_filter_pipelines_.CreateDefault(*context_, options); + srgb_to_linear_filter_pipelines_.CreateDefault(*context_, options); + glyph_atlas_pipelines_.CreateDefault(*context_, options); + glyph_atlas_color_pipelines_.CreateDefault(*context_, options); + geometry_color_pipelines_.CreateDefault(*context_, options); + yuv_to_rgb_filter_pipelines_.CreateDefault(*context_, options); + porter_duff_blend_pipelines_.CreateDefault(*context_, options); // GLES only shader. #ifdef IMPELLER_ENABLE_OPENGLES if (GetContext()->GetBackendType() == Context::BackendType::kOpenGLES) { - texture_external_pipelines_[default_options_] = - CreateDefaultPipeline(*context_); + texture_external_pipelines_.CreateDefault(*context_, options); } #endif // IMPELLER_ENABLE_OPENGLES if (context_->GetCapabilities()->SupportsCompute()) { @@ -358,8 +300,8 @@ ContentContext::ContentContext( } clip_pipeline_descriptor->SetColorAttachmentDescriptors( std::move(clip_color_attachments)); - clip_pipelines_[default_options_] = - std::make_unique(*context_, clip_pipeline_descriptor); + clip_pipelines_.SetDefault(options, std::make_unique( + *context_, clip_pipeline_descriptor)); is_valid_ = true; } diff --git a/impeller/entity/contents/content_context.h b/impeller/entity/contents/content_context.h index 4c4c17c43b194..a5f0aab9bd6a8 100644 --- a/impeller/entity/contents/content_context.h +++ b/impeller/entity/contents/content_context.h @@ -721,11 +721,59 @@ class ContentContext { std::shared_ptr context_; std::shared_ptr lazy_glyph_atlas_; - template - using Variants = std::unordered_map, - ContentContextOptions::Hash, - ContentContextOptions::Equal>; + template + class Variants { + public: + Variants() = default; + + void Set(const ContentContextOptions& options, + std::unique_ptr pipeline) { + pipelines_[options] = std::move(pipeline); + } + + void SetDefault(const ContentContextOptions& options, + std::unique_ptr pipeline) { + default_options_ = options; + Set(options, std::move(pipeline)); + } + + void CreateDefault(const Context& context, + const ContentContextOptions& options) { + auto desc = PipelineT::Builder::MakeDefaultPipelineDescriptor(context); + if (!desc.has_value()) { + VALIDATION_LOG << "Failed to create default pipeline."; + return; + } + options.ApplyToPipelineDescriptor(*desc); + SetDefault(options, std::make_unique(context, desc)); + } + + PipelineT* Get(const ContentContextOptions& options) const { + if (auto found = pipelines_.find(options); found != pipelines_.end()) { + return found->second.get(); + } + return nullptr; + } + + PipelineT* GetDefault() const { + if (!default_options_.has_value()) { + return nullptr; + } + return Get(default_options_.value()); + } + + size_t GetPipelineCount() const { return pipelines_.size(); } + + private: + std::optional default_options_; + std::unordered_map, + ContentContextOptions::Hash, + ContentContextOptions::Equal> + pipelines_; + + FML_DISALLOW_COPY_AND_ASSIGN(Variants); + }; // These are mutable because while the prototypes are created eagerly, any // variants requested from that are lazily created and cached in the variants @@ -824,12 +872,6 @@ class ContentContext { point_field_compute_pipelines_; mutable std::shared_ptr> uv_compute_pipelines_; - // The values for the default context options must be cached on - // initial creation. In the presence of wide gamut and platform views, - // it is possible that secondary surfaces will have a different default - // pixel format, which would cause the prototype check in GetPipeline - // below to fail. - ContentContextOptions default_options_; template std::shared_ptr> GetPipeline( @@ -843,29 +885,30 @@ class ContentContext { opts.wireframe = true; } - if (auto found = container.find(opts); found != container.end()) { - return found->second->WaitAndGet(); + if (auto found = container.Get(opts)) { + return found->WaitAndGet(); } - auto prototype = container.find(default_options_); + auto prototype = container.GetDefault(); // The prototype must always be initialized in the constructor. - FML_CHECK(prototype != container.end()); + FML_CHECK(prototype != nullptr); - auto pipeline = prototype->second->WaitAndGet(); + auto pipeline = prototype->WaitAndGet(); if (!pipeline) { return nullptr; } auto variant_future = pipeline->CreateVariant( - [&opts, variants_count = container.size()](PipelineDescriptor& desc) { + [&opts, variants_count = + container.GetPipelineCount()](PipelineDescriptor& desc) { opts.ApplyToPipelineDescriptor(desc); desc.SetLabel( SPrintF("%s V#%zu", desc.GetLabel().c_str(), variants_count)); }); auto variant = std::make_unique(std::move(variant_future)); auto variant_pipeline = variant->WaitAndGet(); - container[opts] = std::move(variant); + container.Set(opts, std::move(variant)); return variant_pipeline; } From 48c67f5fd9ce37a2f2a54f5852ce8dba2ad800d3 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 11 Oct 2023 00:06:22 -0400 Subject: [PATCH 569/859] Roll Fuchsia Mac SDK from oTiMPVe_PvyCYnlqR... to mLc-VlVTg-p18HjiP... (#46754) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jsimmons@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index b0384d42d47dc..f80f4d7b605eb 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'oTiMPVe_PvyCYnlqRZoQj2wnTcOeuoGspBRwax43t0MC' + 'version': 'mLc-VlVTg-p18HjiPuWYyEVUAwBWL8wsxyCpocEQtMkC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 6657afcf65a2d6a7b870423075bd4491300a7e82 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 11 Oct 2023 02:13:22 -0400 Subject: [PATCH 570/859] Roll Skia from 4935bed4260d to 11e41e0e2f9f (3 revisions) (#46759) https://skia.googlesource.com/skia.git/+log/4935bed4260d..11e41e0e2f9f 2023-10-11 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from ab3b6d0185b0 to bed7bfb7376c 2023-10-11 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 457fc7591f3c to bd2d26113aa7 (10 revisions) 2023-10-11 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from f9f3328bcef8 to ab3b6d0185b0 (7 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index f80f4d7b605eb..f7fe921424636 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '4935bed4260d2c90ec6dad0155314b3ecd889801', + 'skia_revision': '11e41e0e2f9fd1dd319da4f924163ea2cf1b9a90', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 767a049a50adc..3e94ba5c4a8f0 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: b01ab1f7f13ff28c50159876260e9ed9 +Signature: f38919706148cb4093c6f0345e46ef38 ==================================================================================================== LIBRARY: etc1 From 8251ac46ab162a6fa3b9614c759bc190cac31859 Mon Sep 17 00:00:00 2001 From: Bruno Leroux Date: Wed, 11 Oct 2023 11:33:00 +0200 Subject: [PATCH 571/859] [Android] Add support for text processing actions (#44579) ## Description This Android related PR adds a channel buffer and a plugin to interact with Android 'process text' feature. It makes it possible to query text processing actions and to run those actions (for instance 'calling' Google translate). Text actions that outputs a processed text are supported. The implementation is based on the great sample provided by @gualse , see https://github.com/flutter/flutter/issues/107603#issuecomment-1646629158. In order to return a non empty list of text actions, the implementation will require adding a section to the Android manifest file (see https://github.com/flutter/flutter/issues/107603#issuecomment-1683487087). Adding this section automatically to new or existing Flutter apps is not part of this PR but will be tackled in a future PR. ## Related Issue Android engine side for https://github.com/flutter/flutter/issues/107603 ## Tests Adds 3 tests. --- ci/licenses_golden/licenses_flutter | 4 + shell/platform/android/AndroidManifest.xml | 8 + shell/platform/android/BUILD.gn | 2 + .../embedding/engine/FlutterEngine.java | 13 + .../systemchannels/ProcessTextChannel.java | 122 ++++++++++ .../plugin/text/ProcessTextPlugin.java | 192 +++++++++++++++ .../plugin/text/ProcessTextPluginTest.java | 225 ++++++++++++++++++ 7 files changed, 566 insertions(+) create mode 100644 shell/platform/android/io/flutter/embedding/engine/systemchannels/ProcessTextChannel.java create mode 100644 shell/platform/android/io/flutter/plugin/text/ProcessTextPlugin.java create mode 100644 shell/platform/android/test/io/flutter/plugin/text/ProcessTextPluginTest.java diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index c43e6abab3442..52be1996d576e 100644 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -3092,6 +3092,7 @@ ORIGIN: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/syst ORIGIN: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/NavigationChannel.java + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformChannel.java + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/ProcessTextChannel.java + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/RestorationChannel.java + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/SpellCheckChannel.java + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/SystemChannel.java + ../../../flutter/LICENSE @@ -3134,6 +3135,7 @@ ORIGIN: ../../../flutter/shell/platform/android/io/flutter/plugin/platform/Platf ORIGIN: ../../../flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/plugin/platform/SingleViewPresentation.java + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/plugin/platform/VirtualDisplayController.java + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/shell/platform/android/io/flutter/plugin/text/ProcessTextPlugin.java + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/util/HandlerCompat.java + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/util/PathUtils.java + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/util/Preconditions.java + ../../../flutter/LICENSE @@ -5863,6 +5865,7 @@ FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/system FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/NavigationChannel.java FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformChannel.java FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java +FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/ProcessTextChannel.java FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/RestorationChannel.java FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/SettingsChannel.java FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/SpellCheckChannel.java @@ -5910,6 +5913,7 @@ FILE: ../../../flutter/shell/platform/android/io/flutter/plugin/platform/Platfor FILE: ../../../flutter/shell/platform/android/io/flutter/plugin/platform/SingleViewPresentation.java FILE: ../../../flutter/shell/platform/android/io/flutter/plugin/platform/SurfaceTexturePlatformViewRenderTarget.java FILE: ../../../flutter/shell/platform/android/io/flutter/plugin/platform/VirtualDisplayController.java +FILE: ../../../flutter/shell/platform/android/io/flutter/plugin/text/ProcessTextPlugin.java FILE: ../../../flutter/shell/platform/android/io/flutter/util/HandlerCompat.java FILE: ../../../flutter/shell/platform/android/io/flutter/util/PathUtils.java FILE: ../../../flutter/shell/platform/android/io/flutter/util/Preconditions.java diff --git a/shell/platform/android/AndroidManifest.xml b/shell/platform/android/AndroidManifest.xml index 5fbd0d8553c2b..97c77ee7ef57f 100644 --- a/shell/platform/android/AndroidManifest.xml +++ b/shell/platform/android/AndroidManifest.xml @@ -24,4 +24,12 @@
+ + + + + + + +
diff --git a/shell/platform/android/BUILD.gn b/shell/platform/android/BUILD.gn index 06e4c9de02985..1f1068db7e703 100644 --- a/shell/platform/android/BUILD.gn +++ b/shell/platform/android/BUILD.gn @@ -265,6 +265,7 @@ android_java_sources = [ "io/flutter/embedding/engine/systemchannels/NavigationChannel.java", "io/flutter/embedding/engine/systemchannels/PlatformChannel.java", "io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java", + "io/flutter/embedding/engine/systemchannels/ProcessTextChannel.java", "io/flutter/embedding/engine/systemchannels/RestorationChannel.java", "io/flutter/embedding/engine/systemchannels/SettingsChannel.java", "io/flutter/embedding/engine/systemchannels/SpellCheckChannel.java", @@ -312,6 +313,7 @@ android_java_sources = [ "io/flutter/plugin/platform/SingleViewPresentation.java", "io/flutter/plugin/platform/SurfaceTexturePlatformViewRenderTarget.java", "io/flutter/plugin/platform/VirtualDisplayController.java", + "io/flutter/plugin/text/ProcessTextPlugin.java", "io/flutter/util/HandlerCompat.java", "io/flutter/util/PathUtils.java", "io/flutter/util/Preconditions.java", diff --git a/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java b/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java index 2bfa379f39c1e..cb00ec42b363c 100644 --- a/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java +++ b/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java @@ -31,6 +31,7 @@ import io.flutter.embedding.engine.systemchannels.MouseCursorChannel; import io.flutter.embedding.engine.systemchannels.NavigationChannel; import io.flutter.embedding.engine.systemchannels.PlatformChannel; +import io.flutter.embedding.engine.systemchannels.ProcessTextChannel; import io.flutter.embedding.engine.systemchannels.RestorationChannel; import io.flutter.embedding.engine.systemchannels.SettingsChannel; import io.flutter.embedding.engine.systemchannels.SpellCheckChannel; @@ -38,6 +39,7 @@ import io.flutter.embedding.engine.systemchannels.TextInputChannel; import io.flutter.plugin.localization.LocalizationPlugin; import io.flutter.plugin.platform.PlatformViewsController; +import io.flutter.plugin.text.ProcessTextPlugin; import io.flutter.util.ViewUtils; import java.util.HashSet; import java.util.List; @@ -95,6 +97,7 @@ public class FlutterEngine implements ViewUtils.DisplayUpdater { @NonNull private final NavigationChannel navigationChannel; @NonNull private final RestorationChannel restorationChannel; @NonNull private final PlatformChannel platformChannel; + @NonNull private final ProcessTextChannel processTextChannel; @NonNull private final SettingsChannel settingsChannel; @NonNull private final SpellCheckChannel spellCheckChannel; @NonNull private final SystemChannel systemChannel; @@ -329,6 +332,7 @@ public FlutterEngine( mouseCursorChannel = new MouseCursorChannel(dartExecutor); navigationChannel = new NavigationChannel(dartExecutor); platformChannel = new PlatformChannel(dartExecutor); + processTextChannel = new ProcessTextChannel(dartExecutor, context.getPackageManager()); restorationChannel = new RestorationChannel(dartExecutor, waitForRestorationData); settingsChannel = new SettingsChannel(dartExecutor); spellCheckChannel = new SpellCheckChannel(dartExecutor); @@ -384,6 +388,9 @@ public FlutterEngine( } ViewUtils.calculateMaximumDisplayMetrics(context, this); + + ProcessTextPlugin processTextPlugin = new ProcessTextPlugin(this.getProcessTextChannel()); + this.pluginRegistry.add(processTextPlugin); } private void attachToJni() { @@ -545,6 +552,12 @@ public PlatformChannel getPlatformChannel() { return platformChannel; } + /** System channel that sends text processing requests from Flutter to Android. */ + @NonNull + public ProcessTextChannel getProcessTextChannel() { + return processTextChannel; + } + /** * System channel to exchange restoration data between framework and engine. * diff --git a/shell/platform/android/io/flutter/embedding/engine/systemchannels/ProcessTextChannel.java b/shell/platform/android/io/flutter/embedding/engine/systemchannels/ProcessTextChannel.java new file mode 100644 index 0000000000000..f1d12bc681111 --- /dev/null +++ b/shell/platform/android/io/flutter/embedding/engine/systemchannels/ProcessTextChannel.java @@ -0,0 +1,122 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package io.flutter.embedding.engine.systemchannels; + +import android.content.pm.PackageManager; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import io.flutter.embedding.engine.dart.DartExecutor; +import io.flutter.plugin.common.MethodCall; +import io.flutter.plugin.common.MethodChannel; +import io.flutter.plugin.common.StandardMethodCodec; +import java.util.ArrayList; +import java.util.Map; + +/** + * {@link ProcessTextChannel} is a platform channel that is used by the framework to initiate text + * processing feature in the embedding and for the embedding to send back the results. + * + *

When the framework needs to query the list of text processing actions (for instance to expose + * them in the selected text context menu), it will send to the embedding the message {@code + * ProcessText.queryTextActions}. In response, the {@link io.flutter.plugin.text.ProcessTextPlugin} + * will return a map of all activities that can process text. The map keys are generated IDs and the + * values are the activities labels. On the first request, the {@link + * io.flutter.plugin.text.ProcessTextPlugin} will make a call to Android's package manager to query + * all activities that can be performed for the {@code Intent.ACTION_PROCESS_TEXT} intent. + * + *

When a text processing action has to be executed, the framework will send to the embedding the + * message {@code ProcessText.processTextAction} with the {@code int id} of the choosen text action + * and the {@code String} of text to process as arguments. In response, the {@link + * io.flutter.plugin.text.ProcessTextPlugin} will make a call to the Android application activity to + * start the activity exposing the text action. The {@link io.flutter.plugin.text.ProcessTextPlugin} + * will return the processed text if there is one, or null if the activity did not return a + * transformed text. + * + *

{@link io.flutter.plugin.text.ProcessTextPlugin} implements {@link ProcessTextMethodHandler} + * that parses incoming messages from Flutter. + */ +public class ProcessTextChannel { + private static final String TAG = "ProcessTextChannel"; + private static final String CHANNEL_NAME = "flutter/processtext"; + private static final String METHOD_QUERY_TEXT_ACTIONS = "ProcessText.queryTextActions"; + private static final String METHOD_PROCESS_TEXT_ACTION = "ProcessText.processTextAction"; + + public final MethodChannel channel; + public final PackageManager packageManager; + private ProcessTextMethodHandler processTextMethodHandler; + + @NonNull + public final MethodChannel.MethodCallHandler parsingMethodHandler = + new MethodChannel.MethodCallHandler() { + @Override + public void onMethodCall(@NonNull MethodCall call, @NonNull MethodChannel.Result result) { + if (processTextMethodHandler == null) { + return; + } + String method = call.method; + Object args = call.arguments; + switch (method) { + case METHOD_QUERY_TEXT_ACTIONS: + try { + Map actions = processTextMethodHandler.queryTextActions(); + result.success(actions); + } catch (IllegalStateException exception) { + result.error("error", exception.getMessage(), null); + } + break; + case METHOD_PROCESS_TEXT_ACTION: + try { + final ArrayList argumentList = (ArrayList) args; + String id = (String) (argumentList.get(0)); + String text = (String) (argumentList.get(1)); + boolean readOnly = (boolean) (argumentList.get(2)); + processTextMethodHandler.processTextAction(id, text, readOnly, result); + } catch (IllegalStateException exception) { + result.error("error", exception.getMessage(), null); + } + break; + default: + result.notImplemented(); + break; + } + } + }; + + public ProcessTextChannel( + @NonNull DartExecutor dartExecutor, @NonNull PackageManager packageManager) { + this.packageManager = packageManager; + channel = new MethodChannel(dartExecutor, CHANNEL_NAME, StandardMethodCodec.INSTANCE); + channel.setMethodCallHandler(parsingMethodHandler); + } + + /** + * Sets the {@link ProcessTextMethodHandler} which receives all requests to the text processing + * feature sent through this channel. + */ + public void setMethodHandler(@Nullable ProcessTextMethodHandler processTextMethodHandler) { + this.processTextMethodHandler = processTextMethodHandler; + } + + public interface ProcessTextMethodHandler { + /** Requests the map of text actions. Each text action has a unique id and a localized label. */ + Map queryTextActions(); + + /** + * Requests to run a text action on a given input text. + * + * @param id The ID of the text action returned by {@code ProcessText.queryTextActions}. + * @param input The text to be processed. + * @param readOnly Indicates to the activity if the processed text will be used as read-only. + * see + * https://developer.android.com/reference/android/content/Intent#EXTRA_PROCESS_TEXT_READONLY + * @param result The method channel result instance used to reply. + */ + void processTextAction( + @NonNull String id, + @NonNull String input, + @NonNull boolean readOnly, + @NonNull MethodChannel.Result result); + } +} diff --git a/shell/platform/android/io/flutter/plugin/text/ProcessTextPlugin.java b/shell/platform/android/io/flutter/plugin/text/ProcessTextPlugin.java new file mode 100644 index 0000000000000..d04716e4cb410 --- /dev/null +++ b/shell/platform/android/io/flutter/plugin/text/ProcessTextPlugin.java @@ -0,0 +1,192 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package io.flutter.plugin.text; + +import android.annotation.TargetApi; +import android.app.Activity; +import android.content.Intent; +import android.content.pm.PackageManager; +import android.content.pm.ResolveInfo; +import android.os.Build; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.RequiresApi; +import io.flutter.embedding.engine.plugins.FlutterPlugin; +import io.flutter.embedding.engine.plugins.activity.ActivityAware; +import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding; +import io.flutter.embedding.engine.systemchannels.ProcessTextChannel; +import io.flutter.plugin.common.MethodChannel; +import io.flutter.plugin.common.PluginRegistry.ActivityResultListener; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class ProcessTextPlugin + implements FlutterPlugin, + ActivityAware, + ActivityResultListener, + ProcessTextChannel.ProcessTextMethodHandler { + private static final String TAG = "ProcessTextPlugin"; + + @NonNull private final ProcessTextChannel processTextChannel; + @NonNull private final PackageManager packageManager; + @Nullable private ActivityPluginBinding activityBinding; + private Map resolveInfosById; + + @NonNull + private Map requestsByCode = + new HashMap(); + + public ProcessTextPlugin(@NonNull ProcessTextChannel processTextChannel) { + this.processTextChannel = processTextChannel; + this.packageManager = processTextChannel.packageManager; + + processTextChannel.setMethodHandler(this); + } + + @Override + public Map queryTextActions() { + if (resolveInfosById == null) { + cacheResolveInfos(); + } + Map result = new HashMap(); + for (String id : resolveInfosById.keySet()) { + final ResolveInfo info = resolveInfosById.get(id); + result.put(id, info.loadLabel(packageManager).toString()); + } + return result; + } + + @Override + public void processTextAction( + @NonNull String id, + @NonNull String text, + @NonNull boolean readOnly, + @NonNull MethodChannel.Result result) { + if (activityBinding == null) { + result.error("error", "Plugin not bound to an Activity", null); + return; + } + + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { + result.error("error", "Android version not supported", null); + return; + } + + if (resolveInfosById == null) { + result.error("error", "Can not process text actions before calling queryTextActions", null); + return; + } + + final ResolveInfo info = resolveInfosById.get(id); + if (info == null) { + result.error("error", "Text processing activity not found", null); + return; + } + + Integer requestCode = result.hashCode(); + requestsByCode.put(requestCode, result); + + Intent intent = new Intent(); + intent.setClassName(info.activityInfo.packageName, info.activityInfo.name); + intent.setAction(Intent.ACTION_PROCESS_TEXT); + intent.setType("text/plain"); + intent.putExtra(Intent.EXTRA_PROCESS_TEXT, text); + intent.putExtra(Intent.EXTRA_PROCESS_TEXT_READONLY, readOnly); + + // Start the text processing activity. When the activity completes, the onActivityResult + // callback + // is called. + activityBinding.getActivity().startActivityForResult(intent, requestCode); + } + + private void cacheResolveInfos() { + resolveInfosById = new HashMap(); + + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { + return; + } + + Intent intent = new Intent().setAction(Intent.ACTION_PROCESS_TEXT).setType("text/plain"); + + List infos; + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + infos = packageManager.queryIntentActivities(intent, PackageManager.ResolveInfoFlags.of(0)); + } else { + infos = packageManager.queryIntentActivities(intent, 0); + } + + for (ResolveInfo info : infos) { + final String id = info.activityInfo.name; + final String label = info.loadLabel(packageManager).toString(); + resolveInfosById.put(id, info); + } + } + + /** + * Executed when a text processing activity terminates. + * + *

When an activity returns a value, the request is completed successfully and returns the + * processed text. + * + *

When an activity does not return a value. the request is completed successfully and returns + * null. + */ + @TargetApi(Build.VERSION_CODES.M) + @RequiresApi(Build.VERSION_CODES.M) + public boolean onActivityResult(int requestCode, int resultCode, @Nullable Intent intent) { + String result = null; + if (resultCode == Activity.RESULT_OK) { + result = intent.getStringExtra(Intent.EXTRA_PROCESS_TEXT); + } + requestsByCode.remove(requestCode).success(result); + return true; + } + + /** + * Unregisters this {@code ProcessTextPlugin} as the {@code + * ProcessTextChannel.ProcessTextMethodHandler}, for the {@link + * io.flutter.embedding.engine.systemchannels.ProcessTextChannel}. + * + *

Do not invoke any methods on a {@code ProcessTextPlugin} after invoking this method. + */ + public void destroy() { + processTextChannel.setMethodHandler(null); + } + + // FlutterPlugin interface implementation. + + public void onAttachedToEngine(@NonNull FlutterPluginBinding binding) { + // Nothing to do because this plugin is instantiated by the engine. + } + + public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) { + // Nothing to do because this plugin is instantiated by the engine. + } + + // ActivityAware interface implementation. + // + // Store the binding and manage the activity result listener. + + public void onAttachedToActivity(@NonNull ActivityPluginBinding binding) { + this.activityBinding = binding; + this.activityBinding.addActivityResultListener(this); + }; + + public void onDetachedFromActivityForConfigChanges() { + this.activityBinding.removeActivityResultListener(this); + this.activityBinding = null; + } + + public void onReattachedToActivityForConfigChanges(@NonNull ActivityPluginBinding binding) { + this.activityBinding = binding; + this.activityBinding.addActivityResultListener(this); + } + + public void onDetachedFromActivity() { + this.activityBinding.removeActivityResultListener(this); + this.activityBinding = null; + } +} diff --git a/shell/platform/android/test/io/flutter/plugin/text/ProcessTextPluginTest.java b/shell/platform/android/test/io/flutter/plugin/text/ProcessTextPluginTest.java new file mode 100644 index 0000000000000..47448fd9f9f65 --- /dev/null +++ b/shell/platform/android/test/io/flutter/plugin/text/ProcessTextPluginTest.java @@ -0,0 +1,225 @@ +package io.flutter.plugin.text; + +import static org.junit.Assert.assertEquals; +import static org.mockito.Mockito.any; +import static org.mockito.Mockito.anyInt; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import android.annotation.TargetApi; +import android.app.Activity; +import android.content.Intent; +import android.content.pm.ActivityInfo; +import android.content.pm.PackageItemInfo; +import android.content.pm.PackageManager; +import android.content.pm.ResolveInfo; +import android.os.Build; +import androidx.annotation.RequiresApi; +import androidx.test.ext.junit.runners.AndroidJUnit4; +import io.flutter.embedding.engine.dart.DartExecutor; +import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding; +import io.flutter.embedding.engine.systemchannels.ProcessTextChannel; +import io.flutter.plugin.common.BinaryMessenger; +import io.flutter.plugin.common.MethodCall; +import io.flutter.plugin.common.MethodChannel; +import io.flutter.plugin.common.StandardMethodCodec; +import java.lang.reflect.Field; +import java.nio.ByteBuffer; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.ArgumentCaptor; + +@RunWith(AndroidJUnit4.class) +@TargetApi(Build.VERSION_CODES.N) +@RequiresApi(Build.VERSION_CODES.N) +public class ProcessTextPluginTest { + + private static void sendToBinaryMessageHandler( + BinaryMessenger.BinaryMessageHandler binaryMessageHandler, String method, Object args) { + MethodCall methodCall = new MethodCall(method, args); + ByteBuffer encodedMethodCall = StandardMethodCodec.INSTANCE.encodeMethodCall(methodCall); + binaryMessageHandler.onMessage( + (ByteBuffer) encodedMethodCall.flip(), mock(BinaryMessenger.BinaryReply.class)); + } + + @SuppressWarnings("deprecation") + // setMessageHandler is deprecated. + @Test + public void respondsToProcessTextChannelMessage() { + ArgumentCaptor binaryMessageHandlerCaptor = + ArgumentCaptor.forClass(BinaryMessenger.BinaryMessageHandler.class); + DartExecutor mockBinaryMessenger = mock(DartExecutor.class); + ProcessTextChannel.ProcessTextMethodHandler mockHandler = + mock(ProcessTextChannel.ProcessTextMethodHandler.class); + PackageManager mockPackageManager = mock(PackageManager.class); + ProcessTextChannel processTextChannel = + new ProcessTextChannel(mockBinaryMessenger, mockPackageManager); + + processTextChannel.setMethodHandler(mockHandler); + + verify(mockBinaryMessenger, times(1)) + .setMessageHandler(any(String.class), binaryMessageHandlerCaptor.capture()); + + BinaryMessenger.BinaryMessageHandler binaryMessageHandler = + binaryMessageHandlerCaptor.getValue(); + + sendToBinaryMessageHandler(binaryMessageHandler, "ProcessText.queryTextActions", null); + + verify(mockHandler).queryTextActions(); + } + + @SuppressWarnings("deprecation") + // setMessageHandler is deprecated. + @Test + public void performQueryTextActions() { + DartExecutor mockBinaryMessenger = mock(DartExecutor.class); + PackageManager mockPackageManager = mock(PackageManager.class); + ProcessTextChannel processTextChannel = + new ProcessTextChannel(mockBinaryMessenger, mockPackageManager); + + // Set up mocked result for PackageManager.queryIntentActivities. + ResolveInfo action1 = createFakeResolveInfo("Action1", mockPackageManager); + ResolveInfo action2 = createFakeResolveInfo("Action2", mockPackageManager); + List infos = new ArrayList(Arrays.asList(action1, action2)); + Intent intent = new Intent().setAction(Intent.ACTION_PROCESS_TEXT).setType("text/plain"); + when(mockPackageManager.queryIntentActivities( + any(Intent.class), any(PackageManager.ResolveInfoFlags.class))) + .thenReturn(infos); + + // ProcessTextPlugin should retrieve the mocked text actions. + ProcessTextPlugin processTextPlugin = new ProcessTextPlugin(processTextChannel); + Map textActions = processTextPlugin.queryTextActions(); + final String action1Id = "mockActivityName.Action1"; + final String action2Id = "mockActivityName.Action2"; + assertEquals(textActions, Map.of(action1Id, "Action1", action2Id, "Action2")); + } + + @SuppressWarnings("deprecation") + // setMessageHandler is deprecated. + @Test + public void performProcessTextActionWithNoReturnedValue() { + DartExecutor mockBinaryMessenger = mock(DartExecutor.class); + PackageManager mockPackageManager = mock(PackageManager.class); + ProcessTextChannel processTextChannel = + new ProcessTextChannel(mockBinaryMessenger, mockPackageManager); + + // Set up mocked result for PackageManager.queryIntentActivities. + ResolveInfo action1 = createFakeResolveInfo("Action1", mockPackageManager); + ResolveInfo action2 = createFakeResolveInfo("Action2", mockPackageManager); + List infos = new ArrayList(Arrays.asList(action1, action2)); + when(mockPackageManager.queryIntentActivities( + any(Intent.class), any(PackageManager.ResolveInfoFlags.class))) + .thenReturn(infos); + + // ProcessTextPlugin should retrieve the mocked text actions. + ProcessTextPlugin processTextPlugin = new ProcessTextPlugin(processTextChannel); + Map textActions = processTextPlugin.queryTextActions(); + final String action1Id = "mockActivityName.Action1"; + final String action2Id = "mockActivityName.Action2"; + assertEquals(textActions, Map.of(action1Id, "Action1", action2Id, "Action2")); + + // Set up the activity binding. + ActivityPluginBinding mockActivityPluginBinding = mock(ActivityPluginBinding.class); + Activity mockActivity = mock(Activity.class); + when(mockActivityPluginBinding.getActivity()).thenReturn(mockActivity); + processTextPlugin.onAttachedToActivity(mockActivityPluginBinding); + + // Execute th first action. + String textToBeProcessed = "Flutter!"; + MethodChannel.Result result = mock(MethodChannel.Result.class); + processTextPlugin.processTextAction(action1Id, textToBeProcessed, false, result); + + // Activity.startActivityForResult should have been called. + ArgumentCaptor intentCaptor = ArgumentCaptor.forClass(Intent.class); + verify(mockActivity, times(1)).startActivityForResult(intentCaptor.capture(), anyInt()); + Intent intent = intentCaptor.getValue(); + assertEquals(intent.getStringExtra(Intent.EXTRA_PROCESS_TEXT), textToBeProcessed); + + // Simulate an Android activity answer which does not return a value. + Intent resultIntent = new Intent(); + processTextPlugin.onActivityResult(result.hashCode(), Activity.RESULT_OK, resultIntent); + + // Success with no returned value is expected. + verify(result).success(null); + } + + @SuppressWarnings("deprecation") + // setMessageHandler is deprecated. + @Test + public void performProcessTextActionWithReturnedValue() { + DartExecutor mockBinaryMessenger = mock(DartExecutor.class); + PackageManager mockPackageManager = mock(PackageManager.class); + ProcessTextChannel processTextChannel = + new ProcessTextChannel(mockBinaryMessenger, mockPackageManager); + + // Set up mocked result for PackageManager.queryIntentActivities. + ResolveInfo action1 = createFakeResolveInfo("Action1", mockPackageManager); + ResolveInfo action2 = createFakeResolveInfo("Action2", mockPackageManager); + List infos = new ArrayList(Arrays.asList(action1, action2)); + when(mockPackageManager.queryIntentActivities( + any(Intent.class), any(PackageManager.ResolveInfoFlags.class))) + .thenReturn(infos); + + // ProcessTextPlugin should retrieve the mocked text actions. + ProcessTextPlugin processTextPlugin = new ProcessTextPlugin(processTextChannel); + Map textActions = processTextPlugin.queryTextActions(); + final String action1Id = "mockActivityName.Action1"; + final String action2Id = "mockActivityName.Action2"; + assertEquals(textActions, Map.of(action1Id, "Action1", action2Id, "Action2")); + + // Set up the activity binding. + ActivityPluginBinding mockActivityPluginBinding = mock(ActivityPluginBinding.class); + Activity mockActivity = mock(Activity.class); + when(mockActivityPluginBinding.getActivity()).thenReturn(mockActivity); + processTextPlugin.onAttachedToActivity(mockActivityPluginBinding); + + // Execute the first action. + String textToBeProcessed = "Flutter!"; + MethodChannel.Result result = mock(MethodChannel.Result.class); + processTextPlugin.processTextAction(action1Id, textToBeProcessed, false, result); + + // Activity.startActivityForResult should have been called. + ArgumentCaptor intentCaptor = ArgumentCaptor.forClass(Intent.class); + verify(mockActivity, times(1)).startActivityForResult(intentCaptor.capture(), anyInt()); + Intent intent = intentCaptor.getValue(); + assertEquals(intent.getStringExtra(Intent.EXTRA_PROCESS_TEXT), textToBeProcessed); + + // Simulate an Android activity answer which returns a transformed text. + String processedText = "Flutter!!!"; + Intent resultIntent = new Intent(); + resultIntent.putExtra(Intent.EXTRA_PROCESS_TEXT, processedText); + processTextPlugin.onActivityResult(result.hashCode(), Activity.RESULT_OK, resultIntent); + + // Success with the transformed text is expected. + verify(result).success(processedText); + } + + private ResolveInfo createFakeResolveInfo(String label, PackageManager mockPackageManager) { + ResolveInfo resolveInfo = mock(ResolveInfo.class); + ActivityInfo activityInfo = new ActivityInfo(); + when(resolveInfo.loadLabel(mockPackageManager)).thenReturn(label); + + // Use Java reflection to set required member variables. + try { + Field activityField = ResolveInfo.class.getDeclaredField("activityInfo"); + activityField.setAccessible(true); + activityField.set(resolveInfo, activityInfo); + Field packageNameField = PackageItemInfo.class.getDeclaredField("packageName"); + packageNameField.setAccessible(true); + packageNameField.set(activityInfo, "mockActivityPackageName"); + Field nameField = PackageItemInfo.class.getDeclaredField("name"); + nameField.setAccessible(true); + nameField.set(activityInfo, "mockActivityName." + label); + } catch (Exception ex) { + // Test will failed if reflection APIs throw. + } + + return resolveInfo; + } +} From bc26a781517f91da032caa93d1ef2908833c465a Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 11 Oct 2023 05:44:17 -0400 Subject: [PATCH 572/859] Roll Fuchsia Linux SDK from FX5YzwP_ZEnPP0b3v... to hMA99PoacaRZVXHgr... (#46762) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jsimmons@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index f7fe921424636..b3152917f8b5d 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'FX5YzwP_ZEnPP0b3vecN_Wn22Bhvzfw3D5dhME9tkXwC' + 'version': 'hMA99PoacaRZVXHgric86nJsfgQsM7O8Wn7ZDLc6Kp4C' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index a884317aef5da..b63a0dac0b071 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: 3fdbb9ad111415128349d46321811de6 +Signature: 1cfca3b0c6bb9916b4c76fbce199090c ==================================================================================================== LIBRARY: fuchsia_sdk From 5f3241f07ef3db3721da5a0e935cb19379d9cdc3 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 11 Oct 2023 05:50:23 -0400 Subject: [PATCH 573/859] Roll Skia from 11e41e0e2f9f to e00577618d81 (1 revision) (#46763) https://skia.googlesource.com/skia.git/+log/11e41e0e2f9f..e00577618d81 2023-10-11 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 0afc3ec95439 to ea332c715575 (11 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index b3152917f8b5d..bc9fbf18c6c4b 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '11e41e0e2f9fd1dd319da4f924163ea2cf1b9a90', + 'skia_revision': 'e00577618d81cb6eb7802717b4f63696cd4d687f', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 3d7673d8993e56f869d40cb18e734a656a6bc456 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 11 Oct 2023 10:21:30 -0400 Subject: [PATCH 574/859] Roll Skia from e00577618d81 to c05effecb081 (1 revision) (#46770) https://skia.googlesource.com/skia.git/+log/e00577618d81..c05effecb081 2023-10-11 lokokung@google.com [webgpu-headers] Removes macros for "count" fields. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index bc9fbf18c6c4b..eb24ac03d1eb6 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'e00577618d81cb6eb7802717b4f63696cd4d687f', + 'skia_revision': 'c05effecb0818443eb7b458c00291c57f3cf1960', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 209c58dc0220ab094824550318681bf2dcd6df7d Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 11 Oct 2023 11:17:47 -0400 Subject: [PATCH 575/859] Roll Skia from c05effecb081 to 60d51fd2c6bd (3 revisions) (#46772) https://skia.googlesource.com/skia.git/+log/c05effecb081..60d51fd2c6bd 2023-10-11 jvanverth@google.com [graphite] Fix bugs in RasterPathAtlas caching. 2023-10-11 kjlubick@google.com Annotate third_party imports 2023-10-11 bclayton@chromium.org [tint][gn] Disable GLSL validation If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index eb24ac03d1eb6..e5543343ff9f5 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'c05effecb0818443eb7b458c00291c57f3cf1960', + 'skia_revision': '60d51fd2c6bd398121aac8184e2e9f35b09c2e12', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 3e94ba5c4a8f0..ac03465397bb0 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: f38919706148cb4093c6f0345e46ef38 +Signature: 95f6a02b85163bb1533c61e4f246c0f9 ==================================================================================================== LIBRARY: etc1 From 666a455c27fea59542cc28b0c3fe5bc1a95ee277 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 11 Oct 2023 12:02:00 -0400 Subject: [PATCH 576/859] Roll Skia from 60d51fd2c6bd to bfd9af01b785 (2 revisions) (#46774) https://skia.googlesource.com/skia.git/+log/60d51fd2c6bd..bfd9af01b785 2023-10-11 johnstiles@google.com Revert "[bazel] Move test runners under //tools/testrunners." 2023-10-11 jvanverth@google.com [graphite] Move RasterPathAtlas into AtlasProvider. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/excluded_files | 2 ++ ci/licenses_golden/licenses_skia | 10 +++++++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index e5543343ff9f5..07f8b1eb805fe 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '60d51fd2c6bd398121aac8184e2e9f35b09c2e12', + 'skia_revision': 'bfd9af01b785b9c50e0f4443601ec54ce5e3b72b', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/excluded_files b/ci/licenses_golden/excluded_files index 7bfa23f637b9c..73c028656523f 100644 --- a/ci/licenses_golden/excluded_files +++ b/ci/licenses_golden/excluded_files @@ -2650,7 +2650,9 @@ ../../../third_party/skia/experimental ../../../third_party/skia/fuzz/README.md ../../../third_party/skia/gm/BUILD.bazel +../../../third_party/skia/gm/android_gm_test.bzl ../../../third_party/skia/gm/png_codec.bzl +../../../third_party/skia/gm/vias/BUILD.bazel ../../../third_party/skia/gn/BUILD.bazel ../../../third_party/skia/gn/__init__.py ../../../third_party/skia/gn/bazel_build.py diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index ac03465397bb0..2ee0ed92355a1 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 95f6a02b85163bb1533c61e4f246c0f9 +Signature: d074d823a1138613d625baa1fdfd041a ==================================================================================================== LIBRARY: etc1 @@ -8607,6 +8607,7 @@ LIBRARY: skia ORIGIN: ../../../third_party/skia/gm/coordclampshader.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/fontations.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/imagefiltersunpremul.cpp + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/gm/vias/Draw.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/ports/SkFontMgr_data.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/ports/SkTypeface_fontations.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/private/SkGainmapInfo.h + ../../../third_party/skia/LICENSE @@ -8647,6 +8648,7 @@ TYPE: LicenseType.bsd FILE: ../../../third_party/skia/gm/coordclampshader.cpp FILE: ../../../third_party/skia/gm/fontations.cpp FILE: ../../../third_party/skia/gm/imagefiltersunpremul.cpp +FILE: ../../../third_party/skia/gm/vias/Draw.h FILE: ../../../third_party/skia/include/ports/SkFontMgr_data.h FILE: ../../../third_party/skia/include/ports/SkTypeface_fontations.h FILE: ../../../third_party/skia/include/private/SkGainmapInfo.h @@ -8723,12 +8725,15 @@ ORIGIN: ../../../third_party/skia/fuzz/FuzzQuadRoots.cpp + ../../../third_party/ ORIGIN: ../../../third_party/skia/fuzz/oss_fuzz/FuzzCubicRoots.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/fuzz/oss_fuzz/FuzzPrecompile.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/fuzz/oss_fuzz/FuzzQuadRoots.cpp + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/gm/BazelGMRunner.cpp + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/gm/BazelNoopRunner.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/fontations_ft_compare.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/graphite_replay.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/hello_bazel_world.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/png_codec.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/rippleshadergm.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/scaledrects.cpp + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/gm/vias/SimpleVias.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/workingspace.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/android/SkCanvasAndroid.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/android/SkHeifDecoder.h + ../../../third_party/skia/LICENSE @@ -8988,12 +8993,15 @@ FILE: ../../../third_party/skia/fuzz/FuzzQuadRoots.cpp FILE: ../../../third_party/skia/fuzz/oss_fuzz/FuzzCubicRoots.cpp FILE: ../../../third_party/skia/fuzz/oss_fuzz/FuzzPrecompile.cpp FILE: ../../../third_party/skia/fuzz/oss_fuzz/FuzzQuadRoots.cpp +FILE: ../../../third_party/skia/gm/BazelGMRunner.cpp +FILE: ../../../third_party/skia/gm/BazelNoopRunner.cpp FILE: ../../../third_party/skia/gm/fontations_ft_compare.cpp FILE: ../../../third_party/skia/gm/graphite_replay.cpp FILE: ../../../third_party/skia/gm/hello_bazel_world.cpp FILE: ../../../third_party/skia/gm/png_codec.cpp FILE: ../../../third_party/skia/gm/rippleshadergm.cpp FILE: ../../../third_party/skia/gm/scaledrects.cpp +FILE: ../../../third_party/skia/gm/vias/SimpleVias.cpp FILE: ../../../third_party/skia/gm/workingspace.cpp FILE: ../../../third_party/skia/include/android/SkCanvasAndroid.h FILE: ../../../third_party/skia/include/android/SkHeifDecoder.h From f7acc5d76cda135d61f6f37fd267881a2176b212 Mon Sep 17 00:00:00 2001 From: Zachary Anderson Date: Wed, 11 Oct 2023 09:10:05 -0700 Subject: [PATCH 577/859] Roll goldctl forward (#46771) For https://github.com/flutter/flutter/issues/135620 --- ci/builders/linux_web_engine.json | 70 +++++++++++------------ ci/builders/mac_host_engine.json | 2 +- lib/web_ui/dev/generate_builder_json.dart | 2 +- 3 files changed, 37 insertions(+), 37 deletions(-) diff --git a/ci/builders/linux_web_engine.json b/ci/builders/linux_web_engine.json index 83ceb59f3462e..0f18b66f0ea1d 100644 --- a/ci/builders/linux_web_engine.json +++ b/ci/builders/linux_web_engine.json @@ -351,7 +351,7 @@ "test_dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" }, { "dependency": "chrome_and_driver", @@ -387,7 +387,7 @@ "test_dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" }, { "dependency": "chrome_and_driver", @@ -423,7 +423,7 @@ "test_dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" }, { "dependency": "chrome_and_driver", @@ -459,7 +459,7 @@ "test_dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" }, { "dependency": "chrome_and_driver", @@ -495,7 +495,7 @@ "test_dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" }, { "dependency": "chrome_and_driver", @@ -531,7 +531,7 @@ "test_dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" }, { "dependency": "chrome_and_driver", @@ -567,7 +567,7 @@ "test_dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" }, { "dependency": "chrome_and_driver", @@ -603,7 +603,7 @@ "test_dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" }, { "dependency": "chrome_and_driver", @@ -639,7 +639,7 @@ "test_dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" }, { "dependency": "firefox", @@ -675,7 +675,7 @@ "test_dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" }, { "dependency": "firefox", @@ -711,7 +711,7 @@ "test_dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" }, { "dependency": "firefox", @@ -747,7 +747,7 @@ "test_dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" }, { "dependency": "firefox", @@ -783,7 +783,7 @@ "test_dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" }, { "dependency": "firefox", @@ -819,7 +819,7 @@ "test_dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" }, { "dependency": "chrome_and_driver", @@ -855,7 +855,7 @@ "test_dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" }, { "dependency": "chrome_and_driver", @@ -891,7 +891,7 @@ "test_dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" }, { "dependency": "chrome_and_driver", @@ -927,7 +927,7 @@ "test_dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" }, { "dependency": "chrome_and_driver", @@ -963,7 +963,7 @@ "test_dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" }, { "dependency": "chrome_and_driver", @@ -999,7 +999,7 @@ "test_dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" }, { "dependency": "chrome_and_driver", @@ -1035,7 +1035,7 @@ "test_dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" }, { "dependency": "chrome_and_driver", @@ -1071,7 +1071,7 @@ "test_dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" }, { "dependency": "chrome_and_driver", @@ -1107,7 +1107,7 @@ "test_dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" } ], "tasks": [ @@ -1139,7 +1139,7 @@ "test_dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" } ], "tasks": [ @@ -1171,7 +1171,7 @@ "test_dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" } ], "tasks": [ @@ -1203,7 +1203,7 @@ "test_dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" } ], "tasks": [ @@ -1235,7 +1235,7 @@ "test_dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" } ], "tasks": [ @@ -1267,7 +1267,7 @@ "test_dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" }, { "dependency": "chrome_and_driver", @@ -1303,7 +1303,7 @@ "test_dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" }, { "dependency": "chrome_and_driver", @@ -1339,7 +1339,7 @@ "test_dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" }, { "dependency": "chrome_and_driver", @@ -1375,7 +1375,7 @@ "test_dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" }, { "dependency": "chrome_and_driver", @@ -1411,7 +1411,7 @@ "test_dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" }, { "dependency": "chrome_and_driver", @@ -1447,7 +1447,7 @@ "test_dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" }, { "dependency": "chrome_and_driver", @@ -1483,7 +1483,7 @@ "test_dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" }, { "dependency": "chrome_and_driver", @@ -1519,7 +1519,7 @@ "test_dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" }, { "dependency": "chrome_and_driver", @@ -1539,4 +1539,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/ci/builders/mac_host_engine.json b/ci/builders/mac_host_engine.json index aca28e9280962..658074a91eb7e 100644 --- a/ci/builders/mac_host_engine.json +++ b/ci/builders/mac_host_engine.json @@ -146,7 +146,7 @@ "dependencies": [ { "dependency": "goldctl", - "version": "git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603" + "version": "git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09" } ], "gclient_variables": { diff --git a/lib/web_ui/dev/generate_builder_json.dart b/lib/web_ui/dev/generate_builder_json.dart index e92820ee8d72a..c6e4b4ed761fd 100644 --- a/lib/web_ui/dev/generate_builder_json.dart +++ b/lib/web_ui/dev/generate_builder_json.dart @@ -149,7 +149,7 @@ Iterable _getTestStepsForPlatform( 'test_dependencies': [ { 'dependency': 'goldctl', - 'version': 'git_revision:3a77d0b12c697a840ca0c7705208e8622dc94603', + 'version': 'git_revision:dddc0623e63150cbbafdcb273d4048f329e1dd09', }, if (suite.runConfig.browser == BrowserName.chrome) { From 9e486ecb0e79d9255b11807fee58154866bbb8f0 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 11 Oct 2023 12:45:19 -0400 Subject: [PATCH 578/859] Roll Fuchsia Mac SDK from mLc-VlVTg-p18HjiP... to Qjz4zE4Oe0AO_7T3f... (#46778) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jsimmons@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 07f8b1eb805fe..a5a5f92d3b8f8 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'mLc-VlVTg-p18HjiPuWYyEVUAwBWL8wsxyCpocEQtMkC' + 'version': 'Qjz4zE4Oe0AO_7T3f-M9BFLMSvDVKjNM4m4C1xpSplsC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From ca65886882b243bb5f900f852601f7feb16ab334 Mon Sep 17 00:00:00 2001 From: Brandon DeRosier Date: Wed, 11 Oct 2023 10:47:51 -0700 Subject: [PATCH 579/859] [Impeller] Avoid invalid GL depth calls on macOS desktop. (#46758) The macOS desktop driver doesn't support ES profiles, and `glClearDepthf` + `glDepthRangef` are throwing `GL_INVALID_OPERATION` and doing nothing. Noticed this while updating impeller-cmake past @matanlurey's recent changes to make `GL_INVALID_OPERATION` fatal. Impeller-cmake-example uses a depth buffer, whereas Impeller's 2D renderer currently does not. Added a follow-up bug to make these calls work on macOS desktop: https://github.com/flutter/flutter/issues/136322. Both Impeller Scene and the impeller-cmake-example currently just rely on the default state for clearing depth. --- impeller/renderer/backend/gles/render_pass_gles.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/impeller/renderer/backend/gles/render_pass_gles.cc b/impeller/renderer/backend/gles/render_pass_gles.cc index eafa6385d06f6..4816a2973b0da 100644 --- a/impeller/renderer/backend/gles/render_pass_gles.cc +++ b/impeller/renderer/backend/gles/render_pass_gles.cc @@ -207,7 +207,12 @@ struct RenderPassData { pass_data.clear_color.alpha // alpha ); if (pass_data.depth_attachment) { + // TODO(bdero): Desktop GL for Apple requires glClearDepth. glClearDepthf + // throws GL_INVALID_OPERATION. + // https://github.com/flutter/flutter/issues/136322 +#if !FML_OS_MACOSX gl.ClearDepthf(pass_data.clear_depth); +#endif } if (pass_data.stencil_attachment) { gl.ClearStencil(pass_data.clear_stencil); @@ -303,7 +308,12 @@ struct RenderPassData { viewport.rect.size.height // height ); if (pass_data.depth_attachment) { + // TODO(bdero): Desktop GL for Apple requires glDepthRange. glDepthRangef + // throws GL_INVALID_OPERATION. + // https://github.com/flutter/flutter/issues/136322 +#if !FML_OS_MACOSX gl.DepthRangef(viewport.depth_range.z_near, viewport.depth_range.z_far); +#endif } //-------------------------------------------------------------------------- From 9c1a01fb216a01ddec0873edb654b7bf146aba4c Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 11 Oct 2023 14:21:49 -0400 Subject: [PATCH 580/859] Roll Skia from bfd9af01b785 to 6cc9f73ea54e (1 revision) (#46784) https://skia.googlesource.com/skia.git/+log/bfd9af01b785..6cc9f73ea54e 2023-10-11 johnstiles@google.com Avoid symbol-shadowing when inlining functions. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index a5a5f92d3b8f8..68d1e522c04ec 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'bfd9af01b785b9c50e0f4443601ec54ce5e3b72b', + 'skia_revision': '6cc9f73ea54e95714bccd83e2c868002ffb2a8ed', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 2ee0ed92355a1..8f1eb23387d0b 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: d074d823a1138613d625baa1fdfd041a +Signature: fc9dee121cc8b1258fe2821092cdd954 ==================================================================================================== LIBRARY: etc1 From ffdce424a432d09b113d1b213d26ce84594c7e9c Mon Sep 17 00:00:00 2001 From: John McCutchan Date: Wed, 11 Oct 2023 11:29:04 -0700 Subject: [PATCH 581/859] Fix 303652511 and add a regression test (#46743) Fixes internal bug b/303652511 and includes a regression test. The TL;DR of the bug is that when re-launching a singleton-cached-engine Flutter activity using FLAG_ACTIVITY_CLEAR_TASK, the teardown of the previous Flutter activity interleaves with the creation of the new Flutter activity, resulting in the Flutter engine ending up incorrectly in the AppLifecycleState.detached state. This then results in the app being completely unresponsive because Flutter doesn't draw frames in this state. I don't know if the issue is reproducible in production under normal user operation, but I'm concerned it very easily could be. There's also nothing stopping other apps or Android system code from launching an app using this flag. --- .../FlutterActivityAndFragmentDelegate.java | 4 + ...lutterActivityAndFragmentDelegateTest.java | 85 +++++++++++++++++++ 2 files changed, 89 insertions(+) diff --git a/shell/platform/android/io/flutter/embedding/android/FlutterActivityAndFragmentDelegate.java b/shell/platform/android/io/flutter/embedding/android/FlutterActivityAndFragmentDelegate.java index 9596dc6cc4a26..6b8b0c44aafde 100644 --- a/shell/platform/android/io/flutter/embedding/android/FlutterActivityAndFragmentDelegate.java +++ b/shell/platform/android/io/flutter/embedding/android/FlutterActivityAndFragmentDelegate.java @@ -714,6 +714,10 @@ public void detachFromFlutterEngine() { * */ void onDetach() { + if (!isAttached) { + // Already detached. + return; + } Log.v(TAG, "onDetach()"); ensureAlive(); diff --git a/shell/platform/android/test/io/flutter/embedding/android/FlutterActivityAndFragmentDelegateTest.java b/shell/platform/android/test/io/flutter/embedding/android/FlutterActivityAndFragmentDelegateTest.java index 7b37b4b54451c..26a0a04098649 100644 --- a/shell/platform/android/test/io/flutter/embedding/android/FlutterActivityAndFragmentDelegateTest.java +++ b/shell/platform/android/test/io/flutter/embedding/android/FlutterActivityAndFragmentDelegateTest.java @@ -65,6 +65,7 @@ public class FlutterActivityAndFragmentDelegateTest { private final Context ctx = ApplicationProvider.getApplicationContext(); private FlutterEngine mockFlutterEngine; private FlutterActivityAndFragmentDelegate.Host mockHost; + private FlutterActivityAndFragmentDelegate.Host mockHost2; @SuppressWarnings("deprecation") // Robolectric.setupActivity @@ -94,6 +95,24 @@ public void setup() { when(mockHost.shouldDestroyEngineWithHost()).thenReturn(true); when(mockHost.shouldDispatchAppLifecycleState()).thenReturn(true); when(mockHost.attachToEngineAutomatically()).thenReturn(true); + + mockHost2 = mock(FlutterActivityAndFragmentDelegate.Host.class); + when(mockHost2.getContext()).thenReturn(ctx); + when(mockHost2.getActivity()).thenReturn(Robolectric.setupActivity(Activity.class)); + when(mockHost2.getLifecycle()).thenReturn(mock(Lifecycle.class)); + when(mockHost2.getFlutterShellArgs()).thenReturn(new FlutterShellArgs(new String[] {})); + when(mockHost2.getDartEntrypointFunctionName()).thenReturn("main"); + when(mockHost2.getDartEntrypointArgs()).thenReturn(null); + when(mockHost2.getAppBundlePath()).thenReturn("/fake/path"); + when(mockHost2.getInitialRoute()).thenReturn("/"); + when(mockHost2.getRenderMode()).thenReturn(RenderMode.surface); + when(mockHost2.getTransparencyMode()).thenReturn(TransparencyMode.transparent); + when(mockHost2.provideFlutterEngine(any(Context.class))).thenReturn(mockFlutterEngine); + when(mockHost2.shouldAttachEngineToActivity()).thenReturn(true); + when(mockHost2.shouldHandleDeeplinking()).thenReturn(false); + when(mockHost2.shouldDestroyEngineWithHost()).thenReturn(true); + when(mockHost2.shouldDispatchAppLifecycleState()).thenReturn(true); + when(mockHost2.attachToEngineAutomatically()).thenReturn(true); } @Test @@ -1275,6 +1294,72 @@ public void itDoesNotAttachFlutterViewToEngine() { assertFalse(delegate.flutterView.isAttachedToFlutterEngine()); } + @Test + public void itDoesNotDetachTwice() { + FlutterEngine cachedEngine = mockFlutterEngine(); + FlutterEngineCache.getInstance().put("my_flutter_engine", cachedEngine); + + // Engine is a cached singleton that isn't owned by either hosts. + when(mockHost.shouldDestroyEngineWithHost()).thenReturn(false); + when(mockHost2.shouldDestroyEngineWithHost()).thenReturn(false); + + // Adjust fake hosts to request cached engine. + when(mockHost.getCachedEngineId()).thenReturn("my_flutter_engine"); + when(mockHost2.getCachedEngineId()).thenReturn("my_flutter_engine"); + + // Create the real objects that we're testing. + FlutterActivityAndFragmentDelegate delegate = new FlutterActivityAndFragmentDelegate(mockHost); + FlutterActivityAndFragmentDelegate delegate2 = + new FlutterActivityAndFragmentDelegate(mockHost2); + + // This test is written to recreate the following scenario: + // 1. We have a FlutterFragment_A attached to a singleton cached engine. + // 2. An intent arrives that spawns FlutterFragment_B. + // 3. FlutterFragment_B starts and steals the engine from FlutterFragment_A while attaching. + // Via a call to FlutterActivityAndFragmentDelegate.detachFromFlutterEngine(). + // 4. FlutterFragment_A is forcibly detached from the engine. + // 5. FlutterFragment_B is attached to the engine. + // 6. FlutterFragment_A is detached from the engine. + // Note that the second detach for FlutterFragment_A is done unconditionally when the Fragment + // is being + // torn down. + + // At this point the engine's life cycle channel receives a message (triggered by + // FlutterFragment_A's second detach) + // that indicates the app is detached. This breaks FlutterFragment_B. + + // Below is a sequence of calls that mimicks the calls that the above scenario would trigger + // without + // relying on an intent to trigger the behaviour. + + // FlutterFragment_A is attached to the engine. + delegate.onAttach(ctx); + + // NOTE: The following two calls happen in a slightly different order in reality. That is, via, + // a call to host.detachFromFlutterEngine, delegate2.onAttach ends up invoking + // delegate.onDetach. + // To keep this regression test simple, we call them directly. + + // Detach FlutterFragment_A. + delegate.onDetach(); + + verify(cachedEngine.getLifecycleChannel(), times(1)).appIsDetached(); + + // Attaches to the engine FlutterFragment_B. + delegate2.onAttach(ctx); + delegate2.onResume(); + + verify(cachedEngine.getLifecycleChannel(), times(1)).appIsResumed(); + verify(cachedEngine.getLifecycleChannel(), times(1)).appIsDetached(); + + // A second Detach of FlutterFragment_A happens when the Fragment is detached. + delegate.onDetach(); + + // IMPORTANT: The bug we fixed would have resulted in the engine thinking the app + // is detached twice instead of once. + verify(cachedEngine.getLifecycleChannel(), times(1)).appIsDetached(); + } + /** * Creates a mock {@link io.flutter.embedding.engine.FlutterEngine}. * From 265d2e220b2d99e3398bd84dd743a2e0f67863af Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 11 Oct 2023 15:16:06 -0400 Subject: [PATCH 582/859] Roll Skia from 6cc9f73ea54e to 2459d71707e0 (1 revision) (#46787) https://skia.googlesource.com/skia.git/+log/6cc9f73ea54e..2459d71707e0 2023-10-11 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from bd2d26113aa7 to baab66a8258b (6 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 68d1e522c04ec..38aff26165d76 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '6cc9f73ea54e95714bccd83e2c868002ffb2a8ed', + 'skia_revision': '2459d71707e03200936094cfaa0e8e6b08978118', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 1a99edb5ec927cbeb4f0224835f42adfa54eb46d Mon Sep 17 00:00:00 2001 From: John McCutchan Date: Wed, 11 Oct 2023 12:35:36 -0700 Subject: [PATCH 583/859] Rename HardwareBufferExternalTexture* to ImageExternalTexture* (#46786) Image is the more accurate name and we will eventually have a HardwareBufferExternalTexture in the future (see https://developer.android.com/reference/android/graphics/HardwareBufferRenderer available on Android >= 34). --- ci/licenses_golden/licenses_flutter | 10 ++-- shell/platform/android/BUILD.gn | 12 ++-- ...l_texture.cc => image_external_texture.cc} | 34 +++++------ ...nal_texture.h => image_external_texture.h} | 14 ++--- ...ure_gl.cc => image_external_texture_gl.cc} | 60 +++++++++---------- ...xture_gl.h => image_external_texture_gl.h} | 28 ++++----- ...ure_vk.cc => image_external_texture_vk.cc} | 16 ++--- ...xture_vk.h => image_external_texture_vk.h} | 14 ++--- .../platform/android/platform_view_android.cc | 10 ++-- .../android/platform_view_android_jni_impl.cc | 2 +- 10 files changed, 98 insertions(+), 102 deletions(-) rename shell/platform/android/{hardware_buffer_external_texture.cc => image_external_texture.cc} (71%) rename shell/platform/android/{hardware_buffer_external_texture.h => image_external_texture.h} (82%) rename shell/platform/android/{hardware_buffer_external_texture_gl.cc => image_external_texture_gl.cc} (76%) rename shell/platform/android/{hardware_buffer_external_texture_gl.h => image_external_texture_gl.h} (73%) rename shell/platform/android/{hardware_buffer_external_texture_vk.cc => image_external_texture_vk.cc} (79%) rename shell/platform/android/{hardware_buffer_external_texture_vk.h => image_external_texture_vk.h} (68%) diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index 52be1996d576e..97eea3f5ff970 100644 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -3008,10 +3008,12 @@ ORIGIN: ../../../flutter/shell/platform/android/external_view_embedder/surface_p ORIGIN: ../../../flutter/shell/platform/android/external_view_embedder/surface_pool.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/flutter_main.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/flutter_main.h + ../../../flutter/LICENSE -ORIGIN: ../../../flutter/shell/platform/android/hardware_buffer_external_texture.h + ../../../flutter/LICENSE -ORIGIN: ../../../flutter/shell/platform/android/hardware_buffer_external_texture_gl.cc + ../../../flutter/LICENSE -ORIGIN: ../../../flutter/shell/platform/android/hardware_buffer_external_texture_gl.h + ../../../flutter/LICENSE -ORIGIN: ../../../flutter/shell/platform/android/hardware_buffer_external_texture_vk.h + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/shell/platform/android/image_external_texture.h + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/shell/platform/android/image_external_texture.cc + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/shell/platform/android/image_external_texture_gl.cc + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/shell/platform/android/image_external_texture_gl.h + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/shell/platform/android/image_external_texture_vk.h + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/shell/platform/android/image_external_texture_vk.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/FlutterInjector.java + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/Log.java + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/app/FlutterActivity.java + ../../../flutter/LICENSE diff --git a/shell/platform/android/BUILD.gn b/shell/platform/android/BUILD.gn index 1f1068db7e703..dd035dc9060e5 100644 --- a/shell/platform/android/BUILD.gn +++ b/shell/platform/android/BUILD.gn @@ -96,12 +96,12 @@ source_set("flutter_shell_native_src") { "apk_asset_provider.h", "flutter_main.cc", "flutter_main.h", - "hardware_buffer_external_texture.cc", - "hardware_buffer_external_texture.h", - "hardware_buffer_external_texture_gl.cc", - "hardware_buffer_external_texture_gl.h", - "hardware_buffer_external_texture_vk.cc", - "hardware_buffer_external_texture_vk.h", + "image_external_texture.cc", + "image_external_texture.h", + "image_external_texture_gl.cc", + "image_external_texture_gl.h", + "image_external_texture_vk.cc", + "image_external_texture_vk.h", "library_loader.cc", "ndk_helpers.cc", "ndk_helpers.h", diff --git a/shell/platform/android/hardware_buffer_external_texture.cc b/shell/platform/android/image_external_texture.cc similarity index 71% rename from shell/platform/android/hardware_buffer_external_texture.cc rename to shell/platform/android/image_external_texture.cc index e26a7e51cd6dd..c8a7129e22fc1 100644 --- a/shell/platform/android/hardware_buffer_external_texture.cc +++ b/shell/platform/android/image_external_texture.cc @@ -1,5 +1,5 @@ -#include "flutter/shell/platform/android/hardware_buffer_external_texture.h" +#include "flutter/shell/platform/android/image_external_texture.h" #include #include @@ -9,7 +9,7 @@ namespace flutter { -HardwareBufferExternalTexture::HardwareBufferExternalTexture( +ImageExternalTexture::ImageExternalTexture( int64_t id, const fml::jni::ScopedJavaGlobalRef& image_texture_entry, const std::shared_ptr& jni_facade) @@ -18,10 +18,10 @@ HardwareBufferExternalTexture::HardwareBufferExternalTexture( jni_facade_(jni_facade) {} // Implementing flutter::Texture. -void HardwareBufferExternalTexture::Paint(PaintContext& context, - const SkRect& bounds, - bool freeze, - const DlImageSampling sampling) { +void ImageExternalTexture::Paint(PaintContext& context, + const SkRect& bounds, + bool freeze, + const DlImageSampling sampling) { if (state_ == AttachmentState::kDetached) { return; } @@ -42,26 +42,25 @@ void HardwareBufferExternalTexture::Paint(PaintContext& context, flutter::DlCanvas::SrcRectConstraint::kStrict // enforce edges ); } else { - FML_LOG(ERROR) - << "No DlImage available for HardwareBufferExternalTexture to paint."; + FML_LOG(ERROR) << "No DlImage available for ImageExternalTexture to paint."; } } // Implementing flutter::Texture. -void HardwareBufferExternalTexture::MarkNewFrameAvailable() { +void ImageExternalTexture::MarkNewFrameAvailable() { new_frame_ready_ = true; } // Implementing flutter::Texture. -void HardwareBufferExternalTexture::OnTextureUnregistered() {} +void ImageExternalTexture::OnTextureUnregistered() {} // Implementing flutter::ContextListener. -void HardwareBufferExternalTexture::OnGrContextCreated() { +void ImageExternalTexture::OnGrContextCreated() { state_ = AttachmentState::kUninitialized; } // Implementing flutter::ContextListener. -void HardwareBufferExternalTexture::OnGrContextDestroyed() { +void ImageExternalTexture::OnGrContextDestroyed() { if (state_ == AttachmentState::kAttached) { dl_image_.reset(); Detach(); @@ -69,7 +68,7 @@ void HardwareBufferExternalTexture::OnGrContextDestroyed() { state_ = AttachmentState::kDetached; } -JavaLocalRef HardwareBufferExternalTexture::AcquireLatestImage() { +JavaLocalRef ImageExternalTexture::AcquireLatestImage() { JNIEnv* env = fml::jni::AttachCurrentThread(); FML_CHECK(env != nullptr); @@ -79,15 +78,14 @@ JavaLocalRef HardwareBufferExternalTexture::AcquireLatestImage() { return image_java; } -void HardwareBufferExternalTexture::CloseImage( - const fml::jni::JavaRef& image) { +void ImageExternalTexture::CloseImage(const fml::jni::JavaRef& image) { if (image.obj() == nullptr) { return; } jni_facade_->ImageClose(JavaLocalRef(image)); } -void HardwareBufferExternalTexture::CloseHardwareBuffer( +void ImageExternalTexture::CloseHardwareBuffer( const fml::jni::JavaRef& hardware_buffer) { if (hardware_buffer.obj() == nullptr) { return; @@ -95,7 +93,7 @@ void HardwareBufferExternalTexture::CloseHardwareBuffer( jni_facade_->HardwareBufferClose(JavaLocalRef(hardware_buffer)); } -JavaLocalRef HardwareBufferExternalTexture::HardwareBufferFor( +JavaLocalRef ImageExternalTexture::HardwareBufferFor( const fml::jni::JavaRef& image) { if (image.obj() == nullptr) { return JavaLocalRef(); @@ -104,7 +102,7 @@ JavaLocalRef HardwareBufferExternalTexture::HardwareBufferFor( return jni_facade_->ImageGetHardwareBuffer(JavaLocalRef(image)); } -AHardwareBuffer* HardwareBufferExternalTexture::AHardwareBufferFor( +AHardwareBuffer* ImageExternalTexture::AHardwareBufferFor( const fml::jni::JavaRef& hardware_buffer) { JNIEnv* env = fml::jni::AttachCurrentThread(); FML_CHECK(env != nullptr); diff --git a/shell/platform/android/hardware_buffer_external_texture.h b/shell/platform/android/image_external_texture.h similarity index 82% rename from shell/platform/android/hardware_buffer_external_texture.h rename to shell/platform/android/image_external_texture.h index 6a0ec78977e1a..3de077706fff4 100644 --- a/shell/platform/android/hardware_buffer_external_texture.h +++ b/shell/platform/android/image_external_texture.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef FLUTTER_SHELL_PLATFORM_ANDROID_HARDWARE_BUFFER_EXTERNAL_TEXTURE_H_ -#define FLUTTER_SHELL_PLATFORM_ANDROID_HARDWARE_BUFFER_EXTERNAL_TEXTURE_H_ +#ifndef FLUTTER_SHELL_PLATFORM_ANDROID_IMAGE_EXTERNAL_TEXTURE_H_ +#define FLUTTER_SHELL_PLATFORM_ANDROID_IMAGE_EXTERNAL_TEXTURE_H_ #include "flutter/common/graphics/texture.h" #include "flutter/fml/logging.h" @@ -17,14 +17,14 @@ namespace flutter { // External texture peered to a sequence of android.hardware.HardwareBuffers. // -class HardwareBufferExternalTexture : public flutter::Texture { +class ImageExternalTexture : public flutter::Texture { public: - explicit HardwareBufferExternalTexture( + explicit ImageExternalTexture( int64_t id, const fml::jni::ScopedJavaGlobalRef& image_texture_entry, const std::shared_ptr& jni_facade); - virtual ~HardwareBufferExternalTexture() = default; + virtual ~ImageExternalTexture() = default; // |flutter::Texture|. void Paint(PaintContext& context, @@ -65,9 +65,9 @@ class HardwareBufferExternalTexture : public flutter::Texture { sk_sp dl_image_; - FML_DISALLOW_COPY_AND_ASSIGN(HardwareBufferExternalTexture); + FML_DISALLOW_COPY_AND_ASSIGN(ImageExternalTexture); }; } // namespace flutter -#endif // FLUTTER_SHELL_PLATFORM_ANDROID_HARDWARE_BUFFER_EXTERNAL_TEXTURE_H_ +#endif // FLUTTER_SHELL_PLATFORM_ANDROID_IMAGE_EXTERNAL_TEXTURE_H_ diff --git a/shell/platform/android/hardware_buffer_external_texture_gl.cc b/shell/platform/android/image_external_texture_gl.cc similarity index 76% rename from shell/platform/android/hardware_buffer_external_texture_gl.cc rename to shell/platform/android/image_external_texture_gl.cc index 3eb0defe19d98..fd966c8a10ee6 100644 --- a/shell/platform/android/hardware_buffer_external_texture_gl.cc +++ b/shell/platform/android/image_external_texture_gl.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "flutter/shell/platform/android/hardware_buffer_external_texture_gl.h" +#include "flutter/shell/platform/android/image_external_texture_gl.h" #include #include @@ -28,13 +28,13 @@ namespace flutter { -HardwareBufferExternalTextureGL::HardwareBufferExternalTextureGL( +ImageExternalTextureGL::ImageExternalTextureGL( int64_t id, const fml::jni::ScopedJavaGlobalRef& image_texture_entry, const std::shared_ptr& jni_facade) - : HardwareBufferExternalTexture(id, image_texture_entry, jni_facade) {} + : ImageExternalTexture(id, image_texture_entry, jni_facade) {} -void HardwareBufferExternalTextureGL::Attach(PaintContext& context) { +void ImageExternalTextureGL::Attach(PaintContext& context) { if (state_ == AttachmentState::kUninitialized) { if (!android_image_.is_null()) { JavaLocalRef hardware_buffer = HardwareBufferFor(android_image_); @@ -47,11 +47,11 @@ void HardwareBufferExternalTextureGL::Attach(PaintContext& context) { } } -void HardwareBufferExternalTextureGL::Detach() { +void ImageExternalTextureGL::Detach() { egl_image_.reset(); } -bool HardwareBufferExternalTextureGL::MaybeSwapImages() { +bool ImageExternalTextureGL::MaybeSwapImages() { JavaLocalRef image = AcquireLatestImage(); if (image.is_null()) { return false; @@ -72,7 +72,7 @@ bool HardwareBufferExternalTextureGL::MaybeSwapImages() { return true; } -impeller::UniqueEGLImageKHR HardwareBufferExternalTextureGL::CreateEGLImage( +impeller::UniqueEGLImageKHR ImageExternalTextureGL::CreateEGLImage( AHardwareBuffer* hardware_buffer) { if (hardware_buffer == nullptr) { return impeller::UniqueEGLImageKHR(); @@ -98,31 +98,31 @@ impeller::UniqueEGLImageKHR HardwareBufferExternalTextureGL::CreateEGLImage( return impeller::UniqueEGLImageKHR(maybe_image); } -HardwareBufferExternalTextureGLSkia::HardwareBufferExternalTextureGLSkia( +ImageExternalTextureGLSkia::ImageExternalTextureGLSkia( const std::shared_ptr& context, int64_t id, const fml::jni::ScopedJavaGlobalRef& image_texture_entry, const std::shared_ptr& jni_facade) - : HardwareBufferExternalTextureGL(id, image_texture_entry, jni_facade) {} + : ImageExternalTextureGL(id, image_texture_entry, jni_facade) {} -void HardwareBufferExternalTextureGLSkia::Attach(PaintContext& context) { +void ImageExternalTextureGLSkia::Attach(PaintContext& context) { if (state_ == AttachmentState::kUninitialized) { // After this call state_ will be AttachmentState::kAttached and egl_image_ // will have been created if we still have an Image associated with us. - HardwareBufferExternalTextureGL::Attach(context); + ImageExternalTextureGL::Attach(context); GLuint texture_name; glGenTextures(1, &texture_name); texture_.reset(impeller::GLTexture{texture_name}); } } -void HardwareBufferExternalTextureGLSkia::Detach() { - HardwareBufferExternalTextureGL::Detach(); +void ImageExternalTextureGLSkia::Detach() { + ImageExternalTextureGL::Detach(); texture_.reset(); } -void HardwareBufferExternalTextureGLSkia::ProcessFrame(PaintContext& context, - const SkRect& bounds) { +void ImageExternalTextureGLSkia::ProcessFrame(PaintContext& context, + const SkRect& bounds) { const bool swapped = MaybeSwapImages(); if (!swapped && !egl_image_.is_valid()) { // Nothing to do. @@ -132,7 +132,7 @@ void HardwareBufferExternalTextureGLSkia::ProcessFrame(PaintContext& context, dl_image_ = CreateDlImage(context, bounds); } -void HardwareBufferExternalTextureGLSkia::BindImageToTexture( +void ImageExternalTextureGLSkia::BindImageToTexture( const impeller::UniqueEGLImageKHR& image, GLuint tex) { if (!image.is_valid() || tex == 0) { @@ -143,7 +143,7 @@ void HardwareBufferExternalTextureGLSkia::BindImageToTexture( (GLeglImageOES)image.get().image); } -sk_sp HardwareBufferExternalTextureGLSkia::CreateDlImage( +sk_sp ImageExternalTextureGLSkia::CreateDlImage( PaintContext& context, const SkRect& bounds) { GrGLTextureInfo textureInfo = {GL_TEXTURE_EXTERNAL_OES, @@ -155,26 +155,24 @@ sk_sp HardwareBufferExternalTextureGLSkia::CreateDlImage( kRGBA_8888_SkColorType, kPremul_SkAlphaType, nullptr)); } -HardwareBufferExternalTextureGLImpeller:: - HardwareBufferExternalTextureGLImpeller( - const std::shared_ptr& context, - int64_t id, - const fml::jni::ScopedJavaGlobalRef& image_textury_entry, - const std::shared_ptr& jni_facade) - : HardwareBufferExternalTextureGL(id, image_textury_entry, jni_facade), +ImageExternalTextureGLImpeller::ImageExternalTextureGLImpeller( + const std::shared_ptr& context, + int64_t id, + const fml::jni::ScopedJavaGlobalRef& image_textury_entry, + const std::shared_ptr& jni_facade) + : ImageExternalTextureGL(id, image_textury_entry, jni_facade), impeller_context_(context) {} -void HardwareBufferExternalTextureGLImpeller::Detach() {} +void ImageExternalTextureGLImpeller::Detach() {} -void HardwareBufferExternalTextureGLImpeller::Attach(PaintContext& context) { +void ImageExternalTextureGLImpeller::Attach(PaintContext& context) { if (state_ == AttachmentState::kUninitialized) { - HardwareBufferExternalTextureGL::Attach(context); + ImageExternalTextureGL::Attach(context); } } -void HardwareBufferExternalTextureGLImpeller::ProcessFrame( - PaintContext& context, - const SkRect& bounds) { +void ImageExternalTextureGLImpeller::ProcessFrame(PaintContext& context, + const SkRect& bounds) { const bool swapped = MaybeSwapImages(); if (!swapped && !egl_image_.is_valid()) { // Nothing to do. @@ -183,7 +181,7 @@ void HardwareBufferExternalTextureGLImpeller::ProcessFrame( dl_image_ = CreateDlImage(context, bounds); } -sk_sp HardwareBufferExternalTextureGLImpeller::CreateDlImage( +sk_sp ImageExternalTextureGLImpeller::CreateDlImage( PaintContext& context, const SkRect& bounds) { impeller::TextureDescriptor desc; diff --git a/shell/platform/android/hardware_buffer_external_texture_gl.h b/shell/platform/android/image_external_texture_gl.h similarity index 73% rename from shell/platform/android/hardware_buffer_external_texture_gl.h rename to shell/platform/android/image_external_texture_gl.h index 0a81fde0d1321..bdaa50ac605df 100644 --- a/shell/platform/android/hardware_buffer_external_texture_gl.h +++ b/shell/platform/android/image_external_texture_gl.h @@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef FLUTTER_SHELL_PLATFORM_ANDROID_HARDWARE_BUFFER_EXTERNAL_TEXTURE_GL_H_ -#define FLUTTER_SHELL_PLATFORM_ANDROID_HARDWARE_BUFFER_EXTERNAL_TEXTURE_GL_H_ +#ifndef FLUTTER_SHELL_PLATFORM_ANDROID_IMAGE_EXTERNAL_TEXTURE_GL_H_ +#define FLUTTER_SHELL_PLATFORM_ANDROID_IMAGE_EXTERNAL_TEXTURE_GL_H_ #include "flutter/fml/platform/android/scoped_java_ref.h" -#include "flutter/shell/platform/android/hardware_buffer_external_texture.h" +#include "flutter/shell/platform/android/image_external_texture.h" #include "flutter/impeller/renderer/backend/gles/context_gles.h" #include "flutter/impeller/renderer/backend/gles/gles.h" @@ -20,9 +20,9 @@ namespace flutter { -class HardwareBufferExternalTextureGL : public HardwareBufferExternalTexture { +class ImageExternalTextureGL : public ImageExternalTexture { public: - HardwareBufferExternalTextureGL( + ImageExternalTextureGL( int64_t id, const fml::jni::ScopedJavaGlobalRef& image_textury_entry, const std::shared_ptr& jni_facade); @@ -39,13 +39,12 @@ class HardwareBufferExternalTextureGL : public HardwareBufferExternalTexture { fml::jni::ScopedJavaGlobalRef android_image_; impeller::UniqueEGLImageKHR egl_image_; - FML_DISALLOW_COPY_AND_ASSIGN(HardwareBufferExternalTextureGL); + FML_DISALLOW_COPY_AND_ASSIGN(ImageExternalTextureGL); }; -class HardwareBufferExternalTextureGLSkia - : public HardwareBufferExternalTextureGL { +class ImageExternalTextureGLSkia : public ImageExternalTextureGL { public: - HardwareBufferExternalTextureGLSkia( + ImageExternalTextureGLSkia( const std::shared_ptr& context, int64_t id, const fml::jni::ScopedJavaGlobalRef& image_textury_entry, @@ -62,13 +61,12 @@ class HardwareBufferExternalTextureGLSkia impeller::UniqueGLTexture texture_; - FML_DISALLOW_COPY_AND_ASSIGN(HardwareBufferExternalTextureGLSkia); + FML_DISALLOW_COPY_AND_ASSIGN(ImageExternalTextureGLSkia); }; -class HardwareBufferExternalTextureGLImpeller - : public HardwareBufferExternalTextureGL { +class ImageExternalTextureGLImpeller : public ImageExternalTextureGL { public: - HardwareBufferExternalTextureGLImpeller( + ImageExternalTextureGLImpeller( const std::shared_ptr& context, int64_t id, const fml::jni::ScopedJavaGlobalRef& @@ -85,9 +83,9 @@ class HardwareBufferExternalTextureGLImpeller const std::shared_ptr impeller_context_; - FML_DISALLOW_COPY_AND_ASSIGN(HardwareBufferExternalTextureGLImpeller); + FML_DISALLOW_COPY_AND_ASSIGN(ImageExternalTextureGLImpeller); }; } // namespace flutter -#endif // FLUTTER_SHELL_PLATFORM_ANDROID_HARDWARE_BUFFER_EXTERNAL_TEXTURE_GL_H_ +#endif // FLUTTER_SHELL_PLATFORM_ANDROID_IMAGE_EXTERNAL_TEXTURE_GL_H_ diff --git a/shell/platform/android/hardware_buffer_external_texture_vk.cc b/shell/platform/android/image_external_texture_vk.cc similarity index 79% rename from shell/platform/android/hardware_buffer_external_texture_vk.cc rename to shell/platform/android/image_external_texture_vk.cc index d02a4f545af97..8843b1774fc81 100644 --- a/shell/platform/android/hardware_buffer_external_texture_vk.cc +++ b/shell/platform/android/image_external_texture_vk.cc @@ -1,5 +1,5 @@ -#include "flutter/shell/platform/android/hardware_buffer_external_texture_vk.h" +#include "flutter/shell/platform/android/image_external_texture_vk.h" #include "flutter/impeller/core/formats.h" #include "flutter/impeller/core/texture_descriptor.h" @@ -10,27 +10,27 @@ namespace flutter { -HardwareBufferExternalTextureVK::HardwareBufferExternalTextureVK( +ImageExternalTextureVK::ImageExternalTextureVK( const std::shared_ptr& impeller_context, int64_t id, const fml::jni::ScopedJavaGlobalRef& image_texture_entry, const std::shared_ptr& jni_facade) - : HardwareBufferExternalTexture(id, image_texture_entry, jni_facade), + : ImageExternalTexture(id, image_texture_entry, jni_facade), impeller_context_(impeller_context) {} -HardwareBufferExternalTextureVK::~HardwareBufferExternalTextureVK() {} +ImageExternalTextureVK::~ImageExternalTextureVK() {} -void HardwareBufferExternalTextureVK::Attach(PaintContext& context) { +void ImageExternalTextureVK::Attach(PaintContext& context) { if (state_ == AttachmentState::kUninitialized) { // First processed frame we are attached. state_ = AttachmentState::kAttached; } } -void HardwareBufferExternalTextureVK::Detach() {} +void ImageExternalTextureVK::Detach() {} -void HardwareBufferExternalTextureVK::ProcessFrame(PaintContext& context, - const SkRect& bounds) { +void ImageExternalTextureVK::ProcessFrame(PaintContext& context, + const SkRect& bounds) { JavaLocalRef image = AcquireLatestImage(); if (image.is_null()) { return; diff --git a/shell/platform/android/hardware_buffer_external_texture_vk.h b/shell/platform/android/image_external_texture_vk.h similarity index 68% rename from shell/platform/android/hardware_buffer_external_texture_vk.h rename to shell/platform/android/image_external_texture_vk.h index f4cd12a1ffb00..a6c531e07945e 100644 --- a/shell/platform/android/hardware_buffer_external_texture_vk.h +++ b/shell/platform/android/image_external_texture_vk.h @@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef FLUTTER_SHELL_PLATFORM_ANDROID_HARDWARE_BUFFER_EXTERNAL_TEXTURE_VK_H_ -#define FLUTTER_SHELL_PLATFORM_ANDROID_HARDWARE_BUFFER_EXTERNAL_TEXTURE_VK_H_ +#ifndef FLUTTER_SHELL_PLATFORM_ANDROID_IMAGE_EXTERNAL_TEXTURE_VK_H_ +#define FLUTTER_SHELL_PLATFORM_ANDROID_IMAGE_EXTERNAL_TEXTURE_VK_H_ -#include "flutter/shell/platform/android/hardware_buffer_external_texture.h" +#include "flutter/shell/platform/android/image_external_texture.h" #include "flutter/impeller/renderer/backend/vulkan/android_hardware_buffer_texture_source_vk.h" #include "flutter/impeller/renderer/backend/vulkan/context_vk.h" @@ -14,16 +14,16 @@ namespace flutter { -class HardwareBufferExternalTextureVK : public HardwareBufferExternalTexture { +class ImageExternalTextureVK : public ImageExternalTexture { public: - HardwareBufferExternalTextureVK( + ImageExternalTextureVK( const std::shared_ptr& impeller_context, int64_t id, const fml::jni::ScopedJavaGlobalRef& hardware_buffer_texture_entry, const std::shared_ptr& jni_facade); - ~HardwareBufferExternalTextureVK() override; + ~ImageExternalTextureVK() override; private: void Attach(PaintContext& context) override; @@ -37,4 +37,4 @@ class HardwareBufferExternalTextureVK : public HardwareBufferExternalTexture { } // namespace flutter -#endif // FLUTTER_SHELL_PLATFORM_ANDROID_HARDWARE_BUFFER_EXTERNAL_TEXTURE_VK_H_ +#endif // FLUTTER_SHELL_PLATFORM_ANDROID_IMAGE_EXTERNAL_TEXTURE_VK_H_ diff --git a/shell/platform/android/platform_view_android.cc b/shell/platform/android/platform_view_android.cc index 434c44db634a1..83f1f635cf639 100644 --- a/shell/platform/android/platform_view_android.cc +++ b/shell/platform/android/platform_view_android.cc @@ -17,11 +17,11 @@ #include "flutter/shell/platform/android/android_surface_gl_impeller.h" #include "flutter/shell/platform/android/android_surface_gl_skia.h" #include "flutter/shell/platform/android/android_surface_software.h" -#include "flutter/shell/platform/android/hardware_buffer_external_texture_gl.h" +#include "flutter/shell/platform/android/image_external_texture_gl.h" #include "flutter/shell/platform/android/surface_texture_external_texture_gl.h" #if IMPELLER_ENABLE_VULKAN // b/258506856 for why this is behind an if #include "flutter/shell/platform/android/android_surface_vulkan_impeller.h" -#include "flutter/shell/platform/android/hardware_buffer_external_texture_vk.h" +#include "flutter/shell/platform/android/image_external_texture_vk.h" #endif #include "flutter/shell/platform/android/context/android_context.h" #include "flutter/shell/platform/android/external_view_embedder/external_view_embedder.h" @@ -324,18 +324,18 @@ void PlatformViewAndroid::RegisterImageTexture( if (android_context_->RenderingApi() == AndroidRenderingAPI::kOpenGLES) { if (android_context_->GetImpellerContext()) { // Impeller GLES. - RegisterTexture(std::make_shared( + RegisterTexture(std::make_shared( std::static_pointer_cast( android_context_->GetImpellerContext()), texture_id, image_texture_entry, jni_facade_)); } else { // Legacy GL. - RegisterTexture(std::make_shared( + RegisterTexture(std::make_shared( std::static_pointer_cast(android_context_), texture_id, image_texture_entry, jni_facade_)); } } else if (android_context_->RenderingApi() == AndroidRenderingAPI::kVulkan) { - RegisterTexture(std::make_shared( + RegisterTexture(std::make_shared( std::static_pointer_cast( android_context_->GetImpellerContext()), texture_id, image_texture_entry, jni_facade_)); diff --git a/shell/platform/android/platform_view_android_jni_impl.cc b/shell/platform/android/platform_view_android_jni_impl.cc index 43a2f63fa378c..a8d3bd94d5b88 100644 --- a/shell/platform/android/platform_view_android_jni_impl.cc +++ b/shell/platform/android/platform_view_android_jni_impl.cc @@ -31,7 +31,7 @@ #include "flutter/shell/platform/android/android_shell_holder.h" #include "flutter/shell/platform/android/apk_asset_provider.h" #include "flutter/shell/platform/android/flutter_main.h" -#include "flutter/shell/platform/android/hardware_buffer_external_texture_gl.h" +#include "flutter/shell/platform/android/image_external_texture_gl.h" #include "flutter/shell/platform/android/jni/platform_view_android_jni.h" #include "flutter/shell/platform/android/platform_view_android.h" #include "flutter/shell/platform/android/surface_texture_external_texture_gl.h" From 7aa06a4c9393cef434da71212e6b555268bd7c97 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Wed, 11 Oct 2023 13:31:39 -0700 Subject: [PATCH 584/859] Fix some image_external_texture entries in the license golden file (#46790) --- ci/licenses_golden/licenses_flutter | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index 97eea3f5ff970..221734ff26250 100644 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -3009,11 +3009,9 @@ ORIGIN: ../../../flutter/shell/platform/android/external_view_embedder/surface_p ORIGIN: ../../../flutter/shell/platform/android/flutter_main.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/flutter_main.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/image_external_texture.h + ../../../flutter/LICENSE -ORIGIN: ../../../flutter/shell/platform/android/image_external_texture.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/image_external_texture_gl.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/image_external_texture_gl.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/image_external_texture_vk.h + ../../../flutter/LICENSE -ORIGIN: ../../../flutter/shell/platform/android/image_external_texture_vk.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/FlutterInjector.java + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/Log.java + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/app/FlutterActivity.java + ../../../flutter/LICENSE @@ -5777,12 +5775,12 @@ FILE: ../../../flutter/shell/platform/android/external_view_embedder/surface_poo FILE: ../../../flutter/shell/platform/android/external_view_embedder/surface_pool.h FILE: ../../../flutter/shell/platform/android/flutter_main.cc FILE: ../../../flutter/shell/platform/android/flutter_main.h -FILE: ../../../flutter/shell/platform/android/hardware_buffer_external_texture.cc -FILE: ../../../flutter/shell/platform/android/hardware_buffer_external_texture.h -FILE: ../../../flutter/shell/platform/android/hardware_buffer_external_texture_gl.cc -FILE: ../../../flutter/shell/platform/android/hardware_buffer_external_texture_gl.h -FILE: ../../../flutter/shell/platform/android/hardware_buffer_external_texture_vk.cc -FILE: ../../../flutter/shell/platform/android/hardware_buffer_external_texture_vk.h +FILE: ../../../flutter/shell/platform/android/image_external_texture.cc +FILE: ../../../flutter/shell/platform/android/image_external_texture.h +FILE: ../../../flutter/shell/platform/android/image_external_texture_gl.cc +FILE: ../../../flutter/shell/platform/android/image_external_texture_gl.h +FILE: ../../../flutter/shell/platform/android/image_external_texture_vk.cc +FILE: ../../../flutter/shell/platform/android/image_external_texture_vk.h FILE: ../../../flutter/shell/platform/android/io/flutter/FlutterInjector.java FILE: ../../../flutter/shell/platform/android/io/flutter/Log.java FILE: ../../../flutter/shell/platform/android/io/flutter/app/FlutterActivity.java From 6ca5756c795deebd27068bc24737d187a7171238 Mon Sep 17 00:00:00 2001 From: Daniel Chevalier Date: Wed, 11 Oct 2023 16:46:16 -0400 Subject: [PATCH 585/859] [web] Adds Noto Music fallback font (#46720) Adds `Noto Music` font as a fallback font, and updates DEPS and font definitions after running the font roller script. ### Issues Fixes: https://github.com/flutter/devtools/issues/6149 ---- ![](https://media.giphy.com/media/3ohzAv6kdQ4tukSNK8/giphy-downsized.gif) I used [the developer API](https://developers.google.com/fonts/docs/developer_api?apix_params=%7B%22family%22%3A%5B%22Noto%20Music%22%5D%7D) to make sure the api works with this font. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- DEPS | 2 +- lib/web_ui/dev/roll_fallback_fonts.dart | 1 + .../lib/src/engine/font_fallback_data.dart | 2587 ++++++++--------- .../test/ui/fallback_fonts_golden_test.dart | 67 +- 4 files changed, 1324 insertions(+), 1333 deletions(-) diff --git a/DEPS b/DEPS index 38aff26165d76..50a639ac87ec9 100644 --- a/DEPS +++ b/DEPS @@ -956,7 +956,7 @@ deps = { 'packages': [ { 'package': 'flutter/flutter_font_fallbacks', - 'version': 'ba9a3d16939f9576afa67273198d779270cd768ae2867209ff3d72bab9acd3f6' + 'version': '14d38cffa1a2c9d4380094957aa63aee811b613b0dc53fd909557f61f6a9068c' } ], 'dep_type': 'cipd', diff --git a/lib/web_ui/dev/roll_fallback_fonts.dart b/lib/web_ui/dev/roll_fallback_fonts.dart index efcb424f3bedd..eea948103792b 100644 --- a/lib/web_ui/dev/roll_fallback_fonts.dart +++ b/lib/web_ui/dev/roll_fallback_fonts.dart @@ -334,6 +334,7 @@ const List fallbackFonts = [ 'Noto Sans', 'Noto Color Emoji', 'Noto Emoji', + 'Noto Music', 'Noto Sans Symbols', 'Noto Sans Symbols 2', 'Noto Sans Adlam', diff --git a/lib/web_ui/lib/src/engine/font_fallback_data.dart b/lib/web_ui/lib/src/engine/font_fallback_data.dart index 46c76a5881dbc..ab4306885e5a3 100644 --- a/lib/web_ui/lib/src/engine/font_fallback_data.dart +++ b/lib/web_ui/lib/src/engine/font_fallback_data.dart @@ -7,32 +7,33 @@ import 'noto_font.dart'; List getFallbackFontList(bool useColorEmoji) => [ - NotoFont('Noto Sans', 'notosans/v30/o-0IIpQlx3QUlC5A4PNb4j5Ba_2c7A.ttf'), + NotoFont('Noto Sans', 'notosans/v32/o-0IIpQlx3QUlC5A4PNb4j5Ba_2c7A.ttf'), NotoFont('Noto Color Emoji', enabled: useColorEmoji, 'notocoloremoji/v25/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFab5s79iz64w.ttf'), - NotoFont('Noto Emoji', enabled: !useColorEmoji, 'notoemoji/v39/bMrnmSyK7YY-MEu6aWjPDs-ar6uWaGWuob-r0jwvS-FGJCMY.ttf'), - NotoFont('Noto Sans Symbols', 'notosanssymbols/v40/rP2up3q65FkAtHfwd-eIS2brbDN6gxP34F9jRRCe4W3gfQ8gavVFRkzrbQ.ttf'), - NotoFont('Noto Sans Symbols 2', 'notosanssymbols2/v21/I_uyMoGduATTei9eI8daxVHDyfisHr71ypPqfX71-AI.ttf'), - NotoFont('Noto Sans Adlam', 'notosansadlam/v21/neIczCCpqp0s5pPusPamd81eMfjPonvqdbYxxpgufnv0TGnBZLwhuvk.ttf'), + NotoFont('Noto Emoji', enabled: !useColorEmoji, 'notoemoji/v47/bMrnmSyK7YY-MEu6aWjPDs-ar6uWaGWuob-r0jwvS-FGJCMY.ttf'), + NotoFont('Noto Music', 'notomusic/v20/pe0rMIiSN5pO63htf1sxIteQB9Zra1U.ttf'), + NotoFont('Noto Sans Symbols', 'notosanssymbols/v41/rP2up3q65FkAtHfwd-eIS2brbDN6gxP34F9jRRCe4W3gfQ8gavVFRkzrbQ.ttf'), + NotoFont('Noto Sans Symbols 2', 'notosanssymbols2/v22/I_uyMoGduATTei9eI8daxVHDyfisHr71ypPqfX71-AI.ttf'), + NotoFont('Noto Sans Adlam', 'notosansadlam/v22/neIczCCpqp0s5pPusPamd81eMfjPonvqdbYxxpgufnv0TGnBZLwhuvk.ttf'), NotoFont('Noto Sans Anatolian Hieroglyphs', 'notosansanatolianhieroglyphs/v16/ijw9s4roRME5LLRxjsRb8A0gKPSWq4BbDmHHu6j2pEtUJzZWXybIymc5QYo.ttf'), NotoFont('Noto Sans Arabic', 'notosansarabic/v18/nwpxtLGrOAZMl5nJ_wfgRg3DrWFZWsnVBJ_sS6tlqHHFlhQ5l3sQWIHPqzCfyGyvu3CBFQLaig.ttf'), NotoFont('Noto Sans Armenian', 'notosansarmenian/v42/ZgN0jOZKPa7CHqq0h37c7ReDUubm2SEdFXp7ig73qtTY5idb74R9UdM3y2nZLorxb60iYy6zF3Eg.ttf'), - NotoFont('Noto Sans Avestan', 'notosansavestan/v20/bWti7ejKfBziStx7lIzKOLQZKhIJkyu9SASLji8U.ttf'), + NotoFont('Noto Sans Avestan', 'notosansavestan/v21/bWti7ejKfBziStx7lIzKOLQZKhIJkyu9SASLji8U.ttf'), NotoFont('Noto Sans Balinese', 'notosansbalinese/v24/NaPwcYvSBuhTirw6IaFn6UrRDaqje-lpbbRtYf-Fwu2Ov7fdhE5Vd222PPY.ttf'), - NotoFont('Noto Sans Bamum', 'notosansbamum/v26/uk-0EGK3o6EruUbnwovcbBTkkklK_Ya_PBHfNGTPEddO-_gLykxEkxA.ttf'), + NotoFont('Noto Sans Bamum', 'notosansbamum/v27/uk-0EGK3o6EruUbnwovcbBTkkklK_Ya_PBHfNGTPEddO-_gLykxEkxA.ttf'), NotoFont('Noto Sans Bassa Vah', 'notosansbassavah/v17/PN_bRee-r3f7LnqsD5sax12gjZn7mBpL5YwUpA2MBdcFn4MaAc6p34gH-GD7.ttf'), - NotoFont('Noto Sans Batak', 'notosansbatak/v16/gok2H6TwAEdtF9N8-mdTCQvT-Zdgo4_PHuk74A.ttf'), + NotoFont('Noto Sans Batak', 'notosansbatak/v19/gok2H6TwAEdtF9N8-mdTCQvT-Zdgo4_PHuk74A.ttf'), NotoFont('Noto Sans Bengali', 'notosansbengali/v20/Cn-SJsCGWQxOjaGwMQ6fIiMywrNJIky6nvd8BjzVMvJx2mcSPVFpVEqE-6KmsolLudCk8izI0lc.ttf'), - NotoFont('Noto Sans Bhaiksuki', 'notosansbhaiksuki/v15/UcC63EosKniBH4iELXATsSBWdvUHXxhj8rLUdU4wh9U.ttf'), + NotoFont('Noto Sans Bhaiksuki', 'notosansbhaiksuki/v17/UcC63EosKniBH4iELXATsSBWdvUHXxhj8rLUdU4wh9U.ttf'), NotoFont('Noto Sans Brahmi', 'notosansbrahmi/v18/vEFK2-VODB8RrNDvZSUmQQIIByV18tK1W77HtMo.ttf'), NotoFont('Noto Sans Buginese', 'notosansbuginese/v18/esDM30ldNv-KYGGJpKGk18phe_7Da6_gtfuEXLmNtw.ttf'), - NotoFont('Noto Sans Buhid', 'notosansbuhid/v18/Dxxy8jiXMW75w3OmoDXVWJD7YwzAe6tgnaFoGA.ttf'), - NotoFont('Noto Sans Canadian Aboriginal', 'notosanscanadianaboriginal/v21/4C_TLjTuEqPj-8J01CwaGkiZ9os0iGVkezM1mUT-j_Lmlzda6uH_nnX1bzigWLn_yAsg0q0uhQ.ttf'), + NotoFont('Noto Sans Buhid', 'notosansbuhid/v22/Dxxy8jiXMW75w3OmoDXVWJD7YwzAe6tgnaFoGA.ttf'), + NotoFont('Noto Sans Canadian Aboriginal', 'notosanscanadianaboriginal/v22/4C_TLjTuEqPj-8J01CwaGkiZ9os0iGVkezM1mUT-j_Lmlzda6uH_nnX1bzigWLn_yAsg0q0uhQ.ttf'), NotoFont('Noto Sans Carian', 'notosanscarian/v16/LDIpaoiONgYwA9Yc6f0gUILeMIOgs7ob9yGLmfI.ttf'), NotoFont('Noto Sans Caucasian Albanian', 'notosanscaucasianalbanian/v16/nKKA-HM_FYFRJvXzVXaANsU0VzsAc46QGOkWytlTs-TXrYDmoVmRSZo.ttf'), NotoFont('Noto Sans Chakma', 'notosanschakma/v17/Y4GQYbJ8VTEp4t3MKJSMjg5OIzhi4JjTQhYBeYo.ttf'), - NotoFont('Noto Sans Cham', 'notosanscham/v27/pe06MIySN5pO62Z5YkFyQb_bbuRhe6D4yip43qfcERwcv7GykboaLg.ttf'), - NotoFont('Noto Sans Cherokee', 'notosanscherokee/v19/KFOPCm6Yu8uF-29fiz9vQF9YWK6Z8O10cHNA0cSkZCHYWi5PDkm5rAffjl0.ttf'), - NotoFont('Noto Sans Coptic', 'notosanscoptic/v17/iJWfBWmUZi_OHPqn4wq6kgqumOEd78u_VG0xR4Y.ttf'), + NotoFont('Noto Sans Cham', 'notosanscham/v29/pe06MIySN5pO62Z5YkFyQb_bbuRhe6D4yip43qfcERwcv7GykboaLg.ttf'), + NotoFont('Noto Sans Cherokee', 'notosanscherokee/v20/KFOPCm6Yu8uF-29fiz9vQF9YWK6Z8O10cHNA0cSkZCHYWi5PDkm5rAffjl0.ttf'), + NotoFont('Noto Sans Coptic', 'notosanscoptic/v20/iJWfBWmUZi_OHPqn4wq6kgqumOEd78u_VG0xR4Y.ttf'), NotoFont('Noto Sans Cuneiform', 'notosanscuneiform/v17/bMrrmTWK7YY-MF22aHGGd7H8PhJtvBDWgb9JlRQueeQ.ttf'), NotoFont('Noto Sans Cypriot', 'notosanscypriot/v15/8AtzGta9PYqQDjyp79a6f8Cj-3a3cxIsK5MPpahF.ttf'), NotoFont('Noto Sans Deseret', 'notosansdeseret/v17/MwQsbgPp1eKH6QsAVuFb9AZM6MMr2Vq9ZnJSZtQG.ttf'), @@ -46,10 +47,10 @@ List getFallbackFontList(bool useColorEmoji) => [ NotoFont('Noto Sans Gothic', 'notosansgothic/v16/TuGKUUVzXI5FBtUq5a8bj6wRbzxTFMX40kFQRx0.ttf'), NotoFont('Noto Sans Grantha', 'notosansgrantha/v17/3y976akwcCjmsU8NDyrKo3IQfQ4o-r8cFeulHc6N.ttf'), NotoFont('Noto Sans Gujarati', 'notosansgujarati/v23/wlpWgx_HC1ti5ViekvcxnhMlCVo3f5pv17ivlzsUB14gg1TMR2Gw4VceEl7MA_ypFwPM_OdiEH0s.ttf'), - NotoFont('Noto Sans Gunjala Gondi', 'notosansgunjalagondi/v17/bWto7e7KfBziStx7lIzKPrcSMwcEnCv6DW7n5hcVXYMTK4q1.ttf'), + NotoFont('Noto Sans Gunjala Gondi', 'notosansgunjalagondi/v19/bWtX7e7KfBziStx7lIzKPrcSMwcEnCv6DW7n5g0ef3PLtymzNxYL4YDE4J4vCTxEJQ.ttf'), NotoFont('Noto Sans Gurmukhi', 'notosansgurmukhi/v26/w8g9H3EvQP81sInb43inmyN9zZ7hb7ATbSWo4q8dJ74a3cVrYFQ_bogT0-gPeG1OenbxZ_trdp7h.ttf'), NotoFont('Noto Sans HK', 'notosanshk/v31/nKKF-GM_FYFRJvXzVXaAPe97P1KHynJFP716qHB--oWTiYjNvVA.ttf'), - NotoFont('Noto Sans Hanunoo', 'notosanshanunoo/v17/f0Xs0fCv8dxkDWlZSoXOj6CphMloFsEsEpgL_ix2.ttf'), + NotoFont('Noto Sans Hanunoo', 'notosanshanunoo/v20/f0Xs0fCv8dxkDWlZSoXOj6CphMloFsEsEpgL_ix2.ttf'), NotoFont('Noto Sans Hatran', 'notosanshatran/v16/A2BBn4Ne0RgnVF3Lnko-0sOBIfL_mM83r1nwzDs.ttf'), NotoFont('Noto Sans Hebrew', 'notosanshebrew/v43/or3HQ7v33eiDljA1IufXTtVf7V6RvEEdhQlk0LlGxCyaeNKYZC0sqk3xXGiXd4qtoiJltutR2g.ttf'), NotoFont('Noto Sans Imperial Aramaic', 'notosansimperialaramaic/v16/a8IMNpjwKmHXpgXbMIsbTc_kvks91LlLetBr5itQrtdml3YfPNno.ttf'), @@ -57,24 +58,24 @@ List getFallbackFontList(bool useColorEmoji) => [ NotoFont('Noto Sans Inscriptional Pahlavi', 'notosansinscriptionalpahlavi/v16/ll8UK3GaVDuxR-TEqFPIbsR79Xxz9WEKbwsjpz7VklYlC7FCVtqVOAYK0QA.ttf'), NotoFont('Noto Sans Inscriptional Parthian', 'notosansinscriptionalparthian/v16/k3k7o-IMPvpLmixcA63oYi-yStDkgXuXncL7dzfW3P4TAJ2yklBJ2jNkLlLr.ttf'), NotoFont('Noto Sans JP', 'notosansjp/v52/-F6jfjtqLzI2JPCgQBnw7HFyzSD-AsregP8VFBEj75vY0rw-oME.ttf'), - NotoFont('Noto Sans Javanese', 'notosansjavanese/v21/2V01KJkDAIA6Hp4zoSScDjV0Y-eoHAHT-Z3MngEefiidxJnkFFliZYWj4O8.ttf'), + NotoFont('Noto Sans Javanese', 'notosansjavanese/v23/2V01KJkDAIA6Hp4zoSScDjV0Y-eoHAHT-Z3MngEefiidxJnkFFliZYWj4O8.ttf'), NotoFont('Noto Sans KR', 'notosanskr/v36/PbyxFmXiEBPT4ITbgNA5Cgms3VYcOA-vvnIzzuoyeLTq8H4hfeE.ttf'), - NotoFont('Noto Sans Kaithi', 'notosanskaithi/v18/buEtppS9f8_vkXadMBJJu0tWjLwjQi0KdoZIKlo.ttf'), + NotoFont('Noto Sans Kaithi', 'notosanskaithi/v20/buEtppS9f8_vkXadMBJJu0tWjLwjQi0KdoZIKlo.ttf'), NotoFont('Noto Sans Kannada', 'notosanskannada/v26/8vIs7xs32H97qzQKnzfeXycxXZyUmySvZWItmf1fe6TVmgop9ndpS-BqHEyGrDvNzSIMLsPKrkY.ttf'), - NotoFont('Noto Sans Kayah Li', 'notosanskayahli/v20/B50nF61OpWTRcGrhOVJJwOMXdca6Yecki3E06x2jVTX3WCc3CZH4EXLuKVM.ttf'), + NotoFont('Noto Sans Kayah Li', 'notosanskayahli/v21/B50nF61OpWTRcGrhOVJJwOMXdca6Yecki3E06x2jVTX3WCc3CZH4EXLuKVM.ttf'), NotoFont('Noto Sans Kharoshthi', 'notosanskharoshthi/v16/Fh4qPiLjKS30-P4-pGMMXCCfvkc5Vd7KE5z4rFyx5mR1.ttf'), NotoFont('Noto Sans Khmer', 'notosanskhmer/v23/ijw3s5roRME5LLRxjsRb-gssOenAyendxrgV2c-Zw-9vbVUti_Z_dWgtWYuNAJz4kAbrddiA.ttf'), - NotoFont('Noto Sans Khojki', 'notosanskhojki/v16/-nFnOHM29Oofr2wohFbTuPPKVWpmK_d709jy92k.ttf'), - NotoFont('Noto Sans Khudawadi', 'notosanskhudawadi/v18/fdNi9t6ZsWBZ2k5ltHN73zZ5hc8HANlHIjRnVVXz9MY.ttf'), - NotoFont('Noto Sans Lao', 'notosanslao/v24/bx6lNx2Ol_ixgdYWLm9BwxM3NW6BOkuf763Clj73CiQ_J1Djx9pidOt4ccbdf5MK3riB2w.ttf'), - NotoFont('Noto Sans Lepcha', 'notosanslepcha/v16/0QI7MWlB_JWgA166SKhu05TekNS32AJstqBXgd4.ttf'), + NotoFont('Noto Sans Khojki', 'notosanskhojki/v18/-nFnOHM29Oofr2wohFbTuPPKVWpmK_d709jy92k.ttf'), + NotoFont('Noto Sans Khudawadi', 'notosanskhudawadi/v21/fdNi9t6ZsWBZ2k5ltHN73zZ5hc8HANlHIjRnVVXz9MY.ttf'), + NotoFont('Noto Sans Lao', 'notosanslao/v30/bx6lNx2Ol_ixgdYWLm9BwxM3NW6BOkuf763Clj73CiQ_J1Djx9pidOt4ccbdf5MK3riB2w.ttf'), + NotoFont('Noto Sans Lepcha', 'notosanslepcha/v19/0QI7MWlB_JWgA166SKhu05TekNS32AJstqBXgd4.ttf'), NotoFont('Noto Sans Limbu', 'notosanslimbu/v22/3JnlSDv90Gmq2mrzckOBBRRoNJVj0MF3OHRDnA.ttf'), NotoFont('Noto Sans Linear A', 'notosanslineara/v18/oPWS_l16kP4jCuhpgEGmwJOiA18FZj22zmHQAGQicw.ttf'), NotoFont('Noto Sans Linear B', 'notosanslinearb/v17/HhyJU4wt9vSgfHoORYOiXOckKNB737IV3BkFTq4EPw.ttf'), NotoFont('Noto Sans Lisu', 'notosanslisu/v25/uk-3EGO3o6EruUbnwovcYhz6kh57_nqbcTdjJnHP2Vwt29IlxkVdig.ttf'), NotoFont('Noto Sans Lycian', 'notosanslycian/v15/QldVNSNMqAsHtsJ7UmqxBQA9r8wA5_naCJwn00E.ttf'), NotoFont('Noto Sans Lydian', 'notosanslydian/v17/c4m71mVzGN7s8FmIukZJ1v4ZlcPReUPXMoIjEQI.ttf'), - NotoFont('Noto Sans Mahajani', 'notosansmahajani/v17/-F6sfiVqLzI2JPCgQBnw60Agp0JrvD5Fh8ARHNh4zg.ttf'), + NotoFont('Noto Sans Mahajani', 'notosansmahajani/v19/-F6sfiVqLzI2JPCgQBnw60Agp0JrvD5Fh8ARHNh4zg.ttf'), NotoFont('Noto Sans Malayalam', 'notosansmalayalam/v26/sJoi3K5XjsSdcnzn071rL37lpAOsUThnDZIfPdbeSNzVakglNM-Qw8EaeB8Nss-_RuD9BFzEr6HxEA.ttf'), NotoFont('Noto Sans Mandaic', 'notosansmandaic/v16/cIfnMbdWt1w_HgCcilqhKQBo_OsMI5_A_gMk0izH.ttf'), NotoFont('Noto Sans Manichaean', 'notosansmanichaean/v17/taiVGntiC4--qtsfi4Jp9-_GkPZZCcrfekqCNTtFCtdX.ttf'), @@ -82,30 +83,30 @@ List getFallbackFontList(bool useColorEmoji) => [ NotoFont('Noto Sans Masaram Gondi', 'notosansmasaramgondi/v17/6xK_dThFKcWIu4bpRBjRYRV7KZCbUq6n_1kPnuGe7RI9WSWX.ttf'), NotoFont('Noto Sans Math', 'notosansmath/v15/7Aump_cpkSecTWaHRlH2hyV5UHkG-V048PW0.ttf'), NotoFont('Noto Sans Mayan Numerals', 'notosansmayannumerals/v16/PlIuFk25O6RzLfvNNVSivR09_KqYMwvvDKYjfIiE68oo6eepYQ.ttf'), - NotoFont('Noto Sans Medefaidrin', 'notosansmedefaidrin/v22/WwkzxOq6Dk-wranENynkfeVsNbRZtbOIdLb1exeM4ZeuabBfmErWlT318e5A3rw.ttf'), - NotoFont('Noto Sans Meetei Mayek', 'notosansmeeteimayek/v14/HTxAL3QyKieByqY9eZPFweO0be7M21uSphSdhqILnmrRfJ8t_1TJ_vTW5PgeFYVa.ttf'), + NotoFont('Noto Sans Medefaidrin', 'notosansmedefaidrin/v23/WwkzxOq6Dk-wranENynkfeVsNbRZtbOIdLb1exeM4ZeuabBfmErWlT318e5A3rw.ttf'), + NotoFont('Noto Sans Meetei Mayek', 'notosansmeeteimayek/v15/HTxAL3QyKieByqY9eZPFweO0be7M21uSphSdhqILnmrRfJ8t_1TJ_vTW5PgeFYVa.ttf'), NotoFont('Noto Sans Meroitic', 'notosansmeroitic/v17/IFS5HfRJndhE3P4b5jnZ3ITPvC6i00UDgDhTiKY9KQ.ttf'), NotoFont('Noto Sans Miao', 'notosansmiao/v17/Dxxz8jmXMW75w3OmoDXVV4zyZUjgUYVslLhx.ttf'), - NotoFont('Noto Sans Modi', 'notosansmodi/v20/pe03MIySN5pO62Z5YkFyT7jeav5qWVAgVol-.ttf'), + NotoFont('Noto Sans Modi', 'notosansmodi/v23/pe03MIySN5pO62Z5YkFyT7jeav5qWVAgVol-.ttf'), NotoFont('Noto Sans Mongolian', 'notosansmongolian/v17/VdGCAYADGIwE0EopZx8xQfHlgEAMsrToxLsg6-av1x0.ttf'), NotoFont('Noto Sans Mro', 'notosansmro/v18/qWcsB6--pZv9TqnUQMhe9b39WDzRtjkho4M.ttf'), NotoFont('Noto Sans Multani', 'notosansmultani/v20/9Bty3ClF38_RfOpe1gCaZ8p30BOFO1A0pfCs5Kos.ttf'), NotoFont('Noto Sans Myanmar', 'notosansmyanmar/v20/AlZq_y1ZtY3ymOryg38hOCSdOnFq0En23OU4o1AC.ttf'), - NotoFont('Noto Sans NKo', 'notosansnko/v2/esDX31ZdNv-KYGGJpKGk2_RpMpCMHMLBrdA.ttf'), + NotoFont('Noto Sans NKo', 'notosansnko/v6/esDX31ZdNv-KYGGJpKGk2_RpMpCMHMLBrdA.ttf'), NotoFont('Noto Sans Nabataean', 'notosansnabataean/v16/IFS4HfVJndhE3P4b5jnZ34DfsjO330dNoBJ9hK8kMK4.ttf'), - NotoFont('Noto Sans New Tai Lue', 'notosansnewtailue/v20/H4cKBW-Pl9DZ0Xe_nHUapt7PovLXAhAnY7wqaLy-OJgU3p_pdeXAYUbghFPKzeY.ttf'), + NotoFont('Noto Sans New Tai Lue', 'notosansnewtailue/v22/H4cKBW-Pl9DZ0Xe_nHUapt7PovLXAhAnY7wqaLy-OJgU3p_pdeXAYUbghFPKzeY.ttf'), NotoFont('Noto Sans Newa', 'notosansnewa/v16/7r3fqXp6utEsO9pI4f8ok8sWg8n_qN4R5lNU.ttf'), NotoFont('Noto Sans Nushu', 'notosansnushu/v19/rnCw-xRQ3B7652emAbAe_Ai1IYaFWFAMArZKqQ.ttf'), NotoFont('Noto Sans Ogham', 'notosansogham/v17/kmKlZqk1GBDGN0mY6k5lmEmww4hrt5laQxcoCA.ttf'), - NotoFont('Noto Sans Ol Chiki', 'notosansolchiki/v21/N0b92TJNOPt-eHmFZCdQbrL32r-4CvhzDzRwlxOQYuVALWk267I6gVrz5gQ.ttf'), - NotoFont('Noto Sans Old Hungarian', 'notosansoldhungarian/v16/E213_cD6hP3GwCJPEUssHEM0KqLaHJXg2PiIgRfjbg5nCYXt.ttf'), + NotoFont('Noto Sans Ol Chiki', 'notosansolchiki/v29/N0b92TJNOPt-eHmFZCdQbrL32r-4CvhzDzRwlxOQYuVALWk267I6gVrz5gQ.ttf'), + NotoFont('Noto Sans Old Hungarian', 'notosansoldhungarian/v18/E213_cD6hP3GwCJPEUssHEM0KqLaHJXg2PiIgRfjbg5nCYXt.ttf'), NotoFont('Noto Sans Old Italic', 'notosansolditalic/v16/TuGOUUFzXI5FBtUq5a8bh68BJxxEVam7tWlRdRhtCC4d.ttf'), NotoFont('Noto Sans Old North Arabian', 'notosansoldnortharabian/v16/esDF30BdNv-KYGGJpKGk2tNiMt7Jar6olZDyNdr81zBQmUo_xw4ABw.ttf'), NotoFont('Noto Sans Old Permic', 'notosansoldpermic/v17/snf1s1q1-dF8pli1TesqcbUY4Mr-ElrwKLdXgv_dKYB5.ttf'), NotoFont('Noto Sans Old Persian', 'notosansoldpersian/v16/wEOjEAbNnc5caQTFG18FHrZr9Bp6-8CmIJ_tqOlQfx9CjA.ttf'), NotoFont('Noto Sans Old Sogdian', 'notosansoldsogdian/v16/3JnjSCH90Gmq2mrzckOBBhFhdrMst48aURt7neIqM-9uyg.ttf'), NotoFont('Noto Sans Old South Arabian', 'notosansoldsoutharabian/v16/3qT5oiOhnSyU8TNFIdhZTice3hB_HWKsEnF--0XCHiKx1OtDT9HwTA.ttf'), - NotoFont('Noto Sans Old Turkic', 'notosansoldturkic/v16/yMJNMJVya43H0SUF_WmcGEQVqoEMKDKbsE2RjEw-Vyws.ttf'), + NotoFont('Noto Sans Old Turkic', 'notosansoldturkic/v17/yMJNMJVya43H0SUF_WmcGEQVqoEMKDKbsE2RjEw-Vyws.ttf'), NotoFont('Noto Sans Oriya', 'notosansoriya/v27/AYCppXfzfccDCstK_hrjDyADv5e9748vhj3CJBLHIARtgD6TJQS0dJT5Ivj0f6_c6LhHBRe-.ttf'), NotoFont('Noto Sans Osage', 'notosansosage/v18/oPWX_kB6kP4jCuhpgEGmw4mtAVtXRlaSxkrMCQ.ttf'), NotoFont('Noto Sans Osmanya', 'notosansosmanya/v18/8vIS7xs32H97qzQKnzfeWzUyUpOJmz6kR47NCV5Z.ttf'), @@ -115,13 +116,13 @@ List getFallbackFontList(bool useColorEmoji) => [ NotoFont('Noto Sans Phags Pa', 'notosansphagspa/v15/pxiZyoo6v8ZYyWh5WuPeJzMkd4SrGChkqkSsrvNXiA.ttf'), NotoFont('Noto Sans Phoenician', 'notosansphoenician/v17/jizFRF9Ksm4Bt9PvcTaEkIHiTVtxmFtS5X7Jot-p5561.ttf'), NotoFont('Noto Sans Psalter Pahlavi', 'notosanspsalterpahlavi/v16/rP2Vp3K65FkAtHfwd-eISGznYihzggmsicPfud3w1G3KsUQBct4.ttf'), - NotoFont('Noto Sans Rejang', 'notosansrejang/v18/Ktk2AKuMeZjqPnXgyqrib7DIogqwN4O3WYZB_sU.ttf'), + NotoFont('Noto Sans Rejang', 'notosansrejang/v21/Ktk2AKuMeZjqPnXgyqrib7DIogqwN4O3WYZB_sU.ttf'), NotoFont('Noto Sans Runic', 'notosansrunic/v17/H4c_BXWPl9DZ0Xe_nHUaus7W68WWaxpvHtgIYg.ttf'), NotoFont('Noto Sans SC', 'notosanssc/v36/k3kCo84MPvpLmixcA63oeAL7Iqp5IZJF9bmaG9_FnYxNbPzS5HE.ttf'), - NotoFont('Noto Sans Saurashtra', 'notosanssaurashtra/v19/ea8GacQ0Wfz_XKWXe6OtoA8w8zvmYwTef9ndjhPTSIx9.ttf'), + NotoFont('Noto Sans Saurashtra', 'notosanssaurashtra/v23/ea8GacQ0Wfz_XKWXe6OtoA8w8zvmYwTef9ndjhPTSIx9.ttf'), NotoFont('Noto Sans Sharada', 'notosanssharada/v16/gok0H7rwAEdtF9N8-mdTGALG6p0kwoXLPOwr4H8a.ttf'), NotoFont('Noto Sans Shavian', 'notosansshavian/v17/CHy5V_HZE0jxJBQlqAeCKjJvQBNF4EFQSplv2Cwg.ttf'), - NotoFont('Noto Sans Siddham', 'notosanssiddham/v17/OZpZg-FwqiNLe9PELUikxTWDoCCeGqndk3Ic92ZH.ttf'), + NotoFont('Noto Sans Siddham', 'notosanssiddham/v20/OZpZg-FwqiNLe9PELUikxTWDoCCeGqndk3Ic92ZH.ttf'), NotoFont('Noto Sans Sinhala', 'notosanssinhala/v26/yMJ2MJBya43H0SUF_WmcBEEf4rQVO2P524V5N_MxQzQtb-tf5dJbC30Fu9zUwg2a5lgLpJwbQRM.ttf'), NotoFont('Noto Sans Sogdian', 'notosanssogdian/v16/taiQGn5iC4--qtsfi4Jp6eHPnfxQBo--Pm6KHidM.ttf'), NotoFont('Noto Sans Sora Sompeng', 'notosanssorasompeng/v24/PlIRFkO5O6RzLfvNNVSioxM2_OTrEhPyDLolKvCsHzCxWuGkYHR818DpZXJQd4Mu.ttf'), @@ -130,705 +131,705 @@ List getFallbackFontList(bool useColorEmoji) => [ NotoFont('Noto Sans Syloti Nagri', 'notosanssylotinagri/v20/uU9eCAQZ75uhfF9UoWDRiY3q7Sf_VFV3m4dGFVfxN87gsj0.ttf'), NotoFont('Noto Sans Syriac', 'notosanssyriac/v16/Ktk7AKuMeZjqPnXgyqribqzQqgW0LYiVqV7dXcP0C-VD9MaJyZfUL_FC.ttf'), NotoFont('Noto Sans TC', 'notosanstc/v35/-nFuOG829Oofr2wohFbTp9ifNAn722rq0MXz76Cy_CpOtma3uNQ.ttf'), - NotoFont('Noto Sans Tagalog', 'notosanstagalog/v18/J7aFnoNzCnFcV9ZI-sUYuvote1R0wwEAA8jHexnL.ttf'), + NotoFont('Noto Sans Tagalog', 'notosanstagalog/v22/J7aFnoNzCnFcV9ZI-sUYuvote1R0wwEAA8jHexnL.ttf'), NotoFont('Noto Sans Tagbanwa', 'notosanstagbanwa/v18/Y4GWYbB8VTEp4t3MKJSMmQdIKjRtt_nZRjQEaYpGoQ.ttf'), NotoFont('Noto Sans Tai Le', 'notosanstaile/v17/vEFK2-VODB8RrNDvZSUmVxEATwR58tK1W77HtMo.ttf'), - NotoFont('Noto Sans Tai Tham', 'notosanstaitham/v19/kJEbBv0U4hgtwxDUw2x9q7tbjLIfbPGHBoaVSAZ3MdLJBCUbPgquyaRGKMw.ttf'), - NotoFont('Noto Sans Tai Viet', 'notosanstaiviet/v16/8QIUdj3HhN_lv4jf9vsE-9GMOLsaSPZr644fWsRO9w.ttf'), + NotoFont('Noto Sans Tai Tham', 'notosanstaitham/v20/kJEbBv0U4hgtwxDUw2x9q7tbjLIfbPGHBoaVSAZ3MdLJBCUbPgquyaRGKMw.ttf'), + NotoFont('Noto Sans Tai Viet', 'notosanstaiviet/v19/8QIUdj3HhN_lv4jf9vsE-9GMOLsaSPZr644fWsRO9w.ttf'), NotoFont('Noto Sans Takri', 'notosanstakri/v23/TuGJUVpzXI5FBtUq5a8bnKIOdTwQNO_W3khJXg.ttf'), NotoFont('Noto Sans Tamil', 'notosanstamil/v27/ieVc2YdFI3GCY6SyQy1KfStzYKZgzN1z4LKDbeZce-0429tBManUktuex7vGo70RqKDt_EvT.ttf'), NotoFont('Noto Sans Tamil Supplement', 'notosanstamilsupplement/v21/DdTz78kEtnooLS5rXF1DaruiCd_bFp_Ph4sGcn7ax_vsAeMkeq1x.ttf'), NotoFont('Noto Sans Telugu', 'notosanstelugu/v25/0FlxVOGZlE2Rrtr-HmgkMWJNjJ5_RyT8o8c7fHkeg-esVC5dzHkHIJQqrEntezbqQUbf-3v37w.ttf'), NotoFont('Noto Sans Thaana', 'notosansthaana/v23/C8c14dM-vnz-s-3jaEsxlxHkBH-WZOETXfoQrfQ9Y4XrbhLhnu4-tbNu.ttf'), NotoFont('Noto Sans Thai', 'notosansthai/v20/iJWnBXeUZi_OHPqn4wq6hQ2_hbJ1xyN9wd43SofNWcd1MKVQt_So_9CdU5RtpzF-QRvzzXg.ttf'), - NotoFont('Noto Sans Tifinagh', 'notosanstifinagh/v17/I_uzMoCduATTei9eI8dawkHIwvmhCvbn6rnEcXfs4Q.ttf'), + NotoFont('Noto Sans Tifinagh', 'notosanstifinagh/v20/I_uzMoCduATTei9eI8dawkHIwvmhCvbn6rnEcXfs4Q.ttf'), NotoFont('Noto Sans Tirhuta', 'notosanstirhuta/v16/t5t6IQYRNJ6TWjahPR6X-M-apUyby7uGUBsTrn5P.ttf'), NotoFont('Noto Sans Ugaritic', 'notosansugaritic/v16/3qTwoiqhnSyU8TNFIdhZVCwbjCpkAXXkMhoIkiazfg.ttf'), NotoFont('Noto Sans Vai', 'notosansvai/v17/NaPecZTSBuhTirw6IaFn_UrURMTsDIRSfr0.ttf'), NotoFont('Noto Sans Wancho', 'notosanswancho/v17/zrf-0GXXyfn6Fs0lH9P4cUubP0GBqAPopiRfKp8.ttf'), NotoFont('Noto Sans Warang Citi', 'notosanswarangciti/v17/EYqtmb9SzL1YtsZSScyKDXIeOv3w-zgsNvKRpeVCCXzdgA.ttf'), NotoFont('Noto Sans Yi', 'notosansyi/v19/sJoD3LFXjsSdcnzn071rO3apxVDJNVgSNg.ttf'), - NotoFont('Noto Sans Zanabazar Square', 'notosanszanabazarsquare/v16/Cn-jJsuGWQxOjaGwMQ6fOicyxLBEMRfDtkzl4uagQtJxOCEgN0Gc.ttf'), + NotoFont('Noto Sans Zanabazar Square', 'notosanszanabazarsquare/v19/Cn-jJsuGWQxOjaGwMQ6fOicyxLBEMRfDtkzl4uagQtJxOCEgN0Gc.ttf'), ]; -// 313 unique sets of fonts containing 3816 font references encoded in 4439 characters +// 315 unique sets of fonts containing 3642 font references encoded in 4273 characters const String encodedFontSets = - // #0: 5 fonts: HK₄₁, JP₄₉, KR₅₁, SC₁₁₀, TC₁₂₂. - '1phb2gl,' - // #1: 3 fonts: HK₄₁, SC₁₁₀, TC₁₂₂. - '1p2ql,' - // #2: 4 fonts: HK₄₁, JP₄₉, SC₁₁₀, TC₁₂₂. - '1ph2il,' - // #3: 1 font: SC₁₁₀. - '4g,' + // #0: 5 fonts: HK₄₂, JP₅₀, KR₅₂, SC₁₁₁, TC₁₂₃. + '1qhb2gl,' + // #1: 3 fonts: HK₄₂, SC₁₁₁, TC₁₂₃. + '1q2ql,' + // #2: 4 fonts: HK₄₂, JP₅₀, SC₁₁₁, TC₁₂₃. + '1qh2il,' + // #3: 1 font: SC₁₁₁. + '4h,' // #4: 0 fonts. ',' - // #5: 2 fonts: JP₄₉, SC₁₁₀. - '1x2i,' - // #6: 2 fonts: HK₄₁, TC₁₂₂. - '1p3c,' - // #7: 1 font: JP₄₉. - '1x,' - // #8: 4 fonts: HK₄₁, KR₅₁, SC₁₁₀, TC₁₂₂. - '1pj2gl,' - // #9: 3 fonts: JP₄₉, KR₅₁, SC₁₁₀. - '1xb2g,' - // #10: 2 fonts: KR₅₁, SC₁₁₀. - '1z2g,' + // #5: 2 fonts: JP₅₀, SC₁₁₁. + '1y2i,' + // #6: 2 fonts: HK₄₂, TC₁₂₃. + '1q3c,' + // #7: 1 font: JP₅₀. + '1y,' + // #8: 4 fonts: HK₄₂, KR₅₂, SC₁₁₁, TC₁₂₃. + '1qj2gl,' + // #9: 3 fonts: JP₅₀, KR₅₂, SC₁₁₁. + '1yb2g,' + // #10: 2 fonts: KR₅₂, SC₁₁₁. + '2a2g,' // #11: 1 font: Noto Sans₀. 'a,' - // #12: 1 font: Symbols 2₄. - 'e,' - // #13: 3 fonts: Noto Color Emoji₁, Noto Emoji₂, Symbols 2₄. - 'bab,' - // #14: 1 font: Math₇₃. - '2v,' + // #12: 1 font: Symbols 2₅. + 'f,' + // #13: 3 fonts: Noto Color Emoji₁, Noto Emoji₂, Symbols 2₅. + 'bac,' + // #14: 1 font: Math₇₄. + '2w,' // #15: 2 fonts: Noto Color Emoji₁, Noto Emoji₂. 'ba,' - // #16: 2 fonts: JP₄₉, KR₅₁. - '1xb,' - // #17: 1 font: KR₅₁. - '1z,' - // #18: 6 fonts: Noto Sans₀, HK₄₁, JP₄₉, KR₅₁, SC₁₁₀, TC₁₂₂. - 'a1ohb2gl,' - // #19: 1 font: Symbols₃. - 'd,' - // #20: 6 fonts: HK₄₁, JP₄₉, KR₅₁, Math₇₃, SC₁₁₀, TC₁₂₂. - '1phbv1kl,' - // #21: 128 fonts: Noto Sans₀, Symbols₃, Symbols 2₄, Adlam₅, Anatolian Hieroglyphs₆, Armenian₈, Avestan₉, Balinese₁₀, Bamum₁₁, Bassa Vah₁₂, Batak₁₃, Bengali₁₄, Brahmi₁₆, Buginese₁₇, Buhid₁₈, Canadian Aboriginal₁₉, Carian₂₀, Chakma₂₂, Cham₂₃, Cherokee₂₄, Coptic₂₅, Cuneiform₂₆, Deseret₂₈, Devanagari₂₉, Duployan₃₀, Egyptian Hieroglyphs₃₁, Elbasan₃₂, Georgian₃₄, Glagolitic₃₅, Gothic₃₆, Grantha₃₇, Gujarati₃₈, Gurmukhi₄₀, HK₄₁, Hanunoo₄₂, Hatran₄₃, Hebrew₄₄, Imperial Aramaic₄₅, Indic Siyaq Numbers₄₆, Inscriptional Pahlavi₄₇, Inscriptional Parthian₄₈, JP₄₉, Javanese₅₀, KR₅₁, Kaithi₅₂, Kannada₅₃, Kayah Li₅₄, Kharoshthi₅₅, Khmer₅₆, Khojki₅₇, Khudawadi₅₈, Lao₅₉, Lepcha₆₀, Limbu₆₁, Linear A₆₂, Linear B₆₃, Lisu₆₄, Lydian₆₆, Mahajani₆₇, Malayalam₆₈, Mandaic₆₉, Manichaean₇₀, Marchen₇₁, Masaram Gondi₇₂, Mayan Numerals₇₄, Medefaidrin₇₅, Meetei Mayek₇₆, Meroitic₇₇, Miao₇₈, Modi₇₉, Mongolian₈₀, Mro₈₁, Multani₈₂, NKo₈₄, Nabataean₈₅, New Tai Lue₈₆, Newa₈₇, Nushu₈₈, Ogham₈₉, Ol Chiki₉₀, Old Italic₉₂, Old North Arabian₉₃, Old Permic₉₄, Old Persian₉₅, Old Sogdian₉₆, Old South Arabian₉₇, Oriya₉₉, Osage₁₀₀, Osmanya₁₀₁, Pahawh Hmong₁₀₂, Palmyrene₁₀₃, Pau Cin Hau₁₀₄, Phoenician₁₀₆, Psalter Pahlavi₁₀₇, Rejang₁₀₈, Runic₁₀₉, SC₁₁₀, Saurashtra₁₁₁, Sharada₁₁₂, Shavian₁₁₃, Siddham₁₁₄, Sinhala₁₁₅, Sogdian₁₁₆, Sora Sompeng₁₁₇, Soyombo₁₁₈, Sundanese₁₁₉, Syloti Nagri₁₂₀, Syriac₁₂₁, TC₁₂₂, Tagalog₁₂₃, Tagbanwa₁₂₄, Tai Le₁₂₅, Tai Tham₁₂₆, Tai Viet₁₂₇, Takri₁₂₈, Tamil₁₂₉, Tamil Supplement₁₃₀, Telugu₁₃₁, Thaana₁₃₂, Thai₁₃₃, Tifinagh₁₃₄, Tirhuta₁₃₅, Ugaritic₁₃₆, Vai₁₃₇, Wancho₁₃₈, Warang Citi₁₃₉, Yi₁₄₀, Zanabazar Square₁₄₁. - 'acaaabaaaaaabaaaabaaaabaaaabaaaabaaaaaaaaaaaaaaaaaaaaaaaabaaaaaabaaaaaaaabaaaaaabaaaaabaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,' - // #22: 6 fonts: Symbols 2₄, HK₄₁, JP₄₉, KR₅₁, SC₁₁₀, TC₁₂₂. - 'e1khb2gl,' - // #23: 3 fonts: HK₄₁, JP₄₉, TC₁₂₂. - '1ph2u,' - // #24: 123 fonts: Noto Sans₀, Symbols₃, Symbols 2₄, Adlam₅, Anatolian Hieroglyphs₆, Armenian₈, Avestan₉, Balinese₁₀, Bamum₁₁, Bassa Vah₁₂, Batak₁₃, Bengali₁₄, Brahmi₁₆, Buginese₁₇, Buhid₁₈, Canadian Aboriginal₁₉, Carian₂₀, Chakma₂₂, Cham₂₃, Cherokee₂₄, Coptic₂₅, Cuneiform₂₆, Deseret₂₈, Devanagari₂₉, Duployan₃₀, Egyptian Hieroglyphs₃₁, Elbasan₃₂, Georgian₃₄, Glagolitic₃₅, Gothic₃₆, Grantha₃₇, Gujarati₃₈, Gurmukhi₄₀, Hanunoo₄₂, Hatran₄₃, Hebrew₄₄, Imperial Aramaic₄₅, Indic Siyaq Numbers₄₆, Inscriptional Pahlavi₄₇, Inscriptional Parthian₄₈, Javanese₅₀, Kaithi₅₂, Kannada₅₃, Kayah Li₅₄, Kharoshthi₅₅, Khmer₅₆, Khojki₅₇, Khudawadi₅₈, Lao₅₉, Lepcha₆₀, Limbu₆₁, Linear A₆₂, Linear B₆₃, Lisu₆₄, Lydian₆₆, Mahajani₆₇, Malayalam₆₈, Mandaic₆₉, Manichaean₇₀, Marchen₇₁, Masaram Gondi₇₂, Mayan Numerals₇₄, Medefaidrin₇₅, Meetei Mayek₇₆, Meroitic₇₇, Miao₇₈, Modi₇₉, Mongolian₈₀, Mro₈₁, Multani₈₂, NKo₈₄, Nabataean₈₅, New Tai Lue₈₆, Newa₈₇, Nushu₈₈, Ogham₈₉, Ol Chiki₉₀, Old Italic₉₂, Old North Arabian₉₃, Old Permic₉₄, Old Persian₉₅, Old Sogdian₉₆, Old South Arabian₉₇, Oriya₉₉, Osage₁₀₀, Osmanya₁₀₁, Pahawh Hmong₁₀₂, Palmyrene₁₀₃, Pau Cin Hau₁₀₄, Phoenician₁₀₆, Psalter Pahlavi₁₀₇, Rejang₁₀₈, Runic₁₀₉, Saurashtra₁₁₁, Sharada₁₁₂, Shavian₁₁₃, Siddham₁₁₄, Sinhala₁₁₅, Sogdian₁₁₆, Sora Sompeng₁₁₇, Soyombo₁₁₈, Sundanese₁₁₉, Syloti Nagri₁₂₀, Syriac₁₂₁, Tagalog₁₂₃, Tagbanwa₁₂₄, Tai Le₁₂₅, Tai Tham₁₂₆, Tai Viet₁₂₇, Takri₁₂₈, Tamil₁₂₉, Tamil Supplement₁₃₀, Telugu₁₃₁, Thaana₁₃₂, Thai₁₃₃, Tifinagh₁₃₄, Tirhuta₁₃₅, Ugaritic₁₃₆, Vai₁₃₇, Wancho₁₃₈, Warang Citi₁₃₉, Yi₁₄₀, Zanabazar Square₁₄₁. - 'acaaabaaaaaabaaaabaaaabaaaabaaaabbaaaaaabbaaaaaaaaaaaabaaaaaabaaaaaaaabaaaaaabaaaaabaaaaabaaabaaaaaaaaaabaaaaaaaaaaaaaaaaaa,' - // #25: 1 font: Arabic₇. - 'h,' - // #26: 6 fonts: Symbols₃, HK₄₁, JP₄₉, KR₅₁, SC₁₁₀, TC₁₂₂. - 'd1lhb2gl,' - // #27: 2 fonts: Noto Sans₀, Math₇₃. - 'a2u,' - // #28: 3 fonts: Noto Color Emoji₁, Noto Emoji₂, Symbols₃. - 'baa,' - // #29: 1 font: Lao₅₉. - '2h,' - // #30: 1 font: Tamil₁₂₉. - '4z,' - // #31: 1 font: Bengali₁₄. - 'o,' - // #32: 1 font: Grantha₃₇. - '1l,' - // #33: 1 font: Gurmukhi₄₀. - '1o,' - // #34: 8 fonts: Noto Color Emoji₁, Noto Emoji₂, Symbols 2₄, HK₄₁, JP₄₉, KR₅₁, SC₁₁₀, TC₁₂₂. - 'bab1khb2gl,' - // #35: 2 fonts: Noto Sans₀, Devanagari₂₉. - 'a1c,' - // #36: 1 font: Gujarati₃₈. - '1m,' - // #37: 1 font: Oriya₉₉. - '3v,' - // #38: 1 font: Kannada₅₃. - '2b,' - // #39: 1 font: Sinhala₁₁₅. - '4l,' - // #40: 2 fonts: Noto Sans₀, Coptic₂₅. - 'ay,' - // #41: 1 font: Telugu₁₃₁. - '5b,' - // #42: 129 fonts: Noto Sans₀, Symbols₃, Symbols 2₄, Adlam₅, Anatolian Hieroglyphs₆, Armenian₈, Avestan₉, Balinese₁₀, Bamum₁₁, Bassa Vah₁₂, Batak₁₃, Bengali₁₄, Brahmi₁₆, Buginese₁₇, Buhid₁₈, Canadian Aboriginal₁₉, Carian₂₀, Chakma₂₂, Cham₂₃, Cherokee₂₄, Coptic₂₅, Cuneiform₂₆, Deseret₂₈, Devanagari₂₉, Duployan₃₀, Egyptian Hieroglyphs₃₁, Elbasan₃₂, Georgian₃₄, Glagolitic₃₅, Gothic₃₆, Grantha₃₇, Gujarati₃₈, Gurmukhi₄₀, HK₄₁, Hanunoo₄₂, Hatran₄₃, Hebrew₄₄, Imperial Aramaic₄₅, Indic Siyaq Numbers₄₆, Inscriptional Pahlavi₄₇, Inscriptional Parthian₄₈, JP₄₉, Javanese₅₀, KR₅₁, Kaithi₅₂, Kannada₅₃, Kayah Li₅₄, Kharoshthi₅₅, Khmer₅₆, Khojki₅₇, Khudawadi₅₈, Lao₅₉, Lepcha₆₀, Limbu₆₁, Linear A₆₂, Linear B₆₃, Lisu₆₄, Lydian₆₆, Mahajani₆₇, Malayalam₆₈, Mandaic₆₉, Manichaean₇₀, Marchen₇₁, Masaram Gondi₇₂, Math₇₃, Mayan Numerals₇₄, Medefaidrin₇₅, Meetei Mayek₇₆, Meroitic₇₇, Miao₇₈, Modi₇₉, Mongolian₈₀, Mro₈₁, Multani₈₂, NKo₈₄, Nabataean₈₅, New Tai Lue₈₆, Newa₈₇, Nushu₈₈, Ogham₈₉, Ol Chiki₉₀, Old Italic₉₂, Old North Arabian₉₃, Old Permic₉₄, Old Persian₉₅, Old Sogdian₉₆, Old South Arabian₉₇, Oriya₉₉, Osage₁₀₀, Osmanya₁₀₁, Pahawh Hmong₁₀₂, Palmyrene₁₀₃, Pau Cin Hau₁₀₄, Phoenician₁₀₆, Psalter Pahlavi₁₀₇, Rejang₁₀₈, Runic₁₀₉, SC₁₁₀, Saurashtra₁₁₁, Sharada₁₁₂, Shavian₁₁₃, Siddham₁₁₄, Sinhala₁₁₅, Sogdian₁₁₆, Sora Sompeng₁₁₇, Soyombo₁₁₈, Sundanese₁₁₉, Syloti Nagri₁₂₀, Syriac₁₂₁, TC₁₂₂, Tagalog₁₂₃, Tagbanwa₁₂₄, Tai Le₁₂₅, Tai Tham₁₂₆, Tai Viet₁₂₇, Takri₁₂₈, Tamil₁₂₉, Tamil Supplement₁₃₀, Telugu₁₃₁, Thaana₁₃₂, Thai₁₃₃, Tifinagh₁₃₄, Tirhuta₁₃₅, Ugaritic₁₃₆, Vai₁₃₇, Wancho₁₃₈, Warang Citi₁₃₉, Yi₁₄₀, Zanabazar Square₁₄₁. - 'acaaabaaaaaabaaaabaaaabaaaabaaaabaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaabaaaaaabaaaaabaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,' - // #43: 7 fonts: Noto Color Emoji₁, Noto Emoji₂, HK₄₁, JP₄₉, KR₅₁, SC₁₁₀, TC₁₂₂. - 'ba1mhb2gl,' - // #44: 1 font: Georgian₃₄. - '1i,' - // #45: 4 fonts: HK₄₁, JP₄₉, KR₅₁, TC₁₂₂. - '1phb2s,' - // #46: 1 font: Hebrew₄₄. - '1s,' - // #47: 130 fonts: Noto Sans₀, Symbols₃, Symbols 2₄, Adlam₅, Anatolian Hieroglyphs₆, Armenian₈, Avestan₉, Balinese₁₀, Bamum₁₁, Bassa Vah₁₂, Batak₁₃, Bengali₁₄, Brahmi₁₆, Buginese₁₇, Buhid₁₈, Canadian Aboriginal₁₉, Carian₂₀, Chakma₂₂, Cham₂₃, Cherokee₂₄, Coptic₂₅, Cuneiform₂₆, Deseret₂₈, Devanagari₂₉, Duployan₃₀, Egyptian Hieroglyphs₃₁, Elbasan₃₂, Georgian₃₄, Glagolitic₃₅, Gothic₃₆, Grantha₃₇, Gujarati₃₈, Gunjala Gondi₃₉, Gurmukhi₄₀, HK₄₁, Hanunoo₄₂, Hatran₄₃, Hebrew₄₄, Imperial Aramaic₄₅, Indic Siyaq Numbers₄₆, Inscriptional Pahlavi₄₇, Inscriptional Parthian₄₈, JP₄₉, Javanese₅₀, KR₅₁, Kaithi₅₂, Kannada₅₃, Kayah Li₅₄, Kharoshthi₅₅, Khmer₅₆, Khojki₅₇, Khudawadi₅₈, Lao₅₉, Lepcha₆₀, Limbu₆₁, Linear A₆₂, Linear B₆₃, Lisu₆₄, Lydian₆₆, Mahajani₆₇, Malayalam₆₈, Mandaic₆₉, Manichaean₇₀, Marchen₇₁, Masaram Gondi₇₂, Math₇₃, Mayan Numerals₇₄, Medefaidrin₇₅, Meetei Mayek₇₆, Meroitic₇₇, Miao₇₈, Modi₇₉, Mongolian₈₀, Mro₈₁, Multani₈₂, NKo₈₄, Nabataean₈₅, New Tai Lue₈₆, Newa₈₇, Nushu₈₈, Ogham₈₉, Ol Chiki₉₀, Old Italic₉₂, Old North Arabian₉₃, Old Permic₉₄, Old Persian₉₅, Old Sogdian₉₆, Old South Arabian₉₇, Oriya₉₉, Osage₁₀₀, Osmanya₁₀₁, Pahawh Hmong₁₀₂, Palmyrene₁₀₃, Pau Cin Hau₁₀₄, Phoenician₁₀₆, Psalter Pahlavi₁₀₇, Rejang₁₀₈, Runic₁₀₉, SC₁₁₀, Saurashtra₁₁₁, Sharada₁₁₂, Shavian₁₁₃, Siddham₁₁₄, Sinhala₁₁₅, Sogdian₁₁₆, Sora Sompeng₁₁₇, Soyombo₁₁₈, Sundanese₁₁₉, Syloti Nagri₁₂₀, Syriac₁₂₁, TC₁₂₂, Tagalog₁₂₃, Tagbanwa₁₂₄, Tai Le₁₂₅, Tai Tham₁₂₆, Tai Viet₁₂₇, Takri₁₂₈, Tamil₁₂₉, Tamil Supplement₁₃₀, Telugu₁₃₁, Thaana₁₃₂, Thai₁₃₃, Tifinagh₁₃₄, Tirhuta₁₃₅, Ugaritic₁₃₆, Vai₁₃₇, Wancho₁₃₈, Warang Citi₁₃₉, Yi₁₄₀, Zanabazar Square₁₄₁. - 'acaaabaaaaaabaaaabaaaabaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaabaaaaaabaaaaabaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,' - // #48: 7 fonts: Noto Sans₀, HK₄₁, JP₄₉, KR₅₁, Math₇₃, SC₁₁₀, TC₁₂₂. - 'a1ohbv1kl,' - // #49: 8 fonts: Noto Color Emoji₁, Noto Emoji₂, Symbols₃, HK₄₁, JP₄₉, KR₅₁, SC₁₁₀, TC₁₂₂. - 'baa1lhb2gl,' - // #50: 4 fonts: HK₄₁, JP₄₉, KR₅₁, SC₁₁₀. - '1phb2g,' - // #51: 1 font: Kharoshthi₅₅. - '2d,' - // #52: 1 font: Linear B₆₃. - '2l,' - // #53: 3 fonts: Noto Sans₀, Bengali₁₄, Devanagari₂₉. - 'ano,' - // #54: 7 fonts: Symbols 2₄, HK₄₁, JP₄₉, KR₅₁, Math₇₃, SC₁₁₀, TC₁₂₂. - 'e1khbv1kl,' - // #55: 1 font: Glagolitic₃₅. - '1j,' - // #56: 3 fonts: HK₄₁, KR₅₁, TC₁₂₂. - '1pj2s,' - // #57: 1 font: Malayalam₆₈. - '2q,' - // #58: 1 font: Masaram Gondi₇₂. - '2u,' - // #59: 1 font: Mongolian₈₀. - '3c,' - // #60: 2 fonts: Symbols₃, Math₇₃. - 'd2r,' - // #61: 1 font: Cypriot₂₇. - '1b,' - // #62: 2 fonts: Grantha₃₇, Tamil₁₂₉. - '1l3n,' - // #63: 1 font: Gunjala Gondi₃₉. - '1n,' - // #64: 7 fonts: HK₄₁, JP₄₉, KR₅₁, New Tai Lue₈₆, SC₁₁₀, TC₁₂₂, Yi₁₄₀. - '1phb1ixlr,' - // #65: 2 fonts: Noto Sans₀, Duployan₃₀. - 'a1d,' - // #66: 2 fonts: Symbols 2₄, Math₇₃. - 'e2q,' - // #67: 1 font: Armenian₈. + // #16: 2 fonts: JP₅₀, KR₅₂. + '1yb,' + // #17: 1 font: KR₅₂. + '2a,' + // #18: 6 fonts: Noto Sans₀, HK₄₂, JP₅₀, KR₅₂, SC₁₁₁, TC₁₂₃. + 'a1phb2gl,' + // #19: 1 font: Symbols₄. + 'e,' + // #20: 6 fonts: HK₄₂, JP₅₀, KR₅₂, Math₇₄, SC₁₁₁, TC₁₂₃. + '1qhbv1kl,' + // #21: 133 fonts: Noto Sans₀, Noto Music₃, Symbols₄, Symbols 2₅, Adlam₆, Anatolian Hieroglyphs₇, Armenian₉, Avestan₁₀, Balinese₁₁, Bamum₁₂, Bassa Vah₁₃, Batak₁₄, Bengali₁₅, Bhaiksuki₁₆, Brahmi₁₇, Buginese₁₈, Buhid₁₉, Canadian Aboriginal₂₀, Carian₂₁, Chakma₂₃, Cham₂₄, Cherokee₂₅, Coptic₂₆, Cuneiform₂₇, Deseret₂₉, Devanagari₃₀, Duployan₃₁, Egyptian Hieroglyphs₃₂, Elbasan₃₃, Georgian₃₅, Glagolitic₃₆, Gothic₃₇, Grantha₃₈, Gujarati₃₉, Gunjala Gondi₄₀, Gurmukhi₄₁, HK₄₂, Hanunoo₄₃, Hatran₄₄, Hebrew₄₅, Imperial Aramaic₄₆, Indic Siyaq Numbers₄₇, Inscriptional Pahlavi₄₈, Inscriptional Parthian₄₉, JP₅₀, Javanese₅₁, KR₅₂, Kaithi₅₃, Kannada₅₄, Kayah Li₅₅, Kharoshthi₅₆, Khmer₅₇, Khojki₅₈, Khudawadi₅₉, Lao₆₀, Lepcha₆₁, Limbu₆₂, Linear A₆₃, Linear B₆₄, Lisu₆₅, Lydian₆₇, Mahajani₆₈, Malayalam₆₉, Mandaic₇₀, Manichaean₇₁, Marchen₇₂, Masaram Gondi₇₃, Mayan Numerals₇₅, Medefaidrin₇₆, Meetei Mayek₇₇, Meroitic₇₈, Miao₇₉, Modi₈₀, Mongolian₈₁, Mro₈₂, Multani₈₃, NKo₈₅, Nabataean₈₆, New Tai Lue₈₇, Newa₈₈, Nushu₈₉, Ogham₉₀, Ol Chiki₉₁, Old Hungarian₉₂, Old Italic₉₃, Old North Arabian₉₄, Old Permic₉₅, Old Persian₉₆, Old Sogdian₉₇, Old South Arabian₉₈, Old Turkic₉₉, Oriya₁₀₀, Osage₁₀₁, Osmanya₁₀₂, Pahawh Hmong₁₀₃, Palmyrene₁₀₄, Pau Cin Hau₁₀₅, Phoenician₁₀₇, Psalter Pahlavi₁₀₈, Rejang₁₀₉, Runic₁₁₀, SC₁₁₁, Saurashtra₁₁₂, Sharada₁₁₃, Shavian₁₁₄, Siddham₁₁₅, Sinhala₁₁₆, Sogdian₁₁₇, Sora Sompeng₁₁₈, Soyombo₁₁₉, Sundanese₁₂₀, Syloti Nagri₁₂₁, Syriac₁₂₂, TC₁₂₃, Tagalog₁₂₄, Tagbanwa₁₂₅, Tai Le₁₂₆, Tai Tham₁₂₇, Tai Viet₁₂₈, Takri₁₂₉, Tamil₁₃₀, Tamil Supplement₁₃₁, Telugu₁₃₂, Thaana₁₃₃, Thai₁₃₄, Tifinagh₁₃₅, Tirhuta₁₃₆, Ugaritic₁₃₇, Vai₁₃₈, Wancho₁₃₉, Warang Citi₁₄₀, Yi₁₄₁, Zanabazar Square₁₄₂. + 'acaaaabaaaaaaaaaaaabaaaabaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaabaaaaaaaabaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,' + // #22: 6 fonts: Symbols 2₅, HK₄₂, JP₅₀, KR₅₂, SC₁₁₁, TC₁₂₃. + 'f1khb2gl,' + // #23: 3 fonts: HK₄₂, JP₅₀, TC₁₂₃. + '1qh2u,' + // #24: 128 fonts: Noto Sans₀, Noto Music₃, Symbols₄, Symbols 2₅, Adlam₆, Anatolian Hieroglyphs₇, Armenian₉, Avestan₁₀, Balinese₁₁, Bamum₁₂, Bassa Vah₁₃, Batak₁₄, Bengali₁₅, Bhaiksuki₁₆, Brahmi₁₇, Buginese₁₈, Buhid₁₉, Canadian Aboriginal₂₀, Carian₂₁, Chakma₂₃, Cham₂₄, Cherokee₂₅, Coptic₂₆, Cuneiform₂₇, Deseret₂₉, Devanagari₃₀, Duployan₃₁, Egyptian Hieroglyphs₃₂, Elbasan₃₃, Georgian₃₅, Glagolitic₃₆, Gothic₃₇, Grantha₃₈, Gujarati₃₉, Gunjala Gondi₄₀, Gurmukhi₄₁, Hanunoo₄₃, Hatran₄₄, Hebrew₄₅, Imperial Aramaic₄₆, Indic Siyaq Numbers₄₇, Inscriptional Pahlavi₄₈, Inscriptional Parthian₄₉, Javanese₅₁, Kaithi₅₃, Kannada₅₄, Kayah Li₅₅, Kharoshthi₅₆, Khmer₅₇, Khojki₅₈, Khudawadi₅₉, Lao₆₀, Lepcha₆₁, Limbu₆₂, Linear A₆₃, Linear B₆₄, Lisu₆₅, Lydian₆₇, Mahajani₆₈, Malayalam₆₉, Mandaic₇₀, Manichaean₇₁, Marchen₇₂, Masaram Gondi₇₃, Mayan Numerals₇₅, Medefaidrin₇₆, Meetei Mayek₇₇, Meroitic₇₈, Miao₇₉, Modi₈₀, Mongolian₈₁, Mro₈₂, Multani₈₃, NKo₈₅, Nabataean₈₆, New Tai Lue₈₇, Newa₈₈, Nushu₈₉, Ogham₉₀, Ol Chiki₉₁, Old Hungarian₉₂, Old Italic₉₃, Old North Arabian₉₄, Old Permic₉₅, Old Persian₉₆, Old Sogdian₉₇, Old South Arabian₉₈, Old Turkic₉₉, Oriya₁₀₀, Osage₁₀₁, Osmanya₁₀₂, Pahawh Hmong₁₀₃, Palmyrene₁₀₄, Pau Cin Hau₁₀₅, Phoenician₁₀₇, Psalter Pahlavi₁₀₈, Rejang₁₀₉, Runic₁₁₀, Saurashtra₁₁₂, Sharada₁₁₃, Shavian₁₁₄, Siddham₁₁₅, Sinhala₁₁₆, Sogdian₁₁₇, Sora Sompeng₁₁₈, Soyombo₁₁₉, Sundanese₁₂₀, Syloti Nagri₁₂₁, Syriac₁₂₂, Tagalog₁₂₄, Tagbanwa₁₂₅, Tai Le₁₂₆, Tai Tham₁₂₇, Tai Viet₁₂₈, Takri₁₂₉, Tamil₁₃₀, Tamil Supplement₁₃₁, Telugu₁₃₂, Thaana₁₃₃, Thai₁₃₄, Tifinagh₁₃₅, Tirhuta₁₃₆, Ugaritic₁₃₇, Vai₁₃₈, Wancho₁₃₉, Warang Citi₁₄₀, Yi₁₄₁, Zanabazar Square₁₄₂. + 'acaaaabaaaaaaaaaaaabaaaabaaaabaaaaaabaaaaaabbaaaaaaaaaaaabaaaaaabaaaaaaaabaaaaaaaaaaaaaaaaaaaabaaabaaaaaaaaaabaaaaaaaaaaaaaaaaaa,' + // #25: 1 font: Arabic₈. 'i,' - // #68: 1 font: Duployan₃₀. - '1e,' - // #69: 1 font: Limbu₆₁. - '2j,' - // #70: 1 font: Multani₈₂. - '3e,' - // #71: 1 font: New Tai Lue₈₆. - '3i,' - // #72: 1 font: Pahawh Hmong₁₀₂. - '3y,' - // #73: 1 font: Tai Tham₁₂₆. - '4w,' - // #74: 131 fonts: Noto Sans₀, Symbols₃, Symbols 2₄, Adlam₅, Anatolian Hieroglyphs₆, Arabic₇, Armenian₈, Avestan₉, Balinese₁₀, Bamum₁₁, Bassa Vah₁₂, Batak₁₃, Bengali₁₄, Brahmi₁₆, Buginese₁₇, Buhid₁₈, Canadian Aboriginal₁₉, Carian₂₀, Chakma₂₂, Cham₂₃, Cherokee₂₄, Coptic₂₅, Cuneiform₂₆, Deseret₂₈, Devanagari₂₉, Duployan₃₀, Egyptian Hieroglyphs₃₁, Elbasan₃₂, Georgian₃₄, Glagolitic₃₅, Gothic₃₆, Grantha₃₇, Gujarati₃₈, Gunjala Gondi₃₉, Gurmukhi₄₀, HK₄₁, Hanunoo₄₂, Hatran₄₃, Hebrew₄₄, Imperial Aramaic₄₅, Indic Siyaq Numbers₄₆, Inscriptional Pahlavi₄₇, Inscriptional Parthian₄₈, JP₄₉, Javanese₅₀, KR₅₁, Kaithi₅₂, Kannada₅₃, Kayah Li₅₄, Kharoshthi₅₅, Khmer₅₆, Khojki₅₇, Khudawadi₅₈, Lao₅₉, Lepcha₆₀, Limbu₆₁, Linear A₆₂, Linear B₆₃, Lisu₆₄, Lydian₆₆, Mahajani₆₇, Malayalam₆₈, Mandaic₆₉, Manichaean₇₀, Marchen₇₁, Masaram Gondi₇₂, Math₇₃, Mayan Numerals₇₄, Medefaidrin₇₅, Meetei Mayek₇₆, Meroitic₇₇, Miao₇₈, Modi₇₉, Mongolian₈₀, Mro₈₁, Multani₈₂, NKo₈₄, Nabataean₈₅, New Tai Lue₈₆, Newa₈₇, Nushu₈₈, Ogham₈₉, Ol Chiki₉₀, Old Italic₉₂, Old North Arabian₉₃, Old Permic₉₄, Old Persian₉₅, Old Sogdian₉₆, Old South Arabian₉₇, Oriya₉₉, Osage₁₀₀, Osmanya₁₀₁, Pahawh Hmong₁₀₂, Palmyrene₁₀₃, Pau Cin Hau₁₀₄, Phoenician₁₀₆, Psalter Pahlavi₁₀₇, Rejang₁₀₈, Runic₁₀₉, SC₁₁₀, Saurashtra₁₁₁, Sharada₁₁₂, Shavian₁₁₃, Siddham₁₁₄, Sinhala₁₁₅, Sogdian₁₁₆, Sora Sompeng₁₁₇, Soyombo₁₁₈, Sundanese₁₁₉, Syloti Nagri₁₂₀, Syriac₁₂₁, TC₁₂₂, Tagalog₁₂₃, Tagbanwa₁₂₄, Tai Le₁₂₅, Tai Tham₁₂₆, Tai Viet₁₂₇, Takri₁₂₈, Tamil₁₂₉, Tamil Supplement₁₃₀, Telugu₁₃₁, Thaana₁₃₂, Thai₁₃₃, Tifinagh₁₃₄, Tirhuta₁₃₅, Ugaritic₁₃₆, Vai₁₃₇, Wancho₁₃₈, Warang Citi₁₃₉, Yi₁₄₀, Zanabazar Square₁₄₁. - 'acaaaaaaaaaaabaaaabaaaabaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaabaaaaaabaaaaabaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,' - // #75: 128 fonts: Noto Sans₀, Symbols₃, Symbols 2₄, Adlam₅, Anatolian Hieroglyphs₆, Armenian₈, Avestan₉, Balinese₁₀, Bamum₁₁, Bassa Vah₁₂, Batak₁₃, Bengali₁₄, Brahmi₁₆, Buginese₁₇, Buhid₁₈, Canadian Aboriginal₁₉, Carian₂₀, Chakma₂₂, Cham₂₃, Cherokee₂₄, Coptic₂₅, Cuneiform₂₆, Deseret₂₈, Devanagari₂₉, Duployan₃₀, Egyptian Hieroglyphs₃₁, Elbasan₃₂, Georgian₃₄, Glagolitic₃₅, Gothic₃₆, Grantha₃₇, Gujarati₃₈, Gurmukhi₄₀, HK₄₁, Hanunoo₄₂, Hatran₄₃, Hebrew₄₄, Imperial Aramaic₄₅, Indic Siyaq Numbers₄₆, Inscriptional Pahlavi₄₇, Inscriptional Parthian₄₈, JP₄₉, Javanese₅₀, KR₅₁, Kaithi₅₂, Kannada₅₃, Kayah Li₅₄, Kharoshthi₅₅, Khmer₅₆, Khojki₅₇, Khudawadi₅₈, Lao₅₉, Lepcha₆₀, Limbu₆₁, Linear A₆₂, Linear B₆₃, Lisu₆₄, Lydian₆₆, Mahajani₆₇, Malayalam₆₈, Mandaic₆₉, Manichaean₇₀, Marchen₇₁, Masaram Gondi₇₂, Math₇₃, Mayan Numerals₇₄, Medefaidrin₇₅, Meetei Mayek₇₆, Meroitic₇₇, Miao₇₈, Modi₇₉, Mongolian₈₀, Mro₈₁, Multani₈₂, NKo₈₄, Nabataean₈₅, New Tai Lue₈₆, Newa₈₇, Nushu₈₈, Ogham₈₉, Ol Chiki₉₀, Old Italic₉₂, Old North Arabian₉₃, Old Permic₉₄, Old Persian₉₅, Old Sogdian₉₆, Old South Arabian₉₇, Oriya₉₉, Osage₁₀₀, Osmanya₁₀₁, Pahawh Hmong₁₀₂, Palmyrene₁₀₃, Pau Cin Hau₁₀₄, Phoenician₁₀₆, Psalter Pahlavi₁₀₇, Rejang₁₀₈, Runic₁₀₉, SC₁₁₀, Saurashtra₁₁₁, Shavian₁₁₃, Siddham₁₁₄, Sinhala₁₁₅, Sogdian₁₁₆, Sora Sompeng₁₁₇, Soyombo₁₁₈, Sundanese₁₁₉, Syloti Nagri₁₂₀, Syriac₁₂₁, TC₁₂₂, Tagalog₁₂₃, Tagbanwa₁₂₄, Tai Le₁₂₅, Tai Tham₁₂₆, Tai Viet₁₂₇, Takri₁₂₈, Tamil₁₂₉, Tamil Supplement₁₃₀, Telugu₁₃₁, Thaana₁₃₂, Thai₁₃₃, Tifinagh₁₃₄, Tirhuta₁₃₅, Ugaritic₁₃₆, Vai₁₃₇, Wancho₁₃₈, Warang Citi₁₃₉, Yi₁₄₀, Zanabazar Square₁₄₁. - 'acaaabaaaaaabaaaabaaaabaaaabaaaabaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaabaaaaaabaaaaabaaaaabaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaa,' - // #76: 3 fonts: Noto Sans₀, Devanagari₂₉, Grantha₃₇. - 'a1ch,' - // #77: 3 fonts: Noto Sans₀, Devanagari₂₉, Sharada₁₁₂. - 'a1c3e,' - // #78: 2 fonts: Noto Sans₀, Elbasan₃₂. - 'a1f,' - // #79: 1 font: Bhaiksuki₁₅. + // #26: 2 fonts: Noto Sans₀, Math₇₄. + 'a2v,' + // #27: 6 fonts: Symbols₄, HK₄₂, JP₅₀, KR₅₂, SC₁₁₁, TC₁₂₃. + 'e1lhb2gl,' + // #28: 3 fonts: Noto Color Emoji₁, Noto Emoji₂, Symbols₄. + 'bab,' + // #29: 1 font: Tamil₁₃₀. + '5a,' + // #30: 1 font: Bengali₁₅. 'p,' - // #80: 1 font: Cham₂₃. - 'x,' - // #81: 1 font: Cuneiform₂₆. - '1a,' - // #82: 3 fonts: HK₄₁, JP₄₉, KR₅₁. - '1phb,' - // #83: 1 font: Khmer₅₆. + // #31: 1 font: Grantha₃₈. + '1m,' + // #32: 1 font: Gurmukhi₄₁. + '1p,' + // #33: 134 fonts: Noto Sans₀, Noto Music₃, Symbols₄, Symbols 2₅, Adlam₆, Anatolian Hieroglyphs₇, Armenian₉, Avestan₁₀, Balinese₁₁, Bamum₁₂, Bassa Vah₁₃, Batak₁₄, Bengali₁₅, Bhaiksuki₁₆, Brahmi₁₇, Buginese₁₈, Buhid₁₉, Canadian Aboriginal₂₀, Carian₂₁, Chakma₂₃, Cham₂₄, Cherokee₂₅, Coptic₂₆, Cuneiform₂₇, Deseret₂₉, Devanagari₃₀, Duployan₃₁, Egyptian Hieroglyphs₃₂, Elbasan₃₃, Georgian₃₅, Glagolitic₃₆, Gothic₃₇, Grantha₃₈, Gujarati₃₉, Gunjala Gondi₄₀, Gurmukhi₄₁, HK₄₂, Hanunoo₄₃, Hatran₄₄, Hebrew₄₅, Imperial Aramaic₄₆, Indic Siyaq Numbers₄₇, Inscriptional Pahlavi₄₈, Inscriptional Parthian₄₉, JP₅₀, Javanese₅₁, KR₅₂, Kaithi₅₃, Kannada₅₄, Kayah Li₅₅, Kharoshthi₅₆, Khmer₅₇, Khojki₅₈, Khudawadi₅₉, Lao₆₀, Lepcha₆₁, Limbu₆₂, Linear A₆₃, Linear B₆₄, Lisu₆₅, Lydian₆₇, Mahajani₆₈, Malayalam₆₉, Mandaic₇₀, Manichaean₇₁, Marchen₇₂, Masaram Gondi₇₃, Math₇₄, Mayan Numerals₇₅, Medefaidrin₇₆, Meetei Mayek₇₇, Meroitic₇₈, Miao₇₉, Modi₈₀, Mongolian₈₁, Mro₈₂, Multani₈₃, NKo₈₅, Nabataean₈₆, New Tai Lue₈₇, Newa₈₈, Nushu₈₉, Ogham₉₀, Ol Chiki₉₁, Old Hungarian₉₂, Old Italic₉₃, Old North Arabian₉₄, Old Permic₉₅, Old Persian₉₆, Old Sogdian₉₇, Old South Arabian₉₈, Old Turkic₉₉, Oriya₁₀₀, Osage₁₀₁, Osmanya₁₀₂, Pahawh Hmong₁₀₃, Palmyrene₁₀₄, Pau Cin Hau₁₀₅, Phoenician₁₀₇, Psalter Pahlavi₁₀₈, Rejang₁₀₉, Runic₁₁₀, SC₁₁₁, Saurashtra₁₁₂, Sharada₁₁₃, Shavian₁₁₄, Siddham₁₁₅, Sinhala₁₁₆, Sogdian₁₁₇, Sora Sompeng₁₁₈, Soyombo₁₁₉, Sundanese₁₂₀, Syloti Nagri₁₂₁, Syriac₁₂₂, TC₁₂₃, Tagalog₁₂₄, Tagbanwa₁₂₅, Tai Le₁₂₆, Tai Tham₁₂₇, Tai Viet₁₂₈, Takri₁₂₉, Tamil₁₃₀, Tamil Supplement₁₃₁, Telugu₁₃₂, Thaana₁₃₃, Thai₁₃₄, Tifinagh₁₃₅, Tirhuta₁₃₆, Ugaritic₁₃₇, Vai₁₃₈, Wancho₁₃₉, Warang Citi₁₄₀, Yi₁₄₁, Zanabazar Square₁₄₂. + 'acaaaabaaaaaaaaaaaabaaaabaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,' + // #34: 8 fonts: Noto Color Emoji₁, Noto Emoji₂, Symbols 2₅, HK₄₂, JP₅₀, KR₅₂, SC₁₁₁, TC₁₂₃. + 'bac1khb2gl,' + // #35: 2 fonts: Noto Sans₀, Devanagari₃₀. + 'a1d,' + // #36: 1 font: Gujarati₃₉. + '1n,' + // #37: 1 font: Oriya₁₀₀. + '3w,' + // #38: 1 font: Kannada₅₄. + '2c,' + // #39: 1 font: Sinhala₁₁₆. + '4m,' + // #40: 2 fonts: Noto Sans₀, Coptic₂₆. + 'az,' + // #41: 1 font: Telugu₁₃₂. + '5c,' + // #42: 1 font: Lao₆₀. + '2i,' + // #43: 7 fonts: Noto Color Emoji₁, Noto Emoji₂, HK₄₂, JP₅₀, KR₅₂, SC₁₁₁, TC₁₂₃. + 'ba1nhb2gl,' + // #44: 1 font: Georgian₃₅. + '1j,' + // #45: 4 fonts: HK₄₂, JP₅₀, KR₅₂, TC₁₂₃. + '1qhb2s,' + // #46: 1 font: Hebrew₄₅. + '1t,' + // #47: 7 fonts: Noto Sans₀, HK₄₂, JP₅₀, KR₅₂, Math₇₄, SC₁₁₁, TC₁₂₃. + 'a1phbv1kl,' + // #48: 8 fonts: Noto Color Emoji₁, Noto Emoji₂, Symbols₄, HK₄₂, JP₅₀, KR₅₂, SC₁₁₁, TC₁₂₃. + 'bab1lhb2gl,' + // #49: 4 fonts: HK₄₂, JP₅₀, KR₅₂, SC₁₁₁. + '1qhb2g,' + // #50: 1 font: Kharoshthi₅₆. '2e,' - // #84: 1 font: Myanmar₈₃. + // #51: 1 font: Linear B₆₄. + '2m,' + // #52: 3 fonts: Noto Sans₀, Bengali₁₅, Devanagari₃₀. + 'aoo,' + // #53: 7 fonts: Symbols 2₅, HK₄₂, JP₅₀, KR₅₂, Math₇₄, SC₁₁₁, TC₁₂₃. + 'f1khbv1kl,' + // #54: 1 font: Glagolitic₃₆. + '1k,' + // #55: 3 fonts: HK₄₂, KR₅₂, TC₁₂₃. + '1qj2s,' + // #56: 1 font: Malayalam₆₉. + '2r,' + // #57: 1 font: Masaram Gondi₇₃. + '2v,' + // #58: 1 font: Mongolian₈₁. + '3d,' + // #59: 2 fonts: Symbols₄, Math₇₄. + 'e2r,' + // #60: 1 font: Cypriot₂₈. + '1c,' + // #61: 2 fonts: Grantha₃₈, Tamil₁₃₀. + '1m3n,' + // #62: 1 font: Gunjala Gondi₄₀. + '1o,' + // #63: 7 fonts: HK₄₂, JP₅₀, KR₅₂, New Tai Lue₈₇, SC₁₁₁, TC₁₂₃, Yi₁₄₁. + '1qhb1ixlr,' + // #64: 2 fonts: Noto Sans₀, Duployan₃₁. + 'a1e,' + // #65: 2 fonts: Symbols 2₅, Math₇₄. + 'f2q,' + // #66: 1 font: Armenian₉. + 'j,' + // #67: 1 font: Duployan₃₁. + '1f,' + // #68: 1 font: Limbu₆₂. + '2k,' + // #69: 1 font: Multani₈₃. '3f,' - // #85: 130 fonts: Noto Sans₀, Noto Color Emoji₁, Noto Emoji₂, Symbols₃, Symbols 2₄, Adlam₅, Anatolian Hieroglyphs₆, Armenian₈, Avestan₉, Balinese₁₀, Bamum₁₁, Bassa Vah₁₂, Batak₁₃, Bengali₁₄, Brahmi₁₆, Buginese₁₇, Buhid₁₈, Canadian Aboriginal₁₉, Carian₂₀, Chakma₂₂, Cham₂₃, Cherokee₂₄, Coptic₂₅, Cuneiform₂₆, Deseret₂₈, Devanagari₂₉, Duployan₃₀, Egyptian Hieroglyphs₃₁, Elbasan₃₂, Georgian₃₄, Glagolitic₃₅, Gothic₃₆, Grantha₃₇, Gujarati₃₈, Gurmukhi₄₀, HK₄₁, Hanunoo₄₂, Hatran₄₃, Hebrew₄₄, Imperial Aramaic₄₅, Indic Siyaq Numbers₄₆, Inscriptional Pahlavi₄₇, Inscriptional Parthian₄₈, JP₄₉, Javanese₅₀, KR₅₁, Kaithi₅₂, Kannada₅₃, Kayah Li₅₄, Kharoshthi₅₅, Khmer₅₆, Khojki₅₇, Khudawadi₅₈, Lao₅₉, Lepcha₆₀, Limbu₆₁, Linear A₆₂, Linear B₆₃, Lisu₆₄, Lydian₆₆, Mahajani₆₇, Malayalam₆₈, Mandaic₆₉, Manichaean₇₀, Marchen₇₁, Masaram Gondi₇₂, Mayan Numerals₇₄, Medefaidrin₇₅, Meetei Mayek₇₆, Meroitic₇₇, Miao₇₈, Modi₇₉, Mongolian₈₀, Mro₈₁, Multani₈₂, NKo₈₄, Nabataean₈₅, New Tai Lue₈₆, Newa₈₇, Nushu₈₈, Ogham₈₉, Ol Chiki₉₀, Old Italic₉₂, Old North Arabian₉₃, Old Permic₉₄, Old Persian₉₅, Old Sogdian₉₆, Old South Arabian₉₇, Oriya₉₉, Osage₁₀₀, Osmanya₁₀₁, Pahawh Hmong₁₀₂, Palmyrene₁₀₃, Pau Cin Hau₁₀₄, Phoenician₁₀₆, Psalter Pahlavi₁₀₇, Rejang₁₀₈, Runic₁₀₉, SC₁₁₀, Saurashtra₁₁₁, Sharada₁₁₂, Shavian₁₁₃, Siddham₁₁₄, Sinhala₁₁₅, Sogdian₁₁₆, Sora Sompeng₁₁₇, Soyombo₁₁₈, Sundanese₁₁₉, Syloti Nagri₁₂₀, Syriac₁₂₁, TC₁₂₂, Tagalog₁₂₃, Tagbanwa₁₂₄, Tai Le₁₂₅, Tai Tham₁₂₆, Tai Viet₁₂₇, Takri₁₂₈, Tamil₁₂₉, Tamil Supplement₁₃₀, Telugu₁₃₁, Thaana₁₃₂, Thai₁₃₃, Tifinagh₁₃₄, Tirhuta₁₃₅, Ugaritic₁₃₆, Vai₁₃₇, Wancho₁₃₈, Warang Citi₁₃₉, Yi₁₄₀, Zanabazar Square₁₄₁. - 'aaaaaaabaaaaaabaaaabaaaabaaaabaaaabaaaaaaaaaaaaaaaaaaaaaaaabaaaaaabaaaaaaaabaaaaaabaaaaabaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,' - // #86: 7 fonts: Noto Sans₀, Adlam₅, HK₄₁, JP₄₉, KR₅₁, SC₁₁₀, TC₁₂₂. - 'ae1jhb2gl,' - // #87: 2 fonts: Noto Sans₀, Glagolitic₃₅. - 'a1i,' - // #88: 2 fonts: Noto Sans₀, Syriac₁₂₁. - 'a4q,' - // #89: 7 fonts: Symbols₃, HK₄₁, JP₄₉, KR₅₁, Math₇₃, SC₁₁₀, TC₁₂₂. - 'd1lhbv1kl,' - // #90: 1 font: Adlam₅. - 'f,' - // #91: 4 fonts: Arabic₇, NKo₈₄, Syriac₁₂₁, Thaana₁₃₂. - 'h2y1kk,' - // #92: 2 fonts: Arabic₇, Syriac₁₂₁. - 'h4j,' - // #93: 1 font: Brahmi₁₆. + // #70: 1 font: Pahawh Hmong₁₀₃. + '3z,' + // #71: 1 font: Tai Tham₁₂₇. + '4x,' + // #72: 135 fonts: Noto Sans₀, Noto Music₃, Symbols₄, Symbols 2₅, Adlam₆, Anatolian Hieroglyphs₇, Arabic₈, Armenian₉, Avestan₁₀, Balinese₁₁, Bamum₁₂, Bassa Vah₁₃, Batak₁₄, Bengali₁₅, Bhaiksuki₁₆, Brahmi₁₇, Buginese₁₈, Buhid₁₉, Canadian Aboriginal₂₀, Carian₂₁, Chakma₂₃, Cham₂₄, Cherokee₂₅, Coptic₂₆, Cuneiform₂₇, Deseret₂₉, Devanagari₃₀, Duployan₃₁, Egyptian Hieroglyphs₃₂, Elbasan₃₃, Georgian₃₅, Glagolitic₃₆, Gothic₃₇, Grantha₃₈, Gujarati₃₉, Gunjala Gondi₄₀, Gurmukhi₄₁, HK₄₂, Hanunoo₄₃, Hatran₄₄, Hebrew₄₅, Imperial Aramaic₄₆, Indic Siyaq Numbers₄₇, Inscriptional Pahlavi₄₈, Inscriptional Parthian₄₉, JP₅₀, Javanese₅₁, KR₅₂, Kaithi₅₃, Kannada₅₄, Kayah Li₅₅, Kharoshthi₅₆, Khmer₅₇, Khojki₅₈, Khudawadi₅₉, Lao₆₀, Lepcha₆₁, Limbu₆₂, Linear A₆₃, Linear B₆₄, Lisu₆₅, Lydian₆₇, Mahajani₆₈, Malayalam₆₉, Mandaic₇₀, Manichaean₇₁, Marchen₇₂, Masaram Gondi₇₃, Math₇₄, Mayan Numerals₇₅, Medefaidrin₇₆, Meetei Mayek₇₇, Meroitic₇₈, Miao₇₉, Modi₈₀, Mongolian₈₁, Mro₈₂, Multani₈₃, NKo₈₅, Nabataean₈₆, New Tai Lue₈₇, Newa₈₈, Nushu₈₉, Ogham₉₀, Ol Chiki₉₁, Old Hungarian₉₂, Old Italic₉₃, Old North Arabian₉₄, Old Permic₉₅, Old Persian₉₆, Old Sogdian₉₇, Old South Arabian₉₈, Old Turkic₉₉, Oriya₁₀₀, Osage₁₀₁, Osmanya₁₀₂, Pahawh Hmong₁₀₃, Palmyrene₁₀₄, Pau Cin Hau₁₀₅, Phoenician₁₀₇, Psalter Pahlavi₁₀₈, Rejang₁₀₉, Runic₁₁₀, SC₁₁₁, Saurashtra₁₁₂, Sharada₁₁₃, Shavian₁₁₄, Siddham₁₁₅, Sinhala₁₁₆, Sogdian₁₁₇, Sora Sompeng₁₁₈, Soyombo₁₁₉, Sundanese₁₂₀, Syloti Nagri₁₂₁, Syriac₁₂₂, TC₁₂₃, Tagalog₁₂₄, Tagbanwa₁₂₅, Tai Le₁₂₆, Tai Tham₁₂₇, Tai Viet₁₂₈, Takri₁₂₉, Tamil₁₃₀, Tamil Supplement₁₃₁, Telugu₁₃₂, Thaana₁₃₃, Thai₁₃₄, Tifinagh₁₃₅, Tirhuta₁₃₆, Ugaritic₁₃₇, Vai₁₃₈, Wancho₁₃₉, Warang Citi₁₄₀, Yi₁₄₁, Zanabazar Square₁₄₂. + 'acaaaaaaaaaaaaaaaaaabaaaabaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,' + // #73: 133 fonts: Noto Sans₀, Noto Music₃, Symbols₄, Symbols 2₅, Adlam₆, Anatolian Hieroglyphs₇, Armenian₉, Avestan₁₀, Balinese₁₁, Bamum₁₂, Bassa Vah₁₃, Batak₁₄, Bengali₁₅, Bhaiksuki₁₆, Brahmi₁₇, Buginese₁₈, Buhid₁₉, Canadian Aboriginal₂₀, Carian₂₁, Chakma₂₃, Cham₂₄, Cherokee₂₅, Coptic₂₆, Cuneiform₂₇, Deseret₂₉, Devanagari₃₀, Duployan₃₁, Egyptian Hieroglyphs₃₂, Elbasan₃₃, Georgian₃₅, Glagolitic₃₆, Gothic₃₇, Grantha₃₈, Gujarati₃₉, Gunjala Gondi₄₀, Gurmukhi₄₁, HK₄₂, Hanunoo₄₃, Hatran₄₄, Hebrew₄₅, Imperial Aramaic₄₆, Indic Siyaq Numbers₄₇, Inscriptional Pahlavi₄₈, Inscriptional Parthian₄₉, JP₅₀, Javanese₅₁, KR₅₂, Kaithi₅₃, Kannada₅₄, Kayah Li₅₅, Kharoshthi₅₆, Khmer₅₇, Khojki₅₈, Khudawadi₅₉, Lao₆₀, Lepcha₆₁, Limbu₆₂, Linear A₆₃, Linear B₆₄, Lisu₆₅, Lydian₆₇, Mahajani₆₈, Malayalam₆₉, Mandaic₇₀, Manichaean₇₁, Marchen₇₂, Masaram Gondi₇₃, Math₇₄, Mayan Numerals₇₅, Medefaidrin₇₆, Meetei Mayek₇₇, Meroitic₇₈, Miao₇₉, Modi₈₀, Mongolian₈₁, Mro₈₂, Multani₈₃, NKo₈₅, Nabataean₈₆, New Tai Lue₈₇, Newa₈₈, Nushu₈₉, Ogham₉₀, Ol Chiki₉₁, Old Hungarian₉₂, Old Italic₉₃, Old North Arabian₉₄, Old Permic₉₅, Old Persian₉₆, Old Sogdian₉₇, Old South Arabian₉₈, Old Turkic₉₉, Oriya₁₀₀, Osage₁₀₁, Osmanya₁₀₂, Pahawh Hmong₁₀₃, Palmyrene₁₀₄, Pau Cin Hau₁₀₅, Phoenician₁₀₇, Psalter Pahlavi₁₀₈, Rejang₁₀₉, Runic₁₁₀, SC₁₁₁, Saurashtra₁₁₂, Shavian₁₁₄, Siddham₁₁₅, Sinhala₁₁₆, Sogdian₁₁₇, Sora Sompeng₁₁₈, Soyombo₁₁₉, Sundanese₁₂₀, Syloti Nagri₁₂₁, Syriac₁₂₂, TC₁₂₃, Tagalog₁₂₄, Tagbanwa₁₂₅, Tai Le₁₂₆, Tai Tham₁₂₇, Tai Viet₁₂₈, Takri₁₂₉, Tamil₁₃₀, Tamil Supplement₁₃₁, Telugu₁₃₂, Thaana₁₃₃, Thai₁₃₄, Tifinagh₁₃₅, Tirhuta₁₃₆, Ugaritic₁₃₇, Vai₁₃₈, Wancho₁₃₉, Warang Citi₁₄₀, Yi₁₄₁, Zanabazar Square₁₄₂. + 'acaaaabaaaaaaaaaaaabaaaabaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaabaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaa,' + // #74: 3 fonts: Noto Sans₀, Devanagari₃₀, Grantha₃₈. + 'a1dh,' + // #75: 3 fonts: Noto Sans₀, Devanagari₃₀, Sharada₁₁₃. + 'a1d3e,' + // #76: 2 fonts: Noto Sans₀, Elbasan₃₃. + 'a1g,' + // #77: 1 font: Noto Music₃. + 'd,' + // #78: 1 font: Bhaiksuki₁₆. 'q,' - // #94: 1 font: Canadian Aboriginal₁₉. - 't,' - // #95: 1 font: Cherokee₂₄. + // #79: 1 font: Cham₂₄. 'y,' - // #96: 1 font: Coptic₂₅. + // #80: 1 font: Cuneiform₂₇. + '1b,' + // #81: 3 fonts: HK₄₂, JP₅₀, KR₅₂. + '1qhb,' + // #82: 1 font: Khmer₅₇. + '2f,' + // #83: 1 font: Myanmar₈₄. + '3g,' + // #84: 1 font: New Tai Lue₈₇. + '3j,' + // #85: 135 fonts: Noto Sans₀, Noto Color Emoji₁, Noto Emoji₂, Noto Music₃, Symbols₄, Symbols 2₅, Adlam₆, Anatolian Hieroglyphs₇, Armenian₉, Avestan₁₀, Balinese₁₁, Bamum₁₂, Bassa Vah₁₃, Batak₁₄, Bengali₁₅, Bhaiksuki₁₆, Brahmi₁₇, Buginese₁₈, Buhid₁₉, Canadian Aboriginal₂₀, Carian₂₁, Chakma₂₃, Cham₂₄, Cherokee₂₅, Coptic₂₆, Cuneiform₂₇, Deseret₂₉, Devanagari₃₀, Duployan₃₁, Egyptian Hieroglyphs₃₂, Elbasan₃₃, Georgian₃₅, Glagolitic₃₆, Gothic₃₇, Grantha₃₈, Gujarati₃₉, Gunjala Gondi₄₀, Gurmukhi₄₁, HK₄₂, Hanunoo₄₃, Hatran₄₄, Hebrew₄₅, Imperial Aramaic₄₆, Indic Siyaq Numbers₄₇, Inscriptional Pahlavi₄₈, Inscriptional Parthian₄₉, JP₅₀, Javanese₅₁, KR₅₂, Kaithi₅₃, Kannada₅₄, Kayah Li₅₅, Kharoshthi₅₆, Khmer₅₇, Khojki₅₈, Khudawadi₅₉, Lao₆₀, Lepcha₆₁, Limbu₆₂, Linear A₆₃, Linear B₆₄, Lisu₆₅, Lydian₆₇, Mahajani₆₈, Malayalam₆₉, Mandaic₇₀, Manichaean₇₁, Marchen₇₂, Masaram Gondi₇₃, Mayan Numerals₇₅, Medefaidrin₇₆, Meetei Mayek₇₇, Meroitic₇₈, Miao₇₉, Modi₈₀, Mongolian₈₁, Mro₈₂, Multani₈₃, NKo₈₅, Nabataean₈₆, New Tai Lue₈₇, Newa₈₈, Nushu₈₉, Ogham₉₀, Ol Chiki₉₁, Old Hungarian₉₂, Old Italic₉₃, Old North Arabian₉₄, Old Permic₉₅, Old Persian₉₆, Old Sogdian₉₇, Old South Arabian₉₈, Old Turkic₉₉, Oriya₁₀₀, Osage₁₀₁, Osmanya₁₀₂, Pahawh Hmong₁₀₃, Palmyrene₁₀₄, Pau Cin Hau₁₀₅, Phoenician₁₀₇, Psalter Pahlavi₁₀₈, Rejang₁₀₉, Runic₁₁₀, SC₁₁₁, Saurashtra₁₁₂, Sharada₁₁₃, Shavian₁₁₄, Siddham₁₁₅, Sinhala₁₁₆, Sogdian₁₁₇, Sora Sompeng₁₁₈, Soyombo₁₁₉, Sundanese₁₂₀, Syloti Nagri₁₂₁, Syriac₁₂₂, TC₁₂₃, Tagalog₁₂₄, Tagbanwa₁₂₅, Tai Le₁₂₆, Tai Tham₁₂₇, Tai Viet₁₂₈, Takri₁₂₉, Tamil₁₃₀, Tamil Supplement₁₃₁, Telugu₁₃₂, Thaana₁₃₃, Thai₁₃₄, Tifinagh₁₃₅, Tirhuta₁₃₆, Ugaritic₁₃₇, Vai₁₃₈, Wancho₁₃₉, Warang Citi₁₄₀, Yi₁₄₁, Zanabazar Square₁₄₂. + 'aaaaaaaabaaaaaaaaaaaabaaaabaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaabaaaaaaaabaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,' + // #86: 7 fonts: Noto Sans₀, Adlam₆, HK₄₂, JP₅₀, KR₅₂, SC₁₁₁, TC₁₂₃. + 'af1jhb2gl,' + // #87: 2 fonts: Noto Sans₀, Glagolitic₃₆. + 'a1j,' + // #88: 2 fonts: Noto Sans₀, Syriac₁₂₂. + 'a4r,' + // #89: 1 font: Adlam₆. + 'g,' + // #90: 4 fonts: Arabic₈, NKo₈₅, Syriac₁₂₂, Thaana₁₃₃. + 'i2y1kk,' + // #91: 2 fonts: Arabic₈, Syriac₁₂₂. + 'i4j,' + // #92: 1 font: Brahmi₁₇. + 'r,' + // #93: 1 font: Canadian Aboriginal₂₀. + 'u,' + // #94: 1 font: Cherokee₂₅. 'z,' - // #97: 6 fonts: HK₄₁, JP₄₉, KR₅₁, New Tai Lue₈₆, SC₁₁₀, TC₁₂₂. - '1phb1ixl,' - // #98: 6 fonts: HK₄₁, JP₄₉, KR₅₁, SC₁₁₀, TC₁₂₂, Yi₁₄₀. - '1phb2glr,' - // #99: 1 font: Hatran₄₃. - '1r,' - // #100: 1 font: Javanese₅₀. - '1y,' - // #101: 1 font: Lepcha₆₀. - '2i,' - // #102: 1 font: Linear A₆₂. - '2k,' - // #103: 1 font: Marchen₇₁. - '2t,' - // #104: 1 font: Meetei Mayek₇₆. - '2y,' - // #105: 1 font: Meroitic₇₇. + // #95: 1 font: Coptic₂₆. + '1a,' + // #96: 6 fonts: HK₄₂, JP₅₀, KR₅₂, New Tai Lue₈₇, SC₁₁₁, TC₁₂₃. + '1qhb1ixl,' + // #97: 6 fonts: HK₄₂, JP₅₀, KR₅₂, SC₁₁₁, TC₁₂₃, Yi₁₄₁. + '1qhb2glr,' + // #98: 1 font: Hatran₄₄. + '1s,' + // #99: 1 font: Javanese₅₁. + '1z,' + // #100: 1 font: Lepcha₆₁. + '2j,' + // #101: 1 font: Linear A₆₃. + '2l,' + // #102: 1 font: Marchen₇₂. + '2u,' + // #103: 1 font: Meetei Mayek₇₇. '2z,' - // #106: 1 font: Miao₇₈. + // #104: 1 font: Meroitic₇₈. '3a,' - // #107: 1 font: Mro₈₁. - '3d,' - // #108: 1 font: Old Hungarian₉₁. - '3n,' - // #109: 1 font: Psalter Pahlavi₁₀₇. - '4d,' - // #110: 1 font: Syriac₁₂₁. - '4r,' - // #111: 1 font: Tagbanwa₁₂₄. - '4u,' - // #112: 1 font: Tifinagh₁₃₄. - '5e,' - // #113: 129 fonts: Noto Sans₀, Symbols₃, Symbols 2₄, Adlam₅, Anatolian Hieroglyphs₆, Arabic₇, Armenian₈, Avestan₉, Balinese₁₀, Bamum₁₁, Bassa Vah₁₂, Batak₁₃, Bengali₁₄, Brahmi₁₆, Buginese₁₇, Buhid₁₈, Canadian Aboriginal₁₉, Carian₂₀, Chakma₂₂, Cham₂₃, Cherokee₂₄, Coptic₂₅, Cuneiform₂₆, Deseret₂₈, Devanagari₂₉, Duployan₃₀, Egyptian Hieroglyphs₃₁, Elbasan₃₂, Georgian₃₄, Glagolitic₃₅, Gothic₃₆, Grantha₃₇, Gujarati₃₈, Gurmukhi₄₀, HK₄₁, Hanunoo₄₂, Hatran₄₃, Hebrew₄₄, Imperial Aramaic₄₅, Indic Siyaq Numbers₄₆, Inscriptional Pahlavi₄₇, Inscriptional Parthian₄₈, JP₄₉, Javanese₅₀, KR₅₁, Kaithi₅₂, Kannada₅₃, Kayah Li₅₄, Kharoshthi₅₅, Khmer₅₆, Khojki₅₇, Khudawadi₅₈, Lao₅₉, Lepcha₆₀, Limbu₆₁, Linear A₆₂, Linear B₆₃, Lisu₆₄, Lydian₆₆, Mahajani₆₇, Malayalam₆₈, Mandaic₆₉, Manichaean₇₀, Marchen₇₁, Masaram Gondi₇₂, Mayan Numerals₇₄, Medefaidrin₇₅, Meetei Mayek₇₆, Meroitic₇₇, Miao₇₈, Modi₇₉, Mongolian₈₀, Mro₈₁, Multani₈₂, NKo₈₄, Nabataean₈₅, New Tai Lue₈₆, Newa₈₇, Nushu₈₈, Ogham₈₉, Ol Chiki₉₀, Old Italic₉₂, Old North Arabian₉₃, Old Permic₉₄, Old Persian₉₅, Old Sogdian₉₆, Old South Arabian₉₇, Oriya₉₉, Osage₁₀₀, Osmanya₁₀₁, Pahawh Hmong₁₀₂, Palmyrene₁₀₃, Pau Cin Hau₁₀₄, Phoenician₁₀₆, Psalter Pahlavi₁₀₇, Rejang₁₀₈, Runic₁₀₉, SC₁₁₀, Saurashtra₁₁₁, Sharada₁₁₂, Shavian₁₁₃, Siddham₁₁₄, Sinhala₁₁₅, Sogdian₁₁₆, Sora Sompeng₁₁₇, Soyombo₁₁₈, Sundanese₁₁₉, Syloti Nagri₁₂₀, Syriac₁₂₁, TC₁₂₂, Tagalog₁₂₃, Tagbanwa₁₂₄, Tai Le₁₂₅, Tai Tham₁₂₆, Tai Viet₁₂₇, Takri₁₂₈, Tamil₁₂₉, Tamil Supplement₁₃₀, Telugu₁₃₁, Thaana₁₃₂, Thai₁₃₃, Tifinagh₁₃₄, Tirhuta₁₃₅, Ugaritic₁₃₆, Vai₁₃₇, Wancho₁₃₈, Warang Citi₁₃₉, Yi₁₄₀, Zanabazar Square₁₄₁. - 'acaaaaaaaaaaabaaaabaaaabaaaabaaaabaaaaaaaaaaaaaaaaaaaaaaaabaaaaaabaaaaaaaabaaaaaabaaaaabaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,' - // #114: 130 fonts: Noto Sans₀, Symbols₃, Symbols 2₄, Adlam₅, Anatolian Hieroglyphs₆, Armenian₈, Avestan₉, Balinese₁₀, Bamum₁₁, Bassa Vah₁₂, Batak₁₃, Bengali₁₄, Brahmi₁₆, Buginese₁₇, Buhid₁₈, Canadian Aboriginal₁₉, Carian₂₀, Chakma₂₂, Cham₂₃, Cherokee₂₄, Coptic₂₅, Cuneiform₂₆, Deseret₂₈, Devanagari₂₉, Duployan₃₀, Egyptian Hieroglyphs₃₁, Elbasan₃₂, Georgian₃₄, Glagolitic₃₅, Gothic₃₆, Grantha₃₇, Gujarati₃₈, Gunjala Gondi₃₉, Gurmukhi₄₀, HK₄₁, Hanunoo₄₂, Hatran₄₃, Hebrew₄₄, Imperial Aramaic₄₅, Indic Siyaq Numbers₄₆, Inscriptional Pahlavi₄₇, Inscriptional Parthian₄₈, JP₄₉, Javanese₅₀, KR₅₁, Kaithi₅₂, Kannada₅₃, Kayah Li₅₄, Kharoshthi₅₅, Khmer₅₆, Khojki₅₇, Khudawadi₅₈, Lao₅₉, Lepcha₆₀, Limbu₆₁, Linear A₆₂, Linear B₆₃, Lisu₆₄, Lydian₆₆, Mahajani₆₇, Malayalam₆₈, Mandaic₆₉, Manichaean₇₀, Marchen₇₁, Masaram Gondi₇₂, Mayan Numerals₇₄, Medefaidrin₇₅, Meetei Mayek₇₆, Meroitic₇₇, Miao₇₈, Modi₇₉, Mongolian₈₀, Mro₈₁, Multani₈₂, Myanmar₈₃, NKo₈₄, Nabataean₈₅, New Tai Lue₈₆, Newa₈₇, Nushu₈₈, Ogham₈₉, Ol Chiki₉₀, Old Italic₉₂, Old North Arabian₉₃, Old Permic₉₄, Old Persian₉₅, Old Sogdian₉₆, Old South Arabian₉₇, Oriya₉₉, Osage₁₀₀, Osmanya₁₀₁, Pahawh Hmong₁₀₂, Palmyrene₁₀₃, Pau Cin Hau₁₀₄, Phoenician₁₀₆, Psalter Pahlavi₁₀₇, Rejang₁₀₈, Runic₁₀₉, SC₁₁₀, Saurashtra₁₁₁, Sharada₁₁₂, Shavian₁₁₃, Siddham₁₁₄, Sinhala₁₁₅, Sogdian₁₁₆, Sora Sompeng₁₁₇, Soyombo₁₁₈, Sundanese₁₁₉, Syloti Nagri₁₂₀, Syriac₁₂₁, TC₁₂₂, Tagalog₁₂₃, Tagbanwa₁₂₄, Tai Le₁₂₅, Tai Tham₁₂₆, Tai Viet₁₂₇, Takri₁₂₈, Tamil₁₂₉, Tamil Supplement₁₃₀, Telugu₁₃₁, Thaana₁₃₂, Thai₁₃₃, Tifinagh₁₃₄, Tirhuta₁₃₅, Ugaritic₁₃₆, Vai₁₃₇, Wancho₁₃₈, Warang Citi₁₃₉, Yi₁₄₀, Zanabazar Square₁₄₁. - 'acaaabaaaaaabaaaabaaaabaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaabaaaaaaaaaaaaaaaabaaaaabaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,' - // #115: 124 fonts: Noto Sans₀, Symbols₃, Symbols 2₄, Adlam₅, Anatolian Hieroglyphs₆, Armenian₈, Avestan₉, Balinese₁₀, Bamum₁₁, Bassa Vah₁₂, Batak₁₃, Bengali₁₄, Brahmi₁₆, Buginese₁₇, Buhid₁₈, Canadian Aboriginal₁₉, Carian₂₀, Chakma₂₂, Cham₂₃, Cherokee₂₄, Coptic₂₅, Cuneiform₂₆, Deseret₂₈, Devanagari₂₉, Duployan₃₀, Egyptian Hieroglyphs₃₁, Elbasan₃₂, Georgian₃₄, Glagolitic₃₅, Gothic₃₆, Grantha₃₇, Gujarati₃₈, Gurmukhi₄₀, Hanunoo₄₂, Hatran₄₃, Hebrew₄₄, Imperial Aramaic₄₅, Indic Siyaq Numbers₄₆, Inscriptional Pahlavi₄₇, Inscriptional Parthian₄₈, Javanese₅₀, Kaithi₅₂, Kannada₅₃, Kayah Li₅₄, Kharoshthi₅₅, Khmer₅₆, Khojki₅₇, Khudawadi₅₈, Lao₅₉, Lepcha₆₀, Limbu₆₁, Linear A₆₂, Linear B₆₃, Lisu₆₄, Lydian₆₆, Mahajani₆₇, Malayalam₆₈, Mandaic₆₉, Manichaean₇₀, Marchen₇₁, Masaram Gondi₇₂, Math₇₃, Mayan Numerals₇₄, Medefaidrin₇₅, Meetei Mayek₇₆, Meroitic₇₇, Miao₇₈, Modi₇₉, Mongolian₈₀, Mro₈₁, Multani₈₂, NKo₈₄, Nabataean₈₅, New Tai Lue₈₆, Newa₈₇, Nushu₈₈, Ogham₈₉, Ol Chiki₉₀, Old Italic₉₂, Old North Arabian₉₃, Old Permic₉₄, Old Persian₉₅, Old Sogdian₉₆, Old South Arabian₉₇, Oriya₉₉, Osage₁₀₀, Osmanya₁₀₁, Pahawh Hmong₁₀₂, Palmyrene₁₀₃, Pau Cin Hau₁₀₄, Phoenician₁₀₆, Psalter Pahlavi₁₀₇, Rejang₁₀₈, Runic₁₀₉, Saurashtra₁₁₁, Sharada₁₁₂, Shavian₁₁₃, Siddham₁₁₄, Sinhala₁₁₅, Sogdian₁₁₆, Sora Sompeng₁₁₇, Soyombo₁₁₈, Sundanese₁₁₉, Syloti Nagri₁₂₀, Syriac₁₂₁, Tagalog₁₂₃, Tagbanwa₁₂₄, Tai Le₁₂₅, Tai Tham₁₂₆, Tai Viet₁₂₇, Takri₁₂₈, Tamil₁₂₉, Tamil Supplement₁₃₀, Telugu₁₃₁, Thaana₁₃₂, Thai₁₃₃, Tifinagh₁₃₄, Tirhuta₁₃₅, Ugaritic₁₃₆, Vai₁₃₇, Wancho₁₃₈, Warang Citi₁₃₉, Yi₁₄₀, Zanabazar Square₁₄₁. - 'acaaabaaaaaabaaaabaaaabaaaabaaaabbaaaaaabbaaaaaaaaaaaabaaaaaaaaaaaaaaaabaaaaaabaaaaabaaaaabaaabaaaaaaaaaabaaaaaaaaaaaaaaaaaa,' - // #116: 2 fonts: Noto Sans₀, Adlam₅. - 'ae,' - // #117: 3 fonts: Noto Sans₀, Adlam₅, Arabic₇. - 'aeb,' - // #118: 5 fonts: Noto Sans₀, Bengali₁₄, Devanagari₂₉, Grantha₃₇, Kannada₅₃. - 'anohp,' - // #119: 2 fonts: Noto Sans₀, Caucasian Albanian₂₁. - 'au,' - // #120: 8 fonts: Noto Sans₀, Elbasan₃₂, HK₄₁, JP₄₉, KR₅₁, Math₇₃, SC₁₁₀, TC₁₂₂. - 'a1fihbv1kl,' - // #121: 7 fonts: Noto Sans₀, HK₄₁, JP₄₉, KR₅₁, SC₁₁₀, TC₁₂₂, Tamil₁₂₉. - 'a1ohb2glg,' - // #122: 2 fonts: Noto Sans₀, Tifinagh₁₃₄. - 'a5d,' - // #123: 2 fonts: Symbols₃, Symbols 2₄. - 'da,' - // #124: 2 fonts: Arabic₇, Indic Siyaq Numbers₄₆. - 'h1m,' - // #125: 2 fonts: Arabic₇, Thaana₁₃₂. - 'h4u,' - // #126: 1 font: Avestan₉. - 'j,' - // #127: 1 font: Balinese₁₀. + // #105: 1 font: Miao₇₉. + '3b,' + // #106: 1 font: Mro₈₂. + '3e,' + // #107: 1 font: Old Hungarian₉₂. + '3o,' + // #108: 1 font: Psalter Pahlavi₁₀₈. + '4e,' + // #109: 1 font: Syriac₁₂₂. + '4s,' + // #110: 1 font: Tagbanwa₁₂₅. + '4v,' + // #111: 1 font: Tifinagh₁₃₅. + '5f,' + // #112: 136 fonts: Noto Sans₀, Noto Color Emoji₁, Noto Emoji₂, Noto Music₃, Symbols₄, Symbols 2₅, Adlam₆, Anatolian Hieroglyphs₇, Armenian₉, Avestan₁₀, Balinese₁₁, Bamum₁₂, Bassa Vah₁₃, Batak₁₄, Bengali₁₅, Bhaiksuki₁₆, Brahmi₁₇, Buginese₁₈, Buhid₁₉, Canadian Aboriginal₂₀, Carian₂₁, Chakma₂₃, Cham₂₄, Cherokee₂₅, Coptic₂₆, Cuneiform₂₇, Deseret₂₉, Devanagari₃₀, Duployan₃₁, Egyptian Hieroglyphs₃₂, Elbasan₃₃, Georgian₃₅, Glagolitic₃₆, Gothic₃₇, Grantha₃₈, Gujarati₃₉, Gunjala Gondi₄₀, Gurmukhi₄₁, HK₄₂, Hanunoo₄₃, Hatran₄₄, Hebrew₄₅, Imperial Aramaic₄₆, Indic Siyaq Numbers₄₇, Inscriptional Pahlavi₄₈, Inscriptional Parthian₄₉, JP₅₀, Javanese₅₁, KR₅₂, Kaithi₅₃, Kannada₅₄, Kayah Li₅₅, Kharoshthi₅₆, Khmer₅₇, Khojki₅₈, Khudawadi₅₉, Lao₆₀, Lepcha₆₁, Limbu₆₂, Linear A₆₃, Linear B₆₄, Lisu₆₅, Lydian₆₇, Mahajani₆₈, Malayalam₆₉, Mandaic₇₀, Manichaean₇₁, Marchen₇₂, Masaram Gondi₇₃, Math₇₄, Mayan Numerals₇₅, Medefaidrin₇₆, Meetei Mayek₇₇, Meroitic₇₈, Miao₇₉, Modi₈₀, Mongolian₈₁, Mro₈₂, Multani₈₃, NKo₈₅, Nabataean₈₆, New Tai Lue₈₇, Newa₈₈, Nushu₈₉, Ogham₉₀, Ol Chiki₉₁, Old Hungarian₉₂, Old Italic₉₃, Old North Arabian₉₄, Old Permic₉₅, Old Persian₉₆, Old Sogdian₉₇, Old South Arabian₉₈, Old Turkic₉₉, Oriya₁₀₀, Osage₁₀₁, Osmanya₁₀₂, Pahawh Hmong₁₀₃, Palmyrene₁₀₄, Pau Cin Hau₁₀₅, Phoenician₁₀₇, Psalter Pahlavi₁₀₈, Rejang₁₀₉, Runic₁₁₀, SC₁₁₁, Saurashtra₁₁₂, Sharada₁₁₃, Shavian₁₁₄, Siddham₁₁₅, Sinhala₁₁₆, Sogdian₁₁₇, Sora Sompeng₁₁₈, Soyombo₁₁₉, Sundanese₁₂₀, Syloti Nagri₁₂₁, Syriac₁₂₂, TC₁₂₃, Tagalog₁₂₄, Tagbanwa₁₂₅, Tai Le₁₂₆, Tai Tham₁₂₇, Tai Viet₁₂₈, Takri₁₂₉, Tamil₁₃₀, Tamil Supplement₁₃₁, Telugu₁₃₂, Thaana₁₃₃, Thai₁₃₄, Tifinagh₁₃₅, Tirhuta₁₃₆, Ugaritic₁₃₇, Vai₁₃₈, Wancho₁₃₉, Warang Citi₁₄₀, Yi₁₄₁, Zanabazar Square₁₄₂. + 'aaaaaaaabaaaaaaaaaaaabaaaabaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,' + // #113: 134 fonts: Noto Sans₀, Noto Music₃, Symbols₄, Symbols 2₅, Adlam₆, Anatolian Hieroglyphs₇, Arabic₈, Armenian₉, Avestan₁₀, Balinese₁₁, Bamum₁₂, Bassa Vah₁₃, Batak₁₄, Bengali₁₅, Bhaiksuki₁₆, Brahmi₁₇, Buginese₁₈, Buhid₁₉, Canadian Aboriginal₂₀, Carian₂₁, Chakma₂₃, Cham₂₄, Cherokee₂₅, Coptic₂₆, Cuneiform₂₇, Deseret₂₉, Devanagari₃₀, Duployan₃₁, Egyptian Hieroglyphs₃₂, Elbasan₃₃, Georgian₃₅, Glagolitic₃₆, Gothic₃₇, Grantha₃₈, Gujarati₃₉, Gunjala Gondi₄₀, Gurmukhi₄₁, HK₄₂, Hanunoo₄₃, Hatran₄₄, Hebrew₄₅, Imperial Aramaic₄₆, Indic Siyaq Numbers₄₇, Inscriptional Pahlavi₄₈, Inscriptional Parthian₄₉, JP₅₀, Javanese₅₁, KR₅₂, Kaithi₅₃, Kannada₅₄, Kayah Li₅₅, Kharoshthi₅₆, Khmer₅₇, Khojki₅₈, Khudawadi₅₉, Lao₆₀, Lepcha₆₁, Limbu₆₂, Linear A₆₃, Linear B₆₄, Lisu₆₅, Lydian₆₇, Mahajani₆₈, Malayalam₆₉, Mandaic₇₀, Manichaean₇₁, Marchen₇₂, Masaram Gondi₇₃, Mayan Numerals₇₅, Medefaidrin₇₆, Meetei Mayek₇₇, Meroitic₇₈, Miao₇₉, Modi₈₀, Mongolian₈₁, Mro₈₂, Multani₈₃, NKo₈₅, Nabataean₈₆, New Tai Lue₈₇, Newa₈₈, Nushu₈₉, Ogham₉₀, Ol Chiki₉₁, Old Hungarian₉₂, Old Italic₉₃, Old North Arabian₉₄, Old Permic₉₅, Old Persian₉₆, Old Sogdian₉₇, Old South Arabian₉₈, Old Turkic₉₉, Oriya₁₀₀, Osage₁₀₁, Osmanya₁₀₂, Pahawh Hmong₁₀₃, Palmyrene₁₀₄, Pau Cin Hau₁₀₅, Phoenician₁₀₇, Psalter Pahlavi₁₀₈, Rejang₁₀₉, Runic₁₁₀, SC₁₁₁, Saurashtra₁₁₂, Sharada₁₁₃, Shavian₁₁₄, Siddham₁₁₅, Sinhala₁₁₆, Sogdian₁₁₇, Sora Sompeng₁₁₈, Soyombo₁₁₉, Sundanese₁₂₀, Syloti Nagri₁₂₁, Syriac₁₂₂, TC₁₂₃, Tagalog₁₂₄, Tagbanwa₁₂₅, Tai Le₁₂₆, Tai Tham₁₂₇, Tai Viet₁₂₈, Takri₁₂₉, Tamil₁₃₀, Tamil Supplement₁₃₁, Telugu₁₃₂, Thaana₁₃₃, Thai₁₃₄, Tifinagh₁₃₅, Tirhuta₁₃₆, Ugaritic₁₃₇, Vai₁₃₈, Wancho₁₃₉, Warang Citi₁₄₀, Yi₁₄₁, Zanabazar Square₁₄₂. + 'acaaaaaaaaaaaaaaaaaabaaaabaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaabaaaaaaaabaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,' + // #114: 134 fonts: Noto Sans₀, Noto Music₃, Symbols₄, Symbols 2₅, Adlam₆, Anatolian Hieroglyphs₇, Armenian₉, Avestan₁₀, Balinese₁₁, Bamum₁₂, Bassa Vah₁₃, Batak₁₄, Bengali₁₅, Bhaiksuki₁₆, Brahmi₁₇, Buginese₁₈, Buhid₁₉, Canadian Aboriginal₂₀, Carian₂₁, Chakma₂₃, Cham₂₄, Cherokee₂₅, Coptic₂₆, Cuneiform₂₇, Deseret₂₉, Devanagari₃₀, Duployan₃₁, Egyptian Hieroglyphs₃₂, Elbasan₃₃, Georgian₃₅, Glagolitic₃₆, Gothic₃₇, Grantha₃₈, Gujarati₃₉, Gunjala Gondi₄₀, Gurmukhi₄₁, HK₄₂, Hanunoo₄₃, Hatran₄₄, Hebrew₄₅, Imperial Aramaic₄₆, Indic Siyaq Numbers₄₇, Inscriptional Pahlavi₄₈, Inscriptional Parthian₄₉, JP₅₀, Javanese₅₁, KR₅₂, Kaithi₅₃, Kannada₅₄, Kayah Li₅₅, Kharoshthi₅₆, Khmer₅₇, Khojki₅₈, Khudawadi₅₉, Lao₆₀, Lepcha₆₁, Limbu₆₂, Linear A₆₃, Linear B₆₄, Lisu₆₅, Lydian₆₇, Mahajani₆₈, Malayalam₆₉, Mandaic₇₀, Manichaean₇₁, Marchen₇₂, Masaram Gondi₇₃, Mayan Numerals₇₅, Medefaidrin₇₆, Meetei Mayek₇₇, Meroitic₇₈, Miao₇₉, Modi₈₀, Mongolian₈₁, Mro₈₂, Multani₈₃, Myanmar₈₄, NKo₈₅, Nabataean₈₆, New Tai Lue₈₇, Newa₈₈, Nushu₈₉, Ogham₉₀, Ol Chiki₉₁, Old Hungarian₉₂, Old Italic₉₃, Old North Arabian₉₄, Old Permic₉₅, Old Persian₉₆, Old Sogdian₉₇, Old South Arabian₉₈, Old Turkic₉₉, Oriya₁₀₀, Osage₁₀₁, Osmanya₁₀₂, Pahawh Hmong₁₀₃, Palmyrene₁₀₄, Pau Cin Hau₁₀₅, Phoenician₁₀₇, Psalter Pahlavi₁₀₈, Rejang₁₀₉, Runic₁₁₀, SC₁₁₁, Saurashtra₁₁₂, Sharada₁₁₃, Shavian₁₁₄, Siddham₁₁₅, Sinhala₁₁₆, Sogdian₁₁₇, Sora Sompeng₁₁₈, Soyombo₁₁₉, Sundanese₁₂₀, Syloti Nagri₁₂₁, Syriac₁₂₂, TC₁₂₃, Tagalog₁₂₄, Tagbanwa₁₂₅, Tai Le₁₂₆, Tai Tham₁₂₇, Tai Viet₁₂₈, Takri₁₂₉, Tamil₁₃₀, Tamil Supplement₁₃₁, Telugu₁₃₂, Thaana₁₃₃, Thai₁₃₄, Tifinagh₁₃₅, Tirhuta₁₃₆, Ugaritic₁₃₇, Vai₁₃₈, Wancho₁₃₉, Warang Citi₁₄₀, Yi₁₄₁, Zanabazar Square₁₄₂. + 'acaaaabaaaaaaaaaaaabaaaabaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,' + // #115: 129 fonts: Noto Sans₀, Noto Music₃, Symbols₄, Symbols 2₅, Adlam₆, Anatolian Hieroglyphs₇, Armenian₉, Avestan₁₀, Balinese₁₁, Bamum₁₂, Bassa Vah₁₃, Batak₁₄, Bengali₁₅, Bhaiksuki₁₆, Brahmi₁₇, Buginese₁₈, Buhid₁₉, Canadian Aboriginal₂₀, Carian₂₁, Chakma₂₃, Cham₂₄, Cherokee₂₅, Coptic₂₆, Cuneiform₂₇, Deseret₂₉, Devanagari₃₀, Duployan₃₁, Egyptian Hieroglyphs₃₂, Elbasan₃₃, Georgian₃₅, Glagolitic₃₆, Gothic₃₇, Grantha₃₈, Gujarati₃₉, Gunjala Gondi₄₀, Gurmukhi₄₁, Hanunoo₄₃, Hatran₄₄, Hebrew₄₅, Imperial Aramaic₄₆, Indic Siyaq Numbers₄₇, Inscriptional Pahlavi₄₈, Inscriptional Parthian₄₉, Javanese₅₁, Kaithi₅₃, Kannada₅₄, Kayah Li₅₅, Kharoshthi₅₆, Khmer₅₇, Khojki₅₈, Khudawadi₅₉, Lao₆₀, Lepcha₆₁, Limbu₆₂, Linear A₆₃, Linear B₆₄, Lisu₆₅, Lydian₆₇, Mahajani₆₈, Malayalam₆₉, Mandaic₇₀, Manichaean₇₁, Marchen₇₂, Masaram Gondi₇₃, Math₇₄, Mayan Numerals₇₅, Medefaidrin₇₆, Meetei Mayek₇₇, Meroitic₇₈, Miao₇₉, Modi₈₀, Mongolian₈₁, Mro₈₂, Multani₈₃, NKo₈₅, Nabataean₈₆, New Tai Lue₈₇, Newa₈₈, Nushu₈₉, Ogham₉₀, Ol Chiki₉₁, Old Hungarian₉₂, Old Italic₉₃, Old North Arabian₉₄, Old Permic₉₅, Old Persian₉₆, Old Sogdian₉₇, Old South Arabian₉₈, Old Turkic₉₉, Oriya₁₀₀, Osage₁₀₁, Osmanya₁₀₂, Pahawh Hmong₁₀₃, Palmyrene₁₀₄, Pau Cin Hau₁₀₅, Phoenician₁₀₇, Psalter Pahlavi₁₀₈, Rejang₁₀₉, Runic₁₁₀, Saurashtra₁₁₂, Sharada₁₁₃, Shavian₁₁₄, Siddham₁₁₅, Sinhala₁₁₆, Sogdian₁₁₇, Sora Sompeng₁₁₈, Soyombo₁₁₉, Sundanese₁₂₀, Syloti Nagri₁₂₁, Syriac₁₂₂, Tagalog₁₂₄, Tagbanwa₁₂₅, Tai Le₁₂₆, Tai Tham₁₂₇, Tai Viet₁₂₈, Takri₁₂₉, Tamil₁₃₀, Tamil Supplement₁₃₁, Telugu₁₃₂, Thaana₁₃₃, Thai₁₃₄, Tifinagh₁₃₅, Tirhuta₁₃₆, Ugaritic₁₃₇, Vai₁₃₈, Wancho₁₃₉, Warang Citi₁₄₀, Yi₁₄₁, Zanabazar Square₁₄₂. + 'acaaaabaaaaaaaaaaaabaaaabaaaabaaaaaabaaaaaabbaaaaaaaaaaaabaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaabaaabaaaaaaaaaabaaaaaaaaaaaaaaaaaa,' + // #116: 2 fonts: Noto Sans₀, Adlam₆. + 'af,' + // #117: 3 fonts: Noto Sans₀, Adlam₆, Arabic₈. + 'afb,' + // #118: 5 fonts: Noto Sans₀, Bengali₁₅, Devanagari₃₀, Grantha₃₈, Kannada₅₄. + 'aoohp,' + // #119: 2 fonts: Noto Sans₀, Caucasian Albanian₂₂. + 'av,' + // #120: 8 fonts: Noto Sans₀, Elbasan₃₃, HK₄₂, JP₅₀, KR₅₂, Math₇₄, SC₁₁₁, TC₁₂₃. + 'a1gihbv1kl,' + // #121: 7 fonts: Noto Sans₀, HK₄₂, JP₅₀, KR₅₂, SC₁₁₁, TC₁₂₃, Tamil₁₃₀. + 'a1phb2glg,' + // #122: 2 fonts: Noto Sans₀, Tifinagh₁₃₅. + 'a5e,' + // #123: 2 fonts: Symbols₄, Symbols 2₅. + 'ea,' + // #124: 7 fonts: Symbols₄, HK₄₂, JP₅₀, KR₅₂, Math₇₄, SC₁₁₁, TC₁₂₃. + 'e1lhbv1kl,' + // #125: 2 fonts: Arabic₈, Indic Siyaq Numbers₄₇. + 'i1m,' + // #126: 2 fonts: Arabic₈, Thaana₁₃₃. + 'i4u,' + // #127: 1 font: Avestan₁₀. 'k,' - // #128: 1 font: Bamum₁₁. + // #128: 1 font: Balinese₁₁. 'l,' - // #129: 1 font: Bassa Vah₁₂. + // #129: 1 font: Bamum₁₂. 'm,' - // #130: 1 font: Batak₁₃. + // #130: 1 font: Bassa Vah₁₃. 'n,' - // #131: 1 font: Buginese₁₇. - 'r,' - // #132: 1 font: Caucasian Albanian₂₁. - 'v,' - // #133: 1 font: Chakma₂₂. + // #131: 1 font: Batak₁₄. + 'o,' + // #132: 1 font: Buginese₁₈. + 's,' + // #133: 1 font: Caucasian Albanian₂₂. 'w,' - // #134: 6 fonts: HK₄₁, JP₄₉, KR₅₁, Mongolian₈₀, SC₁₁₀, TC₁₂₂. - '1phb1c1dl,' - // #135: 7 fonts: HK₄₁, JP₄₉, KR₅₁, Phags Pa₁₀₅, SC₁₁₀, TC₁₂₂, Yi₁₄₀. - '1phb2belr,' - // #136: 1 font: Imperial Aramaic₄₅. - '1t,' - // #137: 1 font: Inscriptional Pahlavi₄₇. - '1v,' - // #138: 1 font: Inscriptional Parthian₄₈. + // #134: 1 font: Chakma₂₃. + 'x,' + // #135: 6 fonts: HK₄₂, JP₅₀, KR₅₂, Mongolian₈₁, SC₁₁₁, TC₁₂₃. + '1qhb1c1dl,' + // #136: 7 fonts: HK₄₂, JP₅₀, KR₅₂, Phags Pa₁₀₆, SC₁₁₁, TC₁₂₃, Yi₁₄₁. + '1qhb2belr,' + // #137: 1 font: Imperial Aramaic₄₆. + '1u,' + // #138: 1 font: Inscriptional Pahlavi₄₈. '1w,' - // #139: 4 fonts: JP₄₉, KR₅₁, SC₁₁₀, TC₁₂₂. - '1xb2gl,' - // #140: 1 font: Kaithi₅₂. - '2a,' - // #141: 1 font: Kayah Li₅₄. - '2c,' - // #142: 1 font: Khojki₅₇. - '2f,' - // #143: 1 font: Khudawadi₅₈. + // #139: 1 font: Inscriptional Parthian₄₉. + '1x,' + // #140: 4 fonts: JP₅₀, KR₅₂, SC₁₁₁, TC₁₂₃. + '1yb2gl,' + // #141: 1 font: Kaithi₅₃. + '2b,' + // #142: 1 font: Kayah Li₅₅. + '2d,' + // #143: 1 font: Khojki₅₈. '2g,' - // #144: 2 fonts: Linear A₆₂, Linear B₆₃. - '2ka,' - // #145: 1 font: Lisu₆₄. - '2m,' - // #146: 1 font: Lydian₆₆. - '2o,' - // #147: 1 font: Mandaic₆₉. - '2r,' - // #148: 1 font: Manichaean₇₀. + // #144: 1 font: Khudawadi₅₉. + '2h,' + // #145: 2 fonts: Linear A₆₃, Linear B₆₄. + '2la,' + // #146: 1 font: Lisu₆₅. + '2n,' + // #147: 1 font: Lydian₆₇. + '2p,' + // #148: 1 font: Mandaic₇₀. '2s,' - // #149: 1 font: Modi₇₉. - '3b,' - // #150: 2 fonts: Mongolian₈₀, Phags Pa₁₀₅. - '3cy,' - // #151: 1 font: NKo₈₄. - '3g,' - // #152: 1 font: Nabataean₈₅. + // #149: 1 font: Manichaean₇₁. + '2t,' + // #150: 1 font: Modi₈₀. + '3c,' + // #151: 2 fonts: Mongolian₈₁, Phags Pa₁₀₆. + '3dy,' + // #152: 1 font: NKo₈₅. '3h,' - // #153: 1 font: Newa₈₇. - '3j,' - // #154: 1 font: Nushu₈₈. + // #153: 1 font: Nabataean₈₆. + '3i,' + // #154: 1 font: Newa₈₈. '3k,' - // #155: 1 font: Old Italic₉₂. - '3o,' - // #156: 1 font: Old Persian₉₅. - '3r,' - // #157: 1 font: Osage₁₀₀. - '3w,' - // #158: 1 font: Osmanya₁₀₁. + // #155: 1 font: Nushu₈₉. + '3l,' + // #156: 1 font: Old Italic₉₃. + '3p,' + // #157: 1 font: Old Persian₉₆. + '3s,' + // #158: 1 font: Osage₁₀₁. '3x,' - // #159: 1 font: Phoenician₁₀₆. - '4c,' - // #160: 1 font: Rejang₁₀₈. - '4e,' - // #161: 2 fonts: SC₁₁₀, TC₁₂₂. - '4gl,' - // #162: 1 font: Saurashtra₁₁₁. - '4h,' - // #163: 1 font: Siddham₁₁₄. - '4k,' - // #164: 1 font: Sora Sompeng₁₁₇. - '4n,' - // #165: 1 font: Sundanese₁₁₉. - '4p,' - // #166: 1 font: Tagalog₁₂₃. - '4t,' - // #167: 1 font: Tai Le₁₂₅. - '4v,' - // #168: 1 font: Tai Viet₁₂₇. - '4x,' - // #169: 1 font: Takri₁₂₈. + // #159: 1 font: Osmanya₁₀₂. + '3y,' + // #160: 1 font: Phoenician₁₀₇. + '4d,' + // #161: 1 font: Rejang₁₀₉. + '4f,' + // #162: 2 fonts: SC₁₁₁, TC₁₂₃. + '4hl,' + // #163: 1 font: Saurashtra₁₁₂. + '4i,' + // #164: 1 font: Siddham₁₁₅. + '4l,' + // #165: 1 font: Sora Sompeng₁₁₈. + '4o,' + // #166: 1 font: Sundanese₁₂₀. + '4q,' + // #167: 1 font: Tagalog₁₂₄. + '4u,' + // #168: 1 font: Tai Le₁₂₆. + '4w,' + // #169: 1 font: Tai Viet₁₂₈. '4y,' - // #170: 1 font: Tamil Supplement₁₃₀. - '5a,' - // #171: 1 font: Thai₁₃₃. - '5d,' - // #172: 1 font: Tirhuta₁₃₅. - '5f,' - // #173: 1 font: Ugaritic₁₃₆. + // #170: 1 font: Takri₁₂₉. + '4z,' + // #171: 1 font: Tamil Supplement₁₃₁. + '5b,' + // #172: 1 font: Thai₁₃₄. + '5e,' + // #173: 1 font: Tirhuta₁₃₆. '5g,' - // #174: 1 font: Wancho₁₃₈. - '5i,' - // #175: 1 font: Warang Citi₁₃₉. + // #174: 1 font: Ugaritic₁₃₇. + '5h,' + // #175: 1 font: Wancho₁₃₉. '5j,' - // #176: 1 font: Yi₁₄₀. + // #176: 1 font: Warang Citi₁₄₀. '5k,' - // #177: 3 fonts: Noto Sans₀, Noto Color Emoji₁, Noto Emoji₂. + // #177: 1 font: Yi₁₄₁. + '5l,' + // #178: 3 fonts: Noto Sans₀, Noto Color Emoji₁, Noto Emoji₂. 'aaa,' - // #178: 142 fonts: Noto Sans₀, Noto Color Emoji₁, Noto Emoji₂, Symbols₃, Symbols 2₄, Adlam₅, Anatolian Hieroglyphs₆, Arabic₇, Armenian₈, Avestan₉, Balinese₁₀, Bamum₁₁, Bassa Vah₁₂, Batak₁₃, Bengali₁₄, Bhaiksuki₁₅, Brahmi₁₆, Buginese₁₇, Buhid₁₈, Canadian Aboriginal₁₉, Carian₂₀, Caucasian Albanian₂₁, Chakma₂₂, Cham₂₃, Cherokee₂₄, Coptic₂₅, Cuneiform₂₆, Cypriot₂₇, Deseret₂₈, Devanagari₂₉, Duployan₃₀, Egyptian Hieroglyphs₃₁, Elbasan₃₂, Elymaic₃₃, Georgian₃₄, Glagolitic₃₅, Gothic₃₆, Grantha₃₇, Gujarati₃₈, Gunjala Gondi₃₉, Gurmukhi₄₀, HK₄₁, Hanunoo₄₂, Hatran₄₃, Hebrew₄₄, Imperial Aramaic₄₅, Indic Siyaq Numbers₄₆, Inscriptional Pahlavi₄₇, Inscriptional Parthian₄₈, JP₄₉, Javanese₅₀, KR₅₁, Kaithi₅₂, Kannada₅₃, Kayah Li₅₄, Kharoshthi₅₅, Khmer₅₆, Khojki₅₇, Khudawadi₅₈, Lao₅₉, Lepcha₆₀, Limbu₆₁, Linear A₆₂, Linear B₆₃, Lisu₆₄, Lycian₆₅, Lydian₆₆, Mahajani₆₇, Malayalam₆₈, Mandaic₆₉, Manichaean₇₀, Marchen₇₁, Masaram Gondi₇₂, Math₇₃, Mayan Numerals₇₄, Medefaidrin₇₅, Meetei Mayek₇₆, Meroitic₇₇, Miao₇₈, Modi₇₉, Mongolian₈₀, Mro₈₁, Multani₈₂, Myanmar₈₃, NKo₈₄, Nabataean₈₅, New Tai Lue₈₆, Newa₈₇, Nushu₈₈, Ogham₈₉, Ol Chiki₉₀, Old Hungarian₉₁, Old Italic₉₂, Old North Arabian₉₃, Old Permic₉₄, Old Persian₉₅, Old Sogdian₉₆, Old South Arabian₉₇, Old Turkic₉₈, Oriya₉₉, Osage₁₀₀, Osmanya₁₀₁, Pahawh Hmong₁₀₂, Palmyrene₁₀₃, Pau Cin Hau₁₀₄, Phags Pa₁₀₅, Phoenician₁₀₆, Psalter Pahlavi₁₀₇, Rejang₁₀₈, Runic₁₀₉, SC₁₁₀, Saurashtra₁₁₁, Sharada₁₁₂, Shavian₁₁₃, Siddham₁₁₄, Sinhala₁₁₅, Sogdian₁₁₆, Sora Sompeng₁₁₇, Soyombo₁₁₈, Sundanese₁₁₉, Syloti Nagri₁₂₀, Syriac₁₂₁, TC₁₂₂, Tagalog₁₂₃, Tagbanwa₁₂₄, Tai Le₁₂₅, Tai Tham₁₂₆, Tai Viet₁₂₇, Takri₁₂₈, Tamil₁₂₉, Tamil Supplement₁₃₀, Telugu₁₃₁, Thaana₁₃₂, Thai₁₃₃, Tifinagh₁₃₄, Tirhuta₁₃₅, Ugaritic₁₃₆, Vai₁₃₇, Wancho₁₃₈, Warang Citi₁₃₉, Yi₁₄₀, Zanabazar Square₁₄₁. - 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,' - // #179: 132 fonts: Noto Sans₀, Noto Color Emoji₁, Noto Emoji₂, Symbols₃, Symbols 2₄, Adlam₅, Anatolian Hieroglyphs₆, Arabic₇, Armenian₈, Avestan₉, Balinese₁₀, Bamum₁₁, Bassa Vah₁₂, Batak₁₃, Bengali₁₄, Brahmi₁₆, Buginese₁₇, Buhid₁₈, Canadian Aboriginal₁₉, Carian₂₀, Chakma₂₂, Cham₂₃, Cherokee₂₄, Coptic₂₅, Cuneiform₂₆, Deseret₂₈, Devanagari₂₉, Duployan₃₀, Egyptian Hieroglyphs₃₁, Elbasan₃₂, Georgian₃₄, Glagolitic₃₅, Gothic₃₆, Grantha₃₇, Gujarati₃₈, Gurmukhi₄₀, HK₄₁, Hanunoo₄₂, Hatran₄₃, Hebrew₄₄, Imperial Aramaic₄₅, Indic Siyaq Numbers₄₆, Inscriptional Pahlavi₄₇, Inscriptional Parthian₄₈, JP₄₉, Javanese₅₀, KR₅₁, Kaithi₅₂, Kannada₅₃, Kayah Li₅₄, Kharoshthi₅₅, Khmer₅₆, Khojki₅₇, Khudawadi₅₈, Lao₅₉, Lepcha₆₀, Limbu₆₁, Linear A₆₂, Linear B₆₃, Lisu₆₄, Lydian₆₆, Mahajani₆₇, Malayalam₆₈, Mandaic₆₉, Manichaean₇₀, Marchen₇₁, Masaram Gondi₇₂, Math₇₃, Mayan Numerals₇₄, Medefaidrin₇₅, Meetei Mayek₇₆, Meroitic₇₇, Miao₇₈, Modi₇₉, Mongolian₈₀, Mro₈₁, Multani₈₂, NKo₈₄, Nabataean₈₅, New Tai Lue₈₆, Newa₈₇, Nushu₈₈, Ogham₈₉, Ol Chiki₉₀, Old Italic₉₂, Old North Arabian₉₃, Old Permic₉₄, Old Persian₉₅, Old Sogdian₉₆, Old South Arabian₉₇, Oriya₉₉, Osage₁₀₀, Osmanya₁₀₁, Pahawh Hmong₁₀₂, Palmyrene₁₀₃, Pau Cin Hau₁₀₄, Phoenician₁₀₆, Psalter Pahlavi₁₀₇, Rejang₁₀₈, Runic₁₀₉, SC₁₁₀, Saurashtra₁₁₁, Sharada₁₁₂, Shavian₁₁₃, Siddham₁₁₄, Sinhala₁₁₅, Sogdian₁₁₆, Sora Sompeng₁₁₇, Soyombo₁₁₈, Sundanese₁₁₉, Syloti Nagri₁₂₀, Syriac₁₂₁, TC₁₂₂, Tagalog₁₂₃, Tagbanwa₁₂₄, Tai Le₁₂₅, Tai Tham₁₂₆, Tai Viet₁₂₇, Takri₁₂₈, Tamil₁₂₉, Tamil Supplement₁₃₀, Telugu₁₃₁, Thaana₁₃₂, Thai₁₃₃, Tifinagh₁₃₄, Tirhuta₁₃₅, Ugaritic₁₃₆, Vai₁₃₇, Wancho₁₃₈, Warang Citi₁₃₉, Yi₁₄₀, Zanabazar Square₁₄₁. - 'aaaaaaaaaaaaaaabaaaabaaaabaaaabaaaabaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaabaaaaaabaaaaabaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,' - // #180: 132 fonts: Noto Sans₀, Noto Color Emoji₁, Noto Emoji₂, Symbols₃, Symbols 2₄, Adlam₅, Anatolian Hieroglyphs₆, Armenian₈, Avestan₉, Balinese₁₀, Bamum₁₁, Bassa Vah₁₂, Batak₁₃, Bengali₁₄, Brahmi₁₆, Buginese₁₇, Buhid₁₈, Canadian Aboriginal₁₉, Carian₂₀, Chakma₂₂, Cham₂₃, Cherokee₂₄, Coptic₂₅, Cuneiform₂₆, Deseret₂₈, Devanagari₂₉, Duployan₃₀, Egyptian Hieroglyphs₃₁, Elbasan₃₂, Georgian₃₄, Glagolitic₃₅, Gothic₃₆, Grantha₃₇, Gujarati₃₈, Gunjala Gondi₃₉, Gurmukhi₄₀, HK₄₁, Hanunoo₄₂, Hatran₄₃, Hebrew₄₄, Imperial Aramaic₄₅, Indic Siyaq Numbers₄₆, Inscriptional Pahlavi₄₇, Inscriptional Parthian₄₈, JP₄₉, Javanese₅₀, KR₅₁, Kaithi₅₂, Kannada₅₃, Kayah Li₅₄, Kharoshthi₅₅, Khmer₅₆, Khojki₅₇, Khudawadi₅₈, Lao₅₉, Lepcha₆₀, Limbu₆₁, Linear A₆₂, Linear B₆₃, Lisu₆₄, Lydian₆₆, Mahajani₆₇, Malayalam₆₈, Mandaic₆₉, Manichaean₇₀, Marchen₇₁, Masaram Gondi₇₂, Math₇₃, Mayan Numerals₇₄, Medefaidrin₇₅, Meetei Mayek₇₆, Meroitic₇₇, Miao₇₈, Modi₇₉, Mongolian₈₀, Mro₈₁, Multani₈₂, NKo₈₄, Nabataean₈₅, New Tai Lue₈₆, Newa₈₇, Nushu₈₈, Ogham₈₉, Ol Chiki₉₀, Old Italic₉₂, Old North Arabian₉₃, Old Permic₉₄, Old Persian₉₅, Old Sogdian₉₆, Old South Arabian₉₇, Oriya₉₉, Osage₁₀₀, Osmanya₁₀₁, Pahawh Hmong₁₀₂, Palmyrene₁₀₃, Pau Cin Hau₁₀₄, Phoenician₁₀₆, Psalter Pahlavi₁₀₇, Rejang₁₀₈, Runic₁₀₉, SC₁₁₀, Saurashtra₁₁₁, Sharada₁₁₂, Shavian₁₁₃, Siddham₁₁₄, Sinhala₁₁₅, Sogdian₁₁₆, Sora Sompeng₁₁₇, Soyombo₁₁₈, Sundanese₁₁₉, Syloti Nagri₁₂₀, Syriac₁₂₁, TC₁₂₂, Tagalog₁₂₃, Tagbanwa₁₂₄, Tai Le₁₂₅, Tai Tham₁₂₆, Tai Viet₁₂₇, Takri₁₂₈, Tamil₁₂₉, Tamil Supplement₁₃₀, Telugu₁₃₁, Thaana₁₃₂, Thai₁₃₃, Tifinagh₁₃₄, Tirhuta₁₃₅, Ugaritic₁₃₆, Vai₁₃₇, Wancho₁₃₈, Warang Citi₁₃₉, Yi₁₄₀, Zanabazar Square₁₄₁. - 'aaaaaaabaaaaaabaaaabaaaabaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaabaaaaaabaaaaabaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,' - // #181: 131 fonts: Noto Sans₀, Noto Color Emoji₁, Noto Emoji₂, Symbols₃, Symbols 2₄, Adlam₅, Anatolian Hieroglyphs₆, Armenian₈, Avestan₉, Balinese₁₀, Bamum₁₁, Bassa Vah₁₂, Batak₁₃, Bengali₁₄, Brahmi₁₆, Buginese₁₇, Buhid₁₈, Canadian Aboriginal₁₉, Carian₂₀, Chakma₂₂, Cham₂₃, Cherokee₂₄, Coptic₂₅, Cuneiform₂₆, Deseret₂₈, Devanagari₂₉, Duployan₃₀, Egyptian Hieroglyphs₃₁, Elbasan₃₂, Georgian₃₄, Glagolitic₃₅, Gothic₃₆, Grantha₃₇, Gujarati₃₈, Gurmukhi₄₀, HK₄₁, Hanunoo₄₂, Hatran₄₃, Hebrew₄₄, Imperial Aramaic₄₅, Indic Siyaq Numbers₄₆, Inscriptional Pahlavi₄₇, Inscriptional Parthian₄₈, JP₄₉, Javanese₅₀, KR₅₁, Kaithi₅₂, Kannada₅₃, Kayah Li₅₄, Kharoshthi₅₅, Khmer₅₆, Khojki₅₇, Khudawadi₅₈, Lao₅₉, Lepcha₆₀, Limbu₆₁, Linear A₆₂, Linear B₆₃, Lisu₆₄, Lydian₆₆, Mahajani₆₇, Malayalam₆₈, Mandaic₆₉, Manichaean₇₀, Marchen₇₁, Masaram Gondi₇₂, Math₇₃, Mayan Numerals₇₄, Medefaidrin₇₅, Meetei Mayek₇₆, Meroitic₇₇, Miao₇₈, Modi₇₉, Mongolian₈₀, Mro₈₁, Multani₈₂, NKo₈₄, Nabataean₈₅, New Tai Lue₈₆, Newa₈₇, Nushu₈₈, Ogham₈₉, Ol Chiki₉₀, Old Italic₉₂, Old North Arabian₉₃, Old Permic₉₄, Old Persian₉₅, Old Sogdian₉₆, Old South Arabian₉₇, Oriya₉₉, Osage₁₀₀, Osmanya₁₀₁, Pahawh Hmong₁₀₂, Palmyrene₁₀₃, Pau Cin Hau₁₀₄, Phoenician₁₀₆, Psalter Pahlavi₁₀₇, Rejang₁₀₈, Runic₁₀₉, SC₁₁₀, Saurashtra₁₁₁, Sharada₁₁₂, Shavian₁₁₃, Siddham₁₁₄, Sinhala₁₁₅, Sogdian₁₁₆, Sora Sompeng₁₁₇, Soyombo₁₁₈, Sundanese₁₁₉, Syloti Nagri₁₂₀, Syriac₁₂₁, TC₁₂₂, Tagalog₁₂₃, Tagbanwa₁₂₄, Tai Le₁₂₅, Tai Tham₁₂₆, Tai Viet₁₂₇, Takri₁₂₈, Tamil₁₂₉, Tamil Supplement₁₃₀, Telugu₁₃₁, Thaana₁₃₂, Thai₁₃₃, Tifinagh₁₃₄, Tirhuta₁₃₅, Ugaritic₁₃₆, Vai₁₃₇, Wancho₁₃₈, Warang Citi₁₃₉, Yi₁₄₀, Zanabazar Square₁₄₁. - 'aaaaaaabaaaaaabaaaabaaaabaaaabaaaabaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaabaaaaaabaaaaabaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,' - // #182: 69 fonts: Noto Sans₀, Noto Color Emoji₁, Noto Emoji₂, Arabic₇, Avestan₉, Balinese₁₀, Batak₁₃, Bengali₁₄, Brahmi₁₆, Buginese₁₇, Buhid₁₈, Chakma₂₂, Cham₂₃, Devanagari₂₉, Egyptian Hieroglyphs₃₁, Grantha₃₇, Gujarati₃₈, Gunjala Gondi₃₉, Gurmukhi₄₀, Hanunoo₄₂, Hebrew₄₄, Javanese₅₀, Kaithi₅₂, Kannada₅₃, Kayah Li₅₄, Kharoshthi₅₅, Khmer₅₆, Khojki₅₇, Khudawadi₅₈, Lao₅₉, Lepcha₆₀, Limbu₆₁, Mahajani₆₇, Malayalam₆₈, Mandaic₆₉, Manichaean₇₀, Meetei Mayek₇₆, Modi₇₉, Mongolian₈₀, Myanmar₈₃, NKo₈₄, New Tai Lue₈₆, Newa₈₇, Old Hungarian₉₁, Oriya₉₉, Pahawh Hmong₁₀₂, Phags Pa₁₀₅, Psalter Pahlavi₁₀₇, Rejang₁₀₈, Saurashtra₁₁₁, Sharada₁₁₂, Siddham₁₁₄, Sinhala₁₁₅, Sundanese₁₁₉, Syloti Nagri₁₂₀, Syriac₁₂₁, Tagalog₁₂₃, Tagbanwa₁₂₄, Tai Le₁₂₅, Tai Tham₁₂₆, Tai Viet₁₂₇, Takri₁₂₈, Tamil₁₂₉, Telugu₁₃₁, Thaana₁₃₂, Thai₁₃₃, Tifinagh₁₃₄, Tirhuta₁₃₅, Warang Citi₁₃₉. - 'aaaebacabaadafbfaaabbfbaaaaaaaaafaaafcacabadhccbacabadaabaaaaaabaaaad,' - // #183: 9 fonts: Noto Sans₀, Noto Color Emoji₁, Noto Emoji₂, HK₄₁, JP₄₉, KR₅₁, Mongolian₈₀, SC₁₁₀, TC₁₂₂. - 'aaa1mhb1c1dl,' - // #184: 8 fonts: Noto Sans₀, Noto Color Emoji₁, Noto Emoji₂, HK₄₁, JP₄₉, KR₅₁, SC₁₁₀, TC₁₂₂. - 'aaa1mhb2gl,' - // #185: 140 fonts: Noto Sans₀, Symbols₃, Symbols 2₄, Adlam₅, Anatolian Hieroglyphs₆, Arabic₇, Armenian₈, Avestan₉, Balinese₁₀, Bamum₁₁, Bassa Vah₁₂, Batak₁₃, Bengali₁₄, Bhaiksuki₁₅, Brahmi₁₆, Buginese₁₇, Buhid₁₈, Canadian Aboriginal₁₉, Carian₂₀, Caucasian Albanian₂₁, Chakma₂₂, Cham₂₃, Cherokee₂₄, Coptic₂₅, Cuneiform₂₆, Cypriot₂₇, Deseret₂₈, Devanagari₂₉, Duployan₃₀, Egyptian Hieroglyphs₃₁, Elbasan₃₂, Elymaic₃₃, Georgian₃₄, Glagolitic₃₅, Gothic₃₆, Grantha₃₇, Gujarati₃₈, Gunjala Gondi₃₉, Gurmukhi₄₀, HK₄₁, Hanunoo₄₂, Hatran₄₃, Hebrew₄₄, Imperial Aramaic₄₅, Indic Siyaq Numbers₄₆, Inscriptional Pahlavi₄₇, Inscriptional Parthian₄₈, JP₄₉, Javanese₅₀, KR₅₁, Kaithi₅₂, Kannada₅₃, Kayah Li₅₄, Kharoshthi₅₅, Khmer₅₆, Khojki₅₇, Khudawadi₅₈, Lao₅₉, Lepcha₆₀, Limbu₆₁, Linear A₆₂, Linear B₆₃, Lisu₆₄, Lycian₆₅, Lydian₆₆, Mahajani₆₇, Malayalam₆₈, Mandaic₆₉, Manichaean₇₀, Marchen₇₁, Masaram Gondi₇₂, Math₇₃, Mayan Numerals₇₄, Medefaidrin₇₅, Meetei Mayek₇₆, Meroitic₇₇, Miao₇₈, Modi₇₉, Mongolian₈₀, Mro₈₁, Multani₈₂, Myanmar₈₃, NKo₈₄, Nabataean₈₅, New Tai Lue₈₆, Newa₈₇, Nushu₈₈, Ogham₈₉, Ol Chiki₉₀, Old Hungarian₉₁, Old Italic₉₂, Old North Arabian₉₃, Old Permic₉₄, Old Persian₉₅, Old Sogdian₉₆, Old South Arabian₉₇, Old Turkic₉₈, Oriya₉₉, Osage₁₀₀, Osmanya₁₀₁, Pahawh Hmong₁₀₂, Palmyrene₁₀₃, Pau Cin Hau₁₀₄, Phags Pa₁₀₅, Phoenician₁₀₆, Psalter Pahlavi₁₀₇, Rejang₁₀₈, Runic₁₀₉, SC₁₁₀, Saurashtra₁₁₁, Sharada₁₁₂, Shavian₁₁₃, Siddham₁₁₄, Sinhala₁₁₅, Sogdian₁₁₆, Sora Sompeng₁₁₇, Soyombo₁₁₈, Sundanese₁₁₉, Syloti Nagri₁₂₀, Syriac₁₂₁, TC₁₂₂, Tagalog₁₂₃, Tagbanwa₁₂₄, Tai Le₁₂₅, Tai Tham₁₂₆, Tai Viet₁₂₇, Takri₁₂₈, Tamil₁₂₉, Tamil Supplement₁₃₀, Telugu₁₃₁, Thaana₁₃₂, Thai₁₃₃, Tifinagh₁₃₄, Tirhuta₁₃₅, Ugaritic₁₃₆, Vai₁₃₇, Wancho₁₃₈, Warang Citi₁₃₉, Yi₁₄₀, Zanabazar Square₁₄₁. - 'acaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,' - // #186: 130 fonts: Noto Sans₀, Symbols₃, Symbols 2₄, Adlam₅, Anatolian Hieroglyphs₆, Arabic₇, Armenian₈, Avestan₉, Balinese₁₀, Bamum₁₁, Bassa Vah₁₂, Batak₁₃, Bengali₁₄, Brahmi₁₆, Buginese₁₇, Buhid₁₈, Canadian Aboriginal₁₉, Carian₂₀, Chakma₂₂, Cham₂₃, Cherokee₂₄, Coptic₂₅, Cuneiform₂₆, Deseret₂₈, Devanagari₂₉, Duployan₃₀, Egyptian Hieroglyphs₃₁, Elbasan₃₂, Georgian₃₄, Glagolitic₃₅, Gothic₃₆, Grantha₃₇, Gujarati₃₈, Gunjala Gondi₃₉, Gurmukhi₄₀, HK₄₁, Hanunoo₄₂, Hatran₄₃, Hebrew₄₄, Imperial Aramaic₄₅, Indic Siyaq Numbers₄₆, Inscriptional Pahlavi₄₇, Inscriptional Parthian₄₈, JP₄₉, Javanese₅₀, KR₅₁, Kaithi₅₂, Kannada₅₃, Kayah Li₅₄, Kharoshthi₅₅, Khmer₅₆, Khojki₅₇, Khudawadi₅₈, Lao₅₉, Lepcha₆₀, Limbu₆₁, Linear A₆₂, Linear B₆₃, Lisu₆₄, Lydian₆₆, Mahajani₆₇, Malayalam₆₈, Mandaic₆₉, Manichaean₇₀, Marchen₇₁, Masaram Gondi₇₂, Math₇₃, Mayan Numerals₇₄, Medefaidrin₇₅, Meetei Mayek₇₆, Meroitic₇₇, Miao₇₈, Modi₇₉, Mongolian₈₀, Mro₈₁, Multani₈₂, NKo₈₄, Nabataean₈₅, New Tai Lue₈₆, Newa₈₇, Nushu₈₈, Ogham₈₉, Ol Chiki₉₀, Old Italic₉₂, Old North Arabian₉₃, Old Permic₉₄, Old Persian₉₅, Old Sogdian₉₆, Old South Arabian₉₇, Osage₁₀₀, Osmanya₁₀₁, Pahawh Hmong₁₀₂, Palmyrene₁₀₃, Pau Cin Hau₁₀₄, Phoenician₁₀₆, Psalter Pahlavi₁₀₇, Rejang₁₀₈, Runic₁₀₉, SC₁₁₀, Saurashtra₁₁₁, Sharada₁₁₂, Shavian₁₁₃, Siddham₁₁₄, Sinhala₁₁₅, Sogdian₁₁₆, Sora Sompeng₁₁₇, Soyombo₁₁₈, Sundanese₁₁₉, Syloti Nagri₁₂₀, Syriac₁₂₁, TC₁₂₂, Tagalog₁₂₃, Tagbanwa₁₂₄, Tai Le₁₂₅, Tai Tham₁₂₆, Tai Viet₁₂₇, Takri₁₂₈, Tamil₁₂₉, Tamil Supplement₁₃₀, Telugu₁₃₁, Thaana₁₃₂, Thai₁₃₃, Tifinagh₁₃₄, Tirhuta₁₃₅, Ugaritic₁₃₆, Vai₁₃₇, Wancho₁₃₈, Warang Citi₁₃₉, Yi₁₄₀, Zanabazar Square₁₄₁. - 'acaaaaaaaaaaabaaaabaaaabaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaabaaaaaabaaaaacaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,' - // #187: 129 fonts: Noto Sans₀, Symbols₃, Symbols 2₄, Adlam₅, Anatolian Hieroglyphs₆, Armenian₈, Avestan₉, Balinese₁₀, Bamum₁₁, Bassa Vah₁₂, Batak₁₃, Bengali₁₄, Brahmi₁₆, Buginese₁₇, Buhid₁₈, Canadian Aboriginal₁₉, Carian₂₀, Caucasian Albanian₂₁, Chakma₂₂, Cham₂₃, Cherokee₂₄, Coptic₂₅, Cuneiform₂₆, Deseret₂₈, Devanagari₂₉, Duployan₃₀, Egyptian Hieroglyphs₃₁, Elbasan₃₂, Georgian₃₄, Glagolitic₃₅, Gothic₃₆, Grantha₃₇, Gujarati₃₈, Gurmukhi₄₀, HK₄₁, Hanunoo₄₂, Hatran₄₃, Hebrew₄₄, Imperial Aramaic₄₅, Indic Siyaq Numbers₄₆, Inscriptional Pahlavi₄₇, Inscriptional Parthian₄₈, JP₄₉, Javanese₅₀, KR₅₁, Kaithi₅₂, Kannada₅₃, Kayah Li₅₄, Kharoshthi₅₅, Khmer₅₆, Khojki₅₇, Khudawadi₅₈, Lao₅₉, Lepcha₆₀, Limbu₆₁, Linear A₆₂, Linear B₆₃, Lisu₆₄, Lydian₆₆, Mahajani₆₇, Malayalam₆₈, Mandaic₆₉, Manichaean₇₀, Marchen₇₁, Masaram Gondi₇₂, Mayan Numerals₇₄, Medefaidrin₇₅, Meetei Mayek₇₆, Meroitic₇₇, Miao₇₈, Modi₇₉, Mongolian₈₀, Mro₈₁, Multani₈₂, NKo₈₄, Nabataean₈₅, New Tai Lue₈₆, Newa₈₇, Nushu₈₈, Ogham₈₉, Ol Chiki₉₀, Old Italic₉₂, Old North Arabian₉₃, Old Permic₉₄, Old Persian₉₅, Old Sogdian₉₆, Old South Arabian₉₇, Oriya₉₉, Osage₁₀₀, Osmanya₁₀₁, Pahawh Hmong₁₀₂, Palmyrene₁₀₃, Pau Cin Hau₁₀₄, Phoenician₁₀₆, Psalter Pahlavi₁₀₇, Rejang₁₀₈, Runic₁₀₉, SC₁₁₀, Saurashtra₁₁₁, Sharada₁₁₂, Shavian₁₁₃, Siddham₁₁₄, Sinhala₁₁₅, Sogdian₁₁₆, Sora Sompeng₁₁₇, Soyombo₁₁₈, Sundanese₁₁₉, Syloti Nagri₁₂₀, Syriac₁₂₁, TC₁₂₂, Tagalog₁₂₃, Tagbanwa₁₂₄, Tai Le₁₂₅, Tai Tham₁₂₆, Tai Viet₁₂₇, Takri₁₂₈, Tamil₁₂₉, Tamil Supplement₁₃₀, Telugu₁₃₁, Thaana₁₃₂, Thai₁₃₃, Tifinagh₁₃₄, Tirhuta₁₃₅, Ugaritic₁₃₆, Vai₁₃₇, Wancho₁₃₈, Warang Citi₁₃₉, Yi₁₄₀, Zanabazar Square₁₄₁. - 'acaaabaaaaaabaaaaaaaaaabaaaabaaaabaaaaaaaaaaaaaaaaaaaaaaaabaaaaaabaaaaaaaabaaaaaabaaaaabaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,' - // #188: 131 fonts: Noto Sans₀, Symbols₃, Symbols 2₄, Adlam₅, Anatolian Hieroglyphs₆, Armenian₈, Avestan₉, Balinese₁₀, Bamum₁₁, Bassa Vah₁₂, Batak₁₃, Bengali₁₄, Brahmi₁₆, Buginese₁₇, Buhid₁₈, Canadian Aboriginal₁₉, Carian₂₀, Chakma₂₂, Cham₂₃, Cherokee₂₄, Coptic₂₅, Cuneiform₂₆, Deseret₂₈, Devanagari₂₉, Duployan₃₀, Egyptian Hieroglyphs₃₁, Elbasan₃₂, Georgian₃₄, Glagolitic₃₅, Gothic₃₆, Grantha₃₇, Gujarati₃₈, Gunjala Gondi₃₉, Gurmukhi₄₀, HK₄₁, Hanunoo₄₂, Hatran₄₃, Hebrew₄₄, Imperial Aramaic₄₅, Indic Siyaq Numbers₄₆, Inscriptional Pahlavi₄₇, Inscriptional Parthian₄₈, JP₄₉, Javanese₅₀, KR₅₁, Kaithi₅₂, Kannada₅₃, Kayah Li₅₄, Kharoshthi₅₅, Khmer₅₆, Khojki₅₇, Khudawadi₅₈, Lao₅₉, Lepcha₆₀, Limbu₆₁, Linear A₆₂, Linear B₆₃, Lisu₆₄, Lydian₆₆, Mahajani₆₇, Malayalam₆₈, Mandaic₆₉, Manichaean₇₀, Marchen₇₁, Masaram Gondi₇₂, Math₇₃, Mayan Numerals₇₄, Medefaidrin₇₅, Meetei Mayek₇₆, Meroitic₇₇, Miao₇₈, Modi₇₉, Mongolian₈₀, Mro₈₁, Multani₈₂, Myanmar₈₃, NKo₈₄, Nabataean₈₅, New Tai Lue₈₆, Newa₈₇, Nushu₈₈, Ogham₈₉, Ol Chiki₉₀, Old Italic₉₂, Old North Arabian₉₃, Old Permic₉₄, Old Persian₉₅, Old Sogdian₉₆, Old South Arabian₉₇, Oriya₉₉, Osage₁₀₀, Osmanya₁₀₁, Pahawh Hmong₁₀₂, Palmyrene₁₀₃, Pau Cin Hau₁₀₄, Phoenician₁₀₆, Psalter Pahlavi₁₀₇, Rejang₁₀₈, Runic₁₀₉, SC₁₁₀, Saurashtra₁₁₁, Sharada₁₁₂, Shavian₁₁₃, Siddham₁₁₄, Sinhala₁₁₅, Sogdian₁₁₆, Sora Sompeng₁₁₇, Soyombo₁₁₈, Sundanese₁₁₉, Syloti Nagri₁₂₀, Syriac₁₂₁, TC₁₂₂, Tagalog₁₂₃, Tagbanwa₁₂₄, Tai Le₁₂₅, Tai Tham₁₂₆, Tai Viet₁₂₇, Takri₁₂₈, Tamil₁₂₉, Tamil Supplement₁₃₀, Telugu₁₃₁, Thaana₁₃₂, Thai₁₃₃, Tifinagh₁₃₄, Tirhuta₁₃₅, Ugaritic₁₃₆, Vai₁₃₇, Wancho₁₃₈, Warang Citi₁₃₉, Yi₁₄₀, Zanabazar Square₁₄₁. - 'acaaabaaaaaabaaaabaaaabaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaabaaaaabaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,' - // #189: 131 fonts: Noto Sans₀, Symbols₃, Symbols 2₄, Adlam₅, Anatolian Hieroglyphs₆, Armenian₈, Avestan₉, Balinese₁₀, Bamum₁₁, Bassa Vah₁₂, Batak₁₃, Bengali₁₄, Brahmi₁₆, Buginese₁₇, Buhid₁₈, Canadian Aboriginal₁₉, Carian₂₀, Chakma₂₂, Cham₂₃, Cherokee₂₄, Coptic₂₅, Cuneiform₂₆, Deseret₂₈, Devanagari₂₉, Duployan₃₀, Egyptian Hieroglyphs₃₁, Elbasan₃₂, Georgian₃₄, Glagolitic₃₅, Gothic₃₆, Grantha₃₇, Gujarati₃₈, Gunjala Gondi₃₉, Gurmukhi₄₀, HK₄₁, Hanunoo₄₂, Hatran₄₃, Hebrew₄₄, Imperial Aramaic₄₅, Indic Siyaq Numbers₄₆, Inscriptional Pahlavi₄₇, Inscriptional Parthian₄₈, JP₄₉, Javanese₅₀, KR₅₁, Kaithi₅₂, Kannada₅₃, Kayah Li₅₄, Kharoshthi₅₅, Khmer₅₆, Khojki₅₇, Khudawadi₅₈, Lao₅₉, Lepcha₆₀, Limbu₆₁, Linear A₆₂, Linear B₆₃, Lisu₆₄, Lydian₆₆, Mahajani₆₇, Malayalam₆₈, Mandaic₆₉, Manichaean₇₀, Marchen₇₁, Masaram Gondi₇₂, Mayan Numerals₇₄, Medefaidrin₇₅, Meetei Mayek₇₆, Meroitic₇₇, Miao₇₈, Modi₇₉, Mongolian₈₀, Mro₈₁, Multani₈₂, Myanmar₈₃, NKo₈₄, Nabataean₈₅, New Tai Lue₈₆, Newa₈₇, Nushu₈₈, Ogham₈₉, Ol Chiki₉₀, Old Italic₉₂, Old North Arabian₉₃, Old Permic₉₄, Old Persian₉₅, Old Sogdian₉₆, Old South Arabian₉₇, Oriya₉₉, Osage₁₀₀, Osmanya₁₀₁, Pahawh Hmong₁₀₂, Palmyrene₁₀₃, Pau Cin Hau₁₀₄, Phags Pa₁₀₅, Phoenician₁₀₆, Psalter Pahlavi₁₀₇, Rejang₁₀₈, Runic₁₀₉, SC₁₁₀, Saurashtra₁₁₁, Sharada₁₁₂, Shavian₁₁₃, Siddham₁₁₄, Sinhala₁₁₅, Sogdian₁₁₆, Sora Sompeng₁₁₇, Soyombo₁₁₈, Sundanese₁₁₉, Syloti Nagri₁₂₀, Syriac₁₂₁, TC₁₂₂, Tagalog₁₂₃, Tagbanwa₁₂₄, Tai Le₁₂₅, Tai Tham₁₂₆, Tai Viet₁₂₇, Takri₁₂₈, Tamil₁₂₉, Tamil Supplement₁₃₀, Telugu₁₃₁, Thaana₁₃₂, Thai₁₃₃, Tifinagh₁₃₄, Tirhuta₁₃₅, Ugaritic₁₃₆, Vai₁₃₇, Wancho₁₃₈, Warang Citi₁₃₉, Yi₁₄₀, Zanabazar Square₁₄₁. - 'acaaabaaaaaabaaaabaaaabaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaabaaaaaaaaaaaaaaaabaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,' - // #190: 127 fonts: Noto Sans₀, Symbols₃, Symbols 2₄, Adlam₅, Anatolian Hieroglyphs₆, Armenian₈, Avestan₉, Balinese₁₀, Bamum₁₁, Bassa Vah₁₂, Batak₁₃, Bengali₁₄, Brahmi₁₆, Buginese₁₇, Buhid₁₈, Canadian Aboriginal₁₉, Carian₂₀, Chakma₂₂, Cham₂₃, Cherokee₂₄, Coptic₂₅, Cuneiform₂₆, Deseret₂₈, Devanagari₂₉, Egyptian Hieroglyphs₃₁, Elbasan₃₂, Georgian₃₄, Glagolitic₃₅, Gothic₃₆, Grantha₃₇, Gujarati₃₈, Gurmukhi₄₀, HK₄₁, Hanunoo₄₂, Hatran₄₃, Hebrew₄₄, Imperial Aramaic₄₅, Indic Siyaq Numbers₄₆, Inscriptional Pahlavi₄₇, Inscriptional Parthian₄₈, JP₄₉, Javanese₅₀, KR₅₁, Kaithi₅₂, Kannada₅₃, Kayah Li₅₄, Kharoshthi₅₅, Khmer₅₆, Khojki₅₇, Khudawadi₅₈, Lao₅₉, Lepcha₆₀, Limbu₆₁, Linear A₆₂, Linear B₆₃, Lisu₆₄, Lydian₆₆, Mahajani₆₇, Malayalam₆₈, Mandaic₆₉, Manichaean₇₀, Marchen₇₁, Masaram Gondi₇₂, Mayan Numerals₇₄, Medefaidrin₇₅, Meetei Mayek₇₆, Meroitic₇₇, Miao₇₈, Modi₇₉, Mongolian₈₀, Mro₈₁, Multani₈₂, NKo₈₄, Nabataean₈₅, New Tai Lue₈₆, Newa₈₇, Nushu₈₈, Ogham₈₉, Ol Chiki₉₀, Old Italic₉₂, Old North Arabian₉₃, Old Permic₉₄, Old Persian₉₅, Old Sogdian₉₆, Old South Arabian₉₇, Oriya₉₉, Osage₁₀₀, Osmanya₁₀₁, Pahawh Hmong₁₀₂, Palmyrene₁₀₃, Pau Cin Hau₁₀₄, Phoenician₁₀₆, Psalter Pahlavi₁₀₇, Rejang₁₀₈, Runic₁₀₉, SC₁₁₀, Saurashtra₁₁₁, Sharada₁₁₂, Shavian₁₁₃, Siddham₁₁₄, Sinhala₁₁₅, Sogdian₁₁₆, Sora Sompeng₁₁₇, Soyombo₁₁₈, Sundanese₁₁₉, Syloti Nagri₁₂₀, Syriac₁₂₁, TC₁₂₂, Tagalog₁₂₃, Tagbanwa₁₂₄, Tai Le₁₂₅, Tai Tham₁₂₆, Tai Viet₁₂₇, Takri₁₂₈, Tamil₁₂₉, Tamil Supplement₁₃₀, Telugu₁₃₁, Thaana₁₃₂, Thai₁₃₃, Tifinagh₁₃₄, Tirhuta₁₃₅, Ugaritic₁₃₆, Vai₁₃₇, Wancho₁₃₈, Warang Citi₁₃₉, Yi₁₄₀, Zanabazar Square₁₄₁. - 'acaaabaaaaaabaaaabaaaabababaaaabaaaaaaaaaaaaaaaaaaaaaaaabaaaaaabaaaaaaaabaaaaaabaaaaabaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,' - // #191: 94 fonts: Noto Sans₀, Symbols₃, Symbols 2₄, Adlam₅, Arabic₇, Armenian₈, Balinese₁₀, Bamum₁₁, Bassa Vah₁₂, Batak₁₃, Bengali₁₄, Bhaiksuki₁₅, Brahmi₁₆, Buginese₁₇, Buhid₁₈, Canadian Aboriginal₁₉, Caucasian Albanian₂₁, Chakma₂₂, Cham₂₃, Coptic₂₅, Devanagari₂₉, Duployan₃₀, Egyptian Hieroglyphs₃₁, Elbasan₃₂, Gothic₃₆, Grantha₃₇, Gujarati₃₈, Gunjala Gondi₃₉, Gurmukhi₄₀, HK₄₁, Hanunoo₄₂, Hebrew₄₄, JP₄₉, Javanese₅₀, KR₅₁, Kaithi₅₂, Kannada₅₃, Kayah Li₅₄, Kharoshthi₅₅, Khmer₅₆, Khojki₅₇, Khudawadi₅₈, Lao₅₉, Lepcha₆₀, Limbu₆₁, Lisu₆₄, Mahajani₆₇, Malayalam₆₈, Mandaic₆₉, Manichaean₇₀, Marchen₇₁, Masaram Gondi₇₂, Math₇₃, Meetei Mayek₇₆, Miao₇₈, Modi₇₉, Mongolian₈₀, Myanmar₈₃, NKo₈₄, New Tai Lue₈₆, Newa₈₇, Old Permic₉₄, Old Sogdian₉₆, Oriya₉₉, Osage₁₀₀, Pahawh Hmong₁₀₂, Phags Pa₁₀₅, Psalter Pahlavi₁₀₇, Rejang₁₀₈, Runic₁₀₉, SC₁₁₀, Saurashtra₁₁₁, Sharada₁₁₂, Siddham₁₁₄, Sinhala₁₁₅, Sogdian₁₁₆, Soyombo₁₁₈, Sundanese₁₁₉, Syloti Nagri₁₂₀, Syriac₁₂₁, TC₁₂₂, Tagalog₁₂₃, Tagbanwa₁₂₄, Tai Le₁₂₅, Tai Viet₁₂₇, Takri₁₂₈, Tamil₁₂₉, Telugu₁₃₁, Thaana₁₃₂, Thai₁₃₃, Tifinagh₁₃₄, Tirhuta₁₃₅, Wancho₁₃₈, Zanabazar Square₁₄₁. - 'acaababaaaaaaaaabaabdaaadaaaaaabeaaaaaaaaaaaaccaaaaaacbaacabagbcabcbaaaaabaabaaaaaaabaabaaaacc,' - // #192: 100 fonts: Noto Sans₀, Symbols₃, Adlam₅, Anatolian Hieroglyphs₆, Armenian₈, Balinese₁₀, Bassa Vah₁₂, Batak₁₃, Bengali₁₄, Brahmi₁₆, Buginese₁₇, Buhid₁₈, Canadian Aboriginal₁₉, Chakma₂₂, Cham₂₃, Cherokee₂₄, Coptic₂₅, Cuneiform₂₆, Deseret₂₈, Egyptian Hieroglyphs₃₁, Georgian₃₄, Glagolitic₃₅, Gothic₃₆, Grantha₃₇, HK₄₁, Hanunoo₄₂, Hatran₄₃, Hebrew₄₄, Imperial Aramaic₄₅, Indic Siyaq Numbers₄₆, Inscriptional Pahlavi₄₇, JP₄₉, Javanese₅₀, KR₅₁, Kaithi₅₂, Kayah Li₅₄, Khmer₅₆, Khojki₅₇, Khudawadi₅₈, Lao₅₉, Limbu₆₁, Linear B₆₃, Lisu₆₄, Lydian₆₆, Mahajani₆₇, Mandaic₆₉, Manichaean₇₀, Marchen₇₁, Masaram Gondi₇₂, Mayan Numerals₇₄, Medefaidrin₇₅, Meetei Mayek₇₆, Meroitic₇₇, Miao₇₈, Modi₇₉, Mongolian₈₀, Mro₈₁, Multani₈₂, NKo₈₄, Nabataean₈₅, New Tai Lue₈₆, Ogham₈₉, Ol Chiki₉₀, Old Italic₉₂, Old North Arabian₉₃, Old Permic₉₄, Old Persian₉₅, Old Sogdian₉₆, Old South Arabian₉₇, Oriya₉₉, Osage₁₀₀, Osmanya₁₀₁, Pahawh Hmong₁₀₂, Palmyrene₁₀₃, Pau Cin Hau₁₀₄, Phoenician₁₀₆, Psalter Pahlavi₁₀₇, Rejang₁₀₈, Runic₁₀₉, SC₁₁₀, Shavian₁₁₃, Siddham₁₁₄, Sinhala₁₁₅, Sogdian₁₁₆, Sora Sompeng₁₁₇, Soyombo₁₁₈, Syloti Nagri₁₂₀, TC₁₂₂, Tagalog₁₂₃, Tagbanwa₁₂₄, Tai Le₁₂₅, Tai Tham₁₂₆, Thaana₁₃₂, Thai₁₃₃, Tirhuta₁₃₅, Ugaritic₁₃₆, Vai₁₃₇, Wancho₁₃₈, Warang Citi₁₃₉, Yi₁₄₀. - 'acbabbbaabaaacaaaabccaaadaaaaaabaaabbaaabbababaaabaaaaaaaabaacabaaaaabaaaaabaaaacaaaaabbaaaafabaaaaa,' - // #193: 4 fonts: Noto Sans₀, Adlam₅, Duployan₃₀, Syriac₁₂₁. - 'aey3m,' - // #194: 41 fonts: Noto Sans₀, Anatolian Hieroglyphs₆, Arabic₇, Balinese₁₀, Batak₁₃, Bengali₁₄, Bhaiksuki₁₅, Brahmi₁₆, Buginese₁₇, Buhid₁₈, Devanagari₂₉, Gujarati₃₈, Gurmukhi₄₀, Hanunoo₄₂, Javanese₅₀, Kaithi₅₂, Kannada₅₃, Kharoshthi₅₅, Khmer₅₆, Lao₅₉, Lepcha₆₀, Limbu₆₁, Malayalam₆₈, Meetei Mayek₇₆, Myanmar₈₃, Oriya₉₉, Phags Pa₁₀₅, Rejang₁₀₈, Saurashtra₁₁₁, Sinhala₁₁₅, Sundanese₁₁₉, Syloti Nagri₁₂₀, Tagalog₁₂₃, Tagbanwa₁₂₄, Tai Le₁₂₅, Tai Tham₁₂₆, Tai Viet₁₂₇, Tamil₁₂₉, Telugu₁₃₁, Thaana₁₃₂, Thai₁₃₃. - 'afaccaaaaakibbhbabacaaghgpfccddacaaaabbaa,' - // #195: 29 fonts: Noto Sans₀, Arabic₇, Armenian₈, Bengali₁₄, Coptic₂₅, Devanagari₂₉, Georgian₃₄, Gujarati₃₈, Gurmukhi₄₀, HK₄₁, Hebrew₄₄, JP₄₉, KR₅₁, Kaithi₅₂, Kannada₅₃, Kayah Li₅₄, Kharoshthi₅₅, Khmer₅₆, Lisu₆₄, Malayalam₆₈, Oriya₉₉, SC₁₁₀, Sora Sompeng₁₁₇, Sundanese₁₁₉, Syloti Nagri₁₂₀, TC₁₂₂, Tamil₁₂₉, Telugu₁₃₁, Thai₁₃₃. - 'agafkdedbacebaaaaahd1ekgbabgbb,' - // #196: 69 fonts: Noto Sans₀, Arabic₇, Avestan₉, Balinese₁₀, Batak₁₃, Bengali₁₄, Brahmi₁₆, Buginese₁₇, Buhid₁₈, Chakma₂₂, Cham₂₃, Devanagari₂₉, Duployan₃₀, Egyptian Hieroglyphs₃₁, Grantha₃₇, Gujarati₃₈, Gunjala Gondi₃₉, Gurmukhi₄₀, Hanunoo₄₂, Hatran₄₃, Hebrew₄₄, Javanese₅₀, Kaithi₅₂, Kannada₅₃, Kayah Li₅₄, Kharoshthi₅₅, Khmer₅₆, Khojki₅₇, Khudawadi₅₈, Lao₅₉, Lepcha₆₀, Limbu₆₁, Mahajani₆₇, Malayalam₆₈, Mandaic₆₉, Manichaean₇₀, Meetei Mayek₇₆, Modi₇₉, Mongolian₈₀, Myanmar₈₃, NKo₈₄, New Tai Lue₈₆, Newa₈₇, Oriya₉₉, Pahawh Hmong₁₀₂, Phags Pa₁₀₅, Psalter Pahlavi₁₀₇, Rejang₁₀₈, Saurashtra₁₁₁, Sharada₁₁₂, Siddham₁₁₄, Sinhala₁₁₅, Sogdian₁₁₆, Sundanese₁₁₉, Syloti Nagri₁₂₀, Syriac₁₂₁, Tagalog₁₂₃, Tagbanwa₁₂₄, Tai Le₁₂₅, Tai Tham₁₂₆, Tai Viet₁₂₇, Takri₁₂₈, Tamil₁₂₉, Telugu₁₃₁, Thaana₁₃₂, Thai₁₃₃, Tifinagh₁₃₄, Tirhuta₁₃₅, Warang Citi₁₃₉. - 'agbacabaadafaafaaabaafbaaaaaaaaafaaafcacabalccbacabaacaabaaaaaabaaaad,' - // #197: 8 fonts: Noto Sans₀, Arabic₇, HK₄₁, JP₄₉, KR₅₁, SC₁₁₀, Syloti Nagri₁₂₀, TC₁₂₂. - 'ag1hhb2gjb,' - // #198: 3 fonts: Noto Sans₀, Arabic₇, Hebrew₄₄. - 'ag1k,' - // #199: 7 fonts: Noto Sans₀, Arabic₇, Hebrew₄₄, NKo₈₄, Phags Pa₁₀₅, Syriac₁₂₁, Thaana₁₃₂. - 'ag1k1nupk,' - // #200: 2 fonts: Noto Sans₀, Armenian₈. - 'ah,' - // #201: 2 fonts: Noto Sans₀, Avestan₉. + // #179: 143 fonts: Noto Sans₀, Noto Color Emoji₁, Noto Emoji₂, Noto Music₃, Symbols₄, Symbols 2₅, Adlam₆, Anatolian Hieroglyphs₇, Arabic₈, Armenian₉, Avestan₁₀, Balinese₁₁, Bamum₁₂, Bassa Vah₁₃, Batak₁₄, Bengali₁₅, Bhaiksuki₁₆, Brahmi₁₇, Buginese₁₈, Buhid₁₉, Canadian Aboriginal₂₀, Carian₂₁, Caucasian Albanian₂₂, Chakma₂₃, Cham₂₄, Cherokee₂₅, Coptic₂₆, Cuneiform₂₇, Cypriot₂₈, Deseret₂₉, Devanagari₃₀, Duployan₃₁, Egyptian Hieroglyphs₃₂, Elbasan₃₃, Elymaic₃₄, Georgian₃₅, Glagolitic₃₆, Gothic₃₇, Grantha₃₈, Gujarati₃₉, Gunjala Gondi₄₀, Gurmukhi₄₁, HK₄₂, Hanunoo₄₃, Hatran₄₄, Hebrew₄₅, Imperial Aramaic₄₆, Indic Siyaq Numbers₄₇, Inscriptional Pahlavi₄₈, Inscriptional Parthian₄₉, JP₅₀, Javanese₅₁, KR₅₂, Kaithi₅₃, Kannada₅₄, Kayah Li₅₅, Kharoshthi₅₆, Khmer₅₇, Khojki₅₈, Khudawadi₅₉, Lao₆₀, Lepcha₆₁, Limbu₆₂, Linear A₆₃, Linear B₆₄, Lisu₆₅, Lycian₆₆, Lydian₆₇, Mahajani₆₈, Malayalam₆₉, Mandaic₇₀, Manichaean₇₁, Marchen₇₂, Masaram Gondi₇₃, Math₇₄, Mayan Numerals₇₅, Medefaidrin₇₆, Meetei Mayek₇₇, Meroitic₇₈, Miao₇₉, Modi₈₀, Mongolian₈₁, Mro₈₂, Multani₈₃, Myanmar₈₄, NKo₈₅, Nabataean₈₆, New Tai Lue₈₇, Newa₈₈, Nushu₈₉, Ogham₉₀, Ol Chiki₉₁, Old Hungarian₉₂, Old Italic₉₃, Old North Arabian₉₄, Old Permic₉₅, Old Persian₉₆, Old Sogdian₉₇, Old South Arabian₉₈, Old Turkic₉₉, Oriya₁₀₀, Osage₁₀₁, Osmanya₁₀₂, Pahawh Hmong₁₀₃, Palmyrene₁₀₄, Pau Cin Hau₁₀₅, Phags Pa₁₀₆, Phoenician₁₀₇, Psalter Pahlavi₁₀₈, Rejang₁₀₉, Runic₁₁₀, SC₁₁₁, Saurashtra₁₁₂, Sharada₁₁₃, Shavian₁₁₄, Siddham₁₁₅, Sinhala₁₁₆, Sogdian₁₁₇, Sora Sompeng₁₁₈, Soyombo₁₁₉, Sundanese₁₂₀, Syloti Nagri₁₂₁, Syriac₁₂₂, TC₁₂₃, Tagalog₁₂₄, Tagbanwa₁₂₅, Tai Le₁₂₆, Tai Tham₁₂₇, Tai Viet₁₂₈, Takri₁₂₉, Tamil₁₃₀, Tamil Supplement₁₃₁, Telugu₁₃₂, Thaana₁₃₃, Thai₁₃₄, Tifinagh₁₃₅, Tirhuta₁₃₆, Ugaritic₁₃₇, Vai₁₃₈, Wancho₁₃₉, Warang Citi₁₄₀, Yi₁₄₁, Zanabazar Square₁₄₂. + 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,' + // #180: 137 fonts: Noto Sans₀, Noto Color Emoji₁, Noto Emoji₂, Noto Music₃, Symbols₄, Symbols 2₅, Adlam₆, Anatolian Hieroglyphs₇, Arabic₈, Armenian₉, Avestan₁₀, Balinese₁₁, Bamum₁₂, Bassa Vah₁₃, Batak₁₄, Bengali₁₅, Bhaiksuki₁₆, Brahmi₁₇, Buginese₁₈, Buhid₁₉, Canadian Aboriginal₂₀, Carian₂₁, Chakma₂₃, Cham₂₄, Cherokee₂₅, Coptic₂₆, Cuneiform₂₇, Deseret₂₉, Devanagari₃₀, Duployan₃₁, Egyptian Hieroglyphs₃₂, Elbasan₃₃, Georgian₃₅, Glagolitic₃₆, Gothic₃₇, Grantha₃₈, Gujarati₃₉, Gunjala Gondi₄₀, Gurmukhi₄₁, HK₄₂, Hanunoo₄₃, Hatran₄₄, Hebrew₄₅, Imperial Aramaic₄₆, Indic Siyaq Numbers₄₇, Inscriptional Pahlavi₄₈, Inscriptional Parthian₄₉, JP₅₀, Javanese₅₁, KR₅₂, Kaithi₅₃, Kannada₅₄, Kayah Li₅₅, Kharoshthi₅₆, Khmer₅₇, Khojki₅₈, Khudawadi₅₉, Lao₆₀, Lepcha₆₁, Limbu₆₂, Linear A₆₃, Linear B₆₄, Lisu₆₅, Lydian₆₇, Mahajani₆₈, Malayalam₆₉, Mandaic₇₀, Manichaean₇₁, Marchen₇₂, Masaram Gondi₇₃, Math₇₄, Mayan Numerals₇₅, Medefaidrin₇₆, Meetei Mayek₇₇, Meroitic₇₈, Miao₇₉, Modi₈₀, Mongolian₈₁, Mro₈₂, Multani₈₃, NKo₈₅, Nabataean₈₆, New Tai Lue₈₇, Newa₈₈, Nushu₈₉, Ogham₉₀, Ol Chiki₉₁, Old Hungarian₉₂, Old Italic₉₃, Old North Arabian₉₄, Old Permic₉₅, Old Persian₉₆, Old Sogdian₉₇, Old South Arabian₉₈, Old Turkic₉₉, Oriya₁₀₀, Osage₁₀₁, Osmanya₁₀₂, Pahawh Hmong₁₀₃, Palmyrene₁₀₄, Pau Cin Hau₁₀₅, Phoenician₁₀₇, Psalter Pahlavi₁₀₈, Rejang₁₀₉, Runic₁₁₀, SC₁₁₁, Saurashtra₁₁₂, Sharada₁₁₃, Shavian₁₁₄, Siddham₁₁₅, Sinhala₁₁₆, Sogdian₁₁₇, Sora Sompeng₁₁₈, Soyombo₁₁₉, Sundanese₁₂₀, Syloti Nagri₁₂₁, Syriac₁₂₂, TC₁₂₃, Tagalog₁₂₄, Tagbanwa₁₂₅, Tai Le₁₂₆, Tai Tham₁₂₇, Tai Viet₁₂₈, Takri₁₂₉, Tamil₁₃₀, Tamil Supplement₁₃₁, Telugu₁₃₂, Thaana₁₃₃, Thai₁₃₄, Tifinagh₁₃₅, Tirhuta₁₃₆, Ugaritic₁₃₇, Vai₁₃₈, Wancho₁₃₉, Warang Citi₁₄₀, Yi₁₄₁, Zanabazar Square₁₄₂. + 'aaaaaaaaaaaaaaaaaaaaaabaaaabaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,' + // #181: 70 fonts: Noto Sans₀, Noto Color Emoji₁, Noto Emoji₂, Arabic₈, Avestan₁₀, Balinese₁₁, Batak₁₄, Bengali₁₅, Brahmi₁₇, Buginese₁₈, Buhid₁₉, Chakma₂₃, Cham₂₄, Devanagari₃₀, Egyptian Hieroglyphs₃₂, Grantha₃₈, Gujarati₃₉, Gunjala Gondi₄₀, Gurmukhi₄₁, Hanunoo₄₃, Hebrew₄₅, Javanese₅₁, Kaithi₅₃, Kannada₅₄, Kayah Li₅₅, Kharoshthi₅₆, Khmer₅₇, Khojki₅₈, Khudawadi₅₉, Lao₆₀, Lepcha₆₁, Limbu₆₂, Mahajani₆₈, Malayalam₆₉, Mandaic₇₀, Manichaean₇₁, Meetei Mayek₇₇, Modi₈₀, Mongolian₈₁, Myanmar₈₄, NKo₈₅, New Tai Lue₈₇, Newa₈₈, Old Hungarian₉₂, Old Turkic₉₉, Oriya₁₀₀, Pahawh Hmong₁₀₃, Phags Pa₁₀₆, Psalter Pahlavi₁₀₈, Rejang₁₀₉, Saurashtra₁₁₂, Sharada₁₁₃, Siddham₁₁₅, Sinhala₁₁₆, Sundanese₁₂₀, Syloti Nagri₁₂₁, Syriac₁₂₂, Tagalog₁₂₄, Tagbanwa₁₂₅, Tai Le₁₂₆, Tai Tham₁₂₇, Tai Viet₁₂₈, Takri₁₂₉, Tamil₁₃₀, Telugu₁₃₂, Thaana₁₃₃, Thai₁₃₄, Tifinagh₁₃₅, Tirhuta₁₃₆, Warang Citi₁₄₀. + 'aaafbacabaadafbfaaabbfbaaaaaaaaafaaafcacabadgaccbacabadaabaaaaaabaaaad,' + // #182: 9 fonts: Noto Sans₀, Noto Color Emoji₁, Noto Emoji₂, HK₄₂, JP₅₀, KR₅₂, Mongolian₈₁, SC₁₁₁, TC₁₂₃. + 'aaa1nhb1c1dl,' + // #183: 8 fonts: Noto Sans₀, Noto Color Emoji₁, Noto Emoji₂, HK₄₂, JP₅₀, KR₅₂, SC₁₁₁, TC₁₂₃. + 'aaa1nhb2gl,' + // #184: 141 fonts: Noto Sans₀, Noto Music₃, Symbols₄, Symbols 2₅, Adlam₆, Anatolian Hieroglyphs₇, Arabic₈, Armenian₉, Avestan₁₀, Balinese₁₁, Bamum₁₂, Bassa Vah₁₃, Batak₁₄, Bengali₁₅, Bhaiksuki₁₆, Brahmi₁₇, Buginese₁₈, Buhid₁₉, Canadian Aboriginal₂₀, Carian₂₁, Caucasian Albanian₂₂, Chakma₂₃, Cham₂₄, Cherokee₂₅, Coptic₂₆, Cuneiform₂₇, Cypriot₂₈, Deseret₂₉, Devanagari₃₀, Duployan₃₁, Egyptian Hieroglyphs₃₂, Elbasan₃₃, Elymaic₃₄, Georgian₃₅, Glagolitic₃₆, Gothic₃₇, Grantha₃₈, Gujarati₃₉, Gunjala Gondi₄₀, Gurmukhi₄₁, HK₄₂, Hanunoo₄₃, Hatran₄₄, Hebrew₄₅, Imperial Aramaic₄₆, Indic Siyaq Numbers₄₇, Inscriptional Pahlavi₄₈, Inscriptional Parthian₄₉, JP₅₀, Javanese₅₁, KR₅₂, Kaithi₅₃, Kannada₅₄, Kayah Li₅₅, Kharoshthi₅₆, Khmer₅₇, Khojki₅₈, Khudawadi₅₉, Lao₆₀, Lepcha₆₁, Limbu₆₂, Linear A₆₃, Linear B₆₄, Lisu₆₅, Lycian₆₆, Lydian₆₇, Mahajani₆₈, Malayalam₆₉, Mandaic₇₀, Manichaean₇₁, Marchen₇₂, Masaram Gondi₇₃, Math₇₄, Mayan Numerals₇₅, Medefaidrin₇₆, Meetei Mayek₇₇, Meroitic₇₈, Miao₇₉, Modi₈₀, Mongolian₈₁, Mro₈₂, Multani₈₃, Myanmar₈₄, NKo₈₅, Nabataean₈₆, New Tai Lue₈₇, Newa₈₈, Nushu₈₉, Ogham₉₀, Ol Chiki₉₁, Old Hungarian₉₂, Old Italic₉₃, Old North Arabian₉₄, Old Permic₉₅, Old Persian₉₆, Old Sogdian₉₇, Old South Arabian₉₈, Old Turkic₉₉, Oriya₁₀₀, Osage₁₀₁, Osmanya₁₀₂, Pahawh Hmong₁₀₃, Palmyrene₁₀₄, Pau Cin Hau₁₀₅, Phags Pa₁₀₆, Phoenician₁₀₇, Psalter Pahlavi₁₀₈, Rejang₁₀₉, Runic₁₁₀, SC₁₁₁, Saurashtra₁₁₂, Sharada₁₁₃, Shavian₁₁₄, Siddham₁₁₅, Sinhala₁₁₆, Sogdian₁₁₇, Sora Sompeng₁₁₈, Soyombo₁₁₉, Sundanese₁₂₀, Syloti Nagri₁₂₁, Syriac₁₂₂, TC₁₂₃, Tagalog₁₂₄, Tagbanwa₁₂₅, Tai Le₁₂₆, Tai Tham₁₂₇, Tai Viet₁₂₈, Takri₁₂₉, Tamil₁₃₀, Tamil Supplement₁₃₁, Telugu₁₃₂, Thaana₁₃₃, Thai₁₃₄, Tifinagh₁₃₅, Tirhuta₁₃₆, Ugaritic₁₃₇, Vai₁₃₈, Wancho₁₃₉, Warang Citi₁₄₀, Yi₁₄₁, Zanabazar Square₁₄₂. + 'acaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,' + // #185: 134 fonts: Noto Sans₀, Noto Music₃, Symbols₄, Symbols 2₅, Adlam₆, Anatolian Hieroglyphs₇, Arabic₈, Armenian₉, Avestan₁₀, Balinese₁₁, Bamum₁₂, Bassa Vah₁₃, Batak₁₄, Bengali₁₅, Bhaiksuki₁₆, Brahmi₁₇, Buginese₁₈, Buhid₁₉, Canadian Aboriginal₂₀, Carian₂₁, Chakma₂₃, Cham₂₄, Cherokee₂₅, Coptic₂₆, Cuneiform₂₇, Deseret₂₉, Devanagari₃₀, Duployan₃₁, Egyptian Hieroglyphs₃₂, Elbasan₃₃, Georgian₃₅, Glagolitic₃₆, Gothic₃₇, Grantha₃₈, Gujarati₃₉, Gunjala Gondi₄₀, Gurmukhi₄₁, HK₄₂, Hanunoo₄₃, Hatran₄₄, Hebrew₄₅, Imperial Aramaic₄₆, Indic Siyaq Numbers₄₇, Inscriptional Pahlavi₄₈, Inscriptional Parthian₄₉, JP₅₀, Javanese₅₁, KR₅₂, Kaithi₅₃, Kannada₅₄, Kayah Li₅₅, Kharoshthi₅₆, Khmer₅₇, Khojki₅₈, Khudawadi₅₉, Lao₆₀, Lepcha₆₁, Limbu₆₂, Linear A₆₃, Linear B₆₄, Lisu₆₅, Lydian₆₇, Mahajani₆₈, Malayalam₆₉, Mandaic₇₀, Manichaean₇₁, Marchen₇₂, Masaram Gondi₇₃, Math₇₄, Mayan Numerals₇₅, Medefaidrin₇₆, Meetei Mayek₇₇, Meroitic₇₈, Miao₇₉, Modi₈₀, Mongolian₈₁, Mro₈₂, Multani₈₃, NKo₈₅, Nabataean₈₆, New Tai Lue₈₇, Newa₈₈, Nushu₈₉, Ogham₉₀, Ol Chiki₉₁, Old Hungarian₉₂, Old Italic₉₃, Old North Arabian₉₄, Old Permic₉₅, Old Persian₉₆, Old Sogdian₉₇, Old South Arabian₉₈, Old Turkic₉₉, Osage₁₀₁, Osmanya₁₀₂, Pahawh Hmong₁₀₃, Palmyrene₁₀₄, Pau Cin Hau₁₀₅, Phoenician₁₀₇, Psalter Pahlavi₁₀₈, Rejang₁₀₉, Runic₁₁₀, SC₁₁₁, Saurashtra₁₁₂, Sharada₁₁₃, Shavian₁₁₄, Siddham₁₁₅, Sinhala₁₁₆, Sogdian₁₁₇, Sora Sompeng₁₁₈, Soyombo₁₁₉, Sundanese₁₂₀, Syloti Nagri₁₂₁, Syriac₁₂₂, TC₁₂₃, Tagalog₁₂₄, Tagbanwa₁₂₅, Tai Le₁₂₆, Tai Tham₁₂₇, Tai Viet₁₂₈, Takri₁₂₉, Tamil₁₃₀, Tamil Supplement₁₃₁, Telugu₁₃₂, Thaana₁₃₃, Thai₁₃₄, Tifinagh₁₃₅, Tirhuta₁₃₆, Ugaritic₁₃₇, Vai₁₃₈, Wancho₁₃₉, Warang Citi₁₄₀, Yi₁₄₁, Zanabazar Square₁₄₂. + 'acaaaaaaaaaaaaaaaaaabaaaabaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaabaaaaaaaaaaaaaabaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,' + // #186: 134 fonts: Noto Sans₀, Noto Music₃, Symbols₄, Symbols 2₅, Adlam₆, Anatolian Hieroglyphs₇, Armenian₉, Avestan₁₀, Balinese₁₁, Bamum₁₂, Bassa Vah₁₃, Batak₁₄, Bengali₁₅, Bhaiksuki₁₆, Brahmi₁₇, Buginese₁₈, Buhid₁₉, Canadian Aboriginal₂₀, Carian₂₁, Caucasian Albanian₂₂, Chakma₂₃, Cham₂₄, Cherokee₂₅, Coptic₂₆, Cuneiform₂₇, Deseret₂₉, Devanagari₃₀, Duployan₃₁, Egyptian Hieroglyphs₃₂, Elbasan₃₃, Georgian₃₅, Glagolitic₃₆, Gothic₃₇, Grantha₃₈, Gujarati₃₉, Gunjala Gondi₄₀, Gurmukhi₄₁, HK₄₂, Hanunoo₄₃, Hatran₄₄, Hebrew₄₅, Imperial Aramaic₄₆, Indic Siyaq Numbers₄₇, Inscriptional Pahlavi₄₈, Inscriptional Parthian₄₉, JP₅₀, Javanese₅₁, KR₅₂, Kaithi₅₃, Kannada₅₄, Kayah Li₅₅, Kharoshthi₅₆, Khmer₅₇, Khojki₅₈, Khudawadi₅₉, Lao₆₀, Lepcha₆₁, Limbu₆₂, Linear A₆₃, Linear B₆₄, Lisu₆₅, Lydian₆₇, Mahajani₆₈, Malayalam₆₉, Mandaic₇₀, Manichaean₇₁, Marchen₇₂, Masaram Gondi₇₃, Mayan Numerals₇₅, Medefaidrin₇₆, Meetei Mayek₇₇, Meroitic₇₈, Miao₇₉, Modi₈₀, Mongolian₈₁, Mro₈₂, Multani₈₃, NKo₈₅, Nabataean₈₆, New Tai Lue₈₇, Newa₈₈, Nushu₈₉, Ogham₉₀, Ol Chiki₉₁, Old Hungarian₉₂, Old Italic₉₃, Old North Arabian₉₄, Old Permic₉₅, Old Persian₉₆, Old Sogdian₉₇, Old South Arabian₉₈, Old Turkic₉₉, Oriya₁₀₀, Osage₁₀₁, Osmanya₁₀₂, Pahawh Hmong₁₀₃, Palmyrene₁₀₄, Pau Cin Hau₁₀₅, Phoenician₁₀₇, Psalter Pahlavi₁₀₈, Rejang₁₀₉, Runic₁₁₀, SC₁₁₁, Saurashtra₁₁₂, Sharada₁₁₃, Shavian₁₁₄, Siddham₁₁₅, Sinhala₁₁₆, Sogdian₁₁₇, Sora Sompeng₁₁₈, Soyombo₁₁₉, Sundanese₁₂₀, Syloti Nagri₁₂₁, Syriac₁₂₂, TC₁₂₃, Tagalog₁₂₄, Tagbanwa₁₂₅, Tai Le₁₂₆, Tai Tham₁₂₇, Tai Viet₁₂₈, Takri₁₂₉, Tamil₁₃₀, Tamil Supplement₁₃₁, Telugu₁₃₂, Thaana₁₃₃, Thai₁₃₄, Tifinagh₁₃₅, Tirhuta₁₃₆, Ugaritic₁₃₇, Vai₁₃₈, Wancho₁₃₉, Warang Citi₁₄₀, Yi₁₄₁, Zanabazar Square₁₄₂. + 'acaaaabaaaaaaaaaaaaaaaaaabaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaabaaaaaaaabaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,' + // #187: 135 fonts: Noto Sans₀, Noto Music₃, Symbols₄, Symbols 2₅, Adlam₆, Anatolian Hieroglyphs₇, Armenian₉, Avestan₁₀, Balinese₁₁, Bamum₁₂, Bassa Vah₁₃, Batak₁₄, Bengali₁₅, Bhaiksuki₁₆, Brahmi₁₇, Buginese₁₈, Buhid₁₉, Canadian Aboriginal₂₀, Carian₂₁, Chakma₂₃, Cham₂₄, Cherokee₂₅, Coptic₂₆, Cuneiform₂₇, Deseret₂₉, Devanagari₃₀, Duployan₃₁, Egyptian Hieroglyphs₃₂, Elbasan₃₃, Georgian₃₅, Glagolitic₃₆, Gothic₃₇, Grantha₃₈, Gujarati₃₉, Gunjala Gondi₄₀, Gurmukhi₄₁, HK₄₂, Hanunoo₄₃, Hatran₄₄, Hebrew₄₅, Imperial Aramaic₄₆, Indic Siyaq Numbers₄₇, Inscriptional Pahlavi₄₈, Inscriptional Parthian₄₉, JP₅₀, Javanese₅₁, KR₅₂, Kaithi₅₃, Kannada₅₄, Kayah Li₅₅, Kharoshthi₅₆, Khmer₅₇, Khojki₅₈, Khudawadi₅₉, Lao₆₀, Lepcha₆₁, Limbu₆₂, Linear A₆₃, Linear B₆₄, Lisu₆₅, Lydian₆₇, Mahajani₆₈, Malayalam₆₉, Mandaic₇₀, Manichaean₇₁, Marchen₇₂, Masaram Gondi₇₃, Math₇₄, Mayan Numerals₇₅, Medefaidrin₇₆, Meetei Mayek₇₇, Meroitic₇₈, Miao₇₉, Modi₈₀, Mongolian₈₁, Mro₈₂, Multani₈₃, Myanmar₈₄, NKo₈₅, Nabataean₈₆, New Tai Lue₈₇, Newa₈₈, Nushu₈₉, Ogham₉₀, Ol Chiki₉₁, Old Hungarian₉₂, Old Italic₉₃, Old North Arabian₉₄, Old Permic₉₅, Old Persian₉₆, Old Sogdian₉₇, Old South Arabian₉₈, Old Turkic₉₉, Oriya₁₀₀, Osage₁₀₁, Osmanya₁₀₂, Pahawh Hmong₁₀₃, Palmyrene₁₀₄, Pau Cin Hau₁₀₅, Phoenician₁₀₇, Psalter Pahlavi₁₀₈, Rejang₁₀₉, Runic₁₁₀, SC₁₁₁, Saurashtra₁₁₂, Sharada₁₁₃, Shavian₁₁₄, Siddham₁₁₅, Sinhala₁₁₆, Sogdian₁₁₇, Sora Sompeng₁₁₈, Soyombo₁₁₉, Sundanese₁₂₀, Syloti Nagri₁₂₁, Syriac₁₂₂, TC₁₂₃, Tagalog₁₂₄, Tagbanwa₁₂₅, Tai Le₁₂₆, Tai Tham₁₂₇, Tai Viet₁₂₈, Takri₁₂₉, Tamil₁₃₀, Tamil Supplement₁₃₁, Telugu₁₃₂, Thaana₁₃₃, Thai₁₃₄, Tifinagh₁₃₅, Tirhuta₁₃₆, Ugaritic₁₃₇, Vai₁₃₈, Wancho₁₃₉, Warang Citi₁₄₀, Yi₁₄₁, Zanabazar Square₁₄₂. + 'acaaaabaaaaaaaaaaaabaaaabaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,' + // #188: 135 fonts: Noto Sans₀, Noto Music₃, Symbols₄, Symbols 2₅, Adlam₆, Anatolian Hieroglyphs₇, Armenian₉, Avestan₁₀, Balinese₁₁, Bamum₁₂, Bassa Vah₁₃, Batak₁₄, Bengali₁₅, Bhaiksuki₁₆, Brahmi₁₇, Buginese₁₈, Buhid₁₉, Canadian Aboriginal₂₀, Carian₂₁, Chakma₂₃, Cham₂₄, Cherokee₂₅, Coptic₂₆, Cuneiform₂₇, Deseret₂₉, Devanagari₃₀, Duployan₃₁, Egyptian Hieroglyphs₃₂, Elbasan₃₃, Georgian₃₅, Glagolitic₃₆, Gothic₃₇, Grantha₃₈, Gujarati₃₉, Gunjala Gondi₄₀, Gurmukhi₄₁, HK₄₂, Hanunoo₄₃, Hatran₄₄, Hebrew₄₅, Imperial Aramaic₄₆, Indic Siyaq Numbers₄₇, Inscriptional Pahlavi₄₈, Inscriptional Parthian₄₉, JP₅₀, Javanese₅₁, KR₅₂, Kaithi₅₃, Kannada₅₄, Kayah Li₅₅, Kharoshthi₅₆, Khmer₅₇, Khojki₅₈, Khudawadi₅₉, Lao₆₀, Lepcha₆₁, Limbu₆₂, Linear A₆₃, Linear B₆₄, Lisu₆₅, Lydian₆₇, Mahajani₆₈, Malayalam₆₉, Mandaic₇₀, Manichaean₇₁, Marchen₇₂, Masaram Gondi₇₃, Mayan Numerals₇₅, Medefaidrin₇₆, Meetei Mayek₇₇, Meroitic₇₈, Miao₇₉, Modi₈₀, Mongolian₈₁, Mro₈₂, Multani₈₃, Myanmar₈₄, NKo₈₅, Nabataean₈₆, New Tai Lue₈₇, Newa₈₈, Nushu₈₉, Ogham₉₀, Ol Chiki₉₁, Old Hungarian₉₂, Old Italic₉₃, Old North Arabian₉₄, Old Permic₉₅, Old Persian₉₆, Old Sogdian₉₇, Old South Arabian₉₈, Old Turkic₉₉, Oriya₁₀₀, Osage₁₀₁, Osmanya₁₀₂, Pahawh Hmong₁₀₃, Palmyrene₁₀₄, Pau Cin Hau₁₀₅, Phags Pa₁₀₆, Phoenician₁₀₇, Psalter Pahlavi₁₀₈, Rejang₁₀₉, Runic₁₁₀, SC₁₁₁, Saurashtra₁₁₂, Sharada₁₁₃, Shavian₁₁₄, Siddham₁₁₅, Sinhala₁₁₆, Sogdian₁₁₇, Sora Sompeng₁₁₈, Soyombo₁₁₉, Sundanese₁₂₀, Syloti Nagri₁₂₁, Syriac₁₂₂, TC₁₂₃, Tagalog₁₂₄, Tagbanwa₁₂₅, Tai Le₁₂₆, Tai Tham₁₂₇, Tai Viet₁₂₈, Takri₁₂₉, Tamil₁₃₀, Tamil Supplement₁₃₁, Telugu₁₃₂, Thaana₁₃₃, Thai₁₃₄, Tifinagh₁₃₅, Tirhuta₁₃₆, Ugaritic₁₃₇, Vai₁₃₈, Wancho₁₃₉, Warang Citi₁₄₀, Yi₁₄₁, Zanabazar Square₁₄₂. + 'acaaaabaaaaaaaaaaaabaaaabaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,' + // #189: 132 fonts: Noto Sans₀, Noto Music₃, Symbols₄, Symbols 2₅, Adlam₆, Anatolian Hieroglyphs₇, Armenian₉, Avestan₁₀, Balinese₁₁, Bamum₁₂, Bassa Vah₁₃, Batak₁₄, Bengali₁₅, Bhaiksuki₁₆, Brahmi₁₇, Buginese₁₈, Buhid₁₉, Canadian Aboriginal₂₀, Carian₂₁, Chakma₂₃, Cham₂₄, Cherokee₂₅, Coptic₂₆, Cuneiform₂₇, Deseret₂₉, Devanagari₃₀, Egyptian Hieroglyphs₃₂, Elbasan₃₃, Georgian₃₅, Glagolitic₃₆, Gothic₃₇, Grantha₃₈, Gujarati₃₉, Gunjala Gondi₄₀, Gurmukhi₄₁, HK₄₂, Hanunoo₄₃, Hatran₄₄, Hebrew₄₅, Imperial Aramaic₄₆, Indic Siyaq Numbers₄₇, Inscriptional Pahlavi₄₈, Inscriptional Parthian₄₉, JP₅₀, Javanese₅₁, KR₅₂, Kaithi₅₃, Kannada₅₄, Kayah Li₅₅, Kharoshthi₅₆, Khmer₅₇, Khojki₅₈, Khudawadi₅₉, Lao₆₀, Lepcha₆₁, Limbu₆₂, Linear A₆₃, Linear B₆₄, Lisu₆₅, Lydian₆₇, Mahajani₆₈, Malayalam₆₉, Mandaic₇₀, Manichaean₇₁, Marchen₇₂, Masaram Gondi₇₃, Mayan Numerals₇₅, Medefaidrin₇₆, Meetei Mayek₇₇, Meroitic₇₈, Miao₇₉, Modi₈₀, Mongolian₈₁, Mro₈₂, Multani₈₃, NKo₈₅, Nabataean₈₆, New Tai Lue₈₇, Newa₈₈, Nushu₈₉, Ogham₉₀, Ol Chiki₉₁, Old Hungarian₉₂, Old Italic₉₃, Old North Arabian₉₄, Old Permic₉₅, Old Persian₉₆, Old Sogdian₉₇, Old South Arabian₉₈, Old Turkic₉₉, Oriya₁₀₀, Osage₁₀₁, Osmanya₁₀₂, Pahawh Hmong₁₀₃, Palmyrene₁₀₄, Pau Cin Hau₁₀₅, Phoenician₁₀₇, Psalter Pahlavi₁₀₈, Rejang₁₀₉, Runic₁₁₀, SC₁₁₁, Saurashtra₁₁₂, Sharada₁₁₃, Shavian₁₁₄, Siddham₁₁₅, Sinhala₁₁₆, Sogdian₁₁₇, Sora Sompeng₁₁₈, Soyombo₁₁₉, Sundanese₁₂₀, Syloti Nagri₁₂₁, Syriac₁₂₂, TC₁₂₃, Tagalog₁₂₄, Tagbanwa₁₂₅, Tai Le₁₂₆, Tai Tham₁₂₇, Tai Viet₁₂₈, Takri₁₂₉, Tamil₁₃₀, Tamil Supplement₁₃₁, Telugu₁₃₂, Thaana₁₃₃, Thai₁₃₄, Tifinagh₁₃₅, Tirhuta₁₃₆, Ugaritic₁₃₇, Vai₁₃₈, Wancho₁₃₉, Warang Citi₁₄₀, Yi₁₄₁, Zanabazar Square₁₄₂. + 'acaaaabaaaaaaaaaaaabaaaabababaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaabaaaaaaaabaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,' + // #190: 95 fonts: Noto Sans₀, Noto Music₃, Symbols₄, Symbols 2₅, Adlam₆, Arabic₈, Armenian₉, Balinese₁₁, Bamum₁₂, Bassa Vah₁₃, Batak₁₄, Bengali₁₅, Bhaiksuki₁₆, Brahmi₁₇, Buginese₁₈, Buhid₁₉, Canadian Aboriginal₂₀, Caucasian Albanian₂₂, Chakma₂₃, Cham₂₄, Coptic₂₆, Devanagari₃₀, Duployan₃₁, Egyptian Hieroglyphs₃₂, Elbasan₃₃, Gothic₃₇, Grantha₃₈, Gujarati₃₉, Gunjala Gondi₄₀, Gurmukhi₄₁, HK₄₂, Hanunoo₄₃, Hebrew₄₅, JP₅₀, Javanese₅₁, KR₅₂, Kaithi₅₃, Kannada₅₄, Kayah Li₅₅, Kharoshthi₅₆, Khmer₅₇, Khojki₅₈, Khudawadi₅₉, Lao₆₀, Lepcha₆₁, Limbu₆₂, Lisu₆₅, Mahajani₆₈, Malayalam₆₉, Mandaic₇₀, Manichaean₇₁, Marchen₇₂, Masaram Gondi₇₃, Math₇₄, Meetei Mayek₇₇, Miao₇₉, Modi₈₀, Mongolian₈₁, Myanmar₈₄, NKo₈₅, New Tai Lue₈₇, Newa₈₈, Old Permic₉₅, Old Sogdian₉₇, Oriya₁₀₀, Osage₁₀₁, Pahawh Hmong₁₀₃, Phags Pa₁₀₆, Psalter Pahlavi₁₀₈, Rejang₁₀₉, Runic₁₁₀, SC₁₁₁, Saurashtra₁₁₂, Sharada₁₁₃, Siddham₁₁₅, Sinhala₁₁₆, Sogdian₁₁₇, Soyombo₁₁₉, Sundanese₁₂₀, Syloti Nagri₁₂₁, Syriac₁₂₂, TC₁₂₃, Tagalog₁₂₄, Tagbanwa₁₂₅, Tai Le₁₂₆, Tai Viet₁₂₈, Takri₁₂₉, Tamil₁₃₀, Telugu₁₃₂, Thaana₁₃₃, Thai₁₃₄, Tifinagh₁₃₅, Tirhuta₁₃₆, Wancho₁₃₉, Zanabazar Square₁₄₂. + 'acaaababaaaaaaaaabaabdaaadaaaaaabeaaaaaaaaaaaaccaaaaaacbaacabagbcabcbaaaaabaabaaaaaaabaabaaaacc,' + // #191: 89 fonts: Noto Sans₀, Adlam₆, Anatolian Hieroglyphs₇, Armenian₉, Balinese₁₁, Bassa Vah₁₃, Batak₁₄, Bengali₁₅, Bhaiksuki₁₆, Brahmi₁₇, Buginese₁₈, Buhid₁₉, Canadian Aboriginal₂₀, Chakma₂₃, Cherokee₂₅, Cuneiform₂₇, Deseret₂₉, Egyptian Hieroglyphs₃₂, Georgian₃₅, Glagolitic₃₆, Gothic₃₇, Grantha₃₈, HK₄₂, Hanunoo₄₃, Hatran₄₄, Hebrew₄₅, Imperial Aramaic₄₆, Indic Siyaq Numbers₄₇, Inscriptional Pahlavi₄₈, JP₅₀, KR₅₂, Kaithi₅₃, Kayah Li₅₅, Khmer₅₇, Khudawadi₅₉, Limbu₆₂, Linear B₆₄, Lisu₆₅, Lydian₆₇, Mahajani₆₈, Mandaic₇₀, Manichaean₇₁, Marchen₇₂, Masaram Gondi₇₃, Mayan Numerals₇₅, Medefaidrin₇₆, Meetei Mayek₇₇, Meroitic₇₈, Miao₇₉, Mongolian₈₁, Mro₈₂, Multani₈₃, Nabataean₈₆, Ogham₉₀, Ol Chiki₉₁, Old Italic₉₃, Old North Arabian₉₄, Old Permic₉₅, Old Persian₉₆, Old Sogdian₉₇, Old South Arabian₉₈, Oriya₁₀₀, Osage₁₀₁, Osmanya₁₀₂, Pahawh Hmong₁₀₃, Palmyrene₁₀₄, Pau Cin Hau₁₀₅, Phoenician₁₀₇, Psalter Pahlavi₁₀₈, Runic₁₁₀, SC₁₁₁, Shavian₁₁₄, Sinhala₁₁₆, Sogdian₁₁₇, Sora Sompeng₁₁₈, Soyombo₁₁₉, Syloti Nagri₁₂₁, TC₁₂₃, Tagbanwa₁₂₅, Tai Le₁₂₆, Tai Tham₁₂₇, Thaana₁₃₃, Thai₁₃₄, Tirhuta₁₃₆, Ugaritic₁₃₇, Vai₁₃₈, Wancho₁₃₉, Warang Citi₁₄₀, Yi₁₄₁. + 'afabbbaaaaaaacbbbccaaadaaaaaabbabbbcbababaaabaaaabaacdabaaaaabaaaaababacbaaabbbaafabaaaaa,' + // #192: 4 fonts: Noto Sans₀, Adlam₆, Duployan₃₁, Syriac₁₂₂. + 'afy3m,' + // #193: 41 fonts: Noto Sans₀, Anatolian Hieroglyphs₇, Arabic₈, Balinese₁₁, Batak₁₄, Bengali₁₅, Bhaiksuki₁₆, Brahmi₁₇, Buginese₁₈, Buhid₁₉, Devanagari₃₀, Gujarati₃₉, Gurmukhi₄₁, Hanunoo₄₃, Javanese₅₁, Kaithi₅₃, Kannada₅₄, Kharoshthi₅₆, Khmer₅₇, Lao₆₀, Lepcha₆₁, Limbu₆₂, Malayalam₆₉, Meetei Mayek₇₇, Myanmar₈₄, Oriya₁₀₀, Phags Pa₁₀₆, Rejang₁₀₉, Saurashtra₁₁₂, Sinhala₁₁₆, Sundanese₁₂₀, Syloti Nagri₁₂₁, Tagalog₁₂₄, Tagbanwa₁₂₅, Tai Le₁₂₆, Tai Tham₁₂₇, Tai Viet₁₂₈, Tamil₁₃₀, Telugu₁₃₂, Thaana₁₃₃, Thai₁₃₄. + 'agaccaaaaakibbhbabacaaghgpfccddacaaaabbaa,' + // #194: 29 fonts: Noto Sans₀, Arabic₈, Armenian₉, Bengali₁₅, Coptic₂₆, Devanagari₃₀, Georgian₃₅, Gujarati₃₉, Gurmukhi₄₁, HK₄₂, Hebrew₄₅, JP₅₀, KR₅₂, Kaithi₅₃, Kannada₅₄, Kayah Li₅₅, Kharoshthi₅₆, Khmer₅₇, Lisu₆₅, Malayalam₆₉, Oriya₁₀₀, SC₁₁₁, Sora Sompeng₁₁₈, Sundanese₁₂₀, Syloti Nagri₁₂₁, TC₁₂₃, Tamil₁₃₀, Telugu₁₃₂, Thai₁₃₄. + 'ahafkdedbacebaaaaahd1ekgbabgbb,' + // #195: 69 fonts: Noto Sans₀, Arabic₈, Avestan₁₀, Balinese₁₁, Batak₁₄, Bengali₁₅, Brahmi₁₇, Buginese₁₈, Buhid₁₉, Chakma₂₃, Cham₂₄, Devanagari₃₀, Duployan₃₁, Egyptian Hieroglyphs₃₂, Grantha₃₈, Gujarati₃₉, Gunjala Gondi₄₀, Gurmukhi₄₁, Hanunoo₄₃, Hatran₄₄, Hebrew₄₅, Javanese₅₁, Kaithi₅₃, Kannada₅₄, Kayah Li₅₅, Kharoshthi₅₆, Khmer₅₇, Khojki₅₈, Khudawadi₅₉, Lao₆₀, Lepcha₆₁, Limbu₆₂, Mahajani₆₈, Malayalam₆₉, Mandaic₇₀, Manichaean₇₁, Meetei Mayek₇₇, Modi₈₀, Mongolian₈₁, Myanmar₈₄, NKo₈₅, New Tai Lue₈₇, Newa₈₈, Oriya₁₀₀, Pahawh Hmong₁₀₃, Phags Pa₁₀₆, Psalter Pahlavi₁₀₈, Rejang₁₀₉, Saurashtra₁₁₂, Sharada₁₁₃, Siddham₁₁₅, Sinhala₁₁₆, Sogdian₁₁₇, Sundanese₁₂₀, Syloti Nagri₁₂₁, Syriac₁₂₂, Tagalog₁₂₄, Tagbanwa₁₂₅, Tai Le₁₂₆, Tai Tham₁₂₇, Tai Viet₁₂₈, Takri₁₂₉, Tamil₁₃₀, Telugu₁₃₂, Thaana₁₃₃, Thai₁₃₄, Tifinagh₁₃₅, Tirhuta₁₃₆, Warang Citi₁₄₀. + 'ahbacabaadafaafaaabaafbaaaaaaaaafaaafcacabalccbacabaacaabaaaaaabaaaad,' + // #196: 8 fonts: Noto Sans₀, Arabic₈, HK₄₂, JP₅₀, KR₅₂, SC₁₁₁, Syloti Nagri₁₂₁, TC₁₂₃. + 'ah1hhb2gjb,' + // #197: 3 fonts: Noto Sans₀, Arabic₈, Hebrew₄₅. + 'ah1k,' + // #198: 7 fonts: Noto Sans₀, Arabic₈, Hebrew₄₅, NKo₈₅, Phags Pa₁₀₆, Syriac₁₂₂, Thaana₁₃₃. + 'ah1k1nupk,' + // #199: 2 fonts: Noto Sans₀, Armenian₉. 'ai,' - // #202: 20 fonts: Noto Sans₀, Bengali₁₄, Devanagari₂₉, Grantha₃₇, Gujarati₃₈, Gurmukhi₄₀, Kannada₅₃, Khudawadi₅₈, Limbu₆₁, Mahajani₆₇, Malayalam₆₈, Masaram Gondi₇₂, Multani₈₂, Oriya₉₉, Sinhala₁₁₅, Syloti Nagri₁₂₀, Takri₁₂₈, Tamil₁₂₉, Telugu₁₃₁, Tirhuta₁₃₅. - 'anohabmecfadjqpehabd,' - // #203: 12 fonts: Noto Sans₀, Bengali₁₄, Devanagari₂₉, Grantha₃₇, Gujarati₃₈, Gurmukhi₄₀, Kannada₅₃, Malayalam₆₈, Sharada₁₁₂, Tamil₁₂₉, Telugu₁₃₁, Tirhuta₁₃₅. - 'anohabmo1rqbd,' - // #204: 7 fonts: Noto Sans₀, Bengali₁₄, Devanagari₂₉, Grantha₃₇, Kannada₅₃, Telugu₁₃₁, Tirhuta₁₃₅. - 'anohp2zd,' - // #205: 12 fonts: Noto Sans₀, Bengali₁₄, Devanagari₂₉, Gujarati₃₈, Gurmukhi₄₀, Kannada₅₃, Malayalam₆₈, Meetei Mayek₇₆, Ol Chiki₉₀, Oriya₉₉, Tamil₁₂₉, Telugu₁₃₁. - 'anoibmohni1db,' - // #206: 7 fonts: Noto Sans₀, Bengali₁₄, Devanagari₂₉, Gurmukhi₄₀, Lisu₆₄, Oriya₉₉, Thai₁₃₃. - 'anokx1i1h,' - // #207: 4 fonts: Noto Sans₀, Bengali₁₄, Devanagari₂₉, Kannada₅₃. - 'anox,' - // #208: 16 fonts: Noto Sans₀, Bengali₁₄, Gujarati₃₈, Gurmukhi₄₀, HK₄₁, JP₄₉, KR₅₁, Kannada₅₃, Khmer₅₆, Malayalam₆₈, Oriya₉₉, SC₁₁₀, Sinhala₁₁₅, TC₁₂₂, Tamil₁₂₉, Telugu₁₃₁. - 'anxbahbbcl1ekeggb,' - // #209: 8 fonts: Noto Sans₀, Caucasian Albanian₂₁, Cherokee₂₄, Duployan₃₀, Gothic₃₆, Syriac₁₂₁, Thai₁₃₃, Tifinagh₁₃₄. - 'aucff3gla,' - // #210: 4 fonts: Noto Sans₀, Caucasian Albanian₂₁, Coptic₂₅, Glagolitic₃₅. - 'audj,' - // #211: 3 fonts: Noto Sans₀, Caucasian Albanian₂₁, Glagolitic₃₅. - 'aun,' - // #212: 9 fonts: Noto Sans₀, Cherokee₂₄, Coptic₂₅, Duployan₃₀, Lydian₆₆, Malayalam₆₈, Runic₁₀₉, Syriac₁₂₁, Tifinagh₁₃₄. - 'axae1jb1olm,' - // #213: 4 fonts: Noto Sans₀, Cherokee₂₄, Duployan₃₀, Syriac₁₂₁. - 'axf3m,' - // #214: 4 fonts: Noto Sans₀, Cherokee₂₄, Math₇₃, Syriac₁₂₁. - 'ax1w1v,' - // #215: 6 fonts: Noto Sans₀, Coptic₂₅, Elbasan₃₂, Glagolitic₃₅, Gothic₃₆, Math₇₃. - 'aygca1k,' - // #216: 4 fonts: Noto Sans₀, Devanagari₂₉, Grantha₃₇, Kannada₅₃. - 'a1chp,' - // #217: 13 fonts: Noto Sans₀, Devanagari₂₉, Gujarati₃₈, Gurmukhi₄₀, Kaithi₅₂, Kannada₅₃, Khojki₅₇, Khudawadi₅₈, Mahajani₆₇, Malayalam₆₈, Modi₇₉, Takri₁₂₈, Tirhuta₁₃₅. - 'a1cibladaiak1wg,' - // #218: 12 fonts: Noto Sans₀, Devanagari₂₉, Gujarati₃₈, Gurmukhi₄₀, Kaithi₅₂, Kannada₅₃, Khojki₅₇, Khudawadi₅₈, Mahajani₆₇, Modi₇₉, Takri₁₂₈, Tirhuta₁₃₅. - 'a1cibladail1wg,' - // #219: 11 fonts: Noto Sans₀, Devanagari₂₉, Gujarati₃₈, Gurmukhi₄₀, Kaithi₅₂, Khojki₅₇, Khudawadi₅₈, Mahajani₆₇, Modi₇₉, Takri₁₂₈, Tirhuta₁₃₅. - 'a1cibleail1wg,' - // #220: 4 fonts: Noto Sans₀, Devanagari₂₉, Kaithi₅₂, Mahajani₆₇. - 'a1cwo,' - // #221: 6 fonts: Noto Sans₀, Devanagari₂₉, Kannada₅₃, Malayalam₆₈, Tamil₁₂₉, Telugu₁₃₁. - 'a1cxo2ib,' - // #222: 3 fonts: Noto Sans₀, Devanagari₂₉, Modi₇₉. - 'a1c1x,' - // #223: 3 fonts: Noto Sans₀, Devanagari₂₉, Tamil₁₂₉. - 'a1c3v,' - // #224: 7 fonts: Noto Sans₀, Duployan₃₀, HK₄₁, JP₄₉, KR₅₁, SC₁₁₀, TC₁₂₂. - 'a1dkhb2gl,' - // #225: 2 fonts: Noto Sans₀, Georgian₃₄. - 'a1h,' - // #226: 3 fonts: Noto Sans₀, Glagolitic₃₅, Old Permic₉₄. - 'a1i2g,' - // #227: 7 fonts: Noto Sans₀, HK₄₁, JP₄₉, KR₅₁, Mongolian₈₀, SC₁₁₀, TC₁₂₂. - 'a1ohb1c1dl,' - // #228: 7 fonts: Noto Sans₀, HK₄₁, JP₄₉, KR₅₁, Phags Pa₁₀₅, SC₁₁₀, TC₁₂₂. - 'a1ohb2bel,' - // #229: 2 fonts: Noto Sans₀, Hebrew₄₄. - 'a1r,' - // #230: 3 fonts: Noto Sans₀, Kayah Li₅₄, Myanmar₈₃. - 'a2b1c,' - // #231: 2 fonts: Noto Sans₀, Lao₅₉. - 'a2g,' - // #232: 2 fonts: Noto Sans₀, Lisu₆₄. - 'a2l,' - // #233: 4 fonts: Noto Sans₀, Manichaean₇₀, Myanmar₈₃, Phags Pa₁₀₅. - 'a2rmv,' - // #234: 2 fonts: Noto Sans₀, Meroitic₇₇. - 'a2y,' - // #235: 2 fonts: Noto Sans₀, Mongolian₈₀. - 'a3b,' - // #236: 2 fonts: Noto Sans₀, NKo₈₄. - 'a3f,' - // #237: 2 fonts: Noto Sans₀, Newa₈₇. - 'a3i,' - // #238: 2 fonts: Noto Sans₀, Old Permic₉₄. - 'a3p,' - // #239: 2 fonts: Noto Sans₀, Oriya₉₉. - 'a3u,' - // #240: 2 fonts: Noto Sans₀, Osage₁₀₀. + // #200: 2 fonts: Noto Sans₀, Avestan₁₀. + 'aj,' + // #201: 20 fonts: Noto Sans₀, Bengali₁₅, Devanagari₃₀, Grantha₃₈, Gujarati₃₉, Gurmukhi₄₁, Kannada₅₄, Khudawadi₅₉, Limbu₆₂, Mahajani₆₈, Malayalam₆₉, Masaram Gondi₇₃, Multani₈₃, Oriya₁₀₀, Sinhala₁₁₆, Syloti Nagri₁₂₁, Takri₁₂₉, Tamil₁₃₀, Telugu₁₃₂, Tirhuta₁₃₆. + 'aoohabmecfadjqpehabd,' + // #202: 12 fonts: Noto Sans₀, Bengali₁₅, Devanagari₃₀, Grantha₃₈, Gujarati₃₉, Gurmukhi₄₁, Kannada₅₄, Malayalam₆₉, Sharada₁₁₃, Tamil₁₃₀, Telugu₁₃₂, Tirhuta₁₃₆. + 'aoohabmo1rqbd,' + // #203: 7 fonts: Noto Sans₀, Bengali₁₅, Devanagari₃₀, Grantha₃₈, Kannada₅₄, Telugu₁₃₂, Tirhuta₁₃₆. + 'aoohp2zd,' + // #204: 12 fonts: Noto Sans₀, Bengali₁₅, Devanagari₃₀, Gujarati₃₉, Gurmukhi₄₁, Kannada₅₄, Malayalam₆₉, Meetei Mayek₇₇, Ol Chiki₉₁, Oriya₁₀₀, Tamil₁₃₀, Telugu₁₃₂. + 'aooibmohni1db,' + // #205: 7 fonts: Noto Sans₀, Bengali₁₅, Devanagari₃₀, Gurmukhi₄₁, Lisu₆₅, Oriya₁₀₀, Thai₁₃₄. + 'aookx1i1h,' + // #206: 4 fonts: Noto Sans₀, Bengali₁₅, Devanagari₃₀, Kannada₅₄. + 'aoox,' + // #207: 16 fonts: Noto Sans₀, Bengali₁₅, Gujarati₃₉, Gurmukhi₄₁, HK₄₂, JP₅₀, KR₅₂, Kannada₅₄, Khmer₅₇, Malayalam₆₉, Oriya₁₀₀, SC₁₁₁, Sinhala₁₁₆, TC₁₂₃, Tamil₁₃₀, Telugu₁₃₂. + 'aoxbahbbcl1ekeggb,' + // #208: 8 fonts: Noto Sans₀, Caucasian Albanian₂₂, Cherokee₂₅, Duployan₃₁, Gothic₃₇, Syriac₁₂₂, Thai₁₃₄, Tifinagh₁₃₅. + 'avcff3gla,' + // #209: 4 fonts: Noto Sans₀, Caucasian Albanian₂₂, Coptic₂₆, Glagolitic₃₆. + 'avdj,' + // #210: 3 fonts: Noto Sans₀, Caucasian Albanian₂₂, Glagolitic₃₆. + 'avn,' + // #211: 9 fonts: Noto Sans₀, Cherokee₂₅, Coptic₂₆, Duployan₃₁, Lydian₆₇, Malayalam₆₉, Runic₁₁₀, Syriac₁₂₂, Tifinagh₁₃₅. + 'ayae1jb1olm,' + // #212: 4 fonts: Noto Sans₀, Cherokee₂₅, Duployan₃₁, Syriac₁₂₂. + 'ayf3m,' + // #213: 4 fonts: Noto Sans₀, Cherokee₂₅, Math₇₄, Syriac₁₂₂. + 'ay1w1v,' + // #214: 6 fonts: Noto Sans₀, Coptic₂₆, Elbasan₃₃, Glagolitic₃₆, Gothic₃₇, Math₇₄. + 'azgca1k,' + // #215: 4 fonts: Noto Sans₀, Devanagari₃₀, Grantha₃₈, Kannada₅₄. + 'a1dhp,' + // #216: 13 fonts: Noto Sans₀, Devanagari₃₀, Gujarati₃₉, Gurmukhi₄₁, Kaithi₅₃, Kannada₅₄, Khojki₅₈, Khudawadi₅₉, Mahajani₆₈, Malayalam₆₉, Modi₈₀, Takri₁₂₉, Tirhuta₁₃₆. + 'a1dibladaiak1wg,' + // #217: 12 fonts: Noto Sans₀, Devanagari₃₀, Gujarati₃₉, Gurmukhi₄₁, Kaithi₅₃, Kannada₅₄, Khojki₅₈, Khudawadi₅₉, Mahajani₆₈, Modi₈₀, Takri₁₂₉, Tirhuta₁₃₆. + 'a1dibladail1wg,' + // #218: 11 fonts: Noto Sans₀, Devanagari₃₀, Gujarati₃₉, Gurmukhi₄₁, Kaithi₅₃, Khojki₅₈, Khudawadi₅₉, Mahajani₆₈, Modi₈₀, Takri₁₂₉, Tirhuta₁₃₆. + 'a1dibleail1wg,' + // #219: 4 fonts: Noto Sans₀, Devanagari₃₀, Kaithi₅₃, Mahajani₆₈. + 'a1dwo,' + // #220: 6 fonts: Noto Sans₀, Devanagari₃₀, Kannada₅₄, Malayalam₆₉, Tamil₁₃₀, Telugu₁₃₂. + 'a1dxo2ib,' + // #221: 3 fonts: Noto Sans₀, Devanagari₃₀, Modi₈₀. + 'a1d1x,' + // #222: 3 fonts: Noto Sans₀, Devanagari₃₀, Tamil₁₃₀. + 'a1d3v,' + // #223: 7 fonts: Noto Sans₀, Duployan₃₁, HK₄₂, JP₅₀, KR₅₂, SC₁₁₁, TC₁₂₃. + 'a1ekhb2gl,' + // #224: 2 fonts: Noto Sans₀, Georgian₃₅. + 'a1i,' + // #225: 3 fonts: Noto Sans₀, Glagolitic₃₆, Old Permic₉₅. + 'a1j2g,' + // #226: 7 fonts: Noto Sans₀, HK₄₂, JP₅₀, KR₅₂, Mongolian₈₁, SC₁₁₁, TC₁₂₃. + 'a1phb1c1dl,' + // #227: 7 fonts: Noto Sans₀, HK₄₂, JP₅₀, KR₅₂, Phags Pa₁₀₆, SC₁₁₁, TC₁₂₃. + 'a1phb2bel,' + // #228: 2 fonts: Noto Sans₀, Hebrew₄₅. + 'a1s,' + // #229: 3 fonts: Noto Sans₀, Kayah Li₅₅, Myanmar₈₄. + 'a2c1c,' + // #230: 2 fonts: Noto Sans₀, Lao₆₀. + 'a2h,' + // #231: 2 fonts: Noto Sans₀, Lisu₆₅. + 'a2m,' + // #232: 4 fonts: Noto Sans₀, Manichaean₇₁, Myanmar₈₄, Phags Pa₁₀₆. + 'a2smv,' + // #233: 3 fonts: Noto Sans₀, Meroitic₇₈, Old Hungarian₉₂. + 'a2zn,' + // #234: 2 fonts: Noto Sans₀, Mongolian₈₁. + 'a3c,' + // #235: 2 fonts: Noto Sans₀, NKo₈₅. + 'a3g,' + // #236: 2 fonts: Noto Sans₀, Newa₈₈. + 'a3j,' + // #237: 2 fonts: Noto Sans₀, Old Hungarian₉₂. + 'a3n,' + // #238: 3 fonts: Noto Sans₀, Old Hungarian₉₂, Old Turkic₉₉. + 'a3ng,' + // #239: 2 fonts: Noto Sans₀, Old Permic₉₅. + 'a3q,' + // #240: 2 fonts: Noto Sans₀, Oriya₁₀₀. 'a3v,' - // #241: 2 fonts: Noto Sans₀, Syloti Nagri₁₂₀. - 'a4p,' - // #242: 2 fonts: Noto Sans₀, Tai Viet₁₂₇. - 'a4w,' - // #243: 2 fonts: Noto Sans₀, Tamil₁₂₉. - 'a4y,' - // #244: 2 fonts: Noto Sans₀, Thai₁₃₃. - 'a5c,' - // #245: 4 fonts: Noto Color Emoji₁, Noto Emoji₂, Symbols₃, Symbols 2₄. - 'baaa,' - // #246: 4 fonts: Noto Color Emoji₁, Noto Emoji₂, Symbols₃, Duployan₃₀. - 'baa1a,' - // #247: 9 fonts: Noto Color Emoji₁, Noto Emoji₂, Symbols₃, HK₄₁, JP₄₉, KR₅₁, Math₇₃, SC₁₁₀, TC₁₂₂. - 'baa1lhbv1kl,' - // #248: 4 fonts: Noto Color Emoji₁, Noto Emoji₂, Symbols 2₄, Duployan₃₀. - 'babz,' - // #249: 4 fonts: Noto Color Emoji₁, Noto Emoji₂, Symbols 2₄, Math₇₃. - 'bab2q,' - // #250: 8 fonts: Noto Color Emoji₁, Noto Emoji₂, HK₄₁, JP₄₉, KR₅₁, Math₇₃, SC₁₁₀, TC₁₂₂. - 'ba1mhbv1kl,' - // #251: 3 fonts: Noto Color Emoji₁, Noto Emoji₂, Math₇₃. - 'ba2s,' + // #241: 2 fonts: Noto Sans₀, Osage₁₀₁. + 'a3w,' + // #242: 2 fonts: Noto Sans₀, Syloti Nagri₁₂₁. + 'a4q,' + // #243: 2 fonts: Noto Sans₀, Tamil₁₃₀. + 'a4z,' + // #244: 2 fonts: Noto Sans₀, Thai₁₃₄. + 'a5d,' + // #245: 4 fonts: Noto Color Emoji₁, Noto Emoji₂, Symbols₄, Symbols 2₅. + 'baba,' + // #246: 4 fonts: Noto Color Emoji₁, Noto Emoji₂, Symbols₄, Duployan₃₁. + 'bab1a,' + // #247: 9 fonts: Noto Color Emoji₁, Noto Emoji₂, Symbols₄, HK₄₂, JP₅₀, KR₅₂, Math₇₄, SC₁₁₁, TC₁₂₃. + 'bab1lhbv1kl,' + // #248: 4 fonts: Noto Color Emoji₁, Noto Emoji₂, Symbols 2₅, Duployan₃₁. + 'bacz,' + // #249: 4 fonts: Noto Color Emoji₁, Noto Emoji₂, Symbols 2₅, Math₇₄. + 'bac2q,' + // #250: 8 fonts: Noto Color Emoji₁, Noto Emoji₂, HK₄₂, JP₅₀, KR₅₂, Math₇₄, SC₁₁₁, TC₁₂₃. + 'ba1nhbv1kl,' + // #251: 3 fonts: Noto Color Emoji₁, Noto Emoji₂, Math₇₄. + 'ba2t,' // #252: 1 font: Noto Emoji₂. 'c,' - // #253: 7 fonts: Symbols₃, Duployan₃₀, HK₄₁, JP₄₉, KR₅₁, SC₁₁₀, TC₁₂₂. - 'd1akhb2gl,' - // #254: 2 fonts: Symbols₃, Gurmukhi₄₀. - 'd1k,' - // #255: 7 fonts: Symbols₃, HK₄₁, JP₄₉, KR₅₁, Mongolian₈₀, SC₁₁₀, TC₁₂₂. - 'd1lhb1c1dl,' - // #256: 2 fonts: Symbols₃, Syriac₁₂₁. - 'd4n,' - // #257: 2 fonts: Symbols 2₄, Coptic₂₅. - 'eu,' - // #258: 3 fonts: Symbols 2₄, Math₇₃, Tai Tham₁₂₆. - 'e2q2a,' - // #259: 2 fonts: Symbols 2₄, Mayan Numerals₇₄. - 'e2r,' - // #260: 7 fonts: Adlam₅, Arabic₇, Mandaic₆₉, Manichaean₇₀, Psalter Pahlavi₁₀₇, Sogdian₁₁₆, Syriac₁₂₁. - 'fb2ja1kie,' - // #261: 5 fonts: Adlam₅, Arabic₇, NKo₈₄, Syriac₁₂₁, Thaana₁₃₂. - 'fb2y1kk,' - // #262: 1 font: Anatolian Hieroglyphs₆. - 'g,' - // #263: 2 fonts: Arabic₇, Coptic₂₅. - 'hr,' - // #264: 4 fonts: Arabic₇, Indic Siyaq Numbers₄₆, Syriac₁₂₁, Thaana₁₃₂. - 'h1m2wk,' - // #265: 2 fonts: Arabic₇, NKo₈₄. - 'h2y,' - // #266: 3 fonts: Arabic₇, Syriac₁₂₁, Thaana₁₃₂. - 'h4jk,' - // #267: 2 fonts: Armenian₈, Georgian₃₄. - 'iz,' - // #268: 3 fonts: Bengali₁₄, Chakma₂₂, Syloti Nagri₁₂₀. - 'oh3t,' - // #269: 2 fonts: Bengali₁₄, Tirhuta₁₃₅. - 'o4q,' - // #270: 2 fonts: Buginese₁₇, Javanese₅₀. - 'r1g,' - // #271: 1 font: Buhid₁₈. - 's,' - // #272: 4 fonts: Buhid₁₈, Hanunoo₄₂, Tagalog₁₂₃, Tagbanwa₁₂₄. - 'sx3ca,' - // #273: 1 font: Carian₂₀. - 'u,' - // #274: 3 fonts: Chakma₂₂, Myanmar₈₃, Tai Le₁₂₅. - 'w2i1p,' - // #275: 1 font: Deseret₂₈. - '1c,' - // #276: 1 font: Egyptian Hieroglyphs₃₁. - '1f,' - // #277: 1 font: Elbasan₃₂. + // #253: 8 fonts: Noto Music₃, Symbols₄, HK₄₂, JP₅₀, KR₅₂, Math₇₄, SC₁₁₁, TC₁₂₃. + 'da1lhbv1kl,' + // #254: 7 fonts: Noto Music₃, Symbols₄, HK₄₂, JP₅₀, KR₅₂, SC₁₁₁, TC₁₂₃. + 'da1lhb2gl,' + // #255: 7 fonts: Symbols₄, Duployan₃₁, HK₄₂, JP₅₀, KR₅₂, SC₁₁₁, TC₁₂₃. + 'e1akhb2gl,' + // #256: 2 fonts: Symbols₄, Gurmukhi₄₁. + 'e1k,' + // #257: 7 fonts: Symbols₄, HK₄₂, JP₅₀, KR₅₂, Mongolian₈₁, SC₁₁₁, TC₁₂₃. + 'e1lhb1c1dl,' + // #258: 2 fonts: Symbols₄, Syriac₁₂₂. + 'e4n,' + // #259: 2 fonts: Symbols 2₅, Coptic₂₆. + 'fu,' + // #260: 3 fonts: Symbols 2₅, Math₇₄, Tai Tham₁₂₇. + 'f2q2a,' + // #261: 2 fonts: Symbols 2₅, Mayan Numerals₇₅. + 'f2r,' + // #262: 7 fonts: Adlam₆, Arabic₈, Mandaic₇₀, Manichaean₇₁, Psalter Pahlavi₁₀₈, Sogdian₁₁₇, Syriac₁₂₂. + 'gb2ja1kie,' + // #263: 5 fonts: Adlam₆, Arabic₈, NKo₈₅, Syriac₁₂₂, Thaana₁₃₃. + 'gb2y1kk,' + // #264: 1 font: Anatolian Hieroglyphs₇. + 'h,' + // #265: 2 fonts: Arabic₈, Coptic₂₆. + 'ir,' + // #266: 4 fonts: Arabic₈, Indic Siyaq Numbers₄₇, Syriac₁₂₂, Thaana₁₃₃. + 'i1m2wk,' + // #267: 2 fonts: Arabic₈, NKo₈₅. + 'i2y,' + // #268: 3 fonts: Arabic₈, Syriac₁₂₂, Thaana₁₃₃. + 'i4jk,' + // #269: 2 fonts: Armenian₉, Georgian₃₅. + 'jz,' + // #270: 3 fonts: Bengali₁₅, Chakma₂₃, Syloti Nagri₁₂₁. + 'ph3t,' + // #271: 2 fonts: Bengali₁₅, Tirhuta₁₃₆. + 'p4q,' + // #272: 2 fonts: Buginese₁₈, Javanese₅₁. + 's1g,' + // #273: 1 font: Buhid₁₉. + 't,' + // #274: 4 fonts: Buhid₁₉, Hanunoo₄₃, Tagalog₁₂₄, Tagbanwa₁₂₅. + 'tx3ca,' + // #275: 1 font: Carian₂₁. + 'v,' + // #276: 3 fonts: Chakma₂₃, Myanmar₈₄, Tai Le₁₂₆. + 'x2i1p,' + // #277: 1 font: Deseret₂₉. + '1d,' + // #278: 1 font: Egyptian Hieroglyphs₃₂. '1g,' - // #278: 1 font: Elymaic₃₃. + // #279: 1 font: Elbasan₃₃. '1h,' - // #279: 1 font: Gothic₃₆. - '1k,' - // #280: 2 fonts: Gujarati₃₈, Khojki₅₇. - '1ms,' - // #281: 2 fonts: Gurmukhi₄₀, Multani₈₂. - '1o1p,' - // #282: 11 fonts: HK₄₁, JP₄₉, KR₅₁, Lisu₆₄, Mongolian₈₀, New Tai Lue₈₆, Phags Pa₁₀₅, SC₁₁₀, TC₁₂₂, Tai Le₁₂₅, Yi₁₄₀. - '1phbmpfselco,' - // #283: 10 fonts: HK₄₁, JP₄₉, KR₅₁, Mongolian₈₀, New Tai Lue₈₆, Phags Pa₁₀₅, SC₁₁₀, TC₁₂₂, Tai Le₁₂₅, Yi₁₄₀. - '1phb1cfselco,' - // #284: 8 fonts: HK₄₁, JP₄₉, KR₅₁, Mongolian₈₀, Phags Pa₁₀₅, SC₁₁₀, TC₁₂₂, Yi₁₄₀. - '1phb1cyelr,' - // #285: 9 fonts: HK₄₁, JP₄₉, KR₅₁, New Tai Lue₈₆, Phags Pa₁₀₅, SC₁₁₀, TC₁₂₂, Tai Le₁₂₅, Yi₁₄₀. - '1phb1iselco,' - // #286: 6 fonts: HK₄₁, JP₄₉, KR₅₁, Phags Pa₁₀₅, SC₁₁₀, TC₁₂₂. - '1phb2bel,' - // #287: 2 fonts: HK₄₁, SC₁₁₀. - '1p2q,' - // #288: 1 font: Hanunoo₄₂. - '1q,' - // #289: 1 font: Indic Siyaq Numbers₄₆. - '1u,' - // #290: 1 font: Lycian₆₅. - '2n,' - // #291: 1 font: Mahajani₆₇. - '2p,' - // #292: 2 fonts: Math₇₃, Old Permic₉₄. - '2vu,' - // #293: 1 font: Medefaidrin₇₅. - '2x,' - // #294: 1 font: Ogham₈₉. - '3l,' - // #295: 1 font: Ol Chiki₉₀. + // #280: 1 font: Elymaic₃₄. + '1i,' + // #281: 1 font: Gothic₃₇. + '1l,' + // #282: 2 fonts: Gujarati₃₉, Khojki₅₈. + '1ns,' + // #283: 2 fonts: Gurmukhi₄₁, Multani₈₃. + '1p1p,' + // #284: 11 fonts: HK₄₂, JP₅₀, KR₅₂, Lisu₆₅, Mongolian₈₁, New Tai Lue₈₇, Phags Pa₁₀₆, SC₁₁₁, TC₁₂₃, Tai Le₁₂₆, Yi₁₄₁. + '1qhbmpfselco,' + // #285: 10 fonts: HK₄₂, JP₅₀, KR₅₂, Mongolian₈₁, New Tai Lue₈₇, Phags Pa₁₀₆, SC₁₁₁, TC₁₂₃, Tai Le₁₂₆, Yi₁₄₁. + '1qhb1cfselco,' + // #286: 8 fonts: HK₄₂, JP₅₀, KR₅₂, Mongolian₈₁, Phags Pa₁₀₆, SC₁₁₁, TC₁₂₃, Yi₁₄₁. + '1qhb1cyelr,' + // #287: 9 fonts: HK₄₂, JP₅₀, KR₅₂, New Tai Lue₈₇, Phags Pa₁₀₆, SC₁₁₁, TC₁₂₃, Tai Le₁₂₆, Yi₁₄₁. + '1qhb1iselco,' + // #288: 6 fonts: HK₄₂, JP₅₀, KR₅₂, Phags Pa₁₀₆, SC₁₁₁, TC₁₂₃. + '1qhb2bel,' + // #289: 2 fonts: HK₄₂, SC₁₁₁. + '1q2q,' + // #290: 1 font: Hanunoo₄₃. + '1r,' + // #291: 1 font: Indic Siyaq Numbers₄₇. + '1v,' + // #292: 1 font: Lycian₆₆. + '2o,' + // #293: 1 font: Mahajani₆₈. + '2q,' + // #294: 2 fonts: Math₇₄, Old Permic₉₅. + '2wu,' + // #295: 1 font: Medefaidrin₇₆. + '2y,' + // #296: 1 font: Ogham₉₀. '3m,' - // #296: 1 font: Old North Arabian₉₃. - '3p,' - // #297: 1 font: Old Permic₉₄. + // #297: 1 font: Ol Chiki₉₁. + '3n,' + // #298: 1 font: Old North Arabian₉₄. '3q,' - // #298: 1 font: Old Sogdian₉₆. - '3s,' - // #299: 1 font: Old South Arabian₉₇. + // #299: 1 font: Old Permic₉₅. + '3r,' + // #300: 1 font: Old Sogdian₉₇. '3t,' - // #300: 1 font: Old Turkic₉₈. + // #301: 1 font: Old South Arabian₉₈. '3u,' - // #301: 1 font: Palmyrene₁₀₃. - '3z,' - // #302: 1 font: Pau Cin Hau₁₀₄. + // #302: 1 font: Old Turkic₉₉. + '3v,' + // #303: 1 font: Palmyrene₁₀₄. '4a,' - // #303: 1 font: Phags Pa₁₀₅. + // #304: 1 font: Pau Cin Hau₁₀₅. '4b,' - // #304: 1 font: Runic₁₀₉. - '4f,' - // #305: 1 font: Sharada₁₁₂. - '4i,' - // #306: 1 font: Shavian₁₁₃. + // #305: 1 font: Phags Pa₁₀₆. + '4c,' + // #306: 1 font: Runic₁₁₀. + '4g,' + // #307: 1 font: Sharada₁₁₃. '4j,' - // #307: 1 font: Sogdian₁₁₆. - '4m,' - // #308: 1 font: Soyombo₁₁₈. - '4o,' - // #309: 1 font: Syloti Nagri₁₂₀. - '4q,' - // #310: 1 font: Thaana₁₃₂. - '5c,' - // #311: 1 font: Vai₁₃₇. - '5h,' - // #312: 1 font: Zanabazar Square₁₄₁. - '5l' + // #308: 1 font: Shavian₁₁₄. + '4k,' + // #309: 1 font: Sogdian₁₁₇. + '4n,' + // #310: 1 font: Soyombo₁₁₉. + '4p,' + // #311: 1 font: Syloti Nagri₁₂₁. + '4r,' + // #312: 1 font: Thaana₁₃₃. + '5d,' + // #313: 1 font: Vai₁₃₈. + '5i,' + // #314: 1 font: Zanabazar Square₁₄₂. + '5m' ; -// 21915 ranges encoded in 31616 characters +// 21903 ranges encoded in 31599 characters const String encodedFontSetRanges = '1eE' // 0-1f - '6W' // 20 #178 - '2W' // 21 #74 - '1Q' // 22 #42 - '6Z' // 23 #181 - '1Q' // 24 #42 - '1V' // 25 #47 - '1Q' // 26 #42 - 'b1V' // 27-29 #47 - '6Y' // 2a #180 - '1V' // 2b #47 - '2W' // 2c #74 - '7E' // 2d #186 - '2W' // 2e #74 - '1V' // 2f #47 - 'i6X' // 30-39 #179 - '2W' // 3a #74 - '1Q' // 3b #42 - 'b1V' // 3c-3e #47 - '7G' // 3f #188 - 'd1Q' // 40-44 #42 - '2X' // 45 #75 - 'b1Q' // 46-48 #42 - '2X' // 49 #75 - 'd1Q' // 4a-4e #42 - '2X' // 4f #75 - 'd1Q' // 50-54 #42 - '2X' // 55 #75 - '1n1Q' // 56-7e #42 + '6X' // 20 #179 + '2U' // 21 #72 + '1H' // 22 #33 + '4I' // 23 #112 + 'e1H' // 24-29 #33 + '4I' // 2a #112 + '1H' // 2b #33 + '2U' // 2c #72 + '7D' // 2d #185 + '2U' // 2e #72 + '1H' // 2f #33 + 'i6Y' // 30-39 #180 + '2U' // 3a #72 + 'c1H' // 3b-3e #33 + '7F' // 3f #187 + 'd1H' // 40-44 #33 + '2V' // 45 #73 + 'b1H' // 46-48 #33 + '2V' // 49 #73 + 'd1H' // 4a-4e #33 + '2V' // 4f #73 + 'd1H' // 50-54 #33 + '2V' // 55 #73 + '1n1H' // 56-7e #33 'M' // 7f #12 '1eE' // 80-9f - '7D' // a0 #185 + '7C' // a0 #184 'bV' // a1-a3 #21 'S' // a4 #18 'V' // a5 #21 'S' // a6 #18 - '1Q' // a7 #42 + '1H' // a7 #33 'V' // a8 #21 '3H' // a9 #85 'V' // aa #21 '4J' // ab #113 - '1W' // ac #48 - '8A' // ad #208 + '1V' // ac #47 + '7Z' // ad #207 '3H' // ae #85 'aV' // af-b0 #21 - '1W' // b1 #48 + '1V' // b1 #47 'a4R' // b2-b3 #121 'V' // b4 #21 'S' // b5 #18 @@ -838,9 +839,9 @@ const String encodedFontSetRanges = '4J' // bb #113 'bS' // bc-be #18 'wV' // bf-d6 #21 - '1V' // d7 #47 + '1H' // d7 #33 '1dV' // d8-f6 #21 - '1V' // f7 #47 + '1H' // f7 #33 'kV' // f8-103 #21 'cY' // 104-107 #24 'aL' // 108-109 #11 @@ -888,7 +889,7 @@ const String encodedFontSetRanges = 'lL' // 1a2-1ae #11 'aS' // 1af-1b0 #18 '1aL' // 1b1-1cc #11 - 'a7K' // 1cd-1ce #192 + 'a7J' // 1cd-1ce #191 'mS' // 1cf-1dc #18 'zL' // 1dd-1f7 #11 'aS' // 1f8-1f9 #18 @@ -904,15 +905,15 @@ const String encodedFontSetRanges = '1O' // 2b9 #40 'L' // 2ba #11 'S' // 2bb #18 - '7Y' // 2bc #206 + '7X' // 2bc #205 'hL' // 2bd-2c5 #11 'Y' // 2c6 #24 'V' // 2c7 #21 'L' // 2c8 #11 - '7I' // 2c9 #190 + '7H' // 2c9 #189 'aS' // 2ca-2cb #18 'L' // 2cc #11 - '8Y' // 2cd #232 + '8X' // 2cd #231 'hL' // 2ce-2d6 #11 '9K' // 2d7 #244 'Y' // 2d8 #24 @@ -923,10 +924,10 @@ const String encodedFontSetRanges = 'sL' // 2ec-2ff #11 'aV' // 300-301 #21 'a4L' // 302-303 #115 - '7F' // 304 #187 - '8H' // 305 #215 + '7E' // 304 #186 + '8G' // 305 #214 'Y' // 306 #24 - '1Q' // 307 #42 + '1H' // 307 #33 '4L' // 308 #115 '4S' // 309 #122 'aY' // 30a-30b #24 @@ -934,29 +935,29 @@ const String encodedFontSetRanges = 'cL' // 30d-310 #11 '1O' // 311 #40 'Y' // 312 #24 - '9E' // 313 #238 + '9F' // 313 #239 'aL' // 314-315 #11 - 'a2N' // 316-317 #65 + 'a2M' // 316-317 #64 'gL' // 318-31f #11 '3K' // 320 #88 'aL' // 321-322 #11 - '8E' // 323 #212 - '8F' // 324 #213 + '8D' // 323 #211 + '8E' // 324 #212 '3K' // 325 #88 'bY' // 326-328 #24 'cL' // 329-32c #11 'a3K' // 32d-32e #88 - '2N' // 32f #65 - '8G' // 330 #214 - '8B' // 331 #209 + '2M' // 32f #64 + '8F' // 330 #213 + '8A' // 331 #208 'lL' // 332-33e #11 '1O' // 33f #40 'nL' // 340-34e #11 - '7Q' // 34f #198 + '7P' // 34f #197 'gL' // 350-357 #11 - '9G' // 358 #240 + '9H' // 358 #241 'L' // 359 #11 - '9F' // 35a #239 + '9G' // 35a #240 'bL' // 35b-35d #11 '1O' // 35e #40 'aL' // 35f-360 #11 @@ -976,24 +977,24 @@ const String encodedFontSetRanges = 'E' // 3a2 'f4Q' // 3a3-3a9 #120 'fL' // 3aa-3b0 #11 - 'x1W' // 3b1-3c9 #48 + 'x1V' // 3b1-3c9 #47 'fL' // 3ca-3d0 #11 - '1B' // 3d1 #27 + '1A' // 3d1 #26 'bL' // 3d2-3d4 #11 - 'a1B' // 3d5-3d6 #27 + 'a1A' // 3d5-3d6 #26 'bL' // 3d7-3d9 #11 - '3A' // 3da #78 + '2Y' // 3da #76 'L' // 3db #11 - '3A' // 3dc #78 + '2Y' // 3dc #76 'L' // 3dd #11 - '3A' // 3de #78 + '2Y' // 3de #76 'L' // 3df #11 - '3A' // 3e0 #78 + '2Y' // 3e0 #76 'L' // 3e1 #11 - 'm3S' // 3e2-3ef #96 - 'a1B' // 3f0-3f1 #27 + 'm3R' // 3e2-3ef #95 + 'a1A' // 3f0-3f1 #26 'aL' // 3f2-3f3 #11 - 'a1B' // 3f4-3f5 #27 + 'a1A' // 3f4-3f5 #26 'jL' // 3f6-400 #11 'S' // 401 #18 'mL' // 402-40f #11 @@ -1001,19 +1002,19 @@ const String encodedFontSetRanges = 'L' // 450 #11 'S' // 451 #18 '1vL' // 452-482 #11 - '8S' // 483 #226 + '8R' // 483 #225 '3J' // 484 #87 'aL' // 485-486 #11 '3J' // 487 #87 '6kL' // 488-52f #11 'E' // 530 - '1k2P' // 531-556 #67 + '1k2O' // 531-556 #66 'aE' // 557-558 - '1u2P' // 559-588 #67 - '10H' // 589 #267 - '2P' // 58a #67 + '1u2O' // 559-588 #66 + '10J' // 589 #269 + '2O' // 58a #66 'aE' // 58b-58c - 'b2P' // 58d-58f #67 + 'b2O' // 58d-58f #66 'E' // 590 '2b1U' // 591-5c7 #46 'gE' // 5c8-5cf @@ -1022,47 +1023,47 @@ const String encodedFontSetRanges = 'd1U' // 5f0-5f4 #46 'jE' // 5f5-5ff 'dZ' // 600-604 #25 - '10D' // 605 #263 + '10F' // 605 #265 'eZ' // 606-60b #25 - '3N' // 60c #91 + '3M' // 60c #90 'mZ' // 60d-61a #25 - '3N' // 61b #91 + '3M' // 61b #90 'Z' // 61c #25 'E' // 61d 'Z' // 61e #25 - '10B' // 61f #261 + '10D' // 61f #263 'Z' // 620 #25 - '3O' // 621 #92 + '3N' // 621 #91 'dZ' // 622-626 #25 - '4U' // 627 #124 + '4V' // 627 #125 'wZ' // 628-63f #25 - '10A' // 640 #260 + '10C' // 640 #262 'iZ' // 641-64a #25 - 'j3O' // 64b-655 #92 + 'j3N' // 64b-655 #91 'iZ' // 656-65f #25 - 'i10E' // 660-669 #264 - '3N' // 66a #91 - 'a10G' // 66b-66c #266 + 'i10G' // 660-669 #266 + '3M' // 66a #90 + 'a10I' // 66b-66c #268 'bZ' // 66d-66f #25 - '3O' // 670 #92 + '3N' // 670 #91 '4vZ' // 671-6ef #25 - 'i4U' // 6f0-6f9 #124 + 'i4V' // 6f0-6f9 #125 'eZ' // 6fa-6ff #25 - 'm4G' // 700-70d #110 + 'm4F' // 700-70d #109 'E' // 70e - '2g4G' // 70f-74a #110 + '2g4F' // 70f-74a #109 'aE' // 74b-74c - 'b4G' // 74d-74f #110 + 'b4F' // 74d-74f #109 '1uZ' // 750-77f #25 - '1w11Y' // 780-7b1 #310 + '1w12A' // 780-7b1 #312 'mE' // 7b2-7bf - '2f5V' // 7c0-7fa #151 + '2f5W' // 7c0-7fa #152 'aE' // 7fb-7fc - 'b5V' // 7fd-7ff #151 + 'b5W' // 7fd-7ff #152 '2kE' // 800-83f - '1a5R' // 840-85b #147 + '1a5S' // 840-85b #148 'aE' // 85c-85d - '5R' // 85e #147 + '5S' // 85e #148 '2lE' // 85f-89f 'tZ' // 8a0-8b4 #25 'E' // 8b5 @@ -1070,76 +1071,76 @@ const String encodedFontSetRanges = 'sE' // 8bf-8d2 '1rZ' // 8d3-8ff #25 '2h1J' // 900-93c #35 - '8O' // 93d #222 + '8N' // 93d #221 'r1J' // 93e-950 #35 - 'a7V' // 951-952 #203 + 'a7U' // 951-952 #202 'p1J' // 953-963 #35 - 'a7U' // 964-965 #202 - 'i8M' // 966-96f #220 + 'a7T' // 964-965 #201 + 'i8L' // 966-96f #219 'o1J' // 970-97f #35 - 'c1F' // 980-983 #31 + 'c1E' // 980-983 #30 'E' // 984 - 'g1F' // 985-98c #31 + 'g1E' // 985-98c #30 'aE' // 98d-98e - 'a1F' // 98f-990 #31 + 'a1E' // 98f-990 #30 'aE' // 991-992 - 'u1F' // 993-9a8 #31 + 'u1E' // 993-9a8 #30 'E' // 9a9 - 'f1F' // 9aa-9b0 #31 + 'f1E' // 9aa-9b0 #30 'E' // 9b1 - '1F' // 9b2 #31 + '1E' // 9b2 #30 'bE' // 9b3-9b5 - 'c1F' // 9b6-9b9 #31 + 'c1E' // 9b6-9b9 #30 'aE' // 9ba-9bb - 'h1F' // 9bc-9c4 #31 + 'h1E' // 9bc-9c4 #30 'aE' // 9c5-9c6 - 'a1F' // 9c7-9c8 #31 + 'a1E' // 9c7-9c8 #30 'aE' // 9c9-9ca - 'c1F' // 9cb-9ce #31 + 'c1E' // 9cb-9ce #30 'gE' // 9cf-9d6 - '1F' // 9d7 #31 + '1E' // 9d7 #30 'cE' // 9d8-9db - 'a1F' // 9dc-9dd #31 + 'a1E' // 9dc-9dd #30 'E' // 9de - 'd1F' // 9df-9e3 #31 + 'd1E' // 9df-9e3 #30 'aE' // 9e4-9e5 - 'i10I' // 9e6-9ef #268 - 'c1F' // 9f0-9f3 #31 - 'c10J' // 9f4-9f7 #269 - 'f1F' // 9f8-9fe #31 + 'i10K' // 9e6-9ef #270 + 'c1E' // 9f0-9f3 #30 + 'c10L' // 9f4-9f7 #271 + 'f1E' // 9f8-9fe #30 'aE' // 9ff-a00 - 'b1H' // a01-a03 #33 + 'b1G' // a01-a03 #32 'E' // a04 - 'e1H' // a05-a0a #33 + 'e1G' // a05-a0a #32 'cE' // a0b-a0e - 'a1H' // a0f-a10 #33 + 'a1G' // a0f-a10 #32 'aE' // a11-a12 - 'u1H' // a13-a28 #33 + 'u1G' // a13-a28 #32 'E' // a29 - 'f1H' // a2a-a30 #33 + 'f1G' // a2a-a30 #32 'E' // a31 - 'a1H' // a32-a33 #33 + 'a1G' // a32-a33 #32 'E' // a34 - 'a1H' // a35-a36 #33 + 'a1G' // a35-a36 #32 'E' // a37 - 'a1H' // a38-a39 #33 + 'a1G' // a38-a39 #32 'aE' // a3a-a3b - '1H' // a3c #33 + '1G' // a3c #32 'E' // a3d - 'd1H' // a3e-a42 #33 + 'd1G' // a3e-a42 #32 'cE' // a43-a46 - 'a1H' // a47-a48 #33 + 'a1G' // a47-a48 #32 'aE' // a49-a4a - 'b1H' // a4b-a4d #33 + 'b1G' // a4b-a4d #32 'bE' // a4e-a50 - '1H' // a51 #33 + '1G' // a51 #32 'fE' // a52-a58 - 'c1H' // a59-a5c #33 + 'c1G' // a59-a5c #32 'E' // a5d - '1H' // a5e #33 + '1G' // a5e #32 'fE' // a5f-a65 - 'i10V' // a66-a6f #281 - 'f1H' // a70-a76 #33 + 'i10X' // a66-a6f #283 + 'f1G' // a70-a76 #32 'iE' // a77-a80 'b1K' // a81-a83 #36 'E' // a84 @@ -1165,7 +1166,7 @@ const String encodedFontSetRanges = 'nE' // ad1-adf 'c1K' // ae0-ae3 #36 'aE' // ae4-ae5 - 'i10U' // ae6-aef #280 + 'i10W' // ae6-aef #282 'a1K' // af0-af1 #36 'fE' // af2-af8 'f1K' // af9-aff #36 @@ -1198,41 +1199,41 @@ const String encodedFontSetRanges = 'aE' // b64-b65 'q1L' // b66-b77 #37 'iE' // b78-b81 - 'a1E' // b82-b83 #30 + 'a1D' // b82-b83 #29 'E' // b84 - 'e1E' // b85-b8a #30 + 'e1D' // b85-b8a #29 'bE' // b8b-b8d - 'b1E' // b8e-b90 #30 + 'b1D' // b8e-b90 #29 'E' // b91 - 'c1E' // b92-b95 #30 + 'c1D' // b92-b95 #29 'bE' // b96-b98 - 'a1E' // b99-b9a #30 + 'a1D' // b99-b9a #29 'E' // b9b - '1E' // b9c #30 + '1D' // b9c #29 'E' // b9d - 'a1E' // b9e-b9f #30 + 'a1D' // b9e-b9f #29 'bE' // ba0-ba2 - 'a1E' // ba3-ba4 #30 + 'a1D' // ba3-ba4 #29 'bE' // ba5-ba7 - 'a1E' // ba8-ba9 #30 - '2K' // baa #62 + 'a1D' // ba8-ba9 #29 + '2J' // baa #61 'bE' // bab-bad - 'f1E' // bae-bb4 #30 - '2K' // bb5 #62 - 'c1E' // bb6-bb9 #30 + 'f1D' // bae-bb4 #29 + '2J' // bb5 #61 + 'c1D' // bb6-bb9 #29 'cE' // bba-bbd - 'd1E' // bbe-bc2 #30 + 'd1D' // bbe-bc2 #29 'bE' // bc3-bc5 - 'b1E' // bc6-bc8 #30 + 'b1D' // bc6-bc8 #29 'E' // bc9 - 'c1E' // bca-bcd #30 + 'c1D' // bca-bcd #29 'aE' // bce-bcf - '1E' // bd0 #30 + '1D' // bd0 #29 'eE' // bd1-bd6 - '1E' // bd7 #30 + '1D' // bd7 #29 'mE' // bd8-be5 - 'l2K' // be6-bf2 #62 - 'g1E' // bf3-bfa #30 + 'l2J' // be6-bf2 #61 + 'g1D' // bf3-bfa #29 'dE' // bfb-bff 'l1P' // c00-c0c #41 'E' // c0d @@ -1283,19 +1284,19 @@ const String encodedFontSetRanges = 'E' // cf0 'a1M' // cf1-cf2 #38 'lE' // cf3-cff - 'l2F' // d00-d0c #57 + 'l2E' // d00-d0c #56 'E' // d0d - 'b2F' // d0e-d10 #57 + 'b2E' // d0e-d10 #56 'E' // d11 - '1x2F' // d12-d44 #57 + '1x2E' // d12-d44 #56 'E' // d45 - 'b2F' // d46-d48 #57 + 'b2E' // d46-d48 #56 'E' // d49 - 'e2F' // d4a-d4f #57 + 'e2E' // d4a-d4f #56 'cE' // d50-d53 - 'o2F' // d54-d63 #57 + 'o2E' // d54-d63 #56 'aE' // d64-d65 - 'y2F' // d66-d7f #57 + 'y2E' // d66-d7f #56 'E' // d80 'b1N' // d81-d83 #39 'E' // d84 @@ -1321,49 +1322,35 @@ const String encodedFontSetRanges = 'aE' // df0-df1 'b1N' // df2-df4 #39 'kE' // df5-e00 - '2e6P' // e01-e3a #171 + '2e6Q' // e01-e3a #172 'cE' // e3b-e3e - '1b6P' // e3f-e5b #171 + '1b6Q' // e3f-e5b #172 '1jE' // e5c-e80 - 'a1D' // e81-e82 #29 + 'a1Q' // e81-e82 #42 'E' // e83 - '1D' // e84 #29 - 'aE' // e85-e86 - 'a1D' // e87-e88 #29 - 'E' // e89 - '1D' // e8a #29 - 'aE' // e8b-e8c - '1D' // e8d #29 - 'eE' // e8e-e93 - 'c1D' // e94-e97 #29 - 'E' // e98 - 'f1D' // e99-e9f #29 - 'E' // ea0 - 'b1D' // ea1-ea3 #29 + '1Q' // e84 #42 + 'E' // e85 + 'd1Q' // e86-e8a #42 + 'E' // e8b + 'w1Q' // e8c-ea3 #42 'E' // ea4 - '1D' // ea5 #29 + '1Q' // ea5 #42 'E' // ea6 - '1D' // ea7 #29 - 'aE' // ea8-ea9 - 'a1D' // eaa-eab #29 - 'E' // eac - 'l1D' // ead-eb9 #29 - 'E' // eba - 'b1D' // ebb-ebd #29 + 'v1Q' // ea7-ebd #42 'aE' // ebe-ebf - 'd1D' // ec0-ec4 #29 + 'd1Q' // ec0-ec4 #42 'E' // ec5 - '1D' // ec6 #29 + '1Q' // ec6 #42 'E' // ec7 - 'e1D' // ec8-ecd #29 - 'aE' // ece-ecf - 'i1D' // ed0-ed9 #29 + 'f1Q' // ec8-ece #42 + 'E' // ecf + 'i1Q' // ed0-ed9 #42 'aE' // eda-edb - 'c1D' // edc-edf #29 + 'c1Q' // edc-edf #42 '11aE' // ee0-fff - '2k3G' // 1000-103f #84 - 'i10O' // 1040-1049 #274 - '3g3G' // 104a-109f #84 + '2k3F' // 1000-103f #83 + 'i10Q' // 1040-1049 #276 + '3g3F' // 104a-109f #83 '1k1S' // 10a0-10c5 #44 'E' // 10c6 '1S' // 10c7 #44 @@ -1373,141 +1360,139 @@ const String encodedFontSetRanges = '1u1S' // 10d0-10ff #44 '9uR' // 1100-11ff #17 '15yE' // 1200-139f - '3g3R' // 13a0-13f5 #95 + '3g3Q' // 13a0-13f5 #94 'aE' // 13f6-13f7 - 'e3R' // 13f8-13fd #95 + 'e3Q' // 13f8-13fd #94 'aE' // 13fe-13ff - '24o3Q' // 1400-167f #94 - '1b11I' // 1680-169c #294 + '24o3P' // 1400-167f #93 + '1b11K' // 1680-169c #296 'bE' // 169d-169f - '3j11S' // 16a0-16f8 #304 + '3j11U' // 16a0-16f8 #306 'fE' // 16f9-16ff - 'u6K' // 1700-1715 #166 + 'u6L' // 1700-1715 #167 'hE' // 1716-171e - '6K' // 171f #166 - 't11C' // 1720-1734 #288 - 'a10M' // 1735-1736 #272 + '6L' // 171f #167 + 't11E' // 1720-1734 #290 + 'a10O' // 1735-1736 #274 'hE' // 1737-173f - 's10L' // 1740-1753 #271 + 's10N' // 1740-1753 #273 'kE' // 1754-175f - 'l4H' // 1760-176c #111 + 'l4G' // 1760-176c #110 'E' // 176d - 'b4H' // 176e-1770 #111 + 'b4G' // 176e-1770 #110 'E' // 1771 - 'a4H' // 1772-1773 #111 + 'a4G' // 1772-1773 #110 'kE' // 1774-177f - '3o3F' // 1780-17dd #83 + '3o3E' // 1780-17dd #82 'aE' // 17de-17df - 'i3F' // 17e0-17e9 #83 + 'i3E' // 17e0-17e9 #82 'eE' // 17ea-17ef - 'i3F' // 17f0-17f9 #83 + 'i3E' // 17f0-17f9 #82 'eE' // 17fa-17ff - '2H' // 1800 #59 - 'b5U' // 1801-1803 #150 - '2H' // 1804 #59 - '5U' // 1805 #150 - 'h2H' // 1806-180e #59 + '2G' // 1800 #58 + 'b5V' // 1801-1803 #151 + '2G' // 1804 #58 + '5V' // 1805 #151 + 'h2G' // 1806-180e #58 'E' // 180f - 'i2H' // 1810-1819 #59 + 'i2G' // 1810-1819 #58 'eE' // 181a-181f - '3j2H' // 1820-1878 #59 + '3j2G' // 1820-1878 #58 'fE' // 1879-187f - '1p2H' // 1880-18aa #59 + '1p2G' // 1880-18aa #58 'dE' // 18ab-18af - '2q3Q' // 18b0-18f5 #94 + '2q3P' // 18b0-18f5 #93 'iE' // 18f6-18ff - '1d2R' // 1900-191e #69 + '1d2Q' // 1900-191e #68 'E' // 191f - 'k2R' // 1920-192b #69 + 'k2Q' // 1920-192b #68 'cE' // 192c-192f - 'k2R' // 1930-193b #69 + 'k2Q' // 1930-193b #68 'cE' // 193c-193f - '2R' // 1940 #69 + '2Q' // 1940 #68 'bE' // 1941-1943 - 'k2R' // 1944-194f #69 - '1c6L' // 1950-196d #167 + 'k2Q' // 1944-194f #68 + '1c6M' // 1950-196d #168 'aE' // 196e-196f - 'd6L' // 1970-1974 #167 + 'd6M' // 1970-1974 #168 'jE' // 1975-197f - '1q2T' // 1980-19ab #71 + '1q3G' // 1980-19ab #84 'cE' // 19ac-19af - 'y2T' // 19b0-19c9 #71 + 'y3G' // 19b0-19c9 #84 'eE' // 19ca-19cf - 'a2T' // 19d0-19d1 #71 - 'E' // 19d2 - 'g2T' // 19d3-19da #71 + 'j3G' // 19d0-19da #84 'bE' // 19db-19dd - 'a2T' // 19de-19df #71 - '1e3F' // 19e0-19ff #83 - '1a5B' // 1a00-1a1b #131 + 'a3G' // 19de-19df #84 + '1e3E' // 19e0-19ff #82 + '1a5C' // 1a00-1a1b #132 'aE' // 1a1c-1a1d - 'a5B' // 1a1e-1a1f #131 - '2j2V' // 1a20-1a5e #73 + 'a5C' // 1a1e-1a1f #132 + '2j2T' // 1a20-1a5e #71 'E' // 1a5f - '1b2V' // 1a60-1a7c #73 + '1b2T' // 1a60-1a7c #71 'aE' // 1a7d-1a7e - 'j2V' // 1a7f-1a89 #73 + 'j2T' // 1a7f-1a89 #71 'eE' // 1a8a-1a8f - 'i2V' // 1a90-1a99 #73 + 'i2T' // 1a90-1a99 #71 'eE' // 1a9a-1a9f - 'm2V' // 1aa0-1aad #73 + 'm2T' // 1aa0-1aad #71 'aE' // 1aae-1aaf 'pL' // 1ab0-1ac0 #11 '2jE' // 1ac1-1aff - '2w4X' // 1b00-1b4b #127 + '2w4Y' // 1b00-1b4b #128 'cE' // 1b4c-1b4f - '1r4X' // 1b50-1b7c #127 + '1r4Y' // 1b50-1b7c #128 'bE' // 1b7d-1b7f - '2k6J' // 1b80-1bbf #165 - '1y5A' // 1bc0-1bf3 #130 + '2k6K' // 1b80-1bbf #166 + '1y5B' // 1bc0-1bf3 #131 'gE' // 1bf4-1bfb - 'c5A' // 1bfc-1bff #130 - '2c3X' // 1c00-1c37 #101 + 'c5B' // 1bfc-1bff #131 + '2c3W' // 1c00-1c37 #100 'bE' // 1c38-1c3a - 'n3X' // 1c3b-1c49 #101 + 'n3W' // 1c3b-1c49 #100 'bE' // 1c4a-1c4c - 'b3X' // 1c4d-1c4f #101 - '1u11J' // 1c50-1c7f #295 + 'b3W' // 1c4d-1c4f #100 + '1u11L' // 1c50-1c7f #297 'hL' // 1c80-1c88 #11 'fE' // 1c89-1c8f '1p1S' // 1c90-1cba #44 'aE' // 1cbb-1cbc 'b1S' // 1cbd-1cbf #44 - 'g6J' // 1cc0-1cc7 #165 + 'g6K' // 1cc0-1cc7 #166 'gE' // 1cc8-1ccf '4O' // 1cd0 #118 '1J' // 1cd1 #35 '4O' // 1cd2 #118 - '2Y' // 1cd3 #76 + '2W' // 1cd3 #74 '1J' // 1cd4 #35 - 'a2B' // 1cd5-1cd6 #53 - '2Z' // 1cd7 #77 - '2B' // 1cd8 #53 - '2Z' // 1cd9 #77 - '8N' // 1cda #221 + 'a2A' // 1cd5-1cd6 #52 + '2X' // 1cd7 #75 + '2A' // 1cd8 #52 + '2X' // 1cd9 #75 + '8M' // 1cda #220 '1J' // 1cdb #35 - 'a2Z' // 1cdc-1cdd #77 + 'a2X' // 1cdc-1cdd #75 'a1J' // 1cde-1cdf #35 - '2Z' // 1ce0 #77 - '2B' // 1ce1 #53 + '2X' // 1ce0 #75 + '2A' // 1ce1 #52 'g1J' // 1ce2-1ce9 #35 - '2B' // 1cea #53 + '2A' // 1cea #52 'a1J' // 1ceb-1cec #35 - '2B' // 1ced #53 + '2A' // 1ced #52 'c1J' // 1cee-1cf1 #35 - '7W' // 1cf2 #204 - '2Y' // 1cf3 #76 - '8I' // 1cf4 #216 - '7Z' // 1cf5 #207 - '2B' // 1cf6 #53 - '1F' // 1cf7 #31 - 'a2Y' // 1cf8-1cf9 #76 + '7V' // 1cf2 #203 + '2W' // 1cf3 #74 + '8H' // 1cf4 #215 + '7Y' // 1cf5 #206 + '2A' // 1cf6 #52 + '1E' // 1cf7 #30 + 'a2W' // 1cf8-1cf9 #74 'eE' // 1cfa-1cff '7vL' // 1d00-1dcc #11 '1O' // 1dcd #40 '1qL' // 1dce-1df9 #11 'E' // 1dfa - '9D' // 1dfb #237 + '9C' // 1dfb #236 '2mL' // 1dfc-1e3d #11 'aS' // 1e3e-1e3f #18 '2kL' // 1e40-1e7f #11 @@ -1551,16 +1536,16 @@ const String encodedFontSetRanges = 'hL' // 1ff6-1ffe #11 'E' // 1fff 'L' // 2000 #11 - '2N' // 2001 #65 + '2M' // 2001 #64 'S' // 2002 #18 - '8Q' // 2003 #224 + '8P' // 2003 #223 'fL' // 2004-200a #11 - '7M' // 200b #194 - '7O' // 200c #196 - '7A' // 200d #182 - 'a7R' // 200e-200f #199 - '7N' // 2010 #195 - '7P' // 2011 #197 + '7L' // 200b #193 + '7N' // 200c #195 + '6Z' // 200d #181 + 'a7Q' // 200e-200f #198 + '7M' // 2010 #194 + '7O' // 2011 #196 'S' // 2012 #18 'aV' // 2013-2014 #21 '3I' // 2015 #86 @@ -1575,31 +1560,31 @@ const String encodedFontSetRanges = 'a3I' // 2020-2021 #86 'V' // 2022 #21 'L' // 2023 #11 - '7S' // 2024 #200 - '8U' // 2025 #228 - '7H' // 2026 #189 + '7R' // 2024 #199 + '8T' // 2025 #227 + '7G' // 2026 #188 'S' // 2027 #18 'eL' // 2028-202d #11 '4S' // 202e #122 - '9B' // 202f #235 + '9A' // 202f #234 '3I' // 2030 #86 'L' // 2031 #11 - 'a1W' // 2032-2033 #48 - '1B' // 2034 #27 - '1W' // 2035 #48 - 'a1B' // 2036-2037 #27 + 'a1V' // 2032-2033 #47 + '1A' // 2034 #26 + '1V' // 2035 #47 + 'a1A' // 2036-2037 #26 'L' // 2038 #11 'aV' // 2039-203a #21 'S' // 203b #18 - '7C' // 203c #184 + '7B' // 203c #183 'dL' // 203d-2041 #11 'S' // 2042 #18 'L' // 2043 #11 - '7L' // 2044 #193 + '7K' // 2044 #192 'aL' // 2045-2046 #11 'S' // 2047 #18 - '8T' // 2048 #227 - '7B' // 2049 #183 + '8S' // 2048 #226 + '7A' // 2049 #182 'dL' // 204a-204e #11 '4N' // 204f #117 'L' // 2050 #11 @@ -1607,13 +1592,15 @@ const String encodedFontSetRanges = 'L' // 2052 #11 '1O' // 2053 #40 'L' // 2054 #11 - '9H' // 2055 #241 + '9I' // 2055 #242 '1O' // 2056 #40 - '1B' // 2057 #27 + '1A' // 2057 #26 'a1O' // 2058-2059 #40 - 'bL' // 205a-205c #11 - '9A' // 205d #234 - 'fL' // 205e-2064 #11 + '9E' // 205a #238 + 'aL' // 205b-205c #11 + '8Z' // 205d #233 + '9D' // 205e #237 + 'eL' // 205f-2064 #11 'E' // 2065 'kL' // 2066-2071 #11 'aE' // 2072-2073 @@ -1626,81 +1613,81 @@ const String encodedFontSetRanges = 'bE' // 209d-209f 'hL' // 20a0-20a8 #11 'S' // 20a9 #18 - '8V' // 20aa #229 + '8U' // 20aa #228 'S' // 20ab #18 'V' // 20ac #21 - '8X' // 20ad #231 + '8W' // 20ad #230 'jL' // 20ae-20b8 #11 - '7X' // 20b9 #205 + '7W' // 20b9 #204 'cL' // 20ba-20bd #11 - '8R' // 20be #225 + '8Q' // 20be #224 'L' // 20bf #11 'oE' // 20c0-20cf 'jO' // 20d0-20da #14 - '11G' // 20db #292 + '11I' // 20db #294 'O' // 20dc #14 - '9T' // 20dd #253 - '1A' // 20de #26 + '9V' // 20dd #255 + '1B' // 20de #27 'aT' // 20df-20e0 #19 'O' // 20e1 #14 '4T' // 20e2 #123 '9L' // 20e3 #245 'T' // 20e4 #19 'jO' // 20e5-20ef #14 - '2Y' // 20f0 #76 + '2W' // 20f0 #74 'nE' // 20f1-20ff 'S' // 2100 #18 'L' // 2101 #11 - '1B' // 2102 #27 + '1A' // 2102 #26 'S' // 2103 #18 'L' // 2104 #11 'S' // 2105 #18 'bL' // 2106-2108 #11 'S' // 2109 #18 - '1W' // 210a #48 - 'c1B' // 210b-210e #27 + '1V' // 210a #47 + 'c1A' // 210b-210e #26 'S' // 210f #18 - 'b1B' // 2110-2112 #27 + 'b1A' // 2110-2112 #26 'S' // 2113 #18 'L' // 2114 #11 - '1B' // 2115 #27 + '1A' // 2115 #26 'S' // 2116 #18 'aL' // 2117-2118 #11 - 'd1B' // 2119-211d #27 + 'd1A' // 2119-211d #26 'bL' // 211e-2120 #11 'S' // 2121 #18 '3H' // 2122 #85 'L' // 2123 #11 - '1B' // 2124 #27 + '1A' // 2124 #26 'L' // 2125 #11 'aS' // 2126-2127 #18 - '1B' // 2128 #27 + '1A' // 2128 #26 'aL' // 2129-212a #11 'S' // 212b #18 - 'a1B' // 212c-212d #27 + 'a1A' // 212c-212d #26 'S' // 212e #18 - 'b1B' // 212f-2131 #27 + 'b1A' // 212f-2131 #26 'L' // 2132 #11 - 'a1B' // 2133-2134 #27 - '1W' // 2135 #48 - 'b1B' // 2136-2138 #27 - '6V' // 2139 #177 + 'a1A' // 2133-2134 #26 + '1V' // 2135 #47 + 'b1A' // 2136-2138 #26 + '6W' // 2139 #178 'L' // 213a #11 'S' // 213b #18 - 'd1B' // 213c-2140 #27 + 'd1A' // 213c-2140 #26 'cL' // 2141-2144 #11 - 'd1B' // 2145-2149 #27 + 'd1A' // 2145-2149 #26 'uL' // 214a-215f #11 - 'k1A' // 2160-216b #26 + 'k1B' // 2160-216b #27 'cT' // 216c-216f #19 - 'k1A' // 2170-217b #26 + 'k1B' // 2170-217b #27 'gT' // 217c-2183 #19 'L' // 2184 #11 'cT' // 2185-2188 #19 'L' // 2189 #11 'aT' // 218a-218b #19 'cE' // 218c-218f - 'c3L' // 2190-2193 #89 + 'c4U' // 2190-2193 #124 'e9N' // 2194-2199 #247 'nO' // 219a-21a8 #14 'a9R' // 21a9-21aa #251 @@ -1735,13 +1722,13 @@ const String encodedFontSetRanges = 'U' // 220f #20 'O' // 2210 #14 'U' // 2211 #20 - '1V' // 2212 #47 + '1H' // 2212 #33 'U' // 2213 #20 'O' // 2214 #14 - '1W' // 2215 #48 + '1V' // 2215 #47 'aO' // 2216-2217 #14 - '2O' // 2218 #66 - '9Y' // 2219 #258 + '2N' // 2218 #65 + '10A' // 2219 #260 'U' // 221a #20 'aO' // 221b-221c #14 'cU' // 221d-2220 #20 @@ -1779,7 +1766,7 @@ const String encodedFontSetRanges = 'aU' // 228a-228b #20 'hO' // 228c-2294 #14 'cU' // 2295-2298 #20 - '2C' // 2299 #54 + '2B' // 2299 #53 'eO' // 229a-229f #14 'U' // 22a0 #20 'cO' // 22a1-22a4 #14 @@ -1787,53 +1774,53 @@ const String encodedFontSetRanges = 'xO' // 22a6-22be #14 'U' // 22bf #20 'cO' // 22c0-22c3 #14 - 'b2O' // 22c4-22c6 #66 + 'b2N' // 22c4-22c6 #65 'rO' // 22c7-22d9 #14 'aU' // 22da-22db #20 'rO' // 22dc-22ee #14 'U' // 22ef #20 'oO' // 22f0-22ff #14 'dT' // 2300-2304 #19 - 'b1A' // 2305-2307 #26 - 'c2I' // 2308-230b #60 + 'b1B' // 2305-2307 #27 + 'c2H' // 2308-230b #59 'cT' // 230c-230f #19 'O' // 2310 #14 'T' // 2311 #19 - '1A' // 2312 #26 + '1B' // 2312 #27 'bT' // 2313-2315 #19 'M' // 2316 #12 'T' // 2317 #19 'W' // 2318 #22 'O' // 2319 #14 'aN' // 231a-231b #13 - 'c2I' // 231c-231f #60 + 'c2H' // 231c-231f #59 'aO' // 2320-2321 #14 'aT' // 2322-2323 #19 'cM' // 2324-2327 #12 'N' // 2328 #13 - 'a1A' // 2329-232a #26 + 'a1B' // 2329-232a #27 'M' // 232b #12 'iT' // 232c-2335 #19 '2pO' // 2336-237a #14 'M' // 237b #12 - '2I' // 237c #60 + '2H' // 237c #59 'bM' // 237d-237f #12 'sT' // 2380-2393 #19 '4T' // 2394 #123 'O' // 2395 #14 'dT' // 2396-239a #19 'sO' // 239b-23ae #14 - '2I' // 23af #60 + '2H' // 23af #59 'aU' // 23b0-23b1 #20 'dO' // 23b2-23b6 #14 'fE' // 23b7-23bd - 'n1A' // 23be-23cc #26 + 'n1B' // 23be-23cc #27 'T' // 23cd #19 'W' // 23ce #22 'N' // 23cf #13 - '2I' // 23d0 #60 + '2H' // 23d0 #59 'hT' // 23d1-23d9 #19 - 'a1A' // 23da-23db #26 + 'a1B' // 23da-23db #27 'eO' // 23dc-23e1 #14 'fT' // 23e2-23e8 #19 'aN' // 23e9-23ea #13 @@ -1849,35 +1836,35 @@ const String encodedFontSetRanges = 'xE' // 2427-243f 'jM' // 2440-244a #12 'tE' // 244b-245f - 's9V' // 2460-2473 #255 - 'a3L' // 2474-2475 #89 - '2w1A' // 2476-24c1 #26 - '1X' // 24c2 #49 - '2h1A' // 24c3-24ff #26 + 's9X' // 2460-2473 #257 + 'a4U' // 2474-2475 #124 + '2w1B' // 2476-24c1 #27 + '1W' // 24c2 #48 + '2h1B' // 24c3-24ff #27 '6cA' // 2500-259f #0 'iW' // 25a0-25a9 #22 'a1I' // 25aa-25ab #34 'bM' // 25ac-25ae #12 - '2O' // 25af #66 + '2N' // 25af #65 'M' // 25b0 #12 'aW' // 25b1-25b2 #22 - '2C' // 25b3 #54 + '2B' // 25b3 #53 'aM' // 25b4-25b5 #12 '1I' // 25b6 #34 - '2C' // 25b7 #54 + '2B' // 25b7 #53 'cM' // 25b8-25bb #12 'W' // 25bc #22 - '2C' // 25bd #54 + '2B' // 25bd #53 'aM' // 25be-25bf #12 '1I' // 25c0 #34 - '2C' // 25c1 #54 + '2B' // 25c1 #53 'cM' // 25c2-25c5 #12 'aW' // 25c6-25c7 #22 'M' // 25c8 #12 'W' // 25c9 #22 - '2C' // 25ca #54 + '2B' // 25ca #53 'W' // 25cb #22 - '7J' // 25cc #191 + '7I' // 25cc #190 'M' // 25cd #12 'eW' // 25ce-25d3 #22 'mM' // 25d4-25e1 #12 @@ -1915,18 +1902,18 @@ const String encodedFontSetRanges = 'bT' // 2627-2629 #19 '1C' // 262a #28 'T' // 262b #19 - '9U' // 262c #254 + '9W' // 262c #256 'T' // 262d #19 '1C' // 262e #28 - '1X' // 262f #49 + '1W' // 262f #48 'gM' // 2630-2637 #12 'b1C' // 2638-263a #28 'T' // 263b #19 'M' // 263c #12 'bT' // 263d-263f #19 - '1X' // 2640 #49 - '1A' // 2641 #26 - '1X' // 2642 #49 + '1W' // 2640 #48 + '1B' // 2641 #27 + '1W' // 2642 #48 'dT' // 2643-2647 #19 'k1C' // 2648-2653 #28 'jM' // 2654-265e #12 @@ -1938,12 +1925,12 @@ const String encodedFontSetRanges = 'a1I' // 2665-2666 #34 'W' // 2667 #22 '1I' // 2668 #34 - 'c1A' // 2669-266c #26 - 'b3L' // 266d-266f #89 - 'a9W' // 2670-2671 #256 - 'h1A' // 2672-267a #26 - '1X' // 267b #49 - 'a1A' // 267c-267d #26 + 'c9U' // 2669-266c #254 + 'b9T' // 266d-266f #253 + 'a9Y' // 2670-2671 #258 + 'h1B' // 2672-267a #27 + '1W' // 267b #48 + 'a1B' // 267c-267d #27 '1C' // 267e #28 'N' // 267f #13 'oM' // 2680-268f #12 @@ -2033,7 +2020,7 @@ const String encodedFontSetRanges = 'jM' // 2758-2762 #12 'aN' // 2763-2764 #13 'pM' // 2765-2775 #12 - '1c1A' // 2776-2793 #26 + '1c1B' // 2776-2793 #27 'M' // 2794 #12 'bP' // 2795-2797 #15 'hM' // 2798-27a0 #12 @@ -2045,15 +2032,15 @@ const String encodedFontSetRanges = '2kO' // 27c0-27ff #14 '9uM' // 2800-28ff #12 '1fO' // 2900-2920 #14 - 'a2I' // 2921-2922 #60 + 'a2H' // 2921-2922 #59 'pO' // 2923-2933 #14 'a9Q' // 2934-2935 #250 '2vO' // 2936-2980 #14 - '2O' // 2981 #66 + '2N' // 2981 #65 '2hO' // 2982-29be #14 - '2C' // 29bf #54 + '2B' // 29bf #53 '1pO' // 29c0-29ea #14 - '2O' // 29eb #66 + '2N' // 29eb #65 'mO' // 29ec-29f9 #14 'aU' // 29fa-29fb #20 '9yO' // 29fc-2aff #14 @@ -2078,41 +2065,41 @@ const String encodedFontSetRanges = '3xM' // 2b97-2bfd #12 'O' // 2bfe #14 'M' // 2bff #12 - '1t2D' // 2c00-2c2e #55 + '1t2C' // 2c00-2c2e #54 'E' // 2c2f - '1t2D' // 2c30-2c5e #55 + '1t2C' // 2c30-2c5e #54 'E' // 2c5f '1eL' // 2c60-2c7f #11 - '4k3S' // 2c80-2cf3 #96 + '4k3R' // 2c80-2cf3 #95 'dE' // 2cf4-2cf8 - 'f3S' // 2cf9-2cff #96 + 'f3R' // 2cf9-2cff #95 '1k1S' // 2d00-2d25 #44 'E' // 2d26 '1S' // 2d27 #44 'dE' // 2d28-2d2c '1S' // 2d2d #44 'aE' // 2d2e-2d2f - '2c4I' // 2d30-2d67 #112 + '2c4H' // 2d30-2d67 #111 'fE' // 2d68-2d6e - 'a4I' // 2d6f-2d70 #112 + 'a4H' // 2d6f-2d70 #111 'mE' // 2d71-2d7e - '4I' // 2d7f #112 + '4H' // 2d7f #111 '3qE' // 2d80-2ddf '2bL' // 2de0-2e16 #11 '1O' // 2e17 #40 'cL' // 2e18-2e1b #11 - 'a9C' // 2e1c-2e1d #236 + 'a9B' // 2e1c-2e1d #235 'iL' // 2e1e-2e27 #11 'a4M' // 2e28-2e29 #116 'eL' // 2e2a-2e2f #11 - 'a7T' // 2e30-2e31 #201 + 'a7S' // 2e30-2e31 #200 'L' // 2e32 #11 'a1O' // 2e33-2e34 #40 'dL' // 2e35-2e39 #11 'aS' // 2e3a-2e3b #18 - '2N' // 2e3c #65 + '2M' // 2e3c #64 'bL' // 2e3d-2e3f #11 - '2N' // 2e40 #65 + '2M' // 2e40 #64 '4N' // 2e41 #117 'pL' // 2e42-2e52 #11 '1rE' // 2e53-2e7f @@ -2124,16 +2111,16 @@ const String encodedFontSetRanges = 'yE' // 2fd6-2fef 'kA' // 2ff0-2ffb #0 'cE' // 2ffc-2fff - '3T' // 3000 #97 - 'a10X' // 3001-3002 #283 + '3S' // 3000 #96 + 'a10Z' // 3001-3002 #285 'cA' // 3003-3006 #0 - '11A' // 3007 #286 - 'a10Z' // 3008-3009 #285 - 'a10W' // 300a-300b #282 - 'c10Y' // 300c-300f #284 - 'a5F' // 3010-3011 #135 + '11C' // 3007 #288 + 'a11B' // 3008-3009 #287 + 'a10Y' // 300a-300b #284 + 'c11A' // 300c-300f #286 + 'a5G' // 3010-3011 #136 'aA' // 3012-3013 #0 - 'g5F' // 3014-301b #135 + 'g5G' // 3014-301b #136 'sA' // 301c-302f #0 '1R' // 3030 #43 'kA' // 3031-303c #0 @@ -2143,7 +2130,7 @@ const String encodedFontSetRanges = '3gA' // 3041-3096 #0 'aE' // 3097-3098 '3sA' // 3099-30fa #0 - '3U' // 30fb #98 + '3T' // 30fb #97 'cA' // 30fc-30ff #0 'dE' // 3100-3104 '1pA' // 3105-312f #0 @@ -2613,7 +2600,7 @@ const String encodedFontSetRanges = 'iD' // 3acc-3ad5 #3 'aF' // 3ad6-3ad7 #5 'aD' // 3ad8-3ad9 #3 - '6F' // 3ada #161 + '6G' // 3ada #162 'D' // 3adb #3 'K' // 3adc #10 'D' // 3add #3 @@ -6227,7 +6214,7 @@ const String encodedFontSetRanges = 'F' // 5c7d #5 'B' // 5c7e #1 'cD' // 5c7f-5c82 #3 - '11B' // 5c83 #287 + '11D' // 5c83 #289 'D' // 5c84 #3 'aB' // 5c85-5c86 #1 'F' // 5c87 #5 @@ -17762,77 +17749,75 @@ const String encodedFontSetRanges = 'B' // 9fd0 #1 '1dD' // 9fd1-9fef #3 'oE' // 9ff0-9fff - '44t6U' // a000-a48c #176 + '44t6V' // a000-a48c #177 'bE' // a48d-a48f - '2b6U' // a490-a4c6 #176 + '2b6V' // a490-a4c6 #177 'hE' // a4c7-a4cf - '1u5P' // a4d0-a4ff #145 - '11m11Z' // a500-a62b #311 + '1u5Q' // a4d0-a4ff #146 + '11m12B' // a500-a62b #313 'sE' // a62c-a63f '1tL' // a640-a66e #11 '3J' // a66f #87 '1uL' // a670-a69f #11 - '3i4Y' // a6a0-a6f7 #128 + '3i4Z' // a6a0-a6f7 #129 'gE' // a6f8-a6ff - '5hL' // a700-a78a #11 - 'a9I' // a78b-a78c #242 - '1xL' // a78d-a7bf #11 + '7iL' // a700-a7bf #11 'aE' // a7c0-a7c1 'hL' // a7c2-a7ca #11 '1oE' // a7cb-a7f4 'jL' // a7f5-a7ff #11 - '1r11X' // a800-a82c #309 + '1r11Z' // a800-a82c #311 'bE' // a82d-a82f - 'b8J' // a830-a832 #217 - 'b8K' // a833-a835 #218 - 'c8L' // a836-a839 #219 + 'b8I' // a830-a832 #216 + 'b8J' // a833-a835 #217 + 'c8K' // a836-a839 #218 'eE' // a83a-a83f - '2c11R' // a840-a877 #303 + '2c11T' // a840-a877 #305 'gE' // a878-a87f - '2q6G' // a880-a8c5 #162 + '2q6H' // a880-a8c5 #163 'gE' // a8c6-a8cd - 'k6G' // a8ce-a8d9 #162 + 'k6H' // a8ce-a8d9 #163 'eE' // a8da-a8df 'p1J' // a8e0-a8f0 #35 - '2B' // a8f1 #53 + '2A' // a8f1 #52 '1J' // a8f2 #35 - '8P' // a8f3 #223 + '8O' // a8f3 #222 'k1J' // a8f4-a8ff #35 - '1s5L' // a900-a92d #141 - '8W' // a92e #230 - '5L' // a92f #141 - '1i6E' // a930-a953 #160 + '1s5M' // a900-a92d #142 + '8V' // a92e #229 + '5M' // a92f #142 + '1i6F' // a930-a953 #161 'jE' // a954-a95e - '6E' // a95f #160 + '6F' // a95f #161 '1bR' // a960-a97c #17 'bE' // a97d-a97f - '2y3W' // a980-a9cd #100 + '2y3V' // a980-a9cd #99 'E' // a9ce - '10K' // a9cf #270 - 'i3W' // a9d0-a9d9 #100 + '10M' // a9cf #272 + 'i3V' // a9d0-a9d9 #99 'cE' // a9da-a9dd - 'a3W' // a9de-a9df #100 - '1d3G' // a9e0-a9fe #84 + 'a3V' // a9de-a9df #99 + '1d3F' // a9e0-a9fe #83 'E' // a9ff - '2b3C' // aa00-aa36 #80 + '2b3B' // aa00-aa36 #79 'hE' // aa37-aa3f - 'm3C' // aa40-aa4d #80 + 'm3B' // aa40-aa4d #79 'aE' // aa4e-aa4f - 'i3C' // aa50-aa59 #80 + 'i3B' // aa50-aa59 #79 'aE' // aa5a-aa5b - 'c3C' // aa5c-aa5f #80 - '1e3G' // aa60-aa7f #84 - '2n6M' // aa80-aac2 #168 + 'c3B' // aa5c-aa5f #79 + '1e3F' // aa60-aa7f #83 + '2n6N' // aa80-aac2 #169 'wE' // aac3-aada - 'd6M' // aadb-aadf #168 - 'v4A' // aae0-aaf6 #104 + 'd6N' // aadb-aadf #169 + 'v3Z' // aae0-aaf6 #103 '2dE' // aaf7-ab2f '2gL' // ab30-ab6b #11 'cE' // ab6c-ab6f - '3a3R' // ab70-abbf #95 - '1s4A' // abc0-abed #104 + '3a3Q' // ab70-abbf #94 + '1s3Z' // abc0-abed #103 'aE' // abee-abef - 'i4A' // abf0-abf9 #104 + 'i3Z' // abf0-abf9 #103 'eE' // abfa-abff '429qR' // ac00-d7a3 #17 'kE' // d7a4-d7af @@ -17841,13 +17826,13 @@ const String encodedFontSetRanges = '1vR' // d7cb-d7fb #17 '325aE' // d7fc-f8ff 'cA' // f900-f903 #0 - '3E' // f904 #82 + '3D' // f904 #81 'aA' // f905-f906 #0 '1T' // f907 #45 - '3E' // f908 #82 + '3D' // f908 #81 'aQ' // f909-f90a #16 'A' // f90b #0 - '1Y' // f90c #50 + '1X' // f90c #49 '1T' // f90d #45 'fQ' // f90e-f914 #16 'A' // f915 #0 @@ -17864,14 +17849,14 @@ const String encodedFontSetRanges = 'Q' // f92e #16 'J' // f92f #9 'Q' // f930 #16 - '5J' // f931 #139 + '5K' // f931 #140 'aJ' // f932-f933 #9 - '1Y' // f934 #50 + '1X' // f934 #49 'J' // f935 #9 'Q' // f936 #16 'A' // f937 #0 'J' // f938 #9 - '5J' // f939 #139 + '5K' // f939 #140 'A' // f93a #0 'gQ' // f93b-f942 #16 'A' // f943 #0 @@ -17896,7 +17881,7 @@ const String encodedFontSetRanges = 'J' // f966 #9 'A' // f967 #0 'dQ' // f968-f96c #16 - '3E' // f96d #82 + '3D' // f96d #81 'J' // f96e #9 'bQ' // f96f-f971 #16 'A' // f972 #0 @@ -17908,7 +17893,7 @@ const String encodedFontSetRanges = '1T' // f978 #45 'A' // f979 #0 'J' // f97a #9 - '1Y' // f97b #50 + '1X' // f97b #49 'aQ' // f97c-f97d #16 'A' // f97e #0 'J' // f97f #9 @@ -17929,7 +17914,7 @@ const String encodedFontSetRanges = 'J' // f998 #9 'bQ' // f999-f99b #16 '1T' // f99c #45 - '3E' // f99d #82 + '3D' // f99d #81 'Q' // f99e #16 '1T' // f99f #45 'iQ' // f9a0-f9a9 #16 @@ -17946,7 +17931,7 @@ const String encodedFontSetRanges = 'A' // f9bb #0 'Q' // f9bc #16 'A' // f9bd #0 - '1Y' // f9be #50 + '1X' // f9be #49 'Q' // f9bf #16 'J' // f9c0 #9 'cQ' // f9c1-f9c4 #16 @@ -17954,16 +17939,16 @@ const String encodedFontSetRanges = 'Q' // f9c7 #16 '1T' // f9c8 #45 'fQ' // f9c9-f9cf #16 - '1Y' // f9d0 #50 + '1X' // f9d0 #49 'fQ' // f9d1-f9d7 #16 'A' // f9d8 #0 - '1Y' // f9d9 #50 + '1X' // f9d9 #49 'aQ' // f9da-f9db #16 'bA' // f9dc-f9de #0 'J' // f9df #9 'A' // f9e0 #0 'Q' // f9e1 #16 - 'a1Y' // f9e2-f9e3 #50 + 'a1X' // f9e2-f9e3 #49 'A' // f9e4 #0 'aQ' // f9e5-f9e6 #16 'A' // f9e7 #0 @@ -18039,7 +18024,7 @@ const String encodedFontSetRanges = 'dS' // fb00-fb04 #18 'aL' // fb05-fb06 #11 'kE' // fb07-fb12 - 'd2P' // fb13-fb17 #67 + 'd2O' // fb13-fb17 #66 'dE' // fb18-fb1c 'y1U' // fb1d-fb36 #46 'E' // fb37 @@ -18055,30 +18040,30 @@ const String encodedFontSetRanges = '4iZ' // fb50-fbc1 #25 'pE' // fbc2-fbd2 '13xZ' // fbd3-fd3d #25 - 'a10F' // fd3e-fd3f #265 + 'a10H' // fd3e-fd3f #267 'oE' // fd40-fd4f '2kZ' // fd50-fd8f #25 'aE' // fd90-fd91 '2aZ' // fd92-fdc7 #25 '1mE' // fdc8-fdef 'aZ' // fdf0-fdf1 #25 - '4V' // fdf2 #125 + '4W' // fdf2 #126 'iZ' // fdf3-fdfc #25 - '4V' // fdfd #125 + '4W' // fdfd #126 'aE' // fdfe-fdff - '8Z' // fe00 #233 + '8Y' // fe00 #232 'lE' // fe01-fe0d 'a9S' // fe0e-fe0f #252 'iA' // fe10-fe19 #0 'eE' // fe1a-fe1f 'c4P' // fe20-fe23 #119 - 'b8C' // fe24-fe26 #210 + 'b8B' // fe24-fe26 #209 'f4P' // fe27-fe2d #119 - 'a8D' // fe2e-fe2f #211 + 'a8C' // fe2e-fe2f #210 'lA' // fe30-fe3c #0 - 'a5E' // fe3d-fe3e #134 + 'a5F' // fe3d-fe3e #135 'aA' // fe3f-fe40 #0 - 'c5E' // fe41-fe44 #134 + 'c5F' // fe41-fe44 #135 'mA' // fe45-fe52 #0 'E' // fe53 'rA' // fe54-fe66 #0 @@ -18091,26 +18076,26 @@ const String encodedFontSetRanges = 'aE' // fefd-fefe 'L' // feff #11 'E' // ff00 - '2M' // ff01 #64 + '2L' // ff01 #63 'eA' // ff02-ff07 #0 - 'a3T' // ff08-ff09 #97 + 'a3S' // ff08-ff09 #96 'aA' // ff0a-ff0b #0 - '2M' // ff0c #64 + '2L' // ff0c #63 'A' // ff0d #0 - '3T' // ff0e #97 + '3S' // ff0e #96 'jA' // ff0f-ff19 #0 - 'a2M' // ff1a-ff1b #64 + 'a2L' // ff1a-ff1b #63 'bA' // ff1c-ff1e #0 - '2M' // ff1f #64 + '2L' // ff1f #63 '2fA' // ff20-ff5a #0 'U' // ff5b #20 'A' // ff5c #0 'U' // ff5d #20 'bA' // ff5e-ff60 #0 - '2M' // ff61 #64 - 'a3U' // ff62-ff63 #98 - '2M' // ff64 #64 - '3U' // ff65 #98 + '2L' // ff61 #63 + 'a3T' // ff62-ff63 #97 + '2L' // ff64 #63 + '3T' // ff65 #97 '2eA' // ff66-ff9f #0 'R' // ffa0 #17 '1cA' // ffa1-ffbe #0 @@ -18130,25 +18115,25 @@ const String encodedFontSetRanges = 'bM' // fff9-fffb #12 'aL' // fffc-fffd #11 'aE' // fffe-ffff - 'k2A' // 10000-1000b #52 + 'k1Z' // 10000-1000b #51 'E' // 1000c - 'y2A' // 1000d-10026 #52 + 'y1Z' // 1000d-10026 #51 'E' // 10027 - 'r2A' // 10028-1003a #52 + 'r1Z' // 10028-1003a #51 'E' // 1003b - 'a2A' // 1003c-1003d #52 + 'a1Z' // 1003c-1003d #51 'E' // 1003e - 'n2A' // 1003f-1004d #52 + 'n1Z' // 1003f-1004d #51 'aE' // 1004e-1004f - 'm2A' // 10050-1005d #52 + 'm1Z' // 10050-1005d #51 '1gE' // 1005e-1007f - '4r2A' // 10080-100fa #52 + '4r1Z' // 10080-100fa #51 'dE' // 100fb-100ff - 'b5O' // 10100-10102 #144 + 'b5P' // 10100-10102 #145 'cE' // 10103-10106 - '1r5O' // 10107-10133 #144 + '1r5P' // 10107-10133 #145 'bE' // 10134-10136 - 'h2A' // 10137-1013f #52 + 'h1Z' // 10137-1013f #51 '2zM' // 10140-1018e #12 'E' // 1018f 'lM' // 10190-1019c #12 @@ -18157,350 +18142,358 @@ const String encodedFontSetRanges = '1tE' // 101a1-101cf '1sM' // 101d0-101fd #12 '4yE' // 101fe-1027f - '1b11E' // 10280-1029c #290 + '1b11G' // 10280-1029c #292 'bE' // 1029d-1029f - '1v10N' // 102a0-102d0 #273 + '1v10P' // 102a0-102d0 #275 'nE' // 102d1-102df - '1a9X' // 102e0-102fb #257 + '1a9Z' // 102e0-102fb #259 'cE' // 102fc-102ff - '1i5Z' // 10300-10323 #155 + '1i6A' // 10300-10323 #156 'hE' // 10324-1032c - 'b5Z' // 1032d-1032f #155 - 'z10T' // 10330-1034a #279 + 'b6A' // 1032d-1032f #156 + 'z10V' // 10330-1034a #281 'dE' // 1034b-1034f - '1p11L' // 10350-1037a #297 + '1p11N' // 10350-1037a #299 'dE' // 1037b-1037f - '1c6R' // 10380-1039d #173 + '1c6S' // 10380-1039d #174 'E' // 1039e - '6R' // 1039f #173 - '1i6A' // 103a0-103c3 #156 + '6S' // 1039f #174 + '1i6B' // 103a0-103c3 #157 'cE' // 103c4-103c7 - 'm6A' // 103c8-103d5 #156 + 'm6B' // 103c8-103d5 #157 '1oE' // 103d6-103ff - '3a10P' // 10400-1044f #275 - '1u11U' // 10450-1047f #306 - '1c6C' // 10480-1049d #158 + '3a10R' // 10400-1044f #277 + '1u11W' // 10450-1047f #308 + '1c6D' // 10480-1049d #159 'aE' // 1049e-1049f - 'i6C' // 104a0-104a9 #158 + 'i6D' // 104a0-104a9 #159 'eE' // 104aa-104af - '1i6B' // 104b0-104d3 #157 + '1i6C' // 104b0-104d3 #158 'cE' // 104d4-104d7 - '1i6B' // 104d8-104fb #157 + '1i6C' // 104d8-104fb #158 'cE' // 104fc-104ff - '1m10R' // 10500-10527 #277 + '1m10T' // 10500-10527 #279 'gE' // 10528-1052f - '1y5C' // 10530-10563 #132 + '1y5D' // 10530-10563 #133 'jE' // 10564-1056e - '5C' // 1056f #132 + '5D' // 1056f #133 '5mE' // 10570-105ff - '11x3Y' // 10600-10736 #102 + '11x3X' // 10600-10736 #101 'hE' // 10737-1073f - 'u3Y' // 10740-10755 #102 + 'u3X' // 10740-10755 #101 'iE' // 10756-1075f - 'g3Y' // 10760-10767 #102 + 'g3X' // 10760-10767 #101 '5uE' // 10768-107ff - 'e2J' // 10800-10805 #61 + 'e2I' // 10800-10805 #60 'aE' // 10806-10807 - '2J' // 10808 #61 + '2I' // 10808 #60 'E' // 10809 - '1q2J' // 1080a-10835 #61 + '1q2I' // 1080a-10835 #60 'E' // 10836 - 'a2J' // 10837-10838 #61 + 'a2I' // 10837-10838 #60 'bE' // 10839-1083b - '2J' // 1083c #61 + '2I' // 1083c #60 'aE' // 1083d-1083e - '2J' // 1083f #61 - 'u5G' // 10840-10855 #136 + '2I' // 1083f #60 + 'u5H' // 10840-10855 #137 'E' // 10856 - 'h5G' // 10857-1085f #136 - '1e11P' // 10860-1087f #301 - '1d5W' // 10880-1089e #152 + 'h5H' // 10857-1085f #137 + '1e11R' // 10860-1087f #303 + '1d5X' // 10880-1089e #153 'gE' // 1089f-108a6 - 'h5W' // 108a7-108af #152 + 'h5X' // 108a7-108af #153 '1uE' // 108b0-108df - 'r3V' // 108e0-108f2 #99 + 'r3U' // 108e0-108f2 #98 'E' // 108f3 - 'a3V' // 108f4-108f5 #99 + 'a3U' // 108f4-108f5 #98 'dE' // 108f6-108fa - 'd3V' // 108fb-108ff #99 - '1a6D' // 10900-1091b #159 + 'd3U' // 108fb-108ff #98 + '1a6E' // 10900-1091b #160 'bE' // 1091c-1091e - '6D' // 1091f #159 - 'y5Q' // 10920-10939 #146 + '6E' // 1091f #160 + 'y5R' // 10920-10939 #147 'dE' // 1093a-1093e - '5Q' // 1093f #146 + '5R' // 1093f #147 '2kE' // 10940-1097f - '2c4B' // 10980-109b7 #105 + '2c4A' // 10980-109b7 #104 'cE' // 109b8-109bb - 's4B' // 109bc-109cf #105 + 's4A' // 109bc-109cf #104 'aE' // 109d0-109d1 - '1s4B' // 109d2-109ff #105 - 'c1Z' // 10a00-10a03 #51 + '1s4A' // 109d2-109ff #104 + 'c1Y' // 10a00-10a03 #50 'E' // 10a04 - 'a1Z' // 10a05-10a06 #51 + 'a1Y' // 10a05-10a06 #50 'dE' // 10a07-10a0b - 'g1Z' // 10a0c-10a13 #51 + 'g1Y' // 10a0c-10a13 #50 'E' // 10a14 - 'b1Z' // 10a15-10a17 #51 + 'b1Y' // 10a15-10a17 #50 'E' // 10a18 - '1b1Z' // 10a19-10a35 #51 + '1b1Y' // 10a19-10a35 #50 'aE' // 10a36-10a37 - 'b1Z' // 10a38-10a3a #51 + 'b1Y' // 10a38-10a3a #50 'cE' // 10a3b-10a3e - 'i1Z' // 10a3f-10a48 #51 + 'i1Y' // 10a3f-10a48 #50 'fE' // 10a49-10a4f - 'h1Z' // 10a50-10a58 #51 + 'h1Y' // 10a50-10a58 #50 'fE' // 10a59-10a5f - '1e11N' // 10a60-10a7f #299 - '1e11K' // 10a80-10a9f #296 + '1e11P' // 10a60-10a7f #301 + '1e11M' // 10a80-10a9f #298 '1eE' // 10aa0-10abf - '1l5S' // 10ac0-10ae6 #148 + '1l5T' // 10ac0-10ae6 #149 'cE' // 10ae7-10aea - 'k5S' // 10aeb-10af6 #148 + 'k5T' // 10aeb-10af6 #149 'hE' // 10af7-10aff - '2a4W' // 10b00-10b35 #126 + '2a4X' // 10b00-10b35 #127 'bE' // 10b36-10b38 - 'f4W' // 10b39-10b3f #126 - 'u5I' // 10b40-10b55 #138 + 'f4X' // 10b39-10b3f #127 + 'u5J' // 10b40-10b55 #139 'aE' // 10b56-10b57 - 'g5I' // 10b58-10b5f #138 - 'r5H' // 10b60-10b72 #137 + 'g5J' // 10b58-10b5f #139 + 'r5I' // 10b60-10b72 #138 'dE' // 10b73-10b77 - 'g5H' // 10b78-10b7f #137 - 'q4F' // 10b80-10b91 #109 + 'g5I' // 10b78-10b7f #138 + 'q4E' // 10b80-10b91 #108 'fE' // 10b92-10b98 - 'c4F' // 10b99-10b9c #109 + 'c4E' // 10b99-10b9c #108 'kE' // 10b9d-10ba8 - 'f4F' // 10ba9-10baf #109 + 'f4E' // 10ba9-10baf #108 '3aE' // 10bb0-10bff - '2t11O' // 10c00-10c48 #300 + '2t11Q' // 10c00-10c48 #302 '2bE' // 10c49-10c7f - '1x4E' // 10c80-10cb2 #108 + '1x4D' // 10c80-10cb2 #107 'lE' // 10cb3-10cbf - '1x4E' // 10cc0-10cf2 #108 + '1x4D' // 10cc0-10cf2 #107 'fE' // 10cf3-10cf9 - 'e4E' // 10cfa-10cff #108 + 'e4D' // 10cfa-10cff #107 '13mE' // 10d00-10e5f '1dM' // 10e60-10e7e #12 '4xE' // 10e7f-10eff - '1m11M' // 10f00-10f27 #298 + '1m11O' // 10f00-10f27 #300 'gE' // 10f28-10f2f - '1o11V' // 10f30-10f59 #307 + '1o11X' // 10f30-10f59 #309 '5cE' // 10f5a-10fdf - 'v10S' // 10fe0-10ff6 #278 + 'v10U' // 10fe0-10ff6 #280 'hE' // 10ff7-10fff - '2y3P' // 11000-1104d #93 + '2y3O' // 11000-1104d #92 'cE' // 1104e-11051 - '1c3P' // 11052-1106f #93 + '1c3O' // 11052-1106f #92 'nE' // 11070-1107e - '3P' // 1107f #93 - '2m5K' // 11080-110c1 #140 + '3O' // 1107f #92 + '2m5L' // 11080-110c1 #141 'jE' // 110c2-110cc - '5K' // 110cd #140 + '5L' // 110cd #141 'aE' // 110ce-110cf - 'x6I' // 110d0-110e8 #164 + 'x6J' // 110d0-110e8 #165 'fE' // 110e9-110ef - 'i6I' // 110f0-110f9 #164 + 'i6J' // 110f0-110f9 #165 'eE' // 110fa-110ff - '1z5D' // 11100-11134 #133 + '1z5E' // 11100-11134 #134 'E' // 11135 - 'q5D' // 11136-11147 #133 + 'q5E' // 11136-11147 #134 'gE' // 11148-1114f - '1l11F' // 11150-11176 #291 + '1l11H' // 11150-11176 #293 'hE' // 11177-1117f - '3q11T' // 11180-111df #305 + '3q11V' // 11180-111df #307 'E' // 111e0 's1N' // 111e1-111f4 #39 'jE' // 111f5-111ff - 'q5M' // 11200-11211 #142 + 'q5N' // 11200-11211 #143 'E' // 11212 - '1q5M' // 11213-1123e #142 + '1q5N' // 11213-1123e #143 '2lE' // 1123f-1127f - 'f2S' // 11280-11286 #70 + 'f2R' // 11280-11286 #69 'E' // 11287 - '2S' // 11288 #70 + '2R' // 11288 #69 'E' // 11289 - 'c2S' // 1128a-1128d #70 + 'c2R' // 1128a-1128d #69 'E' // 1128e - 'n2S' // 1128f-1129d #70 + 'n2R' // 1128f-1129d #69 'E' // 1129e - 'j2S' // 1129f-112a9 #70 + 'j2R' // 1129f-112a9 #69 'eE' // 112aa-112af - '2f5N' // 112b0-112ea #143 + '2f5O' // 112b0-112ea #144 'dE' // 112eb-112ef - 'i5N' // 112f0-112f9 #143 + 'i5O' // 112f0-112f9 #144 'eE' // 112fa-112ff - '1G' // 11300 #32 - '2K' // 11301 #62 - '1G' // 11302 #32 - '2K' // 11303 #62 + '1F' // 11300 #31 + '2J' // 11301 #61 + '1F' // 11302 #31 + '2J' // 11303 #61 'E' // 11304 - 'g1G' // 11305-1130c #32 + 'g1F' // 11305-1130c #31 'aE' // 1130d-1130e - 'a1G' // 1130f-11310 #32 + 'a1F' // 1130f-11310 #31 'aE' // 11311-11312 - 'u1G' // 11313-11328 #32 + 'u1F' // 11313-11328 #31 'E' // 11329 - 'f1G' // 1132a-11330 #32 + 'f1F' // 1132a-11330 #31 'E' // 11331 - 'a1G' // 11332-11333 #32 + 'a1F' // 11332-11333 #31 'E' // 11334 - 'd1G' // 11335-11339 #32 + 'd1F' // 11335-11339 #31 'E' // 1133a - 'a2K' // 1133b-1133c #62 - 'g1G' // 1133d-11344 #32 + 'a2J' // 1133b-1133c #61 + 'g1F' // 1133d-11344 #31 'aE' // 11345-11346 - 'a1G' // 11347-11348 #32 + 'a1F' // 11347-11348 #31 'aE' // 11349-1134a - 'b1G' // 1134b-1134d #32 + 'b1F' // 1134b-1134d #31 'aE' // 1134e-1134f - '1G' // 11350 #32 + '1F' // 11350 #31 'eE' // 11351-11356 - '1G' // 11357 #32 + '1F' // 11357 #31 'dE' // 11358-1135c - 'f1G' // 1135d-11363 #32 + 'f1F' // 1135d-11363 #31 'aE' // 11364-11365 - 'f1G' // 11366-1136c #32 + 'f1F' // 11366-1136c #31 'bE' // 1136d-1136f - 'd1G' // 11370-11374 #32 + 'd1F' // 11370-11374 #31 '5hE' // 11375-113ff - '3m5X' // 11400-1145b #153 + '3m5Y' // 11400-1145b #154 'E' // 1145c - 'd5X' // 1145d-11461 #153 + 'd5Y' // 1145d-11461 #154 '1cE' // 11462-1147f - '2s6Q' // 11480-114c7 #172 + '2s6R' // 11480-114c7 #173 'gE' // 114c8-114cf - 'i6Q' // 114d0-114d9 #172 + 'i6R' // 114d0-114d9 #173 '6iE' // 114da-1157f - '2a6H' // 11580-115b5 #163 + '2a6I' // 11580-115b5 #164 'aE' // 115b6-115b7 - '1k6H' // 115b8-115dd #163 + '1k6I' // 115b8-115dd #164 '1gE' // 115de-115ff - '2p5T' // 11600-11644 #149 + '2p5U' // 11600-11644 #150 'jE' // 11645-1164f - 'i5T' // 11650-11659 #149 + 'i5U' // 11650-11659 #150 'eE' // 1165a-1165f - 'l2H' // 11660-1166c #59 + 'l2G' // 11660-1166c #58 'rE' // 1166d-1167f - '2e6N' // 11680-116b9 #169 + '2e6O' // 11680-116b9 #170 'eE' // 116ba-116bf - 'i6N' // 116c0-116c9 #169 + 'i6O' // 116c0-116c9 #170 '18aE' // 116ca-1189f - '3d6T' // 118a0-118f2 #175 + '3d6U' // 118a0-118f2 #176 'kE' // 118f3-118fe - '6T' // 118ff #175 + '6U' // 118ff #176 '9uE' // 11900-119ff - '2s12A' // 11a00-11a47 #312 + '2s12C' // 11a00-11a47 #314 'gE' // 11a48-11a4f - '3d11W' // 11a50-11aa2 #308 + '3d11Y' // 11a50-11aa2 #310 'lE' // 11aa3-11aaf - 'o3Q' // 11ab0-11abf #94 - '2d11Q' // 11ac0-11af8 #302 + 'o3P' // 11ab0-11abf #93 + '2d11S' // 11ac0-11af8 #304 '10bE' // 11af9-11bff - 'h3B' // 11c00-11c08 #79 + 'h3A' // 11c00-11c08 #78 'E' // 11c09 - '1r3B' // 11c0a-11c36 #79 + '1r3A' // 11c0a-11c36 #78 'E' // 11c37 - 'm3B' // 11c38-11c45 #79 + 'm3A' // 11c38-11c45 #78 'iE' // 11c46-11c4f - '1b3B' // 11c50-11c6c #79 + '1b3A' // 11c50-11c6c #78 'bE' // 11c6d-11c6f - '1e3Z' // 11c70-11c8f #103 + '1e3Y' // 11c70-11c8f #102 'aE' // 11c90-11c91 - 'u3Z' // 11c92-11ca7 #103 + 'u3Y' // 11c92-11ca7 #102 'E' // 11ca8 - 'm3Z' // 11ca9-11cb6 #103 + 'm3Y' // 11ca9-11cb6 #102 '2tE' // 11cb7-11cff - 'f2G' // 11d00-11d06 #58 + 'f2F' // 11d00-11d06 #57 'E' // 11d07 - 'a2G' // 11d08-11d09 #58 + 'a2F' // 11d08-11d09 #57 'E' // 11d0a - '1q2G' // 11d0b-11d36 #58 + '1q2F' // 11d0b-11d36 #57 'bE' // 11d37-11d39 - '2G' // 11d3a #58 + '2F' // 11d3a #57 'E' // 11d3b - 'a2G' // 11d3c-11d3d #58 + 'a2F' // 11d3c-11d3d #57 'E' // 11d3e - 'h2G' // 11d3f-11d47 #58 + 'h2F' // 11d3f-11d47 #57 'gE' // 11d48-11d4f - 'i2G' // 11d50-11d59 #58 + 'i2F' // 11d50-11d59 #57 'eE' // 11d5a-11d5f - 'e2L' // 11d60-11d65 #63 + 'e2K' // 11d60-11d65 #62 'E' // 11d66 - 'a2L' // 11d67-11d68 #63 + 'a2K' // 11d67-11d68 #62 'E' // 11d69 - '1j2L' // 11d6a-11d8e #63 + '1j2K' // 11d6a-11d8e #62 'E' // 11d8f - 'a2L' // 11d90-11d91 #63 + 'a2K' // 11d90-11d91 #62 'E' // 11d92 - 'e2L' // 11d93-11d98 #63 + 'e2K' // 11d93-11d98 #62 'fE' // 11d99-11d9f - 'i2L' // 11da0-11da9 #63 + 'i2K' // 11da0-11da9 #62 '19wE' // 11daa-11faf - '5P' // 11fb0 #145 + '5Q' // 11fb0 #146 'nE' // 11fb1-11fbf - '1w6O' // 11fc0-11ff1 #170 + '1w6P' // 11fc0-11ff1 #171 'lE' // 11ff2-11ffe - '6O' // 11fff #170 - '35k3D' // 12000-12399 #81 + '6P' // 11fff #171 + '35k3C' // 12000-12399 #80 '3wE' // 1239a-123ff - '4f3D' // 12400-1246e #81 + '4f3C' // 12400-1246e #80 'E' // 1246f - 'd3D' // 12470-12474 #81 + 'd3C' // 12470-12474 #80 'jE' // 12475-1247f - '7m3D' // 12480-12543 #81 + '7m3C' // 12480-12543 #80 '105qE' // 12544-12fff - '41d10Q' // 13000-1342e #276 + '41d10S' // 13000-1342e #278 '155rE' // 1342f-143ff - '22j10C' // 14400-14646 #262 + '22j10E' // 14400-14646 #264 '331zE' // 14647-167ff - '21v4Y' // 16800-16a38 #128 + '21v4Z' // 16800-16a38 #129 'fE' // 16a39-16a3f - '1d4D' // 16a40-16a5e #107 + '1d4C' // 16a40-16a5e #106 'E' // 16a5f - 'i4D' // 16a60-16a69 #107 + 'i4C' // 16a60-16a69 #106 'cE' // 16a6a-16a6d - 'a4D' // 16a6e-16a6f #107 + 'a4C' // 16a6e-16a6f #106 '3qE' // 16a70-16acf - '1c4Z' // 16ad0-16aed #129 + '1c5A' // 16ad0-16aed #130 'aE' // 16aee-16aef - 'e4Z' // 16af0-16af5 #129 + 'e5A' // 16af0-16af5 #130 'iE' // 16af6-16aff - '2q2U' // 16b00-16b45 #72 + '2q2S' // 16b00-16b45 #70 'iE' // 16b46-16b4f - 'i2U' // 16b50-16b59 #72 + 'i2S' // 16b50-16b59 #70 'E' // 16b5a - 'f2U' // 16b5b-16b61 #72 + 'f2S' // 16b5b-16b61 #70 'E' // 16b62 - 't2U' // 16b63-16b77 #72 + 't2S' // 16b63-16b77 #70 'dE' // 16b78-16b7c - 'r2U' // 16b7d-16b8f #72 + 'r2S' // 16b7d-16b8f #70 '26kE' // 16b90-16e3f - '3l11H' // 16e40-16e9a #293 + '3l11J' // 16e40-16e9a #295 '3vE' // 16e9b-16eff - '2v4C' // 16f00-16f4a #106 + '2v4B' // 16f00-16f4a #105 'cE' // 16f4b-16f4e - '2d4C' // 16f4f-16f87 #106 + '2d4B' // 16f4f-16f87 #105 'fE' // 16f88-16f8e - 'p4C' // 16f8f-16f9f #106 + 'p4B' // 16f8f-16f9f #105 '2lE' // 16fa0-16fe0 - '5Y' // 16fe1 #154 + '5Z' // 16fe1 #155 '645kE' // 16fe2-1b16f - '15e5Y' // 1b170-1b2fb #154 + '15e5Z' // 1b170-1b2fb #155 '88sE' // 1b2fc-1bbff - '4b2Q' // 1bc00-1bc6a #68 + '4b2P' // 1bc00-1bc6a #67 'dE' // 1bc6b-1bc6f - 'l2Q' // 1bc70-1bc7c #68 + 'l2P' // 1bc70-1bc7c #67 'bE' // 1bc7d-1bc7f - 'h2Q' // 1bc80-1bc88 #68 + 'h2P' // 1bc80-1bc88 #67 'fE' // 1bc89-1bc8f - 'i2Q' // 1bc90-1bc99 #68 + 'i2P' // 1bc90-1bc99 #67 'aE' // 1bc9a-1bc9b - 'g2Q' // 1bc9c-1bca3 #68 - '217qE' // 1bca4-1d2bf + 'g2P' // 1bc9c-1bca3 #67 + '190oE' // 1bca4-1cfff + '9k2Z' // 1d000-1d0f5 #77 + 'iE' // 1d0f6-1d0ff + '1l2Z' // 1d100-1d126 #77 + 'aE' // 1d127-1d128 + '7k2Z' // 1d129-1d1ea #77 + 'tE' // 1d1eb-1d1ff + '2q2Z' // 1d200-1d245 #77 + '4qE' // 1d246-1d2bf 'sM' // 1d2c0-1d2d3 #12 'kE' // 1d2d4-1d2df - 's9Z' // 1d2e0-1d2f3 #259 + 's10B' // 1d2e0-1d2f3 #261 'kE' // 1d2f4-1d2ff '3hM' // 1d300-1d356 #12 'hE' // 1d357-1d35f @@ -18548,27 +18541,27 @@ const String encodedFontSetRanges = 'aE' // 1d7cc-1d7cd '1wO' // 1d7ce-1d7ff #14 '78sE' // 1d800-1dfff - 'f2D' // 1e000-1e006 #55 + 'f2C' // 1e000-1e006 #54 'E' // 1e007 - 'p2D' // 1e008-1e018 #55 + 'p2C' // 1e008-1e018 #54 'aE' // 1e019-1e01a - 'f2D' // 1e01b-1e021 #55 + 'f2C' // 1e01b-1e021 #54 'E' // 1e022 - 'a2D' // 1e023-1e024 #55 + 'a2C' // 1e023-1e024 #54 'E' // 1e025 - 'd2D' // 1e026-1e02a #55 + 'd2C' // 1e026-1e02a #54 '25jE' // 1e02b-1e2bf - '2e6S' // 1e2c0-1e2f9 #174 + '2e6T' // 1e2c0-1e2f9 #175 'dE' // 1e2fa-1e2fe - '6S' // 1e2ff #174 + '6T' // 1e2ff #175 '59aE' // 1e300-1e8ff - '2w3M' // 1e900-1e94b #90 + '2w3L' // 1e900-1e94b #89 'cE' // 1e94c-1e94f - 'i3M' // 1e950-1e959 #90 + 'i3L' // 1e950-1e959 #89 'cE' // 1e95a-1e95d - 'a3M' // 1e95e-1e95f #90 + 'a3L' // 1e95e-1e95f #89 '30dE' // 1e960-1ec70 - '2o11D' // 1ec71-1ecb4 #289 + '2o11F' // 1ec71-1ecb4 #291 '12rE' // 1ecb5-1edff 'cO' // 1ee00-1ee03 #14 'E' // 1ee04 @@ -18653,18 +18646,18 @@ const String encodedFontSetRanges = 'E' // 1f0d0 '1jM' // 1f0d1-1f0f5 #12 'iE' // 1f0f6-1f0ff - 'l1A' // 1f100-1f10c #26 + 'l1B' // 1f100-1f10c #27 'bE' // 1f10d-1f10f - '3n1A' // 1f110-1f16c #26 + '3n1B' // 1f110-1f16c #27 'bE' // 1f16d-1f16f - 'a1X' // 1f170-1f171 #49 - 'k1A' // 1f172-1f17d #26 - 'a1X' // 1f17e-1f17f #49 - 'm1A' // 1f180-1f18d #26 - '1X' // 1f18e #49 - 'a1A' // 1f18f-1f190 #26 + 'a1W' // 1f170-1f171 #48 + 'k1B' // 1f172-1f17d #27 + 'a1W' // 1f17e-1f17f #48 + 'm1B' // 1f180-1f18d #27 + '1W' // 1f18e #48 + 'a1B' // 1f18f-1f190 #27 'i1R' // 1f191-1f19a #43 - 'q1A' // 1f19b-1f1ac #26 + 'q1B' // 1f19b-1f1ac #27 '2dE' // 1f1ad-1f1e5 'yP' // 1f1e6-1f1ff #15 'A' // 1f200 #0 @@ -18882,8 +18875,8 @@ const String encodedFontSetRanges = 'bE' // 1f6fd-1f6ff '4kT' // 1f700-1f773 #19 'kE' // 1f774-1f77f - '3jM' // 1f780-1f7d8 #12 - 'fE' // 1f7d9-1f7df + '3kM' // 1f780-1f7d9 #12 + 'eE' // 1f7da-1f7df 'kN' // 1f7e0-1f7eb #13 'cE' // 1f7ec-1f7ef 'P' // 1f7f0 #15 @@ -19098,7 +19091,7 @@ const String encodedFontSetRanges = 'nE' // 205b4-205c2 'G' // 205c3 #6 'eE' // 205c4-205c9 - '2E' // 205ca #56 + '2D' // 205ca #55 'dE' // 205cb-205cf 'G' // 205d0 #6 'cE' // 205d1-205d4 @@ -19802,7 +19795,7 @@ const String encodedFontSetRanges = 'dE' // 2248c-22490 'G' // 22491 #6 '1cE' // 22492-224af - '2E' // 224b0 #56 + '2D' // 224b0 #55 'jE' // 224b1-224bb 'G' // 224bc #6 'cE' // 224bd-224c0 @@ -19812,7 +19805,7 @@ const String encodedFontSetRanges = 'aE' // 224ca-224cb 'G' // 224cc #6 '1eE' // 224cd-224ec - '2E' // 224ed #56 + '2D' // 224ed #55 '1jE' // 224ee-22512 'G' // 22513 #6 'fE' // 22514-2251a @@ -19885,7 +19878,7 @@ const String encodedFontSetRanges = 'qE' // 22927-22938 'G' // 22939 #6 'tE' // 2293a-2294e - '2E' // 2294f #56 + '2D' // 2294f #55 'vE' // 22950-22966 'G' // 22967 #6 'bE' // 22968-2296a @@ -20527,7 +20520,7 @@ const String encodedFontSetRanges = '3cE' // 24897-248e8 'A' // 248e9 #0 'eE' // 248ea-248ef - '2E' // 248f0 #56 + '2D' // 248f0 #55 'bG' // 248f1-248f3 #6 'fE' // 248f4-248fa 'G' // 248fb #6 @@ -20593,7 +20586,7 @@ const String encodedFontSetRanges = 'kE' // 24a02-24a0d 'G' // 24a0e #6 'bE' // 24a0f-24a11 - '2E' // 24a12 #56 + '2D' // 24a12 #55 'G' // 24a13 #6 'E' // 24a14 'G' // 24a15 #6 @@ -21952,7 +21945,7 @@ const String encodedFontSetRanges = 'jE' // 2919d-291a7 'G' // 291a8 #6 '1qE' // 291a9-291d4 - '2E' // 291d5 #56 + '2D' // 291d5 #55 'lE' // 291d6-291e2 'R' // 291e3 #17 'fE' // 291e4-291ea @@ -22681,8 +22674,8 @@ const String encodedFontSetRanges = '129yE' // 2f9f5-30728 'R' // 30729 #17 '75tE' // 3072a-30edc - '6F' // 30edd #161 - '1Y' // 30ede #50 + '6G' // 30edd #162 + '1X' // 30ede #49 '15fE' // 30edf-3106b 'C' // 3106c #2 '27566vE' // 3106d-e002f 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 5822591aa9b70..a0ac847838c6d 100644 --- a/lib/web_ui/test/ui/fallback_fonts_golden_test.dart +++ b/lib/web_ui/test/ui/fallback_fonts_golden_test.dart @@ -165,59 +165,55 @@ void testMain() { // TODO(hterkelsen): https://github.com/flutter/flutter/issues/71520 }); - // Regression test for https://github.com/flutter/flutter/issues/75836 - // When we had this bug our font fallback resolution logic would end up in an - // infinite loop and this test would freeze and time out. - test( - 'Can find fonts for two adjacent unmatched code points from different fonts', - () async { + /// Attempts to render [text] and verifies that [expectedFamilies] are downloaded. + /// + /// Then it does the same, but asserts that the families aren't downloaded again + /// (because they already exist in memory). + Future checkDownloadedFamiliesForString(String text, List expectedFamilies) async { // Try rendering text that requires fallback fonts, initially before the fonts are loaded. - ui.ParagraphBuilder pb = ui.ParagraphBuilder(ui.ParagraphStyle()); - pb.addText('ヽಠ'); + pb.addText(text); pb.build().layout(const ui.ParagraphConstraints(width: 1000)); await renderer.fontCollection.fontFallbackManager!.debugWhenIdle(); expect( downloadedFontFamilies, - [ - 'Noto Sans SC', - 'Noto Sans Kannada', - ], + expectedFamilies, ); // Do the same thing but this time with loaded fonts. downloadedFontFamilies.clear(); pb = ui.ParagraphBuilder(ui.ParagraphStyle()); - pb.addText('ヽಠ'); + pb.addText(text); pb.build().layout(const ui.ParagraphConstraints(width: 1000)); + await renderer.fontCollection.fontFallbackManager!.debugWhenIdle(); expect(downloadedFontFamilies, isEmpty); + } + + // Regression test for https://github.com/flutter/flutter/issues/75836 + // When we had this bug our font fallback resolution logic would end up in an + // infinite loop and this test would freeze and time out. + test( + 'can find fonts for two adjacent unmatched code points from different fonts', + () async { + await checkDownloadedFamiliesForString('ヽಠ', [ + 'Noto Sans SC', + 'Noto Sans Kannada', + ]); }); test('can find glyph for 2/3 symbol', () async { - // Try rendering text that requires fallback fonts, initially before the fonts are loaded. - - ui.ParagraphBuilder pb = ui.ParagraphBuilder(ui.ParagraphStyle()); - pb.addText('⅔'); - pb.build().layout(const ui.ParagraphConstraints(width: 1000)); - - await renderer.fontCollection.fontFallbackManager!.debugWhenIdle(); - expect( - downloadedFontFamilies, - [ - 'Noto Sans', - ], - ); - - // Do the same thing but this time with loaded fonts. - downloadedFontFamilies.clear(); - pb = ui.ParagraphBuilder(ui.ParagraphStyle()); - pb.addText('⅔'); - pb.build().layout(const ui.ParagraphConstraints(width: 1000)); + await checkDownloadedFamiliesForString('⅔', [ + 'Noto Sans', + ]); + }); - await renderer.fontCollection.fontFallbackManager!.debugWhenIdle(); - expect(downloadedFontFamilies, isEmpty); + // https://github.com/flutter/devtools/issues/6149 + test('can find glyph for treble clef', () async { + await checkDownloadedFamiliesForString('𝄞', [ + 'Noto Music', + ]); }); test('findMinimumFontsForCodePoints for all supported code points', () async { @@ -248,8 +244,9 @@ void testMain() { expect( testedFonts, unorderedEquals({ - 'Noto Sans', 'Noto Color Emoji', + 'Noto Music', + 'Noto Sans', 'Noto Sans Symbols', 'Noto Sans Symbols 2', 'Noto Sans Adlam', From 5a2c6a603569dcd077e156c7297a18d36d301163 Mon Sep 17 00:00:00 2001 From: Gray Mackall <34871572+gmackall@users.noreply.github.com> Date: Wed, 11 Oct 2023 16:49:51 -0400 Subject: [PATCH 586/859] Revert "[Android] Add support for text processing actions (#44579)" (#46788) This reverts commit d93fe2367d21fcbec268d57d0a1a3dd6090c14a8. This change is causing integration tests to fail on attempts to roll the latest master version of flutter into the packages repo. See a sample failure here: https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8767521956894285553/+/u/Run_package_tests/native_integration_tests/stdout The root cause seems to be that we are getting request codes in `onActivityResult` that we never added to the `requestsByCode` map, so the call to remove returns null (and we then call success getting a NPE). More info: 1. There is a [discussion in discord here](https://discord.com/channels/608014603317936148/1161718667566919761/1161721935927980052) 2. And the failure can be reproduced by running `dart run script/tool/bin/flutter_plugin_tools.dart native-test --android --packages file_selector` from the root of the packages repo (with a flutter checkout that contains these changes). cc @bleroux [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- ci/licenses_golden/licenses_flutter | 4 - shell/platform/android/AndroidManifest.xml | 8 - shell/platform/android/BUILD.gn | 2 - .../embedding/engine/FlutterEngine.java | 13 - .../systemchannels/ProcessTextChannel.java | 122 ---------- .../plugin/text/ProcessTextPlugin.java | 192 --------------- .../plugin/text/ProcessTextPluginTest.java | 225 ------------------ 7 files changed, 566 deletions(-) delete mode 100644 shell/platform/android/io/flutter/embedding/engine/systemchannels/ProcessTextChannel.java delete mode 100644 shell/platform/android/io/flutter/plugin/text/ProcessTextPlugin.java delete mode 100644 shell/platform/android/test/io/flutter/plugin/text/ProcessTextPluginTest.java diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index 221734ff26250..eb75af95d163c 100644 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -3092,7 +3092,6 @@ ORIGIN: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/syst ORIGIN: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/NavigationChannel.java + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformChannel.java + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java + ../../../flutter/LICENSE -ORIGIN: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/ProcessTextChannel.java + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/RestorationChannel.java + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/SpellCheckChannel.java + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/SystemChannel.java + ../../../flutter/LICENSE @@ -3135,7 +3134,6 @@ ORIGIN: ../../../flutter/shell/platform/android/io/flutter/plugin/platform/Platf ORIGIN: ../../../flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/plugin/platform/SingleViewPresentation.java + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/plugin/platform/VirtualDisplayController.java + ../../../flutter/LICENSE -ORIGIN: ../../../flutter/shell/platform/android/io/flutter/plugin/text/ProcessTextPlugin.java + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/util/HandlerCompat.java + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/util/PathUtils.java + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/util/Preconditions.java + ../../../flutter/LICENSE @@ -5865,7 +5863,6 @@ FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/system FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/NavigationChannel.java FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformChannel.java FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java -FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/ProcessTextChannel.java FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/RestorationChannel.java FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/SettingsChannel.java FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/SpellCheckChannel.java @@ -5913,7 +5910,6 @@ FILE: ../../../flutter/shell/platform/android/io/flutter/plugin/platform/Platfor FILE: ../../../flutter/shell/platform/android/io/flutter/plugin/platform/SingleViewPresentation.java FILE: ../../../flutter/shell/platform/android/io/flutter/plugin/platform/SurfaceTexturePlatformViewRenderTarget.java FILE: ../../../flutter/shell/platform/android/io/flutter/plugin/platform/VirtualDisplayController.java -FILE: ../../../flutter/shell/platform/android/io/flutter/plugin/text/ProcessTextPlugin.java FILE: ../../../flutter/shell/platform/android/io/flutter/util/HandlerCompat.java FILE: ../../../flutter/shell/platform/android/io/flutter/util/PathUtils.java FILE: ../../../flutter/shell/platform/android/io/flutter/util/Preconditions.java diff --git a/shell/platform/android/AndroidManifest.xml b/shell/platform/android/AndroidManifest.xml index 97c77ee7ef57f..5fbd0d8553c2b 100644 --- a/shell/platform/android/AndroidManifest.xml +++ b/shell/platform/android/AndroidManifest.xml @@ -24,12 +24,4 @@ - - - - - - - - diff --git a/shell/platform/android/BUILD.gn b/shell/platform/android/BUILD.gn index dd035dc9060e5..c455533c6457f 100644 --- a/shell/platform/android/BUILD.gn +++ b/shell/platform/android/BUILD.gn @@ -265,7 +265,6 @@ android_java_sources = [ "io/flutter/embedding/engine/systemchannels/NavigationChannel.java", "io/flutter/embedding/engine/systemchannels/PlatformChannel.java", "io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java", - "io/flutter/embedding/engine/systemchannels/ProcessTextChannel.java", "io/flutter/embedding/engine/systemchannels/RestorationChannel.java", "io/flutter/embedding/engine/systemchannels/SettingsChannel.java", "io/flutter/embedding/engine/systemchannels/SpellCheckChannel.java", @@ -313,7 +312,6 @@ android_java_sources = [ "io/flutter/plugin/platform/SingleViewPresentation.java", "io/flutter/plugin/platform/SurfaceTexturePlatformViewRenderTarget.java", "io/flutter/plugin/platform/VirtualDisplayController.java", - "io/flutter/plugin/text/ProcessTextPlugin.java", "io/flutter/util/HandlerCompat.java", "io/flutter/util/PathUtils.java", "io/flutter/util/Preconditions.java", diff --git a/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java b/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java index cb00ec42b363c..2bfa379f39c1e 100644 --- a/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java +++ b/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java @@ -31,7 +31,6 @@ import io.flutter.embedding.engine.systemchannels.MouseCursorChannel; import io.flutter.embedding.engine.systemchannels.NavigationChannel; import io.flutter.embedding.engine.systemchannels.PlatformChannel; -import io.flutter.embedding.engine.systemchannels.ProcessTextChannel; import io.flutter.embedding.engine.systemchannels.RestorationChannel; import io.flutter.embedding.engine.systemchannels.SettingsChannel; import io.flutter.embedding.engine.systemchannels.SpellCheckChannel; @@ -39,7 +38,6 @@ import io.flutter.embedding.engine.systemchannels.TextInputChannel; import io.flutter.plugin.localization.LocalizationPlugin; import io.flutter.plugin.platform.PlatformViewsController; -import io.flutter.plugin.text.ProcessTextPlugin; import io.flutter.util.ViewUtils; import java.util.HashSet; import java.util.List; @@ -97,7 +95,6 @@ public class FlutterEngine implements ViewUtils.DisplayUpdater { @NonNull private final NavigationChannel navigationChannel; @NonNull private final RestorationChannel restorationChannel; @NonNull private final PlatformChannel platformChannel; - @NonNull private final ProcessTextChannel processTextChannel; @NonNull private final SettingsChannel settingsChannel; @NonNull private final SpellCheckChannel spellCheckChannel; @NonNull private final SystemChannel systemChannel; @@ -332,7 +329,6 @@ public FlutterEngine( mouseCursorChannel = new MouseCursorChannel(dartExecutor); navigationChannel = new NavigationChannel(dartExecutor); platformChannel = new PlatformChannel(dartExecutor); - processTextChannel = new ProcessTextChannel(dartExecutor, context.getPackageManager()); restorationChannel = new RestorationChannel(dartExecutor, waitForRestorationData); settingsChannel = new SettingsChannel(dartExecutor); spellCheckChannel = new SpellCheckChannel(dartExecutor); @@ -388,9 +384,6 @@ public FlutterEngine( } ViewUtils.calculateMaximumDisplayMetrics(context, this); - - ProcessTextPlugin processTextPlugin = new ProcessTextPlugin(this.getProcessTextChannel()); - this.pluginRegistry.add(processTextPlugin); } private void attachToJni() { @@ -552,12 +545,6 @@ public PlatformChannel getPlatformChannel() { return platformChannel; } - /** System channel that sends text processing requests from Flutter to Android. */ - @NonNull - public ProcessTextChannel getProcessTextChannel() { - return processTextChannel; - } - /** * System channel to exchange restoration data between framework and engine. * diff --git a/shell/platform/android/io/flutter/embedding/engine/systemchannels/ProcessTextChannel.java b/shell/platform/android/io/flutter/embedding/engine/systemchannels/ProcessTextChannel.java deleted file mode 100644 index f1d12bc681111..0000000000000 --- a/shell/platform/android/io/flutter/embedding/engine/systemchannels/ProcessTextChannel.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package io.flutter.embedding.engine.systemchannels; - -import android.content.pm.PackageManager; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import io.flutter.embedding.engine.dart.DartExecutor; -import io.flutter.plugin.common.MethodCall; -import io.flutter.plugin.common.MethodChannel; -import io.flutter.plugin.common.StandardMethodCodec; -import java.util.ArrayList; -import java.util.Map; - -/** - * {@link ProcessTextChannel} is a platform channel that is used by the framework to initiate text - * processing feature in the embedding and for the embedding to send back the results. - * - *

When the framework needs to query the list of text processing actions (for instance to expose - * them in the selected text context menu), it will send to the embedding the message {@code - * ProcessText.queryTextActions}. In response, the {@link io.flutter.plugin.text.ProcessTextPlugin} - * will return a map of all activities that can process text. The map keys are generated IDs and the - * values are the activities labels. On the first request, the {@link - * io.flutter.plugin.text.ProcessTextPlugin} will make a call to Android's package manager to query - * all activities that can be performed for the {@code Intent.ACTION_PROCESS_TEXT} intent. - * - *

When a text processing action has to be executed, the framework will send to the embedding the - * message {@code ProcessText.processTextAction} with the {@code int id} of the choosen text action - * and the {@code String} of text to process as arguments. In response, the {@link - * io.flutter.plugin.text.ProcessTextPlugin} will make a call to the Android application activity to - * start the activity exposing the text action. The {@link io.flutter.plugin.text.ProcessTextPlugin} - * will return the processed text if there is one, or null if the activity did not return a - * transformed text. - * - *

{@link io.flutter.plugin.text.ProcessTextPlugin} implements {@link ProcessTextMethodHandler} - * that parses incoming messages from Flutter. - */ -public class ProcessTextChannel { - private static final String TAG = "ProcessTextChannel"; - private static final String CHANNEL_NAME = "flutter/processtext"; - private static final String METHOD_QUERY_TEXT_ACTIONS = "ProcessText.queryTextActions"; - private static final String METHOD_PROCESS_TEXT_ACTION = "ProcessText.processTextAction"; - - public final MethodChannel channel; - public final PackageManager packageManager; - private ProcessTextMethodHandler processTextMethodHandler; - - @NonNull - public final MethodChannel.MethodCallHandler parsingMethodHandler = - new MethodChannel.MethodCallHandler() { - @Override - public void onMethodCall(@NonNull MethodCall call, @NonNull MethodChannel.Result result) { - if (processTextMethodHandler == null) { - return; - } - String method = call.method; - Object args = call.arguments; - switch (method) { - case METHOD_QUERY_TEXT_ACTIONS: - try { - Map actions = processTextMethodHandler.queryTextActions(); - result.success(actions); - } catch (IllegalStateException exception) { - result.error("error", exception.getMessage(), null); - } - break; - case METHOD_PROCESS_TEXT_ACTION: - try { - final ArrayList argumentList = (ArrayList) args; - String id = (String) (argumentList.get(0)); - String text = (String) (argumentList.get(1)); - boolean readOnly = (boolean) (argumentList.get(2)); - processTextMethodHandler.processTextAction(id, text, readOnly, result); - } catch (IllegalStateException exception) { - result.error("error", exception.getMessage(), null); - } - break; - default: - result.notImplemented(); - break; - } - } - }; - - public ProcessTextChannel( - @NonNull DartExecutor dartExecutor, @NonNull PackageManager packageManager) { - this.packageManager = packageManager; - channel = new MethodChannel(dartExecutor, CHANNEL_NAME, StandardMethodCodec.INSTANCE); - channel.setMethodCallHandler(parsingMethodHandler); - } - - /** - * Sets the {@link ProcessTextMethodHandler} which receives all requests to the text processing - * feature sent through this channel. - */ - public void setMethodHandler(@Nullable ProcessTextMethodHandler processTextMethodHandler) { - this.processTextMethodHandler = processTextMethodHandler; - } - - public interface ProcessTextMethodHandler { - /** Requests the map of text actions. Each text action has a unique id and a localized label. */ - Map queryTextActions(); - - /** - * Requests to run a text action on a given input text. - * - * @param id The ID of the text action returned by {@code ProcessText.queryTextActions}. - * @param input The text to be processed. - * @param readOnly Indicates to the activity if the processed text will be used as read-only. - * see - * https://developer.android.com/reference/android/content/Intent#EXTRA_PROCESS_TEXT_READONLY - * @param result The method channel result instance used to reply. - */ - void processTextAction( - @NonNull String id, - @NonNull String input, - @NonNull boolean readOnly, - @NonNull MethodChannel.Result result); - } -} diff --git a/shell/platform/android/io/flutter/plugin/text/ProcessTextPlugin.java b/shell/platform/android/io/flutter/plugin/text/ProcessTextPlugin.java deleted file mode 100644 index d04716e4cb410..0000000000000 --- a/shell/platform/android/io/flutter/plugin/text/ProcessTextPlugin.java +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package io.flutter.plugin.text; - -import android.annotation.TargetApi; -import android.app.Activity; -import android.content.Intent; -import android.content.pm.PackageManager; -import android.content.pm.ResolveInfo; -import android.os.Build; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.annotation.RequiresApi; -import io.flutter.embedding.engine.plugins.FlutterPlugin; -import io.flutter.embedding.engine.plugins.activity.ActivityAware; -import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding; -import io.flutter.embedding.engine.systemchannels.ProcessTextChannel; -import io.flutter.plugin.common.MethodChannel; -import io.flutter.plugin.common.PluginRegistry.ActivityResultListener; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ProcessTextPlugin - implements FlutterPlugin, - ActivityAware, - ActivityResultListener, - ProcessTextChannel.ProcessTextMethodHandler { - private static final String TAG = "ProcessTextPlugin"; - - @NonNull private final ProcessTextChannel processTextChannel; - @NonNull private final PackageManager packageManager; - @Nullable private ActivityPluginBinding activityBinding; - private Map resolveInfosById; - - @NonNull - private Map requestsByCode = - new HashMap(); - - public ProcessTextPlugin(@NonNull ProcessTextChannel processTextChannel) { - this.processTextChannel = processTextChannel; - this.packageManager = processTextChannel.packageManager; - - processTextChannel.setMethodHandler(this); - } - - @Override - public Map queryTextActions() { - if (resolveInfosById == null) { - cacheResolveInfos(); - } - Map result = new HashMap(); - for (String id : resolveInfosById.keySet()) { - final ResolveInfo info = resolveInfosById.get(id); - result.put(id, info.loadLabel(packageManager).toString()); - } - return result; - } - - @Override - public void processTextAction( - @NonNull String id, - @NonNull String text, - @NonNull boolean readOnly, - @NonNull MethodChannel.Result result) { - if (activityBinding == null) { - result.error("error", "Plugin not bound to an Activity", null); - return; - } - - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { - result.error("error", "Android version not supported", null); - return; - } - - if (resolveInfosById == null) { - result.error("error", "Can not process text actions before calling queryTextActions", null); - return; - } - - final ResolveInfo info = resolveInfosById.get(id); - if (info == null) { - result.error("error", "Text processing activity not found", null); - return; - } - - Integer requestCode = result.hashCode(); - requestsByCode.put(requestCode, result); - - Intent intent = new Intent(); - intent.setClassName(info.activityInfo.packageName, info.activityInfo.name); - intent.setAction(Intent.ACTION_PROCESS_TEXT); - intent.setType("text/plain"); - intent.putExtra(Intent.EXTRA_PROCESS_TEXT, text); - intent.putExtra(Intent.EXTRA_PROCESS_TEXT_READONLY, readOnly); - - // Start the text processing activity. When the activity completes, the onActivityResult - // callback - // is called. - activityBinding.getActivity().startActivityForResult(intent, requestCode); - } - - private void cacheResolveInfos() { - resolveInfosById = new HashMap(); - - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { - return; - } - - Intent intent = new Intent().setAction(Intent.ACTION_PROCESS_TEXT).setType("text/plain"); - - List infos; - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { - infos = packageManager.queryIntentActivities(intent, PackageManager.ResolveInfoFlags.of(0)); - } else { - infos = packageManager.queryIntentActivities(intent, 0); - } - - for (ResolveInfo info : infos) { - final String id = info.activityInfo.name; - final String label = info.loadLabel(packageManager).toString(); - resolveInfosById.put(id, info); - } - } - - /** - * Executed when a text processing activity terminates. - * - *

When an activity returns a value, the request is completed successfully and returns the - * processed text. - * - *

When an activity does not return a value. the request is completed successfully and returns - * null. - */ - @TargetApi(Build.VERSION_CODES.M) - @RequiresApi(Build.VERSION_CODES.M) - public boolean onActivityResult(int requestCode, int resultCode, @Nullable Intent intent) { - String result = null; - if (resultCode == Activity.RESULT_OK) { - result = intent.getStringExtra(Intent.EXTRA_PROCESS_TEXT); - } - requestsByCode.remove(requestCode).success(result); - return true; - } - - /** - * Unregisters this {@code ProcessTextPlugin} as the {@code - * ProcessTextChannel.ProcessTextMethodHandler}, for the {@link - * io.flutter.embedding.engine.systemchannels.ProcessTextChannel}. - * - *

Do not invoke any methods on a {@code ProcessTextPlugin} after invoking this method. - */ - public void destroy() { - processTextChannel.setMethodHandler(null); - } - - // FlutterPlugin interface implementation. - - public void onAttachedToEngine(@NonNull FlutterPluginBinding binding) { - // Nothing to do because this plugin is instantiated by the engine. - } - - public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) { - // Nothing to do because this plugin is instantiated by the engine. - } - - // ActivityAware interface implementation. - // - // Store the binding and manage the activity result listener. - - public void onAttachedToActivity(@NonNull ActivityPluginBinding binding) { - this.activityBinding = binding; - this.activityBinding.addActivityResultListener(this); - }; - - public void onDetachedFromActivityForConfigChanges() { - this.activityBinding.removeActivityResultListener(this); - this.activityBinding = null; - } - - public void onReattachedToActivityForConfigChanges(@NonNull ActivityPluginBinding binding) { - this.activityBinding = binding; - this.activityBinding.addActivityResultListener(this); - } - - public void onDetachedFromActivity() { - this.activityBinding.removeActivityResultListener(this); - this.activityBinding = null; - } -} diff --git a/shell/platform/android/test/io/flutter/plugin/text/ProcessTextPluginTest.java b/shell/platform/android/test/io/flutter/plugin/text/ProcessTextPluginTest.java deleted file mode 100644 index 47448fd9f9f65..0000000000000 --- a/shell/platform/android/test/io/flutter/plugin/text/ProcessTextPluginTest.java +++ /dev/null @@ -1,225 +0,0 @@ -package io.flutter.plugin.text; - -import static org.junit.Assert.assertEquals; -import static org.mockito.Mockito.any; -import static org.mockito.Mockito.anyInt; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; - -import android.annotation.TargetApi; -import android.app.Activity; -import android.content.Intent; -import android.content.pm.ActivityInfo; -import android.content.pm.PackageItemInfo; -import android.content.pm.PackageManager; -import android.content.pm.ResolveInfo; -import android.os.Build; -import androidx.annotation.RequiresApi; -import androidx.test.ext.junit.runners.AndroidJUnit4; -import io.flutter.embedding.engine.dart.DartExecutor; -import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding; -import io.flutter.embedding.engine.systemchannels.ProcessTextChannel; -import io.flutter.plugin.common.BinaryMessenger; -import io.flutter.plugin.common.MethodCall; -import io.flutter.plugin.common.MethodChannel; -import io.flutter.plugin.common.StandardMethodCodec; -import java.lang.reflect.Field; -import java.nio.ByteBuffer; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.ArgumentCaptor; - -@RunWith(AndroidJUnit4.class) -@TargetApi(Build.VERSION_CODES.N) -@RequiresApi(Build.VERSION_CODES.N) -public class ProcessTextPluginTest { - - private static void sendToBinaryMessageHandler( - BinaryMessenger.BinaryMessageHandler binaryMessageHandler, String method, Object args) { - MethodCall methodCall = new MethodCall(method, args); - ByteBuffer encodedMethodCall = StandardMethodCodec.INSTANCE.encodeMethodCall(methodCall); - binaryMessageHandler.onMessage( - (ByteBuffer) encodedMethodCall.flip(), mock(BinaryMessenger.BinaryReply.class)); - } - - @SuppressWarnings("deprecation") - // setMessageHandler is deprecated. - @Test - public void respondsToProcessTextChannelMessage() { - ArgumentCaptor binaryMessageHandlerCaptor = - ArgumentCaptor.forClass(BinaryMessenger.BinaryMessageHandler.class); - DartExecutor mockBinaryMessenger = mock(DartExecutor.class); - ProcessTextChannel.ProcessTextMethodHandler mockHandler = - mock(ProcessTextChannel.ProcessTextMethodHandler.class); - PackageManager mockPackageManager = mock(PackageManager.class); - ProcessTextChannel processTextChannel = - new ProcessTextChannel(mockBinaryMessenger, mockPackageManager); - - processTextChannel.setMethodHandler(mockHandler); - - verify(mockBinaryMessenger, times(1)) - .setMessageHandler(any(String.class), binaryMessageHandlerCaptor.capture()); - - BinaryMessenger.BinaryMessageHandler binaryMessageHandler = - binaryMessageHandlerCaptor.getValue(); - - sendToBinaryMessageHandler(binaryMessageHandler, "ProcessText.queryTextActions", null); - - verify(mockHandler).queryTextActions(); - } - - @SuppressWarnings("deprecation") - // setMessageHandler is deprecated. - @Test - public void performQueryTextActions() { - DartExecutor mockBinaryMessenger = mock(DartExecutor.class); - PackageManager mockPackageManager = mock(PackageManager.class); - ProcessTextChannel processTextChannel = - new ProcessTextChannel(mockBinaryMessenger, mockPackageManager); - - // Set up mocked result for PackageManager.queryIntentActivities. - ResolveInfo action1 = createFakeResolveInfo("Action1", mockPackageManager); - ResolveInfo action2 = createFakeResolveInfo("Action2", mockPackageManager); - List infos = new ArrayList(Arrays.asList(action1, action2)); - Intent intent = new Intent().setAction(Intent.ACTION_PROCESS_TEXT).setType("text/plain"); - when(mockPackageManager.queryIntentActivities( - any(Intent.class), any(PackageManager.ResolveInfoFlags.class))) - .thenReturn(infos); - - // ProcessTextPlugin should retrieve the mocked text actions. - ProcessTextPlugin processTextPlugin = new ProcessTextPlugin(processTextChannel); - Map textActions = processTextPlugin.queryTextActions(); - final String action1Id = "mockActivityName.Action1"; - final String action2Id = "mockActivityName.Action2"; - assertEquals(textActions, Map.of(action1Id, "Action1", action2Id, "Action2")); - } - - @SuppressWarnings("deprecation") - // setMessageHandler is deprecated. - @Test - public void performProcessTextActionWithNoReturnedValue() { - DartExecutor mockBinaryMessenger = mock(DartExecutor.class); - PackageManager mockPackageManager = mock(PackageManager.class); - ProcessTextChannel processTextChannel = - new ProcessTextChannel(mockBinaryMessenger, mockPackageManager); - - // Set up mocked result for PackageManager.queryIntentActivities. - ResolveInfo action1 = createFakeResolveInfo("Action1", mockPackageManager); - ResolveInfo action2 = createFakeResolveInfo("Action2", mockPackageManager); - List infos = new ArrayList(Arrays.asList(action1, action2)); - when(mockPackageManager.queryIntentActivities( - any(Intent.class), any(PackageManager.ResolveInfoFlags.class))) - .thenReturn(infos); - - // ProcessTextPlugin should retrieve the mocked text actions. - ProcessTextPlugin processTextPlugin = new ProcessTextPlugin(processTextChannel); - Map textActions = processTextPlugin.queryTextActions(); - final String action1Id = "mockActivityName.Action1"; - final String action2Id = "mockActivityName.Action2"; - assertEquals(textActions, Map.of(action1Id, "Action1", action2Id, "Action2")); - - // Set up the activity binding. - ActivityPluginBinding mockActivityPluginBinding = mock(ActivityPluginBinding.class); - Activity mockActivity = mock(Activity.class); - when(mockActivityPluginBinding.getActivity()).thenReturn(mockActivity); - processTextPlugin.onAttachedToActivity(mockActivityPluginBinding); - - // Execute th first action. - String textToBeProcessed = "Flutter!"; - MethodChannel.Result result = mock(MethodChannel.Result.class); - processTextPlugin.processTextAction(action1Id, textToBeProcessed, false, result); - - // Activity.startActivityForResult should have been called. - ArgumentCaptor intentCaptor = ArgumentCaptor.forClass(Intent.class); - verify(mockActivity, times(1)).startActivityForResult(intentCaptor.capture(), anyInt()); - Intent intent = intentCaptor.getValue(); - assertEquals(intent.getStringExtra(Intent.EXTRA_PROCESS_TEXT), textToBeProcessed); - - // Simulate an Android activity answer which does not return a value. - Intent resultIntent = new Intent(); - processTextPlugin.onActivityResult(result.hashCode(), Activity.RESULT_OK, resultIntent); - - // Success with no returned value is expected. - verify(result).success(null); - } - - @SuppressWarnings("deprecation") - // setMessageHandler is deprecated. - @Test - public void performProcessTextActionWithReturnedValue() { - DartExecutor mockBinaryMessenger = mock(DartExecutor.class); - PackageManager mockPackageManager = mock(PackageManager.class); - ProcessTextChannel processTextChannel = - new ProcessTextChannel(mockBinaryMessenger, mockPackageManager); - - // Set up mocked result for PackageManager.queryIntentActivities. - ResolveInfo action1 = createFakeResolveInfo("Action1", mockPackageManager); - ResolveInfo action2 = createFakeResolveInfo("Action2", mockPackageManager); - List infos = new ArrayList(Arrays.asList(action1, action2)); - when(mockPackageManager.queryIntentActivities( - any(Intent.class), any(PackageManager.ResolveInfoFlags.class))) - .thenReturn(infos); - - // ProcessTextPlugin should retrieve the mocked text actions. - ProcessTextPlugin processTextPlugin = new ProcessTextPlugin(processTextChannel); - Map textActions = processTextPlugin.queryTextActions(); - final String action1Id = "mockActivityName.Action1"; - final String action2Id = "mockActivityName.Action2"; - assertEquals(textActions, Map.of(action1Id, "Action1", action2Id, "Action2")); - - // Set up the activity binding. - ActivityPluginBinding mockActivityPluginBinding = mock(ActivityPluginBinding.class); - Activity mockActivity = mock(Activity.class); - when(mockActivityPluginBinding.getActivity()).thenReturn(mockActivity); - processTextPlugin.onAttachedToActivity(mockActivityPluginBinding); - - // Execute the first action. - String textToBeProcessed = "Flutter!"; - MethodChannel.Result result = mock(MethodChannel.Result.class); - processTextPlugin.processTextAction(action1Id, textToBeProcessed, false, result); - - // Activity.startActivityForResult should have been called. - ArgumentCaptor intentCaptor = ArgumentCaptor.forClass(Intent.class); - verify(mockActivity, times(1)).startActivityForResult(intentCaptor.capture(), anyInt()); - Intent intent = intentCaptor.getValue(); - assertEquals(intent.getStringExtra(Intent.EXTRA_PROCESS_TEXT), textToBeProcessed); - - // Simulate an Android activity answer which returns a transformed text. - String processedText = "Flutter!!!"; - Intent resultIntent = new Intent(); - resultIntent.putExtra(Intent.EXTRA_PROCESS_TEXT, processedText); - processTextPlugin.onActivityResult(result.hashCode(), Activity.RESULT_OK, resultIntent); - - // Success with the transformed text is expected. - verify(result).success(processedText); - } - - private ResolveInfo createFakeResolveInfo(String label, PackageManager mockPackageManager) { - ResolveInfo resolveInfo = mock(ResolveInfo.class); - ActivityInfo activityInfo = new ActivityInfo(); - when(resolveInfo.loadLabel(mockPackageManager)).thenReturn(label); - - // Use Java reflection to set required member variables. - try { - Field activityField = ResolveInfo.class.getDeclaredField("activityInfo"); - activityField.setAccessible(true); - activityField.set(resolveInfo, activityInfo); - Field packageNameField = PackageItemInfo.class.getDeclaredField("packageName"); - packageNameField.setAccessible(true); - packageNameField.set(activityInfo, "mockActivityPackageName"); - Field nameField = PackageItemInfo.class.getDeclaredField("name"); - nameField.setAccessible(true); - nameField.set(activityInfo, "mockActivityName." + label); - } catch (Exception ex) { - // Test will failed if reflection APIs throw. - } - - return resolveInfo; - } -} From e41d5b6bf9cd5a9a7d4448375a4dc5897f69f740 Mon Sep 17 00:00:00 2001 From: Jackson Gardner Date: Wed, 11 Oct 2023 14:24:11 -0700 Subject: [PATCH 587/859] Switch to Chrome For Testing instead of Chromium (#46683) This switches over to using Chrome for Testing instead of Chromium. This requires some changes from the recipes repo (https://flutter-review.googlesource.com/c/recipes/+/51482) in order to coordinate the change in filestructure on the mac versions. --- .ci.yaml | 2 +- ci/builders/linux_web_engine.json | 58 +++++++++--------- lib/web_ui/README.md | 22 +++---- lib/web_ui/dev/browser_lock.dart | 16 +---- lib/web_ui/dev/browser_lock.yaml | 18 +----- lib/web_ui/dev/browser_roller.dart | 45 ++++++-------- lib/web_ui/dev/chrome.dart | 2 +- lib/web_ui/dev/chrome_installer.dart | 20 +++--- lib/web_ui/dev/cipd.dart | 3 +- lib/web_ui/dev/common.dart | 74 ++++++----------------- lib/web_ui/dev/generate_builder_json.dart | 2 +- lib/web_ui/dev/roll_fallback_fonts.dart | 1 - 12 files changed, 85 insertions(+), 178 deletions(-) diff --git a/.ci.yaml b/.ci.yaml index c6c8442e1b72c..e5ee03b4374a8 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -360,7 +360,7 @@ targets: {"download_emsdk": true} dependencies: >- [ - {"dependency": "chrome_and_driver", "version": "version:117.0"}, + {"dependency": "chrome_and_driver", "version": "version:118.0.5993.70"}, {"dependency": "curl", "version": "version:7.64.0"} ] framework: "true" diff --git a/ci/builders/linux_web_engine.json b/ci/builders/linux_web_engine.json index 0f18b66f0ea1d..d9cd85f3836fc 100644 --- a/ci/builders/linux_web_engine.json +++ b/ci/builders/linux_web_engine.json @@ -355,7 +355,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:117.0" + "version": "118.0.5993.70" } ], "tasks": [ @@ -391,7 +391,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:117.0" + "version": "118.0.5993.70" } ], "tasks": [ @@ -427,7 +427,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:117.0" + "version": "118.0.5993.70" } ], "tasks": [ @@ -463,7 +463,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:117.0" + "version": "118.0.5993.70" } ], "tasks": [ @@ -499,7 +499,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:117.0" + "version": "118.0.5993.70" } ], "tasks": [ @@ -535,7 +535,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:117.0" + "version": "118.0.5993.70" } ], "tasks": [ @@ -571,7 +571,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:117.0" + "version": "118.0.5993.70" } ], "tasks": [ @@ -607,7 +607,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:117.0" + "version": "118.0.5993.70" } ], "tasks": [ @@ -823,7 +823,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:117.0" + "version": "118.0.5993.70" } ], "tasks": [ @@ -859,7 +859,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:117.0" + "version": "118.0.5993.70" } ], "tasks": [ @@ -895,7 +895,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:117.0" + "version": "118.0.5993.70" } ], "tasks": [ @@ -931,7 +931,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:117.0" + "version": "118.0.5993.70" } ], "tasks": [ @@ -967,7 +967,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:117.0" + "version": "118.0.5993.70" } ], "tasks": [ @@ -1003,7 +1003,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:117.0" + "version": "118.0.5993.70" } ], "tasks": [ @@ -1039,7 +1039,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:117.0" + "version": "118.0.5993.70" } ], "tasks": [ @@ -1075,7 +1075,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:117.0" + "version": "118.0.5993.70" } ], "tasks": [ @@ -1095,7 +1095,7 @@ "recipe": "engine_v2/tester_engine", "drone_dimensions": [ "device_type=none", - "os=Mac-12" + "os=Mac" ], "gclient_variables": { "download_android_deps": false @@ -1127,7 +1127,7 @@ "recipe": "engine_v2/tester_engine", "drone_dimensions": [ "device_type=none", - "os=Mac-12" + "os=Mac" ], "gclient_variables": { "download_android_deps": false @@ -1159,7 +1159,7 @@ "recipe": "engine_v2/tester_engine", "drone_dimensions": [ "device_type=none", - "os=Mac-12" + "os=Mac" ], "gclient_variables": { "download_android_deps": false @@ -1191,7 +1191,7 @@ "recipe": "engine_v2/tester_engine", "drone_dimensions": [ "device_type=none", - "os=Mac-12" + "os=Mac" ], "gclient_variables": { "download_android_deps": false @@ -1223,7 +1223,7 @@ "recipe": "engine_v2/tester_engine", "drone_dimensions": [ "device_type=none", - "os=Mac-12" + "os=Mac" ], "gclient_variables": { "download_android_deps": false @@ -1271,7 +1271,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:117.0" + "version": "118.0.5993.70" } ], "tasks": [ @@ -1307,7 +1307,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:117.0" + "version": "118.0.5993.70" } ], "tasks": [ @@ -1343,7 +1343,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:117.0" + "version": "118.0.5993.70" } ], "tasks": [ @@ -1379,7 +1379,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:117.0" + "version": "118.0.5993.70" } ], "tasks": [ @@ -1415,7 +1415,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:117.0" + "version": "118.0.5993.70" } ], "tasks": [ @@ -1451,7 +1451,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:117.0" + "version": "118.0.5993.70" } ], "tasks": [ @@ -1487,7 +1487,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:117.0" + "version": "118.0.5993.70" } ], "tasks": [ @@ -1523,7 +1523,7 @@ }, { "dependency": "chrome_and_driver", - "version": "version:117.0" + "version": "118.0.5993.70" } ], "tasks": [ diff --git a/lib/web_ui/README.md b/lib/web_ui/README.md index e5a68a9d3fd3a..078c31aea3af6 100644 --- a/lib/web_ui/README.md +++ b/lib/web_ui/README.md @@ -135,8 +135,8 @@ tests locally. To make changes effective on LUCI follow instructions in ### Rolling browsers -When running tests on LUCI using Chromium, LUCI uses the version of Chromium -fetched from CIPD. +When running tests on LUCI using Chrome, LUCI uses the version of Chrome for +Testing fetched from CIPD. Since the engine code and infra recipes do not live in the same repository there are few steps to follow in order to upgrade a browser's version. @@ -166,12 +166,11 @@ the `--dry-run` flag to the felt command. NOTE: Because this script uses `fc-config`, this roll step only actually works on Linux, not on macOS or Windows. -#### Chromium +#### Chrome for Testing -Chromium is an independent project that gets rolled into Flutter manually, and as needed. -Flutter consumes a pre-built Chromium version from chromium.org. When a new version of -Chromium (check [here](https://www.chromium.org/getting-involved/download-chromium/#downloading-old-builds-of-chrome-chromium)) -is needed, follow these steps to roll the new version: +Chrome for Testing is an independent project that gets rolled into Flutter +manually, and as needed. Flutter consumes a pre-built Chrome for Testing build. +The available versions of Chrome for Testing available can be found [here](https://googlechromelabs.github.io/chrome-for-testing/). To roll to a newer version: - Make sure you have `depot_tools` installed (if you are regularly hacking on the engine code, you probably do). @@ -179,13 +178,8 @@ is needed, follow these steps to roll the new version: instructions (this step requires sufficient privileges; contact #hackers-infra-🌡 on [Flutter's Discord server](https://github.com/flutter/flutter/wiki/Chat)). - Edit `dev/browser_lock.yaml` and update the following values under `chrome`: - - Set `Windows`, `Mac` and `Linux` to the `branch_base_position`s given [in this table](https://omahaproxy.appspot.com). - (Pick from `linux`, `mac` and `win` as `os`, and the `stable` channel.) - - Set `version` to a string composed of the Major Version of the browser, and - the number of times that major version has been uploaded to CIPD. For example, - start with `'99'` for version 99.0.4844.51 of Chromium, and update to `'99.1'`, - `'99.2'` and so on if you need to upload newer bundles of the same major version. - (This is required because tags can't be repeated in CIPD). + - Set `version` to the full four part version number of the build of Chrome + for Testing you want to roll (for example, `118.0.5993.70`) - Run `dart dev/browser_roller.dart` and make sure it completes successfully. The script uploads the specified versions of Chromium (and Chromedriver) to the right locations in CIPD: [Chrome](https://chrome-infra-packages.appspot.com/p/flutter_internal/browsers/chrome), diff --git a/lib/web_ui/dev/browser_lock.dart b/lib/web_ui/dev/browser_lock.dart index d460975fd1994..40226e5bb800e 100644 --- a/lib/web_ui/dev/browser_lock.dart +++ b/lib/web_ui/dev/browser_lock.dart @@ -7,7 +7,6 @@ import 'dart:io' as io; import 'package:path/path.dart' as path; import 'package:yaml/yaml.dart'; -import 'common.dart'; import 'environment.dart'; /// Returns the browser configuration based on the `browser_lock.yaml` file in @@ -36,23 +35,10 @@ class BrowserLock { class ChromeLock { ChromeLock._fromYaml(YamlMap yaml) : - linux = (yaml['Linux'] as int).toString(), - mac = (yaml['Mac'] as int).toString(), - macArm = (yaml['Mac_Arm'] as int).toString(), - windows = (yaml['Win'] as int).toString(), version = yaml['version'] as String; - final String linux; - final String mac; - final String macArm; - final String windows; - /// The major version of Chromium represented by this lock. E.g: '96' (for Chromium 96.0.554.51) + /// The full version of Chromium represented by this lock. E.g: '119.0.6045.9' final String version; - - /// Return the Chromium Build ID to use for the current operating system. - String get versionForCurrentPlatform { - return PlatformBinding.instance.getChromeBuild(this); - } } class FirefoxLock { diff --git a/lib/web_ui/dev/browser_lock.yaml b/lib/web_ui/dev/browser_lock.yaml index 3a957ede46156..7a82c46c9b855 100644 --- a/lib/web_ui/dev/browser_lock.yaml +++ b/lib/web_ui/dev/browser_lock.yaml @@ -1,23 +1,7 @@ # Please refer to the "Upgrade Browser Version" section in the README.md for # more details on how to update browser version numbers. chrome: - # It seems Chrome can't always release from the same build for all operating - # systems, so we specify per-OS build number. - # - # Follow these instructions to find the correct build number for a specific - # Chromium version + OS combo: - # - # https://www.chromium.org/getting-involved/download-chromium/#downloading-old-builds-of-chrome-chromium - # - # The OS names here must match what recipe Python expression - # `self.m.platform.name.capitalize()` evaluates to. See: - # - # recipe_modules/web_util/api.py - Linux: 1181205 - Mac: 1181205 - Mac_Arm: 1181212 - Win: 1181217 - version: '117.0' # CIPD tag for the above Build IDs. Normally "ChromeMajorVersion.UploadAttempt". ;) + version: '118.0.5993.70' firefox: version: '106.0' diff --git a/lib/web_ui/dev/browser_roller.dart b/lib/web_ui/dev/browser_roller.dart index 7c87b3c7da21d..b39de18503f6d 100644 --- a/lib/web_ui/dev/browser_roller.dart +++ b/lib/web_ui/dev/browser_roller.dart @@ -209,19 +209,18 @@ class _BrowserRoller { // Downloads Chromium from the internet, packs it in the directory structure // that the LUCI script wants. The result of this will be then uploaded to CIPD. Future _rollChromium(_Platform platform) async { - final String chromeBuild = platform.binding.getChromeBuild(_lock.chromeLock); - final String majorVersion = _lock.chromeLock.version; - final String url = platform.binding.getChromeDownloadUrl(chromeBuild); + final String version = _lock.chromeLock.version; + final String url = platform.binding.getChromeDownloadUrl(version); final String cipdPackageName = 'flutter_internal/browsers/chrome/${platform.name}'; final io.Directory platformDir = io.Directory(path.join(_rollDir.path, platform.name)); - print('\nRolling Chromium for ${platform.name} (version:$majorVersion, build $chromeBuild)'); + print('\nRolling Chromium for ${platform.name} (version:$version)'); // Bail out if CIPD already has version:$majorVersion for this package! if (!dryRun && await cipdKnowsPackageVersion( package: cipdPackageName, - versionTag: majorVersion, + versionTag: version, isVerbose: verbose )) { - print(' Skipping $cipdPackageName version:$majorVersion. Already uploaded to CIPD!'); + print(' Skipping $cipdPackageName version:$version. Already uploaded to CIPD!'); vprint(' Update browser_lock.yaml and use a different version value.'); return; } @@ -233,24 +232,17 @@ class _BrowserRoller { await _unzipAndDeleteFile(chromeDownload, platformDir); - late String relativePlatformDirPath; - // Preserve the `chrome-mac` directory when bundling, but remove it for win and linux. - if (platform.os == 'mac') { - relativePlatformDirPath = path.relative(platformDir.path, from: _rollDir.path); - } else { - final io.Directory? actualContentRoot = await _locateContentRoot(platformDir); - assert(actualContentRoot != null); - relativePlatformDirPath = path.relative(actualContentRoot!.path, from: _rollDir.path); - } + final io.Directory? actualContentRoot = await _locateContentRoot(platformDir); + assert(actualContentRoot != null); + final String relativePlatformDirPath = path.relative(actualContentRoot!.path, from: _rollDir.path); vprint(' Uploading Chromium (${platform.name}) to CIPD...'); await uploadDirectoryToCipd( directory: _rollDir, packageName: cipdPackageName, configFileName: 'cipd.chromium.${platform.name}.yaml', - description: 'Chromium $majorVersion (build $chromeBuild) used for testing', - version: majorVersion, - buildId: chromeBuild, + description: 'Chromium $version used for testing', + version: version, root: relativePlatformDirPath, isDryRun: dryRun, isVerbose: verbose, @@ -260,19 +252,18 @@ class _BrowserRoller { // Downloads Chromedriver from the internet, packs it in the directory structure // that the LUCI script wants. The result of this will be then uploaded to CIPD. Future _rollChromeDriver(_Platform platform) async { - final String chromeBuild = platform.binding.getChromeBuild(_lock.chromeLock); - final String majorVersion = _lock.chromeLock.version; - final String url = platform.binding.getChromeDriverDownloadUrl(chromeBuild); + final String version = _lock.chromeLock.version; + final String url = platform.binding.getChromeDriverDownloadUrl(version); final String cipdPackageName = 'flutter_internal/browser-drivers/chrome/${platform.name}'; final io.Directory platformDir = io.Directory(path.join(_rollDir.path, '${platform.name}_driver')); - print('\nRolling Chromedriver for ${platform.os}-${platform.arch} (version:$majorVersion, build $chromeBuild)'); + print('\nRolling Chromedriver for ${platform.os}-${platform.arch} (version:$version)'); // Bail out if CIPD already has version:$majorVersion for this package! if (!dryRun && await cipdKnowsPackageVersion( package: cipdPackageName, - versionTag: majorVersion, + versionTag: version, isVerbose: verbose )) { - print(' Skipping $cipdPackageName version:$majorVersion. Already uploaded to CIPD!'); + print(' Skipping $cipdPackageName version:$version. Already uploaded to CIPD!'); vprint(' Update browser_lock.yaml and use a different version value.'); return; } @@ -294,9 +285,8 @@ class _BrowserRoller { directory: _rollDir, packageName: cipdPackageName, configFileName: 'cipd.chromedriver.${platform.name}.yaml', - description: 'Chromedriver for Chromium $majorVersion (build $chromeBuild) used for testing', - version: majorVersion, - buildId: chromeBuild, + description: 'Chromedriver for Chromium $version used for testing', + version: version, root: relativePlatformDirPath, isDryRun: dryRun, isVerbose: verbose, @@ -341,7 +331,6 @@ class _BrowserRoller { configFileName: 'cipd.firefox.${platform.name}.yaml', description: 'Firefox $version used for testing', version: version, - buildId: version, root: relativePlatformDirPath, isDryRun: dryRun, isVerbose: verbose, diff --git a/lib/web_ui/dev/chrome.dart b/lib/web_ui/dev/chrome.dart index 9a1c4883324fe..b1043ec3f06aa 100644 --- a/lib/web_ui/dev/chrome.dart +++ b/lib/web_ui/dev/chrome.dart @@ -52,7 +52,7 @@ class ChromeEnvironment implements BrowserEnvironment { @override Future prepare() async { - final String version = browserLock.chromeLock.versionForCurrentPlatform; + final String version = browserLock.chromeLock.version; _installation = await getOrInstallChrome( version, infoLog: isCi ? stdout : DevNull(), diff --git a/lib/web_ui/dev/chrome_installer.dart b/lib/web_ui/dev/chrome_installer.dart index fda05dbfe01d8..0f812319806c8 100644 --- a/lib/web_ui/dev/chrome_installer.dart +++ b/lib/web_ui/dev/chrome_installer.dart @@ -180,7 +180,7 @@ class ChromeInstaller { /// Windows LUCI bots does not have a `unzip`. Instead we are /// using `archive` pub package. /// - /// We didn't use `archieve` on Mac/Linux since the new files have + /// We didn't use `archive` on Mac/Linux since the new files have /// permission issues. For now we are not able change file permissions /// from dart. /// See: https://github.com/dart-lang/sdk/issues/15078. @@ -219,7 +219,7 @@ class ChromeInstaller { // named e.g. 'chrome-linux'. We need to copy the files out of that // directory and into the version directory. final io.Directory tmpDir = await io.Directory.systemTemp.createTemp(); - final io.Directory unzipDir = io.Platform.isLinux ? tmpDir : versionDir; + final io.Directory unzipDir = tmpDir; final io.ProcessResult unzipResult = await io.Process.run('unzip', [ downloadedFile.path, @@ -233,17 +233,13 @@ class ChromeInstaller { 'The unzip process exited with code ${unzipResult.exitCode}.'); } - // Remove the "chrome-linux/" path prefix, which is the Linux - // convention for Chromium directory structure. - if (io.Platform.isLinux) { - final io.Directory chromeLinuxDir = - await tmpDir.list().single as io.Directory; - await for (final io.FileSystemEntity entity in chromeLinuxDir.list()) { - await entity - .rename(path.join(versionDir.path, path.basename(entity.path))); - } - await tmpDir.delete(recursive: true); + final io.Directory topLevelDir = + await tmpDir.list().single as io.Directory; + await for (final io.FileSystemEntity entity in topLevelDir.list()) { + await entity + .rename(path.join(versionDir.path, path.basename(entity.path))); } + await tmpDir.delete(recursive: true); } downloadedFile.deleteSync(); diff --git a/lib/web_ui/dev/cipd.dart b/lib/web_ui/dev/cipd.dart index dac64787e59f8..70a17b170acef 100644 --- a/lib/web_ui/dev/cipd.dart +++ b/lib/web_ui/dev/cipd.dart @@ -40,7 +40,6 @@ Future uploadDirectoryToCipd({ required String description, required String root, required String version, - required String buildId, bool isDryRun = false, bool isVerbose = false, }) async { @@ -72,7 +71,7 @@ data: '--tag', 'version:$version', '--ref', - buildId, + version, ], if (isDryRun) ...[ '--out', diff --git a/lib/web_ui/dev/common.dart b/lib/web_ui/dev/common.dart index 857f25a660a2c..1c75526fbb180 100644 --- a/lib/web_ui/dev/common.dart +++ b/lib/web_ui/dev/common.dart @@ -7,7 +7,6 @@ import 'dart:io' as io; import 'package:path/path.dart' as path; import 'browser.dart'; -import 'browser_lock.dart'; import 'chrome.dart'; import 'edge.dart'; import 'environment.dart'; @@ -43,9 +42,14 @@ abstract class PlatformBinding { throw UnsupportedError('${io.Platform.operatingSystem} is not supported'); } - String getChromeBuild(ChromeLock chromeLock); - String getChromeDownloadUrl(String version); - String getChromeDriverDownloadUrl(String version); + String get chromePlatformString; + + String getChromeDownloadUrl(String version) => + 'https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/$version/$chromePlatformString/chrome-$chromePlatformString.zip'; + + String getChromeDriverDownloadUrl(String version) => + 'https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/$version/$chromePlatformString/chromedriver-$chromePlatformString.zip'; + String getFirefoxDownloadUrl(String version); String getFirefoxDownloadFilename(String version); String getChromeExecutablePath(io.Directory versionDir); @@ -55,22 +59,9 @@ abstract class PlatformBinding { String getCommandToRunEdge(); } -const String _kBaseDownloadUrl = - 'https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o'; - -class WindowsPlatformBinding implements PlatformBinding { - @override - String getChromeBuild(ChromeLock chromeLock) { - return chromeLock.windows; - } - +class WindowsPlatformBinding extends PlatformBinding { @override - String getChromeDownloadUrl(String version) => - 'https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Win_x64%2F$version%2Fchrome-win.zip?alt=media'; - - @override - String getChromeDriverDownloadUrl(String version) => - 'https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Win_x64%2F$version%2Fchromedriver_win32.zip?alt=media'; + String get chromePlatformString => 'win64'; @override String getChromeExecutablePath(io.Directory versionDir) => @@ -100,19 +91,9 @@ class WindowsPlatformBinding implements PlatformBinding { String getCommandToRunEdge() => 'MicrosoftEdgeLauncher'; } -class LinuxPlatformBinding implements PlatformBinding { +class LinuxPlatformBinding extends PlatformBinding { @override - String getChromeBuild(ChromeLock chromeLock) { - return chromeLock.linux; - } - - @override - String getChromeDownloadUrl(String version) => - '$_kBaseDownloadUrl/Linux_x64%2F$version%2Fchrome-linux.zip?alt=media'; - - @override - String getChromeDriverDownloadUrl(String version) => - '$_kBaseDownloadUrl/Linux_x64%2F$version%2Fchromedriver_linux64.zip?alt=media'; + String get chromePlatformString => 'linux64'; @override String getChromeExecutablePath(io.Directory versionDir) => @@ -144,25 +125,14 @@ class LinuxPlatformBinding implements PlatformBinding { throw UnsupportedError('Edge is not supported on Linux'); } -abstract class MacPlatformBinding implements PlatformBinding { - String get chromePlatformString; - - @override - String getChromeDownloadUrl(String version) => - '$_kBaseDownloadUrl/$chromePlatformString%2F$version%2Fchrome-mac.zip?alt=media'; - - @override - String getChromeDriverDownloadUrl(String version) => - '$_kBaseDownloadUrl/$chromePlatformString%2F$version%2Fchromedriver_mac64.zip?alt=media'; - +abstract class MacPlatformBinding extends PlatformBinding { @override String getChromeExecutablePath(io.Directory versionDir) => path.join( versionDir.path, - 'chrome-mac', - 'Chromium.app', + 'Google Chrome for Testing.app', 'Contents', 'MacOS', - 'Chromium', + 'Google Chrome for Testing', ); @override @@ -191,22 +161,12 @@ abstract class MacPlatformBinding implements PlatformBinding { class MacArmPlatformBinding extends MacPlatformBinding { @override - String get chromePlatformString => 'Mac_Arm'; - - @override - String getChromeBuild(ChromeLock chromeLock) { - return chromeLock.macArm; - } + String get chromePlatformString => 'mac-arm64'; } class Macx64PlatformBinding extends MacPlatformBinding { @override - String get chromePlatformString => 'Mac'; - - @override - String getChromeBuild(ChromeLock chromeLock) { - return chromeLock.mac; - } + String get chromePlatformString => 'mac-x64'; } class BrowserInstallation { diff --git a/lib/web_ui/dev/generate_builder_json.dart b/lib/web_ui/dev/generate_builder_json.dart index c6e4b4ed761fd..6bbf9e94fe83e 100644 --- a/lib/web_ui/dev/generate_builder_json.dart +++ b/lib/web_ui/dev/generate_builder_json.dart @@ -154,7 +154,7 @@ Iterable _getTestStepsForPlatform( if (suite.runConfig.browser == BrowserName.chrome) { 'dependency': 'chrome_and_driver', - 'version': 'version:117.0', + 'version': '118.0.5993.70', }, if (suite.runConfig.browser == BrowserName.firefox) { diff --git a/lib/web_ui/dev/roll_fallback_fonts.dart b/lib/web_ui/dev/roll_fallback_fonts.dart index eea948103792b..a281138009fda 100644 --- a/lib/web_ui/dev/roll_fallback_fonts.dart +++ b/lib/web_ui/dev/roll_fallback_fonts.dart @@ -311,7 +311,6 @@ OTHER DEALINGS IN THE FONT SOFTWARE. description: 'A set of Noto fonts to fall back to for use in testing.', root: fontDir.path, version: versionString, - buildId: versionString, isDryRun: isDryRun, ); } From b01415c6bd02328e3048f4753cbc6c766d71ab15 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Wed, 11 Oct 2023 14:42:24 -0700 Subject: [PATCH 588/859] [Impeller] flutter_tester --enable-impeller (#46389) This patch does the following: - Updates `flutter_tester` to set up an Impeller rendering context and surface if `--enable-impeller` is set to true, using the Vulkan backend with Swiftshader. - Updates `run_tests.py` to run all tests except the smoke test (that one really has no rendering impact whatsoever) with and without `--enable-impeller`. - Updates a few tests to work that were trivial: - A couple tests needed updated goldens for very minor rendering differences. Filed https://github.com/flutter/flutter/issues/135684 to track using Skia gold for this instead. - Disabled SKP screenshotting if Impeller is enabled, and updated the test checking that to verify an error is thrown if an SKP is requested. - The Dart GPU based test now asserts that the gpu context is available if Impeller is enabled, and does not deadlock if run in a single threaded mode. - We were missing some trace events around `Canvas::SaveLayer` for Impeller as compared to Skia. - A couple other tests had strict checks about exception messages that are slightly different between Skia and Impeller. - I've filed bugs for other tests that may require a little more work, and skipped them for now. For FragmentProgram on Vulkan I reused an existing bug. This is part of my attempt to address https://github.com/flutter/flutter/issues/135693, although @chinmaygarde and I had slightly different ideas about how to do this. The goals here are: - Run the Dart unit tests we already have with Impeller enabled. - Enable running more of the framework tests (including gold tests) with Impeller enabled. - Run all of these tests via public `dart:ui` API rather than mucking around in C++ internals in the engine. --- ci/licenses_golden/licenses_flutter | 2 + impeller/BUILD.gn | 4 + impeller/aiks/canvas.cc | 2 + impeller/base/validation.cc | 2 +- impeller/playground/playground.cc | 2 +- .../renderer/backend/vulkan/allocator_vk.cc | 1 + .../vulkan/blit_command_vk_unittests.cc | 5 + .../backend/vulkan/surface_context_vk.cc | 4 + .../backend/vulkan/swapchain_impl_vk.cc | 1 + .../renderer/backend/vulkan/swapchain_vk.cc | 2 + impeller/tools/impeller.gni | 9 +- lib/gpu/context.cc | 3 +- ..._2_dispose_op_restore_previous.apng.67.png | Bin 0 -> 23284 bytes ..._2_dispose_op_restore_previous.apng.68.png | Bin 0 -> 23229 bytes ..._2_dispose_op_restore_previous.apng.69.png | Bin 0 -> 23438 bytes .../impeller_four_frame_with_reuse_end.png | Bin 0 -> 506 bytes lib/ui/fixtures/impeller_heart_end.png | Bin 0 -> 39702 bytes shell/common/shell.cc | 5 + .../common/shell_test_platform_view_vulkan.cc | 6 +- shell/gpu/gpu_surface_vulkan.cc | 4 + shell/gpu/gpu_surface_vulkan_impeller.cc | 5 + shell/testing/BUILD.gn | 20 ++- shell/testing/tester_main.cc | 134 +++++++++++++++++- testing/dart/canvas_test.dart | 16 ++- testing/dart/codec_test.dart | 19 ++- testing/dart/color_filter_test.dart | 21 +++ testing/dart/encoding_test.dart | 14 ++ testing/dart/fragment_shader_test.dart | 46 ++++++ testing/dart/gpu_test.dart | 11 +- testing/dart/image_filter_test.dart | 21 +++ testing/dart/impeller_enabled.dart | 7 + testing/dart/observatory/skp_test.dart | 20 ++- testing/dart/observatory/tracing_test.dart | 7 +- .../observatory/vmservice_methods_test.dart | 4 +- testing/run_tests.py | 116 +++++++++++---- testing/test_vulkan_context.cc | 9 +- vulkan/swiftshader_path.h | 18 +++ vulkan/vulkan_window.cc | 4 + 38 files changed, 478 insertions(+), 66 deletions(-) create mode 100644 lib/ui/fixtures/impeller_2_dispose_op_restore_previous.apng.67.png create mode 100644 lib/ui/fixtures/impeller_2_dispose_op_restore_previous.apng.68.png create mode 100644 lib/ui/fixtures/impeller_2_dispose_op_restore_previous.apng.69.png create mode 100644 lib/ui/fixtures/impeller_four_frame_with_reuse_end.png create mode 100644 lib/ui/fixtures/impeller_heart_end.png create mode 100644 testing/dart/impeller_enabled.dart create mode 100644 vulkan/swiftshader_path.h diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index eb75af95d163c..576a145eaf63d 100644 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -4044,6 +4044,7 @@ ORIGIN: ../../../flutter/vulkan/procs/vulkan_interface.cc + ../../../flutter/LIC ORIGIN: ../../../flutter/vulkan/procs/vulkan_interface.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/vulkan/procs/vulkan_proc_table.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/vulkan/procs/vulkan_proc_table.h + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/vulkan/swiftshader_path.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/vulkan/vulkan_application.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/vulkan/vulkan_application.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/vulkan/vulkan_backbuffer.cc + ../../../flutter/LICENSE @@ -6830,6 +6831,7 @@ FILE: ../../../flutter/vulkan/procs/vulkan_interface.cc FILE: ../../../flutter/vulkan/procs/vulkan_interface.h FILE: ../../../flutter/vulkan/procs/vulkan_proc_table.cc FILE: ../../../flutter/vulkan/procs/vulkan_proc_table.h +FILE: ../../../flutter/vulkan/swiftshader_path.h FILE: ../../../flutter/vulkan/vulkan_application.cc FILE: ../../../flutter/vulkan/vulkan_application.h FILE: ../../../flutter/vulkan/vulkan_backbuffer.cc diff --git a/impeller/BUILD.gn b/impeller/BUILD.gn index 696226f8fe334..c02ccd0558455 100644 --- a/impeller/BUILD.gn +++ b/impeller/BUILD.gn @@ -34,6 +34,10 @@ config("impeller_public_config") { defines += [ "IMPELLER_ENABLE_VULKAN=1" ] } + if (impeller_enable_vulkan_playgrounds) { + defines += [ "IMPELLER_ENABLE_VULKAN_PLAYGROUNDS=1" ] + } + if (impeller_trace_all_gl_calls) { defines += [ "IMPELLER_TRACE_ALL_GL_CALLS" ] } diff --git a/impeller/aiks/canvas.cc b/impeller/aiks/canvas.cc index d4d3829972fea..2308d5385fb4a 100644 --- a/impeller/aiks/canvas.cc +++ b/impeller/aiks/canvas.cc @@ -8,6 +8,7 @@ #include #include "flutter/fml/logging.h" +#include "flutter/fml/trace_event.h" #include "impeller/aiks/image_filter.h" #include "impeller/aiks/paint_pass_delegate.h" #include "impeller/entity/contents/atlas_contents.h" @@ -536,6 +537,7 @@ size_t Canvas::GetClipDepth() const { void Canvas::SaveLayer(const Paint& paint, std::optional bounds, const std::shared_ptr& backdrop_filter) { + TRACE_EVENT0("flutter", "Canvas::saveLayer"); Save(true, paint.blend_mode, backdrop_filter); auto& new_layer_pass = GetCurrentPass(); diff --git a/impeller/base/validation.cc b/impeller/base/validation.cc index bb41c50fec462..bbfd7efda3710 100644 --- a/impeller/base/validation.cc +++ b/impeller/base/validation.cc @@ -48,7 +48,7 @@ void ImpellerValidationBreak(const char* message) { } else { FML_LOG(ERROR) << stream.str(); } -#endif // IMPELLER_DEBUG +#endif // IMPELLER_ENABLE_VALIDATION } } // namespace impeller diff --git a/impeller/playground/playground.cc b/impeller/playground/playground.cc index 93eb4eb3ce204..8d2f591a561dd 100644 --- a/impeller/playground/playground.cc +++ b/impeller/playground/playground.cc @@ -102,7 +102,7 @@ bool Playground::SupportsBackend(PlaygroundBackend backend) { return false; #endif // IMPELLER_ENABLE_OPENGLES case PlaygroundBackend::kVulkan: -#if IMPELLER_ENABLE_VULKAN +#if IMPELLER_ENABLE_VULKAN && IMPELLER_ENABLE_VULKAN_PLAYGROUNDS return true; #else // IMPELLER_ENABLE_VULKAN return false; diff --git a/impeller/renderer/backend/vulkan/allocator_vk.cc b/impeller/renderer/backend/vulkan/allocator_vk.cc index 3fc4f2f99ca5a..f90ee4bc447d6 100644 --- a/impeller/renderer/backend/vulkan/allocator_vk.cc +++ b/impeller/renderer/backend/vulkan/allocator_vk.cc @@ -265,6 +265,7 @@ class AllocatedTextureSourceVK final : public TextureSourceVK { vk::Device device, bool supports_memoryless_textures) : TextureSourceVK(desc), resource_(std::move(resource_manager)) { + FML_DCHECK(desc.format != PixelFormat::kUnknown); TRACE_EVENT0("impeller", "CreateDeviceTexture"); vk::ImageCreateInfo image_info; image_info.flags = ToVKImageCreateFlags(desc.type); diff --git a/impeller/renderer/backend/vulkan/blit_command_vk_unittests.cc b/impeller/renderer/backend/vulkan/blit_command_vk_unittests.cc index 9b911c66cef17..260c9e4a45861 100644 --- a/impeller/renderer/backend/vulkan/blit_command_vk_unittests.cc +++ b/impeller/renderer/backend/vulkan/blit_command_vk_unittests.cc @@ -16,9 +16,11 @@ TEST(BlitCommandVkTest, BlitCopyTextureToTextureCommandVK) { auto encoder = std::make_unique(context)->Create(); BlitCopyTextureToTextureCommandVK cmd; cmd.source = context->GetResourceAllocator()->CreateTexture({ + .format = PixelFormat::kR8G8B8A8UNormInt, .size = ISize(100, 100), }); cmd.destination = context->GetResourceAllocator()->CreateTexture({ + .format = PixelFormat::kR8G8B8A8UNormInt, .size = ISize(100, 100), }); bool result = cmd.Encode(*encoder.get()); @@ -32,6 +34,7 @@ TEST(BlitCommandVkTest, BlitCopyTextureToBufferCommandVK) { auto encoder = std::make_unique(context)->Create(); BlitCopyTextureToBufferCommandVK cmd; cmd.source = context->GetResourceAllocator()->CreateTexture({ + .format = PixelFormat::kR8G8B8A8UNormInt, .size = ISize(100, 100), }); cmd.destination = context->GetResourceAllocator()->CreateBuffer({ @@ -48,6 +51,7 @@ TEST(BlitCommandVkTest, BlitCopyBufferToTextureCommandVK) { auto encoder = std::make_unique(context)->Create(); BlitCopyBufferToTextureCommandVK cmd; cmd.destination = context->GetResourceAllocator()->CreateTexture({ + .format = PixelFormat::kR8G8B8A8UNormInt, .size = ISize(100, 100), }); cmd.source = context->GetResourceAllocator() @@ -66,6 +70,7 @@ TEST(BlitCommandVkTest, BlitGenerateMipmapCommandVK) { auto encoder = std::make_unique(context)->Create(); BlitGenerateMipmapCommandVK cmd; cmd.texture = context->GetResourceAllocator()->CreateTexture({ + .format = PixelFormat::kR8G8B8A8UNormInt, .size = ISize(100, 100), .mip_count = 2, }); diff --git a/impeller/renderer/backend/vulkan/surface_context_vk.cc b/impeller/renderer/backend/vulkan/surface_context_vk.cc index 2e20d2af5cbe6..afc1407f6f3f5 100644 --- a/impeller/renderer/backend/vulkan/surface_context_vk.cc +++ b/impeller/renderer/backend/vulkan/surface_context_vk.cc @@ -63,6 +63,10 @@ bool SurfaceContextVK::SetWindowSurface(vk::UniqueSurfaceKHR surface) { VALIDATION_LOG << "Could not create swapchain."; return false; } + if (!swapchain->IsValid()) { + VALIDATION_LOG << "Could not create valid swapchain."; + return false; + } swapchain_ = std::move(swapchain); return true; } diff --git a/impeller/renderer/backend/vulkan/swapchain_impl_vk.cc b/impeller/renderer/backend/vulkan/swapchain_impl_vk.cc index 0af88001b8e95..dcd5d1c50b593 100644 --- a/impeller/renderer/backend/vulkan/swapchain_impl_vk.cc +++ b/impeller/renderer/backend/vulkan/swapchain_impl_vk.cc @@ -142,6 +142,7 @@ SwapchainImplVK::SwapchainImplVK( vk::SwapchainKHR old_swapchain, vk::SurfaceTransformFlagBitsKHR last_transform) { if (!context) { + VALIDATION_LOG << "Cannot create a swapchain without a context."; return; } diff --git a/impeller/renderer/backend/vulkan/swapchain_vk.cc b/impeller/renderer/backend/vulkan/swapchain_vk.cc index 0a09a9eb371e0..c5399ce4835e7 100644 --- a/impeller/renderer/backend/vulkan/swapchain_vk.cc +++ b/impeller/renderer/backend/vulkan/swapchain_vk.cc @@ -5,6 +5,7 @@ #include "impeller/renderer/backend/vulkan/swapchain_vk.h" #include "flutter/fml/trace_event.h" +#include "impeller/base/validation.h" #include "impeller/renderer/backend/vulkan/swapchain_impl_vk.h" namespace impeller { @@ -14,6 +15,7 @@ std::shared_ptr SwapchainVK::Create( vk::UniqueSurfaceKHR surface) { auto impl = SwapchainImplVK::Create(context, std::move(surface)); if (!impl || !impl->IsValid()) { + VALIDATION_LOG << "Failed to create SwapchainVK implementation."; return nullptr; } return std::shared_ptr(new SwapchainVK(std::move(impl))); diff --git a/impeller/tools/impeller.gni b/impeller/tools/impeller.gni index 35758f3013b46..15caa5631c472 100644 --- a/impeller/tools/impeller.gni +++ b/impeller/tools/impeller.gni @@ -22,7 +22,14 @@ declare_args() { (is_linux || is_win || is_android) && target_os != "fuchsia" # Whether the Vulkan backend is enabled. - impeller_enable_vulkan = + impeller_enable_vulkan = (is_linux || is_win || is_android || + enable_unittests) && target_os != "fuchsia" + + # Whether playgrounds should run with Vulkan. + # + # impeller_enable_vulkan may be true in build environments that run tests but + # do not have a Vulkan ICD present. + impeller_enable_vulkan_playgrounds = (is_linux || is_win || is_android) && target_os != "fuchsia" # Whether to use a prebuilt impellerc. diff --git a/lib/gpu/context.cc b/lib/gpu/context.cc index 34418320b5ddc..7539f0cb7300a 100644 --- a/lib/gpu/context.cc +++ b/lib/gpu/context.cc @@ -55,7 +55,8 @@ Dart_Handle InternalFlutterGpu_Context_InitializeDefault(Dart_Handle wrapper) { // Grab the Impeller context from the IO manager. std::promise> context_promise; auto impeller_context_future = context_promise.get_future(); - dart_state->GetTaskRunners().GetIOTaskRunner()->PostTask( + fml::TaskRunner::RunNowOrPostTask( + dart_state->GetTaskRunners().GetIOTaskRunner(), fml::MakeCopyable([promise = std::move(context_promise), io_manager = dart_state->GetIOManager()]() mutable { promise.set_value(io_manager ? io_manager->GetImpellerContext() diff --git a/lib/ui/fixtures/impeller_2_dispose_op_restore_previous.apng.67.png b/lib/ui/fixtures/impeller_2_dispose_op_restore_previous.apng.67.png new file mode 100644 index 0000000000000000000000000000000000000000..bdec9bc8f149955ba3eaea280d583fef4ec368d7 GIT binary patch literal 23284 zcmZU5V~}LgvUPjfwrzXbwx(@N+qN}r+nTm*+s3r3ZBHAo=HB?ecoDCDRGo;5I%n_P zJ2O|VT)QHa6eJN~abZC~KoF#*#FRlmK!t$UH_%YPcSnY9Yv2cjvxu}RH1OpEZ4wRw zLJT4;Camg_eUanoqx!e~YscA)_0L!jDr#zo6c_|EbU5`GZMc-15A+Sb*>7X9Yc zmd~c<<&Et}#=ma$&DxcP)G`<-rbtoL7A7#{@et53ByT+mGuiiV`@H5yCaiywGRUXi z{_b&*JI`cX%b5w>^X-_kl~q*i4M$-yX%HutV(tFB${nB!(C_kS|9K0WkHw^4quB*^ zG8~mghgl2ab-Q;MIsAXWHXTy=@k3Z#JhU_oU<&>7?g6aJ1Bad-6VBe=D{iOv5fh{` zjp^rdl{q^2yn`M&%tIil?Oi02~{rOD@w zYMsh-w64|2*R9G#I0AgE1U&Eu)f+AM6W{V2c%HxceFD5d^eO~7dneGY*k!bGQb#;lr-x6H6c!~(~v$k zCPhn2TUK69!p@$&yK7j>9V-O1l#F1 z4^3}wO8Px; zFfX<{)1Cyk`?sfTM9dkC7rI*!({C(+X6hj^5-Zk|R9QAH;VAnJ>L-L@cyjdKy8TCP zGc4;nw22I=^p0=3``3FXs7_v5;3&}Szu4c9{APG{TGm6E04>Adj6O5$shCFmO*yU= zG7w4;$W8a(zlZRD5mo7O=e?{NtX^d^#S&5+2tnZmIP8jx_ft_j%&nZ58vZjc$vBo| z+})GAfJ5a?U^w!s|J}FT@s~`zK+awAcr<87<66LCkc5EO(JH;1;^B%ZoL19~#FQDE z!Q~%OL$&XKmh)sB_^H?k?4@R}Q$c;u2iD)*j;v9FAD0Y|W@g3;GGu@j$xTup;ztk! zqR+@s@7AJXDV+elmalI^Lo8<7RtKkW&m}kX8@V40&f8z<_6(V$qeNF`{Dx360i?l! zouicSubJHsNdLABYBqPqu+GmJyd;0w6>_0|lokh6Xz z^3`=BRLW2PdcsC~c;I$~pwJaJ0%#F>-a=BEm?l6xgVYOkRiL7wU8XjBpYj4nyW0Pr$CxAe1W|D%lT+Kez{mH>%e(~xw~ z=h30{*@S2bFwziYPICg{k0F@Ow@R&mz#@tE%kLhic>nHA_xZYR?Q;X5N*D0Tvrs$i zZkKJp?{D7pzwYjyh?|_8G+zAnWjGnA(lk7T*0|Scht&g|krmsv`PBRtpR)ECJ^tRe zxuCVlD0MZ&(kXJs&1A&YcvGAgA4XZ^tJ++Kyempp`l&2fwh&;DNFxM#f4{%L2YujS znr3MQJ;)u>waF?V$LHm=bkk*)N4;8iz8KkR;0aLbZ4sR{kZ$_aq4#_i=~T{Jm-4Hq z)3dHA9um4$jmb~@20R2BYD)LSiKyY~ohEU{WPQsZ03>AjIc?hh{tsY(lii)?$?qJ~ z9xIb1Tmz*00aitm{agm_k3DmIQ3X9HC&tysAZtha%4z|6OsD&F|!M;sLdh`-yZUx3Op2!z^}_ zI^bDf#DVPl7FTN=jR@e~>51D|t+I3fs%AUBiK;RtC*B<5se?1(jz=UX*%Z2b%19Jb zAQn^57nvHed>*0L&x_~Iuc<9=PD#CsTEfa5)yy0{j5@yQji3JAKzdY3d)wmbO69Yb zyGmkMBo7ir^r<*9rMCiTn=lT8`I;8IkFMCuzWLcJAqVz1?hC2^cATJN&SDzts?9b= z1DZbsxI7>tn}qFOem&b=8Kvlu0S2f56~l{6a^KV6g+Elq>VQ4E@2Hr9{vA zD^*=P^PELBEq_UUZcRyE#hL9Bs{w|-R}AQG)fK-%;9RVk7yaUD>6%XLF&u~~17T)+ zBJ8C!!}b}wUcjF0{Y&-Mqwif~!D^@VBAY(HPX!7KjWV*U7zej|4zphM_{#T^p6PqV z{hQ3dWw)OdPtruB)DN}JfE)+`__&{EqC1DFu1|LlY=Xw~VOe^9CwM4@w}kP=QMp#d zMuE@;O}ofq$c1GI#+}QgwYV9H#xC+5^4axz8k0>r`ENNA25|GRfycJiYwnZo=?#zH z2x2X(tB>AiulA=G1`t>B2<0KZdR`HimIbZMZ+YAcA{ta1&6b_6bX^;{oGvJVDF+f6 z%wuPuxN4SXgfRrVT1Cx_M2rEPn<#Inh7*n}8M6hA)BHh16VlCk>ia?k!MPmVfYsvH zX2@XXqOnBynULDnS#__R^uQNYEow&MHlR&5%pLjZjmmRgooRE6gG09NvSpO#g6h8y z_dZT*g8{}y(Dm!YYg-JA?*?ALyMpdJ&+vX#4cpJ8l`Z#q`ts5tP({x>~pt) zl}I8(86=j*p6+>u3Pr`{LfHwa`>S)YF`Op?1BcwxeXf4=cO%LQh$C?`Ja9mfV%`M=J;BHv9ohdK8^Eh0pK2KoT_FSc`?Fvs0j+avP@>lTXglr`7)-6~8Xv~p)Z4nR@ z@pJ5lo)Ui9`1h|tL_LT}a^ zsym{z=7!r4-l(5$xz~j;3cuu030UmY-@0Aj??|HEjqexA=?_pmqhF7PQiW74iu0|l zc|Jj;B-~uFepPWcHic~+dLLol6zer22t0s7I zDo-1IfBPK@oTg%;wO|81DX?VD?TwWb<3!G-i{FTso-g~)af8Q+oO;@9cdbROu)sj1 z0CG}*!7HCnVhzbf#VLfCi%UZDn4_#K%<)r~Vsde2DBQ7k7SjVV&?u+O?qu|?oMr|F zv`(xz&4>P)d9G88K{0(uw%>zZw>@*_H&n4dZohYXWCxa@tio*QMLY`?P()k5qrb!*~@`jBm;Ep?29(A70R3kV_^Kjh7=%d3vZpW*Ukn1>0 zey7|MePQRH40Nu+`E?blG?}$wF**K5a@7izvkKl#SB?k$@Uu+oSElJYpFm38jl&e+ z7MOyJV`B%o$noXO{y%b;*1ps1aeiZXe4)?-BI!1dTT;)Lwf@oVkbW3{dM zwL|07HM;xU{7_>n^6-NL-=$A&e4gyd>rX_hU)tZ4%j5q-#=h3!vgr~ zvOJ=_W*%jQt*{){xa&Hh#8n-nIx;F9g)Zw_RLCeeU#CkrUG472;nu5%%^;G*!QUOI zSt)Yv@YMUi`JXAhZ4lWtZMFQd>mFGB{@N{sFx|2E2+2{fsN+n-sY8V;rJWp{(tGp^w41R_ZXlLxn$Jf#C5Hv%GU&a^kP;=)_4k$G7hDq_vDUT{C880h)-eEOsfRGx3Q0qibiw!GlztalBmlW1 zuB!b$*^TS=Mw2#Yl{U6$kK`{#D1$*HqjhcRZjxigWxNar9M%%VXeiZooZq10&&Oc|=dk)HvT1C|_q6A#0jA@39)f7>}K(gp#VIK!* z21{^#Ct$GU;{yQ zf0$0|U4K}fL&xw1un?Mu{O<5Zq@|~(P^ClY=uig|^TYT?US=@SKani2d;aS4h9ybK z3QjMN5Bix{3`xvY4wnE@iOFFd9{s}u47j(pjwv|Lt6Te#t08_gqPj~b>anW?AaoR{ zUjJFSN#o*da2hW(${@eQ=p%{dEPdK~`XULjUl(bGBMMjMKD{*9$RdT8T-6Y5j0Xms zK5l24iClSV1_qEZTLyAQE!pL-T$1vhK3i*8G3Xt}kmlk;A)e0a*K$vBs9@hXW_%Rt z`OaBw)}~Juo$fH>{=w#(}F?^HULR|#SPj=OVH7dr;Gf70cX6P ze5FWeNE(0;9*JEI8nV3wad98ZQE)z!d46SoNbj>w-p7u=_{4)YgBik$AJ3C^vg85` zy@&*}hSw^+CPrSgtvjrIxYWRffd0p0blCFN`rN>jIx``2`Ew*;x?jxgF;>jv5F0Mq zON1Pj{=kAx^C2Gra}q^pPHU9XZAdL?h+xlbzQTdof6;K#d#R!mrv6)^X5G zkquy1yL9|3kM@&}#7hJgn4qS5SfVppaXnwbdT972TS~uzzc02pJVg#yX}A9zgOUbr zKL`gJpT_Hl^qW9vkC3kqtV`U&ScnO{KxXF5DNR!VIj-+Vd{!1rc(iB>JDR57I2nzA zKp)@M*EhK8<2}Ee;Z+sD;v?C8;L&aQB`Xp;$pc&rIW>S57H;u==gAS|S zW_*tXiym0deyi7{_j&!Ju)X<;W01?uMjlez(-yEE{nUPTZ(CJEOY~!J_1Bv0J_rV(h&o7xIG6_EqdnCA~Y6X&IbLPVjh zVQ24>dVPm*HdU}Jj`f)PFK*Mw2pT(O z#xsuI?C>I-(Md?TYR>E)m(JtuYY9V@eouI({Tn74RR`t|cfcjozM0$g*5stUeLY-W zCF9hUSiN@p`!r}~YwyfvcCD7kj?=uC3|=nAvdpffj-;um6_2>*XnN15d9pcC!E=-? zy_JeY_6Cy3d+xQ#kdQgUbJl1ntCtNa5J0rJXI&|#B;3EF7MBEht1~{Fyrb5Fbiml| zDrsCEZ%M0|(iD%f)e){MEM&;7l+!kz7)-iXCq-@BF6dGsdz!B6A}fj~H}@-a1~jBY zP}3FuU8hhoh`lb~pVCmnWabY1rdV+JDEzj%^&QrSm=Y8?HXtk@RXIXN=dznyVOIqr z6-bA8M?&rcX@E+VdWBP*%ImaWw4}R}s3nOk@|M5%+0|q5kc{l_7>Nr4(5?b%!b-|{ zfoF<9QflQ8hZv&+4#Q=*9>1DM%E-(cNT&9zx$j)<*?e5-n%X*-_p(+Ev2{-RJd^fa zxrbZ~uCfPfbOFI)icpB{!6g&QnQ*i7ZU8)71wx8bxst7kdF?q~xE-N~tSCunI_@f( z=?{8VY!8_qe7PEBt(who>rxx{RS=(eVao`yju0ElW~j{0Bq;al?ZvTObnGNmOnkDp zpGX;Owuw5*7C_JF`$tdZeLkwkeM3ZG2g0;7Sm$zqG;z^wn0F=`A|LR z(h(@dvDj`fZXxd3E$r~e`y3}({IXGjb zOu=B;c{E=hJ#9)X`P6j&xKz3;d`u_Ie(^5O@7|{A!?iJ%Fh(u&+AS5ENIo5Vi2K&-?5b;rwBOzk!~wY8Eh;cnOD3@T`7U)By*`;35T+eazZ zJnExndc0XIb)JXk#AvTLuWZpYRR{}g!LDUu12!6Hi0ybt9ZN5 zOBAp4e0dyI)%TN(8xikwcI4S(@K~27?VXrJv2!&IwEL}ND30pkoD;Iq)c2(S-h=QT zN5zJ@i-&Tq4p_9Ppg-JW>K&Ywf%~?Uc`kR7?fl|(ChyWKtaU_>D`Lw#k|maA$d zc;Y_K@N5uU@Gebv=fQ|auYH5svWRXToS-m{(KE-#_q{iL`gPzoVLUxOZMHr$B#-P| z!v3sc0m(L;;?S!8<`b9W7AsOL1@Bh1^Y2*lvu`t=r+C^TEkwaj!$#3r%u*VJJlyUD zr}FoZwIDoz({?=Irl~3|?g)7uxKB>=lQ$KGB*s;-dMIHPMeFd`odHefJSuj#U?}HY z|D@EW*%N{_g1wP{{DB>KRZI7};M0E&ws8VPvqvar!v8!OmocyC?t&}XKtM)z-ZZmt z!Xl288oD83HXNuZTP0fn$& z9&1v4+?U;&g#TMG=Jy)9sp5yMkLM$T<1j`3DfiXdRwCzNodAL(JCC`&M)nmI-&+W^ z?^HClJYure<;Y#-eO^g7DeuF1a>8c&o|+4D`X{e!yy|oa_pp1r`L(_B!g3~bR_qQ` z$oUm+Q4VAut( z@;U+Yfuhybs>g);PTPcMGueeakL+?FW;jL-{fr(EJRjw#YC<>>?He#p<3~l9bu0iZ&(qiEToQ867>}n-cxmf>o z*S-c#3^TtfNrj9La)B?S0oit$y`tqnLUNU&zCj`NBTJD0cL?*iTQ6mZ`<};^w@m(J zS9Vcnd8g5GT?GgZG=0q9hpm*(Zzon)zdCuFsMYBX&3p5S?}?Hz zFVRJk?Lx%BLqL067`(g`#&2rm`iuZ~62mm;(QLxlQbiv>rl#W!QO&aR7TZ5_bQ}M; zZ3L~A(IyvQmVwf2ki^o&ILOwCI3PUMu+9A z*fQO;!f7CPenQ4U-EIC$WRP#IhUK*+fY&SSiD=Xvgxho{Z1lJ zxo6-sbYGo#57XkDw6+o00<=V`c-mTWNG2WN#}WZubt}oLFe3nDo@4l&ZRm>1QS0T8 zO*wBP`hWn%kY_87aXjSeTE0`-PMI$pnSm+_>T6&-E3(2(2dNqc;N7x;ezH6UR*m-% zdi@>(6Lod=wigBp4Cls{D93Ky@(w?UnFcU~9PgJ%}69 zRWOte%3Sqel#_U$`OSZ5uMLjG?ZPth*|! z7v8!pPQ7Ud4 zt5ouj*WC_?R3=*K`kf{tmq{6ZD?qr-W9S{MeIrT-c_9bVjO2%tQ<@8pp$ns}=mg3^ zr;&BNvF!PVoSNV8NYknqe2(hf4{ z{XSIhd2=gTwdkah;2_5{cpdV4ck4Q>$@7{Sfu4Pk>aW_$4LlPZ0gZ%htNqj@@K&y} zV$XjpQ_^$}T>gDX6F_OX5GFGfZf!B#QPBzdGBBZ>%|iF~gG7)D0zY9pbC8J5>I@+| zgANQ2h#3z2Z&;DGT0&LHhW?)xAeqYlW^L^3+eyTKvZrma;S=SZ>^8c$Z#RO|!9<-r zCd^zC0)HHQ9J-BnZ~^andavZ=lOcKcUw0}}*bA$p8wUsf&cfREfUTU;OBg$L?6LNb zH}b8n?V@hRPLZewU}IYBqRI0ghS+BRZMEag*XD(SWbaX@v5LO{=CNmjsnhCzmH_1V z{-KeJKne=% zSVJvcOrEcw8$2-&Zo~2DLe(GdSsO^CG18A?n+WE>p5gfTGg}(g#d+3YOEDyDTZ8U) zO`TTIzP|0DhWUw#n7aKkumh4CBb`rA8O_bND zD`0mQRTNjCq=NI49UKx#KG*hQ&|gqMo9KsXnzZA4qNm`c*hIj@{9DHo7%b2ljm6KT59uEMt_ zj&%u;uqW-+%lUR0s?-RDR5~@pZ4YUDRCN=Md^WibM!Jt}j&`su;nn$53OZl^`PalI zLd?R2Xm-!@w==WD$7!d<&23&exw*P zy)PGZwXG{@X89*<`^o$Yb#II_Drt#GU8e=3YWf=FmLGc)AGhz3542ub9L^0e!g62k-rnSZ zozniH50CN>*X29%X$i9DSJVu?ob=gJ$J+tFlP~Y`>k#2-xri8VRkL!dIEV_!Eo>0v z>OOWjUzqHV$vl`>+JtB8R3lDYOK#6(3h3Jtrp(Y%tS)?Fl|-H?(b$rYfbuJc+{UgS zP7iiV67gr|^ykCObC1`S`7&yrNF=|uE|Fe|Q5RQt!?Eqzv8k2S)QOdUnSq*8DLPI0 zkLJVXx3p>`d~g(~n6nwp>j5DZFed44f4UQP+S2?B38R*bTYweCLnQ+413A4PjQ@OK zD{@mn$8N!nDA}>$xUjor+fV&Z`}btqZusx(eMT*19*$`6m~=>4nA81XoxY{-3me(40sdbzIX-Wn-rpWrw(iEO%F1>Jt94#>2Nn4Q+>3aD?ZJOR#T9Nw zq@ut+Ri`G}NgIB~x}yTT5g6eb4RT1A#*e4c}S zYnPo>)xQ1laQVTpBlM9X7-lU*L9Kj%W!t6KHdZRKqQ$zv-o8=sIz*`vng|lHyrO#u znV9e8On|TPY92Se1^tNSHdYcQ63-l~cW!dj^U+|n^Wtd10P64JAEVv)up_$%^kJ)i zA-kQ=m22uE%!42?^zcMFP5>U*=5X46W4J{#H&l=jwX^J3)(I`{3V%I9B^}WhJvg91 z*Fr2}X0PhwCz?Q4ch#fY3_>n^shIE!4(wb zNpC52D^+;lLy<;Y+N!Dl=pE*iBu6tMxN6Y)z5ba;N3wJjm8vVIm2Xhu{{bZ1%JH{7W#`=m zM0;u0);7DA=d%V=pb<}bLuHj%qFIpb#Ski@6qtr1-LrdGn6knnn7ehyE9Ij|u)Y*` zr+mtl?Y+38waPzATG|D;=Ry*fBn)4Q2|IgV1Nwk7L$9Wbs_5wMw{|}nR@x|C9CE<= z`SDuA+TWDN)iD3~-VuduzJ5m)7o$ip=j-JQzBo3%ikiZS)mUr)CUxDY_{h7kfdT#s z$==SXA;UE*2K__Z#PJvteu`6|F5JWl}`TFP_NW?FgXp z4VE-P0!O^| z5Gq!zzfZcb(fAAM!$=5XZh12X0Mtow8r&oH26pAch;%Bbog|XtoYn>1MgQ6N_6L!v z3MuY_Hi1j5ttC4F$Xzd7LtzYWPW@50E`8D<+1zo-dfQ-jMJMhQ&`gEdpm9I{`o1=U{IldHNvuS&KD@08(+5F8UL#17hn#Qf=9enHm_{@DZ0K`JFs!I3UU2{s_9lH>|u0+&97H>G(M#fMHWga-@_ zwiRa$8Rk%Hi*m6B#f7?CBBl2G#>^j8f#f{;vPB4^@rCF*qsh4k)0QYkzPM9?*nqaI zfx>d62x59Zd}j~7YCk`SFy8Ff)T39o)kgMJkQ;eRlo*6%Y}v^8%1P*d!jsE(D^Ns+ z4@fV{xpkH&68awakm1tyo_g*HWPe-c8|&cy?M4<5BLplQ_$GZ<4r400t9~-K7+@Fk z*TVhMQ7)z9xOULq2(S)X!opH|8V(CaJ-v(+@Lw1FU;MD^8Vpf*uAez$7ue2K={cNK z+BCJ%^cK+xqsYb=HBQVkM3|DRbavQkKR391Hb=tYn5g>C&Eaw-x9DYx`pe>hG% zaT06}y-di;8GLXj(46}E3A{?#9~@Xm$mCeoo>l{k%OKr>{a|e1x)JtnJv58^oP)UR#t)xsMZ3Kq=SW>bwFZED_vG% z2Fr%mGa0ByyTmPVGsTeDEql=`tw0Bj*{A%Ir(+_+BXj3MihK5o@v=Oz&Peb_*u<%W zf593^>e0V3M=ae9^zt#6C2ZH6JQ7^YmJrh!*zGgec$m# zuwX+1Ol~DD?Id`rT)5RDQpD1*vxX(AFI%9XQ^cPzog3RE602Q%)Uk18y!)3*MlnFVsxR&EOX3rm2asrs8yJe==-d z&xkGrbHrUNjap%5wL`cNZheCH(Kfc2aAH0%d(SqFm-P5VffZ9o@yy7@xh#Zzwb; zEBJ;A=L?3qho6qJSfG`WGg~{pEjs46i^pHxX4c>wE26gfuR(uS zHJY08SkgKQb!B?j#{)k$(pA+DocvXYlwc(eUPGf59X&65@|mm`OWPlsT|W%x0R+FX z1Sp)~_wBrg_NS%31^?^emgfGd1AV<2U8ips(`h}PaiD0aXZ`I~A1j2WYhI`06^UtX z2^xDA(g;!pb*hq(UhsQ;$gv3nHHI3+mYT#iKsx+J39s`HysD^;EI0-C<01PK*YHsV zMl_o%^i9)#)7iquR#=@&_ORj(=I6qMJzDF%9M>a}k)6NK@nhaU91-<7$V)!q5yTl;iu&l6Iw@)>dop3;*~u`?96<< zLhnv&-RrxCPu8>buZ5=FPXHe3NP7FEMGjxoept)hdyV`Q6GKyJTk@X;BR9}$HoKG7 zgd%%GD@0fd&%;;5gzY^4F9AEfW+&p@?SMG|fq{+P{uvJ34GzY|*)xi;uOn!&I4_Bf z;k3PFlb}ps)}o;aLflT8#wY056M-nfd?Ld*1c1**wzXpxR2L{RUJ-8)P zsRd;W@*>osKzj8zs-jG5eyq>FYRn7~G_sM-}52$?bjU1ZPIO3WD=2`AS* z7;@1@R%3fnqBwQUPdf=*4%p$=KS!+YB4C$fJ-9U?ouxm^1sRd&p*hsv%e2BLilKf_ z!vbLw`=4*7v;%5a)B6ulTE7-){f;d)T1r|s6M-67PRB=EM^7Aww%&Ew6{xP*wYSXB zx=+}^FW5Lz_pP`Z?At{&7Gp-?^3&)Ph7ZKMlgag;i&*P_Mevk+xT|8Q{NKO$aDkZx z@%pG!gWha44M&WEzNowkq-Z>B7e+-Q8k$y}?rc~lT@ZRp+h%-e;TpgAQl^SbrgF}v zwGSP4NTSDC->~`WYZMr7#QpvjyDeBG5Q0P37k++qh{q zqamj}I`VhfDVBq}MKJ}D-qu;DO^Sza_QL10Y6-)f>%Qx@_hRC|g_(8jl^Q+%4fXRY zVTk#=gmJVEWGjsK^u)Y~o;-jEj;AXaYm+%H0>zj)^Zhm|>UR$}(zwmfrF3aB5eOYC z+OiIpl5S0S^gzmFgEPM?dk5hb7(+U0;-Pv>KnLc;-lA>PyOW$<9$^w~L`5>h#&#~| z-%C4wFP5dkMK6sPc`aywY7$w%!VXg+CdrNa8}$M4dY^Ump}REdIr{Be5Kal>D4f*J zGs}k!9f0TQsqE4XQ$*9?j%XO5C7a;~8MPynpVAC^Y2|eu=@h2>pAjdKl96e(IS3Ht zeV<+PtgM@`RXxHls;*hN+CVbbwvx4kWil}=5p6Rhc0Rixh_w~`MyeeOqHEm1!P5NQ zyCGUx^sQ?EY#pX3krt+srF{ApaxR71D#5(FvII2Uo%0DX>Hx<$x%cNt9! zg5>Jv=bZ#e!1{_gYV6f;Xis8WW8*pII0QbX?-wG#f~pu&=`JuQX~ zJM(EDEg^OK>S&C?m}MV&9w-tKocNPq1|6 z74tI3qkVpX6XgOHmwK->tu@*ae=Y`{{kKFon$U!MeHh%}Gheg&_7RIU{g zYh1_{DvK7?EUq8;`;@_-Oz918`%f|rM4Rhyr8u32@?lcf{B&4%?{R*dzsZ0Y{ZeB3 zE-MuUnL858z^^+PI@O%WX!D(8u)=QPg2>CXz0a3qfjq>f2WcXQ)r72Suy-uBBB6$~ zFM+a60h6Fbkyk4O6zaE6&NF0YzElZ`WI@}=yt@8*|2OE{%Oh`fON;y|Lt-T^A6;u% z1LhfWv3AJ!nc%qV8w-bB=?7EWSE!O#l0(6^Cw0H)lfhhltKO3zV+tEfOHsQarq(oT zy`lHK+h!L*91z0@#R~a3`>y_8()lno!fg{6tP5Oz)Zg$7=@2WGHk222Lba7fw4eut z+6lv+)xxQnqrkr7u8KMKq?EVsp#lZE3}^vb{899!WjWE0x~A5-4)DL@A>@t{FhTJ& z9~RejQ<|F(eaD#ybp&nxRWJM5p}+%Bk`_|Ty&ji(u#F5rs7QHw^mi#oP#j1fMdUU9 z)C|wxDUw`m5N_K?d`bc}Bh9-Y<_bgw6E#WQ$Dt5~pOqVN*C5 z-BYt8-&WXunmqpd`a}p%O6I+Kva0cFu{~#y?et}nKu}D}POF?yxGkO3%ihN9fuPg* z=3A7&TER7-H15I9;~`J8%b}n&jfePw*3w#gUDdCH(C^_qjXEhSLP5vSKE;>Cc(Sez zV!9{@x=bcNP+5`5)Prr9{L@k$psw@P!${iqSb<@%aXm{`HK0Zb;FJXWWOYTMj0IQC zB(67~);?bk*{E8MXd+(U`X(tX&$erS9tob#lNIY8S_H}4WNEuj_~j7y;1;^{L2{Xq z%9)au>zg?A3v5Ec%+S)70@ws28Bc0YuMd6Q3+mTA4gg?b(wY5q`SIhh7|TK(F#8@7 zZ>kNT&=L!#Gm+$oVry@C@5kX@a0c0vXNDoEx%bVd!l7%Bt3yJk8Z1%rK$+jON+bWl zwwNlQf}q?Ir04-WETm^>S!J)WSQ%kpZOZ{{Hl^E^?S_^T;{DkBX6SR(ew=%LDGdMs zbaOJNhHDWMbW~&gr!>KgM~c|Fet5lue4-TH!axrY|J645Mo{!8Z6Roo{UxO^wy_Uc zcfXE8A;?-D8N$ah6duwC9=R-XsK=*TRWYd5cCU3rd{g6#>vVia@`uIWgfT^YakE4@ zH)MRS%7fo{00lH`q4mq)om|cl@@bN@%;69J8nSSpdI%QDS5B{A3l&JFyZFFT5)lDO z=drC%E_FSOaYg@U=-b=dEd!hMc`8r{k|1ZZncWM()&XV;S|T&bS9-nXA>{-sQh>=2 zK5D2VG{XA41ubnsm5ZQUS|3ne11gCoQpA8kDGDkGo?NB`>r+iE|0vmQ9I%a-2mye# zN|!qqi%7+huo}f95er3!$?U&b#gyYfX17K8QN9X4wU6kGUYYVMQ3Up}OLFc6COV@t z`v;4$l3L2^o)4q{9qx{nC%E7Xpa=poW@^l{cRMg4A>sY~)PG;_>lyZ~v6s~B48L#@ zb9Wz0WNVnMZ_cI^gV~L5fzzJYWG>^HO#5Xcu?XA-ydZN$n%dnRwf>UsRavNRS?&!Q zi%;iwFGz@DI%{1VuiSiEb13DkgPe6EByVOTVw*1zk)AwhIGC7_EBbwT-;8Rk-7gDB z82Ex4jk7Ul`jiQzagc9VhQ{QIL93M8eLp`fj`opj$sWjn(iV6UwX|@!d_=_LSi|Fz zB7p%O<2&pbB`kDV?rY+CgDyymyT9nIaes?F1BZh;$@_s{Pq);fswAc`w=L7mJPGtXaf8SGVw zkKe$n11*6EJt5+9mI}O`PY(D05ui2Dx51#OLLiNQrji6bqFon%j`@8(0V$6VidkZh z3vyZo!jks`00~7<5v2m!Wnoveu9c8i<@BfV$UCP6?6jZrPB4#&k=17ziivWO8uYL>MsA$=o~Ot00g84qg#`SmR>nvxDa;S56^21 zTG-E1Nl1z)uJ>am>d}#q&!*J3| zv3J17hwkgTfcN?8^>Z4W@ao|^N=NB$17D6JRk%*UwP+f~1fcKSz(wrs1tOJ?3CI|# z2927rV@E?V60HX{D~spYhU}6gqi<0UVyXXTk}ET44zHPZr4_5#KDeBTHys0=z+e$z z`;9;&X*7W#_*3;^tn%jxJn)#~;V7bVs&7bmvNd!Td!w%?_#{Q{=e9N`)5Q+oZbDx^ z9I?>)Qn}bO-dg($KXeqiha4#Yt#ls`U1Gc*{#~Syk2I*KKLOp`KNjGFV{1zL8x&Mj zNVlbl_(OlhK{*h{3|>H>ERgk}tWGBoSBK7v3DE?{vX^L(r1qVo$GfQLt8M;=Y3=^brY&I@d*= zu_Gbi9zsL@jvFjo_#8ER6Ni22hQcm|8Yy0Kwgl=Esk&aMh8-ozKyR4@+AJlZcO2|h ziQ*a=lv&b;&L#)(lYFgKh#i?9V#tenj(QLUPz^2wD-D7Snqbq))ZeecdSMyzW>Z~4YCE{m>~$u!p}UFGr*NH1VHo$EXc<~e ziEWFVQvpXz^C%FspTyriAS}7Dx=7kBJ$cnE+0`s{-C@b1VFRo>Htj^{_1m_;7{7sl z;3ob1Ux4_X_xI8eeSw+c+D8(c7_m|Y3#yGQN4J}dT;c_`NcQ)X`7YX{d zQZK+zuonqzyN62plmS7^Xl<@n^4J~y%(dsgJ_j!f{p{yNwHn#}QLQknG%^an$}kIF z{0a-JxE*JF#{eGj3|{M(_J-~boo8Rp_Fd=T0k+f*JV~gEl-A8$yi^;JTvJ0!By~iYZ)ywTBcq7!$v;IA z4IpE#nIUNgk>qFFVUk|ZGL#OO-P)uO{Pd+zCIKUKyN%-d<3F3libl01xTj~}tF^HP zX^n4ctNpum4?@xYnG*=0|9lMB7;a)hIEu^3u{+mDQ#oI|MOtS<OK}kvBhXT?qozmUi-5|~TaNm3XeV+Nu%+Aive0O$t*iPbO-#X$sIu#!_jk0tE z_8Sr2<0{cFT$XTg(s<4nO_=ss-vb4cXz~c@F9+Dz-P4=r;|kQ~SH-EBCVL4zd0s|;ax7)p9(qb; za(L3Z4u&)wjiGx2TM~PFC}XOxG-^xaXb5NU<2xRbB7fGu%jgyiDOR|2DYmE!G{L`u z1;(QrrqBsctJ@H_!;*z;aoh^QEHqkp;~fvUzF~awb)Y_8ZC2;@nq|)>jNe~rCQkq4 zFIt&5r^w9pG4tFslrMfGFR!Y3 z^2K!Y5L#LU2nh*kAXOx!-@x?anjaFa1rt6AVNYR-OOn-*%;)#Dk!CZYtW`#Zxi#ES zCY6K_xViuG)lhm0L$+U_D;Am>gk4Xu!dD!t{AUL7t5`LER^fb!wM0sKFO25L-tnGL zcWw-EPw|Z!y+n3vU}LXqc#WK3?eF9ZvMWWW*HrJK5~DJBaS}g$;uuTUc&<(!WPZJ$ zZ;^~1wYj+X7(po0r#I4|!u7&_{p|B%FNfL{6Q)3Y&%%_J^VygJiE)emKrw1LvsZ+} z+N`dSY$Wu3iXFU9H+#10L7*m({`{P?4At+4AN9M-MeAToWAz{GN1yuAI${lmSIF_F zE-%Ab-IYI-Lre4%wT51)$laLjx;2GqF0e9a6%TfBY0HHzzOe*#hA1L;RF#EhRTmG9h+3_ASLdEd%UffxG>QK7L@-L z$(iM?!AM@({ zD<&>~6xWsB`QyD`#e?L#l=@h|e!V#H`VBNWXnDkTa+FeB=sO1V8CqI+eRggE?0-X+ zHYxxoEG~Y^_iMxBDVzV%FCs=0Q**nHFks^8^rex#Nx~9)58M{CNd+nYQUm=8;+Fj{ zF`qsgQ}$a|fR#XQ#Im%(pKn4tbboFwJ_Q|1!BhDkeO2|{lJBPX(SThPu)3mBGSuDn zj2e4|fa^-`kHVGMgyN46$Gk3UvN)w4*L)kOxGVp-p2D7dt;zHB#9=^9RPAd%!NGFy z*jPId5DzFF(PMxUfsee8s=L*uxkl4;eWS2C^Vvuo&d8=;r*8KrS6{Vw-;~q;`q^0> z`LXmfEU)CtdIsST@=JuFDjmk+jY_A-2Ss_zpITIOR^8ZC`X?)SSyMz5LT$~<=xY)w zPi_4Rl^8%BflLO0T)8&(53#tOZp2w#tp3-rS%Gnlw4;PkT` zc^b-uyE?FGSo2z4@!qi*0G(P^&qO$#p2UFLbV<~bw`G7Y<&p@3At$%wPN&OGfggya z5z!f{wNcr?iR(S3lS|FfuygXyCY56UI*lSlr)rE^otN$0t;sc%HF=;d3?4|H)yY z*{T|lzeb`9$bbBX<9!;318MdU$dhLVYu*n!`l|g9V-L+O^+@pC!nV`Pz{68++RQcJ z*!~dJSmQ4?7RNn1^~?50Ob(OJV5BzPp?eBq$C8igR8-i|Z?0aTHNAaLC8OR$wzhJ* zph7^0AhFJpBZ%izQQo4Fc2mP|n~I3bXlFM+UNQVT2<%toPA(OAXza%{MEgItZwn4A z!;Mj@g+|SC51}UCJUc=-!8AVo*2(Nw^{_}-t{RqDWk5K+&uAmaQbc0gKyYYOZ?)|!!I$?N|j@hUmY*;$Ni1Kt|3_IhRU5u4;VNJIN3IesJ4ytO8ND3FSLC`I`$ zhtkm_I+3ZxHxlgZWbYzg%Pp(PGI`~yH>|RK)E&;nV0+bo*Eo$HujthEw#|x=~?F8HR0VbUK4`D>@8t+p3Fp)T`X>ZSK5L*Ph-)(Orql>@IapYSDI}exAcW z68j$Iddw{DGWXR9~oy&|s?M2RUifjE*ZtuTrK!v7ibjm)b#a5F4Fn=YL& znkb6!6-VZjgDvzwGh;oE+OD?-i}^ambCWV6P(~8m1T(OA5J={w`BGx)pMeC+Ei0>v zzy)zWPphMiFiWeWg}b|q_17=e>!gQ;hW(p|kI%378WT`D1ey-c&UBy^r(>@Bf0qu> zgGE6|D>1IyCv((~Qw9n1|+k zq-@pM#_YpmL7d0F6E@O|B5ITRB{eN`%`}N_%19%!-%cO5yAos>d(rV!* zyBPX{)~FPt8;x>qD9d^FKP$HO$Gt=^mqFfQ!#m4tYMs};bfBOd+=V+PyFACPsskr5 zVqLaL(7w4}GDfOw{=-h8Xxwc~R`&QCq<--xS4N?^Gnu+!G~uD)pMXX!ULjASi!1pU z>)unUZH1)sJ{F~G2v>KZ_d5&gHkse6>ksOsYT;UmVH*dGiUT*{2XTY&nIaC*!2J|i z&m+@3G}b{lf;jVSR0Nd~es7O9Lj?v5ROfL>X0r4UPLCo3hf}B-s>%}uzEcIg?HZa> z_S5l(bh8nUhS<$yVYz4GQ1m}i87g6z1|hjv#NwWhEH{5h5%MW<@ zA#W8{%5PRvV%dKTu%6uDkvd(F&W-544vzokYGW_nSNf;BA%cl9)HmYbx_?`@@X~LG zkzpI|yDd@S=+@N6^fgWSlh>c1vXJ443pA=(R2tCErO%&={aPy88LumDeBN`0@?*;n z6K&3yfB3LwCFhHC_`*K8&)8%8L9x8TzmvlDM|3iiZ*y!1;n%U23=G?Jk5?kmK3(qC zbp^?kekL9Y;sQ+`>Tn6IYF-p3_#jY^bbODx2T{ z0z1+QS3PYw$h>{!OavXEG;N!Ci>@WZF@Qa7w&&y?o{Of*sL=XYjUdWyn2Ot z7jctvx3oI)nOH}KWh zMqm3mbjcGZVu>X)Ug8pTI99gV9j!m@3AOiKTC|#j**&oIZ#EYZ<@2Ze9dzbAB$%P$ zvLHJ`_~bni%*G3Ag2x4>ND{U{f)`)iWocQ@zc_KBOf82(vp(Hu>W(4pVKbY>L<*P0 z((@>5YE2c|D|a=-1EyB)H4?;YEX>3KOZOuzcYN;@O*{lyImp?rTjb>T6klMUlTB%1_;r7h9Ojrt;v>gMwo z)p!Yl``YI9$yYLVA0DI8PsVU!Yzl-Tb3kq#i<}&c--%Xz!^!O}_HKuUC9@0km^4Ar zD~`!T;bv9FDc)YKKKM7Gp)OSkIIT z#-LK_SZ5y=c3;Kq7w&$=BS3V}SS4He%6L?!ZbiHgKB=kM^;R*`z0T+gjz7cyVE_=( z6CmiHi5kw$Ms4wy-aTGvVAUt4DH(HVv49kUQjEz~+}{!ew?Pw$oF%?f z6?tFPGk?VYx%-ue0Ffs6 z`uZ;kW-AYkT{2Y~8g3(UZ~|3(dCg30qj7=Xfgri4J0W-06P977A4H@0(FBq8?L>e8 zVe!m*jOL4yd_Hrvw$ql1&4+V-srm zD!?xk;uaD)0G(!39%X z&Q#yg($UeC-!0-Ga&X;7Z4DfLjAMe@3xp)?Iq`Wv=ERQ*OFG&8Ryfb8JvoR*FSA`o z1C+rm0Wm{78~H)ouc5UypHDbGu;u=|fK(ZrOFSOTb7sf}UMl^mvm%`;@#jToD5H>J zwqk4~YT&%4bAF*HRBxwI^T-muuLRg{8( zEjV9Os2K1QKEOG+rE+&MNEOH6;)=!0je2c1K{@vcKt4Zr8O5_f7qsRcw!D8;DX1(Q zQqL*CS_mhf(uen4Kld?8H9@x|JdOOV>6R(MQE=yjSZ$9o3(nzE6To!sYy^k^7%;Pr zUvh9MB-*9K{>{&U9wYiE8pico*2I4NW)2Snk7z{B=Fj@Q+O3ku0U~m_H1jKNR7AsC zh+=uwx@q*3*0@S61T~xb)GGOig)7KJLA2yEiDU7gV`WbBhRnc-X?IIgLrj{9xi+8+ zDWHp3p1dfBi~jihb6T`sjw$TqPp$~5)E{x%3oNJUj;5TieFN|Wj19`3-Y-8sd}{A0 zNi;eb``&=*HjzX}%lFCctqi2}*M!xe!db?hk%>2lgmGQKiGcX!Vc5h4zC}2g8wMzC z0P&dA9aqN9v-iR7LN7a-hn}u&sUi8jq0@hjdW)2#tglZ}PO1pBWV2`VwL4ly7yga{HUxlFhdPWS(@CdNSh80C!|rfbf%QHzJzN)o-@3?& z-71$$BQ8~l0z?pGL;;snN7dZRnX`5rMPrRvC?+flh$Lu9#KH7H${n)c1Wd~W#)M(4 z0$;O9zJDt_h#XGaXNd^idA#C0imqCb@@$5yaq-Y<64%6Vx)RU zst=w(!p*FI7+wM^_P5^|I>7>d+_dLIFkt2OY)}#n5Z@;^{_gNq<*eofqJw_08*`

|w)oI5Au}3`q$+?NCih3#H>%YN{E8-aN^^Z`B98eMq;7BSO#A*HU?KApp(Ct5vc`+QYxUS~1{C3RVxtjvC3)a+2aN|kvB!Kx&x5EDJB3EJL;NF$B^3bAr4Yw)#x zXS6~!N*LTFR{2;!jPWVPbAT&s-YdE7bE14#lJ_!97ZURrPtKw}41ZxLSj?D%vC}!T;*37J>d{^h)kQ~pi=ugc6$uYVHadXF6(B-+_T{XY{okB&eQQ085~4z5 z`sDTvP{$}HfI`TIfK##eZ)R8)(QmljzxP#oUxnp2#)wMc2gTygu{-%Fm_cDXa5$-e} zvHHK~D64NE8RlrA9ws0HAS6bg?nlAkNF<%l%vxs( zWsFZF?o~^&WD=UD1iw-R0SMh@eEzjNnd=8^Hzg4~XTTa1fHhWp`a;q)Ix{-@H1p#(!>L4Fol8dJ&$RFcAxguD*k$B%D#EN3zLDFW-cM zHJO|#A|y&%f`p_*_vmytebj73eMz*m#{8#V;4pK)zxzMnX6J*UB#p$v2XF77mxGC~XUuv?>7sf)~ghgO_P1pXkxE$Ar`( z)%z`qIb1V)biNu3a=$xlyiOEpq(a{WVu!$jrRuf^G9%*lt|JwzXy0TAf=@{TU@6c>L7o#tLfIzSRG zGdWXzOzDOcUl!A!f}LJZ{Jr5Ev9jLUYvB-IPaA(kYI{kqi@tT5hx2 z1ks8(^RN}}P)|&a_`9k#qGK5Mmo_I-y%7o;$!|n7U->X>vg11V%-au{ZDCgky=;Rv zf!T0@**83NpVXxnWyJ2@61~_>ZxU?cA6Mx`!i0srG0=%KJ@g-!EAG2GPm7TPfqn#f zR@#jF9&-7X``Ahb+^ll|MwiBBJtb6DzhXaF&Bx^dwUCFLq~9l ziP|;GI_=Wlf9L?ZlfZk?0F@FmGvk5aE(&)ZSwIJsr4NEo)JmK28)K%%c!=S;njriU zyXu*8e>O~hY zH7|D4;G#9OK~)q67+i0Dsx_Mo{;t5>ekJVBvq+o zW_o72&pF+lNF@cyA8@#EARr(=q@~1EKtMo+fbVZ%pn%Vg3_aGs7YJt&X;m2D!w1GR z0tAE@L|RN()g$LJ*V9M!spEUc+5D&0crOYnaflEY1hWmPj43n*&GoLEmEO5)M@`N1 z`f^@ttCzjKH>W*T)si-bxNv1edjNKt1mqB=6mcLjs>ri%ZVva!%c%SGCqPZSG+5p^*p~b@;$e z2ZF;VFyleIZg=+@NB-ZBjTV0?D+`N@hjyj!8DSecy@2s~VAIlL!rR+>#_#k!V}e|$ zGnrjwEltX0?j5IkVl!g%r4kcL;9*9G*4)^i)VQ}Msi{a#?z;lQB!77x!|0cY(`O5& zK2@bV9(8+O>sLZ^9-s&z6+uOh494Ylc^rMlbEkU$$r!o7M&pFc+jSr>LXowma}xbg zGCJRo!#|L;XlmDML@|*@@Axv$-wq3$JNDfpxeq~H8?2G<9!}JYZ+}qcuMX=gTJ<{Z zz%?7UA=cYnM&MG7hK(CE0f!4Sp3b9XKE59=@q;HZ#x3(Izl^X3ts>Dn-rq{9b$erO zZyji9Y0E1rNVvE%`um0Ax#C3r=j%qmuN&W_cXwVD`N8I~dXdm``z2TjVAkq1B_&%- z-;LUewa8=MS!fF4D+?rvZ`c!bC zQu4&xo^a2XnQvapiw9(6TiMS@xwQ*4;DwHZI z1cM+|c*4n7>_s}g`Q4I63-3vlXgJJz-gK}K^=(k$F8g2qvE@@Ehg+EZaHDaJaKyVd z_iguz+rS9q75@+DKhv*i)`1+m5D5oJEC(m|(!yj!0-tzk#gxtm|0wA7oEXfTGKUO& z0{zvv3tHc4Sg|vRFgS{>pO_u~Gr6YYhZv^++l3Brv43+CL^kE)+rCsv8H)06_2ponU6Tg4S{`LS**J`Xzx{sj6l@h|L(u?c5fh@%~_!hdGG2L zE?L#69=#+8RdnDo*)LVn^azvG_xJ;-rbh)~BF2qSQ!6Ya)oXM^`WyxR^jpk`vC;QH zaE_q=A6M%YR6@e-oA>#Un}ryYa+YL0Mjwz=N!If1JB$B}BMyTCZV90;5`hz7uiE^H zKW;h9BnM;UyzHkEPt?}cmj!uBguL5$vRmK}+%M5Qz=U<(-4`^G$(sXSV&y+?cnyb( zPrUZ`Y2Nn~qV)9i(X^NE>E}->tLP|--%~HTj6P2zkc*}ECYuHPd@9;weE9p&vq7s9 z(W+`cla86K1|Jb$NG5(d`7utQT-W`%%DW`tBOgwNV~qhiiEw@3?H};xdqVg+!dfe@ zEC#h;6|ivsd*bssPF3A$LS|iOuuy~id+=p|%3v0oHP?~u#--zS3FAnm%^&(l__Kq* z6^Rv0n;Mg!_APh_%-fXK{F#8M-j_70g2nol0f=D865xKh?Un5Sy9#r9fBI%~_e_Kp z;lH5;jNl?oO{_@X5ult@Q;+(C``6rej_hxGMkh2FPqJ>RP1ll|-L}+oLYdw={VDnA z*Ubhktg6cdIHTXHdzwuNo8b+p<34-cMh{^8a^hmlHZPkMZrYB<(&^RJy58ZDVQf^@ zrnS2xbRYNyxYMS?<3BeSe2lR7f!>IqyuAFh`I()WIYBcymCZ1=(g}>oc}tZ(@px~OC;d0Jg(}>%KW;F>?`Cs`~yqcvE$hwx6h0PYfE*+NTp1*tsXxtQR|5-@~RD5 z|9<#)up_*N8&~bUB~(G*r+{J=?KCXY^Ls>8(bwHKB{N5ZC>Czb>mUPX%?nIHHt?=P z3q@>@x$jK1>9pM!7lPd4NgGcywAG&tKx?(TR3P_T+wW@NNg>B2`wQIOVgYIdK?8#iaFK+dL6*P6CW9g83;Ng;O|T=RCYDwuB^`vK zuCOw;kg-3O*w{G_yan*S@1ut+X%j1DP!mdZf-|4JeYOh3{i^~#l^ur#A1JqlNeJS2 zzmFd_doFU_tXQXCoMAj{_uz`v#iu|AOX@2!B3(>tOB)B)A+^we->bS@8$TIMV z!Vn};xZJHb+J|anzno%frCTCdTi=&{Ud_AsFPz$wXp`LL*#0oszSS$W2MC9oXj@l} ze~;*OYiX|zye$+(?(Qsa1$ACiUD4~GFtVYf{a&uqo2s#{dk~A$3y}oj2N40e(QXWq z*OFX|MJ|Y~{KpqkUIPBw0DEcIe}H_Wl(o_bd^P&HC|sVl%y#I6u=kGrIvJjHE_z{^cpolDl& zeDeE63}uja>GbZRt>Cq)Dn=DXM@i)JIxVeJ@AD*+Bj{g?Jl|(6cc#JM_Xh2n?$2jv zIclC!bYhqcNNkj}93*C(2GXr7zyBcGXs)NxD`@MZoC6dWd zhKQxHr?x%fVgCx6|J-)`#pTA6{<5?6uL5oKmIW^pok;MO>U<#XKVuuR;d*+HhKJ+| zh=c71EkR7eQ-k3K+`+IcgfPINFz^Rr|Gc8Nk=Xhy{@EQ`4+(&|;}eLEGP!iW9_6hs z3f6JEBpUYbh<$RY{yIfu-FKC;vMW3t7A$ArRjlDg?mLa+Xr412oL~a^&KQr8&X5-F znar;H3XQQxBpJt~q>>vv4T3@`A^;+W`s7|;yno}#lOv8scqmx53?iq;#MPob^?ITw zgQaaSU8sYs0h71LgDN577f3mO94XK=Y)&8Bn>N13TEs2R_}DwWW4Nj>G76m!%`Ok+ z%ve;UxOz#H3F6ye3k<~Q2Y%J&ZyFn39CNNY6N8V>53inDethKE+9UP+hXF4y-)NIR z>JXC-k-lsR#Opx;=u%?3!|S$susZal3;OmHXYq<)v;p=GFh&r*O_fl|1pUI&gD}n2 z>q1gKqw70w`(Rmuez|3M7ngOy{^6Xt~C%1wCw(hLNS(AFC!5|uy&$-nDpt)e2Lnf{E?&@CoZwJnAw_L&UWVuu}?o|81p=r#uM+V2l!?Wn9 z(nA0Ex+(RAg?v=P&(UQ~diX>CD&>r-jiYs#e6Axt$ntUB!t9#GJZ#2JOUSt`)4a+L zi@&1xOawaD;)MMPRhr1&u$dTtC#h|N%3T5XrK`Y0cr-583d=HE=VQrCm{poAXz&;% zH;#)L;H5^FGd~Q&m5DDg;r0$n8NTy*ImWwuknJ2YZgAKeguI{rb8z_z_IoDJWZ>W2 z#=u{)fOHbCJyxn>WOllmjSjrDzh3_Yd@{|5K2yC>)aQbehGnDXsWj?&Nn9{Fr@%HK zFIlkxSc0i%xv8wyX!-i` zw?L7Foy$bg6JzBb7*_>7*$|#g&}C|?LkJaD8fWkXXMdfzSL-h|kPJ%!;aob(v@>U+ zdC5}+ne5!g_c#V{F3@LrAipiA&>r7?wOb-NRHd9hz1DfVa~!|;${T$JqsKPrhwk1a z_RCwAi_`#?u1i*}4`>dmpNH58Ik{Q?j@`d`&Yv;(KS7wlp{%bZhF!DA#(0HQrrW@^ z_ydcg>pYn?a&kUB4WPl_Sh>_C>AQ z7$7Ats+%;`Xn34MO4E)9{88=xnt;X`-{0SRyk6C~?Ojxjtl(g9XR3a@T766~J#T0SKirIU6O!Ki9W3I0xkFT-h4_IFKfne^9wPsib|QF zD|g@JeCLF+Ik&unGI<==eP}{Ze6{x9yGo`X^pu|OdkdS);C0B1M={Pb=+E`F`|04@ABRBS`14hb@CSv{+F zYvT-mGjTAw7u3h~lV47=o3O8*T3McCV(dpY_4LefhhANB!oyX9s<(>-1?iS#-ZWSo zF$7Ej9)fjk-}S@y=l)6#Q{8ai2Wdr=2x>hAZQSZ=J4&wQ6-qyfl(;ygeRof2TiZ?X zCcenyCZ1GO-rU({l(7FLzm61Ft~A`xgxV#8t&qGS49fV!Rf$>BT*R8?Fp!#zkH%mA zGH_fL2U~^djzi8qiW{|D57O_ijqm+`ug;Q}N>uS6al}BT zyV_{WTW7zvtpMl-1M8AACX}O%H)r--x!~K5=C~coEWD3qyV_CkbtK%AhG+KT#l1== zlr7so6i%-hiHY#ipn8T^`o{m3rA&L05laABFX7YuGtpJ;NUZA+B^(NV7Mlg}CIp?{Lh*L0%)Ysc z-(^!ZWqoj3kr1pKxe&ULhcYw{tQ?EW7Ane*543gX>H5Jb`)PT_FhV`3Tr0ARVw^Ec zx<9zHK=o#A`Su}$?;Og4-hMOddr6obyO5TWBO#uynzss1aj0P5 zcxH4I>bb5N?VrtGES-f-sNz!?e$vW31PqlF>hE$2d%4L+Hm@Hmx~Y7L-q-C`VpB|a zFuTk^6{7y>^Q!x4TD?)`JVL8`nqd&S5GQEm{d=M`W@c+X)r^`205GbkBVl$!b&`d5 z5@)G2Hqy-4dGgm~NMwBXl?ZlNFl}!}R*2i)IA8 z&FxW@&ZBo5_Z!MauU3n%L*h)4cLAG9qE{vK|5@YL8e|r2)YWK5QHdp6;YXd6TI9%{ z9irOJz!g{Zzaycj%ID6vQrL!6WSqQ^wGF%`ck~0y8qq(ge-j5;FMZB;G?|@w+v>Fb zu3xMmY!Cy_L^xuhs&Nedc<8!O4Xo=MJ zSHf0hAK)-5h6)74d2kr*Bgm_PgCmuVHtQNk1+Y!|LIO1t{akwdtDC_ZE$%dEvZrbI^`QZ zq3^QrlD6=bn#7IGSy_Xu0H`*1m!mYytbcHq^*+Y4-2!;UPp3Zyg^Q{VqffG%JblAt z0gNJeT#I_|o*MJ2S~6!1F4fTPi4Hu;|B)A{<$Jx0!$S9LwscrA{Y(z5VLcQx+xi8& ze0o~Me^Hh_PTY&>2fp{%(Q2t|VU$4Cu6a|y^1G8)GVn!m#7IhE1SkP{%!2`$GP*a4r09_C)uW_L!5{%g%OZ*C$QGJgOBLink<)J$2MZ zrF1iV->?CMcocFiOH40Rwb#JPjM|)-GFor{Q5#yfp;}q;Nf@fEb(OE5wEQxsZXb2( z(u)4nxf-1=D)%$YF7jMpK}^=t7VPs`B;}I+ThzD zEBeiQ03>T!CwV9k2nA2xp=o`b)!9FJ?amsS0F{ke=Ja!CEw)2~(H9?%UlUOgs!NE; zt599u^Rc)@diy>#?7HO=a2v#M$$zqCLZTGX1+k6B7v zQ9C+gD$K;`TR(N49C>Prt%#R5g?LlC^Z85hEWY#^E$iG->j^h9=E}J$uV1;1ny@-u zZTSnZ29pk;GmlM-UK_2oy3CjICF1zOxP)|Rd~mUl{KqRa{Df4BhDgEZ)W|_ciM+6C66su;Qgxj~XWZ90o(*CP-j&hq92oKF^#=>f%GSa45dzIL4ch`L)pO@-P#I=BJP;nP zHeCE_o7_5uZEE8zO^}+Gh1XI%DO^b2sEpL5zS>f+IngEWx#2x2@VA6r6F}I44rihC zi@5d#>~4mZGEHFt8A(XjiJePmNyDGCb5x+zM8ou%_Ad-hh^=(-RMsqv(xsulCYafF zQgmllTgA5ZQ?XfPcmREnd{^q31UvNF-r}+BHE0yFbxs&y&Pci%J6NV!!=}q4d6Y?( zV!$INJ4ca4`p@!5U4UW2PxM}IU9n%nVmi4s9oy|Sgo(}!wp_F#%`T5_BJ`0T0*KshH;fSJKT?&g+|We)=9w{(3rq6x_ZwpU+6dp^5)L+Wa&)8`Lxbb0P@ zT1*S*Q+EB(G8M2r=uuiBG&UzQ5ZCv zHfs?Ny112|Ho(U81b1_Ir}c7NIb6a(|GcK+>m35E6Dy17EAv%W72^(n|Man4d#7l$ zaf^!IF&*5`Zw0Hl6OkB|SmtqJi1F-eaYfOzJ?eVVzf7X--6$+@q1&i3jUjBySRuJ#48bN%c=5yz!44N_#Mt{{F^pxD8v!c-4z^UjzMJWr-`1rbK8EfMCQ z{|j1?Q2c!qoYk^}MY8w|=HF)eV=nuTyEXAlDw|rGO1(XA+8geEZExHlIMKs}e`jK> z`{wp_yE0S2`ev+P?|Z>U$jrRv%t)QPvfmkU`XN6vUWNr~;mPH?n`CWF%2}w>zfyIQ zeu#DWT>V`yx^lfaYFm-=wV-G3ZOQk;R$d(74PJYRb!6 z2(z@BcXjx3$SwcI3;F577+4M7Ix`kFf6?Yzl9W&AZp5KETOr3^mBaU9XN~Kn&lQ zQ>owrz7e6OHLogA)Yw*~RmAv=%R70gR}L4C{&CCPix%FcjrzBDP?k>hlf|W-p7yyM zW!&_7k7q7BorAL~{tv;gp>mo?XNip)y75if$4POqV%<>s30*z_XmpV2*KHRTPYx?B zYq_DgbXtCWYu)42ARi3aRptymsvQQKu_)wQFY2~rQ5h&+S=-kv;4=O9o6 zcYWqmJ<22hy{s0ZkY&{d746K^k*yOeJ5Ah_H78D=RnNy|-NhRUceeax+br4^4 zXLEDtCw@YxYfClJd+@bbT0xjXs6%-;LJKGp>F_m$UUdC*(h#RCsv<4i3gVvEn}|i4 zo}w@6J6VV}?zAPE@YHTO9k-;|y^jc*1u(s`)FG+-(0dg5qpHL6vr}P)00WE*|JZI3 z3(Mg-dn!fss>Ic-#lbcBtjCfY-oRjnNWq0P1n(l1B$rDAc9TK+5FqN+GhcyGqNTg; z(!56+FsnbyagkK$ouxdlL4t2fTJ9=T$24uS8N{C9^AQ3t^B2{XM~vTemTU`7lV}D( zOz*(MVihq;xCurqk{Cd5KRk2$TjI^bjc=B`v>kPdZ&O z7!T&Hhu>KwiobCS2sG8cSdQ^%0Y|?C&zBGqQ78hm-(QjX0RI?$YV9N{m0bX=_X>T& zw%Q6iHLY+s0*#S_+GykpoO}2ctJT71H5_(aEFRv$+F7H0fC|33%@z_|V}xk+{-9+yph#QI~bvD=g&IL@P-xZl5I`5YGD{s0C{ zimHh6d5`}Ki!G@^{5o7Z_ob^B7tt2-1plWNplZooC2Ynlv3gU(-IHyWT9l(+w6$v( z9EGgs$(@cAZgXvNFLC$FP14^P)SE|f18viWIl=islw7xMyrze-OEmg14PQ{|zsoh% z`*)kI_Fa1-&&iLC$7TxdWySjZb zrsqQFMPVVn#|M3(KRwDz3U<`U{8|ku(Cpg7XQf%gO+P=yCn{>jrc5_KQbVXp)*%}hZmj=wzLzqR^=z@wLn>Jd zejnF@OC6wY{d6D7>@3uEn*W|GX=VzY*htS2K;CZ~g>%moYYLtiKfgfG;ohmvwf#8p zqg%l978t?lQEO9H^Q5GWYb-}Lrq|akX+>3a_;Z>DW$akoS4{ga0#gWElhM%qBv6Xt zUu4w5{QU;3qK+Uv7`c3ENeWP-sA$drq~hJeM>j?r0Ph2mo#sxRCo%IRgag;q*6gpu z8UL8B_sEH>^DVN||wJ|A4A0-Fb>teD-gvx#rA`?t3zH)55Gr5OfcAb{-Y;UNq zSJ!-&Od(n98HsGr2Zii0I`w}UM9P`0AK>GSg5(q4anG*ej7S2!_V5^;IoW`&$mx8L zs60D;qt7sucSJF5Pd+mt#!4*oZ&6765EV6gM@eW{_dyC2ewnN24>|Wb7#Si@$D5sV z&w|R6p(o3Mcp%%dCy$(br+^7+(3;3-cpC+2UQAQ*76|VwbPnXDhSVXB>eMA1|Z&@^qj!`bh4^M4>r3LqNKW3UF*stVJTLYRNx6qap%$mM!#Zr+0 zGJ!(fTe3`=RHTINulGW_diq~27fi+7FJ;2+{!dd_IaH^@qoBXG_BKcG@N>JL_E%G> zc_jT>A{-S1lcph5`@$>P9k)1~DU;K-L@zhvD9nN*fmgEgBN^SVwIdg>1oXdlFB_Y! z)S*;_opl;kjQo3P?!Fq%oMA)#B(YIBlYx;2p$IqsNT)^!YRzE*KB!WYiW;j18Vri_ zHf%v{oO_W?5pSb%j5#~d;QmZcd6wl`XCv8?+MWgJV5>oP2p~$#!s!al_|x4V7Ju>o zh+S@`X2eS1D&QM)i||23wTkuZ9)V;gEgBIzkzYZ}J%v2v98I#t0$D^x$%0DdNF|$mzz(4`1N6T_hAKFZ6`+Od1TD*B;oBvsGYkc#eN& zJH0;B=l7z1-Sa*z>?@b9oB97si47Ykc8_Ae%xJjJ{7V_H5XkY~sPx5KpVitjHvgQf zPSz9UX^J8wHcuANe1xv`QwbYNeU}fg51u(# zc}+IR07If(T?x#Vl*`^h-?TnMzh)c8$?cWI-+J=4&s^8F=9OMWTY3L(I~SWFNHq1| zdUG?xkz( z?E!;T$k?|G)nVkPWfO5*isA3_VX(>G2OJ-fLK>+ZMALTrTrZ#eS)F})J;~qfFB%7{ z=on@aIw#QY*-EJEw@iJj)-M`F$g38>jGL>O@)8Mw;WiO4BXzZ4W!#R};ODE6DYQO= zw`Sw*$1fhkYWtcjNkxftF3{5(Xa#7di6xlIGxQi&(}Uu{-=fn{dixA|1fzhP}{jutqq z>*|`4d95dQ2&TQmJ~Njt&EDsu3ov2kW=J{+B>Tyx+}@qH#A2RA$)TOU6?gjCcwAvo z#+`X1AD?Rr286KDK`(8t|4N|p-_p_dgB1*Zk0yu}ZS?(WD z>t%z7kNW~_%_J}21jcn(L(rhAODy5TlrD~)8%PzETgHo=<(5tS>6&UKlZM#MpMpRp zaw*1>S|(Oc#^wm5!Itrl0uBc%evh{=&;q|q`CIBfY=TDaAIg6T!Ze0DcC18KEl@EQ??y3PNToW%TZ zj4b&RiEmrD0LT-d zTnKS6U|91|#>WhM=0W^kEry`2WYqqDs%Gx3%B%G+Nn2f-uVRYBk2CrJU3<7<>V zAs3rUsNw<8n*!-aNQQ8GQ&EHj^pcP>mK{z6T?H#03-;(R`w#n#oi|oAaw(tW>H+mRlUVw3$s9$Y^XgE3aL9rf)mr|oZ8;k9Pah}wx{#$L>XyDiCZ68NdDQfLa!HWD|^aIiAv?2Ay>mV9Fwds&t*K=fA{!BWs2j z!_4;szvzGXm2l?{m?+=3)8^O*?(}{E|KJ;5%vf(9EQPj2Cl3fkM~O3h9j`VrtJ{EG zhjM@@LcDh3wu(|A#i-Yn=$zS|$6M_pB^qF?xr9wcwK4iUCOJg2%!H8aV?Ssese!ts zS)n$7E=+P3N~jTlim9?w;2eQ*Ws_$^w0VBl5mpF~(Vhxn4E z!W3*p$A6c$K9k3`U=f2Hia)Ud^g?hXPymh=WDrz9u_}bUB_7N@?S1seR)m}Q%Jofp z>&^6j+03{1)H2lX?(B7;Cum^Vs-=~nHwh5!r4WAQe7?H@3)#vSKIMIdXpj>xu-I5C z7T&Ls-WoZ4vt<2sR**0VwuQa+ehrSY?3GGxZpXM#Q}d@OxZcx{s0W9zF@hW&f;h=^ zqRIOwuXabKk#u}I%CNe@t5n#A{UY`?ZqSLI*EC4+v>g+k;+R-u`+%wrE;pzRJ5778 zD>(k5T+?j{f-OY^{o|IS!t3haC#J~*oUuK;|J|E+q?YGN1TN}f%rRv+{hH8Sg(zR! zyDcygwP8dlg-8nHglrjuExFiU5quBO*2*sF4FfvRT_Ozl2x6(F^qafGQk}QWPQP-? zm+S9OS*C~4Z$DVqX;jMXXF&b=^v_kGVhrJqVAm3cIvjIAoEGC$fpZ3*`;L!5&k4)&n7XB3hY-O(@vxg-fPCSSoc3PU(KqbwuMxPT&D-9W z%Ecoo$@}SxHF*A@=gidL9KO)J8@NY+KG+^gXO+tlZvyRpyLrt(&&beR)}FF9Z{!AE z(^Q93pIBsX_?r+-ZvQEpN6gFrbyjb){rPRc!z)-M+}*FCBbLs*Y!3r@b?vSw2q>V) zL<@u`2y^tc&{g4*(CZmFTXmHP78d846b84PUJA(0tkDmzMN}IQg{Yk}ve-Z(j*+wT zaGVr8Yzn5iH%Vl_XG^@FS!BWI2AK#}BYVto1}t!Hif<={t(B!*;z$s-b9fNYs?q`E7l#4JehEbuMk)UN>#8>+)(lLrl1yD-_-KD7nL_JRWPjd|0YqP}%MLKmi}=^$)G^591NuCB=mj=Mj^^Om|lTNl#4 zPm&e88rge}(m*~Wk`hXx^F7*JJT1ZIWJHMMGWOS6Sk6 zhavC^i)p`RDsqj>1S5Y}WE!Nw$fgJ({!_KT}8{4y!ew zjZ7>0GQLXN(7RB5KM&S6-Aiz}$_5d$)iQpESl#d5V5kQx_DTgz3pWR@Xiwavk#o?( zaj$Of*zwrNO8R8DmZmD@zI%^7`x1(18a)0WHra+V*ZaHAiEU|SE7X;>-C4M4gavfS zh&RQ+#tmSp+@xgL15TeMgL+5oznr4xrKNS>_e42aTN?R-P=sk07)~_1#+iGia6xxvJm$yP=yNP@^`{v{XKSsIAryRao2zzH0jhr z2h7B`AX``_1#yJ*^W&>Bd`sea^Rqw)|7c`TbX!fOHvm-ks7t!&K>_chneD-G9XT^& zgI;~nf5KSrcbwl38h7a2UhkDU{l8^6-_q8;kR*{!pw#1=(eygNIt#MY*5$VX*Z>47 zV|nBYWbtrfuYyZUH<#=idRrLySOdp4*#Uo5LAjcGDM(we3MPq(+K+iG@2A`gjFGrVX)y3tjPOOFoxL z{O8wR4#pXpa$9wE8a|5QDYYeKb_69Rj4@Lq?@$dy60Z1kzF!z5NbAQy(3(U!R3EatdliAF3+CC?!B zP7PG4(wyX(1qNbkCEgt%xG6 zBv4JI&0c!JlO{z2ID{(mEhFMAO+DmE;AV|29seQaGcyX8y73W(?DO#hNB}RyM*Icd zihlgsns8pgZ6Y2)t=kJ&7|I@{CIbC4>bqlWkAOGLmUhU+*(E72wEQ%< zh3P6SZxBVUR!A(z#7z!{d4||xx5y>v^6LS1XH}6Ncm!jDwr`-icSX8jp_Wygpz2?c zi5O%C+-0vRB86oBFixPfshYkGXC@#?$rCC3~oq!1m!;q4h8 z0|k98X0TjpZ&*pB@)gW$e;6JwaCu#V7@=>wYMGtog%V@X5g6pVG5&pN`?svdLT)mo zK=&kn&(YsYx?0)?G^aUoZ^CItq#ROK;Vk49bK@=xuvI8qZO(i1OKzRb^71>`hD-QM!YR9%YW8z zJ+%Y&ETQ0|kJagWrw`h|1M!@6yB(VAD;3R~7ghuOatsX0BP>1@WO1jT3ajNQ8p$H&^xc+&k&h9WSwcDn?f1&#O zzJ_}I@3riX4a9oZ20Q6jO%~M_YJ5GLjyO7g{~@o}#U^x=z-qzGUKx-J15O1SY{pUD znOv1le_anwrr><|pnV*2GO18vZ6)8MP&Mq4o7$uj zqKIl#H+^&_^|YSdhb<}8)r&r!ZQ35h`pi=-`+(}k4yN~$U2h{j+9~8nWIYA8zEE@f zI)n7$WJAf!Y8Hb>D3m8eJsOZbU;XxCzq78XDFx~X4?i&Yz7I``WIjM*W(3|Zn|%3c z*w|9&lF&LF0K^^QM*xY~QNiD&GR|lvqt6F;9GFafEZD^Y7Z(X8Y~H`L6NHl$Y0e?w z5r){~us_HX;aG{vRSolkRIg%j>4Wq3J!~1^!kDVdCt~(<;Bexq4AqT%shYqazmvB= z{Lw?znIfB#!N%kg#tFekCuzAWB-)oCpc0-v_8!FX4p1?XS=`t1`99}FfC^+Nv|wTF zE<$peJ+X%|DkT%sc{Kdk)|1Av0_@3&pijuE=7~ZqS)QN4XEK%Iak}DXgy%8bKh_17 zOgXXQ(lv&G`^zCs?eLX$@z{g}^tldC4@UdLJ$qCUw?1i?7Ei4(|MKU@G`GX`N-5f! z+-L)TX4ooapzhJBM)|wfzI3;1o7C_i+LHP%bQME&aP-HtNgP$hX_bWC;v_88*o5(IUyjo7y~I*TD*6JCbkv2 z(0^-FcEssNIHA+Mh>P4CMjN;T}6^+~*+fWBHt6e?K#2OY{H+h+&9fP<*bb;vaHP)u;X5Fvl># z4$9ED{Aia>8q25od8)-`ndqZfdgn;nYRZ-$3E#q{+eiK_n8UP|6w$Lr^@mj@h?_+l zgjs$e^Vpq7$gC5=HA9sGyEjp}{C|6!(ab#ZtB#WKYAVeq|mll2Hv{$KOJb(lXa zJ1y~oll5%Nzf!#?xBJ;hJ!?&*IvD2P_gNJk{RHw+%rU3c zfi$~p#UGMI9IJB}qDkQQO;rAqCMyQw+oN@46F-5{G_!y$e@jOhHE&{^aSP(e&~s!0 z!1SYXpU>{ra#-Dn)Qro#GDOk9MXR$_4I1ry}u|fPNUe zk-VKq;Eh?ZeNTq=*=Ar~(;jQ!ZP0lUJqN!s{EFSrNI4`fJL)lV{$YSn0+XVj@Q!4o zS*d$ubgGZLF80To4s{~vMr#Efu0;9 zrg+G6Oct;4&*&P)mtnfNJ+4n~RL($k-=G(#FfEEbrt3xa>l1C zn@9jpp)>X|SHe??8+^3(6A?N*tuj7^lQrQ#l0;HU`}|=f?F^gAQ|2oQJ|X_6(;j>x z4Z()+*0MjpQtt^FSGU#nI{-`nlQ(dsnu3{QPC%s&hzQzTla#B~5kH>wwI7;7svgV7 zpR%7CYqFgLq%@%Ob?4^&^rhJg@A^y30fF!jCla`gG0iKIs(@l#@e*lJx$2Hst(T9g zE{&6)!2TTO)c;Ep8gi2A;Kg==S2EFdLOmGzSZz3BFl`b99;$sT0nA|G zLO_+`-4DDAC)rtIX==>O%H;PuS{18kmteY&K*%#$$ft1qat-3&W>cMYLa^-GVJ?s{ zv~t*$4(5#CEZc!b*ZO-2MZog06m+NO1x{wKcV?>* zD6qo6MhWEJH8B<=9ufuw=!Q1f>Z^2n0y#y|2ku} zQuc%Yc&||G8Rokj%@@t^&aM#C?P(cw8bfxz?oS{Lc>azI8Ia<{0^Mp0nlOKEK@128 zuI_*T3!qUt4hR)TaXxyA6U0vtALyk^Fk{Ixl|cgcm!lk$^zn3b{f!&x>AAvBG|W0lxF|H~rlo!boG4x5psZ8Z^ypRUp#Smut6(|oH2FCd0 zum|GRri65p%ot!C5HdnqprVly{yUWgTHNsRDrXIJ_XsOsz_RfC&~M!wH)JBSLI@j~ zV>l0G)U=ok?i^B$?@y&r^3_E>hMV?YN|aGA(P3KwBU^;;;6x@I4$Y9{~LFoG7^U#ZV;C4RzymqB&Azm=>|cNmTr)4knZl1 zR4Ga6{x0wP{=R?ro}GJU<~eoeIYZP#vZazFM`9*04i}Z{yOIfMDCo~2`Lh|x9`$q3 z!+h2`%F!p!jbP_d#Zq|#ks;c7p%G{&|Cw2-?SINnki0gWl7bFp7+RY&F#@pzTE<#k5(!6_q} zAp3aZOFcRAhkDV*H(%o~@3?=sQ_eViveR>?qsFRJJO)a<=*-r{MYcD;NQlwH&yyo( z-qo__$Lu^^g!K++xSrW4p!95InjUl7GjC7FKcuKK0de#fiAX@gXglX$1_DuQCY={+ zVa}y*6LrRT!im*Wb*tC;2?ct-U@0!Ow71jPAqJ}E&ioVq($uc|ll}EO%Vu~DyP?5@ z_-4}KnLt6igsg8p+?tI_iZ^zgpVl{D2uL_{B5JwsqHg;2^F4g)_JIShcz`FdvCG-c zpC7+P?;{)a@Vi-6|3^UD&pb|oE`STiL%XYshy4-dJ8yWDI)RkeXE{xB!dWckI)>mk zPtdfrR5^{8eXU-O)c(TsD<~Z8EKv(j-c#mt5{&A^;M}U8siQ5MMeb5id!P(Wik83o z?5vUB_|&wDJpXHFXMkwtOH-m-3c&}A6YQvdE_VF&s_H~bzX-aK>);qlXAfcikAg7+ znARtfxK1c5pB;nmUYB-4Q7YNT*mI~Fq?_rqg|RSH6Df`wO0%hSq_nwzmlS)XaK_On zhG3<#P9yW}+nH1&IWY|wm$Pe|(A5xg`>f4eheoTH4FKQkmxd5uWl5+HCN3QgFSBa+ z$(^0PytkXF`02AC4^$JfyyZxcV6;Mx3=Oq4yi31klBYpo!2K=BO|lB%K?Ix>ue_oy z9T0kov@iZR>BkV|-qL9X4t1hyWksQfQ{-<9LS+vtxw_{vnIfzl)9I$2d5QA#A{A4< z@eNCET9D%CZR+4X=)R#vNk`q4IJdhCAi!DgEoYSMd%-+wR7R-{M1!HHEh93{Z9b>H z3QGER0TJ5l*9z<&-lS_Q_w5&Ur(r|;H-0>B_7HQH)2M-JT zZ;HnoTQ!zw4}TUqZa5r{L}8;BS3FFXf$hzCzkl@v_x%lP8?pd65^vu=$#^XbnVK{z zCA&1dBeuVI0XkF7&9JA*HDrj&-_`Hs&N49xRnmh!%4A{ub~b+-%~T!1+8Doyf_z6r&k^56CO7K#$o zSw#YauXmjDK3$Eg_kV8=13rWL3}6-%gq&IfT77wDZah;R&W9_tzS}s3YvnIf; z6*e(g8|uW5CwvdXj$oi3XnL{8qZo|_M*7b+6I(u6c;1H3)@$5<>nLuiJh1U755&u!mr`H%?Ao65B{O?@v}6pD)Sc zTVETjzr$SY*)%M8KRzl0p2O_&lKAMPz~w&-l_qOs$xr9+0T939F-3xGTnMdgb*w!O zat4Bcwna_?DInqbAn60NJ^F{Ps2&=b0<7Kwy7sxy1a^^NZln`SlcQ5bx#MlBng}Wy zwKKW5^YhJpsHRas47vJ1tD5Oa4KyN=*Vnh}SN<5*NtG?)q-Ah&Z$&Az_j-3WyDH># zcIyT}wAf4*oo11&?8m7@z?<*%CI<|l$hd>^s{(7>t!-TVe+g;SiNX}bc5MXr@H;-(rdbX#t_cJFlVXuNdve7|hl(TKCmg+zI9 zEWc_fjNH1!R&|pZ_P<{h(`zt~XiXMnC3QkTJK2oQy#H74ahlc!4^J%nY>`?+u;-39 zyCy3W(ZJ=Yw1#-)fe)H8kZ83~U@P-9Nl?RTt?`qm^PUpJH5Ylg<0ZKHSN+~zDm%M; zPZiqg{>s1?IC(a+#`_;VgI33K3DG-EOuQrqo+Wt;;?uEg@~Y2E#$$nlvOe9CPCQzO zg+{OhGenJ3FH=RX#Xz6ig#yp*GbElc?5#O+GkrgRAr-;u9ecQ@Pi*QR@VW-8aq4$w zvFbL$jcq45knjkV8y?nH&!(GOr*c#jQ#zbxk1hh}rwyFwf;M`WWb@hUI^G!Ama$B{ z{2g)L5{}0P2i@V^2ay`q8_a{AySa}jpiN$mXc+azaBO%u}FU_ zx?R*wp>f5C?!>Z={ut2>AF=HvD`EHSNzA4bIw~uB<9%~Fv^`$&%lP{*qlPe#nOvtw zbG(Ur0*~n0mrwq!5Eq;PWv7>ow^1iRAB0!pP;N=S^9$-eNp;67ACXkLXl9pY8mm&6 zG3@Fq_cau6kZJ1kSfWceD(Kyn`y=ky|6Xbd8JR*PRHCjC-@r{0ch=OESQvY(MXYE! z3~LFQOW#?~%eUI3{^hg`@7j7O0iXtY$vQ2o*Hq`X9yD0BK8r+6QBZPj-1(Zze@PK9 ztvNYOdogJ`pBsMm>pfWb)?qGPb*?~#l^$ovHo(QQm;ajrHm6X%y<=f_y%X$ z&1*^OwMXiBlLcyZ3ubHPbPg?By|rx(R#$5(ev1Cpy=*WT5VwtpFHwrbVBUwyw(;@7 zquWL;EPqOJPH=O1cxqW5W%~GMxrkEIo|^7_@;W;6^~-uec!^1J{VqA^-B1$xeKS2O z!W80l66+V?b4$1Vd8D#98$6Pv2)u z;ofoW10u!FPGBh3W~F~LXcFm7=6r#;ZRAWb>58{mpb3d3cwxJ=o-T<+j+R(2}ug(msUWK@Jk*yVD%`RcBBkQ(djKgXw@i0@IeO7@7Tmyl^d z&=~o)rp?!JkaF=havm1aghdaV@3TFwmwIoYHNFi~nIABg_N)3>{V=gSLyg4X`ZT*Q zhz^RDA#c+oC-F|hBQzAw1%44;ME+IxP~#H27B_pvFVKz;`}(YM(_Tztb)yy|G;lLQ zbf_(sXC$oppVfk`vmwM^9dcq902~brTp(X%n^oPcp1~$*#rUBy&!a|D1f2vkV5znB z?^u3=b*|`!&iNvMi(M|GdB~zX<`6l}*~8=pai)q{%-}$QQ8eBSga8_F^1N_x*m|eH#(iHX1|g>W zE1a;w718~tyFO)VO%KyW2fOK3Kf~b>-B1N_nGLx6jS~AlMyW!J=>CVP*^WcB>;ijD z=RlzH0h+BM5~w(r9|Q;Hs=1PjSE$yR{oV;JDl&-m6{4GKhTXt4Cke4*!TKlo=NvrF zZ^}D`S3}KL8{blAR;!7aBJzCVuqK)h0Kkm@hW7mxN_Q0OOdy)P2lq zu+(c7bk!S$_r>C{b+rAp`sjRrMH@utsD)e{hzj1PDW1J2h6AswXTm_k$@%=3e%#ES z%&1glMoq2qTuT`J;T#(! ze|{VgcZRERn38TZjAP@Ch^k~9`CEneBSoAP$;#)exn#7+NEy9Z?qK;i_}FsfZQuiJ z5*BP_`pNHt39reK!;(KKGjQ)Wo}trU_5pi)(E9nl$H%Tp2bG?)3GtX5nF6P2I7Hrw z4HnvJly>;%dWAs-iFi#NPgtlu>Nqp9K!rH!CPkJ@%MOI_&E2|ejx|jw^s^u^pHm^V zzR!ycaW%iTCgk*5O;7~d!NIxfXWOGKB&8cBC0QGcvyt! zfL7Oz-@dU?8?t;ukgcxR8c$nq@?muvwi?8V@4oSAYaqEPANWzzO2MicFJa(t*Rvf6 z%-mfctehUqi15#lcWQ!KHa{kRO;C?IdAS->&*SFX(@3o|!$!aiLUwFa5eqXpXkwYg z86nhlpCvw!aoxw}G_xN)QAC206zrLk|uQ`6by2G8}BlzwwM&giJh3{-zz0R;#4Q0Udy8Tlr@)Q6m98 zaPIu~{0zuD8#_Z2@)W5x)%LwprNN7s!3Wcz%9&gUmSIXATx@-#I_*Q24>QNtG-Fa3 z@S+Ov_(+t4cL)gu*f_j51$6(?syXkP$CA8f5B#V{w$%o<4nhe1cta7YaM6|v#EQVd zM{t__urob_;3My37V6fqP?QJsI_f)OHtHV)xMMz=zl#_@VI!MR&9X$c~|lpQU>Z4vzwRitY~sdq&t@pAom+OmQYd+BDrz3TFm}80e*13`%M%qM*w9u5{x;m6(6W?Gn6W@I54WmdyyJZw{ zb5w?t(2zGQ{*7NAF5aF}y{|4^u_fO0Z)rtI%G_(?;)tKUzzDJ9P9DlVu)`uF42?PV z$8rtLj#3}7q0jt^27r62M2JQ{8K<6U`qazCO{CPLJ?4ewdMto5giXi-tbj9cJVI-wI7fgPoxV2|_aOAw)OgJ(8EJTiAWY(-E&bOr+6Qiq#~&I5 z;ZK{qbq6$5>ApfGeuHw6&92xf$Qeq%)&(PKp7Ge_k|*9Xm&15{>u5 z`ExAVH2P9)dZUe(m5BB#u-6Y%fRB$K_*x~aQ^vYlxYmpyjqL)BOcr2h!dcX> z5C8`PhRwx0@RXm6m4DiA%>Vv^6Yvrd8y}NV5=jDI0*{Rb3>A$u&QS^B_}#0V*f1VZ zj-48M(F+s>k>AmeWmir{Daiisp6CSHWjkPCW}e4~O@+nlM}I@<&+YjA`Q|j@T03}H z0qPo!`%CtM88=(hgDrFvl@6W}X~wzh*`P$4Blo@R0D!MjD%1DD9~s1;>aQx8=VDhr z=2{Bs;Vbl_c-qt-EnaWOcKJveC&1<``$=0mRuiO5NZVTX=M#NtoL|iLu=d;Cx)joZ z6+MHp5}dI+NxAWZmE8pA?iYX{6cAjslu>&$hF&0pDFa7i1~VNXiBkND#HJ^y$0xJ& zF2EG8v4DxwnsA6Ju*pI&A=CZQ{bx%q@r$lx7jj;)c+L4GE_ghmh`^3c7E5vtO^Iy3Eawp4;F-5< zT$;2g?MbCfKe6)0H(o!%524-^vO3NBi=69L+qlUPt zU6@2;ybU|5rWVK}q^&hUC^Ue9z)6sxQ8-fRylcORbg)u7`Bl?5xYxM#;`0Ou0ZfLY zAe+GH%#%^B@3>X(BnLK}8p8!84}PB8xRwN(*&nRoXfF_$N`s-D&#%sI){d+Bsd1C4 zFBwMTQ&BOzj%dG+)K$2k=?eK}N93v`LMuuL2giOkBHK-1mNiU@Od-D~2yD0ZF2i}k z<&&42Vf+)!03ZSUtl2_e^0r^_NmG3I#7Tux=rfjoLsW}`xjb@JhS6E1!OR50u|5CG zgxvAUfJ;PQQLe@0pbtsdhP4u;)I7idz_a_CkO{O0=L4gX0;7(bO5Lo*b!Ixirt5B~ z@;)RhYar+}P+PrxK%D1H2>`LbazQk7w#8`ph^3mkr*mi{o^+NvTumY z6X&Uf=@aZ-i?hklvHJCz)gJd}yuG@;xT6anq18J;rMZ{+|Lg=e22OvF>uUDi)dpZ!wm$Ne{iasPp0RzPcWG=c;}2p&-J-I70qy$NG|};aLJ~!x(>RDu4MI{Q>LtX z*>*;SuRWL|8}y1fM6U1p*LgOmz`!*F!TvprAg8anWZCt#?WKC&G$#Rz2F7MN zB~o5anbPYJMWyFT6eGN&wGp7huar_8MZ;234-yp}w2XxRlMp+TDMJ(Jt%lY^NQfu$%s7MX0F8v7#TzY? z=#jV@8WBK1E(FR*Gd80Y+-A=PM9Q;44B2xw)gQ-L&E?!XJ@*y##Cnc%=OS-&#Tf)M z`_D$GivY2MZ2VxyPQp7eT*9t3bJ^ZqEY)efy>G_S4U-t39f1K(|GBX7cuYf~8oohd zl@zL1=lC_Dy6|9Bih=h}0f^7}%AFQkcabItA1Oy~mnek>txp=P2njaL0WqLSSO52S sW)OOyCOaVVY^cS?xO}N$*IeJmo^FfKk6T8SpWb4 literal 0 HcmV?d00001 diff --git a/lib/ui/fixtures/impeller_2_dispose_op_restore_previous.apng.69.png b/lib/ui/fixtures/impeller_2_dispose_op_restore_previous.apng.69.png new file mode 100644 index 0000000000000000000000000000000000000000..c3006d0c2f89b85cc07349026bae3ebf9beb370f GIT binary patch literal 23438 zcmZsjV{oNy(4gaqjmgBeZQHgzu`{vlWMX?_+qRt(+s1@@=H1%;YO6Lsl2etc-2L?3 zyt#_#^fN&O;QiTS7c|)6qgMbi% zNQnxmdSqQ>|MFIS?0VjIHfPov>qbFsMwargg#bk%Gs8lmy4rEGYTDW=Z)sZ6-*~mO z*15j4y}ne*rKhiIqK+(3MNxtvqAegc3JZo1mV{n=c6B<+I*!}sVxdU#$&~8vG^pvU zpG;@zNuT^X`TX`~N3N!(*6DG(cL*zb_W<_q(~yb>O71V)qwNSDX0 z)6gDXXBdE5V{G+` zCGeTvsL~tQyi}topy2xo{D+TKxi^Qm7j_{t7(;fYZS4S}V3ovS=j-wzT7&lB(NRg@ zL;tC+CTC?$-q|s%;fxjh?-ZkkwHKRb{LiPWFdtNYjc8#_?{^TDcN;*f6IbbU&T#|B zmZ7&Q1PEH{cJFoWTbl;71Ts+7%$2K6UK|XaZDxYO{~g%WopRQhgiatJczSGq+rk|p zx`UT@7R%$|xKJX0-E&(dcOl@C{3`-xkW}7Sc~6vFE@Sc9^%pj8rxl}qC}fA*_0cAh zdo9mBe7?`{V`GlT<$@EEzg;% z{%^#>y3cdD9@OWI+aTHjXoBj5gE3tharZbcJAbxoDd|EoQyGkJ3+xS>wEw;~%s^Mt zlIZd%{23brq=gIVRiu9I1Fcdda-Tx}F14qp?`o1o6HP^`_0XsVnjoA{aN+H1s9!?%-i`EjNjW23kQTo5gt857Qn@BG`n(9 z><2XTiTItDh@{Tj8Kl2E4Gg&b7BH|wXXocBBQ-SRrB{Ulj>lJ*m5?sSO{lw{^i>*E zcUb3jufsc7KgP;}D<~;BCkAFdGGHha5}{u}>I6H>QPI#YQ<}U^d4Lx_Z*9Yl^M;7K z(;os?snwM+Iy%aqD}&XofQT;=lX>8_3tq4!H08h!Cda%$@RwgSJL;TqX; z1@&ofTTpKO{Z6U(-`kPOR%^Zrjj9V}XxCk@ul*Uz@XYbFL-!87m!ELXWt%O(Uqw1R zYK#0`f;WDm3-G;w3PXUKGn_dP)U#isN35kIK4TGr7_oIX{*~kB@`%Q`w{Upou)lN5 z#|{MEkW5W&uvkNPk$)FCnpXL^@($4sV8i}C&V6gQ*gD1OgCn)URLL{bj;6XF%WJ;} z1smm@eYb&aQ7P3qu|287YMOTkx!WP@&Br!&1p9q7Hr8Tt@&R#X!`l=IPHk!T6AS|U zTGF)# zo18dY*6N6t)5G-)aogzX=i{$R$i$O09(W%+dK+MZZR2$(kj~)~)$+F=xlaf7cqm{? z@L@`zCz6Xh*nZOwsij(P;pi#TVrD;;A}-P20nNIPD0o-!M|`*g_+yWSG^$nrGM5<@ zQ&P!3PHM1U{~)NVk1ZV?YpPyRH6fC-6n!c~&d66kHhC&$y`oyg%JNe7O+H@@c(1q| zNL2Upc654A=cXfu1QP1!hTkET+7R3BkYj8b#2Nk@U*E0NW&7;O6qa3wS(OGfUog-R zL4*PL-Ou`n_FI!^kzl>{q!DW^o5P`D_{N`mL&6|Ej%Yo+FIJgw-54l;Cqe3wiJf_b zAwH0oRSS2YWTgs-e!{2JTAm3LL*G18FjB%(k)k>SAZRreKh|LjO`GyoO=YL(SUHxA z%BjWwP?hF)M-G>ezcXYJ)n1_9mP8pwj7<@n-l$Je@z z=y`ms06IRZ*sWNqkGUW^nfYt4vB1c z?Yc0ZrmHPkU(OA20deE&fxggvZ)>OR$DzRg=#1IZ(>4&*4NCOm8bnL`L6rdkP87Nr zp_DKXSuC6OvIGCu(pYj*^}2oov-}qVVzwO|N5CbgjJe zUIy^r)!IHk_oIN_fXTb7e{FCPCN=jjr$ed+)Dk}KrxFK(_dNjcTsbg$lZF93xt#!` zR~h%K8k%@ly@40Ab8g-%K#IV9Ouw^B){jj#^Q>i8-Q8bKNOt=+ zVkpX*q@PAimvJk>jD*xVvlZq_<}7u;_RlZY{gB6&M^9EY!N7EF?HTxnfSSOy`65p0 zWI&9^g$}5?6syI5fsho|9elOThSA|AUf8lE!;Vvc8V{&(fHgwzYAAW62o z(Ue#XeroD*75mHT^FXb@w#cm?)ScG@)ewMF&@d3ksS;8#s%7$?9qZ9-;VwuH>;B(WYe{;p-VZXf` z>)0!6JEga#S@sVM@OW}E;O)eKc{%3IY;r1^^rPG-jSfx7;=mECMr=7~w%}9_SxP_xdE=9^+p-biSr}wRS)>61$F) z>SeG6<&V%nb6bK3BVO+q^*m^8D^Kg3*&-WPA1V-o>zcyy3@_s6lSc78iqry zbO_tOd^qy>uHlB@H{f&4e*@*@c zy2%Rj4Y-^u8Ad1i(2t#MG1~H5NDe)0C++wrdQzK$hUg-j%!_mjCAU<;Az>y6aU&e` zFxD=(-9)>Fb;K(gDo(WE8*OMspH?cbYgKwNDkej=&9VzPc)pdL(qMe8Z%s+(cW z*kI4MGTF;An*&&3ED;CoFhc%lX*qIOxe_zc_YkQ&jIem=^{qP{UX_umarq`HdjZtaAi^zw&^*f$ev_5}%BI z(04VZ^1k;=d)(dr72XY#7rVvV*ScM*k$EB#;<8fH(KSGWy)qLdefh>Ex@Ar^y~6Rs zqN)j{t6!p~LVo2cH@xADV#0I}aKOsm{qc;_Qgd?o%>$BA(V3&b4$#{NKqIxlyIS$| zMm}_o1BEP?hMKPD`4C1Zbv~bs>UDh+`r^YhqS6K>nChMbr>$Ou>Q8_oN+}LUD$dr1 zjos3+$S+s+c!G|Zk^}!D<&9ne!|gjbI=Y+B%*5+o(TS=d8E;^w^1G!1o1lMO1G@<4 z?wI9q0IY=RZibPds#R>>%ES=XXKM#27CYfSI#ep^6Ush+R~jTMA) z-cdAl`eC+G6Z-r)U;We~;4SjDRqpc)YjFJi8O+t?Tz(sCF=X0uip;uMo;ALtob+c8 zP6L!)5HG?y*NA-E&%p=+4@d{m-Rc05IW%*|IS!DXl2=eZhE|OimkJdNbwb@G#>PPn ztd4GNX9mj;G(D97wETug= zS(y;EpdJ`R>@pZ3#X&Yxk3&9)AU_oFZJj@z1&!9oKF?deCfJ;7@S8=lJHa@kDH#|n z7CLl1To+Q<`;XDk0amE@g368$z@*re)KJqf=Q~yh zKdyl1u%TTUUgln05DyibIIy*oL5T2y6zb0cX5%u#f^Zz6p*C%HtfZsEV*^eK)G5@z zR^oHHs`L3%BFnD1UGGKEMF4qsu z=_f3A_dVfG5HcU~64ReXEWyIwQx?VOeVAEaj`kTDw)3i%KIAS4r503o=|mCMq<}DZ zkw05=%Qy4ZI9g3Ex3#i~K;PRxN z%rnjChu*D`Cm)%E94woY)9Xnbeoc|r(Qn&Y!-_(0%Lg|V9}Bj(R}KI96+)h5632*( zLdn!V@h`N#UA3EOPBGj9sdrIVQ72@*Q>4}=kP9iaAbaPN31$D zoTgs<#)HI&(kl`k`MnD?cy1E{_deD&|9m>*{L1f;+WVEXS2b(lnHz1|JeUVJo;mj< znf2iHCnD~I;WJu~v641y%N8r|4@#i_K?6y~YP&5DL(elxsWUxtivvPZYUB0n9zFF8 z0fpg$y+rU~sR|BssyFE{n3E41TdD%H<0DNMw!|^y-rGAss zD3lb?{vb{iUyin}n0CQYZlJ$L7&cf%@nDkKK#UBVHR~q&rC8ryi8$C$kg>yTtchzc z5+#(qz5O9WbHBlL9q;J}4Xvo`E(8zly)eS z3g2cJp#j1d{{JE%A|h{Ksj_I=IiZ$oZz5;57LMAZKB%9e;PGaK-!yc53kOr$R2Si) z_L$bhvl^%4@6Z66qr61lap8ilxBN`PA&u$_lf>PbYs!v>yo=s{7TECqa82-!d$l

?UnuQ1G&L%ATcb7caNHV7^@ZCCVIYa7sw(L@ zV1CUu$5sOXvL;sDB!4}Ml>Ea1ZcAnoGX$*S=?%J`2sr;Y9qk05Z@rq6P{6aB zcILs7T(JMdnxjV01>^WTz85X46=XB&exC! z*y~pUdzaaslxt54tip|=4q3vx@rO3ToJh*^plmm=VkQ_xZOI8Xnfz+_ZIuztvhpGp z&VX+U`NvN}8!MY^u$>I#pg`G{2UUraj+viEy9WVKk|~boEm82)FQH zRDUvz|L`>tEQPrJ>uGWGQYPYejwDXZDi4^4oD#3PT!F#MPyjKda=1f`(E*zw8*H~@ zbtHXc`wb*RSJLb+8tyD!j?AAj+f6jP`p(&yH zSPS%>LB0YfYahCqY=+$MiI^C((oF{Mm&S>(riMdGLDw~l{i|t9(JatO{keSiNd5l4 z;qc*evd*slI4h$Y%|CmWI&+TO_uGX}l7Wj*Uvf)Yg=+Vzz17W@^YlVY5X>y0#LsPx@zOV5()F?m%2%oJcHF)9NWq^ zBH7Go+-YBWj|S}Pc{Y5d7!J#iB*8-;0TSaQ@3`tJp8v~8Y4z?9)N6E^@)AsHK%UUt zVRNU8Yn~lm53iE|JB_1)E*MgST&Hla_ESRJU?kaXa|}C`W_sn6fVdS{Tv}KM`RfS~ zeW@I|htOPP+}wlH;>Yhmbo)OfHM#1ipo(QD*s8?()TTqw&1tfQ+5AI={cUgoCoPM+ zjx+aW+gvr|yMJN+k#y%Chh`&KCh`(KoZ4@NV+N7+o5^_RUtWiYdTA^hSyz&Sq|wFvEukR&S~?Ds;!SKzRDEuF_Q2oz{}s$xQxqFZG%eHP{#pkdFLK zK+I6f9!EHMm}g*Bamc;GR{uE}q>uFKQdJEUciiU>92>-DoJ+HvIdH;}t4|b1j;-U< zLwM?HDpnxqes296*n-)L_74`ef1t%pZk`|l`w1YAVU~u~lo=^l$lfTA(&e<>RPQ?0 zW#zl(IWD$8fm!o~-})BDW!F!b{p)0BJ*0$V3Jd7(fu+ZGE}>QVu}9^`XRvpaG+eS` zK3s%9RL&ksm_@MKJ$9Zz)7X!S-B0NLu>br*>q2)V3}M9PbUH$g76dk9uk+r0=U~>2 zXx*o9(2sdHRBk+vsWU3TS%Fz9(wweG`f!=DHt_@zdQlMUHaC62AHssF>SbL8fO^en zTdI22@9$dVXgoo(yt<|F#jXMPW#;Ifs1FTe4cKq11fjMMEdnPA`|E+Y(y{*gE>!^PaWaEIcrC%ZUR<`r{MdzrkjjCjMi9^If;) zjvApwg7BxS3L6n1g3{>xyi69EAP`vp=}A2GVo>_;baqoa$1>7WCN9xvG`4+2q6zA~ z=x;ow7k+e71lKe(h9&NQYx6e##+D_T&d?Wx`Q1K1@sdym>nkUM{Kv73=~b|Zws2$j zwZ;Y3;93e)ec?WpW#{6NUCce%>^`R&r*FzM<;!7{Pxt}UuJjDN5=^xlY*Eg{ia*EM zhRP2|ax$Exl~n3TlgTn9c_P_GyOod|x2zg31(?OFR98!^rj;6ebqqrA0H6)k?|-A3 z85`W&A4xv1>2i7o;mPROy+Wjm+>~EiV;G%zryvW-Ehv(VHxG>Lm z?G@U+6Ca{Nf03r7LY=qtL$^kotm7Q0>>LyR!&I}M?PMjh*bW*_ykhSyA48#bm zaCC`n-o+TWS`A`3sZ&(L11+zn^)UIHXLtE54*l5GyG^GpbrEXd#TtJs|AR()bh`sm zM~@9=WmB^6Gwx-n2Qc~Cab@ES2*(oixf;&h{_HjBx3DhTpHJPO>hKPqxT8;tKrUrm z?`X~@nu!0FmAp$SITVRJ>nIo~Ru)fS3t3%yd=(9~_SYFr7(Gg;{7!^RO`%sp*xNn{ zJZ($$+LH84YNEFAAvd3N(lhW*Uk*A+t!cy4QV)82uA4%nMjZ2GGmpXhyi``xTVfka z0ABIJ?T0ihSI@m%;64Q^3kjZ=3`<*PuEol^U#AmoZ!8pIo8F7IHs!=5;qklmB1Vp2 z+lIu(O5yQdG6{*}3Msttw3XZ9k<{yN5hkT^5cqC8)s@Nm=t}elE zuqG|(SL0xObdj$)c~_X{AJ`q*sX5$95e*G)3gqpl>N~?gZ0z??ilTyg9NE3Ck=2&D zdI}dV-G!-@(&n<`gBd*fe(FBc)G-r|E~qfG2^5>&uPG|)zD9}VEE&1-R?w6o_$--r zkPOL)iQMw|rqsRq&ahA?g5J2bQUCIBbm+6dT|lcwte>Y`VfmhbM~2XyVmSGGq1lR> zYn(NX*GW3^8S%?FqkZJ;zid`M?JZ`uMP+QREAujVifCPHxiRs6?e~tuQK`9gs#uhjc`JzQ56?brr6s41JoDwXb!Vf!9jecWf&g# zL~abS8H&ikZrfXIlnM*oe^>6Iyg~WuE+?4lR)ZeTFxC z9_fV5Vo!$I1486$(M_Ds9Tj%nQ86JTGoTF;HV%jZl3<6uNqZ|fTS2W^YW5yaYVQ!{ zi$z^My%$fCED>xhBH4{Uwfag>-e(ymaWXW|UP7n3AdmYwDoaFbQMD{Y7gs?8YS05H zT)}uSW%%K1jh18y=f3PVVzt0|6JTlvjoX%ff8Jhv|FgMLhm}zeu=t;jwep zgw0cW;bn3ck!X3nv)(%G=;)Y;WgY5y?&ktfChwB1?P3ZPmxE)H&IJ*8QW;u+l^MJg zyX1H>tDZ>CdM3h^>9oCiZ&zQnd^3WfKF@J@V{QF31Z*^rmv9qr0P9ZGBRrGpKUoI6 ze+TfVkg?Ul%35;2{+sh1UzrzihZtNFa=fwqoNw^7Z)(%_>B5-am2QJCRV(7qZaW?9 zy+k;(!vDh0yYo;v20P&#kmRJFVgUZ9f;&NAQP1K+JS)EaCXY|Jem-YK-r(Mmvr)!14l~ z%|I8hhO+a0Ox-|&bu^YxYF)l~d!H$0dHXV)(m{eHEG+141H)$u^5V+(HD^aWDWX!R zM`kYuhj;zFp5{T){`MApP~Jdra`GHcPK5fob0EkX^S&z#|6++NtPuoXz%j9EL*Qu? z5EBcmT6ZtHdlDGBz*`=LI=fShdT7f9s@e3k`Yl8i&V2Qb0`Qm>=G|!&bJ;2t`Zg$~ zXw}dq5a>83p7aI71^w`679QBJYAfCX7RCWg_FVgR?Qu5|3*XE>e8gt{(9MjQP67@^ z$xFE)>e!xTayp+=jat*|sasN}uj@o8gjT=;{Xi2chD=OWvpd#5{Cn67nX1L@ zYprRR)cU~~7NDS3q zzEj~}6hu8a6mld0?ev>%h++#A68X$?%}#EFCB$-(s|AD@pyS3(YJ<)z%g%A;>K3}t8!fox99*SxD}adF3G#$phjSZ>z> z`BZUnNo0MN$RykE`&IXz&Fi&Zdd_VzD)>oWs$_{ndq>zAf&hVk0#fffSe$e%{L~ z)tZ>#+*Z(xAHPp?w3!G|$N4=6;1{>Kgh^~YW>0N?hXoIF0W#A!3g3EiUn_GXuJ%mh zn>Wt1)?8ZW&T7w`q9q$B0|VkDbL9KKF7*1Va36jQk9dA%Idr#UC?WO_v#>V9j8Gt> z1Qx40daxD-o(W0@3Z$QBhniF7X9~E+RKmQkQFgo7kPL96$whAW@r71AhUGlE$F%l~ zXK8(0fs33bYm}h@>nllu#pQR1!tfm%1P?-_B{f6XOk0-BN@eAhqDAmipwbFiJ7r(7 zLKuQR_BHR5M#802X8n6SKt%)R@U5L61iYRT%-zqkL45Mgr-&`EJBoOm2hz4ih!l5z z5|`sy-PcLBOYOz7w~Dd3%e=$%9qeIFKmvsB9~ind*w5%%tPI%~vWJ<& z3s@6yl@&?*g)yJ^krun-Pp@nI*%6nC-&*?m({DO0cUx}+zr3%+-C5O>HWgDGxNLL{2o78eGFu`RXR2aJ#)fI zzy0X0S@N}8J_=~n}P^?s1N9*U+5 zj?L{K9CF{oK|Kn85dWQhcq&1#1KjIs7tkX3jt+`T?abjR<2&3@Q2qSs8@^2ybbdaD zj^<~X19JPB1e4JOp=~=lHKch)Qwz#+?favrR`ZUf8RQ#Zi#&<1@f7yRZjL@`_N)TsUxG$#k(C9wHzcE*=NxU&f=Ho*%O%t`DS@e?Vb$qPR6Aup)C4#qoS=bo< z$ZQTTORnGve|W0Q7xMd#40>UCHSB=GkDOW4_RT;<-adG?S_PxMNJyNEZs2E>v&dEu zWgTjBy>Ps(WOw&;UKkCYb&N#3_?rrfBE>rZu}rkJ$13AZM}Q7Go`+vE1?EllYWc&p zD)mxsTX==_yJaS9(o&G~$%)9-8_(btWhfG8S-CS}1i1@L=myfC@&RL3_A<+*9GT8? z<)6$5tDm{XEh@k=FLHr+6(xrie9Xp8)U(I=-q`o0%MY(s(q7|1=3hIaRlNXW#ggNp4pu0uxV&p1mm2(ST< z@(4E>CtS!pdFY zq==LXb0)X`WPD!Zm4CR7VXTn+m=!Ix+C&w=iQbV7tnz>Mc=#z2cj?U?(_HT>xZSk4 z3%I~;Z*m~LFqlP0R1EmUBtkP;d$Q zES(8%{!nAiyoEu`ze_|GlbPM|>wk(Agp&=rIGJlqL2pFMH_uX!BzdlBV9FJ|;ZF~t zPtYc*>LnK?Rm(M)*Af(rgTngOPl3=6I~5x{f{GclU8L%*e8foZNei6WYQBTLy5do~ z@i;k?OsNg2rlhLqXbJi%(Qn*2-SBx8P3=&boPS+aifF7nLk2JX`SzrU?shC%XW+cptj1$g_2Y-r8h&;ZHJN$+;c6h>B zq#MZzFMN7&QlZ-;-N8Z)QfO@zs;((%D?#;AjdEV!K<*RYfLmvKsRM%Jlw`N=rCCBW zH(BzW>CJ6$=-UN4A`MU`ZBI|d16|=CbifqO?F(yClfgt8BTDukv?1cWl@cXAT#Aa>Nl>p4R_e)K(-kGC;d#g<3iRoELYe99fD=^77bjD*X| zpWojziF=Zi>WZk2+epaSFQwN=#z+0KK?c@(bNlX{K-RiT?@frB6Gh`*2$AZ2e#I*cV0*X_md27 z@%~vfL=;d1mMzJ*^NFPHW$l3hEHSf!49uW6bod&_vdt@Yi);G2h4f zW*LJ^LT0Kdl+z~Q9N+VZ5be+I%9q=Ap15a6!A8qJEd=YNz>zsg*Dw%Ysy|KIsU9#L3RH9S2;DHq#Cd-2iuha zMW|{IhMdeD=3kMDf|a{CLc!*t2`&LMLCb}(F^)++V_JWD?pOc(AXOj(+b-v^Ow#!$ z{1^vUpl<3iaSdR9TQSZheK}-fT*^R5YeuhbU;t!9tq+G309LNRk)F4cJPF`aF1UC7 z_muefOu(Jk`_79C-(;R|!>{0k;&6d3sC^fhG8F2XgazvEolhMMlroOm(HWF?iROHv zRuQWzvW#=Vx=IpqQ&c}Lut4Ln7L^Dbq@a%9J=vK!Ss8`BWe)o*GZL>b zn0h;f9bdr>*Rz{s$QbCXAYoo^35oBj5RWikrG)WqMY}Lka-|5VjaxzE^hOEH2cptM z(NM{v6$V7#{RrXCX~ryMP>eZwYw5vvTQkB!CRdh8=BgSclGBz!35w!JrxhSkL%u-e zo!{Ixol=`1u&~0~u^O;y5_xt<>YsPS5HQhsk*T<%u=~3?@KZ9Lracq4*%D8z6zTS2 znj<~ewRKZAo>mn30Av=KEi{cO>D$5WV?8?%!~r8K2_rc^vQYdu-}TL4=!WNJyKk-K z{ngh#9K-GLc8@=|7s~#%hmEAG1-9ilJwadxRNo^Uc=NdA@w-x`oNZxe_HMhus>+;8 z({~afE%JdT%sKd7Fb8GvHULDaBb4TmWx(&NC#p@k-?e%BdY_fYpQl&$?qs2TVV9SH zZP={rLKD5uZakyMzcrn?FBM_)jXR&aIH<#Een z2}ns_dEOXhVrOiMg(b6E3Uy1^GVp%Jx6|+XNtmYa7GB9Q6OEIs-xS#WzzzY;Fp10d0WE3br72Lc&t08IOY zq&wR34-G8my6RlzhYdKjYFTaJB5R-7deN{y5uZ6O-Z6rk`Opu#LBVw>FE>j(>)7$V z>lH1-PTJ{Hn3h)9qPX8~X4b&nLs>$<60yn_mbzuYHi!tZD_#GiUd^R@fXchP-y8Ob zc@(;qj+E{l2+T*Lr)xq5-8c!eSu@G1k&WKhIR*ZsW>E{x zdS?`H+kWsNvu7-Iq~Xsb7Z@Y4SZ(J`trt&IE38sjBZgeDkaf9Y5b`)!sUg=LlnSXF zItnPN9x_kEQFMRvGI3=!OE|<;6}@_X_s9`qg<`|!`<4O#eh= zJTHF_+4uD}!0Za6F21oL}3xy`s}IGHq5_4t{BQ3r^PcnsSgz za=@H3vUbhQQ*|lA#f+ltt1(q zgBFu0@|IIn$tpe{y0sD(OS|RBrDZLR^^!WY-SsDcWwBED6iK^!7q!X0P|#~ES}~+j zdJan8o~}nFQL~29G{3Ef%7uD#9!0=B%a#bR^NBy-JtG8te*Yp#Nm1+uKFsq&dR{R7ew znM9!*1ySRJmsb~&oJ@_TtS}2mtUM8?p&cxY%d|qIF^sFn=sQM5v_dGcaV00(ghG)* z-n`<7`BSMeLY%|HAo3q)6vQu7+-{##o>tIoB@67tG~>s#za3)vN7p^R#GX-y4a;bJ zpI9HB)RT7*R?ak(u)a#=ecaLW`JsFT!|hE`(`5vci~CNXeKrmwlK~^>cw}d~c13B1 zUESEch@cN*N||7aV&Jb#Iq(aE`BKtvHiLr>Q51-CX+>7}L<-ej2#pz>O25}heRsgw z^YRN(#EFo~xmQphOfjc5-d4EQ*WICkalM$tV@QVKqy(e<<{+N<2r|yKvoN;DJJy}u z2zftGHY{l`Igc)ZQ^B6FHG==cDPgPn8? zSJxRGitPtNJ*I5+Pe=fVEWKmo9uZe0y|4NQmz*ItWVUe*RJJnLoI&@55;w>g;6>Jpp)NeNoIlMJO-+c#I z^WU;s34;kxA)2DGEn7iI$SGDFxed}je8uEw0inD5o;t7Zj+iJzc2GUMH@A5B2#CB9 zb(K@Ay^EYh?{DtglSue~b4pX!89WbKPBJsZQL<{i@&0eo#Uwt#LXU6}N8x+w%uzhn zg!c;Z(#hU5b0K2A`m05otrPSaP8T+nA@(bC2%B?`R`}2f4Pd?-L%vg=zBAxPzF4k$ zyr!f)sh8Sq1z|mP`2+cD8S3(S3JuwK18kn__SE8*pw0E_W9a(@<sd-LYP7P_!37y?e%gnC zHS(gF4@I}7sLtebO)mom&E78fz``0mZ2kokff zS>ym;HrU#t;^ocKqLR{me+A(RF?$(_CSx?`l~y4k8+qC#VEU2kuas7#e}0~4()_BN z=oc^EgSzO*{yoqdcOF8L7%U4`Ie_8pm_1$&xh!%+u(JddHBC*{>yomi+;*r&C{$oV zQsrGq!}aDB=Zk{x?-wO39Y5+ZIaESArL#FYZbP|gar&+sT$+_FjMqr;n$$3N6^w%Q2)deqqKdJ8J1*kfO>8GBC*K$eUr=YNiIQPp%&iB*%B>}5> zQs3JHq;wOyQd$=9s3Boh?e+mwTAq8h=9H8G-E)5w%#=u{a{bA?n|TgmI!gC)V}Yx^DxOG^{Wd~%Q+p|{-3JmY$_f7!jC=LV_zvXwW1#=R_wVEdO~DQ zlfAr0(1N)mnLvL8>o=CtZtANGQPW8inQKn{J01B87*s|=&0-A{PBiFLOif99Jnq8Y zpK}e&uhVNH(%Iuq7G1pGh0D6q5a6fWv_VZqNNn$+grR~x;NGJkPgUT?k34N_6zp=p z(@hx9T)S399z22CRpwm_aW6ye>_a!cSRK0UqLm?5i~o7v_|v1Bi-HyTO+@vj{L zFeAQReu;^T-@UjK80PzNrFL%x4H*;BT9F%}l`45LWv+Lsh)kox;m;8DL{f2Co zPFvY0JN09dNi%S&_n6uyDWMuJ(C^mSfTsQ@?xtf=JcKxz?qSXdUOy*s7gj@rZ2G4B zyD$U6zQC8yKsc7bcMwnrqQIHY7p89Pjs7-;Es!NV#U;24?do3{jddigb>p2ei{wpxI zk$PO1jw|36T@3aSkp&7Rl|&&<=tE&fK`y`c@nI$}$h{nL-M{0?>1~R!N!mAZ`yyns zuXM!;4E|fAPj{Z2>t&@r{COPjL^uETz7XdO%;7ouRnnX_ZRsx%E%6IizsBkTDWgnG7fN@IFvNtv$fy+0Bkn zB2fthSk{I?|ddaiVB1YMD|6F}}gvii`pc#u`{APN<^$^RW` zgQlOn2w5?G$2I61T9o-?o6fuGoP{Fy2`()Lmunx!>E~I(Rur~Qcv_~88L{?~ zX(H&>&$fqOye?P@pF49#8$eS3K!ws?I@#sPt~^D?+}ss)orVrpV0;S~v3Iw-nI?;h z`9(OXKGQbvh%vP2_bYzc0b>|Uor6Nm-YT@kv?$JWksJe&Mv})=Hg`?Qti#gzT5jh~cDmK(T;yKv}NC<$ekBWKxP#f>TD@sSN# z){MV4pr-PCSH8KXJf*2$(r5-UQAhud-%3%kNC!|%4q$7EuV03Fwqnmuma)+(g6(@> zkvgvF<>+T`0O#67*9|RyIO|{Bu9rY%wHK$z3O!1ncxksiEycmu0F_e@CRrf2C0;n8ENq7ngdL61g@ z70yv0v>qC9Q~B+aRa;@+4C8i^uto8C=ys*&cX$!-gc%1-C@3q-x{yTfV7bwO&haNW zCOa4?94d8FNL!iPnl14O8glTMP5#{?zjkS+DEO2tB(ZUjy`%b|yK zyaj!p@;Ip?d+&*F|ErL%42${;+FoG6rG%wHa!Kh1ML-&)8_A``r8^{~OX*%Z1(60p z5L7xAq(k~ocQ?F0-s`!Zug{nL@Vm}6d(N5r%*>f{&!|05-_{-PV!0^Y#Ix?VE(!@K z>oE$w+?p>Mu=ajyW7tm+^@euF+Nm-8W%-Gkw#zmG2z5QM!~o*P+Vgh^ni;%PBME zeeSGS2gXQ78|q2wztz~W=cO746K`YDjg#7pGuxzd=bP#=s0H(5KFF|Fa{Nm#5J*n2 zX46{YqHGvs`DZ$RjEG+jwEl*3|1^s6-x=wz&+VFCThy!MizuK_Ii0ER?+EG~OZhG>S6|8U zIGQu6j$v@t-f!JcI!^|1v@7ftb9>8bu~j&N@GF{!r|T&SFo+SvNxxEdiuy6;J$OfB)%Yk<5wPEPL3XNg-_WvX&3Btl5Y z@b9)enyA07-Ac)Tqy0XPj@SIRH$j!BH!st|^UwREB`|KfnFt_G@cylXUeKe7Y@Tz- zw))MgW_x`3L_%)rrZ%vpDKPhpV!B)xXmoT+XmB!=cyY{Ei((Q_aS?x12@f3}mb&`?t@GCHUH z$`NfF3H$1}^1dY2B51?SJcJ^5|%3I}?>C z#ux3i``bNHfhje&lgU?yUN_Llhq%j1nZP|+;7#n#N*}4>e`C~qsjPm}!hZp>b`U;_ z;5XJYPZ3t19=5xxSyZ!{w722%p<2{r$T8l_TaG*>TPG5B!Aa02haVmNg|%%w8o;=P zhG@F`8^&~n%_kjjJ}WR`C$g6y0G-dI;uzfStr!RFkIm%%|J)gkRq_>uk`PU*yb#W zKk3uHxSD;5y}2f{;k?EUU|7yE+{-ISYnU+Wx4d1Mn^W+usPo=7dk9P6NcHjk@`o&` zyc|O?69KQ8vA?}Ic<9)fyC81bMw9RQ7f`1>V_ zo~Y!^d@=vDZDW3lfAj@i&4E5XKvM;nMHK2czoZ!{=jR>9(P@+iEeIw(JQbT`*Zc#! z$NzOCTN8+#|B@#H2(U6r3>#iQqdaujfT}YO9naYR7}j#&y*PQOs(_QZr*ay{Cy0}7 z3QmCZA?kDdpp|-`LNV>Y_aAaENzUlbrGr}eV$H#H7B*lZXh#a$tT!X8T02YqT-r~A zxfmGE?{kZxV(^N8PIPN*Hd?@on2-6>X7bh31Sfz=#eYEIrn>g(eBQ|q;rk?rVFUd~ zt@E#jbi?iG25aKUbZ~Hw3KN?ny3o~I9c#KSNsH4w&%`7A&-9%p7B@45 z2>83<3Y|q;vT7zl6Otf8y3Q9)4+HwI7{l##A%{-? z9`nBc!}9T5=KwD8?)6u+oPcu{y*hGgMpomdQhgPFTe1B;s2cwIdpEHv3I~%1eHEdb z*W4-qophtvn>Tq&mbz@CIhR$txh(Y{>4!7lP$`<-m)<-;WAqBp#@*V9@xnd9PqzX7 zfWzL4S8e0au4?G(Abm5xkO%)0nFt6vP=e5+3I-CS$hjjdTZCDt7^j1Y#odZTC9Lgl zbRz6U7%yJJju&%FkG#l5Jd1CTU>BXW5@O?~bj_lu_~0`yOI%)!Y$YHc3}n?C?clSSH_Yk_ez-tyh}Es)&!XWeAoSKBYyLTYd*Z=WZ)HX{qd+7y zGjc$l>e1=MglSx!J$0=!E3~n0jMSjwBAH{B-TEblv@ zPR%4}$D;Y=gyvu(HIu#H^*+$g7P!}BEF2LqJVUEph?gq}XR&~R6O@cK6!Hq5E}=7G zuxpj$8G;q4GqzpqBQkzdx__O>K;?bbF*59`ocQC6g9!#(nGr!KR3aG|7({TJt(w#P zcYlP}|HGLW z=IBXqb{NJUW1rps_8mo0=`8=uK`E9>VY2c>kvc_0!z|2f$=SD}KT>s=iJ`RP$V*4u zRKjn?z|{L%X=dvT9gQmpw79!CymN3XMjHMq0wSD3Q<`5N8LDa7%FkO_#yKms_Lrvt zab&rNva$U$h$?W!x@;^Ac7@=$4^qgl8Zu{Q-?vqf7XIjXuH&KaOSx_TEjW#8QgiLB zBv@B`^iHqfDV1U@RgaK}xZ)dB=TCopw4iyL!tFz{IHTygv75`gB%gpI?Zky$W^_{! z+GkR-qpXIVFA#MP;|Q9Ryg9F#kMeiSRWBRf691-L7N6U8R?E~RwfNyfs8=bz;HZx8 zrW0+R$}r7ng#Any&rdCjC0<|pStzN3W&8B~x#9~$X8n?rozGNwN+I=cbeU&Pi(Y!T z1s4L7Qbl(5?i^sh5BWo>To+XmP4xchf%BGjMRaw;JJ#W$Y}Bn!-1T)CgPaDy%Z^zx za?*aeOC=wB#}H&$un_MTqnz9IY}!HiJ+7B_z%B0fkOH4NucwZyxR50B#(pV17x$U4 ziXR#mt%Lu!>4m1cby0lBipi{&Xc+|$k$V6A8dh6<$8Rq$ru2xS-ISh*r6ji+$*k1C z!dhn0W3P9bKi`*ZV|MHBZp`%9xEzRU`}+*WGra>7E}d?Twboy&MnJ+NBE*o5-*=7o zeo@eUk3K8zxxAmo%2cD-K$n}Q`?Q%(u&WxVuB(O8hi?-0qTV4MY;AQ5+}bto+Nr7mVH3%eMn4qtBhmrvg@6Ri` zs(my&&CW!nYFz9sKjqW$Z{*t(2rGYS-*~-%iKSkHz$pKlXs=eEsFAIF+AEkicC6Im z_(9RcWqzxFOE+YAOo26OZ08BM7!=GBTy=kB(kLjq84b6WZ(KC)(dmyk+Wqwz;rc#Z zm=%)4&3pQdZtB^;Ftz-1FP_)av|=u?48B%W*w~g)s>4>^-5wY@gTxT`#!0MMk+uT~ zqd(e`87yj5xrFuT5J%YbLg4mShCLpGL7Un4?WJE@@U-QgJCK(0HRyRoS_Es`ED;JS zOg1-d+y^Kk$m!e;Xd2^ML$hN#1HMgkebft1L#C>$%65|{?tIrmH(ouX3JiRdKz4Px1KhI5n-NRjr>iHeL*EwzrB1|Z2 zD}{>le_}Ht;tO{Vk5y!5;Y*3!6fH>93i0Hsta2xZmm?QSZ5M~{1WK+h>w^WPc!EX} zxbMzwv#u&KVvG~5#*I_kWAbP{v+xl{G3SL1*cHVo$~MI5d&afz*XD~$I0|ASvNfAO8sU}8>*UwUcvc4&wxj-CM%du1>U=+*Z8oe{F_KSN{L#^eN@qYk_<&Riw%@~#VXStmWqURbdA~< z)a-&idI+4)2%rxQb?*`XxL)Wj`wPh$z~UgeXLn6YQC zLr=w>CS?c+p|q&zh8?@1mW)s&x`lvKhfSNTj2%>XhxrQ_lb}@OKJyv1zr}_^f9~6t zabiyGLp`OWzA}oq^c{dE_}mTfs@g6X@Rt*qtQI$WNxw?e1KVFQm1G5e_%*X7^q&en zVC>~?nOY>Ov3=0M>HKy?P^jit!;_!Fj7WdRz88}8fTjTZ3Db zJYxOHp~|g?qZ})zSZoaQ816mdCbQy7^0K_{oA#CXFFkz&U!FLcUe0LEY~jOYLG#Y) zY3HS)T;@w#?<-a1rltbVYDC+lf+2ZN_qRq-uyp==HJ6AG5^GN#x>P5@uVko^)CaHWeHT&A_BO-<% zQL^k!!A=MXw1YM;jT_$(nHmXSDv-wIB;OV<_c?1;IM(Xi!ncqG`9+$x)cYY*nfkz3 zD1^h&)H*=P5={$m9Gf9RIot->uB%us2VcPgq+%g(o)OhF$3?6WKMd(ZN#xY*N}ZGY z%yG?}{dgL6@!p|6r{Ae5ZN>>PU9KL*J3w|6AUh_6O^H81SzoP+$}LLLD>?UJkGe!9 z^S{+GoQ2omL!7r~!%oMgal+ptm%943$FpC-fZ>YzDJ}1u(sSY+R7x_h_*;0mQ{1R`cbz`MPFT~=p5Q9sSkZ?K22|4Cw|a6p z`L`-b8cghEGJEHK%aPI*$R=2~R&@7|gxT@>{}+XcOTo_+K0)^ZZx6OfRBGLzgiIxH z_Vi71b%MPR%Psp3?%7b)UDI*!PAj!p7+R6T?b^cEEJEL91y04s&ziU*O_~%2IvfSA zi!6A}P2RT)Q`9p`h`(w%Sz_5&C$wkFN|8kI#|M5`Vc2i8EhkWCzr=tA-3_KX%z5v%5!em(Ui6ZvPzJI_&8*6TpFl|Avl(MX zM&AJ#ksA}DQG+}`v}Nfc7N$t0+J-Rl58O%N<)g+{rTWeaVCSF_0tKKn zr3Hryq3=-(3m;l=oT)zQ-6 zO-am*IbYV7e`k^^v30d8T^n6nq`t9`JOW;-PhWiw7B5?UJwdq|9 z_e3Ri?Rwk7>W{p>8~Y5AQ;F8yd(i$k@O1GFGi5~IWCYG#3Pd=WOo>@>7`XuWqV&MU zy;n_EHGqD=?B+iuUY8M3Qudw1l@;Cy#c$-QlaRTgvyzHqmLh(mWB0V~vP%+zAKNdSC>0AJ~?R_c*MpNsxwQLo1f zFb7@*J+m0R-Ralw+#)lkmR{wCaXzbMa{w^&#--COpRmB8sN$T&h9TyY5qsJ441)&9-wg|p+bNM89qnLYJZB~WyXqqfR?myS>d6V~X zNyv(n`*rU#vG6qVL6*WJrVZRCF}?rzS%+ByRL~|O8vkmzcJk;H6s|1Z#(e%Cad;K6!I=as0?j~OTn=2fgV;B39_&T74zu}OpL z0+)*Zwr7+%IYRJ#XMMDiayo-14;p3K9Co#;CH+Vc79{`yvbv08E;{pO4fXZ$X4(o{ z{Wo5ZBj1T%;qwe-p#W!pHc-U@xeJ592@3!i*a;uamw1Fya@;Vh4Omuk*#`G$r{H(p z^j7QD+3(}I_+qv{&IDM~eic&&V61>y%v$>O#tB9P`zHh}CiZbLb{yTri^d6%mrv5S zGibOxgpwVud2Gn6Vt_&7z@X2MgDTvB`yvBxh5K29&E2X~QKg+$UZmD@P z6`8HBV;sDC(vKHaH9edp5ZL)Og7$EGiW%b1@Nen~Ve6k{rKHHnNQ;Tg3p-H6G_y_I zpUFuT|2}i)Yf<<1$#rMnXX?j;1y}!kZXAAIj)Iq?p=fvv`>l7vutHe9yWPu9ZidpJ zUw>un*tjg5y}>mZBA^is*U;3HwW4*^aSz{N@&og6IVC4Dbn<5Oh)3gJK8s-Ef(eT! zm6Y=v#_DFjY^xpP00TaVp}*!gEZ}5vj{8@6d9HrLnI)(;pjCEiOZ=|SXfQ)K%Iv`+ zL$po$HDkgh!<&U^zOTkVlQqc)XrMO3ir= zXTaCJ6|b51Yaf<9`2kOIoS5669z*CJi47CgfZptQkyMY-ttl< zpfJqLDc2ceOv!$WG?p5CG>8IHha1QZJ_NDD&vZEyllmr&0I`GnC0J{9om?ihkgA6x zS+LgPdcA6I12eN`$R&x?7)F|YQ-r3}#?B-qhE0(kB!s2wO1)MS7GFVzKSk zNKJ@cv9{ixTCK7{?11MB1OfonBRceGp4JzX2(kt1SWg{VIjo1}EK(~Q&N&bfh-f>o zgliT&U%21zbIi(@pgbhdy?T)PStIvJJN`SI1=`of);}MUh#`gFG$ToDNQC|X`EA%@ z2mb3%7+S<<8for`@pwG=b24&v0Hyef^u|}DH-;7QCqn=*wdWDl8*K*FMOtBivAzsL z7-P(^HL~U_(i`)V%BXcB%R--*5n#Nm_=|LlZ}wJ`R}J1aQ2e!`p1Iv_i`auZLA}eY zC4f&YcAs9e63Pa!vpwCLOiThu*k|uWW=jG{JTP#!%$@|GJo(UCC`CX}AK_>vqmckI w4%O5W(h3OK$BRk{9TgCY9{$ow07*qoM6N<$g036bz5oCK literal 0 HcmV?d00001 diff --git a/lib/ui/fixtures/impeller_heart_end.png b/lib/ui/fixtures/impeller_heart_end.png new file mode 100644 index 0000000000000000000000000000000000000000..cd33ff064c60571b28d14aff5bb3235993e7eca9 GIT binary patch literal 39702 zcmeF2Wm6nJ*zR|6m*T~xw8dSDJN$tHrMSDhyDSbxi@Ox};;`6a#a)ZLI}0qZr_Y&r zKEio-l1Va?SIHf{?)(z1`c)1a<2?od0Kis|m;MF-0Pp@Mp`rY%8C%?p`BxyhNh*9t z`xpGt%%cDR8i0bd#CPwUvvr>?b2*QXkDJj^eok!co8L6*DobW#v`2#2^dA{$ZMyZi7BihpqyxTz4Z~{uxgfzt94Kl4vWC zu_NL4Sw2p{4({8?O9OFS>7Zz;&Jyxe`W1f#wPR?J7Vn`7H zTu8wZ=EhpN|3Rh}KXP0pI!?`KX})`kj63@M`q%#^3-?8A^Y1K4$)wNw>C|r+y#ZoZ z9pKuuzdxlHvi)o>ODlBui!AN%0U!bQ(m!}{ob?>r=}|yq2k|n3eBDd{VZ!z;1sxKJ zMz_aeh&#zc>KXj_AtAojwJ1@okK3swiH#|>q z^Ilqm?lub{wOCzBXWS!%j%wa$NHS@K^ zm^k2)e#s)(w?uWv2M!d>*?>kQukDVPP{+30R$Z&d#sweo ze|A0Tx=LLOd^w)W-B6j*vSYVt?OY6&KmcHoA`loe-1SDINdicuPPVSm9D8?z*aPdD z_zDs>gWN|920&506sz3N+E|FRh*1(kMf-zHfdPf7Z_n6XZ`-q(U8pC2OMwQt4aHLd z*T}{`<~8_YMGGfX2-|r0mb4iNswBoJrmO&!FhWU6V3*mK0~%=T7I65X8|(4Svl#K!h|mv=n0VAF|d1>i&hK!{xy2^H)a00Y72ny7c% zui?lv5mAIdk-r)J%ErCsG#n!=fWFYC##YgzOW$Gj?yK-Kr414f$JyZ8uYauapeM(l zipmI%bfTdu>!6p)_L4^E<2ACm5B0q+W$$X?z(QPDN-6Uj62J+tRBrM?IYD$@=j}iJ znxOFT?h(5DwiBt#r%B=-9uJ)7<$I^{d0TIY#O0d@>)_x$gRGqoazn$Bg@N<}Qy02K z8sNKdU)nG|*BG0)IW+DLsAR?A-zEXo{jdgE>K1MTt zR+BtWIK;#l6+pXnH2MyQstcg=JGL@5$%^bIPOVC_XYKwecX;hwC}DgDGWD3<(;gIS zSo;OF3p4UuW2(G+!|j22PFj51`)s{&}4$j8v4%*lr7*#*#r0F9n%k z3;k*l$9F`Wb65mzt&6dsu4RVe`RFngikDXO@j_y;SF-=M0n7J9g#L=LX$eiW8Haf| z&805{@u~t2M%B7_U6J#D05MzLZd9zRAa=aJZEXeHUL;pM@-C!KlIv%Qt-$=x4!5NT zK?Li|(Xm5*v>(;;{$>EuOm!0D?mT59IKjYYS@RE^`J*E*GIq4^F{{9nx^6FBmGVg& zug#kwa)VANd2}rGDK-cofI`8oKPew4b>W5<{1?#98o2?y*= zA*2}xGA|GjNAaKp5rp2rRNrjy4~BG*1|YN^sG-c=Y=(w59z3HP|x1<~)M)vSu z@OHEJQ+Ip8{Q5 z1i`o_WJ=JEPfyJ4&msKO$#Imt%99fN=&(IO?DB&aFDd*%JbtZWPA0$;18ivJ-2cfB zNJrJ{3tT5oXkyC9w{#X;2xcSnWoU?ZWoNX?0&#@ z$rsZ&@aSOa6*J|)NxAeCd(u^PQd_{4(9I8u6Iw{r>rHhR4+IR+mf=nN?ahS9SpuYq zcUazy`5&&0d|<=+8~GR`<6dh@0+Z+<9nJ1E>PMLU%>=H&;+oMmEAl=Q3>ZbuF z-3HWa!X@;fkJuWaqeINUPx69U^Jiz&Oc-yEsNH2L7i^;Hib!J# zOgYPlv&)f2p?zbxOWkbLt%)%kjxU_Crm> ztb)_0%hgQ34I=8N_5I)8oeOM5z*pg$Y1TS_1P_u;ovJ|<`@-129C4(i@c;Lxg3!9xQr3}SRs(>$c_xhGbvNM{O5?KpodIq zm{Y#Ut(8W~)|`rvet>?>TYUAL552}tBH33H!!M&!32jyo-Se5PlRpKE#VB2LnH5w`=E-?V;BdJjQYQx1x1FZmm$YFr6QQvlmAG^Q$$Ea75* zddJ$C^2NRcwb5|O;D{x(BZC8*rgkLC$~%QV_SQKB0T&ZABJ}v(m|26R)ZnhP2wrFB z2S527^t6PVv&~&ad3Rpcb23{o@bY0mY=zD|+K&K10KlMw7I!`pj9zYzq8anS8s%y- zgtf523HN|q7)_ek9^1J5C@FIHo06L90fWfhtS>NNUUt|=C&O|A`XA{AphdH9cJ^J- z-(m@z8q@?@J^RAezhUQxE&I=7h5 z=?gTY7F$oHhV2gLY{xu6T{Cd8UHgu9>Xw6A8Oewu$b<)N zge3%^jf0xWFK&r-fJ52)0%4Qboenf_khs9=!tN8ki{s3>WegS{+*Sz&$i|4p2C+L; z!Mj&whuc&I9DhA#B@zDdle{u^_m3zyl*o}D@sD3wS#icU4Gv7}>&J?Jl~}{48d1%# z1aPj_;2e~`PZzTfyhw6-JvfA$&WTa*sx?Ih;=qP(ajCNiZr{T8qiq&LByb+E=t3L# zezq|neioV;3fUoD)V_m3VxM%u5r(ai3<`-1=+a0!c_FX$>Dw!iL#jM(QXm~$1dbMV zd!1-s%}U8mN!@6*kk+v>X&}G0UK0u_+;3`iio)b&T3z&|yDtCkcs|~DORz2|(+vLA zu0;DkvPE|xoYQ8o1ZneiA&CKTM4^D}u$BCQWdl437crT%0u$X?sW4J_ql&5~zx%Bx z;q}zU5CF>9+5E-gf<_&tI9Q# zkxY{q^)6nV04XPt$8E9aUvqZttI9kD`NiF?Ym^BqYxZ!Dw0)9c7c7$0HPMK@R(Y(L zIo*-b=E61^CULen1_jl+1rCk;h$_usTNhDYwT7WZ+{I-{q(BSgb5HVhN0L3aHlDS{ zU>v}HQSRJ@B>|!-&ElOc_|A%)8a^E)ni8p|ceznU`4(-<>nlen=q+a0m}Blvu8wH( zUcbqL_~?EAe4o!aRR-#Nb$J5NJVFH~)Fn_u#8XGi*~v;A*NbJX>Fb3;!wc)5kh4NF zYf)!Hn@;k@7Lst=YK~qLnV4SOK>o3QWPam|wyVpH`@A_j@G9%S4uV8qbJnPXd_KHg z9{0}#kmx((r=>@dbBAwKg?#pOW*XBwFs|q2U_;OW9k&a9uOyPf;5vCh z_OEi~DPzY?sAhFndw;3}M+`DJ(#|yBD2&<}jvD4oJZbAM$4e^h% zi&I;fs`=f34QXgo0BkTlXlotrjH0ZTZNHyJ4GZTv?_!O?(miLiw6a7|7e7UIS3wc9 zc6Q0q1&!5pV>qLnu`smAON@MCm;?r|4+7V@jF%xLpI2kY{$~_tPiRMx7hy#u_6=Xb z+I5B%->2>Q@Y|7m;#D@ET3@ZeSeFmvVkxUX{*9$nxBqJudu1^+v%OM~At!?QzHvDm z&%4AsmKP^C5QAJ$>2e)(@)kfVkS-TicwG#V#K4pN?H?UmQrP&(FQXHLI;}7xc!Q^@ zshMagGM{{Mj<2Hui!WM&-k;yv>Ae`EWTrzMl@{q-~|u%Vi}3_K=!?jJT#v%e?n} zDKj2J@I6Kf0sn=pdxspC%9Ci;J5L2TzhWuq;3ptag>uyoyMzVy;F{5KP#D|wG+om7 z+%K{Q64_?wZm3l=E`F>FFfprLd8P3MOT7vsCQ%ZC@sb*h+03Ue9=3M`kZ!?l5aX|a z>>XKpKQ8qQJ8G3pS>?XFQHxHe)K{Itya&;{WB1=67X`>q_msAE{;^{Hv>ecr98YB8>VB{vN z76-ke6m55O1!^*rpTDUixtT3eXj#zZCZXdTm<~D7kJ^OKzu#L7Wg?n?7#IJ$y3|3% zSird?UpaB-)lzw_OQ~h+u6td z?J=#Eg-UAv)BxT)0YCe-wrJhF@41;&JtX`Xnhq}rhi@)J@d^4$474}N=lR&hOvwk2 z$^^TbGen#L&7fQHcZ*lcwg@f6_AF?`CRP;-V9<0neyMX2OCaAfT$)5AEkr>#7S zq7wE%$An?d5mQ6QDcl#o(Xx8=IReZbA~A_FsX2Y>uJ$9OWY&LxI2ydKI*3pcyR^O?kwCdPcFdJs7?^+qhQA*tYyMoZ$40*74l zl;?N*4%oK3hN_~pXnQ9U;2HR%5z2|5ea-sxUw@PghnB+D?AiHc$BlE>{twMHNyKM1 zPxu0RxtiZok2{Q24nbTPixgirf<89St!fTb6;V=n@*-OBsXi&&nHg1Js@j*FBk)ru z-u&3M7ni&(ue2KBs1@QaJ-o9N)@#K`p+!mbqXJp^JZz2>pqwqUQL zgEMG%K(Qc8xt~@;j#(v)hQ%DG{diNw=J4{!$E)YSiG9?$yfOB^C;9MgdnltX+Wx+a zpB}5Y(>8SFDWLp(9r1f|-_?`tcfvfK0KK(rzA8sZ5Oww~bDmiTC+4B#s|TH~m!q># zs)g-Rs^52p{_uNno3rDC(OD)+S!lkTh-!n^RpwI~!q~2_E*+UWAFK#FSqY_rKi<*AMpsw~qqy!3LDlPmHw0 z`$x{gDH_W=*OWFT0^c{-qE6*gWa@lo>b}_1+i%An@3OVlHOg|$xBln~+Gyh(Nzj%+8gRJ!p*Uo2RWBfyDeSm2*C(*%#mE`B88;17WL4ET(cuc!n(VufPtRb2h z-qC$F$2oPPCaw7K|GMusT92RyaRECK=>~SJ>$Y(cJNo73QO-H$jDNogxo)?|FN}Q{ zgJIO}nOPTbFqE!QeB@$5BtXagsYUJW z4`9ca^?PC^V=(XT%ITWOp7JR+!9}eUJCuwCEmkf;_*jNt1iE?Y?&nz*kuGLe$D`8sU(hqPp|}641cD?MJsOaCMkuyQ^2X%VgI`Gv({QMV$P)bz3(@yr#9VQ_&D) zh2_Ttz#HZ~nN#Ob<3T$pmQ6pkclxJz*))U&O%`~@ASX75U(Cjh z%@G6>SzGb^ddUziBi4^XgAC&S;~i=+lj9H)if#YT)w^o7re*QT`7EEHR2}|hbXleu zqhp75fAuP9-)d4eBP$PCUl=Q^%C^C&ea5HT_0nyp&)1zUv~Z#C<@;i*N}A>GADOZN zzE8_wr_JLQrH(1FV~xnN1dj(so%l~As(~kpBuiCLC#0wWv#gH=7QyFXApJ48~dT}qyq7YxxllA4`S3VuJH{QxBIbBrHR86o{DMDgc&H$COy zbCJ~i<%miz?DSshQg{rQpRdL{OTfjk<7S+-7o7uNN;_)=`TgjwvC4Ql~q=!`aESm9Dk=MH-cl9x5ZmT^D ze6{EelTcIhy{e^C6AKq$EUqY8%AtG=lx7bn=MU8SjdG+WuK)WL(Wd)3qJ`7Nr;@I5lBai%TyHaO8%}POsEA_4YHMofvp0HL z_VwBLurOnf)y++vV+aC~Vu%FTHU3q}hSp0T)ix!zc6_9?+)Of`o>RT>)lRENmR%KU zWcZ0x-_Nm5mDUZX$r?`ROI6^dpVPMjVbfO(@aNwnRyef!O;#T^NWq|g-;+lS)^ian zeS&3iyDSC0{VxkpobUJDmRFT9a^uN3(BAc+w0)$*p>>VGK+zAJ5=b`hW);kUpkZoG zJW?ZZf%dsrR^i_0Lci)`x}fjgFHt8@qSP##f0~ql5Nw#2Saf15?CRAih(s2xJ3k`1 zp6=>XniJ7lc^ZFuq*%yxD9@S&cz2A1=)xE0NG5JRVvDjApA?_lK8+qIZWHr%EyHv9 zM#aQzaHd#F1fYRW!w8QOk~J?f5=-F(xId zzn+3q_-6aDh}UG@=Nod4frh2Wq1c9m3Gsu>lDQZ1%|f+XlsO0xlD7M#G z*1GnLdOo$Dm=qh^XD3N2n~(wNa7C9ow3qCZC&fn`?tWvXcv@Yz z_AW5RiYg&}(zU96WzjLgJ36*{6}Qzpe<3roz(t(PkjNzAerarp9y z>gE?8Q$^(IzOy8KpZ@@(A&1t0ozJd;EaG#C9dCZavSFwN=s!nQ{E&M=-3i7FkuP92 z>kfR|7TlK4>odd&pKouAGRX?oK#wnkc1|j_85Bi^@iDCcNj~BysvUYcr`g=)h{nH0 zeB9iKhy8=4(5{Qc{4y!c`^q02IUMhZzh{U~P+dI1*d@}|qI?A_-yIazaL_4&n0O-4 zJkMeqMMUoJ56)Q;)fI@?#Krs%VIx~$k*XMQdnZP z(tRzh%(!>IPZJ4Qedl|VX`J8ld}3`R(%r$Q0m3KX@&QKzAxR-o#+5UGI5OtjFD^*p zVp6LPAVJXC4OIsafRj4f59bmW)L+dBI5(>WTYOyO``qmfVRlqviZ;;K9~d9U>Vg&& z)lXY;_M5b2Nukd#b2HIJarZ&HpRp-k7e$UJb)-LhoHyQfC1b`ELjRM=5DYB#IU}`Y zlw_>{z!XqOi4ubc?;(w4%s@Ob^+?0y#^3Q(+RXOIQRcYWrSE zw0WYWbHBSz%#nEK$zqPdx_&bLVpxS;SX(ooo&dZWtO?+2*5N5osc)kaY4GVvcqZIJ z#siAuNQbrQN{Cq$=px?;GYlwa-Q;|ZYg!9E>=MX4pQQET=F(@8T{KrDK-Znvo%;Kh zrkrQfI0XpiQC6#3FgbUY>FxL>KlSaYJrTeORPewcL(2V1GJI)MxN%IE=TPuP=ttWQ zO%mpqm|89AXLvp^BL#Jw!2NOb6fuprX*9?w9kw7f%D4 zLp0U#0NrRW+i^`6Bsb)_(?h;I!fi%9YoMwAXEP?KoLDwep7Mp@p9rZ;Vb^?T*VG(Z z8RAAF#6-+BFpOeyS_baD>wxRmFSiLlS9aK9Qx|J=&lJGK#LTy-Cj_lPbV2&U6n|-~ z^PI_a+M!-gP~Lpl(V-=Pz_%ec5EZb6RVYEc4ojdBY6RHKCygu9cRxyM6D(FAp7kY# zMC*^pa3Up!I19)^rn`W3+|o`lHb`RTChk1D#NJ z)Zz`sEKj(1gtu%sDT5#qLfVx9Eyws)yOxnm#8S_S$irX1`DBb)Pq2DJz(L&omhUw#6m@ymUo*rU=#xlDD+v;N=IEXVK(U zVn2u*+<1doBFNlt$f8&G)fc7t!|PyDKB~;b#zZSM(@c z1Yul!%u7IiIDSDOxel9m2^dc<{}p0@M+G?Ylf9xOhNf!Pxh*BV4|vP^2Yoz#?P-}P z0S1Jk@5K;cZ+%cekj77B=q<5~C!vh3UXr_T6L{!kB5-q$Pm8G$L=NVpZDyxN^58C4 zbBgOBK6DX>w`#3lk6*H~UyP>^kbocm@eFY&5|ZE#c)j8xAB`KLf6)(1EEdfvs^#Yn zoo$ePw|rkdUv>5UE)ly=m1mjL8JmoZT+X}WSQF)|(9wOz$PJcatfKK`pAXKBpgb0Z zc?pDa)!rn=(5t=4@vu>uq3dnTbEm!M@r>W_g#MN#e!qihuKBjYr=%vCmYI~dO6 zuanzH!%NGVV9~ye{g@<&v7tcXVV5IXU4q2|6?1WRTSd(N#9|JXQG;C1^aW()s82ap zNLO?PNg^BcfAZR1S#v0cKX)?f9ajE8hiqxltb~p_fC{=r5pl>V_QPUGr5B3~t0a8M zbfKbQ;g{Pqxf@ONowqs{dN6FZ32QOSvBGAyeGeiV#0WNBAg^1yW zth%QGe>t{|_>Vp$IBVIp*+ImZn+GeKjF~|^P}sHzUFZi%Sra6X&5L9w#r@C|3XeAEUJ|ryfBqL^@G2Hs!w_NtgX{EVcP(!|loI zt-h7AE`a-d(R|l!G>;Tmd+@NIKgMoW|t>#&{lYVaG!?@EjX6t{KP zv=m2jHnI0jZW({p1U<3-3H08*0D(XJhYW#fZbxO$cl%t0Hvv3oZn-{UGIdLc%aH{C zajKkPP5+*>f|XiP`yJ-i{I=a=yI;4bzQ<6W4v1^o@eb^bw8%8{dJGb$IhdyRU3H;r71)UsxSHoNT!AdU3i7lQ2zvg z8lbEgXI0%|yLIeJ)Dl<>sBrZq&AglNO%WKvi`~rT-sEw5dl68q2eQeo$2FS(}QHM zq2I6#mp^`Quj_hOtF2)V(;t6wP*W(+7il2=;|O_?+yGaCfUMpz?g%HZ8HZ-zgBd)K zEmi!J%CbeH(cs}jLF*LoDv#1(8Rrj$LBlO`mx_H;TkL1qZe_J-d^8&wRkeOPhO#@FAi25;?RFOd_zxGga#cjy*5B4Gr3mYPhwH2(#6QAezO z{J>dzriRtHwszE_R~TkNYj4Y?B(VBpT)twxvFo$a@=0>E#C$u>p^bQJoYcm2yhl0adp<|76eF!z_mFB;BPIM+1;t)={$lp0LG*mk`1C z19f*R*6&GKp23mv6KD-Z^rtlXG_W7=#{!DEw>Iv)dT(P$D@rDQ6LEaz>fQL*z{s|f z=;@E3Rl9+nmoO;&FxsH62pAxVZhaXY=$O)`)R3FO4i5&bafW@jIM>!oqiGwh8XqW(a`lHe-f^uC^M!wo=zrbvl7$PecvT-!;v5VNZvuYX z=9Vd)q&b<9+5-f##OCDw`KmX(CzvlsDB=D!v);Bj^WrU`Z;}LlR+jbij{SqgJ~JAV z*fg5P)j*i*x}>;iKXF49s6FmsfS<~P=8@*^C*pGIWpW7znU_w8Yy3?p&+n&g7;J2_rQjoeNH8;KU|OdMA|6t6pvc7qy7Pbbg9$a zk+h_C_+*hWzf^nZCZ@-HIK~{-oyqx{V4b$MfBdjLaAZ6TpA6Jd?NyfyKe1LYh%Ly1yp~MRWj)c)Ffwmt4U=QJL z3NFIYpQqTreP6%bDtb25X3OY@QBZ}BATG>9%&7p8FC@v%5+8Rhg5(yNg8OffwP{(z zoGJXu4$BwL;eTar@2vvg1jQb1%KZ1ddb~O=Z!PD7MH{SLI|ay-k|fD=aKVA7&9|3_D63R0rzZjJ0Xx{ChTbloxKDy83EM4{!6*k<%vilU6!n_RHhh`yc{*3gJ<#i__$OsP(N(Vwn1ZMre42&iFG$~D zi|=g`DPB{FXMYjD z0}wUh;k(}wDitzz(IQS!jUzBh<|Drv;w};^ZZ+amE?(qM%_amKKRG=YR=u6H!p(0* z6X)DSk=;8ED_W__&ucEGV7an`(%7JC1OP%lK_;>I7~|nV>-+0h6`xJm7oinx;D?W3 z+(_3nyU5!XGW-lTKrr;PZ!TYBHR>c+;s}a@OXt*yNk0KCUH!-hy|to0X5s9*mz%@y z`X?d5-FlqBhBE8>o}ja5NUQ#0bC1REw|xTfC-2cO>rvnESXW@&o_KNmu`Yu9 zbA2jGeSO@U6mB872?3Gh3!QoIzKn!R17yI2*$%_Pnv%P55#t~ywgXrAZWw+Q%6}d- z3k!sa<^6#Lv`n@KzY%v0cJ0M?QZFR`vWvR;DA;F~Oqfs!b^i3=JbO$R5hA~Q$6zmQ zj9R7CMXSI3(f_=Kgda8(NYX2Yzpa;QdtUWwd8jxnB-i5!$@MzWd;Nm7*Cd)P;gVt^ zczgw|iMb;euJ)F7^FbcrB27vm-V@LYpCRftE?a9@M}i~kB-oz?GnwTxIR)0#qv9@cO^OWX1KU0I`7Z;_&>epE-!Db9HkyJo(ktJ4*k>; zV=BvtKtd+n{J!L!lq<@ECccVMTuD0OaP~-=o^`V>2y?nVW#j0PA~M#WzI=t0k&fc8 z`rx(Wso2Y_+s4nAUb#Tnro%>=i|yn;0O_t&OW#^}bJ4-eX{G1VkDn(!+fBp<@h7A) zgcrw|^HXDies8;68s|4dD-}C>@hp=xB~TQVoGg`9)RwQvKju{5x)L0o?f5Er0n0yw z{#I$)hCj^YKhKwv+>sQ3XQtu+NvLroy}0hEbBK@xKOvZn*Van6a}U7k!myvWRc>}Y1F<;_sXE# zI`yYge&^ju|nt;usBaBA&dkyix;oFi`Q+Ygboe z@X#67a+$#LGRP;>cWqPbPHpxX}d`J>Te{}9hEkvf@Sx>c@S4JRQ#OWHFg-VI0T zd(W)~ajGFXjtrm&&ZGk#FqXyPbKPhRJ%d$(W*K&4OMh?k(1#^WhxsJB!Jbtw`EgkVOcNr>041oGuh^?7fb+PC9>W7$4{VHoryH#b&5ZI~5&% zd(gCWdEse}m+%%aogz82YbMJ^)i6TC?Za$aZ4Z@!9LEdiI8gQ3^jK7NJK04Pp;99x zypRN=MY$Z$kOv;Yr~FpN;!H|vu$1D^23w2U+*VR7IGzO|^Y5fnkqi*19tMUH7HPO; z68SAASLG4#!h;<+wF%Xgh85+t$<0v2a5vjci?bWIQsg;LI!^qx?TL{A{aB|v4J{Cz zy+wowd;bL;;vMj}ua};3nh} zyrZ{l*l#Nvg~JV~54ZHt_BHFC>3X zoq;Yl4_$4*)De%KHG5q!>~nP-k5%i1pQx$#zEi~5xh&}E3$zu0b(`m4yR(O<)7oDs zuZ{9SHqlD3jSuU_)-`-L&yY~`6V>>~wVB;KmM}Dn&nUF01c(9b{~!npKe(%y z@uSLl2w?|^mVxDuPZ|b{lJj~(>%zlnTMc^dcM!Yj{bwC;kMJMGWx`Izf}n$kwYrj~ z`$ZADR;a%$@j)1beT{WW|Zg*N=}$lx65u#{ut8?H5(m#&Z-;!TGlMl zgjbid_^Nd;-(rgsFj4;-(4Afc?n2m9gb?xJg0^%VPgtehKv zQ8+*6{9fj6MWu_YkVTYBU@?9FN1gp_&PlY^f?6Q(RS|ww#ozs0QTFUj#q-xUMYa{6 zR861N58vK7p@trf9w~3erdg6B9dCR>e*Hl`b1usrv^qndkLZWu7XjV2-Tcj-))Gdp zz18>~@fi&lhdD(qBKu?2L8tE0RvYzK)*pd&nOI!pzMCSbch!A`!=e~1YKRPo?-x`T zi8@bjsc?qg^@rY~{lI+KO_mdRN2w@ZJe|UR2$K_HZ?>g8|7D?#cj99RE=hp;pB(U? zZ=Ud}*yFw$2-xTQXZzhME&3{ADg9DcH!&#Cb|=v?mMBInFl*Neqf@iL11?pAM6Z)% zs)#)k>d=kGNMm`Fw@2vg$}%dH5y!9QLCx}XlSV-y3I8}FWwGb>v}U+TA@p8MOs%C0 zxVWO|$78N%J~kFriC^?7l$~I1lzBdBw&b*@o1i;~fB>-5XA^TVi}59PEXvq898yNN zjr>#O?w$?&QmZq>xAC>KQThWBKRQu$jMMMn*#Eky)WP!sXV0h1{C|C{oKW9))61LN zGuUzrYRtFea!X_7TSn~)RCAFDN_(IMmgVjVYvoyu+F}jncspX1zccd;#4TkPMIuFH z3Ox8Nx*UO<7PHE_zl+6=)l%W~+2Yrz3&i70hDw~%>+-XEhW#q&8bRv^-UmO`%jRj} zK&;sbymWLwB@;?Y;Fu1sb0LF!>t-lO$h{!_b*0n!u{3>qol4J~&hKcmXFEKhSUeWbS%3T76pGh3Ej;QO7b{P$#UwAwl z`SQ+WDYzuH&fn{A=#DX4v$8_0UOBwNlGslL6VbdnMtK*_(b8fFl}t(3MCuT};8O{M zVRq^MS_RWKq?DR`TsiSsd7GesNSyvfrjev#BNR8L2fmLWQxAbSti!3Xb2}Aiiv`1( zuSJX=nVm2&6ZlMgBt(;y**E_7T0U`(E_6pG+5UQQ)O~J_o#Cear@^W;M%dtG|MKrk zR+*E=?MFtYe;B0m%a%tgJTUnoNQ~_PM-pB8iChS46m(>T@WcN8%0iLYJNJ)?auLQBI_EJ=RUXiFNFEZ zDCl?*7dQ8rWX;96{IWRXzwddzlzTRtlNwAx&QteJ%gHZU(HTp`t(T@V^fbWU#)c>_bO1h2y@G-KKR6LgP!Q8% z6wv;~S`wy2q;ge_keKBEDt)}~H#&F8T$lao7J|;ay+;8;sgq#&4-Z0HUbAFQ7wtUf7fT8V36(sbIS6hRufndzHeT}8?ruO!CI56)UQ+en zduFk*--o}_9}igPC}qB|T9%^bD^Xd7f#= zV7AGtg!21TiZ(-FH9~LtTEadI`YAW8n!fYa&3Kxaf_^+aU}!HjvZn*~pMpq}8HQ+q~WKgtT=m#dc~ zx2n4u`qnOF$#5+{X?CDFWxKC(us$AHC;y6?n%F8$-^6L6-{ZUXJ8r>iXQIfMb48s` zfo1@9DHx{FbUAgo4M=qdKBZS^V*yl)Xz}2)x+5ezFwoM<%H_6(1aE2_poZV4ilmKN zkEm~A{!^AiEONyY(iMxpQH!=>Hh$+Ku*7+e(gqg zLtU^%04O1l1(vVhz`2_*A#Oz=9YEYDBOAb2Gy+gqugW_5I|)M<@Y1_q4K)Ym9yrRt9l>wT0e9E-aioqHwBC4qvY-@SM2A%@J&Lb2(tb4K#JBcRu5}% z4F`e{U^H;c%WnsrpNAdxAaMX@2Q}exZ?^rm-|+i!C)BYMAn@JTf|)J`dgBu!K`qKr zR7?SYVLd1G3ji+T05ADtTNdAU`CDFfYZ6^?EB)KX6Jr#l5GioN$i*QS2cygK2!GuE zvX|oKTW>*pegWuoeVw2pK>K<@v|=ER{1F8}sDW-9(S-%fUAlnQ!a3;K4kQl2p@OI) zBwZv$(1Zs)t$0~PM!LER8Kej-pjEhGrukUTz-9-E73S<5NNFU!K5o2t4Qq=_-k2+m zC#;pi;vWzy!?PbOGx80-%9G zp24!KN;h|^seV!s5h$(U979A9$1#XDXc0Yz8kNim& zWes8#_yoAR?J5>t#fWw_{*%V~e(0ViOM5+m)>-av=XI3#RGy^ByE$4xv5;1yZe0Kx z%RaUE4r4PHF959oDKikqFd*+waec4(^gxxaM^VvIoFFqJ3_}Du1W~r(c@z1PRzKwz znFWqPP7vwnC-1v_`8@~K!Sl!s`X}D}-E$X*{SVAQy$tMt$nUAfRB0u3E# zs31TP$7r`ZXmvY4puGX&T8%(?9qqs_`eZr*#}V2W<`D!My&KC=q`~C;8eqB|^D#&O zEdVlu;f)n20pd6WJAWG1S_JJ`Ad3CxW}R1gtGh%jK$gL#L!?OxlO=G*fUSXYQf0HB z<@vVW554Y{dl93?u$M4X0$^sl$B|4fgBzxmdV(<%5YBdx2SBC(7m%NKPxqRBoT3t_ zEI{&~jRHfUx11f>m%~}-1?YfRU!1w~UjkSD^Fa*jNDcbC@3}|6rak-L%+=&|l3D~> z!PM?(OF%CM@?!5diZp^w8*vusxpWM+*zT*%P)HYq~NN{FU;zq~{ z5nbBq5tYZo-cX#y1>#A=hnl_7QnOv;Bruu)O=q%HwVtCCsF4|G+J1g7h0y{A7IOFR zKK(GMz7c4Ju-!s?b_U7PDp+ZN-H9?@1n=$mBssvQIaI8XtqpK} zZHSdHKtLLC7$J^h1WKX5+8>28h>`RMWk0$xPaHVi`(e9br;}Ehyy+7KTfIXa)D%Kc zyJ|#K!c^6>G)x)wN(7;@;z&UeZI}Rjl55Vl#$TbL2<#j}rM&(I`+0Lmny$n}6_?*? z?izY&`=;~XgGcbr{f_R)4Ekel{)V?iwDKdFYayTrP#W3+A(aj7y&!>hf*6FM5M~!H z;M|4t-clJ0Kp|>%z|2MeUMe!Kv3V?bA_gzSzO`kc!%gtXxbqh-fpdp+bq#vra z{OW3Nr4bt~fyxso&tq4^9=*pgPur|^`gs>+g)%D56K5fg;n)@maaBg4FZ%;v6hkQm zYr6+N_Gw3mo(JHSvx?u9w`YB#9}N14+pVI^>C{?)lTA6#)%GDTo<9$;LL@+7wHJ~p zBc-*kvA#uh;;ACF07yWAf-yN}qZw~Sjq_VbUhrgOhN{o6`bCxNPE3fIAVe5C{x<-A z75m)HJd#=U`nP<`tzAxkO^dCP-hlCtg;RwHJ_zkr8!vh3?U+3`4**Dp!|_2Y1vOFD zwj0?%4JvBUY2S}NP`E>=ovz~oi zW$hM{m0BreSyC*@)-MdorIls{t-_Tf9`3P2g3s*d`Ha)-;hjvX4tX_!6#d5xaA&P?ohAL+71SM>9Jz38>0EOpZ@0W{nq`C?I=8SV(Wf2P|fC92C+f>H%Kr@V^0Ig0NIt<}dR$Rco-g+nR zwNdHP_yZ1Rn3L>v;-jiWZRhXPgx*J3=LIx2QZ!Qnw45(8Xd5=iFuY@hL_MrQTZSJ; zS;NgmbyDzQ_gb}3Eq{d0h%qm*xkZZtsLbNVi`PMJWG7^Ylf5ZQu$h3CYT+gd{}%us z*w45Q-3@)}yT0#xLHb)E0Tf3F*w=V--Iy!CZyt8qXwP=Nrwm{)7=j&RX6A6hmSYCW zF(``AX%{u^+i?&YvBwHe96NZ%L=@nxQ16FcHp~$zg>}{^3)UkYj*%SUP^W^ck$f`U zp{sCeLb7Ls`U32%mTW2k$U3w|0U0A(^g%cwR9zQ$_j-&p>7!%h+n@isfBN!$jcq?q z-j2uKe9tBO)Qdj@qu?k4BtT>pV&~u57W?Lo0E$AiX1nNKyoB)5C9rdd;}|*!U<*0H z`muLL9e)4?5`VxrfHcBZj3|u!Ba7_rjSc{n2+fX;Lub-J@7`c<{d#8;E;`Ohp-oWA zK0*|Tv=7I#sty#7NyQ*l45!t#V?BXm;LHB=b5F&zJuMcpUQ^O!7ez7YKT(lKF&5!_*bOb%S?&S5y{(M%`$uKkSdP%X_%O!O0TIy`TU0OAe0E40rNLqz%V2} z|G>SgM?2c-ASbnD366%>kuX^fYYs$Hqu~%yO8crJcF3{}X|D$n2c-++wOL2VQ-~5E z5`tYBz%2I=S%3X9VMhy^GCFOQkMae~7!C&r;|M0nzI$I|+s~7?;=won<1gJQC>4L3=vvyzYKlg%^4O-$D?U_#T%hP1kxAV9g zk9;G_{lL=OWak?Kxh=Yh34q0wWh@2u4A!6*Xl%QX5fPX?hcRa^&EQ1hD>@WJ7|Y8` zaMpP(5u4Q>bxP)sqW^n!)KCHh5SZ09n3Xkz)k6X+&!rS;9=I zf>d+~3gY-^-nU_DsTHD)VXT46w>CfoAXFOh`S~-qe_ld@XSe!$sXWFa$W4Cg!?dRb zB7ufNy3&WT4gf(ckLA^z*5p|d-*Q_E!>$aFudV_`=_(hxD!WZIwhAy}k>nZTI7Xi5 zz}j%nVfRBZ==Wc~eEB@dH-~Y6&TJcoO|{aoy4;Us4AT@**uvbo3&3Cq)Vv-dUF_Sa z10CjM30v`I#Q^{UMA6sniN76Ak@LOS7f9jxYV3kgC577N0=S@ z{lR!5RqehD!w_K@A{i!|Ze27SGn1YwF#-sJB!j!L0;D-+XJ`FhaS=jRC`!Aqv4=a2 zR5qa)_sB+gBOWNA)r!E*;M()gwuA^*j#6px>$WzmJ_AB@uC6twzep(pra$7cb(bn{M(AL?#Dzh^xHG%vu>~vNSXR z7|-Z06%2`d1Cg=C;09DRxj_G@#yf2+uPl9XI81Q<`~s|9zdbP-eJiU5PSYmWX+;ZT zmO?B&`7F>+k*uuw%($lh^DBm4@vNv3B)E^sc^$$ayiYYK{PQym0aR=BUKH zhzJ2GfCZ#ALgrUr{U7dm#a_mJ;P=l1Z+Y|Aw1W8Zq-X6^;h7f`WDrLjb{5s1PJydfqEL~bXr#y7S6#rM!VhKadK<9Xlj^VlmL|E zm_>+ZKm918G)H8;kpeNS+8`fii#_RSKxq76@_XW{5aYsHAA{$vB6;Q-urffv-kz1` z=)L-b%R!nw*Ll-ko_FB)PL$KX?Q~|=t=5PLmWz@fDBnX?hvSlu<#UcJ8LhG14V%GI zW%F*A+rb2%)Tz|c5shx@c*Dou|6nVQ1pu6Lg-nedLBn<$U_Fm0==u((R<-Kur|aDg;oEI+OrRIEXi>A zEqi(1fm+T_e$zcKo6XffSX^C$jP(OkP%4DA7R&-sgi9B12Eq`qf{{00)@)Dw|K#ru zVA$*S(#w5xMOAA&s;GgS=3 zrck*<079Tf4Vw-J1wfzsqVEXq+RHN!gm>R_kB(c>KVMr}MV916Th!6ZGYfPOpxtg` zW`1t`$y2y^o8}c|!|_mtf{7GVagg%IBuoG)_1sa9ak`L)Cx7D#?X1o8zW0)=&~UUc z0lD^v5D+?mRtA_$1uuN+5ny=;Weu2ZaWF(2)<-utio71xF{1Q}nHfnkM7Gw)^5f4S zdFC4I;u=CDh`2E1%9p4SjUu@_VQ)&O;p=z&1_cLZ(7(c7dJ_@fcJbmR1f+_PV_ABl z;2c-ds;%x!;hC!mV?Hh3c@tJ|I0)#O;~v3rA`)K-gBYkK3~kg4;4JnBIO&w%7ZrQW zEgd574H4&pryhO;Yfn56cWnjj)FH~)cYEaV=kNM}^2auh+ibj}zmHl&YXP)#Xj2Fo zWazzc1225;N%UU04!1T$TNFAfKmeMkZaI8grE~L@yM4}qi73zK{eP$g$a4dzTCXKh z04W$}5w%*FJGTIIXMwy_hMf3dijaHxy;PeBlSy{_9`P>wkx!}x?f30Zl?vS{rf8W; zg?HZT^$;lX6)n{@!?m3v1x0{ii^f^}+Vlk?B+KJVD+;&ptdOb3e~4!~f{ih_OoDqI|5 zczyw`i{}tsIFD2_R4asvTTl?6Q&m+oj*n;3Fe|~>cC4HD`(*gLKj{3DXc#6G+LRUjR?|9fYg9k5UA1=@JNgX z|>Z}nv< zn>+mNb{k>T8Z(?iY9dr}ykTf&hT7^|Y&esYUDX(6a!>s_RoKW&pPik(aa7}*W}T!+&X+gRCT*lPxh~3ufVP4lHIO7no+YrE!IRHDh(HLT)=*9m z=MKUKp$hzB-Ep<81{|*iaLia)S;E}hIizWF2Y@3s=vsfXUx5e&0){{rDm!ITT(>ie zIF11dif^f2r#?bFlgH8AY=N8z{f z`zHpVYL%A^_zd?mU4ve7&eBKDbNu&LIe{gGKnMy{HMFS5IdqY2tcrg%Hjef+OaZm6 zNg}_uJeKrbIctJg`6Ouw0LQSy92Y}^TN(l@2@DYy)$<_ob?a6G3opGDPL&zx3QCP? zw1dffDgl<4N1}{@1Ke^ClH|xt?i+v=`XXFN3`b57a!ntB04{E6CP0b{PnDG|6B+I6 zGu02y9*79$=NJ5|hQS@XdG5Xq`hAzb?G}@!caA!gO&C4#n19%%nre%_tthsgw(K@`R!CC*ZR_&?ivmCqk3Q2Wy#E`HhCmp~V8iWM zDw<^7_}mkt#J8IMgG{Ik>f%D8Lc~T9!CFC-JFl0n72pI6z=|)I^a^kSUF?y&`d)lF zj>G;Cc7TY06uw|L&)K&@?{tH&Z&M3YbU5)JYLU6B2q1!xAZ)jQC;|vz;c5?IYId!g zy7PuDph>}_ZIUNNl?%?Y z3Da>ykfZg`XGwoU7%Eu9MN2CG!LkUH@*?*P0>S_ghpDVa@w)|3z7hd}0PFihHJoXv zCXTUPC4>ZE={|BK<2nHh#XO@WeC0^z+iz1eoPGpl4Y|K(N{@V9MVVfi@#4y?c#KC1n2IZN3XC}b2Frp zshM^f0DzIE2?Pd8GeitFQkyCfL~wHcp(7sT)FKE!8M)w<+Bt|y!K(D$CTfpaV5~th zOwgH~Y1A4|5SuCd719HM6m{5DOuHyg+w29^cm#LT1j(B6T76&Jd-TO~ftsL6@w8fm zSP>8uHRZ)Rq81t0Y=DPHwJ7o14|Cf;W5mAf)qR&Q2bWsi*Urt&0TXq(4Bv!B0RIVz zRAHB?qVUea0^~XJ!4NQZD#9%d(?gycFmo;Bx4D;|Ddn!dZsyZRGqUMNvHD}p3cAQT zV%j+VB_d$Q$jzCr_B(Y<>h*72XMV8MYt!AtQLkt(t61t`_G4?^J&7ElLH`0ncdqr; zLX+o(rZuX4j#Y!ep*7YDyfg>WZfJzz}BMCa&MS~MWD9m1Sle4 zc3$yJ;Y@3|Px6W@SJGj?H=MF#iej6w^X3%|4F`*wDq{`+G_#vW@5`VwaM#@29Fim{ zN(yXI`o)#9)-AW(JTboQl8QF!J$^|2$jh+^17UIZm!92pJ4Uo;K80AVkzmvk>1v*4+n#z8Cb)SK#F#C?CQ14p6h#j{xnkS zi@qykw=aXPfY)p|7!;y1g<;>U)L<$oz4SpJCe5HAN3y@uF#S~fY3##tBx+(UI=Ze! z7+fZ@2>$LU$9WQXwtxK(dRY(WE-b(rw{3GGV-4~~*S(=(SM1Ny3cX~rKUH<+g+fo+ zKX$5;&1z%GhePCP2CdbpSm8AsCiQ(e|8p58R!Sh`{`$B^Hm%IM=(jJ<&jFS(6L)=Y z=`Cm)wKUY3>?gjr{^F;feHnCt+`9E6*jFDEGLO>&)x-A1wUA|*mltfVjWf@>=nVPm zMT%s}s=HGynFgYKt*i==8uRBzI^Yw)-49+_iQ?`mM8P??qr^934UB1W3mY1C%D(E* zMdWrOLZ0Vnwfsw!`t2eDr3gx^qL{C!J1qLbQk8ZvabxeWPq^%{%_&vF7O0H5>-FGr zTS*M+q6cmx`+9m&yvcP|eCH&i#Lhg+YDQiGq+pa6s|a0jO|b=&0;zE2Yd-Rk7Z3de zP9Q@UKTMo|J=kn{n~N|==_1k4Z)Iqu8c%GBkR$F)xn0zByYWmun0_W=ZL69q|oVh$M(tV8rVM6J`FeGL_%FTq%=b|OkkY_J6FgC(!}!`&LYGD zXEGRLs**LJ5X<1vW$kNQ6TVvrXM=vO zb?#iA=LiA~XKk%EcZ65E8A!WOpFfASwKd-sb<+_QZR@6Sp`B%3NG3N`8@)=pc8?+bhSPyJ<{R(fDlkH3 z1Y)aeC87|agdmC@K8E3*2ww8QJBGpB%(b0{&PAkJWH;gVhO>wWuI=XWdp78a$vR0g zM5oh*F?QR>`|z2rh0!*tD=&@dcE^4RHJmdT_ScYRLmz6dZ4Hn#o_d2v)&A?X7Ayz` zS`4&Uv@B!ZgqSxmRIWaDoMWAKRzvqO<)rF~zR>~r?GCYwEX&|>Q{9ivec5oPAY9+g z!}n~^GizhzCE_*=w~rwTs>p(wmYb0W0}O@(IA%mT1j=5`&7OI~mZ+kiw*|;TiO;*R zc@A#H?z1z)`;U8s)67u#*Nn}uU2X~yf!Q1MBuS2Da19O9hTw(WJbcdvUF)a~?7)}< zRRY>k=El{9`8V3H8}&=pI* zl`$tGh;daXv*R?FRmOeQiw_vC_F&Ttp%8SFgws%i#2aj{7`Xl#7gD~Ta`g*^wJgD) z6@KPO2YN!u3_icpsYe$DN6fCtcyBl(Fam9%ki(JNRg&$VEtz8(ZuNJqHLSC6X$m;@ zW!*<$)Hn0UsXGgV5g-cJKK}${kRo(|766W+p`f9l$RAMtsJh2Z91W+GVrxho!n8-ADoLKr;z0%B-rE{r(~#BJTu zvEl6Das#$@U3PWZEzBteMu1Y|eYV?%vGxPLmbC2X$FugLhtJzcbF?}|C&WNwcG$pD_C7# zhRsHMa+8LvmfEtslgCoA=(g6u8PhaQYB=SvcNSXnc+$wOdqV8lphpQUZ8ZEWDsQ zkM|!xM8*~f)q4`IKleOB(nyEN6!p7pm`1Ey@12iOMY!1iD+C0s==s;*d+)APoz5~w zVOP}v%nXy~$nzYIU1QW6PA{Sm23Wd+x1shn;Z=%nnKTj)kxc* zUa}~*EMr`MY-CJY?bhEO&A?9w^K)~*l%^?|H|m~6V|SSd1I)0wg);_Jh|Sc$hh{Im z;bbwX!!oi%Bnm25n2Wm~-|egJ&oU7`z0t3k04VZdGIpan((;Cz%sM|{#ys<3isZ&( zrM<1IkX=)6-Y{ZauLhAZ{q`-NO9T>b_Rn|0mw)KD-ygSP0|057)&8>alvIzFG^%k8 zr;&0&ODrHK{U@IO_+RbzHTKyLou5ao3y!LVA&C^29he!(FxfuTzRPg@W_9N4jrny9 z`)ifA<;RI;FRo$3%gvXo@y?8fs8MTGhi3nLmn@u{e~=wxraJ=>9@DgNB5<|upeb2v zIE@Ga4gv@9j&L!bupL~v`^uH=C0HleuZR9D2|%PPCAjfF6WB3~EwWP&X%AgtqUlS` zGavT*aJk(yRNBz65jzn~Dl^{GKxZHR^AGPjJa*O@4CS5Y&R<0CO69n%Kl8GkYU80d zoNP9}&ZStyItX;s`jfr9^1k|^&$Z_t2l)h|EHlNR3Xi$iOBZ6WBV7CZ=W){)yaHfB zvbu`)`E#`;yt{}68p?a{1Yf$Q6?7Ovis;~0o!c53Hsa`WyW@dc51(x(|y5CO2?vJ-}K7VKDO6_q(6XMMoy*fXo2>0rJIV z40{9EJg>SnHQsqc32z~bV2p*`WxaD6sa@}NH2`;Cxnjff^N%hpoCn}1GfRLa1=*k+ zRtb>jIg(*gl^iz4yx~MK(Ok@{Qu=F~*e8ExrSOUrOsY0Qf~3BuUX(6AB4 zq%hg`+Tmr?S1SbpK77c-I<+hZ?so>g9+&__0;k|*b%p%|S5WF*5Gh{@+t6?V+0g#5 zKrtg=AaaaUKcdMm5wudV?>urA}h z`kAGO+esJM+%VYmxvSBx~af zMEo8u(Nk}F;DJU^W{=$c$i01GdeYAqKxhT+T%e0v(t+WM2wRM$^6FB*6eg zF-QrN0Npr($_>`8T|;(b)wPFXl@3z^K~P0EQ-X|T0e zTU)~uk9`i3TcFkUH>RuQ6czj8TpDqupu!L;4E^6N14<$74RGzb=kfeg&s6p0RK8bJ zXWp<2tTV92RK|Qesw5UoyOw8c7>8JX9RNZQLZ=YA?Q>qNF^#r+!-+(d$($mvCPUUA zfO3l@L-LC{-C^)5jpJ-u>$zzspRx|3F1kXM71bWXt?LBg50CE1P z5(gL}4$Ky8GGs{~{k0XWEMCXsk3NDIUw95KOEKGy5fDLhsqR%*qT9Y4rlG+(3+o)f zu9md2O&JvdnsDFYkM4AHeYpHn5tGEMD$jg7^4uUdO`r6JlZAIS2?PyiEs`X`+R7?i zmSdsS&3^Ln5B}7CUVmR@YXIN~ABBJgNIDlN<5%w?%SY$$@_kLdHAM(@^NeV4I}{q z7lBIyK9>0A$EmBjZ*SC<^M6ZkEF#7BXA{DQ=ExMcye5z)pAlPY(>fXQpA?#Ew%g7a zMcxAw{Fh%{9||N4=PcMUMC^`K$(R6h)1{}s_(Si1@zBP6hFG1O`OQ`@|M6^?A*Aw4 z+8W0UYYl=xLn(dugKTKnHKPbM5rK#xaIi^+JR87qA125lGqdi7ZvPPWRIIkqyX}KC zu^&*Ppjkn40L`U`?wM?nN<}8C7Wls8wIkf&Q9i$_&u^q58+J)uJ*><^{sAb*qljo z;hcqIxAWW!B@n@$n_`nALqQNPo+=fJ_Mx_#_n)TOE_0H7T{fqu7tw>}Y7%iqe>q0NF5s zut2Z#+kwp@Ltzj;{&gSx;L=fz_bl)$fAgVVJ|A|Cb^%n8-lGb|$?_;wD9ig?3Bbm| zh_0-paTsZX!QF73yV~Hr0D=zmLN@2q{bk3j3r}axzqUv2l@U7X3+osAOH8~lHuAPpKEns zhU3wLrrlw~v{IHn?Upc(fA0{6bLM$*UcWuM(1!SK6`MY;oH)xP%Q86IG`wp#9(cmW zF&kKyW0(!m8?3>Y4A$j7!W00~QE0vP<-h%<55MOx4ssj^y3sxF=s$68(CN%n!OKcf ztCC=CXgEGf)j|NU#=;m=X@qapg-r(ml-6*}NP=Ma!TauO65;HVv zV>wWR{<9ys@~33o3@EB#E9OjL51SvIK-naY$PK`Ax%?cS%!AI?Hz}jeDtLE1YlkF z#oZnaC!PIOSJg|ftJbH^L2M3_CNO#KqednJS&Jac5m^J5uR&>YSss1EVVu>08uYgT ze7(2)t1GM5VVy%1MNNWQ!&FiC(AOnU%1A$5)-~UAqz3a1w zF@^)LEz4eg+fTjt%;Ps!mlxse$f!4lz2T%#i5xiqg-4h>gQ(j^P7FOC{kP*D<7ws% zpZfi$mfGsctsYZ)=5-HTM9}Z`8r8UlBZmvs!X(d-83SW8Uzs65D~!>eTYw89=y>*5 zU-_{=_%DYwjsrL7cinq$e$)9&KRf8HVtHk`GU^Qt(}WUKVcF7SFWaR8Sl1#qO;RLD z0_WV*U;qA(9LnmtVMMO!7s{Wv+7quwTSOS?Fxl|$4GjlL>7a@ToU_QX3|W@I+8owo zP|g*Ofda7t1u@nr{KRda{G)$ynBzJW^_NdP_>%vpGdurmzqg9zl|?88grSB~z({?o z>4Mg9_|#hp0Hgg+XL8sy@vVEAp^DvdCcu$`Q~uvFSuRikLIk*U{zB7T?FcaO;OC6B z*6&g3bxF15)`Sq5>gXlYpcI{~={vH&m&5GZt8Gnffu%;_fFeiYn&<%(@Z?LT7&gkiWY zVp7L9U!uyB&-1*gNpCn%%Iho7a}1LNNixJ>FhsvUK$@noMad))q19?(Zf>S{qQ=Z^ zx4rmxeRbDEU zn=_OK(lp($j8X`&8b||R5c+?u0sm(_m5($DaYux8{G&77IV8i(|6&WHURUSJ zO^!58o4lQd14AnXb`EKpVmKIJFc>0DGZ?n8;vixnTr4P^#kIi_R_p*YJG1<_B(HnR z^ZReSvJ(zfaD8>5^F69NGgKg?=@2U`OR#y0P?tAaW4Id*hxO$}{#vW{$(gqd#WDd- z0Y-ao-GOi;%|3n(a zHDFh?1P4{!Kb3fqVjazZ7A`J6I9Pej-4DF?#!-#)P!0NP-~axn^u?S1J+UB)0gH|&YRDUH6zAuspTnRzS-rrtOXSw(?(uXlho3%TdIk^ zob;LDtb-T_F88}8uB-C;qhht~jk-TrRQB1WEv zpLqYFXQ?)<=h-iO>xYo1-$Y<2STHe+8huB=`qDNgKr4+-w}V!v4N=NRZ4^Ohw3yrL zta0LS4Kadk8_?2O{tVTN@M z*12t)cqkNM_d;AoGmsh6G-Ej?mM_ixa6b%+GQyon$SE0l=`Oc^^4(#t`-aoSM$*5N z)c44fB!RIOj>la~pp=ld2-!l5MIe65?#0DrM3*l7%1b`=u5UQbJewn1rhVB%fAMGS zX#R&H1kwpKLRUs0q_otc#+k-?r1oZ)E9&bKqqcN9Aj;5 z4FEvwKHc5;{$o4gf+LN)yyUMx@(#Ul?x)f$ z^E%mu#AYCbKmg7RT$;h88Elrr84KsUH#ONVv7uo*%8(cUIA)kUN2oP|FxX*9lLAB` z(e%*#2k%`v)WJ4viS34OKX>UOj5Ua&7~4%9!Z+QJ8a9WR zVX_=rX#}LVTof_@NB+tj$F@+5_|wulJJ2G>>H-T;7tBj9>+1M$W7L)T1x%Part zy?=G2C$t5}k{NO5-+cN9dJ(;=6#Y5%{6oHNKx3Y(`eSpu71(N2SuZJB)v+ zME>uaHQQ)7;cSv0;iEHLO!!6OrL)Kf2_!dQ<6z71Yi(gjH7meSuq4oNfW-Dc{zVTz z`gMnTE)6^4(L29mR)bf9NE8?0(MhVWu~@KGTKsW@sM|pl$IyY^c0sotO_uxgz#^c+ z;hTg6u-3w4IhY-c@ryd&mr0=N`4$)@Ylk&oS1ARh6s)yqh0)S;E&1jz`Rn&Ra3m+U zOOEwhz2kwu`ho7HTYrX>7OMfH8BQ@o7o|pEfE~m#@}k>SI`sP;Y#qcgzll z%Zy}ReHDezYR~f&d7i?$97M8pl!q9ZNkMUl`STawbtJ=X*p@H+%pdh=p>uyPO}2k< z4WAU{_tM$geH-(J>46kMYu_^@j$^c1EyQu`C4loBgTVlU!2ns7Rkh?Ier{NA%>B<* z2fw0Inphx7GDHjW@A>&h{`k_g8gl^HSq;b`a_cAV`{ApvyZrQ;9{e z%@pv?qZnty&R8M$gA1+p-@%$4J)Q($2;h8oEbT%l4w@3SQ-ZL7MIc3)Vo9&phjSLr z`0J!J)OFGE`hI!M9|sdaP*9|b>j%l~!ujvL@R#@g?h%~QzL=V;`r$8o!?y*J{!V~= zEmPl%}jTa+a7DC{l*XL6*y zK3tX}keV@{xE|^ucc&OuD(f3S7Y-2U7`@&A1dS*P*JZ>jCxCI_ z+=9~_>FO$6mO}CzVi~HaGp;ncvGvh#vMIl30989waSWU1aLnsN>}5B$u__7wGYJrq zL;RAPn`F2tWWGE9Z+feJi1>wlnr7=BLrOuD0x1QeVw!Udo8_=sUU_r%d8OI5JASJ9 zxX3z>f&kriyXr$8YK=fCu(cTW`&eFF#P#dfA&#q~y8nft;J^Q^4iQ0~IRMJ91Fgbr z+*vZ+&NqI=!+-p3C&icpQ)tWXyL`EIQ#}7W(c+8$P!9$Og1FMzEt4Mn4X4(X7?4&_ zp@t4a=+Hlpbl^iMMUvcRH23fcW5Po(uLYq}8P38QgKRkPVK;VuAy|KssLGqKd+0)p zu%nm%{N)c{`p$c?wX9sjvGB~--t$7fxO$7ygxT3y^jBA^zfDeRf})%i3{eV!*67a7 z`gvj#FL1lk*As8_r_@6y_%M34;L^INP6>Ql+$2SAa#&+3PaMFy@3FKM^+o3@86ytMdx9miknOb&pneRUKoGv8>zH*aAmIOWUUpa{^aYWNZa8VsKe zN#rkt@vm7OY!{{}T>+mOw(!tNfGkgt4HFoXfmoo$FZ#;w#gRASRP+@P?d4yE7{d?< zU-7c9ef95u;1frBP7S-_^LKvxN)YLJm*>#p7xqBWWv_Tll|obe>y&To6b7O9(zOOD zwQj$*@zD3js*3J16r@Oc zOSM{bmlponYw!Q{_wDvPr;VvL=m79GK>hERzy1Hb@!~W88^Oev7H-Ar(i+Na#GC|x z*WCvE4J*}ts4q<@>jHUt5}&}YXhrN=tyhzQ&k`tfSr4YAD)(ir%IWfOz$ zg^3)p#FsaM4Zz~V?M0%cC5605o(vh#%wT0q085NktBrQM4Xu4h7g*m~bu+`>81&7V^vZ<* ztqa`{MP4I4cM$8qMg4fY-L6zYjWHMwhok40-zy7L%^RU)=%DXH1o5nCN9~`y^w2N;`$PIDj-08tGH(MozVf~w8{YAXugEXm^2w{qt8iR4 z(*QIGRHQNb{Zj^Dp@b1ILpcFk=XK#t4z>ntoe#+uhcniz(U}b5j6cMVh4d$nCagZ4 zhzQtPIA=jD)gGH?6lV8^e3XaL?R1eO8AvOnVf-7%G4_Vtam!!*=G(d387?ebMETv; zGn&_ViS_?sDb(W(oNMmo!$K8OyUgql=l8u!)kdWhhzR{&uc{fhJ1j}uOlut|lVnwK zk1LQ0(Q41Yh=PgR>|TD$yFO3J`O{>~fhnj%-zl&DzGMqTD&7rh{RvMxRL7*W@Aq)agv8tTx^j59nOQS9d z-1TDQR8?E<0k_yKItY{N0qB=wz@gsc5ikH1DV1D(u&XPGYhYAejoEdWZg z_}uxQKf+UJ*avp5^9xH)-}txfScAa`r7TGrh2Pipyf2KtSPNrp<()U|pK=j3Qs@*& zG24mw40IMCXm^m9A^N>F3ZJQu!~q(uy$S-zARsI0zv>H4F}pZ zi=BudieO9*tplh)`|dog7-1NJ0&mo%mO$e#+KD}PnasN1Iwap1^nF5;3#d}FIl-_$ z0KmTCLhYI;Cz;SGw5;EfETY_ zLqMtu#RKCWcTvg^@BjcBok>JNR6U%&S;!p#2!UTHC|&y<5ESi?NfeSmp?}NV$9pRJ zt~dPmcRqE{=Qd58NP}Lo_Qrqm8j8$+e*CdVE?->eQXDBH*#IuLP|6!~jR56-`(_AG ztq55dD8fL%NR*=6=^zNhBDoIhU$eMDHoQ$HZXTxfdvy)FW70EMV6bsWk_35{KzNiS z1&n*@N)!U;zk^}mL$z*YfX>V;-1*M8zU<@oeeeiRrD2~u_2u9F|4P62LmC!Lw#uO? z*~p-au&+Tb48-j0EW$8=C@O@j3W2K9<2-E*p(cfucKS3Pzwt_A8-}5O9U@rg5C#E^ zwQ$zLF(b<|m^_Cu#w&T!gacH0+MBd2orsbWsj5*=OD*6P! z>Xv_g+n@a6XLfjsCz?}nm45Cm-~Hz7^N;?tUR!(Z{P`IW`3y;6sIcf0Y@-0;ER4yKB|})}Kx~V@PKMq6 z&jB+83d7J(3>V{bSaSIjcRY0e7aZkzH0+=IE?*9AyMBHx&hxfY-l&fSUN`F|1_zO6S{xl@N>aSw^3wGM*$p-d+1Tvf(`zVdOymE$>MRBdaSaZ(`u4Kv#$WXHU?)4%>sUmpVvF|NE1^%abxGC+B*DkJ-1x zZF*iN%bEOV-Jr!1IMr{Dal@S07fS$);KgltmuAIjp$L$L)aC|-R7i}(Gu2Q`5I_O_ z*+f1xU9iyeXwn}9;U$;}R?C0FzMo+b-aAdG1v9tw!xl2%r8#f6F_t!ef1#=w=dcEw zfP*B?<9Y(d$XuON+dS`Kw%7x6Zy2u73%Jb`xBx+n2^^s(W(?asacp5v*nC&%J&#rl zA4Z_)Bd$Em0uqUYLb?fcHa~Yqit*+>A@lx|!D3~#=5!C8lVNtfEH+BRd*R=Qx^Y+z z;4}g8hGk6oierSBH`-rO@5V(f$(xfuI-O6!fhO8dfPAU6;6)MNyQrT#>OGU@$Y^`{dm?=hMETQa+b@J+JMhh3y;qK> zYegY*0g2>TUyAdE2OMIZ zer2LEzPI{1Ra}>k#_oWr*gRs%`G`};UsTTevbo|0ncUrifYo72l$^IKUor>6@b&97 zA=r%4{NdjG)_~2cb~RW(vd&o=k!1QR{)ZW-&wtB>bnGtbi5@{vrzeQJqf70r zZW7TE`=@|e`XKeEG_xa>v_sU>%GyM7-!Jgjp2B=HVtu{)`jDG3D`oehCg=fxClRe#LXK0(-LSV=3eP~ zS4a8Il+Rx;wv2^B{z{n%vtp}@JSSrG?sYfhQrCx4wiMj}N^3QT&Y0&_DkFh5b~Uwe z{vARmqA~Ho25S9p#1eu9Vj(?Tn zH&xTiqqVjIm|GO4ZwkNo&nj`f&oVD^T&o&n0JLbD*_;5t=4Li0KA681FlnL*Nc3Ou z+lEoGsY2ggu1;9y{2pB057_5swz|V;Uq;}in!|F~g$odpXN8eayOdre z5bVRWC2XB)hcuTv86-3h{gJE>UQB8)h|dHcRM5EdOb?^>(f# zPAUM4xneTV#~w&}YoH8lkIYMuj-9(eAFL}L&34Iy6s0!!82j;6PLQenrI=4q8p6L5 z7D${FQs@qs4 znR=jBIXJzl9tzj0pFd?D4xq)GXUI~+hBn1qER2<_B4SPls&ku%)sXFM-njJuE>e}* zXilOygK^}#!!Et=#=ME!<$S6Mf3w-*cyzQi-Pdlb4%_PBcFlz zcN2}_PmIxY&#y)enGy|hw0EuL;a?YD=>q0@5fPm^gN)yQkT@q_{5fRBnU5#ZvGE-- z0v1Lsbg;EGuduV+ZfFC^DmKR-oZW|dukTb_A_lLlL&ppNOf~-c1k`)I(wQDCZ4WJo zZm{+|iL0sBLCuWj%NMBhjC-c%I*kM;^>qt_0_hEzHw1frW#G#NYvmK${bj5VQ3mtJ zr_o0J7?DeBcCE%CY`&^v$IdTXzb%oPX%b-j{4WOZd!=JB$=dD-B&fa{rL(+<-`}z@*>PQy3OsT@esNodyztx)N>5!FWYNjt?3IR>?5EgZU^e3!UQ@DU-D z@99oKdZ+l$&(7>wS6BVm-SmhZ>SB!MWkI4}3}ke0BiXj*aVM19M!sR9le{d)SJeae zoHx6`j0b{L4eDMRES&sgDN#IC01~!|W$_GJOq3pTudTY(X*(~O6njOmNyM?%2tHO4 ztjr;Q=F%g8gNj5lmal&@FOEXvF67O1R zRAy}G3OjCP6rFl?RRF5RwMdyvoF`U3dRIKGG@z6}fMFo$yYS;M1?*mD zm&dj0zm|BOb6~TEHlo0J;|FZ>M?WejR_+Ajh?7GPQ&1z-Le4gIGK1#Jo!T>!^Uz~~ zk2dXaUTc*BBU2pOuKU4`OT$@j&(X^-tZDS;xTn*AuTD2x>9=41lx(=g!-oVHSB<}| zoSQT0Ce?uv>JI(CVQRZ`?X4ll1xw9$OB|!vL6lVV&E8#OH^daErDzN4tx~|~ z9DY=EH2Hezft%YLpRt;6!GUs{tS@wi8x5=~EZ(UDHJEy}DBkXcNRw;*otiD3s|N<% z_{S2V54G6lG#aV>kOu>eJ%Sdsa zoh%%)cA7P1ZExZYn`*3+GkM*fdRo#AHoW?2TS&s~gtMf&aIirt+2XZVn@8;Ybcag! zy_E#5-Hgd;kwwB+}^z2od8~Np>bgzY2BJl%Nwrl{5K`G#+xL%+_ zut(Y+aT$APRv-=odLA6x!J_LlhTww_GU_iqMNR>wS0kLC-l z^2<41l#Gq>%E}5^PXFm+3%+|URnYij!`#KiGiFo~H4<2NOQntL-5Rw^T2(Jgy`Z-4 zx1~|^ptz08{g%JDS`Xqz@vB4@Y2M8%uv_?f&|vah%t&Nhy9rUf=n2F=%`y zmi7Mdf%@`7;dTc$Bo=$Uq6yI2qu?gI1*8PE9@G%!YfjKWrT{roK6+v+bPs=Uyk zv=S(5$mm$8U`~jg1pJ=7dOkvgPLKtCQJyo*EWOP$Kf5Qt-&)>0d79|@B&b=Yu?vr zp**wVTceK5C=CszmLN8qpWQ`D(IvJ(q2?H;VKQh;ldu$;acm5x=Rn)* z5h_2U{Z_o&11+9Ge%Of|-^~TY52snG2RVXyByM1SUs_vgM{d|@!c9Tpuk<^6hR3_z z?BzU5Nk=Og-I3XA+_06QLFR6pkm$k9^Yj~g17;Pe1$Pf~I{f^ht>FhNqA!q&FCR_r zS>&kQ;dm9x`98o7-)a2qyP-xTIcc=MSMc8mjTA!?iF3ULPvV05l5-73 zm&68i61G4Gu=dCaJdu@sEX4P8t-T4i<(Bomm)GHMi*msDY>*LjhyoaIAK;!45yp%28LpY#+!ktN}&|-Xj zI2CU`c#8n#rtOZum|Xylz;Sgq<~9O>zvWWcLp?W2L{qY45lZg+Y~7L;%K>A1hA+$B zGB}DH?JU4GKJSmit`CN_gsaa+dxFCX-DSyZ8KoX@)e6@L zBlqG5c?H|c(p`XI^q>v zd>Q@H8d?_c(gN_Sr&r2i8Jd`6-&ViQ`yx+t)V`zUxN{lz%oxrf>Zr=wA8ci8_?~V^ zfO|eTq9J~Mrv07>g%s`Kavp-)nfP9Q^t>dSjr5Q`E^F}Kc8dS1`SZS-(Z3tY>K<;A zyq18y;rl-<(;2jxw%zjEj!RlgH=b&O&Yk))Tq&oG^RSS+w8$`=;toT$F1O9b22wUd z{#f3TG;KYf9xk_y+c^Ak=z+un9^I+$4$v^BbRme}{7Um?4hSU^ub(l#v{$QJUC%D% zc%PqW*w8lmHvDf0g{g)`J&Wrfc#4|!qf7_U9f;n8P%Aaw0UYMZ39QJ2ewH?xcw}ce*&nIpkDU)RuxANTN%k4R~`y@rdBPL^NTk)Sr!gT_7 z{dS?+)P~Lg?H|7#x!l_-U))zQU}VT$y%Fi#0U{H7pMI%C>I0yXh@t}jjH(!vq5z}_ zr<$uDv=As&!OCHV7aQMG_@e`mAs0y`GKlfJ5=Lsfzs#Ue?N)m_NfwS}w9*Dg_hie&PRmmoTj#*2F?zhfB?uAh`kA6?qNSnJUwBuOm!EcX!OM;nEup| ziYUvm;AkTXc8FOjI(2pW&6SCkGXPGsOp~p2OyAW^Y|4xa1SzUzYZNQu=6uM6)0nf4 zm){liHx;4u#j#rWVk3LL4^nkYo1-A8_JP^>01wi|Hs4WFxe)5=Q+0%H z4_*EQYV{0docp+lB+`wE5rMTQ|3Wq=R|ONrN}t3Tz9MKf>JH@`y_X#Yp zyT+=YsXgFo<~CTI^Y8~DAhDs6KzL%kosy_#g&X?qkYAM4F&#jz9d{H`52qMdsX>_& zj!WH97hbiM5-0biVL8clnSo6iq@)G({y-@e;^Y!!K?IJ) zSL4n!&&nS<0bT^hA=?xRIT|sS`EE~ZMknJ}aLwa6oPb+?dlX)ut%c7;b0JGk+{Nvc zB5YT&629mYOy~ICl3$CT_`tO7-;a<@Jr+D*VhZu!E#(q}k$(6}*e7v4a~^d5z?bof zerkS~HTAQmr=EFPhJ#`QK%W66PCgqkS~aL>qq=4DbsDk;+Sj+k_IsxnJm-`+_Y;g{ zkahMhg{pUtI*7c_3RM!YA^UhwJoGm7NLAG;0RJr0IoX3)F!Yaa7tqP@S!Obqa`Hn5 zG4JQLIYazmxb+m+k8e9@i1+TFr)l9XVa!1R_9695dad2oDZNn;$%x;#!TFFm9Qd1( zB7cZFZI+1py?RPQ143ddWfUI|Xg7B-2od>T8oF*JC43k!lE!;^)i5=?PE%-G?{hy- zTg}rbxq7oP4q_!2zNe2=XdIj$k=^3(haz&@^@n2s;WvP8w}RunsTasksOnCurrentThread()); + if (settings_.enable_impeller) { + ServiceProtocolFailureError( + response, "Cannot capture SKP screenshot with Impeller enabled."); + return false; + } auto screenshot = rasterizer_->ScreenshotLastLayerTree( Rasterizer::ScreenshotType::SkiaPicture, true); if (screenshot.data) { diff --git a/shell/common/shell_test_platform_view_vulkan.cc b/shell/common/shell_test_platform_view_vulkan.cc index 38170118e2072..d19e5cb2bcaff 100644 --- a/shell/common/shell_test_platform_view_vulkan.cc +++ b/shell/common/shell_test_platform_view_vulkan.cc @@ -17,12 +17,8 @@ #if OS_FUCHSIA #define VULKAN_SO_PATH "libvulkan.so" -#elif FML_OS_MACOSX -#define VULKAN_SO_PATH "libvk_swiftshader.dylib" -#elif FML_OS_WIN -#define VULKAN_SO_PATH "vk_swiftshader.dll" #else -#define VULKAN_SO_PATH "libvk_swiftshader.so" +#include "flutter/vulkan/swiftshader_path.h" #endif namespace flutter { diff --git a/shell/gpu/gpu_surface_vulkan.cc b/shell/gpu/gpu_surface_vulkan.cc index a8976d677afd0..63f1359722c17 100644 --- a/shell/gpu/gpu_surface_vulkan.cc +++ b/shell/gpu/gpu_surface_vulkan.cc @@ -104,6 +104,7 @@ sk_sp GPUSurfaceVulkan::CreateSurfaceFromVulkanImage( const VkImage image, const VkFormat format, const SkISize& size) { +#ifdef SK_VULKAN GrVkImageInfo image_info = { .fImage = image, .fImageTiling = VK_IMAGE_TILING_OPTIMAL, @@ -130,6 +131,9 @@ sk_sp GPUSurfaceVulkan::CreateSurfaceFromVulkanImage( SkColorSpace::MakeSRGB(), // color space &surface_properties // surface properties ); +#else + return nullptr; +#endif // SK_VULKAN } SkColorType GPUSurfaceVulkan::ColorTypeFromFormat(const VkFormat format) { diff --git a/shell/gpu/gpu_surface_vulkan_impeller.cc b/shell/gpu/gpu_surface_vulkan_impeller.cc index 3b6ec9d876ec0..917b5f0e6e11d 100644 --- a/shell/gpu/gpu_surface_vulkan_impeller.cc +++ b/shell/gpu/gpu_surface_vulkan_impeller.cc @@ -60,6 +60,11 @@ std::unique_ptr GPUSurfaceVulkanImpeller::AcquireFrame( auto& context_vk = impeller::SurfaceContextVK::Cast(*impeller_context_); std::unique_ptr surface = context_vk.AcquireNextSurface(); + if (!surface) { + FML_LOG(ERROR) << "No surface available."; + return nullptr; + } + SurfaceFrame::SubmitCallback submit_callback = fml::MakeCopyable([renderer = impeller_renderer_, // aiks_context = aiks_context_, // diff --git a/shell/testing/BUILD.gn b/shell/testing/BUILD.gn index ec6400ce0763a..8f4572310c519 100644 --- a/shell/testing/BUILD.gn +++ b/shell/testing/BUILD.gn @@ -3,6 +3,15 @@ # found in the LICENSE file. import("//build/fuchsia/sdk.gni") +import("//flutter/impeller/tools/impeller.gni") +import("//flutter/shell/gpu/gpu.gni") + +shell_gpu_configuration("tester_gpu_configuration") { + enable_software = true + enable_gl = true + enable_vulkan = true + enable_metal = false +} executable("testing") { output_name = "flutter_tester" @@ -13,8 +22,9 @@ executable("testing") { ] sources = [ "tester_main.cc" ] + libs = [] if (is_win) { - libs = [ + libs += [ "psapi.lib", "user32.lib", "FontSub.lib", @@ -36,6 +46,14 @@ executable("testing") { "//third_party/skia", ] + if (impeller_supports_rendering) { + deps += [ + ":tester_gpu_configuration", + "//flutter/impeller", + "//third_party/swiftshader", + ] + } + metadata = { entitlement_file_path = [ "flutter_tester" ] } diff --git a/shell/testing/tester_main.cc b/shell/testing/tester_main.cc index 310ce62e01430..9c0059b612160 100644 --- a/shell/testing/tester_main.cc +++ b/shell/testing/tester_main.cc @@ -29,6 +29,46 @@ #include "third_party/dart/runtime/include/dart_api.h" #include "third_party/skia/include/core/SkSurface.h" +#if IMPELLER_SUPPORTS_RENDERING +#include // nogncheck +#include "flutter/vulkan/procs/vulkan_proc_table.h" // nogncheck +#include "flutter/vulkan/swiftshader_path.h" // nogncheck +#include "impeller/entity/vk/entity_shaders_vk.h" // nogncheck +#include "impeller/entity/vk/modern_shaders_vk.h" // nogncheck +#include "impeller/renderer/backend/vulkan/context_vk.h" // nogncheck +#include "impeller/renderer/backend/vulkan/surface_context_vk.h" // nogncheck +#include "impeller/renderer/context.h" // nogncheck +#include "impeller/renderer/vk/compute_shaders_vk.h" // nogncheck +#include "shell/gpu/gpu_surface_vulkan_impeller.h" // nogncheck +#if IMPELLER_ENABLE_3D +#include "impeller/scene/shaders/vk/scene_shaders_vk.h" // nogncheck +#endif // IMPELLER_ENABLE_3D + +static std::vector> ShaderLibraryMappings() { + return { + std::make_shared(impeller_entity_shaders_vk_data, + impeller_entity_shaders_vk_length), + std::make_shared( + impeller_modern_shaders_vk_data, impeller_modern_shaders_vk_length), +#if IMPELLER_ENABLE_3D + std::make_shared( + impeller_scene_shaders_vk_data, impeller_scene_shaders_vk_length), +#endif // IMPELLER_ENABLE_3D + std::make_shared( + impeller_compute_shaders_vk_data, + impeller_compute_shaders_vk_length), + }; +} + +struct ImpellerVulkanContextHolder { + fml::RefPtr vulkan_proc_table; + std::shared_ptr context; + std::shared_ptr surface_context; +}; +#else +struct ImpellerVulkanContextHolder {}; +#endif // IMPELLER_SUPPORTS_RENDERING + #if defined(FML_OS_WIN) #include #endif // defined(FML_OS_WIN) @@ -81,11 +121,41 @@ class TesterGPUSurfaceSoftware : public GPUSurfaceSoftware { class TesterPlatformView : public PlatformView, public GPUSurfaceSoftwareDelegate { public: - TesterPlatformView(Delegate& delegate, const TaskRunners& task_runners) - : PlatformView(delegate, task_runners) {} + TesterPlatformView(Delegate& delegate, + const TaskRunners& task_runners, + ImpellerVulkanContextHolder impeller_context_holder) + : PlatformView(delegate, task_runners), + impeller_context_holder_(std::move(impeller_context_holder)) {} + + ~TesterPlatformView() { +#if IMPELLER_SUPPORTS_RENDERING + if (impeller_context_holder_.context) { + impeller_context_holder_.context->Shutdown(); + } +#endif + } + + // |PlatformView| + std::shared_ptr GetImpellerContext() const override { +#if IMPELLER_SUPPORTS_RENDERING + return std::static_pointer_cast( + impeller_context_holder_.context); +#else + return nullptr; +#endif // IMPELLER_SUPPORTS_RENDERING + } // |PlatformView| std::unique_ptr CreateRenderingSurface() override { +#if IMPELLER_SUPPORTS_RENDERING + if (delegate_.OnPlatformViewGetSettings().enable_impeller) { + FML_DCHECK(impeller_context_holder_.context); + auto surface = std::make_unique( + impeller_context_holder_.surface_context); + FML_DCHECK(surface->IsValid()); + return surface; + } +#endif // IMPELLER_SUPPORTS_RENDERING auto surface = std::make_unique( this, true /* render to surface */); FML_DCHECK(surface->IsValid()); @@ -126,6 +196,7 @@ class TesterPlatformView : public PlatformView, private: sk_sp sk_surface_ = nullptr; + [[maybe_unused]] ImpellerVulkanContextHolder impeller_context_holder_; std::shared_ptr external_view_embedder_ = std::make_shared(); }; @@ -235,10 +306,63 @@ int RunTester(const flutter::Settings& settings, io_task_runner // io ); + ImpellerVulkanContextHolder impeller_context_holder; + +#if IMPELLER_SUPPORTS_RENDERING + if (settings.enable_impeller) { + impeller_context_holder.vulkan_proc_table = + fml::MakeRefCounted(VULKAN_SO_PATH); + if (!impeller_context_holder.vulkan_proc_table + ->NativeGetInstanceProcAddr()) { + FML_LOG(ERROR) << "Could not load Swiftshader library."; + return EXIT_FAILURE; + } + impeller::ContextVK::Settings context_settings; + context_settings.proc_address_callback = + impeller_context_holder.vulkan_proc_table->NativeGetInstanceProcAddr(); + context_settings.shader_libraries_data = ShaderLibraryMappings(); + context_settings.cache_directory = fml::paths::GetCachesDirectory(); + context_settings.enable_validation = settings.enable_vulkan_validation; + + impeller_context_holder.context = + impeller::ContextVK::Create(std::move(context_settings)); + if (!impeller_context_holder.context || + !impeller_context_holder.context->IsValid()) { + VALIDATION_LOG << "Could not create Vulkan context."; + return EXIT_FAILURE; + } + + impeller::vk::SurfaceKHR vk_surface; + impeller::vk::HeadlessSurfaceCreateInfoEXT surface_create_info; + auto res = + impeller_context_holder.context->GetInstance().createHeadlessSurfaceEXT( + &surface_create_info, // surface create info + nullptr, // allocator + &vk_surface // surface + ); + if (res != impeller::vk::Result::eSuccess) { + VALIDATION_LOG << "Could not create surface for tester " + << impeller::vk::to_string(res); + return EXIT_FAILURE; + } + + impeller::vk::UniqueSurfaceKHR surface{ + vk_surface, impeller_context_holder.context->GetInstance()}; + impeller_context_holder.surface_context = + impeller_context_holder.context->CreateSurfaceContext(); + if (!impeller_context_holder.surface_context->SetWindowSurface( + std::move(surface))) { + VALIDATION_LOG << "Could not set up surface for context."; + return EXIT_FAILURE; + } + } +#endif // IMPELLER_SUPPORTS_RENDERING + Shell::CreateCallback on_create_platform_view = - [](Shell& shell) { - return std::make_unique(shell, - shell.GetTaskRunners()); + [impeller_context_holder = + std::move(impeller_context_holder)](Shell& shell) { + return std::make_unique( + shell, shell.GetTaskRunners(), impeller_context_holder); }; Shell::CreateCallback on_create_rasterizer = [](Shell& shell) { diff --git a/testing/dart/canvas_test.dart b/testing/dart/canvas_test.dart index 6732423695d2b..d317e2f13e420 100644 --- a/testing/dart/canvas_test.dart +++ b/testing/dart/canvas_test.dart @@ -12,6 +12,8 @@ import 'package:litetest/litetest.dart'; import 'package:path/path.dart' as path; import 'package:vector_math/vector_math_64.dart'; +import 'impeller_enabled.dart'; + typedef CanvasCallback = void Function(Canvas canvas); Future createImage(int width, int height) { @@ -192,7 +194,7 @@ void main() { final bool areEqual = await fuzzyGoldenImageCompare(image, 'canvas_test_toImage.png'); expect(areEqual, true); - }); + }, skip: impellerEnabled); Gradient makeGradient() { return Gradient.linear( @@ -213,7 +215,7 @@ void main() { final bool areEqual = await fuzzyGoldenImageCompare(image, 'canvas_test_dithered_gradient.png'); expect(areEqual, true); - }, skip: !Platform.isLinux); // https://github.com/flutter/flutter/issues/53784 + }, skip: !Platform.isLinux || impellerEnabled); // https://github.com/flutter/flutter/issues/53784 test('Null values allowed for drawAtlas methods', () async { final Image image = await createImage(100, 100); @@ -349,7 +351,7 @@ void main() { final bool areEqual = await fuzzyGoldenImageCompare(image, 'dotted_path_effect_mixed_with_stroked_geometry.png'); expect(areEqual, true); - }, skip: !Platform.isLinux); // https://github.com/flutter/flutter/issues/53784 + }, skip: !Platform.isLinux || impellerEnabled); // https://github.com/flutter/flutter/issues/53784 test('Gradients with matrices in Paragraphs render correctly', () async { final Image image = await toImage((Canvas canvas) { @@ -401,7 +403,7 @@ void main() { final bool areEqual = await fuzzyGoldenImageCompare(image, 'text_with_gradient_with_matrix.png'); expect(areEqual, true); - }, skip: !Platform.isLinux); // https://github.com/flutter/flutter/issues/53784 + }, skip: !Platform.isLinux || impellerEnabled); // https://github.com/flutter/flutter/issues/53784 test('toImageSync - too big', () async { PictureRecorder recorder = PictureRecorder(); @@ -417,6 +419,12 @@ void main() { recorder = PictureRecorder(); canvas = Canvas(recorder); + if (impellerEnabled) { + // Impeller tries to automagically scale this. See + // https://github.com/flutter/flutter/issues/128885 + canvas.drawImage(image, Offset.zero, Paint()); + return; + } // On a slower CI machine, the raster thread may get behind the UI thread // here. However, once the image is in an error state it will immediately // throw on subsequent attempts. diff --git a/testing/dart/codec_test.dart b/testing/dart/codec_test.dart index fb07a63f61a21..702a5fd14e016 100644 --- a/testing/dart/codec_test.dart +++ b/testing/dart/codec_test.dart @@ -9,6 +9,8 @@ import 'dart:ui' as ui; import 'package:litetest/litetest.dart'; import 'package:path/path.dart' as path; +import 'impeller_enabled.dart'; + void main() { test('Animation metadata', () async { @@ -43,7 +45,11 @@ void main() { await codec.getNextFrame(); fail('exception not thrown'); } on Exception catch (e) { - expect(e.toString(), contains('Codec failed')); + if (impellerEnabled) { + expect(e.toString(), contains('Could not decompress image.')); + } else { + expect(e.toString(), contains('Codec failed')); + } } }); @@ -145,8 +151,9 @@ void main() { final ui.Image image = frameInfo.image; final ByteData imageData = (await image.toByteData(format: ui.ImageByteFormat.png))!; + final String fileName = impellerEnabled ? 'impeller_four_frame_with_reuse_end.png' : 'four_frame_with_reuse_end.png'; final Uint8List goldenData = File( - path.join('flutter', 'lib', 'ui', 'fixtures', 'four_frame_with_reuse_end.png'), + path.join('flutter', 'lib', 'ui', 'fixtures', fileName), ).readAsBytesSync(); expect(imageData.buffer.asUint8List(), goldenData); @@ -170,8 +177,10 @@ void main() { final ui.Image image = frameInfo.image; final ByteData imageData = (await image.toByteData(format: ui.ImageByteFormat.png))!; + final String fileName = impellerEnabled ? 'impeller_heart_end.png' : 'heart_end.png'; + final Uint8List goldenData = File( - path.join('flutter', 'lib', 'ui', 'fixtures', 'heart_end.png'), + path.join('flutter', 'lib', 'ui', 'fixtures', fileName), ).readAsBytesSync(); expect(imageData.buffer.asUint8List(), goldenData); @@ -194,8 +203,10 @@ void main() { final ui.Image image = frameInfo.image; final ByteData imageData = (await image.toByteData(format: ui.ImageByteFormat.png))!; + final String fileName = impellerEnabled ? 'impeller_2_dispose_op_restore_previous.apng.$i.png' : '2_dispose_op_restore_previous.apng.$i.png'; + final Uint8List goldenData = File( - path.join('flutter', 'lib', 'ui', 'fixtures', '2_dispose_op_restore_previous.apng.$i.png'), + path.join('flutter', 'lib', 'ui', 'fixtures', fileName), ).readAsBytesSync(); expect(imageData.buffer.asUint8List(), goldenData); diff --git a/testing/dart/color_filter_test.dart b/testing/dart/color_filter_test.dart index e5553604da9b2..66ec9548ca58f 100644 --- a/testing/dart/color_filter_test.dart +++ b/testing/dart/color_filter_test.dart @@ -7,6 +7,8 @@ import 'dart:ui'; import 'package:litetest/litetest.dart'; +import 'impeller_enabled.dart'; + const Color transparent = Color(0x00000000); const Color red = Color(0xFFAA0000); const Color green = Color(0xFF00AA00); @@ -56,6 +58,11 @@ void main() { Uint32List bytes = await getBytesForPaint(paint); expect(bytes[0], greenRedColorBlend); + // TODO(135699): enable this + if (impellerEnabled) { + return; + } + paint.invertColors = true; bytes = await getBytesForPaint(paint); expect(bytes[0], greenRedColorBlendInverted); @@ -87,6 +94,11 @@ void main() { Uint32List bytes = await getBytesForPaint(paint); expect(bytes[0], greenGreyscaled); + // TODO(135699): enable this + if (impellerEnabled) { + return; + } + paint.invertColors = true; bytes = await getBytesForPaint(paint); expect(bytes[0], greenInvertedGreyscaled); @@ -118,6 +130,10 @@ void main() { Uint32List bytes = await getBytesForPaint(paint); expect(bytes[0], greenLinearToSrgbGamma); + // TODO(135699): enable this + if (impellerEnabled) { + return; + } paint.invertColors = true; bytes = await getBytesForPaint(paint); expect(bytes[0], greenLinearToSrgbGammaInverted); @@ -131,6 +147,11 @@ void main() { Uint32List bytes = await getBytesForPaint(paint); expect(bytes[0], greenSrgbToLinearGamma); + // TODO(135699): enable this + if (impellerEnabled) { + return; + } + paint.invertColors = true; bytes = await getBytesForPaint(paint); expect(bytes[0], greenSrgbToLinearGammaInverted); diff --git a/testing/dart/encoding_test.dart b/testing/dart/encoding_test.dart index 9ca46b9306d02..2aa426a108100 100644 --- a/testing/dart/encoding_test.dart +++ b/testing/dart/encoding_test.dart @@ -10,6 +10,8 @@ import 'dart:ui'; import 'package:litetest/litetest.dart'; import 'package:path/path.dart' as path; +import 'impeller_enabled.dart'; + const int _kWidth = 10; const int _kRadius = 2; @@ -18,6 +20,10 @@ const Color _kGreen = Color.fromRGBO(0, 255, 0, 1.0); void main() { test('decodeImageFromPixels float32', () async { + if (impellerEnabled) { + print('Disabled on Impeller - https://github.com/flutter/flutter/issues/135702'); + return; + } const int width = 2; const int height = 2; final Float32List pixels = Float32List(width * height * 4); @@ -91,6 +97,10 @@ void main() { }); test('Image.toByteData Unmodified format works with grayscale images', () async { + if (impellerEnabled) { + print('Disabled on Impeller - https://github.com/flutter/flutter/issues/135706'); + return; + } final Image image = await GrayscaleImage.load(); final ByteData data = (await image.toByteData(format: ImageByteFormat.rawUnmodified))!; final Uint8List bytes = data.buffer.asUint8List(); @@ -99,6 +109,10 @@ void main() { }); test('Image.toByteData PNG format works with simple image', () async { + if (impellerEnabled) { + print('Disabled on Impeller - https://github.com/flutter/flutter/issues/135706'); + return; + } final Image image = await Square4x4Image.image; final ByteData data = (await image.toByteData(format: ImageByteFormat.png))!; final List expected = await readFile('square.png'); diff --git a/testing/dart/fragment_shader_test.dart b/testing/dart/fragment_shader_test.dart index e97eb5128f6e5..da34695df7814 100644 --- a/testing/dart/fragment_shader_test.dart +++ b/testing/dart/fragment_shader_test.dart @@ -12,6 +12,7 @@ import 'dart:ui'; import 'package:litetest/litetest.dart'; import 'package:path/path.dart' as path; +import 'impeller_enabled.dart'; import 'shader_test_file_utils.dart'; void main() async { @@ -172,6 +173,10 @@ void main() async { }); test('FragmentShader simple shader renders correctly', () async { + if (impellerEnabled) { + print('Skipped for Impeller - https://github.com/flutter/flutter/issues/122823'); + return; + } final FragmentProgram program = await FragmentProgram.fromAsset( 'functions.frag.iplr', ); @@ -182,6 +187,10 @@ void main() async { }); test('Reused FragmentShader simple shader renders correctly', () async { + if (impellerEnabled) { + print('Skipped for Impeller - https://github.com/flutter/flutter/issues/122823'); + return; + } final FragmentProgram program = await FragmentProgram.fromAsset( 'functions.frag.iplr', ); @@ -196,6 +205,10 @@ void main() async { }); test('FragmentShader blue-green image renders green', () async { + if (impellerEnabled) { + print('Skipped for Impeller - https://github.com/flutter/flutter/issues/122823'); + return; + } final FragmentProgram program = await FragmentProgram.fromAsset( 'blue_green_sampler.frag.iplr', ); @@ -208,6 +221,10 @@ void main() async { }); test('FragmentShader blue-green image renders green - GPU image', () async { + if (impellerEnabled) { + print('Skipped for Impeller - https://github.com/flutter/flutter/issues/122823'); + return; + } final FragmentProgram program = await FragmentProgram.fromAsset( 'blue_green_sampler.frag.iplr', ); @@ -220,6 +237,10 @@ void main() async { }); test('FragmentShader with uniforms renders correctly', () async { + if (impellerEnabled) { + print('Skipped for Impeller - https://github.com/flutter/flutter/issues/122823'); + return; + } final FragmentProgram program = await FragmentProgram.fromAsset( 'uniforms.frag.iplr', ); @@ -246,6 +267,10 @@ void main() async { }); test('FragmentShader shader with array uniforms renders correctly', () async { + if (impellerEnabled) { + print('Skipped for Impeller - https://github.com/flutter/flutter/issues/122823'); + return; + } final FragmentProgram program = await FragmentProgram.fromAsset( 'uniform_arrays.frag.iplr', ); @@ -260,6 +285,10 @@ void main() async { }); test('FragmentShader The ink_sparkle shader is accepted', () async { + if (impellerEnabled) { + print('Skipped for Impeller - https://github.com/flutter/flutter/issues/122823'); + return; + } final FragmentProgram program = await FragmentProgram.fromAsset( 'ink_sparkle.frag.iplr', ); @@ -273,6 +302,10 @@ void main() async { }); test('FragmentShader Uniforms are sorted correctly', () async { + if (impellerEnabled) { + print('Skipped for Impeller - https://github.com/flutter/flutter/issues/122823'); + return; + } final FragmentProgram program = await FragmentProgram.fromAsset( 'uniforms_sorted.frag.iplr', ); @@ -314,6 +347,10 @@ void main() async { }); test('FragmentShader user defined functions do not redefine builtins', () async { + if (impellerEnabled) { + print('Skipped for Impeller - https://github.com/flutter/flutter/issues/122823'); + return; + } final FragmentProgram program = await FragmentProgram.fromAsset( 'no_builtin_redefinition.frag.iplr', ); @@ -324,6 +361,10 @@ void main() async { }); test('FragmentShader fromAsset accepts a shader with no uniforms', () async { + if (impellerEnabled) { + print('Skipped for Impeller - https://github.com/flutter/flutter/issues/122823'); + return; + } final FragmentProgram program = await FragmentProgram.fromAsset( 'no_uniforms.frag.iplr', ); @@ -332,6 +373,11 @@ void main() async { shader.dispose(); }); + if (impellerEnabled) { + print('Skipped for Impeller - https://github.com/flutter/flutter/issues/122823'); + return; + } + // Test all supported GLSL ops. See lib/spirv/lib/src/constants.dart final Map iplrSupportedGLSLOpShaders = await _loadShaderAssets( path.join('supported_glsl_op_shaders', 'iplr'), diff --git a/testing/dart/gpu_test.dart b/testing/dart/gpu_test.dart index 0c96b6646dc0b..9d65c8ed4a66e 100644 --- a/testing/dart/gpu_test.dart +++ b/testing/dart/gpu_test.dart @@ -7,6 +7,8 @@ import 'package:litetest/litetest.dart'; import '../../lib/gpu/lib/gpu.dart' as gpu; +import 'impeller_enabled.dart'; + void main() { // TODO(131346): Remove this once we migrate the Dart GPU API into this space. test('smoketest', () async { @@ -25,9 +27,14 @@ void main() { test('gpu.context throws exception for incompatible embedders', () async { try { // ignore: unnecessary_statements - gpu.gpuContext; // Force the - fail('Exception not thrown'); + gpu.gpuContext; // Force the context to instantiate. + if (!impellerEnabled) { + fail('Exception not thrown, but no Impeller context available.'); + } } catch (e) { + if (impellerEnabled) { + fail('Exception thrown even though Impeller is enabled.'); + } expect( e.toString(), contains( diff --git a/testing/dart/image_filter_test.dart b/testing/dart/image_filter_test.dart index 0fa8651656300..0a79513d99430 100644 --- a/testing/dart/image_filter_test.dart +++ b/testing/dart/image_filter_test.dart @@ -7,6 +7,8 @@ import 'dart:ui'; import 'package:litetest/litetest.dart'; +import 'impeller_enabled.dart'; + const Color red = Color(0xFFAA0000); const Color green = Color(0xFF00AA00); @@ -174,6 +176,10 @@ void main() { } test('ImageFilter - blur', () async { + if (impellerEnabled) { + print('Disabled - see https://github.com/flutter/flutter/issues/135712'); + return; + } final Paint paint = Paint() ..color = green ..imageFilter = makeBlur(1.0, 1.0, TileMode.decal); @@ -201,6 +207,11 @@ void main() { }); test('ImageFilter - matrix', () async { + if (impellerEnabled) { + print('Disabled - see https://github.com/flutter/flutter/issues/135712'); + return; + } + final Paint paint = Paint() ..color = green ..imageFilter = makeScale(2.0, 2.0, 1.5, 1.5); @@ -227,6 +238,11 @@ void main() { }); test('ImageFilter - from color filters', () async { + if (impellerEnabled) { + print('Disabled - see https://github.com/flutter/flutter/issues/135712'); + return; + } + final Paint paint = Paint() ..color = green ..imageFilter = const ColorFilter.matrix(constValueColorMatrix); @@ -236,6 +252,11 @@ void main() { }); test('ImageFilter - color filter composition', () async { + if (impellerEnabled) { + print('Disabled - see https://github.com/flutter/flutter/issues/135712'); + return; + } + final ImageFilter compOrder1 = ImageFilter.compose( outer: const ColorFilter.matrix(halvesBrightnessColorMatrix), inner: const ColorFilter.matrix(constValueColorMatrix), diff --git a/testing/dart/impeller_enabled.dart b/testing/dart/impeller_enabled.dart new file mode 100644 index 0000000000000..18c457e3c059f --- /dev/null +++ b/testing/dart/impeller_enabled.dart @@ -0,0 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'dart:io'; + +bool get impellerEnabled => Platform.executableArguments.contains('--enable-impeller'); diff --git a/testing/dart/observatory/skp_test.dart b/testing/dart/observatory/skp_test.dart index 239e3b529f27a..6c2a1460f9f21 100644 --- a/testing/dart/observatory/skp_test.dart +++ b/testing/dart/observatory/skp_test.dart @@ -12,6 +12,8 @@ import 'package:litetest/litetest.dart'; import 'package:vm_service/vm_service.dart' as vms; import 'package:vm_service/vm_service_io.dart'; +import '../impeller_enabled.dart'; + void main() { test('Capture an SKP ', () async { final developer.ServiceProtocolInfo info = await developer.Service.getInfo(); @@ -42,13 +44,19 @@ void main() { PlatformDispatcher.instance.scheduleFrame(); await completer.future; - final vms.Response response = await vmService.callServiceExtension('_flutter.screenshotSkp'); + try { + final vms.Response response = await vmService.callServiceExtension('_flutter.screenshotSkp'); + expect(impellerEnabled, false); + final String base64data = response.json!['skp'] as String; + expect(base64data, isNotNull); + expect(base64data, isNotEmpty); + final Uint8List decoded = base64Decode(base64data); + expect(decoded.sublist(0, 8), 'skiapict'.codeUnits); + } on vms.RPCError catch (e) { + expect(impellerEnabled, true); + expect(e.toString(), contains('Cannot capture SKP screenshot with Impeller enabled.')); + } - final String base64data = response.json!['skp'] as String; - expect(base64data, isNotNull); - expect(base64data, isNotEmpty); - final Uint8List decoded = base64Decode(base64data); - expect(decoded.sublist(0, 8), 'skiapict'.codeUnits); await vmService.dispose(); }); diff --git a/testing/dart/observatory/tracing_test.dart b/testing/dart/observatory/tracing_test.dart index 1937c9b11df1e..6372a6a159763 100644 --- a/testing/dart/observatory/tracing_test.dart +++ b/testing/dart/observatory/tracing_test.dart @@ -12,6 +12,8 @@ import 'package:vm_service/vm_service.dart' as vms; import 'package:vm_service/vm_service_io.dart'; import 'package:vm_service_protos/vm_service_protos.dart'; +import '../impeller_enabled.dart'; + Future _testChromeFormatTrace(vms.VmService vmService) async { final vms.Timeline timeline = await vmService.getVMTimeline(); @@ -32,7 +34,7 @@ Future _testChromeFormatTrace(vms.VmService vmService) async { } } expect(saveLayerRecordCount, 3); - expect(saveLayerCount, 3); + expect(saveLayerCount, impellerEnabled ? 2 : 3); expect(flowEventCount, 5); } @@ -59,7 +61,7 @@ Future _testPerfettoFormatTrace(vms.VmService vmService) async { } } expect(saveLayerRecordCount, 3); - expect(saveLayerCount, 3); + expect(saveLayerCount, impellerEnabled ? 2 : 3); expect(flowIdCount, 5); } @@ -80,6 +82,7 @@ void main() { final PictureRecorder recorder = PictureRecorder(); final Canvas canvas = Canvas(recorder); canvas.drawColor(const Color(0xff0000ff), BlendMode.srcOut); + // Will saveLayer implicitly for Skia, but not Impeller. canvas.drawPaint(Paint()..imageFilter = ImageFilter.blur(sigmaX: 2, sigmaY: 3)); canvas.saveLayer(null, Paint()); canvas.drawRect(const Rect.fromLTRB(10, 10, 20, 20), Paint()); diff --git a/testing/dart/observatory/vmservice_methods_test.dart b/testing/dart/observatory/vmservice_methods_test.dart index fa522b751ed09..14fd20d2afcb1 100644 --- a/testing/dart/observatory/vmservice_methods_test.dart +++ b/testing/dart/observatory/vmservice_methods_test.dart @@ -12,6 +12,8 @@ import 'package:litetest/litetest.dart'; import 'package:vm_service/vm_service.dart' as vms; import 'package:vm_service/vm_service_io.dart'; +import '../impeller_enabled.dart'; + void main() { test('Setting invalid directory returns an error', () async { vms.VmService? vmService; @@ -59,7 +61,7 @@ void main() { 'ext.ui.window.impellerEnabled', isolateId: isolateId, ); - expect(response.json!['enabled'], false); + expect(response.json!['enabled'], impellerEnabled); } finally { await vmService?.dispose(); } diff --git a/testing/run_tests.py b/testing/run_tests.py index 898201cecf5bd..500dbba643d03 100755 --- a/testing/run_tests.py +++ b/testing/run_tests.py @@ -576,13 +576,37 @@ def run_engine_benchmarks(build_dir, executable_filter): ) -def gather_dart_test( - build_dir, - dart_file, - multithreaded, - enable_observatory=False, - expect_failure=False, -): +class FlutterTesterOptions(): + + def __init__( + self, + multithreaded=False, + enable_impeller=False, + enable_observatory=False, + expect_failure=False + ): + self.multithreaded = multithreaded + self.enable_impeller = enable_impeller + self.enable_observatory = enable_observatory + self.expect_failure = expect_failure + + def apply_args(self, command_args): + if not self.enable_observatory: + command_args.append('--disable-observatory') + + if self.enable_impeller: + command_args += ['--enable-impeller'] + + if self.multithreaded: + command_args.insert(0, '--force-multithreading') + + def threading_description(self): + if self.multithreaded: + return 'multithreaded' + return 'single-threaded' + + +def gather_dart_test(build_dir, dart_file, options): kernel_file_name = os.path.basename(dart_file) + '.dill' kernel_file_output = os.path.join(build_dir, 'gen', kernel_file_name) error_message = "%s doesn't exist. Please run the build that populates %s" % ( @@ -591,8 +615,8 @@ def gather_dart_test( assert os.path.isfile(kernel_file_output), error_message command_args = [] - if not enable_observatory: - command_args.append('--disable-observatory') + + options.apply_args(command_args) dart_file_contents = open(dart_file, 'r') custom_options = re.findall( @@ -610,18 +634,12 @@ def gather_dart_test( kernel_file_output, ] - if multithreaded: - threading = 'multithreaded' - command_args.insert(0, '--force-multithreading') - else: - threading = 'single-threaded' - tester_name = 'flutter_tester' logger.info( "Running test '%s' using '%s' (%s)", kernel_file_name, tester_name, - threading + options.threading_description() ) - forbidden_output = [] if 'unopt' in build_dir or expect_failure else [ + forbidden_output = [] if 'unopt' in build_dir or options.expect_failure else [ '[ERROR' ] return EngineExecutableTask( @@ -630,7 +648,7 @@ def gather_dart_test( None, command_args, forbidden_output=forbidden_output, - expect_failure=expect_failure, + expect_failure=options.expect_failure, ) @@ -849,8 +867,38 @@ def gather_dart_tests(build_dir, test_filter): logger.info( "Gathering dart test '%s' with observatory enabled", dart_test_file ) - yield gather_dart_test(build_dir, dart_test_file, True, True) - yield gather_dart_test(build_dir, dart_test_file, False, True) + yield gather_dart_test( + build_dir, dart_test_file, + FlutterTesterOptions( + multithreaded=True, + enable_impeller=False, + enable_observatory=True + ) + ) + yield gather_dart_test( + build_dir, dart_test_file, + FlutterTesterOptions( + multithreaded=True, + enable_impeller=True, + enable_observatory=True + ) + ) + yield gather_dart_test( + build_dir, dart_test_file, + FlutterTesterOptions( + multithreaded=False, + enable_impeller=False, + enable_observatory=True + ) + ) + yield gather_dart_test( + build_dir, dart_test_file, + FlutterTesterOptions( + multithreaded=False, + enable_impeller=True, + enable_observatory=True + ) + ) for dart_test_file in dart_tests: if test_filter is not None and os.path.basename(dart_test_file @@ -858,8 +906,22 @@ def gather_dart_tests(build_dir, test_filter): logger.info("Skipping '%s' due to filter.", dart_test_file) else: logger.info("Gathering dart test '%s'", dart_test_file) - yield gather_dart_test(build_dir, dart_test_file, True) - yield gather_dart_test(build_dir, dart_test_file, False) + yield gather_dart_test( + build_dir, dart_test_file, + FlutterTesterOptions(multithreaded=True, enable_impeller=False) + ) + yield gather_dart_test( + build_dir, dart_test_file, + FlutterTesterOptions(multithreaded=True, enable_impeller=True) + ) + yield gather_dart_test( + build_dir, dart_test_file, + FlutterTesterOptions(multithreaded=False, enable_impeller=False) + ) + yield gather_dart_test( + build_dir, dart_test_file, + FlutterTesterOptions(multithreaded=False, enable_impeller=True) + ) def gather_dart_smoke_test(build_dir, test_filter): @@ -874,8 +936,14 @@ def gather_dart_smoke_test(build_dir, test_filter): ) not in test_filter: logger.info("Skipping '%s' due to filter.", smoke_test) else: - yield gather_dart_test(build_dir, smoke_test, True, expect_failure=True) - yield gather_dart_test(build_dir, smoke_test, False, expect_failure=True) + yield gather_dart_test( + build_dir, smoke_test, + FlutterTesterOptions(multithreaded=True, expect_failure=True) + ) + yield gather_dart_test( + build_dir, smoke_test, + FlutterTesterOptions(multithreaded=False, expect_failure=True) + ) def gather_dart_package_tests(build_dir, package_path, extra_opts): diff --git a/testing/test_vulkan_context.cc b/testing/test_vulkan_context.cc index ea36581add8e2..5652431a800ad 100644 --- a/testing/test_vulkan_context.cc +++ b/testing/test_vulkan_context.cc @@ -14,19 +14,12 @@ #include "flutter/fml/memory/ref_ptr.h" #include "flutter/fml/native_library.h" +#include "flutter/vulkan/swiftshader_path.h" #include "third_party/skia/include/core/SkSurface.h" #include "third_party/skia/include/gpu/GrDirectContext.h" #include "third_party/skia/include/gpu/vk/GrVkExtensions.h" #include "vulkan/vulkan_core.h" -#ifdef FML_OS_MACOSX -#define VULKAN_SO_PATH "libvk_swiftshader.dylib" -#elif FML_OS_WIN -#define VULKAN_SO_PATH "vk_swiftshader.dll" -#else -#define VULKAN_SO_PATH "libvk_swiftshader.so" -#endif - namespace flutter { namespace testing { diff --git a/vulkan/swiftshader_path.h b/vulkan/swiftshader_path.h new file mode 100644 index 0000000000000..424116a7efec7 --- /dev/null +++ b/vulkan/swiftshader_path.h @@ -0,0 +1,18 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef FLUTTER_VULKAN_SWIFTSHADER_PATH_H_ +#define FLUTTER_VULKAN_SWIFTSHADER_PATH_H_ + +#ifndef VULKAN_SO_PATH +#if FML_OS_MACOSX +#define VULKAN_SO_PATH "libvk_swiftshader.dylib" +#elif FML_OS_WIN +#define VULKAN_SO_PATH "vk_swiftshader.dll" +#else +#define VULKAN_SO_PATH "libvk_swiftshader.so" +#endif // !FML_OS_MACOSX && !FML_OS_WIN +#endif // VULKAN_SO_PATH + +#endif // FLUTTER_VULKAN_SWIFTSHADER_PATH_H_ diff --git a/vulkan/vulkan_window.cc b/vulkan/vulkan_window.cc index f7f51dce9e738..345919b83d8c1 100644 --- a/vulkan/vulkan_window.cc +++ b/vulkan/vulkan_window.cc @@ -118,6 +118,7 @@ GrDirectContext* VulkanWindow::GetSkiaGrContext() { } bool VulkanWindow::CreateSkiaGrContext() { +#ifdef SK_VUKLAN GrVkBackendContext backend_context; if (!CreateSkiaBackendContext(&backend_context)) { @@ -138,6 +139,9 @@ bool VulkanWindow::CreateSkiaGrContext() { skia_gr_context_ = context; return true; +#else + return false; +#endif // SK_VULKAN } bool VulkanWindow::CreateSkiaBackendContext(GrVkBackendContext* context) { From 9c7372411a834eca40f88fa9e69a93a1489f0982 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Wed, 11 Oct 2023 15:18:39 -0700 Subject: [PATCH 589/859] Run the binary size treemap script from the buildroot directory (#46740) This will produce a treemap where navigation starts from the buildroot and the flutter and third_party source directories are shown as siblings. --- ci/binary_size_treemap.sh | 30 +++++++++++++++++++++++ ci/builders/linux_android_aot_engine.json | 10 +++----- 2 files changed, 33 insertions(+), 7 deletions(-) create mode 100755 ci/binary_size_treemap.sh diff --git a/ci/binary_size_treemap.sh b/ci/binary_size_treemap.sh new file mode 100755 index 0000000000000..b144c4bc153cb --- /dev/null +++ b/ci/binary_size_treemap.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# +# Copyright 2013 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# Run a tool that generates a treemap showing the contribution of each +# component to the size of a binary. +# +# Usage: +# binary_size_treemap.sh [binary_path] [output_dir] + +set -e + +INPUT_PATH="$(cd $(dirname "$1"); pwd -P)/$(basename "$1")" +DEST_DIR="$(cd $(dirname "$2"); pwd -P)/$(basename "$2")" +CI_DIRECTORY=$(cd $(dirname "${BASH_SOURCE[0]}"); pwd -P) +ENGINE_BUILDROOT=$(cd "$CI_DIRECTORY/../.."; pwd -P) + +if [ "$(uname)" == "Darwin" ]; then + NDK_PLATFORM="darwin-x86_64" +else + NDK_PLATFORM="linux-x86_64" +fi +ADDR2LINE="third_party/android_tools/ndk/toolchains/aarch64-linux-android-4.9/prebuilt/$NDK_PLATFORM/bin/aarch64-linux-android-addr2line" + +# Run the binary size script from the buildroot directory so the treemap path +# navigation will start from there. +cd "$ENGINE_BUILDROOT" +python3 third_party/dart/runtime/third_party/binary_size/src/run_binary_size_analysis.py --library "$INPUT_PATH" --destdir "$DEST_DIR" --addr2line-binary "$ADDR2LINE" diff --git a/ci/builders/linux_android_aot_engine.json b/ci/builders/linux_android_aot_engine.json index 5065d6781d2e2..595e440ffa0f3 100644 --- a/ci/builders/linux_android_aot_engine.json +++ b/ci/builders/linux_android_aot_engine.json @@ -114,15 +114,11 @@ "tests": [ { "name": "Generate treemap for android_release_arm64", - "language": "python3", - "script": "third_party/dart/runtime/third_party/binary_size/src/run_binary_size_analysis.py", + "language": "bash", + "script": "flutter/ci/binary_size_treemap.sh", "parameters": [ - "--library", "../../src/out/android_release_arm64/libflutter.so", - "--destdir", - "${FLUTTER_LOGS_DIR}", - "--addr2line-binary", - "../../src/third_party/android_tools/ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-addr2line" + "${FLUTTER_LOGS_DIR}" ] } ] From a0367cc5af446c2496e4e7dbf84ca9f7415b6b02 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 11 Oct 2023 18:40:52 -0400 Subject: [PATCH 590/859] Roll Skia from 2459d71707e0 to 924df8d87766 (7 revisions) (#46798) https://skia.googlesource.com/skia.git/+log/2459d71707e0..924df8d87766 2023-10-11 robertphillips@google.com [graphite] Add PipelineDataGatherer to the precompilation path 2023-10-11 johnstiles@google.com Fix comment. 2023-10-11 kjlubick@google.com Minor fixes for buffet build 2023-10-11 lovisolo@google.com Reland "[bazel] Move test runners under //tools/testrunners.". 2023-10-11 egdaniel@google.com When waiting on client provided semaphores, only block fragment stage work. 2023-10-11 johnstiles@google.com Disallow layout(builtin=xxx) in non-module code. 2023-10-11 kjlubick@google.com Deploy CanvasKit 0.39.0 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/excluded_files | 2 -- ci/licenses_golden/licenses_skia | 11 ++--------- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/DEPS b/DEPS index 50a639ac87ec9..b73e58291ac2c 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '2459d71707e03200936094cfaa0e8e6b08978118', + 'skia_revision': '924df8d877668be23d8c33081f59bb343ca48ed9', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/excluded_files b/ci/licenses_golden/excluded_files index 73c028656523f..7bfa23f637b9c 100644 --- a/ci/licenses_golden/excluded_files +++ b/ci/licenses_golden/excluded_files @@ -2650,9 +2650,7 @@ ../../../third_party/skia/experimental ../../../third_party/skia/fuzz/README.md ../../../third_party/skia/gm/BUILD.bazel -../../../third_party/skia/gm/android_gm_test.bzl ../../../third_party/skia/gm/png_codec.bzl -../../../third_party/skia/gm/vias/BUILD.bazel ../../../third_party/skia/gn/BUILD.bazel ../../../third_party/skia/gn/__init__.py ../../../third_party/skia/gn/bazel_build.py diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 8f1eb23387d0b..469057b045cf5 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: fc9dee121cc8b1258fe2821092cdd954 +Signature: afd371b5156c5bca0911814475344e26 ==================================================================================================== LIBRARY: etc1 @@ -391,6 +391,7 @@ FILE: ../../../third_party/skia/relnotes/grsurface-info.md FILE: ../../../third_party/skia/relnotes/mesh.md FILE: ../../../third_party/skia/relnotes/readbuffer-deserial.md FILE: ../../../third_party/skia/relnotes/vk-directcontext.md +FILE: ../../../third_party/skia/relnotes/waitSemaphore.md FILE: ../../../third_party/skia/src/gpu/gpu_workaround_list.txt FILE: ../../../third_party/skia/src/ports/fontations/Cargo.toml FILE: ../../../third_party/skia/src/sksl/generated/sksl_compute.minified.sksl @@ -8607,7 +8608,6 @@ LIBRARY: skia ORIGIN: ../../../third_party/skia/gm/coordclampshader.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/fontations.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/imagefiltersunpremul.cpp + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/gm/vias/Draw.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/ports/SkFontMgr_data.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/ports/SkTypeface_fontations.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/private/SkGainmapInfo.h + ../../../third_party/skia/LICENSE @@ -8648,7 +8648,6 @@ TYPE: LicenseType.bsd FILE: ../../../third_party/skia/gm/coordclampshader.cpp FILE: ../../../third_party/skia/gm/fontations.cpp FILE: ../../../third_party/skia/gm/imagefiltersunpremul.cpp -FILE: ../../../third_party/skia/gm/vias/Draw.h FILE: ../../../third_party/skia/include/ports/SkFontMgr_data.h FILE: ../../../third_party/skia/include/ports/SkTypeface_fontations.h FILE: ../../../third_party/skia/include/private/SkGainmapInfo.h @@ -8725,15 +8724,12 @@ ORIGIN: ../../../third_party/skia/fuzz/FuzzQuadRoots.cpp + ../../../third_party/ ORIGIN: ../../../third_party/skia/fuzz/oss_fuzz/FuzzCubicRoots.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/fuzz/oss_fuzz/FuzzPrecompile.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/fuzz/oss_fuzz/FuzzQuadRoots.cpp + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/gm/BazelGMRunner.cpp + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/gm/BazelNoopRunner.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/fontations_ft_compare.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/graphite_replay.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/hello_bazel_world.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/png_codec.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/rippleshadergm.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/scaledrects.cpp + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/gm/vias/SimpleVias.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/workingspace.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/android/SkCanvasAndroid.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/android/SkHeifDecoder.h + ../../../third_party/skia/LICENSE @@ -8993,15 +8989,12 @@ FILE: ../../../third_party/skia/fuzz/FuzzQuadRoots.cpp FILE: ../../../third_party/skia/fuzz/oss_fuzz/FuzzCubicRoots.cpp FILE: ../../../third_party/skia/fuzz/oss_fuzz/FuzzPrecompile.cpp FILE: ../../../third_party/skia/fuzz/oss_fuzz/FuzzQuadRoots.cpp -FILE: ../../../third_party/skia/gm/BazelGMRunner.cpp -FILE: ../../../third_party/skia/gm/BazelNoopRunner.cpp FILE: ../../../third_party/skia/gm/fontations_ft_compare.cpp FILE: ../../../third_party/skia/gm/graphite_replay.cpp FILE: ../../../third_party/skia/gm/hello_bazel_world.cpp FILE: ../../../third_party/skia/gm/png_codec.cpp FILE: ../../../third_party/skia/gm/rippleshadergm.cpp FILE: ../../../third_party/skia/gm/scaledrects.cpp -FILE: ../../../third_party/skia/gm/vias/SimpleVias.cpp FILE: ../../../third_party/skia/gm/workingspace.cpp FILE: ../../../third_party/skia/include/android/SkCanvasAndroid.h FILE: ../../../third_party/skia/include/android/SkHeifDecoder.h From b3f43132b7b182b3863f929cb6100a99eb11f2eb Mon Sep 17 00:00:00 2001 From: Brandon DeRosier Date: Wed, 11 Oct 2023 15:42:03 -0700 Subject: [PATCH 591/859] [Impeller] Bump impeller-cmake (#46764) Bump with build fixes. --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index b73e58291ac2c..2f25280208dad 100644 --- a/DEPS +++ b/DEPS @@ -936,7 +936,7 @@ deps = { }, 'src/third_party/impeller-cmake-example': { - 'url': Var('github_git') + '/bdero/impeller-cmake-example.git' + '@' + '7771b9b54df660fd5b749d44eb294beadd369bd6', + 'url': Var('github_git') + '/bdero/impeller-cmake-example.git' + '@' + 'ad78e80741349dda91c8a17fd16919655406e7d8', 'condition': 'download_impeller_cmake_example', }, From 445099103c0815f97fba987a68adc301839af966 Mon Sep 17 00:00:00 2001 From: Brandon DeRosier Date: Wed, 11 Oct 2023 15:42:10 -0700 Subject: [PATCH 592/859] [Impeller] Use triangle strips to dedupe rectangle vertices. (#46610) Remove a couple of duplicate verts in a bunch of situations. Pedantic improvements: "Brandon, why are you like this" edition. --- impeller/entity/contents/content_context.cc | 108 +++++++++++------- .../contents/filters/blend_filter_contents.cc | 22 ++-- .../border_mask_blur_filter_contents.cc | 9 +- .../filters/color_matrix_filter_contents.cc | 5 +- .../filters/gaussian_blur_filter_contents.cc | 5 +- .../filters/linear_to_srgb_filter_contents.cc | 5 +- .../filters/morphology_filter_contents.cc | 6 +- .../filters/srgb_to_linear_filter_contents.cc | 5 +- .../filters/yuv_to_rgb_filter_contents.cc | 5 +- .../contents/framebuffer_blend_contents.cc | 5 +- .../contents/solid_rrect_blur_contents.cc | 4 +- 11 files changed, 94 insertions(+), 85 deletions(-) diff --git a/impeller/entity/contents/content_context.cc b/impeller/entity/contents/content_context.cc index f531345342660..560c9d804800e 100644 --- a/impeller/entity/contents/content_context.cc +++ b/impeller/entity/contents/content_context.cc @@ -164,6 +164,7 @@ static std::unique_ptr CreateDefaultPipeline( const auto default_color_format = context.GetCapabilities()->GetDefaultColorFormat(); ContentContextOptions{.sample_count = SampleCount::kCount4, + .primitive_type = PrimitiveType::kTriangleStrip, .color_attachment_pixel_format = default_color_format} .ApplyToPipelineDescriptor(*desc); return std::make_unique(context, desc); @@ -191,6 +192,11 @@ ContentContext::ContentContext( .sample_count = SampleCount::kCount4, .color_attachment_pixel_format = context_->GetCapabilities()->GetDefaultColorFormat()}; + auto options_trianglestrip = ContentContextOptions{ + .sample_count = SampleCount::kCount4, + .primitive_type = PrimitiveType::kTriangleStrip, + .color_attachment_pixel_format = + context_->GetCapabilities()->GetDefaultColorFormat()}; #ifdef IMPELLER_DEBUG checkerboard_pipelines_.CreateDefault(*context_, options); @@ -211,56 +217,76 @@ ContentContext::ContentContext( } if (context_->GetCapabilities()->SupportsFramebufferFetch()) { - framebuffer_blend_color_pipelines_.CreateDefault(*context_, options); - framebuffer_blend_colorburn_pipelines_.CreateDefault(*context_, options); - framebuffer_blend_colordodge_pipelines_.CreateDefault(*context_, options); - framebuffer_blend_darken_pipelines_.CreateDefault(*context_, options); - framebuffer_blend_difference_pipelines_.CreateDefault(*context_, options); - framebuffer_blend_exclusion_pipelines_.CreateDefault(*context_, options); - framebuffer_blend_hardlight_pipelines_.CreateDefault(*context_, options); - framebuffer_blend_hue_pipelines_.CreateDefault(*context_, options); - framebuffer_blend_lighten_pipelines_.CreateDefault(*context_, options); - framebuffer_blend_luminosity_pipelines_.CreateDefault(*context_, options); - framebuffer_blend_multiply_pipelines_.CreateDefault(*context_, options); - framebuffer_blend_overlay_pipelines_.CreateDefault(*context_, options); - framebuffer_blend_saturation_pipelines_.CreateDefault(*context_, options); - framebuffer_blend_screen_pipelines_.CreateDefault(*context_, options); - framebuffer_blend_softlight_pipelines_.CreateDefault(*context_, options); + framebuffer_blend_color_pipelines_.CreateDefault(*context_, + options_trianglestrip); + framebuffer_blend_colorburn_pipelines_.CreateDefault(*context_, + options_trianglestrip); + framebuffer_blend_colordodge_pipelines_.CreateDefault( + *context_, options_trianglestrip); + framebuffer_blend_darken_pipelines_.CreateDefault(*context_, + options_trianglestrip); + framebuffer_blend_difference_pipelines_.CreateDefault( + *context_, options_trianglestrip); + framebuffer_blend_exclusion_pipelines_.CreateDefault(*context_, + options_trianglestrip); + framebuffer_blend_hardlight_pipelines_.CreateDefault(*context_, + options_trianglestrip); + framebuffer_blend_hue_pipelines_.CreateDefault(*context_, + options_trianglestrip); + framebuffer_blend_lighten_pipelines_.CreateDefault(*context_, + options_trianglestrip); + framebuffer_blend_luminosity_pipelines_.CreateDefault( + *context_, options_trianglestrip); + framebuffer_blend_multiply_pipelines_.CreateDefault(*context_, + options_trianglestrip); + framebuffer_blend_overlay_pipelines_.CreateDefault(*context_, + options_trianglestrip); + framebuffer_blend_saturation_pipelines_.CreateDefault( + *context_, options_trianglestrip); + framebuffer_blend_screen_pipelines_.CreateDefault(*context_, + options_trianglestrip); + framebuffer_blend_softlight_pipelines_.CreateDefault(*context_, + options_trianglestrip); } - blend_color_pipelines_.CreateDefault(*context_, options); - blend_colorburn_pipelines_.CreateDefault(*context_, options); - blend_colordodge_pipelines_.CreateDefault(*context_, options); - blend_darken_pipelines_.CreateDefault(*context_, options); - blend_difference_pipelines_.CreateDefault(*context_, options); - blend_exclusion_pipelines_.CreateDefault(*context_, options); - blend_hardlight_pipelines_.CreateDefault(*context_, options); - blend_hue_pipelines_.CreateDefault(*context_, options); - blend_lighten_pipelines_.CreateDefault(*context_, options); - blend_luminosity_pipelines_.CreateDefault(*context_, options); - blend_multiply_pipelines_.CreateDefault(*context_, options); - blend_overlay_pipelines_.CreateDefault(*context_, options); - blend_saturation_pipelines_.CreateDefault(*context_, options); - blend_screen_pipelines_.CreateDefault(*context_, options); - blend_softlight_pipelines_.CreateDefault(*context_, options); - - rrect_blur_pipelines_.CreateDefault(*context_, options); + blend_color_pipelines_.CreateDefault(*context_, options_trianglestrip); + blend_colorburn_pipelines_.CreateDefault(*context_, options_trianglestrip); + blend_colordodge_pipelines_.CreateDefault(*context_, options_trianglestrip); + blend_darken_pipelines_.CreateDefault(*context_, options_trianglestrip); + blend_difference_pipelines_.CreateDefault(*context_, options_trianglestrip); + blend_exclusion_pipelines_.CreateDefault(*context_, options_trianglestrip); + blend_hardlight_pipelines_.CreateDefault(*context_, options_trianglestrip); + blend_hue_pipelines_.CreateDefault(*context_, options_trianglestrip); + blend_lighten_pipelines_.CreateDefault(*context_, options_trianglestrip); + blend_luminosity_pipelines_.CreateDefault(*context_, options_trianglestrip); + blend_multiply_pipelines_.CreateDefault(*context_, options_trianglestrip); + blend_overlay_pipelines_.CreateDefault(*context_, options_trianglestrip); + blend_saturation_pipelines_.CreateDefault(*context_, options_trianglestrip); + blend_screen_pipelines_.CreateDefault(*context_, options_trianglestrip); + blend_softlight_pipelines_.CreateDefault(*context_, options_trianglestrip); + + rrect_blur_pipelines_.CreateDefault(*context_, options_trianglestrip); texture_blend_pipelines_.CreateDefault(*context_, options); texture_pipelines_.CreateDefault(*context_, options); position_uv_pipelines_.CreateDefault(*context_, options); tiled_texture_pipelines_.CreateDefault(*context_, options); - gaussian_blur_noalpha_decal_pipelines_.CreateDefault(*context_, options); - gaussian_blur_noalpha_nodecal_pipelines_.CreateDefault(*context_, options); - border_mask_blur_pipelines_.CreateDefault(*context_, options); - morphology_filter_pipelines_.CreateDefault(*context_, options); - color_matrix_color_filter_pipelines_.CreateDefault(*context_, options); - linear_to_srgb_filter_pipelines_.CreateDefault(*context_, options); - srgb_to_linear_filter_pipelines_.CreateDefault(*context_, options); + gaussian_blur_noalpha_decal_pipelines_.CreateDefault(*context_, + options_trianglestrip); + gaussian_blur_noalpha_nodecal_pipelines_.CreateDefault(*context_, + options_trianglestrip); + border_mask_blur_pipelines_.CreateDefault(*context_, options_trianglestrip); + morphology_filter_pipelines_.CreateDefault(*context_, options_trianglestrip); + color_matrix_color_filter_pipelines_.CreateDefault(*context_, + options_trianglestrip); + linear_to_srgb_filter_pipelines_.CreateDefault(*context_, + options_trianglestrip); + srgb_to_linear_filter_pipelines_.CreateDefault(*context_, + options_trianglestrip); glyph_atlas_pipelines_.CreateDefault(*context_, options); glyph_atlas_color_pipelines_.CreateDefault(*context_, options); geometry_color_pipelines_.CreateDefault(*context_, options); - yuv_to_rgb_filter_pipelines_.CreateDefault(*context_, options); - porter_duff_blend_pipelines_.CreateDefault(*context_, options); + yuv_to_rgb_filter_pipelines_.CreateDefault(*context_, options_trianglestrip); + porter_duff_blend_pipelines_.CreateDefault(*context_, options_trianglestrip); // GLES only shader. #ifdef IMPELLER_ENABLE_OPENGLES if (GetContext()->GetBackendType() == Context::BackendType::kOpenGLES) { diff --git a/impeller/entity/contents/filters/blend_filter_contents.cc b/impeller/entity/contents/filters/blend_filter_contents.cc index 44c33c5d38e91..225f915f9aa5e 100644 --- a/impeller/entity/contents/filters/blend_filter_contents.cc +++ b/impeller/entity/contents/filters/blend_filter_contents.cc @@ -155,14 +155,13 @@ static std::optional AdvancedBlend( vtx_builder.AddVertices({ {Point(0, 0), dst_uvs[0], src_uvs[0]}, {Point(size.width, 0), dst_uvs[1], src_uvs[1]}, - {Point(size.width, size.height), dst_uvs[3], src_uvs[3]}, - {Point(0, 0), dst_uvs[0], src_uvs[0]}, - {Point(size.width, size.height), dst_uvs[3], src_uvs[3]}, {Point(0, size.height), dst_uvs[2], src_uvs[2]}, + {Point(size.width, size.height), dst_uvs[3], src_uvs[3]}, }); auto vtx_buffer = vtx_builder.CreateVertexBuffer(host_buffer); auto options = OptionsFromPass(pass); + options.primitive_type = PrimitiveType::kTriangleStrip; options.blend_mode = BlendMode::kSource; std::shared_ptr> pipeline = std::invoke(pipeline_proc, renderer, options); @@ -283,12 +282,9 @@ std::optional BlendFilterContents::CreateForegroundAdvancedBlend( vtx_builder.AddVertices({ {origin, dst_uvs[0], dst_uvs[0]}, {Point(origin.x + size.width, origin.y), dst_uvs[1], dst_uvs[1]}, + {Point(origin.x, origin.y + size.height), dst_uvs[2], dst_uvs[2]}, {Point(origin.x + size.width, origin.y + size.height), dst_uvs[3], dst_uvs[3]}, - {origin, dst_uvs[0], dst_uvs[0]}, - {Point(origin.x + size.width, origin.y + size.height), dst_uvs[3], - dst_uvs[3]}, - {Point(origin.x, origin.y + size.height), dst_uvs[2], dst_uvs[2]}, }); auto vtx_buffer = vtx_builder.CreateVertexBuffer(host_buffer); @@ -298,6 +294,7 @@ std::optional BlendFilterContents::CreateForegroundAdvancedBlend( cmd.BindVertices(vtx_buffer); cmd.stencil_reference = entity.GetClipDepth(); auto options = OptionsFromPass(pass); + options.primitive_type = PrimitiveType::kTriangleStrip; switch (blend_mode) { case BlendMode::kScreen: @@ -458,12 +455,9 @@ std::optional BlendFilterContents::CreateForegroundPorterDuffBlend( vtx_builder.AddVertices({ {origin, dst_uvs[0], color}, {Point(origin.x + size.width, origin.y), dst_uvs[1], color}, + {Point(origin.x, origin.y + size.height), dst_uvs[2], color}, {Point(origin.x + size.width, origin.y + size.height), dst_uvs[3], color}, - {origin, dst_uvs[0], color}, - {Point(origin.x + size.width, origin.y + size.height), dst_uvs[3], - color}, - {Point(origin.x, origin.y + size.height), dst_uvs[2], color}, }); auto vtx_buffer = vtx_builder.CreateVertexBuffer(host_buffer); @@ -473,6 +467,7 @@ std::optional BlendFilterContents::CreateForegroundPorterDuffBlend( cmd.BindVertices(vtx_buffer); cmd.stencil_reference = entity.GetClipDepth(); auto options = OptionsFromPass(pass); + options.primitive_type = PrimitiveType::kTriangleStrip; cmd.pipeline = renderer.GetPorterDuffBlendPipeline(options); FS::FragInfo frag_info; @@ -571,6 +566,7 @@ static std::optional PipelineBlend( DEBUG_COMMAND_INFO(cmd, SPrintF("Pipeline Blend Filter (%s)", BlendModeToString(blend_mode))); auto options = OptionsFromPass(pass); + options.primitive_type = PrimitiveType::kTriangleStrip; auto add_blend_command = [&](std::optional input) { if (!input.has_value()) { @@ -590,10 +586,8 @@ static std::optional PipelineBlend( vtx_builder.AddVertices({ {Point(0, 0), Point(0, 0)}, {Point(size.width, 0), Point(1, 0)}, - {Point(size.width, size.height), Point(1, 1)}, - {Point(0, 0), Point(0, 0)}, - {Point(size.width, size.height), Point(1, 1)}, {Point(0, size.height), Point(0, 1)}, + {Point(size.width, size.height), Point(1, 1)}, }); auto vtx_buffer = vtx_builder.CreateVertexBuffer(host_buffer); cmd.BindVertices(vtx_buffer); diff --git a/impeller/entity/contents/filters/border_mask_blur_filter_contents.cc b/impeller/entity/contents/filters/border_mask_blur_filter_contents.cc index fa3d22b45cdbb..3da610b90bd3f 100644 --- a/impeller/entity/contents/filters/border_mask_blur_filter_contents.cc +++ b/impeller/entity/contents/filters/border_mask_blur_filter_contents.cc @@ -96,21 +96,18 @@ std::optional BorderMaskBlurFilterContents::RenderFilter( {coverage.origin, input_uvs[0]}, {{coverage.origin.x + coverage.size.width, coverage.origin.y}, input_uvs[1]}, + {{coverage.origin.x, coverage.origin.y + coverage.size.height}, + input_uvs[2]}, {{coverage.origin.x + coverage.size.width, coverage.origin.y + coverage.size.height}, input_uvs[3]}, - {coverage.origin, input_uvs[0]}, - {{coverage.origin.x + coverage.size.width, - coverage.origin.y + coverage.size.height}, - input_uvs[3]}, - {{coverage.origin.x, coverage.origin.y + coverage.size.height}, - input_uvs[2]}, }); auto vtx_buffer = vtx_builder.CreateVertexBuffer(host_buffer); Command cmd; DEBUG_COMMAND_INFO(cmd, "Border Mask Blur Filter"); auto options = OptionsFromPassAndEntity(pass, entity); + options.primitive_type = PrimitiveType::kTriangleStrip; cmd.pipeline = renderer.GetBorderMaskBlurPipeline(options); cmd.BindVertices(vtx_buffer); diff --git a/impeller/entity/contents/filters/color_matrix_filter_contents.cc b/impeller/entity/contents/filters/color_matrix_filter_contents.cc index 4c19bf19ebe83..d9878896cd903 100644 --- a/impeller/entity/contents/filters/color_matrix_filter_contents.cc +++ b/impeller/entity/contents/filters/color_matrix_filter_contents.cc @@ -60,6 +60,7 @@ std::optional ColorMatrixFilterContents::RenderFilter( cmd.stencil_reference = entity.GetClipDepth(); auto options = OptionsFromPassAndEntity(pass, entity); + options.primitive_type = PrimitiveType::kTriangleStrip; cmd.pipeline = renderer.GetColorMatrixColorFilterPipeline(options); auto size = input_snapshot->texture->GetSize(); @@ -68,10 +69,8 @@ std::optional ColorMatrixFilterContents::RenderFilter( vtx_builder.AddVertices({ {Point(0, 0)}, {Point(1, 0)}, - {Point(1, 1)}, - {Point(0, 0)}, - {Point(1, 1)}, {Point(0, 1)}, + {Point(1, 1)}, }); auto& host_buffer = pass.GetTransientsBuffer(); auto vtx_buffer = vtx_builder.CreateVertexBuffer(host_buffer); diff --git a/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc b/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc index 6b97bda6bfec0..72f56f443b79e 100644 --- a/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc +++ b/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc @@ -157,10 +157,8 @@ std::optional DirectionalGaussianBlurFilterContents::RenderFilter( vtx_builder.AddVertices({ {Point(0, 0), input_uvs[0]}, {Point(1, 0), input_uvs[1]}, - {Point(1, 1), input_uvs[3]}, - {Point(0, 0), input_uvs[0]}, - {Point(1, 1), input_uvs[3]}, {Point(0, 1), input_uvs[2]}, + {Point(1, 1), input_uvs[3]}, }); auto vtx_buffer = vtx_builder.CreateVertexBuffer(host_buffer); @@ -185,6 +183,7 @@ std::optional DirectionalGaussianBlurFilterContents::RenderFilter( cmd.BindVertices(vtx_buffer); auto options = OptionsFromPass(pass); + options.primitive_type = PrimitiveType::kTriangleStrip; options.blend_mode = BlendMode::kSource; auto input_descriptor = input_snapshot->sampler_descriptor; switch (tile_mode_) { diff --git a/impeller/entity/contents/filters/linear_to_srgb_filter_contents.cc b/impeller/entity/contents/filters/linear_to_srgb_filter_contents.cc index f06f5a80a80b7..8b42813e26c69 100644 --- a/impeller/entity/contents/filters/linear_to_srgb_filter_contents.cc +++ b/impeller/entity/contents/filters/linear_to_srgb_filter_contents.cc @@ -50,6 +50,7 @@ std::optional LinearToSrgbFilterContents::RenderFilter( cmd.stencil_reference = entity.GetClipDepth(); auto options = OptionsFromPassAndEntity(pass, entity); + options.primitive_type = PrimitiveType::kTriangleStrip; cmd.pipeline = renderer.GetLinearToSrgbFilterPipeline(options); auto size = input_snapshot->texture->GetSize(); @@ -58,10 +59,8 @@ std::optional LinearToSrgbFilterContents::RenderFilter( vtx_builder.AddVertices({ {Point(0, 0)}, {Point(1, 0)}, - {Point(1, 1)}, - {Point(0, 0)}, - {Point(1, 1)}, {Point(0, 1)}, + {Point(1, 1)}, }); auto& host_buffer = pass.GetTransientsBuffer(); diff --git a/impeller/entity/contents/filters/morphology_filter_contents.cc b/impeller/entity/contents/filters/morphology_filter_contents.cc index d8f087a49cb57..bdbe3266c4088 100644 --- a/impeller/entity/contents/filters/morphology_filter_contents.cc +++ b/impeller/entity/contents/filters/morphology_filter_contents.cc @@ -6,6 +6,7 @@ #include +#include "impeller/core/formats.h" #include "impeller/entity/contents/content_context.h" #include "impeller/entity/contents/contents.h" #include "impeller/renderer/render_pass.h" @@ -80,10 +81,8 @@ std::optional DirectionalMorphologyFilterContents::RenderFilter( vtx_builder.AddVertices({ {Point(0, 0), input_uvs[0]}, {Point(1, 0), input_uvs[1]}, - {Point(1, 1), input_uvs[3]}, - {Point(0, 0), input_uvs[0]}, - {Point(1, 1), input_uvs[3]}, {Point(0, 1), input_uvs[2]}, + {Point(1, 1), input_uvs[3]}, }); auto vtx_buffer = vtx_builder.CreateVertexBuffer(host_buffer); @@ -118,6 +117,7 @@ std::optional DirectionalMorphologyFilterContents::RenderFilter( Command cmd; DEBUG_COMMAND_INFO(cmd, "Morphology Filter"); auto options = OptionsFromPass(pass); + options.primitive_type = PrimitiveType::kTriangleStrip; options.blend_mode = BlendMode::kSource; cmd.pipeline = renderer.GetMorphologyFilterPipeline(options); cmd.BindVertices(vtx_buffer); diff --git a/impeller/entity/contents/filters/srgb_to_linear_filter_contents.cc b/impeller/entity/contents/filters/srgb_to_linear_filter_contents.cc index 9fb789c1edbc3..2d47c79cad31b 100644 --- a/impeller/entity/contents/filters/srgb_to_linear_filter_contents.cc +++ b/impeller/entity/contents/filters/srgb_to_linear_filter_contents.cc @@ -50,6 +50,7 @@ std::optional SrgbToLinearFilterContents::RenderFilter( cmd.stencil_reference = entity.GetClipDepth(); auto options = OptionsFromPassAndEntity(pass, entity); + options.primitive_type = PrimitiveType::kTriangleStrip; cmd.pipeline = renderer.GetSrgbToLinearFilterPipeline(options); auto size = input_snapshot->texture->GetSize(); @@ -58,10 +59,8 @@ std::optional SrgbToLinearFilterContents::RenderFilter( vtx_builder.AddVertices({ {Point(0, 0)}, {Point(1, 0)}, - {Point(1, 1)}, - {Point(0, 0)}, - {Point(1, 1)}, {Point(0, 1)}, + {Point(1, 1)}, }); auto& host_buffer = pass.GetTransientsBuffer(); diff --git a/impeller/entity/contents/filters/yuv_to_rgb_filter_contents.cc b/impeller/entity/contents/filters/yuv_to_rgb_filter_contents.cc index c35c5fd0cdd84..29098fb37bb5c 100644 --- a/impeller/entity/contents/filters/yuv_to_rgb_filter_contents.cc +++ b/impeller/entity/contents/filters/yuv_to_rgb_filter_contents.cc @@ -78,6 +78,7 @@ std::optional YUVToRGBFilterContents::RenderFilter( cmd.stencil_reference = entity.GetClipDepth(); auto options = OptionsFromPassAndEntity(pass, entity); + options.primitive_type = PrimitiveType::kTriangleStrip; cmd.pipeline = renderer.GetYUVToRGBFilterPipeline(options); auto size = y_input_snapshot->texture->GetSize(); @@ -86,10 +87,8 @@ std::optional YUVToRGBFilterContents::RenderFilter( vtx_builder.AddVertices({ {Point(0, 0)}, {Point(1, 0)}, - {Point(1, 1)}, - {Point(0, 0)}, - {Point(1, 1)}, {Point(0, 1)}, + {Point(1, 1)}, }); auto& host_buffer = pass.GetTransientsBuffer(); diff --git a/impeller/entity/contents/framebuffer_blend_contents.cc b/impeller/entity/contents/framebuffer_blend_contents.cc index 1930497da2196..7edc478076499 100644 --- a/impeller/entity/contents/framebuffer_blend_contents.cc +++ b/impeller/entity/contents/framebuffer_blend_contents.cc @@ -63,15 +63,14 @@ bool FramebufferBlendContents::Render(const ContentContext& renderer, vtx_builder.AddVertices({ {Point(0, 0), Point(0, 0)}, {Point(size.width, 0), Point(1, 0)}, - {Point(size.width, size.height), Point(1, 1)}, - {Point(0, 0), Point(0, 0)}, - {Point(size.width, size.height), Point(1, 1)}, {Point(0, size.height), Point(0, 1)}, + {Point(size.width, size.height), Point(1, 1)}, }); auto vtx_buffer = vtx_builder.CreateVertexBuffer(host_buffer); auto options = OptionsFromPass(pass); options.blend_mode = BlendMode::kSource; + options.primitive_type = PrimitiveType::kTriangleStrip; Command cmd; DEBUG_COMMAND_INFO(cmd, "Framebuffer Advanced Blend Filter"); diff --git a/impeller/entity/contents/solid_rrect_blur_contents.cc b/impeller/entity/contents/solid_rrect_blur_contents.cc index e4043f67f2105..665cb599bc551 100644 --- a/impeller/entity/contents/solid_rrect_blur_contents.cc +++ b/impeller/entity/contents/solid_rrect_blur_contents.cc @@ -80,8 +80,6 @@ bool SolidRRectBlurContents::Render(const ContentContext& renderer, {Point(left, top)}, {Point(right, top)}, {Point(left, bottom)}, - {Point(left, bottom)}, - {Point(right, top)}, {Point(right, bottom)}, }); } @@ -89,7 +87,7 @@ bool SolidRRectBlurContents::Render(const ContentContext& renderer, Command cmd; DEBUG_COMMAND_INFO(cmd, "RRect Shadow"); ContentContextOptions opts = OptionsFromPassAndEntity(pass, entity); - opts.primitive_type = PrimitiveType::kTriangle; + opts.primitive_type = PrimitiveType::kTriangleStrip; Color color = color_; if (entity.GetBlendMode() == BlendMode::kClear) { opts.is_for_rrect_blur_clear = true; From efbf2651e8ea44a261a512a8dea4125a0275d77f Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 11 Oct 2023 18:43:38 -0400 Subject: [PATCH 593/859] Roll Dart SDK from 0732be6b823a to db2465f106ad (8 revisions) (#46797) https://dart.googlesource.com/sdk.git/+log/0732be6b823a..db2465f106ad 2023-10-11 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-14.0.dev 2023-10-11 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-13.0.dev 2023-10-11 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-12.0.dev 2023-10-11 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-11.0.dev 2023-10-11 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-10.0.dev 2023-10-11 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-9.0.dev 2023-10-10 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-8.0.dev 2023-10-10 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-7.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jsimmons@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 16 ++++++++-------- ci/licenses_golden/licenses_dart | 10 +--------- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/DEPS b/DEPS index 2f25280208dad..72187ae8b3223 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '0732be6b823a506ffedebb91493bf3a4f584ba6f', + 'dart_revision': 'db2465f106adedb581a7c3531d679443cbf2e724', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py @@ -71,10 +71,10 @@ vars = { 'dart_libprotobuf_rev': '24487dd1045c7f3d64a21f38a3f0c06cc4cf2edb', 'dart_perfetto_rev': 'b8da07095979310818f0efde2ef3c69ea70d62c5', 'dart_protobuf_gn_rev': 'ca669f79945418f6229e4fef89b666b2a88cbb10', - 'dart_protobuf_rev': 'c16bc891978a1764f0d6d8eca54f420242c78a6a', + 'dart_protobuf_rev': 'c559fe52734ef6e2389e26ec3901eaf23fd76543', 'dart_pub_rev': 'fca927ae2662204805e1646c0c0687369001a41a', 'dart_root_certificates_rev': '692f6d6488af68e0121317a9c2c9eb393eb0ee50', - 'dart_tools_rev': 'f318c80fc6507cbfff851971cb7ad6edd061b6ea', + 'dart_tools_rev': '92c5c15e3eb713b39779f4545bfa207ccdfeb1af', 'dart_watcher_rev': '3998cdd37ecacd3a1715cdc76110b025bffbd1f6', 'dart_webdev_rev': '7c2c2d70e05a5012b52e95b209aedce7acb62f94', 'dart_webkit_inspection_protocol_rev': '82f0c1c46dfdba5edf7c5fa84456233121dd69e1', @@ -376,7 +376,7 @@ deps = { Var('dart_git') + '/dart_style.git@1a2def95a3c04dafd27b85d17e6e828bd4afa1a3', 'src/third_party/dart/third_party/pkg/dartdoc': - Var('dart_git') + '/dartdoc.git@524b2b677d977b3ef1b25a7fcefaa1f0b82bef20', + Var('dart_git') + '/dartdoc.git@5156398c17ff7ab8defd87c7a5b9de1ee7e4564a', 'src/third_party/dart/third_party/pkg/ffi': Var('dart_git') + '/ffi.git@2faec288966d8f564049adb86a7ca43fd6e01fbf', @@ -424,10 +424,10 @@ deps = { Var('dart_git') + '/mime.git@af3e5fe753b957e95f03838f8a63782582c413ca', 'src/third_party/dart/third_party/pkg/mockito': - Var('dart_git') + '/mockito.git@49859e4e4ae23ffd29181cd4235c44b5a9a6dab0', + Var('dart_git') + '/mockito.git@47a5588788d37d7a94da9ceb9b3f3ef86c86f27e', 'src/third_party/dart/third_party/pkg/native': - Var('dart_git') + '/native.git@fd21f5b9a2bcc7ee8fc252c50d5518cb4146fdf5', + Var('dart_git') + '/native.git@22f4481573c201542daa1451fc3c58b1e50bf75a', 'src/third_party/dart/third_party/pkg/package_config': Var('dart_git') + '/package_config.git@100533d2f836583f281c9dfa11a00d6842c176d4', @@ -478,7 +478,7 @@ deps = { Var('dart_git') + '/term_glyph.git@cff80de129b2e69c11e3a9d7c6ea0447fc37865b', 'src/third_party/dart/third_party/pkg/test': - Var('dart_git') + '/test.git@367aa397ab1cb08755f8a7582ab21101ceb9d29b', + Var('dart_git') + '/test.git@4341470a2b844cd9a6692647639d652f617dd302', 'src/third_party/dart/third_party/pkg/test_reflective_loader': Var('dart_git') + '/test_reflective_loader.git@8593eb160f796179f77c8edb6fde050433810211', @@ -496,7 +496,7 @@ deps = { Var('dart_git') + '/watcher.git' + '@' + Var('dart_watcher_rev'), 'src/third_party/dart/third_party/pkg/web_socket_channel': - Var('dart_git') + '/web_socket_channel.git@364013da737f40b4f12ea741bda9ce57b4c96f9e', + Var('dart_git') + '/web_socket_channel.git@f3ac1bf2bd3c93eb6d5d78646ff7de31797f4cf6', 'src/third_party/dart/third_party/pkg/webdev': Var('dart_git') + '/webdev.git' + '@' + Var('dart_webdev_rev'), diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index e722022406287..1ff7c432414a1 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: c34931134b5196fbe2a4ac6dfd04a299 +Signature: 5a10fa747cefdae79b8be0d5e79aed14 ==================================================================================================== LIBRARY: dart @@ -4278,14 +4278,10 @@ ORIGIN: ../../../third_party/dart/runtime/platform/mach_o.h + ../../../third_par ORIGIN: ../../../third_party/dart/runtime/platform/pe.h + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/tools/heapsnapshot/bin/download.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/tools/heapsnapshot/bin/explore.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/tools/heapsnapshot/lib/heapsnapshot.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/tools/heapsnapshot/lib/src/analysis.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/tools/heapsnapshot/lib/src/cli.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/tools/heapsnapshot/lib/src/completion.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/tools/heapsnapshot/lib/src/console.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/tools/heapsnapshot/lib/src/expression.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/tools/heapsnapshot/lib/src/format.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/tools/heapsnapshot/lib/src/intset.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/tools/heapsnapshot/lib/src/load.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/vm/compiler/backend/il_serializer.cc + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/vm/compiler/backend/il_serializer.h + ../../../third_party/dart/LICENSE @@ -4358,14 +4354,10 @@ FILE: ../../../third_party/dart/runtime/platform/mach_o.h FILE: ../../../third_party/dart/runtime/platform/pe.h FILE: ../../../third_party/dart/runtime/tools/heapsnapshot/bin/download.dart FILE: ../../../third_party/dart/runtime/tools/heapsnapshot/bin/explore.dart -FILE: ../../../third_party/dart/runtime/tools/heapsnapshot/lib/heapsnapshot.dart -FILE: ../../../third_party/dart/runtime/tools/heapsnapshot/lib/src/analysis.dart FILE: ../../../third_party/dart/runtime/tools/heapsnapshot/lib/src/cli.dart FILE: ../../../third_party/dart/runtime/tools/heapsnapshot/lib/src/completion.dart FILE: ../../../third_party/dart/runtime/tools/heapsnapshot/lib/src/console.dart FILE: ../../../third_party/dart/runtime/tools/heapsnapshot/lib/src/expression.dart -FILE: ../../../third_party/dart/runtime/tools/heapsnapshot/lib/src/format.dart -FILE: ../../../third_party/dart/runtime/tools/heapsnapshot/lib/src/intset.dart FILE: ../../../third_party/dart/runtime/tools/heapsnapshot/lib/src/load.dart FILE: ../../../third_party/dart/runtime/vm/compiler/backend/il_serializer.cc FILE: ../../../third_party/dart/runtime/vm/compiler/backend/il_serializer.h From a0a3c62721f04f1061e06265decabd05fbb8f994 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 11 Oct 2023 22:03:20 -0400 Subject: [PATCH 594/859] Roll Skia from 924df8d87766 to ff3c2e3d45bd (1 revision) (#46807) https://skia.googlesource.com/skia.git/+log/924df8d87766..ff3c2e3d45bd 2023-10-12 jamesgk@google.com [graphite] Track image size uniforms separately from proxies If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 72187ae8b3223..a7f5fd584befc 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '924df8d877668be23d8c33081f59bb343ca48ed9', + 'skia_revision': 'ff3c2e3d45bdc793cddc65a3c9fce937b09d1dfd', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 469057b045cf5..f3a9b5411cbbf 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: afd371b5156c5bca0911814475344e26 +Signature: ff4e2b4b203f52640a7f654a921bb4bb ==================================================================================================== LIBRARY: etc1 From b42dd5dd9812266ba73c1eb7c405a6d909a14142 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 11 Oct 2023 23:31:13 -0400 Subject: [PATCH 595/859] Roll Skia from ff3c2e3d45bd to 9f5080c58aac (1 revision) (#46809) https://skia.googlesource.com/skia.git/+log/ff3c2e3d45bd..9f5080c58aac 2023-10-12 bungeman@google.com [pathops] Remove SK_IGNORE_PATHOPS_SIMPLIFY_TRIVIAL_FIX If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index a7f5fd584befc..f490b8c3b611b 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'ff3c2e3d45bdc793cddc65a3c9fce937b09d1dfd', + 'skia_revision': '9f5080c58aacafcdf176930aab8c3198393bd36e', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index f3a9b5411cbbf..19e6be0636e70 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: ff4e2b4b203f52640a7f654a921bb4bb +Signature: 69516e1860b8f73301c346747f039253 ==================================================================================================== LIBRARY: etc1 From 5c72eeeb8bf3efee3ad5dd27b190d9d7d28ecc10 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 12 Oct 2023 00:46:25 -0400 Subject: [PATCH 596/859] Roll Fuchsia Linux SDK from hMA99PoacaRZVXHgr... to giQtXxdSj6NdIViCw... (#46811) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jsimmons@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index f490b8c3b611b..812bab4889cb6 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'hMA99PoacaRZVXHgric86nJsfgQsM7O8Wn7ZDLc6Kp4C' + 'version': 'giQtXxdSj6NdIViCwaHnk5qMp1gdQuEGCp47UcFxb-kC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index b63a0dac0b071..bb4acb35be64e 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: 1cfca3b0c6bb9916b4c76fbce199090c +Signature: 87f5eb2411e0491379133abe3b709ffe ==================================================================================================== LIBRARY: fuchsia_sdk From b59fe37ee0f15ab6b5f378583c14d8a585a3717e Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 12 Oct 2023 01:54:24 -0400 Subject: [PATCH 597/859] Roll Dart SDK from db2465f106ad to 9afac395dfb1 (1 revision) (#46812) https://dart.googlesource.com/sdk.git/+log/db2465f106ad..9afac395dfb1 2023-10-12 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-15.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jsimmons@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 812bab4889cb6..b28ff346f9e5d 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': 'db2465f106adedb581a7c3531d679443cbf2e724', + 'dart_revision': '9afac395dfb13d6b784dc3b05ece46d1b64c21f4', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index 1ff7c432414a1..5999fc380e246 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: 5a10fa747cefdae79b8be0d5e79aed14 +Signature: ed6bf55d302c65e89ae799397ffa57e4 ==================================================================================================== LIBRARY: dart @@ -4469,6 +4469,7 @@ ORIGIN: ../../../third_party/dart/sdk/lib/_internal/js_dev_runtime/patch/js_allo ORIGIN: ../../../third_party/dart/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/debugger.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/records.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/sdk/lib/_internal/js_runtime/lib/js_allow_interop_patch.dart + ../../../third_party/dart/LICENSE +ORIGIN: ../../../third_party/dart/sdk/lib/_internal/js_runtime/lib/preambles/seal_native_object.js + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/sdk/lib/_internal/js_runtime/lib/records.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/sdk/lib/_internal/js_shared/lib/js_interop_patch.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/sdk/lib/_internal/js_shared/lib/js_interop_unsafe_patch.dart + ../../../third_party/dart/LICENSE @@ -4518,6 +4519,7 @@ FILE: ../../../third_party/dart/sdk/lib/_internal/js_dev_runtime/patch/js_allow_ FILE: ../../../third_party/dart/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/debugger.dart FILE: ../../../third_party/dart/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/records.dart FILE: ../../../third_party/dart/sdk/lib/_internal/js_runtime/lib/js_allow_interop_patch.dart +FILE: ../../../third_party/dart/sdk/lib/_internal/js_runtime/lib/preambles/seal_native_object.js FILE: ../../../third_party/dart/sdk/lib/_internal/js_runtime/lib/records.dart FILE: ../../../third_party/dart/sdk/lib/_internal/js_shared/lib/js_interop_patch.dart FILE: ../../../third_party/dart/sdk/lib/_internal/js_shared/lib/js_interop_unsafe_patch.dart From e15f2b5f5c51c1834359da980499a1f517ea3aee Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 12 Oct 2023 02:00:49 -0400 Subject: [PATCH 598/859] Roll Skia from 9f5080c58aac to 2dd1579c6921 (1 revision) (#46813) https://skia.googlesource.com/skia.git/+log/9f5080c58aac..2dd1579c6921 2023-10-12 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Dawn from 3b1bca8c657b to 5784a4bd7a0c (40 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index b28ff346f9e5d..c32443a17194a 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '9f5080c58aacafcdf176930aab8c3198393bd36e', + 'skia_revision': '2dd1579c69214c0669d02103942abb7217a1ed3b', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From dd19956991ea211908e44b64991ba2b9faf63469 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 12 Oct 2023 02:00:51 -0400 Subject: [PATCH 599/859] Roll Fuchsia Mac SDK from Qjz4zE4Oe0AO_7T3f... to 8AXhoo-MMME8NMKt0... (#46814) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jsimmons@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index c32443a17194a..8d6f99e78ba1b 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'Qjz4zE4Oe0AO_7T3f-M9BFLMSvDVKjNM4m4C1xpSplsC' + 'version': '8AXhoo-MMME8NMKt0B8sY1vvXSonu9S8AbTu-nS2CaAC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 29ff007d0c765e9a0a5a9e46ebcf61a593ec7ccf Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 12 Oct 2023 04:21:19 -0400 Subject: [PATCH 600/859] Roll ICU from 985b9a6f70e1 to 995db880cff2 (1 revision) (#46818) https://chromium.googlesource.com/chromium/deps/icu.git/+log/985b9a6f70e1..995db880cff2 2023-10-06 ftang@chromium.org Add support for TimeZone GMT-16:00 ... GMT-23:59 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/icu-sdk-flutter-engine Please CC jsimmons@google.com,tq-i18n-team@google.com on the revert to ensure that a human is aware of the problem. To file a bug in ICU: https://github.com/unicode-org/icu To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_third_party | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 8d6f99e78ba1b..d7cb98c10634f 100644 --- a/DEPS +++ b/DEPS @@ -295,7 +295,7 @@ deps = { Var('github_git') + '/google/flatbuffers.git' + '@' + '0a80646371179f8a7a5c1f42c31ee1d44dcf6709', 'src/third_party/icu': - Var('chromium_git') + '/chromium/deps/icu.git' + '@' + '985b9a6f70e13f3db741fed121e4dcc3046ad494', + Var('chromium_git') + '/chromium/deps/icu.git' + '@' + '995db880cff28a8b5d3a9978acd1b7cab9885edd', 'src/third_party/khronos': Var('chromium_git') + '/chromium/src/third_party/khronos.git' + '@' + '676d544d2b8f48903b7da9fceffaa534a5613978', diff --git a/ci/licenses_golden/licenses_third_party b/ci/licenses_golden/licenses_third_party index 2f295074189c8..255f02cd16aa5 100644 --- a/ci/licenses_golden/licenses_third_party +++ b/ci/licenses_golden/licenses_third_party @@ -1,4 +1,4 @@ -Signature: 22b6a63b18dd5d72500a4009598eba44 +Signature: acbe4f6b3fa4b7971a5a8e90fe0ca573 ==================================================================================================== LIBRARY: angle @@ -49275,6 +49275,7 @@ FILE: ../../../third_party/icu/patches/configure.patch FILE: ../../../third_party/icu/patches/data_symb.patch FILE: ../../../third_party/icu/patches/fuchsia.patch FILE: ../../../third_party/icu/patches/gb_table.patch +FILE: ../../../third_party/icu/patches/gmt24.patch FILE: ../../../third_party/icu/patches/include-utility.patch FILE: ../../../third_party/icu/patches/iso2022jp.patch FILE: ../../../third_party/icu/patches/isvalidenum.patch From 137d5b9269b07dd64b181ebe6711e4b578f4a6cd Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 12 Oct 2023 05:32:23 -0400 Subject: [PATCH 601/859] Roll Dart SDK from 9afac395dfb1 to 34c06f0bcb29 (1 revision) (#46820) https://dart.googlesource.com/sdk.git/+log/9afac395dfb1..34c06f0bcb29 2023-10-12 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-16.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jsimmons@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index d7cb98c10634f..14202fd05517a 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '9afac395dfb13d6b784dc3b05ece46d1b64c21f4', + 'dart_revision': '34c06f0bcb2910b453b2e75a642e14e8de42ab73', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py From ee94cdf5790724a62732ab9956a020e55539b74d Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 12 Oct 2023 08:53:07 -0400 Subject: [PATCH 602/859] Roll Skia from 2dd1579c6921 to 1d134a8f3ae2 (5 revisions) (#46824) https://skia.googlesource.com/skia.git/+log/2dd1579c6921..1d134a8f3ae2 2023-10-12 kjlubick@google.com Remove 4 files from include/private/gpu/ganesh 2023-10-12 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from ea332c715575 to 24dabdbbeee2 (5 revisions) 2023-10-12 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from baab66a8258b to 37653f7c343e (12 revisions) 2023-10-12 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from 7ab058e00df4 to a1666bf633a8 2023-10-12 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from ab3b6d0185b0 to 7ab058e00df4 (5 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/DEPS b/DEPS index 14202fd05517a..9231cbf7482af 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '2dd1579c69214c0669d02103942abb7217a1ed3b', + 'skia_revision': '1d134a8f3ae2fa59db4bcc2575d92e1d0d72486d', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 19e6be0636e70..f5a3a36471dbb 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 69516e1860b8f73301c346747f039253 +Signature: 6a9f7e57b6ac3b40b65178a7bcb1846e ==================================================================================================== LIBRARY: etc1 @@ -5025,7 +5025,6 @@ ORIGIN: ../../../third_party/skia/include/private/base/SkMacros.h + ../../../thi ORIGIN: ../../../third_party/skia/include/private/base/SkSafe32.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/private/base/SkSpan_impl.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/private/base/SkTo.h + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/include/private/gpu/ganesh/GrVkTypesPriv.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/private/gpu/vk/SkiaVulkan.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/utils/SkAnimCodecPlayer.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/utils/SkTextUtils.h + ../../../third_party/skia/LICENSE @@ -5154,6 +5153,7 @@ ORIGIN: ../../../third_party/skia/src/gpu/ganesh/vk/GrVkImageLayout.h + ../../.. ORIGIN: ../../../third_party/skia/src/gpu/ganesh/vk/GrVkSamplerYcbcrConversion.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/vk/GrVkSamplerYcbcrConversion.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/vk/GrVkTypesPriv.cpp + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/gpu/ganesh/vk/GrVkTypesPriv.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/vk/VulkanAMDMemoryAllocator.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/vk/VulkanAMDMemoryAllocator.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/vk/vulkanmemoryallocator/VulkanMemoryAllocatorWrapper.cpp + ../../../third_party/skia/LICENSE @@ -5239,7 +5239,6 @@ FILE: ../../../third_party/skia/include/private/base/SkMacros.h FILE: ../../../third_party/skia/include/private/base/SkSafe32.h FILE: ../../../third_party/skia/include/private/base/SkSpan_impl.h FILE: ../../../third_party/skia/include/private/base/SkTo.h -FILE: ../../../third_party/skia/include/private/gpu/ganesh/GrVkTypesPriv.h FILE: ../../../third_party/skia/include/private/gpu/vk/SkiaVulkan.h FILE: ../../../third_party/skia/include/utils/SkAnimCodecPlayer.h FILE: ../../../third_party/skia/include/utils/SkTextUtils.h @@ -5368,6 +5367,7 @@ FILE: ../../../third_party/skia/src/gpu/ganesh/vk/GrVkImageLayout.h FILE: ../../../third_party/skia/src/gpu/ganesh/vk/GrVkSamplerYcbcrConversion.cpp FILE: ../../../third_party/skia/src/gpu/ganesh/vk/GrVkSamplerYcbcrConversion.h FILE: ../../../third_party/skia/src/gpu/ganesh/vk/GrVkTypesPriv.cpp +FILE: ../../../third_party/skia/src/gpu/ganesh/vk/GrVkTypesPriv.h FILE: ../../../third_party/skia/src/gpu/vk/VulkanAMDMemoryAllocator.cpp FILE: ../../../third_party/skia/src/gpu/vk/VulkanAMDMemoryAllocator.h FILE: ../../../third_party/skia/src/gpu/vk/vulkanmemoryallocator/VulkanMemoryAllocatorWrapper.cpp @@ -5967,7 +5967,6 @@ ORIGIN: ../../../third_party/skia/include/effects/SkImageFilters.h + ../../../th ORIGIN: ../../../third_party/skia/include/effects/SkRuntimeEffect.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/gpu/gl/GrGLAssembleHelpers.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/private/base/SkThreadAnnotations.h + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/include/private/gpu/ganesh/GrGLTypesPriv.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/canvaskit/WasmCommon.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/canvaskit/debugger_bindings.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/canvaskit/paragraph_bindings.cpp + ../../../third_party/skia/LICENSE @@ -6008,6 +6007,7 @@ ORIGIN: ../../../third_party/skia/src/gpu/ganesh/gl/GrGLAssembleGLInterfaceAutog ORIGIN: ../../../third_party/skia/src/gpu/ganesh/gl/GrGLAssembleHelpers.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/gl/GrGLAssembleWebGLInterfaceAutogen.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/gl/GrGLTypesPriv.cpp + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/gpu/ganesh/gl/GrGLTypesPriv.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/image/SkSpecialImage_Ganesh.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/mock/GrMockCaps.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/mock/GrMockTypes.cpp + ../../../third_party/skia/LICENSE @@ -6027,7 +6027,6 @@ FILE: ../../../third_party/skia/include/effects/SkImageFilters.h FILE: ../../../third_party/skia/include/effects/SkRuntimeEffect.h FILE: ../../../third_party/skia/include/gpu/gl/GrGLAssembleHelpers.h FILE: ../../../third_party/skia/include/private/base/SkThreadAnnotations.h -FILE: ../../../third_party/skia/include/private/gpu/ganesh/GrGLTypesPriv.h FILE: ../../../third_party/skia/modules/canvaskit/WasmCommon.h FILE: ../../../third_party/skia/modules/canvaskit/debugger_bindings.cpp FILE: ../../../third_party/skia/modules/canvaskit/paragraph_bindings.cpp @@ -6068,6 +6067,7 @@ FILE: ../../../third_party/skia/src/gpu/ganesh/gl/GrGLAssembleGLInterfaceAutogen FILE: ../../../third_party/skia/src/gpu/ganesh/gl/GrGLAssembleHelpers.cpp FILE: ../../../third_party/skia/src/gpu/ganesh/gl/GrGLAssembleWebGLInterfaceAutogen.cpp FILE: ../../../third_party/skia/src/gpu/ganesh/gl/GrGLTypesPriv.cpp +FILE: ../../../third_party/skia/src/gpu/ganesh/gl/GrGLTypesPriv.h FILE: ../../../third_party/skia/src/gpu/ganesh/image/SkSpecialImage_Ganesh.h FILE: ../../../third_party/skia/src/gpu/ganesh/mock/GrMockCaps.cpp FILE: ../../../third_party/skia/src/gpu/ganesh/mock/GrMockTypes.cpp @@ -7104,7 +7104,6 @@ ORIGIN: ../../../third_party/skia/gm/drawglyphs.cpp + ../../../third_party/skia/ ORIGIN: ../../../third_party/skia/gm/largeclippedpath.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/skbug_12212.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/gm/slug.cpp + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/include/private/gpu/ganesh/GrMtlTypesPriv.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/private/gpu/graphite/MtlGraphiteTypesPriv.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/utils/SkOrderedFontMgr.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/jetski/src/Canvas.cpp + ../../../third_party/skia/LICENSE @@ -7158,6 +7157,7 @@ ORIGIN: ../../../third_party/skia/src/gpu/ganesh/mtl/GrMtlFramebuffer.h + ../../ ORIGIN: ../../../third_party/skia/src/gpu/ganesh/mtl/GrMtlFramebuffer.mm + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/mtl/GrMtlPipeline.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/mtl/GrMtlRenderCommandEncoder.h + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/gpu/ganesh/mtl/GrMtlTypesPriv.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/ops/AtlasRenderTask.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/ops/AtlasRenderTask.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/graphite/Buffer.cpp + ../../../third_party/skia/LICENSE @@ -7188,7 +7188,6 @@ FILE: ../../../third_party/skia/gm/drawglyphs.cpp FILE: ../../../third_party/skia/gm/largeclippedpath.cpp FILE: ../../../third_party/skia/gm/skbug_12212.cpp FILE: ../../../third_party/skia/gm/slug.cpp -FILE: ../../../third_party/skia/include/private/gpu/ganesh/GrMtlTypesPriv.h FILE: ../../../third_party/skia/include/private/gpu/graphite/MtlGraphiteTypesPriv.h FILE: ../../../third_party/skia/include/utils/SkOrderedFontMgr.h FILE: ../../../third_party/skia/modules/jetski/src/Canvas.cpp @@ -7242,6 +7241,7 @@ FILE: ../../../third_party/skia/src/gpu/ganesh/mtl/GrMtlFramebuffer.h FILE: ../../../third_party/skia/src/gpu/ganesh/mtl/GrMtlFramebuffer.mm FILE: ../../../third_party/skia/src/gpu/ganesh/mtl/GrMtlPipeline.h FILE: ../../../third_party/skia/src/gpu/ganesh/mtl/GrMtlRenderCommandEncoder.h +FILE: ../../../third_party/skia/src/gpu/ganesh/mtl/GrMtlTypesPriv.h FILE: ../../../third_party/skia/src/gpu/ganesh/ops/AtlasRenderTask.cpp FILE: ../../../third_party/skia/src/gpu/ganesh/ops/AtlasRenderTask.h FILE: ../../../third_party/skia/src/gpu/graphite/Buffer.cpp @@ -7325,7 +7325,6 @@ ORIGIN: ../../../third_party/skia/include/gpu/graphite/TextureInfo.h + ../../../ ORIGIN: ../../../third_party/skia/include/gpu/graphite/mtl/MtlBackendContext.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/gpu/graphite/mtl/MtlGraphiteTypes.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/private/chromium/Slug.h + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/include/private/gpu/ganesh/GrMockTypesPriv.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/canvaskit/paragraph_bindings_gen.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/base/SkEnumBitMask.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/core/SkBlendModeBlender.cpp + ../../../third_party/skia/LICENSE @@ -7359,6 +7358,7 @@ ORIGIN: ../../../third_party/skia/src/gpu/ganesh/d3d/GrD3DTypesPriv.cpp + ../../ ORIGIN: ../../../third_party/skia/src/gpu/ganesh/geometry/GrInnerFanTriangulator.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/gl/egl/GrGLMakeNativeInterface_egl.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/gl/glx/GrGLMakeNativeInterface_glx.cpp + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/gpu/ganesh/mock/GrMockTypesPriv.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/mtl/GrMtlTypesPriv.mm + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/ops/DrawMeshOp.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/ops/DrawMeshOp.h + ../../../third_party/skia/LICENSE @@ -7540,7 +7540,6 @@ FILE: ../../../third_party/skia/include/gpu/graphite/TextureInfo.h FILE: ../../../third_party/skia/include/gpu/graphite/mtl/MtlBackendContext.h FILE: ../../../third_party/skia/include/gpu/graphite/mtl/MtlGraphiteTypes.h FILE: ../../../third_party/skia/include/private/chromium/Slug.h -FILE: ../../../third_party/skia/include/private/gpu/ganesh/GrMockTypesPriv.h FILE: ../../../third_party/skia/modules/canvaskit/paragraph_bindings_gen.cpp FILE: ../../../third_party/skia/src/base/SkEnumBitMask.h FILE: ../../../third_party/skia/src/core/SkBlendModeBlender.cpp @@ -7574,6 +7573,7 @@ FILE: ../../../third_party/skia/src/gpu/ganesh/d3d/GrD3DTypesPriv.cpp FILE: ../../../third_party/skia/src/gpu/ganesh/geometry/GrInnerFanTriangulator.h FILE: ../../../third_party/skia/src/gpu/ganesh/gl/egl/GrGLMakeNativeInterface_egl.cpp FILE: ../../../third_party/skia/src/gpu/ganesh/gl/glx/GrGLMakeNativeInterface_glx.cpp +FILE: ../../../third_party/skia/src/gpu/ganesh/mock/GrMockTypesPriv.h FILE: ../../../third_party/skia/src/gpu/ganesh/mtl/GrMtlTypesPriv.mm FILE: ../../../third_party/skia/src/gpu/ganesh/ops/DrawMeshOp.cpp FILE: ../../../third_party/skia/src/gpu/ganesh/ops/DrawMeshOp.h From e943ed35d39e1a90ffc5de3f7e8b342c0cbd90cc Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Thu, 12 Oct 2023 07:38:13 -0700 Subject: [PATCH 603/859] Roll SwiftShader to include a fix required by the latest Clang toolchain (#46803) --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 9231cbf7482af..0703966aede42 100644 --- a/DEPS +++ b/DEPS @@ -632,7 +632,7 @@ deps = { Var('fuchsia_git') + '/third_party/pyyaml.git' + '@' + '25e97546488eee166b1abb229a27856cecd8b7ac', 'src/third_party/swiftshader': - Var('swiftshader_git') + '/SwiftShader.git' + '@' + '5f9ed9b16931c7155171d31f75004f73f0a3abc8', + Var('swiftshader_git') + '/SwiftShader.git' + '@' + '5b6f768198ce6a6485da31e1be06b5a17a2bf0a0', 'src/third_party/angle': Var('chromium_git') + '/angle/angle.git' + '@' + '6a09e41ce6ea8c93524faae1a925eb01562f53b1', From 2c00897d14e562d054171b48739e5e59f91a61aa Mon Sep 17 00:00:00 2001 From: Zachary Anderson Date: Thu, 12 Oct 2023 08:40:50 -0700 Subject: [PATCH 604/859] Remove the frontend server wrapper (#46440) Instead, this PR copies the frontend server from the Dart SDK (whether prebuilt or not) into the location expected by internal engine tests and artifact construction. This PR also consolidates the three GN templates that invoked the frontend server down to one. Framework presubs: https://github.com/flutter/flutter/pull/135836 Related: https://github.com/flutter/flutter/issues/60007 --- build/dart/rules.gni | 205 +++++++++++++++-------- common/config.gni | 19 ++- flutter_frontend_server/BUILD.gn | 25 ++- flutter_frontend_server/README.md | 71 -------- flutter_frontend_server/bin/starter.dart | 15 -- flutter_frontend_server/lib/server.dart | 91 ---------- flutter_frontend_server/pubspec.yaml | 84 +--------- testing/dart/BUILD.gn | 10 +- testing/dart/compile_test.gni | 91 ---------- testing/dart/observatory/BUILD.gn | 10 +- testing/smoke_test_failure/BUILD.gn | 10 +- testing/testing.gni | 96 ++--------- tools/gn | 12 +- 13 files changed, 201 insertions(+), 538 deletions(-) delete mode 100644 flutter_frontend_server/README.md delete mode 100644 flutter_frontend_server/bin/starter.dart delete mode 100644 flutter_frontend_server/lib/server.dart delete mode 100644 testing/dart/compile_test.gni diff --git a/build/dart/rules.gni b/build/dart/rules.gni index 00b801b2c204f..ba209f0b50b0b 100644 --- a/build/dart/rules.gni +++ b/build/dart/rules.gni @@ -10,21 +10,115 @@ import("//flutter/common/config.gni") import("//third_party/dart/build/dart/dart_action.gni") import("//third_party/dart/sdk_args.gni") -frontend_server_files = - exec_script("//third_party/dart/tools/list_dart_files.py", - [ - "absolute", - rebase_path("//flutter/flutter_frontend_server"), - ], - "list lines") - -frontend_server_files += - exec_script("//third_party/dart/tools/list_dart_files.py", - [ - "absolute", - rebase_path("//third_party/dart/pkg"), - ], - "list lines") +# Generates a Dart kernel snapshot using flutter_frontend_server. +# +# Arguments +# main_dart (required): +# The Dart entrypoint file. +# +# kernel_output (required): +# The path to the output kernel snapshot in the out directory. +# +# package_config (optional): +# The path to the package_config.json file. +# +# deps (optional): +# Additional dependencies. Dependencies on the frontend server and +# Flutter's platform.dill are included by default. This rule creates and +# uses a depfile, so listing all Dart sources is not necessary. +# +# extra_args (optional): +# Additional frontend server command line arguments. +template("flutter_frontend_server") { + assert(defined(invoker.main_dart), "The Dart test file must be specified.") + assert(defined(invoker.kernel_output), + "The Dart Kernel file location must be specified.") + + kernel_output = invoker.kernel_output + + common_deps = [ + "//flutter/flutter_frontend_server:frontend_server", + "//flutter/lib/snapshot:strong_platform", + ] + if (defined(invoker.deps)) { + common_deps += invoker.deps + } + + extra_args = [] + if (defined(invoker.extra_args)) { + extra_args += invoker.extra_args + } + + packages_args = [] + if (defined(invoker.package_config)) { + packages_args += [ + "--packages", + rebase_path(invoker.package_config), + ] + } + + snapshot_depfile = "$kernel_output.d" + + common_vm_args = [ "--disable-dart-dev" ] + + flutter_patched_sdk = rebase_path("$root_out_dir/flutter_patched_sdk") + + common_args = extra_args + packages_args + [ + "--sdk-root", + flutter_patched_sdk, + "--target=flutter", + "--depfile", + rebase_path(snapshot_depfile), + "--output-dill", + rebase_path(invoker.kernel_output), + rebase_path(invoker.main_dart), + ] + + if (flutter_prebuilt_dart_sdk) { + action(target_name) { + forward_variables_from(invoker, + [ + "visibility", + "testonly", + ], + [ "pool" ]) + deps = common_deps + pool = "//flutter/build/dart:dart_pool" + script = "//build/gn_run_binary.py" + inputs = [ invoker.main_dart ] + outputs = [ invoker.kernel_output ] + depfile = snapshot_depfile + + ext = "" + if (is_win) { + ext = ".exe" + } + dart = rebase_path("$host_prebuilt_dart_sdk/bin/dart$ext", root_out_dir) + frontend_server = + rebase_path("$root_gen_dir/frontend_server.dart.snapshot") + + args = [ dart ] + common_vm_args + [ frontend_server ] + common_args + } + } else { + dart_action(target_name) { + forward_variables_from(invoker, + [ + "visibility", + "testonly", + ], + [ "pool" ]) + deps = common_deps + pool = "//flutter/build/dart:dart_pool" + script = "$root_gen_dir/frontend_server.dart.snapshot" + packages = rebase_path(invoker.package_config) + inputs = [ invoker.main_dart ] + outputs = [ invoker.kernel_output ] + depfile = snapshot_depfile + vm_args = common_vm_args + args = common_args + } + } +} # Creates a dart kernel (dill) file suitable for use with gen_snapshot, as well # as the app-jit, aot-elf, or aot-assembly snapshot for targeting Flutter on @@ -48,61 +142,38 @@ template("flutter_snapshot") { kernel_output = "$target_gen_dir/kernel_blob.bin" - prebuilt_dart_action(kernel_target) { - script = "//flutter/flutter_frontend_server/bin/starter.dart" - - main_dart = rebase_path(invoker.main_dart) - package_config = rebase_path(invoker.package_config) - flutter_patched_sdk = rebase_path("$root_out_dir/flutter_patched_sdk") - - deps = [ "//flutter/lib/snapshot:strong_platform" ] - - inputs = [ - main_dart, - package_config, - ] + frontend_server_files - - outputs = [ kernel_output ] - - depfile = "$kernel_output.d" - abs_depfile = rebase_path(depfile) - vm_args = [ "--disable-dart-dev" ] - - args = [ - "--depfile=$abs_depfile", - "--packages=" + rebase_path(package_config), - "--target=flutter", - "--sdk-root=" + flutter_patched_sdk, - "--output-dill=" + rebase_path(kernel_output, root_build_dir), + extra_frontend_server_args = [] + if (is_aot) { + extra_frontend_server_args += [ + "--aot", + "--tfa", ] + } else { + # --no-link-platform is only valid when --aot isn't specified + extra_frontend_server_args += [ "--no-link-platform" ] + } - if (is_aot) { - args += [ - "--aot", - "--tfa", - ] - } else { - # --no-link-platform is only valid when --aot isn't specified - args += [ "--no-link-platform" ] - } - - if (defined(invoker.product) && invoker.product) { - # Setting this flag in a non-product release build for AOT (a "profile" - # build) causes the vm service isolate code to be tree-shaken from an app. - # See the pragma on the entrypoint here: - # - # https://github.com/dart-lang/sdk/blob/main/sdk/lib/_internal/vm/bin/vmservice_io.dart#L240 - # - # Also, this define excludes debugging and profiling code from Flutter. - args += [ "-Ddart.vm.product=true" ] - } else { - if (flutter_runtime_mode == "profile") { - # The following define excludes debugging code from Flutter. - args += [ "-Ddart.vm.profile=true" ] - } + if (defined(invoker.product) && invoker.product) { + # Setting this flag in a non-product release build for AOT (a "profile" + # build) causes the vm service isolate code to be tree-shaken from an app. + # See the pragma on the entrypoint here: + # + # https://github.com/dart-lang/sdk/blob/main/sdk/lib/_internal/vm/bin/vmservice_io.dart#L240 + # + # Also, this define excludes debugging and profiling code from Flutter. + extra_frontend_server_args += [ "-Ddart.vm.product=true" ] + } else { + if (flutter_runtime_mode == "profile") { + # The following define excludes debugging code from Flutter. + extra_frontend_server_args += [ "-Ddart.vm.profile=true" ] } + } - args += [ rebase_path(main_dart) ] + flutter_frontend_server(kernel_target) { + main_dart = invoker.main_dart + package_config = invoker.package_config + kernel_output = kernel_output + extra_args = extra_frontend_server_args } compiled_action(snapshot_target) { @@ -271,7 +342,7 @@ template("application_snapshot") { # Ensure the compiled appliation (e.g. frontend-server, ...) will use this # Dart SDK hash when consuming/producing kernel. # - # (Instead of ensuring every user of the "application_snapshot" passes it's + # (Instead of ensuring every user of the "application_snapshot" passes its # own) snapshot_vm_args += [ "-Dsdk_hash=$sdk_hash" ] diff --git a/common/config.gni b/common/config.gni index 56035f10a3961..41439fed9dc82 100644 --- a/common/config.gni +++ b/common/config.gni @@ -113,18 +113,27 @@ if (flutter_prebuilt_dart_sdk) { _host_os_name = "windows" } + # When building 32-bit Android development artifacts for Windows host (like + # gen_snapshot), the host_cpu is set to x86. However, the correct prebuilt + # Dart SDK to use during this build is still the 64-bit one. + _host_cpu = host_cpu + if (host_os == "win" && host_cpu == "x86") { + _host_cpu = "x64" + } + _target_prebuilt_dart_sdk_config = "$_target_os_name-$target_cpu" - _host_prebuilt_dart_sdk_config = "$_host_os_name-$host_cpu" + _host_prebuilt_dart_sdk_config = "$_host_os_name-$_host_cpu" target_prebuilt_dart_sdk = "//flutter/prebuilts/$_target_prebuilt_dart_sdk_config/dart-sdk" host_prebuilt_dart_sdk = "//flutter/prebuilts/$_host_prebuilt_dart_sdk_config/dart-sdk" - # There is no prebuilt Dart SDK targeting Fuchsia, but we also don't need - # one, so even when the build is targeting Fuchsia, use the prebuilt - # Dart SDK for the host. - if (current_toolchain == host_toolchain || is_fuchsia || is_wasm) { + # There is no prebuilt Dart SDK targeting Fuchsia, iOS, and Android, but we + # also don't need one, so even when the build is targeting one of these + # platforms, we use the prebuilt Dart SDK for the host. + if (current_toolchain == host_toolchain || target_os == "android" || + target_os == "fuchsia" || target_os == "ios" || target_os == "wasm") { prebuilt_dart_sdk = host_prebuilt_dart_sdk prebuilt_dart_sdk_config = _host_prebuilt_dart_sdk_config } else { diff --git a/flutter_frontend_server/BUILD.gn b/flutter_frontend_server/BUILD.gn index 9e986066595ab..e389148ba36da 100644 --- a/flutter_frontend_server/BUILD.gn +++ b/flutter_frontend_server/BUILD.gn @@ -2,19 +2,18 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//flutter/build/dart/rules.gni") +import("//flutter/common/config.gni") -application_snapshot("frontend_server") { - main_dart = "bin/starter.dart" - deps = [ "//flutter/lib/snapshot:kernel_platform_files" ] +copy("frontend_server") { + if (flutter_prebuilt_dart_sdk) { + snapshot = + "$host_prebuilt_dart_sdk/bin/snapshots/frontend_server.dart.snapshot" + } else { + deps = [ "//flutter/build/dart:dart_sdk" ] + snapshot = + "$root_out_dir/dart-sdk/bin/snapshots/frontend_server.dart.snapshot" + } - package_config = rebase_path(".dart_tool/package_config.json") - flutter_patched_sdk = rebase_path("$root_out_dir/flutter_patched_sdk") - training_args = [ - "--train", - "--sdk-root=$flutter_patched_sdk", - rebase_path(main_dart), - ] - - inputs = frontend_server_files + sources = [ snapshot ] + outputs = [ "$root_gen_dir/frontend_server.dart.snapshot" ] } diff --git a/flutter_frontend_server/README.md b/flutter_frontend_server/README.md deleted file mode 100644 index 3007831b924c6..0000000000000 --- a/flutter_frontend_server/README.md +++ /dev/null @@ -1,71 +0,0 @@ -# Frontend Server - -Frontend server is simple wrapper around Dart Frontend. It is a Dart application -that compiles Dart source into Dart Kernel binary (.dill-file). -Documentation on Dart Kernel (semantic, binary format, etc) can be found here: -https://github.com/dart-lang/sdk/wiki/Kernel-Documentation. - -Frontend server runs in two modes: - - immediate mode, where Dart source file name is provided as command line - argument; - - interactive mode, where communication is happening over stdin/stdout. - -## Interactive mode instructions - -### Compile/Recompile -``` -compile -``` - Compiles Dart source file with Dart Frontend. Replies with `result` response. - -``` -recompile - - -... - -``` - Incrementally recompiles Dart program previously compiled in current session, taking into account - changes in the listed files. Replies with `result` response. - - Relative paths should be relative to current working directory for the shell that launched - Frontend Server. - -### Accept/Reject -``` -accept -``` - Accepts results of incremental compilation, so that on next recompilation request Dart Frontend - will not include these recompiled files. -``` -reject -``` - Rejects results of incremental compilation, so that on next recompilation request Dart Frontend - will include compilation results from previously rejected recompilation in addition to what it - will recompile based on newly changed files. - Small technical detail is that Dart Frontend will not recompile files from previously rejected - recompilation attempts (unless they were changed since then), it will just include appropriate - kernel binaries it kept around from those previously rejected compilation requests. - - One use of `accept` and `reject` instructions is in the context of Dart VM hot-reload. Dart VM can - reject user-provided incremental change to what is currently running. It could happen for variety - of Dart VM internal reasons. For example, if incremental update changes some `class` to `enum`, - such update can not be hot-reloaded by VM at this point, will be rejected. - -### Quit -``` -quit -``` - Stops the server. - -## Response from the server - -``` -result - - [] -``` -Response from the Dart Frontend compiler is bracketed by `` tags. If the compiler -was able to produce a Dart Kernel file, the name of this file `` is provided too. -If the compiler encountered unrecoverable errors, there will be no output file name provided. - diff --git a/flutter_frontend_server/bin/starter.dart b/flutter_frontend_server/bin/starter.dart deleted file mode 100644 index e839087dd5d04..0000000000000 --- a/flutter_frontend_server/bin/starter.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - - -import 'dart:io'; - -import 'package:flutter_frontend_server/server.dart'; - -Future main(List args) async { - final int exitCode = await starter(args); - if (exitCode != 0) { - exit(exitCode); - } -} diff --git a/flutter_frontend_server/lib/server.dart b/flutter_frontend_server/lib/server.dart deleted file mode 100644 index 8733c5b7a9070..0000000000000 --- a/flutter_frontend_server/lib/server.dart +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// ignore_for_file: avoid_print - - -import 'dart:async'; -import 'dart:io' hide FileSystemEntity; - -import 'package:args/args.dart'; -import 'package:frontend_server/frontend_server.dart' as frontend - show - CompilerInterface, - FrontendCompiler, - argParser, - listenAndCompile, - usage; -import 'package:path/path.dart' as path; - -/// Entry point for this module, that creates `FrontendCompiler` instance and -/// processes user input. -/// `compiler` is an optional parameter so it can be replaced with mocked -/// version for testing. -Future starter( - List args, { - frontend.CompilerInterface? compiler, - Stream>? input, - StringSink? output, -}) async { - ArgResults options; - try { - options = frontend.argParser.parse(args); - } catch (error) { - print('ERROR: $error\n'); - print(frontend.usage); - return 1; - } - - if (options['train'] as bool) { - if (!options.rest.isNotEmpty) { - throw Exception('Must specify input.dart'); - } - - final String input = options.rest[0]; - final String sdkRoot = options['sdk-root'] as String; - final Directory temp = - Directory.systemTemp.createTempSync('train_frontend_server'); - try { - for (int i = 0; i < 3; i++) { - final String outputTrainingDill = path.join(temp.path, 'app.dill'); - options = frontend.argParser.parse([ - '--incremental', - '--sdk-root=$sdkRoot', - '--output-dill=$outputTrainingDill', - '--target=flutter', - '--track-widget-creation', - '--enable-asserts', - ]); - compiler ??= frontend.FrontendCompiler(output); - - await compiler.compile(input, options); - compiler.acceptLastDelta(); - await compiler.recompileDelta(); - compiler.acceptLastDelta(); - compiler.resetIncrementalCompiler(); - await compiler.recompileDelta(); - compiler.acceptLastDelta(); - await compiler.recompileDelta(); - compiler.acceptLastDelta(); - } - return 0; - } finally { - temp.deleteSync(recursive: true); - } - } - - compiler ??= frontend.FrontendCompiler(output, - useDebuggerModuleNames: options['debugger-module-names'] as bool, - emitDebugMetadata: options['experimental-emit-debug-metadata'] as bool, - unsafePackageSerialization: - options['unsafe-package-serialization'] as bool); - - if (options.rest.isNotEmpty) { - return await compiler.compile(options.rest[0], options) ? 0 : 254; - } - - final Completer completer = Completer(); - frontend.listenAndCompile(compiler, input ?? stdin, options, completer); - return completer.future; -} diff --git a/flutter_frontend_server/pubspec.yaml b/flutter_frontend_server/pubspec.yaml index 2f0d37c5583b7..16fd3ad7ee566 100644 --- a/flutter_frontend_server/pubspec.yaml +++ b/flutter_frontend_server/pubspec.yaml @@ -20,102 +20,20 @@ homepage: https://flutter.dev environment: sdk: '>=3.2.0-0 <4.0.0' -dependencies: - args: any - frontend_server: any - path: any - dev_dependencies: litetest: any + path: any dependency_overrides: - _fe_analyzer_shared: - path: ../../third_party/dart/pkg/_fe_analyzer_shared - _js_interop_checks: - path: ../../third_party/dart/pkg/_js_interop_checks - args: - path: ../../third_party/dart/third_party/pkg/args - async: - path: ../../third_party/dart/third_party/pkg/async async_helper: path: ../../third_party/dart/pkg/async_helper - bazel_worker: - path: ../../third_party/dart/third_party/pkg/bazel_worker - build_integration: - path: ../../third_party/dart/pkg/build_integration - collection: - path: ../../third_party/dart/third_party/pkg/collection - compiler: - path: ../../third_party/dart/pkg/compiler - crypto: - path: ../../third_party/dart/third_party/pkg/crypto - dart_internal: - path: ../../third_party/dart/pkg/dart_internal - dart2js_info: - path: ../../third_party/dart/pkg/dart2js_info - dart2wasm: - path: ../../third_party/dart/pkg/dart2wasm - dev_compiler: - path: ../../third_party/dart/pkg/dev_compiler expect: path: ../../third_party/dart/pkg/expect - ffi: - path: ../../third_party/dart/third_party/pkg/ffi - fixnum: - path: ../../third_party/dart/third_party/pkg/fixnum - front_end: - path: ../../third_party/dart/pkg/front_end - frontend_server: - path: ../../third_party/dart/pkg/frontend_server - http_parser: - path: ../../third_party/dart/third_party/pkg/http_parser - js_ast: - path: ../../third_party/dart/pkg/js_ast - js_runtime: - path: ../../third_party/dart/pkg/js_runtime - js_shared: - path: ../../third_party/dart/pkg/js_shared - kernel: - path: ../../third_party/dart/pkg/kernel litetest: path: ../testing/litetest meta: path: ../../third_party/dart/pkg/meta - mmap: - path: ../../third_party/dart/pkg/mmap - package_config: - path: ../../third_party/dart/third_party/pkg/package_config path: path: ../../third_party/dart/third_party/pkg/path - protobuf: - path: ../../third_party/dart/third_party/pkg/protobuf/protobuf - shelf: - path: ../../third_party/dart/third_party/pkg/shelf/pkgs/shelf smith: path: ../../third_party/dart/pkg/smith - source_maps: - path: ../../third_party/dart/third_party/pkg/source_maps - source_span: - path: ../../third_party/dart/third_party/pkg/source_span - stack_trace: - path: ../../third_party/dart/third_party/pkg/stack_trace - stream_channel: - path: ../../third_party/dart/third_party/pkg/stream_channel - string_scanner: - path: ../../third_party/dart/third_party/pkg/string_scanner - term_glyph: - path: ../../third_party/dart/third_party/pkg/term_glyph - typed_data: - path: ../../third_party/dart/third_party/pkg/typed_data - usage: - path: ../../third_party/dart/third_party/pkg/usage - vm: - path: ../../third_party/dart/pkg/vm - vm_service: - path: ../../third_party/dart/pkg/vm_service - vm_snapshot_analysis: - path: ../../third_party/dart/pkg/vm_snapshot_analysis - wasm_builder: - path: ../../third_party/dart/pkg/wasm_builder - yaml: - path: ../../third_party/dart/third_party/pkg/yaml diff --git a/testing/dart/BUILD.gn b/testing/dart/BUILD.gn index 2e1bb1ad38f67..d9bd962168333 100644 --- a/testing/dart/BUILD.gn +++ b/testing/dart/BUILD.gn @@ -2,7 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//flutter/testing/dart/compile_test.gni") +import("//flutter/build/dart/rules.gni") tests = [ "assets_test.dart", @@ -48,10 +48,10 @@ tests = [ ] foreach(test, tests) { - compile_flutter_dart_test("compile_$test") { - dart_file = test - dart_kernel = "$root_gen_dir/$test.dill" - packages = ".dart_tool/package_config.json" + flutter_frontend_server("compile_$test") { + main_dart = test + kernel_output = "$root_gen_dir/$test.dill" + package_config = ".dart_tool/package_config.json" } } diff --git a/testing/dart/compile_test.gni b/testing/dart/compile_test.gni deleted file mode 100644 index fbdf76ea849da..0000000000000 --- a/testing/dart/compile_test.gni +++ /dev/null @@ -1,91 +0,0 @@ -# Copyright 2013 The Flutter Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import("//build/compiled_action.gni") -import("//flutter/common/config.gni") -import("//third_party/dart/build/dart/dart_action.gni") -import("//third_party/dart/sdk_args.gni") - -import("//third_party/dart/build/dart/dart_action.gni") - -# Generates a Dart kernel snapshot using flutter_frontend_server. -# -# Arguments -# dart_main (required): The Main Dart file. -# -# dart_kernel (required): The path to the output kernel snapshot in the out -# directory. -# -# packages (required): The path to the .packages file. -template("compile_flutter_dart_test") { - assert(defined(invoker.dart_file), "The Dart test file must be specified.") - assert(defined(invoker.dart_kernel), - "The Dart Kernel file location must be specified.") - assert(defined(invoker.packages), - "The path to the .packages file must be specified.") - - common_deps = [ - "//flutter/flutter_frontend_server:frontend_server", - "//flutter/lib/snapshot:strong_platform", - ] - if (defined(invoker.deps)) { - common_deps += invoker.deps - } - - snapshot_depfile = - "$root_gen_dir/flutter/testing/snapshot_$target_name.depfile.d" - - common_vm_args = [ "--disable-dart-dev" ] - - flutter_patched_sdk = rebase_path("$root_out_dir/flutter_patched_sdk") - - common_args = [ - "--sound-null-safety", - "--sdk-root", - flutter_patched_sdk, - "--target=flutter", - "--packages", - rebase_path(invoker.packages), - "--depfile", - rebase_path(snapshot_depfile), - "--output-dill", - rebase_path(invoker.dart_kernel, root_out_dir), - rebase_path(invoker.dart_file), - ] - - if (flutter_prebuilt_dart_sdk) { - action(target_name) { - testonly = true - deps = common_deps - pool = "//flutter/build/dart:dart_pool" - script = "//build/gn_run_binary.py" - inputs = [ invoker.dart_file ] - outputs = [ invoker.dart_kernel ] - depfile = snapshot_depfile - - ext = "" - if (is_win) { - ext = ".exe" - } - dart = rebase_path("$host_prebuilt_dart_sdk/bin/dart$ext", root_out_dir) - frontend_server = - rebase_path("$root_gen_dir/frontend_server.dart.snapshot") - - args = [ dart ] + common_vm_args + [ frontend_server ] + common_args - } - } else { - dart_action(target_name) { - testonly = true - deps = common_deps - pool = "//flutter/build/dart:dart_pool" - script = "$root_gen_dir/frontend_server.dart.snapshot" - packages = rebase_path(invoker.packages) - inputs = [ invoker.dart_file ] - outputs = [ invoker.dart_kernel ] - depfile = snapshot_depfile - vm_args = common_vm_args - args = common_args - } - } -} diff --git a/testing/dart/observatory/BUILD.gn b/testing/dart/observatory/BUILD.gn index a0e6afbe6be17..35c573a85a4db 100644 --- a/testing/dart/observatory/BUILD.gn +++ b/testing/dart/observatory/BUILD.gn @@ -2,7 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//flutter/testing/dart/compile_test.gni") +import("//flutter/build/dart/rules.gni") tests = [ "skp_test.dart", @@ -12,10 +12,10 @@ tests = [ ] foreach(test, tests) { - compile_flutter_dart_test("compile_$test") { - dart_file = test - dart_kernel = "$root_gen_dir/$test.dill" - packages = "../.dart_tool/package_config.json" + flutter_frontend_server("compile_$test") { + main_dart = test + kernel_output = "$root_gen_dir/$test.dill" + package_config = "../.dart_tool/package_config.json" } } diff --git a/testing/smoke_test_failure/BUILD.gn b/testing/smoke_test_failure/BUILD.gn index 8110ea199fa16..1ce144ecc523a 100644 --- a/testing/smoke_test_failure/BUILD.gn +++ b/testing/smoke_test_failure/BUILD.gn @@ -2,15 +2,15 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//flutter/testing/dart/compile_test.gni") +import("//flutter/build/dart/rules.gni") tests = [ "fail_test.dart" ] foreach(test, tests) { - compile_flutter_dart_test("compile_$test") { - dart_file = test - dart_kernel = "$root_gen_dir/$test.dill" - packages = ".dart_tool/package_config.json" + flutter_frontend_server("compile_$test") { + main_dart = test + kernel_output = "$root_gen_dir/$test.dill" + package_config = ".dart_tool/package_config.json" } } diff --git a/testing/testing.gni b/testing/testing.gni index 7059bc15f017b..cf59753e51dc7 100644 --- a/testing/testing.gni +++ b/testing/testing.gni @@ -3,9 +3,8 @@ # found in the LICENSE file. import("//build/compiled_action.gni") +import("//flutter/build/dart/rules.gni") import("//flutter/common/config.gni") -import("//third_party/dart/build/dart/dart_action.gni") -import("//third_party/dart/sdk_args.gni") is_aot_test = flutter_runtime_mode == "profile" || flutter_runtime_mode == "release" @@ -51,48 +50,6 @@ template("fixtures_location") { } } -# Invokes the frontend server using the built Dart SDK or the prebuilt Dart SDK -# as appropriate. -# -# Parameters: -# The parameters testonly, deps, inputs, outputs, depfile, and args are -# forwarded from the invoker either to an 'action' target or a 'dart_action' -# target depending on whether a prebuilt Dart SDK is used or not, -# respectively. -template("_frontend_server") { - if (flutter_prebuilt_dart_sdk) { - action(target_name) { - testonly = invoker.testonly - deps = invoker.deps - script = "//build/gn_run_binary.py" - inputs = invoker.inputs - outputs = invoker.outputs - depfile = invoker.depfile - pool = "//flutter/build/dart:dart_pool" - - ext = "" - if (is_win) { - ext = ".exe" - } - dart = rebase_path("$host_prebuilt_dart_sdk/bin/dart$ext", root_out_dir) - frontend_server = rebase_path( - "$host_prebuilt_dart_sdk/bin/snapshots/frontend_server.dart.snapshot") - - args = [ - dart, - frontend_server, - ] + invoker.args - } - } else { - dart_action(target_name) { - forward_variables_from(invoker, "*") - deps += [ "//third_party/dart/utils/kernel-service:frontend_server" ] - script = "$root_out_dir/frontend_server.dart.snapshot" - pool = "//flutter/build/dart:dart_pool" - } - } -} - # Generates the Dart kernel snapshot. # # Arguments @@ -107,45 +64,26 @@ template("dart_snapshot_kernel") { assert(defined(invoker.dart_kernel), "The Dart Kernel file location must be specified") - _frontend_server(target_name) { - testonly = true - - deps = [ "//flutter/lib/snapshot:strong_platform" ] - - inputs = [ invoker.dart_main ] - - outputs = [ invoker.dart_kernel ] + args = [] + if (flutter_runtime_mode == "release" || + flutter_runtime_mode == "jit_release") { + args += [ "-Ddart.vm.product=true" ] + } - snapshot_depfile = "$target_gen_dir/snapshot_$target_name.depfile.d" - depfile = snapshot_depfile + if (is_aot_test) { + args += [ + "--aot", - args = [ - "--sdk-root", - rebase_path("$root_out_dir/flutter_patched_sdk"), - "--target", - "flutter", - "--sound-null-safety", - "--output-dill", - rebase_path(invoker.dart_kernel, root_out_dir), - "--depfile", - rebase_path(snapshot_depfile), + # type flow analysis + "--tfa", ] + } - if (flutter_runtime_mode == "release" || - flutter_runtime_mode == "jit_release") { - args += [ "-Ddart.vm.product=true" ] - } - - if (is_aot_test) { - args += [ - "--aot", - - # type flow analysis - "--tfa", - ] - } - - args += [ rebase_path(invoker.dart_main) ] + flutter_frontend_server(target_name) { + testonly = true + main_dart = invoker.dart_main + kernel_output = invoker.dart_kernel + extra_args = args } } diff --git a/tools/gn b/tools/gn index 196219d35d611..4eed7044d185f 100755 --- a/tools/gn +++ b/tools/gn @@ -106,16 +106,12 @@ def is_host_build(args): # Determines whether a prebuilt Dart SDK can be used instead of building one. -# We can use a prebuilt Dart SDK when: -# 1. It is a host build, a build targeting Fuchsia, or a build targeting desktop. -# 2. The prebuilt SDK exists under //flutter/prebuilts/$OS-$ARCH. def can_use_prebuilt_dart(args): prebuilt = None - # In a Fuchsia build, we can use a prebuilt Dart SDK for the host to build - # platform agnostic artifacts (e.g. kernel snapshots), and a Dart SDK - # targeting Fuchsia is not needed. So, it is safe to say that the prebuilt - # Dart SDK in a Fuchsia build is the host prebuilt Dart SDK. - if args.target_os is None or args.target_os == 'fuchsia': + # When doing a 'host' build (args.target_os is None), or a build when the + # target OS and host OS are different, the prebuilt Dart SDK is the Dart SDK + # for the host system's OS and archetecture. + if args.target_os is None or args.target_os in ['android', 'ios', 'fuchsia']: if sys.platform.startswith(('cygwin', 'win')): prebuilt = 'windows-x64' elif sys.platform == 'darwin': From 51be914f210d9a3f47f267c6418b2702daa8d805 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 12 Oct 2023 13:41:56 -0400 Subject: [PATCH 605/859] Roll Fuchsia Linux SDK from giQtXxdSj6NdIViCw... to QLiomHC9D-GWh_gyK... (#46838) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jsimmons@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 0703966aede42..1a8b6e90832a3 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'giQtXxdSj6NdIViCwaHnk5qMp1gdQuEGCp47UcFxb-kC' + 'version': 'QLiomHC9D-GWh_gyK7_8zj8B7d_SPQ4hjjUKeVilBEQC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index bb4acb35be64e..aa00891b5c7cb 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: 87f5eb2411e0491379133abe3b709ffe +Signature: aa2171db9c3809e11543619fea93b5df ==================================================================================================== LIBRARY: fuchsia_sdk From da50f7f632d4481876b76f50359dbffa398ab735 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Thu, 12 Oct 2023 11:19:35 -0700 Subject: [PATCH 606/859] [Impeller] Specify default border color for texture wrap mode that clamps. (#46806) Fixes https://github.com/flutter/flutter/issues/136153 --- impeller/renderer/backend/gles/gles.h | 6 ++- .../renderer/backend/gles/proc_table_gles.h | 1 + .../renderer/backend/gles/sampler_gles.cc | 37 ++++++++++++------- .../backend/metal/sampler_library_mtl.mm | 4 +- 4 files changed, 33 insertions(+), 15 deletions(-) diff --git a/impeller/renderer/backend/gles/gles.h b/impeller/renderer/backend/gles/gles.h index e14116ef52b50..9022cd02cfe88 100644 --- a/impeller/renderer/backend/gles/gles.h +++ b/impeller/renderer/backend/gles/gles.h @@ -6,7 +6,11 @@ // IWYU pragma: begin_exports #include "GLES3/gl3.h" -#define GL_CLAMP_TO_BORDER 0x812D + +// Defines for extension enums. +#define IMPELLER_GL_CLAMP_TO_BORDER 0x812D +#define IMPELLER_GL_TEXTURE_BORDER_COLOR 0x1004 + #define GL_GLEXT_PROTOTYPES #include "GLES2/gl2ext.h" // IWYU pragma: end_exports diff --git a/impeller/renderer/backend/gles/proc_table_gles.h b/impeller/renderer/backend/gles/proc_table_gles.h index 22945e6283850..bbf94a23ea985 100644 --- a/impeller/renderer/backend/gles/proc_table_gles.h +++ b/impeller/renderer/backend/gles/proc_table_gles.h @@ -175,6 +175,7 @@ struct GLProc { PROC(StencilOpSeparate); \ PROC(TexImage2D); \ PROC(TexParameteri); \ + PROC(TexParameterfv); \ PROC(Uniform1fv); \ PROC(Uniform1i); \ PROC(Uniform2fv); \ diff --git a/impeller/renderer/backend/gles/sampler_gles.cc b/impeller/renderer/backend/gles/sampler_gles.cc index 19d4e0ff8f623..729add5fee14e 100644 --- a/impeller/renderer/backend/gles/sampler_gles.cc +++ b/impeller/renderer/backend/gles/sampler_gles.cc @@ -64,9 +64,10 @@ static GLint ToAddressMode(SamplerAddressMode mode, return GL_MIRRORED_REPEAT; case SamplerAddressMode::kDecal: if (supports_decal_sampler_address_mode) { - return GL_CLAMP_TO_BORDER; + return IMPELLER_GL_CLAMP_TO_BORDER; + } else { + return GL_CLAMP_TO_EDGE; } - break; } FML_UNREACHABLE(); } @@ -96,18 +97,28 @@ bool SamplerGLES::ConfigureBoundTexture(const TextureGLES& texture, mip_filter = desc.mip_filter; } - gl.TexParameteri(target.value(), GL_TEXTURE_MIN_FILTER, + gl.TexParameteri(*target, GL_TEXTURE_MIN_FILTER, ToParam(desc.min_filter, mip_filter)); - gl.TexParameteri(target.value(), GL_TEXTURE_MAG_FILTER, - ToParam(desc.mag_filter)); - gl.TexParameteri( - target.value(), GL_TEXTURE_WRAP_S, - ToAddressMode(desc.width_address_mode, - gl.GetCapabilities()->SupportsDecalSamplerAddressMode())); - gl.TexParameteri( - target.value(), GL_TEXTURE_WRAP_T, - ToAddressMode(desc.height_address_mode, - gl.GetCapabilities()->SupportsDecalSamplerAddressMode())); + gl.TexParameteri(*target, GL_TEXTURE_MAG_FILTER, ToParam(desc.mag_filter)); + + const auto supports_decal_mode = + gl.GetCapabilities()->SupportsDecalSamplerAddressMode(); + + const auto wrap_s = + ToAddressMode(desc.width_address_mode, supports_decal_mode); + const auto wrap_t = + ToAddressMode(desc.height_address_mode, supports_decal_mode); + + gl.TexParameteri(*target, GL_TEXTURE_WRAP_S, wrap_s); + gl.TexParameteri(*target, GL_TEXTURE_WRAP_T, wrap_t); + + if (wrap_s == IMPELLER_GL_CLAMP_TO_BORDER || + wrap_t == IMPELLER_GL_CLAMP_TO_BORDER) { + // Transparent black. + const GLfloat border_color[4] = {0.0f, 0.0f, 0.0f, 0.0f}; + gl.TexParameterfv(*target, IMPELLER_GL_TEXTURE_BORDER_COLOR, border_color); + } + return true; } diff --git a/impeller/renderer/backend/metal/sampler_library_mtl.mm b/impeller/renderer/backend/metal/sampler_library_mtl.mm index c9099c509e646..fa6559139f1a1 100644 --- a/impeller/renderer/backend/metal/sampler_library_mtl.mm +++ b/impeller/renderer/backend/metal/sampler_library_mtl.mm @@ -29,7 +29,9 @@ desc.sAddressMode = ToMTLSamplerAddressMode(descriptor.width_address_mode); desc.tAddressMode = ToMTLSamplerAddressMode(descriptor.height_address_mode); desc.rAddressMode = ToMTLSamplerAddressMode(descriptor.depth_address_mode); - + if (@available(iOS 14.0, macos 10.12, *)) { + desc.borderColor = MTLSamplerBorderColorTransparentBlack; + } if (!descriptor.label.empty()) { desc.label = @(descriptor.label.c_str()); } From 444b64e5c28ac53ca8e631af1a26348ffb2c7ed3 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 12 Oct 2023 14:34:58 -0400 Subject: [PATCH 607/859] Roll Fuchsia Mac SDK from 8AXhoo-MMME8NMKt0... to XnH2CtqEH7byTHna7... (#46843) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jsimmons@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 1a8b6e90832a3..e2efe4d2c741d 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': '8AXhoo-MMME8NMKt0B8sY1vvXSonu9S8AbTu-nS2CaAC' + 'version': 'XnH2CtqEH7byTHna7UVfQCBuffiqSMuugKcO-uitecgC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From ddb8bb7065d69d34d9b3f5131f2e926fe9a3c4d1 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 12 Oct 2023 14:41:59 -0400 Subject: [PATCH 608/859] Roll Skia from 1d134a8f3ae2 to fdcbbc4d5c25 (7 revisions) (#46844) https://skia.googlesource.com/skia.git/+log/1d134a8f3ae2..fdcbbc4d5c25 2023-10-12 kjlubick@google.com Fix missing filegroup in opts:legacy_hsw 2023-10-12 jvanverth@google.com [graphite] Add multitexture support to RasterPathAtlas 2023-10-12 johnstiles@google.com Fix inlining of calls with unused inout params. 2023-10-12 kjlubick@google.com Add empty filegroups to appease G3 2023-10-12 michaelludwig@google.com [skif] Use content bounds for leaf input layer sizing 2023-10-12 jamesgk@google.com [graphite] Use hardware image tiling when not subsetting 2023-10-12 kjlubick@google.com Deploy CanvasKit 0.39.1 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index e2efe4d2c741d..633b2616cabb1 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '1d134a8f3ae2fa59db4bcc2575d92e1d0d72486d', + 'skia_revision': 'fdcbbc4d5c25cd4d31cc47332ff78bf173d1c9cf', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index f5a3a36471dbb..19cdf5a927021 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 6a9f7e57b6ac3b40b65178a7bcb1846e +Signature: cf6b982df4fd0956282a7bc325240fe2 ==================================================================================================== LIBRARY: etc1 @@ -8770,7 +8770,9 @@ ORIGIN: ../../../third_party/skia/include/private/chromium/GrDeferredDisplayList ORIGIN: ../../../third_party/skia/include/private/chromium/GrPromiseImageTexture.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/private/chromium/GrSurfaceCharacterization.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/private/chromium/SkImageChromium.h + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/include/private/gpu/ganesh/GrGLTypes_empty.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/private/gpu/ganesh/GrTextureGenerator.h + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/include/private/gpu/ganesh/GrVkTypes_empty.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/private/gpu/graphite/ContextOptionsPriv.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/bentleyottmann/include/BentleyOttmann1.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/bentleyottmann/include/BruteForceCrossings.h + ../../../third_party/skia/LICENSE @@ -9035,7 +9037,9 @@ FILE: ../../../third_party/skia/include/private/chromium/GrDeferredDisplayListRe FILE: ../../../third_party/skia/include/private/chromium/GrPromiseImageTexture.h FILE: ../../../third_party/skia/include/private/chromium/GrSurfaceCharacterization.h FILE: ../../../third_party/skia/include/private/chromium/SkImageChromium.h +FILE: ../../../third_party/skia/include/private/gpu/ganesh/GrGLTypes_empty.h FILE: ../../../third_party/skia/include/private/gpu/ganesh/GrTextureGenerator.h +FILE: ../../../third_party/skia/include/private/gpu/ganesh/GrVkTypes_empty.h FILE: ../../../third_party/skia/include/private/gpu/graphite/ContextOptionsPriv.h FILE: ../../../third_party/skia/modules/bentleyottmann/include/BentleyOttmann1.h FILE: ../../../third_party/skia/modules/bentleyottmann/include/BruteForceCrossings.h From 68d2653a91e3d0e8695a70a49dacedaf69aa0b56 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 12 Oct 2023 15:52:15 -0400 Subject: [PATCH 609/859] Roll Skia from fdcbbc4d5c25 to 222fe6b9b0eb (2 revisions) (#46849) https://skia.googlesource.com/skia.git/+log/fdcbbc4d5c25..222fe6b9b0eb 2023-10-12 bungeman@google.com Reland "[pdf] Simplify filled paths" 2023-10-12 kjlubick@google.com [bazel] Update taskdrvier used for BazelBuild If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 633b2616cabb1..23bf529e99ba0 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'fdcbbc4d5c25cd4d31cc47332ff78bf173d1c9cf', + 'skia_revision': '222fe6b9b0eb751cd4f7582afa49211e281c788b', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 19cdf5a927021..513046d7e8f42 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: cf6b982df4fd0956282a7bc325240fe2 +Signature: 5fd4ec7ffa0573076de15468a0eb2369 ==================================================================================================== LIBRARY: etc1 From 64f30a093ac90ac62c260ca1b770fda7201d2695 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 12 Oct 2023 16:30:56 -0400 Subject: [PATCH 610/859] Roll Skia from 222fe6b9b0eb to 8b110fd65de9 (1 revision) (#46852) https://skia.googlesource.com/skia.git/+log/222fe6b9b0eb..8b110fd65de9 2023-10-12 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 37653f7c343e to 2fd751b2af6e (3 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 23bf529e99ba0..94bb1a6aa0d02 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '222fe6b9b0eb751cd4f7582afa49211e281c788b', + 'skia_revision': '8b110fd65de90395492083a5af6c814d4e2b5835', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 8370060e3891703856e22c5c54a248487d8475a7 Mon Sep 17 00:00:00 2001 From: Mouad Debbar Date: Thu, 12 Oct 2023 17:05:41 -0400 Subject: [PATCH 611/859] [web] Stop using `flutterViewEmbedder` for platform views (#46046) As of right now, there is an indirect link between `flutter/platform_views` messages and `flutterViewEmbedder`, expressed by the callback that's being passed to the `PlatformViewMessageHandler`. This PR proposed making this relationship clear between `flutter/platform_views` and `implicitView` (i.e. the singleton `window`). This PR also opens the path for each view to have its own `PlatformViewMessageHandler` instance. Depends on https://github.com/flutter/engine/pull/46044 Part of https://github.com/flutter/flutter/issues/134443 --- lib/web_ui/lib/src/engine/dom.dart | 1 + .../lib/src/engine/platform_dispatcher.dart | 10 +---- .../platform_views/message_handler.dart | 19 +++++---- lib/web_ui/lib/src/engine/window.dart | 6 +++ .../platform_views/message_handler_test.dart | 42 +++++++++++++------ 5 files changed, 47 insertions(+), 31 deletions(-) diff --git a/lib/web_ui/lib/src/engine/dom.dart b/lib/web_ui/lib/src/engine/dom.dart index a7d36ca1115fd..62ba97d503305 100644 --- a/lib/web_ui/lib/src/engine/dom.dart +++ b/lib/web_ui/lib/src/engine/dom.dart @@ -559,6 +559,7 @@ extension DomElementExtension on DomElement { createDomListWrapper(_children); external DomElement? get firstElementChild; + external DomElement? get lastElementChild; external DomElement? get nextElementSibling; diff --git a/lib/web_ui/lib/src/engine/platform_dispatcher.dart b/lib/web_ui/lib/src/engine/platform_dispatcher.dart index eb400956eec5d..51bc3a394cff5 100644 --- a/lib/web_ui/lib/src/engine/platform_dispatcher.dart +++ b/lib/web_ui/lib/src/engine/platform_dispatcher.dart @@ -432,8 +432,6 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher { }; } - PlatformViewMessageHandler? _platformViewMessageHandler; - void _sendPlatformMessage( String name, ByteData? data, @@ -595,13 +593,7 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher { return; case 'flutter/platform_views': - _platformViewMessageHandler ??= PlatformViewMessageHandler( - contentManager: PlatformViewManager.instance, - contentHandler: (DomElement content) { - flutterViewEmbedder.glassPaneElement.append(content); - }, - ); - _platformViewMessageHandler!.handlePlatformViewCall(data, callback!); + implicitView!.platformViewMessageHandler.handlePlatformViewCall(data, callback!); return; case 'flutter/accessibility': diff --git a/lib/web_ui/lib/src/engine/platform_views/message_handler.dart b/lib/web_ui/lib/src/engine/platform_views/message_handler.dart index c55380ec6a325..68c0fe340cac8 100644 --- a/lib/web_ui/lib/src/engine/platform_views/message_handler.dart +++ b/lib/web_ui/lib/src/engine/platform_views/message_handler.dart @@ -5,9 +5,11 @@ import 'dart:typed_data'; import '../dom.dart'; +import '../platform_dispatcher.dart'; import '../services.dart'; import '../util.dart'; import 'content_manager.dart'; +import 'slots.dart'; /// The signature for a callback for a Platform Message. From the `ui` package. /// Copied here so there's no circular dependencies. @@ -40,24 +42,23 @@ typedef PlatformViewContentHandler = void Function(DomElement); /// [HtmlViewEmbedder.disposeViews] class PlatformViewMessageHandler { PlatformViewMessageHandler({ - required PlatformViewManager contentManager, - PlatformViewContentHandler? contentHandler, - }) : _contentManager = contentManager, - _contentHandler = contentHandler; + required DomElement platformViewsContainer, + PlatformViewManager? contentManager, + }) : _contentManager = contentManager ?? PlatformViewManager.instance, + _platformViewsContainer = platformViewsContainer; final MethodCodec _codec = const StandardMethodCodec(); final PlatformViewManager _contentManager; - final PlatformViewContentHandler? _contentHandler; + final DomElement _platformViewsContainer; /// Handle a `create` Platform View message. /// /// This will attempt to render the `contents` and of a Platform View, if its /// `viewType` has been registered previously. /// - /// (See [PlatformViewContentManager.registerFactory] for more details.) + /// (See [PlatformViewManager.registerFactory] for more details.) /// - /// The `contents` are delegated to a [_contentHandler] function, so the - /// active rendering backend can inject them in the right place of the DOM. + /// The `contents` are inserted into the [_platformViewsContainer]. /// /// If all goes well, this function will `callback` with an empty success envelope. /// In case of error, this will `callback` with an error envelope describing the error. @@ -98,7 +99,7 @@ class PlatformViewMessageHandler { // For now, we don't need anything fancier. If needed, this can be converted // to a PlatformViewStrategy class for each web-renderer backend? - _contentHandler?.call(content); + _platformViewsContainer.append(content); callback(_codec.encodeSuccessEnvelope(null)); } diff --git a/lib/web_ui/lib/src/engine/window.dart b/lib/web_ui/lib/src/engine/window.dart index 9f498654bdd9e..55b24574b2674 100644 --- a/lib/web_ui/lib/src/engine/window.dart +++ b/lib/web_ui/lib/src/engine/window.dart @@ -21,6 +21,7 @@ import 'mouse/context_menu.dart'; import 'mouse/cursor.dart'; import 'navigation/history.dart'; import 'platform_dispatcher.dart'; +import 'platform_views/message_handler.dart'; import 'services.dart'; import 'util.dart'; @@ -39,6 +40,7 @@ const int kImplicitViewId = 0; abstract interface class EngineFlutterView extends ui.FlutterView { ContextMenu get contextMenu; MouseCursor get mouseCursor; + PlatformViewMessageHandler get platformViewMessageHandler; DomElement get rootElement; } @@ -75,6 +77,10 @@ class EngineFlutterWindow extends ui.SingletonFlutterWindow implements EngineFlu @override DomElement get rootElement => flutterViewEmbedder.flutterViewElement; + @override + late final PlatformViewMessageHandler platformViewMessageHandler = + PlatformViewMessageHandler(platformViewsContainer: flutterViewEmbedder.glassPaneElement); + /// Handles the browser history integration to allow users to use the back /// button, etc. BrowserHistory get browserHistory { diff --git a/lib/web_ui/test/engine/platform_views/message_handler_test.dart b/lib/web_ui/test/engine/platform_views/message_handler_test.dart index 2f30e7c5e13f4..e1b28b68b954d 100644 --- a/lib/web_ui/test/engine/platform_views/message_handler_test.dart +++ b/lib/web_ui/test/engine/platform_views/message_handler_test.dart @@ -24,18 +24,17 @@ void testMain() { const int viewId = 6; late PlatformViewManager contentManager; late Completer completer; - late Completer contentCompleter; setUp(() { contentManager = PlatformViewManager(); completer = Completer(); - contentCompleter = Completer(); }); group('"create" message', () { test('unregistered viewType, fails with descriptive exception', () async { final PlatformViewMessageHandler messageHandler = PlatformViewMessageHandler( + platformViewsContainer: createDomElement('div'), contentManager: contentManager, ); final ByteData? message = _getCreateMessage(viewType, viewId); @@ -57,6 +56,7 @@ void testMain() { viewType, (int id) => createDomHTMLDivElement()); contentManager.renderContent(viewType, viewId, null); final PlatformViewMessageHandler messageHandler = PlatformViewMessageHandler( + platformViewsContainer: createDomElement('div'), contentManager: contentManager, ); final ByteData? message = _getCreateMessage(viewType, viewId); @@ -77,6 +77,7 @@ void testMain() { contentManager.registerFactory( viewType, (int id) => createDomHTMLDivElement()..id = 'success'); final PlatformViewMessageHandler messageHandler = PlatformViewMessageHandler( + platformViewsContainer: createDomElement('div'), contentManager: contentManager, ); final ByteData? message = _getCreateMessage(viewType, viewId); @@ -89,27 +90,37 @@ void testMain() { 'The response should be a success envelope, with null in it.'); }); - test('calls a contentHandler with the result of creating a view', + test('inserts the created view into the platformViewsContainer', () async { + final DomElement platformViewsContainer = createDomElement('pv-container'); contentManager.registerFactory( viewType, (int id) => createDomHTMLDivElement()..id = 'success'); final PlatformViewMessageHandler messageHandler = PlatformViewMessageHandler( + platformViewsContainer: platformViewsContainer, contentManager: contentManager, - contentHandler: contentCompleter.complete, ); final ByteData? message = _getCreateMessage(viewType, viewId); messageHandler.handlePlatformViewCall(message, completer.complete); - final DomElement contents = await contentCompleter.future; final ByteData? response = await completer.future; - expect(contents.querySelector('div#success'), isNotNull, - reason: - 'The element created by the factory should be present in the created view.'); - expect(codec.decodeEnvelope(response!), isNull, - reason: - 'The response should be a success envelope, with null in it.'); + expect( + platformViewsContainer.children.single, + isNotNull, + reason: 'The container has a single child, the created view.', + ); + final DomElement platformView = platformViewsContainer.children.single; + expect( + platformView.querySelector('div#success'), + isNotNull, + reason: 'The element created by the factory should be present in the created view.', + ); + expect( + codec.decodeEnvelope(response!), + isNull, + reason: 'The response should be a success envelope, with null in it.', + ); }); test('passes creation params to the factory', () async { @@ -119,6 +130,7 @@ void testMain() { return createDomHTMLDivElement(); }); final PlatformViewMessageHandler messageHandler = PlatformViewMessageHandler( + platformViewsContainer: createDomElement('div'), contentManager: contentManager, ); @@ -177,8 +189,10 @@ void testMain() { return Object(); }); - final PlatformViewMessageHandler messageHandler = - PlatformViewMessageHandler(contentManager: contentManager); + final PlatformViewMessageHandler messageHandler = PlatformViewMessageHandler( + platformViewsContainer: createDomElement('div'), + contentManager: contentManager, + ); final ByteData? message = _getCreateMessage(viewType, viewId); expect(() { @@ -196,6 +210,7 @@ void testMain() { test('never fails, even for unknown viewIds', () async { final PlatformViewMessageHandler messageHandler = PlatformViewMessageHandler( + platformViewsContainer: createDomElement('div'), contentManager: contentManager, ); final ByteData? message = _getDisposeMessage(viewId); @@ -210,6 +225,7 @@ void testMain() { test('never fails, even for unknown viewIds', () async { final PlatformViewMessageHandler messageHandler = PlatformViewMessageHandler( + platformViewsContainer: createDomElement('div'), contentManager: _FakePlatformViewManager(viewIdCompleter.complete), ); final ByteData? message = _getDisposeMessage(viewId); From 99bb20af3c234bbcb2e76f1e5972c04a5d977f28 Mon Sep 17 00:00:00 2001 From: Emircan Uysaler Date: Thu, 12 Oct 2023 17:11:14 -0400 Subject: [PATCH 612/859] [fuchsia] Add fatal error for Vulkan failure (#46831) This CL changes vkWaitForFences to cause a FATAL failure as we can't recover from these errors. Bug: b/297198565 --- .../fuchsia/flutter/vulkan_surface.cc | 2 +- vulkan/procs/vulkan_interface.h | 22 +++++++++++-------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/shell/platform/fuchsia/flutter/vulkan_surface.cc b/shell/platform/fuchsia/flutter/vulkan_surface.cc index dc640c84f1f6f..69bb592edebce 100644 --- a/shell/platform/fuchsia/flutter/vulkan_surface.cc +++ b/shell/platform/fuchsia/flutter/vulkan_surface.cc @@ -508,7 +508,7 @@ void VulkanSurface::Reset() { VkFence fence = command_buffer_fence_; if (command_buffer_) { - VK_CALL_LOG_ERROR(vulkan_provider_.vk().WaitForFences( + VK_CALL_LOG_FATAL(vulkan_provider_.vk().WaitForFences( vulkan_provider_.vk_device(), 1, &fence, VK_TRUE, UINT64_MAX)); command_buffer_.reset(); } diff --git a/vulkan/procs/vulkan_interface.h b/vulkan/procs/vulkan_interface.h index 2d01ed72b7143..c0518bc256920 100644 --- a/vulkan/procs/vulkan_interface.h +++ b/vulkan/procs/vulkan_interface.h @@ -26,15 +26,19 @@ #include -#define VK_CALL_LOG_ERROR(expression) \ - ({ \ - __typeof__(expression) _rc = (expression); \ - if (_rc != VK_SUCCESS) { \ - FML_LOG(INFO) << "Vulkan call '" << #expression \ - << "' failed with error " \ - << vulkan::VulkanResultToString(_rc); \ - } \ - _rc; \ +#define VK_CALL_LOG_ERROR(expression) VK_CALL_LOG(expression, ERROR) + +#define VK_CALL_LOG_FATAL(expression) VK_CALL_LOG(expression, FATAL) + +#define VK_CALL_LOG(expression, severity) \ + ({ \ + __typeof__(expression) _rc = (expression); \ + if (_rc != VK_SUCCESS) { \ + FML_LOG(severity) << "Vulkan call '" << #expression \ + << "' failed with error " \ + << vulkan::VulkanResultToString(_rc); \ + } \ + _rc; \ }) namespace vulkan { From 7527603bc209e930f6baf34867a96800020ca620 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 12 Oct 2023 17:21:07 -0400 Subject: [PATCH 613/859] Roll Skia from 8b110fd65de9 to bf557aeaaef8 (1 revision) (#46853) https://skia.googlesource.com/skia.git/+log/8b110fd65de9..bf557aeaaef8 2023-10-12 michaelludwig@google.com Revert "[graphite] Use hardware image tiling when not subsetting" If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 94bb1a6aa0d02..d7d63c4b19356 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '8b110fd65de90395492083a5af6c814d4e2b5835', + 'skia_revision': 'bf557aeaaef8e0fda504103a46c9bfb261e9b460', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 513046d7e8f42..9694070ceafa6 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 5fd4ec7ffa0573076de15468a0eb2369 +Signature: ef126486588913f8c6efb62880c5d1b5 ==================================================================================================== LIBRARY: etc1 From 3a9a3ea396a0f267227d92321193aef28e5db1c5 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Thu, 12 Oct 2023 16:47:08 -0700 Subject: [PATCH 614/859] Temporarily remove the runs of the engine Dart tests with Impeller enabled (#46854) These tests are sometimes hanging when the flutter_tester deletes the ContextVK and ConcurrentMessageLoop during shutdown. --- testing/run_tests.py | 64 +++++++++++--------------------------------- 1 file changed, 16 insertions(+), 48 deletions(-) diff --git a/testing/run_tests.py b/testing/run_tests.py index 500dbba643d03..42488b83c2f5c 100755 --- a/testing/run_tests.py +++ b/testing/run_tests.py @@ -867,38 +867,15 @@ def gather_dart_tests(build_dir, test_filter): logger.info( "Gathering dart test '%s' with observatory enabled", dart_test_file ) - yield gather_dart_test( - build_dir, dart_test_file, - FlutterTesterOptions( - multithreaded=True, - enable_impeller=False, - enable_observatory=True - ) - ) - yield gather_dart_test( - build_dir, dart_test_file, - FlutterTesterOptions( - multithreaded=True, - enable_impeller=True, - enable_observatory=True - ) - ) - yield gather_dart_test( - build_dir, dart_test_file, - FlutterTesterOptions( - multithreaded=False, - enable_impeller=False, - enable_observatory=True - ) - ) - yield gather_dart_test( - build_dir, dart_test_file, - FlutterTesterOptions( - multithreaded=False, - enable_impeller=True, - enable_observatory=True - ) - ) + for multithreaded, enable_impeller in [(True, False), (False, False)]: + yield gather_dart_test( + build_dir, dart_test_file, + FlutterTesterOptions( + multithreaded=multithreaded, + enable_impeller=enable_impeller, + enable_observatory=True + ) + ) for dart_test_file in dart_tests: if test_filter is not None and os.path.basename(dart_test_file @@ -906,22 +883,13 @@ def gather_dart_tests(build_dir, test_filter): logger.info("Skipping '%s' due to filter.", dart_test_file) else: logger.info("Gathering dart test '%s'", dart_test_file) - yield gather_dart_test( - build_dir, dart_test_file, - FlutterTesterOptions(multithreaded=True, enable_impeller=False) - ) - yield gather_dart_test( - build_dir, dart_test_file, - FlutterTesterOptions(multithreaded=True, enable_impeller=True) - ) - yield gather_dart_test( - build_dir, dart_test_file, - FlutterTesterOptions(multithreaded=False, enable_impeller=False) - ) - yield gather_dart_test( - build_dir, dart_test_file, - FlutterTesterOptions(multithreaded=False, enable_impeller=True) - ) + for multithreaded, enable_impeller in [(True, False), (False, False)]: + yield gather_dart_test( + build_dir, dart_test_file, + FlutterTesterOptions( + multithreaded=multithreaded, enable_impeller=enable_impeller + ) + ) def gather_dart_smoke_test(build_dir, test_filter): From 966b4edf057a1fc75051b0a931821c82b79bd20c Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 12 Oct 2023 20:48:21 -0400 Subject: [PATCH 615/859] Roll Dart SDK from 34c06f0bcb29 to b0d65ad14354 (3 revisions) (#46859) https://dart.googlesource.com/sdk.git/+log/34c06f0bcb29..b0d65ad14354 2023-10-12 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-19.0.dev 2023-10-12 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-18.0.dev 2023-10-12 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-17.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jsimmons@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index d7d63c4b19356..e5d6e077d987c 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '34c06f0bcb2910b453b2e75a642e14e8de42ab73', + 'dart_revision': 'b0d65ad14354b1a9f6adc457fbaa88dd6823a93b', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index 5999fc380e246..384cb78736b8c 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: ed6bf55d302c65e89ae799397ffa57e4 +Signature: 07db3a0ac9a10fb14083ba9a39177134 ==================================================================================================== LIBRARY: dart From be8607aee76ac16d1e2be5e4806e8d157d14ab6f Mon Sep 17 00:00:00 2001 From: Zachary Anderson Date: Thu, 12 Oct 2023 20:42:35 -0700 Subject: [PATCH 616/859] Revert "Remove the frontend server wrapper" (#46863) Reverts flutter/engine#46440 For b/305121780 --- build/dart/rules.gni | 205 ++++++++--------------- common/config.gni | 19 +-- flutter_frontend_server/BUILD.gn | 25 +-- flutter_frontend_server/README.md | 71 ++++++++ flutter_frontend_server/bin/starter.dart | 15 ++ flutter_frontend_server/lib/server.dart | 91 ++++++++++ flutter_frontend_server/pubspec.yaml | 84 +++++++++- testing/dart/BUILD.gn | 10 +- testing/dart/compile_test.gni | 91 ++++++++++ testing/dart/observatory/BUILD.gn | 10 +- testing/smoke_test_failure/BUILD.gn | 10 +- testing/testing.gni | 96 +++++++++-- tools/gn | 12 +- 13 files changed, 538 insertions(+), 201 deletions(-) create mode 100644 flutter_frontend_server/README.md create mode 100644 flutter_frontend_server/bin/starter.dart create mode 100644 flutter_frontend_server/lib/server.dart create mode 100644 testing/dart/compile_test.gni diff --git a/build/dart/rules.gni b/build/dart/rules.gni index ba209f0b50b0b..00b801b2c204f 100644 --- a/build/dart/rules.gni +++ b/build/dart/rules.gni @@ -10,115 +10,21 @@ import("//flutter/common/config.gni") import("//third_party/dart/build/dart/dart_action.gni") import("//third_party/dart/sdk_args.gni") -# Generates a Dart kernel snapshot using flutter_frontend_server. -# -# Arguments -# main_dart (required): -# The Dart entrypoint file. -# -# kernel_output (required): -# The path to the output kernel snapshot in the out directory. -# -# package_config (optional): -# The path to the package_config.json file. -# -# deps (optional): -# Additional dependencies. Dependencies on the frontend server and -# Flutter's platform.dill are included by default. This rule creates and -# uses a depfile, so listing all Dart sources is not necessary. -# -# extra_args (optional): -# Additional frontend server command line arguments. -template("flutter_frontend_server") { - assert(defined(invoker.main_dart), "The Dart test file must be specified.") - assert(defined(invoker.kernel_output), - "The Dart Kernel file location must be specified.") - - kernel_output = invoker.kernel_output - - common_deps = [ - "//flutter/flutter_frontend_server:frontend_server", - "//flutter/lib/snapshot:strong_platform", - ] - if (defined(invoker.deps)) { - common_deps += invoker.deps - } - - extra_args = [] - if (defined(invoker.extra_args)) { - extra_args += invoker.extra_args - } - - packages_args = [] - if (defined(invoker.package_config)) { - packages_args += [ - "--packages", - rebase_path(invoker.package_config), - ] - } - - snapshot_depfile = "$kernel_output.d" - - common_vm_args = [ "--disable-dart-dev" ] - - flutter_patched_sdk = rebase_path("$root_out_dir/flutter_patched_sdk") - - common_args = extra_args + packages_args + [ - "--sdk-root", - flutter_patched_sdk, - "--target=flutter", - "--depfile", - rebase_path(snapshot_depfile), - "--output-dill", - rebase_path(invoker.kernel_output), - rebase_path(invoker.main_dart), - ] - - if (flutter_prebuilt_dart_sdk) { - action(target_name) { - forward_variables_from(invoker, - [ - "visibility", - "testonly", - ], - [ "pool" ]) - deps = common_deps - pool = "//flutter/build/dart:dart_pool" - script = "//build/gn_run_binary.py" - inputs = [ invoker.main_dart ] - outputs = [ invoker.kernel_output ] - depfile = snapshot_depfile - - ext = "" - if (is_win) { - ext = ".exe" - } - dart = rebase_path("$host_prebuilt_dart_sdk/bin/dart$ext", root_out_dir) - frontend_server = - rebase_path("$root_gen_dir/frontend_server.dart.snapshot") - - args = [ dart ] + common_vm_args + [ frontend_server ] + common_args - } - } else { - dart_action(target_name) { - forward_variables_from(invoker, - [ - "visibility", - "testonly", - ], - [ "pool" ]) - deps = common_deps - pool = "//flutter/build/dart:dart_pool" - script = "$root_gen_dir/frontend_server.dart.snapshot" - packages = rebase_path(invoker.package_config) - inputs = [ invoker.main_dart ] - outputs = [ invoker.kernel_output ] - depfile = snapshot_depfile - vm_args = common_vm_args - args = common_args - } - } -} +frontend_server_files = + exec_script("//third_party/dart/tools/list_dart_files.py", + [ + "absolute", + rebase_path("//flutter/flutter_frontend_server"), + ], + "list lines") + +frontend_server_files += + exec_script("//third_party/dart/tools/list_dart_files.py", + [ + "absolute", + rebase_path("//third_party/dart/pkg"), + ], + "list lines") # Creates a dart kernel (dill) file suitable for use with gen_snapshot, as well # as the app-jit, aot-elf, or aot-assembly snapshot for targeting Flutter on @@ -142,38 +48,61 @@ template("flutter_snapshot") { kernel_output = "$target_gen_dir/kernel_blob.bin" - extra_frontend_server_args = [] - if (is_aot) { - extra_frontend_server_args += [ - "--aot", - "--tfa", + prebuilt_dart_action(kernel_target) { + script = "//flutter/flutter_frontend_server/bin/starter.dart" + + main_dart = rebase_path(invoker.main_dart) + package_config = rebase_path(invoker.package_config) + flutter_patched_sdk = rebase_path("$root_out_dir/flutter_patched_sdk") + + deps = [ "//flutter/lib/snapshot:strong_platform" ] + + inputs = [ + main_dart, + package_config, + ] + frontend_server_files + + outputs = [ kernel_output ] + + depfile = "$kernel_output.d" + abs_depfile = rebase_path(depfile) + vm_args = [ "--disable-dart-dev" ] + + args = [ + "--depfile=$abs_depfile", + "--packages=" + rebase_path(package_config), + "--target=flutter", + "--sdk-root=" + flutter_patched_sdk, + "--output-dill=" + rebase_path(kernel_output, root_build_dir), ] - } else { - # --no-link-platform is only valid when --aot isn't specified - extra_frontend_server_args += [ "--no-link-platform" ] - } - if (defined(invoker.product) && invoker.product) { - # Setting this flag in a non-product release build for AOT (a "profile" - # build) causes the vm service isolate code to be tree-shaken from an app. - # See the pragma on the entrypoint here: - # - # https://github.com/dart-lang/sdk/blob/main/sdk/lib/_internal/vm/bin/vmservice_io.dart#L240 - # - # Also, this define excludes debugging and profiling code from Flutter. - extra_frontend_server_args += [ "-Ddart.vm.product=true" ] - } else { - if (flutter_runtime_mode == "profile") { - # The following define excludes debugging code from Flutter. - extra_frontend_server_args += [ "-Ddart.vm.profile=true" ] + if (is_aot) { + args += [ + "--aot", + "--tfa", + ] + } else { + # --no-link-platform is only valid when --aot isn't specified + args += [ "--no-link-platform" ] + } + + if (defined(invoker.product) && invoker.product) { + # Setting this flag in a non-product release build for AOT (a "profile" + # build) causes the vm service isolate code to be tree-shaken from an app. + # See the pragma on the entrypoint here: + # + # https://github.com/dart-lang/sdk/blob/main/sdk/lib/_internal/vm/bin/vmservice_io.dart#L240 + # + # Also, this define excludes debugging and profiling code from Flutter. + args += [ "-Ddart.vm.product=true" ] + } else { + if (flutter_runtime_mode == "profile") { + # The following define excludes debugging code from Flutter. + args += [ "-Ddart.vm.profile=true" ] + } } - } - flutter_frontend_server(kernel_target) { - main_dart = invoker.main_dart - package_config = invoker.package_config - kernel_output = kernel_output - extra_args = extra_frontend_server_args + args += [ rebase_path(main_dart) ] } compiled_action(snapshot_target) { @@ -342,7 +271,7 @@ template("application_snapshot") { # Ensure the compiled appliation (e.g. frontend-server, ...) will use this # Dart SDK hash when consuming/producing kernel. # - # (Instead of ensuring every user of the "application_snapshot" passes its + # (Instead of ensuring every user of the "application_snapshot" passes it's # own) snapshot_vm_args += [ "-Dsdk_hash=$sdk_hash" ] diff --git a/common/config.gni b/common/config.gni index 41439fed9dc82..56035f10a3961 100644 --- a/common/config.gni +++ b/common/config.gni @@ -113,27 +113,18 @@ if (flutter_prebuilt_dart_sdk) { _host_os_name = "windows" } - # When building 32-bit Android development artifacts for Windows host (like - # gen_snapshot), the host_cpu is set to x86. However, the correct prebuilt - # Dart SDK to use during this build is still the 64-bit one. - _host_cpu = host_cpu - if (host_os == "win" && host_cpu == "x86") { - _host_cpu = "x64" - } - _target_prebuilt_dart_sdk_config = "$_target_os_name-$target_cpu" - _host_prebuilt_dart_sdk_config = "$_host_os_name-$_host_cpu" + _host_prebuilt_dart_sdk_config = "$_host_os_name-$host_cpu" target_prebuilt_dart_sdk = "//flutter/prebuilts/$_target_prebuilt_dart_sdk_config/dart-sdk" host_prebuilt_dart_sdk = "//flutter/prebuilts/$_host_prebuilt_dart_sdk_config/dart-sdk" - # There is no prebuilt Dart SDK targeting Fuchsia, iOS, and Android, but we - # also don't need one, so even when the build is targeting one of these - # platforms, we use the prebuilt Dart SDK for the host. - if (current_toolchain == host_toolchain || target_os == "android" || - target_os == "fuchsia" || target_os == "ios" || target_os == "wasm") { + # There is no prebuilt Dart SDK targeting Fuchsia, but we also don't need + # one, so even when the build is targeting Fuchsia, use the prebuilt + # Dart SDK for the host. + if (current_toolchain == host_toolchain || is_fuchsia || is_wasm) { prebuilt_dart_sdk = host_prebuilt_dart_sdk prebuilt_dart_sdk_config = _host_prebuilt_dart_sdk_config } else { diff --git a/flutter_frontend_server/BUILD.gn b/flutter_frontend_server/BUILD.gn index e389148ba36da..9e986066595ab 100644 --- a/flutter_frontend_server/BUILD.gn +++ b/flutter_frontend_server/BUILD.gn @@ -2,18 +2,19 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//flutter/common/config.gni") +import("//flutter/build/dart/rules.gni") -copy("frontend_server") { - if (flutter_prebuilt_dart_sdk) { - snapshot = - "$host_prebuilt_dart_sdk/bin/snapshots/frontend_server.dart.snapshot" - } else { - deps = [ "//flutter/build/dart:dart_sdk" ] - snapshot = - "$root_out_dir/dart-sdk/bin/snapshots/frontend_server.dart.snapshot" - } +application_snapshot("frontend_server") { + main_dart = "bin/starter.dart" + deps = [ "//flutter/lib/snapshot:kernel_platform_files" ] - sources = [ snapshot ] - outputs = [ "$root_gen_dir/frontend_server.dart.snapshot" ] + package_config = rebase_path(".dart_tool/package_config.json") + flutter_patched_sdk = rebase_path("$root_out_dir/flutter_patched_sdk") + training_args = [ + "--train", + "--sdk-root=$flutter_patched_sdk", + rebase_path(main_dart), + ] + + inputs = frontend_server_files } diff --git a/flutter_frontend_server/README.md b/flutter_frontend_server/README.md new file mode 100644 index 0000000000000..3007831b924c6 --- /dev/null +++ b/flutter_frontend_server/README.md @@ -0,0 +1,71 @@ +# Frontend Server + +Frontend server is simple wrapper around Dart Frontend. It is a Dart application +that compiles Dart source into Dart Kernel binary (.dill-file). +Documentation on Dart Kernel (semantic, binary format, etc) can be found here: +https://github.com/dart-lang/sdk/wiki/Kernel-Documentation. + +Frontend server runs in two modes: + - immediate mode, where Dart source file name is provided as command line + argument; + - interactive mode, where communication is happening over stdin/stdout. + +## Interactive mode instructions + +### Compile/Recompile +``` +compile +``` + Compiles Dart source file with Dart Frontend. Replies with `result` response. + +``` +recompile + + +... + +``` + Incrementally recompiles Dart program previously compiled in current session, taking into account + changes in the listed files. Replies with `result` response. + + Relative paths should be relative to current working directory for the shell that launched + Frontend Server. + +### Accept/Reject +``` +accept +``` + Accepts results of incremental compilation, so that on next recompilation request Dart Frontend + will not include these recompiled files. +``` +reject +``` + Rejects results of incremental compilation, so that on next recompilation request Dart Frontend + will include compilation results from previously rejected recompilation in addition to what it + will recompile based on newly changed files. + Small technical detail is that Dart Frontend will not recompile files from previously rejected + recompilation attempts (unless they were changed since then), it will just include appropriate + kernel binaries it kept around from those previously rejected compilation requests. + + One use of `accept` and `reject` instructions is in the context of Dart VM hot-reload. Dart VM can + reject user-provided incremental change to what is currently running. It could happen for variety + of Dart VM internal reasons. For example, if incremental update changes some `class` to `enum`, + such update can not be hot-reloaded by VM at this point, will be rejected. + +### Quit +``` +quit +``` + Stops the server. + +## Response from the server + +``` +result + + [] +``` +Response from the Dart Frontend compiler is bracketed by `` tags. If the compiler +was able to produce a Dart Kernel file, the name of this file `` is provided too. +If the compiler encountered unrecoverable errors, there will be no output file name provided. + diff --git a/flutter_frontend_server/bin/starter.dart b/flutter_frontend_server/bin/starter.dart new file mode 100644 index 0000000000000..e839087dd5d04 --- /dev/null +++ b/flutter_frontend_server/bin/starter.dart @@ -0,0 +1,15 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + + +import 'dart:io'; + +import 'package:flutter_frontend_server/server.dart'; + +Future main(List args) async { + final int exitCode = await starter(args); + if (exitCode != 0) { + exit(exitCode); + } +} diff --git a/flutter_frontend_server/lib/server.dart b/flutter_frontend_server/lib/server.dart new file mode 100644 index 0000000000000..8733c5b7a9070 --- /dev/null +++ b/flutter_frontend_server/lib/server.dart @@ -0,0 +1,91 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// ignore_for_file: avoid_print + + +import 'dart:async'; +import 'dart:io' hide FileSystemEntity; + +import 'package:args/args.dart'; +import 'package:frontend_server/frontend_server.dart' as frontend + show + CompilerInterface, + FrontendCompiler, + argParser, + listenAndCompile, + usage; +import 'package:path/path.dart' as path; + +/// Entry point for this module, that creates `FrontendCompiler` instance and +/// processes user input. +/// `compiler` is an optional parameter so it can be replaced with mocked +/// version for testing. +Future starter( + List args, { + frontend.CompilerInterface? compiler, + Stream>? input, + StringSink? output, +}) async { + ArgResults options; + try { + options = frontend.argParser.parse(args); + } catch (error) { + print('ERROR: $error\n'); + print(frontend.usage); + return 1; + } + + if (options['train'] as bool) { + if (!options.rest.isNotEmpty) { + throw Exception('Must specify input.dart'); + } + + final String input = options.rest[0]; + final String sdkRoot = options['sdk-root'] as String; + final Directory temp = + Directory.systemTemp.createTempSync('train_frontend_server'); + try { + for (int i = 0; i < 3; i++) { + final String outputTrainingDill = path.join(temp.path, 'app.dill'); + options = frontend.argParser.parse([ + '--incremental', + '--sdk-root=$sdkRoot', + '--output-dill=$outputTrainingDill', + '--target=flutter', + '--track-widget-creation', + '--enable-asserts', + ]); + compiler ??= frontend.FrontendCompiler(output); + + await compiler.compile(input, options); + compiler.acceptLastDelta(); + await compiler.recompileDelta(); + compiler.acceptLastDelta(); + compiler.resetIncrementalCompiler(); + await compiler.recompileDelta(); + compiler.acceptLastDelta(); + await compiler.recompileDelta(); + compiler.acceptLastDelta(); + } + return 0; + } finally { + temp.deleteSync(recursive: true); + } + } + + compiler ??= frontend.FrontendCompiler(output, + useDebuggerModuleNames: options['debugger-module-names'] as bool, + emitDebugMetadata: options['experimental-emit-debug-metadata'] as bool, + unsafePackageSerialization: + options['unsafe-package-serialization'] as bool); + + if (options.rest.isNotEmpty) { + return await compiler.compile(options.rest[0], options) ? 0 : 254; + } + + final Completer completer = Completer(); + frontend.listenAndCompile(compiler, input ?? stdin, options, completer); + return completer.future; +} diff --git a/flutter_frontend_server/pubspec.yaml b/flutter_frontend_server/pubspec.yaml index 16fd3ad7ee566..2f0d37c5583b7 100644 --- a/flutter_frontend_server/pubspec.yaml +++ b/flutter_frontend_server/pubspec.yaml @@ -20,20 +20,102 @@ homepage: https://flutter.dev environment: sdk: '>=3.2.0-0 <4.0.0' +dependencies: + args: any + frontend_server: any + path: any + dev_dependencies: litetest: any - path: any dependency_overrides: + _fe_analyzer_shared: + path: ../../third_party/dart/pkg/_fe_analyzer_shared + _js_interop_checks: + path: ../../third_party/dart/pkg/_js_interop_checks + args: + path: ../../third_party/dart/third_party/pkg/args + async: + path: ../../third_party/dart/third_party/pkg/async async_helper: path: ../../third_party/dart/pkg/async_helper + bazel_worker: + path: ../../third_party/dart/third_party/pkg/bazel_worker + build_integration: + path: ../../third_party/dart/pkg/build_integration + collection: + path: ../../third_party/dart/third_party/pkg/collection + compiler: + path: ../../third_party/dart/pkg/compiler + crypto: + path: ../../third_party/dart/third_party/pkg/crypto + dart_internal: + path: ../../third_party/dart/pkg/dart_internal + dart2js_info: + path: ../../third_party/dart/pkg/dart2js_info + dart2wasm: + path: ../../third_party/dart/pkg/dart2wasm + dev_compiler: + path: ../../third_party/dart/pkg/dev_compiler expect: path: ../../third_party/dart/pkg/expect + ffi: + path: ../../third_party/dart/third_party/pkg/ffi + fixnum: + path: ../../third_party/dart/third_party/pkg/fixnum + front_end: + path: ../../third_party/dart/pkg/front_end + frontend_server: + path: ../../third_party/dart/pkg/frontend_server + http_parser: + path: ../../third_party/dart/third_party/pkg/http_parser + js_ast: + path: ../../third_party/dart/pkg/js_ast + js_runtime: + path: ../../third_party/dart/pkg/js_runtime + js_shared: + path: ../../third_party/dart/pkg/js_shared + kernel: + path: ../../third_party/dart/pkg/kernel litetest: path: ../testing/litetest meta: path: ../../third_party/dart/pkg/meta + mmap: + path: ../../third_party/dart/pkg/mmap + package_config: + path: ../../third_party/dart/third_party/pkg/package_config path: path: ../../third_party/dart/third_party/pkg/path + protobuf: + path: ../../third_party/dart/third_party/pkg/protobuf/protobuf + shelf: + path: ../../third_party/dart/third_party/pkg/shelf/pkgs/shelf smith: path: ../../third_party/dart/pkg/smith + source_maps: + path: ../../third_party/dart/third_party/pkg/source_maps + source_span: + path: ../../third_party/dart/third_party/pkg/source_span + stack_trace: + path: ../../third_party/dart/third_party/pkg/stack_trace + stream_channel: + path: ../../third_party/dart/third_party/pkg/stream_channel + string_scanner: + path: ../../third_party/dart/third_party/pkg/string_scanner + term_glyph: + path: ../../third_party/dart/third_party/pkg/term_glyph + typed_data: + path: ../../third_party/dart/third_party/pkg/typed_data + usage: + path: ../../third_party/dart/third_party/pkg/usage + vm: + path: ../../third_party/dart/pkg/vm + vm_service: + path: ../../third_party/dart/pkg/vm_service + vm_snapshot_analysis: + path: ../../third_party/dart/pkg/vm_snapshot_analysis + wasm_builder: + path: ../../third_party/dart/pkg/wasm_builder + yaml: + path: ../../third_party/dart/third_party/pkg/yaml diff --git a/testing/dart/BUILD.gn b/testing/dart/BUILD.gn index d9bd962168333..2e1bb1ad38f67 100644 --- a/testing/dart/BUILD.gn +++ b/testing/dart/BUILD.gn @@ -2,7 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//flutter/build/dart/rules.gni") +import("//flutter/testing/dart/compile_test.gni") tests = [ "assets_test.dart", @@ -48,10 +48,10 @@ tests = [ ] foreach(test, tests) { - flutter_frontend_server("compile_$test") { - main_dart = test - kernel_output = "$root_gen_dir/$test.dill" - package_config = ".dart_tool/package_config.json" + compile_flutter_dart_test("compile_$test") { + dart_file = test + dart_kernel = "$root_gen_dir/$test.dill" + packages = ".dart_tool/package_config.json" } } diff --git a/testing/dart/compile_test.gni b/testing/dart/compile_test.gni new file mode 100644 index 0000000000000..fbdf76ea849da --- /dev/null +++ b/testing/dart/compile_test.gni @@ -0,0 +1,91 @@ +# Copyright 2013 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/compiled_action.gni") +import("//flutter/common/config.gni") +import("//third_party/dart/build/dart/dart_action.gni") +import("//third_party/dart/sdk_args.gni") + +import("//third_party/dart/build/dart/dart_action.gni") + +# Generates a Dart kernel snapshot using flutter_frontend_server. +# +# Arguments +# dart_main (required): The Main Dart file. +# +# dart_kernel (required): The path to the output kernel snapshot in the out +# directory. +# +# packages (required): The path to the .packages file. +template("compile_flutter_dart_test") { + assert(defined(invoker.dart_file), "The Dart test file must be specified.") + assert(defined(invoker.dart_kernel), + "The Dart Kernel file location must be specified.") + assert(defined(invoker.packages), + "The path to the .packages file must be specified.") + + common_deps = [ + "//flutter/flutter_frontend_server:frontend_server", + "//flutter/lib/snapshot:strong_platform", + ] + if (defined(invoker.deps)) { + common_deps += invoker.deps + } + + snapshot_depfile = + "$root_gen_dir/flutter/testing/snapshot_$target_name.depfile.d" + + common_vm_args = [ "--disable-dart-dev" ] + + flutter_patched_sdk = rebase_path("$root_out_dir/flutter_patched_sdk") + + common_args = [ + "--sound-null-safety", + "--sdk-root", + flutter_patched_sdk, + "--target=flutter", + "--packages", + rebase_path(invoker.packages), + "--depfile", + rebase_path(snapshot_depfile), + "--output-dill", + rebase_path(invoker.dart_kernel, root_out_dir), + rebase_path(invoker.dart_file), + ] + + if (flutter_prebuilt_dart_sdk) { + action(target_name) { + testonly = true + deps = common_deps + pool = "//flutter/build/dart:dart_pool" + script = "//build/gn_run_binary.py" + inputs = [ invoker.dart_file ] + outputs = [ invoker.dart_kernel ] + depfile = snapshot_depfile + + ext = "" + if (is_win) { + ext = ".exe" + } + dart = rebase_path("$host_prebuilt_dart_sdk/bin/dart$ext", root_out_dir) + frontend_server = + rebase_path("$root_gen_dir/frontend_server.dart.snapshot") + + args = [ dart ] + common_vm_args + [ frontend_server ] + common_args + } + } else { + dart_action(target_name) { + testonly = true + deps = common_deps + pool = "//flutter/build/dart:dart_pool" + script = "$root_gen_dir/frontend_server.dart.snapshot" + packages = rebase_path(invoker.packages) + inputs = [ invoker.dart_file ] + outputs = [ invoker.dart_kernel ] + depfile = snapshot_depfile + vm_args = common_vm_args + args = common_args + } + } +} diff --git a/testing/dart/observatory/BUILD.gn b/testing/dart/observatory/BUILD.gn index 35c573a85a4db..a0e6afbe6be17 100644 --- a/testing/dart/observatory/BUILD.gn +++ b/testing/dart/observatory/BUILD.gn @@ -2,7 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//flutter/build/dart/rules.gni") +import("//flutter/testing/dart/compile_test.gni") tests = [ "skp_test.dart", @@ -12,10 +12,10 @@ tests = [ ] foreach(test, tests) { - flutter_frontend_server("compile_$test") { - main_dart = test - kernel_output = "$root_gen_dir/$test.dill" - package_config = "../.dart_tool/package_config.json" + compile_flutter_dart_test("compile_$test") { + dart_file = test + dart_kernel = "$root_gen_dir/$test.dill" + packages = "../.dart_tool/package_config.json" } } diff --git a/testing/smoke_test_failure/BUILD.gn b/testing/smoke_test_failure/BUILD.gn index 1ce144ecc523a..8110ea199fa16 100644 --- a/testing/smoke_test_failure/BUILD.gn +++ b/testing/smoke_test_failure/BUILD.gn @@ -2,15 +2,15 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//flutter/build/dart/rules.gni") +import("//flutter/testing/dart/compile_test.gni") tests = [ "fail_test.dart" ] foreach(test, tests) { - flutter_frontend_server("compile_$test") { - main_dart = test - kernel_output = "$root_gen_dir/$test.dill" - package_config = ".dart_tool/package_config.json" + compile_flutter_dart_test("compile_$test") { + dart_file = test + dart_kernel = "$root_gen_dir/$test.dill" + packages = ".dart_tool/package_config.json" } } diff --git a/testing/testing.gni b/testing/testing.gni index cf59753e51dc7..7059bc15f017b 100644 --- a/testing/testing.gni +++ b/testing/testing.gni @@ -3,8 +3,9 @@ # found in the LICENSE file. import("//build/compiled_action.gni") -import("//flutter/build/dart/rules.gni") import("//flutter/common/config.gni") +import("//third_party/dart/build/dart/dart_action.gni") +import("//third_party/dart/sdk_args.gni") is_aot_test = flutter_runtime_mode == "profile" || flutter_runtime_mode == "release" @@ -50,6 +51,48 @@ template("fixtures_location") { } } +# Invokes the frontend server using the built Dart SDK or the prebuilt Dart SDK +# as appropriate. +# +# Parameters: +# The parameters testonly, deps, inputs, outputs, depfile, and args are +# forwarded from the invoker either to an 'action' target or a 'dart_action' +# target depending on whether a prebuilt Dart SDK is used or not, +# respectively. +template("_frontend_server") { + if (flutter_prebuilt_dart_sdk) { + action(target_name) { + testonly = invoker.testonly + deps = invoker.deps + script = "//build/gn_run_binary.py" + inputs = invoker.inputs + outputs = invoker.outputs + depfile = invoker.depfile + pool = "//flutter/build/dart:dart_pool" + + ext = "" + if (is_win) { + ext = ".exe" + } + dart = rebase_path("$host_prebuilt_dart_sdk/bin/dart$ext", root_out_dir) + frontend_server = rebase_path( + "$host_prebuilt_dart_sdk/bin/snapshots/frontend_server.dart.snapshot") + + args = [ + dart, + frontend_server, + ] + invoker.args + } + } else { + dart_action(target_name) { + forward_variables_from(invoker, "*") + deps += [ "//third_party/dart/utils/kernel-service:frontend_server" ] + script = "$root_out_dir/frontend_server.dart.snapshot" + pool = "//flutter/build/dart:dart_pool" + } + } +} + # Generates the Dart kernel snapshot. # # Arguments @@ -64,26 +107,45 @@ template("dart_snapshot_kernel") { assert(defined(invoker.dart_kernel), "The Dart Kernel file location must be specified") - args = [] - if (flutter_runtime_mode == "release" || - flutter_runtime_mode == "jit_release") { - args += [ "-Ddart.vm.product=true" ] - } + _frontend_server(target_name) { + testonly = true - if (is_aot_test) { - args += [ - "--aot", + deps = [ "//flutter/lib/snapshot:strong_platform" ] - # type flow analysis - "--tfa", + inputs = [ invoker.dart_main ] + + outputs = [ invoker.dart_kernel ] + + snapshot_depfile = "$target_gen_dir/snapshot_$target_name.depfile.d" + depfile = snapshot_depfile + + args = [ + "--sdk-root", + rebase_path("$root_out_dir/flutter_patched_sdk"), + "--target", + "flutter", + "--sound-null-safety", + "--output-dill", + rebase_path(invoker.dart_kernel, root_out_dir), + "--depfile", + rebase_path(snapshot_depfile), ] - } - flutter_frontend_server(target_name) { - testonly = true - main_dart = invoker.dart_main - kernel_output = invoker.dart_kernel - extra_args = args + if (flutter_runtime_mode == "release" || + flutter_runtime_mode == "jit_release") { + args += [ "-Ddart.vm.product=true" ] + } + + if (is_aot_test) { + args += [ + "--aot", + + # type flow analysis + "--tfa", + ] + } + + args += [ rebase_path(invoker.dart_main) ] } } diff --git a/tools/gn b/tools/gn index 4eed7044d185f..196219d35d611 100755 --- a/tools/gn +++ b/tools/gn @@ -106,12 +106,16 @@ def is_host_build(args): # Determines whether a prebuilt Dart SDK can be used instead of building one. +# We can use a prebuilt Dart SDK when: +# 1. It is a host build, a build targeting Fuchsia, or a build targeting desktop. +# 2. The prebuilt SDK exists under //flutter/prebuilts/$OS-$ARCH. def can_use_prebuilt_dart(args): prebuilt = None - # When doing a 'host' build (args.target_os is None), or a build when the - # target OS and host OS are different, the prebuilt Dart SDK is the Dart SDK - # for the host system's OS and archetecture. - if args.target_os is None or args.target_os in ['android', 'ios', 'fuchsia']: + # In a Fuchsia build, we can use a prebuilt Dart SDK for the host to build + # platform agnostic artifacts (e.g. kernel snapshots), and a Dart SDK + # targeting Fuchsia is not needed. So, it is safe to say that the prebuilt + # Dart SDK in a Fuchsia build is the host prebuilt Dart SDK. + if args.target_os is None or args.target_os == 'fuchsia': if sys.platform.startswith(('cygwin', 'win')): prebuilt = 'windows-x64' elif sys.platform == 'darwin': From bfef3ae826b394d307648448bf70186100e1d59d Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Oct 2023 00:27:18 -0400 Subject: [PATCH 617/859] Roll Dart SDK from b0d65ad14354 to 849253fd69b6 (1 revision) (#46864) https://dart.googlesource.com/sdk.git/+log/b0d65ad14354..849253fd69b6 2023-10-13 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-20.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jsimmons@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index e5d6e077d987c..1fbc32695b1ad 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': 'b0d65ad14354b1a9f6adc457fbaa88dd6823a93b', + 'dart_revision': '849253fd69b6bfb8276c7576a2382d15db51df8a', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py From 80e97e7c394b5c1fa9b33cead4185c55fa0471c4 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Oct 2023 01:35:05 -0400 Subject: [PATCH 618/859] Roll Skia from bf557aeaaef8 to aee708412bec (1 revision) (#46865) https://skia.googlesource.com/skia.git/+log/bf557aeaaef8..aee708412bec 2023-10-13 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from 7ab058e00df4 to 77ae6a2042d8 (2 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 1fbc32695b1ad..38afe8a94b448 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'bf557aeaaef8e0fda504103a46c9bfb261e9b460', + 'skia_revision': 'aee708412bec9dfddbe3f065ce8e5ba493b9dc9a', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 9694070ceafa6..59b4b5873aff5 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: ef126486588913f8c6efb62880c5d1b5 +Signature: 79adeb233ec1086fee4b28a3050ee5b8 ==================================================================================================== LIBRARY: etc1 From a9d002eaa8cbb808cbad6333ad378dfd182ccf15 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Oct 2023 02:18:53 -0400 Subject: [PATCH 619/859] Roll Skia from aee708412bec to faad330e7120 (1 revision) (#46866) https://skia.googlesource.com/skia.git/+log/aee708412bec..faad330e7120 2023-10-13 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from 77ae6a2042d8 to ce6d56ef3f03 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 38afe8a94b448..0f19e63471afc 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'aee708412bec9dfddbe3f065ce8e5ba493b9dc9a', + 'skia_revision': 'faad330e712083451a3963cd55b45825a63d9d78', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From d543dcdd6ee06b7c5b71ee4dddc4483d9607c74a Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Oct 2023 02:29:52 -0400 Subject: [PATCH 620/859] Roll Fuchsia Linux SDK from QLiomHC9D-GWh_gyK... to pI1BVH08V0eG0M7sw... (#46867) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jsimmons@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 0f19e63471afc..c1943c4d171b2 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'QLiomHC9D-GWh_gyK7_8zj8B7d_SPQ4hjjUKeVilBEQC' + 'version': 'pI1BVH08V0eG0M7sw_nlrWaJy_xogu-nzBc3yy8lUmoC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index aa00891b5c7cb..cc44ca09d32f7 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: aa2171db9c3809e11543619fea93b5df +Signature: 75d75cea3011d48979d2322dd1375c87 ==================================================================================================== LIBRARY: fuchsia_sdk From c77b9ba73bbd3df6ef4c6009327eedd60ab1448d Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Oct 2023 03:16:54 -0400 Subject: [PATCH 621/859] Roll Skia from faad330e7120 to f27c0f222320 (1 revision) (#46869) https://skia.googlesource.com/skia.git/+log/faad330e7120..f27c0f222320 2023-10-13 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 24dabdbbeee2 to 5b7763f9d427 (4 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index c1943c4d171b2..6b56d58e1d923 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'faad330e712083451a3963cd55b45825a63d9d78', + 'skia_revision': 'f27c0f22232052c4be09602552df8cf3d75002a5', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 903fbbf79270225962104cb7e20395ef185d8a08 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Oct 2023 03:29:05 -0400 Subject: [PATCH 622/859] Roll Fuchsia Mac SDK from XnH2CtqEH7byTHna7... to SDPa6SfaKvRRSUCij... (#46868) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jsimmons@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 6b56d58e1d923..8ce947e3b416a 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'XnH2CtqEH7byTHna7UVfQCBuffiqSMuugKcO-uitecgC' + 'version': 'SDPa6SfaKvRRSUCijZOk027aaPGCaoH0K8AEG_E3WH8C' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From b662e3ea4fd5f43f95d57bafbecb3c99c5a66748 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Oct 2023 05:24:25 -0400 Subject: [PATCH 623/859] Roll Dart SDK from 849253fd69b6 to 54ef02480719 (2 revisions) (#46871) https://dart.googlesource.com/sdk.git/+log/849253fd69b6..54ef02480719 2023-10-13 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-22.0.dev 2023-10-13 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-21.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jsimmons@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 8ce947e3b416a..232463de5d11c 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '849253fd69b6bfb8276c7576a2382d15db51df8a', + 'dart_revision': '54ef02480719c081ff6e6cf65e7dcf70ab659928', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py From 3f24516cf938fdf19d5b8b7603099bf8715df4c5 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Oct 2023 07:51:21 -0400 Subject: [PATCH 624/859] Roll ICU from 995db880cff2 to a622de35ac31 (1 revision) (#46873) https://chromium.googlesource.com/chromium/deps/icu.git/+log/995db880cff2..a622de35ac31 2023-10-11 dayeung@chromium.org Revert fetching tz names with realpath. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/icu-sdk-flutter-engine Please CC jsimmons@google.com,tq-i18n-team@google.com on the revert to ensure that a human is aware of the problem. To file a bug in ICU: https://github.com/unicode-org/icu To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_third_party | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 232463de5d11c..7233608c60768 100644 --- a/DEPS +++ b/DEPS @@ -295,7 +295,7 @@ deps = { Var('github_git') + '/google/flatbuffers.git' + '@' + '0a80646371179f8a7a5c1f42c31ee1d44dcf6709', 'src/third_party/icu': - Var('chromium_git') + '/chromium/deps/icu.git' + '@' + '995db880cff28a8b5d3a9978acd1b7cab9885edd', + Var('chromium_git') + '/chromium/deps/icu.git' + '@' + 'a622de35ac311c5ad390a7af80724634e5dc61ed', 'src/third_party/khronos': Var('chromium_git') + '/chromium/src/third_party/khronos.git' + '@' + '676d544d2b8f48903b7da9fceffaa534a5613978', diff --git a/ci/licenses_golden/licenses_third_party b/ci/licenses_golden/licenses_third_party index 255f02cd16aa5..fb01a55066e6b 100644 --- a/ci/licenses_golden/licenses_third_party +++ b/ci/licenses_golden/licenses_third_party @@ -1,4 +1,4 @@ -Signature: acbe4f6b3fa4b7971a5a8e90fe0ca573 +Signature: f30b8b554d159fc0dc6b3c823881e008 ==================================================================================================== LIBRARY: angle @@ -49284,6 +49284,7 @@ FILE: ../../../third_party/icu/patches/locale1.patch FILE: ../../../third_party/icu/patches/locale_google.patch FILE: ../../../third_party/icu/patches/name_5_langs.patch FILE: ../../../third_party/icu/patches/restrace.patch +FILE: ../../../third_party/icu/patches/revert_realpath.patch FILE: ../../../third_party/icu/patches/ultag_parse-double-free.patch FILE: ../../../third_party/icu/patches/wordbrk.patch FILE: ../../../third_party/icu/source/data/in/coll/ucadata-implicithan-icu4x.icu From c2a165b8ae36d7484a07664f3b305e71e762cd5b Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Oct 2023 08:06:05 -0400 Subject: [PATCH 625/859] Roll Skia from f27c0f222320 to c640eeed2695 (1 revision) (#46874) https://skia.googlesource.com/skia.git/+log/f27c0f222320..c640eeed2695 2023-10-13 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 2fd751b2af6e to e96a768f1028 (7 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 7233608c60768..ba6aab6e98fe8 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'f27c0f22232052c4be09602552df8cf3d75002a5', + 'skia_revision': 'c640eeed26953949ad71253ae299b03a62635843', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From b0e4a0bc238b2eb0bf9aa65f48fa800a78b8193d Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Oct 2023 09:33:06 -0400 Subject: [PATCH 626/859] Roll Dart SDK from 54ef02480719 to 95e2ecee106a (1 revision) (#46877) https://dart.googlesource.com/sdk.git/+log/54ef02480719..95e2ecee106a 2023-10-13 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-23.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jsimmons@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index ba6aab6e98fe8..65619467c1cc8 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '54ef02480719c081ff6e6cf65e7dcf70ab659928', + 'dart_revision': '95e2ecee106ad76bfa493168935a35fe196f4d04', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index 384cb78736b8c..d74194b853b29 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: 07db3a0ac9a10fb14083ba9a39177134 +Signature: c6ded288cc153ad47f6116d49f1dacb8 ==================================================================================================== LIBRARY: dart From 7d6a96930a356269bd6bee5c8da01b9f329c0d40 Mon Sep 17 00:00:00 2001 From: Zachary Anderson Date: Fri, 13 Oct 2023 07:33:24 -0700 Subject: [PATCH 627/859] Don't use objcopy to embed Android icudtl (#46862) When objcopy is used to embed data into a linkable object file, that object file will only have default bits set in its header for ABI etc.. If the linker doesn't cooperate by ignoring ABI mismatches on object files without code, then linking will fail. This PR stops using objcopy to create an object file that embeds icudtl.dat into the Android embedder, and instead uses the `bin_to_assembly.py` script that we're already using for Dart VM snapshot data. Context in https://github.com/llvm/llvm-project/issues/68915 --- build/bin_to_obj.gni | 103 +++++++++++++++++++++++++++ ci/licenses_golden/excluded_files | 1 - lib/snapshot/BUILD.gn | 98 +------------------------ shell/common/switches.cc | 7 +- shell/platform/android/BUILD.gn | 36 ++++------ sky/tools/objcopy.py | 58 --------------- testing/symbols/verify_exported.dart | 102 +------------------------- 7 files changed, 121 insertions(+), 284 deletions(-) create mode 100644 build/bin_to_obj.gni delete mode 100755 sky/tools/objcopy.py diff --git a/build/bin_to_obj.gni b/build/bin_to_obj.gni new file mode 100644 index 0000000000000..1885db6ba2663 --- /dev/null +++ b/build/bin_to_obj.gni @@ -0,0 +1,103 @@ +# Copyright 2013 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# Generates an assembly file defining a given symbol with the bytes from a +# binary file. Places the symbol in a text section if 'executable' is true, +# otherwise places the symbol in a read-only data section. +template("bin_to_assembly") { + assert(defined(invoker.deps), "Must define deps") + assert(defined(invoker.input), "Must define input binary file") + assert(defined(invoker.symbol), "Must define symbol name") + assert(defined(invoker.executable), "Must define boolean executable") + + action(target_name) { + deps = invoker.deps + script = "//third_party/dart/runtime/tools/bin_to_assembly.py" + output = "$target_gen_dir/${invoker.input}.S" + args = [ + "--input", + rebase_path(invoker.input), + "--output", + rebase_path(output), + "--symbol_name", + invoker.symbol, + "--target_os", + current_os, + ] + if (defined(invoker.size_symbol)) { + args += [ + "--size_symbol_name", + invoker.size_symbol, + "--target_arch", + current_cpu, + ] + } + if (invoker.executable) { + args += [ "--executable" ] + } + if (current_os != "win") { + args += [ "--incbin" ] + } + inputs = [ + script, + invoker.input, + ] + outputs = [ output ] + } +} + +# Generates an object file defining a given symbol with the bytes from a +# binary file. Places the symbol in the read-only data section. +template("bin_to_coff") { + assert(defined(invoker.deps), "Must define deps") + assert(defined(invoker.input), "Must define input binary file") + assert(defined(invoker.symbol), "Must define symbol name") + assert(defined(invoker.executable), "Must define executable") + + action(target_name) { + deps = invoker.deps + script = "//third_party/dart/runtime/tools/bin_to_coff.py" + output = "$target_gen_dir/${invoker.input}.o" + args = [ + "--input", + rebase_path(invoker.input), + "--output", + rebase_path(output), + "--symbol_name", + invoker.symbol, + ] + + if (defined(invoker.size_symbol)) { + args += [ + "--size_symbol_name", + invoker.size_symbol, + ] + } + + if (invoker.executable) { + args += [ "--executable" ] + } + + args += [ "--arch=$current_cpu" ] + inputs = [ invoker.input ] + outputs = [ output ] + } +} + +# Generates a linkable output file defining the specified symbol with the bytes +# from the binary file. Emits a COFF object file when targeting Windows, +# otherwise assembly. +template("bin_to_linkable") { + assert(defined(invoker.deps), "Must define deps") + assert(defined(invoker.input), "Must define input binary file") + assert(defined(invoker.symbol), "Must define symbol name") + target_type = "bin_to_assembly" + if (is_win) { + target_type = "bin_to_coff" + } + + target(target_type, target_name) { + forward_variables_from(invoker, "*") + } +} diff --git a/ci/licenses_golden/excluded_files b/ci/licenses_golden/excluded_files index 7bfa23f637b9c..b01773f6d8818 100644 --- a/ci/licenses_golden/excluded_files +++ b/ci/licenses_golden/excluded_files @@ -388,7 +388,6 @@ ../../../flutter/sky/tools/create_xcframework.py ../../../flutter/sky/tools/dist_dart_pkg.py ../../../flutter/sky/tools/install_framework_headers.py -../../../flutter/sky/tools/objcopy.py ../../../flutter/testing ../../../flutter/third_party/.clang-tidy ../../../flutter/third_party/.gitignore diff --git a/lib/snapshot/BUILD.gn b/lib/snapshot/BUILD.gn index eacbee21539f9..d7c6eab5c979a 100644 --- a/lib/snapshot/BUILD.gn +++ b/lib/snapshot/BUILD.gn @@ -4,6 +4,7 @@ import("//build/compiled_action.gni") import("//build/fuchsia/sdk.gni") +import("//flutter/build/bin_to_obj.gni") import("//flutter/common/config.gni") import("//flutter/impeller/tools/impeller.gni") import("//flutter/lib/ui/dart_ui.gni") @@ -110,103 +111,6 @@ compiled_action("generate_snapshot_bin") { } } -# Generates an assembly file defining a given symbol with the bytes from a -# binary file. Places the symbol in a text section if 'executable' is true, -# otherwise places the symbol in a read-only data section. -template("bin_to_assembly") { - assert(defined(invoker.deps), "Must define deps") - assert(defined(invoker.input), "Must define input binary file") - assert(defined(invoker.symbol), "Must define symbol name") - assert(defined(invoker.executable), "Must define boolean executable") - - action(target_name) { - deps = invoker.deps - script = "//third_party/dart/runtime/tools/bin_to_assembly.py" - output = invoker.input + ".S" - args = [ - "--input", - rebase_path(invoker.input), - "--output", - rebase_path(output), - "--symbol_name", - invoker.symbol, - "--target_os", - current_os, - ] - if (defined(invoker.size_symbol)) { - args += [ - "--size_symbol_name", - invoker.size_symbol, - "--target_arch", - current_cpu, - ] - } - if (invoker.executable) { - args += [ "--executable" ] - } - inputs = [ - script, - invoker.input, - ] - outputs = [ output ] - } -} - -# Generates an object file defining a given symbol with the bytes from a -# binary file. Places the symbol in the read-only data section. -template("bin_to_coff") { - assert(defined(invoker.deps), "Must define deps") - assert(defined(invoker.input), "Must define input binary file") - assert(defined(invoker.symbol), "Must define symbol name") - assert(defined(invoker.executable), "Must define executable") - - action(target_name) { - deps = invoker.deps - script = "//third_party/dart/runtime/tools/bin_to_coff.py" - output = invoker.input + ".o" - args = [ - "--input", - rebase_path(invoker.input), - "--output", - rebase_path(output), - "--symbol_name", - invoker.symbol, - ] - - if (defined(invoker.size_symbol)) { - args += [ - "--size_symbol_name", - invoker.size_symbol, - ] - } - - if (invoker.executable) { - args += [ "--executable" ] - } - - args += [ "--arch=$current_cpu" ] - inputs = [ invoker.input ] - outputs = [ output ] - } -} - -# Generates a linkable output file defining the specified symbol with the bytes -# from the binary file. Emits a COFF object file when targeting Windows, -# otherwise assembly. -template("bin_to_linkable") { - assert(defined(invoker.deps), "Must define deps") - assert(defined(invoker.input), "Must define input binary file") - assert(defined(invoker.symbol), "Must define symbol name") - target_type = "bin_to_assembly" - if (is_win) { - target_type = "bin_to_coff" - } - - target(target_type, target_name) { - forward_variables_from(invoker, "*") - } -} - bin_to_linkable("vm_snapshot_data_linkable") { deps = [ ":generate_snapshot_bin" ] input = "$target_gen_dir/vm_isolate_snapshot.bin" diff --git a/shell/common/switches.cc b/shell/common/switches.cc index 655742109ae0b..e7c5666b147e2 100644 --- a/shell/common/switches.cc +++ b/shell/common/switches.cc @@ -78,12 +78,11 @@ static const std::string kAllowedDartFlags[] = { // of the engine's own symbols on some older versions of Android. #if FML_OS_ANDROID extern uint8_t _binary_icudtl_dat_start[]; -extern uint8_t _binary_icudtl_dat_end[]; +extern size_t _binary_icudtl_dat_size; static std::unique_ptr GetICUStaticMapping() { - return std::make_unique( - _binary_icudtl_dat_start, - _binary_icudtl_dat_end - _binary_icudtl_dat_start); + return std::make_unique(_binary_icudtl_dat_start, + _binary_icudtl_dat_size); } #endif diff --git a/shell/platform/android/BUILD.gn b/shell/platform/android/BUILD.gn index c455533c6457f..bf09252581289 100644 --- a/shell/platform/android/BUILD.gn +++ b/shell/platform/android/BUILD.gn @@ -4,6 +4,7 @@ import("//build/config/android/config.gni") import("//build/toolchain/clang.gni") +import("//flutter/build/bin_to_obj.gni") import("//flutter/build/zip_bundle.gni") import("//flutter/common/config.gni") import("//flutter/impeller/tools/impeller.gni") @@ -63,11 +64,18 @@ shared_library("flutter_shell_native") { ldflags = [ "-Wl,--version-script=" + rebase_path("android_exports.lst") ] } +bin_to_assembly("icudtl_asm") { + deps = [] + input = "//third_party/icu/flutter/icudtl.dat" + symbol = "_binary_icudtl_dat_start" + size_symbol = "_binary_icudtl_dat_size" + executable = false +} + source_set("flutter_shell_native_src") { visibility = [ ":*" ] sources = [ - "$root_build_dir/flutter_icu/icudtl.o", "android_choreographer.cc", "android_choreographer.h", "android_context_gl_impeller.cc", @@ -121,9 +129,11 @@ source_set("flutter_shell_native_src") { "vsync_waiter_android.h", ] + sources += get_target_outputs(":icudtl_asm") + public_deps = [ ":android_gpu_configuration", - ":icudtl_object", + ":icudtl_asm", ":image_generator", "//flutter/assets", "//flutter/common", @@ -424,28 +434,6 @@ action("flutter_shell_java") { ] } -action("icudtl_object") { - script = "//flutter/sky/tools/objcopy.py" - - icudtl_input = "//third_party/icu/flutter/icudtl.dat" - icudtl_output = "$root_build_dir/flutter_icu/icudtl.o" - - inputs = [ "$icudtl_input" ] - - outputs = [ "$icudtl_output" ] - - args = [ - "--objcopy", - rebase_path(android_objcopy), - "--input", - rebase_path(icudtl_input), - "--output", - rebase_path(icudtl_output), - "--arch", - current_cpu, - ] -} - action("android_jar") { script = "//build/android/gyp/create_flutter_jar.py" diff --git a/sky/tools/objcopy.py b/sky/tools/objcopy.py deleted file mode 100755 index a1fdedd143468..0000000000000 --- a/sky/tools/objcopy.py +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env python3 -# -# Copyright 2013 The Flutter Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import argparse -import os -import subprocess -import sys - -# BFD architecture names recognized by objcopy. -BFD_ARCH = { - 'arm': 'arm', - 'arm64': 'aarch64', - 'x86': 'i386', - 'x64': 'i386:x86-64', -} - -# BFD target names recognized by objcopy. -BFD_TARGET = { - 'arm': 'elf32-littlearm', - 'arm64': 'elf64-littleaarch64', - 'x86': 'elf32-i386', - 'x64': 'elf64-x86-64', -} - - -def main(): - parser = argparse.ArgumentParser( - description='Convert a data file to an object file' - ) - parser.add_argument('--objcopy', type=str, required=True) - parser.add_argument('--input', type=str, required=True) - parser.add_argument('--output', type=str, required=True) - parser.add_argument('--arch', type=str, required=True) - - args = parser.parse_args() - - input_dir, input_file = os.path.split(args.input) - output_path = os.path.abspath(args.output) - - subprocess.check_call([ - args.objcopy, - '-I', - 'binary', - '-O', - BFD_TARGET[args.arch], - '-B', - BFD_ARCH[args.arch], - input_file, - output_path, - ], - cwd=input_dir) - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/testing/symbols/verify_exported.dart b/testing/symbols/verify_exported.dart index 22e9736aff9cb..a4b982171d16e 100644 --- a/testing/symbols/verify_exported.dart +++ b/testing/symbols/verify_exported.dart @@ -135,106 +135,8 @@ int _checkAndroid(String outPath, String nmPath, Iterable builds) { }; final Map expectedSymbols = { 'JNI_OnLoad': 'T', - '_binary_icudtl_dat_size': 'A', - '_binary_icudtl_dat_start': 'D', - // TODO(dnfield): Remove these once Clang lld does not expose them. - // arm https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=47943 - '__adddf3': 'T', - '__addsf3': 'T', - '__aeabi_cdcmpeq': 'T', - '__aeabi_cdcmple': 'T', - '__aeabi_cdrcmple': 'T', - '__aeabi_cfcmpeq': 'T', - '__aeabi_cfcmple': 'T', - '__aeabi_cfrcmple': 'T', - '__aeabi_d2lz': 'T', - '__aeabi_d2uiz': 'T', - '__aeabi_d2ulz': 'T', - '__aeabi_dadd': 'T', - '__aeabi_dcmpeq': 'T', - '__aeabi_dcmpge': 'T', - '__aeabi_dcmpgt': 'T', - '__aeabi_dcmple': 'T', - '__aeabi_dcmplt': 'T', - '__aeabi_ddiv': 'T', - '__aeabi_dmul': 'T', - '__aeabi_drsub': 'T', - '__aeabi_dsub': 'T', - '__aeabi_f2d': 'T', - '__aeabi_f2lz': 'T', - '__aeabi_f2ulz': 'T', - '__aeabi_fadd': 'T', - '__aeabi_fcmpeq': 'T', - '__aeabi_fcmpge': 'T', - '__aeabi_fcmpgt': 'T', - '__aeabi_fcmple': 'T', - '__aeabi_fcmplt': 'T', - '__aeabi_frsub': 'T', - '__aeabi_fsub': 'T', - '__aeabi_i2d': 'T', - '__aeabi_i2f': 'T', - '__aeabi_l2d': 'T', - '__aeabi_l2f': 'T', - '__aeabi_lasr': 'T', - '__aeabi_ldivmod': 'T', - '__aeabi_llsl': 'T', - '__aeabi_llsr': 'T', - '__aeabi_ui2d': 'T', - '__aeabi_ui2f': 'T', - '__aeabi_uidiv': 'T', - '__aeabi_uidivmod': 'T', - '__aeabi_ul2d': 'T', - '__aeabi_ul2f': 'T', - '__aeabi_uldivmod': 'T', - '__ashldi3': 'T', - '__ashrdi3': 'T', - '__cmpdf2': 'T', - '__cmpsf2': 'T', - '__divdf3': 'T', - '__divdi3': 'T', - '__eqdf2': 'T', - '__eqsf2': 'T', - '__extendsfdf2': 'T', - '__fixdfdi': 'T', - '__fixsfdi': 'T', - '__fixunsdfdi': 'T', - '__fixunsdfsi': 'T', - '__fixunssfdi': 'T', - '__floatdidf': 'T', - '__floatdisf': 'T', - '__floatsidf': 'T', - '__floatsisf': 'T', - '__floatundidf': 'T', - '__floatundisf': 'T', - '__floatunsidf': 'T', - '__floatunsisf': 'T', - '__gedf2': 'T', - '__gesf2': 'T', - '__gnu_ldivmod_helper': 'T', - '__gnu_uldivmod_helper': 'T', - '__gtdf2': 'T', - '__gtsf2': 'T', - '__ledf2': 'T', - '__lesf2': 'T', - '__lshrdi3': 'T', - '__ltdf2': 'T', - '__ltsf2': 'T', - '__muldf3': 'T', - '__nedf2': 'T', - '__nesf2': 'T', - '__subdf3': 'T', - '__subsf3': 'T', - '__udivdi3': 'T', - '__udivsi3': 'T', - // arm64 - '__clz_tab': 'R', - '__udivti3': 'T', - // arm64 && x64 - '__emutls_get_address': 'T', - '__emutls_register_common': 'T', - // jit x86 - '__moddi3': 'T', - '__umoddi3': 'T', + '_binary_icudtl_dat_size': 'R', + '_binary_icudtl_dat_start': 'R', }; final Map badSymbols = {}; for (final String key in entryMap.keys) { From 2c71df40c525077eebf85276735d584b2208d2b9 Mon Sep 17 00:00:00 2001 From: Kevin Lubick Date: Fri, 13 Oct 2023 10:41:25 -0400 Subject: [PATCH 628/859] Update to use GrDirectContexts::MakeVulkan (#46878) In http://review.skia.org/764516, Skia moved the way to make a Vulkan context. This updates Flutter to use that new way. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [ ] I listed at least one issue that this PR fixes in the description above. - [x] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I signed the [CLA]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat --- shell/common/shell_test_platform_view_vulkan.cc | 3 ++- shell/platform/embedder/embedder_surface_vulkan.cc | 3 ++- shell/platform/fuchsia/flutter/vulkan_surface_producer.cc | 3 ++- testing/test_vulkan_context.cc | 3 ++- vulkan/vulkan_window.cc | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/shell/common/shell_test_platform_view_vulkan.cc b/shell/common/shell_test_platform_view_vulkan.cc index d19e5cb2bcaff..d8ce19114f140 100644 --- a/shell/common/shell_test_platform_view_vulkan.cc +++ b/shell/common/shell_test_platform_view_vulkan.cc @@ -14,6 +14,7 @@ #include "third_party/skia/include/core/SkSurface.h" #include "third_party/skia/include/gpu/ganesh/SkSurfaceGanesh.h" +#include "third_party/skia/include/gpu/ganesh/vk/GrVkDirectContext.h" #if OS_FUCHSIA #define VULKAN_SO_PATH "libvulkan.so" @@ -138,7 +139,7 @@ bool ShellTestPlatformViewVulkan::OffScreenSurface::CreateSkiaGrContext() { MakeDefaultContextOptions(ContextType::kRender, GrBackendApi::kVulkan); sk_sp context = - GrDirectContext::MakeVulkan(backend_context, options); + GrDirectContexts::MakeVulkan(backend_context, options); if (context == nullptr) { FML_DLOG(ERROR) << "Failed to create GrDirectContext"; diff --git a/shell/platform/embedder/embedder_surface_vulkan.cc b/shell/platform/embedder/embedder_surface_vulkan.cc index d7191770025de..1ab4ca92942c3 100644 --- a/shell/platform/embedder/embedder_surface_vulkan.cc +++ b/shell/platform/embedder/embedder_surface_vulkan.cc @@ -14,6 +14,7 @@ #include "include/gpu/GrDirectContext.h" #include "include/gpu/vk/GrVkBackendContext.h" #include "include/gpu/vk/GrVkExtensions.h" +#include "third_party/skia/include/gpu/ganesh/vk/GrVkDirectContext.h" namespace flutter { @@ -171,7 +172,7 @@ sk_sp EmbedderSurfaceVulkan::CreateGrContext( GrContextOptions options = MakeDefaultContextOptions(context_type, GrBackendApi::kVulkan); options.fReduceOpsTaskSplitting = GrContextOptions::Enable::kNo; - return GrDirectContext::MakeVulkan(backend_context, options); + return GrDirectContexts::MakeVulkan(backend_context, options); } } // namespace flutter diff --git a/shell/platform/fuchsia/flutter/vulkan_surface_producer.cc b/shell/platform/fuchsia/flutter/vulkan_surface_producer.cc index 24394e4cfc0fe..f99c39a4d095e 100644 --- a/shell/platform/fuchsia/flutter/vulkan_surface_producer.cc +++ b/shell/platform/fuchsia/flutter/vulkan_surface_producer.cc @@ -20,6 +20,7 @@ #include "third_party/skia/include/gpu/GrBackendSurface.h" #include "third_party/skia/include/gpu/ganesh/SkSurfaceGanesh.h" #include "third_party/skia/include/gpu/ganesh/vk/GrVkBackendSurface.h" +#include "third_party/skia/include/gpu/ganesh/vk/GrVkDirectContext.h" #include "third_party/skia/include/gpu/vk/GrVkBackendContext.h" #include "third_party/skia/include/gpu/vk/GrVkExtensions.h" #include "third_party/skia/include/gpu/vk/GrVkTypes.h" @@ -153,7 +154,7 @@ bool VulkanSurfaceProducer::Initialize() { GrContextOptions options; options.fReduceOpsTaskSplitting = GrContextOptions::Enable::kNo; - context_ = GrDirectContext::MakeVulkan(backend_context, options); + context_ = GrDirectContexts::MakeVulkan(backend_context, options); if (context_ == nullptr) { FML_LOG(ERROR) diff --git a/testing/test_vulkan_context.cc b/testing/test_vulkan_context.cc index 5652431a800ad..d7472303f111a 100644 --- a/testing/test_vulkan_context.cc +++ b/testing/test_vulkan_context.cc @@ -17,6 +17,7 @@ #include "flutter/vulkan/swiftshader_path.h" #include "third_party/skia/include/core/SkSurface.h" #include "third_party/skia/include/gpu/GrDirectContext.h" +#include "third_party/skia/include/gpu/ganesh/vk/GrVkDirectContext.h" #include "third_party/skia/include/gpu/vk/GrVkExtensions.h" #include "vulkan/vulkan_core.h" @@ -106,7 +107,7 @@ TestVulkanContext::TestVulkanContext() { GrContextOptions options = MakeDefaultContextOptions(ContextType::kRender, GrBackendApi::kVulkan); options.fReduceOpsTaskSplitting = GrContextOptions::Enable::kNo; - context_ = GrDirectContext::MakeVulkan(backend_context, options); + context_ = GrDirectContexts::MakeVulkan(backend_context, options); } TestVulkanContext::~TestVulkanContext() { diff --git a/vulkan/vulkan_window.cc b/vulkan/vulkan_window.cc index 345919b83d8c1..95bd227dde462 100644 --- a/vulkan/vulkan_window.cc +++ b/vulkan/vulkan_window.cc @@ -19,6 +19,7 @@ #include "third_party/skia/include/core/SkSurface.h" #include "third_party/skia/include/gpu/GrDirectContext.h" +#include "third_party/skia/include/gpu/ganesh/vk/GrVkDirectContext.h" namespace vulkan { @@ -128,7 +129,7 @@ bool VulkanWindow::CreateSkiaGrContext() { GrContextOptions options; options.fReduceOpsTaskSplitting = GrContextOptions::Enable::kNo; sk_sp context = - GrDirectContext::MakeVulkan(backend_context, options); + GrDirectContexts::MakeVulkan(backend_context, options); if (context == nullptr) { return false; From b052cdeb016384c996eea37a2927a731a0bc679f Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Oct 2023 10:51:06 -0400 Subject: [PATCH 629/859] Roll Skia from c640eeed2695 to e566db061ce8 (1 revision) (#46881) https://skia.googlesource.com/skia.git/+log/c640eeed2695..e566db061ce8 2023-10-13 michaelludwig@google.com [skif] Skip auto saveLayer for most drawImageRect() calls If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 65619467c1cc8..d630ced57cd99 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'c640eeed26953949ad71253ae299b03a62635843', + 'skia_revision': 'e566db061ce8f4b6812240d9ffd4b918adf61bf0', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 59b4b5873aff5..cd644fa47a3de 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 79adeb233ec1086fee4b28a3050ee5b8 +Signature: a1e57956e2a756f14fc40f602e845a2e ==================================================================================================== LIBRARY: etc1 From 77b130838068dde22e512fe5d5490c5a34917360 Mon Sep 17 00:00:00 2001 From: Kevin Lubick Date: Fri, 13 Oct 2023 10:56:27 -0400 Subject: [PATCH 630/859] Fix forward declare and some deprecated enums (#46882) There was a compile error when trying to roll in http://review.skia.org/764970, and this addresses that. While I was here, I noticed some uses of the old-named `GrBackend` enum and updated it to the non-deprecated enum class. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [ ] I listed at least one issue that this PR fixes in the description above. - [x] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I signed the [CLA]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat --- shell/common/shell_io_manager.cc | 5 +++-- shell/common/shell_io_manager.h | 5 ++++- shell/platform/android/platform_view_android.cc | 2 +- shell/platform/embedder/embedder_surface_gl.cc | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/shell/common/shell_io_manager.cc b/shell/common/shell_io_manager.cc index ec22661b3763d..59de967e1cc0f 100644 --- a/shell/common/shell_io_manager.cc +++ b/shell/common/shell_io_manager.cc @@ -10,14 +10,15 @@ #include "flutter/shell/common/context_options.h" #include "third_party/skia/include/gpu/ganesh/gl/GrGLDirectContext.h" #include "third_party/skia/include/gpu/gl/GrGLInterface.h" +#include "third_party/skia/include/gpu/gl/GrGLTypes.h" namespace flutter { sk_sp ShellIOManager::CreateCompatibleResourceLoadingContext( - GrBackend backend, + GrBackendApi backend, const sk_sp& gl_interface) { #if SK_GL - if (backend != GrBackend::kOpenGL_GrBackend) { + if (backend != GrBackendApi::kOpenGL) { return nullptr; } diff --git a/shell/common/shell_io_manager.h b/shell/common/shell_io_manager.h index b178541939771..9c105a80d174c 100644 --- a/shell/common/shell_io_manager.h +++ b/shell/common/shell_io_manager.h @@ -12,6 +12,9 @@ #include "flutter/fml/memory/weak_ptr.h" #include "flutter/lib/ui/io_manager.h" #include "third_party/skia/include/gpu/GrDirectContext.h" +#include "third_party/skia/include/gpu/GrTypes.h" + +struct GrGLInterface; namespace flutter { @@ -21,7 +24,7 @@ class ShellIOManager final : public IOManager { // supply to the IOManager. The platforms may create the context themselves if // they so desire. static sk_sp CreateCompatibleResourceLoadingContext( - GrBackend backend, + GrBackendApi backend, const sk_sp& gl_interface); ShellIOManager( diff --git a/shell/platform/android/platform_view_android.cc b/shell/platform/android/platform_view_android.cc index 83f1f635cf639..485f00eb189e8 100644 --- a/shell/platform/android/platform_view_android.cc +++ b/shell/platform/android/platform_view_android.cc @@ -386,7 +386,7 @@ sk_sp PlatformViewAndroid::CreateResourceContext() const { // the OpenGL surface will be able to make a resource context current. If // this changes, this assumption breaks. Handle the same. resource_context = ShellIOManager::CreateCompatibleResourceLoadingContext( - GrBackend::kOpenGL_GrBackend, + GrBackendApi::kOpenGL, GPUSurfaceGLDelegate::GetDefaultPlatformGLInterface()); } else { FML_DLOG(ERROR) << "Could not make the resource context current."; diff --git a/shell/platform/embedder/embedder_surface_gl.cc b/shell/platform/embedder/embedder_surface_gl.cc index 44b1fddf808fb..cd32348e10306 100644 --- a/shell/platform/embedder/embedder_surface_gl.cc +++ b/shell/platform/embedder/embedder_surface_gl.cc @@ -107,7 +107,7 @@ sk_sp EmbedderSurfaceGL::CreateResourceContext() const { auto callback = gl_dispatch_table_.gl_make_resource_current_callback; if (callback && callback()) { if (auto context = ShellIOManager::CreateCompatibleResourceLoadingContext( - GrBackend::kOpenGL_GrBackend, GetGLInterface())) { + GrBackendApi::kOpenGL, GetGLInterface())) { return context; } else { FML_LOG(ERROR) From 1d243fadd52d84e3790c5a6478ff6da4aa3ec349 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Oct 2023 11:37:07 -0400 Subject: [PATCH 631/859] Roll Skia from e566db061ce8 to 3acf82dcc479 (2 revisions) (#46883) https://skia.googlesource.com/skia.git/+log/e566db061ce8..3acf82dcc479 2023-10-13 michaelludwig@google.com Manual Dawn roll with flag removal 2023-10-13 robertphillips@google.com [graphite] Add some missing color filters to the precompilation system If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index d630ced57cd99..56d04a29cb541 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'e566db061ce8f4b6812240d9ffd4b918adf61bf0', + 'skia_revision': '3acf82dcc47973e8b3e466fb1bca99ca444e658d', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index cd644fa47a3de..789b9a0524134 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: a1e57956e2a756f14fc40f602e845a2e +Signature: 244d5b4ec05eae279e56381c0e102ae8 ==================================================================================================== LIBRARY: etc1 From d3c310ded8b484d02f00e99e6c97cdf2e9ed2630 Mon Sep 17 00:00:00 2001 From: gaaclarke <30870216+gaaclarke@users.noreply.github.com> Date: Fri, 13 Oct 2023 09:04:47 -0700 Subject: [PATCH 632/859] [Impeller] Started throwing errors if dart:ui/Image.toByteData fails (#46738) issue: https://github.com/flutter/flutter/issues/135245 This is a first step. Next we'll implement a retry. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I signed the [CLA]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat --- ci/licenses_golden/licenses_flutter | 2 + fml/status_or.h | 81 +++++++++++++++++++++ lib/ui/fixtures/ui_test.dart | 28 ++++++- lib/ui/painting.dart | 44 ++++++++++- lib/ui/painting/image_encoding.cc | 46 +++++++----- lib/ui/painting/image_encoding_impeller.cc | 31 ++++---- lib/ui/painting/image_encoding_impeller.h | 5 +- lib/ui/painting/image_encoding_unittests.cc | 76 ++++++++++++++++--- shell/common/shell_test.cc | 4 + shell/common/shell_test.h | 2 + 10 files changed, 268 insertions(+), 51 deletions(-) create mode 100644 fml/status_or.h diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index 576a145eaf63d..f0b6a709eb8f0 100644 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -1617,6 +1617,7 @@ ORIGIN: ../../../flutter/fml/shared_thread_merger.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/fml/shared_thread_merger.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/fml/size.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/fml/status.h + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/fml/status_or.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/fml/string_conversion.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/fml/string_conversion.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/fml/synchronization/atomic_object.h + ../../../flutter/LICENSE @@ -4378,6 +4379,7 @@ FILE: ../../../flutter/fml/shared_thread_merger.cc FILE: ../../../flutter/fml/shared_thread_merger.h FILE: ../../../flutter/fml/size.h FILE: ../../../flutter/fml/status.h +FILE: ../../../flutter/fml/status_or.h FILE: ../../../flutter/fml/string_conversion.cc FILE: ../../../flutter/fml/string_conversion.h FILE: ../../../flutter/fml/synchronization/atomic_object.h diff --git a/fml/status_or.h b/fml/status_or.h new file mode 100644 index 0000000000000..33718da74f126 --- /dev/null +++ b/fml/status_or.h @@ -0,0 +1,81 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef FLUTTER_FML_STATUS_OR_H_ +#define FLUTTER_FML_STATUS_OR_H_ + +#include + +#include "flutter/fml/status.h" + +namespace fml { + +// TODO(https://github.com/flutter/flutter/issues/134741): Replace with +// absl::StatusOr. +/// Represents a union type of an object of type `T` and an fml::Status. +/// +/// This is often used as a replacement for C++ exceptions where a function that +/// could fail may return an error or a result. These are typically used for +/// errors that are meant to be recovered from. If there is no recovery +/// available `FML_CHECK` is more appropriate. +/// +/// Example: +/// StatusOr div(int n, int d) { +/// if (d == 0) { +/// return Status(StatusCode::kFailedPrecondition, "div by zero"); +/// } +/// return n / d; +/// } +template +class StatusOr { + public: + StatusOr(const T& value) : status_(), value_(value) {} + StatusOr(const Status& status) : status_(status), value_() {} + + StatusOr(const StatusOr&) = default; + StatusOr(StatusOr&&) = default; + + StatusOr& operator=(const StatusOr&) = default; + StatusOr& operator=(StatusOr&&) = default; + + StatusOr& operator=(const T& value) { + status_ = Status(); + value_ = value; + return *this; + } + + StatusOr& operator=(const T&& value) { + status_ = Status(); + value_ = std::move(value); + return *this; + } + + StatusOr& operator=(const Status& value) { + status_ = value; + value_ = std::nullopt; + return *this; + } + + const Status& status() const { return status_; } + + bool ok() const { return status_.ok(); } + + const T& value() const { + FML_CHECK(status_.ok()); + return value_.value(); + } + + T& value() { + FML_CHECK(status_.ok()); + return value_.value(); + } + + private: + Status status_; + std::optional value_; +}; + +} // namespace fml + +#endif diff --git a/lib/ui/fixtures/ui_test.dart b/lib/ui/fixtures/ui_test.dart index 3cc93a746921a..a4b8ada735b2c 100644 --- a/lib/ui/fixtures/ui_test.dart +++ b/lib/ui/fixtures/ui_test.dart @@ -310,7 +310,7 @@ Future encodeImageProducesExternalUint8List() async { canvas.drawCircle(c, 25.0, paint); final Picture picture = pictureRecorder.endRecording(); final Image image = await picture.toImage(100, 100); - _encodeImage(image, ImageByteFormat.png.index, (Uint8List result) { + _encodeImage(image, ImageByteFormat.png.index, (Uint8List result, String? error) { // The buffer should be non-null and writable. result[0] = 0; // The buffer should be external typed data. @@ -319,9 +319,33 @@ Future encodeImageProducesExternalUint8List() async { } @pragma('vm:external-name', 'EncodeImage') -external void _encodeImage(Image i, int format, void Function(Uint8List result)); +external void _encodeImage(Image i, int format, void Function(Uint8List result, String? error)); @pragma('vm:external-name', 'ValidateExternal') external void _validateExternal(Uint8List result); +@pragma('vm:external-name', 'ValidateError') +external void _validateError(String? error); +@pragma('vm:external-name', 'TurnOffGPU') +external void _turnOffGPU(); + +@pragma('vm:entry-point') +Future toByteDataWithoutGPU() async { + final PictureRecorder pictureRecorder = PictureRecorder(); + final Canvas canvas = Canvas(pictureRecorder); + final Paint paint = Paint() + ..color = Color.fromRGBO(255, 255, 255, 1.0) + ..style = PaintingStyle.fill; + final Offset c = Offset(50.0, 50.0); + canvas.drawCircle(c, 25.0, paint); + final Picture picture = pictureRecorder.endRecording(); + final Image image = await picture.toImage(100, 100); + _turnOffGPU(); + try { + ByteData? byteData = await image.toByteData(); + _validateError(null); + } catch (ex) { + _validateError(ex.toString()); + } +} @pragma('vm:entry-point') Future pumpImage() async { diff --git a/lib/ui/painting.dart b/lib/ui/painting.dart index cfb5e2348f06f..1fbf1cae9fdd0 100644 --- a/lib/ui/painting.dart +++ b/lib/ui/painting.dart @@ -1936,16 +1936,20 @@ base class _Image extends NativeFieldWrapperClass1 { external int get height; Future toByteData({ImageByteFormat format = ImageByteFormat.rawRgba}) { - return _futurize((_Callback callback) { - return _toByteData(format.index, (Uint8List? encoded) { - callback(encoded!.buffer.asByteData()); + return _futurizeWithError((_CallbackWithError callback) { + return _toByteData(format.index, (Uint8List? encoded, String? error) { + if (error == null && encoded != null) { + callback(encoded.buffer.asByteData(), null); + } else { + callback(null, error); + } }); }); } /// Returns an error message on failure, null on success. @Native, Int32, Handle)>(symbol: 'Image::toByteData') - external String? _toByteData(int format, _Callback callback); + external String? _toByteData(int format, void Function(Uint8List?, String?) callback); bool _disposed = false; void dispose() { @@ -6884,12 +6888,19 @@ base class _NativeImageDescriptor extends NativeFieldWrapperClass1 implements Im /// Generic callback signature, used by [_futurize]. typedef _Callback = void Function(T result); +/// Generic callback signature, used by [_futurizeWithError]. +typedef _CallbackWithError = void Function(T result, String? error); + /// Signature for a method that receives a [_Callback]. /// /// Return value should be null on success, and a string error message on /// failure. typedef _Callbacker = String? Function(_Callback callback); +/// Signature for a method that receives a [_CallbackWithError]. +/// See also: [_Callbacker] +typedef _CallbackerWithError = String? Function(_CallbackWithError callback); + // Converts a method that receives a value-returning callback to a method that // returns a Future. // @@ -6941,6 +6952,31 @@ Future _futurize(_Callbacker callbacker) { return completer.future; } +/// A variant of `_futurize` that can communicate specific errors. +Future _futurizeWithError(_CallbackerWithError callbacker) { + final Completer completer = Completer.sync(); + // If the callback synchronously throws an error, then synchronously + // rethrow that error instead of adding it to the completer. This + // prevents the Zone from receiving an uncaught exception. + bool isSync = true; + final String? error = callbacker((T? t, String? error) { + if (t != null) { + completer.complete(t); + } else { + if (isSync) { + throw Exception(error ?? 'operation failed'); + } else { + completer.completeError(Exception(error ?? 'operation failed')); + } + } + }); + isSync = false; + if (error != null) { + throw Exception(error); + } + return completer.future; +} + /// An exception thrown by [Canvas.drawImage] and related methods when drawing /// an [Image] created via [Picture.toImageSync] that is in an invalid state. /// diff --git a/lib/ui/painting/image_encoding.cc b/lib/ui/painting/image_encoding.cc index dfd6daf130c61..69d3bd38f87ba 100644 --- a/lib/ui/painting/image_encoding.cc +++ b/lib/ui/painting/image_encoding.cc @@ -11,6 +11,7 @@ #include "flutter/common/task_runners.h" #include "flutter/fml/build_config.h" #include "flutter/fml/make_copyable.h" +#include "flutter/fml/status_or.h" #include "flutter/fml/trace_event.h" #include "flutter/lib/ui/painting/image.h" #if IMPELLER_SUPPORTS_RENDERING @@ -40,25 +41,27 @@ void FinalizeSkData(void* isolate_callback_data, void* peer) { } void InvokeDataCallback(std::unique_ptr callback, - sk_sp buffer) { + fml::StatusOr>&& buffer) { std::shared_ptr dart_state = callback->dart_state().lock(); if (!dart_state) { return; } tonic::DartState::Scope scope(dart_state); - if (!buffer) { - DartInvoke(callback->value(), {Dart_Null()}); + if (!buffer.ok()) { + std::string error_copy(buffer.status().message()); + Dart_Handle dart_string = ToDart(error_copy); + DartInvoke(callback->value(), {Dart_Null(), dart_string}); return; } // Skia will not modify the buffer, and it is backed by memory that is // read/write, so Dart can be given direct access to the buffer through an // external Uint8List. - void* bytes = const_cast(buffer->data()); - const intptr_t length = buffer->size(); - void* peer = reinterpret_cast(buffer.release()); + void* bytes = const_cast(buffer.value()->data()); + const intptr_t length = buffer.value()->size(); + void* peer = reinterpret_cast(buffer.value().release()); Dart_Handle dart_data = Dart_NewExternalTypedDataWithFinalizer( Dart_TypedData_kUint8, bytes, length, peer, length, FinalizeSkData); - DartInvoke(callback->value(), {dart_data}); + DartInvoke(callback->value(), {dart_data, Dart_Null()}); } sk_sp CopyImageByteData(const sk_sp& raster_image, @@ -110,21 +113,30 @@ void EncodeImageAndInvokeDataCallback( const std::shared_ptr& is_gpu_disabled_sync_switch, const std::shared_ptr& impeller_context, bool is_impeller_enabled) { - auto callback_task = fml::MakeCopyable( - [callback = std::move(callback)](sk_sp encoded) mutable { + auto callback_task = + fml::MakeCopyable([callback = std::move(callback)]( + fml::StatusOr>&& encoded) mutable { InvokeDataCallback(std::move(callback), std::move(encoded)); }); // The static leak checker gets confused by the use of fml::MakeCopyable in // EncodeImage. // NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks) - auto encode_task = [callback_task = std::move(callback_task), format, - ui_task_runner](const sk_sp& raster_image) { - sk_sp encoded = EncodeImage(raster_image, format); - ui_task_runner->PostTask([callback_task = callback_task, - encoded = std::move(encoded)]() mutable { - callback_task(std::move(encoded)); - }); - }; + auto encode_task = + [callback_task = std::move(callback_task), format, + ui_task_runner](const fml::StatusOr>& raster_image) { + if (raster_image.ok()) { + sk_sp encoded = EncodeImage(raster_image.value(), format); + ui_task_runner->PostTask([callback_task = callback_task, + encoded = std::move(encoded)]() mutable { + callback_task(std::move(encoded)); + }); + } else { + ui_task_runner->PostTask([callback_task = callback_task, + raster_image = raster_image]() mutable { + callback_task(raster_image.status()); + }); + } + }; FML_DCHECK(image); #if IMPELLER_SUPPORTS_RENDERING diff --git a/lib/ui/painting/image_encoding_impeller.cc b/lib/ui/painting/image_encoding_impeller.cc index 445bc2bfa5eb2..4e403d5d3f2bf 100644 --- a/lib/ui/painting/image_encoding_impeller.cc +++ b/lib/ui/painting/image_encoding_impeller.cc @@ -58,12 +58,15 @@ sk_sp ConvertBufferToSkImage( void DoConvertImageToRasterImpeller( const sk_sp& dl_image, - std::function)> encode_task, + std::function>)> encode_task, const std::shared_ptr& is_gpu_disabled_sync_switch, const std::shared_ptr& impeller_context) { is_gpu_disabled_sync_switch->Execute( fml::SyncSwitch::Handlers() - .SetIfTrue([&encode_task] { encode_task(nullptr); }) + .SetIfTrue([&encode_task] { + encode_task( + fml::Status(fml::StatusCode::kUnavailable, "GPU unavailable.")); + }) .SetIfFalse([&dl_image, &encode_task, &impeller_context] { ImageEncodingImpeller::ConvertDlImageToSkImage( dl_image, std::move(encode_task), impeller_context); @@ -74,19 +77,19 @@ void DoConvertImageToRasterImpeller( void ImageEncodingImpeller::ConvertDlImageToSkImage( const sk_sp& dl_image, - std::function)> encode_task, + std::function>)> encode_task, const std::shared_ptr& impeller_context) { auto texture = dl_image->impeller_texture(); if (impeller_context == nullptr) { - FML_LOG(ERROR) << "Impeller context was null."; - encode_task(nullptr); + encode_task(fml::Status(fml::StatusCode::kFailedPrecondition, + "Impeller context was null.")); return; } if (texture == nullptr) { - FML_LOG(ERROR) << "Image was null."; - encode_task(nullptr); + encode_task( + fml::Status(fml::StatusCode::kFailedPrecondition, "Image was null.")); return; } @@ -94,14 +97,14 @@ void ImageEncodingImpeller::ConvertDlImageToSkImage( auto color_type = ToSkColorType(texture->GetTextureDescriptor().format); if (dimensions.isEmpty()) { - FML_LOG(ERROR) << "Image dimensions were empty."; - encode_task(nullptr); + encode_task(fml::Status(fml::StatusCode::kFailedPrecondition, + "Image dimensions were empty.")); return; } if (!color_type.has_value()) { - FML_LOG(ERROR) << "Failed to get color type from pixel format."; - encode_task(nullptr); + encode_task(fml::Status(fml::StatusCode::kUnimplemented, + "Failed to get color type from pixel format.")); return; } @@ -121,7 +124,7 @@ void ImageEncodingImpeller::ConvertDlImageToSkImage( encode_task = std::move(encode_task)]( impeller::CommandBuffer::Status status) { if (status != impeller::CommandBuffer::Status::kCompleted) { - encode_task(nullptr); + encode_task(fml::Status(fml::StatusCode::kUnknown, "")); return; } auto sk_image = ConvertBufferToSkImage(buffer, color_type, dimensions); @@ -135,14 +138,14 @@ void ImageEncodingImpeller::ConvertDlImageToSkImage( void ImageEncodingImpeller::ConvertImageToRaster( const sk_sp& dl_image, - std::function)> encode_task, + std::function>)> encode_task, const fml::RefPtr& raster_task_runner, const fml::RefPtr& io_task_runner, const std::shared_ptr& is_gpu_disabled_sync_switch, const std::shared_ptr& impeller_context) { auto original_encode_task = std::move(encode_task); encode_task = [original_encode_task = std::move(original_encode_task), - io_task_runner](sk_sp image) mutable { + io_task_runner](fml::StatusOr> image) mutable { fml::TaskRunner::RunNowOrPostTask( io_task_runner, [original_encode_task = std::move(original_encode_task), diff --git a/lib/ui/painting/image_encoding_impeller.h b/lib/ui/painting/image_encoding_impeller.h index 18fc3d90650bf..84894407854a3 100644 --- a/lib/ui/painting/image_encoding_impeller.h +++ b/lib/ui/painting/image_encoding_impeller.h @@ -7,6 +7,7 @@ #include "flutter/common/task_runners.h" #include "flutter/display_list/image/dl_image.h" +#include "flutter/fml/status_or.h" #include "flutter/fml/synchronization/sync_switch.h" namespace impeller { @@ -26,14 +27,14 @@ class ImageEncodingImpeller { /// Visible for testing. static void ConvertDlImageToSkImage( const sk_sp& dl_image, - std::function)> encode_task, + std::function>)> encode_task, const std::shared_ptr& impeller_context); /// Converts a DlImage to a SkImage. /// `encode_task` is executed with the resulting `SkImage`. static void ConvertImageToRaster( const sk_sp& dl_image, - std::function)> encode_task, + std::function>)> encode_task, const fml::RefPtr& raster_task_runner, const fml::RefPtr& io_task_runner, const std::shared_ptr& is_gpu_disabled_sync_switch, diff --git a/lib/ui/painting/image_encoding_unittests.cc b/lib/ui/painting/image_encoding_unittests.cc index 46c1e15ef4dfe..cf8abf76b2f4f 100644 --- a/lib/ui/painting/image_encoding_unittests.cc +++ b/lib/ui/painting/image_encoding_unittests.cc @@ -23,6 +23,8 @@ // CREATE_NATIVE_ENTRY is leaky by design // NOLINTBEGIN(clang-analyzer-core.StackAddressEscape) +#pragma GCC diagnostic ignored "-Wunreachable-code" + namespace flutter { namespace testing { @@ -224,6 +226,54 @@ std::shared_ptr MakeConvertDlImageToSkImageContext( } } // namespace +TEST_F(ShellTest, EncodeImageFailsWithoutGPUImpeller) { +#ifndef FML_OS_MACOSX + // Only works on macos currently. + GTEST_SKIP(); +#endif + Settings settings = CreateSettingsForFixture(); + settings.enable_impeller = true; + TaskRunners task_runners("test", // label + GetCurrentTaskRunner(), // platform + CreateNewThread(), // raster + CreateNewThread(), // ui + CreateNewThread() // io + ); + + auto native_validate_error = [&](Dart_NativeArguments args) { + auto handle = Dart_GetNativeArgument(args, 0); + + EXPECT_FALSE(Dart_IsNull(handle)); + + message_latch.Signal(); + }; + + AddNativeCallback("ValidateError", + CREATE_NATIVE_ENTRY(native_validate_error)); + + std::unique_ptr shell = CreateShell({ + .settings = settings, + .task_runners = task_runners, + }); + + auto turn_off_gpu = [&](Dart_NativeArguments args) { + TurnOffGPU(shell.get()); + }; + + AddNativeCallback("TurnOffGPU", CREATE_NATIVE_ENTRY(turn_off_gpu)); + + ASSERT_TRUE(shell->IsSetup()); + auto configuration = RunConfiguration::InferFromSettings(settings); + configuration.SetEntrypoint("toByteDataWithoutGPU"); + + shell->RunEngine(std::move(configuration), [&](auto result) { + ASSERT_EQ(result, Engine::RunStatus::Success); + }); + + message_latch.Wait(); + DestroyShell(std::move(shell), task_runners); +} + TEST(ImageEncodingImpellerTest, ConvertDlImageToSkImage16Float) { sk_sp image(new MockDlImage()); EXPECT_CALL(*image, dimensions) @@ -238,13 +288,14 @@ TEST(ImageEncodingImpellerTest, ConvertDlImageToSkImage16Float) { bool did_call = false; ImageEncodingImpeller::ConvertDlImageToSkImage( image, - [&did_call](const sk_sp& image) { + [&did_call](const fml::StatusOr>& image) { did_call = true; - ASSERT_TRUE(image); - EXPECT_EQ(100, image->width()); - EXPECT_EQ(100, image->height()); - EXPECT_EQ(kRGBA_F16_SkColorType, image->colorType()); - EXPECT_EQ(nullptr, image->colorSpace()); + ASSERT_TRUE(image.ok()); + ASSERT_TRUE(image.value()); + EXPECT_EQ(100, image.value()->width()); + EXPECT_EQ(100, image.value()->height()); + EXPECT_EQ(kRGBA_F16_SkColorType, image.value()->colorType()); + EXPECT_EQ(nullptr, image.value()->colorSpace()); }, context); EXPECT_TRUE(did_call); @@ -264,13 +315,14 @@ TEST(ImageEncodingImpellerTest, ConvertDlImageToSkImage10XR) { bool did_call = false; ImageEncodingImpeller::ConvertDlImageToSkImage( image, - [&did_call](const sk_sp& image) { + [&did_call](const fml::StatusOr>& image) { did_call = true; - ASSERT_TRUE(image); - EXPECT_EQ(100, image->width()); - EXPECT_EQ(100, image->height()); - EXPECT_EQ(kBGR_101010x_XR_SkColorType, image->colorType()); - EXPECT_EQ(nullptr, image->colorSpace()); + ASSERT_TRUE(image.ok()); + ASSERT_TRUE(image.value()); + EXPECT_EQ(100, image.value()->width()); + EXPECT_EQ(100, image.value()->height()); + EXPECT_EQ(kBGR_101010x_XR_SkColorType, image.value()->colorType()); + EXPECT_EQ(nullptr, image.value()->colorSpace()); }, context); EXPECT_TRUE(did_call); diff --git a/shell/common/shell_test.cc b/shell/common/shell_test.cc index 1ea8c7f0b3248..f9f59f7366de8 100644 --- a/shell/common/shell_test.cc +++ b/shell/common/shell_test.cc @@ -382,5 +382,9 @@ size_t ShellTest::GetLiveTrackedPathCount( }); } +void ShellTest::TurnOffGPU(Shell* shell) { + shell->is_gpu_disabled_sync_switch_->SetSwitch(true); +} + } // namespace testing } // namespace flutter diff --git a/shell/common/shell_test.h b/shell/common/shell_test.h index 1fd588e3b8447..dfcc22223e5ac 100644 --- a/shell/common/shell_test.h +++ b/shell/common/shell_test.h @@ -135,6 +135,8 @@ class ShellTest : public FixtureTest { static size_t GetLiveTrackedPathCount( const std::shared_ptr& tracker); + static void TurnOffGPU(Shell* shell); + private: ThreadHost thread_host_; From 70c87ee057e0bbeaa18235cb09a368e34531330b Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Oct 2023 12:22:13 -0400 Subject: [PATCH 633/859] Roll Skia from 3acf82dcc479 to 77e73bb2744b (2 revisions) (#46886) https://skia.googlesource.com/skia.git/+log/3acf82dcc479..77e73bb2744b 2023-10-13 kjlubick@google.com Remove legacy GrDirectContext::MakeGL 2023-10-13 kjlubick@google.com Remove empty filegroups If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/DEPS b/DEPS index 56d04a29cb541..957c623d9712c 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '3acf82dcc47973e8b3e466fb1bca99ca444e658d', + 'skia_revision': '77e73bb2744bd2f1f2a4d00b2fa81c8b13082b9e', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 789b9a0524134..dba37c223aa84 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 244d5b4ec05eae279e56381c0e102ae8 +Signature: 6a65dcc04e4e876df43db5cc3ba07c24 ==================================================================================================== LIBRARY: etc1 @@ -8770,9 +8770,7 @@ ORIGIN: ../../../third_party/skia/include/private/chromium/GrDeferredDisplayList ORIGIN: ../../../third_party/skia/include/private/chromium/GrPromiseImageTexture.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/private/chromium/GrSurfaceCharacterization.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/private/chromium/SkImageChromium.h + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/include/private/gpu/ganesh/GrGLTypes_empty.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/private/gpu/ganesh/GrTextureGenerator.h + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/include/private/gpu/ganesh/GrVkTypes_empty.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/private/gpu/graphite/ContextOptionsPriv.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/bentleyottmann/include/BentleyOttmann1.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/bentleyottmann/include/BruteForceCrossings.h + ../../../third_party/skia/LICENSE @@ -8952,7 +8950,6 @@ ORIGIN: ../../../third_party/skia/src/image/SkSurface_Null.cpp + ../../../third_ ORIGIN: ../../../third_party/skia/src/image/SkTiledImageUtils.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/opts/SkOpts_RestoreTarget.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/opts/SkOpts_SetTarget.h + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/src/ports/SkImageGenerator_empty.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/ports/fontations/src/ffi.rs + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/ports/fontations/src/skpath_bridge.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/shaders/SkBlendShader.h + ../../../third_party/skia/LICENSE @@ -9037,9 +9034,7 @@ FILE: ../../../third_party/skia/include/private/chromium/GrDeferredDisplayListRe FILE: ../../../third_party/skia/include/private/chromium/GrPromiseImageTexture.h FILE: ../../../third_party/skia/include/private/chromium/GrSurfaceCharacterization.h FILE: ../../../third_party/skia/include/private/chromium/SkImageChromium.h -FILE: ../../../third_party/skia/include/private/gpu/ganesh/GrGLTypes_empty.h FILE: ../../../third_party/skia/include/private/gpu/ganesh/GrTextureGenerator.h -FILE: ../../../third_party/skia/include/private/gpu/ganesh/GrVkTypes_empty.h FILE: ../../../third_party/skia/include/private/gpu/graphite/ContextOptionsPriv.h FILE: ../../../third_party/skia/modules/bentleyottmann/include/BentleyOttmann1.h FILE: ../../../third_party/skia/modules/bentleyottmann/include/BruteForceCrossings.h @@ -9219,7 +9214,6 @@ FILE: ../../../third_party/skia/src/image/SkSurface_Null.cpp FILE: ../../../third_party/skia/src/image/SkTiledImageUtils.cpp FILE: ../../../third_party/skia/src/opts/SkOpts_RestoreTarget.h FILE: ../../../third_party/skia/src/opts/SkOpts_SetTarget.h -FILE: ../../../third_party/skia/src/ports/SkImageGenerator_empty.cpp FILE: ../../../third_party/skia/src/ports/fontations/src/ffi.rs FILE: ../../../third_party/skia/src/ports/fontations/src/skpath_bridge.h FILE: ../../../third_party/skia/src/shaders/SkBlendShader.h From 7b2a71ac0d99704aff37b1480799428d74c475ca Mon Sep 17 00:00:00 2001 From: Erik German Date: Fri, 13 Oct 2023 09:34:57 -0700 Subject: [PATCH 634/859] fixed AutofillHints.middleName tanslation for web. (#46429) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR fixes the AutofillHints.middleName has no effect on TextField in Web bug. Screenshot 2023-09-30 at 1 18 03 p m Closes [#135542](https://github.com/flutter/flutter/issues/135542) [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- lib/web_ui/lib/src/engine/text_editing/autofill_hint.dart | 2 +- lib/web_ui/test/engine/text_editing_test.dart | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/web_ui/lib/src/engine/text_editing/autofill_hint.dart b/lib/web_ui/lib/src/engine/text_editing/autofill_hint.dart index 7ee1cfb732431..392998111c048 100644 --- a/lib/web_ui/lib/src/engine/text_editing/autofill_hint.dart +++ b/lib/web_ui/lib/src/engine/text_editing/autofill_hint.dart @@ -33,7 +33,7 @@ class BrowserAutofillHints { 'impp': 'impp', 'jobTitle': 'organization-title', 'language': 'language', - 'middleName': 'middleName', + 'middleName': 'additional-name', 'name': 'name', 'namePrefix': 'honorific-prefix', 'nameSuffix': 'honorific-suffix', diff --git a/lib/web_ui/test/engine/text_editing_test.dart b/lib/web_ui/test/engine/text_editing_test.dart index 1c3df325cd450..a6e5f02c0a33b 100644 --- a/lib/web_ui/test/engine/text_editing_test.dart +++ b/lib/web_ui/test/engine/text_editing_test.dart @@ -2614,6 +2614,12 @@ Future testMain() async { expect(testInputElement.getAttribute('autocomplete'),'on'); expect(testInputElement.placeholder, 'enter your password'); }); + + // Regression test for https://github.com/flutter/flutter/issues/135542 + test('autofill with middleName hint', () { + expect(BrowserAutofillHints.instance.flutterToEngine('middleName'), + 'additional-name'); + }); }); group('EditingState', () { From 3535b584e675fccebff5473670ea45bf6302a4ab Mon Sep 17 00:00:00 2001 From: Derek Xu Date: Fri, 13 Oct 2023 12:47:51 -0400 Subject: [PATCH 635/859] Use --timeline_recorder=systrace instead of --systrace_timeline (#46884) `--systrace_timeline` is redundant and makes the `getFlagList` VM Service RPC not return `timeline_recorder=systrace` (https://github.com/flutter/devtools/issues/6524#issuecomment-1760090526), so we would like to deprecate and remove it. --- runtime/dart_vm.cc | 3 +-- shell/platform/fuchsia/dart_runner/dart_runner.cc | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/runtime/dart_vm.cc b/runtime/dart_vm.cc index 152a4cd6665ce..379243773c5ca 100644 --- a/runtime/dart_vm.cc +++ b/runtime/dart_vm.cc @@ -95,9 +95,8 @@ static const char* kDartEndlessTraceBufferArgs[]{ "--timeline_recorder=endless", }; -// This is the same as --timeline_recorder=systrace. static const char* kDartSystraceTraceBufferArgs[] = { - "--systrace_timeline", + "--timeline_recorder=systrace", }; static std::string DartFileRecorderArgs(const std::string& path) { diff --git a/shell/platform/fuchsia/dart_runner/dart_runner.cc b/shell/platform/fuchsia/dart_runner/dart_runner.cc index 508473e9f3982..012badf098820 100644 --- a/shell/platform/fuchsia/dart_runner/dart_runner.cc +++ b/shell/platform/fuchsia/dart_runner/dart_runner.cc @@ -41,7 +41,7 @@ namespace { const char* kDartVMArgs[] = { // clang-format off - "--systrace_timeline", + "--timeline_recorder=systrace", "--timeline_streams=Compiler,Dart,Debugger,Embedder,GC,Isolate,VM", #if defined(AOT_RUNTIME) From ec320284b990a1cc191b417fa5ed55d62ec78d5c Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Oct 2023 13:06:06 -0400 Subject: [PATCH 636/859] Roll Skia from 77e73bb2744b to 643d74cf4e0b (2 revisions) (#46888) https://skia.googlesource.com/skia.git/+log/77e73bb2744b..643d74cf4e0b 2023-10-13 michaelludwig@google.com Add un-implemented API for SkDevice::drawCoverageMask 2023-10-13 fmalita@chromium.org [skottie] Adjustable WYSIWYG cursor weight If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 957c623d9712c..18562a78c9881 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '77e73bb2744bd2f1f2a4d00b2fa81c8b13082b9e', + 'skia_revision': '643d74cf4e0b234ab1c3252d621f55563dd5d9c0', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index dba37c223aa84..6293f7b6e20c1 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 6a65dcc04e4e876df43db5cc3ba07c24 +Signature: 74b2b76ad3e895df5da8b4a9100e2737 ==================================================================================================== LIBRARY: etc1 From 0d46507429fba4ca88915c0c4d16e68ed9983ebd Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Oct 2023 13:36:24 -0400 Subject: [PATCH 637/859] Roll Dart SDK from 95e2ecee106a to c8143a7c026f (1 revision) (#46889) https://dart.googlesource.com/sdk.git/+log/95e2ecee106a..c8143a7c026f 2023-10-13 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-24.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jsimmons@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 18562a78c9881..41624b51ec5b7 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '95e2ecee106ad76bfa493168935a35fe196f4d04', + 'dart_revision': 'c8143a7c026f35f22d00daaec29db749784d3a71', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index d74194b853b29..e03a9f12e5e8f 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: c6ded288cc153ad47f6116d49f1dacb8 +Signature: b0d402307685fa5846bd96adf58df8ff ==================================================================================================== LIBRARY: dart From 98ce03c9f621807ddf33a3d40b8ff988154606bb Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Oct 2023 13:48:19 -0400 Subject: [PATCH 638/859] Roll Skia from 643d74cf4e0b to 4783e1146146 (2 revisions) (#46890) https://skia.googlesource.com/skia.git/+log/643d74cf4e0b..4783e1146146 2023-10-13 johnstiles@google.com Improve Tegra3 and Mali400 quad-edge AA output. 2023-10-13 kjlubick@google.com [bazel] Update version of rules_pkg If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 41624b51ec5b7..89fc1d4c65851 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '643d74cf4e0b234ab1c3252d621f55563dd5d9c0', + 'skia_revision': '4783e1146146a6ef0c1044607a0dc38059b2ac6a', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 6293f7b6e20c1..e07760e2ecd03 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 74b2b76ad3e895df5da8b4a9100e2737 +Signature: 7580ce2aa024fde77417b41f91b7bb09 ==================================================================================================== LIBRARY: etc1 From 88a20f129a1a80375490e80656842b1cb3869a90 Mon Sep 17 00:00:00 2001 From: Ann Marie Mossman <233583+mossmana@users.noreply.github.com> Date: Fri, 13 Oct 2023 11:23:09 -0700 Subject: [PATCH 639/859] Replace deprecated [UIScreen mainScreen] in FlutterView.mm (#46802) Addresses: https://github.com/flutter/flutter/issues/130828 --- .../darwin/ios/framework/Source/FlutterView.h | 2 ++ .../darwin/ios/framework/Source/FlutterView.mm | 2 +- .../darwin/ios/framework/Source/FlutterViewTest.mm | 13 +++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/shell/platform/darwin/ios/framework/Source/FlutterView.h b/shell/platform/darwin/ios/framework/Source/FlutterView.h index 0dd9f610b9d4c..daebc0df5314c 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterView.h +++ b/shell/platform/darwin/ios/framework/Source/FlutterView.h @@ -46,6 +46,8 @@ opaque:(BOOL)opaque enableWideGamut:(BOOL)isWideGamutEnabled NS_DESIGNATED_INITIALIZER; +- (UIScreen*)screen; + // Set by FlutterEngine or FlutterViewController to override software rendering. @property(class, nonatomic) BOOL forceSoftwareRendering; @end diff --git a/shell/platform/darwin/ios/framework/Source/FlutterView.mm b/shell/platform/darwin/ios/framework/Source/FlutterView.mm index 8da6ef72660ed..dfb25224e0e2a 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterView.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterView.mm @@ -100,7 +100,7 @@ - (void)layoutSubviews { #pragma clang diagnostic ignored "-Wunguarded-availability-new" CAMetalLayer* layer = (CAMetalLayer*)self.layer; #pragma clang diagnostic pop - CGFloat screenScale = [UIScreen mainScreen].scale; + CGFloat screenScale = self.screen.scale; layer.allowsGroupOpacity = YES; layer.contentsScale = screenScale; layer.rasterizationScale = screenScale; diff --git a/shell/platform/darwin/ios/framework/Source/FlutterViewTest.mm b/shell/platform/darwin/ios/framework/Source/FlutterViewTest.mm index 78f95210e37e6..b5a0c1002961a 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterViewTest.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterViewTest.mm @@ -69,4 +69,17 @@ - (void)testIgnoreWideColorWithoutImpeller { XCTAssertEqual(layer.pixelFormat, MTLPixelFormatBGRA8Unorm); } +- (void)testLayerScalesMatchScreenAfterLayoutSubviews { + FakeDelegate* delegate = [[[FakeDelegate alloc] init] autorelease]; + FlutterView* view = [[FlutterView alloc] initWithDelegate:delegate opaque:NO enableWideGamut:NO]; + view.layer.contentsScale = CGFloat(-99.0); + view.layer.rasterizationScale = CGFloat(-99.0); + UIScreen* screen = [view screen]; + XCTAssertNotEqual(view.layer.contentsScale, screen.scale); + XCTAssertNotEqual(view.layer.rasterizationScale, screen.scale); + [view layoutSubviews]; + XCTAssertEqual(view.layer.contentsScale, screen.scale); + XCTAssertEqual(view.layer.rasterizationScale, screen.scale); +} + @end From bf8c3c1ac097f7aa7d5a8d6e8b59b3d90631241f Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Oct 2023 14:24:49 -0400 Subject: [PATCH 640/859] Roll Skia from 4783e1146146 to e10e6765480a (1 revision) (#46893) https://skia.googlesource.com/skia.git/+log/4783e1146146..e10e6765480a 2023-10-13 johnstiles@google.com Remove obsolete experiment from skpbench. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 89fc1d4c65851..a00f45437e3f0 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '4783e1146146a6ef0c1044607a0dc38059b2ac6a', + 'skia_revision': 'e10e6765480a56057c0ebc333a5827877d13c938', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 6ed3fb1fc1b40aa49cdc4bd2b402662cb7d00484 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Fri, 13 Oct 2023 11:57:10 -0700 Subject: [PATCH 641/859] [Impeller] Only allow Impeller in flutter_tester if vulkan is enabled. (#46895) Follows up on #46389 That patch was too permissive in cases where a build system enables impeller but not vulkan. This change makes the build succeed in such systems. --- shell/testing/tester_main.cc | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/shell/testing/tester_main.cc b/shell/testing/tester_main.cc index 9c0059b612160..8d59300fc27eb 100644 --- a/shell/testing/tester_main.cc +++ b/shell/testing/tester_main.cc @@ -29,7 +29,10 @@ #include "third_party/dart/runtime/include/dart_api.h" #include "third_party/skia/include/core/SkSurface.h" -#if IMPELLER_SUPPORTS_RENDERING +// Impeller should only be enabled if the Vulkan backend is enabled. +#define ALLOW_IMPELLER (IMPELLER_SUPPORTS_RENDERING && IMPELLER_ENABLE_VULKAN) + +#if ALLOW_IMPELLER #include // nogncheck #include "flutter/vulkan/procs/vulkan_proc_table.h" // nogncheck #include "flutter/vulkan/swiftshader_path.h" // nogncheck @@ -128,7 +131,7 @@ class TesterPlatformView : public PlatformView, impeller_context_holder_(std::move(impeller_context_holder)) {} ~TesterPlatformView() { -#if IMPELLER_SUPPORTS_RENDERING +#if ALLOW_IMPELLER if (impeller_context_holder_.context) { impeller_context_holder_.context->Shutdown(); } @@ -137,17 +140,17 @@ class TesterPlatformView : public PlatformView, // |PlatformView| std::shared_ptr GetImpellerContext() const override { -#if IMPELLER_SUPPORTS_RENDERING +#if ALLOW_IMPELLER return std::static_pointer_cast( impeller_context_holder_.context); #else return nullptr; -#endif // IMPELLER_SUPPORTS_RENDERING +#endif // ALLOW_IMPELLER } // |PlatformView| std::unique_ptr CreateRenderingSurface() override { -#if IMPELLER_SUPPORTS_RENDERING +#if ALLOW_IMPELLER if (delegate_.OnPlatformViewGetSettings().enable_impeller) { FML_DCHECK(impeller_context_holder_.context); auto surface = std::make_unique( @@ -155,7 +158,7 @@ class TesterPlatformView : public PlatformView, FML_DCHECK(surface->IsValid()); return surface; } -#endif // IMPELLER_SUPPORTS_RENDERING +#endif // ALLOW_IMPELLER auto surface = std::make_unique( this, true /* render to surface */); FML_DCHECK(surface->IsValid()); @@ -308,7 +311,7 @@ int RunTester(const flutter::Settings& settings, ImpellerVulkanContextHolder impeller_context_holder; -#if IMPELLER_SUPPORTS_RENDERING +#if ALLOW_IMPELLER if (settings.enable_impeller) { impeller_context_holder.vulkan_proc_table = fml::MakeRefCounted(VULKAN_SO_PATH); @@ -356,7 +359,7 @@ int RunTester(const flutter::Settings& settings, return EXIT_FAILURE; } } -#endif // IMPELLER_SUPPORTS_RENDERING +#endif // ALLOW_IMPELLER Shell::CreateCallback on_create_platform_view = [impeller_context_holder = From 8fe857176f4f6ef607a73f4779c19539017eb413 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Oct 2023 15:06:16 -0400 Subject: [PATCH 642/859] Roll Fuchsia Linux SDK from pI1BVH08V0eG0M7sw... to wBb32R567S1alWbfn... (#46898) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jsimmons@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index a00f45437e3f0..3b24660dcefbd 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'pI1BVH08V0eG0M7sw_nlrWaJy_xogu-nzBc3yy8lUmoC' + 'version': 'wBb32R567S1alWbfncrArHzAnIFEGH2yOYibSgHozIIC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', From 6d0ec0405d281d0684f9efe586d881c088b4c117 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Oct 2023 15:12:21 -0400 Subject: [PATCH 643/859] Roll Skia from e10e6765480a to b50d7f9aa743 (1 revision) (#46899) https://skia.googlesource.com/skia.git/+log/e10e6765480a..b50d7f9aa743 2023-10-13 jvanverth@google.com [graphite] Restructure how we handle AtlasProvider uploads. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 3b24660dcefbd..0b3ad86e0f6d4 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'e10e6765480a56057c0ebc333a5827877d13c938', + 'skia_revision': 'b50d7f9aa743e84abc1edb3177d8913f71286ec6', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index e07760e2ecd03..e0635bdf59eef 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 7580ce2aa024fde77417b41f91b7bb09 +Signature: 3c5eda28fe39ef74efe5dd67bf6d469a ==================================================================================================== LIBRARY: etc1 From 31ab79bd04c6e045777c4b2df3d0e73262c40340 Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Fri, 13 Oct 2023 12:22:07 -0700 Subject: [PATCH 644/859] Oops, allow files in opted-in third_party directories. (#46897) Closes https://github.com/flutter/flutter/issues/136551. --- third_party/.gitignore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/third_party/.gitignore b/third_party/.gitignore index 45ae89eb3d05d..5bd42c1696fca 100644 --- a/third_party/.gitignore +++ b/third_party/.gitignore @@ -1,6 +1,6 @@ # Ignore everything by default, as these come from gclient/DEPS. # We'll explicitly include the folders we want to track. -* +/* # Include the .gitignore file itself and .clang-tidy. !.gitignore @@ -13,7 +13,6 @@ # Include folders that have hand-written code (not DEPS). !accessibility/ !canvaskit/ -!ninja/ !spring_animation/ !test_shaders/ !tonic/ From 40703e4c374fc81b9b69df9acd0b045347b7891f Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Fri, 13 Oct 2023 12:34:55 -0700 Subject: [PATCH 645/859] [Impeller] fix clear color optimization for large subpasses. (#46887) Fixes https://github.com/flutter/flutter/issues/136507 . The cause of this bug is that we use different sizes to compute the clear color value when constructing the render target and when skipping entities: https://github.com/flutter/engine/blob/main/impeller/entity/entity_pass.cc#L632 https://github.com/flutter/engine/blob/main/impeller/entity/entity_pass.cc#L731 and https://github.com/flutter/engine/blob/main/impeller/entity/entity_pass.cc#L900C3-L900C3 Either the former should use the root pass size or the later should use the subpass size. This usually isn't an issue because if something covers the root pass size it generally always covers the subpass size. But during the page transition, the scaled subpass ends up slightly bigger than the root pass size and so these conditions are mismatched: Subpass size: (1550, 3188) root pass size (1440, 3036) I think subpass size is correct. If the subpass is larger than the parent, then checking the parent size will give incorrect result. --- impeller/aiks/aiks_unittests.cc | 25 ++++++++++++++++++++++++- impeller/entity/entity_pass.cc | 5 +++-- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/impeller/aiks/aiks_unittests.cc b/impeller/aiks/aiks_unittests.cc index 1a50dbe3e9406..3dda081b04a74 100644 --- a/impeller/aiks/aiks_unittests.cc +++ b/impeller/aiks/aiks_unittests.cc @@ -2134,9 +2134,12 @@ TEST_P(AiksTest, CanRenderClippedLayers) { canvas.DrawRect(Rect::MakeSize(Size{400, 400}), {.color = Color::White()}); // Fill the layer with green, but do so with a color blend that can't be // collapsed into the parent pass. + // TODO(jonahwilliams): this blend mode was changed from color burn to + // hardlight to work around https://github.com/flutter/flutter/issues/136554 + // . canvas.DrawRect( Rect::MakeSize(Size{400, 400}), - {.color = Color::Green(), .blend_mode = BlendMode::kColorBurn}); + {.color = Color::Green(), .blend_mode = BlendMode::kHardLight}); } ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); @@ -3664,5 +3667,25 @@ TEST_P(AiksTest, ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); } +// This should be solid red, if you see a little red box this is broken. +TEST_P(AiksTest, ClearColorOptimizationWhenSubpassIsBiggerThanParentPass) { + SetWindowSize({400, 400}); + Canvas canvas; + canvas.Scale(GetContentScale()); + canvas.DrawRect(Rect::MakeLTRB(200, 200, 300, 300), {.color = Color::Red()}); + canvas.SaveLayer({ + .image_filter = std::make_shared( + Matrix::MakeScale({2, 2, 1}), SamplerDescriptor{}), + }); + // Draw a rectangle that would fully cover the parent pass size, but not + // the subpass that it is rendered in. + canvas.DrawRect(Rect::MakeLTRB(0, 0, 400, 400), {.color = Color::Green()}); + // Draw a bigger rectangle to force the subpass to be bigger. + canvas.DrawRect(Rect::MakeLTRB(0, 0, 800, 800), {.color = Color::Red()}); + canvas.Restore(); + + ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); +} + } // namespace testing } // namespace impeller diff --git a/impeller/entity/entity_pass.cc b/impeller/entity/entity_pass.cc index bb065b959e146..11219ad4937d5 100644 --- a/impeller/entity/entity_pass.cc +++ b/impeller/entity/entity_pass.cc @@ -726,9 +726,10 @@ bool EntityPass::OnRender( VALIDATION_LOG << SPrintF("Pass context invalid (Depth=%d)", pass_depth); return false; } + auto clear_color_size = pass_target.GetRenderTarget().GetRenderTargetSize(); if (!collapsed_parent_pass && - !GetClearColor(root_pass_size).IsTransparent()) { + !GetClearColor(clear_color_size).IsTransparent()) { // Force the pass context to create at least one new pass if the clear color // is present. pass_context.GetRenderPass(pass_depth); @@ -897,7 +898,7 @@ bool EntityPass::OnRender( // Skip elements that are incorporated into the clear color. if (is_collapsing_clear_colors) { auto [entity_color, _] = - ElementAsBackgroundColor(element, root_pass_size); + ElementAsBackgroundColor(element, clear_color_size); if (entity_color.has_value()) { continue; } From 60c5cd36e0bce071fc7ae9c277fc07e3c4d0c0d2 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Oct 2023 15:59:46 -0400 Subject: [PATCH 646/859] Roll Skia from b50d7f9aa743 to 8dc8e21a4dec (4 revisions) (#46902) https://skia.googlesource.com/skia.git/+log/b50d7f9aa743..8dc8e21a4dec 2023-10-13 skia-autoroll@skia-public.iam.gserviceaccount.com Roll skottie-base from bbf6a30f67f4 to 444eb9b78e14 2023-10-13 johnstiles@google.com Prefer precision over performance in Raster Pipeline. 2023-10-13 jvanverth@google.com [graphite] Enable RasterPathAtlas for single-sampled draws. 2023-10-13 johnstiles@google.com Enable Graphite in Canvaskit when WebGPU is enabled. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 0b3ad86e0f6d4..64393862be877 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'b50d7f9aa743e84abc1edb3177d8913f71286ec6', + 'skia_revision': '8dc8e21a4dec559d26d3d71b80fc3ef82defcd5f', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index e0635bdf59eef..68ccf9046a269 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 3c5eda28fe39ef74efe5dd67bf6d469a +Signature: 8120bfbac4bf0b1bb19c750a9e354f75 ==================================================================================================== LIBRARY: etc1 From 840d68c69a6034fa04cf3fd1c7829451da3c1792 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Oct 2023 16:05:04 -0400 Subject: [PATCH 647/859] Roll Fuchsia Mac SDK from SDPa6SfaKvRRSUCij... to 4DwpR2CMJECZJ8EKz... (#46903) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jsimmons@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 64393862be877..a6cdb7cd40bf9 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'SDPa6SfaKvRRSUCijZOk027aaPGCaoH0K8AEG_E3WH8C' + 'version': '4DwpR2CMJECZJ8EKz4P5Z3wTZAZar15pdTc-0PqtE3AC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 24eca3fec0aa14699e2818c09f2412f805aba85e Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Oct 2023 16:45:06 -0400 Subject: [PATCH 648/859] Roll Skia from 8dc8e21a4dec to c9601553b0f3 (3 revisions) (#46907) https://skia.googlesource.com/skia.git/+log/8dc8e21a4dec..c9601553b0f3 2023-10-13 armansito@google.com Add Graphite_Dawn_Vello jobs 2023-10-13 kjlubick@google.com [ClangTidy] Avoid copy by using a reference in GrModulateAtlasCoverageEffect 2023-10-13 kjlubick@google.com Remove GL dependency from GrBackendSemaphore If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index a6cdb7cd40bf9..0a1b4f89da130 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '8dc8e21a4dec559d26d3d71b80fc3ef82defcd5f', + 'skia_revision': 'c9601553b0f3ab5dd8d927a9bb4d1733658dc330', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 68ccf9046a269..3f7d7ac7e47f8 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 8120bfbac4bf0b1bb19c750a9e354f75 +Signature: 28f383fcaaeed0b622866e66961b4fcd ==================================================================================================== LIBRARY: etc1 @@ -387,6 +387,7 @@ FILE: ../../../third_party/skia/modules/pathkit/perf/perfReporter.js FILE: ../../../third_party/skia/modules/skparagraph/test.html FILE: ../../../third_party/skia/package-lock.json FILE: ../../../third_party/skia/relnotes/base64.md +FILE: ../../../third_party/skia/relnotes/glbackendsemaphore.md FILE: ../../../third_party/skia/relnotes/grsurface-info.md FILE: ../../../third_party/skia/relnotes/mesh.md FILE: ../../../third_party/skia/relnotes/readbuffer-deserial.md @@ -8855,6 +8856,7 @@ ORIGIN: ../../../third_party/skia/src/gpu/PipelineUtils.h + ../../../third_party ORIGIN: ../../../third_party/skia/src/gpu/TiledTextureUtils.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/TiledTextureUtils.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/dawn/DawnUtilsPriv.h + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/gpu/ganesh/GrBackendSemaphorePriv.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/GrBackendSurfacePriv.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/GrCanvas.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/GrCanvas.h + ../../../third_party/skia/LICENSE @@ -9119,6 +9121,7 @@ FILE: ../../../third_party/skia/src/gpu/PipelineUtils.h FILE: ../../../third_party/skia/src/gpu/TiledTextureUtils.cpp FILE: ../../../third_party/skia/src/gpu/TiledTextureUtils.h FILE: ../../../third_party/skia/src/gpu/dawn/DawnUtilsPriv.h +FILE: ../../../third_party/skia/src/gpu/ganesh/GrBackendSemaphorePriv.h FILE: ../../../third_party/skia/src/gpu/ganesh/GrBackendSurfacePriv.h FILE: ../../../third_party/skia/src/gpu/ganesh/GrCanvas.cpp FILE: ../../../third_party/skia/src/gpu/ganesh/GrCanvas.h From 7485e4fad026b66fb7b04362f4a644d51a241537 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Oct 2023 17:32:07 -0400 Subject: [PATCH 649/859] Roll Skia from c9601553b0f3 to 4bc4b4d22866 (1 revision) (#46908) https://skia.googlesource.com/skia.git/+log/c9601553b0f3..4bc4b4d22866 2023-10-13 kjlubick@google.com Revert "Remove GL dependency from GrBackendSemaphore" If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/DEPS b/DEPS index 0a1b4f89da130..ba89aa6211db7 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'c9601553b0f3ab5dd8d927a9bb4d1733658dc330', + 'skia_revision': '4bc4b4d22866616bd8828cb3a710c68b5a9ade3c', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 3f7d7ac7e47f8..7a54c07e3d897 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 28f383fcaaeed0b622866e66961b4fcd +Signature: dd77b9ddc2162fc585c3fdb6ebb810f8 ==================================================================================================== LIBRARY: etc1 @@ -387,7 +387,6 @@ FILE: ../../../third_party/skia/modules/pathkit/perf/perfReporter.js FILE: ../../../third_party/skia/modules/skparagraph/test.html FILE: ../../../third_party/skia/package-lock.json FILE: ../../../third_party/skia/relnotes/base64.md -FILE: ../../../third_party/skia/relnotes/glbackendsemaphore.md FILE: ../../../third_party/skia/relnotes/grsurface-info.md FILE: ../../../third_party/skia/relnotes/mesh.md FILE: ../../../third_party/skia/relnotes/readbuffer-deserial.md @@ -8856,7 +8855,6 @@ ORIGIN: ../../../third_party/skia/src/gpu/PipelineUtils.h + ../../../third_party ORIGIN: ../../../third_party/skia/src/gpu/TiledTextureUtils.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/TiledTextureUtils.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/dawn/DawnUtilsPriv.h + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/src/gpu/ganesh/GrBackendSemaphorePriv.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/GrBackendSurfacePriv.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/GrCanvas.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/GrCanvas.h + ../../../third_party/skia/LICENSE @@ -9121,7 +9119,6 @@ FILE: ../../../third_party/skia/src/gpu/PipelineUtils.h FILE: ../../../third_party/skia/src/gpu/TiledTextureUtils.cpp FILE: ../../../third_party/skia/src/gpu/TiledTextureUtils.h FILE: ../../../third_party/skia/src/gpu/dawn/DawnUtilsPriv.h -FILE: ../../../third_party/skia/src/gpu/ganesh/GrBackendSemaphorePriv.h FILE: ../../../third_party/skia/src/gpu/ganesh/GrBackendSurfacePriv.h FILE: ../../../third_party/skia/src/gpu/ganesh/GrCanvas.cpp FILE: ../../../third_party/skia/src/gpu/ganesh/GrCanvas.h From 8d07dfc7d3d956b84149915929465590605dbab3 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Oct 2023 17:36:36 -0400 Subject: [PATCH 650/859] Manual roll Dart SDK from c8143a7c026f to 5844b34768ce (1 revision) (#46909) Manual roll requested by jacksongardner@google.com https://dart.googlesource.com/sdk.git/+log/c8143a7c026f..5844b34768ce 2023-10-13 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-25.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jacksongardner@google.com,jsimmons@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- .ci.yaml | 2 +- DEPS | 2 +- ci/builders/linux_web_engine.json | 50 +++++++++++------------ ci/licenses_golden/licenses_dart | 2 +- lib/web_ui/dev/browser_lock.yaml | 2 +- lib/web_ui/dev/generate_builder_json.dart | 2 +- 6 files changed, 30 insertions(+), 30 deletions(-) diff --git a/.ci.yaml b/.ci.yaml index e5ee03b4374a8..1f7129b80bd3a 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -360,7 +360,7 @@ targets: {"download_emsdk": true} dependencies: >- [ - {"dependency": "chrome_and_driver", "version": "version:118.0.5993.70"}, + {"dependency": "chrome_and_driver", "version": "version:119.0.6045.9"}, {"dependency": "curl", "version": "version:7.64.0"} ] framework: "true" diff --git a/DEPS b/DEPS index ba89aa6211db7..e65dee6f81aee 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': 'c8143a7c026f35f22d00daaec29db749784d3a71', + 'dart_revision': '5844b34768cedb60c41dab6fa2245fc0b7de025a', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/builders/linux_web_engine.json b/ci/builders/linux_web_engine.json index d9cd85f3836fc..b8e3a2561201d 100644 --- a/ci/builders/linux_web_engine.json +++ b/ci/builders/linux_web_engine.json @@ -355,7 +355,7 @@ }, { "dependency": "chrome_and_driver", - "version": "118.0.5993.70" + "version": "119.0.6045.9" } ], "tasks": [ @@ -391,7 +391,7 @@ }, { "dependency": "chrome_and_driver", - "version": "118.0.5993.70" + "version": "119.0.6045.9" } ], "tasks": [ @@ -427,7 +427,7 @@ }, { "dependency": "chrome_and_driver", - "version": "118.0.5993.70" + "version": "119.0.6045.9" } ], "tasks": [ @@ -463,7 +463,7 @@ }, { "dependency": "chrome_and_driver", - "version": "118.0.5993.70" + "version": "119.0.6045.9" } ], "tasks": [ @@ -499,7 +499,7 @@ }, { "dependency": "chrome_and_driver", - "version": "118.0.5993.70" + "version": "119.0.6045.9" } ], "tasks": [ @@ -535,7 +535,7 @@ }, { "dependency": "chrome_and_driver", - "version": "118.0.5993.70" + "version": "119.0.6045.9" } ], "tasks": [ @@ -571,7 +571,7 @@ }, { "dependency": "chrome_and_driver", - "version": "118.0.5993.70" + "version": "119.0.6045.9" } ], "tasks": [ @@ -607,7 +607,7 @@ }, { "dependency": "chrome_and_driver", - "version": "118.0.5993.70" + "version": "119.0.6045.9" } ], "tasks": [ @@ -823,7 +823,7 @@ }, { "dependency": "chrome_and_driver", - "version": "118.0.5993.70" + "version": "119.0.6045.9" } ], "tasks": [ @@ -859,7 +859,7 @@ }, { "dependency": "chrome_and_driver", - "version": "118.0.5993.70" + "version": "119.0.6045.9" } ], "tasks": [ @@ -895,7 +895,7 @@ }, { "dependency": "chrome_and_driver", - "version": "118.0.5993.70" + "version": "119.0.6045.9" } ], "tasks": [ @@ -931,7 +931,7 @@ }, { "dependency": "chrome_and_driver", - "version": "118.0.5993.70" + "version": "119.0.6045.9" } ], "tasks": [ @@ -967,7 +967,7 @@ }, { "dependency": "chrome_and_driver", - "version": "118.0.5993.70" + "version": "119.0.6045.9" } ], "tasks": [ @@ -1003,7 +1003,7 @@ }, { "dependency": "chrome_and_driver", - "version": "118.0.5993.70" + "version": "119.0.6045.9" } ], "tasks": [ @@ -1039,7 +1039,7 @@ }, { "dependency": "chrome_and_driver", - "version": "118.0.5993.70" + "version": "119.0.6045.9" } ], "tasks": [ @@ -1075,7 +1075,7 @@ }, { "dependency": "chrome_and_driver", - "version": "118.0.5993.70" + "version": "119.0.6045.9" } ], "tasks": [ @@ -1271,7 +1271,7 @@ }, { "dependency": "chrome_and_driver", - "version": "118.0.5993.70" + "version": "119.0.6045.9" } ], "tasks": [ @@ -1307,7 +1307,7 @@ }, { "dependency": "chrome_and_driver", - "version": "118.0.5993.70" + "version": "119.0.6045.9" } ], "tasks": [ @@ -1343,7 +1343,7 @@ }, { "dependency": "chrome_and_driver", - "version": "118.0.5993.70" + "version": "119.0.6045.9" } ], "tasks": [ @@ -1379,7 +1379,7 @@ }, { "dependency": "chrome_and_driver", - "version": "118.0.5993.70" + "version": "119.0.6045.9" } ], "tasks": [ @@ -1415,7 +1415,7 @@ }, { "dependency": "chrome_and_driver", - "version": "118.0.5993.70" + "version": "119.0.6045.9" } ], "tasks": [ @@ -1451,7 +1451,7 @@ }, { "dependency": "chrome_and_driver", - "version": "118.0.5993.70" + "version": "119.0.6045.9" } ], "tasks": [ @@ -1487,7 +1487,7 @@ }, { "dependency": "chrome_and_driver", - "version": "118.0.5993.70" + "version": "119.0.6045.9" } ], "tasks": [ @@ -1523,7 +1523,7 @@ }, { "dependency": "chrome_and_driver", - "version": "118.0.5993.70" + "version": "119.0.6045.9" } ], "tasks": [ @@ -1539,4 +1539,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index e03a9f12e5e8f..2d8def7909a79 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: b0d402307685fa5846bd96adf58df8ff +Signature: ba3a77fe00f36e741f01a426eac1fa32 ==================================================================================================== LIBRARY: dart diff --git a/lib/web_ui/dev/browser_lock.yaml b/lib/web_ui/dev/browser_lock.yaml index 7a82c46c9b855..29b8709255e76 100644 --- a/lib/web_ui/dev/browser_lock.yaml +++ b/lib/web_ui/dev/browser_lock.yaml @@ -1,7 +1,7 @@ # Please refer to the "Upgrade Browser Version" section in the README.md for # more details on how to update browser version numbers. chrome: - version: '118.0.5993.70' + version: '119.0.6045.9' firefox: version: '106.0' diff --git a/lib/web_ui/dev/generate_builder_json.dart b/lib/web_ui/dev/generate_builder_json.dart index 6bbf9e94fe83e..c4443063a6b36 100644 --- a/lib/web_ui/dev/generate_builder_json.dart +++ b/lib/web_ui/dev/generate_builder_json.dart @@ -154,7 +154,7 @@ Iterable _getTestStepsForPlatform( if (suite.runConfig.browser == BrowserName.chrome) { 'dependency': 'chrome_and_driver', - 'version': '118.0.5993.70', + 'version': '119.0.6045.9', }, if (suite.runConfig.browser == BrowserName.firefox) { From a050c763459a8ec0761d57529a05d041ef360522 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Fri, 13 Oct 2023 15:05:00 -0700 Subject: [PATCH 651/859] [Impeller] Add GPU frame time to Vulkan backend using timestamp queries. (#46796) For https://github.com/flutter/flutter/pull/136408 , Approximate the GPU frame time by measuring the difference between a timestamp query recorded at the beginning of the frame and a timestamp query recorded at the end of the frame. --- ci/licenses_golden/licenses_flutter | 4 + impeller/renderer/backend/vulkan/BUILD.gn | 2 + .../backend/vulkan/command_buffer_vk.cc | 3 + .../renderer/backend/vulkan/context_vk.cc | 9 ++ impeller/renderer/backend/vulkan/context_vk.h | 7 + .../renderer/backend/vulkan/gpu_tracer_vk.cc | 134 ++++++++++++++++++ .../renderer/backend/vulkan/gpu_tracer_vk.h | 40 ++++++ .../backend/vulkan/swapchain_impl_vk.cc | 9 ++ 8 files changed, 208 insertions(+) create mode 100644 impeller/renderer/backend/vulkan/gpu_tracer_vk.cc create mode 100644 impeller/renderer/backend/vulkan/gpu_tracer_vk.h diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index f0b6a709eb8f0..ba40fab5d7b1d 100644 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -2185,6 +2185,8 @@ ORIGIN: ../../../flutter/impeller/renderer/backend/vulkan/fence_waiter_vk.cc + . ORIGIN: ../../../flutter/impeller/renderer/backend/vulkan/fence_waiter_vk.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/renderer/backend/vulkan/formats_vk.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/renderer/backend/vulkan/formats_vk.h + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/renderer/backend/vulkan/gpu_tracer_vk.cc + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/renderer/backend/vulkan/gpu_tracer_vk.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/renderer/backend/vulkan/pass_bindings_cache.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/renderer/backend/vulkan/pass_bindings_cache.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/renderer/backend/vulkan/pipeline_cache_vk.cc + ../../../flutter/LICENSE @@ -4947,6 +4949,8 @@ FILE: ../../../flutter/impeller/renderer/backend/vulkan/fence_waiter_vk.cc FILE: ../../../flutter/impeller/renderer/backend/vulkan/fence_waiter_vk.h FILE: ../../../flutter/impeller/renderer/backend/vulkan/formats_vk.cc FILE: ../../../flutter/impeller/renderer/backend/vulkan/formats_vk.h +FILE: ../../../flutter/impeller/renderer/backend/vulkan/gpu_tracer_vk.cc +FILE: ../../../flutter/impeller/renderer/backend/vulkan/gpu_tracer_vk.h FILE: ../../../flutter/impeller/renderer/backend/vulkan/limits_vk.h FILE: ../../../flutter/impeller/renderer/backend/vulkan/pass_bindings_cache.cc FILE: ../../../flutter/impeller/renderer/backend/vulkan/pass_bindings_cache.h diff --git a/impeller/renderer/backend/vulkan/BUILD.gn b/impeller/renderer/backend/vulkan/BUILD.gn index 6b49311ed35a2..0a7702f36a566 100644 --- a/impeller/renderer/backend/vulkan/BUILD.gn +++ b/impeller/renderer/backend/vulkan/BUILD.gn @@ -61,6 +61,8 @@ impeller_component("vulkan") { "fence_waiter_vk.h", "formats_vk.cc", "formats_vk.h", + "gpu_tracer_vk.cc", + "gpu_tracer_vk.h", "limits_vk.h", "pass_bindings_cache.cc", "pass_bindings_cache.h", diff --git a/impeller/renderer/backend/vulkan/command_buffer_vk.cc b/impeller/renderer/backend/vulkan/command_buffer_vk.cc index 0059fe41b26f2..78eb547847082 100644 --- a/impeller/renderer/backend/vulkan/command_buffer_vk.cc +++ b/impeller/renderer/backend/vulkan/command_buffer_vk.cc @@ -52,6 +52,9 @@ const std::shared_ptr& CommandBufferVK::GetEncoder() { } bool CommandBufferVK::OnSubmitCommands(CompletionCallback callback) { + if (!encoder_) { + encoder_ = encoder_factory_->Create(); + } if (!callback) { return encoder_->Submit(); } diff --git a/impeller/renderer/backend/vulkan/context_vk.cc b/impeller/renderer/backend/vulkan/context_vk.cc index 5a8b0e98c85b2..028b92ffb1be4 100644 --- a/impeller/renderer/backend/vulkan/context_vk.cc +++ b/impeller/renderer/backend/vulkan/context_vk.cc @@ -26,6 +26,7 @@ #include "impeller/renderer/backend/vulkan/command_pool_vk.h" #include "impeller/renderer/backend/vulkan/debug_report_vk.h" #include "impeller/renderer/backend/vulkan/fence_waiter_vk.h" +#include "impeller/renderer/backend/vulkan/gpu_tracer_vk.h" #include "impeller/renderer/backend/vulkan/resource_manager_vk.h" #include "impeller/renderer/backend/vulkan/surface_context_vk.h" #include "impeller/renderer/capabilities.h" @@ -430,6 +431,10 @@ void ContextVK::Setup(Settings settings) { device_name_ = std::string(physical_device_properties.deviceName); is_valid_ = true; + // Create the GPU Tracer later because it depends on state from + // the ContextVK. + gpu_tracer_ = std::make_shared(weak_from_this()); + //---------------------------------------------------------------------------- /// Label all the relevant objects. This happens after setup so that the /// debug messengers have had a chance to be set up. @@ -532,4 +537,8 @@ ContextVK::CreateGraphicsCommandEncoderFactory() const { return std::make_unique(weak_from_this()); } +std::shared_ptr ContextVK::GetGPUTracer() const { + return gpu_tracer_; +} + } // namespace impeller diff --git a/impeller/renderer/backend/vulkan/context_vk.h b/impeller/renderer/backend/vulkan/context_vk.h index 144de15b26913..0febc8b03da15 100644 --- a/impeller/renderer/backend/vulkan/context_vk.h +++ b/impeller/renderer/backend/vulkan/context_vk.h @@ -32,6 +32,7 @@ class DebugReportVK; class FenceWaiterVK; class ResourceManagerVK; class SurfaceContextVK; +class GPUTracerVK; class ContextVK final : public Context, public BackendCast, @@ -144,6 +145,10 @@ class ContextVK final : public Context, std::shared_ptr GetCommandPoolRecycler() const; + std::shared_ptr GetGPUTracer() const; + + void RecordFrameEndTime() const; + private: struct DeviceHolderImpl : public DeviceHolder { // |DeviceHolder| @@ -171,6 +176,8 @@ class ContextVK final : public Context, std::shared_ptr command_pool_recycler_; std::string device_name_; std::shared_ptr raster_message_loop_; + std::shared_ptr gpu_tracer_; + bool sync_presentation_ = false; const uint64_t hash_; diff --git a/impeller/renderer/backend/vulkan/gpu_tracer_vk.cc b/impeller/renderer/backend/vulkan/gpu_tracer_vk.cc new file mode 100644 index 0000000000000..41614ab708f54 --- /dev/null +++ b/impeller/renderer/backend/vulkan/gpu_tracer_vk.cc @@ -0,0 +1,134 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "impeller/renderer/backend/vulkan/gpu_tracer_vk.h" + +#include +#include "fml/trace_event.h" +#include "impeller/base/validation.h" +#include "impeller/renderer/backend/vulkan/command_buffer_vk.h" +#include "impeller/renderer/backend/vulkan/command_encoder_vk.h" +#include "impeller/renderer/backend/vulkan/context_vk.h" +#include "impeller/renderer/command_buffer.h" + +namespace impeller { + +static constexpr uint32_t kPoolSize = 128u; + +GPUTracerVK::GPUTracerVK(const std::weak_ptr& context) + : context_(context) { + auto strong_context = context_.lock(); + if (!strong_context) { + return; + } + timestamp_period_ = strong_context->GetPhysicalDevice() + .getProperties() + .limits.timestampPeriod; + if (timestamp_period_ <= 0) { + // The device does not support timestamp queries. + return; + } + vk::QueryPoolCreateInfo info; + info.queryCount = kPoolSize; + info.queryType = vk::QueryType::eTimestamp; + + auto [status, pool] = strong_context->GetDevice().createQueryPoolUnique(info); + if (status != vk::Result::eSuccess) { + VALIDATION_LOG << "Failed to create query pool."; + return; + } + query_pool_ = std::move(pool); + // Disable tracing in release mode. +#ifdef IMPELLER_DEBUG + valid_ = true; +#endif +} + +void GPUTracerVK::RecordStartFrameTime() { + if (!valid_) { + return; + } + auto strong_context = context_.lock(); + if (!strong_context) { + return; + } + auto buffer = strong_context->CreateCommandBuffer(); + auto vk_trace_cmd_buffer = + CommandBufferVK::Cast(*buffer).GetEncoder()->GetCommandBuffer(); + // The two commands below are executed in order, such that writeTimeStamp is + // guaranteed to occur after resetQueryPool has finished. The validation + // layer seem particularly strict, and efforts to reset the entire pool + // were met with validation errors (though seemingly correct measurements). + // To work around this, the tracer only resets the query that will be + // used next. + vk_trace_cmd_buffer.resetQueryPool(query_pool_.get(), current_index_, 1); + vk_trace_cmd_buffer.writeTimestamp(vk::PipelineStageFlagBits::eBottomOfPipe, + query_pool_.get(), current_index_); + + if (!buffer->SubmitCommands()) { + VALIDATION_LOG << "GPUTracerVK: Failed to record start time."; + } + + // The logic in RecordEndFrameTime requires us to have recorded a pair of + // tracing events. If this method failed for any reason we need to be sure we + // don't attempt to record and read back a second value, or we will get values + // that span multiple frames. + started_frame_ = true; +} + +void GPUTracerVK::RecordEndFrameTime() { + if (!valid_ || !started_frame_) { + return; + } + auto strong_context = context_.lock(); + if (!strong_context) { + return; + } + + started_frame_ = false; + auto last_query = current_index_; + current_index_ += 1; + + auto buffer = strong_context->CreateCommandBuffer(); + auto vk_trace_cmd_buffer = + CommandBufferVK::Cast(*buffer).GetEncoder()->GetCommandBuffer(); + vk_trace_cmd_buffer.resetQueryPool(query_pool_.get(), current_index_, 1); + vk_trace_cmd_buffer.writeTimestamp(vk::PipelineStageFlagBits::eBottomOfPipe, + query_pool_.get(), current_index_); + + // On completion of the second time stamp recording, we read back this value + // and the previous value. The difference is approximately the frame time. + const auto device_holder = strong_context->GetDeviceHolder(); + if (!buffer->SubmitCommands([&, last_query, + device_holder](CommandBuffer::Status status) { + auto strong_context = context_.lock(); + if (!strong_context) { + return; + } + uint64_t bits[2] = {0, 0}; + auto result = device_holder->GetDevice().getQueryPoolResults( + query_pool_.get(), last_query, 2, sizeof(bits), &bits, + sizeof(int64_t), vk::QueryResultFlagBits::e64); + + if (result == vk::Result::eSuccess) { + // This value should probably be available in some form besides a + // timeline event but that is a job for a future Jonah. + auto gpu_ms = (((bits[1] - bits[0]) * timestamp_period_) / 1000000); + FML_TRACE_COUNTER( + "flutter", "GPUTracer", + reinterpret_cast(this), // Trace Counter ID + "FrameTimeMS", gpu_ms); + } + })) { + if (!buffer->SubmitCommands()) { + VALIDATION_LOG << "GPUTracerVK failed to record frame end time."; + } + } + + if (current_index_ == kPoolSize - 1) { + current_index_ = 0u; + } +} + +} // namespace impeller diff --git a/impeller/renderer/backend/vulkan/gpu_tracer_vk.h b/impeller/renderer/backend/vulkan/gpu_tracer_vk.h new file mode 100644 index 0000000000000..8913bf3ffdb08 --- /dev/null +++ b/impeller/renderer/backend/vulkan/gpu_tracer_vk.h @@ -0,0 +1,40 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include + +#include "impeller/renderer/backend/vulkan/context_vk.h" + +namespace impeller { + +/// @brief A class that uses timestamp queries to record the approximate GPU +/// execution time. +class GPUTracerVK { + public: + explicit GPUTracerVK(const std::weak_ptr& context); + + ~GPUTracerVK() = default; + + /// @brief Record the approximate start time of the GPU workload for the + /// current frame. + void RecordStartFrameTime(); + + /// @brief Record the approximate end time of the GPU workload for the current + /// frame. + void RecordEndFrameTime(); + + private: + void ResetQueryPool(size_t pool); + + const std::weak_ptr context_; + vk::UniqueQueryPool query_pool_ = {}; + + size_t current_index_ = 0u; + // The number of nanoseconds for each timestamp unit. + float timestamp_period_ = 1; + bool started_frame_ = false; + bool valid_ = false; +}; + +} // namespace impeller diff --git a/impeller/renderer/backend/vulkan/swapchain_impl_vk.cc b/impeller/renderer/backend/vulkan/swapchain_impl_vk.cc index dcd5d1c50b593..351ac2a1c9352 100644 --- a/impeller/renderer/backend/vulkan/swapchain_impl_vk.cc +++ b/impeller/renderer/backend/vulkan/swapchain_impl_vk.cc @@ -4,12 +4,15 @@ #include "impeller/renderer/backend/vulkan/swapchain_impl_vk.h" +#include "impeller/base/validation.h" #include "impeller/renderer/backend/vulkan/command_buffer_vk.h" #include "impeller/renderer/backend/vulkan/command_encoder_vk.h" #include "impeller/renderer/backend/vulkan/context_vk.h" #include "impeller/renderer/backend/vulkan/formats_vk.h" +#include "impeller/renderer/backend/vulkan/gpu_tracer_vk.h" #include "impeller/renderer/backend/vulkan/surface_vk.h" #include "impeller/renderer/backend/vulkan/swapchain_image_vk.h" +#include "impeller/renderer/context.h" #include "vulkan/vulkan_structs.hpp" namespace impeller { @@ -376,6 +379,9 @@ SwapchainImplVK::AcquireResult SwapchainImplVK::AcquireNextDrawable() { nullptr // fence ); + /// Record the approximate start of the GPU workload. + context.GetGPUTracer()->RecordStartFrameTime(); + switch (acq_result) { case vk::Result::eSuccess: // Keep going. @@ -451,6 +457,9 @@ bool SwapchainImplVK::Present(const std::shared_ptr& image, } } + /// Record the approximate end of the GPU workload. + context.GetGPUTracer()->RecordEndFrameTime(); + //---------------------------------------------------------------------------- /// Signal that the presentation semaphore is ready. /// From 771da1bc56cece00ef124d2d0acb56adf07e8818 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Oct 2023 18:17:48 -0400 Subject: [PATCH 652/859] Roll Skia from 4bc4b4d22866 to 9affbebb459a (2 revisions) (#46913) https://skia.googlesource.com/skia.git/+log/4bc4b4d22866..9affbebb459a 2023-10-13 johnstiles@google.com Fix outdated calls inside SkPathOpsDebug code. 2023-10-13 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from e96a768f1028 to e9f80c535365 (5 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index e65dee6f81aee..d54a6bb731413 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '4bc4b4d22866616bd8828cb3a710c68b5a9ade3c', + 'skia_revision': '9affbebb459a6a24b4ffe82acff1a4be7b39e6c3', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 7a54c07e3d897..3d95288a56dd4 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: dd77b9ddc2162fc585c3fdb6ebb810f8 +Signature: 19f0c3de0936245a74719e8a1662e28e ==================================================================================================== LIBRARY: etc1 From b3324d363fd65580d74ca4c10923f2965a402b97 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Oct 2023 21:33:00 -0400 Subject: [PATCH 653/859] Roll Dart SDK from 5844b34768ce to 02e6d943f1a7 (1 revision) (#46917) https://dart.googlesource.com/sdk.git/+log/5844b34768ce..02e6d943f1a7 2023-10-14 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-26.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jsimmons@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index d54a6bb731413..cf384a7062a3c 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '5844b34768cedb60c41dab6fa2245fc0b7de025a', + 'dart_revision': '02e6d943f1a7fa3d42dd7553b702b2104b4a0bd5', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index 2d8def7909a79..ced2b69df736f 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: ba3a77fe00f36e741f01a426eac1fa32 +Signature: 7a99980716e15818b4a24f2d30b3c9fa ==================================================================================================== LIBRARY: dart From a9e4ac833d9bbcd9f694227aa3eb5650dc29556a Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Oct 2023 23:46:05 -0400 Subject: [PATCH 654/859] Roll Skia from 9affbebb459a to 1c6e0141be7b (2 revisions) (#46918) https://skia.googlesource.com/skia.git/+log/9affbebb459a..1c6e0141be7b 2023-10-14 michaelludwig@google.com [graphite] Add Transform::Translate factory 2023-10-14 michaelludwig@google.com Add SkModifyPaintAndDstForDrawImageRect helper function If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index cf384a7062a3c..b14b843d7f57f 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '9affbebb459a6a24b4ffe82acff1a4be7b39e6c3', + 'skia_revision': '1c6e0141be7bd2eda3ad961a9202710c65d9bc33', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 3d95288a56dd4..cf955c77c50b9 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 19f0c3de0936245a74719e8a1662e28e +Signature: 6d4c2be7db1859080bc7848573413609 ==================================================================================================== LIBRARY: etc1 From a99a1327db9b5bba918c0f00eb9d1f7275419d93 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 14 Oct 2023 03:56:39 -0400 Subject: [PATCH 655/859] Roll Fuchsia Linux SDK from wBb32R567S1alWbfn... to ATLkmtMOIbHDqp6a_... (#46921) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jsimmons@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index b14b843d7f57f..4744e75a891ac 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'wBb32R567S1alWbfncrArHzAnIFEGH2yOYibSgHozIIC' + 'version': 'ATLkmtMOIbHDqp6a_9ub6uycvrHbSeJfzRdHNgm7cu4C' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index cc44ca09d32f7..62fb50ec90090 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: 75d75cea3011d48979d2322dd1375c87 +Signature: 4a1213d565c9c060d2ee3735f442447b ==================================================================================================== LIBRARY: fuchsia_sdk From 3b0a4f1ee362c6f6d46264867b90974a5265ecf9 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 14 Oct 2023 04:39:11 -0400 Subject: [PATCH 656/859] Roll Fuchsia Mac SDK from 4DwpR2CMJECZJ8EKz... to 6fWBgb3bC9xULwq_k... (#46922) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jsimmons@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 4744e75a891ac..2691d7e7ea4c1 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': '4DwpR2CMJECZJ8EKz4P5Z3wTZAZar15pdTc-0PqtE3AC' + 'version': '6fWBgb3bC9xULwq_k6Zvbj_sRkS7gXtRcgHKsSOBJR0C' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From d43dcc455c05742147f7085b4aeae449847306bd Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 14 Oct 2023 06:10:18 -0400 Subject: [PATCH 657/859] Roll Skia from 1c6e0141be7b to 5bc5b4fdbe54 (1 revision) (#46923) https://skia.googlesource.com/skia.git/+log/1c6e0141be7b..5bc5b4fdbe54 2023-10-14 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from e9f80c535365 to 19b749ea8bde (9 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 2691d7e7ea4c1..09bb884748920 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '1c6e0141be7bd2eda3ad961a9202710c65d9bc33', + 'skia_revision': '5bc5b4fdbe54f75bf95a4f9efa86dbf4701ee50e', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From ebc8027f04e216c032847fe437fee0d8aac2054b Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Sat, 14 Oct 2023 11:40:25 -0700 Subject: [PATCH 658/859] [Impeller] Vulkan GPU tracer cleanups (#46915) Cleanups that seem to reduce occurance of SIGBUS crash, which It turns out I did not in fact fix. --- .../renderer/backend/vulkan/gpu_tracer_vk.cc | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/impeller/renderer/backend/vulkan/gpu_tracer_vk.cc b/impeller/renderer/backend/vulkan/gpu_tracer_vk.cc index 41614ab708f54..0b7da21de9f82 100644 --- a/impeller/renderer/backend/vulkan/gpu_tracer_vk.cc +++ b/impeller/renderer/backend/vulkan/gpu_tracer_vk.cc @@ -14,7 +14,7 @@ namespace impeller { -static constexpr uint32_t kPoolSize = 128u; +static constexpr uint32_t kPoolSize = 32u; GPUTracerVK::GPUTracerVK(const std::weak_ptr& context) : context_(context) { @@ -100,10 +100,9 @@ void GPUTracerVK::RecordEndFrameTime() { // On completion of the second time stamp recording, we read back this value // and the previous value. The difference is approximately the frame time. const auto device_holder = strong_context->GetDeviceHolder(); - if (!buffer->SubmitCommands([&, last_query, - device_holder](CommandBuffer::Status status) { - auto strong_context = context_.lock(); - if (!strong_context) { + auto submitted = buffer->SubmitCommands( + [&, last_query, device_holder](CommandBuffer::Status status) { + if (status != CommandBuffer::Status::kCompleted) { return; } uint64_t bits[2] = {0, 0}; @@ -111,19 +110,18 @@ void GPUTracerVK::RecordEndFrameTime() { query_pool_.get(), last_query, 2, sizeof(bits), &bits, sizeof(int64_t), vk::QueryResultFlagBits::e64); - if (result == vk::Result::eSuccess) { - // This value should probably be available in some form besides a - // timeline event but that is a job for a future Jonah. - auto gpu_ms = (((bits[1] - bits[0]) * timestamp_period_) / 1000000); - FML_TRACE_COUNTER( - "flutter", "GPUTracer", - reinterpret_cast(this), // Trace Counter ID - "FrameTimeMS", gpu_ms); + if (result != vk::Result::eSuccess) { + return; } - })) { - if (!buffer->SubmitCommands()) { - VALIDATION_LOG << "GPUTracerVK failed to record frame end time."; - } + // This value should probably be available in some form besides a + // timeline event but that is a job for a future Jonah. + auto gpu_ms = (((bits[1] - bits[0]) * timestamp_period_) / 1000000); + FML_TRACE_COUNTER("flutter", "GPUTracer", + reinterpret_cast(this), // Trace Counter ID + "FrameTimeMS", gpu_ms); + }); + if (!submitted) { + VALIDATION_LOG << "GPUTracerVK failed to record frame end time."; } if (current_index_ == kPoolSize - 1) { From 94e0c6c2ce71df252c1d5579356b45460a87af3d Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 14 Oct 2023 16:34:22 -0400 Subject: [PATCH 659/859] Roll Fuchsia Linux SDK from ATLkmtMOIbHDqp6a_... to GycFOb9QsDvp8qfDD... (#46926) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jsimmons@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 09bb884748920..aaafbf6f10f1d 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'ATLkmtMOIbHDqp6a_9ub6uycvrHbSeJfzRdHNgm7cu4C' + 'version': 'GycFOb9QsDvp8qfDD8tsWn8JC2HZ8SfmxLomSPqdqN8C' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', From c2bd784bf49ff9a0936f848a953447463e2e62fe Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 14 Oct 2023 17:15:02 -0400 Subject: [PATCH 660/859] Roll Fuchsia Mac SDK from 6fWBgb3bC9xULwq_k... to hdQ3YOjS1Ytp8W8Aq... (#46927) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jsimmons@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index aaafbf6f10f1d..abf1c75be52c5 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': '6fWBgb3bC9xULwq_k6Zvbj_sRkS7gXtRcgHKsSOBJR0C' + 'version': 'hdQ3YOjS1Ytp8W8AqoULJrtannJ0ohMkT9rPgz8wiQQC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 92cafbf0abcfe8ed8b449e7d6bfbbf5f112a42c6 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 14 Oct 2023 19:03:40 -0400 Subject: [PATCH 661/859] Roll Skia from 5bc5b4fdbe54 to fc4713797ec1 (1 revision) (#46928) https://skia.googlesource.com/skia.git/+log/5bc5b4fdbe54..fc4713797ec1 2023-10-14 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 19b749ea8bde to 8ee180563361 (2 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,johnstiles@google.com,jsimmons@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index abf1c75be52c5..2d16ef5181eca 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '5bc5b4fdbe54f75bf95a4f9efa86dbf4701ee50e', + 'skia_revision': 'fc4713797ec1bc2d99e35005e8efab18d4d717c6', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 6f3bb75fa4eca874b10f7a5735318ba5f30d0a8b Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sun, 15 Oct 2023 05:14:04 -0400 Subject: [PATCH 662/859] Roll Fuchsia Linux SDK from GycFOb9QsDvp8qfDD... to kElPcDiGfsGBI7qr9... (#46929) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jsimmons@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 2d16ef5181eca..347804410cfa9 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'GycFOb9QsDvp8qfDD8tsWn8JC2HZ8SfmxLomSPqdqN8C' + 'version': 'kElPcDiGfsGBI7qr9vz6a5-CSMo8ZQG5iz-cfEjLhhEC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', From 40b525224880fc0349fb79ffdbf916aae1b0022b Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sun, 15 Oct 2023 05:54:01 -0400 Subject: [PATCH 663/859] Roll Fuchsia Mac SDK from hdQ3YOjS1Ytp8W8Aq... to SatOcMmpSCwa51hi6... (#46930) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jsimmons@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 347804410cfa9..cdd979b774d90 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'hdQ3YOjS1Ytp8W8AqoULJrtannJ0ohMkT9rPgz8wiQQC' + 'version': 'SatOcMmpSCwa51hi635GA29Xx8A3SJGpJV_z_ZbbvlcC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From f75cd31b2ae9b4da74e459746b0f7b5e72dd2f7d Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sun, 15 Oct 2023 07:22:10 -0400 Subject: [PATCH 664/859] Roll Skia from fc4713797ec1 to f98a3b1303dc (1 revision) (#46931) https://skia.googlesource.com/skia.git/+log/fc4713797ec1..f98a3b1303dc 2023-10-15 skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com Update SKP version If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jsimmons@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index cdd979b774d90..44de66ae93271 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'fc4713797ec1bc2d99e35005e8efab18d4d717c6', + 'skia_revision': 'f98a3b1303dc9a9aa6fe7cc6e38b29f8437ab98c', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 9b3fe1d6043c4084990ef13230d463f6014d0aab Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sun, 15 Oct 2023 07:56:50 -0400 Subject: [PATCH 665/859] Roll Skia from f98a3b1303dc to 9b773f7cebee (1 revision) (#46932) https://skia.googlesource.com/skia.git/+log/f98a3b1303dc..9b773f7cebee 2023-10-15 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 8ee180563361 to beb52a8821f3 (3 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jsimmons@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 44de66ae93271..f38d6f8839dfb 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'f98a3b1303dc9a9aa6fe7cc6e38b29f8437ab98c', + 'skia_revision': '9b773f7cebeec046ec8c1ccf803a9dddda0e0616', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 526345eea40c0c655a6352f542c3db8986982134 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sun, 15 Oct 2023 09:14:03 -0400 Subject: [PATCH 666/859] Roll Dart SDK from 02e6d943f1a7 to 64a485bb79bd (1 revision) (#46933) https://dart.googlesource.com/sdk.git/+log/02e6d943f1a7..64a485bb79bd 2023-10-15 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-27.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jsimmons@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index f38d6f8839dfb..553004c0c250b 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '02e6d943f1a7fa3d42dd7553b702b2104b4a0bd5', + 'dart_revision': '64a485bb79bd3929d5af31d57926758f182cf3f2', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py From 4a7d4eb931f6ae4a8d2c9690db1e88149688f2e6 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sun, 15 Oct 2023 17:53:22 -0400 Subject: [PATCH 667/859] Roll Fuchsia Linux SDK from kElPcDiGfsGBI7qr9... to D-ejMxpgAyRoO6DUr... (#46934) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jsimmons@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 553004c0c250b..b9a3950cbec77 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'kElPcDiGfsGBI7qr9vz6a5-CSMo8ZQG5iz-cfEjLhhEC' + 'version': 'D-ejMxpgAyRoO6DUrufRkehpohSUw9r-MywmP0sLM-4C' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', From 4f745c150dd2db20291adb1b4796e2625516fb2f Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sun, 15 Oct 2023 18:31:23 -0400 Subject: [PATCH 668/859] Roll Fuchsia Mac SDK from SatOcMmpSCwa51hi6... to CQhXLIfBTsZWBA4XM... (#46935) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jsimmons@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index b9a3950cbec77..7d303c7408e44 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'SatOcMmpSCwa51hi635GA29Xx8A3SJGpJV_z_ZbbvlcC' + 'version': 'CQhXLIfBTsZWBA4XMf9D4SPj4qtMa2bWzwLad4jv6sUC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 3d67f2ad244ee0a3c98b1c7758a645ed589841c6 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sun, 15 Oct 2023 22:08:30 -0400 Subject: [PATCH 669/859] Roll Skia from 9b773f7cebee to cd9561107494 (1 revision) (#46936) https://skia.googlesource.com/skia.git/+log/9b773f7cebee..cd9561107494 2023-10-16 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from beb52a8821f3 to 5c0370a84db5 (1 revision) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jsimmons@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 7d303c7408e44..bdae8c986aa44 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '9b773f7cebeec046ec8c1ccf803a9dddda0e0616', + 'skia_revision': 'cd9561107494b6ce6a1358b217bcbb0bb939b566', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 13f320bc1938228323ab2313050697225a3066d4 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 16 Oct 2023 01:20:29 -0400 Subject: [PATCH 670/859] Roll Skia from cd9561107494 to 798ef5becc8d (1 revision) (#46937) https://skia.googlesource.com/skia.git/+log/cd9561107494..798ef5becc8d 2023-10-16 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Dawn from b04f7d93831f to 90fc3629a642 (15 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jsimmons@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index bdae8c986aa44..aa9d52dddc502 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'cd9561107494b6ce6a1358b217bcbb0bb939b566', + 'skia_revision': '798ef5becc8dfe037982a20f0bb250aaf6b922a2', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 7ea14b32b43f3b14f43f26cef43cec8edbb6b7c8 Mon Sep 17 00:00:00 2001 From: Tong Mu Date: Sun, 15 Oct 2023 22:37:20 -0700 Subject: [PATCH 671/859] Revert "Reland: Enforce the rule of calling FlutterView.Render (#45300)" (#46919) Reverts flutter/engine#45555 due to possible performance regression, b/304898239 --- lib/ui/fixtures/ui_test.dart | 42 --- lib/ui/platform_dispatcher.dart | 33 --- lib/ui/window.dart | 28 +- .../platform_configuration_unittests.cc | 240 ------------------ shell/common/shell.cc | 31 +-- shell/common/shell.h | 10 - testing/dart/platform_view_test.dart | 9 +- 7 files changed, 23 insertions(+), 370 deletions(-) diff --git a/lib/ui/fixtures/ui_test.dart b/lib/ui/fixtures/ui_test.dart index a4b8ada735b2c..38866fb476ced 100644 --- a/lib/ui/fixtures/ui_test.dart +++ b/lib/ui/fixtures/ui_test.dart @@ -1100,45 +1100,3 @@ external void _callHook( Object? arg20, Object? arg21, ]); - -Scene _createRedBoxScene(Size size) { - final SceneBuilder builder = SceneBuilder(); - builder.pushOffset(0.0, 0.0); - final Paint paint = Paint() - ..color = Color.fromARGB(255, 255, 0, 0) - ..style = PaintingStyle.fill; - final PictureRecorder baseRecorder = PictureRecorder(); - final Canvas canvas = Canvas(baseRecorder); - canvas.drawRect(Rect.fromLTRB(0.0, 0.0, size.width, size.height), paint); - final Picture picture = baseRecorder.endRecording(); - builder.addPicture(Offset(0.0, 0.0), picture); - builder.pop(); - return builder.build(); -} - -@pragma('vm:entry-point') -void incorrectImmediateRender() { - PlatformDispatcher.instance.views.first.render(_createRedBoxScene(Size(2, 2))); - _finish(); - // Don't schedule a frame here. This test only checks if the - // [FlutterView.render] call is propagated to PlatformConfiguration.render - // and thus doesn't need anything from `Animator` or `Engine`, which, - // besides, are not even created in the native side at all. -} - -@pragma('vm:entry-point') -void incorrectDoubleRender() { - PlatformDispatcher.instance.onBeginFrame = (Duration value) { - PlatformDispatcher.instance.views.first.render(_createRedBoxScene(Size(2, 2))); - PlatformDispatcher.instance.views.first.render(_createRedBoxScene(Size(3, 3))); - }; - PlatformDispatcher.instance.onDrawFrame = () { - PlatformDispatcher.instance.views.first.render(_createRedBoxScene(Size(4, 4))); - PlatformDispatcher.instance.views.first.render(_createRedBoxScene(Size(5, 5))); - }; - _finish(); - // Don't schedule a frame here. This test only checks if the - // [FlutterView.render] call is propagated to PlatformConfiguration.render - // and thus doesn't need anything from `Animator` or `Engine`, which, - // besides, are not even created in the native side at all. -} diff --git a/lib/ui/platform_dispatcher.dart b/lib/ui/platform_dispatcher.dart index 5f42aa4af9f26..0bd387270ba13 100644 --- a/lib/ui/platform_dispatcher.dart +++ b/lib/ui/platform_dispatcher.dart @@ -308,21 +308,6 @@ class PlatformDispatcher { _invoke(onMetricsChanged, _onMetricsChangedZone); } - // [FlutterView]s for which [FlutterView.render] has already been called - // during the current [onBeginFrame]/[onDrawFrame] callback sequence. - // - // The field is null outside the scope of those callbacks indicating that - // calls to [FlutterView.render] must be ignored. Furthermore, if a given - // [FlutterView] is already present in this set when its [FlutterView.render] - // is called again, that call must be ignored as a duplicate. - // - // Between [onBeginFrame] and [onDrawFrame] the properties value is - // temporarily stored in `_renderedViewsBetweenCallbacks` so that it survives - // the gap between the two callbacks. - Set? _renderedViews; - // Temporary storage of the `_renderedViews` value between `_beginFrame` and - // `_drawFrame`. - Set? _renderedViewsBetweenCallbacks; /// A callback invoked when any view begins a frame. /// @@ -344,20 +329,11 @@ class PlatformDispatcher { // Called from the engine, via hooks.dart void _beginFrame(int microseconds) { - assert(_renderedViews == null); - assert(_renderedViewsBetweenCallbacks == null); - - _renderedViews = {}; _invoke1( onBeginFrame, _onBeginFrameZone, Duration(microseconds: microseconds), ); - _renderedViewsBetweenCallbacks = _renderedViews; - _renderedViews = null; - - assert(_renderedViews == null); - assert(_renderedViewsBetweenCallbacks != null); } /// A callback that is invoked for each frame after [onBeginFrame] has @@ -375,16 +351,7 @@ class PlatformDispatcher { // Called from the engine, via hooks.dart void _drawFrame() { - assert(_renderedViews == null); - assert(_renderedViewsBetweenCallbacks != null); - - _renderedViews = _renderedViewsBetweenCallbacks; - _renderedViewsBetweenCallbacks = null; _invoke(onDrawFrame, _onDrawFrameZone); - _renderedViews = null; - - assert(_renderedViews == null); - assert(_renderedViewsBetweenCallbacks == null); } /// A callback that is invoked when pointer data is available. diff --git a/lib/ui/window.dart b/lib/ui/window.dart index 286e1485b3a9f..26a258cfa96c1 100644 --- a/lib/ui/window.dart +++ b/lib/ui/window.dart @@ -327,21 +327,14 @@ class FlutterView { /// Updates the view's rendering on the GPU with the newly provided [Scene]. /// - /// ## Requirement for calling this method - /// - /// This method must be called within the synchronous scope of the + /// This function must be called within the scope of the /// [PlatformDispatcher.onBeginFrame] or [PlatformDispatcher.onDrawFrame] - /// callbacks. Calls out of this scope will be ignored. To use this method, - /// create a callback that calls this method instead, and assign it to either - /// of the fields above; then schedule a frame, which is done typically with - /// [PlatformDispatcher.scheduleFrame]. Also, make sure the callback does not - /// have `await` before the `FlutterWindow.render` call. - /// - /// Additionally, this method can only be called once for each view during a - /// single [PlatformDispatcher.onBeginFrame]/[PlatformDispatcher.onDrawFrame] - /// callback sequence. Duplicate calls will be ignored in production. + /// callbacks being invoked. /// - /// ## How to record a scene + /// If this function is called a second time during a single + /// [PlatformDispatcher.onBeginFrame]/[PlatformDispatcher.onDrawFrame] + /// callback sequence or called outside the scope of those callbacks, the call + /// will be ignored. /// /// To record graphical operations, first create a [PictureRecorder], then /// construct a [Canvas], passing that [PictureRecorder] to its constructor. @@ -360,14 +353,7 @@ class FlutterView { /// scheduling of frames. /// * [RendererBinding], the Flutter framework class which manages layout and /// painting. - void render(Scene scene) { - if (platformDispatcher._renderedViews?.add(this) != true) { - // Duplicated calls or calls outside of onBeginFrame/onDrawFrame - // (indicated by _renderedViews being null) are ignored, as documented. - return; - } - _render(scene as _NativeScene); - } + void render(Scene scene) => _render(scene as _NativeScene); @Native)>(symbol: 'PlatformConfigurationNativeApi::Render') external static void _render(_NativeScene scene); diff --git a/lib/ui/window/platform_configuration_unittests.cc b/lib/ui/window/platform_configuration_unittests.cc index 1fa8377d69a74..7410caeb66d6c 100644 --- a/lib/ui/window/platform_configuration_unittests.cc +++ b/lib/ui/window/platform_configuration_unittests.cc @@ -15,171 +15,10 @@ #include "flutter/shell/common/shell_test.h" #include "flutter/shell/common/thread_host.h" #include "flutter/testing/testing.h" -#include "gmock/gmock.h" namespace flutter { - -namespace { - -static constexpr int64_t kImplicitViewId = 0; - -static void PostSync(const fml::RefPtr& task_runner, - const fml::closure& task) { - fml::AutoResetWaitableEvent latch; - fml::TaskRunner::RunNowOrPostTask(task_runner, [&latch, &task] { - task(); - latch.Signal(); - }); - latch.Wait(); -} - -class MockRuntimeDelegate : public RuntimeDelegate { - public: - MOCK_METHOD(std::string, DefaultRouteName, (), (override)); - MOCK_METHOD(void, ScheduleFrame, (bool), (override)); - MOCK_METHOD(void, - Render, - (std::unique_ptr, float), - (override)); - MOCK_METHOD(void, - UpdateSemantics, - (SemanticsNodeUpdates, CustomAccessibilityActionUpdates), - (override)); - MOCK_METHOD(void, - HandlePlatformMessage, - (std::unique_ptr), - (override)); - MOCK_METHOD(FontCollection&, GetFontCollection, (), (override)); - MOCK_METHOD(std::shared_ptr, GetAssetManager, (), (override)); - MOCK_METHOD(void, OnRootIsolateCreated, (), (override)); - MOCK_METHOD(void, - UpdateIsolateDescription, - (const std::string, int64_t), - (override)); - MOCK_METHOD(void, SetNeedsReportTimings, (bool), (override)); - MOCK_METHOD(std::unique_ptr>, - ComputePlatformResolvedLocale, - (const std::vector&), - (override)); - MOCK_METHOD(void, RequestDartDeferredLibrary, (intptr_t), (override)); - MOCK_METHOD(std::weak_ptr, - GetPlatformMessageHandler, - (), - (const, override)); - MOCK_METHOD(void, SendChannelUpdate, (std::string, bool), (override)); - MOCK_METHOD(double, - GetScaledFontSize, - (double font_size, int configuration_id), - (const, override)); -}; - -class MockPlatformMessageHandler : public PlatformMessageHandler { - public: - MOCK_METHOD(void, - HandlePlatformMessage, - (std::unique_ptr message), - (override)); - MOCK_METHOD(bool, - DoesHandlePlatformMessageOnPlatformThread, - (), - (const, override)); - MOCK_METHOD(void, - InvokePlatformMessageResponseCallback, - (int response_id, std::unique_ptr mapping), - (override)); - MOCK_METHOD(void, - InvokePlatformMessageEmptyResponseCallback, - (int response_id), - (override)); -}; - -// A class that can launch a RuntimeController with the specified -// RuntimeDelegate. -// -// To use this class, contruct this class with Create, call LaunchRootIsolate, -// and use the controller with ControllerTaskSync(). -class RuntimeControllerContext { - public: - using ControllerCallback = std::function; - - [[nodiscard]] static std::unique_ptr Create( - Settings settings, // - const TaskRunners& task_runners, // - RuntimeDelegate& client) { - auto [vm, isolate_snapshot] = Shell::InferVmInitDataFromSettings(settings); - FML_CHECK(vm) << "Must be able to initialize the VM."; - // Construct the class with `new` because `make_unique` has no access to the - // private constructor. - RuntimeControllerContext* raw_pointer = new RuntimeControllerContext( - settings, task_runners, client, std::move(vm), isolate_snapshot); - return std::unique_ptr(raw_pointer); - } - - ~RuntimeControllerContext() { - PostSync(task_runners_.GetUITaskRunner(), - [&]() { runtime_controller_.reset(); }); - } - - // Launch the root isolate. The post_launch callback will be executed in the - // same UI task, which can be used to create initial views. - void LaunchRootIsolate(RunConfiguration& configuration, - ControllerCallback post_launch) { - PostSync(task_runners_.GetUITaskRunner(), [&]() { - bool launch_success = runtime_controller_->LaunchRootIsolate( - settings_, // - []() {}, // - configuration.GetEntrypoint(), // - configuration.GetEntrypointLibrary(), // - configuration.GetEntrypointArgs(), // - configuration.TakeIsolateConfiguration()); // - ASSERT_TRUE(launch_success); - post_launch(*runtime_controller_); - }); - } - - // Run a task that operates the RuntimeController on the UI thread, and wait - // for the task to end. - void ControllerTaskSync(ControllerCallback task) { - ASSERT_TRUE(runtime_controller_); - ASSERT_TRUE(task); - PostSync(task_runners_.GetUITaskRunner(), - [&]() { task(*runtime_controller_); }); - } - - private: - RuntimeControllerContext(const Settings& settings, - const TaskRunners& task_runners, - RuntimeDelegate& client, - DartVMRef vm, - fml::RefPtr isolate_snapshot) - : settings_(settings), - task_runners_(task_runners), - isolate_snapshot_(std::move(isolate_snapshot)), - vm_(std::move(vm)), - runtime_controller_(std::make_unique( - client, - &vm_, - std::move(isolate_snapshot_), - settings.idle_notification_callback, // idle notification callback - flutter::PlatformData(), // platform data - settings.isolate_create_callback, // isolate create callback - settings.isolate_shutdown_callback, // isolate shutdown callback - settings.persistent_isolate_data, // persistent isolate data - UIDartState::Context{task_runners})) {} - - Settings settings_; - TaskRunners task_runners_; - fml::RefPtr isolate_snapshot_; - DartVMRef vm_; - std::unique_ptr runtime_controller_; -}; -} // namespace - namespace testing { -using ::testing::_; -using ::testing::Return; - class PlatformConfigurationTest : public ShellTest {}; TEST_F(PlatformConfigurationTest, Initialization) { @@ -493,84 +332,5 @@ TEST_F(PlatformConfigurationTest, SetDartPerformanceMode) { DestroyShell(std::move(shell), task_runners); } -TEST_F(PlatformConfigurationTest, OutOfScopeRenderCallsAreIgnored) { - Settings settings = CreateSettingsForFixture(); - TaskRunners task_runners = GetTaskRunnersForFixture(); - - MockRuntimeDelegate client; - auto platform_message_handler = - std::make_shared(); - EXPECT_CALL(client, GetPlatformMessageHandler) - .WillOnce(Return(platform_message_handler)); - // Render should not be called. - EXPECT_CALL(client, Render).Times(0); - - auto finish_latch = std::make_shared(); - auto finish = [finish_latch](Dart_NativeArguments args) { - finish_latch->Signal(); - }; - AddNativeCallback("Finish", CREATE_NATIVE_ENTRY(finish)); - - auto runtime_controller_context = - RuntimeControllerContext::Create(settings, task_runners, client); - - auto configuration = RunConfiguration::InferFromSettings(settings); - configuration.SetEntrypoint("incorrectImmediateRender"); - runtime_controller_context->LaunchRootIsolate( - configuration, [](RuntimeController& runtime_controller) { - runtime_controller.AddView( - kImplicitViewId, - ViewportMetrics( - /*pixel_ratio=*/1.0, /*width=*/20, /*height=*/20, - /*touch_slop=*/2, /*display_id=*/0)); - }); - - // Wait for the Dart main function to end. - finish_latch->Wait(); -} - -TEST_F(PlatformConfigurationTest, DuplicateRenderCallsAreIgnored) { - Settings settings = CreateSettingsForFixture(); - TaskRunners task_runners = GetTaskRunnersForFixture(); - - MockRuntimeDelegate client; - auto platform_message_handler = - std::make_shared(); - EXPECT_CALL(client, GetPlatformMessageHandler) - .WillOnce(Return(platform_message_handler)); - // Render should only be called once, because the second call is ignored. - EXPECT_CALL(client, Render).Times(1); - - auto finish_latch = std::make_shared(); - auto finish = [finish_latch](Dart_NativeArguments args) { - finish_latch->Signal(); - }; - AddNativeCallback("Finish", CREATE_NATIVE_ENTRY(finish)); - - auto runtime_controller_context = - RuntimeControllerContext::Create(settings, task_runners, client); - - auto configuration = RunConfiguration::InferFromSettings(settings); - configuration.SetEntrypoint("incorrectDoubleRender"); - runtime_controller_context->LaunchRootIsolate( - configuration, [](RuntimeController& runtime_controller) { - runtime_controller.AddView( - kImplicitViewId, - ViewportMetrics( - /*pixel_ratio=*/1.0, /*width=*/20, /*height=*/20, - /*touch_slop=*/2, /*display_id=*/0)); - }); - - // Wait for the Dart main function to end. - finish_latch->Wait(); - - // This call synchronously calls PlatformDispatcher's handleBeginFrame and - // handleDrawFrame. Therefore it doesn't have to wait for latches. - runtime_controller_context->ControllerTaskSync( - [](RuntimeController& runtime_controller) { - runtime_controller.BeginFrame(fml::TimePoint::Now(), 0); - }); -} - } // namespace testing } // namespace flutter diff --git a/shell/common/shell.cc b/shell/common/shell.cc index a6ba487b581f7..a7f7c9ae4c782 100644 --- a/shell/common/shell.cc +++ b/shell/common/shell.cc @@ -144,23 +144,6 @@ void PerformInitializationTasks(Settings& settings) { } // namespace -std::pair> -Shell::InferVmInitDataFromSettings(Settings& settings) { - // Always use the `vm_snapshot` and `isolate_snapshot` provided by the - // settings to launch the VM. If the VM is already running, the snapshot - // arguments are ignored. - auto vm_snapshot = DartSnapshot::VMSnapshotFromSettings(settings); - auto isolate_snapshot = DartSnapshot::IsolateSnapshotFromSettings(settings); - auto vm = DartVMRef::Create(settings, vm_snapshot, isolate_snapshot); - - // If the settings did not specify an `isolate_snapshot`, fall back to the - // one the VM was launched with. - if (!isolate_snapshot) { - isolate_snapshot = vm->GetVMData()->GetIsolateSnapshot(); - } - return {std::move(vm), isolate_snapshot}; -} - std::unique_ptr Shell::Create( const PlatformData& platform_data, const TaskRunners& task_runners, @@ -173,7 +156,19 @@ std::unique_ptr Shell::Create( TRACE_EVENT0("flutter", "Shell::Create"); - auto [vm, isolate_snapshot] = InferVmInitDataFromSettings(settings); + // Always use the `vm_snapshot` and `isolate_snapshot` provided by the + // settings to launch the VM. If the VM is already running, the snapshot + // arguments are ignored. + auto vm_snapshot = DartSnapshot::VMSnapshotFromSettings(settings); + auto isolate_snapshot = DartSnapshot::IsolateSnapshotFromSettings(settings); + auto vm = DartVMRef::Create(settings, vm_snapshot, isolate_snapshot); + FML_CHECK(vm) << "Must be able to initialize the VM."; + + // If the settings did not specify an `isolate_snapshot`, fall back to the + // one the VM was launched with. + if (!isolate_snapshot) { + isolate_snapshot = vm->GetVMData()->GetIsolateSnapshot(); + } auto resource_cache_limit_calculator = std::make_shared( settings.resource_cache_max_bytes_threshold); diff --git a/shell/common/shell.h b/shell/common/shell.h index 133fecc4d0f43..039eb653a05e7 100644 --- a/shell/common/shell.h +++ b/shell/common/shell.h @@ -438,16 +438,6 @@ class Shell final : public PlatformView::Delegate, const std::shared_ptr GetConcurrentWorkerTaskRunner() const; - // Infer the VM ref and the isolate snapshot based on the settings. - // - // If the VM is already running, the settings are ignored, but the returned - // isolate snapshot always prioritize what is specified by the settings, and - // falls back to the one VM was launched with. - // - // This function is what Shell::Create uses to infer snapshot settings. - static std::pair> - InferVmInitDataFromSettings(Settings& settings); - private: using ServiceProtocolHandler = std::function Date: Mon, 16 Oct 2023 07:43:15 +0200 Subject: [PATCH 672/859] Reland - [Android] Add support for text processing actions (#46817) ## Description This is a reland of https://github.com/flutter/engine/pull/44579 which was reverted in https://github.com/flutter/engine/pull/46788. This reland adds a check into `onActivityResult` in order to return early if the result is related to an unknown request code (aka the result is related to a request sent by another plugin). It also adds one test that simulates receiving such an unknown request code. ## Related Issue Android engine side for https://github.com/flutter/flutter/issues/107603 ## Tests Adds 4 tests. --- ci/licenses_golden/licenses_flutter | 4 + shell/platform/android/AndroidManifest.xml | 8 + shell/platform/android/BUILD.gn | 2 + .../embedding/engine/FlutterEngine.java | 13 + .../systemchannels/ProcessTextChannel.java | 122 ++++++++ .../plugin/text/ProcessTextPlugin.java | 197 ++++++++++++ .../plugin/text/ProcessTextPluginTest.java | 280 ++++++++++++++++++ 7 files changed, 626 insertions(+) create mode 100644 shell/platform/android/io/flutter/embedding/engine/systemchannels/ProcessTextChannel.java create mode 100644 shell/platform/android/io/flutter/plugin/text/ProcessTextPlugin.java create mode 100644 shell/platform/android/test/io/flutter/plugin/text/ProcessTextPluginTest.java diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index ba40fab5d7b1d..ad443428ed131 100644 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -3095,6 +3095,7 @@ ORIGIN: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/syst ORIGIN: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/NavigationChannel.java + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformChannel.java + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/ProcessTextChannel.java + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/RestorationChannel.java + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/SpellCheckChannel.java + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/SystemChannel.java + ../../../flutter/LICENSE @@ -3137,6 +3138,7 @@ ORIGIN: ../../../flutter/shell/platform/android/io/flutter/plugin/platform/Platf ORIGIN: ../../../flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/plugin/platform/SingleViewPresentation.java + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/plugin/platform/VirtualDisplayController.java + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/shell/platform/android/io/flutter/plugin/text/ProcessTextPlugin.java + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/util/HandlerCompat.java + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/util/PathUtils.java + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/android/io/flutter/util/Preconditions.java + ../../../flutter/LICENSE @@ -5870,6 +5872,7 @@ FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/system FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/NavigationChannel.java FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformChannel.java FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java +FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/ProcessTextChannel.java FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/RestorationChannel.java FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/SettingsChannel.java FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/SpellCheckChannel.java @@ -5917,6 +5920,7 @@ FILE: ../../../flutter/shell/platform/android/io/flutter/plugin/platform/Platfor FILE: ../../../flutter/shell/platform/android/io/flutter/plugin/platform/SingleViewPresentation.java FILE: ../../../flutter/shell/platform/android/io/flutter/plugin/platform/SurfaceTexturePlatformViewRenderTarget.java FILE: ../../../flutter/shell/platform/android/io/flutter/plugin/platform/VirtualDisplayController.java +FILE: ../../../flutter/shell/platform/android/io/flutter/plugin/text/ProcessTextPlugin.java FILE: ../../../flutter/shell/platform/android/io/flutter/util/HandlerCompat.java FILE: ../../../flutter/shell/platform/android/io/flutter/util/PathUtils.java FILE: ../../../flutter/shell/platform/android/io/flutter/util/Preconditions.java diff --git a/shell/platform/android/AndroidManifest.xml b/shell/platform/android/AndroidManifest.xml index 5fbd0d8553c2b..97c77ee7ef57f 100644 --- a/shell/platform/android/AndroidManifest.xml +++ b/shell/platform/android/AndroidManifest.xml @@ -24,4 +24,12 @@ + + + + + + + + diff --git a/shell/platform/android/BUILD.gn b/shell/platform/android/BUILD.gn index bf09252581289..35a1f31e4c4cc 100644 --- a/shell/platform/android/BUILD.gn +++ b/shell/platform/android/BUILD.gn @@ -275,6 +275,7 @@ android_java_sources = [ "io/flutter/embedding/engine/systemchannels/NavigationChannel.java", "io/flutter/embedding/engine/systemchannels/PlatformChannel.java", "io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java", + "io/flutter/embedding/engine/systemchannels/ProcessTextChannel.java", "io/flutter/embedding/engine/systemchannels/RestorationChannel.java", "io/flutter/embedding/engine/systemchannels/SettingsChannel.java", "io/flutter/embedding/engine/systemchannels/SpellCheckChannel.java", @@ -322,6 +323,7 @@ android_java_sources = [ "io/flutter/plugin/platform/SingleViewPresentation.java", "io/flutter/plugin/platform/SurfaceTexturePlatformViewRenderTarget.java", "io/flutter/plugin/platform/VirtualDisplayController.java", + "io/flutter/plugin/text/ProcessTextPlugin.java", "io/flutter/util/HandlerCompat.java", "io/flutter/util/PathUtils.java", "io/flutter/util/Preconditions.java", diff --git a/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java b/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java index 2bfa379f39c1e..cb00ec42b363c 100644 --- a/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java +++ b/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java @@ -31,6 +31,7 @@ import io.flutter.embedding.engine.systemchannels.MouseCursorChannel; import io.flutter.embedding.engine.systemchannels.NavigationChannel; import io.flutter.embedding.engine.systemchannels.PlatformChannel; +import io.flutter.embedding.engine.systemchannels.ProcessTextChannel; import io.flutter.embedding.engine.systemchannels.RestorationChannel; import io.flutter.embedding.engine.systemchannels.SettingsChannel; import io.flutter.embedding.engine.systemchannels.SpellCheckChannel; @@ -38,6 +39,7 @@ import io.flutter.embedding.engine.systemchannels.TextInputChannel; import io.flutter.plugin.localization.LocalizationPlugin; import io.flutter.plugin.platform.PlatformViewsController; +import io.flutter.plugin.text.ProcessTextPlugin; import io.flutter.util.ViewUtils; import java.util.HashSet; import java.util.List; @@ -95,6 +97,7 @@ public class FlutterEngine implements ViewUtils.DisplayUpdater { @NonNull private final NavigationChannel navigationChannel; @NonNull private final RestorationChannel restorationChannel; @NonNull private final PlatformChannel platformChannel; + @NonNull private final ProcessTextChannel processTextChannel; @NonNull private final SettingsChannel settingsChannel; @NonNull private final SpellCheckChannel spellCheckChannel; @NonNull private final SystemChannel systemChannel; @@ -329,6 +332,7 @@ public FlutterEngine( mouseCursorChannel = new MouseCursorChannel(dartExecutor); navigationChannel = new NavigationChannel(dartExecutor); platformChannel = new PlatformChannel(dartExecutor); + processTextChannel = new ProcessTextChannel(dartExecutor, context.getPackageManager()); restorationChannel = new RestorationChannel(dartExecutor, waitForRestorationData); settingsChannel = new SettingsChannel(dartExecutor); spellCheckChannel = new SpellCheckChannel(dartExecutor); @@ -384,6 +388,9 @@ public FlutterEngine( } ViewUtils.calculateMaximumDisplayMetrics(context, this); + + ProcessTextPlugin processTextPlugin = new ProcessTextPlugin(this.getProcessTextChannel()); + this.pluginRegistry.add(processTextPlugin); } private void attachToJni() { @@ -545,6 +552,12 @@ public PlatformChannel getPlatformChannel() { return platformChannel; } + /** System channel that sends text processing requests from Flutter to Android. */ + @NonNull + public ProcessTextChannel getProcessTextChannel() { + return processTextChannel; + } + /** * System channel to exchange restoration data between framework and engine. * diff --git a/shell/platform/android/io/flutter/embedding/engine/systemchannels/ProcessTextChannel.java b/shell/platform/android/io/flutter/embedding/engine/systemchannels/ProcessTextChannel.java new file mode 100644 index 0000000000000..f1d12bc681111 --- /dev/null +++ b/shell/platform/android/io/flutter/embedding/engine/systemchannels/ProcessTextChannel.java @@ -0,0 +1,122 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package io.flutter.embedding.engine.systemchannels; + +import android.content.pm.PackageManager; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import io.flutter.embedding.engine.dart.DartExecutor; +import io.flutter.plugin.common.MethodCall; +import io.flutter.plugin.common.MethodChannel; +import io.flutter.plugin.common.StandardMethodCodec; +import java.util.ArrayList; +import java.util.Map; + +/** + * {@link ProcessTextChannel} is a platform channel that is used by the framework to initiate text + * processing feature in the embedding and for the embedding to send back the results. + * + *

When the framework needs to query the list of text processing actions (for instance to expose + * them in the selected text context menu), it will send to the embedding the message {@code + * ProcessText.queryTextActions}. In response, the {@link io.flutter.plugin.text.ProcessTextPlugin} + * will return a map of all activities that can process text. The map keys are generated IDs and the + * values are the activities labels. On the first request, the {@link + * io.flutter.plugin.text.ProcessTextPlugin} will make a call to Android's package manager to query + * all activities that can be performed for the {@code Intent.ACTION_PROCESS_TEXT} intent. + * + *

When a text processing action has to be executed, the framework will send to the embedding the + * message {@code ProcessText.processTextAction} with the {@code int id} of the choosen text action + * and the {@code String} of text to process as arguments. In response, the {@link + * io.flutter.plugin.text.ProcessTextPlugin} will make a call to the Android application activity to + * start the activity exposing the text action. The {@link io.flutter.plugin.text.ProcessTextPlugin} + * will return the processed text if there is one, or null if the activity did not return a + * transformed text. + * + *

{@link io.flutter.plugin.text.ProcessTextPlugin} implements {@link ProcessTextMethodHandler} + * that parses incoming messages from Flutter. + */ +public class ProcessTextChannel { + private static final String TAG = "ProcessTextChannel"; + private static final String CHANNEL_NAME = "flutter/processtext"; + private static final String METHOD_QUERY_TEXT_ACTIONS = "ProcessText.queryTextActions"; + private static final String METHOD_PROCESS_TEXT_ACTION = "ProcessText.processTextAction"; + + public final MethodChannel channel; + public final PackageManager packageManager; + private ProcessTextMethodHandler processTextMethodHandler; + + @NonNull + public final MethodChannel.MethodCallHandler parsingMethodHandler = + new MethodChannel.MethodCallHandler() { + @Override + public void onMethodCall(@NonNull MethodCall call, @NonNull MethodChannel.Result result) { + if (processTextMethodHandler == null) { + return; + } + String method = call.method; + Object args = call.arguments; + switch (method) { + case METHOD_QUERY_TEXT_ACTIONS: + try { + Map actions = processTextMethodHandler.queryTextActions(); + result.success(actions); + } catch (IllegalStateException exception) { + result.error("error", exception.getMessage(), null); + } + break; + case METHOD_PROCESS_TEXT_ACTION: + try { + final ArrayList argumentList = (ArrayList) args; + String id = (String) (argumentList.get(0)); + String text = (String) (argumentList.get(1)); + boolean readOnly = (boolean) (argumentList.get(2)); + processTextMethodHandler.processTextAction(id, text, readOnly, result); + } catch (IllegalStateException exception) { + result.error("error", exception.getMessage(), null); + } + break; + default: + result.notImplemented(); + break; + } + } + }; + + public ProcessTextChannel( + @NonNull DartExecutor dartExecutor, @NonNull PackageManager packageManager) { + this.packageManager = packageManager; + channel = new MethodChannel(dartExecutor, CHANNEL_NAME, StandardMethodCodec.INSTANCE); + channel.setMethodCallHandler(parsingMethodHandler); + } + + /** + * Sets the {@link ProcessTextMethodHandler} which receives all requests to the text processing + * feature sent through this channel. + */ + public void setMethodHandler(@Nullable ProcessTextMethodHandler processTextMethodHandler) { + this.processTextMethodHandler = processTextMethodHandler; + } + + public interface ProcessTextMethodHandler { + /** Requests the map of text actions. Each text action has a unique id and a localized label. */ + Map queryTextActions(); + + /** + * Requests to run a text action on a given input text. + * + * @param id The ID of the text action returned by {@code ProcessText.queryTextActions}. + * @param input The text to be processed. + * @param readOnly Indicates to the activity if the processed text will be used as read-only. + * see + * https://developer.android.com/reference/android/content/Intent#EXTRA_PROCESS_TEXT_READONLY + * @param result The method channel result instance used to reply. + */ + void processTextAction( + @NonNull String id, + @NonNull String input, + @NonNull boolean readOnly, + @NonNull MethodChannel.Result result); + } +} diff --git a/shell/platform/android/io/flutter/plugin/text/ProcessTextPlugin.java b/shell/platform/android/io/flutter/plugin/text/ProcessTextPlugin.java new file mode 100644 index 0000000000000..3338ed2cd9bcf --- /dev/null +++ b/shell/platform/android/io/flutter/plugin/text/ProcessTextPlugin.java @@ -0,0 +1,197 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package io.flutter.plugin.text; + +import android.annotation.TargetApi; +import android.app.Activity; +import android.content.Intent; +import android.content.pm.PackageManager; +import android.content.pm.ResolveInfo; +import android.os.Build; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.RequiresApi; +import io.flutter.embedding.engine.plugins.FlutterPlugin; +import io.flutter.embedding.engine.plugins.activity.ActivityAware; +import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding; +import io.flutter.embedding.engine.systemchannels.ProcessTextChannel; +import io.flutter.plugin.common.MethodChannel; +import io.flutter.plugin.common.PluginRegistry.ActivityResultListener; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class ProcessTextPlugin + implements FlutterPlugin, + ActivityAware, + ActivityResultListener, + ProcessTextChannel.ProcessTextMethodHandler { + private static final String TAG = "ProcessTextPlugin"; + + @NonNull private final ProcessTextChannel processTextChannel; + @NonNull private final PackageManager packageManager; + @Nullable private ActivityPluginBinding activityBinding; + private Map resolveInfosById; + + @NonNull + private Map requestsByCode = + new HashMap(); + + public ProcessTextPlugin(@NonNull ProcessTextChannel processTextChannel) { + this.processTextChannel = processTextChannel; + this.packageManager = processTextChannel.packageManager; + + processTextChannel.setMethodHandler(this); + } + + @Override + public Map queryTextActions() { + if (resolveInfosById == null) { + cacheResolveInfos(); + } + Map result = new HashMap(); + for (String id : resolveInfosById.keySet()) { + final ResolveInfo info = resolveInfosById.get(id); + result.put(id, info.loadLabel(packageManager).toString()); + } + return result; + } + + @Override + public void processTextAction( + @NonNull String id, + @NonNull String text, + @NonNull boolean readOnly, + @NonNull MethodChannel.Result result) { + if (activityBinding == null) { + result.error("error", "Plugin not bound to an Activity", null); + return; + } + + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { + result.error("error", "Android version not supported", null); + return; + } + + if (resolveInfosById == null) { + result.error("error", "Can not process text actions before calling queryTextActions", null); + return; + } + + final ResolveInfo info = resolveInfosById.get(id); + if (info == null) { + result.error("error", "Text processing activity not found", null); + return; + } + + Integer requestCode = result.hashCode(); + requestsByCode.put(requestCode, result); + + Intent intent = new Intent(); + intent.setClassName(info.activityInfo.packageName, info.activityInfo.name); + intent.setAction(Intent.ACTION_PROCESS_TEXT); + intent.setType("text/plain"); + intent.putExtra(Intent.EXTRA_PROCESS_TEXT, text); + intent.putExtra(Intent.EXTRA_PROCESS_TEXT_READONLY, readOnly); + + // Start the text processing activity. When the activity completes, the onActivityResult + // callback + // is called. + activityBinding.getActivity().startActivityForResult(intent, requestCode); + } + + private void cacheResolveInfos() { + resolveInfosById = new HashMap(); + + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { + return; + } + + Intent intent = new Intent().setAction(Intent.ACTION_PROCESS_TEXT).setType("text/plain"); + + List infos; + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + infos = packageManager.queryIntentActivities(intent, PackageManager.ResolveInfoFlags.of(0)); + } else { + infos = packageManager.queryIntentActivities(intent, 0); + } + + for (ResolveInfo info : infos) { + final String id = info.activityInfo.name; + final String label = info.loadLabel(packageManager).toString(); + resolveInfosById.put(id, info); + } + } + + /** + * Executed when a text processing activity terminates. + * + *

When an activity returns a value, the request is completed successfully and returns the + * processed text. + * + *

When an activity does not return a value. the request is completed successfully and returns + * null. + */ + @TargetApi(Build.VERSION_CODES.M) + @RequiresApi(Build.VERSION_CODES.M) + public boolean onActivityResult(int requestCode, int resultCode, @Nullable Intent intent) { + // Return early if the result is not related to a request sent by this plugin. + if (!requestsByCode.containsKey(requestCode)) { + return false; + } + + String result = null; + if (resultCode == Activity.RESULT_OK) { + result = intent.getStringExtra(Intent.EXTRA_PROCESS_TEXT); + } + requestsByCode.remove(requestCode).success(result); + return true; + } + + /** + * Unregisters this {@code ProcessTextPlugin} as the {@code + * ProcessTextChannel.ProcessTextMethodHandler}, for the {@link + * io.flutter.embedding.engine.systemchannels.ProcessTextChannel}. + * + *

Do not invoke any methods on a {@code ProcessTextPlugin} after invoking this method. + */ + public void destroy() { + processTextChannel.setMethodHandler(null); + } + + // FlutterPlugin interface implementation. + + public void onAttachedToEngine(@NonNull FlutterPluginBinding binding) { + // Nothing to do because this plugin is instantiated by the engine. + } + + public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) { + // Nothing to do because this plugin is instantiated by the engine. + } + + // ActivityAware interface implementation. + // + // Store the binding and manage the activity result listener. + + public void onAttachedToActivity(@NonNull ActivityPluginBinding binding) { + this.activityBinding = binding; + this.activityBinding.addActivityResultListener(this); + }; + + public void onDetachedFromActivityForConfigChanges() { + this.activityBinding.removeActivityResultListener(this); + this.activityBinding = null; + } + + public void onReattachedToActivityForConfigChanges(@NonNull ActivityPluginBinding binding) { + this.activityBinding = binding; + this.activityBinding.addActivityResultListener(this); + } + + public void onDetachedFromActivity() { + this.activityBinding.removeActivityResultListener(this); + this.activityBinding = null; + } +} diff --git a/shell/platform/android/test/io/flutter/plugin/text/ProcessTextPluginTest.java b/shell/platform/android/test/io/flutter/plugin/text/ProcessTextPluginTest.java new file mode 100644 index 0000000000000..e582f9b8c8fb8 --- /dev/null +++ b/shell/platform/android/test/io/flutter/plugin/text/ProcessTextPluginTest.java @@ -0,0 +1,280 @@ +package io.flutter.plugin.text; + +import static org.junit.Assert.assertEquals; +import static org.mockito.Mockito.any; +import static org.mockito.Mockito.anyInt; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import android.annotation.TargetApi; +import android.app.Activity; +import android.content.Intent; +import android.content.pm.ActivityInfo; +import android.content.pm.PackageItemInfo; +import android.content.pm.PackageManager; +import android.content.pm.ResolveInfo; +import android.os.Build; +import androidx.annotation.RequiresApi; +import androidx.test.ext.junit.runners.AndroidJUnit4; +import io.flutter.embedding.engine.dart.DartExecutor; +import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding; +import io.flutter.embedding.engine.systemchannels.ProcessTextChannel; +import io.flutter.plugin.common.BinaryMessenger; +import io.flutter.plugin.common.MethodCall; +import io.flutter.plugin.common.MethodChannel; +import io.flutter.plugin.common.StandardMethodCodec; +import java.lang.reflect.Field; +import java.nio.ByteBuffer; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.ArgumentCaptor; + +@RunWith(AndroidJUnit4.class) +@TargetApi(Build.VERSION_CODES.N) +@RequiresApi(Build.VERSION_CODES.N) +public class ProcessTextPluginTest { + + private static void sendToBinaryMessageHandler( + BinaryMessenger.BinaryMessageHandler binaryMessageHandler, String method, Object args) { + MethodCall methodCall = new MethodCall(method, args); + ByteBuffer encodedMethodCall = StandardMethodCodec.INSTANCE.encodeMethodCall(methodCall); + binaryMessageHandler.onMessage( + (ByteBuffer) encodedMethodCall.flip(), mock(BinaryMessenger.BinaryReply.class)); + } + + @SuppressWarnings("deprecation") + // setMessageHandler is deprecated. + @Test + public void respondsToProcessTextChannelMessage() { + ArgumentCaptor binaryMessageHandlerCaptor = + ArgumentCaptor.forClass(BinaryMessenger.BinaryMessageHandler.class); + DartExecutor mockBinaryMessenger = mock(DartExecutor.class); + ProcessTextChannel.ProcessTextMethodHandler mockHandler = + mock(ProcessTextChannel.ProcessTextMethodHandler.class); + PackageManager mockPackageManager = mock(PackageManager.class); + ProcessTextChannel processTextChannel = + new ProcessTextChannel(mockBinaryMessenger, mockPackageManager); + + processTextChannel.setMethodHandler(mockHandler); + + verify(mockBinaryMessenger, times(1)) + .setMessageHandler(any(String.class), binaryMessageHandlerCaptor.capture()); + + BinaryMessenger.BinaryMessageHandler binaryMessageHandler = + binaryMessageHandlerCaptor.getValue(); + + sendToBinaryMessageHandler(binaryMessageHandler, "ProcessText.queryTextActions", null); + + verify(mockHandler).queryTextActions(); + } + + @SuppressWarnings("deprecation") + // setMessageHandler is deprecated. + @Test + public void performQueryTextActions() { + DartExecutor mockBinaryMessenger = mock(DartExecutor.class); + PackageManager mockPackageManager = mock(PackageManager.class); + ProcessTextChannel processTextChannel = + new ProcessTextChannel(mockBinaryMessenger, mockPackageManager); + + // Set up mocked result for PackageManager.queryIntentActivities. + ResolveInfo action1 = createFakeResolveInfo("Action1", mockPackageManager); + ResolveInfo action2 = createFakeResolveInfo("Action2", mockPackageManager); + List infos = new ArrayList(Arrays.asList(action1, action2)); + Intent intent = new Intent().setAction(Intent.ACTION_PROCESS_TEXT).setType("text/plain"); + when(mockPackageManager.queryIntentActivities( + any(Intent.class), any(PackageManager.ResolveInfoFlags.class))) + .thenReturn(infos); + + // ProcessTextPlugin should retrieve the mocked text actions. + ProcessTextPlugin processTextPlugin = new ProcessTextPlugin(processTextChannel); + Map textActions = processTextPlugin.queryTextActions(); + final String action1Id = "mockActivityName.Action1"; + final String action2Id = "mockActivityName.Action2"; + assertEquals(textActions, Map.of(action1Id, "Action1", action2Id, "Action2")); + } + + @SuppressWarnings("deprecation") + // setMessageHandler is deprecated. + @Test + public void performProcessTextActionWithNoReturnedValue() { + DartExecutor mockBinaryMessenger = mock(DartExecutor.class); + PackageManager mockPackageManager = mock(PackageManager.class); + ProcessTextChannel processTextChannel = + new ProcessTextChannel(mockBinaryMessenger, mockPackageManager); + + // Set up mocked result for PackageManager.queryIntentActivities. + ResolveInfo action1 = createFakeResolveInfo("Action1", mockPackageManager); + ResolveInfo action2 = createFakeResolveInfo("Action2", mockPackageManager); + List infos = new ArrayList(Arrays.asList(action1, action2)); + when(mockPackageManager.queryIntentActivities( + any(Intent.class), any(PackageManager.ResolveInfoFlags.class))) + .thenReturn(infos); + + // ProcessTextPlugin should retrieve the mocked text actions. + ProcessTextPlugin processTextPlugin = new ProcessTextPlugin(processTextChannel); + Map textActions = processTextPlugin.queryTextActions(); + final String action1Id = "mockActivityName.Action1"; + final String action2Id = "mockActivityName.Action2"; + assertEquals(textActions, Map.of(action1Id, "Action1", action2Id, "Action2")); + + // Set up the activity binding. + ActivityPluginBinding mockActivityPluginBinding = mock(ActivityPluginBinding.class); + Activity mockActivity = mock(Activity.class); + when(mockActivityPluginBinding.getActivity()).thenReturn(mockActivity); + processTextPlugin.onAttachedToActivity(mockActivityPluginBinding); + + // Execute th first action. + String textToBeProcessed = "Flutter!"; + MethodChannel.Result result = mock(MethodChannel.Result.class); + processTextPlugin.processTextAction(action1Id, textToBeProcessed, false, result); + + // Activity.startActivityForResult should have been called. + ArgumentCaptor intentCaptor = ArgumentCaptor.forClass(Intent.class); + verify(mockActivity, times(1)).startActivityForResult(intentCaptor.capture(), anyInt()); + Intent intent = intentCaptor.getValue(); + assertEquals(intent.getStringExtra(Intent.EXTRA_PROCESS_TEXT), textToBeProcessed); + + // Simulate an Android activity answer which does not return a value. + Intent resultIntent = new Intent(); + processTextPlugin.onActivityResult(result.hashCode(), Activity.RESULT_OK, resultIntent); + + // Success with no returned value is expected. + verify(result).success(null); + } + + @SuppressWarnings("deprecation") + // setMessageHandler is deprecated. + @Test + public void performProcessTextActionWithReturnedValue() { + DartExecutor mockBinaryMessenger = mock(DartExecutor.class); + PackageManager mockPackageManager = mock(PackageManager.class); + ProcessTextChannel processTextChannel = + new ProcessTextChannel(mockBinaryMessenger, mockPackageManager); + + // Set up mocked result for PackageManager.queryIntentActivities. + ResolveInfo action1 = createFakeResolveInfo("Action1", mockPackageManager); + ResolveInfo action2 = createFakeResolveInfo("Action2", mockPackageManager); + List infos = new ArrayList(Arrays.asList(action1, action2)); + when(mockPackageManager.queryIntentActivities( + any(Intent.class), any(PackageManager.ResolveInfoFlags.class))) + .thenReturn(infos); + + // ProcessTextPlugin should retrieve the mocked text actions. + ProcessTextPlugin processTextPlugin = new ProcessTextPlugin(processTextChannel); + Map textActions = processTextPlugin.queryTextActions(); + final String action1Id = "mockActivityName.Action1"; + final String action2Id = "mockActivityName.Action2"; + assertEquals(textActions, Map.of(action1Id, "Action1", action2Id, "Action2")); + + // Set up the activity binding. + ActivityPluginBinding mockActivityPluginBinding = mock(ActivityPluginBinding.class); + Activity mockActivity = mock(Activity.class); + when(mockActivityPluginBinding.getActivity()).thenReturn(mockActivity); + processTextPlugin.onAttachedToActivity(mockActivityPluginBinding); + + // Execute the first action. + String textToBeProcessed = "Flutter!"; + MethodChannel.Result result = mock(MethodChannel.Result.class); + processTextPlugin.processTextAction(action1Id, textToBeProcessed, false, result); + + // Activity.startActivityForResult should have been called. + ArgumentCaptor intentCaptor = ArgumentCaptor.forClass(Intent.class); + verify(mockActivity, times(1)).startActivityForResult(intentCaptor.capture(), anyInt()); + Intent intent = intentCaptor.getValue(); + assertEquals(intent.getStringExtra(Intent.EXTRA_PROCESS_TEXT), textToBeProcessed); + + // Simulate an Android activity answer which returns a transformed text. + String processedText = "Flutter!!!"; + Intent resultIntent = new Intent(); + resultIntent.putExtra(Intent.EXTRA_PROCESS_TEXT, processedText); + processTextPlugin.onActivityResult(result.hashCode(), Activity.RESULT_OK, resultIntent); + + // Success with the transformed text is expected. + verify(result).success(processedText); + } + + @SuppressWarnings("deprecation") + // setMessageHandler is deprecated. + @Test + public void doNotCrashOnNonRelatedActivityResult() { + DartExecutor mockBinaryMessenger = mock(DartExecutor.class); + PackageManager mockPackageManager = mock(PackageManager.class); + ProcessTextChannel processTextChannel = + new ProcessTextChannel(mockBinaryMessenger, mockPackageManager); + + // Set up mocked result for PackageManager.queryIntentActivities. + ResolveInfo action1 = createFakeResolveInfo("Action1", mockPackageManager); + ResolveInfo action2 = createFakeResolveInfo("Action2", mockPackageManager); + List infos = new ArrayList(Arrays.asList(action1, action2)); + when(mockPackageManager.queryIntentActivities( + any(Intent.class), any(PackageManager.ResolveInfoFlags.class))) + .thenReturn(infos); + + // ProcessTextPlugin should retrieve the mocked text actions. + ProcessTextPlugin processTextPlugin = new ProcessTextPlugin(processTextChannel); + Map textActions = processTextPlugin.queryTextActions(); + final String action1Id = "mockActivityName.Action1"; + final String action2Id = "mockActivityName.Action2"; + assertEquals(textActions, Map.of(action1Id, "Action1", action2Id, "Action2")); + + // Set up the activity binding. + ActivityPluginBinding mockActivityPluginBinding = mock(ActivityPluginBinding.class); + Activity mockActivity = mock(Activity.class); + when(mockActivityPluginBinding.getActivity()).thenReturn(mockActivity); + processTextPlugin.onAttachedToActivity(mockActivityPluginBinding); + + // Execute the first action. + String textToBeProcessed = "Flutter!"; + MethodChannel.Result result = mock(MethodChannel.Result.class); + processTextPlugin.processTextAction(action1Id, textToBeProcessed, false, result); + + // Activity.startActivityForResult should have been called. + ArgumentCaptor intentCaptor = ArgumentCaptor.forClass(Intent.class); + verify(mockActivity, times(1)).startActivityForResult(intentCaptor.capture(), anyInt()); + Intent intent = intentCaptor.getValue(); + assertEquals(intent.getStringExtra(Intent.EXTRA_PROCESS_TEXT), textToBeProcessed); + + // Result to a request not sent by this plugin should be ignored. + final int externalRequestCode = 42; + processTextPlugin.onActivityResult(externalRequestCode, Activity.RESULT_OK, new Intent()); + + // Simulate an Android activity answer which returns a transformed text. + String processedText = "Flutter!!!"; + Intent resultIntent = new Intent(); + resultIntent.putExtra(Intent.EXTRA_PROCESS_TEXT, processedText); + processTextPlugin.onActivityResult(result.hashCode(), Activity.RESULT_OK, resultIntent); + + // Success with the transformed text is expected. + verify(result).success(processedText); + } + + private ResolveInfo createFakeResolveInfo(String label, PackageManager mockPackageManager) { + ResolveInfo resolveInfo = mock(ResolveInfo.class); + ActivityInfo activityInfo = new ActivityInfo(); + when(resolveInfo.loadLabel(mockPackageManager)).thenReturn(label); + + // Use Java reflection to set required member variables. + try { + Field activityField = ResolveInfo.class.getDeclaredField("activityInfo"); + activityField.setAccessible(true); + activityField.set(resolveInfo, activityInfo); + Field packageNameField = PackageItemInfo.class.getDeclaredField("packageName"); + packageNameField.setAccessible(true); + packageNameField.set(activityInfo, "mockActivityPackageName"); + Field nameField = PackageItemInfo.class.getDeclaredField("name"); + nameField.setAccessible(true); + nameField.set(activityInfo, "mockActivityName." + label); + } catch (Exception ex) { + // Test will failed if reflection APIs throw. + } + + return resolveInfo; + } +} From acb9e2473e0ac82d532619f86e0094d8d063a0f8 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 16 Oct 2023 02:14:04 -0400 Subject: [PATCH 673/859] Roll Skia from 798ef5becc8d to a83914bb86c9 (1 revision) (#46938) https://skia.googlesource.com/skia.git/+log/798ef5becc8d..a83914bb86c9 2023-10-16 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from 77ae6a2042d8 to b7f47ce3bc13 (3 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jsimmons@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index aa9d52dddc502..c1a1d5c6eb6f1 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '798ef5becc8dfe037982a20f0bb250aaf6b922a2', + 'skia_revision': 'a83914bb86c9cf785d18381cf79c16d63a42f623', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index cf955c77c50b9..7e6da9d8c7367 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 6d4c2be7db1859080bc7848573413609 +Signature: 947534a16c5dcca3d24bf2033f7fc045 ==================================================================================================== LIBRARY: etc1 From fa8a16cb43b076a23ebf2ae86a04d854d2ae2372 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 16 Oct 2023 03:10:19 -0400 Subject: [PATCH 674/859] Roll Skia from a83914bb86c9 to 36503efe4154 (1 revision) (#46939) https://skia.googlesource.com/skia.git/+log/a83914bb86c9..36503efe4154 2023-10-16 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from b7f47ce3bc13 to 4e346b2c25b8 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jsimmons@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index c1a1d5c6eb6f1..f20d187fa1956 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'a83914bb86c9cf785d18381cf79c16d63a42f623', + 'skia_revision': '36503efe4154fb4bfb216327e45dfe84f4e44e95', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 4dc3b1eeea86a430ad6eeb16f894e492f5e306f8 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 16 Oct 2023 03:45:25 -0400 Subject: [PATCH 675/859] Roll Skia from 36503efe4154 to 238ab1631282 (1 revision) (#46940) https://skia.googlesource.com/skia.git/+log/36503efe4154..238ab1631282 2023-10-16 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 5b7763f9d427 to cd6b265c2623 (9 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jsimmons@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index f20d187fa1956..190c20d077c47 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '36503efe4154fb4bfb216327e45dfe84f4e44e95', + 'skia_revision': '238ab16312824224130de711c2dd7cb8dc990a43', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 02d6cbc19ba1341958465ae9d38935750aa6bf49 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 16 Oct 2023 06:35:39 -0400 Subject: [PATCH 676/859] Roll Fuchsia Linux SDK from D-ejMxpgAyRoO6DUr... to 6E-cSq679DjzBMcqY... (#46942) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jsimmons@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 190c20d077c47..e10057d147481 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'D-ejMxpgAyRoO6DUrufRkehpohSUw9r-MywmP0sLM-4C' + 'version': '6E-cSq679DjzBMcqYCeaCiO28YBOmspEihuHpSPuCPEC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', From 00734d7d4434183dbd66e5e14223f90f608238ba Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 16 Oct 2023 07:07:48 -0400 Subject: [PATCH 677/859] Roll Fuchsia Mac SDK from CQhXLIfBTsZWBA4XM... to bMDZdOFfPiVkjIdiv... (#46943) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jsimmons@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index e10057d147481..1dfe4e9bea88a 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'CQhXLIfBTsZWBA4XMf9D4SPj4qtMa2bWzwLad4jv6sUC' + 'version': 'bMDZdOFfPiVkjIdivQYcrkiHrmY5jDZOrEVWkjDi_RUC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 998cb820625027ea4aaacaa6088bce1c3c088a13 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Mon, 16 Oct 2023 07:37:18 -0700 Subject: [PATCH 678/859] Avoid a deadlock in the flutter_tester process when deleting the Impeller Vulkan context during shutdown (#46860) The Impeller ContextVK contains a ConcurrentMessageLoop whose threads may invoke Dart timeline APIs. The Dart APIs will create a thread-local object that will be deleted during thread shutdown. Therefore, these threads should not outlive the engine/Shell and Dart VM. Previously, RunTester held the ImpellerVulkanContextHolder on the stack, and its reference to the ContextVK would be dropped while exiting the function after the Shell is destructed. This PR moves the contents of the tester's ImpellerVulkanContextHolder out of the instance on the stack and into a lambda owned by the Shell. It also reenables the flutter_tester Impeller tests in the run_tests script. --- shell/testing/tester_main.cc | 102 ++++++++++++++++++----------------- testing/run_tests.py | 34 ++++++------ 2 files changed, 72 insertions(+), 64 deletions(-) diff --git a/shell/testing/tester_main.cc b/shell/testing/tester_main.cc index 8d59300fc27eb..607dc6a6a61a3 100644 --- a/shell/testing/tester_main.cc +++ b/shell/testing/tester_main.cc @@ -64,10 +64,57 @@ static std::vector> ShaderLibraryMappings() { } struct ImpellerVulkanContextHolder { + ImpellerVulkanContextHolder() = default; + ImpellerVulkanContextHolder(ImpellerVulkanContextHolder&&) = default; fml::RefPtr vulkan_proc_table; std::shared_ptr context; std::shared_ptr surface_context; + + bool Initialize(bool enable_validation); }; + +bool ImpellerVulkanContextHolder::Initialize(bool enable_validation) { + vulkan_proc_table = + fml::MakeRefCounted(VULKAN_SO_PATH); + if (!vulkan_proc_table->NativeGetInstanceProcAddr()) { + FML_LOG(ERROR) << "Could not load Swiftshader library."; + return false; + } + impeller::ContextVK::Settings context_settings; + context_settings.proc_address_callback = + vulkan_proc_table->NativeGetInstanceProcAddr(); + context_settings.shader_libraries_data = ShaderLibraryMappings(); + context_settings.cache_directory = fml::paths::GetCachesDirectory(); + context_settings.enable_validation = enable_validation; + + context = impeller::ContextVK::Create(std::move(context_settings)); + if (!context || !context->IsValid()) { + VALIDATION_LOG << "Could not create Vulkan context."; + return false; + } + + impeller::vk::SurfaceKHR vk_surface; + impeller::vk::HeadlessSurfaceCreateInfoEXT surface_create_info; + auto res = context->GetInstance().createHeadlessSurfaceEXT( + &surface_create_info, // surface create info + nullptr, // allocator + &vk_surface // surface + ); + if (res != impeller::vk::Result::eSuccess) { + VALIDATION_LOG << "Could not create surface for tester " + << impeller::vk::to_string(res); + return false; + } + + impeller::vk::UniqueSurfaceKHR surface{vk_surface, context->GetInstance()}; + surface_context = context->CreateSurfaceContext(); + if (!surface_context->SetWindowSurface(std::move(surface))) { + VALIDATION_LOG << "Could not set up surface for context."; + return false; + } + return true; +} + #else struct ImpellerVulkanContextHolder {}; #endif // IMPELLER_SUPPORTS_RENDERING @@ -126,7 +173,7 @@ class TesterPlatformView : public PlatformView, public: TesterPlatformView(Delegate& delegate, const TaskRunners& task_runners, - ImpellerVulkanContextHolder impeller_context_holder) + ImpellerVulkanContextHolder&& impeller_context_holder) : PlatformView(delegate, task_runners), impeller_context_holder_(std::move(impeller_context_holder)) {} @@ -313,60 +360,19 @@ int RunTester(const flutter::Settings& settings, #if ALLOW_IMPELLER if (settings.enable_impeller) { - impeller_context_holder.vulkan_proc_table = - fml::MakeRefCounted(VULKAN_SO_PATH); - if (!impeller_context_holder.vulkan_proc_table - ->NativeGetInstanceProcAddr()) { - FML_LOG(ERROR) << "Could not load Swiftshader library."; - return EXIT_FAILURE; - } - impeller::ContextVK::Settings context_settings; - context_settings.proc_address_callback = - impeller_context_holder.vulkan_proc_table->NativeGetInstanceProcAddr(); - context_settings.shader_libraries_data = ShaderLibraryMappings(); - context_settings.cache_directory = fml::paths::GetCachesDirectory(); - context_settings.enable_validation = settings.enable_vulkan_validation; - - impeller_context_holder.context = - impeller::ContextVK::Create(std::move(context_settings)); - if (!impeller_context_holder.context || - !impeller_context_holder.context->IsValid()) { - VALIDATION_LOG << "Could not create Vulkan context."; - return EXIT_FAILURE; - } - - impeller::vk::SurfaceKHR vk_surface; - impeller::vk::HeadlessSurfaceCreateInfoEXT surface_create_info; - auto res = - impeller_context_holder.context->GetInstance().createHeadlessSurfaceEXT( - &surface_create_info, // surface create info - nullptr, // allocator - &vk_surface // surface - ); - if (res != impeller::vk::Result::eSuccess) { - VALIDATION_LOG << "Could not create surface for tester " - << impeller::vk::to_string(res); - return EXIT_FAILURE; - } - - impeller::vk::UniqueSurfaceKHR surface{ - vk_surface, impeller_context_holder.context->GetInstance()}; - impeller_context_holder.surface_context = - impeller_context_holder.context->CreateSurfaceContext(); - if (!impeller_context_holder.surface_context->SetWindowSurface( - std::move(surface))) { - VALIDATION_LOG << "Could not set up surface for context."; + if (!impeller_context_holder.Initialize( + settings.enable_vulkan_validation)) { return EXIT_FAILURE; } } #endif // ALLOW_IMPELLER Shell::CreateCallback on_create_platform_view = - [impeller_context_holder = - std::move(impeller_context_holder)](Shell& shell) { + fml::MakeCopyable([impeller_context_holder = std::move( + impeller_context_holder)](Shell& shell) mutable { return std::make_unique( - shell, shell.GetTaskRunners(), impeller_context_holder); - }; + shell, shell.GetTaskRunners(), std::move(impeller_context_holder)); + }); Shell::CreateCallback on_create_rasterizer = [](Shell& shell) { return std::make_unique( diff --git a/testing/run_tests.py b/testing/run_tests.py index 42488b83c2f5c..7f196402c90e7 100755 --- a/testing/run_tests.py +++ b/testing/run_tests.py @@ -867,15 +867,16 @@ def gather_dart_tests(build_dir, test_filter): logger.info( "Gathering dart test '%s' with observatory enabled", dart_test_file ) - for multithreaded, enable_impeller in [(True, False), (False, False)]: - yield gather_dart_test( - build_dir, dart_test_file, - FlutterTesterOptions( - multithreaded=multithreaded, - enable_impeller=enable_impeller, - enable_observatory=True - ) - ) + for multithreaded in [False, True]: + for enable_impeller in [False, True]: + yield gather_dart_test( + build_dir, dart_test_file, + FlutterTesterOptions( + multithreaded=multithreaded, + enable_impeller=enable_impeller, + enable_observatory=True + ) + ) for dart_test_file in dart_tests: if test_filter is not None and os.path.basename(dart_test_file @@ -883,13 +884,14 @@ def gather_dart_tests(build_dir, test_filter): logger.info("Skipping '%s' due to filter.", dart_test_file) else: logger.info("Gathering dart test '%s'", dart_test_file) - for multithreaded, enable_impeller in [(True, False), (False, False)]: - yield gather_dart_test( - build_dir, dart_test_file, - FlutterTesterOptions( - multithreaded=multithreaded, enable_impeller=enable_impeller - ) - ) + for multithreaded in [False, True]: + for enable_impeller in [False, True]: + yield gather_dart_test( + build_dir, dart_test_file, + FlutterTesterOptions( + multithreaded=multithreaded, enable_impeller=enable_impeller + ) + ) def gather_dart_smoke_test(build_dir, test_filter): From 0becdf776749a6c9bef8825984ce1e9c976223a3 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 16 Oct 2023 10:41:22 -0400 Subject: [PATCH 679/859] Roll Skia from 238ab1631282 to c03c9a02f6ef (1 revision) (#46946) https://skia.googlesource.com/skia.git/+log/238ab1631282..c03c9a02f6ef 2023-10-16 egdaniel@google.com Revert "When waiting on client provided semaphores, only block fragment stage work." If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jsimmons@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index 1dfe4e9bea88a..8ab235d060101 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '238ab16312824224130de711c2dd7cb8dc990a43', + 'skia_revision': 'c03c9a02f6ef90b729ffbcca44844004534f56c7', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 7e6da9d8c7367..e895ced788b4a 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 947534a16c5dcca3d24bf2033f7fc045 +Signature: 7a968c23d6866e07c0546faaa759712d ==================================================================================================== LIBRARY: etc1 @@ -391,7 +391,6 @@ FILE: ../../../third_party/skia/relnotes/grsurface-info.md FILE: ../../../third_party/skia/relnotes/mesh.md FILE: ../../../third_party/skia/relnotes/readbuffer-deserial.md FILE: ../../../third_party/skia/relnotes/vk-directcontext.md -FILE: ../../../third_party/skia/relnotes/waitSemaphore.md FILE: ../../../third_party/skia/src/gpu/gpu_workaround_list.txt FILE: ../../../third_party/skia/src/ports/fontations/Cargo.toml FILE: ../../../third_party/skia/src/sksl/generated/sksl_compute.minified.sksl From 33a4d339d6a687088cddd1dc2898070caa3a7a3d Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 16 Oct 2023 11:17:28 -0400 Subject: [PATCH 680/859] Roll Skia from c03c9a02f6ef to 44a0f98aa71a (1 revision) (#46947) https://skia.googlesource.com/skia.git/+log/c03c9a02f6ef..44a0f98aa71a 2023-10-16 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 5c0370a84db5 to 4d77c74a14a0 (6 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jsimmons@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 8ab235d060101..b42f6fd7760af 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'c03c9a02f6ef90b729ffbcca44844004534f56c7', + 'skia_revision': '44a0f98aa71ad6b784e945b1dea397eb30ec5c0a', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 3f78e670b024a82ed85b713316862cd395ea529e Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 16 Oct 2023 12:56:21 -0400 Subject: [PATCH 681/859] Roll Skia from 44a0f98aa71a to 2db9c220ba00 (1 revision) (#46949) https://skia.googlesource.com/skia.git/+log/44a0f98aa71a..2db9c220ba00 2023-10-16 johnstiles@google.com Fix TArray::push_back when pushing references inside the container. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jsimmons@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index b42f6fd7760af..285e56a38931b 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '44a0f98aa71ad6b784e945b1dea397eb30ec5c0a', + 'skia_revision': '2db9c220ba0040305735aab3dadec153f7ae6373', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index e895ced788b4a..7496ca9d809e3 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 7a968c23d6866e07c0546faaa759712d +Signature: cdde257506c50b0b1b899e56059c017d ==================================================================================================== LIBRARY: etc1 From b0f10d808e3a34a92c3a9ebbf2e9ffd1058e5ac4 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 16 Oct 2023 13:31:07 -0400 Subject: [PATCH 682/859] Roll Dart SDK from 64a485bb79bd to 12f6559bd6ed (1 revision) (#46953) https://dart.googlesource.com/sdk.git/+log/64a485bb79bd..12f6559bd6ed 2023-10-16 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-28.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jsimmons@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 285e56a38931b..41f43ceecba19 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '64a485bb79bd3929d5af31d57926758f182cf3f2', + 'dart_revision': '12f6559bd6ed47b58bf7c21e74b0ffa5cf3b68ae', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index ced2b69df736f..50994747c46f4 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: 7a99980716e15818b4a24f2d30b3c9fa +Signature: 3a48199c0fcc7a83da6640604b0df3fc ==================================================================================================== LIBRARY: dart From 39b2d3ed2212ffad5fcc61a753eda387ba127f51 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 16 Oct 2023 13:43:28 -0400 Subject: [PATCH 683/859] Roll Skia from 2db9c220ba00 to 675f088b9ac4 (2 revisions) (#46954) https://skia.googlesource.com/skia.git/+log/2db9c220ba00..675f088b9ac4 2023-10-16 johnstiles@google.com Make TArray::bytes a static function. 2023-10-16 johnstiles@google.com Factor out growAndPushBack into a helper function. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jsimmons@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 41f43ceecba19..638c5cbdebcdb 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '2db9c220ba0040305735aab3dadec153f7ae6373', + 'skia_revision': '675f088b9ac40837541db9ee05b17c702097a72b', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 7496ca9d809e3..da41e1f87c701 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: cdde257506c50b0b1b899e56059c017d +Signature: 95b229c06464b5b2380d14193495ab12 ==================================================================================================== LIBRARY: etc1 From b205bb58db2ff77f0e27e6ecbe5f565c8b6571cc Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Mon, 16 Oct 2023 11:06:10 -0700 Subject: [PATCH 684/859] [Impeller] Adjust clip coverage operations to handle per-pass clip stacks (#46912) https://github.com/flutter/engine/pull/46597 creates a new clip coverage stack for each subpass. This PR updates some clip coverage operations and assertions in EntityPass::OnRender to reflect that the current clip coverage stack only contains the range of depths within the current subpass. --- impeller/entity/entity_pass.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/impeller/entity/entity_pass.cc b/impeller/entity/entity_pass.cc index 11219ad4937d5..4d6897b5b3445 100644 --- a/impeller/entity/entity_pass.cc +++ b/impeller/entity/entity_pass.cc @@ -809,7 +809,8 @@ bool EntityPass::OnRender( ClipCoverageLayer{.coverage = clip_coverage.coverage, .clip_depth = element_entity.GetClipDepth() + 1}); FML_DCHECK(clip_coverage_stack.back().clip_depth == - clip_coverage_stack.size() - 1); + clip_coverage_stack.front().clip_depth + + clip_coverage_stack.size() - 1); if (!op.has_value()) { // Running this append op won't impact the clip buffer because the @@ -824,20 +825,21 @@ bool EntityPass::OnRender( return true; } - auto restoration_depth = element_entity.GetClipDepth(); - FML_DCHECK(restoration_depth < clip_coverage_stack.size()); + auto restoration_index = element_entity.GetClipDepth() - + clip_coverage_stack.front().clip_depth; + FML_DCHECK(restoration_index < clip_coverage_stack.size()); // We only need to restore the area that covers the coverage of the // clip rect at target depth + 1. std::optional restore_coverage = - (restoration_depth + 1 < clip_coverage_stack.size()) - ? clip_coverage_stack[restoration_depth + 1].coverage + (restoration_index + 1 < clip_coverage_stack.size()) + ? clip_coverage_stack[restoration_index + 1].coverage : std::nullopt; if (restore_coverage.has_value()) { // Make the coverage rectangle relative to the current pass. restore_coverage->origin -= global_pass_position; } - clip_coverage_stack.resize(restoration_depth + 1); + clip_coverage_stack.resize(restoration_index + 1); if (!clip_coverage_stack.back().coverage.has_value()) { // Running this restore op won't make anything renderable, so skip it. From e920746fa9a69b51847ad29a268c14d2db916711 Mon Sep 17 00:00:00 2001 From: gaaclarke <30870216+gaaclarke@users.noreply.github.com> Date: Mon, 16 Oct 2023 11:31:13 -0700 Subject: [PATCH 685/859] [Impeller] implements a retry mechanism for dart:ui/Image.toByteData. (#46840) Design doc: [link](https://docs.google.com/document/d/1Uuiw3pdQxNFTA8OQuZ-kuvYg1NB42XgccQCZeqr4oII/edit#heading=h.hn6wreyrz6fm) fixes: https://github.com/flutter/flutter/issues/135245 One slight deviation from the design doc is that I decided to make ContextMTL respond to changes to the SyncSwitch instead of having it observe the app state directly. The benefits are: 1) This keeps that functionality in one location 1) It makes writing tests much easier 1) There's no need of conditional compilation between macos and ios 1) There is no need to add an objc class [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- fml/synchronization/sync_switch.cc | 20 ++++- fml/synchronization/sync_switch.h | 17 +++++ impeller/renderer/backend/metal/context_mtl.h | 19 ++++- .../renderer/backend/metal/context_mtl.mm | 31 +++++++- impeller/renderer/context.h | 21 ++++++ lib/ui/fixtures/ui_test.dart | 40 +++++++++- lib/ui/painting/image_encoding_impeller.cc | 75 +++++++++++++++---- lib/ui/painting/image_encoding_unittests.cc | 70 ++++++++++++++++- shell/common/shell_test.cc | 4 +- shell/common/shell_test.h | 2 +- .../Source/FlutterEnginePlatformViewTest.mm | 6 +- 11 files changed, 279 insertions(+), 26 deletions(-) diff --git a/fml/synchronization/sync_switch.cc b/fml/synchronization/sync_switch.cc index ac951062267f8..7340086af95b3 100644 --- a/fml/synchronization/sync_switch.cc +++ b/fml/synchronization/sync_switch.cc @@ -32,8 +32,26 @@ void SyncSwitch::Execute(const SyncSwitch::Handlers& handlers) const { } void SyncSwitch::SetSwitch(bool value) { + { + fml::UniqueLock lock(*mutex_); + value_ = value; + } + for (Observer* observer : observers_) { + observer->OnSyncSwitchUpdate(value); + } +} + +void SyncSwitch::AddObserver(Observer* observer) const { fml::UniqueLock lock(*mutex_); - value_ = value; + if (std::find(observers_.begin(), observers_.end(), observer) == + observers_.end()) { + observers_.push_back(observer); + } } +void SyncSwitch::RemoveObserver(Observer* observer) const { + fml::UniqueLock lock(*mutex_); + observers_.erase(std::remove(observers_.begin(), observers_.end(), observer), + observers_.end()); +} } // namespace fml diff --git a/fml/synchronization/sync_switch.h b/fml/synchronization/sync_switch.h index 470072fe4f25d..c01c05aac25ff 100644 --- a/fml/synchronization/sync_switch.h +++ b/fml/synchronization/sync_switch.h @@ -21,6 +21,16 @@ namespace fml { /// at a time. class SyncSwitch { public: + /// Observes changes to the SyncSwitch. + class Observer { + public: + virtual ~Observer() = default; + /// `new_is_disabled` not guaranteed to be the value of the SyncSwitch + /// during execution, it should be checked with calls to + /// SyncSwitch::Execute. + virtual void OnSyncSwitchUpdate(bool new_is_disabled) = 0; + }; + /// Represents the 2 code paths available when calling |SyncSwitch::Execute|. struct Handlers { /// Sets the handler that will be executed if the |SyncSwitch| is true. @@ -53,8 +63,15 @@ class SyncSwitch { /// @param[in] value New value for the |SyncSwitch|. void SetSwitch(bool value); + /// Threadsafe. + void AddObserver(Observer* observer) const; + + /// Threadsafe. + void RemoveObserver(Observer* observer) const; + private: mutable std::unique_ptr mutex_; + mutable std::vector observers_; bool value_; FML_DISALLOW_COPY_AND_ASSIGN(SyncSwitch); diff --git a/impeller/renderer/backend/metal/context_mtl.h b/impeller/renderer/backend/metal/context_mtl.h index c272c68769fe9..165ff722e256a 100644 --- a/impeller/renderer/backend/metal/context_mtl.h +++ b/impeller/renderer/backend/metal/context_mtl.h @@ -6,8 +6,8 @@ #include +#include #include -#include #include "flutter/fml/concurrent_message_loop.h" #include "flutter/fml/macros.h" @@ -93,7 +93,20 @@ class ContextMTL final : public Context, std::shared_ptr GetIsGpuDisabledSyncSwitch() const; + // |Context| + void StoreTaskForGPU(std::function task) override; + private: + class SyncSwitchObserver : public fml::SyncSwitch::Observer { + public: + SyncSwitchObserver(ContextMTL& parent); + virtual ~SyncSwitchObserver() = default; + void OnSyncSwitchUpdate(bool new_value) override; + + private: + ContextMTL& parent_; + }; + id device_ = nullptr; id command_queue_ = nullptr; std::shared_ptr shader_library_; @@ -103,6 +116,8 @@ class ContextMTL final : public Context, std::shared_ptr device_capabilities_; std::shared_ptr raster_message_loop_; std::shared_ptr is_gpu_disabled_sync_switch_; + std::deque> tasks_awaiting_gpu_; + std::unique_ptr sync_switch_observer_; bool is_valid_ = false; ContextMTL( @@ -114,6 +129,8 @@ class ContextMTL final : public Context, std::shared_ptr CreateCommandBufferInQueue( id queue) const; + void FlushTasksAwaitingGPU(); + FML_DISALLOW_COPY_AND_ASSIGN(ContextMTL); }; diff --git a/impeller/renderer/backend/metal/context_mtl.mm b/impeller/renderer/backend/metal/context_mtl.mm index 528c1854802a3..5297ab987145b 100644 --- a/impeller/renderer/backend/metal/context_mtl.mm +++ b/impeller/renderer/backend/metal/context_mtl.mm @@ -83,6 +83,9 @@ static bool DeviceSupportsComputeSubgroups(id device) { return; } + sync_switch_observer_.reset(new SyncSwitchObserver(*this)); + is_gpu_disabled_sync_switch_->AddObserver(sync_switch_observer_.get()); + // Worker task runner. { raster_message_loop_ = fml::ConcurrentMessageLoop::Create( @@ -284,7 +287,9 @@ new ContextMTL(device, command_queue, return context; } -ContextMTL::~ContextMTL() = default; +ContextMTL::~ContextMTL() { + is_gpu_disabled_sync_switch_->RemoveObserver(sync_switch_observer_.get()); +} Context::BackendType ContextMTL::GetBackendType() const { return Context::BackendType::kMetal; @@ -376,4 +381,28 @@ new ContextMTL(device, command_queue, return buffer; } +void ContextMTL::StoreTaskForGPU(std::function task) { + tasks_awaiting_gpu_.emplace_back(std::move(task)); + while (tasks_awaiting_gpu_.size() > kMaxTasksAwaitingGPU) { + tasks_awaiting_gpu_.front()(); + tasks_awaiting_gpu_.pop_front(); + } +} + +void ContextMTL::FlushTasksAwaitingGPU() { + for (const auto& task : tasks_awaiting_gpu_) { + task(); + } + tasks_awaiting_gpu_.clear(); +} + +ContextMTL::SyncSwitchObserver::SyncSwitchObserver(ContextMTL& parent) + : parent_(parent) {} + +void ContextMTL::SyncSwitchObserver::OnSyncSwitchUpdate(bool new_is_disabled) { + if (!new_is_disabled) { + parent_.FlushTasksAwaitingGPU(); + } +} + } // namespace impeller diff --git a/impeller/renderer/context.h b/impeller/renderer/context.h index 3cc847235cd7d..3d0cb9d97ad6e 100644 --- a/impeller/renderer/context.h +++ b/impeller/renderer/context.h @@ -52,6 +52,14 @@ class Context { kVulkan, }; + /// The maximum number of tasks that should ever be stored for + /// `StoreTaskForGPU`. + /// + /// This number was arbitrarily chosen. The idea is that this is a somewhat + /// rare situation where tasks happen to get executed in that tiny amount of + /// time while an app is being backgrounded but still executing. + static constexpr int32_t kMaxTasksAwaitingGPU = 10; + //---------------------------------------------------------------------------- /// @brief Destroys an Impeller context. /// @@ -176,6 +184,19 @@ class Context { CaptureContext capture; + /// Stores a task on the `ContextMTL` that is awaiting access for the GPU. + /// + /// The task will be executed in the event that the GPU access has changed to + /// being available or that the task has been canceled. The task should + /// operate with the `SyncSwitch` to make sure the GPU is accessible. + /// + /// Threadsafe. + /// + /// `task` will be executed on the platform thread. + virtual void StoreTaskForGPU(std::function task) { + FML_CHECK(false && "not supported in this context"); + } + protected: Context(); diff --git a/lib/ui/fixtures/ui_test.dart b/lib/ui/fixtures/ui_test.dart index 38866fb476ced..dc4f75bb67f33 100644 --- a/lib/ui/fixtures/ui_test.dart +++ b/lib/ui/fixtures/ui_test.dart @@ -325,7 +325,11 @@ external void _validateExternal(Uint8List result); @pragma('vm:external-name', 'ValidateError') external void _validateError(String? error); @pragma('vm:external-name', 'TurnOffGPU') -external void _turnOffGPU(); +external void _turnOffGPU(bool value); +@pragma('vm:external-name', 'FlushGpuAwaitingTasks') +external void _flushGpuAwaitingTasks(); +@pragma('vm:external-name', 'ValidateNotNull') +external void _validateNotNull(Object? object); @pragma('vm:entry-point') Future toByteDataWithoutGPU() async { @@ -338,12 +342,40 @@ Future toByteDataWithoutGPU() async { canvas.drawCircle(c, 25.0, paint); final Picture picture = pictureRecorder.endRecording(); final Image image = await picture.toImage(100, 100); - _turnOffGPU(); + _turnOffGPU(true); + Timer flusher = Timer.periodic(Duration(milliseconds: 1), (timer) { + _flushGpuAwaitingTasks(); + }); try { ByteData? byteData = await image.toByteData(); _validateError(null); - } catch (ex) { - _validateError(ex.toString()); + } catch (error) { + _validateError(error.toString()); + } finally { + flusher.cancel(); + } +} + +@pragma('vm:entry-point') +Future toByteDataRetries() async { + final PictureRecorder pictureRecorder = PictureRecorder(); + final Canvas canvas = Canvas(pictureRecorder); + final Paint paint = Paint() + ..color = Color.fromRGBO(255, 255, 255, 1.0) + ..style = PaintingStyle.fill; + final Offset c = Offset(50.0, 50.0); + canvas.drawCircle(c, 25.0, paint); + final Picture picture = pictureRecorder.endRecording(); + final Image image = await picture.toImage(100, 100); + _turnOffGPU(true); + Future.delayed(Duration(milliseconds: 10), () { + _turnOffGPU(false); + }); + try { + ByteData? byteData = await image.toByteData(); + _validateNotNull(byteData); + } catch (error) { + _validateNotNull(null); } } diff --git a/lib/ui/painting/image_encoding_impeller.cc b/lib/ui/painting/image_encoding_impeller.cc index 4e403d5d3f2bf..0801f7930d12d 100644 --- a/lib/ui/painting/image_encoding_impeller.cc +++ b/lib/ui/painting/image_encoding_impeller.cc @@ -56,21 +56,68 @@ sk_sp ConvertBufferToSkImage( return raster_image; } -void DoConvertImageToRasterImpeller( +[[nodiscard]] fml::Status DoConvertImageToRasterImpeller( const sk_sp& dl_image, - std::function>)> encode_task, + const std::function>)>& encode_task, const std::shared_ptr& is_gpu_disabled_sync_switch, const std::shared_ptr& impeller_context) { + fml::Status result; is_gpu_disabled_sync_switch->Execute( fml::SyncSwitch::Handlers() - .SetIfTrue([&encode_task] { - encode_task( - fml::Status(fml::StatusCode::kUnavailable, "GPU unavailable.")); + .SetIfTrue([&result] { + result = + fml::Status(fml::StatusCode::kUnavailable, "GPU unavailable."); }) .SetIfFalse([&dl_image, &encode_task, &impeller_context] { ImageEncodingImpeller::ConvertDlImageToSkImage( - dl_image, std::move(encode_task), impeller_context); + dl_image, encode_task, impeller_context); })); + return result; +} + +/// Same as `DoConvertImageToRasterImpeller` but it will attempt to retry the +/// operation if `DoConvertImageToRasterImpeller` returns kUnavailable when the +/// GPU becomes available again. +void DoConvertImageToRasterImpellerWithRetry( + const sk_sp& dl_image, + std::function>)>&& encode_task, + const std::shared_ptr& is_gpu_disabled_sync_switch, + const std::shared_ptr& impeller_context, + const fml::RefPtr& retry_runner) { + fml::Status status = DoConvertImageToRasterImpeller( + dl_image, encode_task, is_gpu_disabled_sync_switch, impeller_context); + if (!status.ok()) { + // If the conversion failed because of the GPU is unavailable, store the + // task on the Context so it can be executed when the GPU becomes available. + if (status.code() == fml::StatusCode::kUnavailable) { + impeller_context->StoreTaskForGPU( + [dl_image, encode_task = std::move(encode_task), + is_gpu_disabled_sync_switch, impeller_context, + retry_runner]() mutable { + auto retry_task = [dl_image, encode_task = std::move(encode_task), + is_gpu_disabled_sync_switch, impeller_context] { + fml::Status retry_status = DoConvertImageToRasterImpeller( + dl_image, encode_task, is_gpu_disabled_sync_switch, + impeller_context); + if (!retry_status.ok()) { + // The retry failed for some reason, maybe the GPU became + // unavailable again. Don't retry again, just fail in this case. + encode_task(retry_status); + } + }; + // If a `retry_runner` is specified, post the retry to it, otherwise + // execute it directly. + if (retry_runner) { + retry_runner->PostTask(retry_task); + } else { + retry_task(); + } + }); + } else { + // Pass on errors that are not `kUnavailable`. + encode_task(status); + } + } } } // namespace @@ -153,18 +200,20 @@ void ImageEncodingImpeller::ConvertImageToRaster( }; if (dl_image->owning_context() != DlImage::OwningContext::kRaster) { - DoConvertImageToRasterImpeller(dl_image, std::move(encode_task), - is_gpu_disabled_sync_switch, - impeller_context); + DoConvertImageToRasterImpellerWithRetry(dl_image, std::move(encode_task), + is_gpu_disabled_sync_switch, + impeller_context, + /*retry_runner=*/nullptr); return; } raster_task_runner->PostTask([dl_image, encode_task = std::move(encode_task), io_task_runner, is_gpu_disabled_sync_switch, - impeller_context]() mutable { - DoConvertImageToRasterImpeller(dl_image, std::move(encode_task), - is_gpu_disabled_sync_switch, - impeller_context); + impeller_context, + raster_task_runner]() mutable { + DoConvertImageToRasterImpellerWithRetry( + dl_image, std::move(encode_task), is_gpu_disabled_sync_switch, + impeller_context, raster_task_runner); }); } diff --git a/lib/ui/painting/image_encoding_unittests.cc b/lib/ui/painting/image_encoding_unittests.cc index cf8abf76b2f4f..8de593ce4bb73 100644 --- a/lib/ui/painting/image_encoding_unittests.cc +++ b/lib/ui/painting/image_encoding_unittests.cc @@ -226,6 +226,55 @@ std::shared_ptr MakeConvertDlImageToSkImageContext( } } // namespace +TEST_F(ShellTest, EncodeImageRetries) { +#ifndef FML_OS_MACOSX + // Only works on macos currently. + GTEST_SKIP(); +#endif + Settings settings = CreateSettingsForFixture(); + settings.enable_impeller = true; + TaskRunners task_runners("test", // label + GetCurrentTaskRunner(), // platform + CreateNewThread(), // raster + CreateNewThread(), // ui + CreateNewThread() // io + ); + + std::unique_ptr shell = CreateShell({ + .settings = settings, + .task_runners = task_runners, + }); + + auto turn_off_gpu = [&](Dart_NativeArguments args) { + auto handle = Dart_GetNativeArgument(args, 0); + bool value = true; + ASSERT_TRUE(Dart_IsBoolean(handle)); + Dart_BooleanValue(handle, &value); + TurnOffGPU(shell.get(), value); + }; + + AddNativeCallback("TurnOffGPU", CREATE_NATIVE_ENTRY(turn_off_gpu)); + + auto validate_not_null = [&](Dart_NativeArguments args) { + auto handle = Dart_GetNativeArgument(args, 0); + EXPECT_FALSE(Dart_IsNull(handle)); + message_latch.Signal(); + }; + + AddNativeCallback("ValidateNotNull", CREATE_NATIVE_ENTRY(validate_not_null)); + + ASSERT_TRUE(shell->IsSetup()); + auto configuration = RunConfiguration::InferFromSettings(settings); + configuration.SetEntrypoint("toByteDataRetries"); + + shell->RunEngine(std::move(configuration), [&](auto result) { + ASSERT_EQ(result, Engine::RunStatus::Success); + }); + + message_latch.Wait(); + DestroyShell(std::move(shell), task_runners); +} + TEST_F(ShellTest, EncodeImageFailsWithoutGPUImpeller) { #ifndef FML_OS_MACOSX // Only works on macos currently. @@ -257,11 +306,30 @@ TEST_F(ShellTest, EncodeImageFailsWithoutGPUImpeller) { }); auto turn_off_gpu = [&](Dart_NativeArguments args) { - TurnOffGPU(shell.get()); + auto handle = Dart_GetNativeArgument(args, 0); + bool value = true; + ASSERT_TRUE(Dart_IsBoolean(handle)); + Dart_BooleanValue(handle, &value); + TurnOffGPU(shell.get(), true); }; AddNativeCallback("TurnOffGPU", CREATE_NATIVE_ENTRY(turn_off_gpu)); + auto flush_awaiting_tasks = [&](Dart_NativeArguments args) { + task_runners.GetIOTaskRunner()->PostTask([&] { + std::shared_ptr impeller_context = + shell->GetIOManager()->GetImpellerContext(); + // This will cause the stored tasks to overflow and start throwing them + // away. + for (int i = 0; i < impeller::Context::kMaxTasksAwaitingGPU; ++i) { + impeller_context->StoreTaskForGPU([] {}); + } + }); + }; + + AddNativeCallback("FlushGpuAwaitingTasks", + CREATE_NATIVE_ENTRY(flush_awaiting_tasks)); + ASSERT_TRUE(shell->IsSetup()); auto configuration = RunConfiguration::InferFromSettings(settings); configuration.SetEntrypoint("toByteDataWithoutGPU"); diff --git a/shell/common/shell_test.cc b/shell/common/shell_test.cc index f9f59f7366de8..c673d4b429c9f 100644 --- a/shell/common/shell_test.cc +++ b/shell/common/shell_test.cc @@ -382,8 +382,8 @@ size_t ShellTest::GetLiveTrackedPathCount( }); } -void ShellTest::TurnOffGPU(Shell* shell) { - shell->is_gpu_disabled_sync_switch_->SetSwitch(true); +void ShellTest::TurnOffGPU(Shell* shell, bool value) { + shell->is_gpu_disabled_sync_switch_->SetSwitch(value); } } // namespace testing diff --git a/shell/common/shell_test.h b/shell/common/shell_test.h index dfcc22223e5ac..7ded997fbcdc5 100644 --- a/shell/common/shell_test.h +++ b/shell/common/shell_test.h @@ -135,7 +135,7 @@ class ShellTest : public FixtureTest { static size_t GetLiveTrackedPathCount( const std::shared_ptr& tracker); - static void TurnOffGPU(Shell* shell); + static void TurnOffGPU(Shell* shell, bool value); private: ThreadHost thread_host_; diff --git a/shell/platform/darwin/ios/framework/Source/FlutterEnginePlatformViewTest.mm b/shell/platform/darwin/ios/framework/Source/FlutterEnginePlatformViewTest.mm index 0b5526a5341a2..51c76156b4f98 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterEnginePlatformViewTest.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterEnginePlatformViewTest.mm @@ -65,6 +65,7 @@ @implementation FlutterEnginePlatformViewTest - (void)setUp { fml::MessageLoop::EnsureInitializedForCurrentThread(); auto thread_task_runner = fml::MessageLoop::GetCurrent().GetTaskRunner(); + auto sync_switch = std::make_shared(); flutter::TaskRunners runners(/*label=*/self.name.UTF8String, /*platform=*/thread_task_runner, /*raster=*/thread_task_runner, @@ -76,7 +77,7 @@ - (void)setUp { /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, - /*is_gpu_disabled_sync_switch=*/nil); + /*is_gpu_disabled_sync_switch=*/sync_switch); weak_factory = std::make_unique>(platform_view.get()); } @@ -98,6 +99,7 @@ - (void)testMsaaSampleCount { fake_delegate.settings_.msaa_samples = 4; auto thread_task_runner = fml::MessageLoop::GetCurrent().GetTaskRunner(); + auto sync_switch = std::make_shared(); flutter::TaskRunners runners(/*label=*/self.name.UTF8String, /*platform=*/thread_task_runner, /*raster=*/thread_task_runner, @@ -109,7 +111,7 @@ - (void)testMsaaSampleCount { /*platform_views_controller=*/nil, /*task_runners=*/runners, /*worker_task_runner=*/nil, - /*is_gpu_disabled_sync_switch=*/nil); + /*is_gpu_disabled_sync_switch=*/sync_switch); XCTAssertEqual(msaa_4x_platform_view->GetIosContext()->GetMsaaSampleCount(), MsaaSampleCount::kFour); From 6348a3efa7880c182a66e8d75a30b9c61c71455a Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 16 Oct 2023 14:31:16 -0400 Subject: [PATCH 686/859] Roll Skia from 675f088b9ac4 to 68de6e352585 (1 revision) (#46956) https://skia.googlesource.com/skia.git/+log/675f088b9ac4..68de6e352585 2023-10-16 kjlubick@google.com Move SkMultiPictureDocument functions into namespace in include/docs If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jsimmons@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 638c5cbdebcdb..90a0dc50cb4f2 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '675f088b9ac40837541db9ee05b17c702097a72b', + 'skia_revision': '68de6e3525856f9475eb27d3fc808c7e339eead1', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index da41e1f87c701..ff0a9cfbc8e00 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 95b229c06464b5b2380d14193495ab12 +Signature: 717f85ae89c540094a7fba29a8df7720 ==================================================================================================== LIBRARY: etc1 @@ -8749,6 +8749,7 @@ ORIGIN: ../../../third_party/skia/include/core/SkColorTable.h + ../../../third_p ORIGIN: ../../../third_party/skia/include/core/SkPoint.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/core/SkTextureCompressionType.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/core/SkTiledImageUtils.h + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/include/docs/SkMultiPictureDocument.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/gpu/ganesh/GrExternalTextureGenerator.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/gpu/ganesh/SkImageGanesh.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/gpu/ganesh/SkMeshGanesh.h + ../../../third_party/skia/LICENSE @@ -9013,6 +9014,7 @@ FILE: ../../../third_party/skia/include/core/SkColorTable.h FILE: ../../../third_party/skia/include/core/SkPoint.h FILE: ../../../third_party/skia/include/core/SkTextureCompressionType.h FILE: ../../../third_party/skia/include/core/SkTiledImageUtils.h +FILE: ../../../third_party/skia/include/docs/SkMultiPictureDocument.h FILE: ../../../third_party/skia/include/gpu/ganesh/GrExternalTextureGenerator.h FILE: ../../../third_party/skia/include/gpu/ganesh/SkImageGanesh.h FILE: ../../../third_party/skia/include/gpu/ganesh/SkMeshGanesh.h From ebcad23f2148c3dc63029f5d4f1fa427135a0191 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 16 Oct 2023 15:58:44 -0400 Subject: [PATCH 687/859] Roll Skia from 68de6e352585 to 0e5207fb4971 (1 revision) (#46960) https://skia.googlesource.com/skia.git/+log/68de6e352585..0e5207fb4971 2023-10-16 sunnyps@chromium.org graphite: Fix SkMipmap memory leak If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jsimmons@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 90a0dc50cb4f2..496bd82d3f333 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '68de6e3525856f9475eb27d3fc808c7e339eead1', + 'skia_revision': '0e5207fb49712d2b6fba2b46aa7bb8120b928170', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index ff0a9cfbc8e00..00af1cd2c6d44 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 717f85ae89c540094a7fba29a8df7720 +Signature: 0ca78f6a8b8a9e47bfd4f8790d82854c ==================================================================================================== LIBRARY: etc1 From c29a07d6cfc20ba2c7a1a1ab8576c05a88917c04 Mon Sep 17 00:00:00 2001 From: John McCutchan Date: Mon, 16 Oct 2023 13:08:13 -0700 Subject: [PATCH 688/859] Allow Image backed platform view rendering target on Android >= 29 again (#46958) - Refactor the fence waiting code to only wait on Android >= 33. - Log a warning message once per image rendering target on Android >= 29 && < 33. - Add a simple unit test of ImageReaderPlatformViewRenderTargets. --- .../engine/renderer/FlutterRenderer.java | 48 +++++--- .../ImageReaderPlatformViewRenderTarget.java | 23 +++- ...ageReaderPlatformViewRenderTargetTest.java | 105 ++++++++++++++++++ .../plugin/platform/PlatformPluginTest.java | 4 + .../platform/PlatformViewWrapperTest.java | 4 + .../platform/PlatformViewsControllerTest.java | 4 + .../platform/SingleViewPresentationTest.java | 4 + ...ceTexturePlatformViewRenderTargetTest.java | 4 + 8 files changed, 177 insertions(+), 19 deletions(-) create mode 100644 shell/platform/android/test/io/flutter/plugin/platform/ImageReaderPlatformViewRenderTargetTest.java diff --git a/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java b/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java index e71e36488169d..8b77bc7378cb8 100644 --- a/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java +++ b/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java @@ -20,7 +20,6 @@ import io.flutter.Log; import io.flutter.embedding.engine.FlutterJNI; import io.flutter.view.TextureRegistry; -import io.flutter.view.TextureRegistry.ImageTextureEntry; import java.io.IOException; import java.lang.ref.WeakReference; import java.nio.ByteBuffer; @@ -343,6 +342,7 @@ final class ImageTextureRegistryEntry implements TextureRegistry.ImageTextureEnt private static final String TAG = "ImageTextureRegistryEntry"; private final long id; private boolean released; + private boolean ignoringFence = false; private Image image; ImageTextureRegistryEntry(long id) { @@ -390,27 +390,45 @@ public void pushImage(Image image) { } } - @Override @TargetApi(33) + private void waitOnFence(Image image) { + try { + SyncFence fence = image.getFence(); + boolean signaled = fence.awaitForever(); + if (!signaled) { + Log.e(TAG, "acquireLatestImage image's fence was never signalled."); + } + } catch (IOException e) { + // Drop. + } + } + + @TargetApi(29) + private void maybeWaitOnFence(Image image) { + if (image == null) { + return; + } + if (Build.VERSION.SDK_INT >= 33) { + // The fence API is only available on Android >= 33. + waitOnFence(image); + return; + } + if (!ignoringFence) { + // Log once per ImageTextureEntry. + ignoringFence = true; + Log.w(TAG, "ImageTextureEntry can't wait on the fence on Android < 33"); + } + } + + @Override + @TargetApi(29) public Image acquireLatestImage() { Image r; synchronized (this) { r = this.image; this.image = null; } - if (r != null) { - try { - SyncFence fence = r.getFence(); - if (fence.getSignalTime() == SyncFence.SIGNAL_TIME_PENDING) { - boolean signaled = fence.awaitForever(); - if (!signaled) { - Log.e(TAG, "acquireLatestImage image's fence was never signalled."); - } - } - } catch (IOException e) { - // Drop. - } - } + maybeWaitOnFence(r); return r; } diff --git a/shell/platform/android/io/flutter/plugin/platform/ImageReaderPlatformViewRenderTarget.java b/shell/platform/android/io/flutter/plugin/platform/ImageReaderPlatformViewRenderTarget.java index 79690179a8189..29443aeb63aae 100644 --- a/shell/platform/android/io/flutter/plugin/platform/ImageReaderPlatformViewRenderTarget.java +++ b/shell/platform/android/io/flutter/plugin/platform/ImageReaderPlatformViewRenderTarget.java @@ -12,7 +12,7 @@ import io.flutter.Log; import io.flutter.view.TextureRegistry.ImageTextureEntry; -@TargetApi(33) +@TargetApi(29) public class ImageReaderPlatformViewRenderTarget implements PlatformViewRenderTarget { private ImageTextureEntry textureEntry; private ImageReader reader; @@ -72,18 +72,33 @@ protected ImageReader createImageReader33() { return reader; } + @TargetApi(29) + protected ImageReader createImageReader29() { + final ImageReader reader = + ImageReader.newInstance( + bufferWidth, + bufferHeight, + ImageFormat.PRIVATE, + MAX_IMAGES, + HardwareBuffer.USAGE_GPU_SAMPLED_IMAGE); + reader.setOnImageAvailableListener(this.onImageAvailableListener, onImageAvailableHandler); + return reader; + } + protected ImageReader createImageReader() { if (Build.VERSION.SDK_INT >= 33) { return createImageReader33(); + } else if (Build.VERSION.SDK_INT >= 29) { + return createImageReader29(); } throw new UnsupportedOperationException( - "ImageReaderPlatformViewRenderTarget requires API version 33+"); + "ImageReaderPlatformViewRenderTarget requires API version 29+"); } public ImageReaderPlatformViewRenderTarget(ImageTextureEntry textureEntry) { - if (Build.VERSION.SDK_INT < 33) { + if (Build.VERSION.SDK_INT < 29) { throw new UnsupportedOperationException( - "ImageReaderPlatformViewRenderTarget requires API version 33+"); + "ImageReaderPlatformViewRenderTarget requires API version 29+"); } this.textureEntry = textureEntry; } diff --git a/shell/platform/android/test/io/flutter/plugin/platform/ImageReaderPlatformViewRenderTargetTest.java b/shell/platform/android/test/io/flutter/plugin/platform/ImageReaderPlatformViewRenderTargetTest.java new file mode 100644 index 0000000000000..64a0fd1e13306 --- /dev/null +++ b/shell/platform/android/test/io/flutter/plugin/platform/ImageReaderPlatformViewRenderTargetTest.java @@ -0,0 +1,105 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package io.flutter.plugin.platform; + +import static android.os.Looper.getMainLooper; +import static org.junit.Assert.*; +import static org.mockito.ArgumentMatchers.*; +import static org.mockito.Mockito.*; +import static org.robolectric.Shadows.shadowOf; + +import android.annotation.TargetApi; +import android.content.Context; +import android.graphics.Canvas; +import android.graphics.Color; +import android.graphics.PorterDuff; +import android.media.Image; +import android.view.View; +import androidx.test.core.app.ApplicationProvider; +import androidx.test.ext.junit.runners.AndroidJUnit4; +import io.flutter.view.TextureRegistry.ImageTextureEntry; +import org.junit.Test; +import org.junit.runner.RunWith; + +@TargetApi(29) +@RunWith(AndroidJUnit4.class) +public class ImageReaderPlatformViewRenderTargetTest { + private final Context ctx = ApplicationProvider.getApplicationContext(); + + class TestImageTextureEntry implements ImageTextureEntry { + private Image lastPushedImage; + + public long id() { + return 1; + } + + public void release() { + if (this.lastPushedImage != null) { + this.lastPushedImage.close(); + } + } + + public void pushImage(Image image) { + if (this.lastPushedImage != null) { + this.lastPushedImage.close(); + } + this.lastPushedImage = image; + } + + public Image acquireLatestImage() { + Image r = this.lastPushedImage; + this.lastPushedImage = null; + return r; + } + } + + @Test + public void viewDraw_writesToBuffer() { + final TestImageTextureEntry textureEntry = new TestImageTextureEntry(); + final ImageReaderPlatformViewRenderTarget renderTarget = + new ImageReaderPlatformViewRenderTarget(textureEntry); + // Custom view. + final View platformView = + new View(ctx) { + @Override + public void draw(Canvas canvas) { + super.draw(canvas); + canvas.drawColor(Color.RED); + } + }; + final int size = 100; + platformView.measure(size, size); + platformView.layout(0, 0, size, size); + renderTarget.resize(size, size); + + // We don't have an image in the texture entry. + assertNull(textureEntry.acquireLatestImage()); + + // Start rendering a frame. + final Canvas targetCanvas = renderTarget.lockHardwareCanvas(); + assertNotNull(targetCanvas); + + try { + // Fill the render target with transparent pixels. This is needed for platform views that + // expect a transparent background. + targetCanvas.drawColor(Color.TRANSPARENT, PorterDuff.Mode.CLEAR); + // Override the canvas that this subtree of views will use to draw. + platformView.draw(targetCanvas); + } finally { + // Finish rendering a frame. + renderTarget.unlockCanvasAndPost(targetCanvas); + } + + // Pump the UI thread task loop. This is needed so that the OnImageAvailable callback + // gets invoked (resulting in textureEntry.pushImage being invoked). + shadowOf(getMainLooper()).idle(); + + // An image was pushed into the texture entry and it has the correct dimensions. + Image pushedImage = textureEntry.acquireLatestImage(); + assertNotNull(pushedImage); + assertEquals(pushedImage.getWidth(), size); + assertEquals(pushedImage.getHeight(), size); + } +} diff --git a/shell/platform/android/test/io/flutter/plugin/platform/PlatformPluginTest.java b/shell/platform/android/test/io/flutter/plugin/platform/PlatformPluginTest.java index fe8c7e46967d7..3a77e6ae68cc1 100644 --- a/shell/platform/android/test/io/flutter/plugin/platform/PlatformPluginTest.java +++ b/shell/platform/android/test/io/flutter/plugin/platform/PlatformPluginTest.java @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + package io.flutter.plugin.platform; import static android.view.WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS; diff --git a/shell/platform/android/test/io/flutter/plugin/platform/PlatformViewWrapperTest.java b/shell/platform/android/test/io/flutter/plugin/platform/PlatformViewWrapperTest.java index ffb50fb65b510..29ad40daae637 100644 --- a/shell/platform/android/test/io/flutter/plugin/platform/PlatformViewWrapperTest.java +++ b/shell/platform/android/test/io/flutter/plugin/platform/PlatformViewWrapperTest.java @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + package io.flutter.plugin.platform; import static android.view.View.OnFocusChangeListener; diff --git a/shell/platform/android/test/io/flutter/plugin/platform/PlatformViewsControllerTest.java b/shell/platform/android/test/io/flutter/plugin/platform/PlatformViewsControllerTest.java index 13ec6823f1301..3bb1dc7ba7ce0 100644 --- a/shell/platform/android/test/io/flutter/plugin/platform/PlatformViewsControllerTest.java +++ b/shell/platform/android/test/io/flutter/plugin/platform/PlatformViewsControllerTest.java @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + package io.flutter.plugin.platform; import static android.os.Looper.getMainLooper; diff --git a/shell/platform/android/test/io/flutter/plugin/platform/SingleViewPresentationTest.java b/shell/platform/android/test/io/flutter/plugin/platform/SingleViewPresentationTest.java index 20e6bb3b4731c..046682797623f 100644 --- a/shell/platform/android/test/io/flutter/plugin/platform/SingleViewPresentationTest.java +++ b/shell/platform/android/test/io/flutter/plugin/platform/SingleViewPresentationTest.java @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + package io.flutter.plugin.platform; import static android.os.Build.VERSION_CODES.JELLY_BEAN_MR1; diff --git a/shell/platform/android/test/io/flutter/plugin/platform/SurfaceTexturePlatformViewRenderTargetTest.java b/shell/platform/android/test/io/flutter/plugin/platform/SurfaceTexturePlatformViewRenderTargetTest.java index a1ab6d75e1f29..020ef090f3ae3 100644 --- a/shell/platform/android/test/io/flutter/plugin/platform/SurfaceTexturePlatformViewRenderTargetTest.java +++ b/shell/platform/android/test/io/flutter/plugin/platform/SurfaceTexturePlatformViewRenderTargetTest.java @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + package io.flutter.plugin.platform; import static org.junit.Assert.*; From 6b4ff99367c29e49bf4b818f732281d93071ea50 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 16 Oct 2023 16:46:57 -0400 Subject: [PATCH 689/859] Roll Skia from 0e5207fb4971 to 85c8dca08cbe (1 revision) (#46964) https://skia.googlesource.com/skia.git/+log/0e5207fb4971..85c8dca08cbe 2023-10-16 michaelludwig@google.com [graphite] Fix SkMatrix row-major uniform upload bug If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jsimmons@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 496bd82d3f333..e1373edf16f49 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '0e5207fb49712d2b6fba2b46aa7bb8120b928170', + 'skia_revision': '85c8dca08cbee18930d5ea44ff8879915d4e3621', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 00af1cd2c6d44..1a420042efcd0 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 0ca78f6a8b8a9e47bfd4f8790d82854c +Signature: afe176e2f3a2ee9a1c34ddbbefe4c6f0 ==================================================================================================== LIBRARY: etc1 From 46a7f78de158cb70755bbbb06eaeac8f71bd55e7 Mon Sep 17 00:00:00 2001 From: Matej Knopp Date: Tue, 17 Oct 2023 00:14:57 +0300 Subject: [PATCH 690/859] [macOS] FlutterMutatorView should clip to bounds (#46463) *Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.* *List which issues are fixed by this PR. You must list at least one issue.* *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].* [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- ci/licenses_golden/licenses_flutter | 2 ++ .../macos/framework/Source/FlutterMutatorView.mm | 4 +++- .../macos/framework/Source/FlutterMutatorViewTest.mm | 8 ++++++++ .../macos/framework/Source/FlutterTextInputPlugin.h | 5 ----- .../macos/framework/Source/FlutterTextInputPlugin.mm | 1 + .../framework/Source/FlutterTextInputPluginTest.mm | 1 + .../macos/framework/Source/NSView+ClipsToBounds.h | 10 ++++++++++ 7 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 shell/platform/darwin/macos/framework/Source/NSView+ClipsToBounds.h diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index ad443428ed131..ab376807accd7 100644 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -3504,6 +3504,7 @@ ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterVie ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterViewTest.mm + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Source/KeyCodeMap.g.mm + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Source/KeyCodeMap_Internal.h + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Source/NSView+ClipsToBounds.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Source/TestFlutterPlatformView.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/darwin/macos/framework/Source/TestFlutterPlatformView.mm + ../../../flutter/LICENSE ORIGIN: ../../../flutter/shell/platform/embedder/embedder.cc + ../../../flutter/LICENSE @@ -6290,6 +6291,7 @@ FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterViewP FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/FlutterViewTest.mm FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/KeyCodeMap.g.mm FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/KeyCodeMap_Internal.h +FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/NSView+ClipsToBounds.h FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/TestFlutterPlatformView.h FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/TestFlutterPlatformView.mm FILE: ../../../flutter/shell/platform/darwin/macos/framework/module.modulemap diff --git a/shell/platform/darwin/macos/framework/Source/FlutterMutatorView.mm b/shell/platform/darwin/macos/framework/Source/FlutterMutatorView.mm index 3c079c1a6ba42..0c5c4af7b3e3a 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterMutatorView.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterMutatorView.mm @@ -5,12 +5,13 @@ #import "flutter/shell/platform/darwin/macos/framework/Source/FlutterMutatorView.h" #include - #include #include "flutter/fml/logging.h" #include "flutter/shell/platform/embedder/embedder.h" +#import "flutter/shell/platform/darwin/macos/framework/Source/NSView+ClipsToBounds.h" + @interface FlutterMutatorView () { // Each of these views clips to a CGPathRef. These views, if present, // are nested (first is child of FlutterMutatorView and last is parent of @@ -395,6 +396,7 @@ - (instancetype)initWithPlatformView:(NSView*)platformView { _platformView = platformView; _pathClipViews = [NSMutableArray array]; self.wantsLayer = YES; + self.clipsToBounds = YES; } return self; } diff --git a/shell/platform/darwin/macos/framework/Source/FlutterMutatorViewTest.mm b/shell/platform/darwin/macos/framework/Source/FlutterMutatorViewTest.mm index da734aea678a1..5699b1480d664 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterMutatorViewTest.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterMutatorViewTest.mm @@ -6,6 +6,8 @@ #include "third_party/googletest/googletest/include/gtest/gtest.h" +#import "flutter/shell/platform/darwin/macos/framework/Source/NSView+ClipsToBounds.h" + @interface FlutterMutatorView (Private) @property(readonly, nonatomic, nonnull) NSMutableArray* pathClipViews; @@ -96,6 +98,12 @@ void ExpectTransform3DEqual(const CATransform3D& t, const CATransform3D& u) { EXPECT_NE(mutatorView.platformViewContainer, nil); } +TEST(FlutterMutatorViewTest, ClipsToBounds) { + NSView* platformView = [[NSView alloc] init]; + FlutterMutatorView* mutatorView = [[FlutterMutatorView alloc] initWithPlatformView:platformView]; + EXPECT_TRUE(mutatorView.clipsToBounds); +} + TEST(FlutterMutatorViewTest, TransformedFrameIsCorrect) { NSView* platformView = [[NSView alloc] init]; FlutterMutatorView* mutatorView = [[FlutterMutatorView alloc] initWithPlatformView:platformView]; diff --git a/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.h b/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.h index fb099aa1136d2..d5e23c8d5aadc 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.h +++ b/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.h @@ -9,11 +9,6 @@ @class FlutterTextField; -@interface NSView (ClipsToBounds) -// This property is available since macOS 10.9 but only declared in macOS 14 SDK. -@property BOOL clipsToBounds API_AVAILABLE(macos(10.9)); -@end - /** * A plugin to handle text input. * diff --git a/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.mm b/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.mm index 6a9c948ab5c08..80e7fb946a58a 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.mm @@ -16,6 +16,7 @@ #import "flutter/shell/platform/darwin/common/framework/Headers/FlutterCodecs.h" #import "flutter/shell/platform/darwin/macos/framework/Source/FlutterTextInputSemanticsObject.h" #import "flutter/shell/platform/darwin/macos/framework/Source/FlutterViewController_Internal.h" +#import "flutter/shell/platform/darwin/macos/framework/Source/NSView+ClipsToBounds.h" static NSString* const kTextInputChannel = @"flutter/textinput"; diff --git a/shell/platform/darwin/macos/framework/Source/FlutterTextInputPluginTest.mm b/shell/platform/darwin/macos/framework/Source/FlutterTextInputPluginTest.mm index 165a4b5bb110e..1202813a746e0 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterTextInputPluginTest.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterTextInputPluginTest.mm @@ -9,6 +9,7 @@ #import "flutter/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.h" #import "flutter/shell/platform/darwin/macos/framework/Source/FlutterTextInputSemanticsObject.h" #import "flutter/shell/platform/darwin/macos/framework/Source/FlutterViewController_Internal.h" +#import "flutter/shell/platform/darwin/macos/framework/Source/NSView+ClipsToBounds.h" #import #import "flutter/testing/testing.h" diff --git a/shell/platform/darwin/macos/framework/Source/NSView+ClipsToBounds.h b/shell/platform/darwin/macos/framework/Source/NSView+ClipsToBounds.h new file mode 100644 index 0000000000000..b4669fbde7e3f --- /dev/null +++ b/shell/platform/darwin/macos/framework/Source/NSView+ClipsToBounds.h @@ -0,0 +1,10 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import + +@interface NSView (ClipsToBounds) +// This property is available since macOS 10.9 but only declared in macOS 14 SDK. +@property BOOL clipsToBounds API_AVAILABLE(macos(10.9)); +@end From c0f146d18016749410cf64ab0dccd9fdcc431ea4 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 16 Oct 2023 17:53:06 -0400 Subject: [PATCH 691/859] Roll Skia from 85c8dca08cbe to 8919fecf15c1 (1 revision) (#46966) https://skia.googlesource.com/skia.git/+log/85c8dca08cbe..8919fecf15c1 2023-10-16 kjlubick@google.com Reland "Remove GL dependency from GrBackendSemaphore" If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jsimmons@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index e1373edf16f49..f7e87ed26469e 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '85c8dca08cbee18930d5ea44ff8879915d4e3621', + 'skia_revision': '8919fecf15c128efc8fd3e4418594dd3dfc43ac4', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 1a420042efcd0..30f4b32170dda 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: afe176e2f3a2ee9a1c34ddbbefe4c6f0 +Signature: 7826dc252a3551276c5a189ae38ed620 ==================================================================================================== LIBRARY: etc1 @@ -387,6 +387,7 @@ FILE: ../../../third_party/skia/modules/pathkit/perf/perfReporter.js FILE: ../../../third_party/skia/modules/skparagraph/test.html FILE: ../../../third_party/skia/package-lock.json FILE: ../../../third_party/skia/relnotes/base64.md +FILE: ../../../third_party/skia/relnotes/glbackendsemaphore.md FILE: ../../../third_party/skia/relnotes/grsurface-info.md FILE: ../../../third_party/skia/relnotes/mesh.md FILE: ../../../third_party/skia/relnotes/readbuffer-deserial.md @@ -8855,6 +8856,7 @@ ORIGIN: ../../../third_party/skia/src/gpu/PipelineUtils.h + ../../../third_party ORIGIN: ../../../third_party/skia/src/gpu/TiledTextureUtils.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/TiledTextureUtils.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/dawn/DawnUtilsPriv.h + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/gpu/ganesh/GrBackendSemaphorePriv.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/GrBackendSurfacePriv.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/GrCanvas.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/ganesh/GrCanvas.h + ../../../third_party/skia/LICENSE @@ -9120,6 +9122,7 @@ FILE: ../../../third_party/skia/src/gpu/PipelineUtils.h FILE: ../../../third_party/skia/src/gpu/TiledTextureUtils.cpp FILE: ../../../third_party/skia/src/gpu/TiledTextureUtils.h FILE: ../../../third_party/skia/src/gpu/dawn/DawnUtilsPriv.h +FILE: ../../../third_party/skia/src/gpu/ganesh/GrBackendSemaphorePriv.h FILE: ../../../third_party/skia/src/gpu/ganesh/GrBackendSurfacePriv.h FILE: ../../../third_party/skia/src/gpu/ganesh/GrCanvas.cpp FILE: ../../../third_party/skia/src/gpu/ganesh/GrCanvas.h From 5e65f76cac86d597778af32abe0c0c42dde493ad Mon Sep 17 00:00:00 2001 From: Dan Field Date: Mon, 16 Oct 2023 14:55:06 -0700 Subject: [PATCH 692/859] Fix `Platform.script` for flutter_tester (#46911) This addresses the problem in https://github.com/flutter/flutter/issues/12847 which changed slightly over time. Today, `Platform.script` does not give an empty `file` URI, it gives something like `file://path/to/package/main.dart` _regardless of how the file is actually named_. After this change, it will give the absolute path to the file being run under test. So before this change, the new test would have a URI like ``` file:///Users/dnfield/src/flutter/engine/src/main.dart ``` And now it has ``` file:///Users/dnfield/src/flutter/engine/src/out/host_debug_unopt_arm64/gen/platform_test.dart.dill ``` This is going to be helpful in generating relative paths from the test file. --- shell/testing/tester_main.cc | 1 + testing/dart/BUILD.gn | 1 + testing/dart/platform_test.dart | 14 ++++++++++++++ 3 files changed, 16 insertions(+) create mode 100644 testing/dart/platform_test.dart diff --git a/shell/testing/tester_main.cc b/shell/testing/tester_main.cc index 607dc6a6a61a3..8b1b49131bb75 100644 --- a/shell/testing/tester_main.cc +++ b/shell/testing/tester_main.cc @@ -526,6 +526,7 @@ int main(int argc, char* argv[]) { // it as a positional argument instead. settings.application_kernel_asset = command_line.positional_args()[0]; } + settings.advisory_script_uri = settings.application_kernel_asset; if (settings.application_kernel_asset.empty()) { FML_LOG(ERROR) << "Dart kernel file not specified."; diff --git a/testing/dart/BUILD.gn b/testing/dart/BUILD.gn index 2e1bb1ad38f67..f59b6166c6c64 100644 --- a/testing/dart/BUILD.gn +++ b/testing/dart/BUILD.gn @@ -38,6 +38,7 @@ tests = [ "paragraph_test.dart", "path_test.dart", "picture_test.dart", + "platform_test.dart", "platform_view_test.dart", "plugin_utilities_test.dart", "semantics_test.dart", diff --git a/testing/dart/platform_test.dart b/testing/dart/platform_test.dart new file mode 100644 index 0000000000000..5ba620ddcc567 --- /dev/null +++ b/testing/dart/platform_test.dart @@ -0,0 +1,14 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'dart:io'; + +import 'package:litetest/litetest.dart'; + +void main() { + test('Platform.script has right URI', () async { + // Platform.script should look like file:///path/to/engine/src/out/variant/gen/platform_test.dart.dill + expect(Platform.script.path, endsWith('gen/platform_test.dart.dill')); + }); +} From 1d37b960b1f7d97e34612f03ecc2731136272693 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Mon, 16 Oct 2023 15:32:24 -0700 Subject: [PATCH 693/859] [Impeller] GPUTracer for Metal. (#46846) Impelement GPU frame time tracing for metal. Unlike Vulkan, this can't use dummy cmd buffers as those don't seem to ever get an executed callback. Instead we decorate every submitted cmd buffer with tracing functionality, and min/max the timestamps to compute the range of computation time. --- ci/licenses_golden/licenses_flutter | 4 ++ impeller/renderer/backend/metal/BUILD.gn | 2 + .../backend/metal/command_buffer_mtl.mm | 11 ++++ impeller/renderer/backend/metal/context_mtl.h | 8 +++ .../renderer/backend/metal/context_mtl.mm | 12 +++- .../renderer/backend/metal/gpu_tracer_mtl.h | 51 +++++++++++++++++ .../renderer/backend/metal/gpu_tracer_mtl.mm | 56 +++++++++++++++++++ .../renderer/backend/metal/surface_mtl.mm | 3 + 8 files changed, 146 insertions(+), 1 deletion(-) create mode 100644 impeller/renderer/backend/metal/gpu_tracer_mtl.h create mode 100644 impeller/renderer/backend/metal/gpu_tracer_mtl.mm diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index ab376807accd7..e7cd52d3379cd 100644 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -2128,6 +2128,8 @@ ORIGIN: ../../../flutter/impeller/renderer/backend/metal/device_buffer_mtl.h + . ORIGIN: ../../../flutter/impeller/renderer/backend/metal/device_buffer_mtl.mm + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/renderer/backend/metal/formats_mtl.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/renderer/backend/metal/formats_mtl.mm + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/renderer/backend/metal/gpu_tracer_mtl.h + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/renderer/backend/metal/gpu_tracer_mtl.mm + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/renderer/backend/metal/pipeline_library_mtl.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/renderer/backend/metal/pipeline_library_mtl.mm + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/renderer/backend/metal/pipeline_mtl.h + ../../../flutter/LICENSE @@ -4895,6 +4897,8 @@ FILE: ../../../flutter/impeller/renderer/backend/metal/device_buffer_mtl.h FILE: ../../../flutter/impeller/renderer/backend/metal/device_buffer_mtl.mm FILE: ../../../flutter/impeller/renderer/backend/metal/formats_mtl.h FILE: ../../../flutter/impeller/renderer/backend/metal/formats_mtl.mm +FILE: ../../../flutter/impeller/renderer/backend/metal/gpu_tracer_mtl.h +FILE: ../../../flutter/impeller/renderer/backend/metal/gpu_tracer_mtl.mm FILE: ../../../flutter/impeller/renderer/backend/metal/pipeline_library_mtl.h FILE: ../../../flutter/impeller/renderer/backend/metal/pipeline_library_mtl.mm FILE: ../../../flutter/impeller/renderer/backend/metal/pipeline_mtl.h diff --git a/impeller/renderer/backend/metal/BUILD.gn b/impeller/renderer/backend/metal/BUILD.gn index 9a0f6a631e3d7..254cae97f063a 100644 --- a/impeller/renderer/backend/metal/BUILD.gn +++ b/impeller/renderer/backend/metal/BUILD.gn @@ -24,6 +24,8 @@ impeller_component("metal") { "device_buffer_mtl.mm", "formats_mtl.h", "formats_mtl.mm", + "gpu_tracer_mtl.h", + "gpu_tracer_mtl.mm", "pipeline_library_mtl.h", "pipeline_library_mtl.mm", "pipeline_mtl.h", diff --git a/impeller/renderer/backend/metal/command_buffer_mtl.mm b/impeller/renderer/backend/metal/command_buffer_mtl.mm index 49384a9e1cdfd..b3161b74c4e36 100644 --- a/impeller/renderer/backend/metal/command_buffer_mtl.mm +++ b/impeller/renderer/backend/metal/command_buffer_mtl.mm @@ -159,6 +159,13 @@ static bool LogMTLCommandBufferErrorIfPresent(id buffer) { } bool CommandBufferMTL::OnSubmitCommands(CompletionCallback callback) { + auto context = context_.lock(); + if (!context) { + return false; + } +#ifdef IMPELLER_DEBUG + ContextMTL::Cast(*context).GetGPUTracer()->RecordCmdBuffer(buffer_); +#endif // IMPELLER_DEBUG if (callback) { [buffer_ addCompletedHandler:^(id buffer) { @@ -190,6 +197,10 @@ static bool LogMTLCommandBufferErrorIfPresent(id buffer) { auto buffer = buffer_; buffer_ = nil; +#ifdef IMPELLER_DEBUG + ContextMTL::Cast(*context).GetGPUTracer()->RecordCmdBuffer(buffer); +#endif // IMPELLER_DEBUG + auto worker_task_runner = ContextMTL::Cast(*context).GetWorkerTaskRunner(); auto mtl_render_pass = static_cast(render_pass.get()); diff --git a/impeller/renderer/backend/metal/context_mtl.h b/impeller/renderer/backend/metal/context_mtl.h index 165ff722e256a..9fbff94d4669b 100644 --- a/impeller/renderer/backend/metal/context_mtl.h +++ b/impeller/renderer/backend/metal/context_mtl.h @@ -16,6 +16,7 @@ #include "impeller/core/sampler.h" #include "impeller/renderer/backend/metal/allocator_mtl.h" #include "impeller/renderer/backend/metal/command_buffer_mtl.h" +#include "impeller/renderer/backend/metal/gpu_tracer_mtl.h" #include "impeller/renderer/backend/metal/pipeline_library_mtl.h" #include "impeller/renderer/backend/metal/shader_library_mtl.h" #include "impeller/renderer/capabilities.h" @@ -93,6 +94,10 @@ class ContextMTL final : public Context, std::shared_ptr GetIsGpuDisabledSyncSwitch() const; +#ifdef IMPELLER_DEBUG + std::shared_ptr GetGPUTracer() const; +#endif // IMPELLER_DEBUG + // |Context| void StoreTaskForGPU(std::function task) override; @@ -116,6 +121,9 @@ class ContextMTL final : public Context, std::shared_ptr device_capabilities_; std::shared_ptr raster_message_loop_; std::shared_ptr is_gpu_disabled_sync_switch_; +#ifdef IMPELLER_DEBUG + std::shared_ptr gpu_tracer_; +#endif // IMPELLER_DEBUG std::deque> tasks_awaiting_gpu_; std::unique_ptr sync_switch_observer_; bool is_valid_ = false; diff --git a/impeller/renderer/backend/metal/context_mtl.mm b/impeller/renderer/backend/metal/context_mtl.mm index 5297ab987145b..06fd34724685a 100644 --- a/impeller/renderer/backend/metal/context_mtl.mm +++ b/impeller/renderer/backend/metal/context_mtl.mm @@ -5,6 +5,7 @@ #include "impeller/renderer/backend/metal/context_mtl.h" #include +#include #include "flutter/fml/concurrent_message_loop.h" #include "flutter/fml/file.h" @@ -12,6 +13,7 @@ #include "flutter/fml/paths.h" #include "flutter/fml/synchronization/sync_switch.h" #include "impeller/core/sampler_descriptor.h" +#include "impeller/renderer/backend/metal/gpu_tracer_mtl.h" #include "impeller/renderer/backend/metal/sampler_library_mtl.h" #include "impeller/renderer/capabilities.h" @@ -145,7 +147,9 @@ static bool DeviceSupportsComputeSubgroups(id device) { device_capabilities_ = InferMetalCapabilities(device_, PixelFormat::kB8G8R8A8UNormInt); - +#ifdef IMPELLER_DEBUG + gpu_tracer_ = std::make_shared(); +#endif // IMPELLER_DEBUG is_valid_ = true; } @@ -330,6 +334,12 @@ new ContextMTL(device, command_queue, raster_message_loop_.reset(); } +#ifdef IMPELLER_DEBUG +std::shared_ptr ContextMTL::GetGPUTracer() const { + return gpu_tracer_; +} +#endif // IMPELLER_DEBUG + const std::shared_ptr ContextMTL::GetWorkerTaskRunner() const { return raster_message_loop_->GetTaskRunner(); diff --git a/impeller/renderer/backend/metal/gpu_tracer_mtl.h b/impeller/renderer/backend/metal/gpu_tracer_mtl.h new file mode 100644 index 0000000000000..bfa227ed10e81 --- /dev/null +++ b/impeller/renderer/backend/metal/gpu_tracer_mtl.h @@ -0,0 +1,51 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#pragma once + +#include + +#include +#include +#include "impeller/base/thread.h" +#include "impeller/base/thread_safety.h" +#include "impeller/geometry/scalar.h" + +namespace impeller { + +class ContextMTL; + +/// @brief Approximate the GPU frame time by computing a difference between the +/// smallest +/// GPUStartTime and largest GPUEndTime for all cmd buffers submitted in +/// a frame workload. +class GPUTracerMTL : public std::enable_shared_from_this { + public: + GPUTracerMTL() = default; + + ~GPUTracerMTL() = default; + + /// @brief Record that the current frame has ended. Any additional cmd buffers + /// will be + /// attributed to the "next" frame. + void MarkFrameEnd(); + + /// @brief Record the current cmd buffer GPU execution timestamps into an + /// aggregate + /// frame workload metric. + void RecordCmdBuffer(id buffer); + + private: + struct GPUTraceState { + Scalar smallest_timestamp = std::numeric_limits::max(); + Scalar largest_timestamp = 0; + size_t pending_buffers = 0; + }; + + mutable Mutex trace_state_mutex_; + GPUTraceState trace_states_[16] IPLR_GUARDED_BY(trace_state_mutex_); + size_t current_state_ IPLR_GUARDED_BY(trace_state_mutex_) = 0u; +}; + +} // namespace impeller diff --git a/impeller/renderer/backend/metal/gpu_tracer_mtl.mm b/impeller/renderer/backend/metal/gpu_tracer_mtl.mm new file mode 100644 index 0000000000000..41f1aa04a3328 --- /dev/null +++ b/impeller/renderer/backend/metal/gpu_tracer_mtl.mm @@ -0,0 +1,56 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include +#include "fml/trace_event.h" +#include "impeller/renderer/backend/metal/context_mtl.h" +#include "impeller/renderer/backend/metal/formats_mtl.h" + +#include + +#include "impeller/renderer/backend/metal/gpu_tracer_mtl.h" + +namespace impeller { + +void GPUTracerMTL::MarkFrameEnd() { + if (@available(ios 10.3, tvos 10.2, macos 10.15, macCatalyst 13.0, *)) { + Lock lock(trace_state_mutex_); + current_state_ = (current_state_ + 1) % 16; + } +} + +void GPUTracerMTL::RecordCmdBuffer(id buffer) { + if (@available(ios 10.3, tvos 10.2, macos 10.15, macCatalyst 13.0, *)) { + Lock lock(trace_state_mutex_); + auto current_state = current_state_; + trace_states_[current_state].pending_buffers += 1; + + auto weak_self = weak_from_this(); + [buffer addCompletedHandler:^(id buffer) { + auto self = weak_self.lock(); + if (!self) { + return; + } + Lock lock(self->trace_state_mutex_); + auto& state = self->trace_states_[current_state]; + state.pending_buffers--; + state.smallest_timestamp = std::min( + state.smallest_timestamp, static_cast(buffer.GPUStartTime)); + state.largest_timestamp = std::max( + state.largest_timestamp, static_cast(buffer.GPUEndTime)); + + if (state.pending_buffers == 0) { + auto gpu_ms = + (state.largest_timestamp - state.smallest_timestamp) * 1000; + state.smallest_timestamp = std::numeric_limits::max(); + state.largest_timestamp = 0; + FML_TRACE_COUNTER("flutter", "GPUTracer", + reinterpret_cast(this), // Trace Counter ID + "FrameTimeMS", gpu_ms); + } + }]; + } +} + +} // namespace impeller diff --git a/impeller/renderer/backend/metal/surface_mtl.mm b/impeller/renderer/backend/metal/surface_mtl.mm index 7244fc3b2a72a..beb900a89be13 100644 --- a/impeller/renderer/backend/metal/surface_mtl.mm +++ b/impeller/renderer/backend/metal/surface_mtl.mm @@ -246,6 +246,9 @@ return false; } } +#ifdef IMPELLER_DEBUG + ContextMTL::Cast(context.get())->GetGPUTracer()->MarkFrameEnd(); +#endif // IMPELLER_DEBUG if (drawable_) { id command_buffer = From e56588cb0010405dc470afc138a66d338ad564b8 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 16 Oct 2023 18:44:21 -0400 Subject: [PATCH 694/859] Roll Skia from 8919fecf15c1 to 751358929d1f (4 revisions) (#46972) https://skia.googlesource.com/skia.git/+log/8919fecf15c1..751358929d1f 2023-10-16 kjlubick@google.com Move SkDebug.cpp from core to base 2023-10-16 lovisolo@google.com [bazel] Add android_benchmark_test rule and sample targets. 2023-10-16 lovisolo@google.com [bazel] Move some utilities from //bazel to //tools/testrunners/common. 2023-10-16 nicolettep@google.com [graphite] Use UBO for intrinsic constant, remove inline uniform support If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jsimmons@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DEPS b/DEPS index f7e87ed26469e..b7141617237d1 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '8919fecf15c128efc8fd3e4418594dd3dfc43ac4', + 'skia_revision': '751358929d1fadb9a2e8d23f59a544919689813a', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 30f4b32170dda..fe27e694bb23b 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 7826dc252a3551276c5a189ae38ed620 +Signature: eb2e698e2711f26223294ad1f681b298 ==================================================================================================== LIBRARY: etc1 @@ -654,6 +654,7 @@ ORIGIN: ../../../third_party/skia/src/base/SkBase64.cpp + ../../../third_party/s ORIGIN: ../../../third_party/skia/src/base/SkBase64.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/base/SkBuffer.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/base/SkBuffer.h + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/base/SkDebug.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/base/SkDeque.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/base/SkEndian.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/base/SkRandom.h + ../../../third_party/skia/LICENSE @@ -678,7 +679,6 @@ ORIGIN: ../../../third_party/skia/src/core/SkBlurMaskFilterImpl.cpp + ../../../t ORIGIN: ../../../third_party/skia/src/core/SkColor.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/core/SkColorFilter.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/core/SkCoreBlitters.h + ../../../third_party/skia/LICENSE -ORIGIN: ../../../third_party/skia/src/core/SkDebug.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/core/SkDescriptor.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/core/SkDraw.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/core/SkDraw.h + ../../../third_party/skia/LICENSE @@ -800,6 +800,7 @@ FILE: ../../../third_party/skia/src/base/SkBase64.cpp FILE: ../../../third_party/skia/src/base/SkBase64.h FILE: ../../../third_party/skia/src/base/SkBuffer.cpp FILE: ../../../third_party/skia/src/base/SkBuffer.h +FILE: ../../../third_party/skia/src/base/SkDebug.cpp FILE: ../../../third_party/skia/src/base/SkDeque.cpp FILE: ../../../third_party/skia/src/base/SkEndian.h FILE: ../../../third_party/skia/src/base/SkRandom.h @@ -824,7 +825,6 @@ FILE: ../../../third_party/skia/src/core/SkBlurMaskFilterImpl.cpp FILE: ../../../third_party/skia/src/core/SkColor.cpp FILE: ../../../third_party/skia/src/core/SkColorFilter.cpp FILE: ../../../third_party/skia/src/core/SkCoreBlitters.h -FILE: ../../../third_party/skia/src/core/SkDebug.cpp FILE: ../../../third_party/skia/src/core/SkDescriptor.h FILE: ../../../third_party/skia/src/core/SkDraw.cpp FILE: ../../../third_party/skia/src/core/SkDraw.h From 58e99dec98aeb37c73c397ac8fe0cc35480df8c9 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 16 Oct 2023 19:28:56 -0400 Subject: [PATCH 695/859] Roll Fuchsia Linux SDK from 6E-cSq679DjzBMcqY... to Y9mDBoH4BSC6pWFXV... (#46974) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jsimmons@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index b7141617237d1..4ce124034faf6 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': '6E-cSq679DjzBMcqYCeaCiO28YBOmspEihuHpSPuCPEC' + 'version': 'Y9mDBoH4BSC6pWFXVTsG-Sj9vE9_PeviDet17VmNZF4C' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index 62fb50ec90090..24073471a5a05 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: 4a1213d565c9c060d2ee3735f442447b +Signature: 3f1bd0aba8b783e097e00a018cbfc199 ==================================================================================================== LIBRARY: fuchsia_sdk From 9238fd5afd2f15c01ecfaefa9dd5ba0f7429ded7 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 16 Oct 2023 19:55:03 -0400 Subject: [PATCH 696/859] Roll Dart SDK from 12f6559bd6ed to f3e1cd38e8b0 (1 revision) (#46977) https://dart.googlesource.com/sdk.git/+log/12f6559bd6ed..f3e1cd38e8b0 2023-10-16 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-29.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jsimmons@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/excluded_files | 8 - ci/licenses_golden/licenses_dart | 544 +----------------------------- 3 files changed, 2 insertions(+), 552 deletions(-) diff --git a/DEPS b/DEPS index 4ce124034faf6..becea9b02ef1b 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '12f6559bd6ed47b58bf7c21e74b0ffa5cf3b68ae', + 'dart_revision': 'f3e1cd38e8b04d4a2e8e506d3a2f6024109f150f', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/excluded_files b/ci/licenses_golden/excluded_files index b01773f6d8818..b17a4bab2fce2 100644 --- a/ci/licenses_golden/excluded_files +++ b/ci/licenses_golden/excluded_files @@ -1607,14 +1607,6 @@ ../../../third_party/dart/runtime/observatory/tests ../../../third_party/dart/runtime/observatory/update_sources.py ../../../third_party/dart/runtime/observatory/web/third_party/README.md -../../../third_party/dart/runtime/observatory_2/.gitignore -../../../third_party/dart/runtime/observatory_2/HACKING.md -../../../third_party/dart/runtime/observatory_2/analysis_options.yaml -../../../third_party/dart/runtime/observatory_2/lib/src/elements/css/shared.css -../../../third_party/dart/runtime/observatory_2/pubspec.yaml -../../../third_party/dart/runtime/observatory_2/tests -../../../third_party/dart/runtime/observatory_2/update_sources.py -../../../third_party/dart/runtime/observatory_2/web/third_party/README.md ../../../third_party/dart/runtime/tests ../../../third_party/dart/runtime/third_party/binary_size ../../../third_party/dart/runtime/third_party/d3 diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index 50994747c46f4..2199371251743 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: 3a48199c0fcc7a83da6640604b0df3fc +Signature: c5e67b40dcaf24286915bafa8cd358c5 ==================================================================================================== LIBRARY: dart @@ -1354,58 +1354,6 @@ ORIGIN: ../../../third_party/dart/runtime/observatory/lib/src/elements/type_argu ORIGIN: ../../../third_party/dart/runtime/observatory/lib/src/elements/unknown_ref.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/observatory/lib/src/elements/vm_view.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/observatory/lib/tracer.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/app/application.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/app/location_manager.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/class_instances.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/class_ref.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/class_view.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/code_ref.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/code_view.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/context_ref.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/context_view.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/cpu_profile.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/cpu_profile/virtual_tree.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/cpu_profile_table.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/curly_block.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/error_view.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/eval_box.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/field_ref.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/field_view.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/flag_list.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/function_ref.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/function_view.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/heap_snapshot.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/helpers/any_ref.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/icdata_ref.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/icdata_view.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/instance_ref.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/instance_view.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/isolate_ref.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/isolate_view.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/json_view.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/library_ref.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/library_view.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/local_var_descriptors_ref.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/megamorphiccache_ref.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/native_memory_profiler.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/object_common.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/object_view.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/objectpool_ref.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/objectstore_view.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/observatory_application.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/pc_descriptors_ref.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/sample_buffer_control.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/script_inset.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/script_ref.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/script_view.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/sentinel_value.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/sentinel_view.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/source_inset.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/stack_trace_tree_config.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/type_arguments_ref.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/unknown_ref.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/vm_view.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/tracer.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/platform/atomic.h + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/platform/signal_blocker.h + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/vm/allocation.h + ../../../third_party/dart/LICENSE @@ -1694,58 +1642,6 @@ FILE: ../../../third_party/dart/runtime/observatory/lib/src/elements/type_argume FILE: ../../../third_party/dart/runtime/observatory/lib/src/elements/unknown_ref.dart FILE: ../../../third_party/dart/runtime/observatory/lib/src/elements/vm_view.dart FILE: ../../../third_party/dart/runtime/observatory/lib/tracer.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/app/application.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/app/location_manager.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/class_instances.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/class_ref.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/class_view.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/code_ref.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/code_view.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/context_ref.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/context_view.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/cpu_profile.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/cpu_profile/virtual_tree.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/cpu_profile_table.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/curly_block.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/error_view.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/eval_box.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/field_ref.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/field_view.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/flag_list.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/function_ref.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/function_view.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/heap_snapshot.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/helpers/any_ref.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/icdata_ref.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/icdata_view.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/instance_ref.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/instance_view.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/isolate_ref.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/isolate_view.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/json_view.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/library_ref.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/library_view.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/local_var_descriptors_ref.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/megamorphiccache_ref.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/native_memory_profiler.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/object_common.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/object_view.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/objectpool_ref.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/objectstore_view.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/observatory_application.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/pc_descriptors_ref.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/sample_buffer_control.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/script_inset.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/script_ref.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/script_view.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/sentinel_value.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/sentinel_view.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/source_inset.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/stack_trace_tree_config.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/type_arguments_ref.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/unknown_ref.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/vm_view.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/tracer.dart FILE: ../../../third_party/dart/runtime/platform/atomic.h FILE: ../../../third_party/dart/runtime/platform/signal_blocker.h FILE: ../../../third_party/dart/runtime/vm/allocation.h @@ -1973,10 +1869,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==================================================================================================== LIBRARY: dart ORIGIN: ../../../third_party/dart/runtime/observatory/web/third_party/webcomponents.min.js + http://polymer.github.io/LICENSE.txt referenced by ../../../third_party/dart/runtime/observatory/web/third_party/webcomponents.min.js -ORIGIN: ../../../third_party/dart/runtime/observatory_2/web/third_party/webcomponents.min.js + http://polymer.github.io/LICENSE.txt referenced by ../../../third_party/dart/runtime/observatory_2/web/third_party/webcomponents.min.js TYPE: LicenseType.bsd FILE: ../../../third_party/dart/runtime/observatory/web/third_party/webcomponents.min.js -FILE: ../../../third_party/dart/runtime/observatory_2/web/third_party/webcomponents.min.js ---------------------------------------------------------------------------------------------------- Copyright (c) 2014 The Polymer Project Authors. All rights reserved. @@ -2030,26 +1924,6 @@ ORIGIN: ../../../third_party/dart/runtime/observatory/lib/src/elements/vm_connec ORIGIN: ../../../third_party/dart/runtime/observatory/lib/src/service/object.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/observatory/lib/utils.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/observatory/web/main.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/bin/shell.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/app.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/object_graph.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/service.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/service_common.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/service_html.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/service_io.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/app/page.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/app/settings.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/app/view_model.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/allocation_profile.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/class_tree.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/debugger.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/heap_map.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/isolate_reconnect.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/metrics.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/vm_connect.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/service/object.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/utils.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/web/main.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/platform/address_sanitizer.h + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/platform/memory_sanitizer.h + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/platform/safe_stack.h + ../../../third_party/dart/LICENSE @@ -2142,26 +2016,6 @@ FILE: ../../../third_party/dart/runtime/observatory/lib/src/elements/vm_connect. FILE: ../../../third_party/dart/runtime/observatory/lib/src/service/object.dart FILE: ../../../third_party/dart/runtime/observatory/lib/utils.dart FILE: ../../../third_party/dart/runtime/observatory/web/main.dart -FILE: ../../../third_party/dart/runtime/observatory_2/bin/shell.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/app.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/object_graph.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/service.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/service_common.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/service_html.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/service_io.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/app/page.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/app/settings.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/app/view_model.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/allocation_profile.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/class_tree.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/debugger.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/heap_map.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/isolate_reconnect.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/metrics.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/vm_connect.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/service/object.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/utils.dart -FILE: ../../../third_party/dart/runtime/observatory_2/web/main.dart FILE: ../../../third_party/dart/runtime/platform/address_sanitizer.h FILE: ../../../third_party/dart/runtime/platform/memory_sanitizer.h FILE: ../../../third_party/dart/runtime/platform/safe_stack.h @@ -2289,24 +2143,6 @@ ORIGIN: ../../../third_party/dart/runtime/observatory/lib/src/elements/ports.dar ORIGIN: ../../../third_party/dart/runtime/observatory/lib/src/elements/timeline_page.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/observatory/lib/src/sample_profile/sample_profile.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/observatory/web/timeline.js + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/allocation_profile.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/cli.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/debugger.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/sample_profile.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/allocation_profile/allocation_profile.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/cli/command.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/debugger/debugger.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/debugger/debugger_location.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/heap_snapshot.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/logging.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/logging_list.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/megamorphiccache_view.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/objectpool_view.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/persistent_handles.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/ports.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/timeline_page.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/sample_profile/sample_profile.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/web/timeline.js + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/vm/compiler/aot/precompiler.cc + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/vm/compiler/aot/precompiler.h + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/vm/log.cc + ../../../third_party/dart/LICENSE @@ -2387,24 +2223,6 @@ FILE: ../../../third_party/dart/runtime/observatory/lib/src/elements/ports.dart FILE: ../../../third_party/dart/runtime/observatory/lib/src/elements/timeline_page.dart FILE: ../../../third_party/dart/runtime/observatory/lib/src/sample_profile/sample_profile.dart FILE: ../../../third_party/dart/runtime/observatory/web/timeline.js -FILE: ../../../third_party/dart/runtime/observatory_2/lib/allocation_profile.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/cli.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/debugger.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/sample_profile.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/allocation_profile/allocation_profile.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/cli/command.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/debugger/debugger.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/debugger/debugger_location.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/heap_snapshot.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/logging.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/logging_list.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/megamorphiccache_view.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/objectpool_view.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/persistent_handles.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/ports.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/timeline_page.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/sample_profile/sample_profile.dart -FILE: ../../../third_party/dart/runtime/observatory_2/web/timeline.js FILE: ../../../third_party/dart/runtime/vm/compiler/aot/precompiler.cc FILE: ../../../third_party/dart/runtime/vm/compiler/aot/precompiler.h FILE: ../../../third_party/dart/runtime/vm/log.cc @@ -2656,151 +2474,6 @@ ORIGIN: ../../../third_party/dart/runtime/observatory/lib/src/repositories/stron ORIGIN: ../../../third_party/dart/runtime/observatory/lib/src/repositories/target.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/observatory/lib/src/repositories/type_arguments.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/observatory/web/timeline_message_handler.js + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/event.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/models.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/repositories.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/app/notification.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/class_allocation_profile.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/containers/virtual_collection.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/containers/virtual_tree.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/error_ref.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/general_error.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/helpers/custom_element.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/helpers/nav_bar.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/helpers/nav_menu.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/helpers/rendering_queue.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/helpers/rendering_scheduler.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/helpers/tag.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/helpers/uris.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/inbound_references.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/isolate/counter_chart.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/isolate/location.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/isolate/run_state.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/isolate/shared_summary.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/isolate/summary.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/metric/details.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/metric/graph.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/nav/class_menu.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/nav/isolate_menu.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/nav/library_menu.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/nav/menu_item.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/nav/notify.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/nav/notify_event.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/nav/notify_exception.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/nav/refresh.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/nav/top_menu.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/nav/vm_menu.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/retaining_path.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/source_link.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/strongly_reachable_instances.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/vm_connect_target.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/exceptions.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/allocation_profile.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/breakpoint.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/class.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/code.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/context.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/error.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/event.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/extension_data.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/field.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/flag.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/frame.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/function.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/guarded.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/heap_space.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/icdata.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/inbound_references.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/instance.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/isolate.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/library.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/local_var_descriptors.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/map_association.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/megamorphiccache.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/metric.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/notification.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/object.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/objectpool.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/objectstore.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/pc_descriptors.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/persistent_handles.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/ports.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/retaining_path.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/sample_profile.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/script.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/sentinel.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/source_location.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/target.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/timeline_event.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/type_arguments.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/unknown.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/vm.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/allocation_profile.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/breakpoint.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/class.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/context.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/editor.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/eval.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/event.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/field.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/flag.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/function.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/heap_snapshot.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/icdata.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/inbound_references.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/instance.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/isolate.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/library.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/megamorphiccache.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/metric.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/notification.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/object.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/objectpool.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/objectstore.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/persistent_handles.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/ports.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/reachable_size.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/retained_size.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/retaining_path.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/sample_profile.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/script.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/strongly_reachable_instances.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/target.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/type_arguments.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/allocation_profile.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/breakpoint.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/class.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/context.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/editor.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/eval.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/event.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/field.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/flag.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/function.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/heap_snapshot.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/icdata.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/inbound_references.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/instance.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/isolate.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/library.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/megamorphiccache.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/metric.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/notification.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/object.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/objectpool.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/objectstore.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/persistent_handles.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/ports.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/reachable_size.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/retained_size.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/retaining_path.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/sample_profile.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/script.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/settings.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/strongly_reachable_instances.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/target.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/type_arguments.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/web/timeline_message_handler.js + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/platform/syslog_fuchsia.cc + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/platform/utils_fuchsia.cc + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/platform/utils_fuchsia.h + ../../../third_party/dart/LICENSE @@ -3011,151 +2684,6 @@ FILE: ../../../third_party/dart/runtime/observatory/lib/src/repositories/strongl FILE: ../../../third_party/dart/runtime/observatory/lib/src/repositories/target.dart FILE: ../../../third_party/dart/runtime/observatory/lib/src/repositories/type_arguments.dart FILE: ../../../third_party/dart/runtime/observatory/web/timeline_message_handler.js -FILE: ../../../third_party/dart/runtime/observatory_2/lib/event.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/models.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/repositories.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/app/notification.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/class_allocation_profile.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/containers/virtual_collection.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/containers/virtual_tree.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/error_ref.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/general_error.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/helpers/custom_element.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/helpers/nav_bar.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/helpers/nav_menu.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/helpers/rendering_queue.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/helpers/rendering_scheduler.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/helpers/tag.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/helpers/uris.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/inbound_references.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/isolate/counter_chart.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/isolate/location.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/isolate/run_state.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/isolate/shared_summary.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/isolate/summary.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/metric/details.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/metric/graph.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/nav/class_menu.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/nav/isolate_menu.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/nav/library_menu.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/nav/menu_item.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/nav/notify.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/nav/notify_event.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/nav/notify_exception.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/nav/refresh.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/nav/top_menu.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/nav/vm_menu.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/retaining_path.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/source_link.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/strongly_reachable_instances.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/vm_connect_target.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/exceptions.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/allocation_profile.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/breakpoint.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/class.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/code.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/context.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/error.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/event.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/extension_data.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/field.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/flag.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/frame.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/function.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/guarded.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/heap_space.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/icdata.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/inbound_references.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/instance.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/isolate.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/library.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/local_var_descriptors.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/map_association.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/megamorphiccache.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/metric.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/notification.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/object.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/objectpool.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/objectstore.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/pc_descriptors.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/persistent_handles.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/ports.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/retaining_path.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/sample_profile.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/script.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/sentinel.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/source_location.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/target.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/timeline_event.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/type_arguments.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/unknown.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/vm.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/allocation_profile.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/breakpoint.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/class.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/context.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/editor.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/eval.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/event.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/field.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/flag.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/function.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/heap_snapshot.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/icdata.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/inbound_references.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/instance.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/isolate.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/library.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/megamorphiccache.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/metric.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/notification.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/object.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/objectpool.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/objectstore.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/persistent_handles.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/ports.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/reachable_size.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/retained_size.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/retaining_path.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/sample_profile.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/script.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/strongly_reachable_instances.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/target.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/type_arguments.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/allocation_profile.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/breakpoint.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/class.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/context.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/editor.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/eval.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/event.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/field.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/flag.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/function.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/heap_snapshot.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/icdata.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/inbound_references.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/instance.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/isolate.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/library.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/megamorphiccache.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/metric.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/notification.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/object.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/objectpool.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/objectstore.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/persistent_handles.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/ports.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/reachable_size.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/retained_size.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/retaining_path.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/sample_profile.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/script.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/settings.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/strongly_reachable_instances.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/target.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/type_arguments.dart -FILE: ../../../third_party/dart/runtime/observatory_2/web/timeline_message_handler.js FILE: ../../../third_party/dart/runtime/platform/syslog_fuchsia.cc FILE: ../../../third_party/dart/runtime/platform/utils_fuchsia.cc FILE: ../../../third_party/dart/runtime/platform/utils_fuchsia.h @@ -3297,30 +2825,6 @@ ORIGIN: ../../../third_party/dart/runtime/observatory/lib/src/repositories/subty ORIGIN: ../../../third_party/dart/runtime/observatory/lib/src/repositories/timeline.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/observatory/lib/src/repositories/unlinked_call.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/observatory/lib/src/repositories/vm.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/containers/search_bar.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/nav/reload.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/singletargetcache_ref.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/singletargetcache_view.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/subtypetestcache_ref.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/subtypetestcache_view.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/timeline/dashboard.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/unlinkedcall_ref.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/unlinkedcall_view.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/service.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/single_target_cache.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/subtype_test_cache.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/timeline.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/unlinked_call.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/single_target_cache.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/subtype_test_cache.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/timeline.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/unlinked_call.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/vm.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/single_target_cache.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/subtype_test_cache.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/timeline.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/unlinked_call.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/vm.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/platform/allocation.h + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/platform/growable_array.h + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/vm/compiler/assembler/assembler_riscv.cc + ../../../third_party/dart/LICENSE @@ -3444,30 +2948,6 @@ FILE: ../../../third_party/dart/runtime/observatory/lib/src/repositories/subtype FILE: ../../../third_party/dart/runtime/observatory/lib/src/repositories/timeline.dart FILE: ../../../third_party/dart/runtime/observatory/lib/src/repositories/unlinked_call.dart FILE: ../../../third_party/dart/runtime/observatory/lib/src/repositories/vm.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/containers/search_bar.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/nav/reload.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/singletargetcache_ref.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/singletargetcache_view.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/subtypetestcache_ref.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/subtypetestcache_view.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/timeline/dashboard.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/unlinkedcall_ref.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/unlinkedcall_view.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/service.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/single_target_cache.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/subtype_test_cache.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/timeline.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/unlinked_call.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/single_target_cache.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/subtype_test_cache.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/timeline.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/unlinked_call.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/vm.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/single_target_cache.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/subtype_test_cache.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/timeline.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/unlinked_call.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/vm.dart FILE: ../../../third_party/dart/runtime/platform/allocation.h FILE: ../../../third_party/dart/runtime/platform/growable_array.h FILE: ../../../third_party/dart/runtime/vm/compiler/assembler/assembler_riscv.cc @@ -3736,11 +3216,6 @@ ORIGIN: ../../../third_party/dart/runtime/observatory/lib/src/models/objects/iso ORIGIN: ../../../third_party/dart/runtime/observatory/lib/src/models/repositories/isolate_group.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/observatory/lib/src/repositories/isolate_group.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/observatory/lib/src/repositories/timeline_base.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/tree_map.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/isolate_group.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/isolate_group.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/isolate_group.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/timeline_base.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/platform/elf.h + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/platform/thread_sanitizer.h + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/tools/dartfuzz/dartfuzz_api_table.dart + ../../../third_party/dart/LICENSE @@ -3829,11 +3304,6 @@ FILE: ../../../third_party/dart/runtime/observatory/lib/src/models/objects/isola FILE: ../../../third_party/dart/runtime/observatory/lib/src/models/repositories/isolate_group.dart FILE: ../../../third_party/dart/runtime/observatory/lib/src/repositories/isolate_group.dart FILE: ../../../third_party/dart/runtime/observatory/lib/src/repositories/timeline_base.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/tree_map.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/objects/isolate_group.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/models/repositories/isolate_group.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/isolate_group.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/repositories/timeline_base.dart FILE: ../../../third_party/dart/runtime/platform/elf.h FILE: ../../../third_party/dart/runtime/platform/thread_sanitizer.h FILE: ../../../third_party/dart/runtime/tools/dartfuzz/dartfuzz_api_table.dart @@ -3988,8 +3458,6 @@ ORIGIN: ../../../third_party/dart/runtime/include/dart_version.h + ../../../thir ORIGIN: ../../../third_party/dart/runtime/include/internal/dart_api_dl_impl.h + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/observatory/bin/heap_snapshot.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/observatory/lib/src/elements/process_snapshot.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/bin/heap_snapshot.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/process_snapshot.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/platform/allocation.cc + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/platform/leak_sanitizer.h + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/runtime/platform/priority_queue.h + ../../../third_party/dart/LICENSE @@ -4060,8 +3528,6 @@ FILE: ../../../third_party/dart/runtime/include/dart_version.h FILE: ../../../third_party/dart/runtime/include/internal/dart_api_dl_impl.h FILE: ../../../third_party/dart/runtime/observatory/bin/heap_snapshot.dart FILE: ../../../third_party/dart/runtime/observatory/lib/src/elements/process_snapshot.dart -FILE: ../../../third_party/dart/runtime/observatory_2/bin/heap_snapshot.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/process_snapshot.dart FILE: ../../../third_party/dart/runtime/platform/allocation.cc FILE: ../../../third_party/dart/runtime/platform/leak_sanitizer.h FILE: ../../../third_party/dart/runtime/platform/priority_queue.h @@ -4793,14 +4259,6 @@ FILE: ../../../third_party/dart/runtime/observatory/web/favicon.ico FILE: ../../../third_party/dart/runtime/observatory/web/index.html FILE: ../../../third_party/dart/runtime/observatory/web/third_party/trace_viewer_full.html FILE: ../../../third_party/dart/runtime/observatory/web/timeline.html -FILE: ../../../third_party/dart/runtime/observatory_2/lib/elements.dart -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/img/chromium_icon.png -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/img/dart_icon.png -FILE: ../../../third_party/dart/runtime/observatory_2/lib/src/elements/img/isolate_icon.png -FILE: ../../../third_party/dart/runtime/observatory_2/web/favicon.ico -FILE: ../../../third_party/dart/runtime/observatory_2/web/index.html -FILE: ../../../third_party/dart/runtime/observatory_2/web/third_party/trace_viewer_full.html -FILE: ../../../third_party/dart/runtime/observatory_2/web/timeline.html FILE: ../../../third_party/dart/runtime/tools/wiki/styles/style.scss FILE: ../../../third_party/dart/runtime/tools/wiki/templates/includes/auto-refresh.html FILE: ../../../third_party/dart/runtime/tools/wiki/templates/page.html From 937524ff8859cb94c96fccac2883b4a548937162 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Mon, 16 Oct 2023 18:07:02 -0700 Subject: [PATCH 697/859] Revert "Fix `Platform.script` for flutter_tester" (#46981) This reverts commit b14d3469d48c3d397f17267292cba14cac8ec12b. With https://github.com/flutter/engine/pull/46911, the Platform.script API will return a URI for the compiled temporary wrapper script generated by "flutter test". This will cause issues for tests that expect Platform.script to reflect the directory where "flutter test" was launched. --- shell/testing/tester_main.cc | 1 - testing/dart/BUILD.gn | 1 - testing/dart/platform_test.dart | 14 -------------- 3 files changed, 16 deletions(-) delete mode 100644 testing/dart/platform_test.dart diff --git a/shell/testing/tester_main.cc b/shell/testing/tester_main.cc index 8b1b49131bb75..607dc6a6a61a3 100644 --- a/shell/testing/tester_main.cc +++ b/shell/testing/tester_main.cc @@ -526,7 +526,6 @@ int main(int argc, char* argv[]) { // it as a positional argument instead. settings.application_kernel_asset = command_line.positional_args()[0]; } - settings.advisory_script_uri = settings.application_kernel_asset; if (settings.application_kernel_asset.empty()) { FML_LOG(ERROR) << "Dart kernel file not specified."; diff --git a/testing/dart/BUILD.gn b/testing/dart/BUILD.gn index f59b6166c6c64..2e1bb1ad38f67 100644 --- a/testing/dart/BUILD.gn +++ b/testing/dart/BUILD.gn @@ -38,7 +38,6 @@ tests = [ "paragraph_test.dart", "path_test.dart", "picture_test.dart", - "platform_test.dart", "platform_view_test.dart", "plugin_utilities_test.dart", "semantics_test.dart", diff --git a/testing/dart/platform_test.dart b/testing/dart/platform_test.dart deleted file mode 100644 index 5ba620ddcc567..0000000000000 --- a/testing/dart/platform_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import 'dart:io'; - -import 'package:litetest/litetest.dart'; - -void main() { - test('Platform.script has right URI', () async { - // Platform.script should look like file:///path/to/engine/src/out/variant/gen/platform_test.dart.dill - expect(Platform.script.path, endsWith('gen/platform_test.dart.dill')); - }); -} From efd4d8d12901c2e4373e1662c88c97632358b4b2 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 16 Oct 2023 21:14:37 -0400 Subject: [PATCH 698/859] Roll Skia from 751358929d1f to 205b728a8623 (1 revision) (#46982) https://skia.googlesource.com/skia.git/+log/751358929d1f..205b728a8623 2023-10-17 johnstiles@google.com Fix issues discovered by ClangTidy 17. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jsimmons@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index becea9b02ef1b..c828d1773fe88 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '751358929d1fadb9a2e8d23f59a544919689813a', + 'skia_revision': '205b728a862371a90c4d65bcfa528060466fa49b', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index fe27e694bb23b..97126597b65d6 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: eb2e698e2711f26223294ad1f681b298 +Signature: 30efde9235dc9bc7f035e99660eda111 ==================================================================================================== LIBRARY: etc1 From 8a4316e2fdaca299784634ace6f6a9a5574f810c Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 16 Oct 2023 22:15:16 -0400 Subject: [PATCH 699/859] Roll Fuchsia Mac SDK from bMDZdOFfPiVkjIdiv... to gJiEzqLWUvPVgoq8b... (#46985) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jsimmons@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index c828d1773fe88..b7782740560bd 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'bMDZdOFfPiVkjIdivQYcrkiHrmY5jDZOrEVWkjDi_RUC' + 'version': 'gJiEzqLWUvPVgoq8b4iI4fGcdultSVCfa9WN3G6ojdsC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 7741eaa20c5c039e7dcd41252da057607b6003a6 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 17 Oct 2023 01:25:07 -0400 Subject: [PATCH 700/859] Roll Skia from 205b728a8623 to 31310feb67dc (2 revisions) (#46990) https://skia.googlesource.com/skia.git/+log/205b728a8623..31310feb67dc 2023-10-17 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Dawn from 90fc3629a642 to b665b7fda7cf (14 revisions) 2023-10-17 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 4d77c74a14a0 to 160b327a9c37 (11 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jsimmons@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index b7782740560bd..55b4f9763514a 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '205b728a862371a90c4d65bcfa528060466fa49b', + 'skia_revision': '31310feb67dc858b18641b94c7ec3f6d178ceb2d', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 857ad00064da4c8acb08c681f3b4c64fc7e23991 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 17 Oct 2023 01:29:25 -0400 Subject: [PATCH 701/859] Roll Dart SDK from f3e1cd38e8b0 to 7d0a805e4ee1 (2 revisions) (#46991) https://dart.googlesource.com/sdk.git/+log/f3e1cd38e8b0..7d0a805e4ee1 2023-10-17 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-31.0.dev 2023-10-17 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-30.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jsimmons@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 16 ++++++++-------- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/DEPS b/DEPS index 55b4f9763514a..6b4353ab33b8b 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': 'f3e1cd38e8b04d4a2e8e506d3a2f6024109f150f', + 'dart_revision': '7d0a805e4ee1925bde5772294745c23f60b22b26', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py @@ -74,9 +74,9 @@ vars = { 'dart_protobuf_rev': 'c559fe52734ef6e2389e26ec3901eaf23fd76543', 'dart_pub_rev': 'fca927ae2662204805e1646c0c0687369001a41a', 'dart_root_certificates_rev': '692f6d6488af68e0121317a9c2c9eb393eb0ee50', - 'dart_tools_rev': '92c5c15e3eb713b39779f4545bfa207ccdfeb1af', + 'dart_tools_rev': 'ddeccf60604ba2115b6e634b8d526041abfbbac6', 'dart_watcher_rev': '3998cdd37ecacd3a1715cdc76110b025bffbd1f6', - 'dart_webdev_rev': '7c2c2d70e05a5012b52e95b209aedce7acb62f94', + 'dart_webdev_rev': '8d48d5ea7709088da8ee6b72d744f63829287b04', 'dart_webkit_inspection_protocol_rev': '82f0c1c46dfdba5edf7c5fa84456233121dd69e1', 'dart_yaml_edit_rev': 'a7e7fbad5ee263cc681681c1a6eb9e6df5336ad6', 'dart_zlib_rev': '14dd4c4455602c9b71a1a89b5cafd1f4030d2e3f', @@ -376,13 +376,13 @@ deps = { Var('dart_git') + '/dart_style.git@1a2def95a3c04dafd27b85d17e6e828bd4afa1a3', 'src/third_party/dart/third_party/pkg/dartdoc': - Var('dart_git') + '/dartdoc.git@5156398c17ff7ab8defd87c7a5b9de1ee7e4564a', + Var('dart_git') + '/dartdoc.git@8c103397734f4dba75915e40c734a88e29a35f26', 'src/third_party/dart/third_party/pkg/ffi': Var('dart_git') + '/ffi.git@2faec288966d8f564049adb86a7ca43fd6e01fbf', 'src/third_party/dart/third_party/pkg/file': - Var('dart_git') + '/external/github.com/google/file.dart@a18ad1ce88eaeb5a11a13ef8fc25d1e78b546c59', + Var('dart_git') + '/external/github.com/google/file.dart@7418131cfe3c5e063166bc3d7cca98985a6d8eeb', 'src/third_party/dart/third_party/pkg/fixnum': Var('dart_git') + '/fixnum.git@ef45eb556524eadcd72ecdbbed87951288bcd9e7', @@ -394,7 +394,7 @@ deps = { Var('dart_git') + '/html.git@49e2c8e9b3bc9fcf25a8eb290c026d3c94c5d175', 'src/third_party/dart/third_party/pkg/http': - Var('dart_git') + '/http.git@88ec75eb603ce3d66911ac0df1b48e6582965131', + Var('dart_git') + '/http.git@7240d0a26c17f06f5e6d704082ea95d10a7a730d', 'src/third_party/dart/third_party/pkg/http_multi_server': Var('dart_git') + '/http_multi_server.git@03041aabc9ffa4c730c4221bf6ff1ef8bcd27cef', @@ -427,7 +427,7 @@ deps = { Var('dart_git') + '/mockito.git@47a5588788d37d7a94da9ceb9b3f3ef86c86f27e', 'src/third_party/dart/third_party/pkg/native': - Var('dart_git') + '/native.git@22f4481573c201542daa1451fc3c58b1e50bf75a', + Var('dart_git') + '/native.git@757f5034bb3cb9cf9db1b268fccea028d6b0f6a6', 'src/third_party/dart/third_party/pkg/package_config': Var('dart_git') + '/package_config.git@100533d2f836583f281c9dfa11a00d6842c176d4', @@ -460,7 +460,7 @@ deps = { Var('dart_git') + '/source_span.git@92e50bf0c15bea00218e5fdb2881d2570de1932b', 'src/third_party/dart/third_party/pkg/sse': - Var('dart_git') + '/sse.git@e190744aab3260887e99f94078858ac6ea0e9bc5', + Var('dart_git') + '/sse.git@37df57d7d09503c12f6200122ab0cb7e92ad50d1', 'src/third_party/dart/third_party/pkg/stack_trace': Var('dart_git') + '/stack_trace.git@634589f915f7b236dba8aca0f581cf792e5a6e03', diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index 2199371251743..c5aeedda53572 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: c5e67b40dcaf24286915bafa8cd358c5 +Signature: 5c0f6c58a11b47230da7a9316fca4747 ==================================================================================================== LIBRARY: dart From 7ca527ea443fb24e957a536d9eef8925f72380d4 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 17 Oct 2023 02:15:19 -0400 Subject: [PATCH 702/859] Roll Skia from 31310feb67dc to c30529427b7d (2 revisions) (#46992) https://skia.googlesource.com/skia.git/+log/31310feb67dc..c30529427b7d 2023-10-17 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from d42ad20d2b50 to 0dca655f102b 2023-10-17 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from b7f47ce3bc13 to d42ad20d2b50 (3 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jsimmons@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 6b4353ab33b8b..dc3608aac6d46 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '31310feb67dc858b18641b94c7ec3f6d178ceb2d', + 'skia_revision': 'c30529427b7db6d24673916c43313809bf4123d2', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 97126597b65d6..9669351313174 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 30efde9235dc9bc7f035e99660eda111 +Signature: 31ce50e257537ef95fd7e206a69bcb3c ==================================================================================================== LIBRARY: etc1 From 8b4a17887a7fd96801cf468f9aa5a668c97ca654 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 17 Oct 2023 03:34:24 -0400 Subject: [PATCH 703/859] Roll Skia from c30529427b7d to f7e15ba449f7 (1 revision) (#46994) https://skia.googlesource.com/skia.git/+log/c30529427b7d..f7e15ba449f7 2023-10-17 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from cd6b265c2623 to 1ea49a2222e1 (12 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jsimmons@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index dc3608aac6d46..36ba432dbc91c 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'c30529427b7db6d24673916c43313809bf4123d2', + 'skia_revision': 'f7e15ba449f7338d0a21c9e67a9ee9f75c647d34', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From da155e2932c48bf1881cb435b35f15a05b49a425 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 17 Oct 2023 05:25:18 -0400 Subject: [PATCH 704/859] Roll Dart SDK from 7d0a805e4ee1 to 82c073d657eb (1 revision) (#46995) https://dart.googlesource.com/sdk.git/+log/7d0a805e4ee1..82c073d657eb 2023-10-17 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-32.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jimgraham@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 36ba432dbc91c..3e9700c64380c 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '7d0a805e4ee1925bde5772294745c23f60b22b26', + 'dart_revision': '82c073d657ebcaf5adb0e8b91b2e6d032f822b9b', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py From 60c4e9806108f01a8475ebf926e2e88d9c0f44fd Mon Sep 17 00:00:00 2001 From: Kevin Lubick Date: Tue, 17 Oct 2023 09:16:32 -0400 Subject: [PATCH 705/859] Replace use of SkFont::refTypefaceOrDefault() (#46969) This API is going away soon in https://skia-review.googlesource.com/c/skia/+/766776 as is the concept of Skia having a "default typeface" ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [ ] I listed at least one issue that this PR fixes in the description above. - [x] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [ ] I updated/added relevant documentation (doc comments with `///`). - [x] I signed the [CLA]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat --- impeller/typographer/backends/skia/text_frame_skia.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/impeller/typographer/backends/skia/text_frame_skia.cc b/impeller/typographer/backends/skia/text_frame_skia.cc index b5d7ee8c468e5..d39e36ad2bd44 100644 --- a/impeller/typographer/backends/skia/text_frame_skia.cc +++ b/impeller/typographer/backends/skia/text_frame_skia.cc @@ -18,7 +18,7 @@ namespace impeller { static Font ToFont(const SkTextBlobRunIterator& run) { auto& font = run.font(); - auto typeface = std::make_shared(font.refTypefaceOrDefault()); + auto typeface = std::make_shared(font.refTypeface()); SkFontMetrics sk_metrics; font.getMetrics(&sk_metrics); From 0c5c1b1ad8eec4f90fe07a7e1911c876fff75827 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 17 Oct 2023 09:34:23 -0400 Subject: [PATCH 706/859] Roll Dart SDK from 82c073d657eb to 2418bda7a457 (1 revision) (#46997) https://dart.googlesource.com/sdk.git/+log/82c073d657eb..2418bda7a457 2023-10-17 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-33.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jimgraham@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 3e9700c64380c..99e3198164246 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '82c073d657ebcaf5adb0e8b91b2e6d032f822b9b', + 'dart_revision': '2418bda7a4573a5fb872d1a174ba89c0079c0ad3', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index c5aeedda53572..dd64920d41759 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: 5c0f6c58a11b47230da7a9316fca4747 +Signature: 4813544243fbadd2a7b5112ffe9f8d81 ==================================================================================================== LIBRARY: dart From d875929f1332aa5024a8436c1131959cb145420b Mon Sep 17 00:00:00 2001 From: Victoria Ashworth <15619084+vashworth@users.noreply.github.com> Date: Tue, 17 Oct 2023 09:59:05 -0500 Subject: [PATCH 707/859] Only run web mac tests on macOS 12 (#46965) Web Mac tests currently fail on macOS 13 (https://github.com/flutter/flutter/issues/136274, https://github.com/flutter/flutter/issues/136279) so we limit CI to only run on macOS 12. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- ci/builders/linux_web_engine.json | 12 ++++++------ lib/web_ui/dev/generate_builder_json.dart | 13 +++++++++---- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/ci/builders/linux_web_engine.json b/ci/builders/linux_web_engine.json index b8e3a2561201d..518284ec47dc7 100644 --- a/ci/builders/linux_web_engine.json +++ b/ci/builders/linux_web_engine.json @@ -1,6 +1,6 @@ { "_comment": "THIS IS A GENERATED FILE. Do not edit this file directly.", - "_comment2": "See `generated_builder_json.dart` for the generator code", + "_comment2": "See `generate_builder_json.dart` for the generator code", "builds": [ { "name": "web_tests/artifacts", @@ -1095,7 +1095,7 @@ "recipe": "engine_v2/tester_engine", "drone_dimensions": [ "device_type=none", - "os=Mac" + "os=Mac-12" ], "gclient_variables": { "download_android_deps": false @@ -1127,7 +1127,7 @@ "recipe": "engine_v2/tester_engine", "drone_dimensions": [ "device_type=none", - "os=Mac" + "os=Mac-12" ], "gclient_variables": { "download_android_deps": false @@ -1159,7 +1159,7 @@ "recipe": "engine_v2/tester_engine", "drone_dimensions": [ "device_type=none", - "os=Mac" + "os=Mac-12" ], "gclient_variables": { "download_android_deps": false @@ -1191,7 +1191,7 @@ "recipe": "engine_v2/tester_engine", "drone_dimensions": [ "device_type=none", - "os=Mac" + "os=Mac-12" ], "gclient_variables": { "download_android_deps": false @@ -1223,7 +1223,7 @@ "recipe": "engine_v2/tester_engine", "drone_dimensions": [ "device_type=none", - "os=Mac" + "os=Mac-12" ], "gclient_variables": { "download_android_deps": false diff --git a/lib/web_ui/dev/generate_builder_json.dart b/lib/web_ui/dev/generate_builder_json.dart index c4443063a6b36..5e6733237fc15 100644 --- a/lib/web_ui/dev/generate_builder_json.dart +++ b/lib/web_ui/dev/generate_builder_json.dart @@ -9,7 +9,7 @@ import 'felt_config.dart'; String generateBuilderJson(FeltConfig config) { final Map outputJson = { '_comment': 'THIS IS A GENERATED FILE. Do not edit this file directly.', - '_comment2': 'See `generated_builder_json.dart` for the generator code', + '_comment2': 'See `generate_builder_json.dart` for the generator code', 'builds': [ _getArtifactBuildStep(), for (final TestBundle bundle in config.testBundles) @@ -113,7 +113,10 @@ Iterable _getAllTestSteps(List suites) { suite.runConfig.browser == BrowserName.chrome || suite.runConfig.browser == BrowserName.firefox ), - ..._getTestStepsForPlatform(suites, 'Mac', (TestSuite suite) => + // TODO(jacksongardner): Stop filtering to Mac-12 after macOS 13 issues are fixed: + // https://github.com/flutter/flutter/issues/136274, + // https://github.com/flutter/flutter/issues/136279 + ..._getTestStepsForPlatform(suites, 'Mac', specificOS: 'Mac-12', (TestSuite suite) => suite.runConfig.browser == BrowserName.safari ), ..._getTestStepsForPlatform(suites, 'Windows', (TestSuite suite) => @@ -129,7 +132,9 @@ Iterable _getAllTestSteps(List suites) { Iterable _getTestStepsForPlatform( List suites, String platform, - bool Function(TestSuite suite) filter) { + bool Function(TestSuite suite) filter, { + String? specificOS, +}) { return suites .where(filter) .map((TestSuite suite) => { @@ -137,7 +142,7 @@ Iterable _getTestStepsForPlatform( 'recipe': 'engine_v2/tester_engine', 'drone_dimensions': [ 'device_type=none', - 'os=$platform', + 'os=${specificOS ?? platform}', ], 'gclient_variables': { 'download_android_deps': false, From 4a44eb512c6afe394db24a9d5366fdb229e8cc27 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 17 Oct 2023 11:00:31 -0400 Subject: [PATCH 708/859] Roll Fuchsia Mac SDK from gJiEzqLWUvPVgoq8b... to E0Ui7KmD3u5JSKEk5... (#47000) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jimgraham@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 99e3198164246..23df2b4fa1ecb 100644 --- a/DEPS +++ b/DEPS @@ -918,7 +918,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'gJiEzqLWUvPVgoq8b4iI4fGcdultSVCfa9WN3G6ojdsC' + 'version': 'E0Ui7KmD3u5JSKEk5iViIEsUw5Jw63H8h9jOKPQA5ZgC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From b3748cb6b2c7408c3a660419ba02b2bf24a80403 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 17 Oct 2023 11:58:55 -0400 Subject: [PATCH 709/859] Roll Skia from f7e15ba449f7 to d937d10a0ba9 (7 revisions) (#47003) https://skia.googlesource.com/skia.git/+log/f7e15ba449f7..d937d10a0ba9 2023-10-17 kjlubick@google.com Put SkFontMgr::Factory and SkFontMgr::RefDefault behind #ifdefs 2023-10-17 jamesgk@google.com [graphite] Test that failed dst copies don't cause a crash 2023-10-17 49699333+dependabot[bot]@users.noreply.github.com Bump @babel/traverse from 7.12.10 to 7.23.2 in /modules/pathkit 2023-10-17 49699333+dependabot[bot]@users.noreply.github.com Bump @babel/traverse from 7.12.10 to 7.23.2 in /modules/canvaskit 2023-10-17 kjlubick@google.com Stop making wasm docker images 2023-10-17 johnstiles@google.com Enable ClangTidy for Dawn. 2023-10-17 johnstiles@google.com Enable ClangTidy for Graphite. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 23df2b4fa1ecb..3b330f0854c66 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'f7e15ba449f7338d0a21c9e67a9ee9f75c647d34', + 'skia_revision': 'd937d10a0ba9e76da72781c3e00794cf9b1589df', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 9669351313174..d4648839fcd39 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 31ce50e257537ef95fd7e206a69bcb3c +Signature: 4ad07407e46dde841a90a1fb5df04fcb ==================================================================================================== LIBRARY: etc1 From 51d166dab59783f016a72899c598c1c366eef284 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 17 Oct 2023 12:01:18 -0400 Subject: [PATCH 710/859] Roll Fuchsia Linux SDK from Y9mDBoH4BSC6pWFXV... to VtEx0R7lepGAvwAMU... (#47004) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jimgraham@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 3b330f0854c66..ce8e34139ce7d 100644 --- a/DEPS +++ b/DEPS @@ -928,7 +928,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'Y9mDBoH4BSC6pWFXVTsG-Sj9vE9_PeviDet17VmNZF4C' + 'version': 'VtEx0R7lepGAvwAMUqFlbQA4JhRqeI2kSZId899mLE8C' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index 24073471a5a05..b3791c9e767bc 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: 3f1bd0aba8b783e097e00a018cbfc199 +Signature: 7f7362d6c9b7791ae757af278be2883b ==================================================================================================== LIBRARY: fuchsia_sdk From d5681e353c2687250bc19f4e280e3b8fda3b4654 Mon Sep 17 00:00:00 2001 From: Jackson Gardner Date: Tue, 17 Oct 2023 09:24:18 -0700 Subject: [PATCH 711/859] Include symbol maps in CanvasKit and Skwasm builds. (#46973) This should help with https://github.com/flutter/flutter/issues/122834 Emitting DWARF data or source maps actually significantly changes the size of the build, since some binaryen optimizations must actually be skipped when producing either of those. So we can emit symbol maps for now, which don't affect the size of the actual wasm output. With these, we can at least manually deobfuscate stack traces. --- DEPS | 2 +- third_party/canvaskit/BUILD.gn | 3 +++ web_sdk/BUILD.gn | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/DEPS b/DEPS index ce8e34139ce7d..e80ce14754f29 100644 --- a/DEPS +++ b/DEPS @@ -262,7 +262,7 @@ allowed_hosts = [ ] deps = { - 'src': 'https://github.com/flutter/buildroot.git' + '@' + '1d2965f9b0f784abea8ddbeb54827afa9ed196b9', + 'src': 'https://github.com/flutter/buildroot.git' + '@' + '60415e4cb48742a60ba3859d92bbdcb7d14841b0', # Fuchsia compatibility # diff --git a/third_party/canvaskit/BUILD.gn b/third_party/canvaskit/BUILD.gn index 691e09ecbf660..125daf0998e80 100644 --- a/third_party/canvaskit/BUILD.gn +++ b/third_party/canvaskit/BUILD.gn @@ -27,6 +27,7 @@ copy("canvaskit_group") { sources = [ "$root_out_dir/canvaskit/canvaskit.js", + "$root_out_dir/canvaskit/canvaskit.js.symbols", "$root_out_dir/canvaskit/canvaskit.wasm", ] outputs = [ "$root_out_dir/flutter_web_sdk/canvaskit/{{source_file_part}}" ] @@ -61,6 +62,7 @@ copy("canvaskit_chromium_group") { sources = [ "$root_out_dir/canvaskit_chromium/canvaskit.js", + "$root_out_dir/canvaskit_chromium/canvaskit.js.symbols", "$root_out_dir/canvaskit_chromium/canvaskit.wasm", ] outputs = [ @@ -97,6 +99,7 @@ copy("skwasm_group") { sources = [ "$root_out_dir/skwasm/skwasm.js", + "$root_out_dir/skwasm/skwasm.js.symbols", "$root_out_dir/skwasm/skwasm.wasm", "$root_out_dir/skwasm/skwasm.worker.js", ] diff --git a/web_sdk/BUILD.gn b/web_sdk/BUILD.gn index 4177d97055c3f..1f3d136d4540b 100644 --- a/web_sdk/BUILD.gn +++ b/web_sdk/BUILD.gn @@ -546,10 +546,13 @@ if (!is_fuchsia) { if (is_wasm) { sources += [ "$root_out_dir/flutter_web_sdk/canvaskit/canvaskit.js", + "$root_out_dir/flutter_web_sdk/canvaskit/canvaskit.js.symbols", "$root_out_dir/flutter_web_sdk/canvaskit/canvaskit.wasm", "$root_out_dir/flutter_web_sdk/canvaskit/chromium/canvaskit.js", + "$root_out_dir/flutter_web_sdk/canvaskit/chromium/canvaskit.js.symbols", "$root_out_dir/flutter_web_sdk/canvaskit/chromium/canvaskit.wasm", "$root_out_dir/flutter_web_sdk/canvaskit/skwasm.js", + "$root_out_dir/flutter_web_sdk/canvaskit/skwasm.js.symbols", "$root_out_dir/flutter_web_sdk/canvaskit/skwasm.wasm", "$root_out_dir/flutter_web_sdk/canvaskit/skwasm.worker.js", ] From e96538f87f961119711c1eeea66e4182a1841593 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 17 Oct 2023 12:43:23 -0400 Subject: [PATCH 712/859] Roll Skia from d937d10a0ba9 to 8b3f2ef48a90 (3 revisions) (#47005) https://skia.googlesource.com/skia.git/+log/d937d10a0ba9..8b3f2ef48a90 2023-10-17 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 160b327a9c37 to 1b161432fcf1 (7 revisions) 2023-10-17 bungeman@google.com Revert "Reland "[pdf] Simplify filled paths"" 2023-10-17 johnstiles@google.com Fix ClangTidy `performance-unnecessary-value-param` findings. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index e80ce14754f29..73b47bdb1ac90 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'd937d10a0ba9e76da72781c3e00794cf9b1589df', + 'skia_revision': '8b3f2ef48a90fb7cb926a2caffa31b66e1119857', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index d4648839fcd39..ddeec591ce465 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 4ad07407e46dde841a90a1fb5df04fcb +Signature: c039ec8763d43d5d5f7efaa1c79dcd78 ==================================================================================================== LIBRARY: etc1 From 5a084de09514857a13d9099b47527be6f11340f4 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Tue, 17 Oct 2023 10:14:57 -0700 Subject: [PATCH 713/859] Move the secondary build tree into the engine. (#46989) Now, both the DEPS and the custom GN rules for them are in the same repo and won't need a buildroot sibling patch + roll. Part of https://github.com/flutter/flutter/issues/67373. Pending landing of the buildroot patch in https://github.com/flutter/buildroot/pull/781 (the DEPS will be updated before landing and after the presubs pass). --- .gitignore | 1 + DEPS | 4 +- .../flutter/third_party/glfw/BUILD.gn | 125 ++ .../secondary/flutter/third_party/glfw/README | 13 + .../flutter/third_party/glfw/glfw_args.gni | 7 + build/secondary/testing/gmock/BUILD.gn | 50 + build/secondary/testing/gtest/BUILD.gn | 132 ++ .../testing/libfuzzer/fuzzer_test.gni | 11 + build/secondary/testing/test.gni | 6 + build/secondary/third_party/BUILD.gn | 9 + .../third_party/android_ndk/BUILD.gn | 8 + .../third_party/android_tools/BUILD.gn | 19 + .../secondary/third_party/benchmark/BUILD.gn | 60 + .../third_party/cpu-features/BUILD.gn | 8 + .../third_party/dart/pkg/meta/BUILD.gn | 26 + .../dart/third_party/pkg/args/BUILD.gn | 35 + .../dart/third_party/pkg/collection/BUILD.gn | 51 + .../dart/third_party/pkg/logging/BUILD.gn | 27 + .../dart/third_party/pkg/matcher/BUILD.gn | 55 + .../dart/third_party/pkg/path/BUILD.gn | 36 + .../dart/third_party/pkg/stack_trace/BUILD.gn | 33 + build/secondary/third_party/expat/BUILD.gn | 26 + .../expat/expat_config/expat_config.h | 14 + .../third_party/flatbuffers/BUILD.gn | 100 ++ .../third_party/flatbuffers/flatbuffers.gni | 51 + .../secondary/third_party/googletest/BUILD.gn | 319 +++++ build/secondary/third_party/imgui/BUILD.gn | 48 + build/secondary/third_party/inja/BUILD.gn | 43 + build/secondary/third_party/json/BUILD.gn | 63 + build/secondary/third_party/jsoncpp/BUILD.gn | 11 + build/secondary/third_party/libcxx/BUILD.gn | 117 ++ .../third_party/libcxx/config/__config_site | 39 + .../secondary/third_party/libcxxabi/BUILD.gn | 82 ++ .../third_party/libjpeg-turbo/BUILD.gn | 81 ++ build/secondary/third_party/libsrtp/BUILD.gn | 345 +++++ build/secondary/third_party/libtess2/BUILD.gn | 29 + build/secondary/third_party/libwebp/BUILD.gn | 178 +++ build/secondary/third_party/nss/BUILD.gn | 1205 +++++++++++++++++ build/secondary/third_party/ocmock/BUILD.gn | 121 ++ .../secondary/third_party/pkg/quiver/BUILD.gn | 83 ++ .../third_party/shaderc_flutter/BUILD.gn | 83 ++ .../third_party/spirv_cross_flutter/BUILD.gn | 41 + build/secondary/third_party/stb/BUILD.gn | 15 + .../third_party/stb/stb_truetype_stub.cc | 6 + build/secondary/third_party/tinygltf/BUILD.gn | 23 + .../third_party/tinygltf/tinygltf_stub.cc | 11 + .../vulkan_memory_allocator/BUILD.gn | 40 + .../vulkan_validation_layers/BUILD.gn | 493 +++++++ build/secondary/third_party/wuffs/BUILD.gn | 59 + ci/pylint.sh | 1 - 50 files changed, 4440 insertions(+), 3 deletions(-) create mode 100644 build/secondary/flutter/third_party/glfw/BUILD.gn create mode 100644 build/secondary/flutter/third_party/glfw/README create mode 100644 build/secondary/flutter/third_party/glfw/glfw_args.gni create mode 100644 build/secondary/testing/gmock/BUILD.gn create mode 100644 build/secondary/testing/gtest/BUILD.gn create mode 100644 build/secondary/testing/libfuzzer/fuzzer_test.gni create mode 100644 build/secondary/testing/test.gni create mode 100644 build/secondary/third_party/BUILD.gn create mode 100644 build/secondary/third_party/android_ndk/BUILD.gn create mode 100644 build/secondary/third_party/android_tools/BUILD.gn create mode 100644 build/secondary/third_party/benchmark/BUILD.gn create mode 100644 build/secondary/third_party/cpu-features/BUILD.gn create mode 100644 build/secondary/third_party/dart/pkg/meta/BUILD.gn create mode 100644 build/secondary/third_party/dart/third_party/pkg/args/BUILD.gn create mode 100644 build/secondary/third_party/dart/third_party/pkg/collection/BUILD.gn create mode 100644 build/secondary/third_party/dart/third_party/pkg/logging/BUILD.gn create mode 100644 build/secondary/third_party/dart/third_party/pkg/matcher/BUILD.gn create mode 100644 build/secondary/third_party/dart/third_party/pkg/path/BUILD.gn create mode 100644 build/secondary/third_party/dart/third_party/pkg/stack_trace/BUILD.gn create mode 100644 build/secondary/third_party/expat/BUILD.gn create mode 100644 build/secondary/third_party/expat/expat_config/expat_config.h create mode 100644 build/secondary/third_party/flatbuffers/BUILD.gn create mode 100644 build/secondary/third_party/flatbuffers/flatbuffers.gni create mode 100644 build/secondary/third_party/googletest/BUILD.gn create mode 100644 build/secondary/third_party/imgui/BUILD.gn create mode 100644 build/secondary/third_party/inja/BUILD.gn create mode 100644 build/secondary/third_party/json/BUILD.gn create mode 100644 build/secondary/third_party/jsoncpp/BUILD.gn create mode 100644 build/secondary/third_party/libcxx/BUILD.gn create mode 100644 build/secondary/third_party/libcxx/config/__config_site create mode 100644 build/secondary/third_party/libcxxabi/BUILD.gn create mode 100644 build/secondary/third_party/libjpeg-turbo/BUILD.gn create mode 100644 build/secondary/third_party/libsrtp/BUILD.gn create mode 100644 build/secondary/third_party/libtess2/BUILD.gn create mode 100644 build/secondary/third_party/libwebp/BUILD.gn create mode 100644 build/secondary/third_party/nss/BUILD.gn create mode 100644 build/secondary/third_party/ocmock/BUILD.gn create mode 100644 build/secondary/third_party/pkg/quiver/BUILD.gn create mode 100644 build/secondary/third_party/shaderc_flutter/BUILD.gn create mode 100644 build/secondary/third_party/spirv_cross_flutter/BUILD.gn create mode 100644 build/secondary/third_party/stb/BUILD.gn create mode 100644 build/secondary/third_party/stb/stb_truetype_stub.cc create mode 100644 build/secondary/third_party/tinygltf/BUILD.gn create mode 100644 build/secondary/third_party/tinygltf/tinygltf_stub.cc create mode 100644 build/secondary/third_party/vulkan_memory_allocator/BUILD.gn create mode 100644 build/secondary/third_party/vulkan_validation_layers/BUILD.gn create mode 100644 build/secondary/third_party/wuffs/BUILD.gn diff --git a/.gitignore b/.gitignore index a19d20d383802..fcd681e7bd9c5 100644 --- a/.gitignore +++ b/.gitignore @@ -130,3 +130,4 @@ app.*.symbols # Prebuilt binaries. /prebuilts/ +/build/secondary/third_party/protobuf diff --git a/DEPS b/DEPS index 73b47bdb1ac90..0d26b689b7734 100644 --- a/DEPS +++ b/DEPS @@ -262,7 +262,7 @@ allowed_hosts = [ ] deps = { - 'src': 'https://github.com/flutter/buildroot.git' + '@' + '60415e4cb48742a60ba3859d92bbdcb7d14841b0', + 'src': 'https://github.com/flutter/buildroot.git' + '@' + '6f31be56e1058997feac2e93ff67fef21ae25eaf', # Fuchsia compatibility # @@ -325,7 +325,7 @@ deps = { 'src/third_party/protobuf': Var('fuchsia_git') + '/third_party/protobuf' + '@' + Var('dart_libprotobuf_rev'), - 'src/build/secondary/third_party/protobuf': + 'src/flutter/build/secondary/third_party/protobuf': Var('fuchsia_git') + '/protobuf-gn' + '@' + Var('dart_protobuf_gn_rev'), 'src/third_party/dart': diff --git a/build/secondary/flutter/third_party/glfw/BUILD.gn b/build/secondary/flutter/third_party/glfw/BUILD.gn new file mode 100644 index 0000000000000..98c3fe43e7eda --- /dev/null +++ b/build/secondary/flutter/third_party/glfw/BUILD.gn @@ -0,0 +1,125 @@ +# Copyright 2013 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("glfw_args.gni") + +_checkout_dir = "//flutter/third_party/glfw" + +config("relative_glfw_headers") { + include_dirs = [ + "$_checkout_dir/include", + "$_checkout_dir/include/GLFW", + ] +} + +source_set("glfw") { + public = [ + "$_checkout_dir/include/GLFW/glfw3.h", + "$_checkout_dir/include/GLFW/glfw3native.h", + ] + + sources = [ + "$_checkout_dir/src/context.c", + "$_checkout_dir/src/egl_context.c", + "$_checkout_dir/src/init.c", + "$_checkout_dir/src/input.c", + "$_checkout_dir/src/monitor.c", + "$_checkout_dir/src/null_init.c", + "$_checkout_dir/src/null_joystick.c", + "$_checkout_dir/src/null_joystick.h", + "$_checkout_dir/src/null_monitor.c", + "$_checkout_dir/src/null_platform.h", + "$_checkout_dir/src/null_window.c", + "$_checkout_dir/src/osmesa_context.c", + "$_checkout_dir/src/platform.c", + "$_checkout_dir/src/vulkan.c", + "$_checkout_dir/src/window.c", + ] + + include_dirs = [ "$_checkout_dir/src" ] + + public_configs = [ ":relative_glfw_headers" ] + + if (is_win) { + sources += [ + "$_checkout_dir/src/wgl_context.c", + "$_checkout_dir/src/win32_init.c", + "$_checkout_dir/src/win32_joystick.c", + "$_checkout_dir/src/win32_joystick.h", + "$_checkout_dir/src/win32_module.c", + "$_checkout_dir/src/win32_monitor.c", + "$_checkout_dir/src/win32_platform.h", + "$_checkout_dir/src/win32_thread.c", + "$_checkout_dir/src/win32_time.c", + "$_checkout_dir/src/win32_window.c", + ] + + defines = [ "_GLFW_WIN32" ] + } else if (is_linux) { + sources += [ + "$_checkout_dir/src/glx_context.c", + "$_checkout_dir/src/linux_joystick.c", + "$_checkout_dir/src/linux_joystick.h", + "$_checkout_dir/src/posix_module.c", + "$_checkout_dir/src/posix_poll.c", + "$_checkout_dir/src/posix_poll.h", + "$_checkout_dir/src/posix_thread.c", + "$_checkout_dir/src/posix_thread.h", + "$_checkout_dir/src/posix_time.c", + "$_checkout_dir/src/posix_time.h", + "$_checkout_dir/src/x11_init.c", + "$_checkout_dir/src/x11_monitor.c", + "$_checkout_dir/src/x11_platform.h", + "$_checkout_dir/src/x11_window.c", + "$_checkout_dir/src/xkb_unicode.c", + "$_checkout_dir/src/xkb_unicode.h", + ] + + defines = [ + "_GLFW_X11", + "_GLFW_HAS_XF86VM", + ] + + libs = [ + "X11", + "Xcursor", + "Xinerama", + "Xrandr", + "Xxf86vm", + ] + } else if (is_mac) { + sources += [ + "$_checkout_dir/src/cocoa_init.m", + "$_checkout_dir/src/cocoa_joystick.h", + "$_checkout_dir/src/cocoa_joystick.m", + "$_checkout_dir/src/cocoa_monitor.m", + "$_checkout_dir/src/cocoa_platform.h", + "$_checkout_dir/src/cocoa_time.c", + "$_checkout_dir/src/cocoa_window.m", + "$_checkout_dir/src/nsgl_context.m", + "$_checkout_dir/src/posix_module.c", + "$_checkout_dir/src/posix_thread.c", + "$_checkout_dir/src/posix_thread.h", + ] + + defines = [ "_GLFW_COCOA" ] + + cflags = [ + "-Wno-deprecated-declarations", + "-Wno-objc-multiple-method-names", + ] + + frameworks = [ + "CoreVideo.framework", + "IOKit.framework", + ] + } + + if (glfw_vulkan_library != "") { + defines += [ "_GLFW_VULKAN_LIBRARY=" + glfw_vulkan_library ] + } + + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] +} diff --git a/build/secondary/flutter/third_party/glfw/README b/build/secondary/flutter/third_party/glfw/README new file mode 100644 index 0000000000000..404ef3cae2eec --- /dev/null +++ b/build/secondary/flutter/third_party/glfw/README @@ -0,0 +1,13 @@ +Name: GLFW +License: zlib/libpng (BSD-like) +Upstream Git: https://github.com/glfw/glfw +Version: 3.2.1 +Description: + +GLFW is an Open Source, multi-platform library for OpenGL, OpenGL ES and +Vulkan development on the desktop. + +To update: +- Advance the pinned hash in DEPS, which should map the repository to + //third_party/glfw +- Update BUILD.gn if necessary for changes. diff --git a/build/secondary/flutter/third_party/glfw/glfw_args.gni b/build/secondary/flutter/third_party/glfw/glfw_args.gni new file mode 100644 index 0000000000000..c5903ad2078c8 --- /dev/null +++ b/build/secondary/flutter/third_party/glfw/glfw_args.gni @@ -0,0 +1,7 @@ +# Copyright 2013 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +declare_args() { + glfw_vulkan_library = "" +} diff --git a/build/secondary/testing/gmock/BUILD.gn b/build/secondary/testing/gmock/BUILD.gn new file mode 100644 index 0000000000000..ecf49f0ff7f6f --- /dev/null +++ b/build/secondary/testing/gmock/BUILD.gn @@ -0,0 +1,50 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +config("gmock_config") { + # Gmock headers need to be able to find themselves. + include_dirs = [ "include" ] +} + +static_library("gmock") { + # TODO http://crbug.com/412064 enable this flag all the time. + testonly = !is_component_build + sources = [ + # Sources based on files in r173 of gmock. + "include/gmock/gmock-actions.h", + "include/gmock/gmock-cardinalities.h", + "include/gmock/gmock-generated-actions.h", + "include/gmock/gmock-generated-function-mockers.h", + "include/gmock/gmock-generated-matchers.h", + "include/gmock/gmock-generated-nice-strict.h", + "include/gmock/gmock-matchers.h", + "include/gmock/gmock-spec-builders.h", + "include/gmock/gmock.h", + "include/gmock/internal/gmock-generated-internal-utils.h", + "include/gmock/internal/gmock-internal-utils.h", + "include/gmock/internal/gmock-port.h", + + #"src/gmock-all.cc", # Not needed by our build. + "src/gmock-cardinalities.cc", + "src/gmock-internal-utils.cc", + "src/gmock-matchers.cc", + "src/gmock-spec-builders.cc", + "src/gmock.cc", + ] + + # This project includes some stuff form gtest's guts. + include_dirs = [ "../gtest/include" ] + + public_configs = [ + ":gmock_config", + "//testing/gtest:gtest_config", + ] +} + +static_library("gmock_main") { + # TODO http://crbug.com/412064 enable this flag all the time. + testonly = !is_component_build + sources = [ "src/gmock_main.cc" ] + deps = [ ":gmock" ] +} diff --git a/build/secondary/testing/gtest/BUILD.gn b/build/secondary/testing/gtest/BUILD.gn new file mode 100644 index 0000000000000..dad1b7d697b32 --- /dev/null +++ b/build/secondary/testing/gtest/BUILD.gn @@ -0,0 +1,132 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +config("gtest_config") { + visibility = [ + ":*", + "//testing/gmock:*", # gmock also shares this config. + ] + + defines = [ + # In order to allow regex matches in gtest to be shared between Windows + # and other systems, we tell gtest to always use it's internal engine. + "GTEST_HAS_POSIX_RE=0", + + # Chrome doesn't support / require C++11, yet. + "GTEST_LANG_CXX11=0", + ] + + # Gtest headers need to be able to find themselves. + include_dirs = [ "include" ] + + if (is_win) { + cflags = [ "/wd4800" ] # Unused variable warning. + } + + if (is_posix) { + defines += [ + # gtest isn't able to figure out when RTTI is disabled for gcc + # versions older than 4.3.2, and assumes it's enabled. Our Mac + # and Linux builds disable RTTI, and cannot guarantee that the + # compiler will be 4.3.2. or newer. The Mac, for example, uses + # 4.2.1 as that is the latest available on that platform. gtest + # must be instructed that RTTI is disabled here, and for any + # direct dependents that might include gtest headers. + "GTEST_HAS_RTTI=0", + ] + } + + if (is_android) { + defines += [ + # We want gtest features that use tr1::tuple, but we currently + # don't support the variadic templates used by libstdc++'s + # implementation. gtest supports this scenario by providing its + # own implementation but we must opt in to it. + "GTEST_USE_OWN_TR1_TUPLE=1", + + # GTEST_USE_OWN_TR1_TUPLE only works if GTEST_HAS_TR1_TUPLE is set. + # gtest r625 made it so that GTEST_HAS_TR1_TUPLE is set to 0 + # automatically on android, so it has to be set explicitly here. + "GTEST_HAS_TR1_TUPLE=1", + ] + } +} + +config("gtest_direct_config") { + visibility = [ ":*" ] + defines = [ "UNIT_TEST" ] +} + +config("gtest_warnings") { + visibility = [ ":*" ] + if (is_win && is_clang) { + # The Mutex constructor initializer list in gtest-port.cc is incorrectly + # ordered. See + # https://groups.google.com/d/msg/googletestframework/S5uSV8L2TX8/U1FaTDa6J6sJ. + cflags = [ "-Wno-reorder" ] + } +} + +static_library("gtest") { + # TODO http://crbug.com/412064 enable this flag all the time. + testonly = !is_component_build + sources = [ + "include/gtest/gtest-death-test.h", + "include/gtest/gtest-message.h", + "include/gtest/gtest-param-test.h", + "include/gtest/gtest-printers.h", + "include/gtest/gtest-spi.h", + "include/gtest/gtest-test-part.h", + "include/gtest/gtest-typed-test.h", + "include/gtest/gtest.h", + "include/gtest/gtest_pred_impl.h", + "include/gtest/internal/gtest-death-test-internal.h", + "include/gtest/internal/gtest-filepath.h", + "include/gtest/internal/gtest-internal.h", + "include/gtest/internal/gtest-linked_ptr.h", + "include/gtest/internal/gtest-param-util-generated.h", + "include/gtest/internal/gtest-param-util.h", + "include/gtest/internal/gtest-port.h", + "include/gtest/internal/gtest-string.h", + "include/gtest/internal/gtest-tuple.h", + "include/gtest/internal/gtest-type-util.h", + + #"gtest/src/gtest-all.cc", # Not needed by our build. + "../multiprocess_func_list.cc", + "../multiprocess_func_list.h", + "../platform_test.h", + "src/gtest-death-test.cc", + "src/gtest-filepath.cc", + "src/gtest-internal-inl.h", + "src/gtest-port.cc", + "src/gtest-printers.cc", + "src/gtest-test-part.cc", + "src/gtest-typed-test.cc", + "src/gtest.cc", + ] + + if (is_mac) { + sources += [ + "../gtest_mac.h", + "../gtest_mac.mm", + "../platform_test_mac.mm", + ] + } + + include_dirs = [ "." ] + + all_dependent_configs = [ ":gtest_config" ] + public_configs = [ ":gtest_direct_config" ] + + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ ":gtest_warnings" ] +} + +source_set("gtest_main") { + # TODO http://crbug.com/412064 enable this flag all the time. + testonly = !is_component_build + sources = [ "src/gtest_main.cc" ] + deps = [ ":gtest" ] +} diff --git a/build/secondary/testing/libfuzzer/fuzzer_test.gni b/build/secondary/testing/libfuzzer/fuzzer_test.gni new file mode 100644 index 0000000000000..8f8f3e750feec --- /dev/null +++ b/build/secondary/testing/libfuzzer/fuzzer_test.gni @@ -0,0 +1,11 @@ +# Copyright 2019 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# This is a dummy implementation to satisfy the ANGLE build, using the no-op +# implementation from the real (Chromium) fuzzer_test.gni. +template("fuzzer_test") { + not_needed(invoker, "*") + group(target_name) { + } +} diff --git a/build/secondary/testing/test.gni b/build/secondary/testing/test.gni new file mode 100644 index 0000000000000..ff724df08962a --- /dev/null +++ b/build/secondary/testing/test.gni @@ -0,0 +1,6 @@ +# Copyright 2019 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# This is a dummy file to satisfy the ANGLE build. Flutter's use of ANGLE +# doesn't actually require any of the real content. diff --git a/build/secondary/third_party/BUILD.gn b/build/secondary/third_party/BUILD.gn new file mode 100644 index 0000000000000..c44ca40e88832 --- /dev/null +++ b/build/secondary/third_party/BUILD.gn @@ -0,0 +1,9 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +source_set("fontconfig") { + if (is_linux) { + libs = [ "fontconfig" ] + } +} diff --git a/build/secondary/third_party/android_ndk/BUILD.gn b/build/secondary/third_party/android_ndk/BUILD.gn new file mode 100644 index 0000000000000..697d2873a5e39 --- /dev/null +++ b/build/secondary/third_party/android_ndk/BUILD.gn @@ -0,0 +1,8 @@ +# Copyright 2013 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +source_set("cpu_features") { + public_configs = [ "//third_party/android_tools:cpu_features_include" ] + deps = [ "//third_party/android_tools:cpu_features" ] +} diff --git a/build/secondary/third_party/android_tools/BUILD.gn b/build/secondary/third_party/android_tools/BUILD.gn new file mode 100644 index 0000000000000..574472afdb27a --- /dev/null +++ b/build/secondary/third_party/android_tools/BUILD.gn @@ -0,0 +1,19 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/config/android/rules.gni") + +config("cpu_features_include") { + include_dirs = [ "ndk/sources/android/cpufeatures" ] +} + +# This is the GN version of +# //build/android/ndk.gyp:cpu_features +source_set("cpu_features") { + sources = [ "ndk/sources/android/cpufeatures/cpu-features.c" ] + public_configs = [ ":cpu_features_include" ] + + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] +} diff --git a/build/secondary/third_party/benchmark/BUILD.gn b/build/secondary/third_party/benchmark/BUILD.gn new file mode 100644 index 0000000000000..f88d6bf0c6898 --- /dev/null +++ b/build/secondary/third_party/benchmark/BUILD.gn @@ -0,0 +1,60 @@ +# Copyright 2016 The Fuchsia Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +config("benchmark_config") { + visibility = [ ":*" ] + include_dirs = [ "include" ] +} +static_library("benchmark") { + testonly = true + + sources = [ + "//third_party/benchmark/src/arraysize.h", + "//third_party/benchmark/src/benchmark.cc", + "//third_party/benchmark/src/benchmark_api_internal.cc", + "//third_party/benchmark/src/benchmark_api_internal.h", + "//third_party/benchmark/src/benchmark_main.cc", + "//third_party/benchmark/src/benchmark_name.cc", + "//third_party/benchmark/src/benchmark_register.cc", + "//third_party/benchmark/src/benchmark_register.h", + "//third_party/benchmark/src/benchmark_runner.cc", + "//third_party/benchmark/src/benchmark_runner.h", + "//third_party/benchmark/src/check.h", + "//third_party/benchmark/src/colorprint.cc", + "//third_party/benchmark/src/colorprint.h", + "//third_party/benchmark/src/commandlineflags.cc", + "//third_party/benchmark/src/commandlineflags.h", + "//third_party/benchmark/src/complexity.cc", + "//third_party/benchmark/src/complexity.h", + "//third_party/benchmark/src/console_reporter.cc", + "//third_party/benchmark/src/counter.cc", + "//third_party/benchmark/src/counter.h", + "//third_party/benchmark/src/csv_reporter.cc", + "//third_party/benchmark/src/cycleclock.h", + "//third_party/benchmark/src/internal_macros.h", + "//third_party/benchmark/src/json_reporter.cc", + "//third_party/benchmark/src/log.h", + "//third_party/benchmark/src/mutex.h", + "//third_party/benchmark/src/perf_counters.cc", + "//third_party/benchmark/src/perf_counters.h", + "//third_party/benchmark/src/re.h", + "//third_party/benchmark/src/reporter.cc", + "//third_party/benchmark/src/sleep.cc", + "//third_party/benchmark/src/sleep.h", + "//third_party/benchmark/src/statistics.cc", + "//third_party/benchmark/src/statistics.h", + "//third_party/benchmark/src/string_util.cc", + "//third_party/benchmark/src/string_util.h", + "//third_party/benchmark/src/sysinfo.cc", + "//third_party/benchmark/src/sysinfo.h", + "//third_party/benchmark/src/thread_manager.h", + "//third_party/benchmark/src/thread_timer.h", + "//third_party/benchmark/src/timers.cc", + "//third_party/benchmark/src/timers.h", + ] + public_configs = [ ":benchmark_config" ] + defines = [ + "HAVE_STD_REGEX", + "HAVE_THREAD_SAFETY_ATTRIBUTES", + ] +} diff --git a/build/secondary/third_party/cpu-features/BUILD.gn b/build/secondary/third_party/cpu-features/BUILD.gn new file mode 100644 index 0000000000000..dadee56df8cff --- /dev/null +++ b/build/secondary/third_party/cpu-features/BUILD.gn @@ -0,0 +1,8 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +source_set("cpu-features") { + public_configs = [ "//third_party/android_tools:cpu_features_include" ] + deps = [ "//third_party/android_tools:cpu_features" ] +} diff --git a/build/secondary/third_party/dart/pkg/meta/BUILD.gn b/build/secondary/third_party/dart/pkg/meta/BUILD.gn new file mode 100644 index 0000000000000..3ad0e03f66bbe --- /dev/null +++ b/build/secondary/third_party/dart/pkg/meta/BUILD.gn @@ -0,0 +1,26 @@ +# Copyright 2021 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# TODO(flutter/flutter#85356): This file was originally generated by the +# fuchsia.git script: `package_importer.py`. The generated `BUILD.gn` files were +# copied to the flutter repo to support `dart_library` targets used for +# Flutter-Fuchsia integration tests. This file can be maintained by hand, but it +# would be better to implement a script for Flutter, to either generate these +# BUILD.gn files or dynamically generate the GN targets. + +import("//flutter/tools/fuchsia/dart/dart_library.gni") + +dart_library("meta") { + package_name = "meta" + + language_version = "2.12" + + deps = [] + + sources = [ + "dart2js.dart", + "meta.dart", + "meta_meta.dart", + ] +} diff --git a/build/secondary/third_party/dart/third_party/pkg/args/BUILD.gn b/build/secondary/third_party/dart/third_party/pkg/args/BUILD.gn new file mode 100644 index 0000000000000..e25404362f6a1 --- /dev/null +++ b/build/secondary/third_party/dart/third_party/pkg/args/BUILD.gn @@ -0,0 +1,35 @@ +# Copyright 2021 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# TODO(flutter/flutter#85356): This file was originally generated by the +# fuchsia.git script: `package_importer.py`. The generated `BUILD.gn` files were +# copied to the flutter repo to support `dart_library` targets used for +# Flutter-Fuchsia integration tests. This file can be maintained by hand, but it +# would be better to implement a script for Flutter, to either generate these +# BUILD.gn files or dynamically generate the GN targets. + +import("//flutter/tools/fuchsia/dart/dart_library.gni") + +dart_library("args") { + package_name = "args" + + language_version = "2.12" + + deps = [] + + sources = [ + "args.dart", + "command_runner.dart", + "src/allow_anything_parser.dart", + "src/arg_parser.dart", + "src/arg_parser_exception.dart", + "src/arg_results.dart", + "src/help_command.dart", + "src/option.dart", + "src/parser.dart", + "src/usage.dart", + "src/usage_exception.dart", + "src/utils.dart", + ] +} diff --git a/build/secondary/third_party/dart/third_party/pkg/collection/BUILD.gn b/build/secondary/third_party/dart/third_party/pkg/collection/BUILD.gn new file mode 100644 index 0000000000000..092624f4bed1a --- /dev/null +++ b/build/secondary/third_party/dart/third_party/pkg/collection/BUILD.gn @@ -0,0 +1,51 @@ +# Copyright 2021 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# TODO(flutter/flutter#85356): This file was originally generated by the +# fuchsia.git script: `package_importer.py`. The generated `BUILD.gn` files were +# copied to the flutter repo to support `dart_library` targets used for +# Flutter-Fuchsia integration tests. This file can be maintained by hand, but it +# would be better to implement a script for Flutter, to either generate these +# BUILD.gn files or dynamically generate the GN targets. + +import("//flutter/tools/fuchsia/dart/dart_library.gni") + +dart_library("collection") { + package_name = "collection" + + language_version = "2.12" + + deps = [] + + sources = [ + "algorithms.dart", + "collection.dart", + "equality.dart", + "iterable_zip.dart", + "priority_queue.dart", + "src/algorithms.dart", + "src/canonicalized_map.dart", + "src/combined_wrappers/combined_iterable.dart", + "src/combined_wrappers/combined_iterator.dart", + "src/combined_wrappers/combined_list.dart", + "src/combined_wrappers/combined_map.dart", + "src/comparators.dart", + "src/empty_unmodifiable_set.dart", + "src/equality.dart", + "src/equality_map.dart", + "src/equality_set.dart", + "src/functions.dart", + "src/iterable_extensions.dart", + "src/iterable_zip.dart", + "src/list_extensions.dart", + "src/priority_queue.dart", + "src/queue_list.dart", + "src/union_set.dart", + "src/union_set_controller.dart", + "src/unmodifiable_wrappers.dart", + "src/utils.dart", + "src/wrappers.dart", + "wrappers.dart", + ] +} diff --git a/build/secondary/third_party/dart/third_party/pkg/logging/BUILD.gn b/build/secondary/third_party/dart/third_party/pkg/logging/BUILD.gn new file mode 100644 index 0000000000000..73baa07636161 --- /dev/null +++ b/build/secondary/third_party/dart/third_party/pkg/logging/BUILD.gn @@ -0,0 +1,27 @@ +# Copyright 2021 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# TODO(flutter/flutter#85356): This file was originally generated by the +# fuchsia.git script: `package_importer.py`. The generated `BUILD.gn` files were +# copied to the flutter repo to support `dart_library` targets used for +# Flutter-Fuchsia integration tests. This file can be maintained by hand, but it +# would be better to implement a script for Flutter, to either generate these +# BUILD.gn files or dynamically generate the GN targets. + +import("//flutter/tools/fuchsia/dart/dart_library.gni") + +dart_library("logging") { + package_name = "logging" + + language_version = "2.12" + + deps = [] + + sources = [ + "logging.dart", + "src/level.dart", + "src/log_record.dart", + "src/logger.dart", + ] +} diff --git a/build/secondary/third_party/dart/third_party/pkg/matcher/BUILD.gn b/build/secondary/third_party/dart/third_party/pkg/matcher/BUILD.gn new file mode 100644 index 0000000000000..9bd84e15f70d5 --- /dev/null +++ b/build/secondary/third_party/dart/third_party/pkg/matcher/BUILD.gn @@ -0,0 +1,55 @@ +# Copyright 2021 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# TODO(flutter/flutter#85356): This file was originally generated by the +# fuchsia.git script: `package_importer.py`. The generated `BUILD.gn` files were +# copied to the flutter repo to support `dart_library` targets used for +# Flutter-Fuchsia integration tests. This file can be maintained by hand, but it +# would be better to implement a script for Flutter, to either generate these +# BUILD.gn files or dynamically generate the GN targets. + +import("//flutter/tools/fuchsia/dart/dart_library.gni") + +dart_library("matcher") { + package_name = "matcher" + + language_version = "2.12" + + deps = [ "//third_party/dart/third_party/pkg/stack_trace" ] + + sources = [ + "expect.dart", + "matcher.dart", + "mirror_matchers.dart", + "src/core_matchers.dart", + "src/custom_matcher.dart", + "src/description.dart", + "src/equals_matcher.dart", + "src/error_matchers.dart", + "src/expect/async_matcher.dart", + "src/expect/expect.dart", + "src/expect/expect_async.dart", + "src/expect/future_matchers.dart", + "src/expect/never_called.dart", + "src/expect/prints_matcher.dart", + "src/expect/stream_matcher.dart", + "src/expect/stream_matchers.dart", + "src/expect/throws_matcher.dart", + "src/expect/throws_matchers.dart", + "src/expect/util/placeholder.dart", + "src/expect/util/pretty_print.dart", + "src/feature_matcher.dart", + "src/having_matcher.dart", + "src/interfaces.dart", + "src/iterable_matchers.dart", + "src/map_matchers.dart", + "src/numeric_matchers.dart", + "src/operator_matchers.dart", + "src/order_matchers.dart", + "src/pretty_print.dart", + "src/string_matchers.dart", + "src/type_matcher.dart", + "src/util.dart", + ] +} diff --git a/build/secondary/third_party/dart/third_party/pkg/path/BUILD.gn b/build/secondary/third_party/dart/third_party/pkg/path/BUILD.gn new file mode 100644 index 0000000000000..2e692b66eb920 --- /dev/null +++ b/build/secondary/third_party/dart/third_party/pkg/path/BUILD.gn @@ -0,0 +1,36 @@ +# Copyright 2021 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# TODO(flutter/flutter#85356): This file was originally generated by the +# fuchsia.git script: `package_importer.py`. The generated `BUILD.gn` files were +# copied to the flutter repo to support `dart_library` targets used for +# Flutter-Fuchsia integration tests. This file can be maintained by hand, but it +# would be better to implement a script for Flutter, to either generate these +# BUILD.gn files or dynamically generate the GN targets. + +import("//flutter/tools/fuchsia/dart/dart_library.gni") + +dart_library("path") { + package_name = "path" + + language_version = "2.12" + + deps = [] + + sources = [ + "path.dart", + "src/characters.dart", + "src/context.dart", + "src/internal_style.dart", + "src/parsed_path.dart", + "src/path_exception.dart", + "src/path_map.dart", + "src/path_set.dart", + "src/style.dart", + "src/style/posix.dart", + "src/style/url.dart", + "src/style/windows.dart", + "src/utils.dart", + ] +} diff --git a/build/secondary/third_party/dart/third_party/pkg/stack_trace/BUILD.gn b/build/secondary/third_party/dart/third_party/pkg/stack_trace/BUILD.gn new file mode 100644 index 0000000000000..10dd2983dd05a --- /dev/null +++ b/build/secondary/third_party/dart/third_party/pkg/stack_trace/BUILD.gn @@ -0,0 +1,33 @@ +# Copyright 2021 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# TODO(flutter/flutter#85356): This file was originally generated by the +# fuchsia.git script: `package_importer.py`. The generated `BUILD.gn` files were +# copied to the flutter repo to support `dart_library` targets used for +# Flutter-Fuchsia integration tests. This file can be maintained by hand, but it +# would be better to implement a script for Flutter, to either generate these +# BUILD.gn files or dynamically generate the GN targets. + +import("//flutter/tools/fuchsia/dart/dart_library.gni") + +dart_library("stack_trace") { + package_name = "stack_trace" + + language_version = "2.12" + + deps = [ "//third_party/dart/third_party/pkg/path" ] + + sources = [ + "src/chain.dart", + "src/frame.dart", + "src/lazy_chain.dart", + "src/lazy_trace.dart", + "src/stack_zone_specification.dart", + "src/trace.dart", + "src/unparsed_frame.dart", + "src/utils.dart", + "src/vm_trace.dart", + "stack_trace.dart", + ] +} diff --git a/build/secondary/third_party/expat/BUILD.gn b/build/secondary/third_party/expat/BUILD.gn new file mode 100644 index 0000000000000..316ec274443fa --- /dev/null +++ b/build/secondary/third_party/expat/BUILD.gn @@ -0,0 +1,26 @@ +# Copyright 2013 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +config("expat_config") { + include_dirs = [ + "expat/lib", + "//flutter/build/secondary/third_party/expat/expat_config", + ] + + defines = [ + "XML_STATIC", + "XML_DEV_URANDOM", + ] +} + +static_library("expat") { + sources = [ + "expat/lib/expat.h", + "expat/lib/xmlparse.c", + "expat/lib/xmlrole.c", + "expat/lib/xmltok.c", + ] + + public_configs = [ ":expat_config" ] +} diff --git a/build/secondary/third_party/expat/expat_config/expat_config.h b/build/secondary/third_party/expat/expat_config/expat_config.h new file mode 100644 index 0000000000000..d02d0f6005c0e --- /dev/null +++ b/build/secondary/third_party/expat/expat_config/expat_config.h @@ -0,0 +1,14 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#define BYTEORDER 1234 +#define HAVE_INTTYPES_H 1 +#define HAVE_MEMORY_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRING_H 1 +#define STDC_HEADERS 1 +#define XML_CONTEXT_BYTES 1024 +#define XML_DTD 1 +#define XML_NS 1 diff --git a/build/secondary/third_party/flatbuffers/BUILD.gn b/build/secondary/third_party/flatbuffers/BUILD.gn new file mode 100644 index 0000000000000..502be760175b3 --- /dev/null +++ b/build/secondary/third_party/flatbuffers/BUILD.gn @@ -0,0 +1,100 @@ +# Copyright 2013 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +_src_root = "//third_party/flatbuffers" + +config("flatbuffers_public_configs") { + include_dirs = [ "$_src_root/include" ] + + cflags = [ "-Wno-newline-eof" ] +} + +source_set("flatbuffers") { + sources = [ + "$_src_root/include/flatbuffers/allocator.h", + "$_src_root/include/flatbuffers/array.h", + "$_src_root/include/flatbuffers/base.h", + "$_src_root/include/flatbuffers/bfbs_generator.h", + "$_src_root/include/flatbuffers/buffer.h", + "$_src_root/include/flatbuffers/buffer_ref.h", + "$_src_root/include/flatbuffers/default_allocator.h", + "$_src_root/include/flatbuffers/detached_buffer.h", + "$_src_root/include/flatbuffers/flatbuffer_builder.h", + "$_src_root/include/flatbuffers/flatbuffers.h", + "$_src_root/include/flatbuffers/flex_flat_util.h", + "$_src_root/include/flatbuffers/flexbuffers.h", + "$_src_root/include/flatbuffers/hash.h", + "$_src_root/include/flatbuffers/idl.h", + "$_src_root/include/flatbuffers/minireflect.h", + "$_src_root/include/flatbuffers/reflection.h", + "$_src_root/include/flatbuffers/reflection_generated.h", + "$_src_root/include/flatbuffers/registry.h", + "$_src_root/include/flatbuffers/stl_emulation.h", + "$_src_root/include/flatbuffers/string.h", + "$_src_root/include/flatbuffers/struct.h", + "$_src_root/include/flatbuffers/table.h", + "$_src_root/include/flatbuffers/util.h", + "$_src_root/include/flatbuffers/vector.h", + "$_src_root/include/flatbuffers/vector_downward.h", + "$_src_root/include/flatbuffers/verifier.h", + "$_src_root/src/idl_gen_text.cpp", + "$_src_root/src/idl_parser.cpp", + "$_src_root/src/reflection.cpp", + "$_src_root/src/util.cpp", + ] + + public_configs = [ ":flatbuffers_public_configs" ] +} + +executable("flatc") { + sources = [ + "$_src_root/grpc/src/compiler/cpp_generator.cc", + "$_src_root/grpc/src/compiler/cpp_generator.h", + "$_src_root/grpc/src/compiler/go_generator.cc", + "$_src_root/grpc/src/compiler/go_generator.h", + "$_src_root/grpc/src/compiler/java_generator.cc", + "$_src_root/grpc/src/compiler/java_generator.h", + "$_src_root/grpc/src/compiler/python_generator.cc", + "$_src_root/grpc/src/compiler/python_generator.h", + "$_src_root/grpc/src/compiler/schema_interface.h", + "$_src_root/grpc/src/compiler/swift_generator.cc", + "$_src_root/grpc/src/compiler/swift_generator.h", + "$_src_root/grpc/src/compiler/ts_generator.cc", + "$_src_root/grpc/src/compiler/ts_generator.h", + "$_src_root/include/flatbuffers/code_generators.h", + "$_src_root/src/annotated_binary_text_gen.cpp", + "$_src_root/src/annotated_binary_text_gen.h", + "$_src_root/src/bfbs_gen.h", + "$_src_root/src/bfbs_gen_lua.cpp", + "$_src_root/src/bfbs_gen_lua.h", + "$_src_root/src/bfbs_namer.h", + "$_src_root/src/binary_annotator.cpp", + "$_src_root/src/binary_annotator.h", + "$_src_root/src/code_generators.cpp", + "$_src_root/src/flatc.cpp", + "$_src_root/src/flatc_main.cpp", + "$_src_root/src/idl_gen_cpp.cpp", + "$_src_root/src/idl_gen_csharp.cpp", + "$_src_root/src/idl_gen_dart.cpp", + "$_src_root/src/idl_gen_fbs.cpp", + "$_src_root/src/idl_gen_go.cpp", + "$_src_root/src/idl_gen_grpc.cpp", + "$_src_root/src/idl_gen_java.cpp", + "$_src_root/src/idl_gen_json_schema.cpp", + "$_src_root/src/idl_gen_kotlin.cpp", + "$_src_root/src/idl_gen_lobster.cpp", + "$_src_root/src/idl_gen_lua.cpp", + "$_src_root/src/idl_gen_php.cpp", + "$_src_root/src/idl_gen_python.cpp", + "$_src_root/src/idl_gen_rust.cpp", + "$_src_root/src/idl_gen_swift.cpp", + "$_src_root/src/idl_gen_ts.cpp", + "$_src_root/src/idl_namer.h", + "$_src_root/src/namer.h", + ] + + include_dirs = [ "$_src_root/grpc" ] + + deps = [ ":flatbuffers" ] +} diff --git a/build/secondary/third_party/flatbuffers/flatbuffers.gni b/build/secondary/third_party/flatbuffers/flatbuffers.gni new file mode 100644 index 0000000000000..ae636d64aee9d --- /dev/null +++ b/build/secondary/third_party/flatbuffers/flatbuffers.gni @@ -0,0 +1,51 @@ +# Copyright 2013 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/compiled_action.gni") + +template("flatbuffers") { + assert(defined(invoker.flatbuffers), + "Flatbuffer schema files must be specified.") + + flatc_target_name = "flatc_$target_name" + compiled_action_foreach(flatc_target_name) { + tool = "//third_party/flatbuffers:flatc" + sources = invoker.flatbuffers + outputs = [ "$target_gen_dir/{{source_name_part}}_flatbuffers.h" ] + args = [ + "--warnings-as-errors", + "--cpp", + "--cpp-std", + "c++17", + "--cpp-static-reflection", + "--gen-object-api", + "--filename-suffix", + "_flatbuffers", + "-o", + rebase_path(target_gen_dir, root_build_dir), + "{{source}}", + ] + } + + source_set(target_name) { + forward_variables_from(invoker, + "*", + [ + "flatbuffers", + "sources", + "deps", + ]) + sources = get_target_outputs(":$flatc_target_name") + if (defined(invoker.sources)) { + sources += invoker.sources + } + deps = [ + ":$flatc_target_name", + "//third_party/flatbuffers", + ] + if (defined(invoker.deps)) { + deps += invoker.deps + } + } +} diff --git a/build/secondary/third_party/googletest/BUILD.gn b/build/secondary/third_party/googletest/BUILD.gn new file mode 100644 index 0000000000000..72f87cc4749e9 --- /dev/null +++ b/build/secondary/third_party/googletest/BUILD.gn @@ -0,0 +1,319 @@ +# Copyright 2018 The Fuchsia Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +if (is_fuchsia) { + import("//build/fuchsia/sdk.gni") +} + +config("gtest_private_config") { + visibility = [ ":*" ] + include_dirs = [ "googletest" ] +} + +config("gtest_config") { + include_dirs = [ "googletest/include" ] +} + +static_library("gtest") { + testonly = true + public = [ + "googletest/include/gtest/gtest-spi.h", + "googletest/include/gtest/gtest.h", + ] + sources = [ + "googletest/include/gtest/gtest-death-test.h", + "googletest/include/gtest/gtest-message.h", + "googletest/include/gtest/gtest-param-test.h", + "googletest/include/gtest/gtest-printers.h", + "googletest/include/gtest/gtest-test-part.h", + "googletest/include/gtest/gtest-typed-test.h", + "googletest/include/gtest/gtest_pred_impl.h", + "googletest/include/gtest/gtest_prod.h", + "googletest/include/gtest/internal/custom/gtest-port.h", + "googletest/include/gtest/internal/custom/gtest-printers.h", + "googletest/include/gtest/internal/custom/gtest.h", + "googletest/include/gtest/internal/gtest-death-test-internal.h", + "googletest/include/gtest/internal/gtest-filepath.h", + "googletest/include/gtest/internal/gtest-internal.h", + "googletest/include/gtest/internal/gtest-linked_ptr.h", + "googletest/include/gtest/internal/gtest-param-util-generated.h", + "googletest/include/gtest/internal/gtest-param-util.h", + "googletest/include/gtest/internal/gtest-port-arch.h", + "googletest/include/gtest/internal/gtest-port.h", + "googletest/include/gtest/internal/gtest-string.h", + "googletest/include/gtest/internal/gtest-tuple.h", + "googletest/include/gtest/internal/gtest-type-util.h", + "googletest/src/gtest-all.cc", + "googletest/src/gtest-death-test.cc", + "googletest/src/gtest-filepath.cc", + "googletest/src/gtest-internal-inl.h", + "googletest/src/gtest-matchers.cc", + "googletest/src/gtest-port.cc", + "googletest/src/gtest-printers.cc", + "googletest/src/gtest-test-part.cc", + "googletest/src/gtest-typed-test.cc", + "googletest/src/gtest.cc", + ] + sources -= [ "googletest/src/gtest-all.cc" ] + public_configs = [ ":gtest_config" ] + configs += [ ":gtest_private_config" ] + + if (is_fuchsia) { + if (using_fuchsia_sdk) { + deps = [ + "$fuchsia_sdk_root/pkg:fdio", + "$fuchsia_sdk_root/pkg:zx", + ] + } else { + deps = [ + "//zircon/public/lib/fdio", + "//zircon/public/lib/zx", + ] + } + } +} + +# Library that defines the FRIEND_TEST macro. +source_set("gtest_prod") { + testonly = false + public = [ "googletest/include/gtest/gtest_prod.h" ] + public_configs = [ ":gtest_config" ] +} + +static_library("gtest_main") { + testonly = true + sources = [ "googletest/src/gtest_main.cc" ] + public_deps = [ ":gtest" ] +} + +executable("gtest_all_test") { + testonly = true + sources = [ + "googletest/test/gtest-death-test_test.cc", + "googletest/test/gtest-filepath_test.cc", + "googletest/test/gtest-linked_ptr_test.cc", + "googletest/test/gtest-message_test.cc", + "googletest/test/gtest-options_test.cc", + "googletest/test/gtest-port_test.cc", + "googletest/test/gtest-printers_test.cc", + "googletest/test/gtest-test-part_test.cc", + "googletest/test/gtest-typed-test2_test.cc", + "googletest/test/gtest-typed-test_test.cc", + "googletest/test/gtest-typed-test_test.h", + "googletest/test/gtest_main_unittest.cc", + "googletest/test/gtest_pred_impl_unittest.cc", + "googletest/test/gtest_prod_test.cc", + "googletest/test/gtest_unittest.cc", + "googletest/test/production.cc", + "googletest/test/production.h", + ] + configs += [ ":gtest_private_config" ] + deps = [ + ":gtest", + ":gtest_main", + ] +} + +executable("gtest_environment_test") { + testonly = true + sources = [ "googletest/test/gtest_environment_test.cc" ] + configs += [ ":gtest_private_config" ] + deps = [ ":gtest" ] +} + +executable("gtest_listener_test") { + testonly = true + sources = [ "googletest/test/gtest-listener_test.cc" ] + deps = [ ":gtest" ] +} + +executable("gtest_no_test") { + testonly = true + sources = [ "googletest/test/gtest_no_test_unittest.cc" ] + deps = [ ":gtest" ] +} + +executable("gtest_param_test") { + testonly = true + sources = [ + "googletest/test/gtest-param-test2_test.cc", + "googletest/test/gtest-param-test_test.cc", + "googletest/test/gtest-param-test_test.h", + ] + configs += [ ":gtest_private_config" ] + deps = [ ":gtest" ] +} + +executable("gtest_premature_exit_test") { + testonly = true + sources = [ "googletest/test/gtest_premature_exit_test.cc" ] + deps = [ ":gtest" ] +} + +executable("gtest_repeat_test") { + testonly = true + sources = [ "googletest/test/gtest_repeat_test.cc" ] + configs += [ ":gtest_private_config" ] + deps = [ ":gtest" ] +} + +executable("gtest_sole_header_test") { + testonly = true + sources = [ "googletest/test/gtest_sole_header_test.cc" ] + deps = [ + ":gtest", + ":gtest_main", + ] +} + +executable("gtest_stress_test") { + testonly = true + sources = [ "googletest/test/gtest_stress_test.cc" ] + configs += [ ":gtest_private_config" ] + deps = [ ":gtest" ] +} + +executable("gtest_unittest_api_test") { + testonly = true + sources = [ "googletest/test/gtest-unittest-api_test.cc" ] + deps = [ ":gtest" ] +} + +group("gtest_all_tests") { + testonly = true + deps = [ + ":gtest_all_test", + ":gtest_environment_test", + ":gtest_listener_test", + ":gtest_no_test", + ":gtest_param_test", + ":gtest_premature_exit_test", + ":gtest_repeat_test", + ":gtest_sole_header_test", + ":gtest_stress_test", + ":gtest_unittest_api_test", + ] +} + +config("gmock_private_config") { + visibility = [ ":*" ] + include_dirs = [ "googlemock" ] +} + +config("gmock_config") { + include_dirs = [ "googlemock/include" ] + + cflags_cc = [ + # The MOCK_METHODn() macros do not specify "override", which triggers this + # warning in users: "error: 'Method' overrides a member function but is not + # marked 'override' [-Werror,-Winconsistent-missing-override]". Suppress + # these warnings until https://github.com/google/googletest/issues/533 is + # fixed. + "-Wno-inconsistent-missing-override", + ] +} + +static_library("gmock") { + testonly = true + public = [ "googlemock/include/gmock/gmock.h" ] + sources = [ + "googlemock/include/gmock/gmock-actions.h", + "googlemock/include/gmock/gmock-cardinalities.h", + "googlemock/include/gmock/gmock-generated-actions.h", + "googlemock/include/gmock/gmock-generated-function-mockers.h", + "googlemock/include/gmock/gmock-generated-matchers.h", + "googlemock/include/gmock/gmock-generated-nice-strict.h", + "googlemock/include/gmock/gmock-matchers.h", + "googlemock/include/gmock/gmock-more-actions.h", + "googlemock/include/gmock/gmock-more-matchers.h", + "googlemock/include/gmock/gmock-spec-builders.h", + "googlemock/include/gmock/internal/custom/gmock-generated-actions.h", + "googlemock/include/gmock/internal/custom/gmock-matchers.h", + "googlemock/include/gmock/internal/custom/gmock-port.h", + "googlemock/include/gmock/internal/gmock-generated-internal-utils.h", + "googlemock/include/gmock/internal/gmock-internal-utils.h", + "googlemock/include/gmock/internal/gmock-port.h", + "googlemock/src/gmock-all.cc", + "googlemock/src/gmock-cardinalities.cc", + "googlemock/src/gmock-internal-utils.cc", + "googlemock/src/gmock-matchers.cc", + "googlemock/src/gmock-spec-builders.cc", + "googlemock/src/gmock.cc", + ] + sources -= [ "googlemock/src/gmock-all.cc" ] + public_configs = [ ":gmock_config" ] + configs += [ ":gmock_private_config" ] + deps = [ ":gtest" ] +} + +static_library("gmock_main") { + testonly = true + sources = [ "googlemock/src/gmock_main.cc" ] + public_deps = [ + ":gmock", + ":gtest", + ] +} + +executable("gmock_all_test") { + testonly = true + sources = [ + "googlemock/test/gmock-actions_test.cc", + "googlemock/test/gmock-cardinalities_test.cc", + "googlemock/test/gmock-generated-actions_test.cc", + "googlemock/test/gmock-generated-function-mockers_test.cc", + "googlemock/test/gmock-generated-internal-utils_test.cc", + "googlemock/test/gmock-generated-matchers_test.cc", + "googlemock/test/gmock-internal-utils_test.cc", + "googlemock/test/gmock-matchers_test.cc", + "googlemock/test/gmock-more-actions_test.cc", + "googlemock/test/gmock-nice-strict_test.cc", + "googlemock/test/gmock-port_test.cc", + "googlemock/test/gmock-spec-builders_test.cc", + "googlemock/test/gmock_test.cc", + ] + configs += [ + ":gmock_private_config", + ":gtest_private_config", + ] + deps = [ + ":gmock", + ":gmock_main", + ":gtest", + ] +} + +executable("gmock_link_test") { + testonly = true + sources = [ + "googlemock/test/gmock_link2_test.cc", + "googlemock/test/gmock_link_test.cc", + "googlemock/test/gmock_link_test.h", + ] + configs += [ ":gmock_private_config" ] + deps = [ + ":gmock", + ":gmock_main", + ":gtest", + ] +} + +executable("gmock_stress_test") { + testonly = true + sources = [ "googlemock/test/gmock_stress_test.cc" ] + configs += [ ":gmock_private_config" ] + deps = [ + ":gmock", + ":gtest", + ] +} + +group("gmock_all_tests") { + testonly = true + deps = [ + ":gmock_all_test", + ":gmock_link_test", + ":gmock_stress_test", + ] +} diff --git a/build/secondary/third_party/imgui/BUILD.gn b/build/secondary/third_party/imgui/BUILD.gn new file mode 100644 index 0000000000000..dadc4eec3ec3b --- /dev/null +++ b/build/secondary/third_party/imgui/BUILD.gn @@ -0,0 +1,48 @@ +# Copyright 2013 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +source_root = "//third_party/imgui" + +source_set("imgui") { + public = [ + "$source_root/imgui.h", + "$source_root/imgui_internal.h", + "$source_root/imstb_rectpack.h", + "$source_root/imstb_textedit.h", + "$source_root/imstb_truetype.h", + ] + + include_dirs = [ "$source_root" ] + + sources = [ + "$source_root/imgui.cpp", + "$source_root/imgui.h", + "$source_root/imgui_demo.cpp", + "$source_root/imgui_draw.cpp", + "$source_root/imgui_internal.h", + "$source_root/imgui_tables.cpp", + "$source_root/imgui_widgets.cpp", + "$source_root/imstb_rectpack.h", + "$source_root/imstb_textedit.h", + "$source_root/imstb_truetype.h", + ] +} + +config("imgui_headers") { + include_dirs = [ "$source_root" ] +} + +source_set("imgui_glfw") { + public_deps = [ + ":imgui", + "//flutter/third_party/glfw", + ] + + public_configs = [ ":imgui_headers" ] + + sources = [ + "$source_root/backends/imgui_impl_glfw.cpp", + "$source_root/backends/imgui_impl_glfw.h", + ] +} diff --git a/build/secondary/third_party/inja/BUILD.gn b/build/secondary/third_party/inja/BUILD.gn new file mode 100644 index 0000000000000..59345eb31ce8c --- /dev/null +++ b/build/secondary/third_party/inja/BUILD.gn @@ -0,0 +1,43 @@ +# Copyright 2013 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +source_root = "//third_party/inja" + +config("inja_public_config") { + include_dirs = [ "$source_root/include" ] + + if (is_clang) { + cflags_cc = [ + "-Wno-unused-variable", + "-Wno-newline-eof", + ] + } + + defines = [ "INJA_NOEXCEPTION=1" ] +} + +source_set("inja") { + public_configs = [ ":inja_public_config" ] + + public = [ "$source_root/include/inja/inja.hpp" ] + + sources = [ + "$source_root/include/inja/config.hpp", + "$source_root/include/inja/environment.hpp", + "$source_root/include/inja/exceptions.hpp", + "$source_root/include/inja/function_storage.hpp", + "$source_root/include/inja/inja.hpp", + "$source_root/include/inja/lexer.hpp", + "$source_root/include/inja/node.hpp", + "$source_root/include/inja/parser.hpp", + "$source_root/include/inja/renderer.hpp", + "$source_root/include/inja/statistics.hpp", + "$source_root/include/inja/string_view.hpp", + "$source_root/include/inja/template.hpp", + "$source_root/include/inja/token.hpp", + "$source_root/include/inja/utils.hpp", + ] + + public_deps = [ "//third_party/json" ] +} diff --git a/build/secondary/third_party/json/BUILD.gn b/build/secondary/third_party/json/BUILD.gn new file mode 100644 index 0000000000000..bf24ebf119380 --- /dev/null +++ b/build/secondary/third_party/json/BUILD.gn @@ -0,0 +1,63 @@ +# Copyright 2013 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +source_root = "//third_party/json" + +config("json_public_config") { + include_dirs = [ "$source_root/include" ] +} + +source_set("json") { + public_configs = [ ":json_public_config" ] + + public = [ "$source_root/include/nlohmann/json.hpp" ] + + sources = [ + "$source_root/include/nlohmann/adl_serializer.hpp", + "$source_root/include/nlohmann/byte_container_with_subtype.hpp", + "$source_root/include/nlohmann/detail/abi_macros.hpp", + "$source_root/include/nlohmann/detail/conversions/from_json.hpp", + "$source_root/include/nlohmann/detail/conversions/to_chars.hpp", + "$source_root/include/nlohmann/detail/conversions/to_json.hpp", + "$source_root/include/nlohmann/detail/exceptions.hpp", + "$source_root/include/nlohmann/detail/hash.hpp", + "$source_root/include/nlohmann/detail/input/binary_reader.hpp", + "$source_root/include/nlohmann/detail/input/input_adapters.hpp", + "$source_root/include/nlohmann/detail/input/json_sax.hpp", + "$source_root/include/nlohmann/detail/input/lexer.hpp", + "$source_root/include/nlohmann/detail/input/parser.hpp", + "$source_root/include/nlohmann/detail/input/position_t.hpp", + "$source_root/include/nlohmann/detail/iterators/internal_iterator.hpp", + "$source_root/include/nlohmann/detail/iterators/iter_impl.hpp", + "$source_root/include/nlohmann/detail/iterators/iteration_proxy.hpp", + "$source_root/include/nlohmann/detail/iterators/iterator_traits.hpp", + "$source_root/include/nlohmann/detail/iterators/json_reverse_iterator.hpp", + "$source_root/include/nlohmann/detail/iterators/primitive_iterator.hpp", + "$source_root/include/nlohmann/detail/json_custom_base_class.hpp", + "$source_root/include/nlohmann/detail/json_pointer.hpp", + "$source_root/include/nlohmann/detail/json_ref.hpp", + "$source_root/include/nlohmann/detail/macro_scope.hpp", + "$source_root/include/nlohmann/detail/macro_unscope.hpp", + "$source_root/include/nlohmann/detail/meta/call_std/begin.hpp", + "$source_root/include/nlohmann/detail/meta/call_std/end.hpp", + "$source_root/include/nlohmann/detail/meta/cpp_future.hpp", + "$source_root/include/nlohmann/detail/meta/detected.hpp", + "$source_root/include/nlohmann/detail/meta/identity_tag.hpp", + "$source_root/include/nlohmann/detail/meta/is_sax.hpp", + "$source_root/include/nlohmann/detail/meta/std_fs.hpp", + "$source_root/include/nlohmann/detail/meta/type_traits.hpp", + "$source_root/include/nlohmann/detail/meta/void_t.hpp", + "$source_root/include/nlohmann/detail/output/binary_writer.hpp", + "$source_root/include/nlohmann/detail/output/output_adapters.hpp", + "$source_root/include/nlohmann/detail/output/serializer.hpp", + "$source_root/include/nlohmann/detail/string_concat.hpp", + "$source_root/include/nlohmann/detail/string_escape.hpp", + "$source_root/include/nlohmann/detail/value_t.hpp", + "$source_root/include/nlohmann/json.hpp", + "$source_root/include/nlohmann/json_fwd.hpp", + "$source_root/include/nlohmann/ordered_map.hpp", + "$source_root/include/nlohmann/thirdparty/hedley/hedley.hpp", + "$source_root/include/nlohmann/thirdparty/hedley/hedley_undef.hpp", + ] +} diff --git a/build/secondary/third_party/jsoncpp/BUILD.gn b/build/secondary/third_party/jsoncpp/BUILD.gn new file mode 100644 index 0000000000000..ff255b0add118 --- /dev/null +++ b/build/secondary/third_party/jsoncpp/BUILD.gn @@ -0,0 +1,11 @@ +# Copyright 2019 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# The ANGLE build rules have a target that depends on jsoncpp, but the Flutter +# engine never actually builds that target, so just this provides empty dummy +# dependencies to satisfy the generation-time resolution. +config("jsoncpp_config") { +} +group("jsoncpp") { +} diff --git a/build/secondary/third_party/libcxx/BUILD.gn b/build/secondary/third_party/libcxx/BUILD.gn new file mode 100644 index 0000000000000..710ebe465d1b2 --- /dev/null +++ b/build/secondary/third_party/libcxx/BUILD.gn @@ -0,0 +1,117 @@ +# Copyright 2013 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +config("libcxx_config") { + defines = [ "_LIBCPP_DISABLE_AVAILABILITY=1" ] + include_dirs = [ "//flutter/build/secondary/third_party/libcxx/config" ] +} + +config("src_include") { + include_dirs = [ "src" ] +} + +source_set("libcxx") { + sources = [ + "src/algorithm.cpp", + "src/any.cpp", + "src/bind.cpp", + "src/charconv.cpp", + "src/chrono.cpp", + "src/condition_variable.cpp", + "src/condition_variable_destructor.cpp", + "src/debug.cpp", + "src/exception.cpp", + "src/filesystem/directory_iterator.cpp", + "src/filesystem/filesystem_common.h", + "src/filesystem/int128_builtins.cpp", + "src/filesystem/operations.cpp", + "src/functional.cpp", + "src/future.cpp", + "src/hash.cpp", + "src/ios.cpp", + "src/ios.instantiations.cpp", + "src/iostream.cpp", + "src/locale.cpp", + "src/memory.cpp", + "src/mutex.cpp", + "src/mutex_destructor.cpp", + "src/new.cpp", + "src/optional.cpp", + "src/random.cpp", + "src/regex.cpp", + "src/ryu/d2fixed.cpp", + "src/ryu/d2s.cpp", + "src/ryu/f2s.cpp", + "src/shared_mutex.cpp", + "src/stdexcept.cpp", + "src/string.cpp", + "src/strstream.cpp", + "src/system_error.cpp", + "src/thread.cpp", + "src/typeinfo.cpp", + "src/utility.cpp", + "src/valarray.cpp", + "src/variant.cpp", + "src/vector.cpp", + ] + + deps = [ "//third_party/libcxxabi" ] + + # TODO(goderbauer): remove when all sources build with LTO for android_arm64 and android_x64. + if (is_android && (current_cpu == "arm64" || current_cpu == "x64")) { + sources -= [ "src/new.cpp" ] + deps += [ ":libcxx_nolto" ] + } + + public_configs = [ + ":libcxx_config", + "//third_party/libcxxabi:libcxxabi_config", + ] + + defines = [ + "_LIBCPP_NO_EXCEPTIONS", + "_LIBCPP_NO_RTTI", + "_LIBCPP_BUILDING_LIBRARY", + "LIBCXX_BUILDING_LIBCXXABI", + ] + + # While no translation units in Flutter engine enable RTTI, it may be enabled + # in one of the third party dependencies. This mirrors the configuration in + # libcxxabi. + configs -= [ "//build/config/compiler:no_rtti" ] + configs += [ "//build/config/compiler:rtti" ] + + # libcxx requires C++20 + configs -= [ "//build/config/compiler:cxx_version_default" ] + configs += [ "//build/config/compiler:cxx_version_20" ] + + configs += [ ":src_include" ] + + if (is_clang) { + # shared_mutex.cpp and debug.cpp are purposefully in violation. + cflags_cc = [ "-Wno-thread-safety-analysis" ] + } +} + +source_set("libcxx_nolto") { + visibility = [ ":*" ] + + sources = [ "src/new.cpp" ] + + cflags_cc = [ "-fno-lto" ] + + deps = [ "//third_party/libcxxabi" ] + + public_configs = [ + ":libcxx_config", + "//third_party/libcxxabi:libcxxabi_config", + ] + + defines = [ + "_LIBCPP_NO_EXCEPTIONS", + "_LIBCPP_NO_RTTI", + "_LIBCPP_BUILDING_LIBRARY", + "LIBCXX_BUILDING_LIBCXXABI", + ] +} diff --git a/build/secondary/third_party/libcxx/config/__config_site b/build/secondary/third_party/libcxx/config/__config_site new file mode 100644 index 0000000000000..106c24fc3613b --- /dev/null +++ b/build/secondary/third_party/libcxx/config/__config_site @@ -0,0 +1,39 @@ +#ifndef _LIBCPP_CONFIG_SITE +#define _LIBCPP_CONFIG_SITE + +/* #undef _LIBCPP_ABI_VERSION */ +/* #undef _LIBCPP_ABI_UNSTABLE */ +/* #undef _LIBCPP_ABI_FORCE_ITANIUM */ +/* #undef _LIBCPP_ABI_FORCE_MICROSOFT */ +/* #undef _LIBCPP_HIDE_FROM_ABI_PER_TU_BY_DEFAULT */ +/* #undef _LIBCPP_HAS_NO_GLOBAL_FILESYSTEM_NAMESPACE */ +/* #undef _LIBCPP_HAS_NO_STDIN */ +/* #undef _LIBCPP_HAS_NO_STDOUT */ +/* #undef _LIBCPP_HAS_NO_THREADS */ +/* #undef _LIBCPP_HAS_NO_MONOTONIC_CLOCK */ +/* #undef _LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS */ +/* #undef _LIBCPP_HAS_MUSL_LIBC */ +/* #undef _LIBCPP_HAS_THREAD_API_PTHREAD */ +/* #undef _LIBCPP_HAS_THREAD_API_EXTERNAL */ +/* #undef _LIBCPP_HAS_THREAD_API_WIN32 */ +/* #undef _LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL */ +/* #undef _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS */ +#define _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS +/* #undef _LIBCPP_NO_VCRUNTIME */ +/* #undef _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION */ +/* #undef _LIBCPP_ABI_NAMESPACE */ +/* #undef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY */ +/* #undef _LIBCPP_HAS_PARALLEL_ALGORITHMS */ +/* #undef _LIBCPP_HAS_NO_RANDOM_DEVICE */ +/* #undef _LIBCPP_HAS_NO_LOCALIZATION */ + +#define _LIBCPP_REMOVE_TRANSITIVE_INCLUDES + +// This is a workaround for BoringSSL, which is compiled in C11 mode +// and includes stdatomic.h. Defining this macro will cause stdatomic.h +// to redirect to the next version of that header in the include path. +#if !defined(__cplusplus) && defined(__clang__) +#define _LIBCPP_COMPILER_CLANG_BASED +#endif + +#endif // _LIBCPP_CONFIG_SITE diff --git a/build/secondary/third_party/libcxxabi/BUILD.gn b/build/secondary/third_party/libcxxabi/BUILD.gn new file mode 100644 index 0000000000000..10e51e78ac8b8 --- /dev/null +++ b/build/secondary/third_party/libcxxabi/BUILD.gn @@ -0,0 +1,82 @@ +# Copyright 2013 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +config("libcxxabi_config") { + common_cc_flags = [ + "-nostdinc++", + "-fvisibility=hidden", + ] + + cflags_cc = common_cc_flags + cflags_objcc = common_cc_flags + + include_dirs = [ "include" ] + + if (is_ios) { + ldflags = [ "-Wl,-unexported_symbols_list," + + rebase_path("lib/new-delete.exp", root_build_dir) ] + } +} + +source_set("libcxxabi") { + visibility = [ "../libcxx:*" ] + + public_configs = [ ":libcxxabi_config" ] + + defines = [ + "_LIBCPP_BUILDING_LIBRARY", + "_LIBCXXABI_BUILDING_LIBRARY", + "LIBCXXABI_SILENT_TERMINATE", + "_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + ] + + sources = [] + + # Compile libcxx ABI using C++11. This replicates the rule in the + # CMakeLists on the "cxx_abiobjects" target. + configs -= [ "//build/config/compiler:cxx_version_default" ] + configs += [ "//build/config/compiler:cxx_version_20" ] + + configs += [ "//third_party/libcxx:src_include" ] + + # No translation units in the engine are built with exceptions. But, using + # Objective-C exceptions requires some infrastructure setup for exceptions. + # Build support for the same in cxxabi on Darwin. + if (is_mac || is_ios) { + configs -= [ "//build/config/gcc:no_exceptions" ] + sources += [ + "src/cxa_exception.cpp", + "src/cxa_personality.cpp", + ] + } else { + if (!is_tsan) { + sources += [ "src/cxa_noexception.cpp" ] + } + } + + # Third party dependencies may depend on RTTI. Add support for the same in + # cxxabi. + configs -= [ "//build/config/compiler:no_rtti" ] + configs += [ "//build/config/compiler:rtti" ] + + sources += [ + "src/abort_message.cpp", + "src/cxa_aux_runtime.cpp", + "src/cxa_default_handlers.cpp", + "src/cxa_demangle.cpp", + "src/cxa_exception_storage.cpp", + "src/cxa_handlers.cpp", + "src/cxa_vector.cpp", + "src/cxa_virtual.cpp", + "src/fallback_malloc.cpp", + "src/private_typeinfo.cpp", + "src/stdlib_exception.cpp", + "src/stdlib_stdexcept.cpp", + "src/stdlib_typeinfo.cpp", + ] + + if (!(is_tsan && is_linux)) { + sources += [ "src/cxa_guard.cpp" ] + } +} diff --git a/build/secondary/third_party/libjpeg-turbo/BUILD.gn b/build/secondary/third_party/libjpeg-turbo/BUILD.gn new file mode 100644 index 0000000000000..55f346e49c8d3 --- /dev/null +++ b/build/secondary/third_party/libjpeg-turbo/BUILD.gn @@ -0,0 +1,81 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +config("libjpeg_config") { + include_dirs = [ "." ] +} + +source_set("libjpeg") { + public_configs = [ ":libjpeg_config" ] + + defines = [] + + if (!is_win) { + cflags_c = [ + "-Wno-unused-variable", + "-Wno-unused-function", + ] + } else { + defines += [ "TURBO_FOR_WINDOWS" ] + } + + sources = [ + "//third_party/libjpeg-turbo/jcapimin.c", + "//third_party/libjpeg-turbo/jcapistd.c", + "//third_party/libjpeg-turbo/jccoefct.c", + "//third_party/libjpeg-turbo/jccolor.c", + "//third_party/libjpeg-turbo/jcdctmgr.c", + "//third_party/libjpeg-turbo/jchuff.c", + "//third_party/libjpeg-turbo/jcinit.c", + "//third_party/libjpeg-turbo/jcmainct.c", + "//third_party/libjpeg-turbo/jcmarker.c", + "//third_party/libjpeg-turbo/jcmaster.c", + "//third_party/libjpeg-turbo/jcomapi.c", + "//third_party/libjpeg-turbo/jcparam.c", + "//third_party/libjpeg-turbo/jcphuff.c", + "//third_party/libjpeg-turbo/jcprepct.c", + "//third_party/libjpeg-turbo/jcsample.c", + "//third_party/libjpeg-turbo/jdapimin.c", + "//third_party/libjpeg-turbo/jdapistd.c", + "//third_party/libjpeg-turbo/jdcoefct.c", + "//third_party/libjpeg-turbo/jdcolor.c", + "//third_party/libjpeg-turbo/jddctmgr.c", + "//third_party/libjpeg-turbo/jdhuff.c", + "//third_party/libjpeg-turbo/jdinput.c", + "//third_party/libjpeg-turbo/jdmainct.c", + "//third_party/libjpeg-turbo/jdmarker.c", + "//third_party/libjpeg-turbo/jdmaster.c", + "//third_party/libjpeg-turbo/jdmerge.c", + "//third_party/libjpeg-turbo/jdphuff.c", + "//third_party/libjpeg-turbo/jdpostct.c", + "//third_party/libjpeg-turbo/jdsample.c", + "//third_party/libjpeg-turbo/jerror.c", + "//third_party/libjpeg-turbo/jfdctflt.c", + "//third_party/libjpeg-turbo/jfdctfst.c", + "//third_party/libjpeg-turbo/jfdctint.c", + "//third_party/libjpeg-turbo/jidctflt.c", + "//third_party/libjpeg-turbo/jidctfst.c", + "//third_party/libjpeg-turbo/jidctint.c", + "//third_party/libjpeg-turbo/jidctred.c", + "//third_party/libjpeg-turbo/jmemmgr.c", + "//third_party/libjpeg-turbo/jmemnobs.c", + "//third_party/libjpeg-turbo/jquant1.c", + "//third_party/libjpeg-turbo/jquant2.c", + "//third_party/libjpeg-turbo/jutils.c", + ] + + if (current_cpu == "arm" && !is_ios) { + sources += [ + "//third_party/libjpeg-turbo/simd/jsimd_arm.c", + "//third_party/libjpeg-turbo/simd/jsimd_arm_neon.S", + ] + } else if (current_cpu == "arm64") { + sources += [ + "//third_party/libjpeg-turbo/simd/jsimd_arm64.c", + "//third_party/libjpeg-turbo/simd/jsimd_arm64_neon.S", + ] + } else { + sources += [ "//third_party/libjpeg-turbo/jsimd_none.c" ] + } +} diff --git a/build/secondary/third_party/libsrtp/BUILD.gn b/build/secondary/third_party/libsrtp/BUILD.gn new file mode 100644 index 0000000000000..5697e3175f0bb --- /dev/null +++ b/build/secondary/third_party/libsrtp/BUILD.gn @@ -0,0 +1,345 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +declare_args() { + use_system_libsrtp = false + use_srtp_boringssl = true +} + +config("libsrtp_config") { + defines = [ + "HAVE_CONFIG_H", + "HAVE_STDLIB_H", + "HAVE_STRING_H", + "TESTAPP_SOURCE", + ] + + include_dirs = [ + "config", + "srtp/include", + "srtp/crypto/include", + ] + + if (use_srtp_boringssl) { + defines += [ "OPENSSL" ] + } + + if (is_posix) { + defines += [ + "HAVE_INT16_T", + "HAVE_INT32_T", + "HAVE_INT8_T", + "HAVE_UINT16_T", + "HAVE_UINT32_T", + "HAVE_UINT64_T", + "HAVE_UINT8_T", + "HAVE_STDINT_H", + "HAVE_INTTYPES_H", + "HAVE_NETINET_IN_H", + "HAVE_ARPA_INET_H", + "HAVE_UNISTD_H", + ] + cflags = [ "-Wno-unused-variable" ] + } + + if (is_win) { + defines += [ + "HAVE_BYTESWAP_METHODS_H", + + # All Windows architectures are this way. + "SIZEOF_UNSIGNED_LONG=4", + "SIZEOF_UNSIGNED_LONG_LONG=8", + ] + } + + if (current_cpu == "x64" || current_cpu == "x86" || current_cpu == "arm") { + defines += [ + # TODO(leozwang): CPU_RISC doesn"t work properly on android/arm + # platform for unknown reasons, need to investigate the root cause + # of it. CPU_RISC is used for optimization only, and CPU_CISC should + # just work just fine, it has been tested on android/arm with srtp + # test applications and libjingle. + "CPU_CISC", + ] + } +} + +config("system_libsrtp_config") { + defines = [ "USE_SYSTEM_LIBSRTP" ] + include_dirs = [ "/usr/include/srtp" ] +} + +if (use_system_libsrtp) { + group("libsrtp") { + public_configs = [ + ":libsrtp_config", + ":system_libsrtp_config", + ] + libs = [ "-lsrtp" ] + } +} else { + static_library("libsrtp") { + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + public_configs = [ ":libsrtp_config" ] + + sources = [ + # includes + "srtp/include/ekt.h", + "srtp/include/getopt_s.h", + "srtp/include/rtp.h", + "srtp/include/rtp_priv.h", + "srtp/include/srtp.h", + "srtp/include/srtp_priv.h", + "srtp/include/ut_sim.h", + + # headers + "srtp/crypto/include/aes.h", + "srtp/crypto/include/aes_cbc.h", + "srtp/crypto/include/aes_icm.h", + "srtp/crypto/include/alloc.h", + "srtp/crypto/include/auth.h", + "srtp/crypto/include/cipher.h", + "srtp/crypto/include/crypto.h", + "srtp/crypto/include/crypto_kernel.h", + "srtp/crypto/include/crypto_math.h", + "srtp/crypto/include/crypto_types.h", + "srtp/crypto/include/cryptoalg.h", + "srtp/crypto/include/datatypes.h", + "srtp/crypto/include/err.h", + "srtp/crypto/include/gf2_8.h", + "srtp/crypto/include/hmac.h", + "srtp/crypto/include/integers.h", + "srtp/crypto/include/kernel_compat.h", + "srtp/crypto/include/key.h", + "srtp/crypto/include/null_auth.h", + "srtp/crypto/include/null_cipher.h", + "srtp/crypto/include/prng.h", + "srtp/crypto/include/rand_source.h", + "srtp/crypto/include/rdb.h", + "srtp/crypto/include/rdbx.h", + "srtp/crypto/include/sha1.h", + "srtp/crypto/include/stat.h", + "srtp/crypto/include/xfm.h", + + # sources + "srtp/crypto/cipher/aes.c", + "srtp/crypto/cipher/aes_cbc.c", + "srtp/crypto/cipher/aes_icm.c", + "srtp/crypto/cipher/cipher.c", + "srtp/crypto/cipher/null_cipher.c", + "srtp/crypto/hash/auth.c", + "srtp/crypto/hash/hmac.c", + "srtp/crypto/hash/null_auth.c", + "srtp/crypto/hash/sha1.c", + "srtp/crypto/kernel/alloc.c", + "srtp/crypto/kernel/crypto_kernel.c", + "srtp/crypto/kernel/err.c", + "srtp/crypto/kernel/key.c", + "srtp/crypto/math/datatypes.c", + "srtp/crypto/math/gf2_8.c", + "srtp/crypto/math/stat.c", + "srtp/crypto/replay/rdb.c", + "srtp/crypto/replay/rdbx.c", + "srtp/crypto/replay/ut_sim.c", + "srtp/crypto/rng/ctr_prng.c", + "srtp/crypto/rng/prng.c", + "srtp/crypto/rng/rand_source.c", + "srtp/srtp/ekt.c", + "srtp/srtp/srtp.c", + ] + + if (is_clang) { + cflags = [ "-Wno-implicit-function-declaration" ] + } + + if (use_srtp_boringssl) { + deps = [ "//third_party/boringssl:boringssl" ] + public_deps = [ "//third_party/boringssl:boringssl" ] + sources -= [ + "srtp/crypto/cipher/aes_cbc.c", + "srtp/crypto/cipher/aes_icm.c", + "srtp/crypto/hash/hmac.c", + "srtp/crypto/hash/sha1.c", + "srtp/crypto/rng/ctr_prng.c", + "srtp/crypto/rng/prng.c", + ] + sources += [ + "srtp/crypto/cipher/aes_gcm_ossl.c", + "srtp/crypto/cipher/aes_icm_ossl.c", + "srtp/crypto/hash/hmac_ossl.c", + "srtp/crypto/include/aes_gcm_ossl.h", + "srtp/crypto/include/aes_icm_ossl.h", + ] + } + } + + # TODO(GYP): A bunch of these tests don't compile (in gyp either). They're + # not very broken, so could probably be made to work if it's useful. + if (!is_win) { + executable("rdbx_driver") { + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + deps = [ ":libsrtp" ] + sources = [ + "srtp/include/getopt_s.h", + "srtp/test/getopt_s.c", + "srtp/test/rdbx_driver.c", + ] + } + + executable("srtp_driver") { + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + deps = [ ":libsrtp" ] + sources = [ + "srtp/include/getopt_s.h", + "srtp/include/srtp_priv.h", + "srtp/test/getopt_s.c", + "srtp/test/srtp_driver.c", + ] + } + + executable("roc_driver") { + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + deps = [ ":libsrtp" ] + sources = [ + "srtp/crypto/include/rdbx.h", + "srtp/include/ut_sim.h", + "srtp/test/roc_driver.c", + ] + } + + executable("replay_driver") { + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + deps = [ ":libsrtp" ] + sources = [ + "srtp/crypto/include/rdbx.h", + "srtp/include/ut_sim.h", + "srtp/test/replay_driver.c", + ] + } + + executable("rtpw") { + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + deps = [ ":libsrtp" ] + sources = [ + "srtp/crypto/include/datatypes.h", + "srtp/include/getopt_s.h", + "srtp/include/rtp.h", + "srtp/include/srtp.h", + "srtp/test/getopt_s.c", + "srtp/test/rtp.c", + "srtp/test/rtpw.c", + ] + if (is_android) { + defines = [ "HAVE_SYS_SOCKET_H" ] + } + if (is_clang) { + cflags = [ "-Wno-implicit-function-declaration" ] + } + } + + executable("srtp_test_cipher_driver") { + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + deps = [ ":libsrtp" ] + sources = [ + "srtp/crypto/test/cipher_driver.c", + "srtp/include/getopt_s.h", + "srtp/test/getopt_s.c", + ] + } + + executable("srtp_test_datatypes_driver") { + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + deps = [ ":libsrtp" ] + sources = [ "srtp/crypto/test/datatypes_driver.c" ] + } + + executable("srtp_test_stat_driver") { + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + deps = [ ":libsrtp" ] + sources = [ "srtp/crypto/test/stat_driver.c" ] + } + + executable("srtp_test_sha1_driver") { + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + deps = [ ":libsrtp" ] + sources = [ "srtp/crypto/test/sha1_driver.c" ] + } + + executable("srtp_test_kernel_driver") { + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + deps = [ ":libsrtp" ] + sources = [ + "srtp/crypto/test/kernel_driver.c", + "srtp/include/getopt_s.h", + "srtp/test/getopt_s.c", + ] + } + + executable("srtp_test_aes_calc") { + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + deps = [ ":libsrtp" ] + sources = [ "srtp/crypto/test/aes_calc.c" ] + } + + executable("srtp_test_rand_gen") { + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + deps = [ ":libsrtp" ] + sources = [ + "srtp/crypto/test/rand_gen.c", + "srtp/include/getopt_s.h", + "srtp/test/getopt_s.c", + ] + } + + executable("srtp_test_rand_gen_soak") { + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + deps = [ ":libsrtp" ] + sources = [ + "srtp/crypto/test/rand_gen_soak.c", + "srtp/include/getopt_s.h", + "srtp/test/getopt_s.c", + ] + } + + executable("srtp_test_env") { + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + deps = [ ":libsrtp" ] + sources = [ "srtp/crypto/test/env.c" ] + } + + group("srtp_runtest") { + deps = [ + ":rdbx_driver", + ":replay_driver", + ":roc_driver", + ":rtpw", + ":srtp_driver", + ":srtp_test_aes_calc", + ":srtp_test_cipher_driver", + ":srtp_test_datatypes_driver", + ":srtp_test_env", + ":srtp_test_kernel_driver", + ":srtp_test_rand_gen", + ":srtp_test_rand_gen_soak", + ":srtp_test_sha1_driver", + ":srtp_test_stat_driver", + ] + } + } +} diff --git a/build/secondary/third_party/libtess2/BUILD.gn b/build/secondary/third_party/libtess2/BUILD.gn new file mode 100644 index 0000000000000..4d9ac96f8b038 --- /dev/null +++ b/build/secondary/third_party/libtess2/BUILD.gn @@ -0,0 +1,29 @@ +# Copyright 2013 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +source_set("libtess2") { + public = [ "//third_party/libtess2/Include/tesselator.h" ] + + include_dirs = [ "//third_party/libtess2/Include/" ] + + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + + sources = [ + "//third_party/libtess2/Source/bucketalloc.c", + "//third_party/libtess2/Source/bucketalloc.h", + "//third_party/libtess2/Source/dict.c", + "//third_party/libtess2/Source/dict.h", + "//third_party/libtess2/Source/geom.c", + "//third_party/libtess2/Source/geom.h", + "//third_party/libtess2/Source/mesh.c", + "//third_party/libtess2/Source/mesh.h", + "//third_party/libtess2/Source/priorityq.c", + "//third_party/libtess2/Source/priorityq.h", + "//third_party/libtess2/Source/sweep.c", + "//third_party/libtess2/Source/sweep.h", + "//third_party/libtess2/Source/tess.c", + "//third_party/libtess2/Source/tess.h", + ] +} diff --git a/build/secondary/third_party/libwebp/BUILD.gn b/build/secondary/third_party/libwebp/BUILD.gn new file mode 100644 index 0000000000000..4a25106223451 --- /dev/null +++ b/build/secondary/third_party/libwebp/BUILD.gn @@ -0,0 +1,178 @@ +# Copyright 2017 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# This file is based on: +# https://skia.googlesource.com/skia/+/main/third_party/libwebp/BUILD.gn +config("libwebp_config") { + include_dirs = [ + "//third_party/libwebp/src", + "//third_party/libwebp", + ] +} + +config("libwebp_defines") { + defines = [ + # WebP naturally decodes to RGB_565, Skia with BGR_565. + # This makes WebP decode to BGR_565 when we ask for RGB_565. + # (It also swaps the color order for 4444, but we don't care today.) + "WEBP_SWAP_16BIT_CSP", + + # Prevent WebP symbols from being exposed. + "WEBP_EXTERN=extern", + ] +} + +source_set("libwebp_sse41") { + include_dirs = [ + "//third_party/libwebp/src", + "//third_party/libwebp", + ] + configs += [ ":libwebp_defines" ] + sources = [ + "//third_party/libwebp/src/dsp/alpha_processing_sse41.c", + "//third_party/libwebp/src/dsp/dec_sse41.c", + "//third_party/libwebp/src/dsp/enc_sse41.c", + "//third_party/libwebp/src/dsp/lossless_enc_sse41.c", + "//third_party/libwebp/src/dsp/lossless_sse41.c", + "//third_party/libwebp/src/dsp/upsampling_sse41.c", + "//third_party/libwebp/src/dsp/yuv_sse41.c", + ] + if ((current_cpu == "x86" || current_cpu == "x64") && (!is_win || is_clang)) { + cflags_c = [ "-msse4.1" ] + } +} + +source_set("libwebp") { + public_configs = [ ":libwebp_config" ] + include_dirs = [ + "//third_party/libwebp/src", + "//third_party/libwebp", + ] + + deps = [ ":libwebp_sse41" ] + + if (is_android) { + deps += [ "//third_party/cpu-features" ] + } + + configs += [ ":libwebp_defines" ] + + sources = [ + "//third_party/libwebp/sharpyuv/sharpyuv.c", + "//third_party/libwebp/sharpyuv/sharpyuv_cpu.c", + "//third_party/libwebp/sharpyuv/sharpyuv_csp.c", + "//third_party/libwebp/sharpyuv/sharpyuv_dsp.c", + "//third_party/libwebp/sharpyuv/sharpyuv_gamma.c", + "//third_party/libwebp/sharpyuv/sharpyuv_neon.c", + "//third_party/libwebp/sharpyuv/sharpyuv_sse2.c", + "//third_party/libwebp/src/dec/alpha_dec.c", + "//third_party/libwebp/src/dec/buffer_dec.c", + "//third_party/libwebp/src/dec/frame_dec.c", + "//third_party/libwebp/src/dec/idec_dec.c", + "//third_party/libwebp/src/dec/io_dec.c", + "//third_party/libwebp/src/dec/quant_dec.c", + "//third_party/libwebp/src/dec/tree_dec.c", + "//third_party/libwebp/src/dec/vp8_dec.c", + "//third_party/libwebp/src/dec/vp8l_dec.c", + "//third_party/libwebp/src/dec/webp_dec.c", + "//third_party/libwebp/src/demux/anim_decode.c", + "//third_party/libwebp/src/demux/demux.c", + "//third_party/libwebp/src/dsp/alpha_processing.c", + "//third_party/libwebp/src/dsp/alpha_processing_mips_dsp_r2.c", + "//third_party/libwebp/src/dsp/alpha_processing_neon.c", + "//third_party/libwebp/src/dsp/alpha_processing_sse2.c", + "//third_party/libwebp/src/dsp/cost.c", + "//third_party/libwebp/src/dsp/cost_mips32.c", + "//third_party/libwebp/src/dsp/cost_mips_dsp_r2.c", + "//third_party/libwebp/src/dsp/cost_neon.c", + "//third_party/libwebp/src/dsp/cost_sse2.c", + "//third_party/libwebp/src/dsp/cpu.c", + "//third_party/libwebp/src/dsp/dec.c", + "//third_party/libwebp/src/dsp/dec_clip_tables.c", + "//third_party/libwebp/src/dsp/dec_mips32.c", + "//third_party/libwebp/src/dsp/dec_mips_dsp_r2.c", + "//third_party/libwebp/src/dsp/dec_msa.c", + "//third_party/libwebp/src/dsp/dec_neon.c", + "//third_party/libwebp/src/dsp/dec_sse2.c", + "//third_party/libwebp/src/dsp/enc.c", + "//third_party/libwebp/src/dsp/enc_mips32.c", + "//third_party/libwebp/src/dsp/enc_mips_dsp_r2.c", + "//third_party/libwebp/src/dsp/enc_msa.c", + "//third_party/libwebp/src/dsp/enc_neon.c", + "//third_party/libwebp/src/dsp/enc_sse2.c", + "//third_party/libwebp/src/dsp/filters.c", + "//third_party/libwebp/src/dsp/filters_mips_dsp_r2.c", + "//third_party/libwebp/src/dsp/filters_msa.c", + "//third_party/libwebp/src/dsp/filters_neon.c", + "//third_party/libwebp/src/dsp/filters_sse2.c", + "//third_party/libwebp/src/dsp/lossless.c", + "//third_party/libwebp/src/dsp/lossless_enc.c", + "//third_party/libwebp/src/dsp/lossless_enc_mips32.c", + "//third_party/libwebp/src/dsp/lossless_enc_mips_dsp_r2.c", + "//third_party/libwebp/src/dsp/lossless_enc_msa.c", + "//third_party/libwebp/src/dsp/lossless_enc_neon.c", + "//third_party/libwebp/src/dsp/lossless_enc_sse2.c", + "//third_party/libwebp/src/dsp/lossless_mips_dsp_r2.c", + "//third_party/libwebp/src/dsp/lossless_msa.c", + "//third_party/libwebp/src/dsp/lossless_neon.c", + "//third_party/libwebp/src/dsp/lossless_sse2.c", + "//third_party/libwebp/src/dsp/rescaler.c", + "//third_party/libwebp/src/dsp/rescaler_mips32.c", + "//third_party/libwebp/src/dsp/rescaler_mips_dsp_r2.c", + "//third_party/libwebp/src/dsp/rescaler_msa.c", + "//third_party/libwebp/src/dsp/rescaler_neon.c", + "//third_party/libwebp/src/dsp/rescaler_sse2.c", + "//third_party/libwebp/src/dsp/ssim.c", + "//third_party/libwebp/src/dsp/ssim_sse2.c", + "//third_party/libwebp/src/dsp/upsampling.c", + "//third_party/libwebp/src/dsp/upsampling_mips_dsp_r2.c", + "//third_party/libwebp/src/dsp/upsampling_msa.c", + "//third_party/libwebp/src/dsp/upsampling_neon.c", + "//third_party/libwebp/src/dsp/upsampling_sse2.c", + "//third_party/libwebp/src/dsp/yuv.c", + "//third_party/libwebp/src/dsp/yuv_mips32.c", + "//third_party/libwebp/src/dsp/yuv_mips_dsp_r2.c", + "//third_party/libwebp/src/dsp/yuv_neon.c", + "//third_party/libwebp/src/dsp/yuv_sse2.c", + "//third_party/libwebp/src/enc/alpha_enc.c", + "//third_party/libwebp/src/enc/analysis_enc.c", + "//third_party/libwebp/src/enc/backward_references_cost_enc.c", + "//third_party/libwebp/src/enc/backward_references_enc.c", + "//third_party/libwebp/src/enc/config_enc.c", + "//third_party/libwebp/src/enc/cost_enc.c", + "//third_party/libwebp/src/enc/filter_enc.c", + "//third_party/libwebp/src/enc/frame_enc.c", + "//third_party/libwebp/src/enc/histogram_enc.c", + "//third_party/libwebp/src/enc/iterator_enc.c", + "//third_party/libwebp/src/enc/near_lossless_enc.c", + "//third_party/libwebp/src/enc/picture_csp_enc.c", + "//third_party/libwebp/src/enc/picture_enc.c", + "//third_party/libwebp/src/enc/picture_psnr_enc.c", + "//third_party/libwebp/src/enc/picture_rescale_enc.c", + "//third_party/libwebp/src/enc/picture_tools_enc.c", + "//third_party/libwebp/src/enc/predictor_enc.c", + "//third_party/libwebp/src/enc/quant_enc.c", + "//third_party/libwebp/src/enc/syntax_enc.c", + "//third_party/libwebp/src/enc/token_enc.c", + "//third_party/libwebp/src/enc/tree_enc.c", + "//third_party/libwebp/src/enc/vp8l_enc.c", + "//third_party/libwebp/src/enc/webp_enc.c", + "//third_party/libwebp/src/mux/anim_encode.c", + "//third_party/libwebp/src/mux/muxedit.c", + "//third_party/libwebp/src/mux/muxinternal.c", + "//third_party/libwebp/src/mux/muxread.c", + "//third_party/libwebp/src/utils/bit_reader_utils.c", + "//third_party/libwebp/src/utils/bit_writer_utils.c", + "//third_party/libwebp/src/utils/color_cache_utils.c", + "//third_party/libwebp/src/utils/filters_utils.c", + "//third_party/libwebp/src/utils/huffman_encode_utils.c", + "//third_party/libwebp/src/utils/huffman_utils.c", + "//third_party/libwebp/src/utils/quant_levels_dec_utils.c", + "//third_party/libwebp/src/utils/quant_levels_utils.c", + "//third_party/libwebp/src/utils/random_utils.c", + "//third_party/libwebp/src/utils/rescaler_utils.c", + "//third_party/libwebp/src/utils/thread_utils.c", + "//third_party/libwebp/src/utils/utils.c", + ] +} diff --git a/build/secondary/third_party/nss/BUILD.gn b/build/secondary/third_party/nss/BUILD.gn new file mode 100644 index 0000000000000..95e6347c75305 --- /dev/null +++ b/build/secondary/third_party/nss/BUILD.gn @@ -0,0 +1,1205 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/config/linux/pkg_config.gni") + +if (is_linux) { + # This is a dependency on NSS with no libssl. On Linux we use a built-in SSL + # library but the system NSS libraries. Non-Linux platforms using NSS use the + # hermetic one in //third_party/nss. + # + # Generally you should depend on //crypto:platform instead of using this + # config since that will properly pick up NSS or OpenSSL depending on + # platform and build config. + pkg_config("system_nss_no_ssl_config") { + packages = [ "nss" ] + extra_args = [ + "-v", + "-lssl3", + ] + } +} else { + include_nss_root_certs = is_ios + include_nss_libpkix = is_ios + + config("nspr_config") { + defines = [ "NO_NSPR_10_SUPPORT" ] + include_dirs = [ + "nspr/pr/include", + "nspr/lib/ds", + "nspr/lib/libc/include", + ] + + if (component_mode != "shared_library") { + defines += [ "NSPR_STATIC" ] + } + } + + component("nspr") { + output_name = "crnspr" + sources = [ + "nspr/lib/ds/plarena.c", + "nspr/lib/ds/plarena.h", + "nspr/lib/ds/plarenas.h", + "nspr/lib/ds/plhash.c", + "nspr/lib/ds/plhash.h", + "nspr/lib/libc/include/plbase64.h", + "nspr/lib/libc/include/plerror.h", + "nspr/lib/libc/include/plgetopt.h", + "nspr/lib/libc/include/plstr.h", + "nspr/lib/libc/src/base64.c", + "nspr/lib/libc/src/plerror.c", + "nspr/lib/libc/src/plgetopt.c", + "nspr/lib/libc/src/strcase.c", + "nspr/lib/libc/src/strcat.c", + "nspr/lib/libc/src/strchr.c", + "nspr/lib/libc/src/strcmp.c", + "nspr/lib/libc/src/strcpy.c", + "nspr/lib/libc/src/strdup.c", + "nspr/lib/libc/src/strlen.c", + "nspr/lib/libc/src/strpbrk.c", + "nspr/lib/libc/src/strstr.c", + "nspr/lib/libc/src/strtok.c", + "nspr/pr/include/md/_darwin.cfg", + "nspr/pr/include/md/_darwin.h", + "nspr/pr/include/md/_pcos.h", + "nspr/pr/include/md/_pth.h", + "nspr/pr/include/md/_unix_errors.h", + "nspr/pr/include/md/_unixos.h", + "nspr/pr/include/md/_win32_errors.h", + "nspr/pr/include/md/_win95.cfg", + "nspr/pr/include/md/_win95.h", + "nspr/pr/include/md/prosdep.h", + "nspr/pr/include/nspr.h", + "nspr/pr/include/obsolete/pralarm.h", + "nspr/pr/include/obsolete/probslet.h", + "nspr/pr/include/obsolete/protypes.h", + "nspr/pr/include/obsolete/prsem.h", + "nspr/pr/include/pratom.h", + "nspr/pr/include/prbit.h", + "nspr/pr/include/prclist.h", + "nspr/pr/include/prcmon.h", + "nspr/pr/include/prcountr.h", + "nspr/pr/include/prcpucfg.h", + "nspr/pr/include/prcvar.h", + "nspr/pr/include/prdtoa.h", + "nspr/pr/include/prenv.h", + "nspr/pr/include/prerr.h", + "nspr/pr/include/prerror.h", + "nspr/pr/include/prinet.h", + "nspr/pr/include/prinit.h", + "nspr/pr/include/prinrval.h", + "nspr/pr/include/prio.h", + "nspr/pr/include/pripcsem.h", + "nspr/pr/include/private/pprio.h", + "nspr/pr/include/private/pprmwait.h", + "nspr/pr/include/private/pprthred.h", + "nspr/pr/include/private/primpl.h", + "nspr/pr/include/private/prpriv.h", + "nspr/pr/include/prlink.h", + "nspr/pr/include/prlock.h", + "nspr/pr/include/prlog.h", + "nspr/pr/include/prlong.h", + "nspr/pr/include/prmem.h", + "nspr/pr/include/prmon.h", + "nspr/pr/include/prmwait.h", + "nspr/pr/include/prnetdb.h", + "nspr/pr/include/prolock.h", + "nspr/pr/include/prpdce.h", + "nspr/pr/include/prprf.h", + "nspr/pr/include/prproces.h", + "nspr/pr/include/prrng.h", + "nspr/pr/include/prrwlock.h", + "nspr/pr/include/prshm.h", + "nspr/pr/include/prshma.h", + "nspr/pr/include/prsystem.h", + "nspr/pr/include/prthread.h", + "nspr/pr/include/prtime.h", + "nspr/pr/include/prtpool.h", + "nspr/pr/include/prtrace.h", + "nspr/pr/include/prtypes.h", + "nspr/pr/include/prvrsion.h", + "nspr/pr/include/prwin16.h", + "nspr/pr/src/io/prdir.c", + "nspr/pr/src/io/prfdcach.c", + "nspr/pr/src/io/prfile.c", + "nspr/pr/src/io/prio.c", + "nspr/pr/src/io/priometh.c", + "nspr/pr/src/io/pripv6.c", + "nspr/pr/src/io/prlayer.c", + "nspr/pr/src/io/prlog.c", + "nspr/pr/src/io/prmapopt.c", + "nspr/pr/src/io/prmmap.c", + "nspr/pr/src/io/prmwait.c", + "nspr/pr/src/io/prpolevt.c", + "nspr/pr/src/io/prprf.c", + "nspr/pr/src/io/prscanf.c", + "nspr/pr/src/io/prsocket.c", + "nspr/pr/src/io/prstdio.c", + "nspr/pr/src/linking/prlink.c", + "nspr/pr/src/malloc/prmalloc.c", + "nspr/pr/src/malloc/prmem.c", + "nspr/pr/src/md/prosdep.c", + "nspr/pr/src/md/unix/darwin.c", + "nspr/pr/src/md/unix/os_Darwin.s", + "nspr/pr/src/md/unix/unix.c", + "nspr/pr/src/md/unix/unix_errors.c", + "nspr/pr/src/md/unix/uxproces.c", + "nspr/pr/src/md/unix/uxrng.c", + "nspr/pr/src/md/unix/uxshm.c", + "nspr/pr/src/md/unix/uxwrap.c", + "nspr/pr/src/md/windows/ntgc.c", + "nspr/pr/src/md/windows/ntinrval.c", + "nspr/pr/src/md/windows/ntmisc.c", + "nspr/pr/src/md/windows/ntsec.c", + "nspr/pr/src/md/windows/ntsem.c", + "nspr/pr/src/md/windows/w32ipcsem.c", + "nspr/pr/src/md/windows/w32poll.c", + "nspr/pr/src/md/windows/w32rng.c", + "nspr/pr/src/md/windows/w32shm.c", + "nspr/pr/src/md/windows/w95cv.c", + "nspr/pr/src/md/windows/w95dllmain.c", + "nspr/pr/src/md/windows/w95io.c", + "nspr/pr/src/md/windows/w95sock.c", + "nspr/pr/src/md/windows/w95thred.c", + "nspr/pr/src/md/windows/win32_errors.c", + "nspr/pr/src/memory/prseg.c", + "nspr/pr/src/memory/prshm.c", + "nspr/pr/src/memory/prshma.c", + "nspr/pr/src/misc/pralarm.c", + "nspr/pr/src/misc/pratom.c", + "nspr/pr/src/misc/praton.c", + "nspr/pr/src/misc/prcountr.c", + "nspr/pr/src/misc/prdtoa.c", + "nspr/pr/src/misc/prenv.c", + "nspr/pr/src/misc/prerr.c", + "nspr/pr/src/misc/prerror.c", + "nspr/pr/src/misc/prerrortable.c", + "nspr/pr/src/misc/prinit.c", + "nspr/pr/src/misc/prinrval.c", + "nspr/pr/src/misc/pripc.c", + "nspr/pr/src/misc/pripcsem.c", + "nspr/pr/src/misc/prlog2.c", + "nspr/pr/src/misc/prlong.c", + "nspr/pr/src/misc/prnetdb.c", + "nspr/pr/src/misc/prolock.c", + "nspr/pr/src/misc/prrng.c", + "nspr/pr/src/misc/prsystem.c", + "nspr/pr/src/misc/prthinfo.c", + "nspr/pr/src/misc/prtime.c", + "nspr/pr/src/misc/prtpool.c", + "nspr/pr/src/misc/prtrace.c", + "nspr/pr/src/pthreads/ptio.c", + "nspr/pr/src/pthreads/ptmisc.c", + "nspr/pr/src/pthreads/ptsynch.c", + "nspr/pr/src/pthreads/ptthread.c", + "nspr/pr/src/threads/combined/prucpu.c", + "nspr/pr/src/threads/combined/prucv.c", + "nspr/pr/src/threads/combined/prulock.c", + "nspr/pr/src/threads/combined/prustack.c", + "nspr/pr/src/threads/combined/pruthr.c", + "nspr/pr/src/threads/prcmon.c", + "nspr/pr/src/threads/prcthr.c", + "nspr/pr/src/threads/prdump.c", + "nspr/pr/src/threads/prmon.c", + "nspr/pr/src/threads/prrwlock.c", + "nspr/pr/src/threads/prsem.c", + "nspr/pr/src/threads/prtpd.c", + ] + + public_configs = [ ":nspr_config" ] + + configs -= [ "//build/config/compiler:chromium_code" ] + if (is_win) { + configs -= [ + "//build/config/win:unicode", # Requires 8-bit mode. + "//build/config/win:lean_and_mean", # Won"t compile with lean and mean. + ] + } + configs += [ + "//build/config/compiler:no_chromium_code", + "//build/config/compiler:no_size_t_to_int_warning", + ] + + cflags = [] + defines = [ + "_NSPR_BUILD_", + "FORCE_PR_LOG", + ] + + include_dirs = [ "nspr/pr/include/private" ] + + if (is_win) { + cflags = [ "/wd4554" ] # Check precidence. + defines += [ + "XP_PC", + "WIN32", + "WIN95", + "_PR_GLOBAL_THREADS_ONLY", + "_CRT_SECURE_NO_WARNINGS", + ] + } else { + sources -= [ + "nspr/pr/src/md/windows/ntgc.c", + "nspr/pr/src/md/windows/ntinrval.c", + "nspr/pr/src/md/windows/ntmisc.c", + "nspr/pr/src/md/windows/ntsec.c", + "nspr/pr/src/md/windows/ntsem.c", + "nspr/pr/src/md/windows/w32ipcsem.c", + "nspr/pr/src/md/windows/w32poll.c", + "nspr/pr/src/md/windows/w32rng.c", + "nspr/pr/src/md/windows/w32shm.c", + "nspr/pr/src/md/windows/w95cv.c", + "nspr/pr/src/md/windows/w95dllmain.c", + "nspr/pr/src/md/windows/w95io.c", + "nspr/pr/src/md/windows/w95sock.c", + "nspr/pr/src/md/windows/w95thred.c", + "nspr/pr/src/md/windows/win32_errors.c", + "nspr/pr/src/threads/combined/prucpu.c", + "nspr/pr/src/threads/combined/prucv.c", + "nspr/pr/src/threads/combined/prulock.c", + "nspr/pr/src/threads/combined/prustack.c", + "nspr/pr/src/threads/combined/pruthr.c", + ] + } + + if (!is_posix) { + sources -= [ + "nspr/pr/src/md/unix/darwin.c", + "nspr/pr/src/md/unix/os_Darwin.s", + "nspr/pr/src/md/unix/unix.c", + "nspr/pr/src/md/unix/unix_errors.c", + "nspr/pr/src/md/unix/uxproces.c", + "nspr/pr/src/md/unix/uxrng.c", + "nspr/pr/src/md/unix/uxshm.c", + "nspr/pr/src/md/unix/uxwrap.c", + "nspr/pr/src/pthreads/ptio.c", + "nspr/pr/src/pthreads/ptmisc.c", + "nspr/pr/src/pthreads/ptsynch.c", + "nspr/pr/src/pthreads/ptthread.c", + ] + } + + if (current_cpu == "x86") { + defines += [ "_X86_" ] + } else if (current_cpu == "x64") { + defines += [ "_AMD64_" ] + } + + if (is_mac || is_ios) { + sources -= [ + "nspr/pr/src/io/prdir.c", + "nspr/pr/src/io/prfile.c", + "nspr/pr/src/io/prio.c", + "nspr/pr/src/io/prsocket.c", + "nspr/pr/src/misc/pripcsem.c", + "nspr/pr/src/threads/prcthr.c", + "nspr/pr/src/threads/prdump.c", + "nspr/pr/src/threads/prmon.c", + "nspr/pr/src/threads/prsem.c", + ] + defines += [ + "XP_UNIX", + "DARWIN", + "XP_MACOSX", + "_PR_PTHREADS", + "HAVE_BSD_FLOCK", + "HAVE_DLADDR", + "HAVE_LCHOWN", + "HAVE_SOCKLEN_T", + "HAVE_STRERROR", + ] + } + + if (is_mac) { + defines += [ "HAVE_CRT_EXTERNS_H" ] + libs = [ + "CoreFoundation.framework", + "CoreServices.framework", + ] + } + + if (is_clang) { + cflags += [ + # nspr uses a bunch of deprecated functions (NSLinkModule etc) in + # prlink.c on mac. + "-Wno-deprecated-declarations", + + # nspr passes "const char*" through "void*". + "-Wno-incompatible-pointer-types", + + # nspr passes "int*" through "unsigned int*". + "-Wno-pointer-sign", + ] + + # nspr uses assert(!"foo") instead of assert(false && "foo"). + configs -= [ "//build/config/clang:extra_warnings" ] + } + } + + component("nss") { + output_name = "crnss" + sources = [ + # Ensure at least one object file is produced, so that MSVC does not + # warn when creating the static/shared library. See the note for + # the "nssckbi" target for why the "nss" target was split as such. + "nss/lib/nss/nssver.c", + ] + + public_deps = [ ":nss_static" ] + + if (include_nss_root_certs) { + public_deps += [ ":nssckbi" ] + } + + if (component_mode == "shared_library") { + if (is_mac) { + ldflags = [ "-all_load" ] + } else if (is_win) { + # Pass the def file to the linker. + ldflags = + [ "/DEF:" + rebase_path("nss/exports_win.def", root_build_dir) ] + } + } + } + + config("nssckbi_config") { + include_dirs = [ "nss/lib/ckfw/builtins" ] + } + + # This is really more of a pseudo-target to work around the fact that + # a single static_library target cannot contain two object files of the + # same name (hash.o / hash.obj). Logically, this is part of the + # "nss_static" target. By separating it out, it creates a possible + # circular dependency between "nss_static" and "nssckbi" when + # "exclude_nss_root_certs" is not specified, as "nss_static" depends on + # the "builtinsC_GetFunctionList" exported by this target. This is an + # artifact of how NSS is being statically built, which is not an + # officially supported configuration - normally, "nssckbi.dll/so" would + # depend on libnss3.dll/so, and the higher layer caller would instruct + # libnss3.dll to dynamically load nssckbi.dll, breaking the circle. + # + # TODO(rsleevi): http://crbug.com/128134 - Break the circular dependency + # without requiring nssckbi to be built as a shared library. + source_set("nssckbi") { + visibility = [ ":nss" ] # This target is internal implementation detail. + + sources = [ + "nss/lib/ckfw/builtins/anchor.c", + "nss/lib/ckfw/builtins/bfind.c", + "nss/lib/ckfw/builtins/binst.c", + "nss/lib/ckfw/builtins/bobject.c", + "nss/lib/ckfw/builtins/bsession.c", + "nss/lib/ckfw/builtins/bslot.c", + "nss/lib/ckfw/builtins/btoken.c", + "nss/lib/ckfw/builtins/builtins.h", + "nss/lib/ckfw/builtins/certdata.c", + "nss/lib/ckfw/builtins/ckbiver.c", + "nss/lib/ckfw/builtins/constants.c", + "nss/lib/ckfw/builtins/nssckbi.h", + "nss/lib/ckfw/ck.h", + "nss/lib/ckfw/ckfw.h", + "nss/lib/ckfw/ckfwm.h", + "nss/lib/ckfw/ckfwtm.h", + "nss/lib/ckfw/ckmd.h", + "nss/lib/ckfw/ckt.h", + "nss/lib/ckfw/crypto.c", + "nss/lib/ckfw/find.c", + "nss/lib/ckfw/hash.c", + "nss/lib/ckfw/instance.c", + "nss/lib/ckfw/mechanism.c", + "nss/lib/ckfw/mutex.c", + "nss/lib/ckfw/nssck.api", + "nss/lib/ckfw/nssckepv.h", + "nss/lib/ckfw/nssckft.h", + "nss/lib/ckfw/nssckfw.h", + "nss/lib/ckfw/nssckfwc.h", + "nss/lib/ckfw/nssckfwt.h", + "nss/lib/ckfw/nssckg.h", + "nss/lib/ckfw/nssckmdt.h", + "nss/lib/ckfw/nssckt.h", + "nss/lib/ckfw/object.c", + "nss/lib/ckfw/session.c", + "nss/lib/ckfw/sessobj.c", + "nss/lib/ckfw/slot.c", + "nss/lib/ckfw/token.c", + "nss/lib/ckfw/wrap.c", + ] + + configs -= [ "//build/config/compiler:chromium_code" ] + + if (is_win) { + configs -= [ "//build/config/win:unicode" ] # Requires 8-bit mode. + } + configs += [ "//build/config/compiler:no_chromium_code" ] + + include_dirs = [ "nss/lib/ckfw" ] + public_configs = [ ":nssckbi_config" ] + + public_deps = [ ":nss_static" ] + } + + config("nss_static_config") { + defines = [ + "NSS_STATIC", + "NSS_USE_STATIC_LIBS", + "USE_UTIL_DIRECTLY", + ] + if (is_win) { + defines += [ "_WINDOWS" ] + } + include_dirs = [ + "nspr/pr/include", + "nspr/lib/ds", + "nspr/lib/libc/include", + "nss/lib/base", + "nss/lib/certdb", + "nss/lib/certhigh", + "nss/lib/cryptohi", + "nss/lib/dev", + "nss/lib/freebl", + "nss/lib/freebl/ecl", + "nss/lib/nss", + "nss/lib/pk11wrap", + "nss/lib/pkcs7", + "nss/lib/pki", + "nss/lib/smime", + "nss/lib/softoken", + "nss/lib/util", + ] + } + + if (is_win && current_cpu == "x86") { + source_set("nss_static_avx") { + sources = [ + "nss/lib/freebl/intel-gcm-wrap.c", + "nss/lib/freebl/intel-gcm-x86-masm.asm", + "nss/lib/freebl/intel-gcm.h", + ] + defines = [ + "_WINDOWS", + "_X86_", + "INTEL_GCM", + "MP_API_COMPATIBLE", + "MP_ASSEMBLY_DIV_2DX1D", + "MP_ASSEMBLY_MULTIPLY", + "MP_ASSEMBLY_SQUARE", + "MP_NO_MP_WORD", + "MP_USE_UINT_DIGIT", + "NSS_DISABLE_DBM", + "NSS_STATIC", + "NSS_USE_STATIC_LIBS", + "NSS_X86", + "NSS_X86_OR_X64", + "RIJNDAEL_INCLUDE_TABLES", + "SHLIB_PREFIX=\"\"", + "SHLIB_SUFFIX=\"dll\"", + "SHLIB_VERSION=\"3\"", + "SOFTOKEN_LIB_NAME=\"softokn3.dll\"", + "SOFTOKEN_SHLIB_VERSION=\"3\"", + "USE_HW_AES", + "USE_UTIL_DIRECTLY", + "WIN32", + "WIN95", + "XP_PC", + ] + include_dirs = [ + "nspr/pr/include", + "nspr/lib/ds", + "nspr/lib/libc/include", + "nss/lib/freebl/ecl", + "nss/lib/util", + ] + } + } + + source_set("nss_static") { + visibility = [ ":*" ] # Internal implementation detail. + + sources = [ + "nss/lib/base/arena.c", + "nss/lib/base/base.h", + "nss/lib/base/baset.h", + "nss/lib/base/error.c", + "nss/lib/base/errorval.c", + "nss/lib/base/hash.c", + "nss/lib/base/hashops.c", + "nss/lib/base/item.c", + "nss/lib/base/libc.c", + "nss/lib/base/list.c", + "nss/lib/base/nssbase.h", + "nss/lib/base/nssbaset.h", + "nss/lib/base/nssutf8.c", + "nss/lib/base/tracker.c", + "nss/lib/certdb/alg1485.c", + "nss/lib/certdb/cert.h", + "nss/lib/certdb/certdb.c", + "nss/lib/certdb/certdb.h", + "nss/lib/certdb/certi.h", + "nss/lib/certdb/certt.h", + "nss/lib/certdb/certv3.c", + "nss/lib/certdb/certxutl.c", + "nss/lib/certdb/certxutl.h", + "nss/lib/certdb/crl.c", + "nss/lib/certdb/genname.c", + "nss/lib/certdb/genname.h", + "nss/lib/certdb/polcyxtn.c", + "nss/lib/certdb/secname.c", + "nss/lib/certdb/stanpcertdb.c", + "nss/lib/certdb/xauthkid.c", + "nss/lib/certdb/xbsconst.c", + "nss/lib/certdb/xconst.c", + "nss/lib/certdb/xconst.h", + "nss/lib/certhigh/certhigh.c", + "nss/lib/certhigh/certhtml.c", + "nss/lib/certhigh/certreq.c", + "nss/lib/certhigh/certvfy.c", + "nss/lib/certhigh/crlv2.c", + "nss/lib/certhigh/ocsp.c", + "nss/lib/certhigh/ocsp.h", + "nss/lib/certhigh/ocspi.h", + "nss/lib/certhigh/ocspsig.c", + "nss/lib/certhigh/ocspt.h", + "nss/lib/certhigh/ocspti.h", + "nss/lib/certhigh/xcrldist.c", + "nss/lib/cryptohi/cryptohi.h", + "nss/lib/cryptohi/cryptoht.h", + "nss/lib/cryptohi/dsautil.c", + "nss/lib/cryptohi/key.h", + "nss/lib/cryptohi/keyhi.h", + "nss/lib/cryptohi/keyi.h", + "nss/lib/cryptohi/keyt.h", + "nss/lib/cryptohi/keythi.h", + "nss/lib/cryptohi/sechash.c", + "nss/lib/cryptohi/sechash.h", + "nss/lib/cryptohi/seckey.c", + "nss/lib/cryptohi/secsign.c", + "nss/lib/cryptohi/secvfy.c", + "nss/lib/dev/ckhelper.c", + "nss/lib/dev/ckhelper.h", + "nss/lib/dev/dev.h", + "nss/lib/dev/devm.h", + "nss/lib/dev/devslot.c", + "nss/lib/dev/devt.h", + "nss/lib/dev/devtm.h", + "nss/lib/dev/devtoken.c", + "nss/lib/dev/devutil.c", + "nss/lib/dev/nssdev.h", + "nss/lib/dev/nssdevt.h", + "nss/lib/freebl/aeskeywrap.c", + "nss/lib/freebl/alg2268.c", + "nss/lib/freebl/alghmac.c", + "nss/lib/freebl/alghmac.h", + "nss/lib/freebl/arcfive.c", + "nss/lib/freebl/arcfour.c", + "nss/lib/freebl/blapi.h", + "nss/lib/freebl/blapii.h", + "nss/lib/freebl/blapit.h", + "nss/lib/freebl/camellia.c", + "nss/lib/freebl/camellia.h", + "nss/lib/freebl/chacha20/chacha20.c", + "nss/lib/freebl/chacha20/chacha20.h", + "nss/lib/freebl/chacha20/chacha20_vec.c", + "nss/lib/freebl/chacha20poly1305.c", + "nss/lib/freebl/chacha20poly1305.h", + "nss/lib/freebl/ctr.c", + "nss/lib/freebl/ctr.h", + "nss/lib/freebl/cts.c", + "nss/lib/freebl/cts.h", + "nss/lib/freebl/des.c", + "nss/lib/freebl/des.h", + "nss/lib/freebl/desblapi.c", + "nss/lib/freebl/dh.c", + "nss/lib/freebl/drbg.c", + "nss/lib/freebl/dsa.c", + "nss/lib/freebl/ec.c", + "nss/lib/freebl/ec.h", + "nss/lib/freebl/ecdecode.c", + "nss/lib/freebl/ecl/ec2.h", + "nss/lib/freebl/ecl/ec_naf.c", + "nss/lib/freebl/ecl/ecl-curve.h", + "nss/lib/freebl/ecl/ecl-exp.h", + "nss/lib/freebl/ecl/ecl-priv.h", + "nss/lib/freebl/ecl/ecl.c", + "nss/lib/freebl/ecl/ecl.h", + "nss/lib/freebl/ecl/ecl_curve.c", + "nss/lib/freebl/ecl/ecl_gf.c", + "nss/lib/freebl/ecl/ecl_mult.c", + "nss/lib/freebl/ecl/ecp.h", + "nss/lib/freebl/ecl/ecp_256.c", + "nss/lib/freebl/ecl/ecp_256_32.c", + "nss/lib/freebl/ecl/ecp_384.c", + "nss/lib/freebl/ecl/ecp_521.c", + "nss/lib/freebl/ecl/ecp_aff.c", + "nss/lib/freebl/ecl/ecp_jac.c", + "nss/lib/freebl/ecl/ecp_jm.c", + "nss/lib/freebl/ecl/ecp_mont.c", + "nss/lib/freebl/gcm.c", + "nss/lib/freebl/gcm.h", + "nss/lib/freebl/hmacct.c", + "nss/lib/freebl/hmacct.h", + "nss/lib/freebl/intel-aes-x86-masm.asm", + "nss/lib/freebl/intel-aes.h", + "nss/lib/freebl/jpake.c", + "nss/lib/freebl/md2.c", + "nss/lib/freebl/md5.c", + "nss/lib/freebl/mpi/logtab.h", + "nss/lib/freebl/mpi/mp_gf2m-priv.h", + "nss/lib/freebl/mpi/mp_gf2m.c", + "nss/lib/freebl/mpi/mp_gf2m.h", + "nss/lib/freebl/mpi/mpcpucache.c", + "nss/lib/freebl/mpi/mpi-config.h", + "nss/lib/freebl/mpi/mpi-priv.h", + "nss/lib/freebl/mpi/mpi.c", + "nss/lib/freebl/mpi/mpi.h", + "nss/lib/freebl/mpi/mpi_amd64.c", + "nss/lib/freebl/mpi/mpi_arm.c", + "nss/lib/freebl/mpi/mpi_arm_mac.c", + "nss/lib/freebl/mpi/mpi_x86_asm.c", + "nss/lib/freebl/mpi/mplogic.c", + "nss/lib/freebl/mpi/mplogic.h", + "nss/lib/freebl/mpi/mpmontg.c", + "nss/lib/freebl/mpi/mpprime.c", + "nss/lib/freebl/mpi/mpprime.h", + "nss/lib/freebl/mpi/primes.c", + "nss/lib/freebl/nss_build_config_mac.h", + "nss/lib/freebl/poly1305/poly1305-donna-x64-sse2-incremental-source.c", + "nss/lib/freebl/poly1305/poly1305.c", + "nss/lib/freebl/poly1305/poly1305.h", + "nss/lib/freebl/pqg.c", + "nss/lib/freebl/pqg.h", + "nss/lib/freebl/rawhash.c", + "nss/lib/freebl/rijndael.c", + "nss/lib/freebl/rijndael.h", + "nss/lib/freebl/rijndael32.tab", + "nss/lib/freebl/rsa.c", + "nss/lib/freebl/rsapkcs.c", + "nss/lib/freebl/secmpi.h", + "nss/lib/freebl/secrng.h", + "nss/lib/freebl/seed.c", + "nss/lib/freebl/seed.h", + "nss/lib/freebl/sha256.h", + "nss/lib/freebl/sha512.c", + "nss/lib/freebl/sha_fast.c", + "nss/lib/freebl/sha_fast.h", + "nss/lib/freebl/shsign.h", + "nss/lib/freebl/shvfy.c", + "nss/lib/freebl/sysrand.c", + "nss/lib/freebl/tlsprfalg.c", + "nss/lib/freebl/unix_rand.c", + "nss/lib/freebl/win_rand.c", + "nss/lib/nss/nss.h", + "nss/lib/nss/nssinit.c", + "nss/lib/nss/nssrenam.h", + "nss/lib/nss/utilwrap.c", + "nss/lib/pk11wrap/debug_module.c", + "nss/lib/pk11wrap/dev3hack.c", + "nss/lib/pk11wrap/dev3hack.h", + "nss/lib/pk11wrap/pk11akey.c", + "nss/lib/pk11wrap/pk11auth.c", + "nss/lib/pk11wrap/pk11cert.c", + "nss/lib/pk11wrap/pk11cxt.c", + "nss/lib/pk11wrap/pk11err.c", + "nss/lib/pk11wrap/pk11func.h", + "nss/lib/pk11wrap/pk11kea.c", + "nss/lib/pk11wrap/pk11list.c", + "nss/lib/pk11wrap/pk11load.c", + "nss/lib/pk11wrap/pk11mech.c", + "nss/lib/pk11wrap/pk11merge.c", + "nss/lib/pk11wrap/pk11nobj.c", + "nss/lib/pk11wrap/pk11obj.c", + "nss/lib/pk11wrap/pk11pars.c", + "nss/lib/pk11wrap/pk11pbe.c", + "nss/lib/pk11wrap/pk11pk12.c", + "nss/lib/pk11wrap/pk11pqg.c", + "nss/lib/pk11wrap/pk11pqg.h", + "nss/lib/pk11wrap/pk11priv.h", + "nss/lib/pk11wrap/pk11pub.h", + "nss/lib/pk11wrap/pk11sdr.c", + "nss/lib/pk11wrap/pk11sdr.h", + "nss/lib/pk11wrap/pk11skey.c", + "nss/lib/pk11wrap/pk11slot.c", + "nss/lib/pk11wrap/pk11util.c", + "nss/lib/pk11wrap/secmod.h", + "nss/lib/pk11wrap/secmodi.h", + "nss/lib/pk11wrap/secmodt.h", + "nss/lib/pk11wrap/secmodti.h", + "nss/lib/pk11wrap/secpkcs5.h", + "nss/lib/pkcs7/certread.c", + "nss/lib/pkcs7/p7common.c", + "nss/lib/pkcs7/p7create.c", + "nss/lib/pkcs7/p7decode.c", + "nss/lib/pkcs7/p7encode.c", + "nss/lib/pkcs7/p7local.c", + "nss/lib/pkcs7/p7local.h", + "nss/lib/pkcs7/pkcs7t.h", + "nss/lib/pkcs7/secmime.c", + "nss/lib/pkcs7/secmime.h", + "nss/lib/pkcs7/secpkcs7.h", + "nss/lib/pki/asymmkey.c", + "nss/lib/pki/certdecode.c", + "nss/lib/pki/certificate.c", + "nss/lib/pki/cryptocontext.c", + "nss/lib/pki/nsspki.h", + "nss/lib/pki/nsspkit.h", + "nss/lib/pki/pki.h", + "nss/lib/pki/pki3hack.c", + "nss/lib/pki/pki3hack.h", + "nss/lib/pki/pkibase.c", + "nss/lib/pki/pkim.h", + "nss/lib/pki/pkistore.c", + "nss/lib/pki/pkistore.h", + "nss/lib/pki/pkit.h", + "nss/lib/pki/pkitm.h", + "nss/lib/pki/symmkey.c", + "nss/lib/pki/tdcache.c", + "nss/lib/pki/trustdomain.c", + "nss/lib/smime/cms.h", + "nss/lib/smime/cmslocal.h", + "nss/lib/smime/cmsreclist.h", + "nss/lib/smime/cmst.h", + "nss/lib/smime/smime.h", + "nss/lib/softoken/fipsaudt.c", + "nss/lib/softoken/fipstest.c", + "nss/lib/softoken/fipstokn.c", + "nss/lib/softoken/jpakesftk.c", + "nss/lib/softoken/lgglue.c", + "nss/lib/softoken/lgglue.h", + "nss/lib/softoken/lowkey.c", + "nss/lib/softoken/lowkeyi.h", + "nss/lib/softoken/lowkeyti.h", + "nss/lib/softoken/lowpbe.c", + "nss/lib/softoken/lowpbe.h", + "nss/lib/softoken/padbuf.c", + "nss/lib/softoken/pkcs11.c", + "nss/lib/softoken/pkcs11c.c", + "nss/lib/softoken/pkcs11i.h", + "nss/lib/softoken/pkcs11ni.h", + "nss/lib/softoken/pkcs11u.c", + "nss/lib/softoken/sdb.c", + "nss/lib/softoken/sdb.h", + "nss/lib/softoken/sftkdb.c", + "nss/lib/softoken/sftkdb.h", + "nss/lib/softoken/sftkdbt.h", + "nss/lib/softoken/sftkdbti.h", + "nss/lib/softoken/sftkhmac.c", + "nss/lib/softoken/sftkpars.c", + "nss/lib/softoken/sftkpars.h", + "nss/lib/softoken/sftkpwd.c", + "nss/lib/softoken/softkver.c", + "nss/lib/softoken/softkver.h", + "nss/lib/softoken/softoken.h", + "nss/lib/softoken/softoknt.h", + "nss/lib/softoken/tlsprf.c", + "nss/lib/ssl/sslerr.h", + "nss/lib/util/SECerrs.h", + "nss/lib/util/base64.h", + "nss/lib/util/ciferfam.h", + "nss/lib/util/derdec.c", + "nss/lib/util/derenc.c", + "nss/lib/util/dersubr.c", + "nss/lib/util/dertime.c", + "nss/lib/util/errstrs.c", + "nss/lib/util/hasht.h", + "nss/lib/util/nssb64.h", + "nss/lib/util/nssb64d.c", + "nss/lib/util/nssb64e.c", + "nss/lib/util/nssb64t.h", + "nss/lib/util/nssilckt.h", + "nss/lib/util/nssilock.c", + "nss/lib/util/nssilock.h", + "nss/lib/util/nsslocks.h", + "nss/lib/util/nssrwlk.c", + "nss/lib/util/nssrwlk.h", + "nss/lib/util/nssrwlkt.h", + "nss/lib/util/nssutil.h", + "nss/lib/util/oidstring.c", + "nss/lib/util/pkcs11.h", + "nss/lib/util/pkcs11f.h", + "nss/lib/util/pkcs11n.h", + "nss/lib/util/pkcs11p.h", + "nss/lib/util/pkcs11t.h", + "nss/lib/util/pkcs11u.h", + "nss/lib/util/pkcs1sig.c", + "nss/lib/util/pkcs1sig.h", + "nss/lib/util/portreg.c", + "nss/lib/util/portreg.h", + "nss/lib/util/quickder.c", + "nss/lib/util/secalgid.c", + "nss/lib/util/secasn1.h", + "nss/lib/util/secasn1d.c", + "nss/lib/util/secasn1e.c", + "nss/lib/util/secasn1t.h", + "nss/lib/util/secasn1u.c", + "nss/lib/util/seccomon.h", + "nss/lib/util/secder.h", + "nss/lib/util/secdert.h", + "nss/lib/util/secdig.c", + "nss/lib/util/secdig.h", + "nss/lib/util/secdigt.h", + "nss/lib/util/secerr.h", + "nss/lib/util/secitem.c", + "nss/lib/util/secitem.h", + "nss/lib/util/secoid.c", + "nss/lib/util/secoid.h", + "nss/lib/util/secoidt.h", + "nss/lib/util/secport.c", + "nss/lib/util/secport.h", + "nss/lib/util/sectime.c", + "nss/lib/util/templates.c", + "nss/lib/util/utf8.c", + "nss/lib/util/utilmod.c", + "nss/lib/util/utilmodt.h", + "nss/lib/util/utilpars.c", + "nss/lib/util/utilpars.h", + "nss/lib/util/utilparst.h", + "nss/lib/util/utilrename.h", + ] + + sources -= [ + # mpi_arm.c is included by mpi_arm_mac.c. + # NOTE: mpi_arm.c can be used directly on Linux. mpi_arm.c will need + # to be excluded conditionally if we start to build NSS on Linux. + "nss/lib/freebl/mpi/mpi_arm.c", + + # primes.c is included by mpprime.c. + "nss/lib/freebl/mpi/primes.c", + + # unix_rand.c and win_rand.c are included by sysrand.c. + "nss/lib/freebl/unix_rand.c", + "nss/lib/freebl/win_rand.c", + + # debug_module.c is included by pk11load.c. + "nss/lib/pk11wrap/debug_module.c", + ] + + configs -= [ "//build/config/compiler:chromium_code" ] + if (is_win) { + configs -= [ "//build/config/win:unicode" ] # Requires 8-bit mode. + } + configs += [ + "//build/config/compiler:no_chromium_code", + "//build/config/compiler:no_size_t_to_int_warning", + ] + public_configs = [ ":nss_static_config" ] + + cflags = [] + + # Only need the defines and includes not in nss_static_config. + defines = [ + "MP_API_COMPATIBLE", + "NSS_DISABLE_DBM", + "RIJNDAEL_INCLUDE_TABLES", + "SHLIB_VERSION=\"3\"", + "SOFTOKEN_SHLIB_VERSION=\"3\"", + ] + include_dirs = [ + "nss/lib/freebl/mpi", + "nss/lib/ssl", + ] + + if (is_win) { + cflags += [ "/wd4101" ] # Unreferenced local variable. + } + + if (include_nss_libpkix) { + sources += [ + "nss/lib/certhigh/certvfypkix.c", + "nss/lib/certhigh/certvfypkixprint.c", + "nss/lib/libpkix/include/pkix.h", + "nss/lib/libpkix/include/pkix_certsel.h", + "nss/lib/libpkix/include/pkix_certstore.h", + "nss/lib/libpkix/include/pkix_checker.h", + "nss/lib/libpkix/include/pkix_crlsel.h", + "nss/lib/libpkix/include/pkix_errorstrings.h", + "nss/lib/libpkix/include/pkix_params.h", + "nss/lib/libpkix/include/pkix_pl_pki.h", + "nss/lib/libpkix/include/pkix_pl_system.h", + "nss/lib/libpkix/include/pkix_results.h", + "nss/lib/libpkix/include/pkix_revchecker.h", + "nss/lib/libpkix/include/pkix_sample_modules.h", + "nss/lib/libpkix/include/pkix_util.h", + "nss/lib/libpkix/include/pkixt.h", + "nss/lib/libpkix/pkix/certsel/pkix_certselector.c", + "nss/lib/libpkix/pkix/certsel/pkix_certselector.h", + "nss/lib/libpkix/pkix/certsel/pkix_comcertselparams.c", + "nss/lib/libpkix/pkix/certsel/pkix_comcertselparams.h", + "nss/lib/libpkix/pkix/checker/pkix_basicconstraintschecker.c", + "nss/lib/libpkix/pkix/checker/pkix_basicconstraintschecker.h", + "nss/lib/libpkix/pkix/checker/pkix_certchainchecker.c", + "nss/lib/libpkix/pkix/checker/pkix_certchainchecker.h", + "nss/lib/libpkix/pkix/checker/pkix_crlchecker.c", + "nss/lib/libpkix/pkix/checker/pkix_crlchecker.h", + "nss/lib/libpkix/pkix/checker/pkix_ekuchecker.c", + "nss/lib/libpkix/pkix/checker/pkix_ekuchecker.h", + "nss/lib/libpkix/pkix/checker/pkix_expirationchecker.c", + "nss/lib/libpkix/pkix/checker/pkix_expirationchecker.h", + "nss/lib/libpkix/pkix/checker/pkix_namechainingchecker.c", + "nss/lib/libpkix/pkix/checker/pkix_namechainingchecker.h", + "nss/lib/libpkix/pkix/checker/pkix_nameconstraintschecker.c", + "nss/lib/libpkix/pkix/checker/pkix_nameconstraintschecker.h", + "nss/lib/libpkix/pkix/checker/pkix_ocspchecker.c", + "nss/lib/libpkix/pkix/checker/pkix_ocspchecker.h", + "nss/lib/libpkix/pkix/checker/pkix_policychecker.c", + "nss/lib/libpkix/pkix/checker/pkix_policychecker.h", + "nss/lib/libpkix/pkix/checker/pkix_revocationchecker.c", + "nss/lib/libpkix/pkix/checker/pkix_revocationchecker.h", + "nss/lib/libpkix/pkix/checker/pkix_revocationmethod.c", + "nss/lib/libpkix/pkix/checker/pkix_revocationmethod.h", + "nss/lib/libpkix/pkix/checker/pkix_signaturechecker.c", + "nss/lib/libpkix/pkix/checker/pkix_signaturechecker.h", + "nss/lib/libpkix/pkix/checker/pkix_targetcertchecker.c", + "nss/lib/libpkix/pkix/checker/pkix_targetcertchecker.h", + "nss/lib/libpkix/pkix/crlsel/pkix_comcrlselparams.c", + "nss/lib/libpkix/pkix/crlsel/pkix_comcrlselparams.h", + "nss/lib/libpkix/pkix/crlsel/pkix_crlselector.c", + "nss/lib/libpkix/pkix/crlsel/pkix_crlselector.h", + "nss/lib/libpkix/pkix/params/pkix_procparams.c", + "nss/lib/libpkix/pkix/params/pkix_procparams.h", + "nss/lib/libpkix/pkix/params/pkix_resourcelimits.c", + "nss/lib/libpkix/pkix/params/pkix_resourcelimits.h", + "nss/lib/libpkix/pkix/params/pkix_trustanchor.c", + "nss/lib/libpkix/pkix/params/pkix_trustanchor.h", + "nss/lib/libpkix/pkix/params/pkix_valparams.c", + "nss/lib/libpkix/pkix/params/pkix_valparams.h", + "nss/lib/libpkix/pkix/results/pkix_buildresult.c", + "nss/lib/libpkix/pkix/results/pkix_buildresult.h", + "nss/lib/libpkix/pkix/results/pkix_policynode.c", + "nss/lib/libpkix/pkix/results/pkix_policynode.h", + "nss/lib/libpkix/pkix/results/pkix_valresult.c", + "nss/lib/libpkix/pkix/results/pkix_valresult.h", + "nss/lib/libpkix/pkix/results/pkix_verifynode.c", + "nss/lib/libpkix/pkix/results/pkix_verifynode.h", + "nss/lib/libpkix/pkix/store/pkix_store.c", + "nss/lib/libpkix/pkix/store/pkix_store.h", + "nss/lib/libpkix/pkix/top/pkix_build.c", + "nss/lib/libpkix/pkix/top/pkix_build.h", + "nss/lib/libpkix/pkix/top/pkix_lifecycle.c", + "nss/lib/libpkix/pkix/top/pkix_lifecycle.h", + "nss/lib/libpkix/pkix/top/pkix_validate.c", + "nss/lib/libpkix/pkix/top/pkix_validate.h", + "nss/lib/libpkix/pkix/util/pkix_error.c", + "nss/lib/libpkix/pkix/util/pkix_error.h", + "nss/lib/libpkix/pkix/util/pkix_errpaths.c", + "nss/lib/libpkix/pkix/util/pkix_list.c", + "nss/lib/libpkix/pkix/util/pkix_list.h", + "nss/lib/libpkix/pkix/util/pkix_logger.c", + "nss/lib/libpkix/pkix/util/pkix_logger.h", + "nss/lib/libpkix/pkix/util/pkix_tools.c", + "nss/lib/libpkix/pkix/util/pkix_tools.h", + "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_aiamgr.c", + "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_aiamgr.h", + "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_colcertstore.c", + "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_colcertstore.h", + "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpcertstore.c", + "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpcertstore.h", + "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpdefaultclient.c", + "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpdefaultclient.h", + "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_nsscontext.c", + "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_nsscontext.h", + "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_pk11certstore.c", + "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_pk11certstore.h", + "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_socket.c", + "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_socket.h", + "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_basicconstraints.c", + "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_basicconstraints.h", + "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_cert.c", + "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_cert.h", + "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicyinfo.c", + "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicyinfo.h", + "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicymap.c", + "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicymap.h", + "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicyqualifier.c", + "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicyqualifier.h", + "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crl.c", + "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crl.h", + "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crldp.c", + "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crldp.h", + "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crlentry.c", + "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crlentry.h", + "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_date.c", + "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_date.h", + "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_generalname.c", + "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_generalname.h", + "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_infoaccess.c", + "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_infoaccess.h", + "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_nameconstraints.c", + "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_nameconstraints.h", + "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspcertid.c", + "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspcertid.h", + "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocsprequest.c", + "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocsprequest.h", + "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspresponse.c", + "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspresponse.h", + "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_publickey.c", + "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_publickey.h", + "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_x500name.c", + "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_x500name.h", + "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_bigint.c", + "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_bigint.h", + "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_bytearray.c", + "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_bytearray.h", + "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_common.c", + "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_common.h", + "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_error.c", + "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_hashtable.c", + "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_hashtable.h", + "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_lifecycle.c", + "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_lifecycle.h", + "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_mem.c", + "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_mem.h", + "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_monitorlock.c", + "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_monitorlock.h", + "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_mutex.c", + "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_mutex.h", + "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_object.c", + "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_object.h", + "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_oid.c", + "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_oid.h", + "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_primhash.c", + "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_primhash.h", + "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_rwlock.c", + "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_rwlock.h", + "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_string.c", + "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_string.h", + ] + + # Disable the LDAP code in libpkix. + defines += [ "NSS_PKIX_NO_LDAP" ] + + include_dirs += [ + "nss/lib/libpkix/include", + "nss/lib/libpkix/pkix/certsel", + "nss/lib/libpkix/pkix/checker", + "nss/lib/libpkix/pkix/crlsel", + "nss/lib/libpkix/pkix/params", + "nss/lib/libpkix/pkix/results", + "nss/lib/libpkix/pkix/store", + "nss/lib/libpkix/pkix/top", + "nss/lib/libpkix/pkix/util", + "nss/lib/libpkix/pkix_pl_nss/module", + "nss/lib/libpkix/pkix_pl_nss/pki", + "nss/lib/libpkix/pkix_pl_nss/system", + ] + } else { + defines += [ "NSS_DISABLE_LIBPKIX" ] + } + + if (!include_nss_root_certs) { + defines += [ "NSS_DISABLE_ROOT_CERTS" ] + } + + if (current_cpu == "x64" && !is_win) { + sources -= [ + "nss/lib/freebl/chacha20/chacha20.c", + "nss/lib/freebl/poly1305/poly1305.c", + ] + } else { + sources -= [ + "nss/lib/freebl/chacha20/chacha20_vec.c", + "nss/lib/freebl/poly1305/poly1305-donna-x64-sse2-incremental-source.c", + ] + } + + if (is_mac || is_ios) { + sources -= [ "nss/lib/freebl/mpi/mpi_amd64.c" ] + cflags += [ + "-include", + rebase_path("//third_party/nss/nss/lib/freebl/nss_build_config_mac.h", + root_build_dir), + ] + defines += [ + "XP_UNIX", + "DARWIN", + "HAVE_STRERROR", + "HAVE_BSD_FLOCK", + "SHLIB_SUFFIX=\"dylib\"", + "SHLIB_PREFIX=\"lib\"", + "SOFTOKEN_LIB_NAME=\"libsoftokn3.dylib\"", + ] + + configs -= [ "//build/config/gcc:symbol_visibility_hidden" ] + } else { + # Not Mac/iOS. + sources -= [ "nss/lib/freebl/mpi/mpi_arm_mac.c" ] + } + + if (is_win) { + defines += [ + "SHLIB_SUFFIX=\"dll\"", + "SHLIB_PREFIX=\"\"", + "SOFTOKEN_LIB_NAME=\"softokn3.dll\"", + "XP_PC", + "WIN32", + "WIN95", + ] + + if (current_cpu == "x86") { + defines += [ + "NSS_X86_OR_X64", + "NSS_X86", + "_X86_", + "MP_ASSEMBLY_MULTIPLY", + "MP_ASSEMBLY_SQUARE", + "MP_ASSEMBLY_DIV_2DX1D", + "MP_USE_UINT_DIGIT", + "MP_NO_MP_WORD", + "USE_HW_AES", + "INTEL_GCM", + ] + sources -= [ "nss/lib/freebl/mpi/mpi_amd64.c" ] + } else if (current_cpu == "x64") { + sources -= [ + "nss/lib/freebl/intel-aes-x86-masm.asm", + "nss/lib/freebl/mpi/mpi_amd64.c", + "nss/lib/freebl/mpi/mpi_x86_asm.c", + ] + defines += [ + "NSS_USE_64", + "NSS_X86_OR_X64", + "NSS_X64", + "_AMD64_", + "MP_CHAR_STORE_SLOW", + "MP_IS_LITTLE_ENDIAN", + "WIN64", + ] + } + } else { + # Not Windows. + sources -= [ + # mpi_x86_asm.c contains MSVC inline assembly code. + "nss/lib/freebl/mpi/mpi_x86_asm.c", + ] + } + + if (is_clang) { + cflags += [ + # nss doesn"t explicitly cast between different enum types. + "-Wno-conversion", + + # nss passes "const char*" through "void*". + "-Wno-incompatible-pointer-types", + + # nss prefers `a && b || c` over `(a && b) || c`. + "-Wno-logical-op-parentheses", + + # nss doesn"t use exhaustive switches on enums + "-Wno-switch", + + # nss has some `unsigned < 0` checks. + "-Wno-tautological-compare", + ] + } + + public_deps = [ ":nspr" ] + deps = [ + ":nspr", + "//third_party/sqlite", + ] + + if (is_win && current_cpu == "x86") { + deps += [ ":nss_static_avx" ] + } + } +} # Windows/Mac/iOS. diff --git a/build/secondary/third_party/ocmock/BUILD.gn b/build/secondary/third_party/ocmock/BUILD.gn new file mode 100644 index 0000000000000..66f2e49f30f8c --- /dev/null +++ b/build/secondary/third_party/ocmock/BUILD.gn @@ -0,0 +1,121 @@ +# Copyright 2013 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +ocmock_path = "//third_party/ocmock/Source" + +# OCMock headers use `#import `. +config("ocmock_config") { + include_dirs = [ "$ocmock_path" ] +} + +# Target that compiles all sources to .o files but does not produce a static +# library for use in macOS desktop tests. +source_set("ocmock_src") { + configs -= [ + "//build/config/compiler:chromium_code", + "//build/config/gcc:symbol_visibility_hidden", + "//build/config:symbol_visibility_hidden", + ] + all_dependent_configs = [ ":ocmock_config" ] + cflags = [ + "-fvisibility=default", + "-Wno-misleading-indentation", + ] + if (is_ios) { + cflags += [ "-mios-simulator-version-min=$ios_testing_deployment_target" ] + } + + sources = [ + "$ocmock_path/OCMock/NSInvocation+OCMAdditions.h", + "$ocmock_path/OCMock/NSInvocation+OCMAdditions.m", + "$ocmock_path/OCMock/NSMethodSignature+OCMAdditions.h", + "$ocmock_path/OCMock/NSMethodSignature+OCMAdditions.m", + "$ocmock_path/OCMock/NSNotificationCenter+OCMAdditions.h", + "$ocmock_path/OCMock/NSNotificationCenter+OCMAdditions.m", + "$ocmock_path/OCMock/NSObject+OCMAdditions.h", + "$ocmock_path/OCMock/NSObject+OCMAdditions.m", + "$ocmock_path/OCMock/NSValue+OCMAdditions.h", + "$ocmock_path/OCMock/NSValue+OCMAdditions.m", + "$ocmock_path/OCMock/OCClassMockObject.h", + "$ocmock_path/OCMock/OCClassMockObject.m", + "$ocmock_path/OCMock/OCMArg.h", + "$ocmock_path/OCMock/OCMArg.m", + "$ocmock_path/OCMock/OCMArgAction.h", + "$ocmock_path/OCMock/OCMArgAction.m", + "$ocmock_path/OCMock/OCMBlockArgCaller.h", + "$ocmock_path/OCMock/OCMBlockArgCaller.m", + "$ocmock_path/OCMock/OCMBlockCaller.h", + "$ocmock_path/OCMock/OCMBlockCaller.m", + "$ocmock_path/OCMock/OCMBoxedReturnValueProvider.h", + "$ocmock_path/OCMock/OCMBoxedReturnValueProvider.m", + "$ocmock_path/OCMock/OCMConstraint.h", + "$ocmock_path/OCMock/OCMConstraint.m", + "$ocmock_path/OCMock/OCMExceptionReturnValueProvider.h", + "$ocmock_path/OCMock/OCMExceptionReturnValueProvider.m", + "$ocmock_path/OCMock/OCMExpectationRecorder.h", + "$ocmock_path/OCMock/OCMExpectationRecorder.m", + "$ocmock_path/OCMock/OCMFunctions.h", + "$ocmock_path/OCMock/OCMFunctions.m", + "$ocmock_path/OCMock/OCMFunctionsPrivate.h", + "$ocmock_path/OCMock/OCMIndirectReturnValueProvider.h", + "$ocmock_path/OCMock/OCMIndirectReturnValueProvider.m", + "$ocmock_path/OCMock/OCMInvocationExpectation.h", + "$ocmock_path/OCMock/OCMInvocationExpectation.m", + "$ocmock_path/OCMock/OCMInvocationMatcher.h", + "$ocmock_path/OCMock/OCMInvocationMatcher.m", + "$ocmock_path/OCMock/OCMInvocationStub.h", + "$ocmock_path/OCMock/OCMInvocationStub.m", + "$ocmock_path/OCMock/OCMLocation.h", + "$ocmock_path/OCMock/OCMLocation.m", + "$ocmock_path/OCMock/OCMMacroState.h", + "$ocmock_path/OCMock/OCMMacroState.m", + "$ocmock_path/OCMock/OCMNonRetainingObjectReturnValueProvider.h", + "$ocmock_path/OCMock/OCMNonRetainingObjectReturnValueProvider.m", + "$ocmock_path/OCMock/OCMNotificationPoster.h", + "$ocmock_path/OCMock/OCMNotificationPoster.m", + "$ocmock_path/OCMock/OCMObjectReturnValueProvider.h", + "$ocmock_path/OCMock/OCMObjectReturnValueProvider.m", + "$ocmock_path/OCMock/OCMObserverRecorder.h", + "$ocmock_path/OCMock/OCMObserverRecorder.m", + "$ocmock_path/OCMock/OCMPassByRefSetter.h", + "$ocmock_path/OCMock/OCMPassByRefSetter.m", + "$ocmock_path/OCMock/OCMQuantifier.h", + "$ocmock_path/OCMock/OCMQuantifier.m", + "$ocmock_path/OCMock/OCMRealObjectForwarder.h", + "$ocmock_path/OCMock/OCMRealObjectForwarder.m", + "$ocmock_path/OCMock/OCMRecorder.h", + "$ocmock_path/OCMock/OCMRecorder.m", + "$ocmock_path/OCMock/OCMStubRecorder.h", + "$ocmock_path/OCMock/OCMStubRecorder.m", + "$ocmock_path/OCMock/OCMVerifier.h", + "$ocmock_path/OCMock/OCMVerifier.m", + "$ocmock_path/OCMock/OCMock.h", + "$ocmock_path/OCMock/OCMockObject.h", + "$ocmock_path/OCMock/OCMockObject.m", + "$ocmock_path/OCMock/OCObserverMockObject.h", + "$ocmock_path/OCMock/OCObserverMockObject.m", + "$ocmock_path/OCMock/OCPartialMockObject.h", + "$ocmock_path/OCMock/OCPartialMockObject.m", + "$ocmock_path/OCMock/OCProtocolMockObject.h", + "$ocmock_path/OCMock/OCProtocolMockObject.m", + ] + + frameworks = [ "Foundation.framework" ] +} + +shared_library("ocmock_shared") { + deps = [ ":ocmock_src" ] + cflags = [ "-fvisibility=default" ] + ldflags = [ "-Wl,-install_name,@rpath/Frameworks/libocmock_shared.dylib" ] +} + +# Generates a static library, used in iOS unit test targets +static_library("ocmock") { + # Force the static lib to include code from dependencies + complete_static_lib = true + if (is_ios) { + cflags = [ "-mios-simulator-version-min=$ios_testing_deployment_target" ] + } + public_deps = [ ":ocmock_src" ] +} diff --git a/build/secondary/third_party/pkg/quiver/BUILD.gn b/build/secondary/third_party/pkg/quiver/BUILD.gn new file mode 100644 index 0000000000000..8917550b30844 --- /dev/null +++ b/build/secondary/third_party/pkg/quiver/BUILD.gn @@ -0,0 +1,83 @@ +# Copyright 2021 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# TODO(flutter/flutter#85356): This file was originally generated by the +# fuchsia.git script: `package_importer.py`. The generated `BUILD.gn` files were +# copied to the flutter repo to support `dart_library` targets used for +# Flutter-Fuchsia integration tests. This file can be maintained by hand, but it +# would be better to implement a script for Flutter, to either generate these +# BUILD.gn files or dynamically generate the GN targets. + +import("//flutter/tools/fuchsia/dart/dart_library.gni") + +dart_library("quiver") { + package_name = "quiver" + + # The current version of this library is not null safe + language_version = "2.0" + + deps = [ + "//third_party/dart/pkg/meta", + "//third_party/dart/third_party/pkg/matcher", + ] + + sources = [ + "async.dart", + "cache.dart", + "check.dart", + "collection.dart", + "core.dart", + "io.dart", + "iterables.dart", + "mirrors.dart", + "pattern.dart", + "src/async/collect.dart", + "src/async/concat.dart", + "src/async/countdown_timer.dart", + "src/async/enumerate.dart", + "src/async/future_stream.dart", + "src/async/iteration.dart", + "src/async/metronome.dart", + "src/async/stream_buffer.dart", + "src/async/stream_router.dart", + "src/async/string.dart", + "src/cache/cache.dart", + "src/cache/map_cache.dart", + "src/collection/bimap.dart", + "src/collection/delegates/iterable.dart", + "src/collection/delegates/list.dart", + "src/collection/delegates/map.dart", + "src/collection/delegates/queue.dart", + "src/collection/delegates/set.dart", + "src/collection/lru_map.dart", + "src/collection/multimap.dart", + "src/collection/treeset.dart", + "src/core/hash.dart", + "src/core/optional.dart", + "src/iterables/concat.dart", + "src/iterables/count.dart", + "src/iterables/cycle.dart", + "src/iterables/enumerate.dart", + "src/iterables/generating_iterable.dart", + "src/iterables/infinite_iterable.dart", + "src/iterables/merge.dart", + "src/iterables/min_max.dart", + "src/iterables/partition.dart", + "src/iterables/range.dart", + "src/iterables/zip.dart", + "src/time/clock.dart", + "src/time/duration_unit_constants.dart", + "src/time/util.dart", + "strings.dart", + "testing/async.dart", + "testing/equality.dart", + "testing/runtime.dart", + "testing/src/async/fake_async.dart", + "testing/src/equality/equality.dart", + "testing/src/runtime/checked_mode.dart", + "testing/src/time/time.dart", + "testing/time.dart", + "time.dart", + ] +} diff --git a/build/secondary/third_party/shaderc_flutter/BUILD.gn b/build/secondary/third_party/shaderc_flutter/BUILD.gn new file mode 100644 index 0000000000000..ec41f7ac753db --- /dev/null +++ b/build/secondary/third_party/shaderc_flutter/BUILD.gn @@ -0,0 +1,83 @@ +# Copyright 2013 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +shaderc_base = "//third_party/shaderc" + +config("shaderc_util_config") { + include_dirs = [ "$shaderc_base/libshaderc_util/include/" ] +} + +source_set("shaderc_util_flutter") { + public_configs = [ ":shaderc_util_config" ] + + configs += + [ "//third_party/vulkan-deps/spirv-tools/src:spvtools_public_config" ] + + public_deps = [ + "//third_party/vulkan-deps/glslang/src:glslang_sources", + "//third_party/vulkan-deps/spirv-tools/src:spvtools", + ] + + defines = [ "ENABLE_HLSL=1" ] + + if (is_clang) { + cflags_cc = [ + "-Wno-deprecated-copy", + "-Wno-unknown-warning-option", + ] + } + + sources = [ + "$shaderc_base/libshaderc_util/include/libshaderc_util/counting_includer.h", + "$shaderc_base/libshaderc_util/include/libshaderc_util/exceptions.h", + "$shaderc_base/libshaderc_util/include/libshaderc_util/file_finder.h", + "$shaderc_base/libshaderc_util/include/libshaderc_util/format.h", + "$shaderc_base/libshaderc_util/include/libshaderc_util/io_shaderc.h", + "$shaderc_base/libshaderc_util/include/libshaderc_util/message.h", + "$shaderc_base/libshaderc_util/include/libshaderc_util/mutex.h", + "$shaderc_base/libshaderc_util/include/libshaderc_util/resources.h", + "$shaderc_base/libshaderc_util/include/libshaderc_util/spirv_tools_wrapper.h", + "$shaderc_base/libshaderc_util/include/libshaderc_util/string_piece.h", + "$shaderc_base/libshaderc_util/include/libshaderc_util/universal_unistd.h", + "$shaderc_base/libshaderc_util/include/libshaderc_util/version_profile.h", + "$shaderc_base/libshaderc_util/src/compiler.cc", + "$shaderc_base/libshaderc_util/src/file_finder.cc", + "$shaderc_base/libshaderc_util/src/io_shaderc.cc", + "$shaderc_base/libshaderc_util/src/message.cc", + "$shaderc_base/libshaderc_util/src/resources.cc", + "$shaderc_base/libshaderc_util/src/shader_stage.cc", + "$shaderc_base/libshaderc_util/src/spirv_tools_wrapper.cc", + "$shaderc_base/libshaderc_util/src/version_profile.cc", + ] +} + +config("shaderc_config") { + include_dirs = [ "$shaderc_base/libshaderc/include/" ] +} + +source_set("shaderc_flutter") { + defines = [ "SHADERC_IMPLEMENTATION" ] + + public_configs = [ ":shaderc_config" ] + + configs += + [ "//third_party/vulkan-deps/spirv-tools/src:spvtools_public_config" ] + + deps = [ ":shaderc_util_flutter" ] + + public_deps = [ + "//third_party/vulkan-deps/glslang/src:glslang_sources", + "//third_party/vulkan-deps/spirv-tools/src:spvtools", + ] + + sources = [ + "$shaderc_base/libshaderc/include/shaderc/env.h", + "$shaderc_base/libshaderc/include/shaderc/shaderc.h", + "$shaderc_base/libshaderc/include/shaderc/shaderc.hpp", + "$shaderc_base/libshaderc/include/shaderc/status.h", + "$shaderc_base/libshaderc/include/shaderc/visibility.h", + "$shaderc_base/libshaderc/src/shaderc.cc", + "$shaderc_base/libshaderc/src/shaderc_private.h", + ] +} diff --git a/build/secondary/third_party/spirv_cross_flutter/BUILD.gn b/build/secondary/third_party/spirv_cross_flutter/BUILD.gn new file mode 100644 index 0000000000000..2429fefe6bed3 --- /dev/null +++ b/build/secondary/third_party/spirv_cross_flutter/BUILD.gn @@ -0,0 +1,41 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +source_root = "//third_party/vulkan-deps/spirv-cross/src" + +config("spirv_cross_public") { + include_dirs = [ source_root ] + + defines = [ "SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS" ] +} + +source_set("spirv_cross_flutter") { + public_configs = [ ":spirv_cross_public" ] + + sources = [ + "$source_root/GLSL.std.450.h", + "$source_root/spirv.hpp", + "$source_root/spirv_cfg.cpp", + "$source_root/spirv_cfg.hpp", + "$source_root/spirv_common.hpp", + "$source_root/spirv_cross.cpp", + "$source_root/spirv_cross.hpp", + "$source_root/spirv_cross_containers.hpp", + "$source_root/spirv_cross_error_handling.hpp", + "$source_root/spirv_cross_parsed_ir.cpp", + "$source_root/spirv_cross_parsed_ir.hpp", + "$source_root/spirv_cross_util.cpp", + "$source_root/spirv_cross_util.hpp", + "$source_root/spirv_glsl.cpp", + "$source_root/spirv_glsl.hpp", + "$source_root/spirv_hlsl.cpp", + "$source_root/spirv_hlsl.hpp", + "$source_root/spirv_msl.cpp", + "$source_root/spirv_msl.hpp", + "$source_root/spirv_parser.cpp", + "$source_root/spirv_parser.hpp", + "$source_root/spirv_reflect.cpp", + "$source_root/spirv_reflect.hpp", + ] +} diff --git a/build/secondary/third_party/stb/BUILD.gn b/build/secondary/third_party/stb/BUILD.gn new file mode 100644 index 0000000000000..68be14ffb5d40 --- /dev/null +++ b/build/secondary/third_party/stb/BUILD.gn @@ -0,0 +1,15 @@ +# Copyright 2013 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +source_root = "//third_party/stb" + +source_set("stb_truetype") { + testonly = true + + public = [ "$source_root/stb_truetype.h" ] + + include_dirs = [ "$source_root" ] + + sources = [ "//flutter/build/secondary/third_party/stb/stb_truetype_stub.cc" ] +} diff --git a/build/secondary/third_party/stb/stb_truetype_stub.cc b/build/secondary/third_party/stb/stb_truetype_stub.cc new file mode 100644 index 0000000000000..eaca9020be07c --- /dev/null +++ b/build/secondary/third_party/stb/stb_truetype_stub.cc @@ -0,0 +1,6 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#define STB_TRUETYPE_IMPLEMENTATION +#include "third_party/stb/stb_truetype.h" diff --git a/build/secondary/third_party/tinygltf/BUILD.gn b/build/secondary/third_party/tinygltf/BUILD.gn new file mode 100644 index 0000000000000..d5f6b6cfff4b7 --- /dev/null +++ b/build/secondary/third_party/tinygltf/BUILD.gn @@ -0,0 +1,23 @@ +# Copyright 2013 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +source_root = "//third_party/tinygltf" + +source_set("tinygltf") { + public = [ "$source_root/tiny_gltf.h" ] + + if (is_clang) { + cflags_cc = [ "-Wno-sign-compare" ] + } + + include_dirs = [ + "$source_root", + "$source_root/third_party/include", + ] + + sources = + [ "//flutter/build/secondary/third_party/tinygltf/tinygltf_stub.cc" ] + + deps = [ "//third_party/json" ] +} diff --git a/build/secondary/third_party/tinygltf/tinygltf_stub.cc b/build/secondary/third_party/tinygltf/tinygltf_stub.cc new file mode 100644 index 0000000000000..88e369d44f5d5 --- /dev/null +++ b/build/secondary/third_party/tinygltf/tinygltf_stub.cc @@ -0,0 +1,11 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "nlohmann/json.hpp" + +#define TINYGLTF_IMPLEMENTATION +#define TINYGLTF_NO_INCLUDE_JSON +#define STB_IMAGE_IMPLEMENTATION +#define STB_IMAGE_WRITE_IMPLEMENTATION +#include "third_party/tinygltf/tiny_gltf.h" diff --git a/build/secondary/third_party/vulkan_memory_allocator/BUILD.gn b/build/secondary/third_party/vulkan_memory_allocator/BUILD.gn new file mode 100644 index 0000000000000..8d4587d91306e --- /dev/null +++ b/build/secondary/third_party/vulkan_memory_allocator/BUILD.gn @@ -0,0 +1,40 @@ +# Copyright 2020 The ANGLE Project Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# +# Custom GN integration for VulkanMemoryAllocator. + +declare_args() { + vma_vulkan_headers_dir = "//third_party/vulkan-deps/vulkan-headers/src" +} + +config("vulkan_memory_allocator_config") { + include_dirs = [ "include" ] + if (is_clang) { + cflags_cc = [ + "-Wno-c++98-compat-extra-semi", + "-Wno-deprecated-copy", + "-Wno-implicit-fallthrough", + "-Wno-nullability-completeness", + "-Wno-suggest-destructor-override", + "-Wno-suggest-override", + "-Wno-unused-private-field", + "-Wno-unused-variable", + ] + } + if (is_win && !is_clang) { + cflags_cc = [ + "/wd4189", # local variable is initialized but not referenced + ] + } + defines = [ + "VMA_DYNAMIC_VULKAN_FUNCTIONS=0", + "VMA_STATIC_VULKAN_FUNCTIONS=0", + ] +} + +source_set("vulkan_memory_allocator") { + sources = [ "include/vk_mem_alloc.h" ] + deps = [ "${vma_vulkan_headers_dir}:vulkan_headers" ] + public_configs = [ ":vulkan_memory_allocator_config" ] +} diff --git a/build/secondary/third_party/vulkan_validation_layers/BUILD.gn b/build/secondary/third_party/vulkan_validation_layers/BUILD.gn new file mode 100644 index 0000000000000..688ba45fda98e --- /dev/null +++ b/build/secondary/third_party/vulkan_validation_layers/BUILD.gn @@ -0,0 +1,493 @@ +# Copyright 2013 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +################################################################################ +# This is a temporary secondary build file until the rtti issue is solved +# in vulkan-deps +################################################################################ + +import("//build_overrides/vulkan_validation_layers.gni") + +_checkout_dir = "//third_party/vulkan-deps/vulkan-validation-layers/src" + +vulkan_undefine_configs = [] +if (is_win) { + vulkan_undefine_configs += [ "//build/config/win:unicode" ] +} + +vulkan_gen_dir = "$target_gen_dir/$vulkan_gen_subdir" +raw_vulkan_gen_dir = rebase_path(vulkan_gen_dir, root_build_dir) + +vulkan_data_dir = "$root_out_dir/$vulkan_data_subdir" +raw_vulkan_data_dir = rebase_path(vulkan_data_dir, root_build_dir) + +raw_root_out_dir = rebase_path(root_out_dir, root_build_dir) + +# This special action is needed to remove old VVL objects that are now renamed. +action("vulkan_clean_old_validation_layer_objects") { + script = "$_checkout_dir/build-gn/remove_files.py" + + # inputs is a (random) new file since the vvl roll, used to ensure the cleanup is done only once + inputs = [ "$_checkout_dir/layers/gpu_validation/gpu_validation.cpp" ] + outputs = [ "$vulkan_gen_dir/old_vvl_files_are_removed" ] + args = [ + "$raw_vulkan_gen_dir/old_vvl_files_are_removed", + "$raw_root_out_dir/libVkLayer*", + "$raw_root_out_dir/VkLayer*", + "$raw_vulkan_data_dir/VkLayer*.json", + ] +} + +config("generated_layers_config") { + if (is_clang) { + cflags = [ + "-Wno-conversion", + "-Wno-deprecated-copy", + "-Wno-extra-semi", + "-Wno-implicit-fallthrough", + "-Wno-missing-field-initializers", + "-Wno-newline-eof", + "-Wno-sign-compare", + "-Wno-unused-const-variable", + ] + } +} + +config("vulkan_internal_config") { + defines = [ + "VULKAN_NON_CMAKE_BUILD", + "VK_ENABLE_BETA_EXTENSIONS", + ] + + if (!is_win) { + cflags_cc = [ "-std=c++17" ] + } else { + cflags_cc = [ "/std:c++17" ] + } + + cflags = [] + if (is_clang || !is_win) { + cflags += [ "-Wno-unused-function" ] + } + if (is_clang && is_mac) { + cflags += [ "-Wno-unguarded-availability-new" ] + } + if (is_linux) { + defines += [ + "SYSCONFDIR=\"/etc\"", + "FALLBACK_CONFIG_DIRS=\"/etc/xdg\"", + "FALLBACK_DATA_DIRS=\"/usr/local/share:/usr/share\"", + ] + } + + # Suppress warnings the vulkan code doesn't comply with. + if (is_fuchsia) { + configs = [ "//build/config:Wno-unused-but-set-variable" ] + } + if (is_clang) { + cflags += [ "-Wno-extra-semi" ] + } +} + +# The validation layers +# --------------------- + +config("vulkan_layer_config") { + include_dirs = [ + "$_checkout_dir/layers", + "$_checkout_dir/layers/external", + "$_checkout_dir/layers/generated", + ] + if (is_clang) { + cflags = [ "-Wno-extra-semi" ] + } +} + +core_validation_sources = [ + "$_checkout_dir/layers/containers/qfo_transfer.h", + "$_checkout_dir/layers/containers/range_vector.h", + "$_checkout_dir/layers/containers/subresource_adapter.cpp", + "$_checkout_dir/layers/containers/subresource_adapter.h", + "$_checkout_dir/layers/core_checks/cc_android.cpp", + "$_checkout_dir/layers/core_checks/cc_buffer.cpp", + "$_checkout_dir/layers/core_checks/cc_buffer_address.h", + "$_checkout_dir/layers/core_checks/cc_cmd_buffer.cpp", + "$_checkout_dir/layers/core_checks/cc_cmd_buffer_dynamic.cpp", + "$_checkout_dir/layers/core_checks/cc_copy_blit_resolve.cpp", + "$_checkout_dir/layers/core_checks/cc_descriptor.cpp", + "$_checkout_dir/layers/core_checks/cc_device.cpp", + "$_checkout_dir/layers/core_checks/cc_device_memory.cpp", + "$_checkout_dir/layers/core_checks/cc_drawdispatch.cpp", + "$_checkout_dir/layers/core_checks/cc_external_object.cpp", + "$_checkout_dir/layers/core_checks/cc_image.cpp", + "$_checkout_dir/layers/core_checks/cc_image_layout.cpp", + "$_checkout_dir/layers/core_checks/cc_pipeline.cpp", + "$_checkout_dir/layers/core_checks/cc_pipeline_compute.cpp", + "$_checkout_dir/layers/core_checks/cc_pipeline_graphics.cpp", + "$_checkout_dir/layers/core_checks/cc_pipeline_ray_tracing.cpp", + "$_checkout_dir/layers/core_checks/cc_query.cpp", + "$_checkout_dir/layers/core_checks/cc_queue.cpp", + "$_checkout_dir/layers/core_checks/cc_ray_tracing.cpp", + "$_checkout_dir/layers/core_checks/cc_render_pass.cpp", + "$_checkout_dir/layers/core_checks/cc_shader.cpp", + "$_checkout_dir/layers/core_checks/cc_shader.h", + "$_checkout_dir/layers/core_checks/cc_synchronization.cpp", + "$_checkout_dir/layers/core_checks/cc_video.cpp", + "$_checkout_dir/layers/core_checks/cc_wsi.cpp", + "$_checkout_dir/layers/core_checks/cc_ycbcr.cpp", + "$_checkout_dir/layers/core_checks/core_validation.h", + "$_checkout_dir/layers/error_message/core_error_location.cpp", + "$_checkout_dir/layers/error_message/core_error_location.h", + "$_checkout_dir/layers/error_message/validation_error_enums.h", + "$_checkout_dir/layers/external/vma/vk_mem_alloc.h", + "$_checkout_dir/layers/external/vma/vma.cpp", + "$_checkout_dir/layers/external/vma/vma.h", + "$_checkout_dir/layers/generated/command_validation.cpp", + "$_checkout_dir/layers/generated/command_validation.h", + "$_checkout_dir/layers/generated/gpu_as_inspection_comp.h", + "$_checkout_dir/layers/generated/gpu_pre_dispatch_comp.h", + "$_checkout_dir/layers/generated/gpu_pre_draw_vert.h", + "$_checkout_dir/layers/generated/spirv_grammar_helper.cpp", + "$_checkout_dir/layers/generated/spirv_grammar_helper.h", + "$_checkout_dir/layers/generated/spirv_validation_helper.cpp", + "$_checkout_dir/layers/generated/sync_validation_types.cpp", + "$_checkout_dir/layers/generated/sync_validation_types.h", + "$_checkout_dir/layers/gpu_shaders/gpu_shaders_constants.h", + "$_checkout_dir/layers/gpu_validation/gpu_utils.cpp", + "$_checkout_dir/layers/gpu_validation/gpu_utils.h", + "$_checkout_dir/layers/gpu_validation/gpu_validation.cpp", + "$_checkout_dir/layers/gpu_validation/gpu_validation.h", + "$_checkout_dir/layers/gpu_validation/gpu_vuids.h", + "$_checkout_dir/layers/state_tracker/base_node.cpp", + "$_checkout_dir/layers/state_tracker/base_node.h", + "$_checkout_dir/layers/state_tracker/buffer_state.cpp", + "$_checkout_dir/layers/state_tracker/buffer_state.h", + "$_checkout_dir/layers/state_tracker/cmd_buffer_state.cpp", + "$_checkout_dir/layers/state_tracker/cmd_buffer_state.h", + "$_checkout_dir/layers/state_tracker/descriptor_sets.cpp", + "$_checkout_dir/layers/state_tracker/descriptor_sets.h", + "$_checkout_dir/layers/state_tracker/device_memory_state.cpp", + "$_checkout_dir/layers/state_tracker/device_memory_state.h", + "$_checkout_dir/layers/state_tracker/device_state.h", + "$_checkout_dir/layers/state_tracker/image_layout_map.cpp", + "$_checkout_dir/layers/state_tracker/image_layout_map.h", + "$_checkout_dir/layers/state_tracker/image_state.cpp", + "$_checkout_dir/layers/state_tracker/image_state.h", + "$_checkout_dir/layers/state_tracker/pipeline_layout_state.cpp", + "$_checkout_dir/layers/state_tracker/pipeline_layout_state.h", + "$_checkout_dir/layers/state_tracker/pipeline_state.cpp", + "$_checkout_dir/layers/state_tracker/pipeline_state.h", + "$_checkout_dir/layers/state_tracker/pipeline_sub_state.cpp", + "$_checkout_dir/layers/state_tracker/pipeline_sub_state.h", + "$_checkout_dir/layers/state_tracker/query_state.h", + "$_checkout_dir/layers/state_tracker/queue_state.cpp", + "$_checkout_dir/layers/state_tracker/queue_state.h", + "$_checkout_dir/layers/state_tracker/ray_tracing_state.h", + "$_checkout_dir/layers/state_tracker/render_pass_state.cpp", + "$_checkout_dir/layers/state_tracker/render_pass_state.h", + "$_checkout_dir/layers/state_tracker/sampler_state.h", + "$_checkout_dir/layers/state_tracker/shader_instruction.cpp", + "$_checkout_dir/layers/state_tracker/shader_instruction.h", + "$_checkout_dir/layers/state_tracker/shader_module.cpp", + "$_checkout_dir/layers/state_tracker/shader_module.h", + "$_checkout_dir/layers/state_tracker/state_tracker.cpp", + "$_checkout_dir/layers/state_tracker/state_tracker.h", + "$_checkout_dir/layers/state_tracker/video_session_state.cpp", + "$_checkout_dir/layers/state_tracker/video_session_state.h", + "$_checkout_dir/layers/sync/sync_utils.cpp", + "$_checkout_dir/layers/sync/sync_utils.h", + "$_checkout_dir/layers/sync/sync_validation.cpp", + "$_checkout_dir/layers/sync/sync_validation.h", + "$_checkout_dir/layers/sync/sync_vuid_maps.cpp", + "$_checkout_dir/layers/sync/sync_vuid_maps.h", + "$_checkout_dir/layers/utils/android_ndk_types.h", + "$_checkout_dir/layers/utils/convert_to_renderpass2.cpp", + "$_checkout_dir/layers/utils/convert_to_renderpass2.h", +] + +object_lifetimes_sources = [ + "$_checkout_dir/layers/generated/object_tracker.cpp", + "$_checkout_dir/layers/generated/object_tracker.h", + "$_checkout_dir/layers/object_tracker/object_lifetime_validation.h", + "$_checkout_dir/layers/object_tracker/object_tracker_utils.cpp", +] + +stateless_validation_sources = [ + "$_checkout_dir/layers/generated/enum_flag_bits.h", + "$_checkout_dir/layers/generated/parameter_validation.cpp", + "$_checkout_dir/layers/generated/parameter_validation.h", + "$_checkout_dir/layers/stateless/parameter_name.h", + "$_checkout_dir/layers/stateless/sl_buffer.cpp", + "$_checkout_dir/layers/stateless/sl_cmd_buffer.cpp", + "$_checkout_dir/layers/stateless/sl_cmd_buffer_dynamic.cpp", + "$_checkout_dir/layers/stateless/sl_descriptor.cpp", + "$_checkout_dir/layers/stateless/sl_device_memory.cpp", + "$_checkout_dir/layers/stateless/sl_external_object.cpp", + "$_checkout_dir/layers/stateless/sl_framebuffer.cpp", + "$_checkout_dir/layers/stateless/sl_image.cpp", + "$_checkout_dir/layers/stateless/sl_instance_device.cpp", + "$_checkout_dir/layers/stateless/sl_pipeline.cpp", + "$_checkout_dir/layers/stateless/sl_ray_tracing.cpp", + "$_checkout_dir/layers/stateless/sl_render_pass.cpp", + "$_checkout_dir/layers/stateless/sl_synchronization.cpp", + "$_checkout_dir/layers/stateless/sl_wsi.cpp", + "$_checkout_dir/layers/stateless/stateless_validation.h", +] + +thread_safety_sources = [ + "$_checkout_dir/layers/generated/thread_safety.cpp", + "$_checkout_dir/layers/generated/thread_safety.h", +] + +unique_objects_sources = [] + +best_practices_sources = [ + "$_checkout_dir/layers/best_practices/best_practices_error_enums.h", + "$_checkout_dir/layers/best_practices/best_practices_utils.cpp", + "$_checkout_dir/layers/best_practices/best_practices_validation.h", + "$_checkout_dir/layers/best_practices/bp_buffer.cpp", + "$_checkout_dir/layers/best_practices/bp_cmd_buffer.cpp", + "$_checkout_dir/layers/best_practices/bp_copy_blit_resolve.cpp", + "$_checkout_dir/layers/best_practices/bp_descriptor.cpp", + "$_checkout_dir/layers/best_practices/bp_device_memory.cpp", + "$_checkout_dir/layers/best_practices/bp_drawdispatch.cpp", + "$_checkout_dir/layers/best_practices/bp_framebuffer.cpp", + "$_checkout_dir/layers/best_practices/bp_image.cpp", + "$_checkout_dir/layers/best_practices/bp_instance_device.cpp", + "$_checkout_dir/layers/best_practices/bp_pipeline.cpp", + "$_checkout_dir/layers/best_practices/bp_ray_tracing.cpp", + "$_checkout_dir/layers/best_practices/bp_render_pass.cpp", + "$_checkout_dir/layers/best_practices/bp_synchronization.cpp", + "$_checkout_dir/layers/best_practices/bp_video.cpp", + "$_checkout_dir/layers/best_practices/bp_wsi.cpp", + "$_checkout_dir/layers/generated/best_practices.cpp", + "$_checkout_dir/layers/generated/best_practices.h", +] + +debug_printf_sources = [ + "$_checkout_dir/layers/gpu_validation/debug_printf.cpp", + "$_checkout_dir/layers/gpu_validation/debug_printf.h", +] + +chassis_sources = [ + "$_checkout_dir/layers/generated/chassis.cpp", + "$_checkout_dir/layers/generated/chassis.h", + "$_checkout_dir/layers/generated/chassis_dispatch_helper.h", + "$_checkout_dir/layers/generated/layer_chassis_dispatch.cpp", + "$_checkout_dir/layers/generated/layer_chassis_dispatch.h", + "$_checkout_dir/layers/generated/valid_param_values.cpp", + "$_checkout_dir/layers/generated/valid_param_values.h", + "$_checkout_dir/layers/generated/vk_dispatch_table_helper.h", + "$_checkout_dir/layers/generated/vk_extension_helper.h", + "$_checkout_dir/layers/generated/vk_safe_struct.cpp", + "$_checkout_dir/layers/layer_options.cpp", + "$_checkout_dir/layers/layer_options.h", + "$_checkout_dir/layers/vk_layer_settings_ext.h", + "$vulkan_headers_dir/include/vulkan/vk_layer.h", + "$vulkan_headers_dir/include/vulkan/vulkan.h", +] + +layers = [ [ + "khronos_validation", + core_validation_sources + object_lifetimes_sources + + stateless_validation_sources + thread_safety_sources + + unique_objects_sources + best_practices_sources + + debug_printf_sources + chassis_sources, + [ ":vulkan_core_validation_glslang" ], + [], + ] ] + +if (!is_android) { + action("vulkan_gen_json_files") { + script = "$_checkout_dir/build-gn/generate_vulkan_layers_json.py" + + deps = [ "$vulkan_headers_dir:vulkan_headers" ] + if (!is_fuchsia) { + # Make sure that the cleanup of old layer JSON files happens before the new ones are generated. + deps += [ ":vulkan_clean_old_validation_layer_objects" ] + } + + sources = [ "$_checkout_dir/layers/VkLayer_khronos_validation.json.in" ] + outputs = [ "$vulkan_data_dir/VkLayer_khronos_validation.json" ] + + if (is_linux) { + _platform = "Linux" + } else if (is_win) { + _platform = "Windows" + } else if (is_mac) { + _platform = "Darwin" + } else if (is_fuchsia) { + _platform = "Fuchsia" + } else { + _platform = "Other" + } + + args = [ + "--platform", + _platform, + rebase_path("$_checkout_dir/layers/", root_build_dir), + rebase_path(vulkan_data_dir, root_build_dir), + ] + rebase_path(sources, root_build_dir) + if (is_fuchsia) { + args += [ "--no-path-prefix" ] + } + + # The layer JSON files are part of the necessary data deps. + data = outputs + } +} + +config("vulkan_memory_allocator_config") { + if (is_clang) { + cflags_cc = [ "-Wno-nullability-completeness" ] + } +} + +source_set("vulkan_layer_utils") { + include_dirs = [ + "$_checkout_dir/layers", + "$_checkout_dir/layers/external", + "$_checkout_dir/layers/generated", + ] + sources = [ + "$_checkout_dir/layers/containers/custom_containers.h", + "$_checkout_dir/layers/containers/sparse_containers.h", + "$_checkout_dir/layers/error_message/logging.cpp", + "$_checkout_dir/layers/error_message/logging.h", + "$_checkout_dir/layers/external/xxhash.cpp", + "$_checkout_dir/layers/external/xxhash.h", + "$_checkout_dir/layers/generated/vk_enum_string_helper.h", + "$_checkout_dir/layers/generated/vk_extension_helper.h", + "$_checkout_dir/layers/generated/vk_format_utils.cpp", + "$_checkout_dir/layers/generated/vk_format_utils.h", + "$_checkout_dir/layers/generated/vk_layer_dispatch_table.h", + "$_checkout_dir/layers/generated/vk_object_types.h", + "$_checkout_dir/layers/generated/vk_safe_struct.h", + "$_checkout_dir/layers/generated/vk_typemap_helper.h", + "$_checkout_dir/layers/generated/vk_validation_error_messages.h", + "$_checkout_dir/layers/utils/android_ndk_types.h", + "$_checkout_dir/layers/utils/cast_utils.h", + "$_checkout_dir/layers/utils/hash_util.h", + "$_checkout_dir/layers/utils/hash_vk_types.h", + "$_checkout_dir/layers/utils/vk_layer_extension_utils.cpp", + "$_checkout_dir/layers/utils/vk_layer_extension_utils.h", + "$_checkout_dir/layers/utils/vk_layer_utils.cpp", + "$_checkout_dir/layers/utils/vk_layer_utils.h", + "$_checkout_dir/layers/vk_layer_config.cpp", + "$_checkout_dir/layers/vk_layer_config.h", + "$vulkan_headers_dir/include/vulkan/vk_layer.h", + "$vulkan_headers_dir/include/vulkan/vulkan.h", + ] + defines = [ "XXH_NO_LONG_LONG" ] + public_configs = [ + ":vulkan_internal_config", + ":vulkan_memory_allocator_config", + ] + public_deps = [ "$vulkan_headers_dir:vulkan_headers" ] + + configs -= vulkan_undefine_configs + if (!is_fuchsia) { + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + } +} + +config("vulkan_core_validation_config") { + include_dirs = [ "$vvl_glslang_dir" ] +} + +source_set("vulkan_core_validation_glslang") { + public_deps = [ + "${vvl_spirv_tools_dir}:spvtools", + "${vvl_spirv_tools_dir}:spvtools_opt", + "${vvl_spirv_tools_dir}:spvtools_val", + ] + public_configs = [ + "$vulkan_headers_dir:vulkan_headers_config", + ":vulkan_core_validation_config", + ] +} + +config("vulkan_stateless_validation_config") { + if (is_clang) { + cflags_cc = [ "-Wno-unused-const-variable" ] + } +} + +if (is_fuchsia) { + library_type = "loadable_module" +} else { + library_type = "shared_library" +} + +foreach(layer_info, layers) { + name = layer_info[0] + target(library_type, "VkLayer_$name") { + defines = [] + ldflags = [] + if (is_fuchsia) { + configs -= [ "//build/config:thread_safety_annotations" ] + ldflags += [ "-static-libstdc++" ] + configs += [ "//build/config:rtti" ] + } else { + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + + # The following line is what has to change to fix chromium compilation. + configs -= [ "//build/config/compiler:no_rtti" ] + configs += [ "//build/config/compiler:rtti" ] + } + configs -= vulkan_undefine_configs + configs += [ ":generated_layers_config" ] + public_configs = [ ":vulkan_layer_config" ] + deps = [ ":vulkan_layer_utils" ] + if (!is_fuchsia) { + deps += [ + # Make sure the cleanup of old layers happen before the new ones are compiled. + ":vulkan_clean_old_validation_layer_objects", + ] + } + if (layer_info[2] != "") { + deps += layer_info[2] + } + sources = layer_info[1] + if (is_win) { + defines += [ "NOMINMAX" ] + sources += [ "$_checkout_dir/layers/VkLayer_$name.def" ] + } + if (is_linux || is_android || is_fuchsia) { + ldflags += [ "-Wl,-Bsymbolic,--exclude-libs,ALL" ] + } + if (defined(ozone_platform_x11) && ozone_platform_x11) { + defines += [ "VK_USE_PLATFORM_XLIB_KHR" ] + } + if (is_android) { + libs = [ + "c++", # Note: C++ added by Flutter. + "log", + "nativewindow", + ] + # Note: config edit removed by Flutter + # configs -= [ "//build/config/android:hide_all_but_jni_onload" ] + } + defines += layer_info[3] + } +} + +group("vulkan_validation_layers") { + public_deps = [] + data_deps = [] + foreach(layer_info, layers) { + name = layer_info[0] + if (is_fuchsia) { + public_deps += [ ":VkLayer_$name" ] + } else { + data_deps += [ ":VkLayer_$name" ] + } + } +} + +group("tests") { + # TODO(fxbug.dev/13288) +} diff --git a/build/secondary/third_party/wuffs/BUILD.gn b/build/secondary/third_party/wuffs/BUILD.gn new file mode 100644 index 0000000000000..a78200b1e8feb --- /dev/null +++ b/build/secondary/third_party/wuffs/BUILD.gn @@ -0,0 +1,59 @@ +# Copyright 2013 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +config("wuffs_public") { + include_dirs = [ "release/c" ] + + cflags = [] + + if (is_clang) { + cflags += [ + "-Wno-unused-function", + "-Wno-c++11-narrowing", + ] + } +} + +source_set("wuffs") { + public_configs = [ ":wuffs_public" ] + + defines = [ + # Copy/pasting from "../externals/wuffs/release/c/wuffs-*.c": + # + # ---- + # + # Wuffs ships as a "single file C library" or "header file library" as per + # https://github.com/nothings/stb/blob/master/docs/stb_howto.txt + # + # To use that single file as a "foo.c"-like implementation, instead of a + # "foo.h"-like header, #define WUFFS_IMPLEMENTATION before #include'ing or + # compiling it. + # + # ---- + "WUFFS_IMPLEMENTATION", + + # Continuing to copy/paste: + # + # ---- + # + # Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users + # of Wuffs' .c file explicitly include which parts of Wuffs to build. That + # file contains the entire Wuffs standard library, implementing a variety of + # codecs and file formats. Without this macro definition, an optimizing + # compiler or linker may very well discard Wuffs code for unused codecs, + # but listing the Wuffs modules we use makes that process explicit. + # Preprocessing means that such code simply isn't compiled. + # + # ---- + # + # For Skia, we're only interested in particular image codes (e.g. GIF) and + # their dependencies (e.g. BASE, LZW). + "WUFFS_CONFIG__MODULES", + "WUFFS_CONFIG__MODULE__BASE", + "WUFFS_CONFIG__MODULE__GIF", + "WUFFS_CONFIG__MODULE__LZW", + ] + + sources = [ "release/c/wuffs-v0.3.c" ] +} diff --git a/ci/pylint.sh b/ci/pylint.sh index a3e3422152b00..e94f5248cb8e6 100755 --- a/ci/pylint.sh +++ b/ci/pylint.sh @@ -34,7 +34,6 @@ echo "$(date +%T) Running pylint" cd "$FLUTTER_DIR" pylint-2.7 --rcfile=.pylintrc \ - "build/" \ "ci/" \ "impeller/" \ "sky/" \ From cd22fccb651b8198a158a448cd38d029df82d179 Mon Sep 17 00:00:00 2001 From: gaaclarke <30870216+gaaclarke@users.noreply.github.com> Date: Tue, 17 Oct 2023 10:23:29 -0700 Subject: [PATCH 714/859] [Impeller] added trace statements for colorsources (#47007) helped debug https://github.com/orgs/flutter/projects/21/views/1?pane=issue&itemId=41416077 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- impeller/aiks/trace_serializer.cc | 34 ++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/impeller/aiks/trace_serializer.cc b/impeller/aiks/trace_serializer.cc index e3f87c8eea3dd..c70fd23f329ba 100644 --- a/impeller/aiks/trace_serializer.cc +++ b/impeller/aiks/trace_serializer.cc @@ -51,11 +51,43 @@ std::ostream& operator<<(std::ostream& os, return os; } +std::ostream& operator<<(std::ostream& os, const ColorSource& color_source) { + os << "{ type: "; + switch (color_source.GetType()) { + case ColorSource::Type::kColor: + os << "kColor"; + break; + case ColorSource::Type::kImage: + os << "kImage"; + break; + case ColorSource::Type::kLinearGradient: + os << "kLinearGradient"; + break; + case ColorSource::Type::kRadialGradient: + os << "kRadialGradient"; + break; + case ColorSource::Type::kConicalGradient: + os << "kConicalGradient"; + break; + case ColorSource::Type::kSweepGradient: + os << "kSweepGradient"; + break; + case ColorSource::Type::kRuntimeEffect: + os << "kRuntimeEffect"; + break; + case ColorSource::Type::kScene: + os << "kScene"; + break; + } + os << " }"; + return os; +} + std::ostream& operator<<(std::ostream& os, const Paint& paint) { os << "{" << std::endl; os << " color: [" << paint.color << "]" << std::endl; os << " color_source:" - << "[ColorSource]" << std::endl; + << "[" << paint.color_source << "]" << std::endl; os << " dither: [" << paint.dither << "]" << std::endl; os << " stroke_width: [" << paint.stroke_width << "]" << std::endl; os << " stroke_cap: " From 672905b6c538cba78dd33d08469e0e53a17c73e6 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 17 Oct 2023 13:34:07 -0400 Subject: [PATCH 715/859] Roll Dart SDK from 2418bda7a457 to 99ce477503f8 (1 revision) (#47008) https://dart.googlesource.com/sdk.git/+log/2418bda7a457..99ce477503f8 2023-10-17 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-34.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jimgraham@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 0d26b689b7734..4fd1ddf6c88f4 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '2418bda7a4573a5fb872d1a174ba89c0079c0ad3', + 'dart_revision': '99ce477503f85f2ee1d3db19459bbea761ee52d2', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index dd64920d41759..13dcb6a99e81d 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: 4813544243fbadd2a7b5112ffe9f8d81 +Signature: 9fdf3ebc512ee98cb129d5ea503faa61 ==================================================================================================== LIBRARY: dart From 876f58f83ae2e70fb2a98cfa7a57966a2ed7b576 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 17 Oct 2023 13:36:18 -0400 Subject: [PATCH 716/859] Roll Skia from 8b3f2ef48a90 to 1a332d2b35d9 (1 revision) (#47009) https://skia.googlesource.com/skia.git/+log/8b3f2ef48a90..1a332d2b35d9 2023-10-17 jamesgk@google.com Revert "[graphite] Test that failed dst copies don't cause a crash" If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 4fd1ddf6c88f4..4d742878ee751 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '8b3f2ef48a90fb7cb926a2caffa31b66e1119857', + 'skia_revision': '1a332d2b35d9d343002bec1dba6bcce4f1627ba6', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 7c71da99fa917552b005dd2ebaffc3c615e0e694 Mon Sep 17 00:00:00 2001 From: Zachary Anderson Date: Tue, 17 Oct 2023 10:52:21 -0700 Subject: [PATCH 717/859] Shift some engine DEPS from github to mirrors (#46633) Progress towards https://github.com/flutter/flutter/issues/113052 --- DEPS | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/DEPS b/DEPS index 4d742878ee751..178a73d8bad33 100644 --- a/DEPS +++ b/DEPS @@ -264,12 +264,6 @@ allowed_hosts = [ deps = { 'src': 'https://github.com/flutter/buildroot.git' + '@' + '6f31be56e1058997feac2e93ff67fef21ae25eaf', - # Fuchsia compatibility - # - # The dependencies in this section should match the layout in the Fuchsia gn - # build. Eventually, we'll manage these dependencies together with Fuchsia - # and not have to specific hashes. - 'src/third_party/rapidjson': Var('fuchsia_git') + '/third_party/rapidjson' + '@' + 'ef3564c5c8824989393b87df25355baf35ff544b', @@ -286,13 +280,13 @@ deps = { Var('fuchsia_git') + '/third_party/glfw' + '@' + 'dd8a678a66f1967372e5a5e3deac41ebf65ee127', 'src/third_party/shaderc': - Var('github_git') + '/google/shaderc.git' + '@' + '7ea834ecc59258a5c13c3d3e6fa0582bdde7c543', + Var('chromium_git') + '/external/github.com/google/shaderc' + '@' + '7ea834ecc59258a5c13c3d3e6fa0582bdde7c543', 'src/third_party/vulkan-deps': Var('chromium_git') + '/vulkan-deps' + '@' + '40b75117a60b11c42a1fb87bf14c0f49bcdb8b3d', 'src/third_party/flatbuffers': - Var('github_git') + '/google/flatbuffers.git' + '@' + '0a80646371179f8a7a5c1f42c31ee1d44dcf6709', + Var('chromium_git') + '/external/github.com/google/flatbuffers' + '@' + '0a80646371179f8a7a5c1f42c31ee1d44dcf6709', 'src/third_party/icu': Var('chromium_git') + '/chromium/deps/icu.git' + '@' + 'a622de35ac311c5ad390a7af80724634e5dc61ed', @@ -304,13 +298,13 @@ deps = { Var('chromium_git') + '/external/github.com/google/gtest-parallel' + '@' + '38191e2733d7cbaeaef6a3f1a942ddeb38a2ad14', 'src/third_party/benchmark': - Var('github_git') + '/google/benchmark' + '@' + '431abd149fd76a072f821913c0340137cc755f36', + Var('chromium_git') + '/external/github.com/google/benchmark' + '@' + '431abd149fd76a072f821913c0340137cc755f36', 'src/third_party/googletest': - Var('github_git') + '/google/googletest' + '@' + '054a986a8513149e8374fc669a5fe40117ca6b41', + Var('chromium_git') + '/external/github.com/google/googletest' + '@' + '054a986a8513149e8374fc669a5fe40117ca6b41', 'src/third_party/boringssl': - Var('github_git') + '/dart-lang/boringssl_gen.git' + '@' + Var('dart_boringssl_gen_rev'), + Var('dart_git') + '/boringssl_gen.git' + '@' + Var('dart_boringssl_gen_rev'), 'src/third_party/yapf': Var('github_git') + '/google/yapf' + '@' + '212c5b5ad8e172d2d914ae454c121c89cccbcb35', @@ -654,7 +648,7 @@ deps = { Var('dart_git') + '/external/github.com/google/file.dart.git' + '@' + 'b2e31cb6ef40b223701dbfa0b907fe58468484d7', # 6.1.4 'src/third_party/pkg/flutter_packages': - Var('github_git') + '/flutter/packages.git' + '@' + '25454e63851fe7933f04d025606e68c1eac4fe0f', # various + Var('flutter_git') + '/mirrors/packages' + '@' + '25454e63851fe7933f04d025606e68c1eac4fe0f', # various 'src/third_party/pkg/gcloud': Var('github_git') + '/dart-lang/gcloud.git' + '@' + 'a5276b85c4714378e84b1fb478b8feeeb686ac26', # 0.8.6-dev @@ -663,16 +657,16 @@ deps = { Var('github_git') + '/google/googleapis.dart.git' + '@' + '526011f56d98eab183cc6075ee1392e8303e43e2', # various 'src/third_party/pkg/platform': - Var('github_git') + '/google/platform.dart.git' + '@' + '1ffad63428bbd1b3ecaa15926bacfb724023648c', # 3.1.0 + Var('dart_git') + '/platform.dart' + '@' + '1ffad63428bbd1b3ecaa15926bacfb724023648c', # 3.1.0 'src/third_party/pkg/process': - Var('github_git') + '/google/process.dart.git' + '@' + '0c9aeac86dcc4e3a6cf760b76fed507107e244d5', # 4.2.1 + Var('dart_git') + '/process.dart' + '@' + '0c9aeac86dcc4e3a6cf760b76fed507107e244d5', # 4.2.1 'src/third_party/pkg/process_runner': Var('github_git') + '/google/process_runner.git' + '@' + 'f24c69efdcaf109168f23d381fa281453d2bc9b1', # 4.1.2 'src/third_party/pkg/quiver': - Var('github_git') + '/google/quiver-dart.git' + '@' + '90b92bee895e507d435012356a8b5c5f17eafa52', # 3.2.1 + Var('chromium_git') + '/external/github.com/google/quiver-dart' + '@' + '90b92bee895e507d435012356a8b5c5f17eafa52', # 3.2.1 'src/third_party/pkg/vector_math': Var('dart_git') + '/external/github.com/google/vector_math.dart.git' + '@' + '0a5fd95449083d404df9768bc1b321b88a7d2eef', # 2.1.0 From adc3f804d8fa97ec4f807e40dc69b1750431b483 Mon Sep 17 00:00:00 2001 From: LongCatIsLooong <31859944+LongCatIsLooong@users.noreply.github.com> Date: Tue, 17 Oct 2023 12:03:48 -0700 Subject: [PATCH 718/859] Don't respond to the `insertionPointColor` selector on iOS 17+ (#46373) Fixes https://github.com/flutter/flutter/issues/132548 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- .../Source/FlutterTextInputPlugin.mm | 19 ++++++++++++++++++- .../Source/FlutterTextInputPluginTest.mm | 11 +++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm index f02ab85da7ece..e2fe1334ff1ff 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm @@ -902,7 +902,14 @@ - (UITextContentType)textContentType { // Prevent UIKit from showing selection handles or highlights. This is needed // because Scribble interactions require the view to have it's actual frame on -// the screen. +// the screen. They're not needed on iOS 17 with the new +// UITextSelectionDisplayInteraction API. +// +// These are undocumented methods. On iOS 17, the insertion point color is also +// used as the highlighted background of the selected IME candidate: +// https://github.com/flutter/flutter/issues/132548 +// So the respondsToSelector method is overridden to return NO for this method +// on iOS 17+. - (UIColor*)insertionPointColor { return [UIColor clearColor]; } @@ -930,6 +937,16 @@ - (UIInputViewController*)inputViewController { return _textInputPlugin.textInputDelegate; } +- (BOOL)respondsToSelector:(SEL)selector { + if (@available(iOS 17.0, *)) { + // See the comment on this method. + if (selector == @selector(insertionPointColor)) { + return NO; + } + } + return [super respondsToSelector:selector]; +} + - (void)setTextInputClient:(int)client { _textInputClient = client; _hasPlaceholder = NO; diff --git a/shell/platform/darwin/ios/framework/Source/FlutterTextInputPluginTest.mm b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPluginTest.mm index f18357acf0ffc..b4d6dcb7e078f 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterTextInputPluginTest.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPluginTest.mm @@ -786,6 +786,17 @@ - (void)testDisablingAutocorrectDisablesSpellChecking { XCTAssertEqual(inputView.spellCheckingType, UITextSpellCheckingTypeNo); } +- (void)testFlutterTextInputViewOnlyRespondsToInsertionPointColorBelowIOS17 { + FlutterTextInputView* inputView = [[FlutterTextInputView alloc] initWithOwner:textInputPlugin]; + BOOL respondsToInsertionPointColor = + [inputView respondsToSelector:@selector(insertionPointColor)]; + if (@available(iOS 17, *)) { + XCTAssertFalse(respondsToInsertionPointColor); + } else { + XCTAssertTrue(respondsToInsertionPointColor); + } +} + #pragma mark - TextEditingDelta tests - (void)testTextEditingDeltasAreGeneratedOnTextInput { FlutterTextInputView* inputView = [[FlutterTextInputView alloc] initWithOwner:textInputPlugin]; From 1ac63877c7bfddde04a3bb3285bf76feb765758d Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 17 Oct 2023 15:07:06 -0400 Subject: [PATCH 719/859] Roll Skia from 1a332d2b35d9 to a9caf3c19792 (1 revision) (#47013) https://skia.googlesource.com/skia.git/+log/1a332d2b35d9..a9caf3c19792 2023-10-17 ccameron@chromium.org Add files for public Exif interface and IFD parsing If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 178a73d8bad33..5293db995e1d9 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '1a332d2b35d9d343002bec1dba6bcce4f1627ba6', + 'skia_revision': 'a9caf3c19792721bdc277c69e408a25aae5203c9', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index ddeec591ce465..8f52dbca8ea60 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: c039ec8763d43d5d5f7efaa1c79dcd78 +Signature: 6ae266c2b1d31e983d2de563401c7b78 ==================================================================================================== LIBRARY: etc1 @@ -8610,6 +8610,7 @@ ORIGIN: ../../../third_party/skia/gm/fontations.cpp + ../../../third_party/skia/ ORIGIN: ../../../third_party/skia/gm/imagefiltersunpremul.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/ports/SkFontMgr_data.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/ports/SkTypeface_fontations.h + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/include/private/SkExif.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/private/SkGainmapInfo.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/private/SkGainmapShader.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/include/private/SkJpegGainmapEncoder.h + ../../../third_party/skia/LICENSE @@ -8620,6 +8621,7 @@ ORIGIN: ../../../third_party/skia/modules/skshaper/src/SkShaper_skunicode.cpp + ORIGIN: ../../../third_party/skia/modules/skunicode/src/SkUnicode_hardcoded.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/skunicode/src/SkUnicode_hardcoded.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/skunicode/src/SkUnicode_icu_bidi.h + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/codec/SkExif.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/codec/SkJpegConstants.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/codec/SkJpegMultiPicture.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/codec/SkJpegMultiPicture.h + ../../../third_party/skia/LICENSE @@ -8629,6 +8631,8 @@ ORIGIN: ../../../third_party/skia/src/codec/SkJpegSourceMgr.cpp + ../../../third ORIGIN: ../../../third_party/skia/src/codec/SkJpegSourceMgr.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/codec/SkJpegXmp.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/codec/SkJpegXmp.h + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/codec/SkTiffUtility.cpp + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/codec/SkTiffUtility.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/codec/SkXmp.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/core/SkRasterPipelineContextUtils.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/core/SkRasterPipelineOpContexts.h + ../../../third_party/skia/LICENSE @@ -8650,6 +8654,7 @@ FILE: ../../../third_party/skia/gm/fontations.cpp FILE: ../../../third_party/skia/gm/imagefiltersunpremul.cpp FILE: ../../../third_party/skia/include/ports/SkFontMgr_data.h FILE: ../../../third_party/skia/include/ports/SkTypeface_fontations.h +FILE: ../../../third_party/skia/include/private/SkExif.h FILE: ../../../third_party/skia/include/private/SkGainmapInfo.h FILE: ../../../third_party/skia/include/private/SkGainmapShader.h FILE: ../../../third_party/skia/include/private/SkJpegGainmapEncoder.h @@ -8660,6 +8665,7 @@ FILE: ../../../third_party/skia/modules/skshaper/src/SkShaper_skunicode.cpp FILE: ../../../third_party/skia/modules/skunicode/src/SkUnicode_hardcoded.cpp FILE: ../../../third_party/skia/modules/skunicode/src/SkUnicode_hardcoded.h FILE: ../../../third_party/skia/modules/skunicode/src/SkUnicode_icu_bidi.h +FILE: ../../../third_party/skia/src/codec/SkExif.cpp FILE: ../../../third_party/skia/src/codec/SkJpegConstants.h FILE: ../../../third_party/skia/src/codec/SkJpegMultiPicture.cpp FILE: ../../../third_party/skia/src/codec/SkJpegMultiPicture.h @@ -8669,6 +8675,8 @@ FILE: ../../../third_party/skia/src/codec/SkJpegSourceMgr.cpp FILE: ../../../third_party/skia/src/codec/SkJpegSourceMgr.h FILE: ../../../third_party/skia/src/codec/SkJpegXmp.cpp FILE: ../../../third_party/skia/src/codec/SkJpegXmp.h +FILE: ../../../third_party/skia/src/codec/SkTiffUtility.cpp +FILE: ../../../third_party/skia/src/codec/SkTiffUtility.h FILE: ../../../third_party/skia/src/codec/SkXmp.cpp FILE: ../../../third_party/skia/src/core/SkRasterPipelineContextUtils.h FILE: ../../../third_party/skia/src/core/SkRasterPipelineOpContexts.h From c84a242401442bd886e3001a02fbae68e74436ff Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Tue, 17 Oct 2023 12:36:48 -0700 Subject: [PATCH 720/859] Manual roll of Clang from 576b184d6e3b to 00396e6a1a0b (#46980) --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 5293db995e1d9..87b110472dfe7 100644 --- a/DEPS +++ b/DEPS @@ -39,7 +39,7 @@ vars = { # The list of revisions for these tools comes from Fuchsia, here: # https://fuchsia.googlesource.com/integration/+/HEAD/toolchain # If there are problems with the toolchain, contact fuchsia-toolchain@. - 'clang_version': 'git_revision:576b184d6e3b633f51b908b61ebd281d2ecbf66f', + 'clang_version': 'git_revision:00396e6a1a0b79fda008cb4e86b616d7952b33c8', # The goma version and the clang version can be tightly coupled. If goma # stops working on a clang roll, this may need to be updated using the value From 2760c21ce4d88b276ce307e508e4e06f82b88abe Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 17 Oct 2023 15:52:01 -0400 Subject: [PATCH 721/859] Roll Skia from a9caf3c19792 to b524e0af7d3a (1 revision) (#47017) https://skia.googlesource.com/skia.git/+log/a9caf3c19792..b524e0af7d3a 2023-10-17 armansito@google.com [graphite] Forward-declare VelloRenderer in RendererProvider.h If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 87b110472dfe7..7c4020b334e0f 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'a9caf3c19792721bdc277c69e408a25aae5203c9', + 'skia_revision': 'b524e0af7d3afe98539287a9b04aee29a26e8827', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 8f52dbca8ea60..130b66ab2a3fb 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 6ae266c2b1d31e983d2de563401c7b78 +Signature: ff311a7533b4575386e27d5c77e9810d ==================================================================================================== LIBRARY: etc1 From 64b7919a7448bcec03dceda78359ef37097fc21f Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Tue, 17 Oct 2023 14:50:05 -0700 Subject: [PATCH 722/859] Workaround for a clang-tidy warning in CPUSpeedTracker (#47024) The newly rolled version of clang-tidy is warning about some accesses to std::optional values. The function does a has_value check before accessing the values, but the analyzer does not detect that. --- fml/cpu_affinity.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fml/cpu_affinity.cc b/fml/cpu_affinity.cc index ae759e24c4218..ccb2e89686581 100644 --- a/fml/cpu_affinity.cc +++ b/fml/cpu_affinity.cc @@ -47,14 +47,16 @@ CPUSpeedTracker::CPUSpeedTracker(std::vector data) min_speed.value() == max_speed.value()) { return; } + const int64_t max_speed_value = max_speed.value(); + const int64_t min_speed_value = min_speed.value(); for (const auto& data : cpu_speeds_) { - if (data.speed == max_speed.value()) { + if (data.speed == max_speed_value) { performance_.push_back(data.index); } else { not_performance_.push_back(data.index); } - if (data.speed == min_speed.value()) { + if (data.speed == min_speed_value) { efficiency_.push_back(data.index); } } From 5b21487c31e92373a13c7babacaa01306d669019 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 17 Oct 2023 18:28:05 -0400 Subject: [PATCH 723/859] Roll Skia from b524e0af7d3a to f62b4dce5e55 (4 revisions) (#47029) https://skia.googlesource.com/skia.git/+log/b524e0af7d3a..f62b4dce5e55 2023-10-17 johnstiles@google.com Fix MakeClientBasedUnicode when skia_use_client_icu is set. 2023-10-17 herb@google.com Fix Segment intersection calculation 2023-10-17 avi@chromium.org Fix availability macro use 2023-10-17 johnstiles@google.com Fix more ClangTidy `performance-unnecessary-value-param` findings. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 7c4020b334e0f..0ee2ae82b4e61 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'b524e0af7d3afe98539287a9b04aee29a26e8827', + 'skia_revision': 'f62b4dce5e5539f5ac2869d09aad6b65f647a127', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 130b66ab2a3fb..fe60d90c88349 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: ff311a7533b4575386e27d5c77e9810d +Signature: 43ca5e2d6a4377aa77d2390a7e622aea ==================================================================================================== LIBRARY: etc1 From a34d01f9e7010cee4f691833c89a3fcf07533a95 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Tue, 17 Oct 2023 15:28:07 -0700 Subject: [PATCH 724/859] Roll buildroot to pull in //gpu removal. (#47014) Needs https://github.com/flutter/buildroot/pull/782 --- DEPS | 2 +- ci/licenses_golden/excluded_files | 1 - ci/licenses_golden/licenses_gpu | 38 ------------------------ tools/fuchsia/build_fuchsia_artifacts.py | 2 +- 4 files changed, 2 insertions(+), 41 deletions(-) delete mode 100644 ci/licenses_golden/licenses_gpu diff --git a/DEPS b/DEPS index 0ee2ae82b4e61..1e9417014039f 100644 --- a/DEPS +++ b/DEPS @@ -262,7 +262,7 @@ allowed_hosts = [ ] deps = { - 'src': 'https://github.com/flutter/buildroot.git' + '@' + '6f31be56e1058997feac2e93ff67fef21ae25eaf', + 'src': 'https://github.com/flutter/buildroot.git' + '@' + 'ab1d95b34a806908a4a4b4cd9a6246e564e59566', 'src/third_party/rapidjson': Var('fuchsia_git') + '/third_party/rapidjson' + '@' + 'ef3564c5c8824989393b87df25355baf35ff544b', diff --git a/ci/licenses_golden/excluded_files b/ci/licenses_golden/excluded_files index b17a4bab2fce2..3352ad56228d4 100644 --- a/ci/licenses_golden/excluded_files +++ b/ci/licenses_golden/excluded_files @@ -741,7 +741,6 @@ ../../../fuchsia/sdk/linux/pkg/zx/meta.json ../../../fuchsia/sdk/linux/tools ../../../fuchsia/sdk/linux/version_history.json -../../../gpu/README.md ../../../out ../../../third_party/abseil-cpp/.git ../../../third_party/abseil-cpp/.github diff --git a/ci/licenses_golden/licenses_gpu b/ci/licenses_golden/licenses_gpu deleted file mode 100644 index dcffbcface07a..0000000000000 --- a/ci/licenses_golden/licenses_gpu +++ /dev/null @@ -1,38 +0,0 @@ -Signature: ffe64a3daaf0ad982854594ad155dd56 - -==================================================================================================== -LIBRARY: engine -ORIGIN: ../../../gpu/GLES2/gl2chromium.h + ../../../gpu/LICENSE -ORIGIN: ../../../gpu/command_buffer/client/gles2_c_lib_export.h + ../../../gpu/LICENSE -TYPE: LicenseType.bsd -FILE: ../../../gpu/GLES2/gl2chromium.h -FILE: ../../../gpu/command_buffer/client/gles2_c_lib_export.h ----------------------------------------------------------------------------------------------------- -Copyright 2013 The Flutter Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -==================================================================================================== - -Total license count: 1 diff --git a/tools/fuchsia/build_fuchsia_artifacts.py b/tools/fuchsia/build_fuchsia_artifacts.py index 2defd41a5c027..32af340e9a644 100755 --- a/tools/fuchsia/build_fuchsia_artifacts.py +++ b/tools/fuchsia/build_fuchsia_artifacts.py @@ -235,7 +235,7 @@ def CopyBuildToBucket(runtime_mode, arch, optimized, product): bucket_root = os.path.join(_bucket_directory, 'flutter') licenses_root = os.path.join(_src_root_dir, 'flutter/ci/licenses_golden') license_files = [ - 'licenses_flutter', 'licenses_fuchsia', 'licenses_gpu', 'licenses_skia', + 'licenses_flutter', 'licenses_fuchsia', 'licenses_skia', 'licenses_third_party' ] for license in license_files: From 78bf4bce43abfa4130901c05dc25bb7f3bfa2237 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 17 Oct 2023 18:31:36 -0400 Subject: [PATCH 725/859] Roll Dart SDK from 99ce477503f8 to da48c75b73b1 (1 revision) (#47027) https://dart.googlesource.com/sdk.git/+log/99ce477503f8..da48c75b73b1 2023-10-17 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-35.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jimgraham@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 1e9417014039f..eea69c3810e67 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '99ce477503f85f2ee1d3db19459bbea761ee52d2', + 'dart_revision': 'da48c75b73b167cd4efd1adb867e6cc6cc3202db', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index 13dcb6a99e81d..3f5a5d9fb9140 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: 9fdf3ebc512ee98cb129d5ea503faa61 +Signature: 764d20b7de9b833b72ac9c76cfccec95 ==================================================================================================== LIBRARY: dart From 18cc94e0bd58d4e9d7f1374739fa4819279fe5a5 Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Tue, 17 Oct 2023 15:32:50 -0700 Subject: [PATCH 726/859] [fml][embedder] Improve thread-check logging (#47020) Developers working their app's runner code or in the native parts of plugins are often required to call methods from the platform thread, or face a crash. Makes a minor improvement to fml::ThreadChecker's IsCreationThreadCurrent log message. This patch originally proposed to emit a much more specific error message when calling methods that must be called on the platform thread (typically originating in calls from plugins), however, given that we don't ship debug engines as part of the SDK, this is really only going to be useful to engine developpers, or people brave enough to run with their own local engine build, in any case. Issue: https://github.com/flutter/flutter/issues/135345 No changed tests since no functional change, just an error message cleanup. ## Pre-launch Checklist - [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [X] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [X] I listed at least one issue that this PR fixes in the description above. - [ ] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [X] I updated/added relevant documentation (doc comments with `///`). - [X] I signed the [CLA]. - [X] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat --- fml/memory/thread_checker.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fml/memory/thread_checker.h b/fml/memory/thread_checker.h index 6d5f2fe04046e..220ea6fb67782 100644 --- a/fml/memory/thread_checker.h +++ b/fml/memory/thread_checker.h @@ -75,9 +75,10 @@ class ThreadChecker final { if (0 == pthread_getname_np(current_thread, actual_thread, buffer_length) && 0 == pthread_getname_np(self_, expected_thread, buffer_length)) { - FML_DLOG(ERROR) << "IsCreationThreadCurrent expected thread: '" - << expected_thread << "' actual thread:'" - << actual_thread << "'"; + FML_DLOG(ERROR) << "Object referenced on a thread other than the one " + "on which it was created. Expected thread: '" + << expected_thread << "'. Actual thread: '" + << actual_thread << "'."; } } #endif // __APPLE__ From a08056b4cd9d6884a0eb0c509e1c462f6f984185 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Tue, 17 Oct 2023 15:42:00 -0700 Subject: [PATCH 727/859] [Impeller] Rework Vulkan GPUTracker to decorate existing cmd buffers. (#46963) Switches the GPU tracing implementation to work more like the metal version, where we decorate individual cmd buffers with start/end time queries and then min/max the final result. Hopefully this stabilizes the values on CI --- impeller/renderer/backend/vulkan/BUILD.gn | 1 + .../backend/vulkan/command_encoder_vk.cc | 28 ++- .../backend/vulkan/command_encoder_vk.h | 7 +- .../renderer/backend/vulkan/context_vk.cc | 2 +- .../renderer/backend/vulkan/gpu_tracer_vk.cc | 224 +++++++++++------- .../renderer/backend/vulkan/gpu_tracer_vk.h | 70 +++++- .../backend/vulkan/swapchain_impl_vk.cc | 13 +- .../vulkan/test/gpu_tracer_unittests.cc | 111 +++++++++ .../backend/vulkan/test/mock_vulkan.cc | 43 ++++ 9 files changed, 380 insertions(+), 119 deletions(-) create mode 100644 impeller/renderer/backend/vulkan/test/gpu_tracer_unittests.cc diff --git a/impeller/renderer/backend/vulkan/BUILD.gn b/impeller/renderer/backend/vulkan/BUILD.gn index 0a7702f36a566..6de8fff0b13c5 100644 --- a/impeller/renderer/backend/vulkan/BUILD.gn +++ b/impeller/renderer/backend/vulkan/BUILD.gn @@ -15,6 +15,7 @@ impeller_component("vulkan_unittests") { "fence_waiter_vk_unittests.cc", "pass_bindings_cache_unittests.cc", "resource_manager_vk_unittests.cc", + "test/gpu_tracer_unittests.cc", "test/mock_vulkan.cc", "test/mock_vulkan.h", "test/mock_vulkan_unittests.cc", diff --git a/impeller/renderer/backend/vulkan/command_encoder_vk.cc b/impeller/renderer/backend/vulkan/command_encoder_vk.cc index 8f973bd0fa4d1..d963d8519f12a 100644 --- a/impeller/renderer/backend/vulkan/command_encoder_vk.cc +++ b/impeller/renderer/backend/vulkan/command_encoder_vk.cc @@ -7,6 +7,7 @@ #include "flutter/fml/closure.h" #include "impeller/renderer/backend/vulkan/context_vk.h" #include "impeller/renderer/backend/vulkan/fence_waiter_vk.h" +#include "impeller/renderer/backend/vulkan/gpu_tracer_vk.h" #include "impeller/renderer/backend/vulkan/texture_vk.h" namespace impeller { @@ -133,21 +134,25 @@ std::shared_ptr CommandEncoderFactoryVK::Create() { context_vk.SetDebugName(tracked_objects->GetCommandBuffer(), label_.value()); } + context->GetGPUTracer()->RecordCmdBufferStart( + tracked_objects->GetCommandBuffer()); - return std::make_shared(context_vk.GetDeviceHolder(), - tracked_objects, queue, - context_vk.GetFenceWaiter()); + return std::make_shared( + context_vk.GetDeviceHolder(), tracked_objects, queue, + context_vk.GetFenceWaiter(), context->GetGPUTracer()); } CommandEncoderVK::CommandEncoderVK( std::weak_ptr device_holder, std::shared_ptr tracked_objects, const std::shared_ptr& queue, - std::shared_ptr fence_waiter) + std::shared_ptr fence_waiter, + const std::shared_ptr& gpu_tracer) : device_holder_(std::move(device_holder)), tracked_objects_(std::move(tracked_objects)), queue_(queue), - fence_waiter_(std::move(fence_waiter)) {} + fence_waiter_(std::move(fence_waiter)), + gpu_tracer_(gpu_tracer) {} CommandEncoderVK::~CommandEncoderVK() = default; @@ -178,18 +183,23 @@ bool CommandEncoderVK::Submit(SubmitCallback callback) { auto command_buffer = GetCommandBuffer(); + auto end_frame = gpu_tracer_->RecordCmdBufferEnd(command_buffer); + auto status = command_buffer.end(); if (status != vk::Result::eSuccess) { + gpu_tracer_->OnFenceComplete(end_frame, false); VALIDATION_LOG << "Failed to end command buffer: " << vk::to_string(status); return false; } std::shared_ptr strong_device = device_holder_.lock(); if (!strong_device) { + gpu_tracer_->OnFenceComplete(end_frame, false); VALIDATION_LOG << "Device lost."; return false; } auto [fence_result, fence] = strong_device->GetDevice().createFenceUnique({}); if (fence_result != vk::Result::eSuccess) { + gpu_tracer_->OnFenceComplete(end_frame, false); VALIDATION_LOG << "Failed to create fence: " << vk::to_string(fence_result); return false; } @@ -199,6 +209,7 @@ bool CommandEncoderVK::Submit(SubmitCallback callback) { submit_info.setCommandBuffers(buffers); status = queue_->Submit(submit_info, *fence); if (status != vk::Result::eSuccess) { + gpu_tracer_->OnFenceComplete(end_frame, false); VALIDATION_LOG << "Failed to submit queue: " << vk::to_string(status); return false; } @@ -206,9 +217,14 @@ bool CommandEncoderVK::Submit(SubmitCallback callback) { // Submit will proceed, call callback with true when it is done and do not // call when `reset` is collected. fail_callback = false; + auto gpu_tracer = gpu_tracer_; return fence_waiter_->AddFence( std::move(fence), - [callback, tracked_objects = std::move(tracked_objects_)] { + [callback, tracked_objects = std::move(tracked_objects_), gpu_tracer, + end_frame] { + if (end_frame.has_value()) { + gpu_tracer->OnFenceComplete(end_frame, true); + } if (callback) { callback(true); } diff --git a/impeller/renderer/backend/vulkan/command_encoder_vk.h b/impeller/renderer/backend/vulkan/command_encoder_vk.h index 5402a6ad3c228..5a1e7d9d72948 100644 --- a/impeller/renderer/backend/vulkan/command_encoder_vk.h +++ b/impeller/renderer/backend/vulkan/command_encoder_vk.h @@ -29,7 +29,8 @@ class FenceWaiterVK; class CommandEncoderFactoryVK { public: - CommandEncoderFactoryVK(const std::weak_ptr& context); + explicit CommandEncoderFactoryVK( + const std::weak_ptr& context); std::shared_ptr Create(); @@ -50,7 +51,8 @@ class CommandEncoderVK { CommandEncoderVK(std::weak_ptr device_holder, std::shared_ptr tracked_objects, const std::shared_ptr& queue, - std::shared_ptr fence_waiter); + std::shared_ptr fence_waiter, + const std::shared_ptr& gpu_tracer); ~CommandEncoderVK(); @@ -89,6 +91,7 @@ class CommandEncoderVK { std::shared_ptr tracked_objects_; std::shared_ptr queue_; const std::shared_ptr fence_waiter_; + std::shared_ptr gpu_tracer_; bool is_valid_ = true; void Reset(); diff --git a/impeller/renderer/backend/vulkan/context_vk.cc b/impeller/renderer/backend/vulkan/context_vk.cc index 028b92ffb1be4..8204f5965e39f 100644 --- a/impeller/renderer/backend/vulkan/context_vk.cc +++ b/impeller/renderer/backend/vulkan/context_vk.cc @@ -433,7 +433,7 @@ void ContextVK::Setup(Settings settings) { // Create the GPU Tracer later because it depends on state from // the ContextVK. - gpu_tracer_ = std::make_shared(weak_from_this()); + gpu_tracer_ = std::make_shared(GetDeviceHolder()); //---------------------------------------------------------------------------- /// Label all the relevant objects. This happens after setup so that the diff --git a/impeller/renderer/backend/vulkan/gpu_tracer_vk.cc b/impeller/renderer/backend/vulkan/gpu_tracer_vk.cc index 0b7da21de9f82..1d16f90661cf5 100644 --- a/impeller/renderer/backend/vulkan/gpu_tracer_vk.cc +++ b/impeller/renderer/backend/vulkan/gpu_tracer_vk.cc @@ -4,128 +4,170 @@ #include "impeller/renderer/backend/vulkan/gpu_tracer_vk.h" +#include #include +#include "fml/logging.h" #include "fml/trace_event.h" #include "impeller/base/validation.h" -#include "impeller/renderer/backend/vulkan/command_buffer_vk.h" -#include "impeller/renderer/backend/vulkan/command_encoder_vk.h" #include "impeller/renderer/backend/vulkan/context_vk.h" -#include "impeller/renderer/command_buffer.h" +#include "vulkan/vulkan.hpp" namespace impeller { -static constexpr uint32_t kPoolSize = 32u; +static constexpr uint32_t kPoolSize = 64u; -GPUTracerVK::GPUTracerVK(const std::weak_ptr& context) - : context_(context) { - auto strong_context = context_.lock(); - if (!strong_context) { - return; - } - timestamp_period_ = strong_context->GetPhysicalDevice() +GPUTracerVK::GPUTracerVK(const std::shared_ptr& device_holder) + : device_holder_(device_holder) { + timestamp_period_ = device_holder_->GetPhysicalDevice() .getProperties() .limits.timestampPeriod; if (timestamp_period_ <= 0) { // The device does not support timestamp queries. return; } - vk::QueryPoolCreateInfo info; - info.queryCount = kPoolSize; - info.queryType = vk::QueryType::eTimestamp; - - auto [status, pool] = strong_context->GetDevice().createQueryPoolUnique(info); - if (status != vk::Result::eSuccess) { - VALIDATION_LOG << "Failed to create query pool."; - return; - } - query_pool_ = std::move(pool); // Disable tracing in release mode. #ifdef IMPELLER_DEBUG - valid_ = true; + enabled_ = true; #endif } -void GPUTracerVK::RecordStartFrameTime() { - if (!valid_) { - return; - } - auto strong_context = context_.lock(); - if (!strong_context) { +bool GPUTracerVK::IsEnabled() const { + return enabled_; +} + +void GPUTracerVK::MarkFrameStart() { + FML_DCHECK(!in_frame_); + in_frame_ = true; + raster_thread_id_ = std::this_thread::get_id(); +} + +void GPUTracerVK::MarkFrameEnd() { + if (!enabled_) { return; } - auto buffer = strong_context->CreateCommandBuffer(); - auto vk_trace_cmd_buffer = - CommandBufferVK::Cast(*buffer).GetEncoder()->GetCommandBuffer(); - // The two commands below are executed in order, such that writeTimeStamp is - // guaranteed to occur after resetQueryPool has finished. The validation - // layer seem particularly strict, and efforts to reset the entire pool - // were met with validation errors (though seemingly correct measurements). - // To work around this, the tracer only resets the query that will be - // used next. - vk_trace_cmd_buffer.resetQueryPool(query_pool_.get(), current_index_, 1); - vk_trace_cmd_buffer.writeTimestamp(vk::PipelineStageFlagBits::eBottomOfPipe, - query_pool_.get(), current_index_); - - if (!buffer->SubmitCommands()) { - VALIDATION_LOG << "GPUTracerVK: Failed to record start time."; - } - // The logic in RecordEndFrameTime requires us to have recorded a pair of - // tracing events. If this method failed for any reason we need to be sure we - // don't attempt to record and read back a second value, or we will get values - // that span multiple frames. - started_frame_ = true; + Lock lock(trace_state_mutex_); + current_state_ = (current_state_ + 1) % 16; + + auto& state = trace_states_[current_state_]; + // If there are still pending buffers on the trace state we're switching to, + // that means that a cmd buffer we were relying on to signal this likely + // never finished. This shouldn't happen unless there is a bug in the + // encoder logic. We set it to zero anyway to prevent a validation error + // from becoming a memory leak. + FML_DCHECK(state.pending_buffers == 0u); + + state.pending_buffers = 0; + state.current_index = 0; + state.contains_failure = false; + in_frame_ = false; } -void GPUTracerVK::RecordEndFrameTime() { - if (!valid_ || !started_frame_) { +void GPUTracerVK::RecordCmdBufferStart(const vk::CommandBuffer& buffer) { + if (!enabled_ || std::this_thread::get_id() != raster_thread_id_ || + !in_frame_) { return; } - auto strong_context = context_.lock(); - if (!strong_context) { + Lock lock(trace_state_mutex_); + auto& state = trace_states_[current_state_]; + + // Initialize the query pool for the first query on each frame. + if (state.pending_buffers == 0) { + vk::QueryPoolCreateInfo info; + info.queryCount = kPoolSize; + info.queryType = vk::QueryType::eTimestamp; + + auto [status, pool] = + device_holder_->GetDevice().createQueryPoolUnique(info); + if (status != vk::Result::eSuccess) { + VALIDATION_LOG << "Failed to create query pool."; + return; + } + trace_states_[current_state_].query_pool = std::move(pool); + buffer.resetQueryPool(trace_states_[current_state_].query_pool.get(), 0, + kPoolSize); + } + + // We size the query pool to kPoolSize, but Flutter applications can create an + // unbounded amount of work per frame. If we encounter this, stop recording + // cmds. + if (state.current_index >= kPoolSize) { return; } - started_frame_ = false; - auto last_query = current_index_; - current_index_ += 1; - - auto buffer = strong_context->CreateCommandBuffer(); - auto vk_trace_cmd_buffer = - CommandBufferVK::Cast(*buffer).GetEncoder()->GetCommandBuffer(); - vk_trace_cmd_buffer.resetQueryPool(query_pool_.get(), current_index_, 1); - vk_trace_cmd_buffer.writeTimestamp(vk::PipelineStageFlagBits::eBottomOfPipe, - query_pool_.get(), current_index_); - - // On completion of the second time stamp recording, we read back this value - // and the previous value. The difference is approximately the frame time. - const auto device_holder = strong_context->GetDeviceHolder(); - auto submitted = buffer->SubmitCommands( - [&, last_query, device_holder](CommandBuffer::Status status) { - if (status != CommandBuffer::Status::kCompleted) { - return; - } - uint64_t bits[2] = {0, 0}; - auto result = device_holder->GetDevice().getQueryPoolResults( - query_pool_.get(), last_query, 2, sizeof(bits), &bits, - sizeof(int64_t), vk::QueryResultFlagBits::e64); - - if (result != vk::Result::eSuccess) { - return; - } - // This value should probably be available in some form besides a - // timeline event but that is a job for a future Jonah. - auto gpu_ms = (((bits[1] - bits[0]) * timestamp_period_) / 1000000); - FML_TRACE_COUNTER("flutter", "GPUTracer", - reinterpret_cast(this), // Trace Counter ID - "FrameTimeMS", gpu_ms); - }); - if (!submitted) { - VALIDATION_LOG << "GPUTracerVK failed to record frame end time."; + buffer.writeTimestamp(vk::PipelineStageFlagBits::eTopOfPipe, + trace_states_[current_state_].query_pool.get(), + state.current_index); + state.pending_buffers += 1; + state.current_index += 1; +} + +std::optional GPUTracerVK::RecordCmdBufferEnd( + const vk::CommandBuffer& buffer) { + if (!enabled_ || std::this_thread::get_id() != raster_thread_id_ || + !in_frame_) { + return std::nullopt; + } + Lock lock(trace_state_mutex_); + GPUTraceState& state = trace_states_[current_state_]; + + if (state.current_index >= kPoolSize) { + return current_state_; } - if (current_index_ == kPoolSize - 1) { - current_index_ = 0u; + buffer.writeTimestamp(vk::PipelineStageFlagBits::eBottomOfPipe, + state.query_pool.get(), state.current_index); + + state.current_index += 1; + return current_state_; +} + +void GPUTracerVK::OnFenceComplete(std::optional maybe_frame_index, + bool success) { + if (!enabled_ || !maybe_frame_index.has_value()) { + return; + } + auto frame_index = maybe_frame_index.value(); + Lock lock(trace_state_mutex_); + GPUTraceState& state = trace_states_[frame_index]; + if (state.pending_buffers == 0) { + return; + } + state.contains_failure = !success; + state.pending_buffers -= 1; + + if (state.pending_buffers == 0 && !state.contains_failure) { + auto buffer_count = state.current_index; + std::vector bits(buffer_count); + + auto result = device_holder_->GetDevice().getQueryPoolResults( + state.query_pool.get(), 0, state.current_index, + buffer_count * sizeof(uint64_t), bits.data(), sizeof(uint64_t), + vk::QueryResultFlagBits::e64); + // This may return VK_NOT_READY if the query couldn't be completed, or if + // there are queries still pending. From local testing, this happens + // occassionally on very expensive frames. Its unclear if we can do anything + // about this, because by design this should only signal after all cmd + // buffers have signaled. Adding VK_QUERY_RESULT_WAIT_BIT to the flags + // passed to getQueryPoolResults seems like it would fix this, but actually + // seems to result in more stuck query errors. Better to just drop them and + // move on. + if (result != vk::Result::eSuccess) { + return; + } + + uint64_t smallest_timestamp = std::numeric_limits::max(); + uint64_t largest_timestamp = 0; + for (auto i = 0u; i < bits.size(); i++) { + smallest_timestamp = std::min(smallest_timestamp, bits[i]); + largest_timestamp = std::max(largest_timestamp, bits[i]); + } + auto gpu_ms = + (((largest_timestamp - smallest_timestamp) * timestamp_period_) / + 1000000); + FML_TRACE_COUNTER("flutter", "GPUTracer", + reinterpret_cast(this), // Trace Counter ID + "FrameTimeMS", gpu_ms); } } diff --git a/impeller/renderer/backend/vulkan/gpu_tracer_vk.h b/impeller/renderer/backend/vulkan/gpu_tracer_vk.h index 8913bf3ffdb08..238bf618f199e 100644 --- a/impeller/renderer/backend/vulkan/gpu_tracer_vk.h +++ b/impeller/renderer/backend/vulkan/gpu_tracer_vk.h @@ -3,8 +3,11 @@ // found in the LICENSE file. #include +#include #include "impeller/renderer/backend/vulkan/context_vk.h" +#include "impeller/renderer/backend/vulkan/device_holder.h" +#include "vulkan/vulkan_handles.hpp" namespace impeller { @@ -12,29 +15,70 @@ namespace impeller { /// execution time. class GPUTracerVK { public: - explicit GPUTracerVK(const std::weak_ptr& context); + explicit GPUTracerVK(const std::shared_ptr& device_holder); ~GPUTracerVK() = default; - /// @brief Record the approximate start time of the GPU workload for the - /// current frame. - void RecordStartFrameTime(); + /// @brief Record a timestamp query into the provided cmd buffer to record + /// start time. + void RecordCmdBufferStart(const vk::CommandBuffer& buffer); - /// @brief Record the approximate end time of the GPU workload for the current - /// frame. - void RecordEndFrameTime(); + /// @brief Record a timestamp query into the provided cmd buffer to record end + /// time. + /// + /// Returns the index that should be passed to [OnFenceComplete]. + std::optional RecordCmdBufferEnd(const vk::CommandBuffer& buffer); + + /// @brief Signal that the cmd buffer is completed. + /// + /// If [frame_index] is std::nullopt, this frame recording is ignored. + void OnFenceComplete(std::optional frame_index, bool success); + + /// @brief Signal the start of a frame workload. + /// + /// Any cmd buffers that are created after this call and before + /// [MarkFrameEnd] will be attributed to the current frame. + void MarkFrameStart(); + + /// @brief Signal the end of a frame workload. + void MarkFrameEnd(); + + // visible for testing. + bool IsEnabled() const; private: - void ResetQueryPool(size_t pool); + const std::shared_ptr device_holder_; - const std::weak_ptr context_; - vk::UniqueQueryPool query_pool_ = {}; + struct GPUTraceState { + size_t current_index = 0; + size_t pending_buffers = 0; + // If a cmd buffer submission fails for any reason, this field is used + // to indicate that the query pool results may be incomplete and this + // frame should be discarded. + bool contains_failure = false; + vk::UniqueQueryPool query_pool; + }; + + mutable Mutex trace_state_mutex_; + GPUTraceState trace_states_[16] IPLR_GUARDED_BY(trace_state_mutex_); + size_t current_state_ IPLR_GUARDED_BY(trace_state_mutex_) = 0u; - size_t current_index_ = 0u; // The number of nanoseconds for each timestamp unit. float timestamp_period_ = 1; - bool started_frame_ = false; - bool valid_ = false; + + // If in_frame_ is not true, then this cmd buffer was started as a part of + // some non-frame workload like image decoding. We should not record this as + // part of the frame workload, as the gap between this non-frame and a + // frameworkload may be substantial. For example, support the engine creates a + // cmd buffer to perform an image upload at timestamp 0 and then 30 ms later + // actually renders a frame. Without the in_frame_ guard, the GPU frame time + // would include this 30ms gap during which the engine was idle. + bool in_frame_ = false; + + // Track the raster thread id to avoid recording mipmap/image cmd buffers + // that are not guaranteed to start/end according to frame boundaries. + std::thread::id raster_thread_id_; + bool enabled_ = false; }; } // namespace impeller diff --git a/impeller/renderer/backend/vulkan/swapchain_impl_vk.cc b/impeller/renderer/backend/vulkan/swapchain_impl_vk.cc index 351ac2a1c9352..7d0f9823457de 100644 --- a/impeller/renderer/backend/vulkan/swapchain_impl_vk.cc +++ b/impeller/renderer/backend/vulkan/swapchain_impl_vk.cc @@ -379,9 +379,6 @@ SwapchainImplVK::AcquireResult SwapchainImplVK::AcquireNextDrawable() { nullptr // fence ); - /// Record the approximate start of the GPU workload. - context.GetGPUTracer()->RecordStartFrameTime(); - switch (acq_result) { case vk::Result::eSuccess: // Keep going. @@ -403,6 +400,9 @@ SwapchainImplVK::AcquireResult SwapchainImplVK::AcquireNextDrawable() { return {}; } + /// Record all subsequent cmd buffers as part of the current frame. + context.GetGPUTracer()->MarkFrameStart(); + auto image = images_[index % images_.size()]; uint32_t image_index = index; return AcquireResult{SurfaceVK::WrapSwapchainImage( @@ -428,6 +428,10 @@ bool SwapchainImplVK::Present(const std::shared_ptr& image, const auto& context = ContextVK::Cast(*context_strong); const auto& sync = synchronizers_[current_frame_]; + /// Record the approximate end of the GPU workload. This is intentionally + /// done before creating the final cmd buffer as that is not tracked. + context.GetGPUTracer()->MarkFrameEnd(); + //---------------------------------------------------------------------------- /// Transition the image to color-attachment-optimal. /// @@ -457,9 +461,6 @@ bool SwapchainImplVK::Present(const std::shared_ptr& image, } } - /// Record the approximate end of the GPU workload. - context.GetGPUTracer()->RecordEndFrameTime(); - //---------------------------------------------------------------------------- /// Signal that the presentation semaphore is ready. /// diff --git a/impeller/renderer/backend/vulkan/test/gpu_tracer_unittests.cc b/impeller/renderer/backend/vulkan/test/gpu_tracer_unittests.cc new file mode 100644 index 0000000000000..d20e41a68afd0 --- /dev/null +++ b/impeller/renderer/backend/vulkan/test/gpu_tracer_unittests.cc @@ -0,0 +1,111 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "flutter/testing/testing.h" // IWYU pragma: keep +#include "gtest/gtest.h" +#include "impeller/renderer//backend/vulkan/command_encoder_vk.h" +#include "impeller/renderer/backend/vulkan/command_buffer_vk.h" +#include "impeller/renderer/backend/vulkan/context_vk.h" +#include "impeller/renderer/backend/vulkan/gpu_tracer_vk.h" +#include "impeller/renderer/backend/vulkan/test/mock_vulkan.h" + +namespace impeller { +namespace testing { + +#ifdef IMPELLER_DEBUG +TEST(GPUTracerVK, CanTraceCmdBuffer) { + auto const context = MockVulkanContextBuilder().Build(); + + auto tracer = std::make_shared(context->GetDeviceHolder()); + + ASSERT_TRUE(tracer->IsEnabled()); + + auto cmd_buffer = context->CreateCommandBuffer(); + auto vk_cmd_buffer = CommandBufferVK::Cast(cmd_buffer.get()); + auto blit_pass = cmd_buffer->CreateBlitPass(); + + tracer->MarkFrameStart(); + tracer->RecordCmdBufferStart(vk_cmd_buffer->GetEncoder()->GetCommandBuffer()); + auto frame_id = tracer->RecordCmdBufferEnd( + vk_cmd_buffer->GetEncoder()->GetCommandBuffer()); + tracer->MarkFrameEnd(); + + ASSERT_EQ(frame_id, 0u); + auto called = GetMockVulkanFunctions(context->GetDevice()); + ASSERT_NE(called, nullptr); + ASSERT_TRUE(std::find(called->begin(), called->end(), "vkCreateQueryPool") != + called->end()); + ASSERT_TRUE(std::find(called->begin(), called->end(), + "vkGetQueryPoolResults") == called->end()); + + tracer->OnFenceComplete(frame_id, true); + + ASSERT_TRUE(std::find(called->begin(), called->end(), + "vkGetQueryPoolResults") != called->end()); +} + +TEST(GPUTracerVK, DoesNotTraceOutsideOfFrameWorkload) { + auto const context = MockVulkanContextBuilder().Build(); + + auto tracer = std::make_shared(context->GetDeviceHolder()); + + ASSERT_TRUE(tracer->IsEnabled()); + + auto cmd_buffer = context->CreateCommandBuffer(); + auto vk_cmd_buffer = CommandBufferVK::Cast(cmd_buffer.get()); + auto blit_pass = cmd_buffer->CreateBlitPass(); + + tracer->RecordCmdBufferStart(vk_cmd_buffer->GetEncoder()->GetCommandBuffer()); + auto frame_id = tracer->RecordCmdBufferEnd( + vk_cmd_buffer->GetEncoder()->GetCommandBuffer()); + + ASSERT_TRUE(!frame_id.has_value()); + auto called = GetMockVulkanFunctions(context->GetDevice()); + + ASSERT_NE(called, nullptr); + ASSERT_TRUE(std::find(called->begin(), called->end(), "vkCreateQueryPool") == + called->end()); + ASSERT_TRUE(std::find(called->begin(), called->end(), + "vkGetQueryPoolResults") == called->end()); + + tracer->OnFenceComplete(frame_id, true); + + ASSERT_TRUE(std::find(called->begin(), called->end(), "vkCreateQueryPool") == + called->end()); + ASSERT_TRUE(std::find(called->begin(), called->end(), + "vkGetQueryPoolResults") == called->end()); +} + +TEST(GPUTracerVK, DoesNotTraceOtherTheads) { + auto const context = MockVulkanContextBuilder().Build(); + + auto tracer = std::make_shared(context->GetDeviceHolder()); + + ASSERT_TRUE(tracer->IsEnabled()); + + tracer->MarkFrameStart(); + + // Record the cmd buffer on another thread to simulate a mipmap cmd buffer. + std::thread image_upload_thread([&context]() { + auto cmd_buffer = context->CreateCommandBuffer(); + auto vk_cmd_buffer = CommandBufferVK::Cast(cmd_buffer.get()); + auto blit_pass = cmd_buffer->CreateBlitPass(); + if (!cmd_buffer->SubmitCommands()) { + VALIDATION_LOG << "Failed to submit commands"; + } + }); + + image_upload_thread.join(); + + auto called = GetMockVulkanFunctions(context->GetDevice()); + + ASSERT_NE(called, nullptr); + ASSERT_TRUE(std::find(called->begin(), called->end(), "vkCreateQueryPool") == + called->end()); +} + +#endif // IMPELLER_DEBUG + +} // namespace testing +} // namespace impeller diff --git a/impeller/renderer/backend/vulkan/test/mock_vulkan.cc b/impeller/renderer/backend/vulkan/test/mock_vulkan.cc index 1140078386693..bee4d53e67360 100644 --- a/impeller/renderer/backend/vulkan/test/mock_vulkan.cc +++ b/impeller/renderer/backend/vulkan/test/mock_vulkan.cc @@ -10,6 +10,8 @@ #include "fml/thread_local.h" #include "impeller/base/thread_safety.h" #include "impeller/renderer/backend/vulkan/vk.h" // IWYU pragma: keep. +#include "third_party/swiftshader/include/vulkan/vulkan_core.h" +#include "vulkan/vulkan_core.h" namespace impeller { namespace testing { @@ -23,6 +25,8 @@ struct MockCommandBuffer { std::shared_ptr> called_functions_; }; +struct MockQueryPool {}; + struct MockCommandPool {}; class MockDevice final { @@ -153,6 +157,7 @@ void vkGetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, static_cast(VK_SAMPLE_COUNT_1_BIT | VK_SAMPLE_COUNT_4_BIT); pProperties->limits.maxImageDimension2D = 4096; + pProperties->limits.timestampPeriod = 1; } void vkGetPhysicalDeviceQueueFamilyProperties( @@ -495,6 +500,40 @@ VkResult vkSetDebugUtilsObjectNameEXT( return VK_SUCCESS; } +VkResult vkCreateQueryPool(VkDevice device, + const VkQueryPoolCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkQueryPool* pQueryPool) { + *pQueryPool = reinterpret_cast(new MockQueryPool()); + MockDevice* mock_device = reinterpret_cast(device); + mock_device->AddCalledFunction("vkCreateQueryPool"); + return VK_SUCCESS; +} + +VkResult vkGetQueryPoolResults(VkDevice device, + VkQueryPool queryPool, + uint32_t firstQuery, + uint32_t queryCount, + size_t dataSize, + void* pData, + VkDeviceSize stride, + VkQueryResultFlags flags) { + MockDevice* mock_device = reinterpret_cast(device); + if (dataSize == sizeof(uint32_t)) { + uint32_t* data = static_cast(pData); + for (auto i = firstQuery; i < queryCount; i++) { + data[0] = i; + } + } else if (dataSize == sizeof(int64_t)) { + uint64_t* data = static_cast(pData); + for (auto i = firstQuery; i < queryCount; i++) { + data[0] = i; + } + } + mock_device->AddCalledFunction("vkGetQueryPoolResults"); + return VK_SUCCESS; +} + PFN_vkVoidFunction GetMockVulkanProcAddress(VkInstance instance, const char* pName) { if (strcmp("vkEnumerateInstanceExtensionProperties", pName) == 0) { @@ -595,6 +634,10 @@ PFN_vkVoidFunction GetMockVulkanProcAddress(VkInstance instance, return (PFN_vkVoidFunction)vkCreateDebugUtilsMessengerEXT; } else if (strcmp("vkSetDebugUtilsObjectNameEXT", pName) == 0) { return (PFN_vkVoidFunction)vkSetDebugUtilsObjectNameEXT; + } else if (strcmp("vkCreateQueryPool", pName) == 0) { + return (PFN_vkVoidFunction)vkCreateQueryPool; + } else if (strcmp("vkGetQueryPoolResults", pName) == 0) { + return (PFN_vkVoidFunction)vkGetQueryPoolResults; } return noop; } From d110ecd2d18b17763d6ea8c0a1c03a8c9136e242 Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Tue, 17 Oct 2023 16:06:26 -0700 Subject: [PATCH 728/859] Move imgui from buildroot to flutter third_party (#47031) As part of eliminating the Flutter buildroot (#67373), we are moving all third-party dependencies from //third_party to //flutter/third_party. Once all third-party dependencies have been migrated, tooling and config will be moved and the buildroot will be eliminated altogether. Issue: https://github.com/flutter/flutter/issues/136284 No tests changed because there is no semantic change to this PR. This is simply relocating a dependency. ## Pre-launch Checklist - [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [X] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [X] I listed at least one issue that this PR fixes in the description above. - [ ] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [X] I updated/added relevant documentation (doc comments with `///`). - [X] I signed the [CLA]. - [X] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat --- DEPS | 2 +- build/secondary/{ => flutter}/third_party/imgui/BUILD.gn | 2 +- ci/licenses_golden/excluded_files | 2 +- ci/licenses_golden/tool_signature | 2 +- impeller/playground/BUILD.gn | 2 +- impeller/playground/imgui/BUILD.gn | 2 +- tools/licenses/lib/paths.dart | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) rename build/secondary/{ => flutter}/third_party/imgui/BUILD.gn (96%) diff --git a/DEPS b/DEPS index eea69c3810e67..05a4814382c87 100644 --- a/DEPS +++ b/DEPS @@ -671,7 +671,7 @@ deps = { 'src/third_party/pkg/vector_math': Var('dart_git') + '/external/github.com/google/vector_math.dart.git' + '@' + '0a5fd95449083d404df9768bc1b321b88a7d2eef', # 2.1.0 - 'src/third_party/imgui': + 'src/flutter/third_party/imgui': Var('github_git') + '/ocornut/imgui.git' + '@' + '3ea0fad204e994d669f79ed29dcaf61cd5cb571d', 'src/third_party/tinygltf': diff --git a/build/secondary/third_party/imgui/BUILD.gn b/build/secondary/flutter/third_party/imgui/BUILD.gn similarity index 96% rename from build/secondary/third_party/imgui/BUILD.gn rename to build/secondary/flutter/third_party/imgui/BUILD.gn index dadc4eec3ec3b..9a93a12eaf719 100644 --- a/build/secondary/third_party/imgui/BUILD.gn +++ b/build/secondary/flutter/third_party/imgui/BUILD.gn @@ -2,7 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -source_root = "//third_party/imgui" +source_root = "//flutter/third_party/imgui" source_set("imgui") { public = [ diff --git a/ci/licenses_golden/excluded_files b/ci/licenses_golden/excluded_files index 3352ad56228d4..f36174f424ce7 100644 --- a/ci/licenses_golden/excluded_files +++ b/ci/licenses_golden/excluded_files @@ -445,6 +445,7 @@ ../../../flutter/third_party/glfw/src/CMakeLists.txt ../../../flutter/third_party/glfw/tests ../../../flutter/third_party/gn +../../../flutter/third_party/imgui ../../../flutter/third_party/ninja ../../../flutter/third_party/spring_animation/README.md ../../../flutter/third_party/test_shaders @@ -2231,7 +2232,6 @@ ../../../third_party/icu/source/tools/toolutil/sources.txt ../../../third_party/icu/source/tools/tzcode/Makefile.in ../../../third_party/icu/source/tools/tzcode/readme.txt -../../../third_party/imgui ../../../third_party/inja/.clang-format ../../../third_party/inja/.git ../../../third_party/inja/.github diff --git a/ci/licenses_golden/tool_signature b/ci/licenses_golden/tool_signature index 12e514691e32b..0772863aa69bd 100644 --- a/ci/licenses_golden/tool_signature +++ b/ci/licenses_golden/tool_signature @@ -1,2 +1,2 @@ -Signature: 2da12666eedd83b571506f27f8445d99 +Signature: f161ef7a408768b3ded7494d69263d9b diff --git a/impeller/playground/BUILD.gn b/impeller/playground/BUILD.gn index 25408c569b7ac..f3d7072ce02b8 100644 --- a/impeller/playground/BUILD.gn +++ b/impeller/playground/BUILD.gn @@ -48,7 +48,7 @@ impeller_component("playground") { "imgui:imgui_impeller_backend", "//flutter/fml", "//flutter/third_party/glfw", - "//third_party/imgui:imgui_glfw", + "//flutter/third_party/imgui:imgui_glfw", ] if (impeller_supports_rendering) { diff --git a/impeller/playground/imgui/BUILD.gn b/impeller/playground/imgui/BUILD.gn index 497bb5c199c1d..19bb195876f4d 100644 --- a/impeller/playground/imgui/BUILD.gn +++ b/impeller/playground/imgui/BUILD.gn @@ -19,7 +19,7 @@ impeller_shaders("imgui_shaders") { impeller_component("imgui_impeller_backend") { public_deps = [ ":imgui_shaders", - "//third_party/imgui", + "//flutter/third_party/imgui", ] deps = [ "//flutter/impeller/renderer" ] diff --git a/tools/licenses/lib/paths.dart b/tools/licenses/lib/paths.dart index 1e79b9e0e5b67..a35d1a2ac6116 100644 --- a/tools/licenses/lib/paths.dart +++ b/tools/licenses/lib/paths.dart @@ -32,6 +32,7 @@ final Set skippedPaths = { r'flutter/third_party/glfw/deps', // Only used by examples and tests; not linked in build. r'flutter/third_party/glfw/docs', r'flutter/third_party/gn', + r'flutter/third_party/imgui', r'flutter/third_party/ninja', // build system r'flutter/third_party/test_shaders', // for tests only r'flutter/third_party/txt/third_party/fonts', @@ -112,7 +113,6 @@ final Set skippedPaths = { r'third_party/icu/source/data/brkitr/dictionaries/cjdict.txt', // explicitly handled by ICU license r'third_party/icu/source/data/brkitr/dictionaries/laodict.txt', // explicitly handled by ICU license r'third_party/icu/source/data/dtd', - r'third_party/imgui', r'third_party/inja/doc', // documentation r'third_party/inja/third_party/amalgamate', // only used at build time r'third_party/inja/third_party/include/doctest', // seems to be a unit test library From e122198b05a6345671c4bd24eec337b4376c16b1 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Tue, 17 Oct 2023 17:02:48 -0700 Subject: [PATCH 729/859] Disable threading test that fails on CI (#47034) This is failing on CI but didn't fail locally on the PR. Not sure why. --- .../vulkan/test/gpu_tracer_unittests.cc | 28 ------------------- 1 file changed, 28 deletions(-) diff --git a/impeller/renderer/backend/vulkan/test/gpu_tracer_unittests.cc b/impeller/renderer/backend/vulkan/test/gpu_tracer_unittests.cc index d20e41a68afd0..1311347257654 100644 --- a/impeller/renderer/backend/vulkan/test/gpu_tracer_unittests.cc +++ b/impeller/renderer/backend/vulkan/test/gpu_tracer_unittests.cc @@ -77,34 +77,6 @@ TEST(GPUTracerVK, DoesNotTraceOutsideOfFrameWorkload) { "vkGetQueryPoolResults") == called->end()); } -TEST(GPUTracerVK, DoesNotTraceOtherTheads) { - auto const context = MockVulkanContextBuilder().Build(); - - auto tracer = std::make_shared(context->GetDeviceHolder()); - - ASSERT_TRUE(tracer->IsEnabled()); - - tracer->MarkFrameStart(); - - // Record the cmd buffer on another thread to simulate a mipmap cmd buffer. - std::thread image_upload_thread([&context]() { - auto cmd_buffer = context->CreateCommandBuffer(); - auto vk_cmd_buffer = CommandBufferVK::Cast(cmd_buffer.get()); - auto blit_pass = cmd_buffer->CreateBlitPass(); - if (!cmd_buffer->SubmitCommands()) { - VALIDATION_LOG << "Failed to submit commands"; - } - }); - - image_upload_thread.join(); - - auto called = GetMockVulkanFunctions(context->GetDevice()); - - ASSERT_NE(called, nullptr); - ASSERT_TRUE(std::find(called->begin(), called->end(), "vkCreateQueryPool") == - called->end()); -} - #endif // IMPELLER_DEBUG } // namespace testing From fb897e9921f4f85edfbe271ce89a7c7677be44e2 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Tue, 17 Oct 2023 17:16:28 -0700 Subject: [PATCH 730/859] Roll buildroot to pull in removal of //tools. (#47032) None of these except remove_stale_pyc_files seems to be used. But we have the pyc files in the .gitignore and I couldn't find any existing checked in pyc files. So this check has never made sense for the Flutter. Removing instead of migrating. Buildroot patch https://github.com/flutter/buildroot/pull/784 --- DEPS | 13 +------------ ci/licenses_golden/excluded_files | 2 -- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/DEPS b/DEPS index 05a4814382c87..09f39c5b0a33b 100644 --- a/DEPS +++ b/DEPS @@ -262,7 +262,7 @@ allowed_hosts = [ ] deps = { - 'src': 'https://github.com/flutter/buildroot.git' + '@' + 'ab1d95b34a806908a4a4b4cd9a6246e564e59566', + 'src': 'https://github.com/flutter/buildroot.git' + '@' + 'f4b39f2bb89accd10cf097a6dedee5bcf9229286', 'src/third_party/rapidjson': Var('fuchsia_git') + '/third_party/rapidjson' + '@' + 'ef3564c5c8824989393b87df25355baf35ff544b', @@ -981,17 +981,6 @@ hooks = [ 'pattern': '.', 'action': ['python3', 'src/build/vs_toolchain.py', 'update'], }, - { - # Ensure that we don't accidentally reference any .pyc files whose - # corresponding .py files have already been deleted. - 'name': 'remove_stale_pyc_files', - 'pattern': 'src/tools/.*\\.py', - 'action': [ - 'python3', - 'src/tools/remove_stale_pyc_files.py', - 'src/tools', - ], - }, { 'name': 'dia_dll', 'pattern': '.', diff --git a/ci/licenses_golden/excluded_files b/ci/licenses_golden/excluded_files index f36174f424ce7..409ce8b5349d6 100644 --- a/ci/licenses_golden/excluded_files +++ b/ci/licenses_golden/excluded_files @@ -4,7 +4,6 @@ ../../../.github ../../../.gitignore ../../../.gn -../../../.ycm_extra_conf.py ../../../AUTHORS ../../../CODEOWNERS ../../../README.md @@ -3112,4 +3111,3 @@ ../../../third_party/zlib/google/zip_unittest.cc ../../../third_party/zlib/patches/README ../../../third_party/zlib/zlib.3 -../../../tools From 8bfebf9c99627dfff1b6821f3555963b4854aace Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 17 Oct 2023 20:22:38 -0400 Subject: [PATCH 731/859] Roll Skia from f62b4dce5e55 to 13694b8c64aa (2 revisions) (#47033) https://skia.googlesource.com/skia.git/+log/f62b4dce5e55..13694b8c64aa 2023-10-17 lovisolo@google.com [bazel] adb_test_runner.go: Pipe through extra command-line arguments to binary. 2023-10-17 brianosman@google.com Add coloremoji to the set of ColorSpaces GMs we test If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 09f39c5b0a33b..70c80507f958f 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'f62b4dce5e5539f5ac2869d09aad6b65f647a127', + 'skia_revision': '13694b8c64aa1a1206b86836808c5ad15f80f04b', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From f8efec4e7ee3901b21b5b6b4fbfc27bcfc561d83 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 17 Oct 2023 23:35:25 -0400 Subject: [PATCH 732/859] Roll Fuchsia Mac SDK from E0Ui7KmD3u5JSKEk5... to Kp2wNpzRlAtbME0R4... (#47037) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jimgraham@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 70c80507f958f..119867a97a066 100644 --- a/DEPS +++ b/DEPS @@ -912,7 +912,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'E0Ui7KmD3u5JSKEk5iViIEsUw5Jw63H8h9jOKPQA5ZgC' + 'version': 'Kp2wNpzRlAtbME0R4jnw0eHcyR2A--G2I6-iTBJ8PosC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From c0df034a2b0b8e90361c62bb9b261efa37b3cf17 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 18 Oct 2023 00:46:18 -0400 Subject: [PATCH 733/859] Roll Fuchsia Linux SDK from VtEx0R7lepGAvwAMU... to OudOcFarQhQQzKDBx... (#47039) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jimgraham@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 119867a97a066..ed5adfc6e4e9c 100644 --- a/DEPS +++ b/DEPS @@ -922,7 +922,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'VtEx0R7lepGAvwAMUqFlbQA4JhRqeI2kSZId899mLE8C' + 'version': 'OudOcFarQhQQzKDBx1JkObBFdRX8SQcs2XFUjh3Mw6sC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index b3791c9e767bc..d0bec7c54490d 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: 7f7362d6c9b7791ae757af278be2883b +Signature: 824e98ccbd5ea04bb2f984607961d2e5 ==================================================================================================== LIBRARY: fuchsia_sdk From 64ec710a289fa72a2b5b19da4955cdd3ba7b0d26 Mon Sep 17 00:00:00 2001 From: Matej Knopp Date: Wed, 18 Oct 2023 07:52:19 +0300 Subject: [PATCH 734/859] [macOS] Fix tests failing on Sonoma (#46461) 1. Using arbitrary struct passed as const reference to `OCMStub` now fails in OCMock. Down the line this will result with `object_getClass` being called in [`OCMArg.m`](https://github.com/erikdoe/ocmock/blob/master/Source/OCMock/OCMArg.m#L129-L133) with the address of the reference, which is not a valid class instance. This seems to have worked pre-sonoma, but it seems like a weird thing to rely on. 2. `NSResponder` mock can not be set to view controller anymore. The controller will try to access an ivar of the `NSResponder`, but mocked responder does not have the ivar of original objects which will result on invalid selector being called on a `NSMutableArray` one of the ivar of mock objects. Solution for this is to inherit from `NSResponder` and forward calls to mocked object. 3. Adding `flutter::kModifierFlagShiftLeft` to a modifier flag containing `kCGEventFlagMaskShift`. The assertion was introduced in https://github.com/flutter/engine/pull/46230 but i missed the test failure because of the problems above. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- .../Source/FlutterKeyboardManagerTest.mm | 4 +- .../Source/FlutterViewControllerTest.mm | 47 +++++++++++++++++-- 2 files changed, 46 insertions(+), 5 deletions(-) diff --git a/shell/platform/darwin/macos/framework/Source/FlutterKeyboardManagerTest.mm b/shell/platform/darwin/macos/framework/Source/FlutterKeyboardManagerTest.mm index 4bb5766791102..5e57509f704c6 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterKeyboardManagerTest.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterKeyboardManagerTest.mm @@ -276,7 +276,9 @@ - (nonnull instancetype)init { OCMStub([viewDelegateMock onTextInputKeyEvent:[OCMArg any]]) .andCall(self, @selector(handleTextInputKeyEvent:)); OCMStub([viewDelegateMock getBinaryMessenger]).andReturn(_messengerMock); - OCMStub([viewDelegateMock sendKeyEvent:FlutterKeyEvent {} callback:nil userData:nil]) + OCMStub([viewDelegateMock sendKeyEvent:*(const FlutterKeyEvent*)[OCMArg anyPointer] + callback:nil + userData:nil]) .ignoringNonObjectArgs() .andCall(self, @selector(handleEmbedderEvent:callback:userData:)); OCMStub([viewDelegateMock subscribeToKeyboardLayoutChange:[OCMArg any]]) diff --git a/shell/platform/darwin/macos/framework/Source/FlutterViewControllerTest.mm b/shell/platform/darwin/macos/framework/Source/FlutterViewControllerTest.mm index 76d11595a720c..e5f5befd2ff2a 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterViewControllerTest.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterViewControllerTest.mm @@ -38,6 +38,42 @@ - (void)dealloc { } @end +/// Responder wrapper that forwards key events to another responder. This is a necessary middle step +/// for mocking responder because when setting the responder to controller AppKit will access ivars +/// of the objects, which means it must extend NSResponder instead of just implementing the +/// selectors. +@interface FlutterResponderWrapper : NSResponder { + NSResponder* _responder; +} +@end + +@implementation FlutterResponderWrapper + +- (instancetype)initWithResponder:(NSResponder*)responder { + if (self = [super init]) { + _responder = responder; + } + return self; +} + +- (void)keyDown:(NSEvent*)event { + [_responder keyDown:event]; +} + +- (void)keyUp:(NSEvent*)event { + [_responder keyUp:event]; +} + +- (BOOL)performKeyEquivalent:(NSEvent*)event { + return [_responder performKeyEquivalent:event]; +} + +- (void)flagsChanged:(NSEvent*)event { + [_responder flagsChanged:event]; +} + +@end + // A FlutterViewController subclass for testing that mouseDown/mouseUp get called when // mouse events are sent to the associated view. @interface MouseEventFlutterViewController : FlutterViewController @@ -417,7 +453,8 @@ - (bool)testKeyEventsArePropagatedIfNotHandled { nibName:@"" bundle:nil]; id responderMock = flutter::testing::mockResponder(); - viewController.nextResponder = responderMock; + id responderWrapper = [[FlutterResponderWrapper alloc] initWithResponder:responderMock]; + viewController.nextResponder = responderWrapper; NSDictionary* expectedEvent = @{ @"keymap" : @"macos", @"type" : @"keydown", @@ -493,7 +530,8 @@ - (bool)testFlagsChangedEventsArePropagatedIfNotHandled { nibName:@"" bundle:nil]; id responderMock = flutter::testing::mockResponder(); - viewController.nextResponder = responderMock; + id responderWrapper = [[FlutterResponderWrapper alloc] initWithResponder:responderMock]; + viewController.nextResponder = responderWrapper; NSDictionary* expectedEvent = @{ @"keymap" : @"macos", @"type" : @"keydown", @@ -546,7 +584,8 @@ - (bool)testKeyEventsAreNotPropagatedIfHandled { nibName:@"" bundle:nil]; id responderMock = flutter::testing::mockResponder(); - viewController.nextResponder = responderMock; + id responderWrapper = [[FlutterResponderWrapper alloc] initWithResponder:responderMock]; + viewController.nextResponder = responderWrapper; NSDictionary* expectedEvent = @{ @"keymap" : @"macos", @"type" : @"keydown", @@ -825,7 +864,7 @@ - (bool)testTrackpadGesturesAreSentToFramework { CGEventRef cgEventDiscreteShift = CGEventCreateScrollWheelEvent(NULL, kCGScrollEventUnitPixel, 1, 0); CGEventSetType(cgEventDiscreteShift, kCGEventScrollWheel); - CGEventSetFlags(cgEventDiscreteShift, kCGEventFlagMaskShift); + CGEventSetFlags(cgEventDiscreteShift, kCGEventFlagMaskShift | flutter::kModifierFlagShiftLeft); CGEventSetIntegerValueField(cgEventDiscreteShift, kCGScrollWheelEventIsContinuous, 0); CGEventSetIntegerValueField(cgEventDiscreteShift, kCGScrollWheelEventDeltaAxis2, 0); // scroll_delta_x From ff2405df01054d980399d5a65adb2134cb0d2eaa Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 18 Oct 2023 01:02:22 -0400 Subject: [PATCH 735/859] Roll Skia from 13694b8c64aa to 8796ee7d1c66 (1 revision) (#47041) https://skia.googlesource.com/skia.git/+log/13694b8c64aa..8796ee7d1c66 2023-10-18 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 1b161432fcf1 to 178effa90318 (9 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index ed5adfc6e4e9c..ddc6f3471066e 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '13694b8c64aa1a1206b86836808c5ad15f80f04b', + 'skia_revision': '8796ee7d1c66a053d78e260c21873d099df02e24', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 29df55d09fe83bb6d4526f8153b1f21e5a8fb0b4 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 18 Oct 2023 01:56:27 -0400 Subject: [PATCH 736/859] Roll Skia from 8796ee7d1c66 to 3d938d4b00ee (3 revisions) (#47042) https://skia.googlesource.com/skia.git/+log/8796ee7d1c66..3d938d4b00ee 2023-10-18 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 400ac3a175a6 to 91b84ac6d8ea (1 revision) 2023-10-18 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from d42ad20d2b50 to 0cf4951e9bc0 (8 revisions) 2023-10-18 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Dawn from b665b7fda7cf to 5d5be56d5117 (17 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index ddc6f3471066e..19ebc46c97f71 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '8796ee7d1c66a053d78e260c21873d099df02e24', + 'skia_revision': '3d938d4b00eed8364e55570e788b19c4a7237b34', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index fe60d90c88349..185a27385bda5 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 43ca5e2d6a4377aa77d2390a7e622aea +Signature: f1238a3160899f5cdb88148f22bae3ac ==================================================================================================== LIBRARY: etc1 From 8536e7a421dc9d6a4612617b1e26266fd451bc57 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 18 Oct 2023 02:35:13 -0400 Subject: [PATCH 737/859] Roll Skia from 3d938d4b00ee to 212da8293790 (1 revision) (#47043) https://skia.googlesource.com/skia.git/+log/3d938d4b00ee..212da8293790 2023-10-18 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from 0cf4951e9bc0 to bff098b9b7ca If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 19ebc46c97f71..df057b74c30fa 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '3d938d4b00eed8364e55570e788b19c4a7237b34', + 'skia_revision': '212da8293790d8f25ea69ff608c92fe1b08d10b4', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 784aadfc5b2d403187177f7c1304abecfe035664 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 18 Oct 2023 04:07:23 -0400 Subject: [PATCH 738/859] Roll Skia from 212da8293790 to fed09695a0b9 (1 revision) (#47045) https://skia.googlesource.com/skia.git/+log/212da8293790..fed09695a0b9 2023-10-18 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 1ea49a2222e1 to 384a29a8fa9e (11 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index df057b74c30fa..1a65eab103cd0 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '212da8293790d8f25ea69ff608c92fe1b08d10b4', + 'skia_revision': 'fed09695a0b9fa0c40391b9ed8150e42f9332c7e', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From d28037ff9a3aa151adb2c70ee99254e03240409f Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 18 Oct 2023 10:30:20 -0400 Subject: [PATCH 739/859] Roll Skia from fed09695a0b9 to 8132e3356d63 (2 revisions) (#47050) https://skia.googlesource.com/skia.git/+log/fed09695a0b9..8132e3356d63 2023-10-18 johnstiles@google.com Add test for push-from-inner-reference in SkTArray. 2023-10-18 kjlubick@google.com Add new SkTypeface APIs which take SkFontMgr If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 1a65eab103cd0..32c28a3fe498c 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'fed09695a0b9fa0c40391b9ed8150e42f9332c7e', + 'skia_revision': '8132e3356d63b576df1471f1e10d7ea2da4cd1bd', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 185a27385bda5..e5d4fbe294dde 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: f1238a3160899f5cdb88148f22bae3ac +Signature: 0eb4b5ff319621f83b0ec3c19d32939d ==================================================================================================== LIBRARY: etc1 @@ -391,6 +391,7 @@ FILE: ../../../third_party/skia/relnotes/glbackendsemaphore.md FILE: ../../../third_party/skia/relnotes/grsurface-info.md FILE: ../../../third_party/skia/relnotes/mesh.md FILE: ../../../third_party/skia/relnotes/readbuffer-deserial.md +FILE: ../../../third_party/skia/relnotes/typeface.md FILE: ../../../third_party/skia/relnotes/vk-directcontext.md FILE: ../../../third_party/skia/src/gpu/gpu_workaround_list.txt FILE: ../../../third_party/skia/src/ports/fontations/Cargo.toml From ccaa1976ec7d8000371fb142930e32d27383e4a1 Mon Sep 17 00:00:00 2001 From: Zachary Anderson Date: Wed, 18 Oct 2023 07:58:26 -0700 Subject: [PATCH 740/859] Revert "Roll buildroot to pull in removal of //tools." (#47053) Reverts flutter/engine#47032 This is causing the Dart -> Engine roll to fail because one of the removed scripts is used by the autoroller. --- DEPS | 13 ++++++++++++- ci/licenses_golden/excluded_files | 2 ++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 32c28a3fe498c..be56b208117c8 100644 --- a/DEPS +++ b/DEPS @@ -262,7 +262,7 @@ allowed_hosts = [ ] deps = { - 'src': 'https://github.com/flutter/buildroot.git' + '@' + 'f4b39f2bb89accd10cf097a6dedee5bcf9229286', + 'src': 'https://github.com/flutter/buildroot.git' + '@' + 'ab1d95b34a806908a4a4b4cd9a6246e564e59566', 'src/third_party/rapidjson': Var('fuchsia_git') + '/third_party/rapidjson' + '@' + 'ef3564c5c8824989393b87df25355baf35ff544b', @@ -981,6 +981,17 @@ hooks = [ 'pattern': '.', 'action': ['python3', 'src/build/vs_toolchain.py', 'update'], }, + { + # Ensure that we don't accidentally reference any .pyc files whose + # corresponding .py files have already been deleted. + 'name': 'remove_stale_pyc_files', + 'pattern': 'src/tools/.*\\.py', + 'action': [ + 'python3', + 'src/tools/remove_stale_pyc_files.py', + 'src/tools', + ], + }, { 'name': 'dia_dll', 'pattern': '.', diff --git a/ci/licenses_golden/excluded_files b/ci/licenses_golden/excluded_files index 409ce8b5349d6..f36174f424ce7 100644 --- a/ci/licenses_golden/excluded_files +++ b/ci/licenses_golden/excluded_files @@ -4,6 +4,7 @@ ../../../.github ../../../.gitignore ../../../.gn +../../../.ycm_extra_conf.py ../../../AUTHORS ../../../CODEOWNERS ../../../README.md @@ -3111,3 +3112,4 @@ ../../../third_party/zlib/google/zip_unittest.cc ../../../third_party/zlib/patches/README ../../../third_party/zlib/zlib.3 +../../../tools From ad60dac184170d643bbca304ce34b3da15700490 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 18 Oct 2023 11:16:49 -0400 Subject: [PATCH 741/859] Roll Skia from 8132e3356d63 to 5172e904def7 (4 revisions) (#47052) https://skia.googlesource.com/skia.git/+log/8132e3356d63..5172e904def7 2023-10-18 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll vulkan-deps from 178effa90318 to c7b6044ad30b (4 revisions) 2023-10-18 kjlubick@google.com Add oss-fuzz harness for SkColorSpace 2023-10-18 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll Dawn from 5d5be56d5117 to 54c4b89e2ac3 (6 revisions) 2023-10-18 johnstiles@google.com Fix TArray::emplace_back when pushing refs inside the container. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index be56b208117c8..a3456f433e63a 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '8132e3356d63b576df1471f1e10d7ea2da4cd1bd', + 'skia_revision': '5172e904def759e13b645135ed61ae024d6a9e2e', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index e5d4fbe294dde..b21e931d72f44 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 0eb4b5ff319621f83b0ec3c19d32939d +Signature: 75138912b06869ea39b7546e6eee09b8 ==================================================================================================== LIBRARY: etc1 @@ -8730,6 +8730,7 @@ LIBRARY: skia ORIGIN: ../../../third_party/skia/fuzz/FuzzCubicRoots.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/fuzz/FuzzPrecompile.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/fuzz/FuzzQuadRoots.cpp + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/fuzz/oss_fuzz/FuzzColorspace.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/fuzz/oss_fuzz/FuzzCubicRoots.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/fuzz/oss_fuzz/FuzzPrecompile.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/fuzz/oss_fuzz/FuzzQuadRoots.cpp + ../../../third_party/skia/LICENSE @@ -8996,6 +8997,7 @@ TYPE: LicenseType.bsd FILE: ../../../third_party/skia/fuzz/FuzzCubicRoots.cpp FILE: ../../../third_party/skia/fuzz/FuzzPrecompile.cpp FILE: ../../../third_party/skia/fuzz/FuzzQuadRoots.cpp +FILE: ../../../third_party/skia/fuzz/oss_fuzz/FuzzColorspace.cpp FILE: ../../../third_party/skia/fuzz/oss_fuzz/FuzzCubicRoots.cpp FILE: ../../../third_party/skia/fuzz/oss_fuzz/FuzzPrecompile.cpp FILE: ../../../third_party/skia/fuzz/oss_fuzz/FuzzQuadRoots.cpp From 9730d1f244567884d3b4ade36b8ff2e438b165eb Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 18 Oct 2023 11:54:24 -0400 Subject: [PATCH 742/859] Roll Skia from 5172e904def7 to a52d2a9e2b01 (2 revisions) (#47055) https://skia.googlesource.com/skia.git/+log/5172e904def7..a52d2a9e2b01 2023-10-18 bungeman@google.com Add skia_use_client_icu to builds 2023-10-18 jamesgk@google.com Reland "[graphite] Test that failed dst copies don't cause a crash" If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index a3456f433e63a..af8f7c93b578b 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '5172e904def759e13b645135ed61ae024d6a9e2e', + 'skia_revision': 'a52d2a9e2b01388ac89b05ed1152330ba79ca6b2', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 76639add5ec4215277a0f78a8dea0b5209477a7c Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 18 Oct 2023 12:13:09 -0400 Subject: [PATCH 743/859] Roll Fuchsia Mac SDK from Kp2wNpzRlAtbME0R4... to PxJM5ivbnbYoVkqBg... (#47056) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jimgraham@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index af8f7c93b578b..2dc3d82919a0f 100644 --- a/DEPS +++ b/DEPS @@ -912,7 +912,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'Kp2wNpzRlAtbME0R4jnw0eHcyR2A--G2I6-iTBJ8PosC' + 'version': 'PxJM5ivbnbYoVkqBguCZKGRjteW4LbrvxFSAExYGgTEC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From b7ac473274cae0622a8654f88dacd08b27aa8108 Mon Sep 17 00:00:00 2001 From: Jia Hao Date: Wed, 18 Oct 2023 16:13:12 +0000 Subject: [PATCH 744/859] Add missing source file (#47046) Maybe I'm missing something here. It seems like we include this file below: https://github.com/flutter/engine/blob/c9c9684e03a3e1f745cbd4f8de762f42aa01ae77/shell/platform/embedder/pixel_formats.cc#L5 But it isn't mentioned in the gn file. Not sure how it is actually working today. --- shell/platform/embedder/BUILD.gn | 1 + 1 file changed, 1 insertion(+) diff --git a/shell/platform/embedder/BUILD.gn b/shell/platform/embedder/BUILD.gn index 90f3d1d9c66ca..829beb8d925bf 100644 --- a/shell/platform/embedder/BUILD.gn +++ b/shell/platform/embedder/BUILD.gn @@ -90,6 +90,7 @@ template("embedder_source_set") { "embedder_thread_host.cc", "embedder_thread_host.h", "pixel_formats.cc", + "pixel_formats.h", "platform_view_embedder.cc", "platform_view_embedder.h", "vsync_waiter_embedder.cc", From b222c2b48efb07a0b78fa9381072c5a9a3cc6b02 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 18 Oct 2023 12:47:35 -0400 Subject: [PATCH 745/859] Roll Skia from a52d2a9e2b01 to 5857f5f05b35 (1 revision) (#47057) https://skia.googlesource.com/skia.git/+log/a52d2a9e2b01..5857f5f05b35 2023-10-18 armansito@google.com [graphite] Do not atlas large paths with compute If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 2dc3d82919a0f..c2a8ce578d5c4 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'a52d2a9e2b01388ac89b05ed1152330ba79ca6b2', + 'skia_revision': '5857f5f05b357f52d07f8bba6ed35e5ebed9f745', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index b21e931d72f44..521032fc5bc88 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 75138912b06869ea39b7546e6eee09b8 +Signature: 591e82655511b1c2becab8d4e093a6ac ==================================================================================================== LIBRARY: etc1 From 1e12846f740412a840a7348684d33244f39bcecf Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 18 Oct 2023 13:30:12 -0400 Subject: [PATCH 746/859] Roll Fuchsia Linux SDK from OudOcFarQhQQzKDBx... to 2HSBpWikGWvPJlHOP... (#47059) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jimgraham@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index c2a8ce578d5c4..819ead53d0142 100644 --- a/DEPS +++ b/DEPS @@ -922,7 +922,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'OudOcFarQhQQzKDBx1JkObBFdRX8SQcs2XFUjh3Mw6sC' + 'version': '2HSBpWikGWvPJlHOPjJGaqHq3FY0N9WWgIRlt5x03BcC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index d0bec7c54490d..97c51927f0586 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: 824e98ccbd5ea04bb2f984607961d2e5 +Signature: c9323d0f315200ad5fb24eabd5fd1f87 ==================================================================================================== LIBRARY: fuchsia_sdk @@ -4310,6 +4310,7 @@ ORIGIN: ../../../fuchsia/sdk/linux/fidl/fuchsia.component.sandbox/overview.fidl ORIGIN: ../../../fuchsia/sdk/linux/fidl/fuchsia.component/controller.fidl + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/fidl/fuchsia.device.fs/names.fidl + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/fidl/fuchsia.driver.framework/driver.fidl + ../../../fuchsia/sdk/linux/LICENSE +ORIGIN: ../../../fuchsia/sdk/linux/fidl/fuchsia.driver.framework/driver_info.fidl + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/fidl/fuchsia.element/graphical_presenter.fidl + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/fidl/fuchsia.hardware.audio.signalprocessing/endpoint.fidl + ../../../fuchsia/sdk/linux/LICENSE ORIGIN: ../../../fuchsia/sdk/linux/fidl/fuchsia.hardware.audio/clock.fidl + ../../../fuchsia/sdk/linux/LICENSE @@ -4378,6 +4379,7 @@ FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.component.sandbox/overview.fidl FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.component/controller.fidl FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.device.fs/names.fidl FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.driver.framework/driver.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.driver.framework/driver_info.fidl FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.element/graphical_presenter.fidl FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.hardware.audio.signalprocessing/endpoint.fidl FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.hardware.audio/clock.fidl From f8fb52d775a70c45861e824b8e3a24750f5dbd95 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 18 Oct 2023 13:31:58 -0400 Subject: [PATCH 747/859] Roll Skia from 5857f5f05b35 to b8c989df901a (5 revisions) (#47060) https://skia.googlesource.com/skia.git/+log/5857f5f05b35..b8c989df901a 2023-10-18 skia-autoroll@skia-public.iam.gserviceaccount.com Roll skottie-base from 444eb9b78e14 to 0d214ae84fb2 2023-10-18 skia-autoroll@skia-public.iam.gserviceaccount.com Roll shaders-base from 84356d9e8452 to bce95eb72596 2023-10-18 skia-autoroll@skia-public.iam.gserviceaccount.com Roll debugger-app-base from 72a86e8cc35e to ead32575e5bc 2023-10-18 jvanverth@google.com [graphite] Loosen up strict Recording order on failure. 2023-10-18 skia-autoroll@skia-public.iam.gserviceaccount.com Roll jsfiddle-base from 3605928905e4 to 243e5abc4daa If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 819ead53d0142..2abf4abb792cb 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '5857f5f05b357f52d07f8bba6ed35e5ebed9f745', + 'skia_revision': 'b8c989df901aa8b40e5dc0b216f3d3898c8c493b', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 521032fc5bc88..7dbbf37dbed68 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 591e82655511b1c2becab8d4e093a6ac +Signature: b931982ca7e0539bb3752481ff6d2c3b ==================================================================================================== LIBRARY: etc1 From ee3e288bb0e213d6cafbcb03f12863343234ee66 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 18 Oct 2023 13:33:48 -0400 Subject: [PATCH 748/859] Roll Dart SDK from da48c75b73b1 to b423d5753fdc (5 revisions) (#47061) https://dart.googlesource.com/sdk.git/+log/da48c75b73b1..b423d5753fdc 2023-10-18 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-40.0.dev 2023-10-18 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-39.0.dev 2023-10-18 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-38.0.dev 2023-10-18 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-37.0.dev 2023-10-18 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-36.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jimgraham@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/DEPS b/DEPS index 2abf4abb792cb..c4bfa2a3d948e 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': 'da48c75b73b167cd4efd1adb867e6cc6cc3202db', + 'dart_revision': 'b423d5753fdc4a233f0965fe825dd0297b5dc6f5', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index 3f5a5d9fb9140..499ab752adbd1 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: 764d20b7de9b833b72ac9c76cfccec95 +Signature: c74e00a0506ba58c362410dbb667f4f5 ==================================================================================================== LIBRARY: dart @@ -1985,9 +1985,9 @@ ORIGIN: ../../../third_party/dart/sdk/lib/_internal/js_dev_runtime/private/pream ORIGIN: ../../../third_party/dart/sdk/lib/_internal/js_dev_runtime/private/preambles/jsshell.js + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/sdk/lib/_internal/js_runtime/lib/linked_hash_map.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/sdk/lib/_internal/js_runtime/lib/synced/embedded_names.dart + ../../../third_party/dart/LICENSE +ORIGIN: ../../../third_party/dart/sdk/lib/_internal/vm/lib/convert_patch.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/sdk/lib/_internal/vm/lib/lib_prefix.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/sdk/lib/_internal/vm/lib/profiler.dart + ../../../third_party/dart/LICENSE -ORIGIN: ../../../third_party/dart/sdk/lib/_internal/vm_shared/lib/convert_patch.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/sdk/lib/collection/set.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/sdk/lib/core/sink.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/sdk/lib/developer/profiler.dart + ../../../third_party/dart/LICENSE @@ -2077,9 +2077,9 @@ FILE: ../../../third_party/dart/sdk/lib/_internal/js_dev_runtime/private/preambl FILE: ../../../third_party/dart/sdk/lib/_internal/js_dev_runtime/private/preambles/jsshell.js FILE: ../../../third_party/dart/sdk/lib/_internal/js_runtime/lib/linked_hash_map.dart FILE: ../../../third_party/dart/sdk/lib/_internal/js_runtime/lib/synced/embedded_names.dart +FILE: ../../../third_party/dart/sdk/lib/_internal/vm/lib/convert_patch.dart FILE: ../../../third_party/dart/sdk/lib/_internal/vm/lib/lib_prefix.dart FILE: ../../../third_party/dart/sdk/lib/_internal/vm/lib/profiler.dart -FILE: ../../../third_party/dart/sdk/lib/_internal/vm_shared/lib/convert_patch.dart FILE: ../../../third_party/dart/sdk/lib/collection/set.dart FILE: ../../../third_party/dart/sdk/lib/core/sink.dart FILE: ../../../third_party/dart/sdk/lib/developer/profiler.dart @@ -3962,6 +3962,7 @@ ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/sync_star_patch.dar ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/typed_data.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/wasm_types_patch.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/weak_patch.dart + ../../../third_party/dart/LICENSE +ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm_js_compatibility/lib/convert_patch.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm_js_compatibility/lib/typed_data.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm_js_compatibility/lib/typed_data_patch.dart + ../../../third_party/dart/LICENSE ORIGIN: ../../../third_party/dart/sdk/lib/async/future_extensions.dart + ../../../third_party/dart/LICENSE @@ -4012,6 +4013,7 @@ FILE: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/sync_star_patch.dart FILE: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/typed_data.dart FILE: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/wasm_types_patch.dart FILE: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/weak_patch.dart +FILE: ../../../third_party/dart/sdk/lib/_internal/wasm_js_compatibility/lib/convert_patch.dart FILE: ../../../third_party/dart/sdk/lib/_internal/wasm_js_compatibility/lib/typed_data.dart FILE: ../../../third_party/dart/sdk/lib/_internal/wasm_js_compatibility/lib/typed_data_patch.dart FILE: ../../../third_party/dart/sdk/lib/async/future_extensions.dart From a5aaa82118842521cb43ae72c914b217e632c639 Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Wed, 18 Oct 2023 11:06:04 -0700 Subject: [PATCH 749/859] Add `--lint-all=` as an option for `clang_tidy`, refactor lint targets (#46522) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I plan to use this to get reasonable re-lint times locally when iterating on enabling lints, and finishing https://github.com/flutter/flutter/issues/134969. For example: ```shell $ prebuilts/macos-arm64/dart-sdk/bin/dart tools/clang_tidy/bin/main.dart --lint-regex=".*\/fml\/.*" ┌──────────────────────────┐ │ Engine Clang Tidy Linter │ └──────────────────────────┘ The following errors have been reported by the Engine Clang Tidy Linter. For more information on addressing these issues please see: https://github.com/flutter/flutter/wiki/Engine-Clang-Tidy-Linter 🔶 linting flutter/fml/command_line.cc 🔶 linting flutter/fml/command_line.cc 🔶 linting flutter/fml/ascii_trie.cc 🔶 linting flutter/fml/base32.cc 🔶 linting flutter/fml/concurrent_message_loop.cc 🔶 linting flutter/fml/cpu_affinity.cc 🔶 linting flutter/fml/delayed_task.cc 🔶 linting flutter/fml/endianness.cc 🔶 linting flutter/fml/file.cc 🔶 linting flutter/fml/hex_codec.cc 🔶 linting flutter/fml/icu_util.cc 🔶 linting flutter/fml/log_settings.cc 🔶 linting flutter/fml/log_settings_state.cc 🔶 linting flutter/fml/logging.cc 🔶 linting flutter/fml/mapping.cc 🔶 linting flutter/fml/memory/task_runner_checker.cc 🔶 linting flutter/fml/memory/thread_checker.cc 🔶 linting flutter/fml/memory/weak_ptr_internal.cc 🔶 linting flutter/fml/message_loop.cc 🔶 linting flutter/fml/message_loop_impl.cc 🔶 linting flutter/fml/message_loop_task_queues.cc 🔶 linting flutter/fml/paths.cc 🔶 linting flutter/fml/raster_thread_merger.cc 🔶 linting flutter/fml/shared_thread_merger.cc 🔶 linting flutter/fml/synchronization/count_down_latch.cc 🔶 linting flutter/fml/synchronization/semaphore.cc 🔶 linting flutter/fml/synchronization/sync_switch.cc 🔶 linting flutter/fml/synchronization/waitable_event.cc 🔶 linting flutter/fml/task_runner.cc 🔶 linting flutter/fml/task_source.cc 🔶 linting flutter/fml/thread.cc 🔶 linting flutter/fml/thread_local.cc 🔶 linting flutter/fml/time/time_point.cc 🔶 linting flutter/fml/trace_event.cc 🔶 linting flutter/fml/unique_fd.cc 🔶 linting flutter/fml/backtrace_stub.cc 🔶 linting flutter/fml/platform/darwin/concurrent_message_loop_factory.mm 🔶 linting flutter/fml/platform/posix/shared_mutex_posix.cc 🔶 linting flutter/fml/platform/darwin/cf_utils.cc 🔶 linting flutter/fml/platform/darwin/message_loop_darwin.mm 🔶 linting flutter/fml/platform/darwin/paths_darwin.mm 🔶 linting flutter/fml/platform/darwin/platform_version.mm 🔶 linting flutter/fml/platform/darwin/scoped_block.mm 🔶 linting flutter/fml/platform/darwin/scoped_nsautorelease_pool.cc 🔶 linting flutter/fml/platform/darwin/scoped_nsobject.mm 🔶 linting flutter/fml/platform/darwin/string_range_sanitization.mm 🔶 linting flutter/fml/platform/posix/command_line_posix.cc 🔶 linting flutter/fml/platform/posix/file_posix.cc 🔶 linting flutter/fml/platform/posix/mapping_posix.cc 🔶 linting flutter/fml/platform/posix/native_library_posix.cc 🔶 linting flutter/fml/platform/posix/paths_posix.cc 🔶 linting flutter/fml/platform/posix/posix_wrappers_posix.cc 🔶 linting flutter/fml/ascii_trie.cc 🔶 linting flutter/fml/base32.cc 🔶 linting flutter/fml/concurrent_message_loop.cc 🔶 linting flutter/fml/cpu_affinity.cc 🔶 linting flutter/fml/delayed_task.cc 🔶 linting flutter/fml/endianness.cc 🔶 linting flutter/fml/file.cc 🔶 linting flutter/fml/hex_codec.cc 🔶 linting flutter/fml/icu_util.cc 🔶 linting flutter/fml/log_settings.cc 🔶 linting flutter/fml/log_settings_state.cc 🔶 linting flutter/fml/logging.cc 🔶 linting flutter/fml/mapping.cc 🔶 linting flutter/fml/memory/task_runner_checker.cc 🔶 linting flutter/fml/memory/thread_checker.cc 🔶 linting flutter/fml/memory/weak_ptr_internal.cc 🔶 linting flutter/fml/message_loop.cc 🔶 linting flutter/fml/message_loop_impl.cc 🔶 linting flutter/fml/message_loop_task_queues.cc 🔶 linting flutter/fml/paths.cc 🔶 linting flutter/fml/raster_thread_merger.cc 🔶 linting flutter/fml/shared_thread_merger.cc 🔶 linting flutter/fml/synchronization/count_down_latch.cc 🔶 linting flutter/fml/synchronization/semaphore.cc 🔶 linting flutter/fml/synchronization/sync_switch.cc 🔶 linting flutter/fml/synchronization/waitable_event.cc 🔶 linting flutter/fml/task_runner.cc 🔶 linting flutter/fml/task_source.cc 🔶 linting flutter/fml/thread.cc 🔶 linting flutter/fml/thread_local.cc 🔶 linting flutter/fml/time/time_point.cc 🔶 linting flutter/fml/trace_event.cc 🔶 linting flutter/fml/unique_fd.cc 🔶 linting flutter/fml/backtrace_stub.cc 🔶 linting flutter/fml/platform/darwin/concurrent_message_loop_factory.mm 🔶 linting flutter/fml/platform/posix/shared_mutex_posix.cc 🔶 linting flutter/fml/platform/darwin/cf_utils.cc 🔶 linting flutter/fml/platform/darwin/message_loop_darwin.mm 🔶 linting flutter/fml/platform/darwin/paths_darwin.mm 🔶 linting flutter/fml/platform/darwin/platform_version.mm 🔶 linting flutter/fml/platform/darwin/scoped_block.mm 🔶 linting flutter/fml/platform/darwin/scoped_nsautorelease_pool.cc 🔶 linting flutter/fml/platform/darwin/scoped_nsobject.mm 🔶 linting flutter/fml/platform/darwin/string_range_sanitization.mm 🔶 linting flutter/fml/platform/posix/command_line_posix.cc 🔶 linting flutter/fml/platform/posix/file_posix.cc 🔶 linting flutter/fml/platform/posix/mapping_posix.cc 🔶 linting flutter/fml/platform/posix/native_library_posix.cc 🔶 linting flutter/fml/platform/posix/paths_posix.cc 🔶 linting flutter/fml/platform/posix/posix_wrappers_posix.cc 🔶 linting flutter/fml/message_loop_task_queues_benchmark.cc 🔶 linting flutter/fml/ascii_trie_unittests.cc 🔶 linting flutter/fml/backtrace_unittests.cc 🔶 linting flutter/fml/base32_unittest.cc 🔶 linting flutter/fml/closure_unittests.cc 🔶 linting flutter/fml/command_line_unittest.cc 🔶 linting flutter/fml/container_unittests.cc 🔶 linting flutter/fml/cpu_affinity_unittests.cc 🔶 linting flutter/fml/endianness_unittests.cc 🔶 linting flutter/fml/file_unittest.cc 🔶 linting flutter/fml/hash_combine_unittests.cc 🔶 linting flutter/fml/hex_codec_unittest.cc 🔶 linting flutter/fml/logging_unittests.cc 🔶 linting flutter/fml/mapping_unittests.cc 🔶 linting flutter/fml/math_unittests.cc 🔶 linting flutter/fml/memory/ref_counted_unittest.cc 🔶 linting flutter/fml/memory/task_runner_checker_unittest.cc 🔶 linting flutter/fml/memory/weak_ptr_unittest.cc 🔶 linting flutter/fml/message_loop_impl_unittests.cc 🔶 linting flutter/fml/message_loop_task_queues_merge_unmerge_unittests.cc 🔶 linting flutter/fml/message_loop_task_queues_unittests.cc 🔶 linting flutter/fml/message_loop_unittests.cc 🔶 linting flutter/fml/paths_unittests.cc 🔶 linting flutter/fml/raster_thread_merger_unittests.cc 🔶 linting flutter/fml/string_conversion_unittests.cc 🔶 linting flutter/fml/synchronization/count_down_latch_unittests.cc 🔶 linting flutter/fml/synchronization/semaphore_unittest.cc 🔶 linting flutter/fml/synchronization/sync_switch_unittest.cc 🔶 linting flutter/fml/synchronization/waitable_event_unittest.cc 🔶 linting flutter/fml/task_source_unittests.cc 🔶 linting flutter/fml/thread_local_unittests.cc 🔶 linting flutter/fml/thread_unittests.cc 🔶 linting flutter/fml/time/chrono_timestamp_provider.cc 🔶 linting flutter/fml/time/time_delta_unittest.cc 🔶 linting flutter/fml/time/time_point_unittest.cc 🔶 linting flutter/fml/time/time_unittest.cc 🔶 linting flutter/fml/platform/darwin/cf_utils_unittests.mm 🔶 linting flutter/fml/platform/darwin/string_range_sanitization_unittests.mm 🔶 linting flutter/fml/string_conversion.cc 🔶 linting flutter/fml/string_conversion.cc 🔶 linting flutter/fml/dart/dart_converter.cc [0:00] Jobs: 0% done, 1/143 completed, 7 in progress, 135 pending, 0 failed. ``` --- tools/clang_tidy/README.md | 11 ++- tools/clang_tidy/lib/clang_tidy.dart | 82 ++++++++++++++-------- tools/clang_tidy/lib/src/lint_target.dart | 40 +++++++++++ tools/clang_tidy/lib/src/options.dart | 39 ++++++---- tools/clang_tidy/test/clang_tidy_test.dart | 53 +++++++++++--- 5 files changed, 175 insertions(+), 50 deletions(-) create mode 100644 tools/clang_tidy/lib/src/lint_target.dart diff --git a/tools/clang_tidy/README.md b/tools/clang_tidy/README.md index 5c7fa9414fcde..2d82b4b105658 100644 --- a/tools/clang_tidy/README.md +++ b/tools/clang_tidy/README.md @@ -88,7 +88,16 @@ Use `--lint-all` to lint all files in the repo: dart ./tools/clang_tidy/bin/main.dart --lint-all ``` -> **⚠️ WARNING**: This will take a long time to run. +Or, provide a regular expression to lint files that match: + +```shell +dart ./tools/clang_tidy/bin/main.dart --lint-regex=".*test.*\.cc" +``` + +> **⚠️ WARNING**: This may take a long time to run if a pattern is not provided +> or if the pattern matches a large number of files, i.e. on the order of +> thousands of files could take 30 minutes or more to run and lock your +> machine. [^1]: Modified files are determined by a `git diff` command compared to `HEAD`. [^2]: Latest build is the last updated directory in `src/out/`. diff --git a/tools/clang_tidy/lib/clang_tidy.dart b/tools/clang_tidy/lib/clang_tidy.dart index 8a2308eb49e8d..e3757b9f40d83 100644 --- a/tools/clang_tidy/lib/clang_tidy.dart +++ b/tools/clang_tidy/lib/clang_tidy.dart @@ -13,6 +13,7 @@ import 'package:process/process.dart'; import 'package:process_runner/process_runner.dart'; import 'src/command.dart'; +import 'src/lint_target.dart'; import 'src/options.dart'; const String _linterOutputHeader = ''' @@ -48,14 +49,17 @@ class ClangTidy { /// Builds an instance of [ClangTidy] using a repo's [buildCommandPath]. /// /// ## Required + /// /// - [buildCommandsPath] is the path to the build_commands.json file. /// /// ## Optional + /// /// - [checksArg] are specific checks for clang-tidy to do. /// /// If omitted, checks will be determined by the `.clang-tidy` file in the /// repo. - /// - [lintAll] when true indicates that all files should be linted. + /// + /// - [lintTarget] is what files to lint. /// /// ## Optional (Test Overrides) /// @@ -76,8 +80,7 @@ class ClangTidy { ClangTidy({ required io.File buildCommandsPath, String checksArg = '', - bool lintAll = false, - bool lintHead = false, + LintTarget lintTarget = const LintChanged(), bool fix = false, StringSink? outSink, StringSink? errSink, @@ -86,8 +89,7 @@ class ClangTidy { options = Options( buildCommandsPath: buildCommandsPath, checksArg: checksArg, - lintAll: lintAll, - lintHead: lintHead, + lintTarget: lintTarget, fix: fix, errSink: errSink, ), @@ -143,12 +145,23 @@ class ClangTidy { _outSink.writeln('Checking for specific checks: ${options.checks}.'); } final int changedFilesCount = filesOfInterest.length; - if (options.lintAll) { - _outSink.writeln('Checking all $changedFilesCount files the repo dir.'); - } else { - _outSink.writeln( - 'Dectected $changedFilesCount files that have changed', - ); + switch (options.lintTarget) { + case LintAll(): + _outSink.writeln('Checking all $changedFilesCount files in the repo.'); + case LintChanged(): + _outSink.writeln( + 'Checking $changedFilesCount files that have changed since the ' + 'last commit.', + ); + case LintHead(): + _outSink.writeln( + 'Checking $changedFilesCount files that have changed compared to ' + 'HEAD.', + ); + case LintRegex(:final String regex): + _outSink.writeln( + 'Checking $changedFilesCount files that match the regex "$regex".', + ); } } @@ -200,26 +213,39 @@ class ClangTidy { return computeResult + runResult > 0 ? 1 : 0; } - /// The files with local modifications or all the files if `lintAll` was - /// specified. + /// The files with local modifications or all/a subset of all files. + /// + /// See [LintTarget] for more information. @visibleForTesting Future> computeFilesOfInterest() async { - if (options.lintAll) { - return options.repoPath - .listSync(recursive: true) - .whereType() - .toList(); - } - - final GitRepo repo = GitRepo.fromRoot( - options.repoPath, - processManager: _processManager, - verbose: options.verbose, - ); - if (options.lintHead) { - return repo.changedFilesAtHead; + switch (options.lintTarget) { + case LintAll(): + return options.repoPath + .listSync(recursive: true) + .whereType() + .toList(); + case LintRegex(:final String regex): + final RegExp pattern = RegExp(regex); + return options.repoPath + .listSync(recursive: true) + .whereType() + .where((io.File file) => pattern.hasMatch(file.path)) + .toList(); + case LintChanged(): + final GitRepo repo = GitRepo.fromRoot( + options.repoPath, + processManager: _processManager, + verbose: options.verbose, + ); + return repo.changedFiles; + case LintHead(): + final GitRepo repo = GitRepo.fromRoot( + options.repoPath, + processManager: _processManager, + verbose: options.verbose, + ); + return repo.changedFilesAtHead; } - return repo.changedFiles; } /// Returns f(n) = value(n * [shardCount] + [id]). diff --git a/tools/clang_tidy/lib/src/lint_target.dart b/tools/clang_tidy/lib/src/lint_target.dart new file mode 100644 index 0000000000000..8f45ae9ccce95 --- /dev/null +++ b/tools/clang_tidy/lib/src/lint_target.dart @@ -0,0 +1,40 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +/// Describes what should be linted by the Clang Tidy tool. +sealed class LintTarget { + /// Creates a new [LintTarget]. + const LintTarget(); +} + +/// Lints all files in the project. +final class LintAll extends LintTarget { + /// Defines a lint target that lints all files in the project. + const LintAll(); +} + +/// Lint all files that have changed since the last commit. +/// +/// This considers only the last commit, not all commits in the current branch. +final class LintChanged extends LintTarget { + /// Defines a lint target of files that have changed since the last commit. + const LintChanged(); +} + +/// Lint all files that have changed compared to HEAD. +/// +/// This considers _all_ commits in the current branch, not just the last one. +final class LintHead extends LintTarget { + /// Defines a lint target of files that have changed compared to HEAD. + const LintHead(); +} + +/// Lint all files whose paths match the given regex. +final class LintRegex extends LintTarget { + /// Creates a new [LintRegex] with the given [regex]. + const LintRegex(this.regex); + + /// The regular expression to match against file paths. + final String regex; +} diff --git a/tools/clang_tidy/lib/src/options.dart b/tools/clang_tidy/lib/src/options.dart index dca4c3a3874e7..f9d5320fb18a4 100644 --- a/tools/clang_tidy/lib/src/options.dart +++ b/tools/clang_tidy/lib/src/options.dart @@ -8,6 +8,8 @@ import 'package:args/args.dart'; import 'package:engine_repo_tools/engine_repo_tools.dart'; import 'package:path/path.dart' as path; +import 'lint_target.dart'; + final Engine _engineRoot = Engine.findWithin(path.dirname(path.fromUri(io.Platform.script))); /// Adds warnings as errors for only specific runs. This is helpful if migrating one platform at a time. @@ -28,8 +30,7 @@ class Options { this.help = false, this.verbose = false, this.checksArg = '', - this.lintAll = false, - this.lintHead = false, + this.lintTarget = const LintChanged(), this.fix = false, this.errorMessage, this.warningsAsErrors, @@ -69,14 +70,22 @@ class Options { required List shardCommandsPaths, int? shardId, }) { + final LintTarget lintTarget; + if (options.wasParsed('lint-all') || io.Platform.environment['FLUTTER_LINT_ALL'] != null) { + lintTarget = const LintAll(); + } else if (options.wasParsed('lint-regex')) { + lintTarget = LintRegex(options['lint-regex'] as String? ?? ''); + } else if (options.wasParsed('lint-head')) { + lintTarget = const LintHead(); + } else { + lintTarget = const LintChanged(); + } return Options( help: options['help'] as bool, verbose: options['verbose'] as bool, buildCommandsPath: buildCommandsPath, checksArg: options.wasParsed('checks') ? options['checks'] as String : '', - lintAll: io.Platform.environment['FLUTTER_LINT_ALL'] != null || - options['lint-all'] as bool, - lintHead: options['lint-head'] as bool, + lintTarget: lintTarget, fix: options['fix'] as bool, errSink: errSink, warningsAsErrors: _platformSpecificWarningsAsErrors(options), @@ -148,9 +157,16 @@ class Options { help: 'Print help.', negatable: false, ) + ..addOption( + 'lint-regex', + help: 'Lint all files, regardless of FLUTTER_NOLINT. Provide a regex ' + 'to filter files. For example, `--lint-regex=".*impeller.*"` will ' + 'lint all files within a path that contains "impeller".', + valueHelp: 'regex', + ) ..addFlag( 'lint-all', - help: 'Lint all of the sources, regardless of FLUTTER_NOLINT.', + help: 'Lint all files, regardless of FLUTTER_NOLINT.', ) ..addFlag( 'lint-head', @@ -245,11 +261,8 @@ class Options { /// Check argument to be supplied to the clang-tidy subprocess. final String? checks; - /// Whether all files should be linted. - final bool lintAll; - - /// Whether to lint only files changed in the tip-of-tree commit. - final bool lintHead; + /// What files to lint. + final LintTarget lintTarget; /// Whether checks should apply available fix-ups to the working copy. final bool fix; @@ -290,8 +303,8 @@ class Options { return 'ERROR: --compile-commands option cannot be used with --src-dir.'; } - if (argResults.wasParsed('lint-all') && argResults.wasParsed('lint-head')) { - return 'ERROR: At most one of --lint-all and --lint-head can be passed.'; + if (const ['lint-all', 'lint-head', 'lint-regex'].where(argResults.wasParsed).length > 1) { + return 'ERROR: At most one of --lint-all, --lint-head, --lint-regex can be passed.'; } if (!buildCommandsPath.existsSync()) { diff --git a/tools/clang_tidy/test/clang_tidy_test.dart b/tools/clang_tidy/test/clang_tidy_test.dart index 819815bed8d97..da3bbf921d171 100644 --- a/tools/clang_tidy/test/clang_tidy_test.dart +++ b/tools/clang_tidy/test/clang_tidy_test.dart @@ -6,6 +6,7 @@ import 'dart:io' as io show Directory, File, Platform, stderr; import 'package:clang_tidy/clang_tidy.dart'; import 'package:clang_tidy/src/command.dart'; +import 'package:clang_tidy/src/lint_target.dart'; import 'package:clang_tidy/src/options.dart'; import 'package:engine_repo_tools/engine_repo_tools.dart'; import 'package:litetest/litetest.dart'; @@ -43,8 +44,7 @@ final class Fixture { final StringBuffer errBuffer = StringBuffer(); return Fixture._(ClangTidy( buildCommandsPath: options.buildCommandsPath, - lintAll: options.lintAll, - lintHead: options.lintHead, + lintTarget: options.lintTarget, fix: options.fix, outSink: outBuffer, errSink: errBuffer, @@ -275,7 +275,24 @@ Future main(List args) async { expect(result, equals(1)); expect(fixture.errBuffer.toString(), contains( - 'ERROR: At most one of --lint-all and --lint-head can be passed.', + 'ERROR: At most one of --lint-all, --lint-head, --lint-regex can be passed.', + )); + }); + + test('Error when --lint-all and --lint-regex are used together', () async { + final Fixture fixture = Fixture.fromCommandLine( + [ + '--compile-commands', + '/unused', + '--lint-all', + '--lint-regex=".*"', + ], + ); + final int result = await fixture.tool.run(); + + expect(result, equals(1)); + expect(fixture.errBuffer.toString(), contains( + 'ERROR: At most one of --lint-all, --lint-head, --lint-regex can be passed.', )); }); @@ -283,7 +300,7 @@ Future main(List args) async { final Fixture fixture = Fixture.fromOptions( Options( buildCommandsPath: io.File(buildCommands), - lintAll: true, + lintTarget: const LintAll(), ), ); final List fileList = await fixture.tool.computeFilesOfInterest(); @@ -296,7 +313,7 @@ Future main(List args) async { buildCommandsPath: io.File(buildCommands), // Intentional: // ignore: avoid_redundant_argument_values - lintAll: false, + lintTarget: const LintChanged(), ), processManager: FakeProcessManager( onStart: (List command) { @@ -312,11 +329,31 @@ Future main(List args) async { expect(fileList.length, lessThan(300)); }); + test('lintAll=pattern checks based on a RegEx', () async { + final Fixture fixture = Fixture.fromOptions( + Options( + buildCommandsPath: io.File(buildCommands), + lintTarget: const LintRegex(r'.*test.*\.cc$'), + ), + processManager: FakeProcessManager( + onStart: (List command) { + if (command.first == 'git') { + // This just allows git to not actually be called. + return FakeProcess(); + } + return FakeProcessManager.unhandledStart(command); + }, + ), + ); + final List fileList = await fixture.tool.computeFilesOfInterest(); + expect(fileList.length, lessThan(1000)); + }); + test('Sharding', () async { final Fixture fixture = Fixture.fromOptions( Options( buildCommandsPath: io.File(buildCommands), - lintAll: true, + lintTarget: const LintAll(), ), processManager: FakeProcessManager( onStart: (List command) { @@ -392,7 +429,7 @@ Future main(List args) async { final Fixture fixture = Fixture.fromOptions( Options( buildCommandsPath: io.File(buildCommands), - lintAll: true, + lintTarget: const LintAll(), ), ); @@ -418,7 +455,7 @@ Future main(List args) async { final Fixture fixture = Fixture.fromOptions( Options( buildCommandsPath: io.File(buildCommands), - lintAll: true, + lintTarget: const LintAll(), ), ); From 8821211ac404c697ab76453d08385599e453c759 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 18 Oct 2023 14:16:23 -0400 Subject: [PATCH 750/859] Roll Skia from b8c989df901a to ccd07c6f5042 (3 revisions) (#47063) https://skia.googlesource.com/skia.git/+log/b8c989df901a..ccd07c6f5042 2023-10-18 bungeman@google.com Fix NoDEPS jobs 2023-10-18 johnstiles@google.com Avoid constructing and passing a SkData for each fuzz iteration. 2023-10-18 johnstiles@google.com Remove sk_sp from Fuzz helper class. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index c4bfa2a3d948e..2e0e490172aa3 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'b8c989df901aa8b40e5dc0b216f3d3898c8c493b', + 'skia_revision': 'ccd07c6f504265a048c8b94b3f048681ff116a0b', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 7dbbf37dbed68..ae850d29540cb 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: b931982ca7e0539bb3752481ff6d2c3b +Signature: 9fd8ec4e47d0224af6d28114d120278c ==================================================================================================== LIBRARY: etc1 From e006a881d7bc3026f6257476eddee18ef4524d24 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 18 Oct 2023 14:51:39 -0400 Subject: [PATCH 751/859] Roll Skia from ccd07c6f5042 to 523f04f1a898 (1 revision) (#47065) https://skia.googlesource.com/skia.git/+log/ccd07c6f5042..523f04f1a898 2023-10-18 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from c7b6044ad30b to aa353df9a587 (3 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 2e0e490172aa3..6c7a001b4c2d2 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'ccd07c6f504265a048c8b94b3f048681ff116a0b', + 'skia_revision': '523f04f1a8985373604dd4470e7c82630f5aad28', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 5cf0a14e375cdd951d002068165ab35082b6ca0e Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 18 Oct 2023 15:37:09 -0400 Subject: [PATCH 752/859] Roll Skia from 523f04f1a898 to 9880c4006735 (1 revision) (#47067) https://skia.googlesource.com/skia.git/+log/523f04f1a898..9880c4006735 2023-10-18 herb@google.com Introduce EventQueue and SweepLine interfaces If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 6c7a001b4c2d2..4f965dd29e774 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '523f04f1a8985373604dd4470e7c82630f5aad28', + 'skia_revision': '9880c400673558b00fb8976d4e14d624480410df', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index ae850d29540cb..c7fdd77444061 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 9fd8ec4e47d0224af6d28114d120278c +Signature: 5d64e4dc9e6d41c0dad4d97aa2972df8 ==================================================================================================== LIBRARY: etc1 @@ -8786,6 +8786,7 @@ ORIGIN: ../../../third_party/skia/include/private/gpu/graphite/ContextOptionsPri ORIGIN: ../../../third_party/skia/modules/bentleyottmann/include/BentleyOttmann1.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/bentleyottmann/include/BruteForceCrossings.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/bentleyottmann/include/EventQueue.h + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/modules/bentleyottmann/include/EventQueueInterface.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/bentleyottmann/include/Int96.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/bentleyottmann/include/Point.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/modules/bentleyottmann/include/Segment.h + ../../../third_party/skia/LICENSE @@ -9053,6 +9054,7 @@ FILE: ../../../third_party/skia/include/private/gpu/graphite/ContextOptionsPriv. FILE: ../../../third_party/skia/modules/bentleyottmann/include/BentleyOttmann1.h FILE: ../../../third_party/skia/modules/bentleyottmann/include/BruteForceCrossings.h FILE: ../../../third_party/skia/modules/bentleyottmann/include/EventQueue.h +FILE: ../../../third_party/skia/modules/bentleyottmann/include/EventQueueInterface.h FILE: ../../../third_party/skia/modules/bentleyottmann/include/Int96.h FILE: ../../../third_party/skia/modules/bentleyottmann/include/Point.h FILE: ../../../third_party/skia/modules/bentleyottmann/include/Segment.h From 5709d320f683f44c2f429a635061a429665bb107 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 18 Oct 2023 16:25:01 -0400 Subject: [PATCH 753/859] Roll Skia from 9880c4006735 to ef0e93524e7d (1 revision) (#47069) https://skia.googlesource.com/skia.git/+log/9880c4006735..ef0e93524e7d 2023-10-18 jamesgk@google.com Reland "[graphite] Use hardware image tiling when not subsetting" If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 4f965dd29e774..e6464d1976fe7 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '9880c400673558b00fb8976d4e14d624480410df', + 'skia_revision': 'ef0e93524e7d1e0c165d42b0a2cecd441af04d0b', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index c7fdd77444061..627b891a4e550 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 5d64e4dc9e6d41c0dad4d97aa2972df8 +Signature: 725088472df0cb29d651731f52e2a428 ==================================================================================================== LIBRARY: etc1 From 5c9384de36d5b45878e901000a0506f377d2f41a Mon Sep 17 00:00:00 2001 From: Zachary Anderson Date: Wed, 18 Oct 2023 13:32:37 -0700 Subject: [PATCH 754/859] Reland: Remove the frontend server wrapper (#47010) Relands https://github.com/flutter/engine/pull/46440 with https://github.com/flutter/engine/pull/46842 --- build/dart/rules.gni | 203 +++++++++++++++-------- common/config.gni | 19 ++- flutter_frontend_server/BUILD.gn | 24 ++- flutter_frontend_server/README.md | 71 -------- flutter_frontend_server/bin/starter.dart | 15 -- flutter_frontend_server/lib/server.dart | 91 ---------- flutter_frontend_server/pubspec.yaml | 84 +--------- testing/dart/BUILD.gn | 10 +- testing/dart/compile_test.gni | 91 ---------- testing/dart/observatory/BUILD.gn | 10 +- testing/smoke_test_failure/BUILD.gn | 10 +- testing/testing.gni | 96 ++--------- tools/gn | 12 +- 13 files changed, 198 insertions(+), 538 deletions(-) delete mode 100644 flutter_frontend_server/README.md delete mode 100644 flutter_frontend_server/bin/starter.dart delete mode 100644 flutter_frontend_server/lib/server.dart delete mode 100644 testing/dart/compile_test.gni diff --git a/build/dart/rules.gni b/build/dart/rules.gni index 00b801b2c204f..55c1220df506f 100644 --- a/build/dart/rules.gni +++ b/build/dart/rules.gni @@ -10,21 +10,113 @@ import("//flutter/common/config.gni") import("//third_party/dart/build/dart/dart_action.gni") import("//third_party/dart/sdk_args.gni") -frontend_server_files = - exec_script("//third_party/dart/tools/list_dart_files.py", - [ - "absolute", - rebase_path("//flutter/flutter_frontend_server"), - ], - "list lines") - -frontend_server_files += - exec_script("//third_party/dart/tools/list_dart_files.py", - [ - "absolute", - rebase_path("//third_party/dart/pkg"), - ], - "list lines") +# Generates a Dart kernel snapshot using flutter_frontend_server. +# +# Arguments +# main_dart (required): +# The Dart entrypoint file. +# +# kernel_output (required): +# The path to the output kernel snapshot in the out directory. +# +# package_config (optional): +# The path to the package_config.json file. +# +# deps (optional): +# Additional dependencies. Dependencies on the frontend server and +# Flutter's platform.dill are included by default. This rule creates and +# uses a depfile, so listing all Dart sources is not necessary. +# +# extra_args (optional): +# Additional frontend server command line arguments. +template("flutter_frontend_server") { + assert(defined(invoker.main_dart), "The Dart test file must be specified.") + assert(defined(invoker.kernel_output), + "The Dart Kernel file location must be specified.") + + kernel_output = invoker.kernel_output + + common_deps = [ "//flutter/lib/snapshot:strong_platform" ] + if (defined(invoker.deps)) { + common_deps += invoker.deps + } + + extra_args = [] + if (defined(invoker.extra_args)) { + extra_args += invoker.extra_args + } + + packages_args = [] + if (defined(invoker.package_config)) { + packages_args += [ + "--packages", + rebase_path(invoker.package_config, root_build_dir), + ] + } + + snapshot_depfile = "$kernel_output.d" + + common_vm_args = [ "--disable-dart-dev" ] + + flutter_patched_sdk = + rebase_path("$root_out_dir/flutter_patched_sdk", root_build_dir) + + common_args = extra_args + packages_args + [ + "--sdk-root", + flutter_patched_sdk, + "--target=flutter", + "--depfile", + rebase_path(snapshot_depfile, root_build_dir), + "--output-dill", + rebase_path(invoker.kernel_output, root_build_dir), + rebase_path(invoker.main_dart, root_build_dir), + ] + + if (flutter_prebuilt_dart_sdk) { + common_deps += [ "//flutter/flutter_frontend_server:frontend_server" ] + action(target_name) { + forward_variables_from(invoker, + [ + "visibility", + "testonly", + ], + [ "pool" ]) + deps = common_deps + pool = "//flutter/build/dart:dart_pool" + script = "//build/gn_run_binary.py" + inputs = [ invoker.main_dart ] + outputs = [ invoker.kernel_output ] + depfile = snapshot_depfile + + ext = "" + if (is_win) { + ext = ".exe" + } + dart = rebase_path("$host_prebuilt_dart_sdk/bin/dart$ext", root_out_dir) + frontend_server = + rebase_path("$root_gen_dir/frontend_server.dart.snapshot") + + args = [ dart ] + common_vm_args + [ frontend_server ] + common_args + } + } else { + prebuilt_dart_action(target_name) { + forward_variables_from(invoker, + [ + "visibility", + "testonly", + ], + [ "pool" ]) + deps = common_deps + pool = "//flutter/build/dart:dart_pool" + script = "//third_party/dart/pkg/frontend_server/bin/frontend_server_starter.dart" + inputs = [ invoker.main_dart ] + outputs = [ invoker.kernel_output ] + depfile = snapshot_depfile + vm_args = common_vm_args + args = common_args + } + } +} # Creates a dart kernel (dill) file suitable for use with gen_snapshot, as well # as the app-jit, aot-elf, or aot-assembly snapshot for targeting Flutter on @@ -48,61 +140,38 @@ template("flutter_snapshot") { kernel_output = "$target_gen_dir/kernel_blob.bin" - prebuilt_dart_action(kernel_target) { - script = "//flutter/flutter_frontend_server/bin/starter.dart" - - main_dart = rebase_path(invoker.main_dart) - package_config = rebase_path(invoker.package_config) - flutter_patched_sdk = rebase_path("$root_out_dir/flutter_patched_sdk") - - deps = [ "//flutter/lib/snapshot:strong_platform" ] - - inputs = [ - main_dart, - package_config, - ] + frontend_server_files - - outputs = [ kernel_output ] - - depfile = "$kernel_output.d" - abs_depfile = rebase_path(depfile) - vm_args = [ "--disable-dart-dev" ] - - args = [ - "--depfile=$abs_depfile", - "--packages=" + rebase_path(package_config), - "--target=flutter", - "--sdk-root=" + flutter_patched_sdk, - "--output-dill=" + rebase_path(kernel_output, root_build_dir), + extra_frontend_server_args = [] + if (is_aot) { + extra_frontend_server_args += [ + "--aot", + "--tfa", ] + } else { + # --no-link-platform is only valid when --aot isn't specified + extra_frontend_server_args += [ "--no-link-platform" ] + } - if (is_aot) { - args += [ - "--aot", - "--tfa", - ] - } else { - # --no-link-platform is only valid when --aot isn't specified - args += [ "--no-link-platform" ] - } - - if (defined(invoker.product) && invoker.product) { - # Setting this flag in a non-product release build for AOT (a "profile" - # build) causes the vm service isolate code to be tree-shaken from an app. - # See the pragma on the entrypoint here: - # - # https://github.com/dart-lang/sdk/blob/main/sdk/lib/_internal/vm/bin/vmservice_io.dart#L240 - # - # Also, this define excludes debugging and profiling code from Flutter. - args += [ "-Ddart.vm.product=true" ] - } else { - if (flutter_runtime_mode == "profile") { - # The following define excludes debugging code from Flutter. - args += [ "-Ddart.vm.profile=true" ] - } + if (defined(invoker.product) && invoker.product) { + # Setting this flag in a non-product release build for AOT (a "profile" + # build) causes the vm service isolate code to be tree-shaken from an app. + # See the pragma on the entrypoint here: + # + # https://github.com/dart-lang/sdk/blob/main/sdk/lib/_internal/vm/bin/vmservice_io.dart#L240 + # + # Also, this define excludes debugging and profiling code from Flutter. + extra_frontend_server_args += [ "-Ddart.vm.product=true" ] + } else { + if (flutter_runtime_mode == "profile") { + # The following define excludes debugging code from Flutter. + extra_frontend_server_args += [ "-Ddart.vm.profile=true" ] } + } - args += [ rebase_path(main_dart) ] + flutter_frontend_server(kernel_target) { + main_dart = invoker.main_dart + package_config = invoker.package_config + kernel_output = kernel_output + extra_args = extra_frontend_server_args } compiled_action(snapshot_target) { @@ -271,7 +340,7 @@ template("application_snapshot") { # Ensure the compiled appliation (e.g. frontend-server, ...) will use this # Dart SDK hash when consuming/producing kernel. # - # (Instead of ensuring every user of the "application_snapshot" passes it's + # (Instead of ensuring every user of the "application_snapshot" passes its # own) snapshot_vm_args += [ "-Dsdk_hash=$sdk_hash" ] diff --git a/common/config.gni b/common/config.gni index 56035f10a3961..41439fed9dc82 100644 --- a/common/config.gni +++ b/common/config.gni @@ -113,18 +113,27 @@ if (flutter_prebuilt_dart_sdk) { _host_os_name = "windows" } + # When building 32-bit Android development artifacts for Windows host (like + # gen_snapshot), the host_cpu is set to x86. However, the correct prebuilt + # Dart SDK to use during this build is still the 64-bit one. + _host_cpu = host_cpu + if (host_os == "win" && host_cpu == "x86") { + _host_cpu = "x64" + } + _target_prebuilt_dart_sdk_config = "$_target_os_name-$target_cpu" - _host_prebuilt_dart_sdk_config = "$_host_os_name-$host_cpu" + _host_prebuilt_dart_sdk_config = "$_host_os_name-$_host_cpu" target_prebuilt_dart_sdk = "//flutter/prebuilts/$_target_prebuilt_dart_sdk_config/dart-sdk" host_prebuilt_dart_sdk = "//flutter/prebuilts/$_host_prebuilt_dart_sdk_config/dart-sdk" - # There is no prebuilt Dart SDK targeting Fuchsia, but we also don't need - # one, so even when the build is targeting Fuchsia, use the prebuilt - # Dart SDK for the host. - if (current_toolchain == host_toolchain || is_fuchsia || is_wasm) { + # There is no prebuilt Dart SDK targeting Fuchsia, iOS, and Android, but we + # also don't need one, so even when the build is targeting one of these + # platforms, we use the prebuilt Dart SDK for the host. + if (current_toolchain == host_toolchain || target_os == "android" || + target_os == "fuchsia" || target_os == "ios" || target_os == "wasm") { prebuilt_dart_sdk = host_prebuilt_dart_sdk prebuilt_dart_sdk_config = _host_prebuilt_dart_sdk_config } else { diff --git a/flutter_frontend_server/BUILD.gn b/flutter_frontend_server/BUILD.gn index 9e986066595ab..29a50e31b4cda 100644 --- a/flutter_frontend_server/BUILD.gn +++ b/flutter_frontend_server/BUILD.gn @@ -2,19 +2,17 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//flutter/build/dart/rules.gni") +import("//flutter/common/config.gni") -application_snapshot("frontend_server") { - main_dart = "bin/starter.dart" - deps = [ "//flutter/lib/snapshot:kernel_platform_files" ] +copy("frontend_server") { + if (flutter_prebuilt_dart_sdk) { + snapshot = + "$host_prebuilt_dart_sdk/bin/snapshots/frontend_server.dart.snapshot" + } else { + deps = [ "//third_party/dart/utils/kernel-service:frontend_server" ] + snapshot = "$root_out_dir/frontend_server.dart.snapshot" + } - package_config = rebase_path(".dart_tool/package_config.json") - flutter_patched_sdk = rebase_path("$root_out_dir/flutter_patched_sdk") - training_args = [ - "--train", - "--sdk-root=$flutter_patched_sdk", - rebase_path(main_dart), - ] - - inputs = frontend_server_files + sources = [ snapshot ] + outputs = [ "$root_gen_dir/frontend_server.dart.snapshot" ] } diff --git a/flutter_frontend_server/README.md b/flutter_frontend_server/README.md deleted file mode 100644 index 3007831b924c6..0000000000000 --- a/flutter_frontend_server/README.md +++ /dev/null @@ -1,71 +0,0 @@ -# Frontend Server - -Frontend server is simple wrapper around Dart Frontend. It is a Dart application -that compiles Dart source into Dart Kernel binary (.dill-file). -Documentation on Dart Kernel (semantic, binary format, etc) can be found here: -https://github.com/dart-lang/sdk/wiki/Kernel-Documentation. - -Frontend server runs in two modes: - - immediate mode, where Dart source file name is provided as command line - argument; - - interactive mode, where communication is happening over stdin/stdout. - -## Interactive mode instructions - -### Compile/Recompile -``` -compile -``` - Compiles Dart source file with Dart Frontend. Replies with `result` response. - -``` -recompile - - -... - -``` - Incrementally recompiles Dart program previously compiled in current session, taking into account - changes in the listed files. Replies with `result` response. - - Relative paths should be relative to current working directory for the shell that launched - Frontend Server. - -### Accept/Reject -``` -accept -``` - Accepts results of incremental compilation, so that on next recompilation request Dart Frontend - will not include these recompiled files. -``` -reject -``` - Rejects results of incremental compilation, so that on next recompilation request Dart Frontend - will include compilation results from previously rejected recompilation in addition to what it - will recompile based on newly changed files. - Small technical detail is that Dart Frontend will not recompile files from previously rejected - recompilation attempts (unless they were changed since then), it will just include appropriate - kernel binaries it kept around from those previously rejected compilation requests. - - One use of `accept` and `reject` instructions is in the context of Dart VM hot-reload. Dart VM can - reject user-provided incremental change to what is currently running. It could happen for variety - of Dart VM internal reasons. For example, if incremental update changes some `class` to `enum`, - such update can not be hot-reloaded by VM at this point, will be rejected. - -### Quit -``` -quit -``` - Stops the server. - -## Response from the server - -``` -result - - [] -``` -Response from the Dart Frontend compiler is bracketed by `` tags. If the compiler -was able to produce a Dart Kernel file, the name of this file `` is provided too. -If the compiler encountered unrecoverable errors, there will be no output file name provided. - diff --git a/flutter_frontend_server/bin/starter.dart b/flutter_frontend_server/bin/starter.dart deleted file mode 100644 index e839087dd5d04..0000000000000 --- a/flutter_frontend_server/bin/starter.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - - -import 'dart:io'; - -import 'package:flutter_frontend_server/server.dart'; - -Future main(List args) async { - final int exitCode = await starter(args); - if (exitCode != 0) { - exit(exitCode); - } -} diff --git a/flutter_frontend_server/lib/server.dart b/flutter_frontend_server/lib/server.dart deleted file mode 100644 index 8733c5b7a9070..0000000000000 --- a/flutter_frontend_server/lib/server.dart +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// ignore_for_file: avoid_print - - -import 'dart:async'; -import 'dart:io' hide FileSystemEntity; - -import 'package:args/args.dart'; -import 'package:frontend_server/frontend_server.dart' as frontend - show - CompilerInterface, - FrontendCompiler, - argParser, - listenAndCompile, - usage; -import 'package:path/path.dart' as path; - -/// Entry point for this module, that creates `FrontendCompiler` instance and -/// processes user input. -/// `compiler` is an optional parameter so it can be replaced with mocked -/// version for testing. -Future starter( - List args, { - frontend.CompilerInterface? compiler, - Stream>? input, - StringSink? output, -}) async { - ArgResults options; - try { - options = frontend.argParser.parse(args); - } catch (error) { - print('ERROR: $error\n'); - print(frontend.usage); - return 1; - } - - if (options['train'] as bool) { - if (!options.rest.isNotEmpty) { - throw Exception('Must specify input.dart'); - } - - final String input = options.rest[0]; - final String sdkRoot = options['sdk-root'] as String; - final Directory temp = - Directory.systemTemp.createTempSync('train_frontend_server'); - try { - for (int i = 0; i < 3; i++) { - final String outputTrainingDill = path.join(temp.path, 'app.dill'); - options = frontend.argParser.parse([ - '--incremental', - '--sdk-root=$sdkRoot', - '--output-dill=$outputTrainingDill', - '--target=flutter', - '--track-widget-creation', - '--enable-asserts', - ]); - compiler ??= frontend.FrontendCompiler(output); - - await compiler.compile(input, options); - compiler.acceptLastDelta(); - await compiler.recompileDelta(); - compiler.acceptLastDelta(); - compiler.resetIncrementalCompiler(); - await compiler.recompileDelta(); - compiler.acceptLastDelta(); - await compiler.recompileDelta(); - compiler.acceptLastDelta(); - } - return 0; - } finally { - temp.deleteSync(recursive: true); - } - } - - compiler ??= frontend.FrontendCompiler(output, - useDebuggerModuleNames: options['debugger-module-names'] as bool, - emitDebugMetadata: options['experimental-emit-debug-metadata'] as bool, - unsafePackageSerialization: - options['unsafe-package-serialization'] as bool); - - if (options.rest.isNotEmpty) { - return await compiler.compile(options.rest[0], options) ? 0 : 254; - } - - final Completer completer = Completer(); - frontend.listenAndCompile(compiler, input ?? stdin, options, completer); - return completer.future; -} diff --git a/flutter_frontend_server/pubspec.yaml b/flutter_frontend_server/pubspec.yaml index 2f0d37c5583b7..16fd3ad7ee566 100644 --- a/flutter_frontend_server/pubspec.yaml +++ b/flutter_frontend_server/pubspec.yaml @@ -20,102 +20,20 @@ homepage: https://flutter.dev environment: sdk: '>=3.2.0-0 <4.0.0' -dependencies: - args: any - frontend_server: any - path: any - dev_dependencies: litetest: any + path: any dependency_overrides: - _fe_analyzer_shared: - path: ../../third_party/dart/pkg/_fe_analyzer_shared - _js_interop_checks: - path: ../../third_party/dart/pkg/_js_interop_checks - args: - path: ../../third_party/dart/third_party/pkg/args - async: - path: ../../third_party/dart/third_party/pkg/async async_helper: path: ../../third_party/dart/pkg/async_helper - bazel_worker: - path: ../../third_party/dart/third_party/pkg/bazel_worker - build_integration: - path: ../../third_party/dart/pkg/build_integration - collection: - path: ../../third_party/dart/third_party/pkg/collection - compiler: - path: ../../third_party/dart/pkg/compiler - crypto: - path: ../../third_party/dart/third_party/pkg/crypto - dart_internal: - path: ../../third_party/dart/pkg/dart_internal - dart2js_info: - path: ../../third_party/dart/pkg/dart2js_info - dart2wasm: - path: ../../third_party/dart/pkg/dart2wasm - dev_compiler: - path: ../../third_party/dart/pkg/dev_compiler expect: path: ../../third_party/dart/pkg/expect - ffi: - path: ../../third_party/dart/third_party/pkg/ffi - fixnum: - path: ../../third_party/dart/third_party/pkg/fixnum - front_end: - path: ../../third_party/dart/pkg/front_end - frontend_server: - path: ../../third_party/dart/pkg/frontend_server - http_parser: - path: ../../third_party/dart/third_party/pkg/http_parser - js_ast: - path: ../../third_party/dart/pkg/js_ast - js_runtime: - path: ../../third_party/dart/pkg/js_runtime - js_shared: - path: ../../third_party/dart/pkg/js_shared - kernel: - path: ../../third_party/dart/pkg/kernel litetest: path: ../testing/litetest meta: path: ../../third_party/dart/pkg/meta - mmap: - path: ../../third_party/dart/pkg/mmap - package_config: - path: ../../third_party/dart/third_party/pkg/package_config path: path: ../../third_party/dart/third_party/pkg/path - protobuf: - path: ../../third_party/dart/third_party/pkg/protobuf/protobuf - shelf: - path: ../../third_party/dart/third_party/pkg/shelf/pkgs/shelf smith: path: ../../third_party/dart/pkg/smith - source_maps: - path: ../../third_party/dart/third_party/pkg/source_maps - source_span: - path: ../../third_party/dart/third_party/pkg/source_span - stack_trace: - path: ../../third_party/dart/third_party/pkg/stack_trace - stream_channel: - path: ../../third_party/dart/third_party/pkg/stream_channel - string_scanner: - path: ../../third_party/dart/third_party/pkg/string_scanner - term_glyph: - path: ../../third_party/dart/third_party/pkg/term_glyph - typed_data: - path: ../../third_party/dart/third_party/pkg/typed_data - usage: - path: ../../third_party/dart/third_party/pkg/usage - vm: - path: ../../third_party/dart/pkg/vm - vm_service: - path: ../../third_party/dart/pkg/vm_service - vm_snapshot_analysis: - path: ../../third_party/dart/pkg/vm_snapshot_analysis - wasm_builder: - path: ../../third_party/dart/pkg/wasm_builder - yaml: - path: ../../third_party/dart/third_party/pkg/yaml diff --git a/testing/dart/BUILD.gn b/testing/dart/BUILD.gn index 2e1bb1ad38f67..d9bd962168333 100644 --- a/testing/dart/BUILD.gn +++ b/testing/dart/BUILD.gn @@ -2,7 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//flutter/testing/dart/compile_test.gni") +import("//flutter/build/dart/rules.gni") tests = [ "assets_test.dart", @@ -48,10 +48,10 @@ tests = [ ] foreach(test, tests) { - compile_flutter_dart_test("compile_$test") { - dart_file = test - dart_kernel = "$root_gen_dir/$test.dill" - packages = ".dart_tool/package_config.json" + flutter_frontend_server("compile_$test") { + main_dart = test + kernel_output = "$root_gen_dir/$test.dill" + package_config = ".dart_tool/package_config.json" } } diff --git a/testing/dart/compile_test.gni b/testing/dart/compile_test.gni deleted file mode 100644 index fbdf76ea849da..0000000000000 --- a/testing/dart/compile_test.gni +++ /dev/null @@ -1,91 +0,0 @@ -# Copyright 2013 The Flutter Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import("//build/compiled_action.gni") -import("//flutter/common/config.gni") -import("//third_party/dart/build/dart/dart_action.gni") -import("//third_party/dart/sdk_args.gni") - -import("//third_party/dart/build/dart/dart_action.gni") - -# Generates a Dart kernel snapshot using flutter_frontend_server. -# -# Arguments -# dart_main (required): The Main Dart file. -# -# dart_kernel (required): The path to the output kernel snapshot in the out -# directory. -# -# packages (required): The path to the .packages file. -template("compile_flutter_dart_test") { - assert(defined(invoker.dart_file), "The Dart test file must be specified.") - assert(defined(invoker.dart_kernel), - "The Dart Kernel file location must be specified.") - assert(defined(invoker.packages), - "The path to the .packages file must be specified.") - - common_deps = [ - "//flutter/flutter_frontend_server:frontend_server", - "//flutter/lib/snapshot:strong_platform", - ] - if (defined(invoker.deps)) { - common_deps += invoker.deps - } - - snapshot_depfile = - "$root_gen_dir/flutter/testing/snapshot_$target_name.depfile.d" - - common_vm_args = [ "--disable-dart-dev" ] - - flutter_patched_sdk = rebase_path("$root_out_dir/flutter_patched_sdk") - - common_args = [ - "--sound-null-safety", - "--sdk-root", - flutter_patched_sdk, - "--target=flutter", - "--packages", - rebase_path(invoker.packages), - "--depfile", - rebase_path(snapshot_depfile), - "--output-dill", - rebase_path(invoker.dart_kernel, root_out_dir), - rebase_path(invoker.dart_file), - ] - - if (flutter_prebuilt_dart_sdk) { - action(target_name) { - testonly = true - deps = common_deps - pool = "//flutter/build/dart:dart_pool" - script = "//build/gn_run_binary.py" - inputs = [ invoker.dart_file ] - outputs = [ invoker.dart_kernel ] - depfile = snapshot_depfile - - ext = "" - if (is_win) { - ext = ".exe" - } - dart = rebase_path("$host_prebuilt_dart_sdk/bin/dart$ext", root_out_dir) - frontend_server = - rebase_path("$root_gen_dir/frontend_server.dart.snapshot") - - args = [ dart ] + common_vm_args + [ frontend_server ] + common_args - } - } else { - dart_action(target_name) { - testonly = true - deps = common_deps - pool = "//flutter/build/dart:dart_pool" - script = "$root_gen_dir/frontend_server.dart.snapshot" - packages = rebase_path(invoker.packages) - inputs = [ invoker.dart_file ] - outputs = [ invoker.dart_kernel ] - depfile = snapshot_depfile - vm_args = common_vm_args - args = common_args - } - } -} diff --git a/testing/dart/observatory/BUILD.gn b/testing/dart/observatory/BUILD.gn index a0e6afbe6be17..35c573a85a4db 100644 --- a/testing/dart/observatory/BUILD.gn +++ b/testing/dart/observatory/BUILD.gn @@ -2,7 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//flutter/testing/dart/compile_test.gni") +import("//flutter/build/dart/rules.gni") tests = [ "skp_test.dart", @@ -12,10 +12,10 @@ tests = [ ] foreach(test, tests) { - compile_flutter_dart_test("compile_$test") { - dart_file = test - dart_kernel = "$root_gen_dir/$test.dill" - packages = "../.dart_tool/package_config.json" + flutter_frontend_server("compile_$test") { + main_dart = test + kernel_output = "$root_gen_dir/$test.dill" + package_config = "../.dart_tool/package_config.json" } } diff --git a/testing/smoke_test_failure/BUILD.gn b/testing/smoke_test_failure/BUILD.gn index 8110ea199fa16..1ce144ecc523a 100644 --- a/testing/smoke_test_failure/BUILD.gn +++ b/testing/smoke_test_failure/BUILD.gn @@ -2,15 +2,15 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//flutter/testing/dart/compile_test.gni") +import("//flutter/build/dart/rules.gni") tests = [ "fail_test.dart" ] foreach(test, tests) { - compile_flutter_dart_test("compile_$test") { - dart_file = test - dart_kernel = "$root_gen_dir/$test.dill" - packages = ".dart_tool/package_config.json" + flutter_frontend_server("compile_$test") { + main_dart = test + kernel_output = "$root_gen_dir/$test.dill" + package_config = ".dart_tool/package_config.json" } } diff --git a/testing/testing.gni b/testing/testing.gni index 7059bc15f017b..cf59753e51dc7 100644 --- a/testing/testing.gni +++ b/testing/testing.gni @@ -3,9 +3,8 @@ # found in the LICENSE file. import("//build/compiled_action.gni") +import("//flutter/build/dart/rules.gni") import("//flutter/common/config.gni") -import("//third_party/dart/build/dart/dart_action.gni") -import("//third_party/dart/sdk_args.gni") is_aot_test = flutter_runtime_mode == "profile" || flutter_runtime_mode == "release" @@ -51,48 +50,6 @@ template("fixtures_location") { } } -# Invokes the frontend server using the built Dart SDK or the prebuilt Dart SDK -# as appropriate. -# -# Parameters: -# The parameters testonly, deps, inputs, outputs, depfile, and args are -# forwarded from the invoker either to an 'action' target or a 'dart_action' -# target depending on whether a prebuilt Dart SDK is used or not, -# respectively. -template("_frontend_server") { - if (flutter_prebuilt_dart_sdk) { - action(target_name) { - testonly = invoker.testonly - deps = invoker.deps - script = "//build/gn_run_binary.py" - inputs = invoker.inputs - outputs = invoker.outputs - depfile = invoker.depfile - pool = "//flutter/build/dart:dart_pool" - - ext = "" - if (is_win) { - ext = ".exe" - } - dart = rebase_path("$host_prebuilt_dart_sdk/bin/dart$ext", root_out_dir) - frontend_server = rebase_path( - "$host_prebuilt_dart_sdk/bin/snapshots/frontend_server.dart.snapshot") - - args = [ - dart, - frontend_server, - ] + invoker.args - } - } else { - dart_action(target_name) { - forward_variables_from(invoker, "*") - deps += [ "//third_party/dart/utils/kernel-service:frontend_server" ] - script = "$root_out_dir/frontend_server.dart.snapshot" - pool = "//flutter/build/dart:dart_pool" - } - } -} - # Generates the Dart kernel snapshot. # # Arguments @@ -107,45 +64,26 @@ template("dart_snapshot_kernel") { assert(defined(invoker.dart_kernel), "The Dart Kernel file location must be specified") - _frontend_server(target_name) { - testonly = true - - deps = [ "//flutter/lib/snapshot:strong_platform" ] - - inputs = [ invoker.dart_main ] - - outputs = [ invoker.dart_kernel ] + args = [] + if (flutter_runtime_mode == "release" || + flutter_runtime_mode == "jit_release") { + args += [ "-Ddart.vm.product=true" ] + } - snapshot_depfile = "$target_gen_dir/snapshot_$target_name.depfile.d" - depfile = snapshot_depfile + if (is_aot_test) { + args += [ + "--aot", - args = [ - "--sdk-root", - rebase_path("$root_out_dir/flutter_patched_sdk"), - "--target", - "flutter", - "--sound-null-safety", - "--output-dill", - rebase_path(invoker.dart_kernel, root_out_dir), - "--depfile", - rebase_path(snapshot_depfile), + # type flow analysis + "--tfa", ] + } - if (flutter_runtime_mode == "release" || - flutter_runtime_mode == "jit_release") { - args += [ "-Ddart.vm.product=true" ] - } - - if (is_aot_test) { - args += [ - "--aot", - - # type flow analysis - "--tfa", - ] - } - - args += [ rebase_path(invoker.dart_main) ] + flutter_frontend_server(target_name) { + testonly = true + main_dart = invoker.dart_main + kernel_output = invoker.dart_kernel + extra_args = args } } diff --git a/tools/gn b/tools/gn index 196219d35d611..4eed7044d185f 100755 --- a/tools/gn +++ b/tools/gn @@ -106,16 +106,12 @@ def is_host_build(args): # Determines whether a prebuilt Dart SDK can be used instead of building one. -# We can use a prebuilt Dart SDK when: -# 1. It is a host build, a build targeting Fuchsia, or a build targeting desktop. -# 2. The prebuilt SDK exists under //flutter/prebuilts/$OS-$ARCH. def can_use_prebuilt_dart(args): prebuilt = None - # In a Fuchsia build, we can use a prebuilt Dart SDK for the host to build - # platform agnostic artifacts (e.g. kernel snapshots), and a Dart SDK - # targeting Fuchsia is not needed. So, it is safe to say that the prebuilt - # Dart SDK in a Fuchsia build is the host prebuilt Dart SDK. - if args.target_os is None or args.target_os == 'fuchsia': + # When doing a 'host' build (args.target_os is None), or a build when the + # target OS and host OS are different, the prebuilt Dart SDK is the Dart SDK + # for the host system's OS and archetecture. + if args.target_os is None or args.target_os in ['android', 'ios', 'fuchsia']: if sys.platform.startswith(('cygwin', 'win')): prebuilt = 'windows-x64' elif sys.platform == 'darwin': From 6fabd199ca3d8c7a869cfe48056a0283d87a0420 Mon Sep 17 00:00:00 2001 From: LongCatIsLooong <31859944+LongCatIsLooong@users.noreply.github.com> Date: Wed, 18 Oct 2023 13:33:14 -0700 Subject: [PATCH 755/859] [iOS TextInputPlugin] adjust the markedTextRange when replacing text. (#46603) Fixes https://github.com/flutter/flutter/issues/130880 , by making sure when the text is cleared the `markedTextRange` is cleared with it. `[UITextField replaceRange:withText:]` always sets the selection range to the end of the replacement text, and removes the current `markedTextRange`. This PR makes the input plugin do the same in the `replaceRange:withText:` implementation. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- .../framework/Source/FlutterTextInputPlugin.h | 1 - .../Source/FlutterTextInputPlugin.mm | 66 ++++++++----------- .../Source/FlutterTextInputPluginTest.mm | 19 ++++++ 3 files changed, 46 insertions(+), 40 deletions(-) diff --git a/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.h b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.h index 96eff563e0850..a7a996cb39995 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.h +++ b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.h @@ -128,7 +128,6 @@ FLUTTER_DARWIN_EXPORT // UITextInput @property(nonatomic, readonly) NSMutableString* text; -@property(nonatomic, readonly) NSMutableString* markedText; @property(readwrite, copy) UITextRange* selectedTextRange; @property(nonatomic, strong) UITextRange* markedTextRange; @property(nonatomic, copy) NSDictionary* markedTextStyle; diff --git a/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm index e2fe1334ff1ff..c206e7a5a6513 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm @@ -814,7 +814,6 @@ - (instancetype)initWithOwner:(FlutterTextInputPlugin*)textInputPlugin { // UITextInput _text = [[NSMutableString alloc] init]; - _markedText = [[NSMutableString alloc] init]; _selectedTextRange = [[FlutterTextRange alloc] initWithNSRange:NSMakeRange(0, 0)]; _markedRect = kInvalidFirstRect; _cachedFirstRect = kInvalidFirstRect; @@ -1249,25 +1248,17 @@ - (NSString*)textInRange:(UITextRange*)range { // Replace the text within the specified range with the given text, // without notifying the framework. - (void)replaceRangeLocal:(NSRange)range withText:(NSString*)text { - NSRange selectedRange = _selectedTextRange.range; - - // Adjust the text selection: - // * reduce the length by the intersection length - // * adjust the location by newLength - oldLength + intersectionLength - NSRange intersectionRange = NSIntersectionRange(range, selectedRange); - if (range.location <= selectedRange.location) { - selectedRange.location += text.length - range.length; - } - if (intersectionRange.location != NSNotFound) { - selectedRange.location += intersectionRange.length; - selectedRange.length -= intersectionRange.length; - } - [self.text replaceCharactersInRange:[self clampSelection:range forText:self.text] withString:text]; - [self setSelectedTextRangeLocal:[FlutterTextRange - rangeWithNSRange:[self clampSelection:selectedRange - forText:self.text]]]; + + // Adjust the selected range and the marked text range. There's no + // documentation but UITextField always sets markedTextRange to nil, + // and collapses the selection to the end of the new replacement text. + const NSRange newSelectionRange = + [self clampSelection:NSMakeRange(range.location + text.length, 0) forText:self.text]; + + [self setSelectedTextRangeLocal:[FlutterTextRange rangeWithNSRange:newSelectionRange]]; + self.markedTextRange = nil; } - (void)replaceRange:(UITextRange*)range withText:(NSString*)text { @@ -1345,11 +1336,10 @@ - (BOOL)shouldChangeTextInRange:(UITextRange*)range replacementText:(NSString*)t return YES; } +// Either replaces the existing marked text or, if none is present, inserts it in +// place of the current selection. - (void)setMarkedText:(NSString*)markedText selectedRange:(NSRange)markedSelectedRange { NSString* textBeforeChange = [self.text copy]; - NSRange selectedRange = _selectedTextRange.range; - NSRange markedTextRange = ((FlutterTextRange*)self.markedTextRange).range; - NSRange actualReplacedRange; if (_scribbleInteractionStatus != FlutterScribbleInteractionStatusNone || _scribbleFocusStatus != FlutterScribbleFocusStatusUnfocused) { @@ -1360,26 +1350,24 @@ - (void)setMarkedText:(NSString*)markedText selectedRange:(NSRange)markedSelecte markedText = @""; } - if (markedTextRange.length > 0) { - // Replace text in the marked range with the new text. - [self replaceRangeLocal:markedTextRange withText:markedText]; - actualReplacedRange = markedTextRange; - markedTextRange.length = markedText.length; - } else { - // Replace text in the selected range with the new text. - actualReplacedRange = selectedRange; - [self replaceRangeLocal:selectedRange withText:markedText]; - markedTextRange = NSMakeRange(selectedRange.location, markedText.length); - } + const FlutterTextRange* currentMarkedTextRange = (FlutterTextRange*)self.markedTextRange; + const NSRange& actualReplacedRange = currentMarkedTextRange && !currentMarkedTextRange.isEmpty + ? currentMarkedTextRange.range + : _selectedTextRange.range; + // No need to call replaceRangeLocal as this method always adjusts the + // selected/marked text ranges anyways. + [self.text replaceCharactersInRange:actualReplacedRange withString:markedText]; + const NSRange newMarkedRange = NSMakeRange(actualReplacedRange.location, markedText.length); self.markedTextRange = - markedTextRange.length > 0 ? [FlutterTextRange rangeWithNSRange:markedTextRange] : nil; - - NSUInteger selectionLocation = markedSelectedRange.location + markedTextRange.location; - selectedRange = NSMakeRange(selectionLocation, markedSelectedRange.length); - [self setSelectedTextRangeLocal:[FlutterTextRange - rangeWithNSRange:[self clampSelection:selectedRange - forText:self.text]]]; + newMarkedRange.length > 0 ? [FlutterTextRange rangeWithNSRange:newMarkedRange] : nil; + + [self setSelectedTextRangeLocal: + [FlutterTextRange + rangeWithNSRange:[self clampSelection:NSMakeRange(markedSelectedRange.location + + newMarkedRange.location, + markedSelectedRange.length) + forText:self.text]]]; if (_enableDeltaModel) { NSRange nextReplaceRange = [self clampSelection:actualReplacedRange forText:textBeforeChange]; [self updateEditingStateWithDelta:flutter::TextEditingDelta( diff --git a/shell/platform/darwin/ios/framework/Source/FlutterTextInputPluginTest.mm b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPluginTest.mm index b4d6dcb7e078f..f98571d5c279f 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterTextInputPluginTest.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPluginTest.mm @@ -786,6 +786,25 @@ - (void)testDisablingAutocorrectDisablesSpellChecking { XCTAssertEqual(inputView.spellCheckingType, UITextSpellCheckingTypeNo); } +- (void)testReplaceTestLocalAdjustSelectionAndMarkedTextRange { + FlutterTextInputView* inputView = [[FlutterTextInputView alloc] initWithOwner:textInputPlugin]; + [inputView setMarkedText:@"test text" selectedRange:NSMakeRange(0, 5)]; + NSRange selectedTextRange = ((FlutterTextRange*)inputView.selectedTextRange).range; + const NSRange markedTextRange = ((FlutterTextRange*)inputView.markedTextRange).range; + XCTAssertEqual(selectedTextRange.location, 0ul); + XCTAssertEqual(selectedTextRange.length, 5ul); + XCTAssertEqual(markedTextRange.location, 0ul); + XCTAssertEqual(markedTextRange.length, 9ul); + + // Replaces space with space. + [inputView replaceRange:[FlutterTextRange rangeWithNSRange:NSMakeRange(4, 1)] withText:@" "]; + selectedTextRange = ((FlutterTextRange*)inputView.selectedTextRange).range; + + XCTAssertEqual(selectedTextRange.location, 5ul); + XCTAssertEqual(selectedTextRange.length, 0ul); + XCTAssertEqual(inputView.markedTextRange, nil); +} + - (void)testFlutterTextInputViewOnlyRespondsToInsertionPointColorBelowIOS17 { FlutterTextInputView* inputView = [[FlutterTextInputView alloc] initWithOwner:textInputPlugin]; BOOL respondsToInsertionPointColor = From 97d7c7aa03a41614f2b7b90b94d0990b9ccb6ef6 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 18 Oct 2023 17:06:17 -0400 Subject: [PATCH 756/859] Roll Skia from ef0e93524e7d to d46a3697d3c5 (2 revisions) (#47072) https://skia.googlesource.com/skia.git/+log/ef0e93524e7d..d46a3697d3c5 2023-10-18 jvanverth@google.com [graphite] Add PerEdgeAAQuadRenderStep. 2023-10-18 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll Dawn from 54c4b89e2ac3 to 4885e1405318 (8 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index e6464d1976fe7..8f62be22e7e09 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'ef0e93524e7d1e0c165d42b0a2cecd441af04d0b', + 'skia_revision': 'd46a3697d3c5d612a4d173c2b63d1a3e235c5018', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 627b891a4e550..5be46ef0b1672 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 725088472df0cb29d651731f52e2a428 +Signature: 68922caadf709a21d698c500396c2b3a ==================================================================================================== LIBRARY: etc1 @@ -8937,6 +8937,8 @@ ORIGIN: ../../../third_party/skia/src/gpu/graphite/geom/EdgeAAQuad.h + ../../../ ORIGIN: ../../../third_party/skia/src/gpu/graphite/render/CoverageMaskRenderStep.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/graphite/render/CoverageMaskRenderStep.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/graphite/render/GraphiteVertexFiller.cpp + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/gpu/graphite/render/PerEdgeAAQuadRenderStep.cpp + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/gpu/graphite/render/PerEdgeAAQuadRenderStep.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/graphite/vk/VulkanDescriptorPool.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/graphite/vk/VulkanDescriptorPool.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/gpu/graphite/vk/VulkanDescriptorSet.cpp + ../../../third_party/skia/LICENSE @@ -9205,6 +9207,8 @@ FILE: ../../../third_party/skia/src/gpu/graphite/geom/EdgeAAQuad.h FILE: ../../../third_party/skia/src/gpu/graphite/render/CoverageMaskRenderStep.cpp FILE: ../../../third_party/skia/src/gpu/graphite/render/CoverageMaskRenderStep.h FILE: ../../../third_party/skia/src/gpu/graphite/render/GraphiteVertexFiller.cpp +FILE: ../../../third_party/skia/src/gpu/graphite/render/PerEdgeAAQuadRenderStep.cpp +FILE: ../../../third_party/skia/src/gpu/graphite/render/PerEdgeAAQuadRenderStep.h FILE: ../../../third_party/skia/src/gpu/graphite/vk/VulkanDescriptorPool.cpp FILE: ../../../third_party/skia/src/gpu/graphite/vk/VulkanDescriptorPool.h FILE: ../../../third_party/skia/src/gpu/graphite/vk/VulkanDescriptorSet.cpp From 8d2fadcd5b6df0a650cb5ae3be8f594d15c228bb Mon Sep 17 00:00:00 2001 From: Tong Mu Date: Wed, 18 Oct 2023 14:09:01 -0700 Subject: [PATCH 757/859] Reland 2 (part 1): Enforce the rule of calling `FlutterView.Render` (#47062) This PR relands part of https://github.com/flutter/engine/pull/45300, which was reverted in https://github.com/flutter/engine/pull/46919 due to performance regression. Due to how little and trivial production code the original PR touches, I really couldn't figure out the exact line that caused it except through experimentation, which requires changes to be officially landed on the main branch. After this PR lands, I'll immediately fire a performance test. This PR contains the `Shell` refactor of the original PR. I made a slight change where the isolate snapshot is no longer returned through return value, but the parameter, in order to avoid the overhead of assigning. It is intentional to not contain any unit tests or other changes of the original PR. They will be landed shortly after this PR. Part of https://github.com/flutter/flutter/issues/136826. ## Pre-launch Checklist - [ ] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [ ] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [ ] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [ ] I listed at least one issue that this PR fixes in the description above. - [ ] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [ ] I updated/added relevant documentation (doc comments with `///`). - [ ] I signed the [CLA]. - [ ] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat --- shell/common/shell.cc | 31 ++++++++++++++++++------------- shell/common/shell.h | 38 +++++++++++++++++++++++++++----------- 2 files changed, 45 insertions(+), 24 deletions(-) diff --git a/shell/common/shell.cc b/shell/common/shell.cc index a7f7c9ae4c782..a6ba487b581f7 100644 --- a/shell/common/shell.cc +++ b/shell/common/shell.cc @@ -144,31 +144,36 @@ void PerformInitializationTasks(Settings& settings) { } // namespace -std::unique_ptr Shell::Create( - const PlatformData& platform_data, - const TaskRunners& task_runners, - Settings settings, - const Shell::CreateCallback& on_create_platform_view, - const Shell::CreateCallback& on_create_rasterizer, - bool is_gpu_disabled) { - // This must come first as it initializes tracing. - PerformInitializationTasks(settings); - - TRACE_EVENT0("flutter", "Shell::Create"); - +std::pair> +Shell::InferVmInitDataFromSettings(Settings& settings) { // Always use the `vm_snapshot` and `isolate_snapshot` provided by the // settings to launch the VM. If the VM is already running, the snapshot // arguments are ignored. auto vm_snapshot = DartSnapshot::VMSnapshotFromSettings(settings); auto isolate_snapshot = DartSnapshot::IsolateSnapshotFromSettings(settings); auto vm = DartVMRef::Create(settings, vm_snapshot, isolate_snapshot); - FML_CHECK(vm) << "Must be able to initialize the VM."; // If the settings did not specify an `isolate_snapshot`, fall back to the // one the VM was launched with. if (!isolate_snapshot) { isolate_snapshot = vm->GetVMData()->GetIsolateSnapshot(); } + return {std::move(vm), isolate_snapshot}; +} + +std::unique_ptr Shell::Create( + const PlatformData& platform_data, + const TaskRunners& task_runners, + Settings settings, + const Shell::CreateCallback& on_create_platform_view, + const Shell::CreateCallback& on_create_rasterizer, + bool is_gpu_disabled) { + // This must come first as it initializes tracing. + PerformInitializationTasks(settings); + + TRACE_EVENT0("flutter", "Shell::Create"); + + auto [vm, isolate_snapshot] = InferVmInitDataFromSettings(settings); auto resource_cache_limit_calculator = std::make_shared( settings.resource_cache_max_bytes_threshold); diff --git a/shell/common/shell.h b/shell/common/shell.h index 039eb653a05e7..9eb5bd1e9b226 100644 --- a/shell/common/shell.h +++ b/shell/common/shell.h @@ -438,15 +438,29 @@ class Shell final : public PlatformView::Delegate, const std::shared_ptr GetConcurrentWorkerTaskRunner() const; + // Infer the VM ref and the isolate snapshot based on the settings. + // + // If the VM is already running, the settings are ignored, but the returned + // isolate snapshot always prioritize what is specified by the settings, and + // falls back to the one VM was launched with. + // + // This function is what Shell::Create uses to infer snapshot settings. + // + // TODO(dkwingsmt): Extracting this method is part of a bigger change. If the + // entire change is not eventually landed, we should merge this method back + // to Create. https://github.com/flutter/flutter/issues/136826 + static std::pair> + InferVmInitDataFromSettings(Settings& settings); + private: using ServiceProtocolHandler = std::function; /// A collection of message channels (by name) that have sent at least one - /// message from a non-platform thread. Used to prevent printing the error log - /// more than once per channel, as a badly behaving plugin may send multiple - /// messages per second indefinitely. + /// message from a non-platform thread. Used to prevent printing the error + /// log more than once per channel, as a badly behaving plugin may send + /// multiple messages per second indefinitely. std::mutex misbehaving_message_channels_mutex_; std::set misbehaving_message_channels_; const TaskRunners task_runners_; @@ -497,19 +511,20 @@ class Shell final : public PlatformView::Delegate, bool frame_timings_report_scheduled_ = false; // Vector of FrameTiming::kCount * n timestamps for n frames whose timings - // have not been reported yet. Vector of ints instead of FrameTiming is stored - // here for easier conversions to Dart objects. + // have not been reported yet. Vector of ints instead of FrameTiming is + // stored here for easier conversions to Dart objects. std::vector unreported_timings_; - /// Manages the displays. This class is thread safe, can be accessed from any - /// of the threads. + /// Manages the displays. This class is thread safe, can be accessed from + /// any of the threads. std::unique_ptr display_manager_; // protects expected_frame_size_ which is set on platform thread and read on // raster thread std::mutex resize_mutex_; - // used to discard wrong size layer tree produced during interactive resizing + // used to discard wrong size layer tree produced during interactive + // resizing std::unordered_map expected_frame_sizes_; // Used to communicate the right frame bounds via service protocol. @@ -746,7 +761,8 @@ class Shell final : public PlatformView::Delegate, // Service protocol handler // - // The returned SkSLs are base64 encoded. Decode before storing them to files. + // The returned SkSLs are base64 encoded. Decode before storing them to + // files. bool OnServiceProtocolGetSkSLs( const ServiceProtocol::Handler::ServiceProtocolMap& params, rapidjson::Document* response); @@ -767,8 +783,8 @@ class Shell final : public PlatformView::Delegate, // Service protocol handler // - // Forces the FontCollection to reload the font manifest. Used to support hot - // reload for fonts. + // Forces the FontCollection to reload the font manifest. Used to support + // hot reload for fonts. bool OnServiceProtocolReloadAssetFonts( const ServiceProtocol::Handler::ServiceProtocolMap& params, rapidjson::Document* response); From e9bfca2f28aaa5346740ed5b4df50e11ab083080 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 18 Oct 2023 17:40:46 -0400 Subject: [PATCH 758/859] Roll Dart SDK from b423d5753fdc to d9b1e60fe442 (1 revision) (#47073) https://dart.googlesource.com/sdk.git/+log/b423d5753fdc..d9b1e60fe442 2023-10-18 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-41.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jimgraham@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 8f62be22e7e09..fea79e05095e7 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': 'b423d5753fdc4a233f0965fe825dd0297b5dc6f5', + 'dart_revision': 'd9b1e60fe44296f864ee0dbf158ab5cfbab25119', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index 499ab752adbd1..95fa9e59a6db1 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: c74e00a0506ba58c362410dbb667f4f5 +Signature: e736ca6a62093d9e895265ace619ecec ==================================================================================================== LIBRARY: dart From f1c957ee1823b0263109dde96c981ad52aca0cfb Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 18 Oct 2023 17:51:15 -0400 Subject: [PATCH 759/859] Roll Skia from d46a3697d3c5 to d561b276b5d9 (1 revision) (#47074) https://skia.googlesource.com/skia.git/+log/d46a3697d3c5..d561b276b5d9 2023-10-18 brianosman@google.com Remove obsolete SkColorSpace deserialization code If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index fea79e05095e7..b6a3f027a0248 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'd46a3697d3c5d612a4d173c2b63d1a3e235c5018', + 'skia_revision': 'd561b276b5d91ff0a6d5efe1024eecd7ff93b196', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 5be46ef0b1672..b5c399da20109 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 68922caadf709a21d698c500396c2b3a +Signature: 1c448c583993e17021ff678a7be92323 ==================================================================================================== LIBRARY: etc1 From 7aacab4d43f5281fbb12a695960f506866b5f341 Mon Sep 17 00:00:00 2001 From: Matej Knopp Date: Thu, 19 Oct 2023 00:52:53 +0300 Subject: [PATCH 760/859] [web] Ensure handled key event is not propagated to IME (#46829) Fixes [136460](https://github.com/flutter/flutter/issues/136460) Changes: - Raw keyboard event is handled during capture phase. This is to ensure that the framework processes the event before reaching to IME text area and raw keyboard can stop the propagation for handled events. - `RawKeyboard` event handler is invoked from `KeyboardBinding` event handler. This is to prevent race condition because both handlers now run in capture phase and `KeyboardBinding` needs to process the event first. *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].* ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I signed the [CLA]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat --- .../lib/src/engine/keyboard_binding.dart | 9 +++- lib/web_ui/lib/src/engine/raw_keyboard.dart | 23 ++------- .../test/common/keyboard_test_common.dart | 7 +++ lib/web_ui/test/engine/raw_keyboard_test.dart | 4 ++ lib/web_ui/test/engine/text_editing_test.dart | 48 +++++++++++++++++++ .../lib/web_locale_keymap/locale_keymap.dart | 3 ++ 6 files changed, 74 insertions(+), 20 deletions(-) diff --git a/lib/web_ui/lib/src/engine/keyboard_binding.dart b/lib/web_ui/lib/src/engine/keyboard_binding.dart index 7a851b16c2deb..c12d1a36a9f8b 100644 --- a/lib/web_ui/lib/src/engine/keyboard_binding.dart +++ b/lib/web_ui/lib/src/engine/keyboard_binding.dart @@ -13,6 +13,7 @@ import 'browser_detection.dart'; import 'dom.dart'; import 'key_map.g.dart'; import 'platform_dispatcher.dart'; +import 'raw_keyboard.dart'; import 'semantics.dart'; typedef _VoidCallback = void Function(); @@ -104,9 +105,12 @@ class KeyboardBinding { _addEventListener('keydown', (DomEvent domEvent) { final FlutterHtmlKeyboardEvent event = FlutterHtmlKeyboardEvent(domEvent as DomKeyboardEvent); _converter.handleEvent(event); + RawKeyboard.instance?.handleHtmlEvent(domEvent); }); - _addEventListener('keyup', (DomEvent event) { - _converter.handleEvent(FlutterHtmlKeyboardEvent(event as DomKeyboardEvent)); + _addEventListener('keyup', (DomEvent domEvent) { + final FlutterHtmlKeyboardEvent event = FlutterHtmlKeyboardEvent(domEvent as DomKeyboardEvent); + _converter.handleEvent(event); + RawKeyboard.instance?.handleHtmlEvent(domEvent); }); } @@ -209,6 +213,7 @@ class FlutterHtmlKeyboardEvent { bool getModifierState(String key) => _event.getModifierState(key); void preventDefault() => _event.preventDefault(); + void stopPropagation() => _event.stopPropagation(); bool get defaultPrevented => _event.defaultPrevented; } diff --git a/lib/web_ui/lib/src/engine/raw_keyboard.dart b/lib/web_ui/lib/src/engine/raw_keyboard.dart index b299437b21f0e..d4aa87b6bbc90 100644 --- a/lib/web_ui/lib/src/engine/raw_keyboard.dart +++ b/lib/web_ui/lib/src/engine/raw_keyboard.dart @@ -15,15 +15,6 @@ import 'services.dart'; /// Provides keyboard bindings, such as the `flutter/keyevent` channel. class RawKeyboard { RawKeyboard._(this._onMacOs) { - _keydownListener = createDomEventListener((DomEvent event) { - _handleHtmlEvent(event); - }); - domWindow.addEventListener('keydown', _keydownListener); - - _keyupListener = createDomEventListener((DomEvent event) { - _handleHtmlEvent(event); - }); - domWindow.addEventListener('keyup', _keyupListener); registerHotRestartListener(() { dispose(); }); @@ -34,6 +25,9 @@ class RawKeyboard { /// Use the [instance] getter to get the singleton after calling this method. static void initialize({bool onMacOs = false}) { _instance ??= RawKeyboard._(onMacOs); + // KeyboardBinding is responsible for forwarding the keyboard + // events to the RawKeyboard handler. + KeyboardBinding.initInstance(); } /// The [RawKeyboard] singleton. @@ -46,24 +40,16 @@ class RawKeyboard { /// if no repeat events were received. final Map _keydownTimers = {}; - DomEventListener? _keydownListener; - DomEventListener? _keyupListener; - /// Uninitializes the [RawKeyboard] singleton. /// /// After calling this method this object becomes unusable and [instance] /// becomes `null`. Call [initialize] again to initialize a new singleton. void dispose() { - domWindow.removeEventListener('keydown', _keydownListener); - domWindow.removeEventListener('keyup', _keyupListener); - for (final String key in _keydownTimers.keys) { _keydownTimers[key]!.cancel(); } _keydownTimers.clear(); - _keydownListener = null; - _keyupListener = null; _instance = null; } @@ -96,7 +82,7 @@ class RawKeyboard { return event.type == 'keydown' && event.key == 'Tab' && event.isComposing; } - void _handleHtmlEvent(DomEvent domEvent) { + void handleHtmlEvent(DomEvent domEvent) { if (!domInstanceOfString(domEvent, 'KeyboardEvent')) { return; } @@ -158,6 +144,7 @@ class RawKeyboard { if (jsonResponse['handled'] as bool) { // If the framework handled it, then don't propagate it any further. event.preventDefault(); + event.stopPropagation(); } }, ); diff --git a/lib/web_ui/test/common/keyboard_test_common.dart b/lib/web_ui/test/common/keyboard_test_common.dart index 0b447d8b3b5e7..0ec1e5d75acb9 100644 --- a/lib/web_ui/test/common/keyboard_test_common.dart +++ b/lib/web_ui/test/common/keyboard_test_common.dart @@ -22,6 +22,7 @@ class MockKeyboardEvent implements FlutterHtmlKeyboardEvent { bool altGrKey = false, this.location = 0, this.onPreventDefault, + this.onStopPropagation, }) : modifierState = { if (altKey) 'Alt', @@ -84,6 +85,12 @@ class MockKeyboardEvent implements FlutterHtmlKeyboardEvent { bool get defaultPrevented => _defaultPrevented; bool _defaultPrevented = false; + @override + void stopPropagation() { + onStopPropagation?.call(); + } + VoidCallback? onStopPropagation; + static bool get lastDefaultPrevented => _lastEvent?.defaultPrevented ?? false; static MockKeyboardEvent? _lastEvent; } diff --git a/lib/web_ui/test/engine/raw_keyboard_test.dart b/lib/web_ui/test/engine/raw_keyboard_test.dart index d9f4cd0fe4036..0b1681b04042b 100644 --- a/lib/web_ui/test/engine/raw_keyboard_test.dart +++ b/lib/web_ui/test/engine/raw_keyboard_test.dart @@ -52,6 +52,10 @@ void testMain() { DomKeyboardEvent event; + // Dispatch a keydown event first so that KeyboardBinding will recognize the keyup event. + // and will not set preventDefault on it. + event = dispatchKeyboardEvent('keydown', key: 'SomeKey', code: 'SomeCode', keyCode: 1); + event = dispatchKeyboardEvent('keyup', key: 'SomeKey', code: 'SomeCode', keyCode: 1); expect(event.defaultPrevented, isFalse); diff --git a/lib/web_ui/test/engine/text_editing_test.dart b/lib/web_ui/test/engine/text_editing_test.dart index a6e5f02c0a33b..37d44b3f321ed 100644 --- a/lib/web_ui/test/engine/text_editing_test.dart +++ b/lib/web_ui/test/engine/text_editing_test.dart @@ -12,12 +12,14 @@ import 'package:test/test.dart'; import 'package:ui/src/engine.dart' show flutterViewEmbedder; import 'package:ui/src/engine/browser_detection.dart'; import 'package:ui/src/engine/dom.dart'; +import 'package:ui/src/engine/raw_keyboard.dart'; import 'package:ui/src/engine/services.dart'; import 'package:ui/src/engine/text_editing/autofill_hint.dart'; import 'package:ui/src/engine/text_editing/input_type.dart'; import 'package:ui/src/engine/text_editing/text_editing.dart'; import 'package:ui/src/engine/util.dart'; import 'package:ui/src/engine/vector_math.dart'; +import 'package:ui/ui.dart' as ui; import '../common/spy.dart'; import '../common/test_initialization.dart'; @@ -370,6 +372,52 @@ Future testMain() async { expect(lastInputAction, 'TextInputAction.done'); }); + test('handling keyboard event prevents triggering input action', () { + final ui.PlatformMessageCallback? savedCallback = ui.window.onPlatformMessage; + + bool markTextEventHandled = false; + ui.window.onPlatformMessage = (String channel, ByteData? data, + ui.PlatformMessageResponseCallback? callback) { + final ByteData response = const JSONMessageCodec() + .encodeMessage({'handled': markTextEventHandled})!; + callback!(response); + }; + RawKeyboard.initialize(); + + final InputConfiguration config = InputConfiguration(); + editingStrategy!.enable( + config, + onChange: trackEditingState, + onAction: trackInputAction, + ); + + // No input action so far. + expect(lastInputAction, isNull); + + markTextEventHandled = true; + dispatchKeyboardEvent( + editingStrategy!.domElement!, + 'keydown', + keyCode: _kReturnKeyCode, + ); + + // Input action prevented by platform message callback. + expect(lastInputAction, isNull); + + markTextEventHandled = false; + dispatchKeyboardEvent( + editingStrategy!.domElement!, + 'keydown', + keyCode: _kReturnKeyCode, + ); + + // Input action received. + expect(lastInputAction, 'TextInputAction.done'); + + ui.window.onPlatformMessage = savedCallback; + RawKeyboard.instance?.dispose(); + }); + test('Triggers input action in multi-line mode', () { final InputConfiguration config = InputConfiguration( inputType: EngineInputType.multiline, diff --git a/third_party/web_locale_keymap/lib/web_locale_keymap/locale_keymap.dart b/third_party/web_locale_keymap/lib/web_locale_keymap/locale_keymap.dart index dd2faa527fc2a..5c261f665571f 100644 --- a/third_party/web_locale_keymap/lib/web_locale_keymap/locale_keymap.dart +++ b/third_party/web_locale_keymap/lib/web_locale_keymap/locale_keymap.dart @@ -41,6 +41,9 @@ class LocaleKeymap { return eventKeyCode; } if (result == null) { + if ((eventCode ?? '').isEmpty && (eventKey ?? '').isEmpty) { + return null; + } final int? heuristicResult = heuristicMapper(eventCode ?? '', eventKey ?? ''); if (heuristicResult != null) { return heuristicResult; From 9601db12fc1f272f4798f911203542ee0742e421 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Wed, 18 Oct 2023 15:13:22 -0700 Subject: [PATCH 761/859] [Impeller] Document ReactorGLES. (#47070) --- impeller/renderer/backend/gles/reactor_gles.h | 168 +++++++++++++++++- 1 file changed, 166 insertions(+), 2 deletions(-) diff --git a/impeller/renderer/backend/gles/reactor_gles.h b/impeller/renderer/backend/gles/reactor_gles.h index 801542b4fb27a..3715e47a14fd8 100644 --- a/impeller/renderer/backend/gles/reactor_gles.h +++ b/impeller/renderer/backend/gles/reactor_gles.h @@ -15,43 +15,207 @@ namespace impeller { +//------------------------------------------------------------------------------ +/// @brief The reactor attempts to make thread-safe usage of OpenGL ES +/// easier to reason about. +/// +/// In the other Impeller backends (like Metal and Vulkan), +/// resources can be created, used, and deleted on any thread with +/// relatively few restrictions. However, OpenGL resources can only +/// be created, used, and deleted on a thread on which an OpenGL +/// context (or one in the same sharegroup) is current. +/// +/// There aren't too many OpenGL contexts to go around and making +/// the caller reason about the timing and threading requirement +/// only when the OpenGL backend is in use is tedious. To work +/// around this tedium, there is an abstraction between the +/// resources and their handles in OpenGL. The reactor is this +/// abstraction. +/// +/// The reactor is thread-safe and can created, used, and collected +/// on any thread. +/// +/// Reactor handles `HandleGLES` can be created, used, and collected +/// on any thread. These handles can be to textures, buffers, etc.. +/// +/// Operations added to the reactor are guaranteed to run on a +/// worker within a finite amount of time unless the reactor itself +/// is torn down or there are no workers. These operations may run +/// on the calling thread immediately if a worker is active on the +/// current thread and can perform reactions. The operations are +/// guaranteed to run with an OpenGL context current and all reactor +/// handles having live OpenGL handle counterparts. +/// +/// Creating a handle in the reactor doesn't mean an OpenGL handle +/// is created immediately. OpenGL handles become live before the +/// next reaction. Similarly, dropping the last reference to a +/// reactor handle means that the OpenGL handle will be deleted at +/// some point in the near future. +/// class ReactorGLES { public: using WorkerID = UniqueID; + //---------------------------------------------------------------------------- + /// @brief A delegate implemented by a thread on which an OpenGL context + /// is current. There may be multiple workers for the reactor to + /// perform reactions on. In that case, it is the workers + /// responsibility to ensure that all of them use either the same + /// OpenGL context or multiple OpenGL contexts in the same + /// sharegroup. + /// class Worker { public: virtual ~Worker() = default; + //-------------------------------------------------------------------------- + /// @brief Determines the ability of the worker to service a reaction + /// on the current thread. The OpenGL context must be current on + /// the thread if the worker says it is able to service a + /// reaction. + /// + /// @param[in] reactor The reactor + /// + /// @return If the worker is able to service a reaction. The reactor + /// assumes the context is already current if true. + /// virtual bool CanReactorReactOnCurrentThreadNow( const ReactorGLES& reactor) const = 0; }; using Ref = std::shared_ptr; + //---------------------------------------------------------------------------- + /// @brief Create a new reactor. There are expensive and only one per + /// application instance is necessary. + /// + /// @param[in] gl The proc table for GL access. This is necessary for the + /// reactor to be able to create and collect OpenGL handles. + /// explicit ReactorGLES(std::unique_ptr gl); + //---------------------------------------------------------------------------- + /// @brief Destroy a reactor. + /// ~ReactorGLES(); + //---------------------------------------------------------------------------- + /// @brief If this is a valid reactor. Invalid reactors must be discarded + /// immediately. + /// + /// @return If this reactor is valid. + /// bool IsValid() const; + //---------------------------------------------------------------------------- + /// @brief Adds a worker to the reactor. Each new worker must ensure that + /// the context it manages is the same as the other workers in the + /// reactor or in the same sharegroup. + /// + /// @param[in] worker The worker + /// + /// @return The worker identifier. This identifier can be used to remove + /// the worker from the reactor later. + /// WorkerID AddWorker(std::weak_ptr worker); - bool RemoveWorker(WorkerID); - + //---------------------------------------------------------------------------- + /// @brief Remove a previously added worker from the reactor. If the + /// reactor has no workers, pending added operations will never + /// run. + /// + /// @param[in] id The worker identifier previously returned by `AddWorker`. + /// + /// @return If a worker with the given identifer was successfully removed + /// from the reactor. + /// + bool RemoveWorker(WorkerID id); + + //---------------------------------------------------------------------------- + /// @brief Get the OpenGL proc. table the reactor uses to manage handles. + /// + /// @return The proc table. + /// const ProcTableGLES& GetProcTable() const; + //---------------------------------------------------------------------------- + /// @brief Returns the OpenGL handle for a reactor handle if one is + /// available. This is typically only safe to call within a + /// reaction. That is, within a `ReactorGLES::Operation`. + /// + /// Asking for the OpenGL handle before the reactor has a chance + /// to reactor will return `std::nullopt`. + /// + /// This can be called on any thread but is typically useless + /// outside of a reaction since the handle is useless outside of a + /// reactor operation. + /// + /// @param[in] handle The reactor handle. + /// + /// @return The OpenGL handle if the reactor has had a chance to react. + /// `std::nullopt` otherwise. + /// std::optional GetGLHandle(const HandleGLES& handle) const; + //---------------------------------------------------------------------------- + /// @brief Create a reactor handle. + /// + /// This can be called on any thread. Even one that doesn't have + /// an OpenGL context. + /// + /// @param[in] type The type of handle to create. + /// + /// @return The reactor handle. + /// HandleGLES CreateHandle(HandleType type); + //---------------------------------------------------------------------------- + /// @brief Collect a reactor handle. + /// + /// This can be called on any thread. Even one that doesn't have + /// an OpenGL context. + /// + /// @param[in] handle The reactor handle handle + /// void CollectHandle(HandleGLES handle); + //---------------------------------------------------------------------------- + /// @brief Set the debug label on a reactor handle. + /// + /// This call ensures that the OpenGL debug label is propagated to + /// even the OpenGL handle hasn't been created at the time the + /// caller sets the label. + /// + /// @param[in] handle The handle + /// @param[in] label The label + /// void SetDebugLabel(const HandleGLES& handle, std::string label); using Operation = std::function; + + //---------------------------------------------------------------------------- + /// @brief Adds an operation that the reactor runs on a worker that + /// ensures that an OpenGL context is current. + /// + /// This operation is not guaranteed to run immediately. It will + /// complete in a finite amount of time on any thread as long as + /// there is a reactor worker and the reactor itself is not being + /// torn down. + /// + /// @param[in] operation The operation + /// + /// @return If the operation was successfully queued for completion. + /// [[nodiscard]] bool AddOperation(Operation operation); + //---------------------------------------------------------------------------- + /// @brief Perform a reaction on the current thread if able. + /// + /// It is safe to call this simultaneously from multiple threads + /// at the same time. + /// + /// @return If a reaction was performed on the calling thread. + /// [[nodiscard]] bool React(); private: From a9fedb1d05a409ce861bad2b0c673066a72fbbf4 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Wed, 18 Oct 2023 15:15:16 -0700 Subject: [PATCH 762/859] [Impeller] Guard execution of ReactorGLES operations with a mutex (#47068) Both the raster and IO threads can flush the ops queue. The reactor must ensure that execution of queued ops is serialized. Fixes https://github.com/flutter/flutter/issues/135524 --- impeller/renderer/backend/gles/reactor_gles.cc | 4 ++++ impeller/renderer/backend/gles/reactor_gles.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/impeller/renderer/backend/gles/reactor_gles.cc b/impeller/renderer/backend/gles/reactor_gles.cc index dfd26f3dde09d..df22c68573a80 100644 --- a/impeller/renderer/backend/gles/reactor_gles.cc +++ b/impeller/renderer/backend/gles/reactor_gles.cc @@ -159,6 +159,10 @@ bool ReactorGLES::React() { } TRACE_EVENT0("impeller", "ReactorGLES::React"); while (HasPendingOperations()) { + // Both the raster thread and the IO thread can flush queued operations. + // Ensure that execution of the ops is serialized. + Lock execution_lock(ops_execution_mutex_); + if (!ReactOnce()) { return false; } diff --git a/impeller/renderer/backend/gles/reactor_gles.h b/impeller/renderer/backend/gles/reactor_gles.h index 3715e47a14fd8..e20b7d42105be 100644 --- a/impeller/renderer/backend/gles/reactor_gles.h +++ b/impeller/renderer/backend/gles/reactor_gles.h @@ -233,6 +233,7 @@ class ReactorGLES { std::unique_ptr proc_table_; + Mutex ops_execution_mutex_; mutable Mutex ops_mutex_; std::vector ops_ IPLR_GUARDED_BY(ops_mutex_); @@ -252,7 +253,7 @@ class ReactorGLES { bool can_set_debug_labels_ = false; bool is_valid_ = false; - bool ReactOnce(); + bool ReactOnce() IPLR_REQUIRES(ops_execution_mutex_); bool HasPendingOperations() const; From 375daa8e1e32769c36a6562fbb460aa1a1183d75 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 18 Oct 2023 18:27:52 -0400 Subject: [PATCH 763/859] Roll Skia from d561b276b5d9 to 85971b25cf4b (1 revision) (#47076) https://skia.googlesource.com/skia.git/+log/d561b276b5d9..85971b25cf4b 2023-10-18 kjlubick@google.com Disable SkFontMgr::RefDefault() for Bazel buffet build If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index b6a3f027a0248..df3241bbbbe7f 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'd561b276b5d91ff0a6d5efe1024eecd7ff93b196', + 'skia_revision': '85971b25cf4b94a4843f6a4e9faa6412b3d56d92', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 322ba485b5c101875d7114a445a9ed8635b12b4e Mon Sep 17 00:00:00 2001 From: Christopher Fujino Date: Wed, 18 Oct 2023 15:36:22 -0700 Subject: [PATCH 764/859] migrate const_finder to use the implementation from package:kernel (#47077) After https://github.com/dart-lang/sdk/commit/f0933ab69e83cc9210af1c0e56defb7a14df7cbd, //tools/const_finder/lib/const_finder.dart was copied to the package:kernel source so that internal AST structures could be changed without breaking flutter/engine. This change deletes that file, and updates //tools/const_finder/bin/main.dart to depend on the package:kernel version instead. We are still running all the same integration tests we did previously. FYI @johnniwinther --- tools/const_finder/BUILD.gn | 1 - tools/const_finder/bin/main.dart | 2 +- tools/const_finder/lib/const_finder.dart | 207 ------------------ .../const_finder/test/const_finder_test.dart | 2 +- 4 files changed, 2 insertions(+), 210 deletions(-) delete mode 100644 tools/const_finder/lib/const_finder.dart diff --git a/tools/const_finder/BUILD.gn b/tools/const_finder/BUILD.gn index c20766d7d8643..d628749c26fca 100644 --- a/tools/const_finder/BUILD.gn +++ b/tools/const_finder/BUILD.gn @@ -13,7 +13,6 @@ application_snapshot("const_finder") { inputs = [ "bin/main.dart", - "lib/const_finder.dart", ".dart_tool/package_config.json", ] diff --git a/tools/const_finder/bin/main.dart b/tools/const_finder/bin/main.dart index d20423687ed4d..0a64dc452f8b6 100644 --- a/tools/const_finder/bin/main.dart +++ b/tools/const_finder/bin/main.dart @@ -6,7 +6,7 @@ import 'dart:convert'; import 'dart:io'; import 'package:args/args.dart'; -import 'package:const_finder/const_finder.dart'; +import 'package:kernel/const_finder.dart'; void main(List args) { final ArgParser parser = ArgParser(); diff --git a/tools/const_finder/lib/const_finder.dart b/tools/const_finder/lib/const_finder.dart deleted file mode 100644 index 84f9c809b2f1e..0000000000000 --- a/tools/const_finder/lib/const_finder.dart +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import 'dart:collection'; - -import 'package:kernel/kernel.dart'; - -class _ConstVisitor extends RecursiveVisitor { - _ConstVisitor( - this.kernelFilePath, - this.classLibraryUri, - this.className, - this.annotationClassLibraryUri, - this.annotationClassName, - ) : _visitedInstances = {}, - constantInstances = >[], - nonConstantLocations = >[]; - - /// The path to the file to open. - final String kernelFilePath; - - /// The library URI for the class to find. - final String classLibraryUri; - - /// The name of the class to find. - final String className; - - final Set _visitedInstances; - final List> constantInstances; - final List> nonConstantLocations; - - bool inIgnoredClass = false; - - /// Whether or not we are currently within the declaration of the target class. - /// - /// We use this to determine when to skip tracking non-constant - /// [ConstructorInvocation]s. This is because, in web builds, a static - /// method is always created called _#new#tearOff() which returns the result - /// of a non-constant invocation of the unnamed constructor. - /// - /// For the following Dart class "FooBar": - /// - /// class FooBar { - /// const FooBar(); - /// } - /// - /// The following kernel structure is generated: - /// - /// class FooBar extends core::Object /*hasConstConstructor*/ { - /// const constructor •() → min::FooBar - /// : super core::Object::•() - /// ; - /// static method _#new#tearOff() → min::FooBar - /// return new min::FooBar::•(); /* this is a non-const constructor invocation */ - /// method noOp() → void {} - /// } - bool inTargetClass = false; - - bool inTargetTearOff = false; - - /// The name of the name of the class of the annotation marking classes - /// whose constant references should be ignored. - final String? annotationClassName; - - /// The library URI of the class of the annotation marking classes whose - /// constant references should be ignored. - final String? annotationClassLibraryUri; - - // A cache of previously evaluated classes. - static final Map _classHeirarchyCache = {}; - bool _matches(Class node) { - final bool? result = _classHeirarchyCache[node]; - if (result != null) { - return result; - } - final bool exactMatch = node.name == className - && node.enclosingLibrary.importUri.toString() == classLibraryUri; - final bool match = exactMatch - || node.supers.any((Supertype supertype) => _matches(supertype.classNode)); - _classHeirarchyCache[node] = match; - return match; - } - - // Avoid visiting the same constant more than once. - final Set _cache = LinkedHashSet.identity(); - - @override - void visitProcedure(Procedure node) { - final bool isTearOff = node.isStatic && - node.kind == ProcedureKind.Method && - node.name.text == '_#new#tearOff'; - if (inTargetClass && isTearOff) { - inTargetTearOff = true; - } - super.visitProcedure(node); - inTargetTearOff = false; - } - - @override - void defaultConstant(Constant node) { - if (_cache.add(node)) { - super.defaultConstant(node); - } - } - - @override - void defaultConstantReference(Constant node) { - defaultConstant(node); - } - - @override - void visitConstructorInvocation(ConstructorInvocation node) { - final Class parentClass = node.target.parent! as Class; - if (!inTargetTearOff && _matches(parentClass)) { - final Location location = node.location!; - nonConstantLocations.add({ - 'file': location.file.toString(), - 'line': location.line, - 'column': location.column, - }); - } - super.visitConstructorInvocation(node); - } - - @override - void visitClass(Class node) { - inTargetClass = _matches(node); - // check if this is a class that we should ignore - inIgnoredClass = _classShouldBeIgnored(node); - super.visitClass(node); - inTargetClass = false; - inIgnoredClass = false; - } - - // If any annotations on the class match annotationClassName AND - // annotationClassLibraryUri. - bool _classShouldBeIgnored(Class node) { - if (annotationClassName == null || annotationClassLibraryUri == null) { - return false; - } - return node.annotations.any((Expression expression) { - if (expression is! ConstantExpression) { - return false; - } - - final Constant constant = expression.constant; - return constant is InstanceConstant - && constant.classNode.name == annotationClassName - && constant.classNode.enclosingLibrary.importUri.toString() == annotationClassLibraryUri; - }); - } - - @override - void visitInstanceConstantReference(InstanceConstant node) { - super.visitInstanceConstantReference(node); - if (!_matches(node.classNode) || inIgnoredClass) { - return; - } - - final Map instance = {}; - for (final MapEntry kvp in node.fieldValues.entries) { - if (kvp.value is! PrimitiveConstant) { - continue; - } - final PrimitiveConstant value = kvp.value as PrimitiveConstant; - instance[kvp.key.asField.name.text] = value.value; - } - if (_visitedInstances.add(instance.toString())) { - constantInstances.add(instance); - } - } -} - -/// A kernel AST visitor that finds const references. -class ConstFinder { - /// Creates a new ConstFinder class. - /// - /// The `kernelFilePath` is the path to a dill (kernel) file to process. - ConstFinder({ - required String kernelFilePath, - required String classLibraryUri, - required String className, - String? annotationClassLibraryUri, - String? annotationClassName, - }) : _visitor = _ConstVisitor( - kernelFilePath, - classLibraryUri, - className, - annotationClassLibraryUri, - annotationClassName, - ); - - final _ConstVisitor _visitor; - - /// Finds all instances - Map findInstances() { - _visitor._visitedInstances.clear(); - for (final Library library in loadComponentFromBinary(_visitor.kernelFilePath).libraries) { - library.visitChildren(_visitor); - } - return { - 'constantInstances': _visitor.constantInstances, - 'nonConstantLocations': _visitor.nonConstantLocations, - }; - } -} diff --git a/tools/const_finder/test/const_finder_test.dart b/tools/const_finder/test/const_finder_test.dart index 5df4791094465..552c6e7bca691 100644 --- a/tools/const_finder/test/const_finder_test.dart +++ b/tools/const_finder/test/const_finder_test.dart @@ -8,7 +8,7 @@ import 'dart:convert'; import 'dart:io'; import 'package:collection/collection.dart'; -import 'package:const_finder/const_finder.dart'; +import 'package:kernel/const_finder.dart'; import 'package:path/path.dart' as path; void expect(T value, T expected) { From 8b5daee22bad05f269f019470e419beb1849e737 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Wed, 18 Oct 2023 15:55:31 -0700 Subject: [PATCH 765/859] Update buildroot to ab76ccba2ca4ce4. (#47078) --- DEPS | 13 +------------ ci/licenses_golden/excluded_files | 1 - 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/DEPS b/DEPS index df3241bbbbe7f..03bdb88faf97a 100644 --- a/DEPS +++ b/DEPS @@ -262,7 +262,7 @@ allowed_hosts = [ ] deps = { - 'src': 'https://github.com/flutter/buildroot.git' + '@' + 'ab1d95b34a806908a4a4b4cd9a6246e564e59566', + 'src': 'https://github.com/flutter/buildroot.git' + '@' + 'ab76ccba2ca4ce40c7f52f9007704906d0bb5362', 'src/third_party/rapidjson': Var('fuchsia_git') + '/third_party/rapidjson' + '@' + 'ef3564c5c8824989393b87df25355baf35ff544b', @@ -981,17 +981,6 @@ hooks = [ 'pattern': '.', 'action': ['python3', 'src/build/vs_toolchain.py', 'update'], }, - { - # Ensure that we don't accidentally reference any .pyc files whose - # corresponding .py files have already been deleted. - 'name': 'remove_stale_pyc_files', - 'pattern': 'src/tools/.*\\.py', - 'action': [ - 'python3', - 'src/tools/remove_stale_pyc_files.py', - 'src/tools', - ], - }, { 'name': 'dia_dll', 'pattern': '.', diff --git a/ci/licenses_golden/excluded_files b/ci/licenses_golden/excluded_files index f36174f424ce7..36119e952ad9b 100644 --- a/ci/licenses_golden/excluded_files +++ b/ci/licenses_golden/excluded_files @@ -4,7 +4,6 @@ ../../../.github ../../../.gitignore ../../../.gn -../../../.ycm_extra_conf.py ../../../AUTHORS ../../../CODEOWNERS ../../../README.md From edca1a4a468cb41c84ea72f6d291a190bf68f65f Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 18 Oct 2023 21:27:33 -0400 Subject: [PATCH 766/859] Roll Dart SDK from d9b1e60fe442 to eb3fb9a13e16 (1 revision) (#47084) https://dart.googlesource.com/sdk.git/+log/d9b1e60fe442..eb3fb9a13e16 2023-10-19 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-42.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jimgraham@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 03bdb88faf97a..e95d2b65bc8ad 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': 'd9b1e60fe44296f864ee0dbf158ab5cfbab25119', + 'dart_revision': 'eb3fb9a13e16866e95d0c3f7f21cbd09da82fb12', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index 95fa9e59a6db1..efd6db63d79cf 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: e736ca6a62093d9e895265ace619ecec +Signature: f086cdfe3ef243a21884f633930bfe21 ==================================================================================================== LIBRARY: dart From a91061bc494e3581cada62d1a575e47b68ba5c27 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 19 Oct 2023 00:46:13 -0400 Subject: [PATCH 767/859] Roll Fuchsia Mac SDK from PxJM5ivbnbYoVkqBg... to 0hLSNJ_DCTzRvTVJe... (#47090) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jimgraham@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index e95d2b65bc8ad..9e6a510fe06a9 100644 --- a/DEPS +++ b/DEPS @@ -912,7 +912,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'PxJM5ivbnbYoVkqBguCZKGRjteW4LbrvxFSAExYGgTEC' + 'version': '0hLSNJ_DCTzRvTVJeTNCI2xer43DX4ZPkTDI8l9ES_4C' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 3cc5d4679473a3bbd3909f3fdafcd484fd240417 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 19 Oct 2023 01:16:17 -0400 Subject: [PATCH 768/859] Roll Skia from 85971b25cf4b to 64c5de6663a4 (2 revisions) (#47091) https://skia.googlesource.com/skia.git/+log/85971b25cf4b..64c5de6663a4 2023-10-19 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Dawn from 4885e1405318 to c0bb2922dc89 (6 revisions) 2023-10-19 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from bff098b9b7ca to 37332ece3fb7 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 9e6a510fe06a9..e15174ecc27b8 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '85971b25cf4b94a4843f6a4e9faa6412b3d56d92', + 'skia_revision': '64c5de6663a42a7b68a577579f09c29cb7017496', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From a36ae4d8a1680c80d94bd6bde224ed494a63de01 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 19 Oct 2023 01:31:11 -0400 Subject: [PATCH 769/859] Roll Dart SDK from eb3fb9a13e16 to 1b425a25a6dd (1 revision) (#47092) https://dart.googlesource.com/sdk.git/+log/eb3fb9a13e16..1b425a25a6dd 2023-10-19 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-43.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jimgraham@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 4 ++-- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index e15174ecc27b8..1d9dc4e19a447 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': 'eb3fb9a13e16866e95d0c3f7f21cbd09da82fb12', + 'dart_revision': '1b425a25a6dd3a3db41897787ffe8c7514988a85', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py @@ -370,7 +370,7 @@ deps = { Var('dart_git') + '/dart_style.git@1a2def95a3c04dafd27b85d17e6e828bd4afa1a3', 'src/third_party/dart/third_party/pkg/dartdoc': - Var('dart_git') + '/dartdoc.git@8c103397734f4dba75915e40c734a88e29a35f26', + Var('dart_git') + '/dartdoc.git@f7e9b17897e69dd5e43d3f0a785bb5b6e5c973ed', 'src/third_party/dart/third_party/pkg/ffi': Var('dart_git') + '/ffi.git@2faec288966d8f564049adb86a7ca43fd6e01fbf', diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index efd6db63d79cf..ea650d2b95697 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: f086cdfe3ef243a21884f633930bfe21 +Signature: fb067cfe88e5f78e099e1d49f8f58aa9 ==================================================================================================== LIBRARY: dart From df6c008c1cc772d441f0b042ae5ba4f6d9068427 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 19 Oct 2023 02:08:52 -0400 Subject: [PATCH 770/859] Roll Skia from 64c5de6663a4 to 62acc1e162cc (1 revision) (#47093) https://skia.googlesource.com/skia.git/+log/64c5de6663a4..62acc1e162cc 2023-10-19 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from 0cf4951e9bc0 to 37332ece3fb7 (2 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 1d9dc4e19a447..dd6b0c3ae9c39 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '64c5de6663a42a7b68a577579f09c29cb7017496', + 'skia_revision': '62acc1e162cca74ad492a88f3246f0b3899dc984', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index b5c399da20109..097c3794328c8 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 1c448c583993e17021ff678a7be92323 +Signature: 6cc598ae8c0456741dc366857090ec6e ==================================================================================================== LIBRARY: etc1 From d46ff7a9a82d1cb4eb0d3fa69078854efd17efce Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 19 Oct 2023 02:16:00 -0400 Subject: [PATCH 771/859] Roll Fuchsia Linux SDK from 2HSBpWikGWvPJlHOP... to Z2mOZ5cuPJWvKn22P... (#47094) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jimgraham@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index dd6b0c3ae9c39..b7fc375eaca86 100644 --- a/DEPS +++ b/DEPS @@ -922,7 +922,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': '2HSBpWikGWvPJlHOPjJGaqHq3FY0N9WWgIRlt5x03BcC' + 'version': 'Z2mOZ5cuPJWvKn22Pj1XAJX8XbAClEEfLgLjsYO9Q7IC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index 97c51927f0586..fa0bbe9e14306 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: c9323d0f315200ad5fb24eabd5fd1f87 +Signature: 1748564dfb1b828e097d0db810f281ed ==================================================================================================== LIBRARY: fuchsia_sdk From 4679474ebf597cdcc4760ff907558b10f684e561 Mon Sep 17 00:00:00 2001 From: Jim Graham Date: Wed, 18 Oct 2023 23:40:27 -0700 Subject: [PATCH 772/859] Revert "[web] Ensure handled key event is not propagated to IME" (#47086) Reverts flutter/engine#46829 Fixes https://github.com/flutter/flutter/issues/136857 Speculative fix for The builds breaking on the web text tests as seen here: https://github.com/flutter/flutter/runs/17840697842 --- .../lib/src/engine/keyboard_binding.dart | 9 +--- lib/web_ui/lib/src/engine/raw_keyboard.dart | 23 +++++++-- .../test/common/keyboard_test_common.dart | 7 --- lib/web_ui/test/engine/raw_keyboard_test.dart | 4 -- lib/web_ui/test/engine/text_editing_test.dart | 48 ------------------- .../lib/web_locale_keymap/locale_keymap.dart | 3 -- 6 files changed, 20 insertions(+), 74 deletions(-) diff --git a/lib/web_ui/lib/src/engine/keyboard_binding.dart b/lib/web_ui/lib/src/engine/keyboard_binding.dart index c12d1a36a9f8b..7a851b16c2deb 100644 --- a/lib/web_ui/lib/src/engine/keyboard_binding.dart +++ b/lib/web_ui/lib/src/engine/keyboard_binding.dart @@ -13,7 +13,6 @@ import 'browser_detection.dart'; import 'dom.dart'; import 'key_map.g.dart'; import 'platform_dispatcher.dart'; -import 'raw_keyboard.dart'; import 'semantics.dart'; typedef _VoidCallback = void Function(); @@ -105,12 +104,9 @@ class KeyboardBinding { _addEventListener('keydown', (DomEvent domEvent) { final FlutterHtmlKeyboardEvent event = FlutterHtmlKeyboardEvent(domEvent as DomKeyboardEvent); _converter.handleEvent(event); - RawKeyboard.instance?.handleHtmlEvent(domEvent); }); - _addEventListener('keyup', (DomEvent domEvent) { - final FlutterHtmlKeyboardEvent event = FlutterHtmlKeyboardEvent(domEvent as DomKeyboardEvent); - _converter.handleEvent(event); - RawKeyboard.instance?.handleHtmlEvent(domEvent); + _addEventListener('keyup', (DomEvent event) { + _converter.handleEvent(FlutterHtmlKeyboardEvent(event as DomKeyboardEvent)); }); } @@ -213,7 +209,6 @@ class FlutterHtmlKeyboardEvent { bool getModifierState(String key) => _event.getModifierState(key); void preventDefault() => _event.preventDefault(); - void stopPropagation() => _event.stopPropagation(); bool get defaultPrevented => _event.defaultPrevented; } diff --git a/lib/web_ui/lib/src/engine/raw_keyboard.dart b/lib/web_ui/lib/src/engine/raw_keyboard.dart index d4aa87b6bbc90..b299437b21f0e 100644 --- a/lib/web_ui/lib/src/engine/raw_keyboard.dart +++ b/lib/web_ui/lib/src/engine/raw_keyboard.dart @@ -15,6 +15,15 @@ import 'services.dart'; /// Provides keyboard bindings, such as the `flutter/keyevent` channel. class RawKeyboard { RawKeyboard._(this._onMacOs) { + _keydownListener = createDomEventListener((DomEvent event) { + _handleHtmlEvent(event); + }); + domWindow.addEventListener('keydown', _keydownListener); + + _keyupListener = createDomEventListener((DomEvent event) { + _handleHtmlEvent(event); + }); + domWindow.addEventListener('keyup', _keyupListener); registerHotRestartListener(() { dispose(); }); @@ -25,9 +34,6 @@ class RawKeyboard { /// Use the [instance] getter to get the singleton after calling this method. static void initialize({bool onMacOs = false}) { _instance ??= RawKeyboard._(onMacOs); - // KeyboardBinding is responsible for forwarding the keyboard - // events to the RawKeyboard handler. - KeyboardBinding.initInstance(); } /// The [RawKeyboard] singleton. @@ -40,16 +46,24 @@ class RawKeyboard { /// if no repeat events were received. final Map _keydownTimers = {}; + DomEventListener? _keydownListener; + DomEventListener? _keyupListener; + /// Uninitializes the [RawKeyboard] singleton. /// /// After calling this method this object becomes unusable and [instance] /// becomes `null`. Call [initialize] again to initialize a new singleton. void dispose() { + domWindow.removeEventListener('keydown', _keydownListener); + domWindow.removeEventListener('keyup', _keyupListener); + for (final String key in _keydownTimers.keys) { _keydownTimers[key]!.cancel(); } _keydownTimers.clear(); + _keydownListener = null; + _keyupListener = null; _instance = null; } @@ -82,7 +96,7 @@ class RawKeyboard { return event.type == 'keydown' && event.key == 'Tab' && event.isComposing; } - void handleHtmlEvent(DomEvent domEvent) { + void _handleHtmlEvent(DomEvent domEvent) { if (!domInstanceOfString(domEvent, 'KeyboardEvent')) { return; } @@ -144,7 +158,6 @@ class RawKeyboard { if (jsonResponse['handled'] as bool) { // If the framework handled it, then don't propagate it any further. event.preventDefault(); - event.stopPropagation(); } }, ); diff --git a/lib/web_ui/test/common/keyboard_test_common.dart b/lib/web_ui/test/common/keyboard_test_common.dart index 0ec1e5d75acb9..0b447d8b3b5e7 100644 --- a/lib/web_ui/test/common/keyboard_test_common.dart +++ b/lib/web_ui/test/common/keyboard_test_common.dart @@ -22,7 +22,6 @@ class MockKeyboardEvent implements FlutterHtmlKeyboardEvent { bool altGrKey = false, this.location = 0, this.onPreventDefault, - this.onStopPropagation, }) : modifierState = { if (altKey) 'Alt', @@ -85,12 +84,6 @@ class MockKeyboardEvent implements FlutterHtmlKeyboardEvent { bool get defaultPrevented => _defaultPrevented; bool _defaultPrevented = false; - @override - void stopPropagation() { - onStopPropagation?.call(); - } - VoidCallback? onStopPropagation; - static bool get lastDefaultPrevented => _lastEvent?.defaultPrevented ?? false; static MockKeyboardEvent? _lastEvent; } diff --git a/lib/web_ui/test/engine/raw_keyboard_test.dart b/lib/web_ui/test/engine/raw_keyboard_test.dart index 0b1681b04042b..d9f4cd0fe4036 100644 --- a/lib/web_ui/test/engine/raw_keyboard_test.dart +++ b/lib/web_ui/test/engine/raw_keyboard_test.dart @@ -52,10 +52,6 @@ void testMain() { DomKeyboardEvent event; - // Dispatch a keydown event first so that KeyboardBinding will recognize the keyup event. - // and will not set preventDefault on it. - event = dispatchKeyboardEvent('keydown', key: 'SomeKey', code: 'SomeCode', keyCode: 1); - event = dispatchKeyboardEvent('keyup', key: 'SomeKey', code: 'SomeCode', keyCode: 1); expect(event.defaultPrevented, isFalse); diff --git a/lib/web_ui/test/engine/text_editing_test.dart b/lib/web_ui/test/engine/text_editing_test.dart index 37d44b3f321ed..a6e5f02c0a33b 100644 --- a/lib/web_ui/test/engine/text_editing_test.dart +++ b/lib/web_ui/test/engine/text_editing_test.dart @@ -12,14 +12,12 @@ import 'package:test/test.dart'; import 'package:ui/src/engine.dart' show flutterViewEmbedder; import 'package:ui/src/engine/browser_detection.dart'; import 'package:ui/src/engine/dom.dart'; -import 'package:ui/src/engine/raw_keyboard.dart'; import 'package:ui/src/engine/services.dart'; import 'package:ui/src/engine/text_editing/autofill_hint.dart'; import 'package:ui/src/engine/text_editing/input_type.dart'; import 'package:ui/src/engine/text_editing/text_editing.dart'; import 'package:ui/src/engine/util.dart'; import 'package:ui/src/engine/vector_math.dart'; -import 'package:ui/ui.dart' as ui; import '../common/spy.dart'; import '../common/test_initialization.dart'; @@ -372,52 +370,6 @@ Future testMain() async { expect(lastInputAction, 'TextInputAction.done'); }); - test('handling keyboard event prevents triggering input action', () { - final ui.PlatformMessageCallback? savedCallback = ui.window.onPlatformMessage; - - bool markTextEventHandled = false; - ui.window.onPlatformMessage = (String channel, ByteData? data, - ui.PlatformMessageResponseCallback? callback) { - final ByteData response = const JSONMessageCodec() - .encodeMessage({'handled': markTextEventHandled})!; - callback!(response); - }; - RawKeyboard.initialize(); - - final InputConfiguration config = InputConfiguration(); - editingStrategy!.enable( - config, - onChange: trackEditingState, - onAction: trackInputAction, - ); - - // No input action so far. - expect(lastInputAction, isNull); - - markTextEventHandled = true; - dispatchKeyboardEvent( - editingStrategy!.domElement!, - 'keydown', - keyCode: _kReturnKeyCode, - ); - - // Input action prevented by platform message callback. - expect(lastInputAction, isNull); - - markTextEventHandled = false; - dispatchKeyboardEvent( - editingStrategy!.domElement!, - 'keydown', - keyCode: _kReturnKeyCode, - ); - - // Input action received. - expect(lastInputAction, 'TextInputAction.done'); - - ui.window.onPlatformMessage = savedCallback; - RawKeyboard.instance?.dispose(); - }); - test('Triggers input action in multi-line mode', () { final InputConfiguration config = InputConfiguration( inputType: EngineInputType.multiline, diff --git a/third_party/web_locale_keymap/lib/web_locale_keymap/locale_keymap.dart b/third_party/web_locale_keymap/lib/web_locale_keymap/locale_keymap.dart index 5c261f665571f..dd2faa527fc2a 100644 --- a/third_party/web_locale_keymap/lib/web_locale_keymap/locale_keymap.dart +++ b/third_party/web_locale_keymap/lib/web_locale_keymap/locale_keymap.dart @@ -41,9 +41,6 @@ class LocaleKeymap { return eventKeyCode; } if (result == null) { - if ((eventCode ?? '').isEmpty && (eventKey ?? '').isEmpty) { - return null; - } final int? heuristicResult = heuristicMapper(eventCode ?? '', eventKey ?? ''); if (heuristicResult != null) { return heuristicResult; From 4925d5618d0b6665c6937ef1d21879a63dc46802 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 19 Oct 2023 03:52:59 -0400 Subject: [PATCH 773/859] Roll Skia from 62acc1e162cc to 8cf64b0795af (2 revisions) (#47097) https://skia.googlesource.com/skia.git/+log/62acc1e162cc..8cf64b0795af 2023-10-19 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 384a29a8fa9e to 889b01efcbf6 (4 revisions) 2023-10-19 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from aa353df9a587 to 3d986ea7a169 (10 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index b7fc375eaca86..e3da84b1ace5c 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '62acc1e162cca74ad492a88f3246f0b3899dc984', + 'skia_revision': '8cf64b0795af82327ba1b228d39f70b00d85a25e', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 8fc8f5118f4af7bf76ad216145004317f14a508c Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 19 Oct 2023 09:38:25 -0400 Subject: [PATCH 774/859] Roll Dart SDK from 1b425a25a6dd to ea86103e06b1 (1 revision) (#47101) https://dart.googlesource.com/sdk.git/+log/1b425a25a6dd..ea86103e06b1 2023-10-19 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-44.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jimgraham@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index e3da84b1ace5c..f405134d2fd08 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '1b425a25a6dd3a3db41897787ffe8c7514988a85', + 'dart_revision': 'ea86103e06b198c2ead7cc60a096d8fce159e96c', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index ea650d2b95697..d01375be90301 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: fb067cfe88e5f78e099e1d49f8f58aa9 +Signature: 4f15176c1153b8825c4d14d16be19773 ==================================================================================================== LIBRARY: dart From 660b7048af64a0b3cdb01d7d406d446ff2ba60f4 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 19 Oct 2023 10:19:14 -0400 Subject: [PATCH 775/859] Roll Skia from 8cf64b0795af to b31b189be018 (1 revision) (#47103) https://skia.googlesource.com/skia.git/+log/8cf64b0795af..b31b189be018 2023-10-19 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll Dawn from c0bb2922dc89 to 7317f665cc52 (3 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index f405134d2fd08..9905feb945e0b 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '8cf64b0795af82327ba1b228d39f70b00d85a25e', + 'skia_revision': 'b31b189be018e0623d2719e3b6659c4e71df0d7a', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 2e2051a9a660f29493e1cd061cb1689c48b5cd72 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 19 Oct 2023 12:17:24 -0400 Subject: [PATCH 776/859] Roll Skia from b31b189be018 to 04449cda5a0a (1 revision) (#47105) https://skia.googlesource.com/skia.git/+log/b31b189be018..04449cda5a0a 2023-10-19 kjlubick@google.com Remove SkTypeface::UniqueID If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 9905feb945e0b..adc73db86ac99 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'b31b189be018e0623d2719e3b6659c4e71df0d7a', + 'skia_revision': '04449cda5a0a6af3fb52173597d5e33f387a2929', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 097c3794328c8..018a43d74186c 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 6cc598ae8c0456741dc366857090ec6e +Signature: a3bec4d065531ae846339dc14148ad94 ==================================================================================================== LIBRARY: etc1 From e7f831c7b45667dc6e576be345b1addf60d6797b Mon Sep 17 00:00:00 2001 From: Jia Hao Date: Thu, 19 Oct 2023 16:47:20 +0000 Subject: [PATCH 777/859] Add missing import (#47083) Fixes the following: https://github.com/flutter/engine/commit/6b262a0529bea8c58eb763fe15bd8d647dd07641 results in the following error appearing internally when compiling for Android: ``` In file included from fml/synchronization/sync_switch.cc:5: ./fml/synchronization/sync_switch.h:74:34: error: implicit instantiation of undefined template 'std::vector' mutable std::vector observers_; ^ <...>: note: template is declared here class _LIBCPP_TEMPLATE_VIS vector; ^ 1 error generated. ``` *List which issues are fixed by this PR. You must list at least one issue.* b/306266542 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- fml/synchronization/sync_switch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fml/synchronization/sync_switch.h b/fml/synchronization/sync_switch.h index c01c05aac25ff..d9b0807afd9c3 100644 --- a/fml/synchronization/sync_switch.h +++ b/fml/synchronization/sync_switch.h @@ -5,9 +5,9 @@ #ifndef FLUTTER_FML_SYNCHRONIZATION_SYNC_SWITCH_H_ #define FLUTTER_FML_SYNCHRONIZATION_SYNC_SWITCH_H_ -#include #include #include +#include #include "flutter/fml/macros.h" #include "flutter/fml/synchronization/shared_mutex.h" From 2d59f1397a4ab1688f5a7aac8ba4ccc5b7821680 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Thu, 19 Oct 2023 10:52:31 -0700 Subject: [PATCH 778/859] [iOS] Load additional Cupertino system fonts (#46857) Manually loads darwin system fonts. Darwin system fonts returns different typeface in different sizes. This PR loads the font in different sizes then register them as different fonts. These new fonts can be access through the framework. Fixes https://github.com/flutter/flutter/issues/63507 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- ci/licenses_golden/licenses_flutter | 2 + lib/ui/text/font_collection.cc | 6 ++ .../Scenarios.xcodeproj/project.pbxproj | 8 +++ .../ios/Scenarios/Scenarios/AppDelegate.m | 1 + .../ScenariosUITests/DarwinSystemFontTests.m | 30 +++++++++ .../ScenariosUITests/GoldenTestManager.m | 1 + ...one SE (3rd generation)_16.2_simulator.png | Bin 0 -> 31458 bytes .../lib/src/darwin_system_font.dart | 62 ++++++++++++++++++ testing/scenario_app/lib/src/scenarios.dart | 2 + third_party/txt/BUILD.gn | 9 ++- third_party/txt/src/txt/asset_font_manager.h | 2 +- third_party/txt/src/txt/platform_mac.h | 17 +++++ third_party/txt/src/txt/platform_mac.mm | 41 ++++++++++++ third_party/txt/tests/platform_mac_tests.cc | 34 ++++++++++ 14 files changed, 213 insertions(+), 2 deletions(-) create mode 100644 testing/scenario_app/ios/Scenarios/ScenariosUITests/DarwinSystemFontTests.m create mode 100644 testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_darwin_system_font_iPhone SE (3rd generation)_16.2_simulator.png create mode 100644 testing/scenario_app/lib/src/darwin_system_font.dart create mode 100644 third_party/txt/src/txt/platform_mac.h create mode 100644 third_party/txt/tests/platform_mac_tests.cc diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index e7cd52d3379cd..832aa8151774e 100644 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -4040,6 +4040,7 @@ ORIGIN: ../../../flutter/third_party/txt/src/txt/platform.h + ../../../flutter/L ORIGIN: ../../../flutter/third_party/txt/src/txt/platform_android.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/third_party/txt/src/txt/platform_fuchsia.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/third_party/txt/src/txt/platform_linux.cc + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/third_party/txt/src/txt/platform_mac.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/third_party/txt/src/txt/platform_mac.mm + ../../../flutter/LICENSE ORIGIN: ../../../flutter/third_party/txt/src/txt/platform_windows.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/third_party/web_test_fonts/lib/web_test_fonts.dart + ../../../flutter/LICENSE @@ -6835,6 +6836,7 @@ FILE: ../../../flutter/third_party/txt/src/txt/platform.h FILE: ../../../flutter/third_party/txt/src/txt/platform_android.cc FILE: ../../../flutter/third_party/txt/src/txt/platform_fuchsia.cc FILE: ../../../flutter/third_party/txt/src/txt/platform_linux.cc +FILE: ../../../flutter/third_party/txt/src/txt/platform_mac.h FILE: ../../../flutter/third_party/txt/src/txt/platform_mac.mm FILE: ../../../flutter/third_party/txt/src/txt/platform_windows.cc FILE: ../../../flutter/third_party/web_test_fonts/lib/web_test_fonts.dart diff --git a/lib/ui/text/font_collection.cc b/lib/ui/text/font_collection.cc index 5a4afd334fc12..86225d4ad8df9 100644 --- a/lib/ui/text/font_collection.cc +++ b/lib/ui/text/font_collection.cc @@ -22,6 +22,9 @@ #include "third_party/tonic/typed_data/typed_list.h" #include "txt/asset_font_manager.h" #include "txt/test_font_manager.h" +#if FML_OS_MACOSX || FML_OS_IOS +#include "txt/platform_mac.h" +#endif namespace flutter { @@ -63,6 +66,9 @@ void FontCollection::SetupDefaultFontManager( // Structure described in https://docs.flutter.dev/cookbook/design/fonts void FontCollection::RegisterFonts( const std::shared_ptr& asset_manager) { +#if FML_OS_MACOSX || FML_OS_IOS + RegisterSystemFonts(*dynamic_font_manager_); +#endif std::unique_ptr manifest_mapping = asset_manager->GetAsMapping("FontManifest.json"); if (manifest_mapping == nullptr) { diff --git a/testing/scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj b/testing/scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj index 7402e6958cd9a..4c0f0713c2ddf 100644 --- a/testing/scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj +++ b/testing/scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj @@ -69,6 +69,8 @@ 686383152AC2175100E27AAD /* ../../Flutter.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 246B4E4522E3B61000073EBF /* ../../Flutter.xcframework */; }; 686383162AC2175100E27AAD /* ../../Flutter.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 246B4E4522E3B61000073EBF /* ../../Flutter.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 68A5B63423EB71D300BDBCDB /* PlatformViewGestureRecognizerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 68A5B63323EB71D300BDBCDB /* PlatformViewGestureRecognizerTests.m */; }; + 68C9D8012AD9B0EF00DF9D79 /* DarwinSystemFontTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 68C9D8002AD9B0EF00DF9D79 /* DarwinSystemFontTests.m */; }; + 68C9D8092AD9B6C800DF9D79 /* golden_darwin_system_font_iPhone SE (3rd generation)_16.2_simulator.png in Resources */ = {isa = PBXBuildFile; fileRef = 68C9D8082AD9B6C800DF9D79 /* golden_darwin_system_font_iPhone SE (3rd generation)_16.2_simulator.png */; }; 68D4017D2564859300ECD91A /* ContinuousTexture.m in Sources */ = {isa = PBXBuildFile; fileRef = 68D4017C2564859300ECD91A /* ContinuousTexture.m */; }; 68D93AEE2A46097E0054AB6D /* golden_platform_view_with_negative_backdrop_filter_iPhone SE (3rd generation)_16.2_simulator.png in Resources */ = {isa = PBXBuildFile; fileRef = 68D93AED2A46097E0054AB6D /* golden_platform_view_with_negative_backdrop_filter_iPhone SE (3rd generation)_16.2_simulator.png */; }; F26F15B8268B6B5600EC54D3 /* iPadGestureTests.m in Sources */ = {isa = PBXBuildFile; fileRef = F26F15B7268B6B5500EC54D3 /* iPadGestureTests.m */; }; @@ -242,6 +244,8 @@ 686383052AC2024200E27AAD /* FlutterAppExtensionTestHost.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = FlutterAppExtensionTestHost.xcodeproj; path = ../FlutterAppExtensionTestHost/FlutterAppExtensionTestHost.xcodeproj; sourceTree = ""; }; 686383122AC202B700E27AAD /* AppExtensionTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppExtensionTests.m; sourceTree = ""; }; 68A5B63323EB71D300BDBCDB /* PlatformViewGestureRecognizerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PlatformViewGestureRecognizerTests.m; sourceTree = ""; }; + 68C9D8002AD9B0EF00DF9D79 /* DarwinSystemFontTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DarwinSystemFontTests.m; sourceTree = ""; }; + 68C9D8082AD9B6C800DF9D79 /* golden_darwin_system_font_iPhone SE (3rd generation)_16.2_simulator.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "golden_darwin_system_font_iPhone SE (3rd generation)_16.2_simulator.png"; sourceTree = ""; }; 68D4017B2564859300ECD91A /* ContinuousTexture.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ContinuousTexture.h; sourceTree = ""; }; 68D4017C2564859300ECD91A /* ContinuousTexture.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ContinuousTexture.m; sourceTree = ""; }; 68D93AED2A46097E0054AB6D /* golden_platform_view_with_negative_backdrop_filter_iPhone SE (3rd generation)_16.2_simulator.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "golden_platform_view_with_negative_backdrop_filter_iPhone SE (3rd generation)_16.2_simulator.png"; sourceTree = ""; }; @@ -366,6 +370,7 @@ 0DDEBC88258830B40065D0E8 /* SpawnEngineTest.m */, F26F15B7268B6B5500EC54D3 /* iPadGestureTests.m */, 686383122AC202B700E27AAD /* AppExtensionTests.m */, + 68C9D8002AD9B0EF00DF9D79 /* DarwinSystemFontTests.m */, ); path = ScenariosUITests; sourceTree = ""; @@ -401,6 +406,7 @@ F7B464DC2759D02B00079189 /* Goldens */ = { isa = PBXGroup; children = ( + 68C9D8082AD9B6C800DF9D79 /* golden_darwin_system_font_iPhone SE (3rd generation)_16.2_simulator.png */, 3BFD971E2A990CF40094F51B /* golden_bogus_font_text_impeller_iPhone SE (3rd generation)_16.2_simulator.png */, 3BFD971F2A990CF40094F51B /* golden_spawn_engine_works_impeller_iPhone SE (3rd generation)_16.2_simulator.png */, 68D93AED2A46097E0054AB6D /* golden_platform_view_with_negative_backdrop_filter_iPhone SE (3rd generation)_16.2_simulator.png */, @@ -617,6 +623,7 @@ 684FFF8729F9C10700281002 /* golden_platform_view_multiple_iPhone SE (3rd generation)_16.2_simulator.png in Resources */, 68D93AEE2A46097E0054AB6D /* golden_platform_view_with_negative_backdrop_filter_iPhone SE (3rd generation)_16.2_simulator.png in Resources */, 3BFD97202A990CF50094F51B /* golden_bogus_font_text_impeller_iPhone SE (3rd generation)_16.2_simulator.png in Resources */, + 68C9D8092AD9B6C800DF9D79 /* golden_darwin_system_font_iPhone SE (3rd generation)_16.2_simulator.png in Resources */, 684FFF8D29F9C10700281002 /* golden_platform_view_large_cliprrect_iPhone SE (3rd generation)_16.2_simulator.png in Resources */, 684FFF8329F9C10700281002 /* golden_platform_view_transform_iPhone SE (3rd generation)_16.2_simulator.png in Resources */, 684FFF8B29F9C10700281002 /* golden_platform_view_clippath_iPhone SE (3rd generation)_16.2_simulator.png in Resources */, @@ -666,6 +673,7 @@ files = ( 6402EBD124147BDA00987DCB /* UnobstructedPlatformViewTests.m in Sources */, 68A5B63423EB71D300BDBCDB /* PlatformViewGestureRecognizerTests.m in Sources */, + 68C9D8012AD9B0EF00DF9D79 /* DarwinSystemFontTests.m in Sources */, 6816DBA12317573300A51400 /* GoldenImage.m in Sources */, 0A02E8F724EFAD27002D54E5 /* BogusFontTextTest.m in Sources */, 6816DB9E231750ED00A51400 /* GoldenPlatformViewTests.m in Sources */, diff --git a/testing/scenario_app/ios/Scenarios/Scenarios/AppDelegate.m b/testing/scenario_app/ios/Scenarios/Scenarios/AppDelegate.m index 9aa3a0043063d..042fb8c6c49ad 100644 --- a/testing/scenario_app/ios/Scenarios/Scenarios/AppDelegate.m +++ b/testing/scenario_app/ios/Scenarios/Scenarios/AppDelegate.m @@ -90,6 +90,7 @@ - (BOOL)application:(UIApplication*)application @"--two-platform-view-clip-rect" : @"two_platform_view_clip_rect", @"--two-platform-view-clip-rrect" : @"two_platform_view_clip_rrect", @"--two-platform-view-clip-path" : @"two_platform_view_clip_path", + @"--darwin-system-font" : @"darwin_system_font", }; __block NSString* flutterViewControllerTestName = nil; [launchArgsMap diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/DarwinSystemFontTests.m b/testing/scenario_app/ios/Scenarios/ScenariosUITests/DarwinSystemFontTests.m new file mode 100644 index 0000000000000..29fec251557ed --- /dev/null +++ b/testing/scenario_app/ios/Scenarios/ScenariosUITests/DarwinSystemFontTests.m @@ -0,0 +1,30 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import +#import +#import "GoldenTestManager.h" + +@interface DarwinSystemFontTests : XCTestCase + +@end + +@implementation DarwinSystemFontTests + +- (void)testFontRendering { + self.continueAfterFailure = NO; + + XCUIApplication* application = [[XCUIApplication alloc] init]; + application.launchArguments = @[ @"--darwin-system-font" ]; + [application launch]; + + XCUIElement* addTextField = application.textFields[@"ready"]; + XCTAssertTrue([addTextField waitForExistenceWithTimeout:30]); + + GoldenTestManager* manager = + [[GoldenTestManager alloc] initWithLaunchArg:@"--darwin-system-font"]; + [manager checkGoldenForTest:self rmesThreshold:kDefaultRmseThreshold]; +} + +@end diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenTestManager.m b/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenTestManager.m index 29915a4cf57b2..ac55da74642bb 100644 --- a/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenTestManager.m +++ b/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenTestManager.m @@ -54,6 +54,7 @@ - (instancetype)initWithLaunchArg:(NSString*)launchArg { @"--two-platform-view-clip-rrect" : @"two_platform_view_clip_rrect", @"--two-platform-view-clip-path" : @"two_platform_view_clip_path", @"--app-extension" : @"app_extension", + @"--darwin-system-font" : @"darwin_system_font", }; }); _identifier = launchArgsMap[launchArg]; diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_darwin_system_font_iPhone SE (3rd generation)_16.2_simulator.png b/testing/scenario_app/ios/Scenarios/ScenariosUITests/golden_darwin_system_font_iPhone SE (3rd generation)_16.2_simulator.png new file mode 100644 index 0000000000000000000000000000000000000000..eba78ac2a07e95677d9cbd68fd7b73fbeaeea436 GIT binary patch literal 31458 zcmeFZhd0}A`2XMPM(LocR)@VS_HJtnsS$g&#NMkhn|G^9DJ4eCnyIZ64T91^1hqHS z5@L@;h~WG3`JV6J@H^*sKF4wLlH|PZ`*n}&zOLu>xWqm+)V@l8hyKi&GgozWG>p%j zq1!lf=7Q{HI^Z46`XVFX6) zs`%u?1Qcq*3kHMT{+HnwKZeH-!`z=_p-?FHN&IsdtYPzTb~&`aA@Kc1{C~0w+WT(EkN4p=1RE)s{)oLP zpSI^bhvV96)Pcm%;X>|}r!mxZpQyuC`x7c#+y0NRxx?8b%3Ku7T;6$E+dme+6h}`# z4#-)x(N@42y?^oj0r&i6?foA6e8b?n_lr)BT-t&F&z_*%>@U^5&tXHe6Kr(Wg1)15 zxnxa=(1FBAQsIfxp~M(8_rCep4%P-qk>uRV=V=j}VfML;_WK=d#-rJ^R*LA?jiBno z?ZhY=bJTt(-fh3J?P%S@{&4af_ts0SOCtrVg4s!}Rt|Wpt#(9&L{WiXMdY*oh>d{i zs`@7q*&%I*GkjYKKH<;FN31FBs$yHzv9`$Ld84tBYy1Czp4X;hMXUP`zf5{h9}LHg z+}l6sk80&;Y&nz-Dl^Ghx$5)ciMzc!WQ;LTqhVbt_t;h54@6i1;kgFhuXw%$CGF zs<%kBgeU!UCO{uT{zBZm_jl6UrYU|uw)!LY>XcbRaN=qU_m~fs&d!|xgFb86y=S%% z(5Z=1d}yrFLYNw6!uql}H~dAW5bQ*fn!72j6l{}>>D|Pb#E7-$a81>%_H#VD8NZa5 z6#C&qS+mH{KGQYx?0Z{Bn^7k>(!YMUWBBqzDUE)22mAu&k#|B{5`mR{@AG>ffY+Gy zQ(HukfR$7g?0dN=lwV*;Ky^FzbPWLW@Xwz1mn~}f2@jPZ*QQXZO6!J1`lEVmVA^Xz z?kw(d_LQcv^|#7CM*P~EC{pafW_KIs#`HTyE8KYr#Y4NRdjyI*sea->F2K)hMp8(u zZ^Lm9C87>`#y%(HTq92agSK3Ra|_1w*m^t8n#AiXgt44F;5q2(=$i6!j1m^XkzVZ& zqg8_l4z_>j*mS(iRuWHum9STT!w|BCqE>Q+&I{u3*^H6*w#?2PzM_e`m-i1x+q(6tH1kCsV0$SI|4KiK(%gzweuYnOu3x za4qBJ*Hzoi%;u<>>o+35G1y5qcC;M_zq6h$m_zRFW4aBzcdCtO^$qQz@1#7?U(Y>P zUNK56+m%E#V%NPyHolkJk;_{D0xci2noqwPph61;hnVN$G*R>8DvLr8VzRD_M5ifo z;uTw|!RBp5%eVN8wr$%9J~loZCO3yRHP}sRW?8=t*zBK|lshgszDZ(oa%*MRX(u2LqMZj9&9#Z2dLOtm+N2Y-G? zuFpLtp?w@~l_+Z(cjj3N#S}4xeC?c>XA0>mAKY3x=nHAJQ^tvyb1Qd3dXBRuY&~|$ z8S`6+20oL|`4>SsL~v&^66+nYYCTp>X`VY8WF?&!kblGtgSYkbM#d)fI>Uch@+A$9 z&uj!Yn&j>vJEec=uB5looca9@{<5`YOpHrq!uUT#Pw1y{A1!O=%`>{l6CNhQYhH1Q z+J5K=nwpy3Ygtm+Od9@>7`~tfnon<8;3K=pQrj=7)*OR>_W7sPF-Gz0pDdlw@~A?H zXzTu+7qdWPN;5>m^zR@?@3`F31pRf*$!CL@X0#-aq0HR-f0r&RX zn>ouGPig^sf6}_-q&OD&-2{|r8Sk-Ls9sef0&E0@5B`^#0E6xFZo9t^7K&a7V8NWg z6FhAG37cc|#4rSzYK7NBGG7b;t0rP*x?qP__T{%Q{H#D-BoE3%f4do_CWOE0c(+;+XK>0=*)P?;Vz3Q#d z7;~t55n2gXBeGkAvJb(AiMxP-Q&90Yggs&BOak#1DjGMZSU>F;((u<@vXc{qFe6Y^ zLlHCaTRMaQIgVSfr}H;+w_bBU%4qk#aeG4pTAb%H^+ql`OGi8v|5%9@w(x+*Qg`Oh zMY&G~yfu31c=Ohs)OtPK{nX)WI&5*&`pg^t_Qz{3YSum42#p?RWj&YqJfRoGSWz~b zU^Ep3*SCfjb8Tp zP&(ora#~{xUr2jvZ1nuv&gluL+(=zf$u5#QyIqA3NcsC1;%h>1?SEOKw@Ya|iBMU; zweegG?`Gq%=%!*Tve>4aAlxUtMXrvD2rZ**w+}(xb>o~7Q~yJ!YlT&$FL~-His&ydAwcPNg}$f zH3Sm5lXBQ9pd2-Cx{$y%;Yg0|Kvjzf>^)v^l6Nt}eVoDgOPx3KbkL)Rf6%doY2S{H zBA442C(;CuXsExDi3)1f(8}EZ^zF;rjLkUD(ltN18@(MVZaAkT$9JfCEZbZ8d5Bn@}CdANa}vAdT5+zc^12htBI<9@mOu(o5k)eb>zL@r9+vC z*#>IsZV+oN#kz2lIH}UzE{wSXeodoLtjZWUvGswgLFR_x_I(3eQ1J=Q%dRsG%T;NN z>}If7p%bY;P-mikT0nM~3H!KLGP-gNh|%iulrad=_~-W!GxxSe8(ZrQ=gu3SZDzHe zSt$UoC{rz_*L1k=9X!>atEca088iNs+n5$-iQujGy?Dg(v?`KZ4*8*_iIVn#8ncdj zX`%)y6)4mXP-h{zAz~||ep>g!K)q;vLd32_!mGk_=}igo7~8bZtm%}3g;U2-W=wDW z@n_zo(ZN<6>E+LRULvIux>&*|og9;giH%kffG2XST;8(iT9WJLcmQ)OjUavORsW$U zj8Mkk;+JXp6-6D&+xSq|b1;_9IKLM8MtbzP>h?IY0NjxJa~o&uq-AYiCs-$<9Xvj& zBd_^-prsJR=D>de|L&Jy|3MuOHM;U-0@vY>$2XKbp-~f_SzTA{h0@z$Nh$O#Zk+m; z*Z2{3lw6m=TV6r>@1#mKN<)#RRV9g!?}WyLyeFN}`QdhCMfnQ8tu`~%a+Ij$zo_!h zvOm-eiY>CbPi{ZT&p5B0u>GVKE0`i3!=T!0e4z7`pl5g#C4BLX@N{6Ej)Ld@n2*+# zlYs4$lam2b{cgxYE4gf_?;QWpeIIy_HPcnTiBf4O*hL;JHeAgg`sG>wlRfN7 zrm^i@FH6f{KCcF=K=J4B9~Eq_{(Zx@cJWmYrh0xUDAp?@c#W^{CzZX&MbTM4qvg{Z5{$z#BRjMi>B}+EG_F zXDMRRJ*CrAP5|tA_@3A54tp5E{ECm65r0H{XrDHjbC<18oO{AiPP+rD+Ld~HB=9V! zVQQdF*w!l^W$c+8jezt%B@kA7XYA@ZxWmH4ajNB4VA9n02AQYbMtK5kQm zaLtgz^#>$Bc!D==h*j)f%>mt!)nt=+n6(wMw8xF`;AvrcWuP^&KNk@csMOWzX?jUX zLtlG%y40iaO1#yz80vrnA3?E)4HEW~aZMnXE@)ytMJh(OHq3zFMzej#!g!r1tv}&=ClTU)V zSI6vQgM|7&=xMxc=f1X_n#WKsF2@HswSqBo%bLN+-GO(6Pay5dSSsj6B;in5`>;-S z?8Mc&utP)7uqXE@;)j?pZUNC$Q)us{C?+3tg4>NG-OsAkiQ+{kyUi+WuBKYiVdh5O zm@zvQ+I|&~e{FJE=LghXYG)xMO^?m{lbi~kXU;Th`+O42>p8 z6HcZp3c%D@%1qm4#O73^l09+)`9SH0A+D&PvaUI;(F_;-(P6w?<}MRmKQBW9kdP|_2_2L#hkPlS4% z*zt4eB;VZsj{4bWxxI!uh1@C9pa)M*0#sWxwPn3j+z7c7q+Y;lYB4l@eFVh)j)|x^ zNqVPiWVQZUHFSr(!Fb{2qyG4wa}q{lkf14^XsszDV|@A$UUizj;QjCXZl{%ErDl6z!{l?B3X zxip&fw#>t#I~9?c7meF-4=U4KA~WeX`_zBZlY7bL^{wHKFGSvZzS-_ao(OXs1>IlT zZK4|3AMd2|^nIqu4VghR8O{|_k}~ySZ?m60mBc477uDAa*>V=5G{q?ErE9+1qIr;N zS>>GJ!UZL^a4jJ;SH5`{7a*QgUuMspLC@KKt{1dkgCGy$5R;=F>M;6lCwmmLB=+H8 zpA^2gP7-ztW>}+qZt!1zx~8x{Jrb+r?jE>;=GKvcsJt=x3JEhfk(rMiQ~e=i_@Pg$ z@N(9n3oanlVY17Noh_|(MTo@cVKCPsQh%QCZVj%zS^tb7>?>tB)ac{b0$JXgiyPVr z=7@5Us$tcZMNfAeyA*mBSvHKZ=j~=MacYiNsO`!QrYH{QGmV^p<;^X{h$D!4Nd&S7 z5|BAGoIK28X5k=l>vRc8m#`c$iQyK!mF&@0N*PwaRaNUYLS57jCp%+4ww+l6 zI)^QA?!}Y3MtUT;rm1m94}YikzcxwvaJ^2X0o+?uHxs!c1YeBc*Mqdj0piA_dOUi#(|U#=iZR->*D?B5>f6xlg0Trk+l6JF1F}|7cF#XBXNuE2oqjT!{~eMonQcNohWyCBDD^_#o_#eTUd7O`l5qyddETwA zOGEw$O@6Z~YP%W7s#g7vb$0cfV|4_0{^OY9*v>&afqPmhhxIcPi5?4vsbdODjS(i=q08I ze`bWQ7cLJi4?SR<54`Yo47(vi^3XjivVA!GfGm~S<#FrL2374u%2}t((O4K~;xrj6 z6(n4`1!3L}k7}jF<-j~Al9!>6BvsT13>K+6Y6|8)|2~a`xZZ`3>_qB9A3poimi5AE z=wj2~_~RgC3TpPk3uGfPPvP63P$Wq>l`Zj$#iD&*9!>wh(xkpN(ktC7VVOGiQl@rh zZTrKf+!PiXz~XryGBU`iE;tlSm$&wJ}i~?}wtNny7f53cOQDnZ1>sekaPljec#0ZmJ0(M2fgyVPiOCXeYv* z+p-4J378FuiHi8MDj02-d;7>V%8Xc+CdyEB-6>M4*Xm)qUmKxZrGPm=$322S)hc9; zF}^I5I_T-$snMeM|9Zp%@UkZF@@asut7vX z`u#1qEpq~H%O-IcT!4*3Sr8)mEF^o~2JBb5E#J2;j)Ub1FVBS?{I($C}Grq_4io znbJY}RDS46mT5b0z8&VKs=4b3Z#zdq-S!YeU@aV)*_@>q-1FAOMs8rZN5hn*3Z0>A zE;Hc~CFrEpwh$3w^_q%R^sXr9)pJ#Ow=NpTt;qcs?N=)aNv8@yzsmTzTX9mq&%-NA zT|o%xJm*^4yuFMu{`*|4nzLDI=!(Dze4HYMt5v~iG-2nSy+5waC|qRU8A^A;r5!J2 z&V%EvtK(y7Kw9L*gz&)&lOyRC96C$`TNAk`VsAMr`{4@dO>hh?q&NLI+#21G+`bZI z6;XNI{q8t&`X9KHm`v*r*!{eERQpf5e!Y$NChHzk8>Z<&O_it5z=vLPt==m`y9;6O zoFvZoZ)&zdO2njilJXMsWd9yqCVN!3aIU2JCyFh2dQ7mni(CLyAnUuE?=br&Ja#98 zD_?L=Ji3;bS8)nGAeP`S%%z)^-3l){^?I9LCVpubj73t8W9z+}1jV!SJtkI!f<~IIfS2M+ zSp)WsW7IUbe|JsMRyjR z^!m8GdtnjygXQNjBVT3p@{jQxI(#FmmLiXtod!GNT4qaPhR=^RU2$Ry#ewEI|2xL? z-urMI`=xaQA6;ju9n70eGhO%T*JVb(FmieR7a}kMPFbz7KiFI*pmfi!plu{}1)RKl zh<7cvZ|bOJ<)#?P=bRVz=U38M`b({g>T&y$rbaPCtlNp)q@125KvwP@^=wxl9UQcb zy+o~M?PIVvqzp_2G{qa(yC2pm*jJ$rXckqdS%U3UCUa5ZWA}{oAD9(rwIcO~UNAVVw^ zXb~wOpb79NGLe-c_R;!@TM>}5lvV;Y(%E)%TL=Pm99@~Pb>>tMQ zep4ozm_VC3m%uObjC%y1v$IUv|GS}m*wqE-Pxw`mjbWBzw>mD!y_{3tf2KXk7`mtMdN?ox3?j-CQ*J{>WjuHp@-XNa%$856>Eq{xl`M|z9+!bWz;V%+Zs{ea-|-;hVfO$8J< z%P$n#TOicVBToE zs4Rnpk~D8H;Q0iBWHh4N0`wvJs{dX${r5I!J>0^bu&g1?STS0EH1InSt<&vmukJSBp zG-@SMmP`~#-I8VPDphN88)aAK(YfwosQ?=vA%)#mSx@83SQUt{Um25mCpFf zd{=@UE-YHuFS%xf?Eo7e2+7DX#3*@vl>8vNh)I4n(IEz;t~b}=xor=899BJUIq$r_ zt;HsRpAB@JJa%a+BSl!=HvH^h>XhyMY$ACi>r1H2c+zC;y^2C`iPAuArG$;Dm@(s( zlI0wO*dPD&9O4KrX0pZ+M|OrFZSrM})mL?!vC`6BuNN9;@u z+pZ?+dw1gn{~ZYu`z?Yz0m@q)zAA>}-JUJT9Nx?6F1!?eGP6yGQ8tFO*4%UZs=Q-z z$A(FHtNlQ4=DG&Azi#mSq4OlB9Os19L^+DE^T;=Cy{Ra%6Y#Pa(pol}UFrW4UsM}v z3DUl}+9&tK^Q&MA&`ur}gPcltTL#e1^DR6PT$LAubt~lzspnv(yRne)zl_d$pCz~whIX*C8V%x+ zeXmK^^s3uAzu{-HJZMJrs`7D4}PR8Hv|ZmTogPikfkY5kaq%* zmp*ZhW-oE5_l(`}uXVP{bP`Q{k5Tl`1;^O+7jgEN+pfE_=OD{PZz>i0iFKYaQIV|E zqs1_*Ev_#50m;*3eEf2*E)LRjUe?#i1li3Zlj`vE7g-6i5r(o8MBDT&1dixMRZl~9 z9$RdOJWQ%}g9YKDQHSn*1uVJ#<=}Nf6>pZwXDg)t%%T(x05nIWP_Td>289zYr2~FL3G^`5vaP#6NB3-SIOeB7N{}5@+ozqoM|a{9K~3p=LH{G zuT+K7a=R+LHf|%ZrDpsiX;`^!Z&!=ChcWOx{PI0YH@0Eud_%gr>TqiA!-KbARpSUi zu9P()562V?uJhk)@~mFNT}8}@Cmq8}bHUI>cway+el^Eih3r_%LIrg^Z(QoScx7#b z&fR%$rL&n&Dcvt%X!`-?k&7e$*QsO!y}-Gf;{)|lLKUVei-MAOG%%Z77GX3WDo*~& zWlsh~xUENKBIEC_q)no~{^e`8&r3O*tNLp{=V5z_ocIMf)7-{&!I(W|pave38yWIU z31*&qdF=`UY?@NlibB*d3(ehR|J1Q6=T$^HYf*2E#<_v|$C+VBxR% z$O?`B1wsFphW-Bw5*%FHelOUcuo$sSWGH~;5h zYns~G`(OMVdGHPsalQ&je4K2>sL|R^b~mTyj`vO}h4qw1ujG`Q*?-QXRo2}abzx4g z09bTN?~lWju-s}dUS-2CQF-q@9RHk~{7G8{;4uBi0ht-dsve#KQovmr;nJ-DLj(tq zPI5{f%?aBb*Oqm`_-4S0NnVpI^^}s#UQ%{B!uVVS9FZPdAQ7QBHPIJLD&#o=dK2Ea z{)%hO;WRPtA9@1dh5(_dc90B^NT)$kYiwQOCi#>D&1TJdyLC#`EdqcYKfj<5-TBd5 zI?ulYO)mHVh*W174IdRS7X|bw0wBYD)-`^N2hahu4-fSb4d5@EmUe2F8pBhvrg@#4 zS#ZtW(zH{yWWYQ8AIIhaXV13{*8Rz`R#_FEVCQaqz?GS4zSN-QkaB?u(@pe>@W%|O ztvNF58{mbraI0(465;c5SfW9H)bZ|V>(#Y!^3CGDuQ;av%$*#~#RQ&ukJy7=pIpc; zfT|j}a|!oVM;)!wZ<-)ZQ6-76i5~ID?RPvoNgnnYrA4~X(V^VEFQ*4tI(E%DM0)sw zxG%y^j6y=IMQCrn$NS{8r&fnAKIi;*`w6u)0y48O>ZOl6-=Oy=m(t=QY$dyQybZMJ zQ(ntA6UC}CQ1pI4Y3`se>d5b#eIhV>z&y190apJe7RYv9_^^l21oW~PoR=+vIdbcj zQs&YRiAcY>In(Bi<(Y{U{AN$RRNevJWyKWGnp*2dh6m?_=senJUU@2TK#7U!v7X&| z8l!01Z>%SaNdz9u{saf`Ewcdd`5j1kml_6@F~06@OUYStI^}Og{AX#i>)T&lUir!>z*X4yVw_- zU7P|q+fJjU3?E>PoJLsb-3$Kv0AM;H5mV6`ko9x~C#v+D!}=Il-{?G!)2_;;^~u`k zSK?)r1#7-4+f^*x)O`&M4p&4ai7waPdFr@KunrTWWdsXQDb{ibIDhKkM)n+!R7a-vwTbZO zC`Ae{9j@d7sG+%y`Im$%g1Cw?F}^iL%^}X3zbkHTxb`)xhpZq_DpI5bqg^0`^Av9` zz!O6Cybc*?KIX|@Sz~y{v@5cqd&aeJ0w`}H9shc$=SWMg$%tnztOS%JMBW9J@5i=p zuyipZWd4Xu9i8HVe@8)zqBCv6{#1y~qOf_X+6AEAq9*b3+Dq>?x#o%9_r9+m3~%e` z57`2EHZ>r%{eNg}z)plT4dn>$IEx3MP6v#b4QV{XqaUrx0|8_+D`> zQZ_SJH}wUNemDSm3Y>ehiatNP*U*RsNbWU#seZ?(i<@mH$3&sQ2fWHD#kG28o2 zncqqD{Y7ty8rdvTucl8aS0lx88mcK_YMLM`pg0g)i$+B}EHAn*8BauHiFc#E`J`%? zC8pE{CANfCf=5Gv_9tA<_N|>$DUH-y0)IV49FrpwYed5V7ER@O$LbhfX|M+jKnK&L z5;-hj-T~T~=R`+aanO+|AVckVJCPWlS5>O;8>I3zY}PPzFlA2~Fe@=6@3Ig5P8lj4 z9llMsYyk{d84##)zBOT<7rAepV)Li8yXirNe7b}8b#`e<-r3DFmKluM1Zi~lg`l@j zIR64W_mQHo^Tj?Fl~qfIfMi2`Vs7&8(y6nLOYhdL{h+K&E``|Mj+zq3+vTm=Ea66S z815CXo1T3mz3b=FHGhirqdZ-%J=<_&z4v6dgfc}9y1YQ`wL(2}*atOM-09BXcr3o| z2*0qi1W>VG2e69(-M@2MCUCFh``ycdj@#i8j$Y#j5M|Tt2q`I7N0*wIIroo(oGCNVSpN zWJw7Md*S%T$M2nW5t9SbK_#$`H~;}f5md+J(tUr9Q}$8xt}OSW#PLuZCl3J5nw(!N zH_~g zs{PAD3xU&}Bxja`e2 z+Io3O`J+AaDM8oZEl0(k!h4v-O8?#7_vo)F&4ZcE*;&uMMY!BmvvE_X*~f(i;5(@+ z)`^8q6i*|UrwosGQtY2@xDGM{C%?A9B( z_}YP!H8ae)Y2Ym6sBGQp&;OLJH#!><=7@K6tZD`7S1KZ!v$$u0DUwhCr9K?W!C^AZ zzegWH=4IAf>h*kK8w%J+MKTU^fh^7H-1KJaF=BnzoPc*x4d@RMJ~_-&dYGO2(7b6d z^$q_#%k`a&Ai4*r*C(>W+0ZZPa?AGH>e2~-(*}z~^G%^R19VXEx zV>ye&IKO-bTfw?=Xm%j~3m|EcO(}wg8W!m(AKBLCPpA54>7TuS6$*DHGlAU-3@_y< za$Z5RhwX#H(lcv-#D-JF3Ffn}`%aANeYZA<+JyAmg%LFyw`@HIEB+lw;~PDNBDWiQ zKHFAO^hNjhXGEzT%09`kGea*^F9oaw`3DY0IDNeROiR^d4UN{Z_d7Q)9YVO~V*JZ- z1|N~0_AxN1X*XxH1u?8u-U1ZwC;>;XnkZO-zj#(g2|@0^3lx-~ae}?3_KVV0(eT{G zYc5X?Ryt}V6AQw3B#%A~hQTcSfrD$~)SZqx8jBjSQs9K%!Y@QdY~U6o0dB~-ke;HR z87U>_Af~G;o$R)+^HAhuM{{smC3#24&@V17#T!c0|4?fsW_hcNm@`>R%f$9vNyGLq z>aw-`xls3GEv!vqaazZ4(AssmIcF)Pb@&5=B$NR&XyUF*TZ{A(G`ANYroZu z$J8ZSn3{)Ft7U`VeCtw09abw|1&e=n7Xzl<&Y7qpdvwQ{{-Z*Ge;H#+=0$7Y#956_cmcU?KIjne0r}7!!Vpsg3d$txO(RjXI$Q@m8G)Z zfGGV~fnLDIxuy#3$o@8mbwP3eF({2L91JvD@a^EUMc{Au7?*zIP2ZsFjH+97!@hwN z5gTeehMEx(O^)OB%00VHZL`P542{XE=qH&#^61`Y$;dcAR<)T&T7H8*{5;)dm*E{^ zVN-^4^E9i6yA3LOWyjO)4r@q||C3MO1J0-C}B|LoB>ZP9Ggno&7GV2Xg z%Fdj__@fQnCVGurEL7ga@L zxG4JynyYBrD@C;7luBQ{bMR{fXi%qf$!xw<4D2}KW21QSZ`m9_`3H%@K3DJo#VKKl zEfvkAi*ZsBwf}~%8}3ddYL;CJJsUWopdjp9CTdLuptrT? z2F$!szLVuZrH}N%mFHX)raq((ey4P7uL(d+T7pdOQ^E}6jtjXqt2s-ZQFE@wCP)-F zgMRQ!^$n(=Zwsv9`T;FdaZ+vu76ICWFO%guCMhS!nlVJX8`&B-u6?b>a*`^&#jF&1>iXT9^rF<*VrqbeSXl?Tn&2n89UN+AWgxXb}vaW z*NRVdWIKSx3mZkaZrv@;SmYc0`_Uz57y?gM6Z$uHTB#bJ_+0Otfmf&^uPO&uuQ{r5 zRkQ)K=SRVmpWkqH;#K*6Ui{C2L*pMKjGp9{zY$%;4FbszYnk}kSe%u` zy(++8{+_4w9?M2cbO@_r3q%YI zhoHa^w8$F#!%IwD)kL8#7UHbAvx5r34)gE+xqjV=Gr8qVm!G>6&SkymlB&K_=ez7P zH+{{p&Pefdm1Xj6*~w;TU*kjaXfYC10yi8eav^L0MTF7-_Epg+I3$ta^dhx)v0!z= zPTr{ZlVHHf;an8|qNz7oAkbah<^B>{oy>Szmz9~=Cer2&Jn1tJXNjXuvx!i<*Y2rL zML9m_75RIVWn5u2e>Quc+AZsav&p!miHa7z#T}k?lhl7g_>AohXx7^s6!CSOYa})u zP4<1a84@N17F1Y1Ga0p9oRPLBQc9;IMk|bT)aKk~_x6*a?hR64InmUS*}TuU%+kk2 zyL+e|e+@OO)M1gUklzDrl_HZD=}^bKDk31hnasqW_zUS(j6%IdChmH9yHhJii$e@S zmK-M3l@gPcBvZRyAl4Uvq!>K0*i6Z~-?4FG^*GN|QpFgJ$` z3K$b|CsJ+qPMRt>sJ1xKm%7{M*#kLGxX=)0#GiUne@>e zJY-!z4bh`P|N3ZC!9T$LvGguhvobuLLSaza`pxCUVw6pBCspqA+d$MyFHuog zX0MH4oGjx*4cB)xbL*hvhPz$Pn`ucdHYXEFGYn3JB$G4)1^&eD18R}7?4X@OMV3Fl zHj_5n3(_2y#>LB~tAT9z#2D&NwdkNG1E>Frqi1YICiyQ8?mqbORnM1v)(=arK|j?c ztFOE=NgYYY$250$WGGZ%FMpNn%eBh*3}Zi%^HdR-a<%wf3-~SNY=D<5n>dO)u>8jd zdKFB+3hm8)9AK4c)>5F|O-*UP>)YkUWaJXHWBEL`5uUqLH@1o1eYoo(z8QYs;jP&} zE00R5kp9kH%g=~XGafqj^Qu--)POLvH{`Ho!Oo-p&`3(O$~2@bh;@=$Q=6*;31{nM zN2meRpnX^TMckP`@s=v|IMHWk&M2y%{x5)oZis3`J_IA6;$ZA;Eh`f_8*7pXmGNaS zXz|qv=6RlN2|nX%0|a%8P^BLvn*M5k?Ki)k8#ZG*Mtr|5fdV$xe%dTu zZG~N#f2|7S5I0M>SQgCNO(4TsohyBsnA12_w+Euu=d)Rf&QOyTGFx4XO)nVv`{s52 z8nA-^tFwDqva?d%gS6^>M(#bnP8JVzNhfSK4L4Gdw^z_W+hR)cpRa6Q(N*@cChO>zeu^^nK<<)!df9@dERF1QcWg3$?no>-TKzJ1f*cuyPKj1b z5=E-yrqwo5g2D_2S9A@kOGd_K4xhc(yT{R-0-meadRpp?uTU;@|3i9dv-#;iquOKM zYku>A|+GEh4CbWDcHqgAj@sPUg&eccgRRxYOWZ&fI{Xu4Uo0+Y{pVbd=( zLd(9DI3L&#wvEWWgz|@(cBUJaHmr9!#WCM6)Gp8b&S^7AKUZF(d5mWTAL#M)h?0c-|Q@FEa`g zBPN9((Cjm%!h(RsOqT85!G3o9yt;C?7WO8@>~*%S z&|NdQpJ}gZo5X49lE`BmvOGk!vR;-iiK&J7$TEm=*Twuz_HfbLLfI1hu(3e`>Rs@U z&5RO>F-ac3zRq}c-I(d&ESM<%)9%yPyWjQl;U=vNDk~0QfZC?^Z*c4#Mrbjg>>W7u zbJLmnCEL5=hfC`niNo9!UK4(%xrc&rBzZ&V-`@fix9G1~RJR8M0aWr3=~4MFtvC7= zAj7Wsdy1RMvUVSxobp(X%3~I=*4JM@1e$rv{B^Ud|cEW)&d>Jl6TGJlO zuYfxetN-dhtJIFR@}G{pzcQ8aJ~2%ml)6v**0XeR*Q;fIE;FDw-cBUFxP`ElM~sU& zPbQ7E@=AP-_~aWEaHoKri-u0F3SF)i`n}pj{S+r-zBbbkdf%f;J}xOUKCq@TirB9d zS3}6dvZUVM54Xf5j&FK_*)K_Z3XZVC7b-9V2bT|Wf1Z|E#5b+%{O}f&*7ny|&WejTjwE+d(pEO1} zx^5FyZJK3_+4x_||wY-rnxzmhH-hR%#n}G^?mExX-zaT}kcD5Q1eZx0lIMZnCb+xnO z*!Dl}%8rPaP{8g?U-ch0K1b=ldGbpFD02~(L0l#ccwq#<_Sq$RrLukcun*#g>aZr4 zk@lv*r2a9vG!2H>V+icF1+jwGL4~m<3 z@Fh9Ml=j(wMcAY5Vg>q% z+6sEX`=G^2&&Fqj-3wT8mnOZRSqpYgw|6h}x@8-^F|YWvOk6-2W$Dz-WJ*|1G{@zs z&+Lb0a`Zrdx;Lj5>Ah3lqn3opi#?H zYZCZ>+Pn9ECi_1Q;5U*&C##iHQ515hVcMv4D}^!Ul*p+zjW*hR)r>+1@{PzLbF3Uj z$SL_MRJ)UH#xkdz54X+P!X&1;ul*I@$NhL*zwNi{dVH?y`FLEP&-?v;E%k?_4fyuw z!-KKngoC|#h(*kX3jC?%Z?;HJ{kCz-6|Cus&9a=?WB{=B>C@bo^T*Etm9%*$jmuMd zd@qfl??M*6Mep`ANk~M35-0B``AMmXieUZ)4>jL!^0DK|FQ;`^qECLe`){&LUJ6RH zc7#moGZepVPD)T)ZGiMF1au8B=Cu2=we}FgWB94XK4dk?0j)lY4i%`X?>QZvux+5M zYtxoFVzdPdLm5VoXRqQ-xpLpqv3y`K|LR-zcUPr_q5brug1?X_Zx8QZ7vF5=#;S_X z--vZ}(`QdK-;B#67-YK|S2V8_DEm89{ASxoD-*vgXDeMqUjDwt>O}CRdIb>)1}P1b*5EX$dF;Sb1zvB+;t&RYXAhb+dzIW9qkG~8~2 z%pIKmO*EX_-(j*T-^93ie#)zD=BL&3{2%$JJ3sWBxsSQ(-CK7rsqwevwh9L9tpeZw zv8)?)Up8*SfV{_TzY>!i>e1I2re%}x>SJ8D<8pkuWuOAdlDgh%SR7fe11auG4lUf> zfXQpD?1A$u2Lr+VL|+~Ss(=k z7cZ^6*;ROOP4{H4-V%^S5kW=d7eA<7GR&=Vv9ZABPn@o4r!(FtsY%!W+B^Jg){*a> zf*kI+RBv9;X{Dzqy#!Rnj6J7!q@8Ui0&-Sg?ZuLORQX3d(ViFgYf5D|&Cf5sKxJ-( zYX&nTX3}}5k2?$H^ti&^>eiFi3o9j#B{Eei%Gv>= zXXMmVjVs+hD<;>hZx}xdFdEU>r~V8$60UCXfVR*6m^z*gvrW9Nl7*3ju)H2jTW4N> z3{QT1%gD~Sm5N2XDgGxHQ__H1(?9Pw7QZIqU4!^3zv@w|ozP4;3=F5&S)Vspk<&#O zph6B9u|H|G+&G)5iiZk5+1aC!>5)JoHg}j1{5Q`6Z>6LVmCY&gS=|-Qqojw4dES%!rarAnX!mnxFUP{_ag+uqeV3L6j6N%^C%R{ z^G=x@5qV7-C;!^I8Z|O?O=1j?fEqD^f)J2bYcK6RKK(w=o1L z;K@?C-xwi*?eIF1Iky*&$Bh-y6`bWg+)S(IbkKFRwh&g*r5OZGs+ z;`Ei_V(-eykg;2d(*k|X%1K$C5v)*{s=5yJ61E=-T%jmn2r07(AuRibP|EDig=;Bb!< z_JxgHM{F?gF{ggaq^@NV=(2h5GRd@XSAWROrin}kc} z92zg5I)l_|`u3jYSk;?983n9RhDQc*tSH_OG3Eth_FEY3dmb&-E9S& zWF9yC=Ap*}uZ>W_W%Ym4-}?=T%)C-j&IhVdcw$Sp zI$a5+A%3!V(KS9a3+S6W?5u+tLeDIpkHsUQk>*`&pu@I}wAcG$?gc62Pz@~S^10!7 z%kBQKV}H)ZlD5$OjcBwtJ>?mNsRQd`%LA}RfBA>$@QO#}t#<=68}(V;t3bvC)+4B$ zQLZS?Wix??{K@crK?4Qa$}KX@=Ar7d z{6BUihP{3yZiDC?xhcOwi7DDyQ)bSLr$z!32MC`?_BGz4bvt3oV6C%XN((2xbVmmU z#-x(VpX8?H2l(Mum?l0nlEDso!vekd^|QTw83PtIvi$j0? zagsF<`g+qh7b3?aPfA%&@%LxaOs z?+CuwJ%=xkYO7MnZPPj9!43?W9Tvw5=eGqPx3a_7IgRA8M<>=+1+;DahI+=js3 zJW0>WR}blUnEC82mO-@rPUh~2pFz&=e$~#{GgGuAfquRN^4EO(-^AiZI2V!StL=hi zpax@qkZK<#i5r_}XTKU$(x{Y*R@}ilksq3X#&UpGlQ%Q-SvLrsRg0<@M)V}txC>l^ zx^tvxE0EW~Nq+kc!dDK-N_Kpw3xQh!Z35*$QNB;by+rBju(Wbhs?%a=#BCB)7(2KN zxcdjmq7ROkgYR>d%$HcHUb;@^&8N2Ep1NQ>P^MQ--e~IS46GB1)u^@0jK~} z04e|#fC@kbpaM_9d KXJ7s48}knwJEv6u literal 0 HcmV?d00001 diff --git a/testing/scenario_app/lib/src/darwin_system_font.dart b/testing/scenario_app/lib/src/darwin_system_font.dart new file mode 100644 index 0000000000000..92bc1357625b7 --- /dev/null +++ b/testing/scenario_app/lib/src/darwin_system_font.dart @@ -0,0 +1,62 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'dart:ui'; + +import 'channel_util.dart'; +import 'scenario.dart'; + +/// Tries to draw darwin system font: CupertinoSystemDisplay, CupertinoSystemText +class DarwinSystemFont extends Scenario { + /// Creates the DarwinSystemFont scenario. + DarwinSystemFont(super.view); + + // Semi-arbitrary. + final double _screenWidth = 700; + + @override + void onBeginFrame(Duration duration) { + final SceneBuilder builder = SceneBuilder(); + final PictureRecorder recorder = PictureRecorder(); + final Canvas canvas = Canvas(recorder); + + final ParagraphBuilder paragraphBuilderDisplay = + ParagraphBuilder(ParagraphStyle(fontFamily: 'CupertinoSystemDisplay')) + ..pushStyle(TextStyle(fontSize: 50)) + ..addText('Cupertino System Display\n') + ..pop(); + final ParagraphBuilder paragraphBuilderText = + ParagraphBuilder(ParagraphStyle(fontFamily: 'CupertinoSystemText')) + ..pushStyle(TextStyle(fontSize: 50)) + ..addText('Cupertino System Text\n') + ..pop(); + + final Paragraph paragraphPro = paragraphBuilderDisplay.build(); + paragraphPro.layout(ParagraphConstraints(width: _screenWidth)); + canvas.drawParagraph(paragraphPro, const Offset(50, 80)); + + final Paragraph paragraphText = paragraphBuilderText.build(); + paragraphText.layout(ParagraphConstraints(width: _screenWidth)); + canvas.drawParagraph(paragraphText, const Offset(50, 200)); + + final Picture picture = recorder.endRecording(); + + builder.addPicture( + Offset.zero, + picture, + willChangeHint: true, + ); + final Scene scene = builder.build(); + view.render(scene); + scene.dispose(); + + sendJsonMessage( + dispatcher: view.platformDispatcher, + channel: 'display_data', + json: { + 'data': 'ready', + }, + ); + } +} diff --git a/testing/scenario_app/lib/src/scenarios.dart b/testing/scenario_app/lib/src/scenarios.dart index 8e3b15a985fa1..87f1f6cbba952 100644 --- a/testing/scenario_app/lib/src/scenarios.dart +++ b/testing/scenario_app/lib/src/scenarios.dart @@ -7,6 +7,7 @@ import 'dart:ui'; import 'animated_color_square.dart'; import 'bogus_font_text.dart'; import 'darwin_app_extension_scenario.dart'; +import 'darwin_system_font.dart'; import 'get_bitmap_scenario.dart'; import 'initial_route_reply.dart'; import 'locale_initialization.dart'; @@ -68,6 +69,7 @@ Map _scenarios = { 'display_texture': (FlutterView view) => DisplayTexture(view), 'get_bitmap': (FlutterView view) => GetBitmapScenario(view), 'app_extension': (FlutterView view) => DarwinAppExtensionScenario(view), + 'darwin_system_font': (FlutterView view) => DarwinSystemFont(view), }; Map _currentScenarioParams = {}; diff --git a/third_party/txt/BUILD.gn b/third_party/txt/BUILD.gn index a61438b72c5eb..da4d0615d7b9a 100644 --- a/third_party/txt/BUILD.gn +++ b/third_party/txt/BUILD.gn @@ -98,7 +98,10 @@ source_set("txt") { } if (is_mac || is_ios) { - sources += [ "src/txt/platform_mac.mm" ] + sources += [ + "src/txt/platform_mac.h", + "src/txt/platform_mac.mm", + ] deps += [ "//flutter/fml" ] } else if (is_android) { sources += [ "src/txt/platform_android.cc" ] @@ -148,6 +151,10 @@ if (enable_unittests) { "tests/txt_run_all_unittests.cc", ] + if (is_mac || is_ios) { + sources += [ "tests/platform_mac_tests.cc" ] + } + public_configs = [ ":txt_config" ] configs += [ ":allow_posix_names" ] diff --git a/third_party/txt/src/txt/asset_font_manager.h b/third_party/txt/src/txt/asset_font_manager.h index cc1c92711e793..4c1e34c17fdc1 100644 --- a/third_party/txt/src/txt/asset_font_manager.h +++ b/third_party/txt/src/txt/asset_font_manager.h @@ -89,7 +89,7 @@ class DynamicFontManager : public AssetFontManager { DynamicFontManager() : AssetFontManager(std::make_unique()) {} - TypefaceFontAssetProvider& font_provider() { + TypefaceFontAssetProvider& font_provider() const { return static_cast(*font_provider_); } }; diff --git a/third_party/txt/src/txt/platform_mac.h b/third_party/txt/src/txt/platform_mac.h new file mode 100644 index 0000000000000..7ff2e0d391ded --- /dev/null +++ b/third_party/txt/src/txt/platform_mac.h @@ -0,0 +1,17 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef TXT_PLATFORM_MAC_H_ +#define TXT_PLATFORM_MAC_H_ + +#include "txt/asset_font_manager.h" + +namespace txt { + +// Register additional system font for MacOS and iOS. +void RegisterSystemFonts(const DynamicFontManager& dynamic_font_manager); + +} // namespace txt + +#endif // TXT_PLATFORM_MAC_H_ diff --git a/third_party/txt/src/txt/platform_mac.mm b/third_party/txt/src/txt/platform_mac.mm index 4e116418c5974..3ab772ffb23e1 100644 --- a/third_party/txt/src/txt/platform_mac.mm +++ b/third_party/txt/src/txt/platform_mac.mm @@ -5,7 +5,9 @@ #include #include "flutter/fml/platform/darwin/platform_version.h" +#include "third_party/skia/include/ports/SkTypeface_mac.h" #include "txt/platform.h" +#include "txt/platform_mac.h" #if TARGET_OS_EMBEDDED || TARGET_OS_SIMULATOR #include @@ -15,6 +17,15 @@ #define FONT_CLASS NSFont #endif // TARGET_OS_EMBEDDED +// Apple system font larger than size 29 returns SFProDisplay typeface. +static const CGFloat kSFProDisplayBreakPoint = 29; +// Apple system font smaller than size 16 returns SFProText typeface. +static const CGFloat kSFProTextBreakPoint = 16; +// Font name represents the "SF Pro Display" system font on Apple platforms. +static const std::string kSFProDisplayName = "CupertinoSystemDisplay"; +// Font name represents the "SF Pro Text" system font on Apple platforms. +static const std::string kSFProTextName = "CupertinoSystemText"; + namespace txt { std::vector GetDefaultFontFamilies() { @@ -29,4 +40,34 @@ return SkFontMgr::RefDefault(); } +void RegisterSystemFonts(const DynamicFontManager& dynamic_font_manager) { + // iOS loads different system fonts when size is greater than 28 or lower + // than 17. The "familyName" property returned from CoreText stays the same + // despite the typeface is different. + // + // Below code manually loads and registers them as two different fonts + // so Flutter app can access them on macOS and iOS. + // + // Darwin system fonts from 17 to 28 also have dynamic spacing based on sizes. + // These two fonts do not match the spacings when sizes are from 17 to 28. + // The spacing should be handled by the app or the framework. + // + // See https://www.wwdcnotes.com/notes/wwdc20/10175/ for Apple's document on + // this topic. + sk_sp large_system_font = SkMakeTypefaceFromCTFont( + (CTFontRef)CFAutorelease(CTFontCreateUIFontForLanguage( + kCTFontUIFontSystem, kSFProDisplayBreakPoint, NULL))); + if (large_system_font) { + dynamic_font_manager.font_provider().RegisterTypeface(large_system_font, + kSFProDisplayName); + } + sk_sp regular_system_font = SkMakeTypefaceFromCTFont( + (CTFontRef)CFAutorelease(CTFontCreateUIFontForLanguage( + kCTFontUIFontSystem, kSFProTextBreakPoint, NULL))); + if (regular_system_font) { + dynamic_font_manager.font_provider().RegisterTypeface(regular_system_font, + kSFProTextName); + } +} + } // namespace txt diff --git a/third_party/txt/tests/platform_mac_tests.cc b/third_party/txt/tests/platform_mac_tests.cc new file mode 100644 index 0000000000000..54cea1c1324a1 --- /dev/null +++ b/third_party/txt/tests/platform_mac_tests.cc @@ -0,0 +1,34 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "gtest/gtest.h" + +#include + +#include "txt/platform_mac.h" + +namespace txt { +namespace testing { + +class PlatformMacTests : public ::testing::Test { + public: + PlatformMacTests() {} + + void SetUp() override {} +}; + +TEST_F(PlatformMacTests, RegisterSystemFonts) { + DynamicFontManager dynamic_font_manager; + RegisterSystemFonts(dynamic_font_manager); + ASSERT_EQ(dynamic_font_manager.font_provider().GetFamilyCount(), 2ul); + ASSERT_NE(dynamic_font_manager.font_provider().MatchFamily( + "CupertinoSystemDisplay"), + nullptr); + ASSERT_NE( + dynamic_font_manager.font_provider().MatchFamily("CupertinoSystemText"), + nullptr); +} + +} // namespace testing +} // namespace txt From 1d7a913dbf2da0b13c352bf1e4c9e24f8db46d68 Mon Sep 17 00:00:00 2001 From: Jia Hao Date: Thu, 19 Oct 2023 18:37:32 +0000 Subject: [PATCH 779/859] Fix use of nested designators (#45869) There was an internal global change which turned `-Wc99-designator`. This causes the following error: ``` error: nested designators are a C99 extension [-Werror,-Wc99-designator] 65 | .metal.struct_size = sizeof(FlutterMetalRendererConfig), | ^~~~~~~~~~~~~~~~~~ ``` This seems like a trivial (?) fix, so perhaps we can fix it properly and possibly remove https://github.com/flutter/buildroot/blob/b9fbd310d6fa68f888738d5236ea2f6caa2d2bfc/build/config/compiler/BUILD.gn#L667 after this PR lands. *List which issues are fixed by this PR. You must list at least one issue.* b/300573112 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].* [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- .../macos/framework/Source/FlutterRenderer.mm | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/shell/platform/darwin/macos/framework/Source/FlutterRenderer.mm b/shell/platform/darwin/macos/framework/Source/FlutterRenderer.mm index 63c4df7d5eec0..815336227f39c 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterRenderer.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterRenderer.mm @@ -62,16 +62,17 @@ - (instancetype)initWithFlutterEngine:(nonnull FlutterEngine*)flutterEngine { - (FlutterRendererConfig)createRendererConfig { FlutterRendererConfig config = { .type = FlutterRendererType::kMetal, - .metal.struct_size = sizeof(FlutterMetalRendererConfig), - .metal.device = (__bridge FlutterMetalDeviceHandle)_device, - .metal.present_command_queue = (__bridge FlutterMetalCommandQueueHandle)_commandQueue, - .metal.get_next_drawable_callback = - reinterpret_cast(OnGetNextDrawable), - .metal.present_drawable_callback = - reinterpret_cast(OnPresentDrawable), - .metal.external_texture_frame_callback = - reinterpret_cast(OnAcquireExternalTexture), - }; + .metal = { + .struct_size = sizeof(FlutterMetalRendererConfig), + .device = (__bridge FlutterMetalDeviceHandle)_device, + .present_command_queue = (__bridge FlutterMetalCommandQueueHandle)_commandQueue, + .get_next_drawable_callback = + reinterpret_cast(OnGetNextDrawable), + .present_drawable_callback = + reinterpret_cast(OnPresentDrawable), + .external_texture_frame_callback = + reinterpret_cast(OnAcquireExternalTexture), + }}; return config; } From 785f6e96ce911aa34161834678c010d9644500f0 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 19 Oct 2023 15:14:13 -0400 Subject: [PATCH 780/859] Roll Skia from 04449cda5a0a to b540ed3ba8e7 (4 revisions) (#47118) https://skia.googlesource.com/skia.git/+log/04449cda5a0a..b540ed3ba8e7 2023-10-19 kjlubick@google.com Add index.d.ts to debugger and jsfiddle images 2023-10-19 kjlubick@google.com Fix IWYU 2023-10-19 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll Dawn from 7317f665cc52 to 4759145c009e (8 revisions) 2023-10-19 johnstiles@google.com Fix ClangTidy `performance-unnecessary-value-param` findings. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index adc73db86ac99..0958e775b18b4 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '04449cda5a0a6af3fb52173597d5e33f387a2929', + 'skia_revision': 'b540ed3ba8e78066b7788cc408d16a42fbff250a', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 018a43d74186c..8cef7da492e36 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: a3bec4d065531ae846339dc14148ad94 +Signature: 5db19b0e36a8139c942fdefad16fd9fe ==================================================================================================== LIBRARY: etc1 From 8d0ce71e573f0f878230adb60eac2de00abd9819 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 19 Oct 2023 15:57:23 -0400 Subject: [PATCH 781/859] Roll Dart SDK from ea86103e06b1 to f71ddbe0a500 (1 revision) (#47124) https://dart.googlesource.com/sdk.git/+log/ea86103e06b1..f71ddbe0a500 2023-10-19 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-45.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jimgraham@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 0958e775b18b4..31307dbfba7dd 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': 'ea86103e06b198c2ead7cc60a096d8fce159e96c', + 'dart_revision': 'f71ddbe0a50070d48b20489a1ee0d58575c0d6b9', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index d01375be90301..c8d349c44d243 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: 4f15176c1153b8825c4d14d16be19773 +Signature: 60e8d7074c0edb8beae3bb225ed197b3 ==================================================================================================== LIBRARY: dart From 947ab1f94d2bb82a700ff970c3ffa57b02589544 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Thu, 19 Oct 2023 13:22:04 -0700 Subject: [PATCH 782/859] [Impeller] Use a weak pointer factory in GPUSurfaceGLImpeller that supports the raster thread merger (#47081) This is required for platform view scenarios that merge the raster task runner into the platform thread. --- shell/gpu/gpu_surface_gl_impeller.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/gpu/gpu_surface_gl_impeller.h b/shell/gpu/gpu_surface_gl_impeller.h index 048c8570e1140..c5327147ccc72 100644 --- a/shell/gpu/gpu_surface_gl_impeller.h +++ b/shell/gpu/gpu_surface_gl_impeller.h @@ -32,7 +32,7 @@ class GPUSurfaceGLImpeller final : public Surface { std::shared_ptr impeller_renderer_; std::shared_ptr aiks_context_; bool is_valid_ = false; - fml::WeakPtrFactory weak_factory_; + fml::TaskRunnerAffineWeakPtrFactory weak_factory_; // |Surface| std::unique_ptr AcquireFrame(const SkISize& size) override; From dc05416857e807fb3c941f9449161e69796e2092 Mon Sep 17 00:00:00 2001 From: Tong Mu Date: Thu, 19 Oct 2023 14:31:14 -0700 Subject: [PATCH 783/859] Reland 2 (part 2): Enforce the rule of calling `FlutterView.Render` (#47095) This PR relands part of https://github.com/flutter/engine/pull/45300, which was reverted in https://github.com/flutter/engine/pull/46919 due to performance regression. Due to how little and trivial production code the original PR touches, I really couldn't figure out the exact line that caused it except through experimentation, which requires changes to be officially landed on the main branch. After this PR lands, I'll immediately fire a performance test. This PR contains the render rule check performed by `PlatformDispatcher` of the original PR, the remaining changes to production code besides [the part 1](https://github.com/flutter/engine/pull/47062). Since part 1 shows no regression, the changes of this PR is highly likely to be the culprit. Therefore I made some changes: The rule enforcement is no longer performed in release mode, but only in debug mode. This will cause behavior deviation between builds, but since the developer should be able to notice violation in debug mode anyway, I think this design is acceptable. It is intentional to not contain any unit tests or other changes of the original PR. They will be landed shortly after this PR. Part of https://github.com/flutter/flutter/issues/136826. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- lib/ui/platform_dispatcher.dart | 52 +++++++++++++++++++++++++++++++++ lib/ui/window.dart | 13 ++++++++- 2 files changed, 64 insertions(+), 1 deletion(-) diff --git a/lib/ui/platform_dispatcher.dart b/lib/ui/platform_dispatcher.dart index 0bd387270ba13..66e68b88be56c 100644 --- a/lib/ui/platform_dispatcher.dart +++ b/lib/ui/platform_dispatcher.dart @@ -308,6 +308,28 @@ class PlatformDispatcher { _invoke(onMetricsChanged, _onMetricsChangedZone); } + // A debug-only variable that stores the [FlutterView]s for which + // [FlutterView.render] has already been called during the current + // [onBeginFrame]/[onDrawFrame] callback sequence. + // + // It is null outside the scope of those callbacks indicating that calls to + // [FlutterView.render] must be ignored. Furthermore, if a given [FlutterView] + // is already present in this set when its [FlutterView.render] is called + // again, that call must be ignored as a duplicate. + // + // Between [onBeginFrame] and [onDrawFrame] the properties value is + // temporarily stored in `_renderedViewsBetweenCallbacks` so that it survives + // the gap between the two callbacks. + // + // In release build, this variable is null, and therefore the calling rule is + // not enforced. This is because the check might hurt cold startup delay; + // see https://github.com/flutter/engine/pull/46919. + Set? _debugRenderedViews; + // A debug-only variable that temporarily stores the `_renderedViews` value + // between `_beginFrame` and `_drawFrame`. + // + // In release build, this variable is null. + Set? _debugRenderedViewsBetweenCallbacks; /// A callback invoked when any view begins a frame. /// @@ -329,11 +351,26 @@ class PlatformDispatcher { // Called from the engine, via hooks.dart void _beginFrame(int microseconds) { + assert(_debugRenderedViews == null); + assert(_debugRenderedViewsBetweenCallbacks == null); + assert(() { + _debugRenderedViews = {}; + return true; + }()); + _invoke1( onBeginFrame, _onBeginFrameZone, Duration(microseconds: microseconds), ); + + assert(_debugRenderedViews != null); + assert(_debugRenderedViewsBetweenCallbacks == null); + assert(() { + _debugRenderedViewsBetweenCallbacks = _debugRenderedViews; + _debugRenderedViews = null; + return true; + }()); } /// A callback that is invoked for each frame after [onBeginFrame] has @@ -351,7 +388,22 @@ class PlatformDispatcher { // Called from the engine, via hooks.dart void _drawFrame() { + assert(_debugRenderedViews == null); + assert(_debugRenderedViewsBetweenCallbacks != null); + assert(() { + _debugRenderedViews = _debugRenderedViewsBetweenCallbacks; + _debugRenderedViewsBetweenCallbacks = null; + return true; + }()); + _invoke(onDrawFrame, _onDrawFrameZone); + + assert(_debugRenderedViews != null); + assert(_debugRenderedViewsBetweenCallbacks == null); + assert(() { + _debugRenderedViews = null; + return true; + }()); } /// A callback that is invoked when pointer data is available. diff --git a/lib/ui/window.dart b/lib/ui/window.dart index 26a258cfa96c1..be761e548bb12 100644 --- a/lib/ui/window.dart +++ b/lib/ui/window.dart @@ -353,7 +353,18 @@ class FlutterView { /// scheduling of frames. /// * [RendererBinding], the Flutter framework class which manages layout and /// painting. - void render(Scene scene) => _render(scene as _NativeScene); + void render(Scene scene) { + // Duplicated calls or calls outside of onBeginFrame/onDrawFrame (indicated + // by _debugRenderedViews being null) are ignored. See _debugRenderedViews. + bool validRender = true; + assert(() { + validRender = platformDispatcher._debugRenderedViews?.add(this) ?? false; + return true; + }()); + if (validRender) { + _render(scene as _NativeScene); + } + } @Native)>(symbol: 'PlatformConfigurationNativeApi::Render') external static void _render(_NativeScene scene); From 22adf1f54b8a418d4421dc0fdd7d62dc3594c999 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 19 Oct 2023 17:44:16 -0400 Subject: [PATCH 784/859] Roll Fuchsia Linux SDK from Z2mOZ5cuPJWvKn22P... to eKYGl_wBcnT-n0J8n... (#47128) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jimgraham@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 31307dbfba7dd..bb0b625fbd42a 100644 --- a/DEPS +++ b/DEPS @@ -922,7 +922,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'Z2mOZ5cuPJWvKn22Pj1XAJX8XbAClEEfLgLjsYO9Q7IC' + 'version': 'eKYGl_wBcnT-n0J8n0CXoFTJEaRDAcYX-FIdnX2B99EC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index fa0bbe9e14306..0eef262bd52c1 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: 1748564dfb1b828e097d0db810f281ed +Signature: ebf535ed0fbe78acf2314c142313f9ea ==================================================================================================== LIBRARY: fuchsia_sdk From 2850862913598ec0b9519daaad2e32154f351e45 Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Thu, 19 Oct 2023 14:52:20 -0700 Subject: [PATCH 785/859] [macOS] Fail early when no a11y notification (#47129) In the SendsAccessibilityCreateNotificationToWindowOfFlutterView test in AccessibilityBridgeMacTest, we look for an accessibility notification by name in a map stored in the test accessibility bridge. If there is no such notification, bail out immediately. Previously we got a crash since we called `second` to retrieve the value associated with the map entry we find, without actually checking that we'd actually found an entry. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- .../macos/framework/Source/AccessibilityBridgeMacTest.mm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/shell/platform/darwin/macos/framework/Source/AccessibilityBridgeMacTest.mm b/shell/platform/darwin/macos/framework/Source/AccessibilityBridgeMacTest.mm index 536a62dceabe6..f499e80dc642a 100644 --- a/shell/platform/darwin/macos/framework/Source/AccessibilityBridgeMacTest.mm +++ b/shell/platform/darwin/macos/framework/Source/AccessibilityBridgeMacTest.mm @@ -105,10 +105,10 @@ @implementation AccessibilityBridgeTestViewController bridge->OnAccessibilityEvent(targeted_event); - EXPECT_EQ(bridge->actual_notifications.size(), 1u); - EXPECT_EQ( - bridge->actual_notifications.find([NSAccessibilityCreatedNotification UTF8String])->second, - expectedTarget); + ASSERT_EQ(bridge->actual_notifications.size(), 1u); + auto target = bridge->actual_notifications.find([NSAccessibilityCreatedNotification UTF8String]); + ASSERT_NE(target, bridge->actual_notifications.end()); + EXPECT_EQ(target->second, expectedTarget); [engine shutDownEngine]; } From f7690a7502b4d20507b8b9f3cf08d43b5ca6fd94 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 19 Oct 2023 18:14:31 -0400 Subject: [PATCH 786/859] Roll Skia from b540ed3ba8e7 to e5c37860c792 (2 revisions) (#47126) https://skia.googlesource.com/skia.git/+log/b540ed3ba8e7..e5c37860c792 2023-10-19 kjlubick@google.com Remove refTypefaceOrDefault and getTypefaceOrDefault from SkFont API 2023-10-19 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 3d986ea7a169 to bc2808e733a8 (4 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index bb0b625fbd42a..132ec2a1ed65f 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'b540ed3ba8e78066b7788cc408d16a42fbff250a', + 'skia_revision': 'e5c37860c792de6bba0c9465c3f5280cb13dbbb9', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 8cef7da492e36..67c2bbf27a584 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 5db19b0e36a8139c942fdefad16fd9fe +Signature: 2b0db970e958199e2d7bb246cc180162 ==================================================================================================== LIBRARY: etc1 @@ -387,6 +387,7 @@ FILE: ../../../third_party/skia/modules/pathkit/perf/perfReporter.js FILE: ../../../third_party/skia/modules/skparagraph/test.html FILE: ../../../third_party/skia/package-lock.json FILE: ../../../third_party/skia/relnotes/base64.md +FILE: ../../../third_party/skia/relnotes/font-default.md FILE: ../../../third_party/skia/relnotes/glbackendsemaphore.md FILE: ../../../third_party/skia/relnotes/grsurface-info.md FILE: ../../../third_party/skia/relnotes/mesh.md From d740c0ca70553e429ee121c4f4d5ea9bcc8dd87d Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 19 Oct 2023 18:18:29 -0400 Subject: [PATCH 787/859] Roll Fuchsia Mac SDK from 0hLSNJ_DCTzRvTVJe... to jkQctnDMmHydahKfZ... (#47132) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jimgraham@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 132ec2a1ed65f..9ca9a7f5710cc 100644 --- a/DEPS +++ b/DEPS @@ -912,7 +912,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': '0hLSNJ_DCTzRvTVJeTNCI2xer43DX4ZPkTDI8l9ES_4C' + 'version': 'jkQctnDMmHydahKfZP5lhsLVCKZkSeFitCOen4lNWEwC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 6968f971242a892d5e8009cbb68c3f5d4adcd6e0 Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Thu, 19 Oct 2023 15:46:13 -0700 Subject: [PATCH 788/859] Remove unused `fbo` parameter in GLES `SetAsFramebufferAttachment()`. (#47133) Trivial change that removes an unused parameter. --- impeller/renderer/backend/gles/blit_command_gles.cc | 2 +- impeller/renderer/backend/gles/render_pass_gles.cc | 6 +++--- impeller/renderer/backend/gles/texture_gles.cc | 1 - impeller/renderer/backend/gles/texture_gles.h | 1 - 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/impeller/renderer/backend/gles/blit_command_gles.cc b/impeller/renderer/backend/gles/blit_command_gles.cc index d6e56b6996081..5fbfc802e5f9c 100644 --- a/impeller/renderer/backend/gles/blit_command_gles.cc +++ b/impeller/renderer/backend/gles/blit_command_gles.cc @@ -41,7 +41,7 @@ static std::optional ConfigureFBO( gl.BindFramebuffer(fbo_type, fbo); if (!TextureGLES::Cast(*texture).SetAsFramebufferAttachment( - fbo_type, fbo, TextureGLES::AttachmentPoint::kColor0)) { + fbo_type, TextureGLES::AttachmentPoint::kColor0)) { VALIDATION_LOG << "Could not attach texture to framebuffer."; DeleteFBO(gl, fbo, fbo_type); return std::nullopt; diff --git a/impeller/renderer/backend/gles/render_pass_gles.cc b/impeller/renderer/backend/gles/render_pass_gles.cc index 4816a2973b0da..02356fdd58748 100644 --- a/impeller/renderer/backend/gles/render_pass_gles.cc +++ b/impeller/renderer/backend/gles/render_pass_gles.cc @@ -176,19 +176,19 @@ struct RenderPassData { if (auto color = TextureGLES::Cast(pass_data.color_attachment.get())) { if (!color->SetAsFramebufferAttachment( - GL_FRAMEBUFFER, fbo, TextureGLES::AttachmentPoint::kColor0)) { + GL_FRAMEBUFFER, TextureGLES::AttachmentPoint::kColor0)) { return false; } } if (auto depth = TextureGLES::Cast(pass_data.depth_attachment.get())) { if (!depth->SetAsFramebufferAttachment( - GL_FRAMEBUFFER, fbo, TextureGLES::AttachmentPoint::kDepth)) { + GL_FRAMEBUFFER, TextureGLES::AttachmentPoint::kDepth)) { return false; } } if (auto stencil = TextureGLES::Cast(pass_data.stencil_attachment.get())) { if (!stencil->SetAsFramebufferAttachment( - GL_FRAMEBUFFER, fbo, TextureGLES::AttachmentPoint::kStencil)) { + GL_FRAMEBUFFER, TextureGLES::AttachmentPoint::kStencil)) { return false; } } diff --git a/impeller/renderer/backend/gles/texture_gles.cc b/impeller/renderer/backend/gles/texture_gles.cc index 1ea904c602f0a..ad8d319150c53 100644 --- a/impeller/renderer/backend/gles/texture_gles.cc +++ b/impeller/renderer/backend/gles/texture_gles.cc @@ -506,7 +506,6 @@ static GLenum ToAttachmentPoint(TextureGLES::AttachmentPoint point) { } bool TextureGLES::SetAsFramebufferAttachment(GLenum target, - GLuint fbo, AttachmentPoint point) const { if (!IsValid()) { return false; diff --git a/impeller/renderer/backend/gles/texture_gles.h b/impeller/renderer/backend/gles/texture_gles.h index effee19d80fbd..7f5cb90e4d00b 100644 --- a/impeller/renderer/backend/gles/texture_gles.h +++ b/impeller/renderer/backend/gles/texture_gles.h @@ -46,7 +46,6 @@ class TextureGLES final : public Texture, kStencil, }; [[nodiscard]] bool SetAsFramebufferAttachment(GLenum target, - GLuint fbo, AttachmentPoint point) const; Type GetType() const; From 5534b9e0a8f302909776f79a78233c64af77445c Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 19 Oct 2023 20:00:15 -0400 Subject: [PATCH 789/859] Roll Skia from e5c37860c792 to 4c1ee6935b7b (1 revision) (#47136) https://skia.googlesource.com/skia.git/+log/e5c37860c792..4c1ee6935b7b 2023-10-19 lovisolo@google.com [bazel] goldctl_steps.go: Factor out utilities that can be shared with benchmark tasks. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 9ca9a7f5710cc..3503004570d59 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'e5c37860c792de6bba0c9465c3f5280cb13dbbb9', + 'skia_revision': '4c1ee6935b7b89c3fb9fe45869e6a099d71b8060', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 026e20f9565d36d561373a9b5d2557a35b7b8aac Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 19 Oct 2023 23:36:20 -0400 Subject: [PATCH 790/859] Roll Skia from 4c1ee6935b7b to 1d63da5da8e8 (1 revision) (#47140) https://skia.googlesource.com/skia.git/+log/4c1ee6935b7b..1d63da5da8e8 2023-10-20 lovisolo@google.com [bazel] Add bazel_test_benchmark.go task driver and sample CI task. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 3503004570d59..97eac84cec248 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '4c1ee6935b7b89c3fb9fe45869e6a099d71b8060', + 'skia_revision': '1d63da5da8e8bb83172031f459195c243f8d2194', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 771b195eb03d91adac39a38158110fddf2cfd31c Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 20 Oct 2023 00:38:24 -0400 Subject: [PATCH 791/859] Roll Dart SDK from f71ddbe0a500 to aadeeb497dbe (1 revision) (#47141) https://dart.googlesource.com/sdk.git/+log/f71ddbe0a500..aadeeb497dbe 2023-10-20 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-46.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jimgraham@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 10 +++++----- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/DEPS b/DEPS index 97eac84cec248..781b61eb22f85 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': 'f71ddbe0a50070d48b20489a1ee0d58575c0d6b9', + 'dart_revision': 'aadeeb497dbe551d4191a2588797123c4c689502', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py @@ -74,9 +74,9 @@ vars = { 'dart_protobuf_rev': 'c559fe52734ef6e2389e26ec3901eaf23fd76543', 'dart_pub_rev': 'fca927ae2662204805e1646c0c0687369001a41a', 'dart_root_certificates_rev': '692f6d6488af68e0121317a9c2c9eb393eb0ee50', - 'dart_tools_rev': 'ddeccf60604ba2115b6e634b8d526041abfbbac6', - 'dart_watcher_rev': '3998cdd37ecacd3a1715cdc76110b025bffbd1f6', - 'dart_webdev_rev': '8d48d5ea7709088da8ee6b72d744f63829287b04', + 'dart_tools_rev': '15cc9c789359f13a637472817b64b42d827cd879', + 'dart_watcher_rev': '6ad58dcbbf328fbecf18d6ad2357c67be300b489', + 'dart_webdev_rev': '1bd434b66b58927c6aaf6e6fcbba075d86b82cfd', 'dart_webkit_inspection_protocol_rev': '82f0c1c46dfdba5edf7c5fa84456233121dd69e1', 'dart_yaml_edit_rev': 'a7e7fbad5ee263cc681681c1a6eb9e6df5336ad6', 'dart_zlib_rev': '14dd4c4455602c9b71a1a89b5cafd1f4030d2e3f', @@ -418,7 +418,7 @@ deps = { Var('dart_git') + '/mime.git@af3e5fe753b957e95f03838f8a63782582c413ca', 'src/third_party/dart/third_party/pkg/mockito': - Var('dart_git') + '/mockito.git@47a5588788d37d7a94da9ceb9b3f3ef86c86f27e', + Var('dart_git') + '/mockito.git@4edf86ffe358462eafcb94fa3cbcb578d7cc6c6b', 'src/third_party/dart/third_party/pkg/native': Var('dart_git') + '/native.git@757f5034bb3cb9cf9db1b268fccea028d6b0f6a6', diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index c8d349c44d243..587befb0a3cab 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: 60e8d7074c0edb8beae3bb225ed197b3 +Signature: 7fb7754f9d3cde2c73ab74c5f0b5ea8d ==================================================================================================== LIBRARY: dart From c424f1b6dd74d5666e26832d759409f2b33507c5 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 20 Oct 2023 06:34:31 -0400 Subject: [PATCH 792/859] Roll Skia from 1d63da5da8e8 to 5291f485514f (3 revisions) (#47143) https://skia.googlesource.com/skia.git/+log/1d63da5da8e8..5291f485514f 2023-10-20 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from 37332ece3fb7 to 8a3b2b2a289e 2023-10-20 michaelludwig@google.com Define initial draft of SkBlurEngine API 2023-10-20 johnstiles@google.com Re-enable invsqrt usage for normalize() in SkRP. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 781b61eb22f85..554fe101dd799 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '1d63da5da8e8bb83172031f459195c243f8d2194', + 'skia_revision': '5291f485514f2fec6edb3cfc2a4459b32cbe4667', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 67c2bbf27a584..dd72d540c60ba 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 2b0db970e958199e2d7bb246cc180162 +Signature: 5a1f48037572ac55efad10aa9abd3923 ==================================================================================================== LIBRARY: etc1 @@ -8817,6 +8817,7 @@ ORIGIN: ../../../third_party/skia/src/core/SkBlitMask_opts_ssse3.cpp + ../../../ ORIGIN: ../../../third_party/skia/src/core/SkBlitRow_opts.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/core/SkBlitRow_opts_hsw.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/core/SkBlitter_A8.h + ../../../third_party/skia/LICENSE +ORIGIN: ../../../third_party/skia/src/core/SkBlurEngine.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/core/SkBlurMaskFilterImpl.h + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/core/SkCanvas_Raster.cpp + ../../../third_party/skia/LICENSE ORIGIN: ../../../third_party/skia/src/core/SkChecksum.cpp + ../../../third_party/skia/LICENSE @@ -9087,6 +9088,7 @@ FILE: ../../../third_party/skia/src/core/SkBlitMask_opts_ssse3.cpp FILE: ../../../third_party/skia/src/core/SkBlitRow_opts.cpp FILE: ../../../third_party/skia/src/core/SkBlitRow_opts_hsw.cpp FILE: ../../../third_party/skia/src/core/SkBlitter_A8.h +FILE: ../../../third_party/skia/src/core/SkBlurEngine.h FILE: ../../../third_party/skia/src/core/SkBlurMaskFilterImpl.h FILE: ../../../third_party/skia/src/core/SkCanvas_Raster.cpp FILE: ../../../third_party/skia/src/core/SkChecksum.cpp From 31c69c9c4fd2ed75afa7be5512361d2d395c7182 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 20 Oct 2023 06:48:21 -0400 Subject: [PATCH 793/859] Roll Dart SDK from aadeeb497dbe to ba96a157a8eb (1 revision) (#47147) https://dart.googlesource.com/sdk.git/+log/aadeeb497dbe..ba96a157a8eb 2023-10-20 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-47.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jimgraham@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 554fe101dd799..16f3e91ebf95a 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': 'aadeeb497dbe551d4191a2588797123c4c689502', + 'dart_revision': 'ba96a157a8eba2baa6d1d34e160eabb99e5b3bb2', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py From 7c088c03df71fa2c377c938ca741a0c5428a40f7 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 20 Oct 2023 07:09:20 -0400 Subject: [PATCH 794/859] Roll Fuchsia Linux SDK from eKYGl_wBcnT-n0J8n... to tcVA-iW-vOHPnwh_P... (#47149) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jimgraham@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 16f3e91ebf95a..362eeaeb528e6 100644 --- a/DEPS +++ b/DEPS @@ -922,7 +922,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'eKYGl_wBcnT-n0J8n0CXoFTJEaRDAcYX-FIdnX2B99EC' + 'version': 'tcVA-iW-vOHPnwh_PEqDBNKDOXwW3HSesjKKvZvusugC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index 0eef262bd52c1..c849a0418759d 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: ebf535ed0fbe78acf2314c142313f9ea +Signature: 03aade588626ed70cfe1caaedce7a38d ==================================================================================================== LIBRARY: fuchsia_sdk From ddc0063bdb8eeb51be1789e8acecbecea8d3faa0 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 20 Oct 2023 07:25:16 -0400 Subject: [PATCH 795/859] Roll Skia from 5291f485514f to 17f05db514c3 (4 revisions) (#47151) https://skia.googlesource.com/skia.git/+log/5291f485514f..17f05db514c3 2023-10-20 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from bc2808e733a8 to e244f69ab982 (11 revisions) 2023-10-20 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 889b01efcbf6 to d2de74510c4f (10 revisions) 2023-10-20 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from 37332ece3fb7 to acdd164d51ed (5 revisions) 2023-10-20 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Dawn from 4759145c009e to 68aac47724f2 (6 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 362eeaeb528e6..b15f476c3acf8 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '5291f485514f2fec6edb3cfc2a4459b32cbe4667', + 'skia_revision': '17f05db514c30422a1189c0cab3dbff0fd152f13', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index dd72d540c60ba..7f365290dcf95 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 5a1f48037572ac55efad10aa9abd3923 +Signature: 4f51d3b03740ef69a771cd855eed0a7b ==================================================================================================== LIBRARY: etc1 From ae2d13d429d7ba856f8dc6b2c1cc25287a218b4c Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 20 Oct 2023 08:26:17 -0400 Subject: [PATCH 796/859] Roll Skia from 17f05db514c3 to e836c3aa2b98 (1 revision) (#47154) https://skia.googlesource.com/skia.git/+log/17f05db514c3..e836c3aa2b98 2023-10-20 kjlubick@google.com Move font/typeface related functions out of ToolUtils.h If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index b15f476c3acf8..408660ae5e168 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '17f05db514c30422a1189c0cab3dbff0fd152f13', + 'skia_revision': 'e836c3aa2b988343fe8b5321e26dee8a452b7dba', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 7f365290dcf95..c57fdb1bf9d46 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 4f51d3b03740ef69a771cd855eed0a7b +Signature: 5992e57fa08de0399abb0def235140af ==================================================================================================== LIBRARY: etc1 From ba8aae9f83bfc26a1b52b38f8e8428691fef3081 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 20 Oct 2023 09:04:21 -0400 Subject: [PATCH 797/859] Roll Fuchsia Mac SDK from jkQctnDMmHydahKfZ... to VTlSkkxOaJrlxj_vv... (#47155) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jimgraham@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 408660ae5e168..cb028340b9137 100644 --- a/DEPS +++ b/DEPS @@ -912,7 +912,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'jkQctnDMmHydahKfZP5lhsLVCKZkSeFitCOen4lNWEwC' + 'version': 'VTlSkkxOaJrlxj_vv2f-dTwJ6fAXpF1GVsRyZqCadKkC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From c3dd29b6e6b8ac7a6cb536f51e910a3868c94cea Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 20 Oct 2023 10:21:14 -0400 Subject: [PATCH 798/859] Roll Skia from e836c3aa2b98 to 24abc105675c (1 revision) (#47156) https://skia.googlesource.com/skia.git/+log/e836c3aa2b98..24abc105675c 2023-10-20 michaelludwig@google.com Revert "Re-enable invsqrt usage for normalize() in SkRP." If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index cb028340b9137..2b35e4cc7c611 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'e836c3aa2b988343fe8b5321e26dee8a452b7dba', + 'skia_revision': '24abc105675cd1e949303d6d079098bd3c30f96c', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index c57fdb1bf9d46..78882ca93b375 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 5992e57fa08de0399abb0def235140af +Signature: 606c7f6afa3cef4f206a5c801ae1138e ==================================================================================================== LIBRARY: etc1 From bde6cdfcf1a7fcab01fadf9039b5cae0d0da0502 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 20 Oct 2023 11:06:27 -0400 Subject: [PATCH 799/859] Roll Skia from 24abc105675c to 04a9f72abd87 (1 revision) (#47159) https://skia.googlesource.com/skia.git/+log/24abc105675c..04a9f72abd87 2023-10-20 johnstiles@google.com Fix ClangTidy `performance-unnecessary-value-param` findings. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 2b35e4cc7c611..3e0aac8b6f242 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '24abc105675cd1e949303d6d079098bd3c30f96c', + 'skia_revision': '04a9f72abd87aa33cfc0e3e0fb162160f95407a2', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 78882ca93b375..20733b2c8736a 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 606c7f6afa3cef4f206a5c801ae1138e +Signature: d392558b34ba645f43d511d6dded86fb ==================================================================================================== LIBRARY: etc1 From e5b6d75bd3dc6fbbe880f1dd4b8518046c4294fb Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 20 Oct 2023 11:47:15 -0400 Subject: [PATCH 800/859] Roll Skia from 04a9f72abd87 to 461218cee44c (1 revision) (#47160) https://skia.googlesource.com/skia.git/+log/04a9f72abd87..461218cee44c 2023-10-20 egdaniel@google.com Add swiftshader workaround to resolve full MSAA image in dmsaa RenderPass. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 3e0aac8b6f242..da13d833dda32 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '04a9f72abd87aa33cfc0e3e0fb162160f95407a2', + 'skia_revision': '461218cee44cf435b39ffec2329081bede3e1d6f', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 20733b2c8736a..884bf071b2834 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: d392558b34ba645f43d511d6dded86fb +Signature: 77eb794cdfa5b2abd43252c2cb6d2d7d ==================================================================================================== LIBRARY: etc1 From 3933390adde7aeb17df302ea5f5794a1a7290d30 Mon Sep 17 00:00:00 2001 From: Mouad Debbar Date: Fri, 20 Oct 2023 12:03:15 -0400 Subject: [PATCH 801/859] [web] Attach pointer event listeners in the bubble phase (#47121) There's no reason (that we know of) to listen to pointer events during the capture phase, so let's listen on the bubble phase. I couldn't find a reason for listening to pointer events during the capture phase. So let's listen on the bubble phase which is more natural and allows platform views to `stopPropagation` in order to prevent Flutter from receiving an event. --- .../lib/src/engine/pointer_binding.dart | 37 ++++----------- .../test/engine/pointer_binding_test.dart | 46 +++++++++++++++++++ 2 files changed, 54 insertions(+), 29 deletions(-) diff --git a/lib/web_ui/lib/src/engine/pointer_binding.dart b/lib/web_ui/lib/src/engine/pointer_binding.dart index e2305c50b5e02..ce20224042438 100644 --- a/lib/web_ui/lib/src/engine/pointer_binding.dart +++ b/lib/web_ui/lib/src/engine/pointer_binding.dart @@ -197,7 +197,6 @@ class _Listener { required this.event, required this.target, required this.handler, - required this.useCapture, required this.isNative, }); @@ -206,17 +205,15 @@ class _Listener { required String event, required DomEventTarget target, required DartDomEventListener handler, - bool capture = false, }) { final DomEventListener jsHandler = createDomEventListener(handler); final _Listener listener = _Listener._( event: event, target: target, handler: jsHandler, - useCapture: capture, isNative: false, ); - target.addEventListener(event, jsHandler, capture); + target.addEventListener(event, jsHandler); return listener; } @@ -225,18 +222,15 @@ class _Listener { required String event, required DomEventTarget target, required DomEventListener jsHandler, - bool capture = false, bool passive = false, }) { final Map eventOptions = { - 'capture': capture, 'passive': passive, }; final _Listener listener = _Listener._( event: event, target: target, handler: jsHandler, - useCapture: capture, isNative: true, ); target.addEventListenerWithOptions(event, jsHandler, eventOptions); @@ -248,15 +242,10 @@ class _Listener { final DomEventTarget target; final DomEventListener handler; - final bool useCapture; final bool isNative; void unregister() { - if (isNative) { - target.removeEventListener(event, handler, useCapture); - } else { - target.removeEventListener(event, handler, useCapture); - } + target.removeEventListener(event, handler); } } @@ -297,18 +286,11 @@ abstract class _BaseAdapter { /// as the [target], while move and up events should use [domWindow] /// instead, because the browser doesn't fire the latter two for DOM elements /// when the pointer is outside the window. - /// - /// If [useCapture] is set to false, the event will be handled in the - /// bubbling phase instead of the capture phase. - /// See [DOM Level 3 Events][events] for a detailed explanation. - /// - /// [events]: https://www.w3.org/TR/DOM-Level-3-Events/#event-flow void addEventListener( DomEventTarget target, String eventName, - DartDomEventListener handler, { - bool useCapture = true, - }) { + DartDomEventListener handler, + ) { JSVoid loggedHandler(DomEvent event) { if (_debugLogPointerEvents) { if (domInstanceOfString(event, 'PointerEvent')) { @@ -332,7 +314,6 @@ abstract class _BaseAdapter { event: eventName, target: target, handler: loggedHandler, - capture: useCapture, )); } @@ -720,7 +701,6 @@ class _PointerAdapter extends _BaseAdapter with _WheelEventListenerMixin { DomEventTarget target, String eventName, _PointerEventListener handler, { - bool useCapture = true, bool checkModifiers = true, }) { addEventListener(target, eventName, (DomEvent event) { @@ -729,7 +709,7 @@ class _PointerAdapter extends _BaseAdapter with _WheelEventListenerMixin { _checkModifiersState(event); } handler(pointerEvent); - }, useCapture: useCapture); + }); } void _checkModifiersState(DomPointerEvent event) { @@ -788,7 +768,7 @@ class _PointerAdapter extends _BaseAdapter with _WheelEventListenerMixin { _convertEventsToPointerData(data: pointerData, event: event, details: details); _callback(pointerData); } - }, useCapture: false, checkModifiers: false); + }, checkModifiers: false); // TODO(dit): This must happen in the flutterViewElement, https://github.com/flutter/flutter/issues/116561 _addPointerEventListener(domWindow, 'pointerup', (DomPointerEvent event) { @@ -1075,7 +1055,6 @@ class _MouseAdapter extends _BaseAdapter with _WheelEventListenerMixin { DomEventTarget target, String eventName, _MouseEventListener handler, { - bool useCapture = true, bool checkModifiers = true, }) { addEventListener(target, eventName, (DomEvent event) { @@ -1084,7 +1063,7 @@ class _MouseAdapter extends _BaseAdapter with _WheelEventListenerMixin { _checkModifiersState(event); } handler(mouseEvent); - }, useCapture: useCapture); + }); } void _checkModifiersState(DomMouseEvent event) { @@ -1134,7 +1113,7 @@ class _MouseAdapter extends _BaseAdapter with _WheelEventListenerMixin { _convertEventsToPointerData(data: pointerData, event: event, details: details); _callback(pointerData); } - }, useCapture: false); + }); // TODO(dit): This must happen in the flutterViewElement, https://github.com/flutter/flutter/issues/116561 _addMouseEventListener(domWindow, 'mouseup', (DomMouseEvent event) { diff --git a/lib/web_ui/test/engine/pointer_binding_test.dart b/lib/web_ui/test/engine/pointer_binding_test.dart index dcb74beda73a6..e85b84bf1003a 100644 --- a/lib/web_ui/test/engine/pointer_binding_test.dart +++ b/lib/web_ui/test/engine/pointer_binding_test.dart @@ -477,6 +477,47 @@ void testMain() { // ALL ADAPTERS + // The reason we listen for pointer events in the bubble phase instead of the + // capture phase is to allow platform views and native text fields to receive + // the event first. This way, they can potentially handle the event and stop + // its propagation to prevent Flutter from receiving and handling it. + _testEach( + <_BasicEventContext>[ + _PointerEventContext(), + _MouseEventContext(), + _TouchEventContext(), + ], + 'event listeners are attached to the bubble phase', + (_BasicEventContext context) { + PointerBinding.instance!.debugOverrideDetector(context); + final List packets = []; + ui.window.onPointerDataPacket = (ui.PointerDataPacket packet) { + packets.add(packet); + }; + + final DomElement child = createDomHTMLDivElement(); + flutterViewElement.append(child); + + final DomEventListener stopPropagationListener = createDomEventListener((DomEvent event) { + event.stopPropagation(); + }); + + // The event reaches `PointerBinding` as expected. + child.dispatchEvent(context.primaryDown()); + expect(packets, isNotEmpty); + packets.clear(); + + // The child stops propagation so the event doesn't reach `PointerBinding`. + final DomEvent event = context.primaryDown(); + child.addEventListener(event.type, stopPropagationListener); + child.dispatchEvent(event); + expect(packets, isEmpty); + packets.clear(); + + child.remove(); + }, + ); + _testEach<_BasicEventContext>( <_BasicEventContext>[ _PointerEventContext(), @@ -3334,6 +3375,7 @@ class _TouchEventContext extends _BasicEventContext return createDomTouchEvent( eventType, { + 'bubbles': true, 'changedTouches': touches .map( (_TouchDetails details) => _createTouch( @@ -3550,6 +3592,7 @@ class _PointerEventContext extends _BasicEventContext String? pointerType, }) { return createDomPointerEvent('pointerdown', { + 'bubbles': true, 'pointerId': pointer, 'button': button, 'buttons': buttons, @@ -3604,6 +3647,7 @@ class _PointerEventContext extends _BasicEventContext String? pointerType, }) { return createDomPointerEvent('pointermove', { + 'bubbles': true, 'pointerId': pointer, 'button': button, 'buttons': buttons, @@ -3639,6 +3683,7 @@ class _PointerEventContext extends _BasicEventContext String? pointerType, }) { return createDomPointerEvent('pointerleave', { + 'bubbles': true, 'pointerId': pointer, 'button': button, 'buttons': buttons, @@ -3703,6 +3748,7 @@ class _PointerEventContext extends _BasicEventContext return touches .map((_TouchDetails details) => createDomPointerEvent('pointercancel', { + 'bubbles': true, 'pointerId': details.pointer, 'button': 0, 'buttons': 0, From 101712bcb1ee98d9187cea5fe5ce4a9ffb6681e8 Mon Sep 17 00:00:00 2001 From: Mouad Debbar Date: Fri, 20 Oct 2023 12:05:14 -0400 Subject: [PATCH 802/859] [web] Make HotRestartCacheHandler standalone (#46906) - `EmbeddingStrategy` shouldn't own the creation of `HotRestartCacheHandler`. - Simplify `HotRestartCacheHandler`'s JS-interop by using a `JSArray` directly instead of going through a Dart `List`. --- lib/web_ui/lib/src/engine/dom.dart | 125 ++++++++---------- .../custom_element_embedding_strategy.dart | 3 +- .../embedding_strategy.dart | 20 --- .../full_page_embedding_strategy.dart | 3 +- .../hot_restart_cache_handler.dart | 75 ++++++----- .../embedding_strategy_test.dart | 21 --- .../hot_restart_cache_handler_test.dart | 63 ++++++--- 7 files changed, 141 insertions(+), 169 deletions(-) diff --git a/lib/web_ui/lib/src/engine/dom.dart b/lib/web_ui/lib/src/engine/dom.dart index 62ba97d503305..733a43c82fddf 100644 --- a/lib/web_ui/lib/src/engine/dom.dart +++ b/lib/web_ui/lib/src/engine/dom.dart @@ -198,36 +198,6 @@ external DomIntl get domIntl; @JS('Symbol') external DomSymbol get domSymbol; -@JS('createImageBitmap') -external JSPromise _createImageBitmap(JSAny source); -Future createImageBitmap(JSAny source) => - js_util.promiseToFuture(_createImageBitmap(source)); - -@JS('createImageBitmap') -external JSPromise _createSizedImageBitmap(DomCanvasElement canvas, JSNumber sx, - JSNumber sy, JSNumber sw, JSNumber sh); -Future createSizedImageBitmap( - DomCanvasElement canvas, int sx, int sy, int sw, int sh) => - js_util.promiseToFuture( - _createSizedImageBitmap(canvas, sx.toJS, sy.toJS, sw.toJS, sh.toJS)); - -@JS('createImageBitmap') -external JSPromise _createSizedImageBitmapFromImageData( - DomImageData imageData, JSNumber sx, JSNumber sy, JSNumber sw, JSNumber sh); -Future createSizedImageBitmapFromImageData( - DomImageData imageData, int sx, int sy, int sw, int sh) => - js_util.promiseToFuture( - _createSizedImageBitmapFromImageData( - imageData, sx.toJS, sy.toJS, sw.toJS, sh.toJS)); - -@JS('createImageBitmap') -external JSPromise _createSizedOffscreenImageBitmap(DomOffscreenCanvas canvas, - JSNumber sx, JSNumber sy, JSNumber sw, JSNumber sh); -Future createSizedOffscreenImageBitmap( - DomOffscreenCanvas canvas, int sx, int sy, int sw, int sh) => - js_util.promiseToFuture(_createSizedOffscreenImageBitmap( - canvas, sx.toJS, sy.toJS, sw.toJS, sh.toJS)); - @JS() @staticInterop class DomNavigator {} @@ -1437,7 +1407,7 @@ extension DomCanvasRenderingContextWebGlExtension class DomCanvasRenderingContextBitmapRenderer {} extension DomCanvasRenderingContextBitmapRendererExtension - on DomCanvasRenderingContextBitmapRenderer { + on DomCanvasRenderingContextBitmapRenderer { external void transferFromImageBitmap(DomImageBitmap bitmap); } @@ -1445,13 +1415,10 @@ extension DomCanvasRenderingContextBitmapRendererExtension @staticInterop class DomImageData { external factory DomImageData._(JSAny? data, JSNumber sw, JSNumber sh); - external factory DomImageData._empty(JSNumber sw, JSNumber sh); } -DomImageData createDomImageData(Object data, int sw, int sh) => - DomImageData._(data.toJSAnyShallow, sw.toJS, sh.toJS); -DomImageData createBlankDomImageData(int sw, int sh) => - DomImageData._empty(sw.toJS, sh.toJS); +DomImageData createDomImageData(Object? data, int sw, int sh) => + DomImageData._(data?.toJSAnyShallow, sw.toJS, sh.toJS); extension DomImageDataExtension on DomImageData { @JS('data') @@ -1469,6 +1436,33 @@ extension DomImageBitmapExtension on DomImageBitmap { external void close(); } + +@JS('createImageBitmap') +external JSPromise _createImageBitmap1( + JSAny source, +); +@JS('createImageBitmap') +external JSPromise _createImageBitmap2( + JSAny source, + JSNumber x, + JSNumber y, + JSNumber width, + JSNumber height, +); +JSPromise createImageBitmap(JSAny source, [({int x, int y, int width, int height})? bounds]) { + if (bounds != null) { + return _createImageBitmap2( + source, + bounds.x.toJS, + bounds.y.toJS, + bounds.width.toJS, + bounds.height.toJS + ); + } else { + return _createImageBitmap1(source); + } +} + @JS() @staticInterop class DomCanvasPattern {} @@ -1511,8 +1505,7 @@ MockHttpFetchResponseFactory? mockHttpFetchResponseFactory; /// [httpFetchText] instead. Future httpFetch(String url) async { if (mockHttpFetchResponseFactory != null) { - final MockHttpFetchResponse? response = - await mockHttpFetchResponseFactory!(url); + final MockHttpFetchResponse? response = await mockHttpFetchResponseFactory!(url); if (response != null) { return response; } @@ -1769,7 +1762,8 @@ class MockHttpFetchPayload implements HttpFetchPayload { while (currentIndex < totalLength) { final int chunkSize = math.min(_chunkSize, totalLength - currentIndex); final Uint8List chunk = Uint8List.sublistView( - _byteBuffer.asByteData(), currentIndex, currentIndex + chunkSize); + _byteBuffer.asByteData(), currentIndex, currentIndex + chunkSize + ); callback(chunk.toJS as T); currentIndex += chunkSize; } @@ -1779,12 +1773,10 @@ class MockHttpFetchPayload implements HttpFetchPayload { Future asByteBuffer() async => _byteBuffer; @override - Future json() async => - throw AssertionError('json not supported by mock'); + Future json() async => throw AssertionError('json not supported by mock'); @override - Future text() async => - throw AssertionError('text not supported by mock'); + Future text() async => throw AssertionError('text not supported by mock'); } /// Indicates a missing HTTP payload when one was expected, such as when @@ -2319,7 +2311,9 @@ DomBlob createDomBlob(List parts, [Map? options]) { return DomBlob(parts.toJSAnyShallow as JSArray); } else { return DomBlob.withOptions( - parts.toJSAnyShallow as JSArray, options.toJSAnyDeep); + parts.toJSAnyShallow as JSArray, + options.toJSAnyDeep + ); } } @@ -2851,13 +2845,6 @@ extension DomOffscreenCanvasExtension on DomOffscreenCanvas { } } - WebGLContext getGlContext(int majorVersion) { - if (majorVersion == 1) { - return getContext('webgl')! as WebGLContext; - } - return getContext('webgl2')! as WebGLContext; - } - @JS('convertToBlob') external JSPromise _convertToBlob1(); @JS('convertToBlob') @@ -2871,11 +2858,6 @@ extension DomOffscreenCanvasExtension on DomOffscreenCanvas { } return js_util.promiseToFuture(blob); } - - @JS('transferToImageBitmap') - external JSAny? _transferToImageBitmap(); - DomImageBitmap transferToImageBitmap() => - _transferToImageBitmap()! as DomImageBitmap; } DomOffscreenCanvas createDomOffscreenCanvas(int width, int height) => @@ -3444,8 +3426,8 @@ class DomSegments {} extension DomSegmentsExtension on DomSegments { DomIteratorWrapper iterator() { - final DomIterator segmentIterator = js_util - .callMethod(this, domSymbol.iterator, const []) as DomIterator; + final DomIterator segmentIterator = + js_util.callMethod(this, domSymbol.iterator, const []) as DomIterator; return DomIteratorWrapper(segmentIterator); } } @@ -3582,8 +3564,10 @@ external JSAny? get _finalizationRegistryConstructor; // dart2js that causes a crash in the Google3 build if we do use a factory // constructor. See b/284478971 DomFinalizationRegistry createDomFinalizationRegistry(JSFunction cleanup) => - js_util.callConstructor( - _finalizationRegistryConstructor!.toObjectShallow, [cleanup]); + js_util.callConstructor( + _finalizationRegistryConstructor!.toObjectShallow, + [cleanup] + ); extension DomFinalizationRegistryExtension on DomFinalizationRegistry { @JS('register') @@ -3592,12 +3576,11 @@ extension DomFinalizationRegistryExtension on DomFinalizationRegistry { @JS('register') external JSVoid _register2(JSAny target, JSAny value, JSAny token); void register(Object target, Object value, [Object? token]) { - if (token != null) { - _register2( - target.toJSAnyShallow, value.toJSAnyShallow, token.toJSAnyShallow); - } else { - _register1(target.toJSAnyShallow, value.toJSAnyShallow); - } + if (token != null) { + _register2(target.toJSAnyShallow, value.toJSAnyShallow, token.toJSAnyShallow); + } else { + _register1(target.toJSAnyShallow, value.toJSAnyShallow); + } } @JS('unregister') @@ -3609,7 +3592,9 @@ extension DomFinalizationRegistryExtension on DomFinalizationRegistry { bool browserSupportsFinalizationRegistry = _finalizationRegistryConstructor != null; -@JS('window.OffscreenCanvas') -external JSAny? get _offscreenCanvasConstructor; - -bool browserSupportsOffscreenCanvas = _offscreenCanvasConstructor != null; +@JS() +@staticInterop +extension JSArrayExtension on JSArray { + external void push(JSAny value); + external JSNumber get length; +} diff --git a/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/custom_element_embedding_strategy.dart b/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/custom_element_embedding_strategy.dart index ecf92bb3d8956..94a211b23a21c 100644 --- a/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/custom_element_embedding_strategy.dart +++ b/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/custom_element_embedding_strategy.dart @@ -4,13 +4,14 @@ import 'package:ui/src/engine/dom.dart'; +import '../hot_restart_cache_handler.dart' show registerElementForCleanup; import 'embedding_strategy.dart'; /// An [EmbeddingStrategy] that renders flutter inside a target host element. /// /// This strategy attempts to minimize DOM modifications outside of the host /// element, so it plays "nice" with other web frameworks. -class CustomElementEmbeddingStrategy extends EmbeddingStrategy { +class CustomElementEmbeddingStrategy implements EmbeddingStrategy { /// Creates a [CustomElementEmbeddingStrategy] to embed a Flutter view into [_hostElement]. CustomElementEmbeddingStrategy(this._hostElement) { _hostElement.clearChildren(); diff --git a/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/embedding_strategy.dart b/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/embedding_strategy.dart index bb1c9361ae2a8..f9f358be21518 100644 --- a/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/embedding_strategy.dart +++ b/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/embedding_strategy.dart @@ -2,10 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'package:meta/meta.dart'; - import 'package:ui/src/engine/dom.dart'; -import 'package:ui/src/engine/view_embedder/hot_restart_cache_handler.dart'; import 'custom_element_embedding_strategy.dart'; import 'full_page_embedding_strategy.dart'; @@ -21,14 +18,6 @@ import 'full_page_embedding_strategy.dart'; /// element, provided by the web app programmer through the engine /// initialization. abstract class EmbeddingStrategy { - EmbeddingStrategy() { - // Initialize code to handle hot-restart (debug only). - assert(() { - _hotRestartCache = HotRestartCacheHandler(); - return true; - }()); - } - factory EmbeddingStrategy.create({DomElement? hostElement}) { if (hostElement != null) { return CustomElementEmbeddingStrategy(hostElement); @@ -37,9 +26,6 @@ abstract class EmbeddingStrategy { } } - /// Keeps a list of elements to be cleaned up at hot-restart. - HotRestartCacheHandler? _hotRestartCache; - void initialize({ Map? hostElementAttributes, }); @@ -49,10 +35,4 @@ abstract class EmbeddingStrategy { /// Attaches the resourceHost element into the hostElement. void attachResourcesHost(DomElement resourceHost, {DomElement? nextTo}); - - /// Registers a [DomElement] to be cleaned up after hot restart. - @mustCallSuper - void registerElementForCleanup(DomElement element) { - _hotRestartCache?.registerElement(element); - } } diff --git a/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/full_page_embedding_strategy.dart b/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/full_page_embedding_strategy.dart index b8abc6e2427b7..fdb7028fe991a 100644 --- a/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/full_page_embedding_strategy.dart +++ b/lib/web_ui/lib/src/engine/view_embedder/embedding_strategy/full_page_embedding_strategy.dart @@ -5,13 +5,14 @@ import 'package:ui/src/engine/dom.dart'; import 'package:ui/src/engine/util.dart' show setElementStyle; +import '../hot_restart_cache_handler.dart' show registerElementForCleanup; import 'embedding_strategy.dart'; /// An [EmbeddingStrategy] that takes over the whole web page. /// /// This strategy takes over the element, modifies the viewport meta-tag, /// and ensures that the root Flutter view covers the whole screen. -class FullPageEmbeddingStrategy extends EmbeddingStrategy { +class FullPageEmbeddingStrategy implements EmbeddingStrategy { @override void initialize({ Map? hostElementAttributes, diff --git a/lib/web_ui/lib/src/engine/view_embedder/hot_restart_cache_handler.dart b/lib/web_ui/lib/src/engine/view_embedder/hot_restart_cache_handler.dart index c37aff2504c4d..1751743280ed5 100644 --- a/lib/web_ui/lib/src/engine/view_embedder/hot_restart_cache_handler.dart +++ b/lib/web_ui/lib/src/engine/view_embedder/hot_restart_cache_handler.dart @@ -4,6 +4,7 @@ import 'dart:js_interop'; +import 'package:meta/meta.dart'; import 'package:ui/src/engine.dart'; import '../dom.dart'; @@ -12,59 +13,61 @@ import '../dom.dart'; /// to clear. Delay removal of old visible state to make the /// transition appear smooth. @JS('window.__flutterState') -external JSArray? get _hotRestartStore; -List? get hotRestartStore => - _hotRestartStore?.toObjectShallow as List?; +external JSArray? get _jsHotRestartStore; @JS('window.__flutterState') -external set _hotRestartStore(JSArray? nodes); -set hotRestartStore(List? nodes) => - _hotRestartStore = nodes?.toJSAnyShallow as JSArray?; +external set _jsHotRestartStore(JSArray? nodes); /// Handles [DomElement]s that need to be removed after a hot-restart. /// -/// Elements are stored in an [_elements] list, backed by a global JS variable, -/// named [defaultCacheName]. +/// This class shouldn't be used directly. It's only made public for testing +/// purposes. Instead, use [registerElementForCleanup]. +/// +/// Elements are stored in a [JSArray] stored globally at `window.__flutterState`. /// /// When the app hot-restarts (and a new instance of this class is created), -/// everything in [_elements] is removed from the DOM. +/// all elements in the global [JSArray] is removed from the DOM. class HotRestartCacheHandler { + @visibleForTesting HotRestartCacheHandler() { - if (_elements.isNotEmpty) { - // We are in a post hot-restart world, clear the elements now. - _clearAllElements(); - } + _resetHotRestartStore(); } - /// The js-interop layer backing [_elements]. - /// - /// Elements are stored in a JS global array named [defaultCacheName]. - late List? _jsElements; - - /// The elements that need to be cleaned up after hot-restart. - List get _elements { - _jsElements = hotRestartStore; - if (_jsElements == null) { - _jsElements = []; - hotRestartStore = _jsElements; - } - return _jsElements!; - } + /// Removes every element that was registered prior to the hot-restart from + /// the DOM. + void _resetHotRestartStore() { + final JSArray? jsStore = _jsHotRestartStore; - /// Removes every element from [_elements] and empties the list. - void _clearAllElements() { - for (final Object? element in _elements) { - if (element is DomElement) { - element.remove(); + if (jsStore != null) { + // We are in a post hot-restart world, clear the elements now. + final List store = jsStore.toObjectShallow as List; + for (final Object? element in store) { + if (element != null) { + (element as DomElement).remove(); + } } } - hotRestartStore = []; + _jsHotRestartStore = JSArray(); } /// Registers a [DomElement] to be removed after hot-restart. + @visibleForTesting void registerElement(DomElement element) { - final List elements = _elements; - elements.add(element); - hotRestartStore = elements; + _jsHotRestartStore!.push(element); } } + +final HotRestartCacheHandler? _hotRestartCache = () { + // In release mode, we don't need a hot restart cache, so we leave it null. + HotRestartCacheHandler? cache; + assert(() { + cache = HotRestartCacheHandler(); + return true; + }()); + return cache; +}(); + +/// Registers a [DomElement] to be cleaned up after hot restart. +void registerElementForCleanup(DomElement element) { + _hotRestartCache?.registerElement(element); +} diff --git a/lib/web_ui/test/engine/view_embedder/embedding_strategy/embedding_strategy_test.dart b/lib/web_ui/test/engine/view_embedder/embedding_strategy/embedding_strategy_test.dart index f13cf67c4cb4b..f254455ecd58a 100644 --- a/lib/web_ui/test/engine/view_embedder/embedding_strategy/embedding_strategy_test.dart +++ b/lib/web_ui/test/engine/view_embedder/embedding_strategy/embedding_strategy_test.dart @@ -11,7 +11,6 @@ import 'package:ui/src/engine/dom.dart'; import 'package:ui/src/engine/view_embedder/embedding_strategy/custom_element_embedding_strategy.dart'; import 'package:ui/src/engine/view_embedder/embedding_strategy/embedding_strategy.dart'; import 'package:ui/src/engine/view_embedder/embedding_strategy/full_page_embedding_strategy.dart'; -import 'package:ui/src/engine/view_embedder/hot_restart_cache_handler.dart'; void main() { internalBootstrapBrowserTest(() => doTests); @@ -35,24 +34,4 @@ void doTests() { expect(strategy, isA()); }); }); - - group('registerElementForCleanup', () { - test('stores elements in a global domCache', () async { - final EmbeddingStrategy strategy = EmbeddingStrategy.create(); - - final DomElement toBeCached = createDomElement('some-element-to-cache'); - final DomElement other = createDomElement('other-element-to-cache'); - final DomElement another = createDomElement('another-element-to-cache'); - - strategy.registerElementForCleanup(toBeCached); - strategy.registerElementForCleanup(other); - strategy.registerElementForCleanup(another); - - final List cache = hotRestartStore!; - - expect(cache, hasLength(3)); - expect(cache.first, toBeCached); - expect(cache.last, another); - }); - }); } diff --git a/lib/web_ui/test/engine/view_embedder/hot_restart_cache_handler_test.dart b/lib/web_ui/test/engine/view_embedder/hot_restart_cache_handler_test.dart index 7525b571d9acc..934718ce75e70 100644 --- a/lib/web_ui/test/engine/view_embedder/hot_restart_cache_handler_test.dart +++ b/lib/web_ui/test/engine/view_embedder/hot_restart_cache_handler_test.dart @@ -5,31 +5,58 @@ @TestOn('browser') library; +import 'dart:js_interop'; + import 'package:test/bootstrap/browser.dart'; import 'package:test/test.dart'; import 'package:ui/src/engine/dom.dart'; import 'package:ui/src/engine/view_embedder/hot_restart_cache_handler.dart'; +@JS('window.__flutterState') +external JSArray? get _jsHotRestartStore; + +@JS('window.__flutterState') +external set _jsHotRestartStore(JSArray? nodes); + void main() { internalBootstrapBrowserTest(() => doTests); } void doTests() { - group('Constructor', () { - test('Creates a cache in the JS environment', () async { - final HotRestartCacheHandler cache = HotRestartCacheHandler(); + tearDown(() { + _jsHotRestartStore = null; + }); - expect(cache, isNotNull); + group('registerElementForCleanup', () { + test('stores elements in a global cache', () async { + final DomElement toBeCached = createDomElement('some-element-to-cache'); + final DomElement other = createDomElement('other-element-to-cache'); + final DomElement another = createDomElement('another-element-to-cache'); + + registerElementForCleanup(toBeCached); + registerElementForCleanup(other); + registerElementForCleanup(another); + + expect(_jsHotRestartStore!.toDart, [ + toBeCached, + other, + another, + ]); + }); + }); - final List? domCache = hotRestartStore; + group('HotRestartCacheHandler Constructor', () { + test('Creates a cache in the JS environment', () async { + HotRestartCacheHandler(); - expect(domCache, isNotNull); - expect(domCache, isEmpty); + expect(_jsHotRestartStore, isNotNull); + // For dart2wasm, we have to check the length this way. + expect(_jsHotRestartStore!.length, 0.toJS); }); }); - group('registerElement', () { - HotRestartCacheHandler? cache; + group('HotRestartCacheHandler.registerElement', () { + late HotRestartCacheHandler cache; setUp(() { cache = HotRestartCacheHandler(); @@ -37,22 +64,18 @@ void doTests() { test('Registers an element in the DOM cache', () async { final DomElement element = createDomElement('for-test'); - cache!.registerElement(element); + cache.registerElement(element); - final List? domCache = hotRestartStore; - expect(domCache, hasLength(1)); - expect(domCache!.last, element); + expect(_jsHotRestartStore!.toDart, [element]); }); test('Registers elements in the DOM cache', () async { final DomElement element = createDomElement('for-test'); domDocument.body!.append(element); - cache!.registerElement(element); + cache.registerElement(element); - final List? domCache = hotRestartStore; - expect(domCache, hasLength(1)); - expect(domCache!.last, element); + expect(_jsHotRestartStore!.toDart, [element]); }); test('Clears registered elements from the DOM and the cache upon restart', @@ -62,7 +85,7 @@ void doTests() { domDocument.body!.append(element); domDocument.body!.append(element2); - cache!.registerElement(element); + cache.registerElement(element); expect(element.isConnected, isTrue); expect(element2.isConnected, isTrue); @@ -70,8 +93,8 @@ void doTests() { // Simulate a hot restart... cache = HotRestartCacheHandler(); - final List? domCache = hotRestartStore; - expect(domCache, hasLength(0)); + // For dart2wasm, we have to check the length this way. + expect(_jsHotRestartStore!.length, 0.toJS); expect(element.isConnected, isFalse); // Removed expect(element2.isConnected, isTrue); }); From 017ac1ee5e74431716852ea647cf2360ba36bc07 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 20 Oct 2023 12:31:19 -0400 Subject: [PATCH 803/859] Roll Skia from 461218cee44c to de628929015d (1 revision) (#47161) https://skia.googlesource.com/skia.git/+log/461218cee44c..de628929015d 2023-10-20 lehoangquyen@chromium.org GraphiteDawn: return error when BlitWithDrawn pipeline creation fails. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index da13d833dda32..bf302fc3612eb 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '461218cee44cf435b39ffec2329081bede3e1d6f', + 'skia_revision': 'de628929015d144edc1ec4a407601fc78da24db4', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 884bf071b2834..626adef770a01 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 77eb794cdfa5b2abd43252c2cb6d2d7d +Signature: cc293eec6887015255a7b33a10f2577b ==================================================================================================== LIBRARY: etc1 From 15a05a3f6b82f3dc362a8bdeadb25d73da2fc9c6 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 20 Oct 2023 13:12:17 -0400 Subject: [PATCH 804/859] Roll Skia from de628929015d to b960e9140f56 (2 revisions) (#47164) https://skia.googlesource.com/skia.git/+log/de628929015d..b960e9140f56 2023-10-20 armansito@google.com Add Graphite Vello Test jobs to CQ 2023-10-20 herb@google.com Add point_less_than_segment_in_x If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index bf302fc3612eb..7848724186d52 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'de628929015d144edc1ec4a407601fc78da24db4', + 'skia_revision': 'b960e9140f56675c0a2f6a8664967a56bd3e5158', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 626adef770a01..bee8d62c68cc4 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: cc293eec6887015255a7b33a10f2577b +Signature: 1c400dc7d1eeb2a8c37c54eca028db89 ==================================================================================================== LIBRARY: etc1 From ed4662f168c31efc8dcc30e663b23e09de94ee86 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Fri, 20 Oct 2023 10:20:43 -0700 Subject: [PATCH 805/859] [Impeller] GPU Tracer for GLES. (#47080) Trace GPU execution time on GLES using GL_EXT_disjoint_timer_query. This requires a per-app opt in from the Android Manifest with the key `"io.flutter.embedding.android.EnableOpenGLGPUTracing` set to true. --- ci/licenses_golden/licenses_flutter | 4 + common/settings.h | 4 + .../backend/gles/playground_impl_gles.cc | 4 +- impeller/renderer/backend/gles/BUILD.gn | 3 + .../renderer/backend/gles/context_gles.cc | 17 ++-- impeller/renderer/backend/gles/context_gles.h | 13 ++- .../renderer/backend/gles/gpu_tracer_gles.cc | 88 +++++++++++++++++++ .../renderer/backend/gles/gpu_tracer_gles.h | 51 +++++++++++ .../renderer/backend/gles/proc_table_gles.h | 8 +- .../renderer/backend/gles/render_pass_gles.cc | 20 ++++- .../renderer/backend/gles/surface_gles.cc | 4 + .../gles/test/gpu_tracer_gles_unittests.cc | 50 +++++++++++ .../renderer/backend/gles/test/mock_gles.cc | 59 +++++++++++++ .../renderer/backend/metal/gpu_tracer_mtl.h | 11 +-- shell/common/switches.cc | 2 + shell/common/switches.h | 4 + .../android/android_context_gl_impeller.cc | 28 +++--- .../android/android_context_gl_impeller.h | 4 +- .../android_context_gl_impeller_unittests.cc | 6 +- .../android/android_context_vulkan_impeller.h | 2 +- .../engine/loader/FlutterLoader.java | 5 ++ .../platform/android/platform_view_android.cc | 13 ++- .../embedder/embedder_surface_gl_impeller.cc | 13 +-- 23 files changed, 364 insertions(+), 49 deletions(-) create mode 100644 impeller/renderer/backend/gles/gpu_tracer_gles.cc create mode 100644 impeller/renderer/backend/gles/gpu_tracer_gles.h create mode 100644 impeller/renderer/backend/gles/test/gpu_tracer_gles_unittests.cc diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index 832aa8151774e..a7a265affe37b 100644 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -2086,6 +2086,8 @@ ORIGIN: ../../../flutter/impeller/renderer/backend/gles/device_buffer_gles.h + . ORIGIN: ../../../flutter/impeller/renderer/backend/gles/formats_gles.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/renderer/backend/gles/formats_gles.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/renderer/backend/gles/gles.h + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/renderer/backend/gles/gpu_tracer_gles.cc + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/impeller/renderer/backend/gles/gpu_tracer_gles.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/renderer/backend/gles/handle_gles.cc + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/renderer/backend/gles/handle_gles.h + ../../../flutter/LICENSE ORIGIN: ../../../flutter/impeller/renderer/backend/gles/pipeline_gles.cc + ../../../flutter/LICENSE @@ -4856,6 +4858,8 @@ FILE: ../../../flutter/impeller/renderer/backend/gles/device_buffer_gles.h FILE: ../../../flutter/impeller/renderer/backend/gles/formats_gles.cc FILE: ../../../flutter/impeller/renderer/backend/gles/formats_gles.h FILE: ../../../flutter/impeller/renderer/backend/gles/gles.h +FILE: ../../../flutter/impeller/renderer/backend/gles/gpu_tracer_gles.cc +FILE: ../../../flutter/impeller/renderer/backend/gles/gpu_tracer_gles.h FILE: ../../../flutter/impeller/renderer/backend/gles/handle_gles.cc FILE: ../../../flutter/impeller/renderer/backend/gles/handle_gles.h FILE: ../../../flutter/impeller/renderer/backend/gles/pipeline_gles.cc diff --git a/common/settings.h b/common/settings.h index af002c93006c4..00dc5aeaf8d04 100644 --- a/common/settings.h +++ b/common/settings.h @@ -228,6 +228,10 @@ struct Settings { // must be available to the application. bool enable_vulkan_validation = false; + // Enable GPU tracing in GLES backends. + // Some devices claim to support the required APIs but crash on their usage. + bool enable_opengl_gpu_tracing = false; + // Data set by platform-specific embedders for use in font initialization. uint32_t font_initialization_data = 0; diff --git a/impeller/playground/backend/gles/playground_impl_gles.cc b/impeller/playground/backend/gles/playground_impl_gles.cc index 6e5c3f11ab198..fbf64c44ba35c 100644 --- a/impeller/playground/backend/gles/playground_impl_gles.cc +++ b/impeller/playground/backend/gles/playground_impl_gles.cc @@ -112,8 +112,8 @@ std::shared_ptr PlaygroundImplGLES::GetContext() const { return nullptr; } - auto context = - ContextGLES::Create(std::move(gl), ShaderLibraryMappingsForPlayground()); + auto context = ContextGLES::Create( + std::move(gl), ShaderLibraryMappingsForPlayground(), true); if (!context) { FML_LOG(ERROR) << "Could not create context."; return nullptr; diff --git a/impeller/renderer/backend/gles/BUILD.gn b/impeller/renderer/backend/gles/BUILD.gn index 1d783c0f8c841..4188d25478250 100644 --- a/impeller/renderer/backend/gles/BUILD.gn +++ b/impeller/renderer/backend/gles/BUILD.gn @@ -16,6 +16,7 @@ impeller_component("gles_unittests") { sources = [ "test/capabilities_unittests.cc", "test/formats_gles_unittests.cc", + "test/gpu_tracer_gles_unittests.cc", "test/mock_gles.cc", "test/mock_gles.h", "test/mock_gles_unittests.cc", @@ -51,6 +52,8 @@ impeller_component("gles") { "formats_gles.cc", "formats_gles.h", "gles.h", + "gpu_tracer_gles.cc", + "gpu_tracer_gles.h", "handle_gles.cc", "handle_gles.h", "pipeline_gles.cc", diff --git a/impeller/renderer/backend/gles/context_gles.cc b/impeller/renderer/backend/gles/context_gles.cc index 6896d6609777e..779255dffa6c4 100644 --- a/impeller/renderer/backend/gles/context_gles.cc +++ b/impeller/renderer/backend/gles/context_gles.cc @@ -3,23 +3,27 @@ // found in the LICENSE file. #include "impeller/renderer/backend/gles/context_gles.h" +#include #include "impeller/base/config.h" #include "impeller/base/validation.h" #include "impeller/renderer/backend/gles/command_buffer_gles.h" +#include "impeller/renderer/backend/gles/gpu_tracer_gles.h" namespace impeller { std::shared_ptr ContextGLES::Create( std::unique_ptr gl, - const std::vector>& shader_libraries) { + const std::vector>& shader_libraries, + bool enable_gpu_tracing) { return std::shared_ptr( - new ContextGLES(std::move(gl), shader_libraries)); + new ContextGLES(std::move(gl), shader_libraries, enable_gpu_tracing)); } -ContextGLES::ContextGLES(std::unique_ptr gl, - const std::vector>& - shader_libraries_mappings) { +ContextGLES::ContextGLES( + std::unique_ptr gl, + const std::vector>& shader_libraries_mappings, + bool enable_gpu_tracing) { reactor_ = std::make_shared(std::move(gl)); if (!reactor_->IsValid()) { VALIDATION_LOG << "Could not create valid reactor."; @@ -61,7 +65,8 @@ ContextGLES::ContextGLES(std::unique_ptr gl, std::shared_ptr(new SamplerLibraryGLES( device_capabilities_->SupportsDecalSamplerAddressMode())); } - + gpu_tracer_ = std::make_shared(GetReactor()->GetProcTable(), + enable_gpu_tracing); is_valid_ = true; } diff --git a/impeller/renderer/backend/gles/context_gles.h b/impeller/renderer/backend/gles/context_gles.h index 56da6c55a8092..0d097c3f18a87 100644 --- a/impeller/renderer/backend/gles/context_gles.h +++ b/impeller/renderer/backend/gles/context_gles.h @@ -4,10 +4,13 @@ #pragma once +#include +#include #include "flutter/fml/macros.h" #include "impeller/base/backend_cast.h" #include "impeller/renderer/backend/gles/allocator_gles.h" #include "impeller/renderer/backend/gles/capabilities_gles.h" +#include "impeller/renderer/backend/gles/gpu_tracer_gles.h" #include "impeller/renderer/backend/gles/pipeline_library_gles.h" #include "impeller/renderer/backend/gles/reactor_gles.h" #include "impeller/renderer/backend/gles/sampler_library_gles.h" @@ -23,7 +26,8 @@ class ContextGLES final : public Context, public: static std::shared_ptr Create( std::unique_ptr gl, - const std::vector>& shader_libraries); + const std::vector>& shader_libraries, + bool enable_gpu_tracing); // |Context| ~ContextGLES() override; @@ -38,12 +42,16 @@ class ContextGLES final : public Context, bool RemoveReactorWorker(ReactorGLES::WorkerID id); + std::shared_ptr GetGPUTracer() const { return gpu_tracer_; } + private: ReactorGLES::Ref reactor_; std::shared_ptr shader_library_; std::shared_ptr pipeline_library_; std::shared_ptr sampler_library_; std::shared_ptr resource_allocator_; + std::shared_ptr gpu_tracer_; + // Note: This is stored separately from the ProcTableGLES CapabilitiesGLES // in order to satisfy the Context::GetCapabilities signature which returns // a reference. @@ -52,7 +60,8 @@ class ContextGLES final : public Context, ContextGLES( std::unique_ptr gl, - const std::vector>& shader_libraries); + const std::vector>& shader_libraries, + bool enable_gpu_tracing); // |Context| std::string DescribeGpuModel() const override; diff --git a/impeller/renderer/backend/gles/gpu_tracer_gles.cc b/impeller/renderer/backend/gles/gpu_tracer_gles.cc new file mode 100644 index 0000000000000..6e1e167877b3d --- /dev/null +++ b/impeller/renderer/backend/gles/gpu_tracer_gles.cc @@ -0,0 +1,88 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "impeller/renderer/backend/gles/gpu_tracer_gles.h" +#include +#include "fml/trace_event.h" + +namespace impeller { + +GPUTracerGLES::GPUTracerGLES(const ProcTableGLES& gl, bool enable_tracing) { +#ifdef IMPELLER_DEBUG + auto desc = gl.GetDescription(); + enabled_ = + enable_tracing && desc->HasExtension("GL_EXT_disjoint_timer_query"); +#endif // IMPELLER_DEBUG +} + +void GPUTracerGLES::MarkFrameStart(const ProcTableGLES& gl) { + if (!enabled_ || active_frame_.has_value() || + std::this_thread::get_id() != raster_thread_) { + return; + } + + // At the beginning of a frame, check the status of all pending + // previous queries. + ProcessQueries(gl); + + uint32_t query = 0; + gl.GenQueriesEXT(1, &query); + if (query == 0) { + return; + } + + active_frame_ = query; + gl.BeginQueryEXT(GL_TIME_ELAPSED_EXT, query); +} + +void GPUTracerGLES::RecordRasterThread() { + raster_thread_ = std::this_thread::get_id(); +} + +void GPUTracerGLES::ProcessQueries(const ProcTableGLES& gl) { + // For reasons unknown to me, querying the state of more than + // one query object per frame causes crashes on a Pixel 6 pro. + // It does not crash on an S10. + while (!pending_traces_.empty()) { + auto query = pending_traces_.front(); + + // First check if the query is complete without blocking + // on the result. Incomplete results are left in the pending + // trace vector and will not be checked again for another + // frame. + GLuint available = GL_FALSE; + gl.GetQueryObjectuivEXT(query, GL_QUERY_RESULT_AVAILABLE_EXT, &available); + + if (available != GL_TRUE) { + // If a query is not available, then all subsequent queries will be + // unavailable. + return; + } + // Return the timer resolution in nanoseconds. + uint64_t duration = 0; + gl.GetQueryObjectui64vEXT(query, GL_QUERY_RESULT_EXT, &duration); + auto gpu_ms = duration / 1000000.0; + + FML_TRACE_COUNTER("flutter", "GPUTracer", + reinterpret_cast(this), // Trace Counter ID + "FrameTimeMS", gpu_ms); + gl.DeleteQueriesEXT(1, &query); + pending_traces_.pop_front(); + } +} + +void GPUTracerGLES::MarkFrameEnd(const ProcTableGLES& gl) { + if (!enabled_ || std::this_thread::get_id() != raster_thread_ || + !active_frame_.has_value()) { + return; + } + + auto query = active_frame_.value(); + gl.EndQueryEXT(GL_TIME_ELAPSED_EXT); + + pending_traces_.push_back(query); + active_frame_ = std::nullopt; +} + +} // namespace impeller diff --git a/impeller/renderer/backend/gles/gpu_tracer_gles.h b/impeller/renderer/backend/gles/gpu_tracer_gles.h new file mode 100644 index 0000000000000..8de6963fc6759 --- /dev/null +++ b/impeller/renderer/backend/gles/gpu_tracer_gles.h @@ -0,0 +1,51 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#pragma once + +#include +#include + +#include "impeller/renderer/backend/gles/proc_table_gles.h" + +namespace impeller { + +/// @brief Trace GPU execution times using GL_EXT_disjoint_timer_query on GLES. +/// +/// Note: there are a substantial number of GPUs where usage of the this API is +/// known to cause crashes. As a result, this functionality is disabled by +/// default and can only be enabled in debug/profile mode via a specific opt-in +/// flag that is exposed in the Android manifest. +/// +/// To enable, add the following metadata to the application's Android manifest: +/// +class GPUTracerGLES { + public: + GPUTracerGLES(const ProcTableGLES& gl, bool enable_tracing); + + ~GPUTracerGLES() = default; + + /// @brief Record the thread id of the raster thread. + void RecordRasterThread(); + + /// @brief Record the start of a frame workload, if one hasn't already been + /// started. + void MarkFrameStart(const ProcTableGLES& gl); + + /// @brief Record the end of a frame workload. + void MarkFrameEnd(const ProcTableGLES& gl); + + private: + void ProcessQueries(const ProcTableGLES& gl); + + std::deque pending_traces_; + std::optional active_frame_ = std::nullopt; + std::thread::id raster_thread_; + + bool enabled_ = false; +}; + +} // namespace impeller diff --git a/impeller/renderer/backend/gles/proc_table_gles.h b/impeller/renderer/backend/gles/proc_table_gles.h index bbf94a23ea985..643ddd413f3f9 100644 --- a/impeller/renderer/backend/gles/proc_table_gles.h +++ b/impeller/renderer/backend/gles/proc_table_gles.h @@ -196,7 +196,13 @@ struct GLProc { PROC(PushDebugGroupKHR); \ PROC(PopDebugGroupKHR); \ PROC(ObjectLabelKHR); \ - PROC(RenderbufferStorageMultisampleEXT); + PROC(RenderbufferStorageMultisampleEXT); \ + PROC(GenQueriesEXT); \ + PROC(DeleteQueriesEXT); \ + PROC(GetQueryObjectui64vEXT); \ + PROC(BeginQueryEXT); \ + PROC(EndQueryEXT); \ + PROC(GetQueryObjectuivEXT); enum class DebugResourceType { kTexture, diff --git a/impeller/renderer/backend/gles/render_pass_gles.cc b/impeller/renderer/backend/gles/render_pass_gles.cc index 02356fdd58748..a856feeeff1a1 100644 --- a/impeller/renderer/backend/gles/render_pass_gles.cc +++ b/impeller/renderer/backend/gles/render_pass_gles.cc @@ -7,8 +7,10 @@ #include "flutter/fml/trace_event.h" #include "fml/closure.h" #include "impeller/base/validation.h" +#include "impeller/renderer/backend/gles/context_gles.h" #include "impeller/renderer/backend/gles/device_buffer_gles.h" #include "impeller/renderer/backend/gles/formats_gles.h" +#include "impeller/renderer/backend/gles/gpu_tracer_gles.h" #include "impeller/renderer/backend/gles/pipeline_gles.h" #include "impeller/renderer/backend/gles/texture_gles.h" @@ -141,7 +143,8 @@ struct RenderPassData { const RenderPassData& pass_data, const std::shared_ptr& transients_allocator, const ReactorGLES& reactor, - const std::vector& commands) { + const std::vector& commands, + const std::shared_ptr& tracer) { TRACE_EVENT0("impeller", "RenderPassGLES::EncodeCommandsInReactor"); if (commands.empty()) { @@ -149,6 +152,9 @@ struct RenderPassData { } const auto& gl = reactor.GetProcTable(); +#ifdef IMPELLER_DEBUG + tracer->MarkFrameStart(gl); +#endif // IMPELLER_DEBUG fml::ScopedCleanupClosure pop_pass_debug_marker( [&gl]() { gl.PopDebugGroup(); }); @@ -492,6 +498,11 @@ struct RenderPassData { attachments.data() // size ); } +#ifdef IMPELLER_DEBUG + if (is_default_fbo) { + tracer->MarkFrameEnd(gl); + } +#endif // IMPELLER_DEBUG return true; } @@ -549,12 +560,13 @@ bool RenderPassGLES::OnEncodeCommands(const Context& context) const { } std::shared_ptr shared_this = shared_from_this(); + auto tracer = ContextGLES::Cast(context).GetGPUTracer(); return reactor_->AddOperation([pass_data, allocator = context.GetResourceAllocator(), - render_pass = std::move(shared_this)]( - const auto& reactor) { + render_pass = std::move(shared_this), + tracer](const auto& reactor) { auto result = EncodeCommandsInReactor(*pass_data, allocator, reactor, - render_pass->commands_); + render_pass->commands_, tracer); FML_CHECK(result) << "Must be able to encode GL commands without error."; }); } diff --git a/impeller/renderer/backend/gles/surface_gles.cc b/impeller/renderer/backend/gles/surface_gles.cc index a179b3798f3d9..9c817e6e382a7 100644 --- a/impeller/renderer/backend/gles/surface_gles.cc +++ b/impeller/renderer/backend/gles/surface_gles.cc @@ -60,6 +60,10 @@ std::unique_ptr SurfaceGLES::WrapFBO( render_target_desc.SetColorAttachment(color0, 0u); render_target_desc.SetStencilAttachment(stencil0); +#ifdef IMPELLER_DEBUG + gl_context.GetGPUTracer()->RecordRasterThread(); +#endif // IMPELLER_DEBUG + return std::unique_ptr( new SurfaceGLES(std::move(swap_callback), render_target_desc)); } diff --git a/impeller/renderer/backend/gles/test/gpu_tracer_gles_unittests.cc b/impeller/renderer/backend/gles/test/gpu_tracer_gles_unittests.cc new file mode 100644 index 0000000000000..d0579a2091b23 --- /dev/null +++ b/impeller/renderer/backend/gles/test/gpu_tracer_gles_unittests.cc @@ -0,0 +1,50 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "flutter/testing/testing.h" // IWYU pragma: keep +#include "gtest/gtest.h" +#include "impeller/renderer/backend/gles/gpu_tracer_gles.h" +#include "impeller/renderer/backend/gles/test/mock_gles.h" + +namespace impeller { +namespace testing { + +#ifdef IMPELLER_DEBUG +TEST(GPUTracerGLES, CanFormatFramebufferErrorMessage) { + auto const extensions = std::vector{ + reinterpret_cast("GL_KHR_debug"), // + reinterpret_cast("GL_EXT_disjoint_timer_query"), // + }; + auto mock_gles = MockGLES::Init(extensions); + auto tracer = + std::make_shared(mock_gles->GetProcTable(), true); + tracer->RecordRasterThread(); + tracer->MarkFrameStart(mock_gles->GetProcTable()); + tracer->MarkFrameEnd(mock_gles->GetProcTable()); + + auto calls = mock_gles->GetCapturedCalls(); + + std::vector expected = {"glGenQueriesEXT", "glBeginQueryEXT", + "glEndQueryEXT"}; + for (auto i = 0; i < 3; i++) { + EXPECT_EQ(calls[i], expected[i]); + } + + // Begin second frame, which prompts the tracer to query the result + // from the previous frame. + tracer->MarkFrameStart(mock_gles->GetProcTable()); + + calls = mock_gles->GetCapturedCalls(); + std::vector expected_b = {"glGetQueryObjectuivEXT", + "glGetQueryObjectui64vEXT", + "glDeleteQueriesEXT"}; + for (auto i = 0; i < 3; i++) { + EXPECT_EQ(calls[i], expected_b[i]); + } +} + +#endif // IMPELLER_DEBUG + +} // namespace testing +} // namespace impeller diff --git a/impeller/renderer/backend/gles/test/mock_gles.cc b/impeller/renderer/backend/gles/test/mock_gles.cc index 1abf7e8721d46..30ea1ae3eefc7 100644 --- a/impeller/renderer/backend/gles/test/mock_gles.cc +++ b/impeller/renderer/backend/gles/test/mock_gles.cc @@ -112,6 +112,53 @@ void mockPushDebugGroupKHR(GLenum source, static_assert(CheckSameSignature::value); +void mockGenQueriesEXT(GLsizei n, GLuint* ids) { + RecordGLCall("glGenQueriesEXT"); + for (auto i = 0; i < n; i++) { + ids[i] = i + 1; + } +} + +static_assert(CheckSameSignature::value); + +void mockBeginQueryEXT(GLenum target, GLuint id) { + RecordGLCall("glBeginQueryEXT"); +} + +static_assert(CheckSameSignature::value); + +void mockEndQueryEXT(GLuint id) { + RecordGLCall("glEndQueryEXT"); +} + +static_assert(CheckSameSignature::value); + +void mockGetQueryObjectuivEXT(GLuint id, GLenum target, GLuint* result) { + RecordGLCall("glGetQueryObjectuivEXT"); + *result = GL_TRUE; +} + +static_assert(CheckSameSignature::value); + +void mockGetQueryObjectui64vEXT(GLuint id, GLenum target, GLuint64* result) { + RecordGLCall("glGetQueryObjectui64vEXT"); + *result = 1000u; +} + +static_assert(CheckSameSignature::value); + +void mockDeleteQueriesEXT(GLsizei size, const GLuint* queries) { + RecordGLCall("glDeleteQueriesEXT"); +} + +static_assert(CheckSameSignature::value); + std::shared_ptr MockGLES::Init( const std::optional>& extensions) { // If we cannot obtain a lock, MockGLES is already being used elsewhere. @@ -136,6 +183,18 @@ const ProcTableGLES::Resolver kMockResolver = [](const char* name) { return reinterpret_cast(&mockGetIntegerv); } else if (strcmp(name, "glGetError") == 0) { return reinterpret_cast(&mockGetError); + } else if (strcmp(name, "glGenQueriesEXT") == 0) { + return reinterpret_cast(&mockGenQueriesEXT); + } else if (strcmp(name, "glBeginQueryEXT") == 0) { + return reinterpret_cast(&mockBeginQueryEXT); + } else if (strcmp(name, "glEndQueryEXT") == 0) { + return reinterpret_cast(&mockEndQueryEXT); + } else if (strcmp(name, "glDeleteQueriesEXT") == 0) { + return reinterpret_cast(&mockDeleteQueriesEXT); + } else if (strcmp(name, "glGetQueryObjectui64vEXT") == 0) { + return reinterpret_cast(mockGetQueryObjectui64vEXT); + } else if (strcmp(name, "glGetQueryObjectuivEXT") == 0) { + return reinterpret_cast(mockGetQueryObjectuivEXT); } else { return reinterpret_cast(&doNothing); } diff --git a/impeller/renderer/backend/metal/gpu_tracer_mtl.h b/impeller/renderer/backend/metal/gpu_tracer_mtl.h index bfa227ed10e81..ac2c3916d0207 100644 --- a/impeller/renderer/backend/metal/gpu_tracer_mtl.h +++ b/impeller/renderer/backend/metal/gpu_tracer_mtl.h @@ -17,9 +17,8 @@ namespace impeller { class ContextMTL; /// @brief Approximate the GPU frame time by computing a difference between the -/// smallest -/// GPUStartTime and largest GPUEndTime for all cmd buffers submitted in -/// a frame workload. +/// smallest GPUStartTime and largest GPUEndTime for all command buffers +/// submitted in a frame workload. class GPUTracerMTL : public std::enable_shared_from_this { public: GPUTracerMTL() = default; @@ -27,13 +26,11 @@ class GPUTracerMTL : public std::enable_shared_from_this { ~GPUTracerMTL() = default; /// @brief Record that the current frame has ended. Any additional cmd buffers - /// will be - /// attributed to the "next" frame. + /// will be attributed to the "next" frame. void MarkFrameEnd(); /// @brief Record the current cmd buffer GPU execution timestamps into an - /// aggregate - /// frame workload metric. + /// aggregate frame workload metric. void RecordCmdBuffer(id buffer); private: diff --git a/shell/common/switches.cc b/shell/common/switches.cc index e7c5666b147e2..8ed53d09ff13b 100644 --- a/shell/common/switches.cc +++ b/shell/common/switches.cc @@ -477,6 +477,8 @@ Settings SettingsFromCommandLine(const fml::CommandLine& command_line) { settings.enable_vulkan_validation = command_line.HasOption(FlagForSwitch(Switch::EnableVulkanValidation)); + settings.enable_opengl_gpu_tracing = + command_line.HasOption(FlagForSwitch(Switch::EnableOpenGLGPUTracing)); settings.enable_embedder_api = command_line.HasOption(FlagForSwitch(Switch::EnableEmbedderAPI)); diff --git a/shell/common/switches.h b/shell/common/switches.h index c6048705f3121..ddc4b3c8827aa 100644 --- a/shell/common/switches.h +++ b/shell/common/switches.h @@ -275,6 +275,10 @@ DEF_SWITCH(EnableVulkanValidation, "Enable loading Vulkan validation layers. The layers must be " "available to the application and loadable. On non-Vulkan backends, " "this flag does nothing.") +DEF_SWITCH(EnableOpenGLGPUTracing, + "enable-opengl-gpu-tracing", + "Enable tracing of GPU execution time when using the Impeller " + "OpenGLES backend.") DEF_SWITCH(LeakVM, "leak-vm", "When the last shell shuts down, the shared VM is leaked by default " diff --git a/shell/platform/android/android_context_gl_impeller.cc b/shell/platform/android/android_context_gl_impeller.cc index 83c1bb4fedd91..8c9b80645d7ab 100644 --- a/shell/platform/android/android_context_gl_impeller.cc +++ b/shell/platform/android/android_context_gl_impeller.cc @@ -49,7 +49,8 @@ class AndroidContextGLImpeller::ReactorWorker final }; static std::shared_ptr CreateImpellerContext( - const std::shared_ptr& worker) { + const std::shared_ptr& worker, + bool enable_gpu_tracing) { auto proc_table = std::make_unique( impeller::egl::CreateProcAddressResolver()); @@ -59,19 +60,20 @@ static std::shared_ptr CreateImpellerContext( } std::vector> shader_mappings = { - std::make_shared(impeller_entity_shaders_gles_data, - impeller_entity_shaders_gles_length), - std::make_shared( - impeller_framebuffer_blend_shaders_gles_data, - impeller_framebuffer_blend_shaders_gles_length), + std::make_shared( + impeller_entity_shaders_gles_data, + impeller_entity_shaders_gles_length), + std::make_shared( + impeller_framebuffer_blend_shaders_gles_data, + impeller_framebuffer_blend_shaders_gles_length), #if IMPELLER_ENABLE_3D - std::make_shared(impeller_scene_shaders_gles_data, - impeller_scene_shaders_gles_length), + std::make_shared( + impeller_scene_shaders_gles_data, impeller_scene_shaders_gles_length), #endif // IMPELLER_ENABLE_3D }; - auto context = - impeller::ContextGLES::Create(std::move(proc_table), shader_mappings); + auto context = impeller::ContextGLES::Create( + std::move(proc_table), shader_mappings, enable_gpu_tracing); if (!context) { FML_LOG(ERROR) << "Could not create OpenGLES Impeller Context."; return nullptr; @@ -86,7 +88,8 @@ static std::shared_ptr CreateImpellerContext( } AndroidContextGLImpeller::AndroidContextGLImpeller( - std::unique_ptr display) + std::unique_ptr display, + bool enable_gpu_tracing) : AndroidContext(AndroidRenderingAPI::kOpenGLES), reactor_worker_(std::shared_ptr(new ReactorWorker())), display_(std::move(display)) { @@ -147,7 +150,8 @@ AndroidContextGLImpeller::AndroidContextGLImpeller( return; } - auto impeller_context = CreateImpellerContext(reactor_worker_); + auto impeller_context = + CreateImpellerContext(reactor_worker_, enable_gpu_tracing); if (!impeller_context) { FML_DLOG(ERROR) << "Could not create Impeller context."; diff --git a/shell/platform/android/android_context_gl_impeller.h b/shell/platform/android/android_context_gl_impeller.h index 90466db683a8a..234ff58d2c91e 100644 --- a/shell/platform/android/android_context_gl_impeller.h +++ b/shell/platform/android/android_context_gl_impeller.h @@ -13,8 +13,8 @@ namespace flutter { class AndroidContextGLImpeller : public AndroidContext { public: - explicit AndroidContextGLImpeller( - std::unique_ptr display); + AndroidContextGLImpeller(std::unique_ptr display, + bool enable_gpu_tracing); ~AndroidContextGLImpeller(); diff --git a/shell/platform/android/android_context_gl_impeller_unittests.cc b/shell/platform/android/android_context_gl_impeller_unittests.cc index 452c55fc76261..e8f52832d8f94 100644 --- a/shell/platform/android/android_context_gl_impeller_unittests.cc +++ b/shell/platform/android/android_context_gl_impeller_unittests.cc @@ -45,7 +45,8 @@ TEST(AndroidContextGLImpeller, MSAAFirstAttempt) { .WillOnce(Return(ByMove(std::move(second_result)))); ON_CALL(*display, ChooseConfig(_)) .WillByDefault(Return(ByMove(std::unique_ptr()))); - auto context = std::make_unique(std::move(display)); + auto context = + std::make_unique(std::move(display), true); ASSERT_TRUE(context); } @@ -76,7 +77,8 @@ TEST(AndroidContextGLImpeller, FallbackForEmulator) { .WillOnce(Return(ByMove(std::move(third_result)))); ON_CALL(*display, ChooseConfig(_)) .WillByDefault(Return(ByMove(std::unique_ptr()))); - auto context = std::make_unique(std::move(display)); + auto context = + std::make_unique(std::move(display), true); ASSERT_TRUE(context); } } // namespace testing diff --git a/shell/platform/android/android_context_vulkan_impeller.h b/shell/platform/android/android_context_vulkan_impeller.h index 02e9a305cd039..1800fe00bccc1 100644 --- a/shell/platform/android/android_context_vulkan_impeller.h +++ b/shell/platform/android/android_context_vulkan_impeller.h @@ -14,7 +14,7 @@ namespace flutter { class AndroidContextVulkanImpeller : public AndroidContext { public: - AndroidContextVulkanImpeller(bool enable_validation); + explicit AndroidContextVulkanImpeller(bool enable_validation); ~AndroidContextVulkanImpeller(); diff --git a/shell/platform/android/io/flutter/embedding/engine/loader/FlutterLoader.java b/shell/platform/android/io/flutter/embedding/engine/loader/FlutterLoader.java index da114ae3978d7..1bbeefe9c0ae9 100644 --- a/shell/platform/android/io/flutter/embedding/engine/loader/FlutterLoader.java +++ b/shell/platform/android/io/flutter/embedding/engine/loader/FlutterLoader.java @@ -45,6 +45,8 @@ public class FlutterLoader { "io.flutter.embedding.android.EnableVulkanValidation"; private static final String IMPELLER_BACKEND_META_DATA_KEY = "io.flutter.embedding.android.ImpellerBackend"; + private static final String IMPELLER_OPENGL_GPU_TRACING_DATA_KEY = + "io.flutter.embedding.android.EnableOpenGLGPUTracing"; private static final String DISABLE_IMAGE_READER_PLATFORM_VIEWS_KEY = "io.flutter.embedding.android.DisableImageReaderPlatformViews"; @@ -340,6 +342,9 @@ public void ensureInitializationComplete( ENABLE_VULKAN_VALIDATION_META_DATA_KEY, areValidationLayersOnByDefault())) { shellArgs.add("--enable-vulkan-validation"); } + if (metaData.getBoolean(IMPELLER_OPENGL_GPU_TRACING_DATA_KEY, false)) { + shellArgs.add("--enable-opengl-gpu-tracing"); + } String backend = metaData.getString(IMPELLER_BACKEND_META_DATA_KEY); if (backend != null) { shellArgs.add("--impeller-backend=" + backend); diff --git a/shell/platform/android/platform_view_android.cc b/shell/platform/android/platform_view_android.cc index 485f00eb189e8..c4617c4b99cea 100644 --- a/shell/platform/android/platform_view_android.cc +++ b/shell/platform/android/platform_view_android.cc @@ -70,7 +70,8 @@ static std::shared_ptr CreateAndroidContext( uint8_t msaa_samples, bool enable_impeller, const std::optional& impeller_backend, - bool enable_vulkan_validation) { + bool enable_vulkan_validation, + bool enable_opengl_gpu_tracing) { if (use_software_rendering) { return std::make_shared(AndroidRenderingAPI::kSoftware); } @@ -90,7 +91,8 @@ static std::shared_ptr CreateAndroidContext( switch (backend) { case AndroidRenderingAPI::kOpenGLES: return std::make_unique( - std::make_unique()); + std::make_unique(), + enable_opengl_gpu_tracing); case AndroidRenderingAPI::kVulkan: return std::make_unique( enable_vulkan_validation); @@ -99,7 +101,8 @@ static std::shared_ptr CreateAndroidContext( enable_vulkan_validation); if (!vulkan_backend->IsValid()) { return std::make_unique( - std::make_unique()); + std::make_unique(), + enable_opengl_gpu_tracing); } return vulkan_backend; } @@ -131,7 +134,9 @@ PlatformViewAndroid::PlatformViewAndroid( msaa_samples, delegate.OnPlatformViewGetSettings().enable_impeller, delegate.OnPlatformViewGetSettings().impeller_backend, - delegate.OnPlatformViewGetSettings().enable_vulkan_validation)) {} + delegate.OnPlatformViewGetSettings().enable_vulkan_validation, + delegate.OnPlatformViewGetSettings().enable_opengl_gpu_tracing)) { +} PlatformViewAndroid::PlatformViewAndroid( PlatformView::Delegate& delegate, diff --git a/shell/platform/embedder/embedder_surface_gl_impeller.cc b/shell/platform/embedder/embedder_surface_gl_impeller.cc index 340725d2b9d3b..c061c091a912b 100644 --- a/shell/platform/embedder/embedder_surface_gl_impeller.cc +++ b/shell/platform/embedder/embedder_surface_gl_impeller.cc @@ -65,11 +65,12 @@ EmbedderSurfaceGLImpeller::EmbedderSurfaceGLImpeller( gl_dispatch_table_.gl_make_current_callback(); std::vector> shader_mappings = { - std::make_shared(impeller_entity_shaders_gles_data, - impeller_entity_shaders_gles_length), + std::make_shared( + impeller_entity_shaders_gles_data, + impeller_entity_shaders_gles_length), #if IMPELLER_ENABLE_3D - std::make_shared(impeller_scene_shaders_gles_data, - impeller_scene_shaders_gles_length), + std::make_shared( + impeller_scene_shaders_gles_data, impeller_scene_shaders_gles_length), #endif // IMPELLER_ENABLE_3D }; auto gl = std::make_unique( @@ -78,8 +79,8 @@ EmbedderSurfaceGLImpeller::EmbedderSurfaceGLImpeller( return; } - impeller_context_ = - impeller::ContextGLES::Create(std::move(gl), shader_mappings); + impeller_context_ = impeller::ContextGLES::Create( + std::move(gl), shader_mappings, /*enable_gpu_tracing=*/false); if (!impeller_context_) { FML_LOG(ERROR) << "Could not create Impeller context."; From 8070e52561738f78aa18e19c27008e606f21693e Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 20 Oct 2023 13:26:15 -0400 Subject: [PATCH 806/859] Roll Dart SDK from ba96a157a8eb to 53fee35b299f (1 revision) (#47165) https://dart.googlesource.com/sdk.git/+log/ba96a157a8eb..53fee35b299f 2023-10-20 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-48.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jimgraham@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 7848724186d52..e33fa9a039108 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': 'ba96a157a8eba2baa6d1d34e160eabb99e5b3bb2', + 'dart_revision': '53fee35b299f57c786dc8474ede49353a0009ed4', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index 587befb0a3cab..4b2787dc01161 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: 7fb7754f9d3cde2c73ab74c5f0b5ea8d +Signature: ca89342367a3be73e64cd33c4455c2c8 ==================================================================================================== LIBRARY: dart From b54eae3efa8715078bd9fe04b2292506d422b301 Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Fri, 20 Oct 2023 10:30:16 -0700 Subject: [PATCH 807/859] [macOS] Eliminate extraneous loadView calls (#47166) Eliminate unnecessary calls to [NSViewController loadView]. To quote the [documentation][loadview] for this method: "Do not call this method. If you require this method to be called, access the view property." In several of the existing tests, we do read viewController.view, and the other tests pass without this line regardless. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- .../macos/framework/Source/AccessibilityBridgeMacTest.mm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/shell/platform/darwin/macos/framework/Source/AccessibilityBridgeMacTest.mm b/shell/platform/darwin/macos/framework/Source/AccessibilityBridgeMacTest.mm index f499e80dc642a..1b3c10a00230e 100644 --- a/shell/platform/darwin/macos/framework/Source/AccessibilityBridgeMacTest.mm +++ b/shell/platform/darwin/macos/framework/Source/AccessibilityBridgeMacTest.mm @@ -61,7 +61,6 @@ @implementation AccessibilityBridgeTestViewController TEST(AccessibilityBridgeMacTest, SendsAccessibilityCreateNotificationToWindowOfFlutterView) { FlutterViewController* viewController = CreateTestViewController(); FlutterEngine* engine = viewController.engine; - [viewController loadView]; NSWindow* expectedTarget = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 800, 600) styleMask:NSBorderlessWindowMask @@ -122,7 +121,6 @@ @implementation AccessibilityBridgeTestViewController TEST(AccessibilityBridgeMacTest, NonZeroRootNodeId) { FlutterViewController* viewController = CreateTestViewController(); FlutterEngine* engine = viewController.engine; - [viewController loadView]; NSWindow* expectedTarget = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 800, 600) styleMask:NSBorderlessWindowMask @@ -192,7 +190,7 @@ @implementation AccessibilityBridgeTestViewController TEST(AccessibilityBridgeMacTest, DoesNotSendAccessibilityCreateNotificationWhenHeadless) { FlutterViewController* viewController = CreateTestViewController(); FlutterEngine* engine = viewController.engine; - [viewController loadView]; + // Setting up bridge so that the AccessibilityBridgeMacDelegateSpy // can query semantics information from. engine.semanticsEnabled = YES; @@ -238,7 +236,6 @@ @implementation AccessibilityBridgeTestViewController TEST(AccessibilityBridgeMacTest, DoesNotSendAccessibilityCreateNotificationWhenNoWindow) { FlutterViewController* viewController = CreateTestViewController(); FlutterEngine* engine = viewController.engine; - [viewController loadView]; // Setting up bridge so that the AccessibilityBridgeMacDelegateSpy // can query semantics information from. From 1e9a3a1809b9284ec8e8fb2117b891f462a9c175 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 20 Oct 2023 13:57:18 -0400 Subject: [PATCH 808/859] Roll Skia from b960e9140f56 to 9ffd5ef9a9ed (3 revisions) (#47167) https://skia.googlesource.com/skia.git/+log/b960e9140f56..9ffd5ef9a9ed 2023-10-20 lehoangquyen@chromium.org GraphiteDawn: don't set active render encoder if BlitWithDraw fails. 2023-10-20 briansalomon@gmail.com [graphite] Make RecorderOptions::kDefaultRecorderBudget a static member 2023-10-20 johnstiles@google.com Remove staging flag SK_IMPROVE_RASTER_PIPELINE_PRECISION. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index e33fa9a039108..a2b0c98eb78ac 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'b960e9140f56675c0a2f6a8664967a56bd3e5158', + 'skia_revision': '9ffd5ef9a9ed8c7eea136be4764778089f04d9df', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index bee8d62c68cc4..c4de22aad4976 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 1c400dc7d1eeb2a8c37c54eca028db89 +Signature: b56f7251840fccf9795705be0801d720 ==================================================================================================== LIBRARY: etc1 @@ -392,6 +392,7 @@ FILE: ../../../third_party/skia/relnotes/glbackendsemaphore.md FILE: ../../../third_party/skia/relnotes/grsurface-info.md FILE: ../../../third_party/skia/relnotes/mesh.md FILE: ../../../third_party/skia/relnotes/readbuffer-deserial.md +FILE: ../../../third_party/skia/relnotes/recorder-static-member.md FILE: ../../../third_party/skia/relnotes/typeface.md FILE: ../../../third_party/skia/relnotes/vk-directcontext.md FILE: ../../../third_party/skia/src/gpu/gpu_workaround_list.txt From f4fa7dbf351638894710af331dc82f0c76ba590b Mon Sep 17 00:00:00 2001 From: Jim Graham Date: Fri, 20 Oct 2023 11:27:19 -0700 Subject: [PATCH 809/859] Add option to save Impeller failure images in rendertests (#47142) The rendering tests currently always save the impeller failure images into a temporary directory in /tmp which is out of the way and might accumulate over time. The images are now only saved when `--save-impeller-failures` is specified on the command line and they are now saved into a local sub-directory with multiple runs saving into new sub-directories to keep the failure images from getting confused with each other over time. The new image directories are named `./impeller_failure_images/NNNN/*.png` --- .../testing/dl_rendering_unittests.cc | 153 +++++++++++++----- 1 file changed, 114 insertions(+), 39 deletions(-) diff --git a/display_list/testing/dl_rendering_unittests.cc b/display_list/testing/dl_rendering_unittests.cc index 1704db6488361..26421f9e1efb3 100644 --- a/display_list/testing/dl_rendering_unittests.cc +++ b/display_list/testing/dl_rendering_unittests.cc @@ -13,6 +13,7 @@ #include "flutter/display_list/skia/dl_sk_dispatcher.h" #include "flutter/display_list/testing/dl_test_surface_provider.h" #include "flutter/display_list/utils/dl_comparable.h" +#include "flutter/fml/file.h" #include "flutter/fml/math.h" #include "flutter/testing/display_list_testing.h" #include "flutter/testing/testing.h" @@ -1102,8 +1103,10 @@ class TestParameters { class CanvasCompareTester { public: - static std::vector kTestBackends; - static std::string kTempDirectory; + static std::vector TestBackends; + static std::string ImpellerFailureImageDirectory; + static bool SaveImpellerFailureImages; + static std::vector ImpellerFailureImages; static std::unique_ptr GetProvider(BackendType type) { auto provider = DlSurfaceProvider::Create(type); @@ -1122,7 +1125,7 @@ class CanvasCompareTester { if (!provider) { return false; } - CanvasCompareTester::kTestBackends.push_back(type); + CanvasCompareTester::TestBackends.push_back(type); return true; } @@ -1130,7 +1133,7 @@ class CanvasCompareTester { static void RenderAll(const TestParameters& params, const BoundsTolerance& tolerance = DefaultTolerance) { - for (auto& back_end : kTestBackends) { + for (auto& back_end : TestBackends) { auto provider = GetProvider(back_end); RenderEnvironment env = RenderEnvironment::MakeN32(provider.get()); env.init_ref(kEmptySkSetup, params.sk_renderer(), // @@ -1142,8 +1145,8 @@ class CanvasCompareTester { "Impeller reference")) { std::string test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name(); - impeller_result->write( - to_png_filename(test_name + " (Impeller reference)")); + save_to_png(impeller_result, test_name + " (Impeller reference)", + "base rendering was blank or out of bounds"); } } else { static OncePerBackendWarning warnings("No Impeller output tests"); @@ -2264,16 +2267,75 @@ class CanvasCompareTester { .with_diff_clip()); } - static std::string to_png_filename(const std::string& desc) { - if (kTempDirectory.length() == 0) { - kTempDirectory = fml::CreateTemporaryDirectory(); + enum class DirectoryStatus { + kExisted, + kCreated, + kFailed, + }; + + static DirectoryStatus CheckDir(const std::string& dir) { + auto ret = + fml::OpenDirectory(dir.c_str(), false, fml::FilePermission::kRead); + if (ret.is_valid()) { + return DirectoryStatus::kExisted; + } + ret = + fml::OpenDirectory(dir.c_str(), true, fml::FilePermission::kReadWrite); + if (ret.is_valid()) { + return DirectoryStatus::kCreated; } + FML_LOG(ERROR) << "Could not create directory (" << dir + << ") for impeller failure images" + << ", ret = " << ret.get() << ", errno = " << errno; + return DirectoryStatus::kFailed; + } - std::string ret = kTempDirectory + "/"; - for (const char& ch : desc) { - ret += (ch == ':' || ch == ' ') ? '_' : ch; + static void SetupImpellerFailureImageDirectory() { + std::string base_dir = "./impeller_failure_images"; + if (CheckDir(base_dir) == DirectoryStatus::kFailed) { + return; + } + for (int i = 0; i < 10000; i++) { + std::string sub_dir = std::to_string(i); + while (sub_dir.length() < 4) { + sub_dir = "0" + sub_dir; + } + std::string try_dir = base_dir + "/" + sub_dir; + switch (CheckDir(try_dir)) { + case DirectoryStatus::kExisted: + break; + case DirectoryStatus::kCreated: + ImpellerFailureImageDirectory = try_dir; + return; + case DirectoryStatus::kFailed: + return; + } } - return ret + ".png"; + FML_LOG(ERROR) << "Too many output directories for Impeller failure images"; + } + + static void save_to_png(const RenderResult* result, + const std::string& op_desc, + const std::string& reason) { + if (!SaveImpellerFailureImages) { + return; + } + if (ImpellerFailureImageDirectory.length() == 0) { + SetupImpellerFailureImageDirectory(); + if (ImpellerFailureImageDirectory.length() == 0) { + SaveImpellerFailureImages = false; + return; + } + } + + std::string filename = ImpellerFailureImageDirectory + "/"; + for (const char& ch : op_desc) { + filename += (ch == ':' || ch == ' ') ? '_' : ch; + } + filename = filename + ".png"; + result->write(filename); + ImpellerFailureImages.push_back(filename); + FML_LOG(ERROR) << reason << ": " << filename; } static void RenderWith(const TestParameters& testP, @@ -2352,23 +2414,17 @@ class CanvasCompareTester { env.ref_impeller_result(), imp_result.get(), false, imp_info + " (attribute should affect rendering)"); } - if (!success) { + if (SaveImpellerFailureImages && !success) { FML_LOG(ERROR) << "Impeller issue encountered for: " << *imp_job.MakeDisplayList(base_info); - std::string filename = to_png_filename(info + " (Impeller Output)"); - imp_result->write(filename); - FML_LOG(ERROR) << "output saved in: " << filename; - std::string src_filename = to_png_filename(info + " (Impeller Input)"); - env.ref_impeller_result()->write(src_filename); - FML_LOG(ERROR) << "compare to reference without attributes: " - << src_filename; - std::string sk_filename = to_png_filename(info + " (Skia Output)"); - sk_result->write(sk_filename); - FML_LOG(ERROR) << "and to Skia reference with attributes: " - << sk_filename; - std::string sk_src_filename = to_png_filename(info + " (Skia Input)"); - env.ref_sk_result()->write(sk_src_filename); - FML_LOG(ERROR) << "operating on Skia source image: " << sk_src_filename; + save_to_png(imp_result.get(), info + " (Impeller Result)", + "output saved in"); + save_to_png(env.ref_impeller_result(), info + " (Impeller Reference)", + "compare to reference without attributes"); + save_to_png(sk_result.get(), info + " (Skia Result)", + "and to Skia reference with attributes"); + save_to_png(env.ref_sk_result(), info + " (Skia Reference)", + "and to Skia reference without attributes"); } } @@ -2755,8 +2811,10 @@ class CanvasCompareTester { } }; -std::vector CanvasCompareTester::kTestBackends; -std::string CanvasCompareTester::kTempDirectory = ""; +std::vector CanvasCompareTester::TestBackends; +std::string CanvasCompareTester::ImpellerFailureImageDirectory = ""; +bool CanvasCompareTester::SaveImpellerFailureImages = false; +std::vector CanvasCompareTester::ImpellerFailureImages; BoundsTolerance CanvasCompareTester::DefaultTolerance = BoundsTolerance().addAbsolutePadding(1, 1); @@ -2790,6 +2848,10 @@ class DisplayListRenderingTestBase : public BaseT, for (auto p_arg = std::next(args.begin()); p_arg != args.end(); p_arg++) { std::string arg = *p_arg; bool enable = true; + if (arg == "--save-impeller-failures") { + CanvasCompareTester::SaveImpellerFailureImages = true; + continue; + } if (StartsWith(arg, "--no")) { enable = false; arg = "-" + arg.substr(4); @@ -2812,12 +2874,25 @@ class DisplayListRenderingTestBase : public BaseT, CanvasCompareTester::AddProvider(BackendType::kMetalBackend); } std::string providers = ""; - for (auto& back_end : CanvasCompareTester::kTestBackends) { + for (auto& back_end : CanvasCompareTester::TestBackends) { providers += " " + DlSurfaceProvider::BackendName(back_end); } FML_LOG(INFO) << "Running tests on [" << providers << " ]"; } + static void TearDownTestSuite() { + if (CanvasCompareTester::ImpellerFailureImages.size() > 0) { + FML_LOG(INFO); + FML_LOG(INFO) << CanvasCompareTester::ImpellerFailureImages.size() + << " images saved in " + << CanvasCompareTester::ImpellerFailureImageDirectory; + for (auto filename : CanvasCompareTester::ImpellerFailureImages) { + FML_LOG(INFO) << " " << filename; + } + FML_LOG(INFO); + } + } + private: FML_DISALLOW_COPY_AND_ASSIGN(DisplayListRenderingTestBase); }; @@ -3811,7 +3886,7 @@ TEST_F(DisplayListRendering, SaveLayerClippedContentStillFilters) { CaseParameters case_params("Filtered SaveLayer with clipped content"); BoundsTolerance tolerance = BoundsTolerance().addAbsolutePadding(6.0f, 6.0f); - for (auto& back_end : CanvasCompareTester::kTestBackends) { + for (auto& back_end : CanvasCompareTester::TestBackends) { auto provider = CanvasCompareTester::GetProvider(back_end); RenderEnvironment env = RenderEnvironment::MakeN32(provider.get()); env.init_ref(kEmptySkSetup, test_params.sk_renderer(), // @@ -3926,7 +4001,7 @@ TEST_F(DisplayListRendering, SaveLayerConsolidation) { bool same, bool rev_same, const std::string& desc1, const std::string& desc2) { - for (auto& back_end : CanvasCompareTester::kTestBackends) { + for (auto& back_end : CanvasCompareTester::TestBackends) { auto provider = CanvasCompareTester::GetProvider(back_end); auto env = std::make_unique( provider.get(), PixelFormat::kN32PremulPixelFormat); @@ -4039,7 +4114,7 @@ TEST_F(DisplayListRendering, MatrixColorFilterModifyTransparencyCheck) { builder2.Restore(); auto display_list2 = builder2.Build(); - for (auto& back_end : CanvasCompareTester::kTestBackends) { + for (auto& back_end : CanvasCompareTester::TestBackends) { auto provider = CanvasCompareTester::GetProvider(back_end); auto env = std::make_unique( provider.get(), PixelFormat::kN32PremulPixelFormat); @@ -4110,7 +4185,7 @@ TEST_F(DisplayListRendering, MatrixColorFilterOpacityCommuteCheck) { builder2.Restore(); auto display_list2 = builder2.Build(); - for (auto& back_end : CanvasCompareTester::kTestBackends) { + for (auto& back_end : CanvasCompareTester::TestBackends) { auto provider = CanvasCompareTester::GetProvider(back_end); auto env = std::make_unique( provider.get(), PixelFormat::kN32PremulPixelFormat); @@ -4215,7 +4290,7 @@ TEST_F(DisplayListRendering, BlendColorFilterModifyTransparencyCheck) { builder2.Restore(); auto display_list2 = builder2.Build(); - for (auto& back_end : CanvasCompareTester::kTestBackends) { + for (auto& back_end : CanvasCompareTester::TestBackends) { auto provider = CanvasCompareTester::GetProvider(back_end); auto env = std::make_unique( provider.get(), PixelFormat::kN32PremulPixelFormat); @@ -4279,7 +4354,7 @@ TEST_F(DisplayListRendering, BlendColorFilterOpacityCommuteCheck) { builder2.Restore(); auto display_list2 = builder2.Build(); - for (auto& back_end : CanvasCompareTester::kTestBackends) { + for (auto& back_end : CanvasCompareTester::TestBackends) { auto provider = CanvasCompareTester::GetProvider(back_end); auto env = std::make_unique( provider.get(), PixelFormat::kN32PremulPixelFormat); @@ -4538,7 +4613,7 @@ class DisplayListNopTest : public DisplayListRendering { SkPaint sk_paint; sk_paint.setBlendMode(sk_mode); sk_paint.setColor(ToSk(color)); - for (auto& back_end : CanvasCompareTester::kTestBackends) { + for (auto& back_end : CanvasCompareTester::TestBackends) { auto provider = CanvasCompareTester::GetProvider(back_end); auto result_surface = provider->MakeOffscreenSurface( test_image->width(), test_image->height(), @@ -4601,7 +4676,7 @@ class DisplayListNopTest : public DisplayListRendering { sk_paint.setColor(ToSk(color)); sk_paint.setColorFilter(ToSk(color_filter)); sk_paint.setImageFilter(ToSk(image_filter)); - for (auto& back_end : CanvasCompareTester::kTestBackends) { + for (auto& back_end : CanvasCompareTester::TestBackends) { auto provider = CanvasCompareTester::GetProvider(back_end); auto result_surface = provider->MakeOffscreenSurface( w, h, DlSurfaceProvider::kN32PremulPixelFormat); From cdac5ca7e70040f59724a5a5cd4ec6b9a2c4e127 Mon Sep 17 00:00:00 2001 From: Jackson Gardner Date: Fri, 20 Oct 2023 11:30:33 -0700 Subject: [PATCH 810/859] Fix async image loading issues in skwasm. (#47117) This fixes https://github.com/flutter/flutter/issues/134045 There were a few different issues here: * We need to do our own message passing for rendering pictures. The async methods provided by emscripten have their own queue that can drain synchronously, so basically it's not guaranteed to be FIFO with other messages sent to the web worker or main thread. * When we drop frames, we should only drop intermediate frames, so that when the rendering flurry stops that the frame that is displayed is the last one that was actually requested. * We need to reset the GL context after lazy image creation, otherwise skia's renderer gets into a bad state for that frame. --- lib/web_ui/lib/src/engine/scene_view.dart | 51 +++++++++++++++++---- lib/web_ui/skwasm/image.cpp | 4 ++ lib/web_ui/skwasm/library_skwasm_support.js | 13 ++++++ lib/web_ui/skwasm/skwasm_support.h | 5 ++ lib/web_ui/skwasm/surface.cpp | 20 ++++---- lib/web_ui/skwasm/surface.h | 7 ++- lib/web_ui/test/engine/scene_view_test.dart | 33 ++++++++++++- 7 files changed, 107 insertions(+), 26 deletions(-) diff --git a/lib/web_ui/lib/src/engine/scene_view.dart b/lib/web_ui/lib/src/engine/scene_view.dart index f1c75c0939d25..41ac3fab96cd0 100644 --- a/lib/web_ui/lib/src/engine/scene_view.dart +++ b/lib/web_ui/lib/src/engine/scene_view.dart @@ -16,6 +16,20 @@ abstract class PictureRenderer { FutureOr renderPicture(ScenePicture picture); } +class _SceneRender { + _SceneRender(this.scene, this._completer) { + scene.beginRender(); + } + + final EngineScene scene; + final Completer _completer; + + void done() { + scene.endRender(); + _completer.complete(); + } +} + // This class builds a DOM tree that composites an `EngineScene`. class EngineSceneView { factory EngineSceneView(PictureRenderer pictureRenderer) { @@ -30,16 +44,38 @@ class EngineSceneView { List containers = []; - int queuedRenders = 0; - static const int kMaxQueuedRenders = 3; + _SceneRender? _currentRender; + _SceneRender? _nextRender; + + Future renderScene(EngineScene scene) { + if (_currentRender != null) { + // If a scene is already queued up, drop it and queue this one up instead + // so that the scene view always displays the most recently requested scene. + _nextRender?.done(); + final Completer completer = Completer(); + _nextRender = _SceneRender(scene, completer); + return completer.future; + } + final Completer completer = Completer(); + _currentRender = _SceneRender(scene, completer); + _kickRenderLoop(); + return completer.future; + } - Future renderScene(EngineScene scene) async { - if (queuedRenders >= kMaxQueuedRenders) { + Future _kickRenderLoop() async { + final _SceneRender current = _currentRender!; + await _renderScene(current.scene); + current.done(); + _currentRender = _nextRender; + _nextRender = null; + if (_currentRender == null) { return; + } else { + return _kickRenderLoop(); } - queuedRenders += 1; + } - scene.beginRender(); + Future _renderScene(EngineScene scene) async { final List slices = scene.rootLayer.slices; final Iterable> renderFutures = slices.map( (LayerSlice slice) async => switch (slice) { @@ -113,9 +149,6 @@ class EngineSceneView { sceneElement.removeChild(currentElement); currentElement = sibling; } - scene.endRender(); - - queuedRenders -= 1; } } diff --git a/lib/web_ui/skwasm/image.cpp b/lib/web_ui/skwasm/image.cpp index 0e7665d0722d2..def216398afa5 100644 --- a/lib/web_ui/skwasm/image.cpp +++ b/lib/web_ui/skwasm/image.cpp @@ -101,6 +101,10 @@ class TextureSourceImageGenerator : public GrExternalTextureGenerator { auto backendTexture = GrBackendTextures::MakeGL( fInfo.width(), fInfo.height(), mipmapped, glInfo); + + // In order to bind the image source to the texture, makeTexture has changed + // which texture is "in focus" for the WebGL context. + GrAsDirectContext(context)->resetContext(kTextureBinding_GrGLBackendState); return std::make_unique( backendTexture, glInfo.fID, emscripten_webgl_get_current_context()); } diff --git a/lib/web_ui/skwasm/library_skwasm_support.js b/lib/web_ui/skwasm/library_skwasm_support.js index 46467e507b60b..5e62614e009c4 100644 --- a/lib/web_ui/skwasm/library_skwasm_support.js +++ b/lib/web_ui/skwasm/library_skwasm_support.js @@ -27,6 +27,9 @@ mergeInto(LibraryManager.library, { return; } switch (skwasmMessage) { + case 'renderPicture': + _surface_renderPictureOnWorker(data.surface, data.picture, data.callbackId); + return; case 'onRenderComplete': _surface_onRenderComplete(data.surface, data.callbackId, data.imageBitmap); return; @@ -51,6 +54,14 @@ mergeInto(LibraryManager.library, { PThread.pthreads[threadId].addEventListener("message", eventListener); } }; + _skwasm_dispatchRenderPicture = function(threadId, surfaceHandle, pictureHandle, callbackId) { + PThread.pthreads[threadId].postMessage({ + skwasmMessage: 'renderPicture', + surface: surfaceHandle, + picture: pictureHandle, + callbackId, + }); + }; _skwasm_createOffscreenCanvas = function(width, height) { const canvas = new OffscreenCanvas(width, height); var contextAttributes = { @@ -114,6 +125,8 @@ mergeInto(LibraryManager.library, { skwasm_disposeAssociatedObjectOnThread__deps: ['$skwasm_support_setup'], skwasm_registerMessageListener: function() {}, skwasm_registerMessageListener__deps: ['$skwasm_support_setup'], + skwasm_dispatchRenderPicture: function() {}, + skwasm_dispatchRenderPicture__deps: ['$skwasm_support_setup'], skwasm_createOffscreenCanvas: function () {}, skwasm_createOffscreenCanvas__deps: ['$skwasm_support_setup'], skwasm_resizeCanvas: function () {}, diff --git a/lib/web_ui/skwasm/skwasm_support.h b/lib/web_ui/skwasm/skwasm_support.h index 21c790d6507eb..0c9cbaaa845c8 100644 --- a/lib/web_ui/skwasm/skwasm_support.h +++ b/lib/web_ui/skwasm/skwasm_support.h @@ -4,6 +4,7 @@ #include #include +#include "third_party/skia/include/core/SkPicture.h" namespace Skwasm { class Surface; @@ -19,6 +20,10 @@ extern SkwasmObject skwasm_getAssociatedObject(void* pointer); extern void skwasm_disposeAssociatedObjectOnThread(unsigned long threadId, void* pointer); extern void skwasm_registerMessageListener(pthread_t threadId); +extern void skwasm_dispatchRenderPicture(unsigned long threadId, + Skwasm::Surface* surface, + SkPicture* picture, + uint32_t callbackId); extern uint32_t skwasm_createOffscreenCanvas(int width, int height); extern void skwasm_resizeCanvas(uint32_t contextHandle, int width, int height); extern void skwasm_captureImageBitmap(Skwasm::Surface* surfaceHandle, diff --git a/lib/web_ui/skwasm/surface.cpp b/lib/web_ui/skwasm/surface.cpp index cebb4889faf2b..28b64bd25a328 100644 --- a/lib/web_ui/skwasm/surface.cpp +++ b/lib/web_ui/skwasm/surface.cpp @@ -43,9 +43,7 @@ uint32_t Surface::renderPicture(SkPicture* picture) { assert(emscripten_is_main_browser_thread()); uint32_t callbackId = ++_currentCallbackId; picture->ref(); - emscripten_dispatch_to_thread(_thread, EM_FUNC_SIG_VIII, - reinterpret_cast(fRenderPicture), - nullptr, this, picture, callbackId); + skwasm_dispatchRenderPicture(_thread, this, picture, callbackId); return callbackId; } @@ -138,7 +136,7 @@ void Surface::_recreateSurface() { } // Worker thread only -void Surface::_renderPicture(const SkPicture* picture, uint32_t callbackId) { +void Surface::renderPictureOnWorker(SkPicture* picture, uint32_t callbackId) { SkRect pictureRect = picture->cullRect(); SkIRect roundedOutRect; pictureRect.roundOut(&roundedOutRect); @@ -195,13 +193,6 @@ void Surface::fDispose(Surface* surface) { surface->_dispose(); } -void Surface::fRenderPicture(Surface* surface, - SkPicture* picture, - uint32_t callbackId) { - surface->_renderPicture(picture, callbackId); - picture->unref(); -} - void Surface::fOnRasterizeComplete(Surface* surface, SkData* imageData, uint32_t callbackId) { @@ -239,6 +230,13 @@ SKWASM_EXPORT uint32_t surface_renderPicture(Surface* surface, return surface->renderPicture(picture); } +SKWASM_EXPORT void surface_renderPictureOnWorker(Surface* surface, + SkPicture* picture, + uint32_t callbackId) { + surface->renderPictureOnWorker(picture, callbackId); + picture->unref(); +} + SKWASM_EXPORT uint32_t surface_rasterizeImage(Surface* surface, SkImage* image, ImageByteFormat format) { diff --git a/lib/web_ui/skwasm/surface.h b/lib/web_ui/skwasm/surface.h index c7cd137a00fb5..d99164831e523 100644 --- a/lib/web_ui/skwasm/surface.h +++ b/lib/web_ui/skwasm/surface.h @@ -70,13 +70,15 @@ class Surface { std::unique_ptr createTextureSourceWrapper( SkwasmObject textureSource); + // Worker thread + void renderPictureOnWorker(SkPicture* picture, uint32_t callbackId); + private: void _runWorker(); void _init(); void _dispose(); void _resizeCanvasToFit(int width, int height); void _recreateSurface(); - void _renderPicture(const SkPicture* picture, uint32_t callbackId); void _rasterizeImage(SkImage* image, ImageByteFormat format, uint32_t callbackId); @@ -99,9 +101,6 @@ class Surface { pthread_t _thread; static void fDispose(Surface* surface); - static void fRenderPicture(Surface* surface, - SkPicture* picture, - uint32_t callbackId); static void fOnRenderComplete(Surface* surface, uint32_t callbackId, SkwasmObject imageBitmap); diff --git a/lib/web_ui/test/engine/scene_view_test.dart b/lib/web_ui/test/engine/scene_view_test.dart index d054059c4b443..9c593e7421f77 100644 --- a/lib/web_ui/test/engine/scene_view_test.dart +++ b/lib/web_ui/test/engine/scene_view_test.dart @@ -23,6 +23,7 @@ class StubPictureRenderer implements PictureRenderer { @override Future renderPicture(ScenePicture picture) async { + renderedPictures.add(picture); final ui.Rect cullRect = picture.cullRect; final DomImageBitmap bitmap = (await createSizedImageBitmap( scratchCanvasElement, @@ -32,12 +33,16 @@ class StubPictureRenderer implements PictureRenderer { cullRect.height.toInt()))!; return bitmap; } + + List renderedPictures = []; } void testMain() { late EngineSceneView sceneView; + late StubPictureRenderer stubPictureRenderer; setUp(() { - sceneView = EngineSceneView(StubPictureRenderer()); + stubPictureRenderer = StubPictureRenderer(); + sceneView = EngineSceneView(stubPictureRenderer); }); test('SceneView places canvas according to device-pixel ratio', () async { @@ -74,7 +79,7 @@ void testMain() { debugOverrideDevicePixelRatio(null); }); - test('SceneView places canvas according to device-pixel ratio', () async { + test('SceneView places platform view according to device-pixel ratio', () async { debugOverrideDevicePixelRatio(2.0); final PlatformView platformView = PlatformView( @@ -103,4 +108,28 @@ void testMain() { debugOverrideDevicePixelRatio(null); }); + + test('SceneView always renders most recent picture and skips intermediate pictures', () async { + final List pictures = []; + final List> renderFutures = >[]; + for (int i = 1; i < 20; i++) { + final StubPicture picture = StubPicture(const ui.Rect.fromLTWH( + 50, + 80, + 100, + 120, + )); + pictures.add(picture); + final EngineRootLayer rootLayer = EngineRootLayer(); + rootLayer.slices.add(PictureSlice(picture)); + final EngineScene scene = EngineScene(rootLayer); + renderFutures.add(sceneView.renderScene(scene)); + } + await Future.wait(renderFutures); + + // Should just render the first and last pictures and skip the one inbetween. + expect(stubPictureRenderer.renderedPictures.length, 2); + expect(stubPictureRenderer.renderedPictures.first, pictures.first); + expect(stubPictureRenderer.renderedPictures.last, pictures.last); + }); } From 217f6bd06e6ebb75dd96adc1117667043882cf48 Mon Sep 17 00:00:00 2001 From: Mouad Debbar Date: Fri, 20 Oct 2023 15:17:36 -0400 Subject: [PATCH 811/859] [web] Support `flutterViewId` in platform view messages (#46891) - Accept a new `flutterViewId` field in platform view messages. - Keep transitory support for legacy platform view messages that don't contain `flutterViewId`. - Default view factories set `width:100%` and `height:100%`. --- .../lib/src/engine/platform_dispatcher.dart | 60 ++-- .../platform_views/content_manager.dart | 4 +- .../platform_views/message_handler.dart | 84 ++++-- lib/web_ui/lib/src/engine/util.dart | 22 ++ .../legacy_message_handler_test.dart | 265 ++++++++++++++++++ .../platform_views/message_handler_test.dart | 141 +++++++--- 6 files changed, 477 insertions(+), 99 deletions(-) create mode 100644 lib/web_ui/test/engine/platform_views/legacy_message_handler_test.dart diff --git a/lib/web_ui/lib/src/engine/platform_dispatcher.dart b/lib/web_ui/lib/src/engine/platform_dispatcher.dart index 51bc3a394cff5..5d667c51ccf28 100644 --- a/lib/web_ui/lib/src/engine/platform_dispatcher.dart +++ b/lib/web_ui/lib/src/engine/platform_dispatcher.dart @@ -21,6 +21,9 @@ ui.VoidCallback? scheduleFrameCallback; typedef HighContrastListener = void Function(bool enabled); typedef _KeyDataResponseCallback = void Function(bool handled); +const StandardMethodCodec standardCodec = StandardMethodCodec(); +const JSONMethodCodec jsonCodec = JSONMethodCodec(); + /// Determines if high contrast is enabled using media query 'forced-colors: active' for Windows class HighContrastSupport { static HighContrastSupport instance = HighContrastSupport(); @@ -129,13 +132,13 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher { /// The current list of windows. @override - Iterable get views => viewData.values; - final Map viewData = {}; + Iterable get views => viewData.values; + final Map viewData = {}; /// Returns the [FlutterView] with the provided ID if one exists, or null /// otherwise. @override - ui.FlutterView? view({required int id}) => viewData[id]; + EngineFlutterView? view({required int id}) => viewData[id]; /// A map of opaque platform window identifiers to window configurations. /// @@ -470,8 +473,7 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher { /// This should be in sync with shell/common/shell.cc case 'flutter/skia': - const MethodCodec codec = JSONMethodCodec(); - final MethodCall decoded = codec.decodeMethodCall(data); + final MethodCall decoded = jsonCodec.decodeMethodCall(data); switch (decoded.method) { case 'Skia.setResourceCacheMaxBytes': if (renderer is CanvasKitRenderer) { @@ -486,7 +488,7 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher { // Also respond in HTML mode. Otherwise, apps would have to detect // CanvasKit vs HTML before invoking this method. replyToPlatformMessage( - callback, codec.encodeSuccessEnvelope([true])); + callback, jsonCodec.encodeSuccessEnvelope([true])); } return; @@ -496,8 +498,7 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher { return; case 'flutter/platform': - const MethodCodec codec = JSONMethodCodec(); - final MethodCall decoded = codec.decodeMethodCall(data); + final MethodCall decoded = jsonCodec.decodeMethodCall(data); switch (decoded.method) { case 'SystemNavigator.pop': // TODO(a-wallen): As multi-window support expands, the pop call @@ -505,13 +506,13 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher { // supported. implicitView!.browserHistory.exit().then((_) { replyToPlatformMessage( - callback, codec.encodeSuccessEnvelope(true)); + callback, jsonCodec.encodeSuccessEnvelope(true)); }); return; case 'HapticFeedback.vibrate': final String? type = decoded.arguments as String?; vibrate(_getHapticFeedbackDuration(type)); - replyToPlatformMessage(callback, codec.encodeSuccessEnvelope(true)); + replyToPlatformMessage(callback, jsonCodec.encodeSuccessEnvelope(true)); return; case 'SystemChrome.setApplicationSwitcherDescription': final Map arguments = decoded.arguments as Map; @@ -520,24 +521,24 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher { final int primaryColor = arguments['primaryColor'] as int? ?? 0xFF000000; domDocument.title = label; setThemeColor(ui.Color(primaryColor)); - replyToPlatformMessage(callback, codec.encodeSuccessEnvelope(true)); + replyToPlatformMessage(callback, jsonCodec.encodeSuccessEnvelope(true)); return; case 'SystemChrome.setSystemUIOverlayStyle': final Map arguments = decoded.arguments as Map; final int? statusBarColor = arguments['statusBarColor'] as int?; setThemeColor(statusBarColor == null ? null : ui.Color(statusBarColor)); - replyToPlatformMessage(callback, codec.encodeSuccessEnvelope(true)); + replyToPlatformMessage(callback, jsonCodec.encodeSuccessEnvelope(true)); return; case 'SystemChrome.setPreferredOrientations': final List arguments = decoded.arguments as List; ScreenOrientation.instance.setPreferredOrientation(arguments).then((bool success) { replyToPlatformMessage( - callback, codec.encodeSuccessEnvelope(success)); + callback, jsonCodec.encodeSuccessEnvelope(success)); }); return; case 'SystemSound.play': // There are no default system sounds on web. - replyToPlatformMessage(callback, codec.encodeSuccessEnvelope(true)); + replyToPlatformMessage(callback, jsonCodec.encodeSuccessEnvelope(true)); return; case 'Clipboard.setData': ClipboardMessageHandler().setDataMethodCall(decoded, callback); @@ -560,23 +561,21 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher { return; case 'flutter/contextmenu': - const MethodCodec codec = JSONMethodCodec(); - final MethodCall decoded = codec.decodeMethodCall(data); + final MethodCall decoded = jsonCodec.decodeMethodCall(data); switch (decoded.method) { case 'enableContextMenu': implicitView!.contextMenu.enable(); - replyToPlatformMessage(callback, codec.encodeSuccessEnvelope(true)); + replyToPlatformMessage(callback, jsonCodec.encodeSuccessEnvelope(true)); return; case 'disableContextMenu': implicitView!.contextMenu.disable(); - replyToPlatformMessage(callback, codec.encodeSuccessEnvelope(true)); + replyToPlatformMessage(callback, jsonCodec.encodeSuccessEnvelope(true)); return; } return; case 'flutter/mousecursor': - const MethodCodec codec = StandardMethodCodec(); - final MethodCall decoded = codec.decodeMethodCall(data); + final MethodCall decoded = standardCodec.decodeMethodCall(data); final Map arguments = decoded.arguments as Map; switch (decoded.method) { case 'activateSystemCursor': @@ -585,15 +584,21 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher { return; case 'flutter/web_test_e2e': - const MethodCodec codec = JSONMethodCodec(); replyToPlatformMessage( callback, - codec.encodeSuccessEnvelope( - _handleWebTestEnd2EndMessage(codec, data))); + jsonCodec.encodeSuccessEnvelope( + _handleWebTestEnd2EndMessage(jsonCodec, data))); return; case 'flutter/platform_views': - implicitView!.platformViewMessageHandler.handlePlatformViewCall(data, callback!); + final MethodCall(:String method, :dynamic arguments) = standardCodec.decodeMethodCall(data); + final int? flutterViewId = tryViewId(arguments); + if (flutterViewId == null) { + implicitView!.platformViewMessageHandler.handleLegacyPlatformViewCall(method, arguments, callback!); + return; + } + arguments as Map; + viewData[flutterViewId]!.platformViewMessageHandler.handlePlatformViewCall(method, arguments, callback!); return; case 'flutter/accessibility': @@ -609,8 +614,7 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher { // supported. implicitView!.handleNavigationMessage(data).then((bool handled) { if (handled) { - const MethodCodec codec = JSONMethodCodec(); - replyToPlatformMessage(callback, codec.encodeSuccessEnvelope(true)); + replyToPlatformMessage(callback, jsonCodec.encodeSuccessEnvelope(true)); } else { callback?.call(null); } @@ -1350,7 +1354,7 @@ class ViewConfiguration { }); ViewConfiguration copyWith({ - ui.FlutterView? view, + EngineFlutterView? view, double? devicePixelRatio, ui.Rect? geometry, bool? visible, @@ -1375,7 +1379,7 @@ class ViewConfiguration { ); } - final ui.FlutterView? view; + final EngineFlutterView? view; final double devicePixelRatio; final ui.Rect geometry; final bool visible; diff --git a/lib/web_ui/lib/src/engine/platform_views/content_manager.dart b/lib/web_ui/lib/src/engine/platform_views/content_manager.dart index a9ed363417caf..0b0e35270ff66 100644 --- a/lib/web_ui/lib/src/engine/platform_views/content_manager.dart +++ b/lib/web_ui/lib/src/engine/platform_views/content_manager.dart @@ -249,5 +249,7 @@ DomElement _defaultFactory( }) { params!; params as Map; - return domDocument.createElement(params.readString('tagName')); + return domDocument.createElement(params.readString('tagName')) + ..style.width = '100%' + ..style.height = '100%'; } diff --git a/lib/web_ui/lib/src/engine/platform_views/message_handler.dart b/lib/web_ui/lib/src/engine/platform_views/message_handler.dart index 68c0fe340cac8..9e20b3674ada3 100644 --- a/lib/web_ui/lib/src/engine/platform_views/message_handler.dart +++ b/lib/web_ui/lib/src/engine/platform_views/message_handler.dart @@ -53,7 +53,7 @@ class PlatformViewMessageHandler { /// Handle a `create` Platform View message. /// - /// This will attempt to render the `contents` and of a Platform View, if its + /// This will attempt to render the `contents` of a Platform View, if its /// `viewType` has been registered previously. /// /// (See [PlatformViewManager.registerFactory] for more details.) @@ -63,37 +63,34 @@ class PlatformViewMessageHandler { /// If all goes well, this function will `callback` with an empty success envelope. /// In case of error, this will `callback` with an error envelope describing the error. void _createPlatformView( - MethodCall methodCall, - _PlatformMessageResponseCallback callback, - ) { - final Map args = methodCall.arguments as Map; - final int viewId = args.readInt('id'); - final String viewType = args.readString('viewType'); - final Object? params = args['params']; - - if (!_contentManager.knowsViewType(viewType)) { + _PlatformMessageResponseCallback callback, { + required int platformViewId, + required String platformViewType, + required Object? params, + }) { + if (!_contentManager.knowsViewType(platformViewType)) { callback(_codec.encodeErrorEnvelope( code: 'unregistered_view_type', message: 'A HtmlElementView widget is trying to create a platform view ' - 'with an unregistered type: <$viewType>.', + 'with an unregistered type: <$platformViewType>.', details: 'If you are the author of the PlatformView, make sure ' '`registerViewFactory` is invoked.', )); return; } - if (_contentManager.knowsViewId(viewId)) { + if (_contentManager.knowsViewId(platformViewId)) { callback(_codec.encodeErrorEnvelope( code: 'recreating_view', message: 'trying to create an already created view', - details: 'view id: $viewId', + details: 'view id: $platformViewId', )); return; } final DomElement content = _contentManager.renderContent( - viewType, - viewId, + platformViewType, + platformViewId, params, ); @@ -106,7 +103,7 @@ class PlatformViewMessageHandler { /// Handle a `dispose` Platform View message. /// /// This will clear the cached information that the framework has about a given - /// `viewId`, through the [_contentManager]. + /// `platformViewId`, through the [_contentManager]. /// /// Once that's done, the dispose call is delegated to the [_disposeHandler] /// function, so the active rendering backend can dispose of whatever resources @@ -114,34 +111,67 @@ class PlatformViewMessageHandler { /// /// This function should always `callback` with an empty success envelope. void _disposePlatformView( - MethodCall methodCall, - _PlatformMessageResponseCallback callback, - ) { - final int viewId = methodCall.arguments as int; - + _PlatformMessageResponseCallback callback, { + required int platformViewId, + }) { // The contentManager removes the slot and the contents from its internal // cache, and the DOM. - _contentManager.clearPlatformView(viewId); + _contentManager.clearPlatformView(platformViewId); callback(_codec.encodeSuccessEnvelope(null)); } + /// Handles legacy PlatformViewCalls that don't contain a Flutter View ID. + /// + /// This is transitional code to support the old platform view channel. As + /// soon as the framework code is updated to send the Flutter View ID, this + /// method can be removed. + void handleLegacyPlatformViewCall( + String method, + dynamic arguments, + _PlatformMessageResponseCallback callback, + ) { + switch (method) { + case 'create': + arguments as Map; + _createPlatformView( + callback, + platformViewId: arguments.readInt('id'), + platformViewType: arguments.readString('viewType'), + params: arguments['params'], + ); + return; + case 'dispose': + _disposePlatformView(callback, platformViewId: arguments as int); + return; + } + callback(null); + } + /// Handles a PlatformViewCall to the `flutter/platform_views` channel. /// /// This method handles two possible messages: /// * `create`: See [_createPlatformView] /// * `dispose`: See [_disposePlatformView] void handlePlatformViewCall( - ByteData? data, + String method, + Map arguments, _PlatformMessageResponseCallback callback, ) { - final MethodCall decoded = _codec.decodeMethodCall(data); - switch (decoded.method) { + switch (method) { case 'create': - _createPlatformView(decoded, callback); + _createPlatformView( + callback, + platformViewId: arguments.readInt('platformViewId'), + platformViewType: arguments.readString('platformViewType'), + params: arguments['params'], + ); return; case 'dispose': - _disposePlatformView(decoded, callback); + _disposePlatformView( + callback, + platformViewId: arguments.readInt('platformViewId'), + ); return; } callback(null); diff --git a/lib/web_ui/lib/src/engine/util.dart b/lib/web_ui/lib/src/engine/util.dart index bd4ad5b0ef333..d6581459b60c2 100644 --- a/lib/web_ui/lib/src/engine/util.dart +++ b/lib/web_ui/lib/src/engine/util.dart @@ -14,6 +14,7 @@ import 'package:ui/ui.dart' as ui; import 'browser_detection.dart'; import 'dom.dart'; import 'safe_browser_api.dart'; +import 'services.dart'; import 'vector_math.dart'; /// Generic callback signature, used by [_futurize]. @@ -627,6 +628,27 @@ extension JsonExtensions on Map { } } +/// Extracts view ID from the [MethodCall.arguments] map. +/// +/// Throws if the view ID is not present or if [arguments] is not a map. +int readViewId(Object? arguments) { + final int? viewId = tryViewId(arguments); + if (viewId == null) { + throw Exception('Could not find a `viewId` in the arguments: $arguments'); + } + return viewId; +} + +/// Extracts view ID from the [MethodCall.arguments] map. +/// +/// Returns null if the view ID is not present or if [arguments] is not a map. +int? tryViewId(Object? arguments) { + if (arguments is Map) { + return arguments.tryInt('viewId'); + } + return null; +} + /// Prints a list of bytes in hex format. /// /// Bytes are separated by one space and are padded on the left to always show diff --git a/lib/web_ui/test/engine/platform_views/legacy_message_handler_test.dart b/lib/web_ui/test/engine/platform_views/legacy_message_handler_test.dart new file mode 100644 index 0000000000000..2c9f47725438f --- /dev/null +++ b/lib/web_ui/test/engine/platform_views/legacy_message_handler_test.dart @@ -0,0 +1,265 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'dart:async'; +import 'dart:typed_data'; + +import 'package:test/bootstrap/browser.dart'; +import 'package:test/test.dart'; +import 'package:ui/src/engine.dart'; + +void main() { + internalBootstrapBrowserTest(() => testMain); +} + +const MethodCodec codec = StandardMethodCodec(); + +typedef PlatformViewFactoryCall = ({int viewId, Object? params}); + +void testMain() { + group('PlatformViewMessageHandler', () { + group('handlePlatformViewCall', () { + const String viewType = 'forTest'; + const int viewId = 6; + late PlatformViewManager contentManager; + late Completer completer; + + setUp(() { + contentManager = PlatformViewManager(); + completer = Completer(); + }); + + group('"create" message', () { + test('unregistered viewType, fails with descriptive exception', + () async { + final PlatformViewMessageHandler messageHandler = PlatformViewMessageHandler( + platformViewsContainer: createDomElement('div'), + contentManager: contentManager, + ); + final Map arguments = _getCreateArguments(viewType, viewId); + + messageHandler.handleLegacyPlatformViewCall('create', arguments, completer.complete); + + final ByteData? response = await completer.future; + try { + codec.decodeEnvelope(response!); + } on PlatformException catch (e) { + expect(e.code, 'unregistered_view_type'); + expect(e.message, contains(viewType)); + expect(e.details, contains('registerViewFactory')); + } + }); + + test('duplicate viewId, fails with descriptive exception', () async { + contentManager.registerFactory( + viewType, (int id) => createDomHTMLDivElement()); + contentManager.renderContent(viewType, viewId, null); + final PlatformViewMessageHandler messageHandler = PlatformViewMessageHandler( + platformViewsContainer: createDomElement('div'), + contentManager: contentManager, + ); + final Map arguments = _getCreateArguments(viewType, viewId); + + messageHandler.handleLegacyPlatformViewCall('create', arguments, completer.complete); + + final ByteData? response = await completer.future; + try { + codec.decodeEnvelope(response!); + } on PlatformException catch (e) { + expect(e.code, 'recreating_view'); + expect(e.details, contains('$viewId')); + } + }); + + test('returns a successEnvelope when the view is created normally', + () async { + contentManager.registerFactory( + viewType, (int id) => createDomHTMLDivElement()..id = 'success'); + final PlatformViewMessageHandler messageHandler = PlatformViewMessageHandler( + platformViewsContainer: createDomElement('div'), + contentManager: contentManager, + ); + final Map arguments = _getCreateArguments(viewType, viewId); + + messageHandler.handleLegacyPlatformViewCall('create', arguments, completer.complete); + + final ByteData? response = await completer.future; + expect(codec.decodeEnvelope(response!), isNull, + reason: + 'The response should be a success envelope, with null in it.'); + }); + + test('inserts the created view into the platformViewsContainer', + () async { + final DomElement platformViewsContainer = createDomElement('pv-container'); + contentManager.registerFactory( + viewType, (int id) => createDomHTMLDivElement()..id = 'success'); + final PlatformViewMessageHandler messageHandler = PlatformViewMessageHandler( + platformViewsContainer: platformViewsContainer, + contentManager: contentManager, + ); + final Map arguments = _getCreateArguments(viewType, viewId); + + messageHandler.handleLegacyPlatformViewCall('create', arguments, completer.complete); + + final ByteData? response = await completer.future; + + expect( + platformViewsContainer.children.single, + isNotNull, + reason: 'The container has a single child, the created view.', + ); + final DomElement platformView = platformViewsContainer.children.single; + expect( + platformView.querySelector('div#success'), + isNotNull, + reason: 'The element created by the factory should be present in the created view.', + ); + expect( + codec.decodeEnvelope(response!), + isNull, + reason: 'The response should be a success envelope, with null in it.', + ); + }); + + test('passes creation params to the factory', () async { + final List factoryCalls = []; + contentManager.registerFactory(viewType, (int viewId, {Object? params}) { + factoryCalls.add((viewId: viewId, params: params)); + return createDomHTMLDivElement(); + }); + final PlatformViewMessageHandler messageHandler = PlatformViewMessageHandler( + platformViewsContainer: createDomElement('div'), + contentManager: contentManager, + ); + + final List> completers = >[]; + + completers.add(Completer()); + messageHandler.handleLegacyPlatformViewCall( + 'create', + _getCreateArguments(viewType, 111), + completers.last.complete, + ); + + completers.add(Completer()); + messageHandler.handleLegacyPlatformViewCall( + 'create', + _getCreateArguments(viewType, 222, {'foo': 'bar'}), + completers.last.complete, + ); + + completers.add(Completer()); + messageHandler.handleLegacyPlatformViewCall( + 'create', + _getCreateArguments(viewType, 333, 'foobar'), + completers.last.complete, + ); + + completers.add(Completer()); + messageHandler.handleLegacyPlatformViewCall( + 'create', + _getCreateArguments(viewType, 444, [1, null, 'str']), + completers.last.complete, + ); + + final List responses = await Future.wait( + completers.map((Completer c) => c.future), + ); + + for (final ByteData? response in responses) { + expect( + codec.decodeEnvelope(response!), + isNull, + reason: 'The response should be a success envelope, with null in it.', + ); + } + + expect(factoryCalls, hasLength(4)); + expect(factoryCalls[0].viewId, 111); + expect(factoryCalls[0].params, isNull); + expect(factoryCalls[1].viewId, 222); + expect(factoryCalls[1].params, {'foo': 'bar'}); + expect(factoryCalls[2].viewId, 333); + expect(factoryCalls[2].params, 'foobar'); + expect(factoryCalls[3].viewId, 444); + expect(factoryCalls[3].params, [1, null, 'str']); + }); + + test('fails if the factory returns a non-DOM object', () async { + contentManager.registerFactory(viewType, (int viewId) { + // Return an object that's not a DOM element. + return Object(); + }); + + final PlatformViewMessageHandler messageHandler = PlatformViewMessageHandler( + platformViewsContainer: createDomElement('div'), + contentManager: contentManager, + ); + final Map arguments = _getCreateArguments(viewType, viewId); + + expect(() { + messageHandler.handleLegacyPlatformViewCall('create', arguments, (_) {}); + }, throwsA(isA())); + }); + }); + + group('"dispose" message', () { + late Completer viewIdCompleter; + + setUp(() { + viewIdCompleter = Completer(); + }); + + test('never fails, even for unknown viewIds', () async { + final PlatformViewMessageHandler messageHandler = PlatformViewMessageHandler( + platformViewsContainer: createDomElement('div'), + contentManager: contentManager, + ); + + messageHandler.handleLegacyPlatformViewCall('dispose', viewId, completer.complete); + + final ByteData? response = await completer.future; + expect(codec.decodeEnvelope(response!), isNull, + reason: + 'The response should be a success envelope, with null in it.'); + }); + + test('never fails, even for unknown viewIds', () async { + final PlatformViewMessageHandler messageHandler = PlatformViewMessageHandler( + platformViewsContainer: createDomElement('div'), + contentManager: _FakePlatformViewManager(viewIdCompleter.complete), + ); + + messageHandler.handleLegacyPlatformViewCall('dispose', viewId, completer.complete); + + final int disposedViewId = await viewIdCompleter.future; + expect(disposedViewId, viewId, + reason: + 'The viewId to dispose should be passed to the contentManager'); + }); + }); + }); + }); +} + +class _FakePlatformViewManager extends PlatformViewManager { + _FakePlatformViewManager(void Function(int) clearFunction) + : _clearPlatformView = clearFunction; + + final void Function(int) _clearPlatformView; + + @override + void clearPlatformView(int viewId) { + return _clearPlatformView(viewId); + } +} + +Map _getCreateArguments(String viewType, int viewId, [Object? params]) { + return { + 'id': viewId, + 'viewType': viewType, + if (params != null) 'params': params, + }; +} diff --git a/lib/web_ui/test/engine/platform_views/message_handler_test.dart b/lib/web_ui/test/engine/platform_views/message_handler_test.dart index e1b28b68b954d..344de91e04ae4 100644 --- a/lib/web_ui/test/engine/platform_views/message_handler_test.dart +++ b/lib/web_ui/test/engine/platform_views/message_handler_test.dart @@ -20,8 +20,8 @@ typedef PlatformViewFactoryCall = ({int viewId, Object? params}); void testMain() { group('PlatformViewMessageHandler', () { group('handlePlatformViewCall', () { - const String viewType = 'forTest'; - const int viewId = 6; + const String platformViewType = 'forTest'; + const int platformViewId = 6; late PlatformViewManager contentManager; late Completer completer; @@ -37,52 +37,64 @@ void testMain() { platformViewsContainer: createDomElement('div'), contentManager: contentManager, ); - final ByteData? message = _getCreateMessage(viewType, viewId); + final Map arguments = _getCreateArguments( + platformViewType: platformViewType, + platformViewId: platformViewId, + viewId: kImplicitViewId, + ); - messageHandler.handlePlatformViewCall(message, completer.complete); + messageHandler.handlePlatformViewCall('create', arguments, completer.complete); final ByteData? response = await completer.future; try { codec.decodeEnvelope(response!); } on PlatformException catch (e) { expect(e.code, 'unregistered_view_type'); - expect(e.message, contains(viewType)); + expect(e.message, contains(platformViewType)); expect(e.details, contains('registerViewFactory')); } }); test('duplicate viewId, fails with descriptive exception', () async { contentManager.registerFactory( - viewType, (int id) => createDomHTMLDivElement()); - contentManager.renderContent(viewType, viewId, null); + platformViewType, (int id) => createDomHTMLDivElement()); + contentManager.renderContent(platformViewType, platformViewId, null); final PlatformViewMessageHandler messageHandler = PlatformViewMessageHandler( platformViewsContainer: createDomElement('div'), contentManager: contentManager, ); - final ByteData? message = _getCreateMessage(viewType, viewId); + final Map arguments = _getCreateArguments( + platformViewType: platformViewType, + platformViewId: platformViewId, + viewId: kImplicitViewId, + ); - messageHandler.handlePlatformViewCall(message, completer.complete); + messageHandler.handlePlatformViewCall('create', arguments, completer.complete); final ByteData? response = await completer.future; try { codec.decodeEnvelope(response!); } on PlatformException catch (e) { expect(e.code, 'recreating_view'); - expect(e.details, contains('$viewId')); + expect(e.details, contains('$platformViewId')); } }); test('returns a successEnvelope when the view is created normally', () async { contentManager.registerFactory( - viewType, (int id) => createDomHTMLDivElement()..id = 'success'); + platformViewType, (int id) => createDomHTMLDivElement()..id = 'success'); final PlatformViewMessageHandler messageHandler = PlatformViewMessageHandler( platformViewsContainer: createDomElement('div'), contentManager: contentManager, ); - final ByteData? message = _getCreateMessage(viewType, viewId); + final Map arguments = _getCreateArguments( + platformViewType: platformViewType, + platformViewId: platformViewId, + viewId: kImplicitViewId, + ); - messageHandler.handlePlatformViewCall(message, completer.complete); + messageHandler.handlePlatformViewCall('create', arguments, completer.complete); final ByteData? response = await completer.future; expect(codec.decodeEnvelope(response!), isNull, @@ -94,14 +106,18 @@ void testMain() { () async { final DomElement platformViewsContainer = createDomElement('pv-container'); contentManager.registerFactory( - viewType, (int id) => createDomHTMLDivElement()..id = 'success'); + platformViewType, (int id) => createDomHTMLDivElement()..id = 'success'); final PlatformViewMessageHandler messageHandler = PlatformViewMessageHandler( platformViewsContainer: platformViewsContainer, contentManager: contentManager, ); - final ByteData? message = _getCreateMessage(viewType, viewId); + final Map arguments = _getCreateArguments( + platformViewType: platformViewType, + platformViewId: platformViewId, + viewId: kImplicitViewId, + ); - messageHandler.handlePlatformViewCall(message, completer.complete); + messageHandler.handlePlatformViewCall('create', arguments, completer.complete); final ByteData? response = await completer.future; @@ -125,7 +141,7 @@ void testMain() { test('passes creation params to the factory', () async { final List factoryCalls = []; - contentManager.registerFactory(viewType, (int viewId, {Object? params}) { + contentManager.registerFactory(platformViewType, (int viewId, {Object? params}) { factoryCalls.add((viewId: viewId, params: params)); return createDomHTMLDivElement(); }); @@ -138,25 +154,48 @@ void testMain() { completers.add(Completer()); messageHandler.handlePlatformViewCall( - _getCreateMessage(viewType, 111), + 'create', + _getCreateArguments( + platformViewType: platformViewType, + platformViewId: 111, + viewId: kImplicitViewId, + ), completers.last.complete, ); completers.add(Completer()); messageHandler.handlePlatformViewCall( - _getCreateMessage(viewType, 222, {'foo': 'bar'}), + 'create', + _getCreateArguments( + platformViewType: platformViewType, + platformViewId: 222, + viewId: kImplicitViewId, + params: {'foo': 'bar'}, + ), completers.last.complete, ); completers.add(Completer()); messageHandler.handlePlatformViewCall( - _getCreateMessage(viewType, 333, 'foobar'), + 'create', + _getCreateArguments( + platformViewType: platformViewType, + platformViewId: 333, + viewId: kImplicitViewId, + params: 'foobar', + ), completers.last.complete, ); completers.add(Completer()); messageHandler.handlePlatformViewCall( - _getCreateMessage(viewType, 444, [1, null, 'str']), + 'create', + _getCreateArguments( + platformViewType: platformViewType, + platformViewId: 444, + viewId: kImplicitViewId, + params: [1, null, 'str'], + ), completers.last.complete, ); @@ -184,7 +223,7 @@ void testMain() { }); test('fails if the factory returns a non-DOM object', () async { - contentManager.registerFactory(viewType, (int viewId) { + contentManager.registerFactory(platformViewType, (int viewId) { // Return an object that's not a DOM element. return Object(); }); @@ -193,10 +232,14 @@ void testMain() { platformViewsContainer: createDomElement('div'), contentManager: contentManager, ); - final ByteData? message = _getCreateMessage(viewType, viewId); + final Map arguments = _getCreateArguments( + platformViewType: platformViewType, + platformViewId: platformViewId, + viewId: kImplicitViewId, + ); expect(() { - messageHandler.handlePlatformViewCall(message, (_) {}); + messageHandler.handlePlatformViewCall('create', arguments, (_) {}); }, throwsA(isA())); }); }); @@ -213,9 +256,12 @@ void testMain() { platformViewsContainer: createDomElement('div'), contentManager: contentManager, ); - final ByteData? message = _getDisposeMessage(viewId); + final Map arguments = _getDisposeArguments( + platformViewId: platformViewId, + viewId: kImplicitViewId, + ); - messageHandler.handlePlatformViewCall(message, completer.complete); + messageHandler.handlePlatformViewCall('dispose', arguments, completer.complete); final ByteData? response = await completer.future; expect(codec.decodeEnvelope(response!), isNull, @@ -228,12 +274,15 @@ void testMain() { platformViewsContainer: createDomElement('div'), contentManager: _FakePlatformViewManager(viewIdCompleter.complete), ); - final ByteData? message = _getDisposeMessage(viewId); + final Map arguments = _getDisposeArguments( + platformViewId: platformViewId, + viewId: kImplicitViewId, + ); - messageHandler.handlePlatformViewCall(message, completer.complete); + messageHandler.handlePlatformViewCall('dispose', arguments, completer.complete); final int disposedViewId = await viewIdCompleter.future; - expect(disposedViewId, viewId, + expect(disposedViewId, platformViewId, reason: 'The viewId to dispose should be passed to the contentManager'); }); @@ -254,20 +303,26 @@ class _FakePlatformViewManager extends PlatformViewManager { } } -ByteData? _getCreateMessage(String viewType, int viewId, [Object? params]) { - return codec.encodeMethodCall(MethodCall( - 'create', - { - 'id': viewId, - 'viewType': viewType, - if (params != null) 'params': params, - }, - )); +Map _getCreateArguments({ + required String platformViewType, + required int platformViewId, + required int viewId, + Object? params, +}) { + return { + 'platformViewId': platformViewId, + 'platformViewType': platformViewType, + if (params != null) 'params': params, + 'viewId': viewId, + }; } -ByteData? _getDisposeMessage(int viewId) { - return codec.encodeMethodCall(MethodCall( - 'dispose', - viewId, - )); +Map _getDisposeArguments({ + required int platformViewId, + required int viewId, +}) { + return { + 'platformViewId': platformViewId, + 'viewId': viewId, + }; } From 33bb6efa0903bb1bf01dec8f1dfd5d50845db7a3 Mon Sep 17 00:00:00 2001 From: chunhtai <47866232+chunhtai@users.noreply.github.com> Date: Fri, 20 Oct 2023 12:20:08 -0700 Subject: [PATCH 812/859] Add link support in web accessibility (#46117) fixes https://github.com/flutter/flutter/issues/134795 ## Pre-launch Checklist - [ ] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [ ] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [ ] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [ ] I listed at least one issue that this PR fixes in the description above. - [ ] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [ ] I updated/added relevant documentation (doc comments with `///`). - [ ] I signed the [CLA]. - [ ] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat --- ci/licenses_golden/licenses_flutter | 2 + lib/web_ui/lib/src/engine.dart | 1 + lib/web_ui/lib/src/engine/semantics.dart | 1 + .../lib/src/engine/semantics/checkable.dart | 19 +-- .../lib/src/engine/semantics/dialog.dart | 13 +- .../lib/src/engine/semantics/focusable.dart | 6 +- .../lib/src/engine/semantics/image.dart | 8 +- .../src/engine/semantics/incrementable.dart | 2 +- .../src/engine/semantics/label_and_value.dart | 10 +- lib/web_ui/lib/src/engine/semantics/link.dart | 21 +++ .../lib/src/engine/semantics/live_region.dart | 4 +- .../src/engine/semantics/platform_view.dart | 5 +- .../lib/src/engine/semantics/scrollable.dart | 16 +- .../lib/src/engine/semantics/semantics.dart | 141 ++++++++++++------ .../lib/src/engine/semantics/tappable.dart | 40 ++--- .../lib/src/engine/semantics/text_field.dart | 21 ++- .../test/engine/semantics/semantics_test.dart | 71 ++++++++- 17 files changed, 260 insertions(+), 121 deletions(-) create mode 100644 lib/web_ui/lib/src/engine/semantics/link.dart diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index a7a265affe37b..5d47269235ca8 100644 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -2721,6 +2721,7 @@ ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/semantics/focusable.dart + .. ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/semantics/image.dart + ../../../flutter/LICENSE ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/semantics/incrementable.dart + ../../../flutter/LICENSE ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/semantics/label_and_value.dart + ../../../flutter/LICENSE +ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/semantics/link.dart + ../../../flutter/LICENSE ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/semantics/live_region.dart + ../../../flutter/LICENSE ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/semantics/platform_view.dart + ../../../flutter/LICENSE ORIGIN: ../../../flutter/lib/web_ui/lib/src/engine/semantics/scrollable.dart + ../../../flutter/LICENSE @@ -5498,6 +5499,7 @@ FILE: ../../../flutter/lib/web_ui/lib/src/engine/semantics/focusable.dart FILE: ../../../flutter/lib/web_ui/lib/src/engine/semantics/image.dart FILE: ../../../flutter/lib/web_ui/lib/src/engine/semantics/incrementable.dart FILE: ../../../flutter/lib/web_ui/lib/src/engine/semantics/label_and_value.dart +FILE: ../../../flutter/lib/web_ui/lib/src/engine/semantics/link.dart FILE: ../../../flutter/lib/web_ui/lib/src/engine/semantics/live_region.dart FILE: ../../../flutter/lib/web_ui/lib/src/engine/semantics/platform_view.dart FILE: ../../../flutter/lib/web_ui/lib/src/engine/semantics/scrollable.dart diff --git a/lib/web_ui/lib/src/engine.dart b/lib/web_ui/lib/src/engine.dart index 24ea306090661..974411798aab5 100644 --- a/lib/web_ui/lib/src/engine.dart +++ b/lib/web_ui/lib/src/engine.dart @@ -144,6 +144,7 @@ export 'engine/semantics/focusable.dart'; export 'engine/semantics/image.dart'; export 'engine/semantics/incrementable.dart'; export 'engine/semantics/label_and_value.dart'; +export 'engine/semantics/link.dart'; export 'engine/semantics/live_region.dart'; export 'engine/semantics/platform_view.dart'; export 'engine/semantics/scrollable.dart'; diff --git a/lib/web_ui/lib/src/engine/semantics.dart b/lib/web_ui/lib/src/engine/semantics.dart index d1d58ce4a688e..0ba3230ee96a1 100644 --- a/lib/web_ui/lib/src/engine/semantics.dart +++ b/lib/web_ui/lib/src/engine/semantics.dart @@ -8,6 +8,7 @@ export 'semantics/focusable.dart'; export 'semantics/image.dart'; export 'semantics/incrementable.dart'; export 'semantics/label_and_value.dart'; +export 'semantics/link.dart'; export 'semantics/live_region.dart'; export 'semantics/platform_view.dart'; export 'semantics/scrollable.dart'; diff --git a/lib/web_ui/lib/src/engine/semantics/checkable.dart b/lib/web_ui/lib/src/engine/semantics/checkable.dart index e6f5b2efcc223..d50f51c512c64 100644 --- a/lib/web_ui/lib/src/engine/semantics/checkable.dart +++ b/lib/web_ui/lib/src/engine/semantics/checkable.dart @@ -13,7 +13,6 @@ import 'package:ui/ui.dart' as ui; -import '../dom.dart'; import 'semantics.dart'; /// The specific type of checkable control. @@ -63,18 +62,18 @@ class Checkable extends PrimaryRoleManager { if (semanticsObject.isFlagsDirty) { switch (_kind) { case _CheckableKind.checkbox: - semanticsObject.setAriaRole('checkbox'); + setAriaRole('checkbox'); case _CheckableKind.radio: - semanticsObject.setAriaRole('radio'); + setAriaRole('radio'); case _CheckableKind.toggle: - semanticsObject.setAriaRole('switch'); + setAriaRole('switch'); } /// Adding disabled and aria-disabled attribute to notify the assistive /// technologies of disabled elements. _updateDisabledAttribute(); - semanticsObject.element.setAttribute( + setAttribute( 'aria-checked', (semanticsObject.hasFlag(ui.SemanticsFlag.isChecked) || semanticsObject.hasFlag(ui.SemanticsFlag.isToggled)) @@ -92,17 +91,15 @@ class Checkable extends PrimaryRoleManager { void _updateDisabledAttribute() { if (semanticsObject.enabledState() == EnabledState.disabled) { - final DomElement element = semanticsObject.element; - element - ..setAttribute('aria-disabled', 'true') - ..setAttribute('disabled', 'true'); + setAttribute('aria-disabled', 'true'); + setAttribute('disabled', 'true'); } else { _removeDisabledAttribute(); } } void _removeDisabledAttribute() { - final DomElement element = semanticsObject.element; - element..removeAttribute('aria-disabled')..removeAttribute('disabled'); + removeAttribute('aria-disabled'); + removeAttribute('disabled'); } } diff --git a/lib/web_ui/lib/src/engine/semantics/dialog.dart b/lib/web_ui/lib/src/engine/semantics/dialog.dart index 8155ba4838415..9f64e42e7acff 100644 --- a/lib/web_ui/lib/src/engine/semantics/dialog.dart +++ b/lib/web_ui/lib/src/engine/semantics/dialog.dart @@ -38,8 +38,8 @@ class Dialog extends PrimaryRoleManager { } return true; }()); - semanticsObject.element.setAttribute('aria-label', label ?? ''); - semanticsObject.setAriaRole('dialog'); + setAttribute('aria-label', label ?? ''); + setAriaRole('dialog'); } } @@ -51,8 +51,8 @@ class Dialog extends PrimaryRoleManager { return; } - semanticsObject.setAriaRole('dialog'); - semanticsObject.element.setAttribute( + setAriaRole('dialog'); + setAttribute( 'aria-describedby', routeName.semanticsObject.element.id, ); @@ -61,7 +61,10 @@ class Dialog extends PrimaryRoleManager { /// Supplies a description for the nearest ancestor [Dialog]. class RouteName extends RoleManager { - RouteName(SemanticsObject semanticsObject) : super(Role.routeName, semanticsObject); + RouteName( + SemanticsObject semanticsObject, + PrimaryRoleManager owner, + ) : super(Role.routeName, semanticsObject, owner); Dialog? _dialog; diff --git a/lib/web_ui/lib/src/engine/semantics/focusable.dart b/lib/web_ui/lib/src/engine/semantics/focusable.dart index 4b3285dbdf399..4caf56f3f3eac 100644 --- a/lib/web_ui/lib/src/engine/semantics/focusable.dart +++ b/lib/web_ui/lib/src/engine/semantics/focusable.dart @@ -28,9 +28,9 @@ import 'semantics.dart'; /// /// * https://developer.mozilla.org/en-US/docs/Web/Accessibility/Keyboard-navigable_JavaScript_widgets class Focusable extends RoleManager { - Focusable(SemanticsObject semanticsObject) + Focusable(SemanticsObject semanticsObject, PrimaryRoleManager owner) : _focusManager = AccessibilityFocusManager(semanticsObject.owner), - super(Role.focusable, semanticsObject); + super(Role.focusable, semanticsObject, owner); final AccessibilityFocusManager _focusManager; @@ -38,7 +38,7 @@ class Focusable extends RoleManager { void update() { if (semanticsObject.isFocusable) { if (!_focusManager.isManaging) { - _focusManager.manage(semanticsObject.id, semanticsObject.element); + _focusManager.manage(semanticsObject.id, owner.element); } _focusManager.changeFocus(semanticsObject.hasFocus && (!semanticsObject.hasEnabledState || semanticsObject.isEnabled)); } else { diff --git a/lib/web_ui/lib/src/engine/semantics/image.dart b/lib/web_ui/lib/src/engine/semantics/image.dart index 0f0eb298b0ad3..efe1d7cdb414b 100644 --- a/lib/web_ui/lib/src/engine/semantics/image.dart +++ b/lib/web_ui/lib/src/engine/semantics/image.dart @@ -49,14 +49,14 @@ class ImageRoleManager extends PrimaryRoleManager { ..height = '${semanticsObject.rect!.height}px'; } _auxiliaryImageElement!.style.fontSize = '6px'; - semanticsObject.element.append(_auxiliaryImageElement!); + append(_auxiliaryImageElement!); } _auxiliaryImageElement!.setAttribute('role', 'img'); _setLabel(_auxiliaryImageElement); } else if (semanticsObject.isVisualOnly) { - semanticsObject.setAriaRole('img'); - _setLabel(semanticsObject.element); + setAriaRole('img'); + _setLabel(element); _cleanUpAuxiliaryElement(); } else { _cleanUpAuxiliaryElement(); @@ -78,7 +78,7 @@ class ImageRoleManager extends PrimaryRoleManager { } void _cleanupElement() { - semanticsObject.element.removeAttribute('aria-label'); + removeAttribute('aria-label'); } @override diff --git a/lib/web_ui/lib/src/engine/semantics/incrementable.dart b/lib/web_ui/lib/src/engine/semantics/incrementable.dart index f1de98d026982..7ad693b628584 100644 --- a/lib/web_ui/lib/src/engine/semantics/incrementable.dart +++ b/lib/web_ui/lib/src/engine/semantics/incrementable.dart @@ -29,7 +29,7 @@ class Incrementable extends PrimaryRoleManager { addRouteName(); addLabelAndValue(); - semanticsObject.element.append(_element); + append(_element); _element.type = 'range'; _element.setAttribute('role', 'slider'); diff --git a/lib/web_ui/lib/src/engine/semantics/label_and_value.dart b/lib/web_ui/lib/src/engine/semantics/label_and_value.dart index 23421e13590d1..3a5f7300734fb 100644 --- a/lib/web_ui/lib/src/engine/semantics/label_and_value.dart +++ b/lib/web_ui/lib/src/engine/semantics/label_and_value.dart @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import '../dom.dart'; import 'semantics.dart'; /// Renders [SemanticsObject.label] and/or [SemanticsObject.value] to the semantics DOM. @@ -26,8 +25,8 @@ import 'semantics.dart'; /// This role manager does not manage images and text fields. See /// [ImageRoleManager] and [TextField]. class LabelAndValue extends RoleManager { - LabelAndValue(SemanticsObject semanticsObject) - : super(Role.labelAndValue, semanticsObject); + LabelAndValue(SemanticsObject semanticsObject, PrimaryRoleManager owner) + : super(Role.labelAndValue, semanticsObject, owner); @override void update() { @@ -62,12 +61,11 @@ class LabelAndValue extends RoleManager { combinedValue.write(semanticsObject.value); } - semanticsObject.element - .setAttribute('aria-label', combinedValue.toString()); + owner.setAttribute('aria-label', combinedValue.toString()); } void _cleanUpDom() { - semanticsObject.element.removeAttribute('aria-label'); + owner.removeAttribute('aria-label'); } @override diff --git a/lib/web_ui/lib/src/engine/semantics/link.dart b/lib/web_ui/lib/src/engine/semantics/link.dart new file mode 100644 index 0000000000000..00dcdfcad54c5 --- /dev/null +++ b/lib/web_ui/lib/src/engine/semantics/link.dart @@ -0,0 +1,21 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import '../dom.dart'; +import '../semantics.dart'; + +/// Provides accessibility for links. +class Link extends PrimaryRoleManager { + Link(SemanticsObject semanticsObject) : super.withBasics(PrimaryRole.link, semanticsObject); + + @override + DomElement createElement() { + final DomElement element = domDocument.createElement('a'); + // TODO(chunhtai): Fill in the real link once the framework sends entire uri. + // https://github.com/flutter/flutter/issues/102535. + element.setAttribute('href', '#'); + element.style.display = 'block'; + return element; + } +} diff --git a/lib/web_ui/lib/src/engine/semantics/live_region.dart b/lib/web_ui/lib/src/engine/semantics/live_region.dart index c922cddd717b7..cea9c997e1d63 100644 --- a/lib/web_ui/lib/src/engine/semantics/live_region.dart +++ b/lib/web_ui/lib/src/engine/semantics/live_region.dart @@ -15,8 +15,8 @@ import 'semantics.dart'; /// label of the element. See [LabelAndValue]. If there is no label provided /// no content will be read. class LiveRegion extends RoleManager { - LiveRegion(SemanticsObject semanticsObject) - : super(Role.liveRegion, semanticsObject); + LiveRegion(SemanticsObject semanticsObject, PrimaryRoleManager owner) + : super(Role.liveRegion, semanticsObject, owner); String? _lastAnnouncement; diff --git a/lib/web_ui/lib/src/engine/semantics/platform_view.dart b/lib/web_ui/lib/src/engine/semantics/platform_view.dart index 80321fc77e03e..7502694390dc3 100644 --- a/lib/web_ui/lib/src/engine/semantics/platform_view.dart +++ b/lib/web_ui/lib/src/engine/semantics/platform_view.dart @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import '../dom.dart'; import '../platform_views/slots.dart'; import 'semantics.dart'; @@ -30,13 +29,13 @@ class PlatformViewRoleManager extends PrimaryRoleManager { if (semanticsObject.isPlatformView) { if (semanticsObject.isPlatformViewIdDirty) { - semanticsObject.element.setAttribute( + setAttribute( 'aria-owns', getPlatformViewDomId(semanticsObject.platformViewId), ); } } else { - semanticsObject.element.removeAttribute('aria-owns'); + removeAttribute('aria-owns'); } } } diff --git a/lib/web_ui/lib/src/engine/semantics/scrollable.dart b/lib/web_ui/lib/src/engine/semantics/scrollable.dart index 82b9308816ab3..61f912304e1c0 100644 --- a/lib/web_ui/lib/src/engine/semantics/scrollable.dart +++ b/lib/web_ui/lib/src/engine/semantics/scrollable.dart @@ -30,7 +30,7 @@ class Scrollable extends PrimaryRoleManager { ..transformOrigin = '0 0 0' // Ignore pointer events since this is a dummy element. ..pointerEvents = 'none'; - semanticsObject.element.append(_scrollOverflowElement); + append(_scrollOverflowElement); } /// Disables browser-driven scrolling in the presence of pointer events. @@ -112,7 +112,7 @@ class Scrollable extends PrimaryRoleManager { // This is effective only in Chrome. Safari does not implement this // CSS property. In Safari the `PointerBinding` uses `preventDefault` // to prevent browser scrolling. - semanticsObject.element.style.touchAction = 'none'; + element.style.touchAction = 'none'; _gestureModeDidChange(); // Memoize the tear-off because Dart does not guarantee that two @@ -126,17 +126,17 @@ class Scrollable extends PrimaryRoleManager { _scrollListener = createDomEventListener((_) { _recomputeScrollPosition(); }); - semanticsObject.element.addEventListener('scroll', _scrollListener); + addEventListener('scroll', _scrollListener); } } /// The value of "scrollTop" or "scrollLeft", depending on the scroll axis. int get _domScrollPosition { if (semanticsObject.isVerticalScrollContainer) { - return semanticsObject.element.scrollTop.toInt(); + return element.scrollTop.toInt(); } else { assert(semanticsObject.isHorizontalScrollContainer); - return semanticsObject.element.scrollLeft.toInt(); + return element.scrollLeft.toInt(); } } @@ -153,7 +153,6 @@ class Scrollable extends PrimaryRoleManager { void _neutralizeDomScrollPosition() { // This value is arbitrary. const int canonicalNeutralScrollPosition = 10; - final DomElement element = semanticsObject.element; final ui.Rect? rect = semanticsObject.rect; if (rect == null) { printWarning('Warning! the rect attribute of semanticsObject is null'); @@ -197,7 +196,6 @@ class Scrollable extends PrimaryRoleManager { } void _gestureModeDidChange() { - final DomElement element = semanticsObject.element; switch (semanticsObject.owner.gestureMode) { case GestureMode.browserGestures: // overflow:scroll will cause the browser report "scroll" events when @@ -227,13 +225,13 @@ class Scrollable extends PrimaryRoleManager { @override void dispose() { super.dispose(); - final DomCSSStyleDeclaration style = semanticsObject.element.style; + final DomCSSStyleDeclaration style = element.style; assert(_gestureModeListener != null); style.removeProperty('overflowY'); style.removeProperty('overflowX'); style.removeProperty('touch-action'); if (_scrollListener != null) { - semanticsObject.element.removeEventListener('scroll', _scrollListener); + removeEventListener('scroll', _scrollListener); } semanticsObject.owner.removeGestureModeListener(_gestureModeListener); _gestureModeListener = null; diff --git a/lib/web_ui/lib/src/engine/semantics/semantics.dart b/lib/web_ui/lib/src/engine/semantics/semantics.dart index 316c867a5fef0..8a6ec7c0d35eb 100644 --- a/lib/web_ui/lib/src/engine/semantics/semantics.dart +++ b/lib/web_ui/lib/src/engine/semantics/semantics.dart @@ -24,6 +24,7 @@ import 'focusable.dart'; import 'image.dart'; import 'incrementable.dart'; import 'label_and_value.dart'; +import 'link.dart'; import 'live_region.dart'; import 'platform_view.dart'; import 'scrollable.dart'; @@ -382,6 +383,9 @@ enum PrimaryRole { /// /// Provides a label or a value. generic, + + /// Contains a link. + link, } /// Identifies one of the secondary [RoleManager]s of a [PrimaryRoleManager]. @@ -437,6 +441,8 @@ abstract class PrimaryRoleManager { /// management intereferes with the widget's functionality. PrimaryRoleManager.blank(this.role, this.semanticsObject); + late final DomElement element = _initElement(createElement(), semanticsObject); + /// The primary role identifier. final PrimaryRole role; @@ -453,29 +459,82 @@ abstract class PrimaryRoleManager { @visibleForTesting List get debugSecondaryRoles => _secondaryRoleManagers?.map((RoleManager manager) => manager.role).toList() ?? const []; + @protected + DomElement createElement() => domDocument.createElement('flt-semantics'); + + static DomElement _initElement(DomElement element, SemanticsObject semanticsObject) { + // DOM nodes created for semantics objects are positioned absolutely using + // transforms. + element.style.position = 'absolute'; + element.setAttribute('id', 'flt-semantic-node-${semanticsObject.id}'); + + // The root node has some properties that other nodes do not. + if (semanticsObject.id == 0 && !configuration.debugShowSemanticsNodes) { + // Make all semantics transparent. Use `filter` instead of `opacity` + // attribute because `filter` is stronger. `opacity` does not apply to + // some elements, particularly on iOS, such as the slider thumb and track. + // + // Use transparency instead of "visibility:hidden" or "display:none" + // so that a screen reader does not ignore these elements. + element.style.filter = 'opacity(0%)'; + + // Make text explicitly transparent to signal to the browser that no + // rasterization needs to be done. + element.style.color = 'rgba(0,0,0,0)'; + } + + // Make semantic elements visible for debugging by outlining them using a + // green border. Do not use `border` attribute because it affects layout + // (`outline` does not). + if (configuration.debugShowSemanticsNodes) { + element.style.outline = '1px solid green'; + } + return element; + } + + /// Sets the `role` ARIA attribute. + void setAriaRole(String ariaRoleName) { + setAttribute('role', ariaRoleName); + } + + /// Sets the `role` ARIA attribute. + void setAttribute(String name, Object value) { + element.setAttribute(name, value); + } + + void append(DomElement child) { + element.append(child); + } + + void removeAttribute(String name) => element.removeAttribute(name); + + void addEventListener(String type, DomEventListener? listener, [bool? useCapture]) => element.addEventListener(type, listener, useCapture); + + void removeEventListener(String type, DomEventListener? listener, [bool? useCapture]) => element.removeEventListener(type, listener, useCapture); + /// Adds generic focus management features. void addFocusManagement() { - addSecondaryRole(Focusable(semanticsObject)); + addSecondaryRole(Focusable(semanticsObject, this)); } /// Adds generic live region features. void addLiveRegion() { - addSecondaryRole(LiveRegion(semanticsObject)); + addSecondaryRole(LiveRegion(semanticsObject, this)); } /// Adds generic route name features. void addRouteName() { - addSecondaryRole(RouteName(semanticsObject)); + addSecondaryRole(RouteName(semanticsObject, this)); } /// Adds generic label features. void addLabelAndValue() { - addSecondaryRole(LabelAndValue(semanticsObject)); + addSecondaryRole(LabelAndValue(semanticsObject, this)); } /// Adds generic functionality for handling taps and clicks. void addTappable() { - addSecondaryRole(Tappable(semanticsObject)); + addSecondaryRole(Tappable(semanticsObject, this)); } /// Adds a secondary role to this primary role manager. @@ -525,7 +584,7 @@ abstract class PrimaryRoleManager { /// gesture mode changes. @mustCallSuper void dispose() { - semanticsObject.element.removeAttribute('role'); + removeAttribute('role'); _isDisposed = true; } } @@ -566,11 +625,11 @@ final class GenericRole extends PrimaryRoleManager { // Flutter renders into canvas, so the focus ring looks wrong. // - Read out the same label multiple times. if (semanticsObject.hasChildren) { - semanticsObject.setAriaRole('group'); + setAriaRole('group'); } else if (semanticsObject.hasFlag(ui.SemanticsFlag.isHeader)) { - semanticsObject.setAriaRole('heading'); + setAriaRole('heading'); } else { - semanticsObject.setAriaRole('text'); + setAriaRole('text'); } } } @@ -588,7 +647,7 @@ abstract class RoleManager { /// Initializes a secondary role for [semanticsObject]. /// /// A single role object manages exactly one [SemanticsObject]. - RoleManager(this.role, this.semanticsObject); + RoleManager(this.role, this.semanticsObject, this.owner); /// Role identifier. final Role role; @@ -596,6 +655,8 @@ abstract class RoleManager { /// The semantics object managed by this role. final SemanticsObject semanticsObject; + final PrimaryRoleManager owner; + /// Called immediately after the [semanticsObject] updates some of its fields. /// /// A concrete implementation of this method would typically use some of the @@ -627,34 +688,7 @@ abstract class RoleManager { /// information to the browser. class SemanticsObject { /// Creates a semantics tree node with the given [id] and [owner]. - SemanticsObject(this.id, this.owner) { - // DOM nodes created for semantics objects are positioned absolutely using - // transforms. - element.style.position = 'absolute'; - element.setAttribute('id', 'flt-semantic-node-$id'); - - // The root node has some properties that other nodes do not. - if (id == 0 && !configuration.debugShowSemanticsNodes) { - // Make all semantics transparent. Use `filter` instead of `opacity` - // attribute because `filter` is stronger. `opacity` does not apply to - // some elements, particularly on iOS, such as the slider thumb and track. - // - // Use transparency instead of "visibility:hidden" or "display:none" - // so that a screen reader does not ignore these elements. - element.style.filter = 'opacity(0%)'; - - // Make text explicitly transparent to signal to the browser that no - // rasterization needs to be done. - element.style.color = 'rgba(0,0,0,0)'; - } - - // Make semantic elements visible for debugging by outlining them using a - // green border. Do not use `border` attribute because it affects layout - // (`outline` does not). - if (configuration.debugShowSemanticsNodes) { - element.style.outline = '1px solid green'; - } - } + SemanticsObject(this.id, this.owner); /// See [ui.SemanticsUpdateBuilder.updateNode]. int get flags => _flags; @@ -981,9 +1015,6 @@ class SemanticsObject { /// Controls the semantics tree that this node participates in. final EngineSemanticsOwner owner; - /// The DOM element used to convey semantics information to the browser. - final DomElement element = domDocument.createElement('flt-semantics'); - /// Bitfield showing which fields have been updated but have not yet been /// applied to the DOM. /// @@ -996,6 +1027,9 @@ class SemanticsObject { /// Whether the field corresponding to the [fieldIndex] has been updated. bool _isDirty(int fieldIndex) => (_dirtyFields & fieldIndex) != 0; + /// The dom element of this semantics object. + DomElement get element => primaryRole!.element; + /// Returns the HTML element that contains the HTML elements of direct /// children of this object. /// @@ -1079,6 +1113,9 @@ class SemanticsObject { /// Whether this object represents an editable text field. bool get isTextField => hasFlag(ui.SemanticsFlag.isTextField); + /// Whether this object represents an editable text field. + bool get isLink => hasFlag(ui.SemanticsFlag.isLink); + /// Whether this object needs screen readers attention right away. bool get isLiveRegion => hasFlag(ui.SemanticsFlag.isLiveRegion) && @@ -1456,11 +1493,6 @@ class SemanticsObject { _currentChildrenInRenderOrder = childrenInRenderOrder; } - /// Sets the `role` ARIA attribute. - void setAriaRole(String ariaRoleName) { - element.setAttribute('role', ariaRoleName); - } - /// The primary role of this node. /// /// The primary role is assigned by [updateSelf] based on the combination of @@ -1485,6 +1517,8 @@ class SemanticsObject { return PrimaryRole.scrollable; } else if (scopesRoute) { return PrimaryRole.dialog; + } else if (isLink) { + return PrimaryRole.link; } else { return PrimaryRole.generic; } @@ -1500,6 +1534,7 @@ class SemanticsObject { PrimaryRole.dialog => Dialog(this), PrimaryRole.image => ImageRoleManager(this), PrimaryRole.platformView => PlatformViewRoleManager(this), + PrimaryRole.link => Link(this), PrimaryRole.generic => GenericRole(this), }; } @@ -1509,6 +1544,7 @@ class SemanticsObject { void _updateRoles() { PrimaryRoleManager? currentPrimaryRole = primaryRole; final PrimaryRole roleId = _getPrimaryRoleIdentifier(); + final DomElement? previousElement = primaryRole?.element; if (currentPrimaryRole != null) { if (currentPrimaryRole.role == roleId) { @@ -1535,6 +1571,19 @@ class SemanticsObject { primaryRole = currentPrimaryRole; currentPrimaryRole.update(); } + + // Reparent element. + if (previousElement != element) { + final DomElement? container = _childContainerElement; + if (container != null) { + element.append(container); + } + final DomElement? parent = previousElement?.parent; + if (parent != null) { + parent.insertBefore(element, previousElement); + previousElement!.remove(); + } + } } /// Whether the object represents an UI element with "increase" or "decrease" diff --git a/lib/web_ui/lib/src/engine/semantics/tappable.dart b/lib/web_ui/lib/src/engine/semantics/tappable.dart index 259a9c7d55669..cba0fafeb7650 100644 --- a/lib/web_ui/lib/src/engine/semantics/tappable.dart +++ b/lib/web_ui/lib/src/engine/semantics/tappable.dart @@ -11,7 +11,7 @@ import 'semantics.dart'; /// Sets the "button" ARIA role. class Button extends PrimaryRoleManager { Button(SemanticsObject semanticsObject) : super.withBasics(PrimaryRole.button, semanticsObject) { - semanticsObject.setAriaRole('button'); + setAriaRole('button'); } @override @@ -19,9 +19,9 @@ class Button extends PrimaryRoleManager { super.update(); if (semanticsObject.enabledState() == EnabledState.disabled) { - semanticsObject.element.setAttribute('aria-disabled', 'true'); + setAttribute('aria-disabled', 'true'); } else { - semanticsObject.element.removeAttribute('aria-disabled'); + removeAttribute('aria-disabled'); } } } @@ -33,26 +33,28 @@ class Button extends PrimaryRoleManager { /// the browser may not send us pointer events. In that mode we forward HTML /// click as [ui.SemanticsAction.tap]. class Tappable extends RoleManager { - Tappable(SemanticsObject semanticsObject) - : super(Role.tappable, semanticsObject); + Tappable(SemanticsObject semanticsObject, PrimaryRoleManager owner) + : super(Role.tappable, semanticsObject, owner); DomEventListener? _clickListener; @override void update() { - if (!semanticsObject.isTappable || semanticsObject.enabledState() == EnabledState.disabled) { - _stopListening(); - } else { - if (_clickListener == null) { - _clickListener = createDomEventListener((DomEvent event) { - if (semanticsObject.owner.gestureMode != GestureMode.browserGestures) { - return; - } - EnginePlatformDispatcher.instance.invokeOnSemanticsAction( - semanticsObject.id, ui.SemanticsAction.tap, null); - }); - semanticsObject.element.addEventListener('click', _clickListener); - } + if (_clickListener == null) { + _clickListener = createDomEventListener((DomEvent event) { + // Stop dom from reacting since it will be handled entirely on the + // flutter side. + event.preventDefault(); + if (!semanticsObject.isTappable || semanticsObject.enabledState() == EnabledState.disabled) { + return; + } + if (semanticsObject.owner.gestureMode != GestureMode.browserGestures) { + return; + } + EnginePlatformDispatcher.instance.invokeOnSemanticsAction( + semanticsObject.id, ui.SemanticsAction.tap, null); + }); + owner.addEventListener('click', _clickListener); } } @@ -61,7 +63,7 @@ class Tappable extends RoleManager { return; } - semanticsObject.element.removeEventListener('click', _clickListener); + owner.removeEventListener('click', _clickListener); _clickListener = null; } diff --git a/lib/web_ui/lib/src/engine/semantics/text_field.dart b/lib/web_ui/lib/src/engine/semantics/text_field.dart index 9d6a88a9ccb46..243e09cab6f8f 100644 --- a/lib/web_ui/lib/src/engine/semantics/text_field.dart +++ b/lib/web_ui/lib/src/engine/semantics/text_field.dart @@ -275,7 +275,7 @@ class TextField extends PrimaryRoleManager { ..left = '0' ..width = '${semanticsObject.rect!.width}px' ..height = '${semanticsObject.rect!.height}px'; - semanticsObject.element.append(activeEditableElement); + append(activeEditableElement); } void _setupDomElement() { @@ -336,22 +336,21 @@ class TextField extends PrimaryRoleManager { return; } - semanticsObject.element - ..setAttribute('role', 'textbox') - ..setAttribute('contenteditable', 'false') - ..setAttribute('tabindex', '0'); + setAttribute('role', 'textbox'); + setAttribute('contenteditable', 'false'); + setAttribute('tabindex', '0'); num? lastPointerDownOffsetX; num? lastPointerDownOffsetY; - semanticsObject.element.addEventListener('pointerdown', + addEventListener('pointerdown', createDomEventListener((DomEvent event) { final DomPointerEvent pointerEvent = event as DomPointerEvent; lastPointerDownOffsetX = pointerEvent.clientX; lastPointerDownOffsetY = pointerEvent.clientY; }), true); - semanticsObject.element.addEventListener('pointerup', + addEventListener('pointerup', createDomEventListener((DomEvent event) { final DomPointerEvent pointerEvent = event as DomPointerEvent; @@ -399,17 +398,17 @@ class TextField extends PrimaryRoleManager { // represent the same text field. It will confuse VoiceOver, so `role` needs to // be assigned and removed, based on whether or not editableElement exists. activeEditableElement.focus(); - semanticsObject.element.removeAttribute('role'); + removeAttribute('role'); activeEditableElement.addEventListener('blur', createDomEventListener((DomEvent event) { - semanticsObject.element.setAttribute('role', 'textbox'); + setAttribute('role', 'textbox'); activeEditableElement.remove(); SemanticsTextEditingStrategy._instance?.deactivate(this); // Focus on semantics element before removing the editable element, so that // the user can continue navigating the page with the assistive technology. - semanticsObject.element.focus(); + element.focus(); editableElement = null; })); } @@ -447,7 +446,7 @@ class TextField extends PrimaryRoleManager { } } - final DomElement element = editableElement ?? semanticsObject.element; + final DomElement element = editableElement ?? this.element; if (semanticsObject.hasLabel) { element.setAttribute( 'aria-label', diff --git a/lib/web_ui/test/engine/semantics/semantics_test.dart b/lib/web_ui/test/engine/semantics/semantics_test.dart index 3d4876b0432ac..88cc01db8ce40 100644 --- a/lib/web_ui/test/engine/semantics/semantics_test.dart +++ b/lib/web_ui/test/engine/semantics/semantics_test.dart @@ -92,6 +92,9 @@ void runSemanticsTests() { group('focusable', () { _testFocusable(); }); + group('link', () { + _testLink(); + }); } void _testRoleManagerLifecycle() { @@ -337,7 +340,11 @@ void _testEngineSemanticsOwner() { expect(placeholder.isConnected, isFalse); }); - void renderSemantics({String? label, String? tooltip}) { + void renderSemantics({String? label, String? tooltip, Set flags = const {}}) { + int flagValues = 0; + for (final ui.SemanticsFlag flag in flags) { + flagValues = flagValues | flag.index; + } final ui.SemanticsUpdateBuilder builder = ui.SemanticsUpdateBuilder(); updateNode( builder, @@ -351,6 +358,7 @@ void _testEngineSemanticsOwner() { id: 1, label: label ?? '', tooltip: tooltip ?? '', + flags: flagValues, transform: Matrix4.identity().toFloat64(), rect: const ui.Rect.fromLTRB(0, 0, 20, 20), ); @@ -404,6 +412,45 @@ void _testEngineSemanticsOwner() { semantics().semanticsEnabled = false; }); + test('can switch role', () async { + semantics().semanticsEnabled = true; + + // Create + renderSemantics(label: 'Hello'); + + Map tree = semantics().debugSemanticsTree!; + expect(tree.length, 2); + expect(tree[1]!.element.tagName.toLowerCase(), 'flt-semantics'); + expect(tree[1]!.id, 1); + expect(tree[1]!.label, 'Hello'); + final DomElement existingParent = tree[1]!.element.parent!; + + expectSemanticsTree(''' + + + + +'''); + + // Update + renderSemantics(label: 'Hello', flags: { ui.SemanticsFlag.isLink }); + + tree = semantics().debugSemanticsTree!; + expect(tree.length, 2); + expect(tree[1]!.id, 1); + expect(tree[1]!.label, 'Hello'); + expect(tree[1]!.element.tagName.toLowerCase(), 'a'); + expectSemanticsTree(''' + + + + +'''); + expect(existingParent, tree[1]!.element.parent); + + semantics().semanticsEnabled = false; + }); + test('tooltip is part of label', () async { semantics().semanticsEnabled = true; @@ -2892,6 +2939,28 @@ void _testFocusable() { }); } +void _testLink() { + test('nodes with link: true creates anchor tag', () { + semantics() + ..debugOverrideTimestampFunction(() => _testTime) + ..semanticsEnabled = true; + + SemanticsObject pumpSemantics() { + final SemanticsTester tester = SemanticsTester(semantics()); + tester.updateNode( + id: 0, + isLink: true, + rect: const ui.Rect.fromLTRB(0, 0, 100, 50), + ); + tester.apply(); + return tester.getSemanticsObject(0); + } + + final SemanticsObject object = pumpSemantics(); + expect(object.element.tagName.toLowerCase(), 'a'); + }); +} + /// A facade in front of [ui.SemanticsUpdateBuilder.updateNode] that /// supplies default values for semantics attributes. void updateNode( From 8aaad7527fb9a2f8581942510baf19522b128b94 Mon Sep 17 00:00:00 2001 From: Mouad Debbar Date: Fri, 20 Oct 2023 15:51:22 -0400 Subject: [PATCH 813/859] [web] Remove workaround for safely removing slots on Safari (#47169) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now that we want to support multi-view, we need to either: 1. Remove the workaround to safely remove slot elements in Safari, or 2. Fix it to support multi-view (can't use `flutterViewEmbedder.glassPaneShadow` anymore). According to [this comment](https://github.com/flutter/flutter/issues/85816#issuecomment-1122638147), this is the right time to remove the workaround 😄 I tested on Desktop Safari and iOS Safari and wasn't able to reproduce the crash reported in https://github.com/flutter/flutter/issues/84832. Fixes https://github.com/flutter/flutter/issues/85816 Part of https://github.com/flutter/flutter/issues/134443 --- .../platform_views/content_manager.dart | 33 ++----------------- .../platform_views/content_manager_test.dart | 3 +- 2 files changed, 4 insertions(+), 32 deletions(-) diff --git a/lib/web_ui/lib/src/engine/platform_views/content_manager.dart b/lib/web_ui/lib/src/engine/platform_views/content_manager.dart index 0b0e35270ff66..222e349e0910d 100644 --- a/lib/web_ui/lib/src/engine/platform_views/content_manager.dart +++ b/lib/web_ui/lib/src/engine/platform_views/content_manager.dart @@ -4,9 +4,7 @@ import 'package:ui/ui_web/src/ui_web.dart' as ui_web; -import '../browser_detection.dart'; import '../dom.dart'; -import '../embedder.dart'; import '../util.dart'; import 'slots.dart'; @@ -161,38 +159,11 @@ class PlatformViewManager { /// Removes a PlatformView by its `viewId` from the manager, and from the DOM. /// - /// Once a view has been cleared, calls [knowsViewId] will fail, as if it had + /// Once a view has been cleared, calls to [knowsViewId] will fail, as if it had /// never been rendered before. void clearPlatformView(int viewId) { // Remove from our cache, and then from the DOM... - final DomElement? element = _contents.remove(viewId); - _safelyRemoveSlottedElement(element); - } - - // We need to remove slotted elements like this because of a Safari bug that - // gets triggered when a slotted element is removed in a JS event different - // than its slot (after the slot is removed). - // - // TODO(web): Cleanup https://github.com/flutter/flutter/issues/85816 - void _safelyRemoveSlottedElement(DomElement? element) { - if (element == null) { - return; - } - if (browserEngine != BrowserEngine.webkit) { - element.remove(); - return; - } - final String tombstoneName = "tombstone-${element.getAttribute('slot')}"; - // Create and inject a new slot in the shadow root - final DomElement slot = domDocument.createElement('slot') - ..style.display = 'none' - ..setAttribute('name', tombstoneName); - flutterViewEmbedder.glassPaneShadow.append(slot); - // Link the element to the new slot - element.setAttribute('slot', tombstoneName); - // Delete both the element, and the new slot - element.remove(); - slot.remove(); + _contents.remove(viewId)?.remove(); } /// Attempt to ensure that the contents of the user-supplied DOM element will diff --git a/lib/web_ui/test/engine/platform_views/content_manager_test.dart b/lib/web_ui/test/engine/platform_views/content_manager_test.dart index 6de84dbb3ab99..445094c5bccc1 100644 --- a/lib/web_ui/test/engine/platform_views/content_manager_test.dart +++ b/lib/web_ui/test/engine/platform_views/content_manager_test.dart @@ -51,13 +51,14 @@ void testMain() { test('forgets viewIds after clearing them', () { contentManager.registerFactory(viewType, (int id) => createDomHTMLDivElement()); - contentManager.renderContent(viewType, viewId, null); + final DomElement view = contentManager.renderContent(viewType, viewId, null); expect(contentManager.knowsViewId(viewId), isTrue); contentManager.clearPlatformView(viewId); expect(contentManager.knowsViewId(viewId), isFalse); + expect(view.parentNode, isNull); }); }); From 976d5168b33992cc0577400110c01ff862ee94e6 Mon Sep 17 00:00:00 2001 From: John McCutchan Date: Fri, 20 Oct 2023 13:11:59 -0700 Subject: [PATCH 814/859] Lower the severity of a log message (#47172) This log message can print on the first frame of a platform view and is not an error. --- shell/platform/android/image_external_texture.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/platform/android/image_external_texture.cc b/shell/platform/android/image_external_texture.cc index c8a7129e22fc1..439fb95e13d57 100644 --- a/shell/platform/android/image_external_texture.cc +++ b/shell/platform/android/image_external_texture.cc @@ -42,7 +42,7 @@ void ImageExternalTexture::Paint(PaintContext& context, flutter::DlCanvas::SrcRectConstraint::kStrict // enforce edges ); } else { - FML_LOG(ERROR) << "No DlImage available for ImageExternalTexture to paint."; + FML_LOG(INFO) << "No DlImage available for ImageExternalTexture to paint."; } } From 86e7e42a6aecdaf175c86b91a84a2ebf40af4b5a Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 20 Oct 2023 16:22:28 -0400 Subject: [PATCH 815/859] Roll Skia from 9ffd5ef9a9ed to ca69b04f7dd2 (1 revision) (#47171) https://skia.googlesource.com/skia.git/+log/9ffd5ef9a9ed..ca69b04f7dd2 2023-10-20 johnstiles@google.com Fix fuzzer-discovered assertion with WGSL interface-block arrays. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index a2b0c98eb78ac..3880e21e182b3 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '9ffd5ef9a9ed8c7eea136be4764778089f04d9df', + 'skia_revision': 'ca69b04f7dd2350167ebebdd72b5459538e89e7e', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index c4de22aad4976..ff84010f000b0 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: b56f7251840fccf9795705be0801d720 +Signature: 32cbc0a3bf68ee78d0a90df13dd96ab0 ==================================================================================================== LIBRARY: etc1 From 01b5564fea9e89bf79f547735fdee17dd5e2d5ae Mon Sep 17 00:00:00 2001 From: Tong Mu Date: Fri, 20 Oct 2023 13:38:23 -0700 Subject: [PATCH 816/859] Multiview pipeline (#44473) This PR makes `Animator` able to handle multiple views, and updates unit tests accordingly. Before: image After: image Now `Animator::Render` must be called during `Animator::BeginFrame`, which is split into `BeginFrame` and `EndFrame`. This requirement is made possible by https://github.com/flutter/engine/pull/45555. The reason to split is to allow `ShellTest::PumpOneFrame` to insert a render from C++ code. `ShellTest::PumpOneFrame` is also refactored to allow pumping a frame without any views. A few unit tests are tweaked to resolve racing condition. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- flow/frame_timings.cc | 24 +- flow/frame_timings.h | 3 + .../filters/gaussian_blur_filter_contents.cc | 4 +- lib/ui/dart_ui.cc | 2 +- lib/ui/painting/image_dispose_unittests.cc | 10 +- lib/ui/window.dart | 6 +- lib/ui/window/platform_configuration.cc | 5 +- lib/ui/window/platform_configuration.h | 4 +- .../platform_configuration_unittests.cc | 158 +++++++++++++ runtime/dart_vm.cc | 28 +-- runtime/runtime_controller.cc | 7 +- runtime/runtime_controller.h | 2 +- runtime/runtime_delegate.h | 3 +- shell/common/animator.cc | 76 +++--- shell/common/animator.h | 17 +- shell/common/animator_unittests.cc | 37 +-- shell/common/engine.cc | 5 +- shell/common/engine.h | 3 +- shell/common/engine_unittests.cc | 217 +++++++++++++++++- shell/common/fixtures/shell_test.dart | 21 ++ shell/common/input_events_unittests.cc | 10 +- shell/common/rasterizer.cc | 1 + shell/common/shell_test.cc | 103 ++++++--- shell/common/shell_test.h | 50 ++-- shell/common/shell_unittests.cc | 78 ++++--- .../flutter/vulkan_surface_producer.cc | 23 +- shell/testing/tester_main.cc | 17 +- testing/dart/platform_view_test.dart | 10 +- 28 files changed, 731 insertions(+), 193 deletions(-) diff --git a/flow/frame_timings.cc b/flow/frame_timings.cc index 339374d77b837..2943e850e17d0 100644 --- a/flow/frame_timings.cc +++ b/flow/frame_timings.cc @@ -254,8 +254,30 @@ const char* FrameTimingsRecorder::GetFrameNumberTraceArg() const { return frame_number_trace_arg_val_.c_str(); } +static const char* StateToString(FrameTimingsRecorder::State state) { +#ifndef NDEBUG + switch (state) { + case FrameTimingsRecorder::State::kUninitialized: + return "kUninitialized"; + case FrameTimingsRecorder::State::kVsync: + return "kVsync"; + case FrameTimingsRecorder::State::kBuildStart: + return "kBuildStart"; + case FrameTimingsRecorder::State::kBuildEnd: + return "kBuildEnd"; + case FrameTimingsRecorder::State::kRasterStart: + return "kRasterStart"; + case FrameTimingsRecorder::State::kRasterEnd: + return "kRasterEnd"; + }; + FML_UNREACHABLE(); +#endif + return ""; +} + void FrameTimingsRecorder::AssertInState(State state) const { - FML_DCHECK(state_ == state); + FML_DCHECK(state_ == state) << "Expected state " << StateToString(state) + << ", actual state " << StateToString(state_); } } // namespace flutter diff --git a/flow/frame_timings.h b/flow/frame_timings.h index c81bcc3362298..ac5a7e470215e 100644 --- a/flow/frame_timings.h +++ b/flow/frame_timings.h @@ -31,6 +31,7 @@ class FrameTimingsRecorder { public: /// Various states that the recorder can be in. When created the recorder is /// in an unitialized state and transtions in sequential order of the states. + // After adding an item to this enum, modify StateToString accordingly. enum class State : uint32_t { kUninitialized, kVsync, @@ -121,6 +122,8 @@ class FrameTimingsRecorder { /// /// Instead of adding a `GetState` method and asserting on the result, this /// method prevents other logic from relying on the state. + /// + /// In opt builds, this call is a no-op. void AssertInState(State state) const; private: diff --git a/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc b/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc index 72f56f443b79e..bd954d821046a 100644 --- a/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc +++ b/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc @@ -26,8 +26,8 @@ namespace impeller { DirectionalGaussianBlurFilterContents::DirectionalGaussianBlurFilterContents() = default; -DirectionalGaussianBlurFilterContents:: - ~DirectionalGaussianBlurFilterContents() = default; +DirectionalGaussianBlurFilterContents::~ +DirectionalGaussianBlurFilterContents() = default; void DirectionalGaussianBlurFilterContents::SetSigma(Sigma sigma) { blur_sigma_ = sigma; diff --git a/lib/ui/dart_ui.cc b/lib/ui/dart_ui.cc index 976b373d29d08..310de114e377a 100644 --- a/lib/ui/dart_ui.cc +++ b/lib/ui/dart_ui.cc @@ -98,7 +98,7 @@ typedef CanvasPath Path; V(NativeStringAttribute::initSpellOutStringAttribute, 3) \ V(PlatformConfigurationNativeApi::DefaultRouteName, 0) \ V(PlatformConfigurationNativeApi::ScheduleFrame, 0) \ - V(PlatformConfigurationNativeApi::Render, 1) \ + V(PlatformConfigurationNativeApi::Render, 2) \ V(PlatformConfigurationNativeApi::UpdateSemantics, 1) \ V(PlatformConfigurationNativeApi::SetNeedsReportTimings, 1) \ V(PlatformConfigurationNativeApi::SetIsolateDebugName, 1) \ diff --git a/lib/ui/painting/image_dispose_unittests.cc b/lib/ui/painting/image_dispose_unittests.cc index 0f8bb6d027062..93600ca83c93d 100644 --- a/lib/ui/painting/image_dispose_unittests.cc +++ b/lib/ui/painting/image_dispose_unittests.cc @@ -5,6 +5,7 @@ #define FML_USED_ON_EMBEDDER #include "flutter/common/task_runners.h" +#include "flutter/fml/synchronization/count_down_latch.h" #include "flutter/fml/synchronization/waitable_event.h" #include "flutter/lib/ui/painting/canvas.h" #include "flutter/lib/ui/painting/image.h" @@ -57,6 +58,10 @@ TEST_F(ImageDisposeTest, ImageReleasedAfterFrameAndDisposePictureAndLayer) { }; Settings settings = CreateSettingsForFixture(); + fml::CountDownLatch frame_latch{2}; + settings.frame_rasterized_callback = [&frame_latch](const FrameTiming& t) { + frame_latch.CountDown(); + }; auto task_runner = CreateNewThread(); TaskRunners task_runners("test", // label GetCurrentTaskRunner(), // platform @@ -83,12 +88,15 @@ TEST_F(ImageDisposeTest, ImageReleasedAfterFrameAndDisposePictureAndLayer) { shell->RunEngine(std::move(configuration), [&](auto result) { ASSERT_EQ(result, Engine::RunStatus::Success); }); - message_latch_.Wait(); ASSERT_TRUE(current_display_list_); ASSERT_TRUE(current_image_); + // Wait for 2 frames to be rasterized. The 2nd frame releases resources of the + // 1st frame. + frame_latch.Wait(); + // Force a drain the SkiaUnrefQueue. The engine does this normally as frames // pump, but we force it here to make the test more deterministic. message_latch_.Reset(); diff --git a/lib/ui/window.dart b/lib/ui/window.dart index be761e548bb12..eb0378e24dd7c 100644 --- a/lib/ui/window.dart +++ b/lib/ui/window.dart @@ -362,12 +362,12 @@ class FlutterView { return true; }()); if (validRender) { - _render(scene as _NativeScene); + _render(viewId, scene as _NativeScene); } } - @Native)>(symbol: 'PlatformConfigurationNativeApi::Render') - external static void _render(_NativeScene scene); + @Native)>(symbol: 'PlatformConfigurationNativeApi::Render') + external static void _render(int viewId, _NativeScene scene); /// Change the retained semantics data about this [FlutterView]. /// diff --git a/lib/ui/window/platform_configuration.cc b/lib/ui/window/platform_configuration.cc index d19c80a7a8028..082756d667976 100644 --- a/lib/ui/window/platform_configuration.cc +++ b/lib/ui/window/platform_configuration.cc @@ -449,9 +449,10 @@ void PlatformConfiguration::CompletePlatformMessageResponse( response->Complete(std::make_unique(std::move(data))); } -void PlatformConfigurationNativeApi::Render(Scene* scene) { +void PlatformConfigurationNativeApi::Render(int64_t view_id, Scene* scene) { UIDartState::ThrowIfUIOperationsProhibited(); - UIDartState::Current()->platform_configuration()->client()->Render(scene); + UIDartState::Current()->platform_configuration()->client()->Render(view_id, + scene); } void PlatformConfigurationNativeApi::SetNeedsReportTimings(bool value) { diff --git a/lib/ui/window/platform_configuration.h b/lib/ui/window/platform_configuration.h index 7965ba10a7b91..9c762b460c05c 100644 --- a/lib/ui/window/platform_configuration.h +++ b/lib/ui/window/platform_configuration.h @@ -69,7 +69,7 @@ class PlatformConfigurationClient { /// @brief Updates the client's rendering on the GPU with the newly /// provided Scene. /// - virtual void Render(Scene* scene) = 0; + virtual void Render(int64_t view_id, Scene* scene) = 0; //-------------------------------------------------------------------------- /// @brief Receives an updated semantics tree from the Framework. @@ -557,7 +557,7 @@ class PlatformConfigurationNativeApi { static void ScheduleFrame(); - static void Render(Scene* scene); + static void Render(int64_t view_id, Scene* scene); static void UpdateSemantics(SemanticsUpdate* update); diff --git a/lib/ui/window/platform_configuration_unittests.cc b/lib/ui/window/platform_configuration_unittests.cc index 7410caeb66d6c..916f47c7026e8 100644 --- a/lib/ui/window/platform_configuration_unittests.cc +++ b/lib/ui/window/platform_configuration_unittests.cc @@ -15,8 +15,166 @@ #include "flutter/shell/common/shell_test.h" #include "flutter/shell/common/thread_host.h" #include "flutter/testing/testing.h" +#include "gmock/gmock.h" namespace flutter { + +namespace { + +static constexpr int64_t kImplicitViewId = 0; + +static void PostSync(const fml::RefPtr& task_runner, + const fml::closure& task) { + fml::AutoResetWaitableEvent latch; + fml::TaskRunner::RunNowOrPostTask(task_runner, [&latch, &task] { + task(); + latch.Signal(); + }); + latch.Wait(); +} + +class MockRuntimeDelegate : public RuntimeDelegate { + public: + MOCK_METHOD(std::string, DefaultRouteName, (), (override)); + MOCK_METHOD(void, ScheduleFrame, (bool), (override)); + MOCK_METHOD(void, + Render, + (int64_t, std::unique_ptr, float), + (override)); + MOCK_METHOD(void, + UpdateSemantics, + (SemanticsNodeUpdates, CustomAccessibilityActionUpdates), + (override)); + MOCK_METHOD(void, + HandlePlatformMessage, + (std::unique_ptr), + (override)); + MOCK_METHOD(FontCollection&, GetFontCollection, (), (override)); + MOCK_METHOD(std::shared_ptr, GetAssetManager, (), (override)); + MOCK_METHOD(void, OnRootIsolateCreated, (), (override)); + MOCK_METHOD(void, + UpdateIsolateDescription, + (const std::string, int64_t), + (override)); + MOCK_METHOD(void, SetNeedsReportTimings, (bool), (override)); + MOCK_METHOD(std::unique_ptr>, + ComputePlatformResolvedLocale, + (const std::vector&), + (override)); + MOCK_METHOD(void, RequestDartDeferredLibrary, (intptr_t), (override)); + MOCK_METHOD(std::weak_ptr, + GetPlatformMessageHandler, + (), + (const, override)); + MOCK_METHOD(void, SendChannelUpdate, (std::string, bool), (override)); + MOCK_METHOD(double, + GetScaledFontSize, + (double font_size, int configuration_id), + (const, override)); +}; + +class MockPlatformMessageHandler : public PlatformMessageHandler { + public: + MOCK_METHOD(void, + HandlePlatformMessage, + (std::unique_ptr message), + (override)); + MOCK_METHOD(bool, + DoesHandlePlatformMessageOnPlatformThread, + (), + (const, override)); + MOCK_METHOD(void, + InvokePlatformMessageResponseCallback, + (int response_id, std::unique_ptr mapping), + (override)); + MOCK_METHOD(void, + InvokePlatformMessageEmptyResponseCallback, + (int response_id), + (override)); +}; + +// A class that can launch a RuntimeController with the specified +// RuntimeDelegate. +// +// To use this class, contruct this class with Create, call LaunchRootIsolate, +// and use the controller with ControllerTaskSync(). +class RuntimeControllerContext { + public: + using ControllerCallback = std::function; + + [[nodiscard]] static std::unique_ptr Create( + Settings settings, // + const TaskRunners& task_runners, // + RuntimeDelegate& client) { + auto [vm, isolate_snapshot] = Shell::InferVmInitDataFromSettings(settings); + FML_CHECK(vm) << "Must be able to initialize the VM."; + // Construct the class with `new` because `make_unique` has no access to the + // private constructor. + RuntimeControllerContext* raw_pointer = new RuntimeControllerContext( + settings, task_runners, client, std::move(vm), isolate_snapshot); + return std::unique_ptr(raw_pointer); + } + + ~RuntimeControllerContext() { + PostSync(task_runners_.GetUITaskRunner(), + [&]() { runtime_controller_.reset(); }); + } + + // Launch the root isolate. The post_launch callback will be executed in the + // same UI task, which can be used to create initial views. + void LaunchRootIsolate(RunConfiguration& configuration, + ControllerCallback post_launch) { + PostSync(task_runners_.GetUITaskRunner(), [&]() { + bool launch_success = runtime_controller_->LaunchRootIsolate( + settings_, // + []() {}, // + configuration.GetEntrypoint(), // + configuration.GetEntrypointLibrary(), // + configuration.GetEntrypointArgs(), // + configuration.TakeIsolateConfiguration()); // + ASSERT_TRUE(launch_success); + post_launch(*runtime_controller_); + }); + } + + // Run a task that operates the RuntimeController on the UI thread, and wait + // for the task to end. + void ControllerTaskSync(ControllerCallback task) { + ASSERT_TRUE(runtime_controller_); + ASSERT_TRUE(task); + PostSync(task_runners_.GetUITaskRunner(), + [&]() { task(*runtime_controller_); }); + } + + private: + RuntimeControllerContext(const Settings& settings, + const TaskRunners& task_runners, + RuntimeDelegate& client, + DartVMRef vm, + fml::RefPtr isolate_snapshot) + : settings_(settings), + task_runners_(task_runners), + isolate_snapshot_(std::move(isolate_snapshot)), + vm_(std::move(vm)), + runtime_controller_(std::make_unique( + client, + &vm_, + std::move(isolate_snapshot_), + settings.idle_notification_callback, // idle notification callback + flutter::PlatformData(), // platform data + settings.isolate_create_callback, // isolate create callback + settings.isolate_shutdown_callback, // isolate shutdown callback + settings.persistent_isolate_data, // persistent isolate data + UIDartState::Context{task_runners})) {} + + Settings settings_; + TaskRunners task_runners_; + fml::RefPtr isolate_snapshot_; + DartVMRef vm_; + std::unique_ptr runtime_controller_; +}; +} // namespace + namespace testing { class PlatformConfigurationTest : public ShellTest {}; diff --git a/runtime/dart_vm.cc b/runtime/dart_vm.cc index 379243773c5ca..23e59cf93b0f2 100644 --- a/runtime/dart_vm.cc +++ b/runtime/dart_vm.cc @@ -219,22 +219,22 @@ static std::vector ProfilingFlags(bool enable_profiling) { // flags. if (enable_profiling) { return { - // This is the default. But just be explicit. - "--profiler", - // This instructs the profiler to walk C++ frames, and to include - // them in the profile. - "--profile-vm", + // This is the default. But just be explicit. + "--profiler", + // This instructs the profiler to walk C++ frames, and to include + // them in the profile. + "--profile-vm", #if FML_OS_IOS && FML_ARCH_CPU_ARM_FAMILY && FML_ARCH_CPU_ARMEL - // Set the profiler interrupt period to 500Hz instead of the - // default 1000Hz on 32-bit iOS devices to reduce average and worst - // case frame build times. - // - // Note: profile_period is time in microseconds between sampling - // events, not frequency. Frequency is calculated 1/period (or - // 1,000,000 / 2,000 -> 500Hz in this case). - "--profile_period=2000", + // Set the profiler interrupt period to 500Hz instead of the + // default 1000Hz on 32-bit iOS devices to reduce average and worst + // case frame build times. + // + // Note: profile_period is time in microseconds between sampling + // events, not frequency. Frequency is calculated 1/period (or + // 1,000,000 / 2,000 -> 500Hz in this case). + "--profile_period=2000", #else - "--profile_period=1000", + "--profile_period=1000", #endif // FML_OS_IOS && FML_ARCH_CPU_ARM_FAMILY && FML_ARCH_CPU_ARMEL }; } else { diff --git a/runtime/runtime_controller.cc b/runtime/runtime_controller.cc index 9dc6a944de7cc..5ee24c9985dad 100644 --- a/runtime/runtime_controller.cc +++ b/runtime/runtime_controller.cc @@ -341,15 +341,14 @@ void RuntimeController::ScheduleFrame() { } // |PlatformConfigurationClient| -void RuntimeController::Render(Scene* scene) { - // TODO(dkwingsmt): Currently only supports a single window. - int64_t view_id = kFlutterImplicitViewId; +void RuntimeController::Render(int64_t view_id, Scene* scene) { const ViewportMetrics* view_metrics = UIDartState::Current()->platform_configuration()->GetMetrics(view_id); if (view_metrics == nullptr) { return; } - client_.Render(scene->takeLayerTree(view_metrics->physical_width, + client_.Render(view_id, + scene->takeLayerTree(view_metrics->physical_width, view_metrics->physical_height), view_metrics->device_pixel_ratio); } diff --git a/runtime/runtime_controller.h b/runtime/runtime_controller.h index 7a65f2b074282..7a29a3616e3cb 100644 --- a/runtime/runtime_controller.h +++ b/runtime/runtime_controller.h @@ -658,7 +658,7 @@ class RuntimeController : public PlatformConfigurationClient { void ScheduleFrame() override; // |PlatformConfigurationClient| - void Render(Scene* scene) override; + void Render(int64_t view_id, Scene* scene) override; // |PlatformConfigurationClient| void UpdateSemantics(SemanticsUpdate* update) override; diff --git a/runtime/runtime_delegate.h b/runtime/runtime_delegate.h index bc3de031f4411..809fa46ac0aff 100644 --- a/runtime/runtime_delegate.h +++ b/runtime/runtime_delegate.h @@ -25,7 +25,8 @@ class RuntimeDelegate { virtual void ScheduleFrame(bool regenerate_layer_trees = true) = 0; - virtual void Render(std::unique_ptr layer_tree, + virtual void Render(int64_t view_id, + std::unique_ptr layer_tree, float device_pixel_ratio) = 0; virtual void UpdateSemantics(SemanticsNodeUpdates update, diff --git a/shell/common/animator.cc b/shell/common/animator.cc index 3dd925cee6213..1e5d3a7696d32 100644 --- a/shell/common/animator.cc +++ b/shell/common/animator.cc @@ -60,6 +60,10 @@ void Animator::EnqueueTraceFlowId(uint64_t trace_flow_id) { void Animator::BeginFrame( std::unique_ptr frame_timings_recorder) { + // Both frame_timings_recorder_ and layer_trees_tasks_ must be empty if not + // between BeginFrame and EndFrame. + FML_DCHECK(frame_timings_recorder_ == nullptr); + FML_DCHECK(layer_trees_tasks_.empty()); TRACE_EVENT_ASYNC_END0("flutter", "Frame Request Pending", frame_request_number_); frame_request_number_++; @@ -112,6 +116,33 @@ void Animator::BeginFrame( dart_frame_deadline_ = frame_target_time.ToEpochDelta(); uint64_t frame_number = frame_timings_recorder_->GetFrameNumber(); delegate_.OnAnimatorBeginFrame(frame_target_time, frame_number); +} + +void Animator::EndFrame() { + FML_CHECK(frame_timings_recorder_ != nullptr); + if (!layer_trees_tasks_.empty()) { + // The build is completed in OnAnimatorBeginFrame. + frame_timings_recorder_->RecordBuildEnd(fml::TimePoint::Now()); + + delegate_.OnAnimatorUpdateLatestFrameTargetTime( + frame_timings_recorder_->GetVsyncTargetTime()); + + // Commit the pending continuation. + PipelineProduceResult result = + producer_continuation_.Complete(std::make_unique( + std::move(layer_trees_tasks_), std::move(frame_timings_recorder_))); + + if (!result.success) { + FML_DLOG(INFO) << "Failed to commit to the pipeline"; + } else if (!result.is_first_item) { + // Do nothing. It has been successfully pushed to the pipeline but not as + // the first item. Eventually the 'Rasterizer' will consume it, so we + // don't need to notify the delegate. + } else { + delegate_.OnAnimatorDraw(layer_tree_pipeline_); + } + } + frame_timings_recorder_ = nullptr; // Ensure it's cleared. if (!frame_scheduled_ && has_rendered_) { // Wait a tad more than 3 60hz frames before reporting a big idle period. @@ -139,52 +170,24 @@ void Animator::BeginFrame( }, kNotifyIdleTaskWaitTime); } + // Both frame_timings_recorder_ and layer_trees_tasks_ must be empty if not + // between BeginFrame and EndFrame. + FML_DCHECK(layer_trees_tasks_.empty()); + FML_DCHECK(frame_timings_recorder_ == nullptr); } -void Animator::Render(std::unique_ptr layer_tree, +void Animator::Render(int64_t view_id, + std::unique_ptr layer_tree, float device_pixel_ratio) { has_rendered_ = true; - if (!frame_timings_recorder_) { - // Framework can directly call render with a built scene. - frame_timings_recorder_ = std::make_unique(); - const fml::TimePoint placeholder_time = fml::TimePoint::Now(); - frame_timings_recorder_->RecordVsync(placeholder_time, placeholder_time); - frame_timings_recorder_->RecordBuildStart(placeholder_time); - } - + FML_CHECK(frame_timings_recorder_ != nullptr); TRACE_EVENT_WITH_FRAME_NUMBER(frame_timings_recorder_, "flutter", "Animator::Render", /*flow_id_count=*/0, /*flow_ids=*/nullptr); - frame_timings_recorder_->RecordBuildEnd(fml::TimePoint::Now()); - - delegate_.OnAnimatorUpdateLatestFrameTargetTime( - frame_timings_recorder_->GetVsyncTargetTime()); - // TODO(dkwingsmt): Currently only supports a single window. - // See https://github.com/flutter/flutter/issues/135530, item 2. - int64_t view_id = kFlutterImplicitViewId; - std::vector> layer_trees_tasks; - layer_trees_tasks.push_back(std::make_unique( + layer_trees_tasks_.push_back(std::make_unique( view_id, std::move(layer_tree), device_pixel_ratio)); - // Commit the pending continuation. - PipelineProduceResult result = - producer_continuation_.Complete(std::make_unique( - std::move(layer_trees_tasks), std::move(frame_timings_recorder_))); - - if (!result.success) { - FML_DLOG(INFO) << "No pending continuation to commit"; - return; - } - - if (!result.is_first_item) { - // It has been successfully pushed to the pipeline but not as the first - // item. Eventually the 'Rasterizer' will consume it, so we don't need to - // notify the delegate. - return; - } - - delegate_.OnAnimatorDraw(layer_tree_pipeline_); } const std::weak_ptr Animator::GetVsyncWaiter() const { @@ -256,6 +259,7 @@ void Animator::AwaitVSync() { self->DrawLastLayerTrees(std::move(frame_timings_recorder)); } else { self->BeginFrame(std::move(frame_timings_recorder)); + self->EndFrame(); } } }); diff --git a/shell/common/animator.h b/shell/common/animator.h index 8a92705ede9e6..0570ffcea43ec 100644 --- a/shell/common/animator.h +++ b/shell/common/animator.h @@ -53,7 +53,15 @@ class Animator final { void RequestFrame(bool regenerate_layer_trees = true); - void Render(std::unique_ptr layer_tree, + //-------------------------------------------------------------------------- + /// @brief Tells the Animator that this frame needs to render another view. + /// + /// This method must be called during a vsync callback, or + /// technically, between Animator::BeginFrame and Animator::EndFrame + /// (both private methods). + /// + void Render(int64_t view_id, + std::unique_ptr layer_tree, float device_pixel_ratio); const std::weak_ptr GetVsyncWaiter() const; @@ -82,7 +90,13 @@ class Animator final { void EnqueueTraceFlowId(uint64_t trace_flow_id); private: + // Animator's work during a vsync is split into two methods, BeginFrame and + // EndFrame. The two methods should be called synchronously back-to-back to + // avoid being interrupted by a regular vsync. The reason to split them is to + // allow ShellTest::PumpOneFrame to insert a Render in between. + void BeginFrame(std::unique_ptr frame_timings_recorder); + void EndFrame(); bool CanReuseLastLayerTrees(); @@ -99,6 +113,7 @@ class Animator final { std::shared_ptr waiter_; std::unique_ptr frame_timings_recorder_; + std::vector> layer_trees_tasks_; uint64_t frame_request_number_ = 1; fml::TimeDelta dart_frame_deadline_; std::shared_ptr layer_tree_pipeline_; diff --git a/shell/common/animator_unittests.cc b/shell/common/animator_unittests.cc index 9190659fc6f55..80fd30596b9b1 100644 --- a/shell/common/animator_unittests.cc +++ b/shell/common/animator_unittests.cc @@ -23,6 +23,8 @@ namespace flutter { namespace testing { +constexpr int64_t kImplicitViewId = 0; + class FakeAnimatorDelegate : public Animator::Delegate { public: MOCK_METHOD(void, @@ -158,20 +160,30 @@ TEST_F(ShellTest, AnimatorDoesNotNotifyIdleBeforeRender) { latch.Wait(); ASSERT_FALSE(delegate.notify_idle_called_); + fml::AutoResetWaitableEvent render_latch; // Validate it has not notified idle and try to render. task_runners.GetUITaskRunner()->PostDelayedTask( [&] { ASSERT_FALSE(delegate.notify_idle_called_); - auto layer_tree = std::make_unique(LayerTree::Config(), - SkISize::Make(600, 800)); - animator->Render(std::move(layer_tree), 1.0); + EXPECT_CALL(delegate, OnAnimatorBeginFrame).WillOnce([&] { + auto layer_tree = std::make_unique( + LayerTree::Config(), SkISize::Make(600, 800)); + animator->Render(kImplicitViewId, std::move(layer_tree), 1.0); + render_latch.Signal(); + }); + // Request a frame that builds a layer tree and renders a frame. + // When the frame is rendered, render_latch will be signaled. + animator->RequestFrame(true); task_runners.GetPlatformTaskRunner()->PostTask(flush_vsync_task); }, // See kNotifyIdleTaskWaitTime in animator.cc. fml::TimeDelta::FromMilliseconds(60)); latch.Wait(); + render_latch.Wait(); - // Still hasn't notified idle because there has been no frame request. + // A frame has been rendered, and the next frame request will notify idle. + // But at the moment there isn't another frame request, therefore it still + // hasn't notified idle. task_runners.GetUITaskRunner()->PostTask([&] { ASSERT_FALSE(delegate.notify_idle_called_); // False to avoid getting cals to BeginFrame that will request more frames @@ -224,11 +236,6 @@ TEST_F(ShellTest, AnimatorDoesNotNotifyDelegateIfPipelineIsNotEmpty) { }); fml::AutoResetWaitableEvent begin_frame_latch; - EXPECT_CALL(delegate, OnAnimatorBeginFrame) - .WillRepeatedly( - [&](fml::TimePoint frame_target_time, uint64_t frame_number) { - begin_frame_latch.Signal(); - }); // It must always be called when the method 'Animator::Render' is called, // regardless of whether the pipeline is empty or not. EXPECT_CALL(delegate, OnAnimatorUpdateLatestFrameTargetTime).Times(2); @@ -239,16 +246,16 @@ TEST_F(ShellTest, AnimatorDoesNotNotifyDelegateIfPipelineIsNotEmpty) { for (int i = 0; i < 2; i++) { task_runners.GetUITaskRunner()->PostTask([&] { + EXPECT_CALL(delegate, OnAnimatorBeginFrame).WillOnce([&] { + auto layer_tree = std::make_unique(LayerTree::Config(), + SkISize::Make(600, 800)); + animator->Render(kImplicitViewId, std::move(layer_tree), 1.0); + begin_frame_latch.Signal(); + }); animator->RequestFrame(); task_runners.GetPlatformTaskRunner()->PostTask(flush_vsync_task); }); begin_frame_latch.Wait(); - - PostTaskSync(task_runners.GetUITaskRunner(), [&] { - auto layer_tree = std::make_unique(LayerTree::Config(), - SkISize::Make(600, 800)); - animator->Render(std::move(layer_tree), 1.0); - }); } PostTaskSync(task_runners.GetUITaskRunner(), [&] { animator.reset(); }); diff --git a/shell/common/engine.cc b/shell/common/engine.cc index ea0cb43d9be18..1dcf9d4b128ee 100644 --- a/shell/common/engine.cc +++ b/shell/common/engine.cc @@ -459,7 +459,8 @@ void Engine::ScheduleFrame(bool regenerate_layer_trees) { animator_->RequestFrame(regenerate_layer_trees); } -void Engine::Render(std::unique_ptr layer_tree, +void Engine::Render(int64_t view_id, + std::unique_ptr layer_tree, float device_pixel_ratio) { if (!layer_tree) { return; @@ -470,7 +471,7 @@ void Engine::Render(std::unique_ptr layer_tree, return; } - animator_->Render(std::move(layer_tree), device_pixel_ratio); + animator_->Render(view_id, std::move(layer_tree), device_pixel_ratio); } void Engine::UpdateSemantics(SemanticsNodeUpdates update, diff --git a/shell/common/engine.h b/shell/common/engine.h index a60d8b81f8ed4..17ba3cc6fd884 100644 --- a/shell/common/engine.h +++ b/shell/common/engine.h @@ -959,7 +959,8 @@ class Engine final : public RuntimeDelegate, PointerDataDispatcher::Delegate { std::string DefaultRouteName() override; // |RuntimeDelegate| - void Render(std::unique_ptr layer_tree, + void Render(int64_t view_id, + std::unique_ptr layer_tree, float device_pixel_ratio) override; // |RuntimeDelegate| diff --git a/shell/common/engine_unittests.cc b/shell/common/engine_unittests.cc index b0393cb2d2490..7ffa0a6f7714a 100644 --- a/shell/common/engine_unittests.cc +++ b/shell/common/engine_unittests.cc @@ -7,6 +7,8 @@ #include #include "flutter/runtime/dart_vm_lifecycle.h" +#include "flutter/shell/common/shell.h" +#include "flutter/shell/common/shell_test.h" #include "flutter/shell/common/thread_host.h" #include "flutter/testing/fixture_test.h" #include "flutter/testing/testing.h" @@ -19,6 +21,19 @@ namespace flutter { namespace { +using ::testing::Invoke; +using ::testing::ReturnRef; + +static void PostSync(const fml::RefPtr& task_runner, + const fml::closure& task) { + fml::AutoResetWaitableEvent latch; + fml::TaskRunner::RunNowOrPostTask(task_runner, [&latch, &task] { + task(); + latch.Signal(); + }); + latch.Wait(); +} + class MockDelegate : public Engine::Delegate { public: MOCK_METHOD(void, @@ -65,7 +80,7 @@ class MockRuntimeDelegate : public RuntimeDelegate { MOCK_METHOD(void, ScheduleFrame, (bool), (override)); MOCK_METHOD(void, Render, - (std::unique_ptr, float), + (int64_t, std::unique_ptr, float), (override)); MOCK_METHOD(void, UpdateSemantics, @@ -117,6 +132,51 @@ class MockRuntimeController : public RuntimeController { MOCK_METHOD(bool, NotifyIdle, (fml::TimeDelta), (override)); }; +class MockAnimatorDelegate : public Animator::Delegate { + public: + /* Animator::Delegate */ + MOCK_METHOD(void, + OnAnimatorBeginFrame, + (fml::TimePoint frame_target_time, uint64_t frame_number), + (override)); + MOCK_METHOD(void, + OnAnimatorNotifyIdle, + (fml::TimeDelta deadline), + (override)); + MOCK_METHOD(void, + OnAnimatorUpdateLatestFrameTargetTime, + (fml::TimePoint frame_target_time), + (override)); + MOCK_METHOD(void, + OnAnimatorDraw, + (std::shared_ptr pipeline), + (override)); + MOCK_METHOD(void, + OnAnimatorDrawLastLayerTrees, + (std::unique_ptr frame_timings_recorder), + (override)); +}; + +class MockPlatformMessageHandler : public PlatformMessageHandler { + public: + MOCK_METHOD(void, + HandlePlatformMessage, + (std::unique_ptr message), + (override)); + MOCK_METHOD(bool, + DoesHandlePlatformMessageOnPlatformThread, + (), + (const, override)); + MOCK_METHOD(void, + InvokePlatformMessageResponseCallback, + (int response_id, std::unique_ptr mapping), + (override)); + MOCK_METHOD(void, + InvokePlatformMessageEmptyResponseCallback, + (int response_id), + (override)); +}; + std::unique_ptr MakePlatformMessage( const std::string& channel, const std::map& values, @@ -185,6 +245,97 @@ class EngineTest : public testing::FixtureTest { std::shared_ptr image_decoder_task_runner_; fml::TaskRunnerAffineWeakPtr snapshot_delegate_; }; + +// A class that can launch an Engine with the specified Engine::Delegate. +// +// To use this class, contruct this class with Create, call Run, and use the +// engine with EngineTaskSync(). +class EngineContext { + public: + using EngineCallback = std::function; + + [[nodiscard]] static std::unique_ptr Create( + Engine::Delegate& delegate, // + Settings settings, // + const TaskRunners& task_runners, // + std::unique_ptr animator) { + auto [vm, isolate_snapshot] = Shell::InferVmInitDataFromSettings(settings); + FML_CHECK(vm) << "Must be able to initialize the VM."; + // Construct the class with `new` because `make_unique` has no access to the + // private constructor. + EngineContext* raw_pointer = + new EngineContext(delegate, settings, task_runners, std::move(animator), + std::move(vm), isolate_snapshot); + return std::unique_ptr(raw_pointer); + } + + void Run(RunConfiguration configuration) { + PostSync(task_runners_.GetUITaskRunner(), [this, &configuration] { + Engine::RunStatus run_status = engine_->Run(std::move(configuration)); + FML_CHECK(run_status == Engine::RunStatus::Success) + << "Engine failed to run."; + (void)run_status; // Suppress unused-variable warning + }); + } + + // Run a task that operates the Engine on the UI thread, and wait for the + // task to end. + // + // If called on the UI thread, the task is executed synchronously. + void EngineTaskSync(EngineCallback task) { + ASSERT_TRUE(engine_); + ASSERT_TRUE(task); + auto runner = task_runners_.GetUITaskRunner(); + if (runner->RunsTasksOnCurrentThread()) { + task(*engine_); + } else { + PostSync(task_runners_.GetUITaskRunner(), [&]() { task(*engine_); }); + } + } + + ~EngineContext() { + PostSync(task_runners_.GetUITaskRunner(), [this] { engine_.reset(); }); + } + + private: + EngineContext(Engine::Delegate& delegate, // + Settings settings, // + const TaskRunners& task_runners, // + std::unique_ptr animator, // + DartVMRef vm, // + fml::RefPtr isolate_snapshot) + : task_runners_(task_runners), vm_(std::move(vm)) { + PostSync(task_runners.GetUITaskRunner(), [this, &settings, &animator, + &delegate, &isolate_snapshot] { + auto dispatcher_maker = + [](DefaultPointerDataDispatcher::Delegate& delegate) { + return std::make_unique(delegate); + }; + engine_ = std::make_unique( + /*delegate=*/delegate, + /*dispatcher_maker=*/dispatcher_maker, + /*vm=*/*&vm_, + /*isolate_snapshot=*/std::move(isolate_snapshot), + /*task_runners=*/task_runners_, + /*platform_data=*/PlatformData(), + /*settings=*/settings, + /*animator=*/std::move(animator), + /*io_manager=*/io_manager_, + /*unref_queue=*/nullptr, + /*snapshot_delegate=*/snapshot_delegate_, + /*volatile_path_tracker=*/nullptr, + /*gpu_disabled_switch=*/std::make_shared()); + }); + } + + TaskRunners task_runners_; + DartVMRef vm_; + std::unique_ptr engine_; + + fml::WeakPtr io_manager_; + fml::TaskRunnerAffineWeakPtr snapshot_delegate_; +}; + } // namespace TEST_F(EngineTest, Create) { @@ -418,4 +569,68 @@ TEST_F(EngineTest, PassesLoadDartDeferredLibraryErrorToRuntime) { }); } +TEST_F(EngineTest, AnimatorAcceptsMultipleRenders) { + MockAnimatorDelegate animator_delegate; + std::unique_ptr engine_context; + + std::shared_ptr platform_message_handler = + std::make_shared(); + EXPECT_CALL(delegate_, GetPlatformMessageHandler) + .WillOnce(ReturnRef(platform_message_handler)); + + fml::AutoResetWaitableEvent draw_latch; + EXPECT_CALL(animator_delegate, OnAnimatorDraw) + .WillOnce( + Invoke([&draw_latch](const std::shared_ptr& pipeline) { + auto status = + pipeline->Consume([&](std::unique_ptr item) { + EXPECT_EQ(item->layer_tree_tasks.size(), 2u); + EXPECT_EQ(item->layer_tree_tasks[0]->view_id, 1); + EXPECT_EQ(item->layer_tree_tasks[1]->view_id, 2); + }); + EXPECT_EQ(status, PipelineConsumeResult::Done); + draw_latch.Signal(); + })); + EXPECT_CALL(animator_delegate, OnAnimatorBeginFrame) + .WillOnce(Invoke([&engine_context](fml::TimePoint frame_target_time, + uint64_t frame_number) { + engine_context->EngineTaskSync([&](Engine& engine) { + engine.BeginFrame(frame_target_time, frame_number); + }); + })); + + static fml::AutoResetWaitableEvent callback_ready_latch; + callback_ready_latch.Reset(); + AddNativeCallback("NotifyNative", + [](auto args) { callback_ready_latch.Signal(); }); + + std::unique_ptr animator; + PostSync(task_runners_.GetUITaskRunner(), + [&animator, &animator_delegate, &task_runners = task_runners_] { + animator = std::make_unique( + animator_delegate, task_runners, + static_cast>( + std::make_unique( + task_runners))); + }); + + engine_context = EngineContext::Create(delegate_, settings_, task_runners_, + std::move(animator)); + + auto configuration = RunConfiguration::InferFromSettings(settings_); + configuration.SetEntrypoint("onBeginFrameRendersMultipleViews"); + engine_context->Run(std::move(configuration)); + + engine_context->EngineTaskSync([](Engine& engine) { + engine.AddView(1, {1, 10, 10, 22, 0}); + engine.AddView(2, {1, 10, 10, 22, 0}); + }); + + callback_ready_latch.Wait(); + + engine_context->EngineTaskSync( + [](Engine& engine) { engine.ScheduleFrame(); }); + draw_latch.Wait(); +} + } // namespace flutter diff --git a/shell/common/fixtures/shell_test.dart b/shell/common/fixtures/shell_test.dart index e4b0d98833f44..cc6e32731d898 100644 --- a/shell/common/fixtures/shell_test.dart +++ b/shell/common/fixtures/shell_test.dart @@ -547,3 +547,24 @@ void testReportViewWidths() { nativeReportViewWidthsCallback(getCurrentViewWidths()); }; } + +@pragma('vm:entry-point') +void onBeginFrameRendersMultipleViews() { + PlatformDispatcher.instance.onBeginFrame = (Duration beginTime) { + for (final FlutterView view in PlatformDispatcher.instance.views) { + final SceneBuilder builder = SceneBuilder(); + final PictureRecorder recorder = PictureRecorder(); + final Canvas canvas = Canvas(recorder); + canvas.drawPaint(Paint()..color = const Color(0xFFABCDEF)); + final Picture picture = recorder.endRecording(); + builder.addPicture(Offset.zero, picture); + + final Scene scene = builder.build(); + view.render(scene); + + scene.dispose(); + picture.dispose(); + } + }; + notifyNative(); +} diff --git a/shell/common/input_events_unittests.cc b/shell/common/input_events_unittests.cc index 3824dc4d92bae..66a2b64a39e02 100644 --- a/shell/common/input_events_unittests.cc +++ b/shell/common/input_events_unittests.cc @@ -127,11 +127,11 @@ static void TestSimulatedInputEvents( ShellTest::DispatchFakePointerData(shell.get()); i += 1; } - ShellTest::VSyncFlush(shell.get(), will_draw_new_frame); + ShellTest::VSyncFlush(shell.get(), &will_draw_new_frame); } // Finally, issue a vsync for the pending event that may be generated duing // the last vsync. - ShellTest::VSyncFlush(shell.get(), will_draw_new_frame); + ShellTest::VSyncFlush(shell.get(), &will_draw_new_frame); }); simulation.wait(); @@ -345,8 +345,7 @@ TEST_F(ShellTest, CanCorrectlyPipePointerPacket) { CreateSimulatedPointerData(data, PointerData::Change::kRemove, 3.0, 4.0); packet->SetPointerData(5, data); ShellTest::DispatchPointerData(shell.get(), std::move(packet)); - bool will_draw_new_frame; - ShellTest::VSyncFlush(shell.get(), will_draw_new_frame); + ShellTest::VSyncFlush(shell.get()); reportLatch.Wait(); size_t expect_length = 6; @@ -407,8 +406,7 @@ TEST_F(ShellTest, CanCorrectlySynthesizePointerPacket) { CreateSimulatedPointerData(data, PointerData::Change::kRemove, 3.0, 4.0); packet->SetPointerData(3, data); ShellTest::DispatchPointerData(shell.get(), std::move(packet)); - bool will_draw_new_frame; - ShellTest::VSyncFlush(shell.get(), will_draw_new_frame); + ShellTest::VSyncFlush(shell.get()); reportLatch.Wait(); size_t expect_length = 6; diff --git a/shell/common/rasterizer.cc b/shell/common/rasterizer.cc index 0fc4d884c97bf..523bf53d350b6 100644 --- a/shell/common/rasterizer.cc +++ b/shell/common/rasterizer.cc @@ -254,6 +254,7 @@ DrawStatus Rasterizer::Draw(const std::shared_ptr& pipeline) { bool should_resubmit_frame = ShouldResubmitFrame(draw_result); if (should_resubmit_frame) { + FML_CHECK(draw_result.resubmitted_item); auto front_continuation = pipeline->ProduceIfEmpty(); PipelineProduceResult pipeline_result = front_continuation.Complete(std::move(draw_result.resubmitted_item)); diff --git a/shell/common/shell_test.cc b/shell/common/shell_test.cc index c673d4b429c9f..bd952747ca58f 100644 --- a/shell/common/shell_test.cc +++ b/shell/common/shell_test.cc @@ -22,6 +22,39 @@ namespace testing { constexpr int64_t kImplicitViewId = 0; +FrameContent ViewContent::NoViews() { + return std::map(); +} + +FrameContent ViewContent::DummyView(double width, double height) { + FrameContent result; + result[kImplicitViewId] = ViewContent{ + .viewport_metrics = {1.0, width, height, 22, 0}, + .builder = {}, + }; + return result; +} + +FrameContent ViewContent::DummyView(flutter::ViewportMetrics viewport_metrics) { + FrameContent result; + result[kImplicitViewId] = ViewContent{ + .viewport_metrics = std::move(viewport_metrics), + .builder = {}, + }; + return result; +} + +FrameContent ViewContent::ImplicitView(double width, + double height, + LayerTreeBuilder builder) { + FrameContent result; + result[kImplicitViewId] = ViewContent{ + .viewport_metrics = {1.0, width, height, 22, 0}, + .builder = std::move(builder), + }; + return result; +} + ShellTest::ShellTest() : thread_host_("io.flutter.test." + GetCurrentTestName() + ".", ThreadHost::Type::Platform | ThreadHost::Type::IO | @@ -92,16 +125,18 @@ void ShellTest::RestartEngine(Shell* shell, RunConfiguration configuration) { ASSERT_TRUE(restarted.get_future().get()); } -void ShellTest::VSyncFlush(Shell* shell, bool& will_draw_new_frame) { +void ShellTest::VSyncFlush(Shell* shell, bool* will_draw_new_frame) { fml::AutoResetWaitableEvent latch; fml::TaskRunner::RunNowOrPostTask( shell->GetTaskRunners().GetPlatformTaskRunner(), - [shell, &will_draw_new_frame, &latch] { + [shell, will_draw_new_frame, &latch] { // The following UI task ensures that all previous UI tasks are flushed. fml::AutoResetWaitableEvent ui_latch; shell->GetTaskRunners().GetUITaskRunner()->PostTask( - [&ui_latch, &will_draw_new_frame]() { - will_draw_new_frame = true; + [&ui_latch, will_draw_new_frame]() { + if (will_draw_new_frame != nullptr) { + *will_draw_new_frame = true; + } ui_latch.Signal(); }); @@ -154,6 +189,7 @@ void ShellTest::SetViewportMetrics(Shell* shell, double width, double height) { std::make_unique(); recorder->RecordVsync(frame_begin_time, frame_end_time); engine->animator_->BeginFrame(std::move(recorder)); + engine->animator_->EndFrame(); } latch.Signal(); }); @@ -172,23 +208,22 @@ void ShellTest::NotifyIdle(Shell* shell, fml::TimeDelta deadline) { latch.Wait(); } -void ShellTest::PumpOneFrame(Shell* shell, - double width, - double height, - LayerTreeBuilder builder) { - PumpOneFrame(shell, {1.0, width, height, 22, 0}, std::move(builder)); +void ShellTest::PumpOneFrame(Shell* shell) { + PumpOneFrame(shell, ViewContent::DummyView()); } -void ShellTest::PumpOneFrame(Shell* shell, - const flutter::ViewportMetrics& viewport_metrics, - LayerTreeBuilder builder) { +void ShellTest::PumpOneFrame(Shell* shell, FrameContent frame_content) { // Set viewport to nonempty, and call Animator::BeginFrame to make the layer // tree pipeline nonempty. Without either of this, the layer tree below // won't be rasterized. fml::AutoResetWaitableEvent latch; + fml::WeakPtr runtime_delegate = shell->weak_engine_; shell->GetTaskRunners().GetUITaskRunner()->PostTask( - [&latch, engine = shell->weak_engine_, viewport_metrics]() { - engine->SetViewportMetrics(kImplicitViewId, viewport_metrics); + [&latch, engine = shell->weak_engine_, &frame_content, + runtime_delegate]() { + for (auto& [view_id, view_content] : frame_content) { + engine->SetViewportMetrics(view_id, view_content.viewport_metrics); + } const auto frame_begin_time = fml::TimePoint::Now(); const auto frame_end_time = frame_begin_time + fml::TimeDelta::FromSecondsF(1.0 / 60.0); @@ -196,28 +231,28 @@ void ShellTest::PumpOneFrame(Shell* shell, std::make_unique(); recorder->RecordVsync(frame_begin_time, frame_end_time); engine->animator_->BeginFrame(std::move(recorder)); - latch.Signal(); - }); - latch.Wait(); - latch.Reset(); - // Call |Render| to rasterize a layer tree and trigger |OnFrameRasterized| - fml::WeakPtr runtime_delegate = shell->weak_engine_; - shell->GetTaskRunners().GetUITaskRunner()->PostTask( - [&latch, runtime_delegate, &builder, viewport_metrics]() { - SkMatrix identity; - identity.setIdentity(); - auto root_layer = std::make_shared(identity); - auto layer_tree = std::make_unique( - LayerTree::Config{.root_layer = root_layer}, - SkISize::Make(viewport_metrics.physical_width, - viewport_metrics.physical_height)); - float device_pixel_ratio = - static_cast(viewport_metrics.device_pixel_ratio); - if (builder) { - builder(root_layer); + // The BeginFrame phase and the EndFrame phase must be performed in a + // single task, otherwise a normal vsync might be inserted in between, + // causing flaky assertion errors. + + for (auto& [view_id, view_content] : frame_content) { + SkMatrix identity; + identity.setIdentity(); + auto root_layer = std::make_shared(identity); + auto layer_tree = std::make_unique( + LayerTree::Config{.root_layer = root_layer}, + SkISize::Make(view_content.viewport_metrics.physical_width, + view_content.viewport_metrics.physical_height)); + float device_pixel_ratio = static_cast( + view_content.viewport_metrics.device_pixel_ratio); + if (view_content.builder) { + view_content.builder(root_layer); + } + runtime_delegate->Render(view_id, std::move(layer_tree), + device_pixel_ratio); } - runtime_delegate->Render(std::move(layer_tree), device_pixel_ratio); + engine->animator_->EndFrame(); latch.Signal(); }); latch.Wait(); diff --git a/shell/common/shell_test.h b/shell/common/shell_test.h index 7ded997fbcdc5..c11ad1174dc88 100644 --- a/shell/common/shell_test.h +++ b/shell/common/shell_test.h @@ -29,6 +29,38 @@ namespace flutter { namespace testing { +// The signature of ViewContent::builder. +using LayerTreeBuilder = + std::function root)>; +struct ViewContent; +// Defines the content to be rendered to all views of a frame in PumpOneFrame. +using FrameContent = std::map; +// Defines the content to be rendered to a view in PumpOneFrame. +struct ViewContent { + flutter::ViewportMetrics viewport_metrics; + // Given the root layer, this callback builds the layer tree to be rasterized + // in PumpOneFrame. + LayerTreeBuilder builder; + + // Build a frame with no views. This is useful when PumpOneFrame is used just + // to schedule the frame while the frame content is defined by other means. + static FrameContent NoViews(); + + // Build a frame with a single implicit view with the specific size and no + // content. + static FrameContent DummyView(double width = 1, double height = 1); + + // Build a frame with a single implicit view with the specific viewport + // metrics and no content. + static FrameContent DummyView(flutter::ViewportMetrics viewport_metrics); + + // Build a frame with a single implicit view with the specific size and + // content. + static FrameContent ImplicitView(double width, + double height, + LayerTreeBuilder builder); +}; + class ShellTest : public FixtureTest { public: struct Config { @@ -70,24 +102,14 @@ class ShellTest : public FixtureTest { static void RestartEngine(Shell* shell, RunConfiguration configuration); /// Issue as many VSYNC as needed to flush the UI tasks so far, and reset - /// the `will_draw_new_frame` to true. - static void VSyncFlush(Shell* shell, bool& will_draw_new_frame); - - /// Given the root layer, this callback builds the layer tree to be rasterized - /// in PumpOneFrame. - using LayerTreeBuilder = - std::function root)>; + /// the content of `will_draw_new_frame` to true if it's not nullptr. + static void VSyncFlush(Shell* shell, bool* will_draw_new_frame = nullptr); static void SetViewportMetrics(Shell* shell, double width, double height); static void NotifyIdle(Shell* shell, fml::TimeDelta deadline); - static void PumpOneFrame(Shell* shell, - double width = 1, - double height = 1, - LayerTreeBuilder = {}); - static void PumpOneFrame(Shell* shell, - const flutter::ViewportMetrics& viewport_metrics, - LayerTreeBuilder = {}); + static void PumpOneFrame(Shell* shell); + static void PumpOneFrame(Shell* shell, FrameContent frame_content); static void DispatchFakePointerData(Shell* shell); static void DispatchPointerData(Shell* shell, std::unique_ptr packet); diff --git a/shell/common/shell_unittests.cc b/shell/common/shell_unittests.cc index f899d5c5ede97..5f2eb4c6f9390 100644 --- a/shell/common/shell_unittests.cc +++ b/shell/common/shell_unittests.cc @@ -42,6 +42,7 @@ #include "flutter/shell/common/switches.h" #include "flutter/shell/common/thread_host.h" #include "flutter/shell/common/vsync_waiter_fallback.h" +#include "flutter/shell/common/vsync_waiters_test.h" #include "flutter/shell/version/version.h" #include "flutter/testing/mock_canvas.h" #include "flutter/testing/testing.h" @@ -875,7 +876,7 @@ TEST_F(ShellTest, ExternalEmbedderNoThreadMerger) { root->Add(display_list_layer); }; - PumpOneFrame(shell.get(), 100, 100, builder); + PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); end_frame_latch.Wait(); ASSERT_TRUE(end_frame_called); @@ -949,7 +950,7 @@ TEST_F(ShellTest, PushBackdropFilterToVisitedPlatformViews) { backdrop_filter_layer->Add(platform_view_layer2); }; - PumpOneFrame(shell.get(), 100, 100, builder); + PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); end_frame_latch.Wait(); ASSERT_EQ(visited_platform_views, (std::vector{50, 75})); ASSERT_TRUE(stack_75.is_empty()); @@ -1010,7 +1011,7 @@ TEST_F(ShellTest, root->Add(display_list_layer); }; - PumpOneFrame(shell.get(), 100, 100, builder); + PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); end_frame_latch.Wait(); ASSERT_TRUE(end_frame_called); @@ -1056,9 +1057,12 @@ TEST_F(ShellTest, OnPlatformViewDestroyDisablesThreadMerger) { root->Add(display_list_layer); }; - PumpOneFrame(shell.get(), 100, 100, builder); + PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); auto result = shell->WaitForFirstFrame(fml::TimeDelta::Max()); + // Wait for the rasterizer to process the frame. WaitForFirstFrame only waits + // for the Animator, but end_frame_callback is called by the Rasterizer. + PostSync(shell->GetTaskRunners().GetRasterTaskRunner(), [] {}); ASSERT_TRUE(result.ok()) << "Result: " << static_cast(result.code()) << ": " << result.message(); @@ -1123,12 +1127,12 @@ TEST_F(ShellTest, OnPlatformViewDestroyAfterMergingThreads) { root->Add(display_list_layer); }; - PumpOneFrame(shell.get(), 100, 100, builder); + PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); // Pump one frame to trigger thread merging. end_frame_latch.Wait(); // Pump another frame to ensure threads are merged and a regular layer tree is // submitted. - PumpOneFrame(shell.get(), 100, 100, builder); + PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); // Threads are merged here. PlatformViewNotifyDestroy should be executed // successfully. ASSERT_TRUE(fml::TaskRunnerChecker::RunsOnTheSameThread( @@ -1192,7 +1196,7 @@ TEST_F(ShellTest, OnPlatformViewDestroyWhenThreadsAreMerging) { root->Add(display_list_layer); }; - PumpOneFrame(shell.get(), 100, 100, builder); + PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); // Pump one frame and threads aren't merged end_frame_latch.Wait(); ASSERT_FALSE(fml::TaskRunnerChecker::RunsOnTheSameThread( @@ -1203,7 +1207,7 @@ TEST_F(ShellTest, OnPlatformViewDestroyWhenThreadsAreMerging) { // threads external_view_embedder->UpdatePostPrerollResult( PostPrerollResult::kResubmitFrame); - PumpOneFrame(shell.get(), 100, 100, builder); + PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); // Now destroy the platform view immediately. // Two things can happen here: @@ -1259,7 +1263,7 @@ TEST_F(ShellTest, SkPoint::Make(10, 10), MakeSizedDisplayList(80, 80), false, false); root->Add(display_list_layer); }; - PumpOneFrame(shell.get(), 100, 100, builder); + PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); end_frame_latch.Wait(); // Threads should not be merged. @@ -1298,7 +1302,7 @@ TEST_F(ShellTest, OnPlatformViewDestroyWithoutRasterThreadMerger) { SkPoint::Make(10, 10), MakeSizedDisplayList(80, 80), false, false); root->Add(display_list_layer); }; - PumpOneFrame(shell.get(), 100, 100, builder); + PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); // Threads should not be merged. ASSERT_FALSE(fml::TaskRunnerChecker::RunsOnTheSameThread( @@ -1364,7 +1368,7 @@ TEST_F(ShellTest, OnPlatformViewDestroyWithStaticThreadMerging) { SkPoint::Make(10, 10), MakeSizedDisplayList(80, 80), false, false); root->Add(display_list_layer); }; - PumpOneFrame(shell.get(), 100, 100, builder); + PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); end_frame_latch.Wait(); ValidateDestroyPlatformView(shell.get()); @@ -1410,7 +1414,7 @@ TEST_F(ShellTest, GetUsedThisFrameShouldBeSetBeforeEndFrame) { SkPoint::Make(10, 10), MakeSizedDisplayList(80, 80), false, false); root->Add(display_list_layer); }; - PumpOneFrame(shell.get(), 100, 100, builder); + PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); end_frame_latch.Wait(); ASSERT_FALSE(used_this_frame); @@ -1560,10 +1564,11 @@ TEST_F(ShellTest, WaitForFirstFrameZeroSizeFrame) { configuration.SetEntrypoint("emptyMain"); RunEngine(shell.get(), std::move(configuration)); - PumpOneFrame(shell.get(), {1.0, 0.0, 0.0, 22, 0}); + PumpOneFrame(shell.get(), ViewContent::DummyView({1.0, 0.0, 0.0, 22, 0})); fml::Status result = shell->WaitForFirstFrame(fml::TimeDelta::Zero()); - ASSERT_FALSE(result.ok()); - ASSERT_EQ(result.code(), fml::StatusCode::kDeadlineExceeded); + EXPECT_FALSE(result.ok()); + EXPECT_EQ(result.message(), "timeout"); + EXPECT_EQ(result.code(), fml::StatusCode::kDeadlineExceeded); DestroyShell(std::move(shell)); } @@ -2079,6 +2084,7 @@ TEST_F(ShellTest, CanScheduleFrameFromPlatform) { TEST_F(ShellTest, SecondaryVsyncCallbackShouldBeCalledAfterVsyncCallback) { bool is_on_begin_frame_called = false; bool is_secondary_callback_called = false; + bool test_started = false; Settings settings = CreateSettingsForFixture(); TaskRunners task_runners = GetTaskRunnersForFixture(); fml::AutoResetWaitableEvent latch; @@ -2088,12 +2094,18 @@ TEST_F(ShellTest, SecondaryVsyncCallbackShouldBeCalledAfterVsyncCallback) { fml::CountDownLatch count_down_latch(2); AddNativeCallback("NativeOnBeginFrame", CREATE_NATIVE_ENTRY([&](Dart_NativeArguments args) { + if (!test_started) { + return; + } EXPECT_FALSE(is_on_begin_frame_called); EXPECT_FALSE(is_secondary_callback_called); is_on_begin_frame_called = true; count_down_latch.CountDown(); })); - std::unique_ptr shell = CreateShell(settings, task_runners); + std::unique_ptr shell = CreateShell({ + .settings = settings, + .task_runners = task_runners, + }); ASSERT_TRUE(shell->IsSetup()); auto configuration = RunConfiguration::InferFromSettings(settings); @@ -2106,12 +2118,16 @@ TEST_F(ShellTest, SecondaryVsyncCallbackShouldBeCalledAfterVsyncCallback) { fml::TaskRunner::RunNowOrPostTask( shell->GetTaskRunners().GetUITaskRunner(), [&]() { shell->GetEngine()->ScheduleSecondaryVsyncCallback(0, [&]() { + if (!test_started) { + return; + } EXPECT_TRUE(is_on_begin_frame_called); EXPECT_FALSE(is_secondary_callback_called); is_secondary_callback_called = true; count_down_latch.CountDown(); }); shell->GetEngine()->ScheduleFrame(); + test_started = true; }); count_down_latch.Wait(); EXPECT_TRUE(is_on_begin_frame_called); @@ -2156,7 +2172,7 @@ TEST_F(ShellTest, Screenshot) { root->Add(display_list_layer); }; - PumpOneFrame(shell.get(), 100, 100, builder); + PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); firstFrameLatch.Wait(); std::promise screenshot_promise; @@ -2616,7 +2632,13 @@ TEST_F(ShellTest, OnServiceProtocolRenderFrameWithRasterStatsWorks) { configuration.SetEntrypoint("scene_with_red_box"); RunEngine(shell.get(), std::move(configuration)); - PumpOneFrame(shell.get()); + // Set a non-zero viewport metrics, otherwise the scene would be discarded. + PostSync(shell->GetTaskRunners().GetUITaskRunner(), + [engine = shell->GetEngine()]() { + engine->SetViewportMetrics(kImplicitViewId, + ViewportMetrics{1, 1, 1, 22, 0}); + }); + PumpOneFrame(shell.get(), ViewContent::NoViews()); ServiceProtocol::Handler::ServiceProtocolMap empty_params; rapidjson::Document document; @@ -2751,14 +2773,16 @@ TEST_F(ShellTest, DISABLED_DiscardLayerTreeOnResize) { RunEngine(shell.get(), std::move(configuration)); - PumpOneFrame(shell.get(), static_cast(wrong_size.width()), - static_cast(wrong_size.height())); + PumpOneFrame(shell.get(), ViewContent::DummyView( + static_cast(wrong_size.width()), + static_cast(wrong_size.height()))); end_frame_latch.Wait(); // Wrong size, no frames are submitted. ASSERT_EQ(0, external_view_embedder->GetSubmittedFrameCount()); - PumpOneFrame(shell.get(), static_cast(expected_size.width()), - static_cast(expected_size.height())); + PumpOneFrame(shell.get(), ViewContent::DummyView( + static_cast(expected_size.width()), + static_cast(expected_size.height()))); end_frame_latch.Wait(); // Expected size, 1 frame submitted. ASSERT_EQ(1, external_view_embedder->GetSubmittedFrameCount()); @@ -2829,8 +2853,9 @@ TEST_F(ShellTest, DISABLED_DiscardResubmittedLayerTreeOnResize) { RunEngine(shell.get(), std::move(configuration)); - PumpOneFrame(shell.get(), static_cast(origin_size.width()), - static_cast(origin_size.height())); + PumpOneFrame(shell.get(), ViewContent::DummyView( + static_cast(origin_size.width()), + static_cast(origin_size.height()))); end_frame_latch.Wait(); ASSERT_EQ(0, external_view_embedder->GetSubmittedFrameCount()); @@ -2851,8 +2876,9 @@ TEST_F(ShellTest, DISABLED_DiscardResubmittedLayerTreeOnResize) { ASSERT_EQ(0, external_view_embedder->GetSubmittedFrameCount()); // Threads will be merged at the end of this frame. - PumpOneFrame(shell.get(), static_cast(new_size.width()), - static_cast(new_size.height())); + PumpOneFrame(shell.get(), + ViewContent::DummyView(static_cast(new_size.width()), + static_cast(new_size.height()))); end_frame_latch.Wait(); ASSERT_TRUE(raster_thread_merger_ref->IsMerged()); diff --git a/shell/platform/fuchsia/flutter/vulkan_surface_producer.cc b/shell/platform/fuchsia/flutter/vulkan_surface_producer.cc index f99c39a4d095e..538827ef76cb5 100644 --- a/shell/platform/fuchsia/flutter/vulkan_surface_producer.cc +++ b/shell/platform/fuchsia/flutter/vulkan_surface_producer.cc @@ -235,22 +235,21 @@ bool VulkanSurfaceProducer::TransitionSurfacesToExternal( } VkImageMemoryBarrier image_barrier = { - .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, - .pNext = nullptr, - .srcAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, - .dstAccessMask = 0, - .oldLayout = imageInfo.fImageLayout, + .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, + .pNext = nullptr, + .srcAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, + .dstAccessMask = 0, + .oldLayout = imageInfo.fImageLayout, // Understand why this is causing issues on Intel. TODO(fxb/53449) #if defined(__aarch64__) - .newLayout = imageInfo.fImageLayout, + .newLayout = imageInfo.fImageLayout, #else - .newLayout = VK_IMAGE_LAYOUT_GENERAL, + .newLayout = VK_IMAGE_LAYOUT_GENERAL, #endif - .srcQueueFamilyIndex = 0, - .dstQueueFamilyIndex = VK_QUEUE_FAMILY_EXTERNAL_KHR, - .image = vk_surface->GetVkImage(), - .subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1} - }; + .srcQueueFamilyIndex = 0, + .dstQueueFamilyIndex = VK_QUEUE_FAMILY_EXTERNAL_KHR, + .image = vk_surface->GetVkImage(), + .subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1}}; if (!command_buffer->InsertPipelineBarrier( VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, diff --git a/shell/testing/tester_main.cc b/shell/testing/tester_main.cc index 607dc6a6a61a3..4be39c4d70b41 100644 --- a/shell/testing/tester_main.cc +++ b/shell/testing/tester_main.cc @@ -49,17 +49,16 @@ static std::vector> ShaderLibraryMappings() { return { - std::make_shared(impeller_entity_shaders_vk_data, - impeller_entity_shaders_vk_length), - std::make_shared( - impeller_modern_shaders_vk_data, impeller_modern_shaders_vk_length), + std::make_shared(impeller_entity_shaders_vk_data, + impeller_entity_shaders_vk_length), + std::make_shared(impeller_modern_shaders_vk_data, + impeller_modern_shaders_vk_length), #if IMPELLER_ENABLE_3D - std::make_shared( - impeller_scene_shaders_vk_data, impeller_scene_shaders_vk_length), + std::make_shared(impeller_scene_shaders_vk_data, + impeller_scene_shaders_vk_length), #endif // IMPELLER_ENABLE_3D - std::make_shared( - impeller_compute_shaders_vk_data, - impeller_compute_shaders_vk_length), + std::make_shared( + impeller_compute_shaders_vk_data, impeller_compute_shaders_vk_length), }; } diff --git a/testing/dart/platform_view_test.dart b/testing/dart/platform_view_test.dart index 146c865899952..cd581a22d581d 100644 --- a/testing/dart/platform_view_test.dart +++ b/testing/dart/platform_view_test.dart @@ -10,10 +10,12 @@ void main() { test('PlatformView layers do not emit errors from tester', () async { final SceneBuilder builder = SceneBuilder(); builder.addPlatformView(1); - final Scene scene = builder.build(); - - PlatformDispatcher.instance.implicitView!.render(scene); - scene.dispose(); + PlatformDispatcher.instance.onBeginFrame = (Duration duration) { + final Scene scene = builder.build(); + PlatformDispatcher.instance.implicitView!.render(scene); + scene.dispose(); + }; + PlatformDispatcher.instance.scheduleFrame(); // Test harness asserts that this does not emit an error from the shell logs. }); } From 6ab5f2bba9ecabda3a6312991a12a8f18648b769 Mon Sep 17 00:00:00 2001 From: "auto-submit[bot]" <98614782+auto-submit[bot]@users.noreply.github.com> Date: Fri, 20 Oct 2023 20:57:08 +0000 Subject: [PATCH 817/859] Reverts "Multiview pipeline" (#47174) Reverts flutter/engine#44473 Initiated by: dkwingsmt This change reverts the following previous change: Original Description: This PR makes `Animator` able to handle multiple views, and updates unit tests accordingly. Before: image After: image Now `Animator::Render` must be called during `Animator::BeginFrame`, which is split into `BeginFrame` and `EndFrame`. This requirement is made possible by https://github.com/flutter/engine/pull/45555. The reason to split is to allow `ShellTest::PumpOneFrame` to insert a render from C++ code. `ShellTest::PumpOneFrame` is also refactored to allow pumping a frame without any views. A few unit tests are tweaked to resolve racing condition. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- flow/frame_timings.cc | 24 +- flow/frame_timings.h | 3 - .../filters/gaussian_blur_filter_contents.cc | 4 +- lib/ui/dart_ui.cc | 2 +- lib/ui/painting/image_dispose_unittests.cc | 10 +- lib/ui/window.dart | 6 +- lib/ui/window/platform_configuration.cc | 5 +- lib/ui/window/platform_configuration.h | 4 +- .../platform_configuration_unittests.cc | 158 ------------- runtime/dart_vm.cc | 28 +-- runtime/runtime_controller.cc | 7 +- runtime/runtime_controller.h | 2 +- runtime/runtime_delegate.h | 3 +- shell/common/animator.cc | 76 +++--- shell/common/animator.h | 17 +- shell/common/animator_unittests.cc | 37 ++- shell/common/engine.cc | 5 +- shell/common/engine.h | 3 +- shell/common/engine_unittests.cc | 217 +----------------- shell/common/fixtures/shell_test.dart | 21 -- shell/common/input_events_unittests.cc | 10 +- shell/common/rasterizer.cc | 1 - shell/common/shell_test.cc | 103 +++------ shell/common/shell_test.h | 50 ++-- shell/common/shell_unittests.cc | 78 +++---- .../flutter/vulkan_surface_producer.cc | 23 +- shell/testing/tester_main.cc | 17 +- testing/dart/platform_view_test.dart | 10 +- 28 files changed, 193 insertions(+), 731 deletions(-) diff --git a/flow/frame_timings.cc b/flow/frame_timings.cc index 2943e850e17d0..339374d77b837 100644 --- a/flow/frame_timings.cc +++ b/flow/frame_timings.cc @@ -254,30 +254,8 @@ const char* FrameTimingsRecorder::GetFrameNumberTraceArg() const { return frame_number_trace_arg_val_.c_str(); } -static const char* StateToString(FrameTimingsRecorder::State state) { -#ifndef NDEBUG - switch (state) { - case FrameTimingsRecorder::State::kUninitialized: - return "kUninitialized"; - case FrameTimingsRecorder::State::kVsync: - return "kVsync"; - case FrameTimingsRecorder::State::kBuildStart: - return "kBuildStart"; - case FrameTimingsRecorder::State::kBuildEnd: - return "kBuildEnd"; - case FrameTimingsRecorder::State::kRasterStart: - return "kRasterStart"; - case FrameTimingsRecorder::State::kRasterEnd: - return "kRasterEnd"; - }; - FML_UNREACHABLE(); -#endif - return ""; -} - void FrameTimingsRecorder::AssertInState(State state) const { - FML_DCHECK(state_ == state) << "Expected state " << StateToString(state) - << ", actual state " << StateToString(state_); + FML_DCHECK(state_ == state); } } // namespace flutter diff --git a/flow/frame_timings.h b/flow/frame_timings.h index ac5a7e470215e..c81bcc3362298 100644 --- a/flow/frame_timings.h +++ b/flow/frame_timings.h @@ -31,7 +31,6 @@ class FrameTimingsRecorder { public: /// Various states that the recorder can be in. When created the recorder is /// in an unitialized state and transtions in sequential order of the states. - // After adding an item to this enum, modify StateToString accordingly. enum class State : uint32_t { kUninitialized, kVsync, @@ -122,8 +121,6 @@ class FrameTimingsRecorder { /// /// Instead of adding a `GetState` method and asserting on the result, this /// method prevents other logic from relying on the state. - /// - /// In opt builds, this call is a no-op. void AssertInState(State state) const; private: diff --git a/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc b/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc index bd954d821046a..72f56f443b79e 100644 --- a/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc +++ b/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc @@ -26,8 +26,8 @@ namespace impeller { DirectionalGaussianBlurFilterContents::DirectionalGaussianBlurFilterContents() = default; -DirectionalGaussianBlurFilterContents::~ -DirectionalGaussianBlurFilterContents() = default; +DirectionalGaussianBlurFilterContents:: + ~DirectionalGaussianBlurFilterContents() = default; void DirectionalGaussianBlurFilterContents::SetSigma(Sigma sigma) { blur_sigma_ = sigma; diff --git a/lib/ui/dart_ui.cc b/lib/ui/dart_ui.cc index 310de114e377a..976b373d29d08 100644 --- a/lib/ui/dart_ui.cc +++ b/lib/ui/dart_ui.cc @@ -98,7 +98,7 @@ typedef CanvasPath Path; V(NativeStringAttribute::initSpellOutStringAttribute, 3) \ V(PlatformConfigurationNativeApi::DefaultRouteName, 0) \ V(PlatformConfigurationNativeApi::ScheduleFrame, 0) \ - V(PlatformConfigurationNativeApi::Render, 2) \ + V(PlatformConfigurationNativeApi::Render, 1) \ V(PlatformConfigurationNativeApi::UpdateSemantics, 1) \ V(PlatformConfigurationNativeApi::SetNeedsReportTimings, 1) \ V(PlatformConfigurationNativeApi::SetIsolateDebugName, 1) \ diff --git a/lib/ui/painting/image_dispose_unittests.cc b/lib/ui/painting/image_dispose_unittests.cc index 93600ca83c93d..0f8bb6d027062 100644 --- a/lib/ui/painting/image_dispose_unittests.cc +++ b/lib/ui/painting/image_dispose_unittests.cc @@ -5,7 +5,6 @@ #define FML_USED_ON_EMBEDDER #include "flutter/common/task_runners.h" -#include "flutter/fml/synchronization/count_down_latch.h" #include "flutter/fml/synchronization/waitable_event.h" #include "flutter/lib/ui/painting/canvas.h" #include "flutter/lib/ui/painting/image.h" @@ -58,10 +57,6 @@ TEST_F(ImageDisposeTest, ImageReleasedAfterFrameAndDisposePictureAndLayer) { }; Settings settings = CreateSettingsForFixture(); - fml::CountDownLatch frame_latch{2}; - settings.frame_rasterized_callback = [&frame_latch](const FrameTiming& t) { - frame_latch.CountDown(); - }; auto task_runner = CreateNewThread(); TaskRunners task_runners("test", // label GetCurrentTaskRunner(), // platform @@ -88,15 +83,12 @@ TEST_F(ImageDisposeTest, ImageReleasedAfterFrameAndDisposePictureAndLayer) { shell->RunEngine(std::move(configuration), [&](auto result) { ASSERT_EQ(result, Engine::RunStatus::Success); }); + message_latch_.Wait(); ASSERT_TRUE(current_display_list_); ASSERT_TRUE(current_image_); - // Wait for 2 frames to be rasterized. The 2nd frame releases resources of the - // 1st frame. - frame_latch.Wait(); - // Force a drain the SkiaUnrefQueue. The engine does this normally as frames // pump, but we force it here to make the test more deterministic. message_latch_.Reset(); diff --git a/lib/ui/window.dart b/lib/ui/window.dart index eb0378e24dd7c..be761e548bb12 100644 --- a/lib/ui/window.dart +++ b/lib/ui/window.dart @@ -362,12 +362,12 @@ class FlutterView { return true; }()); if (validRender) { - _render(viewId, scene as _NativeScene); + _render(scene as _NativeScene); } } - @Native)>(symbol: 'PlatformConfigurationNativeApi::Render') - external static void _render(int viewId, _NativeScene scene); + @Native)>(symbol: 'PlatformConfigurationNativeApi::Render') + external static void _render(_NativeScene scene); /// Change the retained semantics data about this [FlutterView]. /// diff --git a/lib/ui/window/platform_configuration.cc b/lib/ui/window/platform_configuration.cc index 082756d667976..d19c80a7a8028 100644 --- a/lib/ui/window/platform_configuration.cc +++ b/lib/ui/window/platform_configuration.cc @@ -449,10 +449,9 @@ void PlatformConfiguration::CompletePlatformMessageResponse( response->Complete(std::make_unique(std::move(data))); } -void PlatformConfigurationNativeApi::Render(int64_t view_id, Scene* scene) { +void PlatformConfigurationNativeApi::Render(Scene* scene) { UIDartState::ThrowIfUIOperationsProhibited(); - UIDartState::Current()->platform_configuration()->client()->Render(view_id, - scene); + UIDartState::Current()->platform_configuration()->client()->Render(scene); } void PlatformConfigurationNativeApi::SetNeedsReportTimings(bool value) { diff --git a/lib/ui/window/platform_configuration.h b/lib/ui/window/platform_configuration.h index 9c762b460c05c..7965ba10a7b91 100644 --- a/lib/ui/window/platform_configuration.h +++ b/lib/ui/window/platform_configuration.h @@ -69,7 +69,7 @@ class PlatformConfigurationClient { /// @brief Updates the client's rendering on the GPU with the newly /// provided Scene. /// - virtual void Render(int64_t view_id, Scene* scene) = 0; + virtual void Render(Scene* scene) = 0; //-------------------------------------------------------------------------- /// @brief Receives an updated semantics tree from the Framework. @@ -557,7 +557,7 @@ class PlatformConfigurationNativeApi { static void ScheduleFrame(); - static void Render(int64_t view_id, Scene* scene); + static void Render(Scene* scene); static void UpdateSemantics(SemanticsUpdate* update); diff --git a/lib/ui/window/platform_configuration_unittests.cc b/lib/ui/window/platform_configuration_unittests.cc index 916f47c7026e8..7410caeb66d6c 100644 --- a/lib/ui/window/platform_configuration_unittests.cc +++ b/lib/ui/window/platform_configuration_unittests.cc @@ -15,166 +15,8 @@ #include "flutter/shell/common/shell_test.h" #include "flutter/shell/common/thread_host.h" #include "flutter/testing/testing.h" -#include "gmock/gmock.h" namespace flutter { - -namespace { - -static constexpr int64_t kImplicitViewId = 0; - -static void PostSync(const fml::RefPtr& task_runner, - const fml::closure& task) { - fml::AutoResetWaitableEvent latch; - fml::TaskRunner::RunNowOrPostTask(task_runner, [&latch, &task] { - task(); - latch.Signal(); - }); - latch.Wait(); -} - -class MockRuntimeDelegate : public RuntimeDelegate { - public: - MOCK_METHOD(std::string, DefaultRouteName, (), (override)); - MOCK_METHOD(void, ScheduleFrame, (bool), (override)); - MOCK_METHOD(void, - Render, - (int64_t, std::unique_ptr, float), - (override)); - MOCK_METHOD(void, - UpdateSemantics, - (SemanticsNodeUpdates, CustomAccessibilityActionUpdates), - (override)); - MOCK_METHOD(void, - HandlePlatformMessage, - (std::unique_ptr), - (override)); - MOCK_METHOD(FontCollection&, GetFontCollection, (), (override)); - MOCK_METHOD(std::shared_ptr, GetAssetManager, (), (override)); - MOCK_METHOD(void, OnRootIsolateCreated, (), (override)); - MOCK_METHOD(void, - UpdateIsolateDescription, - (const std::string, int64_t), - (override)); - MOCK_METHOD(void, SetNeedsReportTimings, (bool), (override)); - MOCK_METHOD(std::unique_ptr>, - ComputePlatformResolvedLocale, - (const std::vector&), - (override)); - MOCK_METHOD(void, RequestDartDeferredLibrary, (intptr_t), (override)); - MOCK_METHOD(std::weak_ptr, - GetPlatformMessageHandler, - (), - (const, override)); - MOCK_METHOD(void, SendChannelUpdate, (std::string, bool), (override)); - MOCK_METHOD(double, - GetScaledFontSize, - (double font_size, int configuration_id), - (const, override)); -}; - -class MockPlatformMessageHandler : public PlatformMessageHandler { - public: - MOCK_METHOD(void, - HandlePlatformMessage, - (std::unique_ptr message), - (override)); - MOCK_METHOD(bool, - DoesHandlePlatformMessageOnPlatformThread, - (), - (const, override)); - MOCK_METHOD(void, - InvokePlatformMessageResponseCallback, - (int response_id, std::unique_ptr mapping), - (override)); - MOCK_METHOD(void, - InvokePlatformMessageEmptyResponseCallback, - (int response_id), - (override)); -}; - -// A class that can launch a RuntimeController with the specified -// RuntimeDelegate. -// -// To use this class, contruct this class with Create, call LaunchRootIsolate, -// and use the controller with ControllerTaskSync(). -class RuntimeControllerContext { - public: - using ControllerCallback = std::function; - - [[nodiscard]] static std::unique_ptr Create( - Settings settings, // - const TaskRunners& task_runners, // - RuntimeDelegate& client) { - auto [vm, isolate_snapshot] = Shell::InferVmInitDataFromSettings(settings); - FML_CHECK(vm) << "Must be able to initialize the VM."; - // Construct the class with `new` because `make_unique` has no access to the - // private constructor. - RuntimeControllerContext* raw_pointer = new RuntimeControllerContext( - settings, task_runners, client, std::move(vm), isolate_snapshot); - return std::unique_ptr(raw_pointer); - } - - ~RuntimeControllerContext() { - PostSync(task_runners_.GetUITaskRunner(), - [&]() { runtime_controller_.reset(); }); - } - - // Launch the root isolate. The post_launch callback will be executed in the - // same UI task, which can be used to create initial views. - void LaunchRootIsolate(RunConfiguration& configuration, - ControllerCallback post_launch) { - PostSync(task_runners_.GetUITaskRunner(), [&]() { - bool launch_success = runtime_controller_->LaunchRootIsolate( - settings_, // - []() {}, // - configuration.GetEntrypoint(), // - configuration.GetEntrypointLibrary(), // - configuration.GetEntrypointArgs(), // - configuration.TakeIsolateConfiguration()); // - ASSERT_TRUE(launch_success); - post_launch(*runtime_controller_); - }); - } - - // Run a task that operates the RuntimeController on the UI thread, and wait - // for the task to end. - void ControllerTaskSync(ControllerCallback task) { - ASSERT_TRUE(runtime_controller_); - ASSERT_TRUE(task); - PostSync(task_runners_.GetUITaskRunner(), - [&]() { task(*runtime_controller_); }); - } - - private: - RuntimeControllerContext(const Settings& settings, - const TaskRunners& task_runners, - RuntimeDelegate& client, - DartVMRef vm, - fml::RefPtr isolate_snapshot) - : settings_(settings), - task_runners_(task_runners), - isolate_snapshot_(std::move(isolate_snapshot)), - vm_(std::move(vm)), - runtime_controller_(std::make_unique( - client, - &vm_, - std::move(isolate_snapshot_), - settings.idle_notification_callback, // idle notification callback - flutter::PlatformData(), // platform data - settings.isolate_create_callback, // isolate create callback - settings.isolate_shutdown_callback, // isolate shutdown callback - settings.persistent_isolate_data, // persistent isolate data - UIDartState::Context{task_runners})) {} - - Settings settings_; - TaskRunners task_runners_; - fml::RefPtr isolate_snapshot_; - DartVMRef vm_; - std::unique_ptr runtime_controller_; -}; -} // namespace - namespace testing { class PlatformConfigurationTest : public ShellTest {}; diff --git a/runtime/dart_vm.cc b/runtime/dart_vm.cc index 23e59cf93b0f2..379243773c5ca 100644 --- a/runtime/dart_vm.cc +++ b/runtime/dart_vm.cc @@ -219,22 +219,22 @@ static std::vector ProfilingFlags(bool enable_profiling) { // flags. if (enable_profiling) { return { - // This is the default. But just be explicit. - "--profiler", - // This instructs the profiler to walk C++ frames, and to include - // them in the profile. - "--profile-vm", + // This is the default. But just be explicit. + "--profiler", + // This instructs the profiler to walk C++ frames, and to include + // them in the profile. + "--profile-vm", #if FML_OS_IOS && FML_ARCH_CPU_ARM_FAMILY && FML_ARCH_CPU_ARMEL - // Set the profiler interrupt period to 500Hz instead of the - // default 1000Hz on 32-bit iOS devices to reduce average and worst - // case frame build times. - // - // Note: profile_period is time in microseconds between sampling - // events, not frequency. Frequency is calculated 1/period (or - // 1,000,000 / 2,000 -> 500Hz in this case). - "--profile_period=2000", + // Set the profiler interrupt period to 500Hz instead of the + // default 1000Hz on 32-bit iOS devices to reduce average and worst + // case frame build times. + // + // Note: profile_period is time in microseconds between sampling + // events, not frequency. Frequency is calculated 1/period (or + // 1,000,000 / 2,000 -> 500Hz in this case). + "--profile_period=2000", #else - "--profile_period=1000", + "--profile_period=1000", #endif // FML_OS_IOS && FML_ARCH_CPU_ARM_FAMILY && FML_ARCH_CPU_ARMEL }; } else { diff --git a/runtime/runtime_controller.cc b/runtime/runtime_controller.cc index 5ee24c9985dad..9dc6a944de7cc 100644 --- a/runtime/runtime_controller.cc +++ b/runtime/runtime_controller.cc @@ -341,14 +341,15 @@ void RuntimeController::ScheduleFrame() { } // |PlatformConfigurationClient| -void RuntimeController::Render(int64_t view_id, Scene* scene) { +void RuntimeController::Render(Scene* scene) { + // TODO(dkwingsmt): Currently only supports a single window. + int64_t view_id = kFlutterImplicitViewId; const ViewportMetrics* view_metrics = UIDartState::Current()->platform_configuration()->GetMetrics(view_id); if (view_metrics == nullptr) { return; } - client_.Render(view_id, - scene->takeLayerTree(view_metrics->physical_width, + client_.Render(scene->takeLayerTree(view_metrics->physical_width, view_metrics->physical_height), view_metrics->device_pixel_ratio); } diff --git a/runtime/runtime_controller.h b/runtime/runtime_controller.h index 7a29a3616e3cb..7a65f2b074282 100644 --- a/runtime/runtime_controller.h +++ b/runtime/runtime_controller.h @@ -658,7 +658,7 @@ class RuntimeController : public PlatformConfigurationClient { void ScheduleFrame() override; // |PlatformConfigurationClient| - void Render(int64_t view_id, Scene* scene) override; + void Render(Scene* scene) override; // |PlatformConfigurationClient| void UpdateSemantics(SemanticsUpdate* update) override; diff --git a/runtime/runtime_delegate.h b/runtime/runtime_delegate.h index 809fa46ac0aff..bc3de031f4411 100644 --- a/runtime/runtime_delegate.h +++ b/runtime/runtime_delegate.h @@ -25,8 +25,7 @@ class RuntimeDelegate { virtual void ScheduleFrame(bool regenerate_layer_trees = true) = 0; - virtual void Render(int64_t view_id, - std::unique_ptr layer_tree, + virtual void Render(std::unique_ptr layer_tree, float device_pixel_ratio) = 0; virtual void UpdateSemantics(SemanticsNodeUpdates update, diff --git a/shell/common/animator.cc b/shell/common/animator.cc index 1e5d3a7696d32..3dd925cee6213 100644 --- a/shell/common/animator.cc +++ b/shell/common/animator.cc @@ -60,10 +60,6 @@ void Animator::EnqueueTraceFlowId(uint64_t trace_flow_id) { void Animator::BeginFrame( std::unique_ptr frame_timings_recorder) { - // Both frame_timings_recorder_ and layer_trees_tasks_ must be empty if not - // between BeginFrame and EndFrame. - FML_DCHECK(frame_timings_recorder_ == nullptr); - FML_DCHECK(layer_trees_tasks_.empty()); TRACE_EVENT_ASYNC_END0("flutter", "Frame Request Pending", frame_request_number_); frame_request_number_++; @@ -116,33 +112,6 @@ void Animator::BeginFrame( dart_frame_deadline_ = frame_target_time.ToEpochDelta(); uint64_t frame_number = frame_timings_recorder_->GetFrameNumber(); delegate_.OnAnimatorBeginFrame(frame_target_time, frame_number); -} - -void Animator::EndFrame() { - FML_CHECK(frame_timings_recorder_ != nullptr); - if (!layer_trees_tasks_.empty()) { - // The build is completed in OnAnimatorBeginFrame. - frame_timings_recorder_->RecordBuildEnd(fml::TimePoint::Now()); - - delegate_.OnAnimatorUpdateLatestFrameTargetTime( - frame_timings_recorder_->GetVsyncTargetTime()); - - // Commit the pending continuation. - PipelineProduceResult result = - producer_continuation_.Complete(std::make_unique( - std::move(layer_trees_tasks_), std::move(frame_timings_recorder_))); - - if (!result.success) { - FML_DLOG(INFO) << "Failed to commit to the pipeline"; - } else if (!result.is_first_item) { - // Do nothing. It has been successfully pushed to the pipeline but not as - // the first item. Eventually the 'Rasterizer' will consume it, so we - // don't need to notify the delegate. - } else { - delegate_.OnAnimatorDraw(layer_tree_pipeline_); - } - } - frame_timings_recorder_ = nullptr; // Ensure it's cleared. if (!frame_scheduled_ && has_rendered_) { // Wait a tad more than 3 60hz frames before reporting a big idle period. @@ -170,24 +139,52 @@ void Animator::EndFrame() { }, kNotifyIdleTaskWaitTime); } - // Both frame_timings_recorder_ and layer_trees_tasks_ must be empty if not - // between BeginFrame and EndFrame. - FML_DCHECK(layer_trees_tasks_.empty()); - FML_DCHECK(frame_timings_recorder_ == nullptr); } -void Animator::Render(int64_t view_id, - std::unique_ptr layer_tree, +void Animator::Render(std::unique_ptr layer_tree, float device_pixel_ratio) { has_rendered_ = true; - FML_CHECK(frame_timings_recorder_ != nullptr); + if (!frame_timings_recorder_) { + // Framework can directly call render with a built scene. + frame_timings_recorder_ = std::make_unique(); + const fml::TimePoint placeholder_time = fml::TimePoint::Now(); + frame_timings_recorder_->RecordVsync(placeholder_time, placeholder_time); + frame_timings_recorder_->RecordBuildStart(placeholder_time); + } + TRACE_EVENT_WITH_FRAME_NUMBER(frame_timings_recorder_, "flutter", "Animator::Render", /*flow_id_count=*/0, /*flow_ids=*/nullptr); + frame_timings_recorder_->RecordBuildEnd(fml::TimePoint::Now()); + + delegate_.OnAnimatorUpdateLatestFrameTargetTime( + frame_timings_recorder_->GetVsyncTargetTime()); - layer_trees_tasks_.push_back(std::make_unique( + // TODO(dkwingsmt): Currently only supports a single window. + // See https://github.com/flutter/flutter/issues/135530, item 2. + int64_t view_id = kFlutterImplicitViewId; + std::vector> layer_trees_tasks; + layer_trees_tasks.push_back(std::make_unique( view_id, std::move(layer_tree), device_pixel_ratio)); + // Commit the pending continuation. + PipelineProduceResult result = + producer_continuation_.Complete(std::make_unique( + std::move(layer_trees_tasks), std::move(frame_timings_recorder_))); + + if (!result.success) { + FML_DLOG(INFO) << "No pending continuation to commit"; + return; + } + + if (!result.is_first_item) { + // It has been successfully pushed to the pipeline but not as the first + // item. Eventually the 'Rasterizer' will consume it, so we don't need to + // notify the delegate. + return; + } + + delegate_.OnAnimatorDraw(layer_tree_pipeline_); } const std::weak_ptr Animator::GetVsyncWaiter() const { @@ -259,7 +256,6 @@ void Animator::AwaitVSync() { self->DrawLastLayerTrees(std::move(frame_timings_recorder)); } else { self->BeginFrame(std::move(frame_timings_recorder)); - self->EndFrame(); } } }); diff --git a/shell/common/animator.h b/shell/common/animator.h index 0570ffcea43ec..8a92705ede9e6 100644 --- a/shell/common/animator.h +++ b/shell/common/animator.h @@ -53,15 +53,7 @@ class Animator final { void RequestFrame(bool regenerate_layer_trees = true); - //-------------------------------------------------------------------------- - /// @brief Tells the Animator that this frame needs to render another view. - /// - /// This method must be called during a vsync callback, or - /// technically, between Animator::BeginFrame and Animator::EndFrame - /// (both private methods). - /// - void Render(int64_t view_id, - std::unique_ptr layer_tree, + void Render(std::unique_ptr layer_tree, float device_pixel_ratio); const std::weak_ptr GetVsyncWaiter() const; @@ -90,13 +82,7 @@ class Animator final { void EnqueueTraceFlowId(uint64_t trace_flow_id); private: - // Animator's work during a vsync is split into two methods, BeginFrame and - // EndFrame. The two methods should be called synchronously back-to-back to - // avoid being interrupted by a regular vsync. The reason to split them is to - // allow ShellTest::PumpOneFrame to insert a Render in between. - void BeginFrame(std::unique_ptr frame_timings_recorder); - void EndFrame(); bool CanReuseLastLayerTrees(); @@ -113,7 +99,6 @@ class Animator final { std::shared_ptr waiter_; std::unique_ptr frame_timings_recorder_; - std::vector> layer_trees_tasks_; uint64_t frame_request_number_ = 1; fml::TimeDelta dart_frame_deadline_; std::shared_ptr layer_tree_pipeline_; diff --git a/shell/common/animator_unittests.cc b/shell/common/animator_unittests.cc index 80fd30596b9b1..9190659fc6f55 100644 --- a/shell/common/animator_unittests.cc +++ b/shell/common/animator_unittests.cc @@ -23,8 +23,6 @@ namespace flutter { namespace testing { -constexpr int64_t kImplicitViewId = 0; - class FakeAnimatorDelegate : public Animator::Delegate { public: MOCK_METHOD(void, @@ -160,30 +158,20 @@ TEST_F(ShellTest, AnimatorDoesNotNotifyIdleBeforeRender) { latch.Wait(); ASSERT_FALSE(delegate.notify_idle_called_); - fml::AutoResetWaitableEvent render_latch; // Validate it has not notified idle and try to render. task_runners.GetUITaskRunner()->PostDelayedTask( [&] { ASSERT_FALSE(delegate.notify_idle_called_); - EXPECT_CALL(delegate, OnAnimatorBeginFrame).WillOnce([&] { - auto layer_tree = std::make_unique( - LayerTree::Config(), SkISize::Make(600, 800)); - animator->Render(kImplicitViewId, std::move(layer_tree), 1.0); - render_latch.Signal(); - }); - // Request a frame that builds a layer tree and renders a frame. - // When the frame is rendered, render_latch will be signaled. - animator->RequestFrame(true); + auto layer_tree = std::make_unique(LayerTree::Config(), + SkISize::Make(600, 800)); + animator->Render(std::move(layer_tree), 1.0); task_runners.GetPlatformTaskRunner()->PostTask(flush_vsync_task); }, // See kNotifyIdleTaskWaitTime in animator.cc. fml::TimeDelta::FromMilliseconds(60)); latch.Wait(); - render_latch.Wait(); - // A frame has been rendered, and the next frame request will notify idle. - // But at the moment there isn't another frame request, therefore it still - // hasn't notified idle. + // Still hasn't notified idle because there has been no frame request. task_runners.GetUITaskRunner()->PostTask([&] { ASSERT_FALSE(delegate.notify_idle_called_); // False to avoid getting cals to BeginFrame that will request more frames @@ -236,6 +224,11 @@ TEST_F(ShellTest, AnimatorDoesNotNotifyDelegateIfPipelineIsNotEmpty) { }); fml::AutoResetWaitableEvent begin_frame_latch; + EXPECT_CALL(delegate, OnAnimatorBeginFrame) + .WillRepeatedly( + [&](fml::TimePoint frame_target_time, uint64_t frame_number) { + begin_frame_latch.Signal(); + }); // It must always be called when the method 'Animator::Render' is called, // regardless of whether the pipeline is empty or not. EXPECT_CALL(delegate, OnAnimatorUpdateLatestFrameTargetTime).Times(2); @@ -246,16 +239,16 @@ TEST_F(ShellTest, AnimatorDoesNotNotifyDelegateIfPipelineIsNotEmpty) { for (int i = 0; i < 2; i++) { task_runners.GetUITaskRunner()->PostTask([&] { - EXPECT_CALL(delegate, OnAnimatorBeginFrame).WillOnce([&] { - auto layer_tree = std::make_unique(LayerTree::Config(), - SkISize::Make(600, 800)); - animator->Render(kImplicitViewId, std::move(layer_tree), 1.0); - begin_frame_latch.Signal(); - }); animator->RequestFrame(); task_runners.GetPlatformTaskRunner()->PostTask(flush_vsync_task); }); begin_frame_latch.Wait(); + + PostTaskSync(task_runners.GetUITaskRunner(), [&] { + auto layer_tree = std::make_unique(LayerTree::Config(), + SkISize::Make(600, 800)); + animator->Render(std::move(layer_tree), 1.0); + }); } PostTaskSync(task_runners.GetUITaskRunner(), [&] { animator.reset(); }); diff --git a/shell/common/engine.cc b/shell/common/engine.cc index 1dcf9d4b128ee..ea0cb43d9be18 100644 --- a/shell/common/engine.cc +++ b/shell/common/engine.cc @@ -459,8 +459,7 @@ void Engine::ScheduleFrame(bool regenerate_layer_trees) { animator_->RequestFrame(regenerate_layer_trees); } -void Engine::Render(int64_t view_id, - std::unique_ptr layer_tree, +void Engine::Render(std::unique_ptr layer_tree, float device_pixel_ratio) { if (!layer_tree) { return; @@ -471,7 +470,7 @@ void Engine::Render(int64_t view_id, return; } - animator_->Render(view_id, std::move(layer_tree), device_pixel_ratio); + animator_->Render(std::move(layer_tree), device_pixel_ratio); } void Engine::UpdateSemantics(SemanticsNodeUpdates update, diff --git a/shell/common/engine.h b/shell/common/engine.h index 17ba3cc6fd884..a60d8b81f8ed4 100644 --- a/shell/common/engine.h +++ b/shell/common/engine.h @@ -959,8 +959,7 @@ class Engine final : public RuntimeDelegate, PointerDataDispatcher::Delegate { std::string DefaultRouteName() override; // |RuntimeDelegate| - void Render(int64_t view_id, - std::unique_ptr layer_tree, + void Render(std::unique_ptr layer_tree, float device_pixel_ratio) override; // |RuntimeDelegate| diff --git a/shell/common/engine_unittests.cc b/shell/common/engine_unittests.cc index 7ffa0a6f7714a..b0393cb2d2490 100644 --- a/shell/common/engine_unittests.cc +++ b/shell/common/engine_unittests.cc @@ -7,8 +7,6 @@ #include #include "flutter/runtime/dart_vm_lifecycle.h" -#include "flutter/shell/common/shell.h" -#include "flutter/shell/common/shell_test.h" #include "flutter/shell/common/thread_host.h" #include "flutter/testing/fixture_test.h" #include "flutter/testing/testing.h" @@ -21,19 +19,6 @@ namespace flutter { namespace { -using ::testing::Invoke; -using ::testing::ReturnRef; - -static void PostSync(const fml::RefPtr& task_runner, - const fml::closure& task) { - fml::AutoResetWaitableEvent latch; - fml::TaskRunner::RunNowOrPostTask(task_runner, [&latch, &task] { - task(); - latch.Signal(); - }); - latch.Wait(); -} - class MockDelegate : public Engine::Delegate { public: MOCK_METHOD(void, @@ -80,7 +65,7 @@ class MockRuntimeDelegate : public RuntimeDelegate { MOCK_METHOD(void, ScheduleFrame, (bool), (override)); MOCK_METHOD(void, Render, - (int64_t, std::unique_ptr, float), + (std::unique_ptr, float), (override)); MOCK_METHOD(void, UpdateSemantics, @@ -132,51 +117,6 @@ class MockRuntimeController : public RuntimeController { MOCK_METHOD(bool, NotifyIdle, (fml::TimeDelta), (override)); }; -class MockAnimatorDelegate : public Animator::Delegate { - public: - /* Animator::Delegate */ - MOCK_METHOD(void, - OnAnimatorBeginFrame, - (fml::TimePoint frame_target_time, uint64_t frame_number), - (override)); - MOCK_METHOD(void, - OnAnimatorNotifyIdle, - (fml::TimeDelta deadline), - (override)); - MOCK_METHOD(void, - OnAnimatorUpdateLatestFrameTargetTime, - (fml::TimePoint frame_target_time), - (override)); - MOCK_METHOD(void, - OnAnimatorDraw, - (std::shared_ptr pipeline), - (override)); - MOCK_METHOD(void, - OnAnimatorDrawLastLayerTrees, - (std::unique_ptr frame_timings_recorder), - (override)); -}; - -class MockPlatformMessageHandler : public PlatformMessageHandler { - public: - MOCK_METHOD(void, - HandlePlatformMessage, - (std::unique_ptr message), - (override)); - MOCK_METHOD(bool, - DoesHandlePlatformMessageOnPlatformThread, - (), - (const, override)); - MOCK_METHOD(void, - InvokePlatformMessageResponseCallback, - (int response_id, std::unique_ptr mapping), - (override)); - MOCK_METHOD(void, - InvokePlatformMessageEmptyResponseCallback, - (int response_id), - (override)); -}; - std::unique_ptr MakePlatformMessage( const std::string& channel, const std::map& values, @@ -245,97 +185,6 @@ class EngineTest : public testing::FixtureTest { std::shared_ptr image_decoder_task_runner_; fml::TaskRunnerAffineWeakPtr snapshot_delegate_; }; - -// A class that can launch an Engine with the specified Engine::Delegate. -// -// To use this class, contruct this class with Create, call Run, and use the -// engine with EngineTaskSync(). -class EngineContext { - public: - using EngineCallback = std::function; - - [[nodiscard]] static std::unique_ptr Create( - Engine::Delegate& delegate, // - Settings settings, // - const TaskRunners& task_runners, // - std::unique_ptr animator) { - auto [vm, isolate_snapshot] = Shell::InferVmInitDataFromSettings(settings); - FML_CHECK(vm) << "Must be able to initialize the VM."; - // Construct the class with `new` because `make_unique` has no access to the - // private constructor. - EngineContext* raw_pointer = - new EngineContext(delegate, settings, task_runners, std::move(animator), - std::move(vm), isolate_snapshot); - return std::unique_ptr(raw_pointer); - } - - void Run(RunConfiguration configuration) { - PostSync(task_runners_.GetUITaskRunner(), [this, &configuration] { - Engine::RunStatus run_status = engine_->Run(std::move(configuration)); - FML_CHECK(run_status == Engine::RunStatus::Success) - << "Engine failed to run."; - (void)run_status; // Suppress unused-variable warning - }); - } - - // Run a task that operates the Engine on the UI thread, and wait for the - // task to end. - // - // If called on the UI thread, the task is executed synchronously. - void EngineTaskSync(EngineCallback task) { - ASSERT_TRUE(engine_); - ASSERT_TRUE(task); - auto runner = task_runners_.GetUITaskRunner(); - if (runner->RunsTasksOnCurrentThread()) { - task(*engine_); - } else { - PostSync(task_runners_.GetUITaskRunner(), [&]() { task(*engine_); }); - } - } - - ~EngineContext() { - PostSync(task_runners_.GetUITaskRunner(), [this] { engine_.reset(); }); - } - - private: - EngineContext(Engine::Delegate& delegate, // - Settings settings, // - const TaskRunners& task_runners, // - std::unique_ptr animator, // - DartVMRef vm, // - fml::RefPtr isolate_snapshot) - : task_runners_(task_runners), vm_(std::move(vm)) { - PostSync(task_runners.GetUITaskRunner(), [this, &settings, &animator, - &delegate, &isolate_snapshot] { - auto dispatcher_maker = - [](DefaultPointerDataDispatcher::Delegate& delegate) { - return std::make_unique(delegate); - }; - engine_ = std::make_unique( - /*delegate=*/delegate, - /*dispatcher_maker=*/dispatcher_maker, - /*vm=*/*&vm_, - /*isolate_snapshot=*/std::move(isolate_snapshot), - /*task_runners=*/task_runners_, - /*platform_data=*/PlatformData(), - /*settings=*/settings, - /*animator=*/std::move(animator), - /*io_manager=*/io_manager_, - /*unref_queue=*/nullptr, - /*snapshot_delegate=*/snapshot_delegate_, - /*volatile_path_tracker=*/nullptr, - /*gpu_disabled_switch=*/std::make_shared()); - }); - } - - TaskRunners task_runners_; - DartVMRef vm_; - std::unique_ptr engine_; - - fml::WeakPtr io_manager_; - fml::TaskRunnerAffineWeakPtr snapshot_delegate_; -}; - } // namespace TEST_F(EngineTest, Create) { @@ -569,68 +418,4 @@ TEST_F(EngineTest, PassesLoadDartDeferredLibraryErrorToRuntime) { }); } -TEST_F(EngineTest, AnimatorAcceptsMultipleRenders) { - MockAnimatorDelegate animator_delegate; - std::unique_ptr engine_context; - - std::shared_ptr platform_message_handler = - std::make_shared(); - EXPECT_CALL(delegate_, GetPlatformMessageHandler) - .WillOnce(ReturnRef(platform_message_handler)); - - fml::AutoResetWaitableEvent draw_latch; - EXPECT_CALL(animator_delegate, OnAnimatorDraw) - .WillOnce( - Invoke([&draw_latch](const std::shared_ptr& pipeline) { - auto status = - pipeline->Consume([&](std::unique_ptr item) { - EXPECT_EQ(item->layer_tree_tasks.size(), 2u); - EXPECT_EQ(item->layer_tree_tasks[0]->view_id, 1); - EXPECT_EQ(item->layer_tree_tasks[1]->view_id, 2); - }); - EXPECT_EQ(status, PipelineConsumeResult::Done); - draw_latch.Signal(); - })); - EXPECT_CALL(animator_delegate, OnAnimatorBeginFrame) - .WillOnce(Invoke([&engine_context](fml::TimePoint frame_target_time, - uint64_t frame_number) { - engine_context->EngineTaskSync([&](Engine& engine) { - engine.BeginFrame(frame_target_time, frame_number); - }); - })); - - static fml::AutoResetWaitableEvent callback_ready_latch; - callback_ready_latch.Reset(); - AddNativeCallback("NotifyNative", - [](auto args) { callback_ready_latch.Signal(); }); - - std::unique_ptr animator; - PostSync(task_runners_.GetUITaskRunner(), - [&animator, &animator_delegate, &task_runners = task_runners_] { - animator = std::make_unique( - animator_delegate, task_runners, - static_cast>( - std::make_unique( - task_runners))); - }); - - engine_context = EngineContext::Create(delegate_, settings_, task_runners_, - std::move(animator)); - - auto configuration = RunConfiguration::InferFromSettings(settings_); - configuration.SetEntrypoint("onBeginFrameRendersMultipleViews"); - engine_context->Run(std::move(configuration)); - - engine_context->EngineTaskSync([](Engine& engine) { - engine.AddView(1, {1, 10, 10, 22, 0}); - engine.AddView(2, {1, 10, 10, 22, 0}); - }); - - callback_ready_latch.Wait(); - - engine_context->EngineTaskSync( - [](Engine& engine) { engine.ScheduleFrame(); }); - draw_latch.Wait(); -} - } // namespace flutter diff --git a/shell/common/fixtures/shell_test.dart b/shell/common/fixtures/shell_test.dart index cc6e32731d898..e4b0d98833f44 100644 --- a/shell/common/fixtures/shell_test.dart +++ b/shell/common/fixtures/shell_test.dart @@ -547,24 +547,3 @@ void testReportViewWidths() { nativeReportViewWidthsCallback(getCurrentViewWidths()); }; } - -@pragma('vm:entry-point') -void onBeginFrameRendersMultipleViews() { - PlatformDispatcher.instance.onBeginFrame = (Duration beginTime) { - for (final FlutterView view in PlatformDispatcher.instance.views) { - final SceneBuilder builder = SceneBuilder(); - final PictureRecorder recorder = PictureRecorder(); - final Canvas canvas = Canvas(recorder); - canvas.drawPaint(Paint()..color = const Color(0xFFABCDEF)); - final Picture picture = recorder.endRecording(); - builder.addPicture(Offset.zero, picture); - - final Scene scene = builder.build(); - view.render(scene); - - scene.dispose(); - picture.dispose(); - } - }; - notifyNative(); -} diff --git a/shell/common/input_events_unittests.cc b/shell/common/input_events_unittests.cc index 66a2b64a39e02..3824dc4d92bae 100644 --- a/shell/common/input_events_unittests.cc +++ b/shell/common/input_events_unittests.cc @@ -127,11 +127,11 @@ static void TestSimulatedInputEvents( ShellTest::DispatchFakePointerData(shell.get()); i += 1; } - ShellTest::VSyncFlush(shell.get(), &will_draw_new_frame); + ShellTest::VSyncFlush(shell.get(), will_draw_new_frame); } // Finally, issue a vsync for the pending event that may be generated duing // the last vsync. - ShellTest::VSyncFlush(shell.get(), &will_draw_new_frame); + ShellTest::VSyncFlush(shell.get(), will_draw_new_frame); }); simulation.wait(); @@ -345,7 +345,8 @@ TEST_F(ShellTest, CanCorrectlyPipePointerPacket) { CreateSimulatedPointerData(data, PointerData::Change::kRemove, 3.0, 4.0); packet->SetPointerData(5, data); ShellTest::DispatchPointerData(shell.get(), std::move(packet)); - ShellTest::VSyncFlush(shell.get()); + bool will_draw_new_frame; + ShellTest::VSyncFlush(shell.get(), will_draw_new_frame); reportLatch.Wait(); size_t expect_length = 6; @@ -406,7 +407,8 @@ TEST_F(ShellTest, CanCorrectlySynthesizePointerPacket) { CreateSimulatedPointerData(data, PointerData::Change::kRemove, 3.0, 4.0); packet->SetPointerData(3, data); ShellTest::DispatchPointerData(shell.get(), std::move(packet)); - ShellTest::VSyncFlush(shell.get()); + bool will_draw_new_frame; + ShellTest::VSyncFlush(shell.get(), will_draw_new_frame); reportLatch.Wait(); size_t expect_length = 6; diff --git a/shell/common/rasterizer.cc b/shell/common/rasterizer.cc index 523bf53d350b6..0fc4d884c97bf 100644 --- a/shell/common/rasterizer.cc +++ b/shell/common/rasterizer.cc @@ -254,7 +254,6 @@ DrawStatus Rasterizer::Draw(const std::shared_ptr& pipeline) { bool should_resubmit_frame = ShouldResubmitFrame(draw_result); if (should_resubmit_frame) { - FML_CHECK(draw_result.resubmitted_item); auto front_continuation = pipeline->ProduceIfEmpty(); PipelineProduceResult pipeline_result = front_continuation.Complete(std::move(draw_result.resubmitted_item)); diff --git a/shell/common/shell_test.cc b/shell/common/shell_test.cc index bd952747ca58f..c673d4b429c9f 100644 --- a/shell/common/shell_test.cc +++ b/shell/common/shell_test.cc @@ -22,39 +22,6 @@ namespace testing { constexpr int64_t kImplicitViewId = 0; -FrameContent ViewContent::NoViews() { - return std::map(); -} - -FrameContent ViewContent::DummyView(double width, double height) { - FrameContent result; - result[kImplicitViewId] = ViewContent{ - .viewport_metrics = {1.0, width, height, 22, 0}, - .builder = {}, - }; - return result; -} - -FrameContent ViewContent::DummyView(flutter::ViewportMetrics viewport_metrics) { - FrameContent result; - result[kImplicitViewId] = ViewContent{ - .viewport_metrics = std::move(viewport_metrics), - .builder = {}, - }; - return result; -} - -FrameContent ViewContent::ImplicitView(double width, - double height, - LayerTreeBuilder builder) { - FrameContent result; - result[kImplicitViewId] = ViewContent{ - .viewport_metrics = {1.0, width, height, 22, 0}, - .builder = std::move(builder), - }; - return result; -} - ShellTest::ShellTest() : thread_host_("io.flutter.test." + GetCurrentTestName() + ".", ThreadHost::Type::Platform | ThreadHost::Type::IO | @@ -125,18 +92,16 @@ void ShellTest::RestartEngine(Shell* shell, RunConfiguration configuration) { ASSERT_TRUE(restarted.get_future().get()); } -void ShellTest::VSyncFlush(Shell* shell, bool* will_draw_new_frame) { +void ShellTest::VSyncFlush(Shell* shell, bool& will_draw_new_frame) { fml::AutoResetWaitableEvent latch; fml::TaskRunner::RunNowOrPostTask( shell->GetTaskRunners().GetPlatformTaskRunner(), - [shell, will_draw_new_frame, &latch] { + [shell, &will_draw_new_frame, &latch] { // The following UI task ensures that all previous UI tasks are flushed. fml::AutoResetWaitableEvent ui_latch; shell->GetTaskRunners().GetUITaskRunner()->PostTask( - [&ui_latch, will_draw_new_frame]() { - if (will_draw_new_frame != nullptr) { - *will_draw_new_frame = true; - } + [&ui_latch, &will_draw_new_frame]() { + will_draw_new_frame = true; ui_latch.Signal(); }); @@ -189,7 +154,6 @@ void ShellTest::SetViewportMetrics(Shell* shell, double width, double height) { std::make_unique(); recorder->RecordVsync(frame_begin_time, frame_end_time); engine->animator_->BeginFrame(std::move(recorder)); - engine->animator_->EndFrame(); } latch.Signal(); }); @@ -208,22 +172,23 @@ void ShellTest::NotifyIdle(Shell* shell, fml::TimeDelta deadline) { latch.Wait(); } -void ShellTest::PumpOneFrame(Shell* shell) { - PumpOneFrame(shell, ViewContent::DummyView()); +void ShellTest::PumpOneFrame(Shell* shell, + double width, + double height, + LayerTreeBuilder builder) { + PumpOneFrame(shell, {1.0, width, height, 22, 0}, std::move(builder)); } -void ShellTest::PumpOneFrame(Shell* shell, FrameContent frame_content) { +void ShellTest::PumpOneFrame(Shell* shell, + const flutter::ViewportMetrics& viewport_metrics, + LayerTreeBuilder builder) { // Set viewport to nonempty, and call Animator::BeginFrame to make the layer // tree pipeline nonempty. Without either of this, the layer tree below // won't be rasterized. fml::AutoResetWaitableEvent latch; - fml::WeakPtr runtime_delegate = shell->weak_engine_; shell->GetTaskRunners().GetUITaskRunner()->PostTask( - [&latch, engine = shell->weak_engine_, &frame_content, - runtime_delegate]() { - for (auto& [view_id, view_content] : frame_content) { - engine->SetViewportMetrics(view_id, view_content.viewport_metrics); - } + [&latch, engine = shell->weak_engine_, viewport_metrics]() { + engine->SetViewportMetrics(kImplicitViewId, viewport_metrics); const auto frame_begin_time = fml::TimePoint::Now(); const auto frame_end_time = frame_begin_time + fml::TimeDelta::FromSecondsF(1.0 / 60.0); @@ -231,28 +196,28 @@ void ShellTest::PumpOneFrame(Shell* shell, FrameContent frame_content) { std::make_unique(); recorder->RecordVsync(frame_begin_time, frame_end_time); engine->animator_->BeginFrame(std::move(recorder)); + latch.Signal(); + }); + latch.Wait(); - // The BeginFrame phase and the EndFrame phase must be performed in a - // single task, otherwise a normal vsync might be inserted in between, - // causing flaky assertion errors. - - for (auto& [view_id, view_content] : frame_content) { - SkMatrix identity; - identity.setIdentity(); - auto root_layer = std::make_shared(identity); - auto layer_tree = std::make_unique( - LayerTree::Config{.root_layer = root_layer}, - SkISize::Make(view_content.viewport_metrics.physical_width, - view_content.viewport_metrics.physical_height)); - float device_pixel_ratio = static_cast( - view_content.viewport_metrics.device_pixel_ratio); - if (view_content.builder) { - view_content.builder(root_layer); - } - runtime_delegate->Render(view_id, std::move(layer_tree), - device_pixel_ratio); + latch.Reset(); + // Call |Render| to rasterize a layer tree and trigger |OnFrameRasterized| + fml::WeakPtr runtime_delegate = shell->weak_engine_; + shell->GetTaskRunners().GetUITaskRunner()->PostTask( + [&latch, runtime_delegate, &builder, viewport_metrics]() { + SkMatrix identity; + identity.setIdentity(); + auto root_layer = std::make_shared(identity); + auto layer_tree = std::make_unique( + LayerTree::Config{.root_layer = root_layer}, + SkISize::Make(viewport_metrics.physical_width, + viewport_metrics.physical_height)); + float device_pixel_ratio = + static_cast(viewport_metrics.device_pixel_ratio); + if (builder) { + builder(root_layer); } - engine->animator_->EndFrame(); + runtime_delegate->Render(std::move(layer_tree), device_pixel_ratio); latch.Signal(); }); latch.Wait(); diff --git a/shell/common/shell_test.h b/shell/common/shell_test.h index c11ad1174dc88..7ded997fbcdc5 100644 --- a/shell/common/shell_test.h +++ b/shell/common/shell_test.h @@ -29,38 +29,6 @@ namespace flutter { namespace testing { -// The signature of ViewContent::builder. -using LayerTreeBuilder = - std::function root)>; -struct ViewContent; -// Defines the content to be rendered to all views of a frame in PumpOneFrame. -using FrameContent = std::map; -// Defines the content to be rendered to a view in PumpOneFrame. -struct ViewContent { - flutter::ViewportMetrics viewport_metrics; - // Given the root layer, this callback builds the layer tree to be rasterized - // in PumpOneFrame. - LayerTreeBuilder builder; - - // Build a frame with no views. This is useful when PumpOneFrame is used just - // to schedule the frame while the frame content is defined by other means. - static FrameContent NoViews(); - - // Build a frame with a single implicit view with the specific size and no - // content. - static FrameContent DummyView(double width = 1, double height = 1); - - // Build a frame with a single implicit view with the specific viewport - // metrics and no content. - static FrameContent DummyView(flutter::ViewportMetrics viewport_metrics); - - // Build a frame with a single implicit view with the specific size and - // content. - static FrameContent ImplicitView(double width, - double height, - LayerTreeBuilder builder); -}; - class ShellTest : public FixtureTest { public: struct Config { @@ -102,14 +70,24 @@ class ShellTest : public FixtureTest { static void RestartEngine(Shell* shell, RunConfiguration configuration); /// Issue as many VSYNC as needed to flush the UI tasks so far, and reset - /// the content of `will_draw_new_frame` to true if it's not nullptr. - static void VSyncFlush(Shell* shell, bool* will_draw_new_frame = nullptr); + /// the `will_draw_new_frame` to true. + static void VSyncFlush(Shell* shell, bool& will_draw_new_frame); + + /// Given the root layer, this callback builds the layer tree to be rasterized + /// in PumpOneFrame. + using LayerTreeBuilder = + std::function root)>; static void SetViewportMetrics(Shell* shell, double width, double height); static void NotifyIdle(Shell* shell, fml::TimeDelta deadline); - static void PumpOneFrame(Shell* shell); - static void PumpOneFrame(Shell* shell, FrameContent frame_content); + static void PumpOneFrame(Shell* shell, + double width = 1, + double height = 1, + LayerTreeBuilder = {}); + static void PumpOneFrame(Shell* shell, + const flutter::ViewportMetrics& viewport_metrics, + LayerTreeBuilder = {}); static void DispatchFakePointerData(Shell* shell); static void DispatchPointerData(Shell* shell, std::unique_ptr packet); diff --git a/shell/common/shell_unittests.cc b/shell/common/shell_unittests.cc index 5f2eb4c6f9390..f899d5c5ede97 100644 --- a/shell/common/shell_unittests.cc +++ b/shell/common/shell_unittests.cc @@ -42,7 +42,6 @@ #include "flutter/shell/common/switches.h" #include "flutter/shell/common/thread_host.h" #include "flutter/shell/common/vsync_waiter_fallback.h" -#include "flutter/shell/common/vsync_waiters_test.h" #include "flutter/shell/version/version.h" #include "flutter/testing/mock_canvas.h" #include "flutter/testing/testing.h" @@ -876,7 +875,7 @@ TEST_F(ShellTest, ExternalEmbedderNoThreadMerger) { root->Add(display_list_layer); }; - PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); + PumpOneFrame(shell.get(), 100, 100, builder); end_frame_latch.Wait(); ASSERT_TRUE(end_frame_called); @@ -950,7 +949,7 @@ TEST_F(ShellTest, PushBackdropFilterToVisitedPlatformViews) { backdrop_filter_layer->Add(platform_view_layer2); }; - PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); + PumpOneFrame(shell.get(), 100, 100, builder); end_frame_latch.Wait(); ASSERT_EQ(visited_platform_views, (std::vector{50, 75})); ASSERT_TRUE(stack_75.is_empty()); @@ -1011,7 +1010,7 @@ TEST_F(ShellTest, root->Add(display_list_layer); }; - PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); + PumpOneFrame(shell.get(), 100, 100, builder); end_frame_latch.Wait(); ASSERT_TRUE(end_frame_called); @@ -1057,12 +1056,9 @@ TEST_F(ShellTest, OnPlatformViewDestroyDisablesThreadMerger) { root->Add(display_list_layer); }; - PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); + PumpOneFrame(shell.get(), 100, 100, builder); auto result = shell->WaitForFirstFrame(fml::TimeDelta::Max()); - // Wait for the rasterizer to process the frame. WaitForFirstFrame only waits - // for the Animator, but end_frame_callback is called by the Rasterizer. - PostSync(shell->GetTaskRunners().GetRasterTaskRunner(), [] {}); ASSERT_TRUE(result.ok()) << "Result: " << static_cast(result.code()) << ": " << result.message(); @@ -1127,12 +1123,12 @@ TEST_F(ShellTest, OnPlatformViewDestroyAfterMergingThreads) { root->Add(display_list_layer); }; - PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); + PumpOneFrame(shell.get(), 100, 100, builder); // Pump one frame to trigger thread merging. end_frame_latch.Wait(); // Pump another frame to ensure threads are merged and a regular layer tree is // submitted. - PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); + PumpOneFrame(shell.get(), 100, 100, builder); // Threads are merged here. PlatformViewNotifyDestroy should be executed // successfully. ASSERT_TRUE(fml::TaskRunnerChecker::RunsOnTheSameThread( @@ -1196,7 +1192,7 @@ TEST_F(ShellTest, OnPlatformViewDestroyWhenThreadsAreMerging) { root->Add(display_list_layer); }; - PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); + PumpOneFrame(shell.get(), 100, 100, builder); // Pump one frame and threads aren't merged end_frame_latch.Wait(); ASSERT_FALSE(fml::TaskRunnerChecker::RunsOnTheSameThread( @@ -1207,7 +1203,7 @@ TEST_F(ShellTest, OnPlatformViewDestroyWhenThreadsAreMerging) { // threads external_view_embedder->UpdatePostPrerollResult( PostPrerollResult::kResubmitFrame); - PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); + PumpOneFrame(shell.get(), 100, 100, builder); // Now destroy the platform view immediately. // Two things can happen here: @@ -1263,7 +1259,7 @@ TEST_F(ShellTest, SkPoint::Make(10, 10), MakeSizedDisplayList(80, 80), false, false); root->Add(display_list_layer); }; - PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); + PumpOneFrame(shell.get(), 100, 100, builder); end_frame_latch.Wait(); // Threads should not be merged. @@ -1302,7 +1298,7 @@ TEST_F(ShellTest, OnPlatformViewDestroyWithoutRasterThreadMerger) { SkPoint::Make(10, 10), MakeSizedDisplayList(80, 80), false, false); root->Add(display_list_layer); }; - PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); + PumpOneFrame(shell.get(), 100, 100, builder); // Threads should not be merged. ASSERT_FALSE(fml::TaskRunnerChecker::RunsOnTheSameThread( @@ -1368,7 +1364,7 @@ TEST_F(ShellTest, OnPlatformViewDestroyWithStaticThreadMerging) { SkPoint::Make(10, 10), MakeSizedDisplayList(80, 80), false, false); root->Add(display_list_layer); }; - PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); + PumpOneFrame(shell.get(), 100, 100, builder); end_frame_latch.Wait(); ValidateDestroyPlatformView(shell.get()); @@ -1414,7 +1410,7 @@ TEST_F(ShellTest, GetUsedThisFrameShouldBeSetBeforeEndFrame) { SkPoint::Make(10, 10), MakeSizedDisplayList(80, 80), false, false); root->Add(display_list_layer); }; - PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); + PumpOneFrame(shell.get(), 100, 100, builder); end_frame_latch.Wait(); ASSERT_FALSE(used_this_frame); @@ -1564,11 +1560,10 @@ TEST_F(ShellTest, WaitForFirstFrameZeroSizeFrame) { configuration.SetEntrypoint("emptyMain"); RunEngine(shell.get(), std::move(configuration)); - PumpOneFrame(shell.get(), ViewContent::DummyView({1.0, 0.0, 0.0, 22, 0})); + PumpOneFrame(shell.get(), {1.0, 0.0, 0.0, 22, 0}); fml::Status result = shell->WaitForFirstFrame(fml::TimeDelta::Zero()); - EXPECT_FALSE(result.ok()); - EXPECT_EQ(result.message(), "timeout"); - EXPECT_EQ(result.code(), fml::StatusCode::kDeadlineExceeded); + ASSERT_FALSE(result.ok()); + ASSERT_EQ(result.code(), fml::StatusCode::kDeadlineExceeded); DestroyShell(std::move(shell)); } @@ -2084,7 +2079,6 @@ TEST_F(ShellTest, CanScheduleFrameFromPlatform) { TEST_F(ShellTest, SecondaryVsyncCallbackShouldBeCalledAfterVsyncCallback) { bool is_on_begin_frame_called = false; bool is_secondary_callback_called = false; - bool test_started = false; Settings settings = CreateSettingsForFixture(); TaskRunners task_runners = GetTaskRunnersForFixture(); fml::AutoResetWaitableEvent latch; @@ -2094,18 +2088,12 @@ TEST_F(ShellTest, SecondaryVsyncCallbackShouldBeCalledAfterVsyncCallback) { fml::CountDownLatch count_down_latch(2); AddNativeCallback("NativeOnBeginFrame", CREATE_NATIVE_ENTRY([&](Dart_NativeArguments args) { - if (!test_started) { - return; - } EXPECT_FALSE(is_on_begin_frame_called); EXPECT_FALSE(is_secondary_callback_called); is_on_begin_frame_called = true; count_down_latch.CountDown(); })); - std::unique_ptr shell = CreateShell({ - .settings = settings, - .task_runners = task_runners, - }); + std::unique_ptr shell = CreateShell(settings, task_runners); ASSERT_TRUE(shell->IsSetup()); auto configuration = RunConfiguration::InferFromSettings(settings); @@ -2118,16 +2106,12 @@ TEST_F(ShellTest, SecondaryVsyncCallbackShouldBeCalledAfterVsyncCallback) { fml::TaskRunner::RunNowOrPostTask( shell->GetTaskRunners().GetUITaskRunner(), [&]() { shell->GetEngine()->ScheduleSecondaryVsyncCallback(0, [&]() { - if (!test_started) { - return; - } EXPECT_TRUE(is_on_begin_frame_called); EXPECT_FALSE(is_secondary_callback_called); is_secondary_callback_called = true; count_down_latch.CountDown(); }); shell->GetEngine()->ScheduleFrame(); - test_started = true; }); count_down_latch.Wait(); EXPECT_TRUE(is_on_begin_frame_called); @@ -2172,7 +2156,7 @@ TEST_F(ShellTest, Screenshot) { root->Add(display_list_layer); }; - PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); + PumpOneFrame(shell.get(), 100, 100, builder); firstFrameLatch.Wait(); std::promise screenshot_promise; @@ -2632,13 +2616,7 @@ TEST_F(ShellTest, OnServiceProtocolRenderFrameWithRasterStatsWorks) { configuration.SetEntrypoint("scene_with_red_box"); RunEngine(shell.get(), std::move(configuration)); - // Set a non-zero viewport metrics, otherwise the scene would be discarded. - PostSync(shell->GetTaskRunners().GetUITaskRunner(), - [engine = shell->GetEngine()]() { - engine->SetViewportMetrics(kImplicitViewId, - ViewportMetrics{1, 1, 1, 22, 0}); - }); - PumpOneFrame(shell.get(), ViewContent::NoViews()); + PumpOneFrame(shell.get()); ServiceProtocol::Handler::ServiceProtocolMap empty_params; rapidjson::Document document; @@ -2773,16 +2751,14 @@ TEST_F(ShellTest, DISABLED_DiscardLayerTreeOnResize) { RunEngine(shell.get(), std::move(configuration)); - PumpOneFrame(shell.get(), ViewContent::DummyView( - static_cast(wrong_size.width()), - static_cast(wrong_size.height()))); + PumpOneFrame(shell.get(), static_cast(wrong_size.width()), + static_cast(wrong_size.height())); end_frame_latch.Wait(); // Wrong size, no frames are submitted. ASSERT_EQ(0, external_view_embedder->GetSubmittedFrameCount()); - PumpOneFrame(shell.get(), ViewContent::DummyView( - static_cast(expected_size.width()), - static_cast(expected_size.height()))); + PumpOneFrame(shell.get(), static_cast(expected_size.width()), + static_cast(expected_size.height())); end_frame_latch.Wait(); // Expected size, 1 frame submitted. ASSERT_EQ(1, external_view_embedder->GetSubmittedFrameCount()); @@ -2853,9 +2829,8 @@ TEST_F(ShellTest, DISABLED_DiscardResubmittedLayerTreeOnResize) { RunEngine(shell.get(), std::move(configuration)); - PumpOneFrame(shell.get(), ViewContent::DummyView( - static_cast(origin_size.width()), - static_cast(origin_size.height()))); + PumpOneFrame(shell.get(), static_cast(origin_size.width()), + static_cast(origin_size.height())); end_frame_latch.Wait(); ASSERT_EQ(0, external_view_embedder->GetSubmittedFrameCount()); @@ -2876,9 +2851,8 @@ TEST_F(ShellTest, DISABLED_DiscardResubmittedLayerTreeOnResize) { ASSERT_EQ(0, external_view_embedder->GetSubmittedFrameCount()); // Threads will be merged at the end of this frame. - PumpOneFrame(shell.get(), - ViewContent::DummyView(static_cast(new_size.width()), - static_cast(new_size.height()))); + PumpOneFrame(shell.get(), static_cast(new_size.width()), + static_cast(new_size.height())); end_frame_latch.Wait(); ASSERT_TRUE(raster_thread_merger_ref->IsMerged()); diff --git a/shell/platform/fuchsia/flutter/vulkan_surface_producer.cc b/shell/platform/fuchsia/flutter/vulkan_surface_producer.cc index 538827ef76cb5..f99c39a4d095e 100644 --- a/shell/platform/fuchsia/flutter/vulkan_surface_producer.cc +++ b/shell/platform/fuchsia/flutter/vulkan_surface_producer.cc @@ -235,21 +235,22 @@ bool VulkanSurfaceProducer::TransitionSurfacesToExternal( } VkImageMemoryBarrier image_barrier = { - .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, - .pNext = nullptr, - .srcAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, - .dstAccessMask = 0, - .oldLayout = imageInfo.fImageLayout, + .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, + .pNext = nullptr, + .srcAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, + .dstAccessMask = 0, + .oldLayout = imageInfo.fImageLayout, // Understand why this is causing issues on Intel. TODO(fxb/53449) #if defined(__aarch64__) - .newLayout = imageInfo.fImageLayout, + .newLayout = imageInfo.fImageLayout, #else - .newLayout = VK_IMAGE_LAYOUT_GENERAL, + .newLayout = VK_IMAGE_LAYOUT_GENERAL, #endif - .srcQueueFamilyIndex = 0, - .dstQueueFamilyIndex = VK_QUEUE_FAMILY_EXTERNAL_KHR, - .image = vk_surface->GetVkImage(), - .subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1}}; + .srcQueueFamilyIndex = 0, + .dstQueueFamilyIndex = VK_QUEUE_FAMILY_EXTERNAL_KHR, + .image = vk_surface->GetVkImage(), + .subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1} + }; if (!command_buffer->InsertPipelineBarrier( VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, diff --git a/shell/testing/tester_main.cc b/shell/testing/tester_main.cc index 4be39c4d70b41..607dc6a6a61a3 100644 --- a/shell/testing/tester_main.cc +++ b/shell/testing/tester_main.cc @@ -49,16 +49,17 @@ static std::vector> ShaderLibraryMappings() { return { - std::make_shared(impeller_entity_shaders_vk_data, - impeller_entity_shaders_vk_length), - std::make_shared(impeller_modern_shaders_vk_data, - impeller_modern_shaders_vk_length), + std::make_shared(impeller_entity_shaders_vk_data, + impeller_entity_shaders_vk_length), + std::make_shared( + impeller_modern_shaders_vk_data, impeller_modern_shaders_vk_length), #if IMPELLER_ENABLE_3D - std::make_shared(impeller_scene_shaders_vk_data, - impeller_scene_shaders_vk_length), + std::make_shared( + impeller_scene_shaders_vk_data, impeller_scene_shaders_vk_length), #endif // IMPELLER_ENABLE_3D - std::make_shared( - impeller_compute_shaders_vk_data, impeller_compute_shaders_vk_length), + std::make_shared( + impeller_compute_shaders_vk_data, + impeller_compute_shaders_vk_length), }; } diff --git a/testing/dart/platform_view_test.dart b/testing/dart/platform_view_test.dart index cd581a22d581d..146c865899952 100644 --- a/testing/dart/platform_view_test.dart +++ b/testing/dart/platform_view_test.dart @@ -10,12 +10,10 @@ void main() { test('PlatformView layers do not emit errors from tester', () async { final SceneBuilder builder = SceneBuilder(); builder.addPlatformView(1); - PlatformDispatcher.instance.onBeginFrame = (Duration duration) { - final Scene scene = builder.build(); - PlatformDispatcher.instance.implicitView!.render(scene); - scene.dispose(); - }; - PlatformDispatcher.instance.scheduleFrame(); + final Scene scene = builder.build(); + + PlatformDispatcher.instance.implicitView!.render(scene); + scene.dispose(); // Test harness asserts that this does not emit an error from the shell logs. }); } From 207360efe14db4894a3c631bc22e158fd24733ca Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 20 Oct 2023 17:21:42 -0400 Subject: [PATCH 818/859] Roll Skia from ca69b04f7dd2 to cf2131f85d57 (2 revisions) (#47173) https://skia.googlesource.com/skia.git/+log/ca69b04f7dd2..cf2131f85d57 2023-10-20 nicolettep@google.com [graphite] Add transfer dst buffer usage flag for gpu-only buffers 2023-10-20 jvanverth@google.com [graphite] Don't try to draw empty paths. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 3880e21e182b3..9e792698b2cd6 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'ca69b04f7dd2350167ebebdd72b5459538e89e7e', + 'skia_revision': 'cf2131f85d57f938472e50b6643c3c2348709a55', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index ff84010f000b0..c268df7a5cc0d 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 32cbc0a3bf68ee78d0a90df13dd96ab0 +Signature: 87bded776e4111cd3ff856b2089f0d53 ==================================================================================================== LIBRARY: etc1 From b42dfa76b08b3819228742fc34e811dd41b31c5e Mon Sep 17 00:00:00 2001 From: Jia Hao Date: Fri, 20 Oct 2023 21:42:57 +0000 Subject: [PATCH 819/859] Update buildroot to remove `-Wno-c99-designator` (#47145) See also: - https://github.com/flutter/engine/pull/45869 - https://github.com/flutter/buildroot/pull/788 *List which issues are fixed by this PR. You must list at least one issue.* b/300573112 --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 9e792698b2cd6..112d6d9ab3a29 100644 --- a/DEPS +++ b/DEPS @@ -262,7 +262,7 @@ allowed_hosts = [ ] deps = { - 'src': 'https://github.com/flutter/buildroot.git' + '@' + 'ab76ccba2ca4ce40c7f52f9007704906d0bb5362', + 'src': 'https://github.com/flutter/buildroot.git' + '@' + '5ced4367fee2721f6eda34802dc28b1335637c63', 'src/third_party/rapidjson': Var('fuchsia_git') + '/third_party/rapidjson' + '@' + 'ef3564c5c8824989393b87df25355baf35ff544b', From 28bb94917c5286cc7b18231aac2e2d1039b83d97 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 20 Oct 2023 17:56:34 -0400 Subject: [PATCH 820/859] Roll Skia from cf2131f85d57 to e8c78601ecf6 (1 revision) (#47178) https://skia.googlesource.com/skia.git/+log/cf2131f85d57..e8c78601ecf6 2023-10-20 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from e244f69ab982 to 33fa145f79cb (4 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 112d6d9ab3a29..1a34867b0caaf 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'cf2131f85d57f938472e50b6643c3c2348709a55', + 'skia_revision': 'e8c78601ecf626902a0ba74f7a7c1bccc90c354f', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From b6a8d32cdbae8b5cb34857947b4133067b6b3034 Mon Sep 17 00:00:00 2001 From: gaaclarke <30870216+gaaclarke@users.noreply.github.com> Date: Fri, 20 Oct 2023 16:40:06 -0700 Subject: [PATCH 821/859] [Impeller] increased padding for blurs (#47176) fixes https://github.com/flutter/flutter/issues/119974 This duplicates the math found in skia at https://skia.googlesource.com/skia/+/cf2131f85d57f938472e50b6643c3c2348709a55/gm/blurrect.cpp#484 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I signed the [CLA]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat --- impeller/aiks/aiks_unittests.cc | 16 ++++++++++++++++ .../entity/contents/solid_rrect_blur_contents.cc | 14 +++++++++++--- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/impeller/aiks/aiks_unittests.cc b/impeller/aiks/aiks_unittests.cc index 3dda081b04a74..b0e4139f4e6d3 100644 --- a/impeller/aiks/aiks_unittests.cc +++ b/impeller/aiks/aiks_unittests.cc @@ -3687,5 +3687,21 @@ TEST_P(AiksTest, ClearColorOptimizationWhenSubpassIsBiggerThanParentPass) { ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); } +TEST_P(AiksTest, BlurHasNoEdge) { + Canvas canvas; + canvas.Scale(GetContentScale()); + canvas.DrawPaint({}); + Paint blur = { + .color = Color::Green(), + .mask_blur_descriptor = + Paint::MaskBlurDescriptor{ + .style = FilterContents::BlurStyle::kNormal, + .sigma = Sigma(47.6), + }, + }; + canvas.DrawRect(Rect{300, 300, 200, 200}, blur); + ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); +} + } // namespace testing } // namespace impeller diff --git a/impeller/entity/contents/solid_rrect_blur_contents.cc b/impeller/entity/contents/solid_rrect_blur_contents.cc index 665cb599bc551..e549856dc1857 100644 --- a/impeller/entity/contents/solid_rrect_blur_contents.cc +++ b/impeller/entity/contents/solid_rrect_blur_contents.cc @@ -16,6 +16,14 @@ namespace impeller { +namespace { +// Generous padding to make sure blurs with large sigmas are fully visible. +// Used to expand the geometry around the rrect. +Scalar PadForSigma(Scalar sigma) { + return sigma * 4.0; +} +} // namespace + SolidRRectBlurContents::SolidRRectBlurContents() = default; SolidRRectBlurContents::~SolidRRectBlurContents() = default; @@ -44,7 +52,7 @@ std::optional SolidRRectBlurContents::GetCoverage( return std::nullopt; } - Scalar radius = sigma_.sigma * 2; + Scalar radius = PadForSigma(sigma_.sigma); auto ltrb = rect_->GetLTRB(); Rect bounds = Rect::MakeLTRB(ltrb[0] - radius, ltrb[1] - radius, @@ -66,9 +74,9 @@ bool SolidRRectBlurContents::Render(const ContentContext& renderer, // Clamp the max kernel width/height to 1000. auto blur_sigma = std::min(sigma_.sigma, 250.0f); - // Increase quality by make the radius a bit bigger than the typical + // Increase quality by making the radius a bit bigger than the typical // sigma->radius conversion we use for slower blurs. - auto blur_radius = blur_sigma * 2; + auto blur_radius = PadForSigma(blur_sigma); auto positive_rect = rect_->GetPositive(); { auto left = -blur_radius; From 5bb2d275f8bb6b85ecaab11d35700be3b7f38f69 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 20 Oct 2023 19:52:35 -0400 Subject: [PATCH 822/859] Roll Fuchsia Linux SDK from tcVA-iW-vOHPnwh_P... to vlmJ760j9c7Ng4Psy... (#47181) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jimgraham@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 1a34867b0caaf..b64d09ec95926 100644 --- a/DEPS +++ b/DEPS @@ -922,7 +922,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'tcVA-iW-vOHPnwh_PEqDBNKDOXwW3HSesjKKvZvusugC' + 'version': 'vlmJ760j9c7Ng4Psy9V-kOPC4mN98grDSr-ULajotEkC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index c849a0418759d..81ff0fbcc8797 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: 03aade588626ed70cfe1caaedce7a38d +Signature: 716e530b58afad030c23293bc57a0427 ==================================================================================================== LIBRARY: fuchsia_sdk From 753450db31f28d713c074e5fee9f12ee039edae4 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Fri, 20 Oct 2023 17:19:24 -0700 Subject: [PATCH 823/859] [Impeller] Fix cmd pool reset from background thread. (#47184) Make sure to clear the buffers before assigning to the recycler, as the dtor was racing with the raster thread usage. --- impeller/renderer/backend/vulkan/command_pool_vk.cc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/impeller/renderer/backend/vulkan/command_pool_vk.cc b/impeller/renderer/backend/vulkan/command_pool_vk.cc index 9d6f70d4eeb20..05354271b7f5d 100644 --- a/impeller/renderer/backend/vulkan/command_pool_vk.cc +++ b/impeller/renderer/backend/vulkan/command_pool_vk.cc @@ -40,6 +40,7 @@ class BackgroundCommandPoolVK final { if (!recycler) { return; } + buffers_.clear(); recycler->Reclaim(std::move(pool_)); } @@ -56,8 +57,6 @@ class BackgroundCommandPoolVK final { std::weak_ptr recycler_; }; -static bool kResetOnBackgroundThread = false; - CommandPoolVK::~CommandPoolVK() { if (!pool_) { return; @@ -75,10 +74,8 @@ CommandPoolVK::~CommandPoolVK() { auto reset_pool_when_dropped = BackgroundCommandPoolVK( std::move(pool_), std::move(collected_buffers_), recycler); - if (kResetOnBackgroundThread) { - UniqueResourceVKT pool( - context->GetResourceManager(), std::move(reset_pool_when_dropped)); - } + UniqueResourceVKT pool( + context->GetResourceManager(), std::move(reset_pool_when_dropped)); } // TODO(matanlurey): Return a status_or<> instead of {} when we have one. From ae494637839ebf839407db566d7bb1bf3ad205a0 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 20 Oct 2023 21:39:14 -0400 Subject: [PATCH 824/859] Roll Fuchsia Mac SDK from VTlSkkxOaJrlxj_vv... to cDqSrhjbSlSnSQsEw... (#47187) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jimgraham@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index b64d09ec95926..976723294c0d7 100644 --- a/DEPS +++ b/DEPS @@ -912,7 +912,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'VTlSkkxOaJrlxj_vv2f-dTwJ6fAXpF1GVsRyZqCadKkC' + 'version': 'cDqSrhjbSlSnSQsEwqeIs-iRffhGKV_CX8ZnsNOQoB4C' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From f9ddcf2bacb96a72f2df13c7276efddee72a56ec Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 20 Oct 2023 22:06:08 -0400 Subject: [PATCH 825/859] Roll Skia from e8c78601ecf6 to 51ac1b742c16 (1 revision) (#47188) https://skia.googlesource.com/skia.git/+log/e8c78601ecf6..51ac1b742c16 2023-10-21 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from acdd164d51ed to a44f2423e054 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 976723294c0d7..2cd035dbec047 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'e8c78601ecf626902a0ba74f7a7c1bccc90c354f', + 'skia_revision': '51ac1b742c16f501d9aa72bf90ad2c3f7b3c17e6', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 2ed206100f5e5ea1a91c96ee7f305eb1c62659cd Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 21 Oct 2023 06:23:06 -0400 Subject: [PATCH 826/859] Roll Skia from 51ac1b742c16 to 150d46055e1b (1 revision) (#47194) https://skia.googlesource.com/skia.git/+log/51ac1b742c16..150d46055e1b 2023-10-21 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 33fa145f79cb to 71c0085a0d16 (6 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,scroggo@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 2cd035dbec047..b118ed49c52b2 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '51ac1b742c16f501d9aa72bf90ad2c3f7b3c17e6', + 'skia_revision': '150d46055e1b5d8566a42f617273fd043a08e29e', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 6b7bd1a8119beea0e2afd818489a2dd6198cdd9a Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 21 Oct 2023 08:40:04 -0400 Subject: [PATCH 827/859] Roll Fuchsia Linux SDK from vlmJ760j9c7Ng4Psy... to 2vdBWAlJ_jVZXn8sK... (#47196) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jimgraham@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index b118ed49c52b2..c189e4106058a 100644 --- a/DEPS +++ b/DEPS @@ -922,7 +922,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'vlmJ760j9c7Ng4Psy9V-kOPC4mN98grDSr-ULajotEkC' + 'version': '2vdBWAlJ_jVZXn8sKAS_1OmK0JThvT5mbaDAVmDOC5YC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index 81ff0fbcc8797..daf7ba3eff49a 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: 716e530b58afad030c23293bc57a0427 +Signature: 4f6611bbc30bc82849906f3e7f59544e ==================================================================================================== LIBRARY: fuchsia_sdk From 02a05ba57903b92a43c8a566670e228de44913af Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 21 Oct 2023 10:13:33 -0400 Subject: [PATCH 828/859] Roll Fuchsia Mac SDK from cDqSrhjbSlSnSQsEw... to PfonQwPSPnS7KBNLw... (#47197) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jimgraham@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index c189e4106058a..1db9a9f56a5d6 100644 --- a/DEPS +++ b/DEPS @@ -912,7 +912,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'cDqSrhjbSlSnSQsEwqeIs-iRffhGKV_CX8ZnsNOQoB4C' + 'version': 'PfonQwPSPnS7KBNLw6DWpJPBm_zmA_NrttnZdx-ebcAC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 9aa1ffb41f09eb586f6cc215dd644b142dccbc93 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 21 Oct 2023 21:30:41 -0400 Subject: [PATCH 829/859] Roll Fuchsia Linux SDK from 2vdBWAlJ_jVZXn8sK... to 00DU5P-zlAl6661kG... (#47198) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jimgraham@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 1db9a9f56a5d6..bf7ba21d02503 100644 --- a/DEPS +++ b/DEPS @@ -922,7 +922,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': '2vdBWAlJ_jVZXn8sKAS_1OmK0JThvT5mbaDAVmDOC5YC' + 'version': '00DU5P-zlAl6661kGHgmJwKw0EF6ZG77i4Th65VR_ecC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index daf7ba3eff49a..42af86e41c653 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: 4f6611bbc30bc82849906f3e7f59544e +Signature: a5e546e7304956941e87271c7df545af ==================================================================================================== LIBRARY: fuchsia_sdk From 65e8c3793c1744627ffbc210b5f3f6a384892782 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sat, 21 Oct 2023 22:46:22 -0400 Subject: [PATCH 830/859] Roll Fuchsia Mac SDK from PfonQwPSPnS7KBNLw... to IT8jf11vpF3Bot8HH... (#47199) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jimgraham@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index bf7ba21d02503..562b9e230cea0 100644 --- a/DEPS +++ b/DEPS @@ -912,7 +912,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'PfonQwPSPnS7KBNLw6DWpJPBm_zmA_NrttnZdx-ebcAC' + 'version': 'IT8jf11vpF3Bot8HH0_xN9al0wLYUYge9DeyPRLVTTkC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 8d3c1d9ee6c602d67eb24ff1770e14d568929565 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sun, 22 Oct 2023 10:06:22 -0400 Subject: [PATCH 831/859] Roll Skia from 150d46055e1b to fbc238393b47 (1 revision) (#47201) https://skia.googlesource.com/skia.git/+log/150d46055e1b..fbc238393b47 2023-10-22 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 71c0085a0d16 to ece88f1b2828 (1 revision) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,robertphillips@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 562b9e230cea0..55277428aadfb 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '150d46055e1b5d8566a42f617273fd043a08e29e', + 'skia_revision': 'fbc238393b47bae8c20f07fd115a660d6884039b', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From d7bb42f41a270d54ab4d9f88cf1e100196c2423d Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sun, 22 Oct 2023 10:16:11 -0400 Subject: [PATCH 832/859] Roll Fuchsia Linux SDK from 00DU5P-zlAl6661kG... to V4q-PLgyTbkCdf8Zo... (#47202) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jimgraham@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 55277428aadfb..3080a2188d744 100644 --- a/DEPS +++ b/DEPS @@ -922,7 +922,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': '00DU5P-zlAl6661kGHgmJwKw0EF6ZG77i4Th65VR_ecC' + 'version': 'V4q-PLgyTbkCdf8ZoME5_edi6GYkucC6dk9wkw7XLNAC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index 42af86e41c653..4f90cb18fe7d5 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: a5e546e7304956941e87271c7df545af +Signature: 0fe3ee87896948e29956db2de14cc16e ==================================================================================================== LIBRARY: fuchsia_sdk From 0a54047a9d5f9dce1d30529c86d99ce37c100868 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sun, 22 Oct 2023 11:22:17 -0400 Subject: [PATCH 833/859] Roll Fuchsia Mac SDK from IT8jf11vpF3Bot8HH... to kUMDo17HHiZKJNlp4... (#47203) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jimgraham@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 3080a2188d744..7054f981b2a00 100644 --- a/DEPS +++ b/DEPS @@ -912,7 +912,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'IT8jf11vpF3Bot8HH0_xN9al0wLYUYge9DeyPRLVTTkC' + 'version': 'kUMDo17HHiZKJNlp4Up8QhT1DCMbGCwphcNeap3dMS8C' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 2ad9d54f4ee4999b11e5d50f9799cfbb8011a6ec Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sun, 22 Oct 2023 22:53:28 -0400 Subject: [PATCH 834/859] Roll Fuchsia Linux SDK from V4q-PLgyTbkCdf8Zo... to qCxi4ThERe1MpDT9C... (#47211) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jimgraham@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 7054f981b2a00..099e7aff9ef4a 100644 --- a/DEPS +++ b/DEPS @@ -922,7 +922,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'V4q-PLgyTbkCdf8ZoME5_edi6GYkucC6dk9wkw7XLNAC' + 'version': 'qCxi4ThERe1MpDT9CW4oNEocUCbBLVmzyAkKcNtAxv4C' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', From 70d335dabeefb3bcd873bbd376a6b06e7e6b8a8b Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Sun, 22 Oct 2023 23:01:23 -0400 Subject: [PATCH 835/859] Roll Skia from fbc238393b47 to 2476ef80672f (1 revision) (#47210) https://skia.googlesource.com/skia.git/+log/fbc238393b47..2476ef80672f 2023-10-23 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from ece88f1b2828 to 4ebfec0b5f53 (1 revision) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,robertphillips@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 099e7aff9ef4a..5fe5756034cc2 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'fbc238393b47bae8c20f07fd115a660d6884039b', + 'skia_revision': '2476ef80672fc361a59b521fcae94d0836346bdc', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From fe1d2dd51847401dfabefd4eab9cdb4d32e716b3 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 23 Oct 2023 00:03:10 -0400 Subject: [PATCH 836/859] Roll Fuchsia Mac SDK from kUMDo17HHiZKJNlp4... to nGgFMB0Tjnpr-pvTY... (#47212) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jimgraham@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 5fe5756034cc2..969ad1eb8e0e7 100644 --- a/DEPS +++ b/DEPS @@ -912,7 +912,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'kUMDo17HHiZKJNlp4Up8QhT1DCMbGCwphcNeap3dMS8C' + 'version': 'nGgFMB0Tjnpr-pvTYdxMBngF68l15LM9aExctS3wpD4C' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 4da6e2739eb2b9efc84a56c42d2f3bf64e7fdd57 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 23 Oct 2023 01:20:38 -0400 Subject: [PATCH 837/859] Roll Skia from 2476ef80672f to a0515f94dfee (1 revision) (#47213) https://skia.googlesource.com/skia.git/+log/2476ef80672f..a0515f94dfee 2023-10-23 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 91b84ac6d8ea to d9ec9befba05 (3 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,robertphillips@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 969ad1eb8e0e7..c1804e2852324 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '2476ef80672fc361a59b521fcae94d0836346bdc', + 'skia_revision': 'a0515f94dfeeee584a59c43f0a8be77e5cf7c80c', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 3971b153d710e976f82c00d2500763e6e5c7fa5a Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 23 Oct 2023 02:10:00 -0400 Subject: [PATCH 838/859] Roll Skia from a0515f94dfee to 3f7302e44c94 (3 revisions) (#47214) https://skia.googlesource.com/skia.git/+log/a0515f94dfee..3f7302e44c94 2023-10-23 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from 7923feb1aa82 to 1d90f548f72f 2023-10-23 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Dawn from 68aac47724f2 to e7c82ebc0260 (15 revisions) 2023-10-23 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from acdd164d51ed to 7923feb1aa82 (8 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,robertphillips@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index c1804e2852324..f9f426ad3d8c0 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'a0515f94dfeeee584a59c43f0a8be77e5cf7c80c', + 'skia_revision': '3f7302e44c94db1adfa40d3e16112b57e37573d8', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index c268df7a5cc0d..95629ae6a0a28 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 87bded776e4111cd3ff856b2089f0d53 +Signature: e6ddb65fb702529e77ca81720dc5e086 ==================================================================================================== LIBRARY: etc1 From e46c561bb1938e962b011b7863acdbfeb0b642eb Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 23 Oct 2023 03:26:35 -0400 Subject: [PATCH 839/859] Roll Skia from 3f7302e44c94 to bce627e38d25 (1 revision) (#47215) https://skia.googlesource.com/skia.git/+log/3f7302e44c94..bce627e38d25 2023-10-23 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from d2de74510c4f to ec29008ac6cf (8 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,robertphillips@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index f9f426ad3d8c0..186fa624c2a41 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '3f7302e44c94db1adfa40d3e16112b57e37573d8', + 'skia_revision': 'bce627e38d256d9643f62b8d3c844b5663c3607c', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From cf4077d7a8fe9a71e7025fa3b6d9dbc56c8b9633 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 23 Oct 2023 10:29:39 -0400 Subject: [PATCH 840/859] Roll Skia from bce627e38d25 to 90658830b8ce (3 revisions) (#47220) https://skia.googlesource.com/skia.git/+log/bce627e38d25..90658830b8ce 2023-10-23 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll vulkan-deps from 4ebfec0b5f53 to d01276172017 (7 revisions) 2023-10-23 ccameron@chromium.org SkCodec: Consolidate Tiff parsing functions 2023-10-23 egdaniel@google.com Reland "When waiting on client provided semaphores, only block fragment stage work." If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,robertphillips@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 186fa624c2a41..63e6b107b826a 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'bce627e38d256d9643f62b8d3c844b5663c3607c', + 'skia_revision': '90658830b8ceed9ad1c67a3066f505d8bba4e0e6', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 95629ae6a0a28..e0330627ca861 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: e6ddb65fb702529e77ca81720dc5e086 +Signature: 29e77a3e36dfb50e6540effa64e3a1a4 ==================================================================================================== LIBRARY: etc1 @@ -395,6 +395,7 @@ FILE: ../../../third_party/skia/relnotes/readbuffer-deserial.md FILE: ../../../third_party/skia/relnotes/recorder-static-member.md FILE: ../../../third_party/skia/relnotes/typeface.md FILE: ../../../third_party/skia/relnotes/vk-directcontext.md +FILE: ../../../third_party/skia/relnotes/waitSemaphore.md FILE: ../../../third_party/skia/src/gpu/gpu_workaround_list.txt FILE: ../../../third_party/skia/src/ports/fontations/Cargo.toml FILE: ../../../third_party/skia/src/sksl/generated/sksl_compute.minified.sksl From e0c95b48d60929d97ca2dae80a38efcc7d3fcf21 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 23 Oct 2023 11:14:59 -0400 Subject: [PATCH 841/859] Roll Skia from 90658830b8ce to 47c408712efd (1 revision) (#47221) https://skia.googlesource.com/skia.git/+log/90658830b8ce..47c408712efd 2023-10-23 johnstiles@google.com Fix fuzzer-discovered assertion with atomic arrays. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,robertphillips@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 63e6b107b826a..f84094a2ddb32 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '90658830b8ceed9ad1c67a3066f505d8bba4e0e6', + 'skia_revision': '47c408712efd50e0a4d87337f3f474daa584587f', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index e0330627ca861..119d840e0c2e8 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 29e77a3e36dfb50e6540effa64e3a1a4 +Signature: 085b4e4089a1e5b3a85741dce1e4148d ==================================================================================================== LIBRARY: etc1 From 0722d3c8896135ab8c2f75d1037b4b50ccbc57ad Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 23 Oct 2023 11:30:16 -0400 Subject: [PATCH 842/859] Roll Fuchsia Linux SDK from qCxi4ThERe1MpDT9C... to uW96BsI9g7PF2on-4... (#47222) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine Please CC jimgraham@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index f84094a2ddb32..dc58f52158f6b 100644 --- a/DEPS +++ b/DEPS @@ -922,7 +922,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'qCxi4ThERe1MpDT9CW4oNEocUCbBLVmzyAkKcNtAxv4C' + 'version': 'uW96BsI9g7PF2on-4cgq0IQ0YqZXi1JaKSfvjMYMuSUC' } ], 'condition': 'host_os == "linux" and not download_fuchsia_sdk', From 38535bc1fdec16da2c368ea70634b0e918d9a722 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 23 Oct 2023 12:03:36 -0400 Subject: [PATCH 843/859] Roll Skia from 47c408712efd to acbc278f7600 (3 revisions) (#47223) https://skia.googlesource.com/skia.git/+log/47c408712efd..acbc278f7600 2023-10-23 johnstiles@google.com Fix fuzzer-discovered assertion with WGSL interface-block out arrays. 2023-10-23 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from d01276172017 to 0118db714186 (2 revisions) 2023-10-23 jvanverth@google.com [graphite] Don't store inversion state in RasterPathAtlas key. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,robertphillips@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index dc58f52158f6b..d6b844ff5a9dd 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '47c408712efd50e0a4d87337f3f474daa584587f', + 'skia_revision': 'acbc278f76006a3dc43050f9155603dd3e5a14ab', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 119d840e0c2e8..440e1bdf45104 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 085b4e4089a1e5b3a85741dce1e4148d +Signature: d1e49a9684150c99269529fc708e8a57 ==================================================================================================== LIBRARY: etc1 From 8b7a76260bd336cc1a44eb24c82b204df3b71fed Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 23 Oct 2023 12:44:04 -0400 Subject: [PATCH 844/859] Roll Fuchsia Mac SDK from nGgFMB0Tjnpr-pvTY... to a3CcHQHJIAEr-O2R0... (#47225) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/fuchsia-mac-sdk-flutter-engine Please CC jimgraham@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index d6b844ff5a9dd..d521fab7c1af6 100644 --- a/DEPS +++ b/DEPS @@ -912,7 +912,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'nGgFMB0Tjnpr-pvTYdxMBngF68l15LM9aExctS3wpD4C' + 'version': 'a3CcHQHJIAEr-O2R058jFagcmGvry9ngm-HgLq7RY_YC' } ], 'condition': 'host_os == "mac" and not download_fuchsia_sdk', From 79bc6a96b34a4a6cf0e5493f9a61fc4cc0310a58 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 23 Oct 2023 13:03:12 -0400 Subject: [PATCH 845/859] Roll Skia from acbc278f7600 to 49fa29c8b153 (1 revision) (#47226) https://skia.googlesource.com/skia.git/+log/acbc278f7600..49fa29c8b153 2023-10-23 johnstiles@google.com Simplify lighting filter slightly. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,robertphillips@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index d521fab7c1af6..ff16d5791353d 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'acbc278f76006a3dc43050f9155603dd3e5a14ab', + 'skia_revision': '49fa29c8b153d5a7ddd8bd8f18255c74071524d1', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 440e1bdf45104..b4073541c90b2 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: d1e49a9684150c99269529fc708e8a57 +Signature: 7bffd23160ad061bd8a42b7b16ff81a8 ==================================================================================================== LIBRARY: etc1 From a39697ee75e98fb34420995718cfd2ab6ed48ad2 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 23 Oct 2023 13:47:57 -0400 Subject: [PATCH 846/859] Roll Skia from 49fa29c8b153 to d27ff651a99b (1 revision) (#47227) https://skia.googlesource.com/skia.git/+log/49fa29c8b153..d27ff651a99b 2023-10-23 nscobie@google.com Fix SkCodecPrintf compilation failure in SkTiffUtility.cpp If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,robertphillips@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index ff16d5791353d..d6373bbf98040 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '49fa29c8b153d5a7ddd8bd8f18255c74071524d1', + 'skia_revision': 'd27ff651a99bf30e890e0450d1a19cdf66e25f75', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index b4073541c90b2..82345140cc22a 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 7bffd23160ad061bd8a42b7b16ff81a8 +Signature: 96d2309e412573b021116301f0d0fde3 ==================================================================================================== LIBRARY: etc1 From f6e260b800be591adb6e67ac48ff2b5d68a6f4fb Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Mon, 23 Oct 2023 11:45:18 -0700 Subject: [PATCH 847/859] [Impeller] Disable raster stats service protocol. (#47206) As far as I can tell, this functionality has _always_ been falling back to software rendering with Skia when Impeller was enabled. This is at best extremely misleading. Since I started putting Impeller specific objects in the display list it introduced crashes, and must be disabled. Fixes https://github.com/flutter/flutter/issues/136847 --- flow/layers/layer_tree.h | 2 ++ shell/common/shell.cc | 7 ++++++ shell/common/shell_unittests.cc | 41 +++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+) diff --git a/flow/layers/layer_tree.h b/flow/layers/layer_tree.h index af162d58e0c4f..416096860d08c 100644 --- a/flow/layers/layer_tree.h +++ b/flow/layers/layer_tree.h @@ -70,6 +70,8 @@ class LayerTree { /// When `Paint` is called, if leaf layer tracing is enabled, additional /// metadata around raterization of leaf layers is collected. /// + /// This is not supported in the Impeller backend. + /// /// See: `LayerSnapshotStore` void enable_leaf_layer_tracing(bool enable) { enable_leaf_layer_tracing_ = enable; diff --git a/shell/common/shell.cc b/shell/common/shell.cc index a6ba487b581f7..731cdcc19d137 100644 --- a/shell/common/shell.cc +++ b/shell/common/shell.cc @@ -1972,6 +1972,13 @@ bool Shell::OnServiceProtocolRenderFrameWithRasterStats( rapidjson::Document* response) { FML_DCHECK(task_runners_.GetRasterTaskRunner()->RunsTasksOnCurrentThread()); + // Impeller does not support this protocol method. + if (io_manager_->GetImpellerContext()) { + const char* error = "Raster status not supported on Impeller backend."; + ServiceProtocolFailureError(response, error); + return false; + } + // TODO(dkwingsmt): This method only handles view #0, including the snapshot // and the frame size. We need to adapt this method to multi-view. // https://github.com/flutter/flutter/issues/131892 diff --git a/shell/common/shell_unittests.cc b/shell/common/shell_unittests.cc index f899d5c5ede97..9914593728717 100644 --- a/shell/common/shell_unittests.cc +++ b/shell/common/shell_unittests.cc @@ -2709,6 +2709,47 @@ TEST_F(ShellTest, OnServiceProtocolRenderFrameWithRasterStatsWorks) { DestroyShell(std::move(shell)); } +#if defined(FML_OS_MACOSX) +TEST_F(ShellTest, OnServiceProtocolRenderFrameWithRasterStatsDisableImpeller) { + auto settings = CreateSettingsForFixture(); + settings.enable_impeller = true; + std::unique_ptr shell = CreateShell({ + .settings = settings, + .platform_view_create_callback = ShellTestPlatformViewBuilder({ + .rendering_backend = + ShellTestPlatformView::BackendType::kMetalBackend, + }), + }); + + // Create the surface needed by rasterizer + PlatformViewNotifyCreated(shell.get()); + + auto configuration = RunConfiguration::InferFromSettings(settings); + configuration.SetEntrypoint("scene_with_red_box"); + + RunEngine(shell.get(), std::move(configuration)); + PumpOneFrame(shell.get()); + + ServiceProtocol::Handler::ServiceProtocolMap empty_params; + rapidjson::Document document; + OnServiceProtocol( + shell.get(), ServiceProtocolEnum::kRenderFrameWithRasterStats, + shell->GetTaskRunners().GetRasterTaskRunner(), empty_params, &document); + rapidjson::StringBuffer buffer; + rapidjson::Writer writer(buffer); + document.Accept(writer); + std::string actual_json = buffer.GetString(); + std::string expected_json = + "{\"code\":-32000,\"message\":\"Raster status not supported on Impeller " + "backend.\"}"; + + ASSERT_EQ(actual_json, expected_json); + + PlatformViewNotifyDestroyed(shell.get()); + DestroyShell(std::move(shell)); +} +#endif // FML_OS_MACOSX + // TODO(https://github.com/flutter/flutter/issues/100273): Disabled due to // flakiness. // TODO(https://github.com/flutter/flutter/issues/100299): Fix it when From 799bcb427f2d160350427796f1c70f2e1c026bb4 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Mon, 23 Oct 2023 11:53:56 -0700 Subject: [PATCH 848/859] [Impeller] remove image upload workarounds. (#47209) Testing locally I cant see any impact from this. Its possible the problem this "fixed" was instead fixed by affinity changes and now its no longer necessary. See https://github.com/flutter/engine/pull/43493 . --- lib/ui/painting/image_decoder_impeller.cc | 46 ++--------------------- 1 file changed, 3 insertions(+), 43 deletions(-) diff --git a/lib/ui/painting/image_decoder_impeller.cc b/lib/ui/painting/image_decoder_impeller.cc index 02380442984af..9be5f0c631ee6 100644 --- a/lib/ui/painting/image_decoder_impeller.cc +++ b/lib/ui/painting/image_decoder_impeller.cc @@ -10,14 +10,13 @@ #include "flutter/fml/make_copyable.h" #include "flutter/fml/trace_event.h" #include "flutter/impeller/core/allocator.h" -#include "flutter/impeller/core/texture.h" #include "flutter/impeller/display_list/dl_image_impeller.h" #include "flutter/impeller/renderer/command_buffer.h" #include "flutter/impeller/renderer/context.h" -#include "flutter/lib/ui/painting/image_decoder_skia.h" #include "impeller/base/strings.h" #include "impeller/display_list/skia_conversions.h" #include "impeller/geometry/size.h" + #include "third_party/skia/include/core/SkAlphaType.h" #include "third_party/skia/include/core/SkBitmap.h" #include "third_party/skia/include/core/SkColorSpace.h" @@ -32,42 +31,6 @@ namespace flutter { -class MallocDeviceBuffer : public impeller::DeviceBuffer { - public: - explicit MallocDeviceBuffer(impeller::DeviceBufferDescriptor desc) - : impeller::DeviceBuffer(desc) { - data_ = static_cast(malloc(desc.size)); - } - - ~MallocDeviceBuffer() override { free(data_); } - - bool SetLabel(const std::string& label) override { return true; } - - bool SetLabel(const std::string& label, impeller::Range range) override { - return true; - } - - uint8_t* OnGetContents() const override { return data_; } - - bool OnCopyHostBuffer(const uint8_t* source, - impeller::Range source_range, - size_t offset) override { - memcpy(data_ + offset, source + source_range.offset, source_range.length); - return true; - } - - private: - uint8_t* data_; - - FML_DISALLOW_COPY_AND_ASSIGN(MallocDeviceBuffer); -}; - -#ifdef FML_OS_ANDROID -static constexpr bool kShouldUseMallocDeviceBuffer = true; -#else -static constexpr bool kShouldUseMallocDeviceBuffer = false; -#endif // FML_OS_ANDROID - namespace { /** * Loads the gamut as a set of three points (triangle). @@ -522,8 +485,7 @@ void ImageDecoderImpeller::Decode(fml::RefPtr descriptor, gpu_disabled_switch]() { sk_sp image; std::string decode_error; - if (!kShouldUseMallocDeviceBuffer && - context->GetCapabilities()->SupportsBufferToTextureBlits()) { + if (context->GetCapabilities()->SupportsBufferToTextureBlits()) { std::tie(image, decode_error) = UploadTextureToPrivate( context, bitmap_result.device_buffer, bitmap_result.image_info, bitmap_result.sk_bitmap, gpu_disabled_switch); @@ -567,9 +529,7 @@ bool ImpellerAllocator::allocPixelRef(SkBitmap* bitmap) { (bitmap->width() * bitmap->bytesPerPixel()); std::shared_ptr device_buffer = - kShouldUseMallocDeviceBuffer - ? std::make_shared(descriptor) - : allocator_->CreateBuffer(descriptor); + allocator_->CreateBuffer(descriptor); struct ImpellerPixelRef final : public SkPixelRef { ImpellerPixelRef(int w, int h, void* s, size_t r) From 20cd4bb33405cad5c1e06244e49186c501e27f91 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 23 Oct 2023 15:04:16 -0400 Subject: [PATCH 849/859] Roll Skia from d27ff651a99b to 8a0324990bf5 (1 revision) (#47229) https://skia.googlesource.com/skia.git/+log/d27ff651a99b..8a0324990bf5 2023-10-23 nscobie@google.com 2nd SkCodecPrintf compilation fix for SkTiffUtility.cpp If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,robertphillips@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index d6373bbf98040..49bfaecd9137f 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'd27ff651a99bf30e890e0450d1a19cdf66e25f75', + 'skia_revision': '8a0324990bf5dccb5fec6096fc211c1b9ebad83b', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 82345140cc22a..7628be6d7c80f 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 96d2309e412573b021116301f0d0fde3 +Signature: abf16d27dffaf07124ace9fe3cb250b8 ==================================================================================================== LIBRARY: etc1 From f0e2b6de2c42d3981da3b3605105c213074278c9 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Mon, 23 Oct 2023 12:08:10 -0700 Subject: [PATCH 850/859] Update to the latest package:test (#46592) - Update the pinned version of `test` to the latest published. - Add support for reading the `source.location` of messages to the JS interop library. - Update `host.dart` to support the new communication pattern with the test frame. See https://github.com/dart-lang/test/issues/2065 - Use `Runtime.edge` for the edge browser. We may deprecate or remove the constant. Edge is a more appropriate value for this usage. --- lib/web_ui/dev/edge.dart | 2 +- lib/web_ui/lib/src/engine/dom.dart | 25 +++++++++++ lib/web_ui/pubspec.yaml | 4 +- web_sdk/pubspec.yaml | 2 +- .../web_engine_tester/lib/static/host.dart | 43 +++++++++---------- web_sdk/web_engine_tester/pubspec.yaml | 2 +- 6 files changed, 51 insertions(+), 27 deletions(-) diff --git a/lib/web_ui/dev/edge.dart b/lib/web_ui/dev/edge.dart index 032071ae8b3dc..db264f459135b 100644 --- a/lib/web_ui/dev/edge.dart +++ b/lib/web_ui/dev/edge.dart @@ -24,7 +24,7 @@ class EdgeEnvironment implements BrowserEnvironment { } @override - Runtime get packageTestRuntime => Runtime.internetExplorer; + Runtime get packageTestRuntime => Runtime.edge; @override Future prepare() async { diff --git a/lib/web_ui/lib/src/engine/dom.dart b/lib/web_ui/lib/src/engine/dom.dart index 733a43c82fddf..9eab879b37c63 100644 --- a/lib/web_ui/lib/src/engine/dom.dart +++ b/lib/web_ui/lib/src/engine/dom.dart @@ -3027,6 +3027,31 @@ extension DomMessageEventExtension on DomMessageEvent { @JS('origin') external JSString get _origin; String get origin => _origin.toDart; + + /// The source may be a `WindowProxy`, a `MessagePort`, or a `ServiceWorker`. + /// + /// When a message is sent from an iframe through `window.parent.postMessage` + /// the source will be a `WindowProxy` which has the same methods as [Window]. + DomMessageEventSource get source => js_util.getProperty(this, 'source'); + + List get ports => + js_util.getProperty>(this, 'ports').cast(); +} + +@JS() +@staticInterop +class DomMessageEventSource {} + +extension DomMEssageEventSourceExtension on DomMessageEventSource { + external DomMessageEventLocation? get location; +} + +@JS() +@staticInterop +class DomMessageEventLocation {} + +extension DomMessageEventSourceExtension on DomMessageEventLocation { + external String? get href; } @JS() diff --git a/lib/web_ui/pubspec.yaml b/lib/web_ui/pubspec.yaml index 42d44d2894061..1b53ead9bd9c8 100644 --- a/lib/web_ui/pubspec.yaml +++ b/lib/web_ui/pubspec.yaml @@ -27,7 +27,7 @@ dev_dependencies: http: 1.1.0 http_multi_server: any image: 3.0.1 - matcher: 0.12.14 + matcher: 0.12.16 package_config: any path: 1.8.0 pool: any @@ -38,7 +38,7 @@ dev_dependencies: shelf_web_socket: any stack_trace: any stream_channel: 2.1.1 - test: 1.22.1 + test: 1.24.8 test_api: any test_core: any typed_data: any diff --git a/web_sdk/pubspec.yaml b/web_sdk/pubspec.yaml index e6932e6ea68bc..9d413a1cc5992 100644 --- a/web_sdk/pubspec.yaml +++ b/web_sdk/pubspec.yaml @@ -13,7 +13,7 @@ dev_dependencies: # up-to-date instead of a version from pub, which may not have the latest # language features enabled. analyzer: any - test: 1.22.1 + test: 1.24.8 dependency_overrides: # Must include all transitive dependencies from the "any" packages above. _fe_analyzer_shared: diff --git a/web_sdk/web_engine_tester/lib/static/host.dart b/web_sdk/web_engine_tester/lib/static/host.dart index bbd59c215fae9..9c8f0d8106b40 100644 --- a/web_sdk/web_engine_tester/lib/static/host.dart +++ b/web_sdk/web_engine_tester/lib/static/host.dart @@ -207,14 +207,8 @@ StreamChannel _connectToIframe(String url, int id) { ..height = '1000'; domDocument.body!.appendChild(iframe); - // Use this to communicate securely with the iframe. - final DomMessageChannel channel = createDomMessageChannel(); final StreamChannelController controller = StreamChannelController(sync: true); - // Use this to avoid sending a message to the iframe before it's sent a - // message to us. This ensures that no messages get dropped on the floor. - final Completer readyCompleter = Completer(); - final List domSubscriptions = []; final List> streamSubscriptions = >[]; _domSubscriptions[id] = domSubscriptions; @@ -229,20 +223,35 @@ StreamChannel _connectToIframe(String url, int id) { if (message.origin != domWindow.location.origin) { return; } - - if (message.data['href'] != iframe.src) { + if (message.source.location?.href != iframe.src) { return; } message.stopPropagation(); - if (message.data['ready'] == true) { + if (message.data == 'port') { + final DomMessagePort port = message.ports.first; + domSubscriptions.add( + DomSubscription(port, 'message',(DomEvent event) { + controller.local.sink.add((event as DomMessageEvent).data); + })); + port.start(); + streamSubscriptions.add(controller.local.stream.listen(port.postMessage)); + } else if (message.data['ready'] == true) { // This message indicates that the iframe is actively listening for // events, so the message channel's second port can now be transferred. + final DomMessageChannel channel = createDomMessageChannel(); + channel.port1.start(); channel.port2.start(); - iframe.contentWindow.postMessage('port', domWindow.location.origin, - [channel.port2]); - readyCompleter.complete(); + iframe.contentWindow.postMessage( + 'port', domWindow.location.origin, [channel.port2]); + domSubscriptions + .add(DomSubscription(channel.port1, 'message', (DomEvent message) { + controller.local.sink.add((message as DomMessageEvent).data['data']); + })); + + streamSubscriptions + .add(controller.local.stream.listen(channel.port1.postMessage)); } else if (message.data['exception'] == true) { // This message from `dart.js` indicates that an exception occurred // loading the test. @@ -250,16 +259,6 @@ StreamChannel _connectToIframe(String url, int id) { } })); - channel.port1.start(); - domSubscriptions.add(DomSubscription(channel.port1, 'message', - (DomEvent message) { - controller.local.sink.add((message as DomMessageEvent).data['data']); - })); - - streamSubscriptions.add(controller.local.stream.listen((dynamic message) async { - await readyCompleter.future; - channel.port1.postMessage(message); - })); return controller.foreign; } diff --git a/web_sdk/web_engine_tester/pubspec.yaml b/web_sdk/web_engine_tester/pubspec.yaml index dbb9dccf4d881..dadc9948addb8 100644 --- a/web_sdk/web_engine_tester/pubspec.yaml +++ b/web_sdk/web_engine_tester/pubspec.yaml @@ -7,7 +7,7 @@ environment: dependencies: js: 0.6.4 stream_channel: 2.1.1 - test: 1.22.1 + test: 1.24.8 webkit_inspection_protocol: 1.0.0 stack_trace: 1.10.0 ui: From 72d4d6ae00b1761b854de8958f8bdd4011031625 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 23 Oct 2023 15:47:35 -0400 Subject: [PATCH 851/859] Roll Skia from 8a0324990bf5 to 4976279e4441 (1 revision) (#47230) https://skia.googlesource.com/skia.git/+log/8a0324990bf5..4976279e4441 2023-10-23 jvanverth@google.com Add some checks in GrDrawOpAtlas. If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,robertphillips@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 49bfaecd9137f..887d12ab4c2de 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '8a0324990bf5dccb5fec6096fc211c1b9ebad83b', + 'skia_revision': '4976279e4441a559b63bf7d0c76e22f072957dec', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 7628be6d7c80f..341af48f6b66f 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: abf16d27dffaf07124ace9fe3cb250b8 +Signature: c3073afa753b36b5069f1287dbbcd21d ==================================================================================================== LIBRARY: etc1 From eab9982c1bdaf9bae71dc191db1a1f97f51ad46b Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 23 Oct 2023 16:23:52 -0400 Subject: [PATCH 852/859] Roll Skia from 4976279e4441 to d534571c4bc3 (1 revision) (#47231) https://skia.googlesource.com/skia.git/+log/4976279e4441..d534571c4bc3 2023-10-23 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll Dawn from e7c82ebc0260 to e2319672168f (4 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,robertphillips@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 887d12ab4c2de..db113f9a156e8 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '4976279e4441a559b63bf7d0c76e22f072957dec', + 'skia_revision': 'd534571c4bc3a99665adb2ce4719dceebc38032d', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 4ce031fdfa671d5f9fd623425c9cd17f2bef9930 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Mon, 23 Oct 2023 13:29:52 -0700 Subject: [PATCH 853/859] [Impeller] Vk query cleanups. (#47208) Use RAII to more accurately capture cmd buffer start/end, with additional protections for early frame ending. This also allows us to capture the execution time of the final cmd buffer, which should fix https://github.com/flutter/flutter/issues/136971 --- .../backend/vulkan/command_encoder_vk.cc | 41 +++++----- .../backend/vulkan/command_encoder_vk.h | 6 +- .../renderer/backend/vulkan/gpu_tracer_vk.cc | 74 ++++++++++++++----- .../renderer/backend/vulkan/gpu_tracer_vk.h | 69 ++++++++++++----- .../backend/vulkan/swapchain_impl_vk.cc | 6 +- .../vulkan/test/gpu_tracer_unittests.cc | 71 ++++++++++++------ 6 files changed, 176 insertions(+), 91 deletions(-) diff --git a/impeller/renderer/backend/vulkan/command_encoder_vk.cc b/impeller/renderer/backend/vulkan/command_encoder_vk.cc index d963d8519f12a..4bd8f69391eb3 100644 --- a/impeller/renderer/backend/vulkan/command_encoder_vk.cc +++ b/impeller/renderer/backend/vulkan/command_encoder_vk.cc @@ -16,8 +16,9 @@ class TrackedObjectsVK { public: explicit TrackedObjectsVK( const std::weak_ptr& device_holder, - const std::shared_ptr& pool) - : desc_pool_(device_holder) { + const std::shared_ptr& pool, + std::unique_ptr probe) + : desc_pool_(device_holder), probe_(std::move(probe)) { if (!pool) { return; } @@ -78,6 +79,8 @@ class TrackedObjectsVK { DescriptorPoolVK& GetDescriptorPool() { return desc_pool_; } + GPUProbe& GetGPUProbe() const { return *probe_.get(); } + private: DescriptorPoolVK desc_pool_; // `shared_ptr` since command buffers have a link to the command pool. @@ -86,6 +89,7 @@ class TrackedObjectsVK { std::set> tracked_objects_; std::set> tracked_buffers_; std::set> tracked_textures_; + std::unique_ptr probe_; bool is_valid_ = false; FML_DISALLOW_COPY_AND_ASSIGN(TrackedObjectsVK); @@ -115,7 +119,8 @@ std::shared_ptr CommandEncoderFactoryVK::Create() { } auto tracked_objects = std::make_shared( - context_vk.GetDeviceHolder(), tls_pool); + context_vk.GetDeviceHolder(), tls_pool, + context->GetGPUTracer()->CreateGPUProbe()); auto queue = context_vk.GetGraphicsQueue(); if (!tracked_objects || !tracked_objects->IsValid() || !queue) { @@ -134,25 +139,23 @@ std::shared_ptr CommandEncoderFactoryVK::Create() { context_vk.SetDebugName(tracked_objects->GetCommandBuffer(), label_.value()); } - context->GetGPUTracer()->RecordCmdBufferStart( + tracked_objects->GetGPUProbe().RecordCmdBufferStart( tracked_objects->GetCommandBuffer()); - return std::make_shared( - context_vk.GetDeviceHolder(), tracked_objects, queue, - context_vk.GetFenceWaiter(), context->GetGPUTracer()); + return std::make_shared(context_vk.GetDeviceHolder(), + tracked_objects, queue, + context_vk.GetFenceWaiter()); } CommandEncoderVK::CommandEncoderVK( std::weak_ptr device_holder, std::shared_ptr tracked_objects, const std::shared_ptr& queue, - std::shared_ptr fence_waiter, - const std::shared_ptr& gpu_tracer) + std::shared_ptr fence_waiter) : device_holder_(std::move(device_holder)), tracked_objects_(std::move(tracked_objects)), queue_(queue), - fence_waiter_(std::move(fence_waiter)), - gpu_tracer_(gpu_tracer) {} + fence_waiter_(std::move(fence_waiter)) {} CommandEncoderVK::~CommandEncoderVK() = default; @@ -183,23 +186,20 @@ bool CommandEncoderVK::Submit(SubmitCallback callback) { auto command_buffer = GetCommandBuffer(); - auto end_frame = gpu_tracer_->RecordCmdBufferEnd(command_buffer); + tracked_objects_->GetGPUProbe().RecordCmdBufferEnd(command_buffer); auto status = command_buffer.end(); if (status != vk::Result::eSuccess) { - gpu_tracer_->OnFenceComplete(end_frame, false); VALIDATION_LOG << "Failed to end command buffer: " << vk::to_string(status); return false; } std::shared_ptr strong_device = device_holder_.lock(); if (!strong_device) { - gpu_tracer_->OnFenceComplete(end_frame, false); VALIDATION_LOG << "Device lost."; return false; } auto [fence_result, fence] = strong_device->GetDevice().createFenceUnique({}); if (fence_result != vk::Result::eSuccess) { - gpu_tracer_->OnFenceComplete(end_frame, false); VALIDATION_LOG << "Failed to create fence: " << vk::to_string(fence_result); return false; } @@ -209,7 +209,6 @@ bool CommandEncoderVK::Submit(SubmitCallback callback) { submit_info.setCommandBuffers(buffers); status = queue_->Submit(submit_info, *fence); if (status != vk::Result::eSuccess) { - gpu_tracer_->OnFenceComplete(end_frame, false); VALIDATION_LOG << "Failed to submit queue: " << vk::to_string(status); return false; } @@ -217,14 +216,12 @@ bool CommandEncoderVK::Submit(SubmitCallback callback) { // Submit will proceed, call callback with true when it is done and do not // call when `reset` is collected. fail_callback = false; - auto gpu_tracer = gpu_tracer_; return fence_waiter_->AddFence( std::move(fence), - [callback, tracked_objects = std::move(tracked_objects_), gpu_tracer, - end_frame] { - if (end_frame.has_value()) { - gpu_tracer->OnFenceComplete(end_frame, true); - } + [callback, tracked_objects = std::move(tracked_objects_)]() mutable { + // Ensure tracked objects are destructed before calling any final + // callbacks. + tracked_objects.reset(); if (callback) { callback(true); } diff --git a/impeller/renderer/backend/vulkan/command_encoder_vk.h b/impeller/renderer/backend/vulkan/command_encoder_vk.h index 5a1e7d9d72948..641a776853abc 100644 --- a/impeller/renderer/backend/vulkan/command_encoder_vk.h +++ b/impeller/renderer/backend/vulkan/command_encoder_vk.h @@ -6,7 +6,6 @@ #include #include -#include #include "flutter/fml/macros.h" #include "impeller/renderer/backend/vulkan/command_pool_vk.h" @@ -26,6 +25,7 @@ class Texture; class TextureSourceVK; class TrackedObjectsVK; class FenceWaiterVK; +class GPUProbe; class CommandEncoderFactoryVK { public: @@ -51,8 +51,7 @@ class CommandEncoderVK { CommandEncoderVK(std::weak_ptr device_holder, std::shared_ptr tracked_objects, const std::shared_ptr& queue, - std::shared_ptr fence_waiter, - const std::shared_ptr& gpu_tracer); + std::shared_ptr fence_waiter); ~CommandEncoderVK(); @@ -91,7 +90,6 @@ class CommandEncoderVK { std::shared_ptr tracked_objects_; std::shared_ptr queue_; const std::shared_ptr fence_waiter_; - std::shared_ptr gpu_tracer_; bool is_valid_ = true; void Reset(); diff --git a/impeller/renderer/backend/vulkan/gpu_tracer_vk.cc b/impeller/renderer/backend/vulkan/gpu_tracer_vk.cc index 1d16f90661cf5..ea738ad269ce4 100644 --- a/impeller/renderer/backend/vulkan/gpu_tracer_vk.cc +++ b/impeller/renderer/backend/vulkan/gpu_tracer_vk.cc @@ -4,6 +4,8 @@ #include "impeller/renderer/backend/vulkan/gpu_tracer_vk.h" +#include +#include #include #include #include "fml/logging.h" @@ -47,7 +49,7 @@ void GPUTracerVK::MarkFrameEnd() { } Lock lock(trace_state_mutex_); - current_state_ = (current_state_ + 1) % 16; + current_state_ = (current_state_ + 1) % kTraceStatesSize; auto& state = trace_states_[current_state_]; // If there are still pending buffers on the trace state we're switching to, @@ -59,11 +61,15 @@ void GPUTracerVK::MarkFrameEnd() { state.pending_buffers = 0; state.current_index = 0; - state.contains_failure = false; in_frame_ = false; } -void GPUTracerVK::RecordCmdBufferStart(const vk::CommandBuffer& buffer) { +std::unique_ptr GPUTracerVK::CreateGPUProbe() { + return std::make_unique(weak_from_this()); +} + +void GPUTracerVK::RecordCmdBufferStart(const vk::CommandBuffer& buffer, + GPUProbe& probe) { if (!enabled_ || std::this_thread::get_id() != raster_thread_id_ || !in_frame_) { return; @@ -98,45 +104,47 @@ void GPUTracerVK::RecordCmdBufferStart(const vk::CommandBuffer& buffer) { buffer.writeTimestamp(vk::PipelineStageFlagBits::eTopOfPipe, trace_states_[current_state_].query_pool.get(), state.current_index); - state.pending_buffers += 1; state.current_index += 1; + if (!probe.index_.has_value()) { + state.pending_buffers += 1; + probe.index_ = current_state_; + } } -std::optional GPUTracerVK::RecordCmdBufferEnd( - const vk::CommandBuffer& buffer) { +void GPUTracerVK::RecordCmdBufferEnd(const vk::CommandBuffer& buffer, + GPUProbe& probe) { if (!enabled_ || std::this_thread::get_id() != raster_thread_id_ || !in_frame_) { - return std::nullopt; + return; } Lock lock(trace_state_mutex_); GPUTraceState& state = trace_states_[current_state_]; if (state.current_index >= kPoolSize) { - return current_state_; + return; } buffer.writeTimestamp(vk::PipelineStageFlagBits::eBottomOfPipe, state.query_pool.get(), state.current_index); state.current_index += 1; - return current_state_; + if (!probe.index_.has_value()) { + state.pending_buffers += 1; + probe.index_ = current_state_; + } } -void GPUTracerVK::OnFenceComplete(std::optional maybe_frame_index, - bool success) { - if (!enabled_ || !maybe_frame_index.has_value()) { +void GPUTracerVK::OnFenceComplete(size_t frame_index) { + if (!enabled_) { return; } - auto frame_index = maybe_frame_index.value(); Lock lock(trace_state_mutex_); GPUTraceState& state = trace_states_[frame_index]; - if (state.pending_buffers == 0) { - return; - } - state.contains_failure = !success; + + FML_DCHECK(state.pending_buffers > 0); state.pending_buffers -= 1; - if (state.pending_buffers == 0 && !state.contains_failure) { + if (state.pending_buffers == 0) { auto buffer_count = state.current_index; std::vector bits(buffer_count); @@ -171,4 +179,34 @@ void GPUTracerVK::OnFenceComplete(std::optional maybe_frame_index, } } +GPUProbe::GPUProbe(const std::weak_ptr& tracer) + : tracer_(tracer) {} + +GPUProbe::~GPUProbe() { + if (!index_.has_value()) { + return; + } + auto tracer = tracer_.lock(); + if (!tracer) { + return; + } + tracer->OnFenceComplete(index_.value()); +} + +void GPUProbe::RecordCmdBufferStart(const vk::CommandBuffer& buffer) { + auto tracer = tracer_.lock(); + if (!tracer) { + return; + } + tracer->RecordCmdBufferStart(buffer, *this); +} + +void GPUProbe::RecordCmdBufferEnd(const vk::CommandBuffer& buffer) { + auto tracer = tracer_.lock(); + if (!tracer) { + return; + } + tracer->RecordCmdBufferEnd(buffer, *this); +} + } // namespace impeller diff --git a/impeller/renderer/backend/vulkan/gpu_tracer_vk.h b/impeller/renderer/backend/vulkan/gpu_tracer_vk.h index 238bf618f199e..e1fd7150f8355 100644 --- a/impeller/renderer/backend/vulkan/gpu_tracer_vk.h +++ b/impeller/renderer/backend/vulkan/gpu_tracer_vk.h @@ -11,28 +11,19 @@ namespace impeller { +class GPUProbe; + /// @brief A class that uses timestamp queries to record the approximate GPU /// execution time. -class GPUTracerVK { +class GPUTracerVK : public std::enable_shared_from_this { public: explicit GPUTracerVK(const std::shared_ptr& device_holder); ~GPUTracerVK() = default; - /// @brief Record a timestamp query into the provided cmd buffer to record - /// start time. - void RecordCmdBufferStart(const vk::CommandBuffer& buffer); - - /// @brief Record a timestamp query into the provided cmd buffer to record end - /// time. - /// - /// Returns the index that should be passed to [OnFenceComplete]. - std::optional RecordCmdBufferEnd(const vk::CommandBuffer& buffer); - - /// @brief Signal that the cmd buffer is completed. - /// - /// If [frame_index] is std::nullopt, this frame recording is ignored. - void OnFenceComplete(std::optional frame_index, bool success); + /// @brief Create a GPUProbe to trace the execution of a command buffer on the + /// GPU. + std::unique_ptr CreateGPUProbe(); /// @brief Signal the start of a frame workload. /// @@ -47,20 +38,34 @@ class GPUTracerVK { bool IsEnabled() const; private: + friend class GPUProbe; + + static const constexpr size_t kTraceStatesSize = 32u; + + /// @brief Signal that the cmd buffer is completed. + /// + /// If [frame_index] is std::nullopt, this frame recording is ignored. + void OnFenceComplete(size_t frame); + + /// @brief Record a timestamp query into the provided cmd buffer to record + /// start time. + void RecordCmdBufferStart(const vk::CommandBuffer& buffer, GPUProbe& probe); + + /// @brief Record a timestamp query into the provided cmd buffer to record end + /// time. + void RecordCmdBufferEnd(const vk::CommandBuffer& buffer, GPUProbe& probe); + const std::shared_ptr device_holder_; struct GPUTraceState { size_t current_index = 0; size_t pending_buffers = 0; - // If a cmd buffer submission fails for any reason, this field is used - // to indicate that the query pool results may be incomplete and this - // frame should be discarded. - bool contains_failure = false; vk::UniqueQueryPool query_pool; }; mutable Mutex trace_state_mutex_; - GPUTraceState trace_states_[16] IPLR_GUARDED_BY(trace_state_mutex_); + GPUTraceState trace_states_[kTraceStatesSize] IPLR_GUARDED_BY( + trace_state_mutex_); size_t current_state_ IPLR_GUARDED_BY(trace_state_mutex_) = 0u; // The number of nanoseconds for each timestamp unit. @@ -81,4 +86,28 @@ class GPUTracerVK { bool enabled_ = false; }; +class GPUProbe { + public: + explicit GPUProbe(const std::weak_ptr& tracer); + + GPUProbe(GPUProbe&&) = delete; + GPUProbe& operator=(GPUProbe&&) = delete; + + ~GPUProbe(); + + /// @brief Record a timestamp query into the provided cmd buffer to record + /// start time. + void RecordCmdBufferStart(const vk::CommandBuffer& buffer); + + /// @brief Record a timestamp query into the provided cmd buffer to record end + /// time. + void RecordCmdBufferEnd(const vk::CommandBuffer& buffer); + + private: + friend class GPUTracerVK; + + std::weak_ptr tracer_; + std::optional index_ = std::nullopt; +}; + } // namespace impeller diff --git a/impeller/renderer/backend/vulkan/swapchain_impl_vk.cc b/impeller/renderer/backend/vulkan/swapchain_impl_vk.cc index 7d0f9823457de..eb089e44ec45d 100644 --- a/impeller/renderer/backend/vulkan/swapchain_impl_vk.cc +++ b/impeller/renderer/backend/vulkan/swapchain_impl_vk.cc @@ -428,10 +428,6 @@ bool SwapchainImplVK::Present(const std::shared_ptr& image, const auto& context = ContextVK::Cast(*context_strong); const auto& sync = synchronizers_[current_frame_]; - /// Record the approximate end of the GPU workload. This is intentionally - /// done before creating the final cmd buffer as that is not tracked. - context.GetGPUTracer()->MarkFrameEnd(); - //---------------------------------------------------------------------------- /// Transition the image to color-attachment-optimal. /// @@ -481,6 +477,8 @@ bool SwapchainImplVK::Present(const std::shared_ptr& image, } } + context.GetGPUTracer()->MarkFrameEnd(); + auto task = [&, index, current_frame = current_frame_] { auto context_strong = context_.lock(); if (!context_strong) { diff --git a/impeller/renderer/backend/vulkan/test/gpu_tracer_unittests.cc b/impeller/renderer/backend/vulkan/test/gpu_tracer_unittests.cc index 1311347257654..8afa8832f72c9 100644 --- a/impeller/renderer/backend/vulkan/test/gpu_tracer_unittests.cc +++ b/impeller/renderer/backend/vulkan/test/gpu_tracer_unittests.cc @@ -2,7 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include #include "flutter/testing/testing.h" // IWYU pragma: keep +#include "fml/synchronization/count_down_latch.h" #include "gtest/gtest.h" #include "impeller/renderer//backend/vulkan/command_encoder_vk.h" #include "impeller/renderer/backend/vulkan/command_buffer_vk.h" @@ -16,51 +18,51 @@ namespace testing { #ifdef IMPELLER_DEBUG TEST(GPUTracerVK, CanTraceCmdBuffer) { auto const context = MockVulkanContextBuilder().Build(); - - auto tracer = std::make_shared(context->GetDeviceHolder()); + auto tracer = context->GetGPUTracer(); ASSERT_TRUE(tracer->IsEnabled()); + tracer->MarkFrameStart(); auto cmd_buffer = context->CreateCommandBuffer(); - auto vk_cmd_buffer = CommandBufferVK::Cast(cmd_buffer.get()); auto blit_pass = cmd_buffer->CreateBlitPass(); + blit_pass->EncodeCommands(context->GetResourceAllocator()); + + auto latch = std::make_shared(1u); + + if (!cmd_buffer->SubmitCommands( + [latch](CommandBuffer::Status status) { latch->CountDown(); })) { + GTEST_FAIL() << "Failed to submit cmd buffer"; + } - tracer->MarkFrameStart(); - tracer->RecordCmdBufferStart(vk_cmd_buffer->GetEncoder()->GetCommandBuffer()); - auto frame_id = tracer->RecordCmdBufferEnd( - vk_cmd_buffer->GetEncoder()->GetCommandBuffer()); tracer->MarkFrameEnd(); + latch->Wait(); - ASSERT_EQ(frame_id, 0u); auto called = GetMockVulkanFunctions(context->GetDevice()); ASSERT_NE(called, nullptr); ASSERT_TRUE(std::find(called->begin(), called->end(), "vkCreateQueryPool") != called->end()); - ASSERT_TRUE(std::find(called->begin(), called->end(), - "vkGetQueryPoolResults") == called->end()); - - tracer->OnFenceComplete(frame_id, true); - ASSERT_TRUE(std::find(called->begin(), called->end(), "vkGetQueryPoolResults") != called->end()); } TEST(GPUTracerVK, DoesNotTraceOutsideOfFrameWorkload) { auto const context = MockVulkanContextBuilder().Build(); - - auto tracer = std::make_shared(context->GetDeviceHolder()); + auto tracer = context->GetGPUTracer(); ASSERT_TRUE(tracer->IsEnabled()); auto cmd_buffer = context->CreateCommandBuffer(); - auto vk_cmd_buffer = CommandBufferVK::Cast(cmd_buffer.get()); auto blit_pass = cmd_buffer->CreateBlitPass(); + blit_pass->EncodeCommands(context->GetResourceAllocator()); + + auto latch = std::make_shared(1u); + if (!cmd_buffer->SubmitCommands( + [latch](CommandBuffer::Status status) { latch->CountDown(); })) { + GTEST_FAIL() << "Failed to submit cmd buffer"; + } - tracer->RecordCmdBufferStart(vk_cmd_buffer->GetEncoder()->GetCommandBuffer()); - auto frame_id = tracer->RecordCmdBufferEnd( - vk_cmd_buffer->GetEncoder()->GetCommandBuffer()); + latch->Wait(); - ASSERT_TRUE(!frame_id.has_value()); auto called = GetMockVulkanFunctions(context->GetDevice()); ASSERT_NE(called, nullptr); @@ -68,13 +70,36 @@ TEST(GPUTracerVK, DoesNotTraceOutsideOfFrameWorkload) { called->end()); ASSERT_TRUE(std::find(called->begin(), called->end(), "vkGetQueryPoolResults") == called->end()); +} - tracer->OnFenceComplete(frame_id, true); +// This cmd buffer starts when there is a frame but finishes when there is none. +// This should result in the same recorded work. +TEST(GPUTracerVK, TracesWithPartialFrameOverlap) { + auto const context = MockVulkanContextBuilder().Build(); + auto tracer = context->GetGPUTracer(); - ASSERT_TRUE(std::find(called->begin(), called->end(), "vkCreateQueryPool") == + ASSERT_TRUE(tracer->IsEnabled()); + tracer->MarkFrameStart(); + + auto cmd_buffer = context->CreateCommandBuffer(); + auto blit_pass = cmd_buffer->CreateBlitPass(); + blit_pass->EncodeCommands(context->GetResourceAllocator()); + tracer->MarkFrameEnd(); + + auto latch = std::make_shared(1u); + if (!cmd_buffer->SubmitCommands( + [latch](CommandBuffer::Status status) { latch->CountDown(); })) { + GTEST_FAIL() << "Failed to submit cmd buffer"; + } + + latch->Wait(); + + auto called = GetMockVulkanFunctions(context->GetDevice()); + ASSERT_NE(called, nullptr); + ASSERT_TRUE(std::find(called->begin(), called->end(), "vkCreateQueryPool") != called->end()); ASSERT_TRUE(std::find(called->begin(), called->end(), - "vkGetQueryPoolResults") == called->end()); + "vkGetQueryPoolResults") != called->end()); } #endif // IMPELLER_DEBUG From 87db18bdc27baae8c2a12e4031dd9169567f5063 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Mon, 23 Oct 2023 13:45:23 -0700 Subject: [PATCH 854/859] Add missing headers to the fml source_set. (#47232) These being missing came up when internal build rules were being derived from the ones here. --- fml/BUILD.gn | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fml/BUILD.gn b/fml/BUILD.gn index 0b4338435c375..3faf7ceacbf78 100644 --- a/fml/BUILD.gn +++ b/fml/BUILD.gn @@ -69,6 +69,8 @@ source_set("fml") { "shared_thread_merger.cc", "shared_thread_merger.h", "size.h", + "status.h", + "status_or.h", "synchronization/atomic_object.h", "synchronization/count_down_latch.cc", "synchronization/count_down_latch.h", From bb67c227131ab12efaca6008221470394fb59ab2 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 23 Oct 2023 17:00:23 -0400 Subject: [PATCH 855/859] Roll Skia from d534571c4bc3 to 73e9879f06e7 (1 revision) (#47233) https://skia.googlesource.com/skia.git/+log/d534571c4bc3..73e9879f06e7 2023-10-23 skia-autoroll@skia-public.iam.gserviceaccount.com Manual roll ANGLE from ec29008ac6cf to 6188c0a69c93 (4 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com,jimgraham@google.com,rmistry@google.com,robertphillips@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index db113f9a156e8..a21a256cf972d 100644 --- a/DEPS +++ b/DEPS @@ -18,7 +18,7 @@ vars = { 'llvm_git': 'https://llvm.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'd534571c4bc3a99665adb2ce4719dceebc38032d', + 'skia_revision': '73e9879f06e74615f94e7a91827b591ceb388878', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. From 4dc9ddf55298d85978ca3f4d78852dd721ab417a Mon Sep 17 00:00:00 2001 From: gaaclarke <30870216+gaaclarke@users.noreply.github.com> Date: Mon, 23 Oct 2023 14:13:45 -0700 Subject: [PATCH 856/859] [Impeller] Added tests to assert empty saveLayer behaviors. (#47138) fixes: https://github.com/flutter/flutter/issues/126391 It turns out certain cases listed in the issue already render correctly. This adds tests to assert that we maintain that behavior. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I signed the [CLA]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat --- impeller/aiks/aiks_unittests.cc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/impeller/aiks/aiks_unittests.cc b/impeller/aiks/aiks_unittests.cc index b0e4139f4e6d3..14d70f2d27f7f 100644 --- a/impeller/aiks/aiks_unittests.cc +++ b/impeller/aiks/aiks_unittests.cc @@ -3700,6 +3700,26 @@ TEST_P(AiksTest, BlurHasNoEdge) { }, }; canvas.DrawRect(Rect{300, 300, 200, 200}, blur); +} + +TEST_P(AiksTest, EmptySaveLayerIgnoresPaint) { + Canvas canvas; + canvas.Scale(GetContentScale()); + canvas.DrawPaint(Paint{.color = Color::Red()}); + canvas.ClipRect({100, 100, 200, 200}); + canvas.SaveLayer(Paint{.color = Color::Blue()}); + canvas.Restore(); + ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); +} + +TEST_P(AiksTest, EmptySaveLayerRendersWithClear) { + Canvas canvas; + canvas.Scale(GetContentScale()); + auto image = std::make_shared(CreateTextureForFixture("airplane.jpg")); + canvas.DrawImage(image, {10, 10}, {}); + canvas.ClipRect({100, 100, 200, 200}); + canvas.SaveLayer(Paint{.blend_mode = BlendMode::kClear}); + canvas.Restore(); ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); } From 867e5e8afffd6d4da1af0d807ac213fb8b21c692 Mon Sep 17 00:00:00 2001 From: Tong Mu Date: Mon, 23 Oct 2023 14:35:04 -0700 Subject: [PATCH 857/859] Reland: Multiview pipeline (#47234) This PR relands https://github.com/flutter/engine/pull/44473. The previous PR was immediately reverted after merging because we found that the PR could cause illegal renders to be skipped on debug builds but crash the app on release builds. This PR makes the `Animator::Render` skip illegal renders as well. This should not be the final shape of this feature, and thus a TODO is added. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- flow/frame_timings.cc | 24 +- flow/frame_timings.h | 3 + .../filters/gaussian_blur_filter_contents.cc | 4 +- lib/ui/dart_ui.cc | 2 +- lib/ui/painting/image_dispose_unittests.cc | 10 +- lib/ui/window.dart | 8 +- lib/ui/window/platform_configuration.cc | 5 +- lib/ui/window/platform_configuration.h | 4 +- .../platform_configuration_unittests.cc | 158 +++++++++++++ runtime/dart_vm.cc | 28 +-- runtime/runtime_controller.cc | 7 +- runtime/runtime_controller.h | 2 +- runtime/runtime_delegate.h | 3 +- shell/common/animator.cc | 85 ++++--- shell/common/animator.h | 17 +- shell/common/animator_unittests.cc | 37 +-- shell/common/engine.cc | 5 +- shell/common/engine.h | 3 +- shell/common/engine_unittests.cc | 217 +++++++++++++++++- shell/common/fixtures/shell_test.dart | 21 ++ shell/common/input_events_unittests.cc | 10 +- shell/common/rasterizer.cc | 1 + shell/common/shell_test.cc | 103 ++++++--- shell/common/shell_test.h | 50 ++-- shell/common/shell_unittests.cc | 78 ++++--- .../flutter/vulkan_surface_producer.cc | 23 +- shell/testing/tester_main.cc | 17 +- testing/dart/platform_view_test.dart | 10 +- 28 files changed, 742 insertions(+), 193 deletions(-) diff --git a/flow/frame_timings.cc b/flow/frame_timings.cc index 339374d77b837..2943e850e17d0 100644 --- a/flow/frame_timings.cc +++ b/flow/frame_timings.cc @@ -254,8 +254,30 @@ const char* FrameTimingsRecorder::GetFrameNumberTraceArg() const { return frame_number_trace_arg_val_.c_str(); } +static const char* StateToString(FrameTimingsRecorder::State state) { +#ifndef NDEBUG + switch (state) { + case FrameTimingsRecorder::State::kUninitialized: + return "kUninitialized"; + case FrameTimingsRecorder::State::kVsync: + return "kVsync"; + case FrameTimingsRecorder::State::kBuildStart: + return "kBuildStart"; + case FrameTimingsRecorder::State::kBuildEnd: + return "kBuildEnd"; + case FrameTimingsRecorder::State::kRasterStart: + return "kRasterStart"; + case FrameTimingsRecorder::State::kRasterEnd: + return "kRasterEnd"; + }; + FML_UNREACHABLE(); +#endif + return ""; +} + void FrameTimingsRecorder::AssertInState(State state) const { - FML_DCHECK(state_ == state); + FML_DCHECK(state_ == state) << "Expected state " << StateToString(state) + << ", actual state " << StateToString(state_); } } // namespace flutter diff --git a/flow/frame_timings.h b/flow/frame_timings.h index c81bcc3362298..ac5a7e470215e 100644 --- a/flow/frame_timings.h +++ b/flow/frame_timings.h @@ -31,6 +31,7 @@ class FrameTimingsRecorder { public: /// Various states that the recorder can be in. When created the recorder is /// in an unitialized state and transtions in sequential order of the states. + // After adding an item to this enum, modify StateToString accordingly. enum class State : uint32_t { kUninitialized, kVsync, @@ -121,6 +122,8 @@ class FrameTimingsRecorder { /// /// Instead of adding a `GetState` method and asserting on the result, this /// method prevents other logic from relying on the state. + /// + /// In opt builds, this call is a no-op. void AssertInState(State state) const; private: diff --git a/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc b/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc index 72f56f443b79e..bd954d821046a 100644 --- a/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc +++ b/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc @@ -26,8 +26,8 @@ namespace impeller { DirectionalGaussianBlurFilterContents::DirectionalGaussianBlurFilterContents() = default; -DirectionalGaussianBlurFilterContents:: - ~DirectionalGaussianBlurFilterContents() = default; +DirectionalGaussianBlurFilterContents::~ +DirectionalGaussianBlurFilterContents() = default; void DirectionalGaussianBlurFilterContents::SetSigma(Sigma sigma) { blur_sigma_ = sigma; diff --git a/lib/ui/dart_ui.cc b/lib/ui/dart_ui.cc index 976b373d29d08..310de114e377a 100644 --- a/lib/ui/dart_ui.cc +++ b/lib/ui/dart_ui.cc @@ -98,7 +98,7 @@ typedef CanvasPath Path; V(NativeStringAttribute::initSpellOutStringAttribute, 3) \ V(PlatformConfigurationNativeApi::DefaultRouteName, 0) \ V(PlatformConfigurationNativeApi::ScheduleFrame, 0) \ - V(PlatformConfigurationNativeApi::Render, 1) \ + V(PlatformConfigurationNativeApi::Render, 2) \ V(PlatformConfigurationNativeApi::UpdateSemantics, 1) \ V(PlatformConfigurationNativeApi::SetNeedsReportTimings, 1) \ V(PlatformConfigurationNativeApi::SetIsolateDebugName, 1) \ diff --git a/lib/ui/painting/image_dispose_unittests.cc b/lib/ui/painting/image_dispose_unittests.cc index 0f8bb6d027062..93600ca83c93d 100644 --- a/lib/ui/painting/image_dispose_unittests.cc +++ b/lib/ui/painting/image_dispose_unittests.cc @@ -5,6 +5,7 @@ #define FML_USED_ON_EMBEDDER #include "flutter/common/task_runners.h" +#include "flutter/fml/synchronization/count_down_latch.h" #include "flutter/fml/synchronization/waitable_event.h" #include "flutter/lib/ui/painting/canvas.h" #include "flutter/lib/ui/painting/image.h" @@ -57,6 +58,10 @@ TEST_F(ImageDisposeTest, ImageReleasedAfterFrameAndDisposePictureAndLayer) { }; Settings settings = CreateSettingsForFixture(); + fml::CountDownLatch frame_latch{2}; + settings.frame_rasterized_callback = [&frame_latch](const FrameTiming& t) { + frame_latch.CountDown(); + }; auto task_runner = CreateNewThread(); TaskRunners task_runners("test", // label GetCurrentTaskRunner(), // platform @@ -83,12 +88,15 @@ TEST_F(ImageDisposeTest, ImageReleasedAfterFrameAndDisposePictureAndLayer) { shell->RunEngine(std::move(configuration), [&](auto result) { ASSERT_EQ(result, Engine::RunStatus::Success); }); - message_latch_.Wait(); ASSERT_TRUE(current_display_list_); ASSERT_TRUE(current_image_); + // Wait for 2 frames to be rasterized. The 2nd frame releases resources of the + // 1st frame. + frame_latch.Wait(); + // Force a drain the SkiaUnrefQueue. The engine does this normally as frames // pump, but we force it here to make the test more deterministic. message_latch_.Reset(); diff --git a/lib/ui/window.dart b/lib/ui/window.dart index be761e548bb12..022227be017c4 100644 --- a/lib/ui/window.dart +++ b/lib/ui/window.dart @@ -356,18 +356,20 @@ class FlutterView { void render(Scene scene) { // Duplicated calls or calls outside of onBeginFrame/onDrawFrame (indicated // by _debugRenderedViews being null) are ignored. See _debugRenderedViews. + // TODO(dkwingsmt): We should change this skip into an assertion. + // https://github.com/flutter/flutter/issues/137073 bool validRender = true; assert(() { validRender = platformDispatcher._debugRenderedViews?.add(this) ?? false; return true; }()); if (validRender) { - _render(scene as _NativeScene); + _render(viewId, scene as _NativeScene); } } - @Native)>(symbol: 'PlatformConfigurationNativeApi::Render') - external static void _render(_NativeScene scene); + @Native)>(symbol: 'PlatformConfigurationNativeApi::Render') + external static void _render(int viewId, _NativeScene scene); /// Change the retained semantics data about this [FlutterView]. /// diff --git a/lib/ui/window/platform_configuration.cc b/lib/ui/window/platform_configuration.cc index d19c80a7a8028..082756d667976 100644 --- a/lib/ui/window/platform_configuration.cc +++ b/lib/ui/window/platform_configuration.cc @@ -449,9 +449,10 @@ void PlatformConfiguration::CompletePlatformMessageResponse( response->Complete(std::make_unique(std::move(data))); } -void PlatformConfigurationNativeApi::Render(Scene* scene) { +void PlatformConfigurationNativeApi::Render(int64_t view_id, Scene* scene) { UIDartState::ThrowIfUIOperationsProhibited(); - UIDartState::Current()->platform_configuration()->client()->Render(scene); + UIDartState::Current()->platform_configuration()->client()->Render(view_id, + scene); } void PlatformConfigurationNativeApi::SetNeedsReportTimings(bool value) { diff --git a/lib/ui/window/platform_configuration.h b/lib/ui/window/platform_configuration.h index 7965ba10a7b91..9c762b460c05c 100644 --- a/lib/ui/window/platform_configuration.h +++ b/lib/ui/window/platform_configuration.h @@ -69,7 +69,7 @@ class PlatformConfigurationClient { /// @brief Updates the client's rendering on the GPU with the newly /// provided Scene. /// - virtual void Render(Scene* scene) = 0; + virtual void Render(int64_t view_id, Scene* scene) = 0; //-------------------------------------------------------------------------- /// @brief Receives an updated semantics tree from the Framework. @@ -557,7 +557,7 @@ class PlatformConfigurationNativeApi { static void ScheduleFrame(); - static void Render(Scene* scene); + static void Render(int64_t view_id, Scene* scene); static void UpdateSemantics(SemanticsUpdate* update); diff --git a/lib/ui/window/platform_configuration_unittests.cc b/lib/ui/window/platform_configuration_unittests.cc index 7410caeb66d6c..916f47c7026e8 100644 --- a/lib/ui/window/platform_configuration_unittests.cc +++ b/lib/ui/window/platform_configuration_unittests.cc @@ -15,8 +15,166 @@ #include "flutter/shell/common/shell_test.h" #include "flutter/shell/common/thread_host.h" #include "flutter/testing/testing.h" +#include "gmock/gmock.h" namespace flutter { + +namespace { + +static constexpr int64_t kImplicitViewId = 0; + +static void PostSync(const fml::RefPtr& task_runner, + const fml::closure& task) { + fml::AutoResetWaitableEvent latch; + fml::TaskRunner::RunNowOrPostTask(task_runner, [&latch, &task] { + task(); + latch.Signal(); + }); + latch.Wait(); +} + +class MockRuntimeDelegate : public RuntimeDelegate { + public: + MOCK_METHOD(std::string, DefaultRouteName, (), (override)); + MOCK_METHOD(void, ScheduleFrame, (bool), (override)); + MOCK_METHOD(void, + Render, + (int64_t, std::unique_ptr, float), + (override)); + MOCK_METHOD(void, + UpdateSemantics, + (SemanticsNodeUpdates, CustomAccessibilityActionUpdates), + (override)); + MOCK_METHOD(void, + HandlePlatformMessage, + (std::unique_ptr), + (override)); + MOCK_METHOD(FontCollection&, GetFontCollection, (), (override)); + MOCK_METHOD(std::shared_ptr, GetAssetManager, (), (override)); + MOCK_METHOD(void, OnRootIsolateCreated, (), (override)); + MOCK_METHOD(void, + UpdateIsolateDescription, + (const std::string, int64_t), + (override)); + MOCK_METHOD(void, SetNeedsReportTimings, (bool), (override)); + MOCK_METHOD(std::unique_ptr>, + ComputePlatformResolvedLocale, + (const std::vector&), + (override)); + MOCK_METHOD(void, RequestDartDeferredLibrary, (intptr_t), (override)); + MOCK_METHOD(std::weak_ptr, + GetPlatformMessageHandler, + (), + (const, override)); + MOCK_METHOD(void, SendChannelUpdate, (std::string, bool), (override)); + MOCK_METHOD(double, + GetScaledFontSize, + (double font_size, int configuration_id), + (const, override)); +}; + +class MockPlatformMessageHandler : public PlatformMessageHandler { + public: + MOCK_METHOD(void, + HandlePlatformMessage, + (std::unique_ptr message), + (override)); + MOCK_METHOD(bool, + DoesHandlePlatformMessageOnPlatformThread, + (), + (const, override)); + MOCK_METHOD(void, + InvokePlatformMessageResponseCallback, + (int response_id, std::unique_ptr mapping), + (override)); + MOCK_METHOD(void, + InvokePlatformMessageEmptyResponseCallback, + (int response_id), + (override)); +}; + +// A class that can launch a RuntimeController with the specified +// RuntimeDelegate. +// +// To use this class, contruct this class with Create, call LaunchRootIsolate, +// and use the controller with ControllerTaskSync(). +class RuntimeControllerContext { + public: + using ControllerCallback = std::function; + + [[nodiscard]] static std::unique_ptr Create( + Settings settings, // + const TaskRunners& task_runners, // + RuntimeDelegate& client) { + auto [vm, isolate_snapshot] = Shell::InferVmInitDataFromSettings(settings); + FML_CHECK(vm) << "Must be able to initialize the VM."; + // Construct the class with `new` because `make_unique` has no access to the + // private constructor. + RuntimeControllerContext* raw_pointer = new RuntimeControllerContext( + settings, task_runners, client, std::move(vm), isolate_snapshot); + return std::unique_ptr(raw_pointer); + } + + ~RuntimeControllerContext() { + PostSync(task_runners_.GetUITaskRunner(), + [&]() { runtime_controller_.reset(); }); + } + + // Launch the root isolate. The post_launch callback will be executed in the + // same UI task, which can be used to create initial views. + void LaunchRootIsolate(RunConfiguration& configuration, + ControllerCallback post_launch) { + PostSync(task_runners_.GetUITaskRunner(), [&]() { + bool launch_success = runtime_controller_->LaunchRootIsolate( + settings_, // + []() {}, // + configuration.GetEntrypoint(), // + configuration.GetEntrypointLibrary(), // + configuration.GetEntrypointArgs(), // + configuration.TakeIsolateConfiguration()); // + ASSERT_TRUE(launch_success); + post_launch(*runtime_controller_); + }); + } + + // Run a task that operates the RuntimeController on the UI thread, and wait + // for the task to end. + void ControllerTaskSync(ControllerCallback task) { + ASSERT_TRUE(runtime_controller_); + ASSERT_TRUE(task); + PostSync(task_runners_.GetUITaskRunner(), + [&]() { task(*runtime_controller_); }); + } + + private: + RuntimeControllerContext(const Settings& settings, + const TaskRunners& task_runners, + RuntimeDelegate& client, + DartVMRef vm, + fml::RefPtr isolate_snapshot) + : settings_(settings), + task_runners_(task_runners), + isolate_snapshot_(std::move(isolate_snapshot)), + vm_(std::move(vm)), + runtime_controller_(std::make_unique( + client, + &vm_, + std::move(isolate_snapshot_), + settings.idle_notification_callback, // idle notification callback + flutter::PlatformData(), // platform data + settings.isolate_create_callback, // isolate create callback + settings.isolate_shutdown_callback, // isolate shutdown callback + settings.persistent_isolate_data, // persistent isolate data + UIDartState::Context{task_runners})) {} + + Settings settings_; + TaskRunners task_runners_; + fml::RefPtr isolate_snapshot_; + DartVMRef vm_; + std::unique_ptr runtime_controller_; +}; +} // namespace + namespace testing { class PlatformConfigurationTest : public ShellTest {}; diff --git a/runtime/dart_vm.cc b/runtime/dart_vm.cc index 379243773c5ca..23e59cf93b0f2 100644 --- a/runtime/dart_vm.cc +++ b/runtime/dart_vm.cc @@ -219,22 +219,22 @@ static std::vector ProfilingFlags(bool enable_profiling) { // flags. if (enable_profiling) { return { - // This is the default. But just be explicit. - "--profiler", - // This instructs the profiler to walk C++ frames, and to include - // them in the profile. - "--profile-vm", + // This is the default. But just be explicit. + "--profiler", + // This instructs the profiler to walk C++ frames, and to include + // them in the profile. + "--profile-vm", #if FML_OS_IOS && FML_ARCH_CPU_ARM_FAMILY && FML_ARCH_CPU_ARMEL - // Set the profiler interrupt period to 500Hz instead of the - // default 1000Hz on 32-bit iOS devices to reduce average and worst - // case frame build times. - // - // Note: profile_period is time in microseconds between sampling - // events, not frequency. Frequency is calculated 1/period (or - // 1,000,000 / 2,000 -> 500Hz in this case). - "--profile_period=2000", + // Set the profiler interrupt period to 500Hz instead of the + // default 1000Hz on 32-bit iOS devices to reduce average and worst + // case frame build times. + // + // Note: profile_period is time in microseconds between sampling + // events, not frequency. Frequency is calculated 1/period (or + // 1,000,000 / 2,000 -> 500Hz in this case). + "--profile_period=2000", #else - "--profile_period=1000", + "--profile_period=1000", #endif // FML_OS_IOS && FML_ARCH_CPU_ARM_FAMILY && FML_ARCH_CPU_ARMEL }; } else { diff --git a/runtime/runtime_controller.cc b/runtime/runtime_controller.cc index 9dc6a944de7cc..5ee24c9985dad 100644 --- a/runtime/runtime_controller.cc +++ b/runtime/runtime_controller.cc @@ -341,15 +341,14 @@ void RuntimeController::ScheduleFrame() { } // |PlatformConfigurationClient| -void RuntimeController::Render(Scene* scene) { - // TODO(dkwingsmt): Currently only supports a single window. - int64_t view_id = kFlutterImplicitViewId; +void RuntimeController::Render(int64_t view_id, Scene* scene) { const ViewportMetrics* view_metrics = UIDartState::Current()->platform_configuration()->GetMetrics(view_id); if (view_metrics == nullptr) { return; } - client_.Render(scene->takeLayerTree(view_metrics->physical_width, + client_.Render(view_id, + scene->takeLayerTree(view_metrics->physical_width, view_metrics->physical_height), view_metrics->device_pixel_ratio); } diff --git a/runtime/runtime_controller.h b/runtime/runtime_controller.h index 7a65f2b074282..7a29a3616e3cb 100644 --- a/runtime/runtime_controller.h +++ b/runtime/runtime_controller.h @@ -658,7 +658,7 @@ class RuntimeController : public PlatformConfigurationClient { void ScheduleFrame() override; // |PlatformConfigurationClient| - void Render(Scene* scene) override; + void Render(int64_t view_id, Scene* scene) override; // |PlatformConfigurationClient| void UpdateSemantics(SemanticsUpdate* update) override; diff --git a/runtime/runtime_delegate.h b/runtime/runtime_delegate.h index bc3de031f4411..809fa46ac0aff 100644 --- a/runtime/runtime_delegate.h +++ b/runtime/runtime_delegate.h @@ -25,7 +25,8 @@ class RuntimeDelegate { virtual void ScheduleFrame(bool regenerate_layer_trees = true) = 0; - virtual void Render(std::unique_ptr layer_tree, + virtual void Render(int64_t view_id, + std::unique_ptr layer_tree, float device_pixel_ratio) = 0; virtual void UpdateSemantics(SemanticsNodeUpdates update, diff --git a/shell/common/animator.cc b/shell/common/animator.cc index 3dd925cee6213..1696e5009db24 100644 --- a/shell/common/animator.cc +++ b/shell/common/animator.cc @@ -60,6 +60,10 @@ void Animator::EnqueueTraceFlowId(uint64_t trace_flow_id) { void Animator::BeginFrame( std::unique_ptr frame_timings_recorder) { + // Both frame_timings_recorder_ and layer_trees_tasks_ must be empty if not + // between BeginFrame and EndFrame. + FML_DCHECK(frame_timings_recorder_ == nullptr); + FML_DCHECK(layer_trees_tasks_.empty()); TRACE_EVENT_ASYNC_END0("flutter", "Frame Request Pending", frame_request_number_); frame_request_number_++; @@ -112,6 +116,33 @@ void Animator::BeginFrame( dart_frame_deadline_ = frame_target_time.ToEpochDelta(); uint64_t frame_number = frame_timings_recorder_->GetFrameNumber(); delegate_.OnAnimatorBeginFrame(frame_target_time, frame_number); +} + +void Animator::EndFrame() { + FML_CHECK(frame_timings_recorder_ != nullptr); + if (!layer_trees_tasks_.empty()) { + // The build is completed in OnAnimatorBeginFrame. + frame_timings_recorder_->RecordBuildEnd(fml::TimePoint::Now()); + + delegate_.OnAnimatorUpdateLatestFrameTargetTime( + frame_timings_recorder_->GetVsyncTargetTime()); + + // Commit the pending continuation. + PipelineProduceResult result = + producer_continuation_.Complete(std::make_unique( + std::move(layer_trees_tasks_), std::move(frame_timings_recorder_))); + + if (!result.success) { + FML_DLOG(INFO) << "Failed to commit to the pipeline"; + } else if (!result.is_first_item) { + // Do nothing. It has been successfully pushed to the pipeline but not as + // the first item. Eventually the 'Rasterizer' will consume it, so we + // don't need to notify the delegate. + } else { + delegate_.OnAnimatorDraw(layer_tree_pipeline_); + } + } + frame_timings_recorder_ = nullptr; // Ensure it's cleared. if (!frame_scheduled_ && has_rendered_) { // Wait a tad more than 3 60hz frames before reporting a big idle period. @@ -139,52 +170,33 @@ void Animator::BeginFrame( }, kNotifyIdleTaskWaitTime); } + // Both frame_timings_recorder_ and layer_trees_tasks_ must be empty if not + // between BeginFrame and EndFrame. + FML_DCHECK(layer_trees_tasks_.empty()); + FML_DCHECK(frame_timings_recorder_ == nullptr); } -void Animator::Render(std::unique_ptr layer_tree, +void Animator::Render(int64_t view_id, + std::unique_ptr layer_tree, float device_pixel_ratio) { - has_rendered_ = true; - - if (!frame_timings_recorder_) { - // Framework can directly call render with a built scene. - frame_timings_recorder_ = std::make_unique(); - const fml::TimePoint placeholder_time = fml::TimePoint::Now(); - frame_timings_recorder_->RecordVsync(placeholder_time, placeholder_time); - frame_timings_recorder_->RecordBuildStart(placeholder_time); + // Animator::Render should be called between BeginFrame and EndFrame, + // which is indicated by frame_timings_recorder_ being non-null. + // This might happen on release build, and is guarded by PlatformDispatcher on + // debug build. + // TODO(dkwingsmt): We should change this skip into an assertion. + // https://github.com/flutter/flutter/issues/137073 + if (frame_timings_recorder_ == nullptr) { + return; } + has_rendered_ = true; + TRACE_EVENT_WITH_FRAME_NUMBER(frame_timings_recorder_, "flutter", "Animator::Render", /*flow_id_count=*/0, /*flow_ids=*/nullptr); - frame_timings_recorder_->RecordBuildEnd(fml::TimePoint::Now()); - delegate_.OnAnimatorUpdateLatestFrameTargetTime( - frame_timings_recorder_->GetVsyncTargetTime()); - - // TODO(dkwingsmt): Currently only supports a single window. - // See https://github.com/flutter/flutter/issues/135530, item 2. - int64_t view_id = kFlutterImplicitViewId; - std::vector> layer_trees_tasks; - layer_trees_tasks.push_back(std::make_unique( + layer_trees_tasks_.push_back(std::make_unique( view_id, std::move(layer_tree), device_pixel_ratio)); - // Commit the pending continuation. - PipelineProduceResult result = - producer_continuation_.Complete(std::make_unique( - std::move(layer_trees_tasks), std::move(frame_timings_recorder_))); - - if (!result.success) { - FML_DLOG(INFO) << "No pending continuation to commit"; - return; - } - - if (!result.is_first_item) { - // It has been successfully pushed to the pipeline but not as the first - // item. Eventually the 'Rasterizer' will consume it, so we don't need to - // notify the delegate. - return; - } - - delegate_.OnAnimatorDraw(layer_tree_pipeline_); } const std::weak_ptr Animator::GetVsyncWaiter() const { @@ -256,6 +268,7 @@ void Animator::AwaitVSync() { self->DrawLastLayerTrees(std::move(frame_timings_recorder)); } else { self->BeginFrame(std::move(frame_timings_recorder)); + self->EndFrame(); } } }); diff --git a/shell/common/animator.h b/shell/common/animator.h index 8a92705ede9e6..5358ed6b14001 100644 --- a/shell/common/animator.h +++ b/shell/common/animator.h @@ -53,7 +53,15 @@ class Animator final { void RequestFrame(bool regenerate_layer_trees = true); - void Render(std::unique_ptr layer_tree, + //-------------------------------------------------------------------------- + /// @brief Tells the Animator that this frame needs to render another view. + /// + /// This method must be called during a vsync callback, or + /// technically, between Animator::BeginFrame and Animator::EndFrame + /// (both private methods). Otherwise, this call will be ignored. + /// + void Render(int64_t view_id, + std::unique_ptr layer_tree, float device_pixel_ratio); const std::weak_ptr GetVsyncWaiter() const; @@ -82,7 +90,13 @@ class Animator final { void EnqueueTraceFlowId(uint64_t trace_flow_id); private: + // Animator's work during a vsync is split into two methods, BeginFrame and + // EndFrame. The two methods should be called synchronously back-to-back to + // avoid being interrupted by a regular vsync. The reason to split them is to + // allow ShellTest::PumpOneFrame to insert a Render in between. + void BeginFrame(std::unique_ptr frame_timings_recorder); + void EndFrame(); bool CanReuseLastLayerTrees(); @@ -99,6 +113,7 @@ class Animator final { std::shared_ptr waiter_; std::unique_ptr frame_timings_recorder_; + std::vector> layer_trees_tasks_; uint64_t frame_request_number_ = 1; fml::TimeDelta dart_frame_deadline_; std::shared_ptr layer_tree_pipeline_; diff --git a/shell/common/animator_unittests.cc b/shell/common/animator_unittests.cc index 9190659fc6f55..80fd30596b9b1 100644 --- a/shell/common/animator_unittests.cc +++ b/shell/common/animator_unittests.cc @@ -23,6 +23,8 @@ namespace flutter { namespace testing { +constexpr int64_t kImplicitViewId = 0; + class FakeAnimatorDelegate : public Animator::Delegate { public: MOCK_METHOD(void, @@ -158,20 +160,30 @@ TEST_F(ShellTest, AnimatorDoesNotNotifyIdleBeforeRender) { latch.Wait(); ASSERT_FALSE(delegate.notify_idle_called_); + fml::AutoResetWaitableEvent render_latch; // Validate it has not notified idle and try to render. task_runners.GetUITaskRunner()->PostDelayedTask( [&] { ASSERT_FALSE(delegate.notify_idle_called_); - auto layer_tree = std::make_unique(LayerTree::Config(), - SkISize::Make(600, 800)); - animator->Render(std::move(layer_tree), 1.0); + EXPECT_CALL(delegate, OnAnimatorBeginFrame).WillOnce([&] { + auto layer_tree = std::make_unique( + LayerTree::Config(), SkISize::Make(600, 800)); + animator->Render(kImplicitViewId, std::move(layer_tree), 1.0); + render_latch.Signal(); + }); + // Request a frame that builds a layer tree and renders a frame. + // When the frame is rendered, render_latch will be signaled. + animator->RequestFrame(true); task_runners.GetPlatformTaskRunner()->PostTask(flush_vsync_task); }, // See kNotifyIdleTaskWaitTime in animator.cc. fml::TimeDelta::FromMilliseconds(60)); latch.Wait(); + render_latch.Wait(); - // Still hasn't notified idle because there has been no frame request. + // A frame has been rendered, and the next frame request will notify idle. + // But at the moment there isn't another frame request, therefore it still + // hasn't notified idle. task_runners.GetUITaskRunner()->PostTask([&] { ASSERT_FALSE(delegate.notify_idle_called_); // False to avoid getting cals to BeginFrame that will request more frames @@ -224,11 +236,6 @@ TEST_F(ShellTest, AnimatorDoesNotNotifyDelegateIfPipelineIsNotEmpty) { }); fml::AutoResetWaitableEvent begin_frame_latch; - EXPECT_CALL(delegate, OnAnimatorBeginFrame) - .WillRepeatedly( - [&](fml::TimePoint frame_target_time, uint64_t frame_number) { - begin_frame_latch.Signal(); - }); // It must always be called when the method 'Animator::Render' is called, // regardless of whether the pipeline is empty or not. EXPECT_CALL(delegate, OnAnimatorUpdateLatestFrameTargetTime).Times(2); @@ -239,16 +246,16 @@ TEST_F(ShellTest, AnimatorDoesNotNotifyDelegateIfPipelineIsNotEmpty) { for (int i = 0; i < 2; i++) { task_runners.GetUITaskRunner()->PostTask([&] { + EXPECT_CALL(delegate, OnAnimatorBeginFrame).WillOnce([&] { + auto layer_tree = std::make_unique(LayerTree::Config(), + SkISize::Make(600, 800)); + animator->Render(kImplicitViewId, std::move(layer_tree), 1.0); + begin_frame_latch.Signal(); + }); animator->RequestFrame(); task_runners.GetPlatformTaskRunner()->PostTask(flush_vsync_task); }); begin_frame_latch.Wait(); - - PostTaskSync(task_runners.GetUITaskRunner(), [&] { - auto layer_tree = std::make_unique(LayerTree::Config(), - SkISize::Make(600, 800)); - animator->Render(std::move(layer_tree), 1.0); - }); } PostTaskSync(task_runners.GetUITaskRunner(), [&] { animator.reset(); }); diff --git a/shell/common/engine.cc b/shell/common/engine.cc index ea0cb43d9be18..1dcf9d4b128ee 100644 --- a/shell/common/engine.cc +++ b/shell/common/engine.cc @@ -459,7 +459,8 @@ void Engine::ScheduleFrame(bool regenerate_layer_trees) { animator_->RequestFrame(regenerate_layer_trees); } -void Engine::Render(std::unique_ptr layer_tree, +void Engine::Render(int64_t view_id, + std::unique_ptr layer_tree, float device_pixel_ratio) { if (!layer_tree) { return; @@ -470,7 +471,7 @@ void Engine::Render(std::unique_ptr layer_tree, return; } - animator_->Render(std::move(layer_tree), device_pixel_ratio); + animator_->Render(view_id, std::move(layer_tree), device_pixel_ratio); } void Engine::UpdateSemantics(SemanticsNodeUpdates update, diff --git a/shell/common/engine.h b/shell/common/engine.h index a60d8b81f8ed4..17ba3cc6fd884 100644 --- a/shell/common/engine.h +++ b/shell/common/engine.h @@ -959,7 +959,8 @@ class Engine final : public RuntimeDelegate, PointerDataDispatcher::Delegate { std::string DefaultRouteName() override; // |RuntimeDelegate| - void Render(std::unique_ptr layer_tree, + void Render(int64_t view_id, + std::unique_ptr layer_tree, float device_pixel_ratio) override; // |RuntimeDelegate| diff --git a/shell/common/engine_unittests.cc b/shell/common/engine_unittests.cc index b0393cb2d2490..7ffa0a6f7714a 100644 --- a/shell/common/engine_unittests.cc +++ b/shell/common/engine_unittests.cc @@ -7,6 +7,8 @@ #include #include "flutter/runtime/dart_vm_lifecycle.h" +#include "flutter/shell/common/shell.h" +#include "flutter/shell/common/shell_test.h" #include "flutter/shell/common/thread_host.h" #include "flutter/testing/fixture_test.h" #include "flutter/testing/testing.h" @@ -19,6 +21,19 @@ namespace flutter { namespace { +using ::testing::Invoke; +using ::testing::ReturnRef; + +static void PostSync(const fml::RefPtr& task_runner, + const fml::closure& task) { + fml::AutoResetWaitableEvent latch; + fml::TaskRunner::RunNowOrPostTask(task_runner, [&latch, &task] { + task(); + latch.Signal(); + }); + latch.Wait(); +} + class MockDelegate : public Engine::Delegate { public: MOCK_METHOD(void, @@ -65,7 +80,7 @@ class MockRuntimeDelegate : public RuntimeDelegate { MOCK_METHOD(void, ScheduleFrame, (bool), (override)); MOCK_METHOD(void, Render, - (std::unique_ptr, float), + (int64_t, std::unique_ptr, float), (override)); MOCK_METHOD(void, UpdateSemantics, @@ -117,6 +132,51 @@ class MockRuntimeController : public RuntimeController { MOCK_METHOD(bool, NotifyIdle, (fml::TimeDelta), (override)); }; +class MockAnimatorDelegate : public Animator::Delegate { + public: + /* Animator::Delegate */ + MOCK_METHOD(void, + OnAnimatorBeginFrame, + (fml::TimePoint frame_target_time, uint64_t frame_number), + (override)); + MOCK_METHOD(void, + OnAnimatorNotifyIdle, + (fml::TimeDelta deadline), + (override)); + MOCK_METHOD(void, + OnAnimatorUpdateLatestFrameTargetTime, + (fml::TimePoint frame_target_time), + (override)); + MOCK_METHOD(void, + OnAnimatorDraw, + (std::shared_ptr pipeline), + (override)); + MOCK_METHOD(void, + OnAnimatorDrawLastLayerTrees, + (std::unique_ptr frame_timings_recorder), + (override)); +}; + +class MockPlatformMessageHandler : public PlatformMessageHandler { + public: + MOCK_METHOD(void, + HandlePlatformMessage, + (std::unique_ptr message), + (override)); + MOCK_METHOD(bool, + DoesHandlePlatformMessageOnPlatformThread, + (), + (const, override)); + MOCK_METHOD(void, + InvokePlatformMessageResponseCallback, + (int response_id, std::unique_ptr mapping), + (override)); + MOCK_METHOD(void, + InvokePlatformMessageEmptyResponseCallback, + (int response_id), + (override)); +}; + std::unique_ptr MakePlatformMessage( const std::string& channel, const std::map& values, @@ -185,6 +245,97 @@ class EngineTest : public testing::FixtureTest { std::shared_ptr image_decoder_task_runner_; fml::TaskRunnerAffineWeakPtr snapshot_delegate_; }; + +// A class that can launch an Engine with the specified Engine::Delegate. +// +// To use this class, contruct this class with Create, call Run, and use the +// engine with EngineTaskSync(). +class EngineContext { + public: + using EngineCallback = std::function; + + [[nodiscard]] static std::unique_ptr Create( + Engine::Delegate& delegate, // + Settings settings, // + const TaskRunners& task_runners, // + std::unique_ptr animator) { + auto [vm, isolate_snapshot] = Shell::InferVmInitDataFromSettings(settings); + FML_CHECK(vm) << "Must be able to initialize the VM."; + // Construct the class with `new` because `make_unique` has no access to the + // private constructor. + EngineContext* raw_pointer = + new EngineContext(delegate, settings, task_runners, std::move(animator), + std::move(vm), isolate_snapshot); + return std::unique_ptr(raw_pointer); + } + + void Run(RunConfiguration configuration) { + PostSync(task_runners_.GetUITaskRunner(), [this, &configuration] { + Engine::RunStatus run_status = engine_->Run(std::move(configuration)); + FML_CHECK(run_status == Engine::RunStatus::Success) + << "Engine failed to run."; + (void)run_status; // Suppress unused-variable warning + }); + } + + // Run a task that operates the Engine on the UI thread, and wait for the + // task to end. + // + // If called on the UI thread, the task is executed synchronously. + void EngineTaskSync(EngineCallback task) { + ASSERT_TRUE(engine_); + ASSERT_TRUE(task); + auto runner = task_runners_.GetUITaskRunner(); + if (runner->RunsTasksOnCurrentThread()) { + task(*engine_); + } else { + PostSync(task_runners_.GetUITaskRunner(), [&]() { task(*engine_); }); + } + } + + ~EngineContext() { + PostSync(task_runners_.GetUITaskRunner(), [this] { engine_.reset(); }); + } + + private: + EngineContext(Engine::Delegate& delegate, // + Settings settings, // + const TaskRunners& task_runners, // + std::unique_ptr animator, // + DartVMRef vm, // + fml::RefPtr isolate_snapshot) + : task_runners_(task_runners), vm_(std::move(vm)) { + PostSync(task_runners.GetUITaskRunner(), [this, &settings, &animator, + &delegate, &isolate_snapshot] { + auto dispatcher_maker = + [](DefaultPointerDataDispatcher::Delegate& delegate) { + return std::make_unique(delegate); + }; + engine_ = std::make_unique( + /*delegate=*/delegate, + /*dispatcher_maker=*/dispatcher_maker, + /*vm=*/*&vm_, + /*isolate_snapshot=*/std::move(isolate_snapshot), + /*task_runners=*/task_runners_, + /*platform_data=*/PlatformData(), + /*settings=*/settings, + /*animator=*/std::move(animator), + /*io_manager=*/io_manager_, + /*unref_queue=*/nullptr, + /*snapshot_delegate=*/snapshot_delegate_, + /*volatile_path_tracker=*/nullptr, + /*gpu_disabled_switch=*/std::make_shared()); + }); + } + + TaskRunners task_runners_; + DartVMRef vm_; + std::unique_ptr engine_; + + fml::WeakPtr io_manager_; + fml::TaskRunnerAffineWeakPtr snapshot_delegate_; +}; + } // namespace TEST_F(EngineTest, Create) { @@ -418,4 +569,68 @@ TEST_F(EngineTest, PassesLoadDartDeferredLibraryErrorToRuntime) { }); } +TEST_F(EngineTest, AnimatorAcceptsMultipleRenders) { + MockAnimatorDelegate animator_delegate; + std::unique_ptr engine_context; + + std::shared_ptr platform_message_handler = + std::make_shared(); + EXPECT_CALL(delegate_, GetPlatformMessageHandler) + .WillOnce(ReturnRef(platform_message_handler)); + + fml::AutoResetWaitableEvent draw_latch; + EXPECT_CALL(animator_delegate, OnAnimatorDraw) + .WillOnce( + Invoke([&draw_latch](const std::shared_ptr& pipeline) { + auto status = + pipeline->Consume([&](std::unique_ptr item) { + EXPECT_EQ(item->layer_tree_tasks.size(), 2u); + EXPECT_EQ(item->layer_tree_tasks[0]->view_id, 1); + EXPECT_EQ(item->layer_tree_tasks[1]->view_id, 2); + }); + EXPECT_EQ(status, PipelineConsumeResult::Done); + draw_latch.Signal(); + })); + EXPECT_CALL(animator_delegate, OnAnimatorBeginFrame) + .WillOnce(Invoke([&engine_context](fml::TimePoint frame_target_time, + uint64_t frame_number) { + engine_context->EngineTaskSync([&](Engine& engine) { + engine.BeginFrame(frame_target_time, frame_number); + }); + })); + + static fml::AutoResetWaitableEvent callback_ready_latch; + callback_ready_latch.Reset(); + AddNativeCallback("NotifyNative", + [](auto args) { callback_ready_latch.Signal(); }); + + std::unique_ptr animator; + PostSync(task_runners_.GetUITaskRunner(), + [&animator, &animator_delegate, &task_runners = task_runners_] { + animator = std::make_unique( + animator_delegate, task_runners, + static_cast>( + std::make_unique( + task_runners))); + }); + + engine_context = EngineContext::Create(delegate_, settings_, task_runners_, + std::move(animator)); + + auto configuration = RunConfiguration::InferFromSettings(settings_); + configuration.SetEntrypoint("onBeginFrameRendersMultipleViews"); + engine_context->Run(std::move(configuration)); + + engine_context->EngineTaskSync([](Engine& engine) { + engine.AddView(1, {1, 10, 10, 22, 0}); + engine.AddView(2, {1, 10, 10, 22, 0}); + }); + + callback_ready_latch.Wait(); + + engine_context->EngineTaskSync( + [](Engine& engine) { engine.ScheduleFrame(); }); + draw_latch.Wait(); +} + } // namespace flutter diff --git a/shell/common/fixtures/shell_test.dart b/shell/common/fixtures/shell_test.dart index e4b0d98833f44..cc6e32731d898 100644 --- a/shell/common/fixtures/shell_test.dart +++ b/shell/common/fixtures/shell_test.dart @@ -547,3 +547,24 @@ void testReportViewWidths() { nativeReportViewWidthsCallback(getCurrentViewWidths()); }; } + +@pragma('vm:entry-point') +void onBeginFrameRendersMultipleViews() { + PlatformDispatcher.instance.onBeginFrame = (Duration beginTime) { + for (final FlutterView view in PlatformDispatcher.instance.views) { + final SceneBuilder builder = SceneBuilder(); + final PictureRecorder recorder = PictureRecorder(); + final Canvas canvas = Canvas(recorder); + canvas.drawPaint(Paint()..color = const Color(0xFFABCDEF)); + final Picture picture = recorder.endRecording(); + builder.addPicture(Offset.zero, picture); + + final Scene scene = builder.build(); + view.render(scene); + + scene.dispose(); + picture.dispose(); + } + }; + notifyNative(); +} diff --git a/shell/common/input_events_unittests.cc b/shell/common/input_events_unittests.cc index 3824dc4d92bae..66a2b64a39e02 100644 --- a/shell/common/input_events_unittests.cc +++ b/shell/common/input_events_unittests.cc @@ -127,11 +127,11 @@ static void TestSimulatedInputEvents( ShellTest::DispatchFakePointerData(shell.get()); i += 1; } - ShellTest::VSyncFlush(shell.get(), will_draw_new_frame); + ShellTest::VSyncFlush(shell.get(), &will_draw_new_frame); } // Finally, issue a vsync for the pending event that may be generated duing // the last vsync. - ShellTest::VSyncFlush(shell.get(), will_draw_new_frame); + ShellTest::VSyncFlush(shell.get(), &will_draw_new_frame); }); simulation.wait(); @@ -345,8 +345,7 @@ TEST_F(ShellTest, CanCorrectlyPipePointerPacket) { CreateSimulatedPointerData(data, PointerData::Change::kRemove, 3.0, 4.0); packet->SetPointerData(5, data); ShellTest::DispatchPointerData(shell.get(), std::move(packet)); - bool will_draw_new_frame; - ShellTest::VSyncFlush(shell.get(), will_draw_new_frame); + ShellTest::VSyncFlush(shell.get()); reportLatch.Wait(); size_t expect_length = 6; @@ -407,8 +406,7 @@ TEST_F(ShellTest, CanCorrectlySynthesizePointerPacket) { CreateSimulatedPointerData(data, PointerData::Change::kRemove, 3.0, 4.0); packet->SetPointerData(3, data); ShellTest::DispatchPointerData(shell.get(), std::move(packet)); - bool will_draw_new_frame; - ShellTest::VSyncFlush(shell.get(), will_draw_new_frame); + ShellTest::VSyncFlush(shell.get()); reportLatch.Wait(); size_t expect_length = 6; diff --git a/shell/common/rasterizer.cc b/shell/common/rasterizer.cc index 0fc4d884c97bf..523bf53d350b6 100644 --- a/shell/common/rasterizer.cc +++ b/shell/common/rasterizer.cc @@ -254,6 +254,7 @@ DrawStatus Rasterizer::Draw(const std::shared_ptr& pipeline) { bool should_resubmit_frame = ShouldResubmitFrame(draw_result); if (should_resubmit_frame) { + FML_CHECK(draw_result.resubmitted_item); auto front_continuation = pipeline->ProduceIfEmpty(); PipelineProduceResult pipeline_result = front_continuation.Complete(std::move(draw_result.resubmitted_item)); diff --git a/shell/common/shell_test.cc b/shell/common/shell_test.cc index c673d4b429c9f..bd952747ca58f 100644 --- a/shell/common/shell_test.cc +++ b/shell/common/shell_test.cc @@ -22,6 +22,39 @@ namespace testing { constexpr int64_t kImplicitViewId = 0; +FrameContent ViewContent::NoViews() { + return std::map(); +} + +FrameContent ViewContent::DummyView(double width, double height) { + FrameContent result; + result[kImplicitViewId] = ViewContent{ + .viewport_metrics = {1.0, width, height, 22, 0}, + .builder = {}, + }; + return result; +} + +FrameContent ViewContent::DummyView(flutter::ViewportMetrics viewport_metrics) { + FrameContent result; + result[kImplicitViewId] = ViewContent{ + .viewport_metrics = std::move(viewport_metrics), + .builder = {}, + }; + return result; +} + +FrameContent ViewContent::ImplicitView(double width, + double height, + LayerTreeBuilder builder) { + FrameContent result; + result[kImplicitViewId] = ViewContent{ + .viewport_metrics = {1.0, width, height, 22, 0}, + .builder = std::move(builder), + }; + return result; +} + ShellTest::ShellTest() : thread_host_("io.flutter.test." + GetCurrentTestName() + ".", ThreadHost::Type::Platform | ThreadHost::Type::IO | @@ -92,16 +125,18 @@ void ShellTest::RestartEngine(Shell* shell, RunConfiguration configuration) { ASSERT_TRUE(restarted.get_future().get()); } -void ShellTest::VSyncFlush(Shell* shell, bool& will_draw_new_frame) { +void ShellTest::VSyncFlush(Shell* shell, bool* will_draw_new_frame) { fml::AutoResetWaitableEvent latch; fml::TaskRunner::RunNowOrPostTask( shell->GetTaskRunners().GetPlatformTaskRunner(), - [shell, &will_draw_new_frame, &latch] { + [shell, will_draw_new_frame, &latch] { // The following UI task ensures that all previous UI tasks are flushed. fml::AutoResetWaitableEvent ui_latch; shell->GetTaskRunners().GetUITaskRunner()->PostTask( - [&ui_latch, &will_draw_new_frame]() { - will_draw_new_frame = true; + [&ui_latch, will_draw_new_frame]() { + if (will_draw_new_frame != nullptr) { + *will_draw_new_frame = true; + } ui_latch.Signal(); }); @@ -154,6 +189,7 @@ void ShellTest::SetViewportMetrics(Shell* shell, double width, double height) { std::make_unique(); recorder->RecordVsync(frame_begin_time, frame_end_time); engine->animator_->BeginFrame(std::move(recorder)); + engine->animator_->EndFrame(); } latch.Signal(); }); @@ -172,23 +208,22 @@ void ShellTest::NotifyIdle(Shell* shell, fml::TimeDelta deadline) { latch.Wait(); } -void ShellTest::PumpOneFrame(Shell* shell, - double width, - double height, - LayerTreeBuilder builder) { - PumpOneFrame(shell, {1.0, width, height, 22, 0}, std::move(builder)); +void ShellTest::PumpOneFrame(Shell* shell) { + PumpOneFrame(shell, ViewContent::DummyView()); } -void ShellTest::PumpOneFrame(Shell* shell, - const flutter::ViewportMetrics& viewport_metrics, - LayerTreeBuilder builder) { +void ShellTest::PumpOneFrame(Shell* shell, FrameContent frame_content) { // Set viewport to nonempty, and call Animator::BeginFrame to make the layer // tree pipeline nonempty. Without either of this, the layer tree below // won't be rasterized. fml::AutoResetWaitableEvent latch; + fml::WeakPtr runtime_delegate = shell->weak_engine_; shell->GetTaskRunners().GetUITaskRunner()->PostTask( - [&latch, engine = shell->weak_engine_, viewport_metrics]() { - engine->SetViewportMetrics(kImplicitViewId, viewport_metrics); + [&latch, engine = shell->weak_engine_, &frame_content, + runtime_delegate]() { + for (auto& [view_id, view_content] : frame_content) { + engine->SetViewportMetrics(view_id, view_content.viewport_metrics); + } const auto frame_begin_time = fml::TimePoint::Now(); const auto frame_end_time = frame_begin_time + fml::TimeDelta::FromSecondsF(1.0 / 60.0); @@ -196,28 +231,28 @@ void ShellTest::PumpOneFrame(Shell* shell, std::make_unique(); recorder->RecordVsync(frame_begin_time, frame_end_time); engine->animator_->BeginFrame(std::move(recorder)); - latch.Signal(); - }); - latch.Wait(); - latch.Reset(); - // Call |Render| to rasterize a layer tree and trigger |OnFrameRasterized| - fml::WeakPtr runtime_delegate = shell->weak_engine_; - shell->GetTaskRunners().GetUITaskRunner()->PostTask( - [&latch, runtime_delegate, &builder, viewport_metrics]() { - SkMatrix identity; - identity.setIdentity(); - auto root_layer = std::make_shared(identity); - auto layer_tree = std::make_unique( - LayerTree::Config{.root_layer = root_layer}, - SkISize::Make(viewport_metrics.physical_width, - viewport_metrics.physical_height)); - float device_pixel_ratio = - static_cast(viewport_metrics.device_pixel_ratio); - if (builder) { - builder(root_layer); + // The BeginFrame phase and the EndFrame phase must be performed in a + // single task, otherwise a normal vsync might be inserted in between, + // causing flaky assertion errors. + + for (auto& [view_id, view_content] : frame_content) { + SkMatrix identity; + identity.setIdentity(); + auto root_layer = std::make_shared(identity); + auto layer_tree = std::make_unique( + LayerTree::Config{.root_layer = root_layer}, + SkISize::Make(view_content.viewport_metrics.physical_width, + view_content.viewport_metrics.physical_height)); + float device_pixel_ratio = static_cast( + view_content.viewport_metrics.device_pixel_ratio); + if (view_content.builder) { + view_content.builder(root_layer); + } + runtime_delegate->Render(view_id, std::move(layer_tree), + device_pixel_ratio); } - runtime_delegate->Render(std::move(layer_tree), device_pixel_ratio); + engine->animator_->EndFrame(); latch.Signal(); }); latch.Wait(); diff --git a/shell/common/shell_test.h b/shell/common/shell_test.h index 7ded997fbcdc5..c11ad1174dc88 100644 --- a/shell/common/shell_test.h +++ b/shell/common/shell_test.h @@ -29,6 +29,38 @@ namespace flutter { namespace testing { +// The signature of ViewContent::builder. +using LayerTreeBuilder = + std::function root)>; +struct ViewContent; +// Defines the content to be rendered to all views of a frame in PumpOneFrame. +using FrameContent = std::map; +// Defines the content to be rendered to a view in PumpOneFrame. +struct ViewContent { + flutter::ViewportMetrics viewport_metrics; + // Given the root layer, this callback builds the layer tree to be rasterized + // in PumpOneFrame. + LayerTreeBuilder builder; + + // Build a frame with no views. This is useful when PumpOneFrame is used just + // to schedule the frame while the frame content is defined by other means. + static FrameContent NoViews(); + + // Build a frame with a single implicit view with the specific size and no + // content. + static FrameContent DummyView(double width = 1, double height = 1); + + // Build a frame with a single implicit view with the specific viewport + // metrics and no content. + static FrameContent DummyView(flutter::ViewportMetrics viewport_metrics); + + // Build a frame with a single implicit view with the specific size and + // content. + static FrameContent ImplicitView(double width, + double height, + LayerTreeBuilder builder); +}; + class ShellTest : public FixtureTest { public: struct Config { @@ -70,24 +102,14 @@ class ShellTest : public FixtureTest { static void RestartEngine(Shell* shell, RunConfiguration configuration); /// Issue as many VSYNC as needed to flush the UI tasks so far, and reset - /// the `will_draw_new_frame` to true. - static void VSyncFlush(Shell* shell, bool& will_draw_new_frame); - - /// Given the root layer, this callback builds the layer tree to be rasterized - /// in PumpOneFrame. - using LayerTreeBuilder = - std::function root)>; + /// the content of `will_draw_new_frame` to true if it's not nullptr. + static void VSyncFlush(Shell* shell, bool* will_draw_new_frame = nullptr); static void SetViewportMetrics(Shell* shell, double width, double height); static void NotifyIdle(Shell* shell, fml::TimeDelta deadline); - static void PumpOneFrame(Shell* shell, - double width = 1, - double height = 1, - LayerTreeBuilder = {}); - static void PumpOneFrame(Shell* shell, - const flutter::ViewportMetrics& viewport_metrics, - LayerTreeBuilder = {}); + static void PumpOneFrame(Shell* shell); + static void PumpOneFrame(Shell* shell, FrameContent frame_content); static void DispatchFakePointerData(Shell* shell); static void DispatchPointerData(Shell* shell, std::unique_ptr packet); diff --git a/shell/common/shell_unittests.cc b/shell/common/shell_unittests.cc index 9914593728717..83c8bd3488c50 100644 --- a/shell/common/shell_unittests.cc +++ b/shell/common/shell_unittests.cc @@ -42,6 +42,7 @@ #include "flutter/shell/common/switches.h" #include "flutter/shell/common/thread_host.h" #include "flutter/shell/common/vsync_waiter_fallback.h" +#include "flutter/shell/common/vsync_waiters_test.h" #include "flutter/shell/version/version.h" #include "flutter/testing/mock_canvas.h" #include "flutter/testing/testing.h" @@ -875,7 +876,7 @@ TEST_F(ShellTest, ExternalEmbedderNoThreadMerger) { root->Add(display_list_layer); }; - PumpOneFrame(shell.get(), 100, 100, builder); + PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); end_frame_latch.Wait(); ASSERT_TRUE(end_frame_called); @@ -949,7 +950,7 @@ TEST_F(ShellTest, PushBackdropFilterToVisitedPlatformViews) { backdrop_filter_layer->Add(platform_view_layer2); }; - PumpOneFrame(shell.get(), 100, 100, builder); + PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); end_frame_latch.Wait(); ASSERT_EQ(visited_platform_views, (std::vector{50, 75})); ASSERT_TRUE(stack_75.is_empty()); @@ -1010,7 +1011,7 @@ TEST_F(ShellTest, root->Add(display_list_layer); }; - PumpOneFrame(shell.get(), 100, 100, builder); + PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); end_frame_latch.Wait(); ASSERT_TRUE(end_frame_called); @@ -1056,9 +1057,12 @@ TEST_F(ShellTest, OnPlatformViewDestroyDisablesThreadMerger) { root->Add(display_list_layer); }; - PumpOneFrame(shell.get(), 100, 100, builder); + PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); auto result = shell->WaitForFirstFrame(fml::TimeDelta::Max()); + // Wait for the rasterizer to process the frame. WaitForFirstFrame only waits + // for the Animator, but end_frame_callback is called by the Rasterizer. + PostSync(shell->GetTaskRunners().GetRasterTaskRunner(), [] {}); ASSERT_TRUE(result.ok()) << "Result: " << static_cast(result.code()) << ": " << result.message(); @@ -1123,12 +1127,12 @@ TEST_F(ShellTest, OnPlatformViewDestroyAfterMergingThreads) { root->Add(display_list_layer); }; - PumpOneFrame(shell.get(), 100, 100, builder); + PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); // Pump one frame to trigger thread merging. end_frame_latch.Wait(); // Pump another frame to ensure threads are merged and a regular layer tree is // submitted. - PumpOneFrame(shell.get(), 100, 100, builder); + PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); // Threads are merged here. PlatformViewNotifyDestroy should be executed // successfully. ASSERT_TRUE(fml::TaskRunnerChecker::RunsOnTheSameThread( @@ -1192,7 +1196,7 @@ TEST_F(ShellTest, OnPlatformViewDestroyWhenThreadsAreMerging) { root->Add(display_list_layer); }; - PumpOneFrame(shell.get(), 100, 100, builder); + PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); // Pump one frame and threads aren't merged end_frame_latch.Wait(); ASSERT_FALSE(fml::TaskRunnerChecker::RunsOnTheSameThread( @@ -1203,7 +1207,7 @@ TEST_F(ShellTest, OnPlatformViewDestroyWhenThreadsAreMerging) { // threads external_view_embedder->UpdatePostPrerollResult( PostPrerollResult::kResubmitFrame); - PumpOneFrame(shell.get(), 100, 100, builder); + PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); // Now destroy the platform view immediately. // Two things can happen here: @@ -1259,7 +1263,7 @@ TEST_F(ShellTest, SkPoint::Make(10, 10), MakeSizedDisplayList(80, 80), false, false); root->Add(display_list_layer); }; - PumpOneFrame(shell.get(), 100, 100, builder); + PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); end_frame_latch.Wait(); // Threads should not be merged. @@ -1298,7 +1302,7 @@ TEST_F(ShellTest, OnPlatformViewDestroyWithoutRasterThreadMerger) { SkPoint::Make(10, 10), MakeSizedDisplayList(80, 80), false, false); root->Add(display_list_layer); }; - PumpOneFrame(shell.get(), 100, 100, builder); + PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); // Threads should not be merged. ASSERT_FALSE(fml::TaskRunnerChecker::RunsOnTheSameThread( @@ -1364,7 +1368,7 @@ TEST_F(ShellTest, OnPlatformViewDestroyWithStaticThreadMerging) { SkPoint::Make(10, 10), MakeSizedDisplayList(80, 80), false, false); root->Add(display_list_layer); }; - PumpOneFrame(shell.get(), 100, 100, builder); + PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); end_frame_latch.Wait(); ValidateDestroyPlatformView(shell.get()); @@ -1410,7 +1414,7 @@ TEST_F(ShellTest, GetUsedThisFrameShouldBeSetBeforeEndFrame) { SkPoint::Make(10, 10), MakeSizedDisplayList(80, 80), false, false); root->Add(display_list_layer); }; - PumpOneFrame(shell.get(), 100, 100, builder); + PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); end_frame_latch.Wait(); ASSERT_FALSE(used_this_frame); @@ -1560,10 +1564,11 @@ TEST_F(ShellTest, WaitForFirstFrameZeroSizeFrame) { configuration.SetEntrypoint("emptyMain"); RunEngine(shell.get(), std::move(configuration)); - PumpOneFrame(shell.get(), {1.0, 0.0, 0.0, 22, 0}); + PumpOneFrame(shell.get(), ViewContent::DummyView({1.0, 0.0, 0.0, 22, 0})); fml::Status result = shell->WaitForFirstFrame(fml::TimeDelta::Zero()); - ASSERT_FALSE(result.ok()); - ASSERT_EQ(result.code(), fml::StatusCode::kDeadlineExceeded); + EXPECT_FALSE(result.ok()); + EXPECT_EQ(result.message(), "timeout"); + EXPECT_EQ(result.code(), fml::StatusCode::kDeadlineExceeded); DestroyShell(std::move(shell)); } @@ -2079,6 +2084,7 @@ TEST_F(ShellTest, CanScheduleFrameFromPlatform) { TEST_F(ShellTest, SecondaryVsyncCallbackShouldBeCalledAfterVsyncCallback) { bool is_on_begin_frame_called = false; bool is_secondary_callback_called = false; + bool test_started = false; Settings settings = CreateSettingsForFixture(); TaskRunners task_runners = GetTaskRunnersForFixture(); fml::AutoResetWaitableEvent latch; @@ -2088,12 +2094,18 @@ TEST_F(ShellTest, SecondaryVsyncCallbackShouldBeCalledAfterVsyncCallback) { fml::CountDownLatch count_down_latch(2); AddNativeCallback("NativeOnBeginFrame", CREATE_NATIVE_ENTRY([&](Dart_NativeArguments args) { + if (!test_started) { + return; + } EXPECT_FALSE(is_on_begin_frame_called); EXPECT_FALSE(is_secondary_callback_called); is_on_begin_frame_called = true; count_down_latch.CountDown(); })); - std::unique_ptr shell = CreateShell(settings, task_runners); + std::unique_ptr shell = CreateShell({ + .settings = settings, + .task_runners = task_runners, + }); ASSERT_TRUE(shell->IsSetup()); auto configuration = RunConfiguration::InferFromSettings(settings); @@ -2106,12 +2118,16 @@ TEST_F(ShellTest, SecondaryVsyncCallbackShouldBeCalledAfterVsyncCallback) { fml::TaskRunner::RunNowOrPostTask( shell->GetTaskRunners().GetUITaskRunner(), [&]() { shell->GetEngine()->ScheduleSecondaryVsyncCallback(0, [&]() { + if (!test_started) { + return; + } EXPECT_TRUE(is_on_begin_frame_called); EXPECT_FALSE(is_secondary_callback_called); is_secondary_callback_called = true; count_down_latch.CountDown(); }); shell->GetEngine()->ScheduleFrame(); + test_started = true; }); count_down_latch.Wait(); EXPECT_TRUE(is_on_begin_frame_called); @@ -2156,7 +2172,7 @@ TEST_F(ShellTest, Screenshot) { root->Add(display_list_layer); }; - PumpOneFrame(shell.get(), 100, 100, builder); + PumpOneFrame(shell.get(), ViewContent::ImplicitView(100, 100, builder)); firstFrameLatch.Wait(); std::promise screenshot_promise; @@ -2616,7 +2632,13 @@ TEST_F(ShellTest, OnServiceProtocolRenderFrameWithRasterStatsWorks) { configuration.SetEntrypoint("scene_with_red_box"); RunEngine(shell.get(), std::move(configuration)); - PumpOneFrame(shell.get()); + // Set a non-zero viewport metrics, otherwise the scene would be discarded. + PostSync(shell->GetTaskRunners().GetUITaskRunner(), + [engine = shell->GetEngine()]() { + engine->SetViewportMetrics(kImplicitViewId, + ViewportMetrics{1, 1, 1, 22, 0}); + }); + PumpOneFrame(shell.get(), ViewContent::NoViews()); ServiceProtocol::Handler::ServiceProtocolMap empty_params; rapidjson::Document document; @@ -2792,14 +2814,16 @@ TEST_F(ShellTest, DISABLED_DiscardLayerTreeOnResize) { RunEngine(shell.get(), std::move(configuration)); - PumpOneFrame(shell.get(), static_cast(wrong_size.width()), - static_cast(wrong_size.height())); + PumpOneFrame(shell.get(), ViewContent::DummyView( + static_cast(wrong_size.width()), + static_cast(wrong_size.height()))); end_frame_latch.Wait(); // Wrong size, no frames are submitted. ASSERT_EQ(0, external_view_embedder->GetSubmittedFrameCount()); - PumpOneFrame(shell.get(), static_cast(expected_size.width()), - static_cast(expected_size.height())); + PumpOneFrame(shell.get(), ViewContent::DummyView( + static_cast(expected_size.width()), + static_cast(expected_size.height()))); end_frame_latch.Wait(); // Expected size, 1 frame submitted. ASSERT_EQ(1, external_view_embedder->GetSubmittedFrameCount()); @@ -2870,8 +2894,9 @@ TEST_F(ShellTest, DISABLED_DiscardResubmittedLayerTreeOnResize) { RunEngine(shell.get(), std::move(configuration)); - PumpOneFrame(shell.get(), static_cast(origin_size.width()), - static_cast(origin_size.height())); + PumpOneFrame(shell.get(), ViewContent::DummyView( + static_cast(origin_size.width()), + static_cast(origin_size.height()))); end_frame_latch.Wait(); ASSERT_EQ(0, external_view_embedder->GetSubmittedFrameCount()); @@ -2892,8 +2917,9 @@ TEST_F(ShellTest, DISABLED_DiscardResubmittedLayerTreeOnResize) { ASSERT_EQ(0, external_view_embedder->GetSubmittedFrameCount()); // Threads will be merged at the end of this frame. - PumpOneFrame(shell.get(), static_cast(new_size.width()), - static_cast(new_size.height())); + PumpOneFrame(shell.get(), + ViewContent::DummyView(static_cast(new_size.width()), + static_cast(new_size.height()))); end_frame_latch.Wait(); ASSERT_TRUE(raster_thread_merger_ref->IsMerged()); diff --git a/shell/platform/fuchsia/flutter/vulkan_surface_producer.cc b/shell/platform/fuchsia/flutter/vulkan_surface_producer.cc index f99c39a4d095e..538827ef76cb5 100644 --- a/shell/platform/fuchsia/flutter/vulkan_surface_producer.cc +++ b/shell/platform/fuchsia/flutter/vulkan_surface_producer.cc @@ -235,22 +235,21 @@ bool VulkanSurfaceProducer::TransitionSurfacesToExternal( } VkImageMemoryBarrier image_barrier = { - .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, - .pNext = nullptr, - .srcAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, - .dstAccessMask = 0, - .oldLayout = imageInfo.fImageLayout, + .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, + .pNext = nullptr, + .srcAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, + .dstAccessMask = 0, + .oldLayout = imageInfo.fImageLayout, // Understand why this is causing issues on Intel. TODO(fxb/53449) #if defined(__aarch64__) - .newLayout = imageInfo.fImageLayout, + .newLayout = imageInfo.fImageLayout, #else - .newLayout = VK_IMAGE_LAYOUT_GENERAL, + .newLayout = VK_IMAGE_LAYOUT_GENERAL, #endif - .srcQueueFamilyIndex = 0, - .dstQueueFamilyIndex = VK_QUEUE_FAMILY_EXTERNAL_KHR, - .image = vk_surface->GetVkImage(), - .subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1} - }; + .srcQueueFamilyIndex = 0, + .dstQueueFamilyIndex = VK_QUEUE_FAMILY_EXTERNAL_KHR, + .image = vk_surface->GetVkImage(), + .subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1}}; if (!command_buffer->InsertPipelineBarrier( VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, diff --git a/shell/testing/tester_main.cc b/shell/testing/tester_main.cc index 607dc6a6a61a3..4be39c4d70b41 100644 --- a/shell/testing/tester_main.cc +++ b/shell/testing/tester_main.cc @@ -49,17 +49,16 @@ static std::vector> ShaderLibraryMappings() { return { - std::make_shared(impeller_entity_shaders_vk_data, - impeller_entity_shaders_vk_length), - std::make_shared( - impeller_modern_shaders_vk_data, impeller_modern_shaders_vk_length), + std::make_shared(impeller_entity_shaders_vk_data, + impeller_entity_shaders_vk_length), + std::make_shared(impeller_modern_shaders_vk_data, + impeller_modern_shaders_vk_length), #if IMPELLER_ENABLE_3D - std::make_shared( - impeller_scene_shaders_vk_data, impeller_scene_shaders_vk_length), + std::make_shared(impeller_scene_shaders_vk_data, + impeller_scene_shaders_vk_length), #endif // IMPELLER_ENABLE_3D - std::make_shared( - impeller_compute_shaders_vk_data, - impeller_compute_shaders_vk_length), + std::make_shared( + impeller_compute_shaders_vk_data, impeller_compute_shaders_vk_length), }; } diff --git a/testing/dart/platform_view_test.dart b/testing/dart/platform_view_test.dart index 146c865899952..cd581a22d581d 100644 --- a/testing/dart/platform_view_test.dart +++ b/testing/dart/platform_view_test.dart @@ -10,10 +10,12 @@ void main() { test('PlatformView layers do not emit errors from tester', () async { final SceneBuilder builder = SceneBuilder(); builder.addPlatformView(1); - final Scene scene = builder.build(); - - PlatformDispatcher.instance.implicitView!.render(scene); - scene.dispose(); + PlatformDispatcher.instance.onBeginFrame = (Duration duration) { + final Scene scene = builder.build(); + PlatformDispatcher.instance.implicitView!.render(scene); + scene.dispose(); + }; + PlatformDispatcher.instance.scheduleFrame(); // Test harness asserts that this does not emit an error from the shell logs. }); } From 612737bf20b4b4fea352067dd5a756f82ccd7f10 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Mon, 23 Oct 2023 17:38:38 -0400 Subject: [PATCH 858/859] Roll Dart SDK from 53fee35b299f to 901e92d10627 (5 revisions) (#47235) https://dart.googlesource.com/sdk.git/+log/53fee35b299f..901e92d10627 2023-10-23 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-53.0.dev 2023-10-23 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-52.0.dev 2023-10-21 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-51.0.dev 2023-10-21 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-50.0.dev 2023-10-20 dart-internal-merge@dart-ci-internal.iam.gserviceaccount.com Version 3.3.0-49.0.dev If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-sdk-flutter-engine Please CC dart-vm-team@google.com,jimgraham@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter Engine: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --- DEPS | 2 +- ci/licenses_golden/licenses_dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index a21a256cf972d..325870f067a22 100644 --- a/DEPS +++ b/DEPS @@ -57,7 +57,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '53fee35b299f57c786dc8474ede49353a0009ed4', + 'dart_revision': '901e92d1062758dece51a524b523df105328c47b', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_dart b/ci/licenses_golden/licenses_dart index 4b2787dc01161..4409b01315149 100644 --- a/ci/licenses_golden/licenses_dart +++ b/ci/licenses_golden/licenses_dart @@ -1,4 +1,4 @@ -Signature: ca89342367a3be73e64cd33c4455c2c8 +Signature: 5885ccbd7975a54702b26a3184e769aa ==================================================================================================== LIBRARY: dart From 2bbbca00e580114e1c01f5a7d6a25ba64bc4d33c Mon Sep 17 00:00:00 2001 From: Harry Terkelsen Date: Mon, 23 Oct 2023 15:56:43 -0700 Subject: [PATCH 859/859] format --- display_list/display_list_unittests.cc | 6 ++-- fml/message_loop_task_queues_unittests.cc | 33 +++++++------------ shell/common/rasterizer_unittests.cc | 30 +++++++++++------ .../windows/flutter_windows_engine.cc | 3 +- 4 files changed, 34 insertions(+), 38 deletions(-) diff --git a/display_list/display_list_unittests.cc b/display_list/display_list_unittests.cc index 78185657d8d43..e5ce73e307258 100644 --- a/display_list/display_list_unittests.cc +++ b/display_list/display_list_unittests.cc @@ -1060,11 +1060,9 @@ TEST_F(DisplayListTest, SingleOpsMightSupportGroupOpacityBlendMode) { }; #define RUN_TESTS(body) \ - run_tests( \ - #body, [](DlOpReceiver& receiver) { body }, true, false) + run_tests(#body, [](DlOpReceiver& receiver) { body }, true, false) #define RUN_TESTS2(body, expect) \ - run_tests( \ - #body, [](DlOpReceiver& receiver) { body }, expect, expect) + run_tests(#body, [](DlOpReceiver& receiver) { body }, expect, expect) RUN_TESTS(receiver.drawPaint();); RUN_TESTS2(receiver.drawColor(DlColor(SK_ColorRED), DlBlendMode::kSrcOver); diff --git a/fml/message_loop_task_queues_unittests.cc b/fml/message_loop_task_queues_unittests.cc index 7681d99379b74..135af2303413b 100644 --- a/fml/message_loop_task_queues_unittests.cc +++ b/fml/message_loop_task_queues_unittests.cc @@ -46,8 +46,7 @@ TEST(MessageLoopTaskQueue, RegisterOneTask) { [&time](fml::TimePoint wake_time) { ASSERT_TRUE(wake_time == time); }); task_queue->SetWakeable(queue_id, wakeable.get()); - task_queue->RegisterTask( - queue_id, [] {}, time); + task_queue->RegisterTask(queue_id, [] {}, time); ASSERT_TRUE(task_queue->HasPendingTasks(queue_id)); ASSERT_TRUE(task_queue->GetNumPendingTasks(queue_id) == 1); } @@ -55,10 +54,8 @@ TEST(MessageLoopTaskQueue, RegisterOneTask) { TEST(MessageLoopTaskQueue, RegisterTwoTasksAndCount) { auto task_queue = fml::MessageLoopTaskQueues::GetInstance(); auto queue_id = task_queue->CreateTaskQueue(); - task_queue->RegisterTask( - queue_id, [] {}, ChronoTicksSinceEpoch()); - task_queue->RegisterTask( - queue_id, [] {}, fml::TimePoint::Max()); + task_queue->RegisterTask(queue_id, [] {}, ChronoTicksSinceEpoch()); + task_queue->RegisterTask(queue_id, [] {}, fml::TimePoint::Max()); ASSERT_TRUE(task_queue->HasPendingTasks(queue_id)); ASSERT_TRUE(task_queue->GetNumPendingTasks(queue_id) == 2); } @@ -68,11 +65,9 @@ TEST(MessageLoopTaskQueue, RegisterTasksOnMergedQueuesAndCount) { auto platform_queue = task_queue->CreateTaskQueue(); auto raster_queue = task_queue->CreateTaskQueue(); // A task in platform_queue - task_queue->RegisterTask( - platform_queue, []() {}, fml::TimePoint::Now()); + task_queue->RegisterTask(platform_queue, []() {}, fml::TimePoint::Now()); // A task in raster_queue - task_queue->RegisterTask( - raster_queue, []() {}, fml::TimePoint::Now()); + task_queue->RegisterTask(raster_queue, []() {}, fml::TimePoint::Now()); ASSERT_TRUE(task_queue->GetNumPendingTasks(platform_queue) == 1); ASSERT_TRUE(task_queue->GetNumPendingTasks(raster_queue) == 1); @@ -270,10 +265,8 @@ TEST(MessageLoopTaskQueue, WakeUpIndependentOfTime) { [&num_wakes](fml::TimePoint wake_time) { ++num_wakes; }); task_queue->SetWakeable(queue_id, wakeable.get()); - task_queue->RegisterTask( - queue_id, []() {}, ChronoTicksSinceEpoch()); - task_queue->RegisterTask( - queue_id, []() {}, fml::TimePoint::Max()); + task_queue->RegisterTask(queue_id, []() {}, ChronoTicksSinceEpoch()); + task_queue->RegisterTask(queue_id, []() {}, fml::TimePoint::Max()); ASSERT_TRUE(num_wakes == 2); } @@ -293,13 +286,11 @@ TEST(MessageLoopTaskQueue, WokenUpWithNewerTime) { task_queue->SetWakeable(queue_id, wakeable.get()); - task_queue->RegisterTask( - queue_id, []() {}, fml::TimePoint::Max()); + task_queue->RegisterTask(queue_id, []() {}, fml::TimePoint::Max()); const auto now = ChronoTicksSinceEpoch(); expected = now; - task_queue->RegisterTask( - queue_id, []() {}, now); + task_queue->RegisterTask(queue_id, []() {}, now); latch.Wait(); } @@ -435,16 +426,14 @@ TEST(MessageLoopTaskQueue, RegisterTaskWakesUpOwnerQueue) { ASSERT_EQ(0UL, wakes.size()); - task_queue->RegisterTask( - platform_queue, []() {}, time1); + task_queue->RegisterTask(platform_queue, []() {}, time1); ASSERT_EQ(1UL, wakes.size()); ASSERT_EQ(time1, wakes[0]); task_queue->Merge(platform_queue, raster_queue); - task_queue->RegisterTask( - raster_queue, []() {}, time2); + task_queue->RegisterTask(raster_queue, []() {}, time2); ASSERT_EQ(3UL, wakes.size()); ASSERT_EQ(time1, wakes[1]); diff --git a/shell/common/rasterizer_unittests.cc b/shell/common/rasterizer_unittests.cc index 1e21d0d8f1ecb..0bf32b8a78e50 100644 --- a/shell/common/rasterizer_unittests.cc +++ b/shell/common/rasterizer_unittests.cc @@ -199,7 +199,8 @@ TEST(RasterizerTest, framebuffer_info.supports_readback = true; auto surface_frame = std::make_unique( - /*surface=*/nullptr, framebuffer_info, + /*surface=*/ + nullptr, framebuffer_info, /*submit_callback=*/[](const SurfaceFrame&, DlCanvas*) { return true; }, /*frame_size=*/SkISize::Make(800, 600)); EXPECT_CALL(*surface, AllowsDrawingWhenGpuDisabled()).WillOnce(Return(true)); @@ -271,7 +272,8 @@ TEST( SurfaceFrame::FramebufferInfo framebuffer_info; framebuffer_info.supports_readback = true; auto surface_frame = std::make_unique( - /*surface=*/nullptr, framebuffer_info, + /*surface=*/ + nullptr, framebuffer_info, /*submit_callback=*/[](const SurfaceFrame&, DlCanvas*) { return true; }, /*frame_size=*/SkISize::Make(800, 600)); EXPECT_CALL(*surface, AllowsDrawingWhenGpuDisabled()).WillOnce(Return(true)); @@ -343,7 +345,8 @@ TEST( framebuffer_info.supports_readback = true; auto surface_frame = std::make_unique( - /*surface=*/nullptr, framebuffer_info, + /*surface=*/ + nullptr, framebuffer_info, /*submit_callback=*/[](const SurfaceFrame&, DlCanvas*) { return true; }, /*frame_size=*/SkISize::Make(800, 600)); EXPECT_CALL(*surface, AllowsDrawingWhenGpuDisabled()).WillOnce(Return(true)); @@ -412,11 +415,13 @@ TEST(RasterizerTest, framebuffer_info.supports_readback = true; auto surface_frame1 = std::make_unique( - /*surface=*/nullptr, framebuffer_info, + /*surface=*/ + nullptr, framebuffer_info, /*submit_callback=*/[](const SurfaceFrame&, DlCanvas*) { return true; }, /*frame_size=*/SkISize::Make(800, 600)); auto surface_frame2 = std::make_unique( - /*surface=*/nullptr, framebuffer_info, + /*surface=*/ + nullptr, framebuffer_info, /*submit_callback=*/[](const SurfaceFrame&, DlCanvas*) { return true; }, /*frame_size=*/SkISize::Make(800, 600)); EXPECT_CALL(*surface, AllowsDrawingWhenGpuDisabled()) @@ -645,7 +650,8 @@ TEST(RasterizerTest, SurfaceFrame::FramebufferInfo framebuffer_info; framebuffer_info.supports_readback = true; auto surface_frame = std::make_unique( - /*surface=*/nullptr, /*framebuffer_info=*/framebuffer_info, + /*surface=*/ + nullptr, /*framebuffer_info=*/framebuffer_info, /*submit_callback=*/[](const SurfaceFrame&, DlCanvas*) { return true; }, /*frame_size=*/SkISize::Make(800, 600)); EXPECT_CALL(*surface, AllowsDrawingWhenGpuDisabled()).WillOnce(Return(true)); @@ -704,7 +710,8 @@ TEST( framebuffer_info.supports_readback = true; auto surface_frame = std::make_unique( - /*surface=*/nullptr, /*framebuffer_info=*/framebuffer_info, + /*surface=*/ + nullptr, /*framebuffer_info=*/framebuffer_info, /*submit_callback=*/[](const SurfaceFrame&, DlCanvas*) { return true; }, /*frame_size=*/SkISize::Make(800, 600)); EXPECT_CALL(*surface, AllowsDrawingWhenGpuDisabled()).WillOnce(Return(true)); @@ -764,7 +771,8 @@ TEST( framebuffer_info.supports_readback = true; auto surface_frame = std::make_unique( - /*surface=*/nullptr, /*framebuffer_info=*/framebuffer_info, + /*surface=*/ + nullptr, /*framebuffer_info=*/framebuffer_info, /*submit_callback=*/[](const SurfaceFrame&, DlCanvas*) { return true; }, /*frame_size=*/SkISize::Make(800, 600)); EXPECT_CALL(*surface, AllowsDrawingWhenGpuDisabled()).WillOnce(Return(false)); @@ -823,7 +831,8 @@ TEST( framebuffer_info.supports_readback = true; auto surface_frame = std::make_unique( - /*surface=*/nullptr, /*framebuffer_info=*/framebuffer_info, + /*surface=*/ + nullptr, /*framebuffer_info=*/framebuffer_info, /*submit_callback=*/[](const SurfaceFrame&, DlCanvas*) { return true; }, /*frame_size=*/SkISize::Make(800, 600)); EXPECT_CALL(*surface, AllowsDrawingWhenGpuDisabled()).WillOnce(Return(false)); @@ -945,7 +954,8 @@ TEST(RasterizerTest, SurfaceFrame::FramebufferInfo framebuffer_info; framebuffer_info.supports_readback = true; return std::make_unique( - /*surface=*/nullptr, framebuffer_info, + /*surface=*/ + nullptr, framebuffer_info, /*submit_callback=*/ [](const SurfaceFrame& frame, DlCanvas*) { return true; }, /*frame_size=*/SkISize::Make(800, 600)); diff --git a/shell/platform/windows/flutter_windows_engine.cc b/shell/platform/windows/flutter_windows_engine.cc index 2e04c14f2446d..6a5371c27c6d3 100644 --- a/shell/platform/windows/flutter_windows_engine.cc +++ b/shell/platform/windows/flutter_windows_engine.cc @@ -569,8 +569,7 @@ void FlutterWindowsEngine::HandlePlatformMessage( auto message = ConvertToDesktopMessage(*engine_message); - message_dispatcher_->HandleMessage( - message, [this] {}, [this] {}); + message_dispatcher_->HandleMessage(message, [this] {}, [this] {}); } void FlutterWindowsEngine::ReloadSystemFonts() {