Skip to content

Commit

Permalink
Refactor FlRenderer to platform-independent implementation (#24011)
Browse files Browse the repository at this point in the history
Refactor FlRenderer to platform-independent implementation
  • Loading branch information
huanghongxun committed Feb 2, 2021
1 parent 2c144c3 commit f94cf14
Show file tree
Hide file tree
Showing 28 changed files with 1,729 additions and 1,634 deletions.
14 changes: 7 additions & 7 deletions ci/licenses_golden/licenses_flutter
Original file line number Diff line number Diff line change
Expand Up @@ -1356,14 +1356,13 @@ FILE: ../../../flutter/shell/platform/glfw/system_utils.h
FILE: ../../../flutter/shell/platform/glfw/system_utils_test.cc
FILE: ../../../flutter/shell/platform/glfw/text_input_plugin.cc
FILE: ../../../flutter/shell/platform/glfw/text_input_plugin.h
FILE: ../../../flutter/shell/platform/linux/egl_utils.cc
FILE: ../../../flutter/shell/platform/linux/egl_utils.h
FILE: ../../../flutter/shell/platform/linux/egl_utils_test.cc
FILE: ../../../flutter/shell/platform/linux/fl_accessibility_plugin.cc
FILE: ../../../flutter/shell/platform/linux/fl_accessibility_plugin.h
FILE: ../../../flutter/shell/platform/linux/fl_accessible_node.cc
FILE: ../../../flutter/shell/platform/linux/fl_accessible_node.h
FILE: ../../../flutter/shell/platform/linux/fl_accessible_node_test.cc
FILE: ../../../flutter/shell/platform/linux/fl_backing_store_provider.cc
FILE: ../../../flutter/shell/platform/linux/fl_backing_store_provider.h
FILE: ../../../flutter/shell/platform/linux/fl_basic_message_channel.cc
FILE: ../../../flutter/shell/platform/linux/fl_basic_message_channel_test.cc
FILE: ../../../flutter/shell/platform/linux/fl_binary_codec.cc
Expand All @@ -1379,6 +1378,8 @@ FILE: ../../../flutter/shell/platform/linux/fl_engine_private.h
FILE: ../../../flutter/shell/platform/linux/fl_engine_test.cc
FILE: ../../../flutter/shell/platform/linux/fl_event_channel.cc
FILE: ../../../flutter/shell/platform/linux/fl_event_channel_test.cc
FILE: ../../../flutter/shell/platform/linux/fl_gl_area.cc
FILE: ../../../flutter/shell/platform/linux/fl_gl_area.h
FILE: ../../../flutter/shell/platform/linux/fl_json_message_codec.cc
FILE: ../../../flutter/shell/platform/linux/fl_json_message_codec_test.cc
FILE: ../../../flutter/shell/platform/linux/fl_json_method_codec.cc
Expand Down Expand Up @@ -1408,12 +1409,10 @@ FILE: ../../../flutter/shell/platform/linux/fl_plugin_registrar_private.h
FILE: ../../../flutter/shell/platform/linux/fl_plugin_registry.cc
FILE: ../../../flutter/shell/platform/linux/fl_renderer.cc
FILE: ../../../flutter/shell/platform/linux/fl_renderer.h
FILE: ../../../flutter/shell/platform/linux/fl_renderer_gl.cc
FILE: ../../../flutter/shell/platform/linux/fl_renderer_gl.h
FILE: ../../../flutter/shell/platform/linux/fl_renderer_headless.cc
FILE: ../../../flutter/shell/platform/linux/fl_renderer_headless.h
FILE: ../../../flutter/shell/platform/linux/fl_renderer_wayland.cc
FILE: ../../../flutter/shell/platform/linux/fl_renderer_wayland.h
FILE: ../../../flutter/shell/platform/linux/fl_renderer_x11.cc
FILE: ../../../flutter/shell/platform/linux/fl_renderer_x11.h
FILE: ../../../flutter/shell/platform/linux/fl_settings_plugin.cc
FILE: ../../../flutter/shell/platform/linux/fl_settings_plugin.h
FILE: ../../../flutter/shell/platform/linux/fl_standard_message_codec.cc
Expand All @@ -1430,6 +1429,7 @@ FILE: ../../../flutter/shell/platform/linux/fl_value_test.cc
FILE: ../../../flutter/shell/platform/linux/fl_view.cc
FILE: ../../../flutter/shell/platform/linux/fl_view_accessible.cc
FILE: ../../../flutter/shell/platform/linux/fl_view_accessible.h
FILE: ../../../flutter/shell/platform/linux/fl_view_private.h
FILE: ../../../flutter/shell/platform/linux/public/flutter_linux/fl_basic_message_channel.h
FILE: ../../../flutter/shell/platform/linux/public/flutter_linux/fl_binary_codec.h
FILE: ../../../flutter/shell/platform/linux/public/flutter_linux/fl_binary_messenger.h
Expand Down
25 changes: 7 additions & 18 deletions shell/platform/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -82,21 +82,19 @@ source_set("flutter_linux_sources") {
"fl_standard_message_codec_private.h",
]

configs += [
"//flutter/shell/platform/linux/config:gtk",
"//flutter/shell/platform/linux/config:wayland-client",
]
configs += [ "//flutter/shell/platform/linux/config:gtk" ]

sources = [
"egl_utils.cc",
"fl_accessibility_plugin.cc",
"fl_accessible_node.cc",
"fl_backing_store_provider.cc",
"fl_basic_message_channel.cc",
"fl_binary_codec.cc",
"fl_binary_messenger.cc",
"fl_dart_project.cc",
"fl_engine.cc",
"fl_event_channel.cc",
"fl_gl_area.cc",
"fl_json_message_codec.cc",
"fl_json_method_codec.cc",
"fl_key_event_plugin.cc",
Expand All @@ -110,9 +108,8 @@ source_set("flutter_linux_sources") {
"fl_plugin_registrar.cc",
"fl_plugin_registry.cc",
"fl_renderer.cc",
"fl_renderer_gl.cc",
"fl_renderer_headless.cc",
"fl_renderer_wayland.cc",
"fl_renderer_x11.cc",
"fl_settings_plugin.cc",
"fl_standard_message_codec.cc",
"fl_standard_method_codec.cc",
Expand Down Expand Up @@ -140,10 +137,7 @@ 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:wayland-egl",
"//flutter/shell/platform/linux/config:x11",
"//third_party/khronos:khronos_headers",
"//flutter/shell/platform/linux/config:epoxy",
]

defines = [ "FLUTTER_ENGINE_NO_PROTOTYPES" ]
Expand All @@ -161,7 +155,6 @@ executable("flutter_linux_unittests") {
testonly = true

sources = [
"egl_utils_test.cc",
"fl_accessible_node_test.cc",
"fl_basic_message_channel_test.cc",
"fl_binary_codec_test.cc",
Expand All @@ -181,19 +174,15 @@ executable("flutter_linux_unittests") {
"fl_string_codec_test.cc",
"fl_value_test.cc",
"testing/fl_test.cc",
"testing/mock_egl.cc",
"testing/mock_engine.cc",
"testing/mock_epoxy.cc",
"testing/mock_renderer.cc",
"testing/mock_text_input_plugin.cc",
]

public_configs = [ "//flutter:config" ]

configs += [
"//flutter/shell/platform/linux/config:gtk",
"//flutter/shell/platform/linux/config:wayland-egl",
"//flutter/shell/platform/linux/config:x11",
]
configs += [ "//flutter/shell/platform/linux/config:gtk" ]

defines = [
"FLUTTER_ENGINE_NO_PROTOTYPES",
Expand Down
8 changes: 2 additions & 6 deletions shell/platform/linux/config/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ pkg_config("egl") {
packages = [ "egl" ]
}

pkg_config("wayland-egl") {
packages = [ "wayland-egl" ]
}

pkg_config("wayland-client") {
packages = [ "wayland-client" ]
pkg_config("epoxy") {
packages = [ "epoxy" ]
}

0 comments on commit f94cf14

Please sign in to comment.