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

Unified Diff: media/filters/gpu_video_decoder.cc

Issue 2254993003: Avoid creating sync token when only change is new hardware video frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix deps 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/filters/gpu_video_decoder.h ('k') | media/renderers/gpu_video_accelerator_factories.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/gpu_video_decoder.cc
diff --git a/media/filters/gpu_video_decoder.cc b/media/filters/gpu_video_decoder.cc
index d323e0f38e8869225bc85da6fda93345dced462d..af08d234112c996242c32217b6c4f58cc13a7f0d 100644
--- a/media/filters/gpu_video_decoder.cc
+++ b/media/filters/gpu_video_decoder.cc
@@ -496,6 +496,7 @@ void GpuVideoDecoder::ProvidePictureBuffers(uint32_t count,
NotifyError(VideoDecodeAccelerator::PLATFORM_FAILURE);
return;
}
+ sync_token_ = factories_->CreateSyncToken();
DCHECK_EQ(count * textures_per_buffer, texture_ids.size());
DCHECK_EQ(count * textures_per_buffer, texture_mailboxes.size());
@@ -596,8 +597,8 @@ void GpuVideoDecoder::PictureReady(const media::Picture& picture) {
gpu::MailboxHolder mailbox_holders[VideoFrame::kMaxPlanes];
for (size_t i = 0; i < pb.texture_ids().size(); ++i) {
- mailbox_holders[i] = gpu::MailboxHolder(
- pb.texture_mailbox(i), gpu::SyncToken(), decoder_texture_target_);
+ mailbox_holders[i] = gpu::MailboxHolder(pb.texture_mailbox(i), sync_token_,
+ decoder_texture_target_);
}
scoped_refptr<VideoFrame> frame(VideoFrame::WrapNativeTextures(
« no previous file with comments | « media/filters/gpu_video_decoder.h ('k') | media/renderers/gpu_video_accelerator_factories.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698