Skip to content

Commit

Permalink
Cherrypicks from flutter-1.20-candidate.1-tizen
Browse files Browse the repository at this point in the history
* 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 <xiaowei.guan@samsung.com>
Co-authored-by: Swift Kim <swift.kim@samsung.com>
Co-authored-by: Boram Bae <boram21.bae@samsung.com>
Co-authored-by: Seungsoo Lee <seungsoo47.lee@samsung.com>
Co-authored-by: Wanchao Xu <wanchao.xu@samsung.com>
Co-authored-by: MuHong Byun <mh.byun@samsung.com>
  • Loading branch information
6 people committed Sep 25, 2020
1 parent 4654fc6 commit a9c2e1d
Show file tree
Hide file tree
Showing 29 changed files with 3,156 additions and 5 deletions.
30 changes: 25 additions & 5 deletions shell/platform/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
assert(is_linux)

import("//flutter/shell/platform/glfw/config.gni")
import("//flutter/shell/platform/tizen/config.gni")
import("//flutter/testing/testing.gni")

group("linux") {
deps = [
":flutter_linux_gtk",
#":flutter_linux_gtk",
":publish_headers_linux",
]
if (build_glfw_shell) {
Expand All @@ -19,6 +20,13 @@ group("linux") {
"//flutter/shell/platform/glfw/client_wrapper:publish_wrapper_glfw",
]
}
if (build_tizen_shell) {
deps += [
":flutter_linux_tizen",
"//flutter/shell/platform/tizen:publish_headers_tizen",
#"//flutter/shell/platform/tizen/client_wrapper:publish_wrapper_tizen",
]
}
}

# Temporary workaround for the issue describe in
Expand All @@ -41,6 +49,18 @@ if (build_glfw_shell) {
}
}

if (build_tizen_shell) {
shared_library("flutter_linux_tizen") {
deps = [
"//flutter/shell/platform/tizen:flutter_tizen",
]

configs += [ ":disable_fatal_link_warnings" ]

public_configs = [ "//flutter:config" ]
}
}

