| 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 990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1001 webEvents.push_back(blink::WebFrameTimingEvent( | 1001 webEvents.push_back(blink::WebFrameTimingEvent( |
| 1002 events[i].frame_id, | 1002 events[i].frame_id, |
| 1003 (events[i].timestamp - base::TimeTicks()).InSecondsF(), | 1003 (events[i].timestamp - base::TimeTicks()).InSecondsF(), |
| 1004 (events[i].end_time - base::TimeTicks()).InSecondsF())); | 1004 (events[i].end_time - base::TimeTicks()).InSecondsF())); |
| 1005 } | 1005 } |
| 1006 widget_->webwidget()->recordFrameTimingEvent( | 1006 widget_->webwidget()->recordFrameTimingEvent( |
| 1007 blink::WebWidget::RenderEvent, frameId, webEvents); | 1007 blink::WebWidget::RenderEvent, frameId, webEvents); |
| 1008 } | 1008 } |
| 1009 } | 1009 } |
| 1010 | 1010 |
| 1011 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | |
| 1012 cc::ContextProvider* provider = | |
| 1013 compositor_deps_->GetSharedMainThreadContextProvider(); | |
| 1014 // provider can be NULL after the GPU process crashed enough times and we | |
| 1015 // don't want to restart it any more (falling back to software). | |
| 1016 if (!provider) | |
| 1017 return; | |
| 1018 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | |
| 1019 } | |
| 1020 | |
| 1021 void RenderWidgetCompositor::SetSurfaceIdNamespace( | 1011 void RenderWidgetCompositor::SetSurfaceIdNamespace( |
| 1022 uint32_t surface_id_namespace) { | 1012 uint32_t surface_id_namespace) { |
| 1023 layer_tree_host_->set_surface_id_namespace(surface_id_namespace); | 1013 layer_tree_host_->set_surface_id_namespace(surface_id_namespace); |
| 1024 } | 1014 } |
| 1025 | 1015 |
| 1026 } // namespace content | 1016 } // namespace content |
| OLD | NEW |