| 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 <limits> | 7 #include <limits> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 734 } | 734 } |
| 735 | 735 |
| 736 void RenderWidgetCompositor::finishAllRendering() { | 736 void RenderWidgetCompositor::finishAllRendering() { |
| 737 layer_tree_host_->FinishAllRendering(); | 737 layer_tree_host_->FinishAllRendering(); |
| 738 } | 738 } |
| 739 | 739 |
| 740 void RenderWidgetCompositor::setDeferCommits(bool defer_commits) { | 740 void RenderWidgetCompositor::setDeferCommits(bool defer_commits) { |
| 741 layer_tree_host_->SetDeferCommits(defer_commits); | 741 layer_tree_host_->SetDeferCommits(defer_commits); |
| 742 } | 742 } |
| 743 | 743 |
| 744 int RenderWidgetCompositor::layerTreeId() const { |
| 745 return layer_tree_host_->id(); |
| 746 } |
| 747 |
| 744 void RenderWidgetCompositor::setShowFPSCounter(bool show) { | 748 void RenderWidgetCompositor::setShowFPSCounter(bool show) { |
| 745 cc::LayerTreeDebugState debug_state = layer_tree_host_->debug_state(); | 749 cc::LayerTreeDebugState debug_state = layer_tree_host_->debug_state(); |
| 746 debug_state.show_fps_counter = show; | 750 debug_state.show_fps_counter = show; |
| 747 layer_tree_host_->SetDebugState(debug_state); | 751 layer_tree_host_->SetDebugState(debug_state); |
| 748 } | 752 } |
| 749 | 753 |
| 750 void RenderWidgetCompositor::setShowPaintRects(bool show) { | 754 void RenderWidgetCompositor::setShowPaintRects(bool show) { |
| 751 cc::LayerTreeDebugState debug_state = layer_tree_host_->debug_state(); | 755 cc::LayerTreeDebugState debug_state = layer_tree_host_->debug_state(); |
| 752 debug_state.show_paint_rects = show; | 756 debug_state.show_paint_rects = show; |
| 753 layer_tree_host_->SetDebugState(debug_state); | 757 layer_tree_host_->SetDebugState(debug_state); |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 932 cc::ContextProvider* provider = | 936 cc::ContextProvider* provider = |
| 933 compositor_deps_->GetSharedMainThreadContextProvider(); | 937 compositor_deps_->GetSharedMainThreadContextProvider(); |
| 934 // provider can be NULL after the GPU process crashed enough times and we | 938 // provider can be NULL after the GPU process crashed enough times and we |
| 935 // don't want to restart it any more (falling back to software). | 939 // don't want to restart it any more (falling back to software). |
| 936 if (!provider) | 940 if (!provider) |
| 937 return; | 941 return; |
| 938 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 942 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
| 939 } | 943 } |
| 940 | 944 |
| 941 } // namespace content | 945 } // namespace content |
| OLD | NEW |