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/test/layer_tree_pixel_test.h" | 5 #include "cc/test/layer_tree_pixel_test.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 // Always test Webview shenanigans. | 70 // Always test Webview shenanigans. |
71 gfx::Size surface_expansion_size(40, 60); | 71 gfx::Size surface_expansion_size(40, 60); |
72 | 72 |
73 std::unique_ptr<PixelTestOutputSurface> display_output_surface; | 73 std::unique_ptr<PixelTestOutputSurface> display_output_surface; |
74 if (test_type_ == PIXEL_TEST_GL) { | 74 if (test_type_ == PIXEL_TEST_GL) { |
75 bool flipped_output_surface = false; | 75 bool flipped_output_surface = false; |
76 display_output_surface = base::MakeUnique<PixelTestOutputSurface>( | 76 display_output_surface = base::MakeUnique<PixelTestOutputSurface>( |
77 // Pixel tests use a separate context for the Display to more closely | 77 // Pixel tests use a separate context for the Display to more closely |
78 // mimic texture transport from the renderer process to the Display | 78 // mimic texture transport from the renderer process to the Display |
79 // compositor. | 79 // compositor. |
80 make_scoped_refptr(new TestInProcessContextProvider(nullptr)), nullptr, | 80 make_scoped_refptr(new TestInProcessContextProvider(nullptr)), |
81 flipped_output_surface); | 81 flipped_output_surface); |
82 } else { | 82 } else { |
83 std::unique_ptr<PixelTestSoftwareOutputDevice> software_output_device( | 83 std::unique_ptr<PixelTestSoftwareOutputDevice> software_output_device( |
84 new PixelTestSoftwareOutputDevice); | 84 new PixelTestSoftwareOutputDevice); |
85 software_output_device->set_surface_expansion_size(surface_expansion_size); | 85 software_output_device->set_surface_expansion_size(surface_expansion_size); |
86 display_output_surface = base::MakeUnique<PixelTestOutputSurface>( | 86 display_output_surface = base::MakeUnique<PixelTestOutputSurface>( |
87 std::move(software_output_device)); | 87 std::move(software_output_device)); |
88 } | 88 } |
89 display_output_surface->set_surface_expansion_size(surface_expansion_size); | 89 display_output_surface->set_surface_expansion_size(surface_expansion_size); |
90 return std::move(display_output_surface); | 90 return std::move(display_output_surface); |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 } | 289 } |
290 | 290 |
291 void LayerTreePixelTest::Finish() { | 291 void LayerTreePixelTest::Finish() { |
292 std::unique_ptr<gpu::GLInProcessContext> context = | 292 std::unique_ptr<gpu::GLInProcessContext> context = |
293 CreateTestInProcessContext(); | 293 CreateTestInProcessContext(); |
294 GLES2Interface* gl = context->GetImplementation(); | 294 GLES2Interface* gl = context->GetImplementation(); |
295 gl->Finish(); | 295 gl->Finish(); |
296 } | 296 } |
297 | 297 |
298 } // namespace cc | 298 } // namespace cc |
OLD | NEW |