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

Side by Side Diff: cc/layers/layer.cc

Issue 1419283002: cc: Split Proxy and TaskRunnerProvider for the LayerTreeHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 5 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 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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/layers/layer.h" 5 #include "cc/layers/layer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/atomic_sequence_num.h" 9 #include "base/atomic_sequence_num.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after
1294 layer->PushScrollOffsetFromMainThread(scroll_offset_); 1294 layer->PushScrollOffsetFromMainThread(scroll_offset_);
1295 layer->SetScrollCompensationAdjustment(ScrollCompensationAdjustment()); 1295 layer->SetScrollCompensationAdjustment(ScrollCompensationAdjustment());
1296 1296
1297 // Wrap the copy_requests_ in a PostTask to the main thread. 1297 // Wrap the copy_requests_ in a PostTask to the main thread.
1298 bool had_copy_requests = !copy_requests_.empty(); 1298 bool had_copy_requests = !copy_requests_.empty();
1299 ScopedPtrVector<CopyOutputRequest> main_thread_copy_requests; 1299 ScopedPtrVector<CopyOutputRequest> main_thread_copy_requests;
1300 for (ScopedPtrVector<CopyOutputRequest>::iterator it = copy_requests_.begin(); 1300 for (ScopedPtrVector<CopyOutputRequest>::iterator it = copy_requests_.begin();
1301 it != copy_requests_.end(); 1301 it != copy_requests_.end();
1302 ++it) { 1302 ++it) {
1303 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner = 1303 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner =
1304 layer_tree_host()->proxy()->MainThreadTaskRunner(); 1304 layer_tree_host()->task_runner_provider()->MainThreadTaskRunner();
1305 scoped_ptr<CopyOutputRequest> original_request = copy_requests_.take(it); 1305 scoped_ptr<CopyOutputRequest> original_request = copy_requests_.take(it);
1306 const CopyOutputRequest& original_request_ref = *original_request; 1306 const CopyOutputRequest& original_request_ref = *original_request;
1307 scoped_ptr<CopyOutputRequest> main_thread_request = 1307 scoped_ptr<CopyOutputRequest> main_thread_request =
1308 CopyOutputRequest::CreateRelayRequest( 1308 CopyOutputRequest::CreateRelayRequest(
1309 original_request_ref, 1309 original_request_ref,
1310 base::Bind(&PostCopyCallbackToMainThread, 1310 base::Bind(&PostCopyCallbackToMainThread,
1311 main_thread_task_runner, 1311 main_thread_task_runner,
1312 base::Passed(&original_request))); 1312 base::Passed(&original_request)));
1313 main_thread_copy_requests.push_back(main_thread_request.Pass()); 1313 main_thread_copy_requests.push_back(main_thread_request.Pass());
1314 } 1314 }
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
1776 this, layer_tree_host_->property_trees()->transform_tree); 1776 this, layer_tree_host_->property_trees()->transform_tree);
1777 } 1777 }
1778 1778
1779 gfx::Transform Layer::screen_space_transform() const { 1779 gfx::Transform Layer::screen_space_transform() const {
1780 DCHECK_NE(transform_tree_index_, -1); 1780 DCHECK_NE(transform_tree_index_, -1);
1781 return ScreenSpaceTransformFromPropertyTrees( 1781 return ScreenSpaceTransformFromPropertyTrees(
1782 this, layer_tree_host_->property_trees()->transform_tree); 1782 this, layer_tree_host_->property_trees()->transform_tree);
1783 } 1783 }
1784 1784
1785 } // namespace cc 1785 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/delegated_renderer_layer_unittest.cc ('k') | cc/layers/layer_position_constraint_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698