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 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
899 const gfx::Vector2dF& inner_delta, | 899 const gfx::Vector2dF& inner_delta, |
900 const gfx::Vector2dF& outer_delta, | 900 const gfx::Vector2dF& outer_delta, |
901 const gfx::Vector2dF& elastic_overscroll_delta, | 901 const gfx::Vector2dF& elastic_overscroll_delta, |
902 float page_scale, | 902 float page_scale, |
903 float top_controls_delta) { | 903 float top_controls_delta) { |
904 delegate_->ApplyViewportDeltas(inner_delta, outer_delta, | 904 delegate_->ApplyViewportDeltas(inner_delta, outer_delta, |
905 elastic_overscroll_delta, page_scale, | 905 elastic_overscroll_delta, page_scale, |
906 top_controls_delta); | 906 top_controls_delta); |
907 } | 907 } |
908 | 908 |
| 909 void RenderWidgetCompositor::ApplyMutations( |
| 910 const cc::LayerTreeMutations& mutations) { |
| 911 delegate_->ApplyMutations(mutations); |
| 912 } |
| 913 |
909 void RenderWidgetCompositor::RequestNewOutputSurface() { | 914 void RenderWidgetCompositor::RequestNewOutputSurface() { |
910 // If the host is closing, then no more compositing is possible. This | 915 // If the host is closing, then no more compositing is possible. This |
911 // prevents shutdown races between handling the close message and | 916 // prevents shutdown races between handling the close message and |
912 // the CreateOutputSurface task. | 917 // the CreateOutputSurface task. |
913 if (delegate_->IsClosing()) | 918 if (delegate_->IsClosing()) |
914 return; | 919 return; |
915 | 920 |
916 bool fallback = | 921 bool fallback = |
917 num_failed_recreate_attempts_ >= OUTPUT_SURFACE_RETRIES_BEFORE_FALLBACK; | 922 num_failed_recreate_attempts_ >= OUTPUT_SURFACE_RETRIES_BEFORE_FALLBACK; |
918 scoped_ptr<cc::OutputSurface> surface( | 923 scoped_ptr<cc::OutputSurface> surface( |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1100 #endif | 1105 #endif |
1101 return actual; | 1106 return actual; |
1102 } | 1107 } |
1103 | 1108 |
1104 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor( | 1109 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor( |
1105 float device_scale) { | 1110 float device_scale) { |
1106 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale); | 1111 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale); |
1107 } | 1112 } |
1108 | 1113 |
1109 } // namespace content | 1114 } // namespace content |
OLD | NEW |