OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/trees/layer_tree_host_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 2394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2405 } | 2405 } |
2406 | 2406 |
2407 const gfx::Rect LayerTreeHostImpl::ViewportRectForTilePriority() const { | 2407 const gfx::Rect LayerTreeHostImpl::ViewportRectForTilePriority() const { |
2408 if (viewport_rect_for_tile_priority_.IsEmpty()) | 2408 if (viewport_rect_for_tile_priority_.IsEmpty()) |
2409 return DeviceViewport(); | 2409 return DeviceViewport(); |
2410 | 2410 |
2411 return viewport_rect_for_tile_priority_; | 2411 return viewport_rect_for_tile_priority_; |
2412 } | 2412 } |
2413 | 2413 |
2414 gfx::Size LayerTreeHostImpl::DrawViewportSize() const { | 2414 gfx::Size LayerTreeHostImpl::DrawViewportSize() const { |
| 2415 // XXX DIE DIE DIE DIE |
2415 return DeviceViewport().size(); | 2416 return DeviceViewport().size(); |
2416 } | 2417 } |
2417 | 2418 |
2418 gfx::Rect LayerTreeHostImpl::DeviceViewport() const { | 2419 gfx::Rect LayerTreeHostImpl::DeviceViewport() const { |
2419 if (external_viewport_.IsEmpty()) | 2420 if (external_viewport_.IsEmpty()) |
2420 return gfx::Rect(device_viewport_size_); | 2421 return gfx::Rect(device_viewport_size_); |
2421 | 2422 |
2422 return external_viewport_; | 2423 return external_viewport_; |
2423 } | 2424 } |
2424 | 2425 |
(...skipping 1581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4006 return task_runner_provider_->HasImplThread(); | 4007 return task_runner_provider_->HasImplThread(); |
4007 } | 4008 } |
4008 | 4009 |
4009 bool LayerTreeHostImpl::CommitToActiveTree() const { | 4010 bool LayerTreeHostImpl::CommitToActiveTree() const { |
4010 // In single threaded mode we skip the pending tree and commit directly to the | 4011 // In single threaded mode we skip the pending tree and commit directly to the |
4011 // active tree. | 4012 // active tree. |
4012 return !task_runner_provider_->HasImplThread(); | 4013 return !task_runner_provider_->HasImplThread(); |
4013 } | 4014 } |
4014 | 4015 |
4015 } // namespace cc | 4016 } // namespace cc |
OLD | NEW |