Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 2183403002: cc: Move data to LayerTree from LayerTreeHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@layer_tree_change
Patch Set: .. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 771
772 void RenderWidgetCompositor::didStopFlinging() { 772 void RenderWidgetCompositor::didStopFlinging() {
773 layer_tree_host_->DidStopFlinging(); 773 layer_tree_host_->DidStopFlinging();
774 } 774 }
775 775
776 void RenderWidgetCompositor::registerViewportLayers( 776 void RenderWidgetCompositor::registerViewportLayers(
777 const blink::WebLayer* overscrollElasticityLayer, 777 const blink::WebLayer* overscrollElasticityLayer,
778 const blink::WebLayer* pageScaleLayer, 778 const blink::WebLayer* pageScaleLayer,
779 const blink::WebLayer* innerViewportScrollLayer, 779 const blink::WebLayer* innerViewportScrollLayer,
780 const blink::WebLayer* outerViewportScrollLayer) { 780 const blink::WebLayer* outerViewportScrollLayer) {
781 layer_tree_host_->RegisterViewportLayers( 781 layer_tree_host_->GetLayerTree()->RegisterViewportLayers(
782 // TODO(bokan): This check can probably be removed now, but it looks 782 // TODO(bokan): This check can probably be removed now, but it looks
783 // like overscroll elasticity may still be NULL until VisualViewport 783 // like overscroll elasticity may still be NULL until VisualViewport
784 // registers its layers. 784 // registers its layers.
785 // The scroll elasticity layer will only exist when using pinch virtual 785 // The scroll elasticity layer will only exist when using pinch virtual
786 // viewports. 786 // viewports.
787 overscrollElasticityLayer 787 overscrollElasticityLayer
788 ? static_cast<const cc_blink::WebLayerImpl*>( 788 ? static_cast<const cc_blink::WebLayerImpl*>(
789 overscrollElasticityLayer)->layer() 789 overscrollElasticityLayer)
790 ->layer()
790 : NULL, 791 : NULL,
791 static_cast<const cc_blink::WebLayerImpl*>(pageScaleLayer)->layer(), 792 static_cast<const cc_blink::WebLayerImpl*>(pageScaleLayer)->layer(),
792 static_cast<const cc_blink::WebLayerImpl*>(innerViewportScrollLayer) 793 static_cast<const cc_blink::WebLayerImpl*>(innerViewportScrollLayer)
793 ->layer(), 794 ->layer(),
794 // TODO(bokan): This check can probably be removed now, but it looks 795 // TODO(bokan): This check can probably be removed now, but it looks
795 // like overscroll elasticity may still be NULL until VisualViewport 796 // like overscroll elasticity may still be NULL until VisualViewport
796 // registers its layers. 797 // registers its layers.
797 // The outer viewport layer will only exist when using pinch virtual 798 // The outer viewport layer will only exist when using pinch virtual
798 // viewports. 799 // viewports.
799 outerViewportScrollLayer 800 outerViewportScrollLayer
800 ? static_cast<const cc_blink::WebLayerImpl*>(outerViewportScrollLayer) 801 ? static_cast<const cc_blink::WebLayerImpl*>(outerViewportScrollLayer)
801 ->layer() 802 ->layer()
802 : NULL); 803 : NULL);
803 } 804 }
804 805
805 void RenderWidgetCompositor::clearViewportLayers() { 806 void RenderWidgetCompositor::clearViewportLayers() {
806 layer_tree_host_->RegisterViewportLayers( 807 layer_tree_host_->GetLayerTree()->RegisterViewportLayers(
807 scoped_refptr<cc::Layer>(), scoped_refptr<cc::Layer>(), 808 scoped_refptr<cc::Layer>(), scoped_refptr<cc::Layer>(),
808 scoped_refptr<cc::Layer>(), scoped_refptr<cc::Layer>()); 809 scoped_refptr<cc::Layer>(), scoped_refptr<cc::Layer>());
809 } 810 }
810 811
811 void RenderWidgetCompositor::registerSelection( 812 void RenderWidgetCompositor::registerSelection(
812 const blink::WebSelection& selection) { 813 const blink::WebSelection& selection) {
813 layer_tree_host_->RegisterSelection(ConvertWebSelection(selection)); 814 layer_tree_host_->RegisterSelection(ConvertWebSelection(selection));
814 } 815 }
815 816
816 void RenderWidgetCompositor::clearSelection() { 817 void RenderWidgetCompositor::clearSelection() {
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
1142 1143
1143 remote_proto_channel_receiver_->OnProtoReceived(std::move(deserialized)); 1144 remote_proto_channel_receiver_->OnProtoReceived(std::move(deserialized));
1144 } 1145 }
1145 1146
1146 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor( 1147 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor(
1147 float device_scale) { 1148 float device_scale) {
1148 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale); 1149 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale);
1149 } 1150 }
1150 1151
1151 } // namespace content 1152 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698