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" |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 LayerTreePixelTest::LayerTreePixelTest() | 29 LayerTreePixelTest::LayerTreePixelTest() |
30 : pixel_comparator_(new ExactPixelComparator(true)), | 30 : pixel_comparator_(new ExactPixelComparator(true)), |
31 test_type_(PIXEL_TEST_GL), | 31 test_type_(PIXEL_TEST_GL), |
32 pending_texture_mailbox_callbacks_(0), | 32 pending_texture_mailbox_callbacks_(0), |
33 impl_side_painting_(true) { | 33 impl_side_painting_(true) { |
34 } | 34 } |
35 | 35 |
36 LayerTreePixelTest::~LayerTreePixelTest() {} | 36 LayerTreePixelTest::~LayerTreePixelTest() {} |
37 | 37 |
38 scoped_ptr<OutputSurface> LayerTreePixelTest::CreateOutputSurface( | 38 scoped_ptr<OutputSurface> LayerTreePixelTest::CreateOutputSurface() { |
39 bool fallback) { | |
40 gfx::Size surface_expansion_size(40, 60); | 39 gfx::Size surface_expansion_size(40, 60); |
41 scoped_ptr<PixelTestOutputSurface> output_surface; | 40 scoped_ptr<PixelTestOutputSurface> output_surface; |
42 | 41 |
43 switch (test_type_) { | 42 switch (test_type_) { |
44 case PIXEL_TEST_SOFTWARE: { | 43 case PIXEL_TEST_SOFTWARE: { |
45 scoped_ptr<PixelTestSoftwareOutputDevice> software_output_device( | 44 scoped_ptr<PixelTestSoftwareOutputDevice> software_output_device( |
46 new PixelTestSoftwareOutputDevice); | 45 new PixelTestSoftwareOutputDevice); |
47 software_output_device->set_surface_expansion_size( | 46 software_output_device->set_surface_expansion_size( |
48 surface_expansion_size); | 47 surface_expansion_size); |
49 output_surface = make_scoped_ptr( | 48 output_surface = make_scoped_ptr( |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 | 371 |
373 *texture_mailbox = TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point); | 372 *texture_mailbox = TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point); |
374 *release_callback = SingleReleaseCallback::Create( | 373 *release_callback = SingleReleaseCallback::Create( |
375 base::Bind(&LayerTreePixelTest::ReleaseTextureMailbox, | 374 base::Bind(&LayerTreePixelTest::ReleaseTextureMailbox, |
376 base::Unretained(this), | 375 base::Unretained(this), |
377 base::Passed(&context), | 376 base::Passed(&context), |
378 texture_id)); | 377 texture_id)); |
379 } | 378 } |
380 | 379 |
381 } // namespace cc | 380 } // namespace cc |
OLD | NEW |