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

Commit

Permalink
Reverts "[Windows] Move to FlutterCompositor for rendering" (#49015)
Browse files Browse the repository at this point in the history
Reverts #48849
Initiated by: loic-sharma
This change reverts the following previous change:
Original Description:
This migrates the Windows embedder to `FlutterCompositor` so that the engine renders off-screen to a framebuffer instead of directly onto the window's surface. This will allow us to support platform views and multiple views on Windows.

<details>
<summary>Tests...</summary>

* Verify OpenGL compositor's raster time isn't regressed and memory increase is reasonable
* Software compositor's raster time and memory isn't regressed

Test device configurations
* [x] Windows 11 (hardware acceleration enabled/disabled)
* [x] Windows Arm64 (hardware acceleration enabled/disabled)
* [x] Windows 7 (hardware acceleration enabled/disabled, DWM enabled/disabled)

</details>

Addresses flutter/flutter#128904

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
  • Loading branch information
auto-submit[bot] authored Dec 14, 2023
1 parent cf7c260 commit 923f9e2
Show file tree
Hide file tree
Showing 16 changed files with 29 additions and 753 deletions.
2 changes: 0 additions & 2 deletions ci/licenses_golden/excluded_files
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,6 @@
../../../flutter/shell/platform/windows/client_wrapper/flutter_view_unittests.cc
../../../flutter/shell/platform/windows/client_wrapper/plugin_registrar_windows_unittests.cc
../../../flutter/shell/platform/windows/client_wrapper/testing
../../../flutter/shell/platform/windows/compositor_opengl_unittests.cc
../../../flutter/shell/platform/windows/compositor_software_unittests.cc
../../../flutter/shell/platform/windows/cursor_handler_unittests.cc
../../../flutter/shell/platform/windows/direct_manipulation_unittests.cc
../../../flutter/shell/platform/windows/dpi_utils_unittests.cc
Expand Down
10 changes: 0 additions & 10 deletions ci/licenses_golden/licenses_flutter
Original file line number Diff line number Diff line change
Expand Up @@ -7117,11 +7117,6 @@ ORIGIN: ../../../flutter/shell/platform/windows/client_wrapper/include/flutter/f
ORIGIN: ../../../flutter/shell/platform/windows/client_wrapper/include/flutter/flutter_view.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/windows/client_wrapper/include/flutter/flutter_view_controller.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/windows/client_wrapper/include/flutter/plugin_registrar_windows.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/windows/compositor.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/windows/compositor_opengl.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/windows/compositor_opengl.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/windows/compositor_software.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/windows/compositor_software.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/windows/cursor_handler.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/windows/cursor_handler.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/windows/direct_manipulation.cc + ../../../flutter/LICENSE
Expand Down Expand Up @@ -9956,11 +9951,6 @@ FILE: ../../../flutter/shell/platform/windows/client_wrapper/include/flutter/flu
FILE: ../../../flutter/shell/platform/windows/client_wrapper/include/flutter/flutter_view.h
FILE: ../../../flutter/shell/platform/windows/client_wrapper/include/flutter/flutter_view_controller.h
FILE: ../../../flutter/shell/platform/windows/client_wrapper/include/flutter/plugin_registrar_windows.h
FILE: ../../../flutter/shell/platform/windows/compositor.h
FILE: ../../../flutter/shell/platform/windows/compositor_opengl.cc
FILE: ../../../flutter/shell/platform/windows/compositor_opengl.h
FILE: ../../../flutter/shell/platform/windows/compositor_software.cc
FILE: ../../../flutter/shell/platform/windows/compositor_software.h
FILE: ../../../flutter/shell/platform/windows/cursor_handler.cc
FILE: ../../../flutter/shell/platform/windows/cursor_handler.h
FILE: ../../../flutter/shell/platform/windows/direct_manipulation.cc
Expand Down
4 changes: 0 additions & 4 deletions impeller/renderer/backend/gles/description_gles.cc
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,6 @@ std::string DescriptionGLES::GetString() const {
return stream.str();
}

Version DescriptionGLES::GetGlVersion() const {
return gl_version_;
}

bool DescriptionGLES::IsES() const {
return is_es_;
}
Expand Down
2 changes: 0 additions & 2 deletions impeller/renderer/backend/gles/description_gles.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ class DescriptionGLES {

std::string GetString() const;

Version GetGlVersion() const;

bool HasExtension(const std::string& ext) const;

/// @brief Returns whether GLES includes the debug extension.
Expand Down
3 changes: 1 addition & 2 deletions shell/platform/linux/fl_backing_store_provider.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ uint32_t fl_backing_store_provider_get_gl_format(FlBackingStoreProvider* self) {
// In Linux kN32_SkColorType is assumed to be kBGRA_8888_SkColorType.
// So we must choose a valid gl format to be compatible with surface format
// BGRA8.
// Following logics are copied from Skia GrGLCaps.cpp:
// https://github.com/google/skia/blob/4738ed711e03212aceec3cd502a4adb545f38e63/src/gpu/ganesh/gl/GrGLCaps.cpp#L1963-L2116
// Following logics are copied from Skia GrGLCaps.cpp.

if (epoxy_is_desktop_gl()) {
// For OpenGL.
Expand Down
9 changes: 0 additions & 9 deletions shell/platform/windows/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ source_set("flutter_windows_source") {
"accessibility_bridge_windows.h",
"angle_surface_manager.cc",
"angle_surface_manager.h",
"compositor.h",
"compositor_opengl.cc",
"compositor_opengl.h",
"compositor_software.cc",
"compositor_software.h",
"cursor_handler.cc",
"cursor_handler.h",
"direct_manipulation.cc",
Expand Down Expand Up @@ -139,7 +134,6 @@ source_set("flutter_windows_source") {
deps = [
":flutter_windows_headers",
"//flutter/fml:fml",
"//flutter/impeller/renderer/backend/gles",
"//flutter/shell/platform/common:common_cpp",
"//flutter/shell/platform/common:common_cpp_input",
"//flutter/shell/platform/common:common_cpp_switches",
Expand Down Expand Up @@ -181,8 +175,6 @@ executable("flutter_windows_unittests") {
# Common Windows test sources.
sources = [
"accessibility_bridge_windows_unittests.cc",
"compositor_opengl_unittests.cc",
"compositor_software_unittests.cc",
"cursor_handler_unittests.cc",
"direct_manipulation_unittests.cc",
"dpi_utils_unittests.cc",
Expand Down Expand Up @@ -243,7 +235,6 @@ executable("flutter_windows_unittests") {
":flutter_windows_fixtures",
":flutter_windows_headers",
":flutter_windows_source",
"//flutter/impeller/renderer/backend/gles",
"//flutter/shell/platform/common:common_cpp",
"//flutter/shell/platform/common/client_wrapper:client_wrapper",
"//flutter/shell/platform/embedder:embedder_as_internal_library",
Expand Down
39 changes: 0 additions & 39 deletions shell/platform/windows/compositor.h

This file was deleted.

154 changes: 0 additions & 154 deletions shell/platform/windows/compositor_opengl.cc

This file was deleted.

58 changes: 0 additions & 58 deletions shell/platform/windows/compositor_opengl.h

This file was deleted.

Loading

0 comments on commit 923f9e2

Please sign in to comment.