| 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 #if defined(OS_ANDROID) | 10 #if defined(OS_ANDROID) |
| (...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 layer_tree_host_->SetNeedsAnimate(); | 506 layer_tree_host_->SetNeedsAnimate(); |
| 507 else | 507 else |
| 508 widget_->scheduleAnimation(); | 508 widget_->scheduleAnimation(); |
| 509 } | 509 } |
| 510 | 510 |
| 511 bool RenderWidgetCompositor::commitRequested() const { | 511 bool RenderWidgetCompositor::commitRequested() const { |
| 512 return layer_tree_host_->CommitRequested(); | 512 return layer_tree_host_->CommitRequested(); |
| 513 } | 513 } |
| 514 | 514 |
| 515 void RenderWidgetCompositor::didStopFlinging() { | 515 void RenderWidgetCompositor::didStopFlinging() { |
| 516 layer_tree_host_->DidStopFlinging(); | |
| 517 } | 516 } |
| 518 | 517 |
| 519 void RenderWidgetCompositor::registerForAnimations(WebKit::WebLayer* layer) { | 518 void RenderWidgetCompositor::registerForAnimations(WebKit::WebLayer* layer) { |
| 520 cc::Layer* cc_layer = static_cast<webkit::WebLayerImpl*>(layer)->layer(); | 519 cc::Layer* cc_layer = static_cast<webkit::WebLayerImpl*>(layer)->layer(); |
| 521 cc_layer->layer_animation_controller()->SetAnimationRegistrar( | 520 cc_layer->layer_animation_controller()->SetAnimationRegistrar( |
| 522 layer_tree_host_->animation_registrar()); | 521 layer_tree_host_->animation_registrar()); |
| 523 } | 522 } |
| 524 | 523 |
| 525 void RenderWidgetCompositor::registerViewportLayers( | 524 void RenderWidgetCompositor::registerViewportLayers( |
| 526 const WebKit::WebLayer* pageScaleLayer, | 525 const WebKit::WebLayer* pageScaleLayer, |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 if (!suppress_schedule_composite_) | 641 if (!suppress_schedule_composite_) |
| 643 widget_->scheduleComposite(); | 642 widget_->scheduleComposite(); |
| 644 } | 643 } |
| 645 | 644 |
| 646 scoped_refptr<cc::ContextProvider> | 645 scoped_refptr<cc::ContextProvider> |
| 647 RenderWidgetCompositor::OffscreenContextProvider() { | 646 RenderWidgetCompositor::OffscreenContextProvider() { |
| 648 return RenderThreadImpl::current()->OffscreenCompositorContextProvider(); | 647 return RenderThreadImpl::current()->OffscreenCompositorContextProvider(); |
| 649 } | 648 } |
| 650 | 649 |
| 651 } // namespace content | 650 } // namespace content |
| OLD | NEW |