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

Unified Diff: media/gpu/rendering_helper.cc

Issue 2211473003: Remove calls to deprecated MessageLoop methods on Windows and Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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 | « media/device_monitors/system_message_window_win_unittest.cc ('k') | media/gpu/v4l2_image_processor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/rendering_helper.cc
diff --git a/media/gpu/rendering_helper.cc b/media/gpu/rendering_helper.cc
index 79c5ecd9e324dcab6463d794b4e7c7c91ba0ed9c..1bca453ef0e27cd63eca57ed0630c9817192941c 100644
--- a/media/gpu/rendering_helper.cc
+++ b/media/gpu/rendering_helper.cc
@@ -18,6 +18,7 @@
#include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/stringize_macros.h"
#include "base/synchronization/waitable_event.h"
#include "base/time/time.h"
@@ -560,7 +561,7 @@ void RenderingHelper::CreateTexture(uint32_t texture_target,
const gfx::Size& size,
base::WaitableEvent* done) {
if (base::MessageLoop::current() != message_loop_) {
- message_loop_->PostTask(
+ message_loop_->task_runner()->PostTask(
FROM_HERE,
base::Bind(&RenderingHelper::CreateTexture, base::Unretained(this),
texture_target, texture_id, size, done));
@@ -635,7 +636,7 @@ void RenderingHelper::QueueVideoFrame(
// Schedules the first RenderContent() if need.
if (scheduled_render_time_.is_null()) {
scheduled_render_time_ = base::TimeTicks::Now();
- message_loop_->PostTask(FROM_HERE, render_task_.callback());
+ message_loop_->task_runner()->PostTask(FROM_HERE, render_task_.callback());
}
}
@@ -885,7 +886,7 @@ void RenderingHelper::ScheduleNextRenderContent() {
DropOneFrameForAllVideos();
}
- message_loop_->PostDelayedTask(FROM_HERE, render_task_.callback(),
- target - now);
+ message_loop_->task_runner()->PostDelayedTask(
+ FROM_HERE, render_task_.callback(), target - now);
}
} // namespace media
« no previous file with comments | « media/device_monitors/system_message_window_win_unittest.cc ('k') | media/gpu/v4l2_image_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698