Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(282)

Unified Diff: ui/ozone/platform/wayland/wayland_display.h

Issue 1739193004: ozone/platform/wayland: Use more realistic event processing and request flushing in tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wayland-test2
Patch Set: Use watching_ instead of base::MessageLoopForUI::IsCurrent() Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ozone/platform/wayland/fake_server.cc ('k') | ui/ozone/platform/wayland/wayland_display.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/wayland/wayland_display.h
diff --git a/ui/ozone/platform/wayland/wayland_display.h b/ui/ozone/platform/wayland/wayland_display.h
index 5a6936bda3796b0e1d117be683cf557475fbae97..bfdf5d12e3484b2f16676d9b7eda7c3bbbdac5d7 100644
--- a/ui/ozone/platform/wayland/wayland_display.h
+++ b/ui/ozone/platform/wayland/wayland_display.h
@@ -23,9 +23,10 @@ class WaylandDisplay : public PlatformEventSource,
~WaylandDisplay() override;
bool Initialize();
+ bool StartProcessingEvents();
- // Flushes the Wayland connection.
- void Flush();
+ // Schedules a flush of the Wayland connection.
+ void ScheduleFlush();
wl_display* display() { return display_.get(); }
wl_compositor* compositor() { return compositor_.get(); }
@@ -37,6 +38,8 @@ class WaylandDisplay : public PlatformEventSource,
void RemoveWindow(gfx::AcceleratedWidget widget);
private:
+ void Flush();
+
// PlatformEventSource
void OnDispatcherListChanged() override;
@@ -63,6 +66,7 @@ class WaylandDisplay : public PlatformEventSource,
wl::Object<wl_shm> shm_;
wl::Object<xdg_shell> shell_;
+ bool scheduled_flush_ = false;
bool watching_ = false;
base::MessagePumpLibevent::FileDescriptorWatcher controller_;
« no previous file with comments | « ui/ozone/platform/wayland/fake_server.cc ('k') | ui/ozone/platform/wayland/wayland_display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698