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

Side by Side Diff: cc/resources/video_resource_updater_unittest.cc

Issue 1195473003: cc: Set read lock fences required for YUV native video frames. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove flag in FrameResource. Created 5 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "cc/resources/video_resource_updater.h" 5 #include "cc/resources/video_resource_updater.h"
6 6
7 #include "base/memory/shared_memory.h" 7 #include "base/memory/shared_memory.h"
8 #include "cc/resources/resource_provider.h" 8 #include "cc/resources/resource_provider.h"
9 #include "cc/test/fake_output_surface.h" 9 #include "cc/test/fake_output_surface.h"
10 #include "cc/test/fake_output_surface_client.h" 10 #include "cc/test/fake_output_surface_client.h"
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 updater.CreateExternalResourcesFromVideoFrame(video_frame); 302 updater.CreateExternalResourcesFromVideoFrame(video_frame);
303 EXPECT_EQ(VideoFrameExternalResources::RGBA_RESOURCE, resources.type); 303 EXPECT_EQ(VideoFrameExternalResources::RGBA_RESOURCE, resources.type);
304 EXPECT_EQ(1u, resources.mailboxes.size()); 304 EXPECT_EQ(1u, resources.mailboxes.size());
305 EXPECT_EQ(1u, resources.release_callbacks.size()); 305 EXPECT_EQ(1u, resources.release_callbacks.size());
306 EXPECT_EQ(0u, resources.software_resources.size()); 306 EXPECT_EQ(0u, resources.software_resources.size());
307 307
308 video_frame = CreateTestYUVHardareVideoFrame(); 308 video_frame = CreateTestYUVHardareVideoFrame();
309 309
310 resources = updater.CreateExternalResourcesFromVideoFrame(video_frame); 310 resources = updater.CreateExternalResourcesFromVideoFrame(video_frame);
311 EXPECT_EQ(VideoFrameExternalResources::YUV_RESOURCE, resources.type); 311 EXPECT_EQ(VideoFrameExternalResources::YUV_RESOURCE, resources.type);
312 EXPECT_TRUE(resources.read_lock_fences_enabled);
312 EXPECT_EQ(3u, resources.mailboxes.size()); 313 EXPECT_EQ(3u, resources.mailboxes.size());
313 EXPECT_EQ(3u, resources.release_callbacks.size()); 314 EXPECT_EQ(3u, resources.release_callbacks.size());
314 EXPECT_EQ(0u, resources.software_resources.size()); 315 EXPECT_EQ(0u, resources.software_resources.size());
315 } 316 }
316 } // namespace 317 } // namespace
317 } // namespace cc 318 } // namespace cc
OLDNEW
« cc/resources/video_resource_updater.cc ('K') | « cc/resources/video_resource_updater.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698