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
1 change: 1 addition & 0 deletions ci/licenses_golden/licenses_flutter
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ FILE: ../../../flutter/lib/web_ui/lib/src/engine/surface/opacity.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/surface/picture.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/surface/platform_view.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/surface/scene.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/surface/scene_builder.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/surface/surface.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/surface/transform.dart
FILE: ../../../flutter/lib/web_ui/lib/src/engine/test_embedding.dart
Expand Down
1 change: 1 addition & 0 deletions lib/web_ui/lib/src/engine.dart
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ part 'engine/surface/opacity.dart';
part 'engine/surface/picture.dart';
part 'engine/surface/platform_view.dart';
part 'engine/surface/scene.dart';
part 'engine/surface/scene_builder.dart';
part 'engine/surface/surface.dart';
part 'engine/surface/transform.dart';
part 'engine/test_embedding.dart';
Expand Down
21 changes: 21 additions & 0 deletions lib/web_ui/lib/src/engine/surface/scene.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,27 @@

part of engine;

class SurfaceScene implements ui.Scene {
/// This class is created by the engine, and should not be instantiated
/// or extended directly.
///
/// To create a Scene object, use a [SceneBuilder].
SurfaceScene(this.webOnlyRootElement);

final html.Element webOnlyRootElement;

/// Creates a raster image representation of the current state of the scene.
/// This is a slow operation that is performed on a background thread.
Future<ui.Image> toImage(int width, int height) {
throw UnsupportedError('toImage is not supported on the Web');
}

/// Releases the resources used by this scene.
///
/// After calling this function, the scene is cannot be used further.
void dispose() {}
}

/// A surface that creates a DOM element for whole app.
class PersistedScene extends PersistedContainerSurface {
PersistedScene(PersistedScene oldLayer) : super(oldLayer) {
Expand Down
Loading