| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 683 layer_tree_host_->SetRootLayer( | 683 layer_tree_host_->SetRootLayer( |
| 684 static_cast<const cc_blink::WebLayerImpl*>(&layer)->layer()); | 684 static_cast<const cc_blink::WebLayerImpl*>(&layer)->layer()); |
| 685 } | 685 } |
| 686 | 686 |
| 687 void RenderWidgetCompositor::clearRootLayer() { | 687 void RenderWidgetCompositor::clearRootLayer() { |
| 688 layer_tree_host_->SetRootLayer(scoped_refptr<cc::Layer>()); | 688 layer_tree_host_->SetRootLayer(scoped_refptr<cc::Layer>()); |
| 689 } | 689 } |
| 690 | 690 |
| 691 void RenderWidgetCompositor::attachCompositorAnimationTimeline( | 691 void RenderWidgetCompositor::attachCompositorAnimationTimeline( |
| 692 cc::AnimationTimeline* compositor_timeline) { | 692 cc::AnimationTimeline* compositor_timeline) { |
| 693 DCHECK(layer_tree_host_->animation_host()); | 693 cc::AnimationHost* animation_host = layer_tree_host_->GetLayerTree() |
| 694 layer_tree_host_->animation_host()->AddAnimationTimeline(compositor_timeline); | 694 ->animation_host(); |
| 695 DCHECK(animation_host); |
| 696 animation_host->AddAnimationTimeline(compositor_timeline); |
| 695 } | 697 } |
| 696 | 698 |
| 697 void RenderWidgetCompositor::detachCompositorAnimationTimeline( | 699 void RenderWidgetCompositor::detachCompositorAnimationTimeline( |
| 698 cc::AnimationTimeline* compositor_timeline) { | 700 cc::AnimationTimeline* compositor_timeline) { |
| 699 DCHECK(layer_tree_host_->animation_host()); | 701 cc::AnimationHost* animation_host = layer_tree_host_->GetLayerTree() |
| 700 layer_tree_host_->animation_host()->RemoveAnimationTimeline( | 702 ->animation_host(); |
| 701 compositor_timeline); | 703 DCHECK(animation_host); |
| 704 animation_host->RemoveAnimationTimeline(compositor_timeline); |
| 702 } | 705 } |
| 703 | 706 |
| 704 void RenderWidgetCompositor::setViewportSize( | 707 void RenderWidgetCompositor::setViewportSize( |
| 705 const WebSize& device_viewport_size) { | 708 const WebSize& device_viewport_size) { |
| 706 layer_tree_host_->SetViewportSize(device_viewport_size); | 709 layer_tree_host_->SetViewportSize(device_viewport_size); |
| 707 } | 710 } |
| 708 | 711 |
| 709 WebFloatPoint RenderWidgetCompositor::adjustEventPointForPinchZoom( | 712 WebFloatPoint RenderWidgetCompositor::adjustEventPointForPinchZoom( |
| 710 const WebFloatPoint& point) const { | 713 const WebFloatPoint& point) const { |
| 711 return point; | 714 return point; |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1145 | 1148 |
| 1146 remote_proto_channel_receiver_->OnProtoReceived(std::move(deserialized)); | 1149 remote_proto_channel_receiver_->OnProtoReceived(std::move(deserialized)); |
| 1147 } | 1150 } |
| 1148 | 1151 |
| 1149 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor( | 1152 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor( |
| 1150 float device_scale) { | 1153 float device_scale) { |
| 1151 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale); | 1154 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale); |
| 1152 } | 1155 } |
| 1153 | 1156 |
| 1154 } // namespace content | 1157 } // namespace content |
| OLD | NEW |