| 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 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 985 } | 985 } |
| 986 | 986 |
| 987 void RenderWidgetCompositor::SetShowPaintRects(bool show) { | 987 void RenderWidgetCompositor::SetShowPaintRects(bool show) { |
| 988 cc::LayerTreeDebugState debug_state = layer_tree_host_->GetDebugState(); | 988 cc::LayerTreeDebugState debug_state = layer_tree_host_->GetDebugState(); |
| 989 debug_state.show_paint_rects = show; | 989 debug_state.show_paint_rects = show; |
| 990 layer_tree_host_->SetDebugState(debug_state); | 990 layer_tree_host_->SetDebugState(debug_state); |
| 991 } | 991 } |
| 992 | 992 |
| 993 void RenderWidgetCompositor::SetShowDebugBorders(bool show) { | 993 void RenderWidgetCompositor::SetShowDebugBorders(bool show) { |
| 994 cc::LayerTreeDebugState debug_state = layer_tree_host_->GetDebugState(); | 994 cc::LayerTreeDebugState debug_state = layer_tree_host_->GetDebugState(); |
| 995 debug_state.show_debug_borders = show; | 995 if (show) |
| 996 debug_state.show_debug_borders.set(); |
| 997 else |
| 998 debug_state.show_debug_borders.reset(); |
| 996 layer_tree_host_->SetDebugState(debug_state); | 999 layer_tree_host_->SetDebugState(debug_state); |
| 997 } | 1000 } |
| 998 | 1001 |
| 999 void RenderWidgetCompositor::SetShowScrollBottleneckRects(bool show) { | 1002 void RenderWidgetCompositor::SetShowScrollBottleneckRects(bool show) { |
| 1000 cc::LayerTreeDebugState debug_state = layer_tree_host_->GetDebugState(); | 1003 cc::LayerTreeDebugState debug_state = layer_tree_host_->GetDebugState(); |
| 1001 debug_state.show_touch_event_handler_rects = show; | 1004 debug_state.show_touch_event_handler_rects = show; |
| 1002 debug_state.show_wheel_event_handler_rects = show; | 1005 debug_state.show_wheel_event_handler_rects = show; |
| 1003 debug_state.show_non_fast_scrollable_rects = show; | 1006 debug_state.show_non_fast_scrollable_rects = show; |
| 1004 layer_tree_host_->SetDebugState(debug_state); | 1007 layer_tree_host_->SetDebugState(debug_state); |
| 1005 } | 1008 } |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1147 void RenderWidgetCompositor::SetContentSourceId(uint32_t id) { | 1150 void RenderWidgetCompositor::SetContentSourceId(uint32_t id) { |
| 1148 layer_tree_host_->SetContentSourceId(id); | 1151 layer_tree_host_->SetContentSourceId(id); |
| 1149 } | 1152 } |
| 1150 | 1153 |
| 1151 void RenderWidgetCompositor::SetLocalSurfaceId( | 1154 void RenderWidgetCompositor::SetLocalSurfaceId( |
| 1152 const cc::LocalSurfaceId& local_surface_id) { | 1155 const cc::LocalSurfaceId& local_surface_id) { |
| 1153 layer_tree_host_->SetLocalSurfaceId(local_surface_id); | 1156 layer_tree_host_->SetLocalSurfaceId(local_surface_id); |
| 1154 } | 1157 } |
| 1155 | 1158 |
| 1156 } // namespace content | 1159 } // namespace content |
| OLD | NEW |