| 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 "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "cc/base/switches.h" | 9 #include "cc/base/switches.h" |
| 10 #include "cc/layers/solid_color_layer.h" | 10 #include "cc/layers/solid_color_layer.h" |
| 11 #include "cc/layers/texture_layer.h" | 11 #include "cc/layers/texture_layer.h" |
| 12 #include "cc/output/copy_output_request.h" | 12 #include "cc/output/copy_output_request.h" |
| 13 #include "cc/output/copy_output_result.h" | 13 #include "cc/output/copy_output_result.h" |
| 14 #include "cc/resources/texture_mailbox.h" | 14 #include "cc/resources/texture_mailbox.h" |
| 15 #include "cc/test/paths.h" | 15 #include "cc/test/paths.h" |
| 16 #include "cc/test/pixel_comparator.h" | 16 #include "cc/test/pixel_comparator.h" |
| 17 #include "cc/test/pixel_test_output_surface.h" | 17 #include "cc/test/pixel_test_output_surface.h" |
| 18 #include "cc/test/pixel_test_software_output_device.h" | 18 #include "cc/test/pixel_test_software_output_device.h" |
| 19 #include "cc/test/pixel_test_utils.h" | 19 #include "cc/test/pixel_test_utils.h" |
| 20 #include "cc/test/test_in_process_context_provider.h" | 20 #include "cc/test/test_in_process_context_provider.h" |
| 21 #include "cc/trees/layer_tree_impl.h" | 21 #include "cc/trees/layer_tree_impl.h" |
| 22 #include "gpu/command_buffer/client/gl_in_process_context.h" | 22 #include "gpu/command_buffer/client/gl_in_process_context.h" |
| 23 #include "gpu/command_buffer/client/gles2_implementation.h" | 23 #include "gpu/command_buffer/client/gles2_implementation.h" |
| 24 | 24 |
| 25 using gpu::gles2::GLES2Interface; | 25 using gpu::gles2::GLES2Interface; |
| 26 | 26 |
| 27 namespace cc { | 27 namespace cc { |
| 28 | 28 |
| 29 LayerTreePixelTest::LayerTreePixelTest() | 29 LayerTreePixelTest::LayerTreePixelTest() |
| 30 : pixel_comparator_(new ExactPixelComparator(true)), | 30 : enable_pixel_output_(new gfx::DisableNullDrawGLBindings), |
| 31 pixel_comparator_(new ExactPixelComparator(true)), |
| 31 test_type_(GL_WITH_DEFAULT), | 32 test_type_(GL_WITH_DEFAULT), |
| 32 pending_texture_mailbox_callbacks_(0), | 33 pending_texture_mailbox_callbacks_(0), |
| 33 impl_side_painting_(true) {} | 34 impl_side_painting_(true) {} |
| 34 | 35 |
| 35 LayerTreePixelTest::~LayerTreePixelTest() {} | 36 LayerTreePixelTest::~LayerTreePixelTest() {} |
| 36 | 37 |
| 37 scoped_ptr<OutputSurface> LayerTreePixelTest::CreateOutputSurface( | 38 scoped_ptr<OutputSurface> LayerTreePixelTest::CreateOutputSurface( |
| 38 bool fallback) { | 39 bool fallback) { |
| 39 gfx::Size surface_expansion_size(40, 60); | 40 gfx::Size surface_expansion_size(40, 60); |
| 40 scoped_ptr<PixelTestOutputSurface> output_surface; | 41 scoped_ptr<PixelTestOutputSurface> output_surface; |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 | 367 |
| 367 *texture_mailbox = TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point); | 368 *texture_mailbox = TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point); |
| 368 *release_callback = SingleReleaseCallback::Create( | 369 *release_callback = SingleReleaseCallback::Create( |
| 369 base::Bind(&LayerTreePixelTest::ReleaseTextureMailbox, | 370 base::Bind(&LayerTreePixelTest::ReleaseTextureMailbox, |
| 370 base::Unretained(this), | 371 base::Unretained(this), |
| 371 base::Passed(&context), | 372 base::Passed(&context), |
| 372 texture_id)); | 373 texture_id)); |
| 373 } | 374 } |
| 374 | 375 |
| 375 } // namespace cc | 376 } // namespace cc |
| OLD | NEW |