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

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: build fix cast_unittests 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 sync_point = 10; 268 sync_point = 10;
269 mailbox_holder->sync_point = sync_point; 269 frame->SetReleaseSyncPoint(1);
270 // The last sync point will be used.
271 frame->SetReleaseSyncPoint(sync_point);
270 } 272 }
271 EXPECT_EQ(sync_point, called_sync_point); 273 EXPECT_EQ(sync_point, called_sync_point);
272 } 274 }
273 275
274 } // namespace media 276 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698