_public_headers = [
"public/flutter_linux/fl_basic_message_channel.h",
"public/flutter_linux/fl_binary_codec.h",
Expand Down Expand Up @@ -71,7 +91,7 @@ config("relative_flutter_linux_headers") {
source_set("flutter_linux_sources") {
public = _public_headers

configs += [ "//flutter/shell/platform/linux/config:gtk" ]
#configs += [ "//flutter/shell/platform/linux/config:gtk" ]

sources = [
"egl_utils.cc",
Expand Down Expand Up @@ -115,8 +135,8 @@ source_set("flutter_linux_sources") {

source_set("flutter_linux") {
configs += [
"//flutter/shell/platform/linux/config:gtk",
"//flutter/shell/platform/linux/config:egl",
#"//flutter/shell/platform/linux/config:gtk",
#"//flutter/shell/platform/linux/config:egl",
"//third_party/khronos:khronos_headers",
]

Expand Down Expand Up @@ -156,7 +176,7 @@ executable("flutter_linux_unittests") {

public_configs = [ "//flutter:config" ]

configs += [ "//flutter/shell/platform/linux/config:gtk" ]
#configs += [ "//flutter/shell/platform/linux/config:gtk" ]

# Set flag to allow public headers to be directly included (library users should not do this)
defines = [ "FLUTTER_LINUX_COMPILATION" ]
Expand Down
122 changes: 122 additions & 0 deletions shell/platform/tizen/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
# 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.

_public_headers = [ "public/flutter_tizen.h" ]

# Any files that are built by clients (client_wrapper code, library headers for
# implementations using this shared code, etc.) include the public headers
# assuming they are in the include path. This configuration should be added to
# any such code that is also built by GN to make the includes work.

config("relative_flutter_tizen_headers") {
include_dirs = [ "public" ]
}

config("flutter_tizen_native_headers") {
include_dirs = [
"//third_party/tizen_tools/sysroot/armel/usr/include",
"//third_party/tizen_tools/sysroot/armel/usr/include/base",
"//third_party/tizen_tools/sysroot/armel/usr/include/dlog",
"//third_party/tizen_tools/sysroot/armel/usr/include/ecore-1",
"//third_party/tizen_tools/sysroot/armel/usr/include/ecore-wl2-1",
"//third_party/tizen_tools/sysroot/armel/usr/include/ecore-evas-1",
"//third_party/tizen_tools/sysroot/armel/usr/include/efl-1",
"//third_party/tizen_tools/sysroot/armel/usr/include/eo-1",
"//third_party/tizen_tools/sysroot/armel/usr/include/eina-1",
"//third_party/tizen_tools/sysroot/armel/usr/include/eina-1/eina",
"//third_party/tizen_tools/sysroot/armel/usr/include/ecore-input-1",
"//third_party/tizen_tools/sysroot/armel/usr/include/ecore-imf-1",
"//third_party/tizen_tools/sysroot/armel/usr/include/ecore-imf-evas-1",
"//third_party/tizen_tools/sysroot/armel/usr/include/evas-1",
"//third_party/tizen_tools/sysroot/armel/usr/include/emile-1",
]
}

# The headers are a separate source set since the client wrapper is allowed
# to depend on the public headers, but none of the rest of the code.
source_set("flutter_tizen_headers") {
public = _public_headers

public_deps =
[ "//flutter/shell/platform/common/cpp:common_cpp_library_headers" ]

configs +=
[ "//flutter/shell/platform/common/cpp:desktop_library_implementation" ]

public_configs =
[ "//flutter/shell/platform/common/cpp:relative_flutter_library_headers" ]
}

source_set("flutter_tizen") {
sources = [
"tizen_event_loop.cc",
"tizen_event_loop.h",
"flutter_tizen.cc",
"key_event_channel.cc",
"key_event_channel.h",
"tizen_embedder_engine.cc",
"tizen_embedder_engine.h",
"tizen_surface.cc",
"tizen_surface.h",
"tizen_surface_gl.cc",
"tizen_surface_gl.h",
"tizen_surface_software.cc",
"tizen_surface_software.h",
"tizen_vsync_waiter.cc",
"tizen_vsync_waiter.h",
"touch_event_channel.cc",
"touch_event_channel.h",
"text_input_plugin.h",
"text_input_plugin.cc",
"lifecycle_channel.h",
"lifecycle_channel.cc",
"localization_channel.h",
"localization_channel.cc",
]

defines = [ "USE_RAPID_JSON" ]

configs +=
[ "//flutter/shell/platform/common/cpp:desktop_library_implementation" ]
configs +=
[":flutter_tizen_native_headers"]

deps = [
":flutter_tizen_headers",
"//flutter/shell/platform/common/cpp:common_cpp",
"//flutter/shell/platform/common/cpp:common_cpp_input",
"//flutter/shell/platform/common/cpp/client_wrapper:client_wrapper",
"//flutter/shell/platform/embedder:embedder_as_internal_library",
"//third_party/rapidjson",
]

lib_dirs = [ "//third_party/tizen_tools/sysroot/armel/usr/lib" ]

cflags_cc = [
"-Wno-newline-eof",
"-Wno-macro-redefined",
"-Wno-unused-const-variable"
]
libs = [
"dlog",
"EGL",
"ecore_wl2",
"wayland-client",
"GLESv2",
"tdm-client",
"ecore",
"ecore_input",
"evas",
"ecore_imf",
"base-utils-i18n"
]
}

copy("publish_headers_tizen") {
sources = _public_headers
outputs = [ "$root_out_dir/{{source_file_part}}" ]

# The Tizen header assumes the presence of the common headers.
deps = [ "//flutter/shell/platform/common/cpp:publish_headers" ]
}
13 changes: 13 additions & 0 deletions shell/platform/tizen/config.gni
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# 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.

declare_args() {
# Whether to build the Tizen shell for the host platform, if available.
#
# By default, the Tizen shell is not built if there is a native toolkit shell,
# but it can be enabled for supported platforms (Linux)
# as an extra build artifact with this flag. The native toolkit shell will
# still be built as well.
build_tizen_shell = false
}
Loading

0 comments on commit a9c2e1d

Please sign in to comment.