Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit f1310d0

Browse files
committed
Refactor FlRenderer to platform-independent implementation
1 parent 353efcd commit f1310d0

28 files changed

+1716
-1633
lines changed

ci/licenses_golden/licenses_flutter

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,14 +1346,13 @@ FILE: ../../../flutter/shell/platform/glfw/system_utils.h
13461346
FILE: ../../../flutter/shell/platform/glfw/system_utils_test.cc
13471347
FILE: ../../../flutter/shell/platform/glfw/text_input_plugin.cc
13481348
FILE: ../../../flutter/shell/platform/glfw/text_input_plugin.h
1349-
FILE: ../../../flutter/shell/platform/linux/egl_utils.cc
1350-
FILE: ../../../flutter/shell/platform/linux/egl_utils.h
1351-
FILE: ../../../flutter/shell/platform/linux/egl_utils_test.cc
13521349
FILE: ../../../flutter/shell/platform/linux/fl_accessibility_plugin.cc
13531350
FILE: ../../../flutter/shell/platform/linux/fl_accessibility_plugin.h
13541351
FILE: ../../../flutter/shell/platform/linux/fl_accessible_node.cc
13551352
FILE: ../../../flutter/shell/platform/linux/fl_accessible_node.h
13561353
FILE: ../../../flutter/shell/platform/linux/fl_accessible_node_test.cc
1354+
FILE: ../../../flutter/shell/platform/linux/fl_backing_store_provider.cc
1355+
FILE: ../../../flutter/shell/platform/linux/fl_backing_store_provider.h
13571356
FILE: ../../../flutter/shell/platform/linux/fl_basic_message_channel.cc
13581357
FILE: ../../../flutter/shell/platform/linux/fl_basic_message_channel_test.cc
13591358
FILE: ../../../flutter/shell/platform/linux/fl_binary_codec.cc
@@ -1369,6 +1368,8 @@ FILE: ../../../flutter/shell/platform/linux/fl_engine_private.h
13691368
FILE: ../../../flutter/shell/platform/linux/fl_engine_test.cc
13701369
FILE: ../../../flutter/shell/platform/linux/fl_event_channel.cc
13711370
FILE: ../../../flutter/shell/platform/linux/fl_event_channel_test.cc
1371+
FILE: ../../../flutter/shell/platform/linux/fl_gl_area.cc
1372+
FILE: ../../../flutter/shell/platform/linux/fl_gl_area.h
13721373
FILE: ../../../flutter/shell/platform/linux/fl_json_message_codec.cc
13731374
FILE: ../../../flutter/shell/platform/linux/fl_json_message_codec_test.cc
13741375
FILE: ../../../flutter/shell/platform/linux/fl_json_method_codec.cc
@@ -1398,12 +1399,10 @@ FILE: ../../../flutter/shell/platform/linux/fl_plugin_registrar_private.h
13981399
FILE: ../../../flutter/shell/platform/linux/fl_plugin_registry.cc
13991400
FILE: ../../../flutter/shell/platform/linux/fl_renderer.cc
14001401
FILE: ../../../flutter/shell/platform/linux/fl_renderer.h
1402+
FILE: ../../../flutter/shell/platform/linux/fl_renderer_gl.cc
1403+
FILE: ../../../flutter/shell/platform/linux/fl_renderer_gl.h
14011404
FILE: ../../../flutter/shell/platform/linux/fl_renderer_headless.cc
14021405
FILE: ../../../flutter/shell/platform/linux/fl_renderer_headless.h
1403-
FILE: ../../../flutter/shell/platform/linux/fl_renderer_wayland.cc
1404-
FILE: ../../../flutter/shell/platform/linux/fl_renderer_wayland.h
1405-
FILE: ../../../flutter/shell/platform/linux/fl_renderer_x11.cc
1406-
FILE: ../../../flutter/shell/platform/linux/fl_renderer_x11.h
14071406
FILE: ../../../flutter/shell/platform/linux/fl_settings_plugin.cc
14081407
FILE: ../../../flutter/shell/platform/linux/fl_settings_plugin.h
14091408
FILE: ../../../flutter/shell/platform/linux/fl_standard_message_codec.cc
@@ -1420,6 +1419,7 @@ FILE: ../../../flutter/shell/platform/linux/fl_value_test.cc
14201419
FILE: ../../../flutter/shell/platform/linux/fl_view.cc
14211420
FILE: ../../../flutter/shell/platform/linux/fl_view_accessible.cc
14221421
FILE: ../../../flutter/shell/platform/linux/fl_view_accessible.h
1422+
FILE: ../../../flutter/shell/platform/linux/fl_view_private.h
14231423
FILE: ../../../flutter/shell/platform/linux/public/flutter_linux/fl_basic_message_channel.h
14241424
FILE: ../../../flutter/shell/platform/linux/public/flutter_linux/fl_binary_codec.h
14251425
FILE: ../../../flutter/shell/platform/linux/public/flutter_linux/fl_binary_messenger.h

