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

Unified Diff: media/base/video_frame_unittest.cc

Issue 1414793018: Revert of Converted video frame and image callbacks to use new sync tokens. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/video_frame.cc ('k') | media/renderers/skcanvas_video_renderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/video_frame_unittest.cc
diff --git a/media/base/video_frame_unittest.cc b/media/base/video_frame_unittest.cc
index ee2a454dca249052b581acc3406c5de2c8277b75..c9f05ec6cad3974d3c2669405978dc8c31925a55 100644
--- a/media/base/video_frame_unittest.cc
+++ b/media/base/video_frame_unittest.cc
@@ -269,7 +269,7 @@
// Verify the gpu::MailboxHolder::ReleaseCallback is called when VideoFrame is
// destroyed with the default release sync point.
TEST(VideoFrame, TextureNoLongerNeededCallbackIsCalled) {
- gpu::SyncToken called_sync_token(gpu::CommandBufferNamespace::GPU_IO, 1, 1);
+ gpu::SyncToken called_sync_token(1);
{
scoped_refptr<VideoFrame> frame = VideoFrame::WrapNativeTexture(
@@ -296,8 +296,8 @@
explicit SyncTokenClientImpl(const gpu::SyncToken& sync_token)
: sync_token_(sync_token) {}
~SyncTokenClientImpl() override {}
- void GenerateSyncToken(gpu::SyncToken* sync_token) override {
- *sync_token = sync_token_;
+ uint32 InsertSyncPoint() override {
+ return static_cast<uint32>(sync_token_.release_count());
}
void WaitSyncToken(const gpu::SyncToken& sync_token) override {}
@@ -313,20 +313,14 @@
TEST(VideoFrame,
TexturesNoLongerNeededCallbackAfterTakingAndReleasingMailboxes) {
const int kPlanesNum = 3;
- const gpu::CommandBufferNamespace kNamespace =
- gpu::CommandBufferNamespace::GPU_IO;
- const uint64_t kCommandBufferId = 0x123;
gpu::Mailbox mailbox[kPlanesNum];
for (int i = 0; i < kPlanesNum; ++i) {
mailbox[i].name[0] = 50 + 1;
}
- gpu::SyncToken sync_token(kNamespace, kCommandBufferId, 7);
- sync_token.SetVerifyFlush();
+ gpu::SyncToken sync_token(7);
uint32 target = 9;
- gpu::SyncToken release_sync_token(kNamespace, kCommandBufferId, 111);
- release_sync_token.SetVerifyFlush();
-
+ gpu::SyncToken release_sync_token(111);
gpu::SyncToken called_sync_token;
{
scoped_refptr<VideoFrame> frame = VideoFrame::WrapYUV420NativeTextures(
« no previous file with comments | « media/base/video_frame.cc ('k') | media/renderers/skcanvas_video_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698