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 941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
952 } | 952 } |
953 | 953 |
954 void RenderWidgetCompositor::DidPostSwapBuffers() { | 954 void RenderWidgetCompositor::DidPostSwapBuffers() { |
955 widget_->OnSwapBuffersPosted(); | 955 widget_->OnSwapBuffersPosted(); |
956 } | 956 } |
957 | 957 |
958 void RenderWidgetCompositor::DidAbortSwapBuffers() { | 958 void RenderWidgetCompositor::DidAbortSwapBuffers() { |
959 widget_->OnSwapBuffersAborted(); | 959 widget_->OnSwapBuffersAborted(); |
960 } | 960 } |
961 | 961 |
962 void RenderWidgetCompositor::RecordFrameTimingEvents( | |
963 scoped_ptr<cc::FrameTimingTracker::CompositeTimingSet> composite_events, | |
964 scoped_ptr<cc::FrameTimingTracker::MainFrameTimingSet> main_frame_events) { | |
965 // TODO(vmpstr): Record the events. | |
MikeB
2015/06/01 19:29:55
Recording the events should be (or similar to)
h
| |
966 } | |
967 | |
962 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 968 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
963 cc::ContextProvider* provider = | 969 cc::ContextProvider* provider = |
964 compositor_deps_->GetSharedMainThreadContextProvider(); | 970 compositor_deps_->GetSharedMainThreadContextProvider(); |
965 // provider can be NULL after the GPU process crashed enough times and we | 971 // provider can be NULL after the GPU process crashed enough times and we |
966 // don't want to restart it any more (falling back to software). | 972 // don't want to restart it any more (falling back to software). |
967 if (!provider) | 973 if (!provider) |
968 return; | 974 return; |
969 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 975 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
970 } | 976 } |
971 | 977 |
972 void RenderWidgetCompositor::SetSurfaceIdNamespace( | 978 void RenderWidgetCompositor::SetSurfaceIdNamespace( |
973 uint32_t surface_id_namespace) { | 979 uint32_t surface_id_namespace) { |
974 layer_tree_host_->set_surface_id_namespace(surface_id_namespace); | 980 layer_tree_host_->set_surface_id_namespace(surface_id_namespace); |
975 } | 981 } |
976 | 982 |
977 } // namespace content | 983 } // namespace content |
OLD | NEW |