Bug 1467125 - [Wayland] Get events from Wayland display faster on compositor thread, r?jhorak draft
authorMartin Stransky <stransky@redhat.com>
Wed, 06 Jun 2018 15:25:15 +0200
changeset 804693 86c5db17f6db1608c6414c835f0bcb33504854ba
parent 804692 f8291f2c63fabe1734c4913d2bbefbaee25871e7
push id112439
push userstransky@redhat.com
push dateWed, 06 Jun 2018 13:25:52 +0000
reviewersjhorak
bugs1467125
milestone62.0a1
Bug 1467125 - [Wayland] Get events from Wayland display faster on compositor thread, r?jhorak MozReview-Commit-ID: AmarsYA2INc
widget/gtk/WindowSurfaceWayland.cpp
--- a/widget/gtk/WindowSurfaceWayland.cpp
+++ b/widget/gtk/WindowSurfaceWayland.cpp
@@ -146,18 +146,19 @@ static StaticMutex gWaylandDisplaysMutex
 //
 // nsWaylandDisplay is our interface to wayland compositor. It provides wayland
 // global objects as we need (wl_display, wl_shm) and operates wl_event_queue on
 // compositor (not the main) thread.
 static nsWaylandDisplay* WaylandDisplayGet(wl_display *aDisplay);
 static void WaylandDisplayRelease(wl_display *aDisplay);
 static void WaylandDisplayLoop(wl_display *aDisplay);
 
-// TODO: is the 60pfs loop correct?
-#define EVENT_LOOP_DELAY (1000/60)
+// TODO: Bug 1467125 - We need to integrate wl_display_dispatch_queue_pending() with
+// compositor event loop.
+#define EVENT_LOOP_DELAY (1000/240)
 
 // Get WaylandDisplay for given wl_display and actual calling thread.
 static nsWaylandDisplay*
 WaylandDisplayGetLocked(wl_display *aDisplay, const StaticMutexAutoLock&)
 {
   nsWaylandDisplay* waylandDisplay = nullptr;
 
   int len = gWaylandDisplays.Count();