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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 } | 191 } |
192 | 192 |
193 void LayerTreePixelTest::RunPixelTest( | 193 void LayerTreePixelTest::RunPixelTest( |
194 PixelTestType test_type, | 194 PixelTestType test_type, |
195 scoped_refptr<Layer> content_root, | 195 scoped_refptr<Layer> content_root, |
196 base::FilePath file_name) { | 196 base::FilePath file_name) { |
197 test_type_ = test_type; | 197 test_type_ = test_type; |
198 content_root_ = content_root; | 198 content_root_ = content_root; |
199 readback_target_ = NULL; | 199 readback_target_ = NULL; |
200 ref_file_ = file_name; | 200 ref_file_ = file_name; |
201 RunTest(true, false, impl_side_painting_); | 201 bool threaded = true; |
| 202 RunTest(threaded, false, impl_side_painting_); |
| 203 } |
| 204 |
| 205 void LayerTreePixelTest::RunSingleThreadedPixelTest( |
| 206 PixelTestType test_type, |
| 207 scoped_refptr<Layer> content_root, |
| 208 base::FilePath file_name) { |
| 209 test_type_ = test_type; |
| 210 content_root_ = content_root; |
| 211 readback_target_ = NULL; |
| 212 ref_file_ = file_name; |
| 213 bool threaded = false; |
| 214 RunTest(threaded, false, impl_side_painting_); |
202 } | 215 } |
203 | 216 |
204 void LayerTreePixelTest::RunPixelTestWithReadbackTarget( | 217 void LayerTreePixelTest::RunPixelTestWithReadbackTarget( |
205 PixelTestType test_type, | 218 PixelTestType test_type, |
206 scoped_refptr<Layer> content_root, | 219 scoped_refptr<Layer> content_root, |
207 Layer* target, | 220 Layer* target, |
208 base::FilePath file_name) { | 221 base::FilePath file_name) { |
209 test_type_ = test_type; | 222 test_type_ = test_type; |
210 content_root_ = content_root; | 223 content_root_ = content_root; |
211 readback_target_ = target; | 224 readback_target_ = target; |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 | 372 |
360 *texture_mailbox = TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point); | 373 *texture_mailbox = TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point); |
361 *release_callback = SingleReleaseCallback::Create( | 374 *release_callback = SingleReleaseCallback::Create( |
362 base::Bind(&LayerTreePixelTest::ReleaseTextureMailbox, | 375 base::Bind(&LayerTreePixelTest::ReleaseTextureMailbox, |
363 base::Unretained(this), | 376 base::Unretained(this), |
364 base::Passed(&context), | 377 base::Passed(&context), |
365 texture_id)); | 378 texture_id)); |
366 } | 379 } |
367 | 380 |
368 } // namespace cc | 381 } // namespace cc |
OLD | NEW |