Skip to content

Commit a9c2e1d

Browse files
xiaowei-guanswift-kimbbrto21seungsoo47wanchao-xu
committed
Cherrypicks from flutter-1.20-candidate.1-tizen
* Flutter 1.20 candidate.1 (#1) * Format documents into Google style (#2) * Configure AOT data using new engine APIs (#3) * Enable text_input_plugin (#4) * Update a DEPS file (#5) * Add a placeholder for the executable name (#7) * Redirect stdout/stderr to dlog (#10) * Change log tag from FLUTTER to ConsoleMessage (#11) * Support lifecycle, localization and low memory warning. (#12) * Clean up the API and change LOG_TAG (#13) Co-authored-by: Xiaowei Guan <[email protected]> Co-authored-by: Swift Kim <[email protected]> Co-authored-by: Boram Bae <[email protected]> Co-authored-by: Seungsoo Lee <[email protected]> Co-authored-by: Wanchao Xu <[email protected]> Co-authored-by: MuHong Byun <[email protected]>
1 parent 4654fc6 commit a9c2e1d

29 files changed

+3156
-5
lines changed

shell/platform/linux/BUILD.gn

+25-5
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
assert(is_linux)
66

77
import("//flutter/shell/platform/glfw/config.gni")
8+
import("//flutter/shell/platform/tizen/config.gni")
89
import("//flutter/testing/testing.gni")
910

1011
group("linux") {
1112
deps = [
12-
":flutter_linux_gtk",
13+
#":flutter_linux_gtk",
1314
":publish_headers_linux",
1415
]
1516
if (build_glfw_shell) {
@@ -19,6 +20,13 @@ group("linux") {
1920
"//flutter/shell/platform/glfw/client_wrapper:publish_wrapper_glfw",
2021
]
2122
}
23+
if (build_tizen_shell) {
24+
deps += [
25+
":flutter_linux_tizen",
26+
"//flutter/shell/platform/tizen:publish_headers_tizen",
27+
#"//flutter/shell/platform/tizen/client_wrapper:publish_wrapper_tizen",
28+
]
29+
}
2230
}
2331

2432
# Temporary workaround for the issue describe in
@@ -41,6 +49,18 @@ if (build_glfw_shell) {
4149
}
4250
}
4351

