| 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 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 656 bool RenderWidgetCompositor::commitRequested() const { | 656 bool RenderWidgetCompositor::commitRequested() const { |
| 657 return layer_tree_host_->CommitRequested(); | 657 return layer_tree_host_->CommitRequested(); |
| 658 } | 658 } |
| 659 | 659 |
| 660 void RenderWidgetCompositor::didStopFlinging() { | 660 void RenderWidgetCompositor::didStopFlinging() { |
| 661 layer_tree_host_->DidStopFlinging(); | 661 layer_tree_host_->DidStopFlinging(); |
| 662 } | 662 } |
| 663 | 663 |
| 664 void RenderWidgetCompositor::registerForAnimations(blink::WebLayer* layer) { | 664 void RenderWidgetCompositor::registerForAnimations(blink::WebLayer* layer) { |
| 665 cc::Layer* cc_layer = static_cast<cc_blink::WebLayerImpl*>(layer)->layer(); | 665 cc::Layer* cc_layer = static_cast<cc_blink::WebLayerImpl*>(layer)->layer(); |
| 666 cc_layer->layer_animation_controller()->SetAnimationRegistrar( | 666 cc_layer->RegisterForAnimations(layer_tree_host_->animation_registrar()); |
| 667 layer_tree_host_->animation_registrar()); | |
| 668 } | 667 } |
| 669 | 668 |
| 670 void RenderWidgetCompositor::registerViewportLayers( | 669 void RenderWidgetCompositor::registerViewportLayers( |
| 671 const blink::WebLayer* overscrollElasticityLayer, | 670 const blink::WebLayer* overscrollElasticityLayer, |
| 672 const blink::WebLayer* pageScaleLayer, | 671 const blink::WebLayer* pageScaleLayer, |
| 673 const blink::WebLayer* innerViewportScrollLayer, | 672 const blink::WebLayer* innerViewportScrollLayer, |
| 674 const blink::WebLayer* outerViewportScrollLayer) { | 673 const blink::WebLayer* outerViewportScrollLayer) { |
| 675 layer_tree_host_->RegisterViewportLayers( | 674 layer_tree_host_->RegisterViewportLayers( |
| 676 // The scroll elasticity layer will only exist when using pinch virtual | 675 // The scroll elasticity layer will only exist when using pinch virtual |
| 677 // viewports. | 676 // viewports. |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 968 return; | 967 return; |
| 969 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 968 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
| 970 } | 969 } |
| 971 | 970 |
| 972 void RenderWidgetCompositor::SetSurfaceIdNamespace( | 971 void RenderWidgetCompositor::SetSurfaceIdNamespace( |
| 973 uint32_t surface_id_namespace) { | 972 uint32_t surface_id_namespace) { |
| 974 layer_tree_host_->set_surface_id_namespace(surface_id_namespace); | 973 layer_tree_host_->set_surface_id_namespace(surface_id_namespace); |
| 975 } | 974 } |
| 976 | 975 |
| 977 } // namespace content | 976 } // namespace content |
| OLD | NEW |