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

Unified Diff: content/common/gpu/media/vt_video_decode_accelerator.cc

Issue 1134113002: content/common: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix CrOS build. Created 5 years, 7 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
Index: content/common/gpu/media/vt_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/vt_video_decode_accelerator.cc b/content/common/gpu/media/vt_video_decode_accelerator.cc
index 4af6e6caac80cf8d96470d34134f07fc5ba93c12..4435cd7028077f27dd9bf5d1152dcba880095a01 100644
--- a/content/common/gpu/media/vt_video_decode_accelerator.cc
+++ b/content/common/gpu/media/vt_video_decode_accelerator.cc
@@ -324,7 +324,7 @@ bool VTVideoDecodeAccelerator::Initialize(
}
bool VTVideoDecodeAccelerator::FinishDelayedFrames() {
- DCHECK(decoder_thread_.message_loop_proxy()->BelongsToCurrentThread());
+ DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread());
if (session_) {
OSStatus status = VTDecompressionSessionWaitForAsynchronousFrames(session_);
if (status) {
@@ -337,7 +337,7 @@ bool VTVideoDecodeAccelerator::FinishDelayedFrames() {
}
bool VTVideoDecodeAccelerator::ConfigureDecoder() {
- DCHECK(decoder_thread_.message_loop_proxy()->BelongsToCurrentThread());
+ DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread());
DCHECK(!last_sps_.empty());
DCHECK(!last_pps_.empty());
@@ -447,7 +447,7 @@ bool VTVideoDecodeAccelerator::ConfigureDecoder() {
void VTVideoDecodeAccelerator::DecodeTask(
const media::BitstreamBuffer& bitstream,
Frame* frame) {
- DCHECK(decoder_thread_.message_loop_proxy()->BelongsToCurrentThread());
+ DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread());
// Map the bitstream buffer.
base::SharedMemory memory(bitstream.handle(), true);
@@ -744,7 +744,7 @@ void VTVideoDecodeAccelerator::DecodeDone(Frame* frame) {
}
void VTVideoDecodeAccelerator::FlushTask(TaskType type) {
- DCHECK(decoder_thread_.message_loop_proxy()->BelongsToCurrentThread());
+ DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread());
FinishDelayedFrames();
// Always queue a task, even if FinishDelayedFrames() fails, so that
@@ -765,9 +765,9 @@ void VTVideoDecodeAccelerator::Decode(const media::BitstreamBuffer& bitstream) {
assigned_bitstream_ids_.insert(bitstream.id());
Frame* frame = new Frame(bitstream.id());
pending_frames_[frame->bitstream_id] = make_linked_ptr(frame);
- decoder_thread_.message_loop_proxy()->PostTask(FROM_HERE, base::Bind(
- &VTVideoDecodeAccelerator::DecodeTask, base::Unretained(this),
- bitstream, frame));
+ decoder_thread_.task_runner()->PostTask(
+ FROM_HERE, base::Bind(&VTVideoDecodeAccelerator::DecodeTask,
+ base::Unretained(this), bitstream, frame));
}
void VTVideoDecodeAccelerator::AssignPictureBuffers(
@@ -1004,9 +1004,9 @@ void VTVideoDecodeAccelerator::NotifyError(
void VTVideoDecodeAccelerator::QueueFlush(TaskType type) {
DCHECK(gpu_thread_checker_.CalledOnValidThread());
pending_flush_tasks_.push(type);
- decoder_thread_.message_loop_proxy()->PostTask(FROM_HERE, base::Bind(
- &VTVideoDecodeAccelerator::FlushTask, base::Unretained(this),
- type));
+ decoder_thread_.task_runner()->PostTask(
+ FROM_HERE, base::Bind(&VTVideoDecodeAccelerator::FlushTask,
+ base::Unretained(this), type));
// If this is a new flush request, see if we can make progress.
if (pending_flush_tasks_.size() == 1)
« no previous file with comments | « content/common/gpu/media/vt_video_decode_accelerator.h ('k') | content/common/host_discardable_shared_memory_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698