52+
if (build_tizen_shell) {
53+
shared_library("flutter_linux_tizen") {
54+
deps = [
55+
"//flutter/shell/platform/tizen:flutter_tizen",
56+
]
57+
58+
configs += [ ":disable_fatal_link_warnings" ]
59+
60+
public_configs = [ "//flutter:config" ]
61+
}
62+
}
63+
4464
_public_headers = [
4565
"public/flutter_linux/fl_basic_message_channel.h",
4666
"public/flutter_linux/fl_binary_codec.h",
@@ -71,7 +91,7 @@ config("relative_flutter_linux_headers") {
7191
source_set("flutter_linux_sources") {
7292
public = _public_headers
7393

74-
configs += [ "//flutter/shell/platform/linux/config:gtk" ]
94+
#configs += [ "//flutter/shell/platform/linux/config:gtk" ]
7595

7696
sources = [
7797
"egl_utils.cc",
@@ -115,8 +135,8 @@ source_set("flutter_linux_sources") {
115135

116136
source_set("flutter_linux") {
117137
configs += [
118-
"//flutter/shell/platform/linux/config:gtk",
119-
"//flutter/shell/platform/linux/config:egl",
138+
#"//flutter/shell/platform/linux/config:gtk",
139+
#"//flutter/shell/platform/linux/config:egl",
120140
"//third_party/khronos:khronos_headers",
121141
]
122142

@@ -156,7 +176,7 @@ executable("flutter_linux_unittests") {
156176

157177
public_configs = [ "//flutter:config" ]
158178

159-
configs += [ "//flutter/shell/platform/linux/config:gtk" ]
179+
#configs += [ "//flutter/shell/platform/linux/config:gtk" ]
160180

161181
# Set flag to allow public headers to be directly included (library users should not do this)
162182
defines = [ "FLUTTER_LINUX_COMPILATION" ]

shell/platform/tizen/BUILD.gn

+122
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
# Copyright 2013 The Flutter Authors. All rights reserved.
2+
# Use of this source code is governed by a BSD-style license that can be
3+
# found in the LICENSE file.
4+
5+
_public_headers = [ "public/flutter_tizen.h" ]
6+
7+
# Any files that are built by clients (client_wrapper code, library headers for
8+
# implementations using this shared code, etc.) include the public headers
9+
# assuming they are in the include path. This configuration should be added to
10+
# any such code that is also built by GN to make the includes work.
11+
12+
config("relative_flutter_tizen_headers") {
13+
include_dirs = [ "public" ]
14+
}
15+
16+
config("flutter_tizen_native_headers") {
17+
include_dirs = [
18+
"//third_party/tizen_tools/sysroot/armel/usr/include",
19+
"//third_party/tizen_tools/sysroot/armel/usr/include/base",
20+
"//third_party/tizen_tools/sysroot/armel/usr/include/dlog",
21+
"//third_party/tizen_tools/sysroot/armel/usr/include/ecore-1",
22+
"//third_party/tizen_tools/sysroot/armel/usr/include/ecore-wl2-1",
23+
"//third_party/tizen_tools/sysroot/armel/usr/include/ecore-evas-1",
24+
"//third_party/tizen_tools/sysroot/armel/usr/include/efl-1",
25+
"//third_party/tizen_tools/sysroot/armel/usr/include/eo-1",
26+
"//third_party/tizen_tools/sysroot/armel/usr/include/eina-1",
27+
"//third_party/tizen_tools/sysroot/armel/usr/include/eina-1/eina",
28+
"//third_party/tizen_tools/sysroot/armel/usr/include/ecore-input-1",
29+
"//third_party/tizen_tools/sysroot/armel/usr/include/ecore-imf-1",
30+
"//third_party/tizen_tools/sysroot/armel/usr/include/ecore-imf-evas-1",
31+
"//third_party/tizen_tools/sysroot/armel/usr/include/evas-1",
32+
"//third_party/tizen_tools/sysroot/armel/usr/include/emile-1",
33+
]
34+
}
35+
36+
# The headers are a separate source set since the client wrapper is allowed
37+
# to depend on the public headers, but none of the rest of the code.
38+
source_set("flutter_tizen_headers") {
39+
public = _public_headers
40+
41+
public_deps =
42+
[ "//flutter/shell/platform/common/cpp:common_cpp_library_headers" ]
43+
44+
configs +=
45+
[ "//flutter/shell/platform/common/cpp:desktop_library_implementation" ]
46+
47+
public_configs =
48+
[ "//flutter/shell/platform/common/cpp:relative_flutter_library_headers" ]
49+
}
50+
51+
source_set("flutter_tizen") {
52+
sources = [
53+
"tizen_event_loop.cc",
54+
"tizen_event_loop.h",
55+
"flutter_tizen.cc",
56+
"key_event_channel.cc",
57+
"key_event_channel.h",
58+
"tizen_embedder_engine.cc",
59+
"tizen_embedder_engine.h",
60+
"tizen_surface.cc",
61+
"tizen_surface.h",
62+
"tizen_surface_gl.cc",
63+
"tizen_surface_gl.h",
64+
"tizen_surface_software.cc",
65+
"tizen_surface_software.h",
66+
"tizen_vsync_waiter.cc",
67+
"tizen_vsync_waiter.h",
68+
"touch_event_channel.cc",
69+
"touch_event_channel.h",
70+
"text_input_plugin.h",
71+
"text_input_plugin.cc",
72+
"lifecycle_channel.h",
73+
"lifecycle_channel.cc",
74+
"localization_channel.h",
75+
"localization_channel.cc",
76+
]
77+
78+
defines = [ "USE_RAPID_JSON" ]
79+
80+
configs +=
81+
[ "//flutter/shell/platform/common/cpp:desktop_library_implementation" ]
82+
configs +=
83+
[":flutter_tizen_native_headers"]
84+
85+
deps = [
86+
":flutter_tizen_headers",
87+
"//flutter/shell/platform/common/cpp:common_cpp",
88+
"//flutter/shell/platform/common/cpp:common_cpp_input",
89+
"//flutter/shell/platform/common/cpp/client_wrapper:client_wrapper",
90+
"//flutter/shell/platform/embedder:embedder_as_internal_library",
91+
"//third_party/rapidjson",
92+
]
93+
94+
lib_dirs = [ "//third_party/tizen_tools/sysroot/armel/usr/lib" ]
95+
96+
cflags_cc = [
97+
"-Wno-newline-eof",
98+
"-Wno-macro-redefined",
99+
"-Wno-unused-const-variable"
100+
]
101+
libs = [
102+
"dlog",
103+
"EGL",
104+
"ecore_wl2",
105+
"wayland-client",
106+
"GLESv2",
107+
"tdm-client",
108+
"ecore",
109+
"ecore_input",
110+
"evas",
111+
"ecore_imf",
112+
"base-utils-i18n"
113+
]
114+
}
115+
116+
copy("publish_headers_tizen") {
117+
sources = _public_headers
118+
outputs = [ "$root_out_dir/{{source_file_part}}" ]
119+
120+
# The Tizen header assumes the presence of the common headers.
121+
deps = [ "//flutter/shell/platform/common/cpp:publish_headers" ]
122+
}

shell/platform/tizen/config.gni

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright 2013 The Flutter Authors. All rights reserved.
2+
# Use of this source code is governed by a BSD-style license that can be
3+
# found in the LICENSE file.
4+
5+
declare_args() {
6+
# Whether to build the Tizen shell for the host platform, if available.
7+
#
8+
# By default, the Tizen shell is not built if there is a native toolkit shell,
9+
# but it can be enabled for supported platforms (Linux)
10+
# as an extra build artifact with this flag. The native toolkit shell will
11+
# still be built as well.
12+
build_tizen_shell = false
13+
}

0 commit comments

Comments
 (0)