Commit 24c2b300 authored by piman@chromium.org's avatar piman@chromium.org

Revert r223961 and r224074 (using IO message loop instead of DEFAULT).

MessagePumpDefault was incorrectly using system time instead of monotonic time
for PostDelayedTask. This was fixed in r226378 so we don't need this workaround
any more.

BUG=293736

Review URL: https://codereview.chromium.org/25628004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226425 0039d316-1c4b-4281-b951-d872f2087c98
parent 5e9dbc56
...@@ -653,18 +653,7 @@ void RenderThreadImpl::EnsureWebKitInitialized() { ...@@ -653,18 +653,7 @@ void RenderThreadImpl::EnsureWebKitInitialized() {
#endif #endif
if (!compositor_message_loop_proxy_.get()) { if (!compositor_message_loop_proxy_.get()) {
compositor_thread_.reset(new base::Thread("Compositor")); compositor_thread_.reset(new base::Thread("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;
compositor_thread_->StartWithOptions(options);
#else
compositor_thread_->Start(); compositor_thread_->Start();
#endif
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
compositor_thread_->SetPriority(base::kThreadPriority_Display); compositor_thread_->SetPriority(base::kThreadPriority_Display);
#endif #endif
...@@ -1282,18 +1271,7 @@ RenderThreadImpl::GetMediaThreadMessageLoopProxy() { ...@@ -1282,18 +1271,7 @@ RenderThreadImpl::GetMediaThreadMessageLoopProxy() {
DCHECK(message_loop() == base::MessageLoop::current()); DCHECK(message_loop() == base::MessageLoop::current());
if (!media_thread_) { if (!media_thread_) {
media_thread_.reset(new base::Thread("Media")); media_thread_.reset(new base::Thread("Media"));
#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;
media_thread_->StartWithOptions(options);
#else
media_thread_->Start(); media_thread_->Start();
#endif
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
renderer_demuxer_ = new RendererDemuxerAndroid(); renderer_demuxer_ = new RendererDemuxerAndroid();
......
...@@ -507,18 +507,7 @@ void Compositor::Initialize() { ...@@ -507,18 +507,7 @@ void Compositor::Initialize() {
#endif #endif
if (use_thread) { if (use_thread) {
g_compositor_thread = new base::Thread("Browser Compositor"); 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(); g_compositor_thread->Start();
#endif
} }
DCHECK(!g_compositor_initialized) << "Compositor initialized twice."; DCHECK(!g_compositor_initialized) << "Compositor initialized twice.";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment