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

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

Issue 1921803002: Avoid unnecessary post task during frame delivery. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments. Created 4 years, 8 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/gpu_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.cc b/content/common/gpu/media/gpu_video_decode_accelerator.cc
index a7c21893a688b6c5f44bca525459693928390491..f35291e48ae22d45f7bc284517b2f58e581c0ab9 100644
--- a/content/common/gpu/media/gpu_video_decode_accelerator.cc
+++ b/content/common/gpu/media/gpu_video_decode_accelerator.cc
@@ -471,10 +471,12 @@ void GpuVideoDecodeAccelerator::OnAssignPictureBuffers(
buffers.push_back(media::PictureBuffer(buffer_ids[i], texture_dimensions_,
service_ids, buffer_texture_ids));
}
+ {
+ DebugAutoLock auto_lock(debug_uncleared_textures_lock_);
+ for (uint32_t i = 0; i < buffer_ids.size(); ++i)
+ uncleared_textures_[buffer_ids[i]] = textures[i];
+ }
video_decode_accelerator_->AssignPictureBuffers(buffers);
- DebugAutoLock auto_lock(debug_uncleared_textures_lock_);
- for (uint32_t i = 0; i < buffer_ids.size(); ++i)
- uncleared_textures_[buffer_ids[i]] = textures[i];
}
void GpuVideoDecodeAccelerator::OnReusePictureBuffer(

Powered by Google App Engine
This is Rietveld 408576698