Skip to content

Commit c2938d0

Browse files
authored
Revert "Migration to PlatformDispatcher and multi-window flutter#20496" (flutter#21792)
* Revert "Fix documentation build for window changes. (flutter#21780)" This reverts commit 931a046. * Revert "Migration to PlatformDispatcher and multi-window (flutter#20496)" This reverts commit 85b0031.
1 parent 05d9793 commit c2938d0

File tree

73 files changed

+2528
-4383
lines changed

Some content is hidden

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

73 files changed

+2528
-4383
lines changed

ci/licenses_golden/licenses_flutter

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,6 @@ FILE: ../../../flutter/lib/ui/painting/single_frame_codec.h
371371
FILE: ../../../flutter/lib/ui/painting/vertices.cc
372372
FILE: ../../../flutter/lib/ui/painting/vertices.h
373373
FILE: ../../../flutter/lib/ui/painting/vertices_unittests.cc
374-
FILE: ../../../flutter/lib/ui/platform_dispatcher.dart
375374
FILE: ../../../flutter/lib/ui/plugins.dart
376375
FILE: ../../../flutter/lib/ui/plugins/callback_cache.cc
377376
FILE: ../../../flutter/lib/ui/plugins/callback_cache.h
@@ -500,7 +499,6 @@ FILE: ../../../flutter/lib/web_ui/lib/src/engine/keyboard.dart
500499
FILE: ../../../flutter/lib/web_ui/lib/src/engine/mouse_cursor.dart
501500
FILE: ../../../flutter/lib/web_ui/lib/src/engine/onscreen_logging.dart
502501
FILE: ../../../flutter/lib/web_ui/lib/src/engine/picture.dart
503-
FILE: ../../../flutter/lib/web_ui/lib/src/engine/platform_dispatcher.dart
504502
FILE: ../../../flutter/lib/web_ui/lib/src/engine/platform_views.dart
505503
FILE: ../../../flutter/lib/web_ui/lib/src/engine/plugins.dart
506504
FILE: ../../../flutter/lib/web_ui/lib/src/engine/pointer_binding.dart
@@ -555,7 +553,6 @@ FILE: ../../../flutter/lib/web_ui/lib/src/ui/natives.dart
555553
FILE: ../../../flutter/lib/web_ui/lib/src/ui/painting.dart
556554
FILE: ../../../flutter/lib/web_ui/lib/src/ui/path.dart
557555
FILE: ../../../flutter/lib/web_ui/lib/src/ui/path_metrics.dart
558-
FILE: ../../../flutter/lib/web_ui/lib/src/ui/platform_dispatcher.dart
559556
FILE: ../../../flutter/lib/web_ui/lib/src/ui/pointer.dart
560557
FILE: ../../../flutter/lib/web_ui/lib/src/ui/semantics.dart
561558
FILE: ../../../flutter/lib/web_ui/lib/src/ui/test_embedding.dart

lib/ui/compositing.dart

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ part of dart.ui;
1010
///
1111
/// To create a Scene object, use a [SceneBuilder].
1212
///
13-
/// Scene objects can be displayed on the screen using the [FlutterView.render]
14-
/// method.
13+
/// Scene objects can be displayed on the screen using the
14+
/// [Window.render] method.
1515
@pragma('vm:entry-point')
1616
class Scene extends NativeFieldWrapperClass2 {
1717
/// This class is created by the engine, and should not be instantiated
@@ -186,7 +186,7 @@ class PhysicalShapeEngineLayer extends _EngineLayerWrapper {
186186

187187
/// Builds a [Scene] containing the given visuals.
188188
///
189-
/// A [Scene] can then be rendered using [FlutterView.render].
189+
/// A [Scene] can then be rendered using [Window.render].
190190
///
191191
/// To draw graphical operations onto a [Scene], first create a
192192
/// [Picture] using a [PictureRecorder] and a [Canvas], and then add
@@ -655,13 +655,13 @@ class SceneBuilder extends NativeFieldWrapperClass2 {
655655
/// - 0x08: visualizeEngineStatistics - graph UI thread frame times
656656
/// Set enabledOptions to 0x0F to enable all the currently defined features.
657657
///
658-
/// The "UI thread" is the thread that includes all the execution of the main
659-
/// Dart isolate (the isolate that can call [FlutterView.render]). The UI
660-
/// thread frame time is the total time spent executing the
661-
/// [PlatformDispatcher.onBeginFrame] callback. The "raster thread" is the
662-
/// thread (running on the CPU) that subsequently processes the [Scene]
663-
/// provided by the Dart code to turn it into GPU commands and send it to the
664-
/// GPU.
658+
/// The "UI thread" is the thread that includes all the execution of
659+
/// the main Dart isolate (the isolate that can call
660+
/// [Window.render]). The UI thread frame time is the total time
661+
/// spent executing the [Window.onBeginFrame] callback. The "raster
662+
/// thread" is the thread (running on the CPU) that subsequently
663+
/// processes the [Scene] provided by the Dart code to turn it into
664+
/// GPU commands and send it to the GPU.
665665
///
666666
/// See also the [PerformanceOverlayOption] enum in the rendering library.
667667
/// for more details.
@@ -802,7 +802,7 @@ class SceneBuilder extends NativeFieldWrapperClass2 {
802802
///
803803
/// Returns a [Scene] containing the objects that have been added to
804804
/// this scene builder. The [Scene] can then be displayed on the
805-
/// screen with [FlutterView.render].
805+
/// screen with [Window.render].
806806
///
807807
/// After calling this function, the scene builder object is invalid and
808808
/// cannot be used further.

lib/ui/compositing/scene.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,9 @@ Scene::Scene(std::shared_ptr<flutter::Layer> rootLayer,
4242
uint32_t rasterizerTracingThreshold,
4343
bool checkerboardRasterCacheImages,
4444
bool checkerboardOffscreenLayers) {
45-
// Currently only supports a single window.
4645
auto viewport_metrics = UIDartState::Current()
4746
->platform_configuration()
48-
->get_window(0)
47+
->window()
4948
->viewport_metrics();
5049

5150
layer_tree_ = std::make_unique<LayerTree>(

lib/ui/dart_ui.gni

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ dart_ui_files = [
1313
"//flutter/lib/ui/lerp.dart",
1414
"//flutter/lib/ui/natives.dart",
1515
"//flutter/lib/ui/painting.dart",
16-
"//flutter/lib/ui/platform_dispatcher.dart",
1716
"//flutter/lib/ui/plugins.dart",
1817
"//flutter/lib/ui/pointer.dart",
1918
"//flutter/lib/ui/semantics.dart",

0 commit comments

Comments
 (0)