| 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 #include <limits> | 8 #include <limits> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 929 this, | 929 this, |
| 930 DelayBasedTimeSource::Create( | 930 DelayBasedTimeSource::Create( |
| 931 LowFrequencyAnimationInterval(), | 931 LowFrequencyAnimationInterval(), |
| 932 proxy_->HasImplThread() ? proxy_->ImplThreadTaskRunner() | 932 proxy_->HasImplThread() ? proxy_->ImplThreadTaskRunner() |
| 933 : proxy_->MainThreadTaskRunner())); | 933 : proxy_->MainThreadTaskRunner())); |
| 934 } | 934 } |
| 935 | 935 |
| 936 time_source_client_adapter_->SetActive(enabled); | 936 time_source_client_adapter_->SetActive(enabled); |
| 937 } | 937 } |
| 938 | 938 |
| 939 void LayerTreeHostImpl::DidAnimateScrollOffset() { |
| 940 client_->SetNeedsCommitOnImplThread(); |
| 941 client_->RenewTreePriority(); |
| 942 } |
| 943 |
| 939 void LayerTreeHostImpl::SetViewportDamage(gfx::Rect damage_rect) { | 944 void LayerTreeHostImpl::SetViewportDamage(gfx::Rect damage_rect) { |
| 940 viewport_damage_rect_.Union(damage_rect); | 945 viewport_damage_rect_.Union(damage_rect); |
| 941 } | 946 } |
| 942 | 947 |
| 943 static inline RenderPass* FindRenderPassById( | 948 static inline RenderPass* FindRenderPassById( |
| 944 RenderPass::Id render_pass_id, | 949 RenderPass::Id render_pass_id, |
| 945 const LayerTreeHostImpl::FrameData& frame) { | 950 const LayerTreeHostImpl::FrameData& frame) { |
| 946 RenderPassIdHashMap::const_iterator it = | 951 RenderPassIdHashMap::const_iterator it = |
| 947 frame.render_passes_by_id.find(render_pass_id); | 952 frame.render_passes_by_id.find(render_pass_id); |
| 948 return it != frame.render_passes_by_id.end() ? it->second : NULL; | 953 return it != frame.render_passes_by_id.end() ? it->second : NULL; |
| (...skipping 1912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2861 if (evicted_ui_resources_.empty()) | 2866 if (evicted_ui_resources_.empty()) |
| 2862 client_->OnCanDrawStateChanged(CanDraw()); | 2867 client_->OnCanDrawStateChanged(CanDraw()); |
| 2863 } | 2868 } |
| 2864 | 2869 |
| 2865 void LayerTreeHostImpl::ScheduleMicroBenchmark( | 2870 void LayerTreeHostImpl::ScheduleMicroBenchmark( |
| 2866 scoped_ptr<MicroBenchmarkImpl> benchmark) { | 2871 scoped_ptr<MicroBenchmarkImpl> benchmark) { |
| 2867 micro_benchmark_controller_.ScheduleRun(benchmark.Pass()); | 2872 micro_benchmark_controller_.ScheduleRun(benchmark.Pass()); |
| 2868 } | 2873 } |
| 2869 | 2874 |
| 2870 } // namespace cc | 2875 } // namespace cc |
| OLD | NEW |