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

Unified Diff: media/base/video_frame.cc

Issue 313623003: WIP: Option2: Android media: VideoFrame should not store so many sync points. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « media/base/video_frame.h ('k') | media/base/video_frame_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/video_frame.cc
diff --git a/media/base/video_frame.cc b/media/base/video_frame.cc
index 089af93c0c88d11e68e5583fc94ac5163a9f6cca..7fc3fe669d240addb859fe9b61b26c9050aa244b 100644
--- a/media/base/video_frame.cc
+++ b/media/base/video_frame.cc
@@ -604,10 +604,10 @@ VideoFrame::VideoFrame(VideoFrame::Format format,
VideoFrame::~VideoFrame() {
if (!mailbox_holder_release_cb_.is_null()) {
- std::vector<uint32> release_sync_points;
+ std::map<std::string, uint32> release_sync_points;
{
base::AutoLock locker(release_sync_point_lock_);
- release_sync_points_.swap(release_sync_points);
+ release_sync_point_map_.swap(release_sync_points);
}
base::ResetAndReturn(&mailbox_holder_release_cb_).Run(release_sync_points);
}
@@ -707,12 +707,12 @@ base::SharedMemoryHandle VideoFrame::shared_memory_handle() const {
return shared_memory_handle_;
}
-void VideoFrame::AppendReleaseSyncPoint(uint32 sync_point) {
+void VideoFrame::AppendReleaseSyncPoint(std::string client, uint32 sync_point) {
DCHECK_EQ(format_, NATIVE_TEXTURE);
if (!sync_point)
return;
base::AutoLock locker(release_sync_point_lock_);
- release_sync_points_.push_back(sync_point);
+ release_sync_point_map_[client] = sync_point;
}
#if defined(OS_POSIX)
« no previous file with comments | « media/base/video_frame.h ('k') | media/base/video_frame_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698