| 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 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 bool RenderWidgetCompositor::commitRequested() const { | 640 bool RenderWidgetCompositor::commitRequested() const { |
| 641 return layer_tree_host_->CommitRequested(); | 641 return layer_tree_host_->CommitRequested(); |
| 642 } | 642 } |
| 643 | 643 |
| 644 void RenderWidgetCompositor::didStopFlinging() { | 644 void RenderWidgetCompositor::didStopFlinging() { |
| 645 layer_tree_host_->DidStopFlinging(); | 645 layer_tree_host_->DidStopFlinging(); |
| 646 } | 646 } |
| 647 | 647 |
| 648 void RenderWidgetCompositor::registerForAnimations(blink::WebLayer* layer) { | 648 void RenderWidgetCompositor::registerForAnimations(blink::WebLayer* layer) { |
| 649 cc::Layer* cc_layer = static_cast<cc_blink::WebLayerImpl*>(layer)->layer(); | 649 cc::Layer* cc_layer = static_cast<cc_blink::WebLayerImpl*>(layer)->layer(); |
| 650 cc_layer->layer_animation_controller()->SetAnimationRegistrar( | 650 cc_layer->RegisterForAnimations(layer_tree_host_->animation_registrar(), |
| 651 layer_tree_host_->animation_registrar()); | 651 layer_tree_host_->settings()); |
| 652 } | 652 } |
| 653 | 653 |
| 654 void RenderWidgetCompositor::registerViewportLayers( | 654 void RenderWidgetCompositor::registerViewportLayers( |
| 655 const blink::WebLayer* overscrollElasticityLayer, | 655 const blink::WebLayer* overscrollElasticityLayer, |
| 656 const blink::WebLayer* pageScaleLayer, | 656 const blink::WebLayer* pageScaleLayer, |
| 657 const blink::WebLayer* innerViewportScrollLayer, | 657 const blink::WebLayer* innerViewportScrollLayer, |
| 658 const blink::WebLayer* outerViewportScrollLayer) { | 658 const blink::WebLayer* outerViewportScrollLayer) { |
| 659 layer_tree_host_->RegisterViewportLayers( | 659 layer_tree_host_->RegisterViewportLayers( |
| 660 // The scroll elasticity layer will only exist when using pinch virtual | 660 // The scroll elasticity layer will only exist when using pinch virtual |
| 661 // viewports. | 661 // viewports. |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 920 cc::ContextProvider* provider = | 920 cc::ContextProvider* provider = |
| 921 compositor_deps_->GetSharedMainThreadContextProvider(); | 921 compositor_deps_->GetSharedMainThreadContextProvider(); |
| 922 // provider can be NULL after the GPU process crashed enough times and we | 922 // provider can be NULL after the GPU process crashed enough times and we |
| 923 // don't want to restart it any more (falling back to software). | 923 // don't want to restart it any more (falling back to software). |
| 924 if (!provider) | 924 if (!provider) |
| 925 return; | 925 return; |
| 926 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 926 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
| 927 } | 927 } |
| 928 | 928 |
| 929 } // namespace content | 929 } // namespace content |
| OLD | NEW |