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