OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |