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

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

Issue 2080223010: cc: Clean up root_layer code in LTI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase++ Created 4 years, 5 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 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after
1187 CopyOutputRequest::CreateBitmapRequest(base::Bind( 1187 CopyOutputRequest::CreateBitmapRequest(base::Bind(
1188 &LayerTreeHostCopyRequestTestMultipleDrawsHiddenCopyRequest:: 1188 &LayerTreeHostCopyRequestTestMultipleDrawsHiddenCopyRequest::
1189 CopyOutputCallback, 1189 CopyOutputCallback,
1190 base::Unretained(this)))); 1190 base::Unretained(this))));
1191 } 1191 }
1192 } 1192 }
1193 1193
1194 DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl, 1194 DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
1195 LayerTreeHostImpl::FrameData* frame_data, 1195 LayerTreeHostImpl::FrameData* frame_data,
1196 DrawResult draw_result) override { 1196 DrawResult draw_result) override {
1197 LayerImpl* root = host_impl->active_tree()->root_layer(); 1197 LayerImpl* root = host_impl->active_tree()->root_layer_for_testing();
1198 LayerImpl* child = host_impl->active_tree()->LayerById(child_->id()); 1198 LayerImpl* child = host_impl->active_tree()->LayerById(child_->id());
1199 1199
1200 bool saw_root = false; 1200 bool saw_root = false;
1201 bool saw_child = false; 1201 bool saw_child = false;
1202 for (LayerIterator it = 1202 for (LayerIterator it =
1203 LayerIterator::Begin(frame_data->render_surface_layer_list); 1203 LayerIterator::Begin(frame_data->render_surface_layer_list);
1204 it != LayerIterator::End(frame_data->render_surface_layer_list); 1204 it != LayerIterator::End(frame_data->render_surface_layer_list);
1205 ++it) { 1205 ++it) {
1206 if (it.represents_itself()) { 1206 if (it.represents_itself()) {
1207 if (*it == root) 1207 if (*it == root)
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
1267 int num_draws_; 1267 int num_draws_;
1268 bool copy_happened_; 1268 bool copy_happened_;
1269 bool draw_happened_; 1269 bool draw_happened_;
1270 }; 1270 };
1271 1271
1272 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( 1272 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(
1273 LayerTreeHostCopyRequestTestMultipleDrawsHiddenCopyRequest); 1273 LayerTreeHostCopyRequestTestMultipleDrawsHiddenCopyRequest);
1274 1274
1275 } // namespace 1275 } // namespace
1276 } // namespace cc 1276 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest_context.cc ('k') | cc/trees/layer_tree_host_unittest_damage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698