| 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/path_service.h" | 7 #include "base/path_service.h" |
| 8 #include "cc/layers/solid_color_layer.h" | 8 #include "cc/layers/solid_color_layer.h" |
| 9 #include "cc/layers/texture_layer.h" | 9 #include "cc/layers/texture_layer.h" |
| 10 #include "cc/output/copy_output_request.h" | 10 #include "cc/output/copy_output_request.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 namespace cc { | 23 namespace cc { |
| 24 | 24 |
| 25 LayerTreePixelTest::LayerTreePixelTest() | 25 LayerTreePixelTest::LayerTreePixelTest() |
| 26 : pixel_comparator_(new ExactPixelComparator(true)), | 26 : pixel_comparator_(new ExactPixelComparator(true)), |
| 27 test_type_(GL_WITH_DEFAULT), | 27 test_type_(GL_WITH_DEFAULT), |
| 28 pending_texture_mailbox_callbacks_(0) {} | 28 pending_texture_mailbox_callbacks_(0) {} |
| 29 | 29 |
| 30 LayerTreePixelTest::~LayerTreePixelTest() {} | 30 LayerTreePixelTest::~LayerTreePixelTest() {} |
| 31 | 31 |
| 32 scoped_ptr<OutputSurface> LayerTreePixelTest::CreateOutputSurface() { | 32 scoped_ptr<OutputSurface> LayerTreePixelTest::CreateOutputSurface( |
| 33 bool fallback) { |
| 33 gfx::Vector2d viewport_offset(20, 10); | 34 gfx::Vector2d viewport_offset(20, 10); |
| 34 gfx::Size surface_expansion_size(40, 60); | 35 gfx::Size surface_expansion_size(40, 60); |
| 35 scoped_ptr<PixelTestOutputSurface> output_surface; | 36 scoped_ptr<PixelTestOutputSurface> output_surface; |
| 36 | 37 |
| 37 switch (test_type_) { | 38 switch (test_type_) { |
| 38 case SOFTWARE_WITH_DEFAULT: | 39 case SOFTWARE_WITH_DEFAULT: |
| 39 case SOFTWARE_WITH_BITMAP: { | 40 case SOFTWARE_WITH_BITMAP: { |
| 40 scoped_ptr<PixelTestSoftwareOutputDevice> software_output_device( | 41 scoped_ptr<PixelTestSoftwareOutputDevice> software_output_device( |
| 41 new PixelTestSoftwareOutputDevice); | 42 new PixelTestSoftwareOutputDevice); |
| 42 software_output_device->set_surface_expansion_size( | 43 software_output_device->set_surface_expansion_size( |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 return TextureMailbox( | 369 return TextureMailbox( |
| 369 mailbox, | 370 mailbox, |
| 370 base::Bind(&LayerTreePixelTest::ReleaseTextureMailbox, | 371 base::Bind(&LayerTreePixelTest::ReleaseTextureMailbox, |
| 371 base::Unretained(this), | 372 base::Unretained(this), |
| 372 base::Passed(&context3d), | 373 base::Passed(&context3d), |
| 373 texture_id), | 374 texture_id), |
| 374 sync_point); | 375 sync_point); |
| 375 } | 376 } |
| 376 | 377 |
| 377 } // namespace cc | 378 } // namespace cc |
| OLD | NEW |