OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |