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

Conversation

@clarkezone
Copy link

@clarkezone clarkezone commented Jul 16, 2019

Start work on flutter/flutter#30726 by adding an alternative win32 shell platform implementation for Windows that is not based on GLFW and that uses LIBANGLE for rendering and native win32 windowing and input. This change does not replace the GLFW implementation but rather runs side by side with it producing a secondary flutter_windows_win32.dll artifact. The following items must be added to attain parity with the GLFW implementation:

  • Custom task scheduling
  • Support for keyboard modifier keys
  • Async texture uploads
  • Correct high DPI handling on Windows versions < 1703

and will be added in subsequent changes. The change is dependent on flutter/buildroot#276 which will need to land ahead of this one. @stuartmorgan for FYI

@stuartmorgan-g stuartmorgan-g self-requested a review July 17, 2019 03:58
@stuartmorgan-g
Copy link
Contributor

The change is dependent on an update to buildroot to add support for LIBANGLE which will need to land ahead of this one.

Posted as flutter/buildroot#276

Copy link
Contributor

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

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

First pass comments. I'll need to do a lot more review, since I'm not familiar with Windows APIs, there are a number of important classes with no comments, and there's a whole lot of code.

In retrospect I think it would have been much better to cut this into incremental PRs with a very small initial scope (e.g., just drawing, with no event handling, plugin support, etc.) and then incrementally expanding. That would have been much easier to review, and would likely have avoided the unfortunate replication of a lot of structure from the GLFW embedding that we don't actually want. However, given that doing that now would probably set things back substantially I'm fine to go forward with the PR in this basic structure, and then iterating from there.


// A function for hooking into unicode code point input.
virtual void CharHook(GLFWwindow* window, unsigned int code_point) = 0;
virtual void CharHook(GLFWwindow* window,
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be reverted, as it's unrelated to the PR.

Copy link
Author

Choose a reason for hiding this comment

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

I've tried various git approaches none of which have worked. How do you recommend I revert this?

Copy link
Contributor

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

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

Updated with some follow up on my earlier comments. After giving this more thought several of the structural changes I had requested initially are really better done later as you suggested, given that this is a duplicate-and-evolve-from-glfw rather than a fresh start.

Adds the ability to publish multiple folders of client wrappers. Uses
that functionality to publish the original version, a _glfw version
(which is the the same as the original, and will replace it after recipe
updates) and a _windows version.

Also restructures the dependency handling for the win32 and glfw
versions slightly, including new groups and conditionizing on
build_glfw_shell now (even though it's on by default).
@stuartmorgan-g
Copy link
Contributor

I pushed some GN changes that handle publishing several copies of the wrapper (one for win32, one for GLFW, each with copies of the core files).

Copy link
Author

@clarkezone clarkezone left a comment

Choose a reason for hiding this comment

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

Unclear why i started a review


// A function for hooking into unicode code point input.
virtual void CharHook(GLFWwindow* window, unsigned int code_point) = 0;
virtual void CharHook(GLFWwindow* window,
Copy link
Author

Choose a reason for hiding this comment

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

I've tried various git approaches none of which have worked. How do you recommend I revert this?

@clarkezone
Copy link
Author

Is there an autoformatting tool that works on windows? I was doing it manually

@stuartmorgan-g
Copy link
Contributor

IIRC I have clang-format working on Windows. That patch was created on my macOS machine though since that's what I happened to be on at the moment.

@stuartmorgan-g
Copy link
Contributor

FYI I'm going to have to revert the buildroot roll in a few minutes, since my patch broke other unit tests, and other buildroot changes landed between that and the fix that I can't easily roll past. I'll work on getting that resolved tomorrow to unblock again.

@stuartmorgan-g
Copy link
Contributor

I'll work on the new license script issues (the current format_and_dart_test failures) tomorrow.

@stuartmorgan-g stuartmorgan-g requested a review from Hixie August 14, 2019 17:41
@stuartmorgan-g
Copy link
Contributor

Filed https://bugs.chromium.org/p/angleproject/issues/detail?id=3811 about the fact that we're shipping ~40 copies of the ANGLE license; if that's resolved the effects on distribution size from this PR will be reduced substantially.

@stuartmorgan-g stuartmorgan-g added affects: desktop waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. labels Aug 14, 2019
@stuartmorgan-g stuartmorgan-g merged commit ff484d4 into flutter:master Aug 14, 2019
@stuartmorgan-g
Copy link
Contributor

stuartmorgan-g commented Aug 15, 2019

The primary builder for Windows just went green for this commit—it looks like it's finally landed, to stay! \o/

I've starting filing some of the follow-up bugs, and will continue to do so tomorrow.

engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 15, 2019
engine-flutter-autoroll added a commit to flutter/flutter that referenced this pull request Aug 15, 2019
[email protected]:flutter/engine.git/compare/c5e30553cd1a...5e155c6

git log c5e3055..5e155c6 --no-merges --oneline
2019-08-14 [email protected] some drive-by docs while I was reading the embedding classes (flutter/engine#9341)
2019-08-14 [email protected] Initialize the engine in the running state to match the animator's default state (flutter/engine#11011)
2019-08-14 [email protected] Trace RasterCacheResult::Draw (flutter/engine#11004)
2019-08-14 [email protected] Rename macOS FLE* classes to Flutter* (flutter/engine#11010)
2019-08-14 [email protected] [Windows] Alternative Windows shell platform implementation (flutter/engine#9835)

The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff ([email protected]), and stop
the roller if necessary.
@clarkezone
Copy link
Author

@stuartmorgan sounds good re followup bugs.. is there a view / query / tag that aggregates them all?

@stuartmorgan-g
Copy link
Contributor

This query will get all the Windows engine bugs. For what's needed to switch over I'm just using a tracking bug since it's a pretty short list, so didn't seem like it needed a whole project.

@tvolkert
Copy link
Contributor

This regressed our "license_compressed_bytes" benchmark. If that was intentional, @stuartmorgan can you rebaseline?

@stuartmorgan-g
Copy link
Contributor

It is intentional, but let me do a quick ANGLE roll to pick up https://bugs.chromium.org/p/angleproject/issues/detail?id=3811 before rebaselining since that will substantially reduce the regression.

@clarkezone clarkezone deleted the nativewindows branch August 16, 2019 02:34
cyanglaz pushed a commit to cyanglaz/engine that referenced this pull request Aug 16, 2019
Rolls buildroot forward to pick up support for building ANGLE. Needed for flutter#9835

Updates license check to ignore a new top-level buildfile-only directory added as part of that support.
@stuartmorgan-g
Copy link
Contributor

Closing the loop on license_compressed_bytes, with #11035 we're now just back under the previous baseline target. However, I'll rebase it up slightly so that it won't be a landmine for future small changes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

affects: desktop cla: yes waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants