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