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 <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
714 if (!time_source_client_adapter_) { | 714 if (!time_source_client_adapter_) { |
715 time_source_client_adapter_ = LayerTreeHostImplTimeSourceAdapter::Create( | 715 time_source_client_adapter_ = LayerTreeHostImplTimeSourceAdapter::Create( |
716 this, | 716 this, |
717 DelayBasedTimeSource::Create(LowFrequencyAnimationInterval(), | 717 DelayBasedTimeSource::Create(LowFrequencyAnimationInterval(), |
718 proxy_->CurrentThread())); | 718 proxy_->CurrentThread())); |
719 } | 719 } |
720 | 720 |
721 time_source_client_adapter_->SetActive(enabled); | 721 time_source_client_adapter_->SetActive(enabled); |
722 } | 722 } |
723 | 723 |
724 void LayerTreeHostImpl::SetViewportDamage(const gfx::Rect& damage_rect) { | 724 void LayerTreeHostImpl::SetViewportDamage(gfx::Rect damage_rect) { |
725 viewport_damage_rect_.Union(damage_rect); | 725 viewport_damage_rect_.Union(damage_rect); |
726 } | 726 } |
727 | 727 |
728 static inline RenderPass* FindRenderPassById( | 728 static inline RenderPass* FindRenderPassById( |
729 RenderPass::Id render_pass_id, | 729 RenderPass::Id render_pass_id, |
730 const LayerTreeHostImpl::FrameData& frame) { | 730 const LayerTreeHostImpl::FrameData& frame) { |
731 RenderPassIdHashMap::const_iterator it = | 731 RenderPassIdHashMap::const_iterator it = |
732 frame.render_passes_by_id.find(render_pass_id); | 732 frame.render_passes_by_id.find(render_pass_id); |
733 return it != frame.render_passes_by_id.end() ? it->second : NULL; | 733 return it != frame.render_passes_by_id.end() ? it->second : NULL; |
734 } | 734 } |
(...skipping 1386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2121 } | 2121 } |
2122 | 2122 |
2123 void LayerTreeHostImpl::SetDebugState(const LayerTreeDebugState& debug_state) { | 2123 void LayerTreeHostImpl::SetDebugState(const LayerTreeDebugState& debug_state) { |
2124 if (debug_state_.continuous_painting != debug_state.continuous_painting) | 2124 if (debug_state_.continuous_painting != debug_state.continuous_painting) |
2125 paint_time_counter_->ClearHistory(); | 2125 paint_time_counter_->ClearHistory(); |
2126 | 2126 |
2127 debug_state_ = debug_state; | 2127 debug_state_ = debug_state; |
2128 } | 2128 } |
2129 | 2129 |
2130 } // namespace cc | 2130 } // namespace cc |
OLD | NEW |