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

Unified Diff: remoting/protocol/webrtc_video_renderer_adapter.cc

Issue 2610493002: Use TaskScheduler instead of WorkerPool in webrtc_video_renderer_adapter.cc. (Closed)
Patch Set: rebase Created 3 years, 10 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 | « remoting/protocol/connection_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/webrtc_video_renderer_adapter.cc
diff --git a/remoting/protocol/webrtc_video_renderer_adapter.cc b/remoting/protocol/webrtc_video_renderer_adapter.cc
index d237386dbb14b2c5cbe804ecf3e8d2489b665a0f..cc4c3146afef8afa5c5b5d97ce6848f499b82438 100644
--- a/remoting/protocol/webrtc_video_renderer_adapter.cc
+++ b/remoting/protocol/webrtc_video_renderer_adapter.cc
@@ -13,9 +13,8 @@
#include "base/location.h"
#include "base/memory/ptr_util.h"
#include "base/single_thread_task_runner.h"
-#include "base/task_runner_util.h"
+#include "base/task_scheduler/post_task.h"
#include "base/threading/thread_task_runner_handle.h"
-#include "base/threading/worker_pool.h"
#include "remoting/protocol/client_video_stats_dispatcher.h"
#include "remoting/protocol/frame_consumer.h"
#include "remoting/protocol/frame_stats.h"
@@ -175,8 +174,9 @@ void WebrtcVideoRendererAdapter::HandleFrameOnMainThread(
video_renderer_->GetFrameConsumer()->AllocateFrame(
webrtc::DesktopSize(frame->width(), frame->height()));
- base::PostTaskAndReplyWithResult(
- base::WorkerPool::GetTaskRunner(false).get(), FROM_HERE,
+ base::PostTaskWithTraitsAndReplyWithResult(
+ FROM_HERE, base::TaskTraits().WithShutdownBehavior(
+ base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN),
base::Bind(&ConvertYuvToRgb, base::Passed(&frame),
base::Passed(&rgb_frame),
video_renderer_->GetFrameConsumer()->GetPixelFormat()),
« no previous file with comments | « remoting/protocol/connection_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698