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

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

Issue 1455023002: cc: Replace Pass() with std::move() in some subdirs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pass-cc
Patch Set: pass-cc2: . 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
« no previous file with comments | « cc/resources/resource_provider_unittest.cc ('k') | cc/scheduler/begin_frame_source.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "cc/resources/resource_provider.h" 7 #include "cc/resources/resource_provider.h"
8 #include "cc/test/fake_output_surface.h" 8 #include "cc/test/fake_output_surface.h"
9 #include "cc/test/fake_output_surface_client.h" 9 #include "cc/test/fake_output_surface_client.h"
10 #include "cc/test/fake_resource_provider.h" 10 #include "cc/test/fake_resource_provider.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 }; 55 };
56 56
57 class VideoResourceUpdaterTest : public testing::Test { 57 class VideoResourceUpdaterTest : public testing::Test {
58 protected: 58 protected:
59 VideoResourceUpdaterTest() { 59 VideoResourceUpdaterTest() {
60 scoped_ptr<WebGraphicsContext3DUploadCounter> context3d( 60 scoped_ptr<WebGraphicsContext3DUploadCounter> context3d(
61 new WebGraphicsContext3DUploadCounter()); 61 new WebGraphicsContext3DUploadCounter());
62 62
63 context3d_ = context3d.get(); 63 context3d_ = context3d.get();
64 64
65 output_surface3d_ = 65 output_surface3d_ = FakeOutputSurface::Create3d(std::move(context3d));
66 FakeOutputSurface::Create3d(context3d.Pass());
67 CHECK(output_surface3d_->BindToClient(&client_)); 66 CHECK(output_surface3d_->BindToClient(&client_));
68 67
69 output_surface_software_ = FakeOutputSurface::CreateSoftware( 68 output_surface_software_ = FakeOutputSurface::CreateSoftware(
70 make_scoped_ptr(new SoftwareOutputDevice)); 69 make_scoped_ptr(new SoftwareOutputDevice));
71 CHECK(output_surface_software_->BindToClient(&client_)); 70 CHECK(output_surface_software_->BindToClient(&client_));
72 71
73 shared_bitmap_manager_.reset(new SharedBitmapManagerAllocationCounter()); 72 shared_bitmap_manager_.reset(new SharedBitmapManagerAllocationCounter());
74 resource_provider3d_ = FakeResourceProvider::Create( 73 resource_provider3d_ = FakeResourceProvider::Create(
75 output_surface3d_.get(), shared_bitmap_manager_.get()); 74 output_surface3d_.get(), shared_bitmap_manager_.get());
76 75
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 307
309 resources = updater.CreateExternalResourcesFromVideoFrame(video_frame); 308 resources = updater.CreateExternalResourcesFromVideoFrame(video_frame);
310 EXPECT_EQ(VideoFrameExternalResources::YUV_RESOURCE, resources.type); 309 EXPECT_EQ(VideoFrameExternalResources::YUV_RESOURCE, resources.type);
311 EXPECT_TRUE(resources.read_lock_fences_enabled); 310 EXPECT_TRUE(resources.read_lock_fences_enabled);
312 EXPECT_EQ(3u, resources.mailboxes.size()); 311 EXPECT_EQ(3u, resources.mailboxes.size());
313 EXPECT_EQ(3u, resources.release_callbacks.size()); 312 EXPECT_EQ(3u, resources.release_callbacks.size());
314 EXPECT_EQ(0u, resources.software_resources.size()); 313 EXPECT_EQ(0u, resources.software_resources.size());
315 } 314 }
316 } // namespace 315 } // namespace
317 } // namespace cc 316 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/resource_provider_unittest.cc ('k') | cc/scheduler/begin_frame_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698