Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@dnfield
Copy link
Contributor

@dnfield dnfield commented May 12, 2023

@dnfield dnfield requested a review from loic-sharma May 12, 2023 23:03
@flutter-dashboard flutter-dashboard bot added embedder Related to the embedder API platform-macos labels May 12, 2023
@loic-sharma loic-sharma requested a review from dkwingsmt May 12, 2023 23:03
@dnfield
Copy link
Contributor Author

dnfield commented May 12, 2023

import 'dart:ui';

// import 'package:flutter/widgets.dart';
// import 'package:flutter/services.dart';

void main() {
  // WidgetsFlutterBinding.ensureInitialized();
  // SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
  print(PlatformDispatcher.instance.displays.toList());
  print(PlatformDispatcher.instance.implicitView!.display);
  PlatformDispatcher.instance.onMetricsChanged = () {
    print(PlatformDispatcher.instance.displays.toList());
    print(PlatformDispatcher.instance.implicitView!.display);
  };
}

Is the simple Dart application I've been using to test this. In a default Flutter app it's working well to report display sizes when the window gets moved around to different monitors or the monitor configuration changes.

Copy link
Member

@cbracken cbracken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few comments.

Copy link
Member

@loic-sharma loic-sharma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once you've double-checked FlutterWindowMetricsEvent.display_id's type: #41998 (comment)

Please make sure to also get Chris's approval for macOS embedder changes and Chris's/Chinmay's approval for embedder API changes.

Copy link
Member

@cbracken cbracken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

/// Display refers to a graphics hardware system consisting of a framebuffer,
/// typically a monitor or a screen. This ID is unique per display and is
/// stable until the Flutter application restarts.
typedef uint64_t FlutterEngineDisplayId;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dnfield dnfield added the autosubmit Merge PR when tree becomes green via auto submit App label May 17, 2023
@auto-submit auto-submit bot merged commit 0ae3719 into flutter:main May 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 17, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request May 17, 2023
…127043)

flutter/engine@47fd496...0ae3719

2023-05-17 [email protected] Report displays for macOS (flutter/engine#41998)
2023-05-17 [email protected] Fix bounds when painting style is stroke width for image shaders (flutter/engine#42052)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected] 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
CaseyHillers pushed a commit to CaseyHillers/flutter that referenced this pull request May 24, 2023
…lutter#127043)

flutter/engine@47fd496...0ae3719

2023-05-17 [email protected] Report displays for macOS (flutter/engine#41998)
2023-05-17 [email protected] Fix bounds when painting style is stroke width for image shaders (flutter/engine#42052)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected] 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App embedder Related to the embedder API platform-macos

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Embedder API] Fix FlutterEngineNotifyDisplayUpdate's ABI stability

3 participants