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

Side by Side Diff: cc/trees/layer_tree_host_pixeltest_tiles.cc

Issue 2251143002: cc: Reland Move data to LayerTree from LayerTreeHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: better fix? Created 4 years, 4 months 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "cc/layers/content_layer_client.h" 7 #include "cc/layers/content_layer_client.h"
8 #include "cc/layers/picture_layer.h" 8 #include "cc/layers/picture_layer.h"
9 #include "cc/output/copy_output_request.h" 9 #include "cc/output/copy_output_request.h"
10 #include "cc/playback/display_item_list.h" 10 #include "cc/playback/display_item_list.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 } 61 }
62 } 62 }
63 63
64 void BeginTest() override { 64 void BeginTest() override {
65 // Don't set up a readback target at the start of the test. 65 // Don't set up a readback target at the start of the test.
66 PostSetNeedsCommitToMainThread(); 66 PostSetNeedsCommitToMainThread();
67 } 67 }
68 68
69 void DoReadback() { 69 void DoReadback() {
70 Layer* target = 70 Layer* target =
71 readback_target_ ? readback_target_ : layer_tree_host()->root_layer(); 71 readback_target_ ? readback_target_ : layer_tree()->root_layer();
72 target->RequestCopyOfOutput(CreateCopyOutputRequest()); 72 target->RequestCopyOfOutput(CreateCopyOutputRequest());
73 } 73 }
74 74
75 void RunRasterPixelTest(bool threaded, 75 void RunRasterPixelTest(bool threaded,
76 RasterMode mode, 76 RasterMode mode,
77 scoped_refptr<Layer> content_root, 77 scoped_refptr<Layer> content_root,
78 base::FilePath file_name) { 78 base::FilePath file_name) {
79 raster_mode_ = mode; 79 raster_mode_ = mode;
80 80
81 PixelTestType test_type = PIXEL_TEST_SOFTWARE; 81 PixelTestType test_type = PIXEL_TEST_SOFTWARE;
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 FullRaster_SingleThread_GpuRaster) { 234 FullRaster_SingleThread_GpuRaster) {
235 RunRasterPixelTest( 235 RunRasterPixelTest(
236 false, FULL_GPU, picture_layer_, 236 false, FULL_GPU, picture_layer_,
237 base::FilePath(FILE_PATH_LITERAL("blue_yellow_flipped.png"))); 237 base::FilePath(FILE_PATH_LITERAL("blue_yellow_flipped.png")));
238 } 238 }
239 239
240 } // namespace 240 } // namespace
241 } // namespace cc 241 } // namespace cc
242 242
243 #endif // !defined(OS_ANDROID) 243 #endif // !defined(OS_ANDROID)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698