sony / flutter-embedded-linux

Embedded Linux embedding for Flutter
BSD 3-Clause "New" or "Revised" License
1.16k stars 122 forks source link

Screen corruption on Wayland (Not repainted?) #326

Closed HidenoriMatsubayashi closed 1 year ago

HidenoriMatsubayashi commented 1 year ago

The screen is distorted with high rate with flutter 3.7.0.

スクリーンショット 2023-01-25 23 58 50
HidenoriMatsubayashi commented 1 year ago

It seems this symptom depends on Ubuntu 22 (GNOME).

swift-kim commented 1 year ago

Is this issue possibly related to https://github.com/flutter/flutter/issues/119601? Does it only occur under some specific conditions (Ubuntu/Wayland)?

HidenoriMatsubayashi commented 1 year ago

Could be. Thanks for the information. Actually, I was not able to reproduce this issue on X11 backend and Sway (Wayland compositor). I can reproduce it only on Ubuntu 22 (GNOME, Weston).

andreadaoud commented 1 year ago

Can you patch this when building flutter engine in CI pipeline? From my testing, the following patch solves this issue:

diff --git a/shell/platform/embedder/embedder_surface_gl.cc b/shell/platform/embedder/embedder_surface_gl.cc
index 44b1fddf80..5b64ad2e28 100644
--- a/shell/platform/embedder/embedder_surface_gl.cc
+++ b/shell/platform/embedder/embedder_surface_gl.cc
@@ -88,8 +88,7 @@ SurfaceFrame::FramebufferInfo EmbedderSurfaceGL::GLContextFramebufferInfo()
   // Enable partial repaint by default on the embedders.
   auto info = SurfaceFrame::FramebufferInfo{};
   info.supports_readback = true;
-  info.supports_partial_repaint =
-      gl_dispatch_table_.gl_populate_existing_damage != nullptr;
+  info.supports_partial_repaint = false;
   return info;
 }
HidenoriMatsubayashi commented 1 year ago

I'm considering adding populate_existing_damage support instead.