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 30 matching lines...) Expand all Loading... |
41 scoped_ptr<OutputSurface> LayerTreePixelTest::CreateOutputSurface() { | 41 scoped_ptr<OutputSurface> LayerTreePixelTest::CreateOutputSurface() { |
42 gfx::Size surface_expansion_size(40, 60); | 42 gfx::Size surface_expansion_size(40, 60); |
43 scoped_ptr<PixelTestOutputSurface> output_surface; | 43 scoped_ptr<PixelTestOutputSurface> output_surface; |
44 | 44 |
45 switch (test_type_) { | 45 switch (test_type_) { |
46 case PIXEL_TEST_SOFTWARE: { | 46 case PIXEL_TEST_SOFTWARE: { |
47 scoped_ptr<PixelTestSoftwareOutputDevice> software_output_device( | 47 scoped_ptr<PixelTestSoftwareOutputDevice> software_output_device( |
48 new PixelTestSoftwareOutputDevice); | 48 new PixelTestSoftwareOutputDevice); |
49 software_output_device->set_surface_expansion_size( | 49 software_output_device->set_surface_expansion_size( |
50 surface_expansion_size); | 50 surface_expansion_size); |
51 output_surface = make_scoped_ptr( | 51 output_surface = make_scoped_ptr(new PixelTestOutputSurface( |
52 new PixelTestOutputSurface(std::move(software_output_device))); | 52 std::move(software_output_device), nullptr)); |
53 break; | 53 break; |
54 } | 54 } |
55 case PIXEL_TEST_GL: { | 55 case PIXEL_TEST_GL: { |
56 bool flipped_output_surface = false; | 56 bool flipped_output_surface = false; |
57 output_surface = make_scoped_ptr(new PixelTestOutputSurface( | 57 output_surface = make_scoped_ptr(new PixelTestOutputSurface( |
58 new TestInProcessContextProvider, new TestInProcessContextProvider, | 58 new TestInProcessContextProvider, new TestInProcessContextProvider, |
59 flipped_output_surface)); | 59 flipped_output_surface, nullptr)); |
60 break; | 60 break; |
61 } | 61 } |
62 } | 62 } |
63 | 63 |
64 output_surface->set_surface_expansion_size(surface_expansion_size); | 64 output_surface->set_surface_expansion_size(surface_expansion_size); |
65 return std::move(output_surface); | 65 return std::move(output_surface); |
66 } | 66 } |
67 | 67 |
68 void LayerTreePixelTest::WillCommitCompleteOnThread(LayerTreeHostImpl* impl) { | 68 void LayerTreePixelTest::WillCommitCompleteOnThread(LayerTreeHostImpl* impl) { |
69 if (impl->sync_tree()->source_frame_number() != 0) | 69 if (impl->sync_tree()->source_frame_number() != 0) |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 return bitmap; | 268 return bitmap; |
269 } | 269 } |
270 | 270 |
271 void LayerTreePixelTest::Finish() { | 271 void LayerTreePixelTest::Finish() { |
272 scoped_ptr<gpu::GLInProcessContext> context = CreateTestInProcessContext(); | 272 scoped_ptr<gpu::GLInProcessContext> context = CreateTestInProcessContext(); |
273 GLES2Interface* gl = context->GetImplementation(); | 273 GLES2Interface* gl = context->GetImplementation(); |
274 gl->Finish(); | 274 gl->Finish(); |
275 } | 275 } |
276 | 276 |
277 } // namespace cc | 277 } // namespace cc |
OLD | NEW |