Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(388)

Side by Side Diff: cc/test/layer_tree_pixel_test.cc

Issue 667793004: Support single-threaded impl-side painting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Now with less plumbing Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 } 190 }
191 191
192 void LayerTreePixelTest::RunPixelTest( 192 void LayerTreePixelTest::RunPixelTest(
193 PixelTestType test_type, 193 PixelTestType test_type,
194 scoped_refptr<Layer> content_root, 194 scoped_refptr<Layer> content_root,
195 base::FilePath file_name) { 195 base::FilePath file_name) {
196 test_type_ = test_type; 196 test_type_ = test_type;
197 content_root_ = content_root; 197 content_root_ = content_root;
198 readback_target_ = NULL; 198 readback_target_ = NULL;
199 ref_file_ = file_name; 199 ref_file_ = file_name;
200 RunTest(true, false, impl_side_painting_); 200 bool threaded = true;
201 RunTest(threaded, false, impl_side_painting_);
202 }
203
204 void LayerTreePixelTest::RunSingleThreadedPixelTest(
205 PixelTestType test_type,
206 scoped_refptr<Layer> content_root,
207 base::FilePath file_name) {
208 test_type_ = test_type;
209 content_root_ = content_root;
210 readback_target_ = NULL;
211 ref_file_ = file_name;
212 bool threaded = false;
213 RunTest(threaded, false, impl_side_painting_);
201 } 214 }
202 215
203 void LayerTreePixelTest::RunPixelTestWithReadbackTarget( 216 void LayerTreePixelTest::RunPixelTestWithReadbackTarget(
204 PixelTestType test_type, 217 PixelTestType test_type,
205 scoped_refptr<Layer> content_root, 218 scoped_refptr<Layer> content_root,
206 Layer* target, 219 Layer* target,
207 base::FilePath file_name) { 220 base::FilePath file_name) {
208 test_type_ = test_type; 221 test_type_ = test_type;
209 content_root_ = content_root; 222 content_root_ = content_root;
210 readback_target_ = target; 223 readback_target_ = target;
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 371
359 *texture_mailbox = TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point); 372 *texture_mailbox = TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point);
360 *release_callback = SingleReleaseCallback::Create( 373 *release_callback = SingleReleaseCallback::Create(
361 base::Bind(&LayerTreePixelTest::ReleaseTextureMailbox, 374 base::Bind(&LayerTreePixelTest::ReleaseTextureMailbox,
362 base::Unretained(this), 375 base::Unretained(this),
363 base::Passed(&context), 376 base::Passed(&context),
364 texture_id)); 377 texture_id));
365 } 378 }
366 379
367 } // namespace cc 380 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698