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 1281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1292 layer->PushScrollOffsetFromMainThread(scroll_offset_); | 1292 layer->PushScrollOffsetFromMainThread(scroll_offset_); |
1293 layer->SetScrollCompensationAdjustment(ScrollCompensationAdjustment()); | 1293 layer->SetScrollCompensationAdjustment(ScrollCompensationAdjustment()); |
1294 | 1294 |
1295 // Wrap the copy_requests_ in a PostTask to the main thread. | 1295 // Wrap the copy_requests_ in a PostTask to the main thread. |
1296 bool had_copy_requests = !copy_requests_.empty(); | 1296 bool had_copy_requests = !copy_requests_.empty(); |
1297 ScopedPtrVector<CopyOutputRequest> main_thread_copy_requests; | 1297 ScopedPtrVector<CopyOutputRequest> main_thread_copy_requests; |
1298 for (ScopedPtrVector<CopyOutputRequest>::iterator it = copy_requests_.begin(); | 1298 for (ScopedPtrVector<CopyOutputRequest>::iterator it = copy_requests_.begin(); |
1299 it != copy_requests_.end(); | 1299 it != copy_requests_.end(); |
1300 ++it) { | 1300 ++it) { |
1301 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner = | 1301 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner = |
1302 layer_tree_host()->proxy()->MainThreadTaskRunner(); | 1302 layer_tree_host()->task_runner_provider()->MainThreadTaskRunner(); |
1303 scoped_ptr<CopyOutputRequest> original_request = copy_requests_.take(it); | 1303 scoped_ptr<CopyOutputRequest> original_request = copy_requests_.take(it); |
1304 const CopyOutputRequest& original_request_ref = *original_request; | 1304 const CopyOutputRequest& original_request_ref = *original_request; |
1305 scoped_ptr<CopyOutputRequest> main_thread_request = | 1305 scoped_ptr<CopyOutputRequest> main_thread_request = |
1306 CopyOutputRequest::CreateRelayRequest( | 1306 CopyOutputRequest::CreateRelayRequest( |
1307 original_request_ref, | 1307 original_request_ref, |
1308 base::Bind(&PostCopyCallbackToMainThread, | 1308 base::Bind(&PostCopyCallbackToMainThread, |
1309 main_thread_task_runner, | 1309 main_thread_task_runner, |
1310 base::Passed(&original_request))); | 1310 base::Passed(&original_request))); |
1311 main_thread_copy_requests.push_back(main_thread_request.Pass()); | 1311 main_thread_copy_requests.push_back(main_thread_request.Pass()); |
1312 } | 1312 } |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1707 this, layer_tree_host_->property_trees()->transform_tree); | 1707 this, layer_tree_host_->property_trees()->transform_tree); |
1708 } | 1708 } |
1709 | 1709 |
1710 gfx::Transform Layer::screen_space_transform() const { | 1710 gfx::Transform Layer::screen_space_transform() const { |
1711 DCHECK_NE(transform_tree_index_, -1); | 1711 DCHECK_NE(transform_tree_index_, -1); |
1712 return ScreenSpaceTransformFromPropertyTrees( | 1712 return ScreenSpaceTransformFromPropertyTrees( |
1713 this, layer_tree_host_->property_trees()->transform_tree); | 1713 this, layer_tree_host_->property_trees()->transform_tree); |
1714 } | 1714 } |
1715 | 1715 |
1716 } // namespace cc | 1716 } // namespace cc |
OLD | NEW |