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
Show all changes
41 commits
Select commit Hold shift + click to select a range
90235fd
Alternative Windows shell platform implementation Initial commit.
Apr 6, 2019
3081296
Fix TODO switch struct to class and suspend / resume support for plat…
clarkezone Jul 18, 2019
c4dd1bb
CR feedback
clarkezone Jul 18, 2019
75fd58b
CR Feedback
clarkezone Jul 18, 2019
48191ab
GN updates
stuartmorgan-g Jul 18, 2019
66f124e
GN format
stuartmorgan-g Jul 18, 2019
73d70ad
Switch to real buildroot
stuartmorgan-g Jul 18, 2019
df0723e
Merge remote-tracking branch 'upstream/master' into nativewindows
stuartmorgan-g Jul 19, 2019
1fd6193
clang-format
stuartmorgan-g Jul 19, 2019
07c3587
CR feedback
clarkezone Jul 21, 2019
e2e85b5
CR feedback
clarkezone Jul 21, 2019
e70105f
CR feedback
clarkezone Jul 21, 2019
3e04d35
CR Feedback
clarkezone Jul 23, 2019
2905115
CR Feedback
clarkezone Jul 25, 2019
c6f5bd7
CR feedback
clarkezone Jul 27, 2019
8db6e3b
Merge branch 'master' into nativewindows
clarkezone Jul 27, 2019
fffd7a8
Add support to Windows shell platform for 7d320c45ab2556b69f2f6453eab…
clarkezone Jul 27, 2019
77cb2a1
Format happy
clarkezone Jul 28, 2019
8c3a74d
CR feedback
clarkezone Jul 28, 2019
b838153
CR feedback rename FlutterWindow to Win32FlutterWindow
clarkezone Jul 28, 2019
5d8998d
Fix formatting
clarkezone Jul 30, 2019
686094a
Because formatting errors come one at a time
clarkezone Jul 30, 2019
7f0a60e
CR feedback
clarkezone Aug 4, 2019
d63adac
CR feedback
clarkezone Aug 4, 2019
02763a9
Style fix
clarkezone Aug 4, 2019
eadd294
Fix unit test build
stuartmorgan-g Aug 6, 2019
ab7635a
Fix a few remaining GLFW references
stuartmorgan-g Aug 6, 2019
c8d6658
Move helper that's only needed internally from .h to .cc
stuartmorgan-g Aug 6, 2019
57385f5
Tweak copy/move disabling for AngleSurfaceManager
stuartmorgan-g Aug 6, 2019
1616703
Add missing error return in TextInputPlugin
stuartmorgan-g Aug 6, 2019
9d09dbe
Merge remote-tracking branch 'upstream/master' into nativewindows
stuartmorgan-g Aug 6, 2019
09955af
Update MessengerSend with the recent changes from the GLFW embedding
stuartmorgan-g Aug 6, 2019
89847a7
Autoformatting
stuartmorgan-g Aug 7, 2019
f6c85f0
Merge branch 'master' into nativewindows
stuartmorgan-g Aug 14, 2019
2039ad4
License files update part 1: flutter
stuartmorgan-g Aug 14, 2019
495573f
License files update part 2: third_party
stuartmorgan-g Aug 14, 2019
f06ab12
License files update part 3: LICENSE
stuartmorgan-g Aug 14, 2019
cb2919a
Merge branch 'master' into nativewindows
stuartmorgan-g Aug 14, 2019
208379c
Update licenses_third_party signature for merge
stuartmorgan-g Aug 14, 2019
8bea63c
Merge branch 'master' into nativewindows
stuartmorgan-g Aug 14, 2019
ed7f45c
Signature update for merge again
stuartmorgan-g Aug 14, 2019
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
4 changes: 4 additions & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ group("flutter") {
"$flutter_root/third_party/txt:txt_unittests",
]

if (is_win) {
public_deps += [ "$flutter_root/shell/platform/windows/client_wrapper:client_wrapper_windows_unittests" ]
}

if (!is_win) {
public_deps += [
"$flutter_root/fml:fml_benchmarks",
Expand Down
3 changes: 3 additions & 0 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,9 @@ deps = {
'src/third_party/swiftshader':
Var('swiftshader_git') + '/SwiftShader.git' + '@' + 'd70129a3d3409dac58e14f819b62620393afb652',

'src/third_party/angle':
Var('github_git') + '/google/angle.git' + '@' + '2d0a9acb05511a8fdaf0cd27d0da22599516a68b',

'src/third_party/pkg/when':
Var('dart_git') + '/when.git' + '@' + '0.2.0',

Expand Down
23 changes: 23 additions & 0 deletions ci/licenses_golden/licenses_flutter
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,29 @@ FILE: ../../../flutter/shell/platform/glfw/platform_handler.h
FILE: ../../../flutter/shell/platform/glfw/public/flutter_glfw.h
FILE: ../../../flutter/shell/platform/glfw/text_input_plugin.cc
FILE: ../../../flutter/shell/platform/glfw/text_input_plugin.h
FILE: ../../../flutter/shell/platform/windows/angle_surface_manager.cc
FILE: ../../../flutter/shell/platform/windows/angle_surface_manager.h
FILE: ../../../flutter/shell/platform/windows/client_wrapper/flutter_window_controller.cc
FILE: ../../../flutter/shell/platform/windows/client_wrapper/flutter_window_controller_unittests.cc
FILE: ../../../flutter/shell/platform/windows/client_wrapper/include/flutter/flutter_window.h
FILE: ../../../flutter/shell/platform/windows/client_wrapper/include/flutter/flutter_window_controller.h
FILE: ../../../flutter/shell/platform/windows/client_wrapper/include/flutter/plugin_registrar_windows.h
FILE: ../../../flutter/shell/platform/windows/flutter_windows.cc
FILE: ../../../flutter/shell/platform/windows/key_event_handler.cc
FILE: ../../../flutter/shell/platform/windows/key_event_handler.h
FILE: ../../../flutter/shell/platform/windows/keyboard_hook_handler.h
FILE: ../../../flutter/shell/platform/windows/platform_handler.cc
FILE: ../../../flutter/shell/platform/windows/platform_handler.h
FILE: ../../../flutter/shell/platform/windows/public/flutter_windows.h
FILE: ../../../flutter/shell/platform/windows/text_input_plugin.cc
FILE: ../../../flutter/shell/platform/windows/text_input_plugin.h
FILE: ../../../flutter/shell/platform/windows/win32_dpi_helper.cc
FILE: ../../../flutter/shell/platform/windows/win32_dpi_helper.h
FILE: ../../../flutter/shell/platform/windows/win32_flutter_window.cc
FILE: ../../../flutter/shell/platform/windows/win32_flutter_window.h
FILE: ../../../flutter/shell/platform/windows/win32_window.cc
FILE: ../../../flutter/shell/platform/windows/win32_window.h
FILE: ../../../flutter/shell/platform/windows/window_state.h
FILE: ../../../flutter/shell/version/version.cc
FILE: ../../../flutter/shell/version/version.h
FILE: ../../../flutter/sky/packages/flutter_services/lib/empty.dart
Expand Down
4,711 changes: 4,201 additions & 510 deletions ci/licenses_golden/licenses_third_party

Large diffs are not rendered by default.

43 changes: 3 additions & 40 deletions shell/platform/common/cpp/client_wrapper/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,12 @@
# found in the LICENSE file.

import("$flutter_root/testing/testing.gni")
import("publish.gni")

_wrapper_includes = [
"include/flutter/basic_message_channel.h",
"include/flutter/binary_messenger.h",
"include/flutter/encodable_value.h",
"include/flutter/engine_method_result.h",
"include/flutter/json_message_codec.h",
"include/flutter/json_method_codec.h",
"include/flutter/json_type.h",
"include/flutter/message_codec.h",
"include/flutter/method_call.h",
"include/flutter/method_channel.h",
"include/flutter/method_codec.h",
"include/flutter/method_result.h",
"include/flutter/plugin_registrar.h",
"include/flutter/standard_message_codec.h",
"include/flutter/standard_method_codec.h",
]

# TODO: Once the wrapper API is more stable, consolidate to as few files as is
# reasonable (without forcing different kinds of clients to take unnecessary
# code) to simplify use.
_wrapper_sources = [
"byte_stream_wrappers.h",
"engine_method_result.cc",
"json_message_codec.cc", # TODO combine into a single json_codec.cc.
"json_method_codec.cc", # TODO combine into a single json_codec.cc.
"plugin_registrar.cc",
"standard_codec_serializer.h",
"standard_codec.cc",
]
import("core_wrapper_files.gni")

# Client library build for internal use by the shell implementation.
source_set("client_wrapper") {
sources = _wrapper_sources
public = _wrapper_includes
sources = core_cpp_client_wrapper_sources
public = core_cpp_client_wrapper_includes

deps = [
"$flutter_root/shell/platform/common/cpp:common_cpp_library_headers",
Expand All @@ -57,12 +26,6 @@ source_set("client_wrapper") {
]
}

# Copies the client wrapper code to the output directory.
publish_client_wrapper("publish_wrapper") {
public = _wrapper_includes
sources = _wrapper_sources + [ "README" ]
}

source_set("client_wrapper_library_stubs") {
sources = [
"testing/stub_flutter_api.cc",
Expand Down
39 changes: 39 additions & 0 deletions shell/platform/common/cpp/client_wrapper/core_wrapper_files.gni
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

core_cpp_client_wrapper_includes =
get_path_info([
"include/flutter/basic_message_channel.h",
"include/flutter/binary_messenger.h",
"include/flutter/encodable_value.h",
"include/flutter/engine_method_result.h",
"include/flutter/json_message_codec.h",
"include/flutter/json_method_codec.h",
"include/flutter/json_type.h",
"include/flutter/message_codec.h",
"include/flutter/method_call.h",
"include/flutter/method_channel.h",
"include/flutter/method_codec.h",
"include/flutter/method_result.h",
"include/flutter/plugin_registrar.h",
"include/flutter/standard_message_codec.h",
"include/flutter/standard_method_codec.h",
],
"abspath")

# TODO: Once the wrapper API is more stable, consolidate to as few files as is
# reasonable (without forcing different kinds of clients to take unnecessary
# code) to simplify use.
core_cpp_client_wrapper_sources =
get_path_info(
[
"byte_stream_wrappers.h",
"engine_method_result.cc",
"json_message_codec.cc", # TODO combine into a single json_codec.cc.
"json_method_codec.cc", # TODO combine into a single json_codec.cc.
"plugin_registrar.cc",
"standard_codec_serializer.h",
"standard_codec.cc",
],
"abspath")
60 changes: 59 additions & 1 deletion shell/platform/common/cpp/client_wrapper/publish.gni
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("core_wrapper_files.gni")

# Publishes client wrapper files to the output directory for distribution.
# This can be used multiple times to combine various portions of a wrapper
# library into one cohesive library for clients to consume.
Expand All @@ -11,15 +13,28 @@
#
# All public code is assumed to be in the 'flutter' namespace.
template("publish_client_wrapper") {
forward_variables_from(invoker, [ "directory_suffix" ])
if (defined(directory_suffix)) {
publish_dir_root = "$root_out_dir/cpp_client_wrapper_$directory_suffix"
} else {
publish_dir_root = "$root_out_dir/cpp_client_wrapper"
}
template_target_name = target_name
publish_dir_root = "$root_out_dir/cpp_client_wrapper"
namespace = "flutter"

group(template_target_name) {
forward_variables_from(invoker,
[
"public_deps",
"visibility",
])
deps = [
":${template_target_name}_publish_includes",
":${template_target_name}_publish_sources",
]
if (defined(invoker.deps)) {
deps += invoker.deps
}
}

copy("${template_target_name}_publish_includes") {
Expand Down Expand Up @@ -50,3 +65,46 @@ template("publish_client_wrapper") {
]
}
}

_wrapper_readme = get_path_info("README", "abspath")

# Copies the client wrapper code to the output directory.
template("publish_client_wrapper_core") {
publish_client_wrapper(target_name) {
forward_variables_from(invoker,
[
"directory_suffix",
"visibility",
])
public = core_cpp_client_wrapper_includes
sources = core_cpp_client_wrapper_sources + [ _wrapper_readme ]
}
}

# A wrapper for publish_client_wrapper that will also
# publish_client_wrapper_core into the same directory.
#
# This is a convenience utility for the common case of wanting to publish
# the core wrapper and a single set of extra wrapper files corresponding to
# the platform.
template("publish_client_wrapper_extension") {
extension_target_name = target_name
core_target_name = "${target_name}_core"

publish_client_wrapper_core(core_target_name) {
visibility = [ ":$extension_target_name" ]
forward_variables_from(invoker, [ "directory_suffix" ])
}

publish_client_wrapper(extension_target_name) {
forward_variables_from(invoker,
[
"public",
"sources",
"directory_suffix",
])
public_deps = [
":$core_target_name",
]
}
}
1 change: 0 additions & 1 deletion shell/platform/darwin/macos/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ group("macos") {
if (build_glfw_shell) {
deps += [
":flutter_macos_glfw",
"$flutter_root/shell/platform/common/cpp/client_wrapper:publish_wrapper",
"$flutter_root/shell/platform/glfw:publish_headers_glfw",
"$flutter_root/shell/platform/glfw/client_wrapper:publish_wrapper_glfw",
]
Expand Down
15 changes: 12 additions & 3 deletions shell/platform/glfw/client_wrapper/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,22 @@ source_set("client_wrapper_glfw") {
]
}

# Copies the GLFW client wrapper code to the output directory, merging it into
# the core wrapper.
publish_client_wrapper("publish_wrapper_glfw") {
# Copies the GLFW client wrapper code to the output directory in the legacy
# unsuffixed location.
# TODO: Remove this copy once build recipes are using the _glfw version below.
publish_client_wrapper_extension("publish_wrapper_unprefixed") {
public = _wrapper_includes
sources = _wrapper_sources
}

# Copies the GLFW client wrapper code to the output directory with a _glfw
# suffix.
publish_client_wrapper_extension("publish_wrapper_glfw") {
public = _wrapper_includes
sources = _wrapper_sources
directory_suffix = "glfw"
}

source_set("client_wrapper_library_stubs_glfw") {
sources = [
"testing/stub_flutter_glfw_api.cc",
Expand Down
2 changes: 1 addition & 1 deletion shell/platform/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ group("linux") {
if (build_glfw_shell) {
deps = [
":flutter_linux",
"$flutter_root/shell/platform/common/cpp/client_wrapper:publish_wrapper",
"$flutter_root/shell/platform/glfw:publish_headers_glfw",
"$flutter_root/shell/platform/glfw/client_wrapper:publish_wrapper_glfw",
"$flutter_root/shell/platform/glfw/client_wrapper:publish_wrapper_unprefixed",
]
}
}
Expand Down
Loading