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

Side by Side Diff: media/base/video_frame_unittest.cc

Issue 175223003: HW Video: Make media::VideoFrame handle the sync point of the compositor as well as webgl (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Add WaitSyncPoint in WMPImpl::paint(...) Created 6 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/base/video_frame.h" 5 #include "media/base/video_frame.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/memory/aligned_memory.h" 10 #include "base/memory/aligned_memory.h"
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 base::TimeDelta(), // timestamp 258 base::TimeDelta(), // timestamp
259 base::Callback<void(const SkBitmap&)>()); // read_pixels_cb 259 base::Callback<void(const SkBitmap&)>()); // read_pixels_cb
260 260
261 gpu::MailboxHolder* mailbox_holder = frame->mailbox_holder(); 261 gpu::MailboxHolder* mailbox_holder = frame->mailbox_holder();
262 262
263 EXPECT_EQ(mailbox.name[0], mailbox_holder->mailbox.name[0]); 263 EXPECT_EQ(mailbox.name[0], mailbox_holder->mailbox.name[0]);
264 EXPECT_EQ(target, mailbox_holder->texture_target); 264 EXPECT_EQ(target, mailbox_holder->texture_target);
265 EXPECT_EQ(sync_point, mailbox_holder->sync_point); 265 EXPECT_EQ(sync_point, mailbox_holder->sync_point);
266 266
267 // Finish using the mailbox_holder and drop our reference. 267 // Finish using the mailbox_holder and drop our reference.
268 uint32 previous_sync_point = 0;
269 sync_point = 1;
270 EXPECT_EQ(previous_sync_point, frame->SwapReleaseSyncPoint(sync_point));
271 // The last sync point will be used.
272 previous_sync_point = sync_point;
268 sync_point = 10; 273 sync_point = 10;
269 mailbox_holder->sync_point = sync_point; 274 EXPECT_EQ(previous_sync_point, frame->SwapReleaseSyncPoint(sync_point));
275
270 } 276 }
271 EXPECT_EQ(sync_point, called_sync_point); 277 EXPECT_EQ(sync_point, called_sync_point);
272 } 278 }
273 279
274 } // namespace media 280 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698