Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ci/licenses_golden/licenses_flutter
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ FILE: ../../../flutter/lib/ui/painting/single_frame_codec.h
FILE: ../../../flutter/lib/ui/painting/vertices.cc
FILE: ../../../flutter/lib/ui/painting/vertices.h
FILE: ../../../flutter/lib/ui/painting/vertices_unittests.cc
FILE: ../../../flutter/lib/ui/platform_dispatcher.dart
FILE: ../../../flutter/lib/ui/plugins.dart
FILE: ../../../flutter/lib/ui/plugins/callback_cache.cc
FILE: ../../../flutter/lib/ui/plugins/callback_cache.h
Expand Down Expand Up @@ -500,6 +501,7 @@ FILE: ../../../flutter/lib/web_ui/lib/src/engine/keyboard.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/mouse_cursor.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/onscreen_logging.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/picture.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/platform_dispatcher.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/platform_views.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/plugins.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/pointer_binding.dart
Expand Down Expand Up @@ -554,6 +556,7 @@ FILE: ../../../flutter/lib/web_ui/lib/src/ui/natives.dart
FILE: ../../../flutter/lib/web_ui/lib/src/ui/painting.dart
FILE: ../../../flutter/lib/web_ui/lib/src/ui/path.dart
FILE: ../../../flutter/lib/web_ui/lib/src/ui/path_metrics.dart
FILE: ../../../flutter/lib/web_ui/lib/src/ui/platform_dispatcher.dart
FILE: ../../../flutter/lib/web_ui/lib/src/ui/pointer.dart
FILE: ../../../flutter/lib/web_ui/lib/src/ui/semantics.dart
FILE: ../../../flutter/lib/web_ui/lib/src/ui/test_embedding.dart
Expand Down
22 changes: 11 additions & 11 deletions lib/ui/compositing.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ part of dart.ui;
///
/// To create a Scene object, use a [SceneBuilder].
///
/// Scene objects can be displayed on the screen using the
/// [Window.render] method.
/// Scene objects can be displayed on the screen using the [FlutterView.render]
/// method.
@pragma('vm:entry-point')
class Scene extends NativeFieldWrapperClass2 {
/// This class is created by the engine, and should not be instantiated
Expand Down Expand Up @@ -186,7 +186,7 @@ class PhysicalShapeEngineLayer extends _EngineLayerWrapper {

/// Builds a [Scene] containing the given visuals.
///
/// A [Scene] can then be rendered using [Window.render].
/// A [Scene] can then be rendered using [FlutterView.render].
///
/// To draw graphical operations onto a [Scene], first create a
/// [Picture] using a [PictureRecorder] and a [Canvas], and then add
Expand Down Expand Up @@ -655,13 +655,13 @@ class SceneBuilder extends NativeFieldWrapperClass2 {
/// - 0x08: visualizeEngineStatistics - graph UI thread frame times
/// Set enabledOptions to 0x0F to enable all the currently defined features.
///
/// The "UI thread" is the thread that includes all the execution of
/// the main Dart isolate (the isolate that can call
/// [Window.render]). The UI thread frame time is the total time
/// spent executing the [Window.onBeginFrame] callback. The "raster
/// thread" is the thread (running on the CPU) that subsequently
/// processes the [Scene] provided by the Dart code to turn it into
/// GPU commands and send it to the GPU.
/// The "UI thread" is the thread that includes all the execution of the main
/// Dart isolate (the isolate that can call [FlutterView.render]). The UI
/// thread frame time is the total time spent executing the
/// [PlatformDispatcher.onBeginFrame] callback. The "raster thread" is the
/// thread (running on the CPU) that subsequently processes the [Scene]
/// provided by the Dart code to turn it into GPU commands and send it to the
/// GPU.
///
/// See also the [PerformanceOverlayOption] enum in the rendering library.
/// for more details.
Expand Down Expand Up @@ -802,7 +802,7 @@ class SceneBuilder extends NativeFieldWrapperClass2 {
///
/// Returns a [Scene] containing the objects that have been added to
/// this scene builder. The [Scene] can then be displayed on the
/// screen with [Window.render].
/// screen with [FlutterView.render].
///
/// After calling this function, the scene builder object is invalid and
/// cannot be used further.
Expand Down
3 changes: 2 additions & 1 deletion lib/ui/compositing/scene.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ Scene::Scene(std::shared_ptr<flutter::Layer> rootLayer,
uint32_t rasterizerTracingThreshold,
bool checkerboardRasterCacheImages,
bool checkerboardOffscreenLayers) {
// Currently only supports a single window.
auto viewport_metrics = UIDartState::Current()
->platform_configuration()
->window()
->get_window(0)
->viewport_metrics();

layer_tree_ = std::make_unique<LayerTree>(
Expand Down
1 change: 1 addition & 0 deletions lib/ui/dart_ui.gni
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ dart_ui_files = [
"//flutter/lib/ui/lerp.dart",
"//flutter/lib/ui/natives.dart",
"//flutter/lib/ui/painting.dart",
"//flutter/lib/ui/platform_dispatcher.dart",
"//flutter/lib/ui/plugins.dart",
"//flutter/lib/ui/pointer.dart",
"//flutter/lib/ui/semantics.dart",
Expand Down
Loading