Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Win32FlutterWindow in preparation for UWP windowing implementation #18878

Merged
merged 17 commits into from
Jul 7, 2020

Conversation

clarkezone
Copy link
Contributor

@clarkezone clarkezone commented Jun 7, 2020

Description

Extract key parts of Win32FlutterWindow into a new class FlutterWindowsView that will act as a HWND/CoreWindow agnostic Windows view. Win32FlutterWindow communicates state changes to FlutterWindowsView via a new FlutterWindowBinding interface. Subsequent changes will introduce a UWPFlutterWindow and related machinery.

This approach supersedes Flutter Windows API v2 prototype for review [do not submit] #18112

Related Issues

Add support for Windows 10/UWP flutter/flutter#14967

Tests

Covered by existing collateral

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the contributor guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the C++, Objective-C, Java style guides for the engine.
  • I read the tree hygiene wiki page, which explains my responsibilities.
  • I updated/added relevant documentation.
  • All existing and new tests are passing.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Did any tests fail when you ran them? Please read handling breaking changes.

@clarkezone clarkezone added the Work in progress (WIP) Not ready (yet) for review! label Jun 7, 2020
@fluttergithubbot
Copy link
Contributor

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@auto-assign auto-assign bot requested a review from flar June 7, 2020 17:32
@clarkezone clarkezone force-pushed the refactorwin32flutterwindow branch 2 times, most recently from a6a57c0 to 04a4681 Compare June 19, 2020 12:02
Switch input handling infra to FlutterWindowsView

win32_flutter_window implement WindowBindingHandler

Strip unneeded functionality from win32flutterwindow

Fulfill WindowBindingHandler interface in Win32FlutterWindow

Add implementations for missing input handling in Win32FlutterWindow

Cleanup dead code

Correctly hook up rendering again

Fix resizing

clang-format

Fix clipboard

Cleanup

Rename

Add comments

cleanup
@clarkezone clarkezone force-pushed the refactorwin32flutterwindow branch from 04a4681 to ee29027 Compare June 19, 2020 12:12
@clarkezone clarkezone removed the Work in progress (WIP) Not ready (yet) for review! label Jun 19, 2020
@clarkezone
Copy link
Contributor Author

Ready for review.

shell/platform/windows/window_state.h Outdated Show resolved Hide resolved
shell/platform/windows/window_binding_handler.h Outdated Show resolved Hide resolved
shell/platform/windows/window_binding_handler.h Outdated Show resolved Hide resolved
shell/platform/windows/window_binding_handler.h Outdated Show resolved Hide resolved
shell/platform/windows/window_binding_handler.h Outdated Show resolved Hide resolved
shell/platform/windows/flutter_windows_view.cc Outdated Show resolved Hide resolved
shell/platform/windows/flutter_windows_view.cc Outdated Show resolved Hide resolved
shell/platform/windows/win32_flutter_window.h Outdated Show resolved Hide resolved
shell/platform/windows/win32_flutter_window.h Outdated Show resolved Hide resolved
shell/platform/windows/win32_flutter_window.h Outdated Show resolved Hide resolved
@clarkezone
Copy link
Contributor Author

All actionable feedback addressed, some questions in comments.

Copy link
Contributor

@stuartmorgan stuartmorgan left a comment

Choose a reason for hiding this comment

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

Just nits left other than thing related to the open questions. I think I answered them all; if I missed any let me know.

shell/platform/windows/flutter_windows_view.h Outdated Show resolved Hide resolved
shell/platform/windows/win32_window.h Outdated Show resolved Hide resolved
shell/platform/windows/window_binding_handler.h Outdated Show resolved Hide resolved
shell/platform/windows/window_binding_handler_delegate.h Outdated Show resolved Hide resolved
@clarkezone
Copy link
Contributor Author

All feedback addrsesed.

Copy link
Contributor

@stuartmorgan stuartmorgan left a comment

Choose a reason for hiding this comment

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

LGTM

@stuartmorgan
Copy link
Contributor

Merged in latest master since there were a bunch of test failures on the last run (mostly non-Windows)

@clarkezone clarkezone merged commit d0d6a4c into flutter:master Jul 7, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 7, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 7, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 7, 2020
justinmc pushed a commit to justinmc/engine that referenced this pull request Jul 7, 2020
…tation (flutter#18878)

* Add flutter_windows_view and window_binding_handler

Switch input handling infra to FlutterWindowsView

win32_flutter_window implement WindowBindingHandler

Strip unneeded functionality from win32flutterwindow

Fulfill WindowBindingHandler interface in Win32FlutterWindow

Add implementations for missing input handling in Win32FlutterWindow

Cleanup dead code

Correctly hook up rendering again

Fix resizing

clang-format

Fix clipboard

Cleanup

Rename

Add comments

cleanup

* clang-format

* CR Feedback

* clang-format; gn format

* Fix licensing

* CR feedback

* CR feedback

* CR feedback

* Git rid of unnecessar :: prefixes

* Extract WindowBindingHandlerDelegate as an interface

* Missing file

* Extract physical window bounds as a struct

* CR Feedback

* CR feedback

* clang-format

Co-authored-by: Stuart Morgan <stuartmorgan@google.com>
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 7, 2020
a-siva added a commit to a-siva/flutter that referenced this pull request Jul 7, 2020
3fe5edf Roll Skia from cf5e35f72130 to b4d60f807dbd (5 revisions) (flutter/engine#19587)
b919945 include list_libraries.dart as a snapshot for fuchsia
(flutter/engine#19567)
de0932b Manual roll of Dart 06cb010247...69aba23371 (flutter/engine#19577)
35b5aa5 switch const finder to package_config (flutter/engine#19576)
07d5090 Roll Skia from 0c0d8dd6d637 to cf5e35f72130 (13 revisions) (flutter/engine#19573)
0541502 kick build (flutter/engine#19575)
a53782f Roll Skia from 6130d5079d55 to 0c0d8dd6d637 (3 revisions) (flutter/engine#19570)
d0d6a4c Refactor Win32FlutterWindow in preparation for UWP windowing implementation (flutter/engine#18878)
110a579 Track motion events for reuse post gesture disambiguation (flutter/engine#19484)
5f8e91c Resubmit frame when the surface is switched (flutter/engine#19555)
ab0abdd Roll Fuchsia Linux SDK from TvWbh... to 1oAHN...
(flutter/engine#19566)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 7, 2020
@clarkezone clarkezone deleted the refactorwin32flutterwindow branch September 17, 2020 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants