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 "base/files/file_util.h" | 5 #include "base/files/file_util.h" |
6 #include "cc/output/gl_renderer.h" | 6 #include "cc/output/gl_renderer.h" |
7 #include "cc/output/software_renderer.h" | 7 #include "cc/output/software_renderer.h" |
8 #include "cc/quads/render_pass.h" | 8 #include "cc/quads/render_pass.h" |
9 #include "cc/test/pixel_comparator.h" | 9 #include "cc/test/pixel_comparator.h" |
10 #include "cc/trees/layer_tree_settings.h" | 10 #include "cc/trees/layer_tree_settings.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 RenderPass* target, | 39 RenderPass* target, |
40 const base::FilePath& ref_file, | 40 const base::FilePath& ref_file, |
41 const PixelComparator& comparator); | 41 const PixelComparator& comparator); |
42 | 42 |
43 bool RunPixelTestWithReadbackTargetAndArea(RenderPassList* pass_list, | 43 bool RunPixelTestWithReadbackTargetAndArea(RenderPassList* pass_list, |
44 RenderPass* target, | 44 RenderPass* target, |
45 const base::FilePath& ref_file, | 45 const base::FilePath& ref_file, |
46 const PixelComparator& comparator, | 46 const PixelComparator& comparator, |
47 const gfx::Rect* copy_rect); | 47 const gfx::Rect* copy_rect); |
48 | 48 |
| 49 ContextProvider* context_provider() const { |
| 50 return output_surface_->context_provider(); |
| 51 } |
| 52 |
49 LayerTreeSettings settings_; | 53 LayerTreeSettings settings_; |
50 gfx::Size device_viewport_size_; | 54 gfx::Size device_viewport_size_; |
51 bool disable_picture_quad_image_filtering_; | 55 bool disable_picture_quad_image_filtering_; |
52 std::unique_ptr<FakeOutputSurfaceClient> output_surface_client_; | 56 std::unique_ptr<FakeOutputSurfaceClient> output_surface_client_; |
53 std::unique_ptr<OutputSurface> output_surface_; | 57 std::unique_ptr<OutputSurface> output_surface_; |
54 std::unique_ptr<TestSharedBitmapManager> shared_bitmap_manager_; | 58 std::unique_ptr<TestSharedBitmapManager> shared_bitmap_manager_; |
55 std::unique_ptr<TestGpuMemoryBufferManager> gpu_memory_buffer_manager_; | 59 std::unique_ptr<TestGpuMemoryBufferManager> gpu_memory_buffer_manager_; |
56 std::unique_ptr<BlockingTaskRunner> main_thread_task_runner_; | 60 std::unique_ptr<BlockingTaskRunner> main_thread_task_runner_; |
57 std::unique_ptr<ResourceProvider> resource_provider_; | 61 std::unique_ptr<ResourceProvider> resource_provider_; |
58 std::unique_ptr<TextureMailboxDeleter> texture_mailbox_deleter_; | 62 std::unique_ptr<TextureMailboxDeleter> texture_mailbox_deleter_; |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 ForceExpandedViewport(gfx::Size(50, 50)); | 161 ForceExpandedViewport(gfx::Size(50, 50)); |
158 ForceViewportOffset(gfx::Vector2d(10, 20)); | 162 ForceViewportOffset(gfx::Vector2d(10, 20)); |
159 } | 163 } |
160 | 164 |
161 typedef RendererPixelTest<GLRenderer> GLRendererPixelTest; | 165 typedef RendererPixelTest<GLRenderer> GLRendererPixelTest; |
162 typedef RendererPixelTest<SoftwareRenderer> SoftwareRendererPixelTest; | 166 typedef RendererPixelTest<SoftwareRenderer> SoftwareRendererPixelTest; |
163 | 167 |
164 } // namespace cc | 168 } // namespace cc |
165 | 169 |
166 #endif // CC_TEST_PIXEL_TEST_H_ | 170 #endif // CC_TEST_PIXEL_TEST_H_ |
OLD | NEW |