Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(643)

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 95763002: cc: Support animating scroll offset (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698