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

Fix memory corruption issue #1

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ allowed_hosts = [
deps = {
'src': 'https://github.com/flutter/buildroot.git' + '@' + 'a6c0959d1ac8cdfe6f9ff87892bc4905a73699fe',

'src/third_party/tizen_tools': 'git@github.com:flutter-tizen/tizen_tools.git',

# Fuchsia compatibility
#
# The dependencies in this section should match the layout in the Fuchsia gn
Expand Down
32 changes: 24 additions & 8 deletions shell/platform/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,26 @@
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",
":publish_headers_linux",
]
deps = []

if (build_glfw_shell) {
deps += [
":flutter_linux_glfw",
"//flutter/shell/platform/glfw:publish_headers_glfw",
"//flutter/shell/platform/glfw/client_wrapper:publish_wrapper_glfw",
]
}

if (build_tizen_shell) {
deps += [
":flutter_linux_tizen",
"//flutter/shell/platform/tizen:publish_headers_tizen",
]
}
}

# Temporary workaround for the issue describe in
Expand All @@ -41,6 +47,16 @@ 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 +87,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 +131,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 +172,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
114 changes: 114 additions & 0 deletions shell/platform/tizen/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# Copyright 2020 Samsung Electronics Co., Ltd. All rights reserved.
# 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" ]
}

# 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 = [
"channels/key_event_channel.cc",
"channels/lifecycle_channel.cc",
"channels/localization_channel.cc",
"channels/navigation_channel.cc",
"channels/platform_channel.cc",
"channels/platform_view_channel.cc",
"channels/settings_channel.cc",
"channels/text_input_channel.cc",
"external_texture_gl.cc",
"flutter_tizen.cc",
"key_event_handler.cc",
"tizen_embedder_engine.cc",
"tizen_event_loop.cc",
"tizen_surface.cc",
"tizen_surface_gl.cc",
"tizen_vsync_waiter.cc",
"touch_event_handler.cc",
]

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

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",
]

include_dirs = [
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include",
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/base",
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/dlog",
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/ecore-1",
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/ecore-evas-1",
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/ecore-imf-1",
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/ecore-imf-evas-1",
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/ecore-input-1",
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/ecore-wl2-1",
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/efl-1",
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/eina-1",
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/eina-1/eina",
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/emile-1",
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/eo-1",
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/evas-1",
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/system",
]

lib_dirs = [ "//third_party/tizen_tools/sysroot/$target_cpu/usr/lib" ]

cflags_cc = [
"-Wno-newline-eof",
"-Wno-macro-redefined",
]

libs = [
"base-utils-i18n",
"capi-system-info",
"capi-system-system-settings",
"dlog",
"ecore",
"ecore_imf",
"ecore_input",
"ecore_wl2",
"EGL",
"evas",
"GLESv2",
"tbm",
"tdm-client",
"wayland-client",
]
}

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" ]
}
26 changes: 26 additions & 0 deletions shell/platform/tizen/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Copyright (c) 2020 Samsung Electronics Co., Ltd. All rights reserved.
Copyright (c) 2013 The Flutter Authors. All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the names of the copyright holders nor the names of the
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Loading