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