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

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

Issue 1427543002: Modified old wait sync point functions to also accept new sync tokens. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix mock gpu video accelerator factory Created 5 years, 1 month 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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 EXPECT_EQ(0u, called_sync_point); 289 EXPECT_EQ(0u, called_sync_point);
290 } 290 }
291 291
292 namespace { 292 namespace {
293 293
294 class SyncPointClientImpl : public VideoFrame::SyncPointClient { 294 class SyncPointClientImpl : public VideoFrame::SyncPointClient {
295 public: 295 public:
296 explicit SyncPointClientImpl(uint32 sync_point) : sync_point_(sync_point) {} 296 explicit SyncPointClientImpl(uint32 sync_point) : sync_point_(sync_point) {}
297 ~SyncPointClientImpl() override {} 297 ~SyncPointClientImpl() override {}
298 uint32 InsertSyncPoint() override { return sync_point_; } 298 uint32 InsertSyncPoint() override { return sync_point_; }
299 void WaitSyncPoint(uint32 sync_point) override {} 299 void WaitSyncPoint(uint32 sync_point,
300 const gpu::SyncToken& sync_token) override {}
300 301
301 private: 302 private:
302 uint32 sync_point_; 303 uint32 sync_point_;
303 }; 304 };
304 305
305 } // namespace 306 } // namespace
306 307
307 // Verify the gpu::MailboxHolder::ReleaseCallback is called when VideoFrame is 308 // Verify the gpu::MailboxHolder::ReleaseCallback is called when VideoFrame is
308 // destroyed with the release sync point, which was updated by clients. 309 // destroyed with the release sync point, which was updated by clients.
309 // (i.e. the compositor, webgl). 310 // (i.e. the compositor, webgl).
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 474
474 for (int i = 0; i < VideoFrameMetadata::NUM_KEYS; ++i) { 475 for (int i = 0; i < VideoFrameMetadata::NUM_KEYS; ++i) {
475 const VideoFrameMetadata::Key key = static_cast<VideoFrameMetadata::Key>(i); 476 const VideoFrameMetadata::Key key = static_cast<VideoFrameMetadata::Key>(i);
476 int value = -1; 477 int value = -1;
477 EXPECT_TRUE(result.GetInteger(key, &value)); 478 EXPECT_TRUE(result.GetInteger(key, &value));
478 EXPECT_EQ(i, value); 479 EXPECT_EQ(i, value);
479 } 480 }
480 } 481 }
481 482
482 } // namespace media 483 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698