shell/platform/linux/BUILD.gn

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -82,21 +82,19 @@ source_set("flutter_linux_sources") {
8282
"fl_standard_message_codec_private.h",
8383
]
8484

85-
configs += [
86-
"//flutter/shell/platform/linux/config:gtk",
87-
"//flutter/shell/platform/linux/config:wayland-client",
88-
]
85+
configs += [ "//flutter/shell/platform/linux/config:gtk" ]
8986

9087
sources = [
91-
"egl_utils.cc",
9288
"fl_accessibility_plugin.cc",
9389
"fl_accessible_node.cc",
90+
"fl_backing_store_provider.cc",
9491
"fl_basic_message_channel.cc",
9592
"fl_binary_codec.cc",
9693
"fl_binary_messenger.cc",
9794
"fl_dart_project.cc",
9895
"fl_engine.cc",
9996
"fl_event_channel.cc",
97+
"fl_gl_area.cc",
10098
"fl_json_message_codec.cc",
10199
"fl_json_method_codec.cc",
102100
"fl_key_event_plugin.cc",
@@ -110,9 +108,8 @@ source_set("flutter_linux_sources") {
110108
"fl_plugin_registrar.cc",
111109
"fl_plugin_registry.cc",
112110
"fl_renderer.cc",
111+
"fl_renderer_gl.cc",
113112
"fl_renderer_headless.cc",
114-
"fl_renderer_wayland.cc",
115-
"fl_renderer_x11.cc",
116113
"fl_settings_plugin.cc",
117114
"fl_standard_message_codec.cc",
118115
"fl_standard_method_codec.cc",
@@ -140,9 +137,7 @@ source_set("flutter_linux_sources") {
140137
source_set("flutter_linux") {
141138
configs += [
142139
"//flutter/shell/platform/linux/config:gtk",
143-
"//flutter/shell/platform/linux/config:egl",
144-
"//flutter/shell/platform/linux/config:wayland-egl",
145-
"//flutter/shell/platform/linux/config:x11",
140+
"//flutter/shell/platform/linux/config:epoxy",
146141
"//third_party/khronos:khronos_headers",
147142
]
148143

@@ -161,7 +156,6 @@ executable("flutter_linux_unittests") {
161156
testonly = true
162157

163158
sources = [
164-
"egl_utils_test.cc",
165159
"fl_accessible_node_test.cc",
166160
"fl_basic_message_channel_test.cc",
167161
"fl_binary_codec_test.cc",
@@ -181,19 +175,15 @@ executable("flutter_linux_unittests") {
181175
"fl_string_codec_test.cc",
182176
"fl_value_test.cc",
183177
"testing/fl_test.cc",
184-
"testing/mock_egl.cc",
185178
"testing/mock_engine.cc",
179+
"testing/mock_epoxy.cc",
186180
"testing/mock_renderer.cc",
187181
"testing/mock_text_input_plugin.cc",
188182
]
189183

190184
public_configs = [ "//flutter:config" ]
191185

192-
configs += [
193-
"//flutter/shell/platform/linux/config:gtk",
194-
"//flutter/shell/platform/linux/config:wayland-egl",
195-
"//flutter/shell/platform/linux/config:x11",
196-
]
186+
configs += [ "//flutter/shell/platform/linux/config:gtk" ]
197187

198188
defines = [
199189
"FLUTTER_ENGINE_NO_PROTOTYPES",

shell/platform/linux/config/BUILD.gn

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ pkg_config("egl") {
1717
packages = [ "egl" ]
1818
}
1919

20-
pkg_config("wayland-egl") {
21-
packages = [ "wayland-egl" ]
22-
}
23-
24-
pkg_config("wayland-client") {
25-
packages = [ "wayland-client" ]
20+
pkg_config("epoxy") {
21+
packages = [ "epoxy" ]
2622
}

0 commit comments

Comments
 (0)