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

Unified Diff: ui/compositor/compositor.cc

Issue 23691074: ui/compositor: use an IO message loop on posix instead of DEFAULT (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/compositor.cc
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index 8b9b9c31b221d3089bead79127ce297838ae5330..bf6bfbc45b12799950840a48fe351a83c7469d6a 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -491,7 +491,18 @@ void Compositor::Initialize() {
#endif
if (use_thread) {
g_compositor_thread = new base::Thread("Browser Compositor");
+#if defined(OS_POSIX)
+ // Workaround for crbug.com/293736
+ // On Posix, MessagePumpDefault uses system time, so delayed tasks (for
+ // compositor scheduling) work incorrectly across system time changes (e.g.
+ // tlsdate). So instead, use an IO loop, which uses libevent, that uses
+ // monotonic time (immune to these problems).
+ base::Thread::Options options;
+ options.message_loop_type = base::MessageLoop::TYPE_IO;
+ g_compositor_thread->StartWithOptions(options);
+#else
g_compositor_thread->Start();
+#endif
}
DCHECK(!g_compositor_initialized) << "Compositor initialized twice.";
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698