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

Side by Side Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 1010663002: CC Animations: Redirect all compositor animation requests to AnimationHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@introduce
Patch Set: Add ported unittests. Created 5 years, 8 months 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
« cc/layers/layer.cc ('K') | « cc/trees/property_tree_builder.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "content/renderer/gpu/render_widget_compositor.h" 5 #include "content/renderer/gpu/render_widget_compositor.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 bool RenderWidgetCompositor::commitRequested() const { 661 bool RenderWidgetCompositor::commitRequested() const {
662 return layer_tree_host_->CommitRequested(); 662 return layer_tree_host_->CommitRequested();
663 } 663 }
664 664
665 void RenderWidgetCompositor::didStopFlinging() { 665 void RenderWidgetCompositor::didStopFlinging() {
666 layer_tree_host_->DidStopFlinging(); 666 layer_tree_host_->DidStopFlinging();
667 } 667 }
668 668
669 void RenderWidgetCompositor::registerForAnimations(blink::WebLayer* layer) { 669 void RenderWidgetCompositor::registerForAnimations(blink::WebLayer* layer) {
670 cc::Layer* cc_layer = static_cast<cc_blink::WebLayerImpl*>(layer)->layer(); 670 cc::Layer* cc_layer = static_cast<cc_blink::WebLayerImpl*>(layer)->layer();
671 cc_layer->layer_animation_controller()->SetAnimationRegistrar( 671 cc_layer->RegisterForAnimations(layer_tree_host_->animation_registrar(),
672 layer_tree_host_->animation_registrar()); 672 layer_tree_host_->settings());
673 } 673 }
674 674
675 void RenderWidgetCompositor::registerViewportLayers( 675 void RenderWidgetCompositor::registerViewportLayers(
676 const blink::WebLayer* overscrollElasticityLayer, 676 const blink::WebLayer* overscrollElasticityLayer,
677 const blink::WebLayer* pageScaleLayer, 677 const blink::WebLayer* pageScaleLayer,
678 const blink::WebLayer* innerViewportScrollLayer, 678 const blink::WebLayer* innerViewportScrollLayer,
679 const blink::WebLayer* outerViewportScrollLayer) { 679 const blink::WebLayer* outerViewportScrollLayer) {
680 layer_tree_host_->RegisterViewportLayers( 680 layer_tree_host_->RegisterViewportLayers(
681 // The scroll elasticity layer will only exist when using pinch virtual 681 // The scroll elasticity layer will only exist when using pinch virtual
682 // viewports. 682 // viewports.
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 cc::ContextProvider* provider = 941 cc::ContextProvider* provider =
942 compositor_deps_->GetSharedMainThreadContextProvider(); 942 compositor_deps_->GetSharedMainThreadContextProvider();
943 // provider can be NULL after the GPU process crashed enough times and we 943 // provider can be NULL after the GPU process crashed enough times and we
944 // don't want to restart it any more (falling back to software). 944 // don't want to restart it any more (falling back to software).
945 if (!provider) 945 if (!provider)
946 return; 946 return;
947 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); 947 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM();
948 } 948 }
949 949
950 } // namespace content 950 } // namespace content
OLDNEW
« cc/layers/layer.cc ('K') | « cc/trees/property_tree_builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698