| 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 | 8 |
| 9 #include <cmath> | 9 #include <cmath> |
| 10 #include <limits> | 10 #include <limits> |
| (...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 661 return layer_tree_host_->ScheduleMicroBenchmark(name, std::move(value), | 661 return layer_tree_host_->ScheduleMicroBenchmark(name, std::move(value), |
| 662 callback); | 662 callback); |
| 663 } | 663 } |
| 664 | 664 |
| 665 bool RenderWidgetCompositor::SendMessageToMicroBenchmark( | 665 bool RenderWidgetCompositor::SendMessageToMicroBenchmark( |
| 666 int id, | 666 int id, |
| 667 std::unique_ptr<base::Value> value) { | 667 std::unique_ptr<base::Value> value) { |
| 668 return layer_tree_host_->SendMessageToMicroBenchmark(id, std::move(value)); | 668 return layer_tree_host_->SendMessageToMicroBenchmark(id, std::move(value)); |
| 669 } | 669 } |
| 670 | 670 |
| 671 cc::FrameSinkId RenderWidgetCompositor::getFrameSinkId() { |
| 672 return frame_sink_id_; |
| 673 } |
| 674 |
| 671 void RenderWidgetCompositor::setRootLayer(const blink::WebLayer& layer) { | 675 void RenderWidgetCompositor::setRootLayer(const blink::WebLayer& layer) { |
| 672 layer_tree_host_->GetLayerTree()->SetRootLayer( | 676 layer_tree_host_->GetLayerTree()->SetRootLayer( |
| 673 static_cast<const cc_blink::WebLayerImpl*>(&layer)->layer()); | 677 static_cast<const cc_blink::WebLayerImpl*>(&layer)->layer()); |
| 674 } | 678 } |
| 675 | 679 |
| 676 void RenderWidgetCompositor::clearRootLayer() { | 680 void RenderWidgetCompositor::clearRootLayer() { |
| 677 layer_tree_host_->GetLayerTree()->SetRootLayer(scoped_refptr<cc::Layer>()); | 681 layer_tree_host_->GetLayerTree()->SetRootLayer(scoped_refptr<cc::Layer>()); |
| 678 } | 682 } |
| 679 | 683 |
| 680 cc::AnimationHost* RenderWidgetCompositor::compositorAnimationHost() { | 684 cc::AnimationHost* RenderWidgetCompositor::compositorAnimationHost() { |
| (...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1137 float device_scale) { | 1141 float device_scale) { |
| 1138 layer_tree_host_->GetLayerTree()->SetPaintedDeviceScaleFactor(device_scale); | 1142 layer_tree_host_->GetLayerTree()->SetPaintedDeviceScaleFactor(device_scale); |
| 1139 } | 1143 } |
| 1140 | 1144 |
| 1141 void RenderWidgetCompositor::SetDeviceColorSpace( | 1145 void RenderWidgetCompositor::SetDeviceColorSpace( |
| 1142 const gfx::ColorSpace& color_space) { | 1146 const gfx::ColorSpace& color_space) { |
| 1143 layer_tree_host_->GetLayerTree()->SetDeviceColorSpace(color_space); | 1147 layer_tree_host_->GetLayerTree()->SetDeviceColorSpace(color_space); |
| 1144 } | 1148 } |
| 1145 | 1149 |
| 1146 } // namespace content | 1150 } // namespace content |
| OLD | NEW |