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

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

Issue 467183003: Minor scoped_refptr cleanup in cc::OutputSurface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: With raw pointer Created 6 years, 3 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
« no previous file with comments | « cc/resources/resource_provider.cc ('k') | cc/test/layer_tree_test.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 "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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 } 55 }
56 56
57 TestWebGraphicsContext3D* context3d_; 57 TestWebGraphicsContext3D* context3d_;
58 FakeOutputSurfaceClient client_; 58 FakeOutputSurfaceClient client_;
59 scoped_ptr<FakeOutputSurface> output_surface3d_; 59 scoped_ptr<FakeOutputSurface> output_surface3d_;
60 scoped_ptr<TestSharedBitmapManager> shared_bitmap_manager_; 60 scoped_ptr<TestSharedBitmapManager> shared_bitmap_manager_;
61 scoped_ptr<ResourceProvider> resource_provider3d_; 61 scoped_ptr<ResourceProvider> resource_provider3d_;
62 }; 62 };
63 63
64 TEST_F(VideoResourceUpdaterTest, SoftwareFrame) { 64 TEST_F(VideoResourceUpdaterTest, SoftwareFrame) {
65 VideoResourceUpdater updater(output_surface3d_->context_provider().get(), 65 VideoResourceUpdater updater(output_surface3d_->context_provider(),
66 resource_provider3d_.get()); 66 resource_provider3d_.get());
67 scoped_refptr<media::VideoFrame> video_frame = CreateTestYUVVideoFrame(); 67 scoped_refptr<media::VideoFrame> video_frame = CreateTestYUVVideoFrame();
68 68
69 VideoFrameExternalResources resources = 69 VideoFrameExternalResources resources =
70 updater.CreateExternalResourcesFromVideoFrame(video_frame); 70 updater.CreateExternalResourcesFromVideoFrame(video_frame);
71 EXPECT_EQ(VideoFrameExternalResources::YUV_RESOURCE, resources.type); 71 EXPECT_EQ(VideoFrameExternalResources::YUV_RESOURCE, resources.type);
72 } 72 }
73 73
74 } // namespace 74 } // namespace
75 } // namespace cc 75 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/resource_provider.cc ('k') | cc/test/layer_tree_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698