OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |