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 862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
873 widget_->didCommitAndDrawCompositorFrame(); | 873 widget_->didCommitAndDrawCompositorFrame(); |
874 } | 874 } |
875 | 875 |
876 void RenderWidgetCompositor::DidCompleteSwapBuffers() { | 876 void RenderWidgetCompositor::DidCompleteSwapBuffers() { |
877 widget_->didCompleteSwapBuffers(); | 877 widget_->didCompleteSwapBuffers(); |
878 bool threaded = !!compositor_deps_->GetCompositorImplThreadTaskRunner().get(); | 878 bool threaded = !!compositor_deps_->GetCompositorImplThreadTaskRunner().get(); |
879 if (!threaded) | 879 if (!threaded) |
880 widget_->OnSwapBuffersComplete(); | 880 widget_->OnSwapBuffersComplete(); |
881 } | 881 } |
882 | 882 |
| 883 void RenderWidgetCompositor::DidCompletePageScaleAnimation() { |
| 884 widget_->DidCompletePageScaleAnimation(); |
| 885 } |
| 886 |
883 void RenderWidgetCompositor::ScheduleAnimation() { | 887 void RenderWidgetCompositor::ScheduleAnimation() { |
884 widget_->scheduleAnimation(); | 888 widget_->scheduleAnimation(); |
885 } | 889 } |
886 | 890 |
887 void RenderWidgetCompositor::DidPostSwapBuffers() { | 891 void RenderWidgetCompositor::DidPostSwapBuffers() { |
888 widget_->OnSwapBuffersPosted(); | 892 widget_->OnSwapBuffersPosted(); |
889 } | 893 } |
890 | 894 |
891 void RenderWidgetCompositor::DidAbortSwapBuffers() { | 895 void RenderWidgetCompositor::DidAbortSwapBuffers() { |
892 widget_->OnSwapBuffersAborted(); | 896 widget_->OnSwapBuffersAborted(); |
893 } | 897 } |
894 | 898 |
895 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 899 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
896 cc::ContextProvider* provider = | 900 cc::ContextProvider* provider = |
897 compositor_deps_->GetSharedMainThreadContextProvider(); | 901 compositor_deps_->GetSharedMainThreadContextProvider(); |
898 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 902 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
899 } | 903 } |
900 | 904 |
901 } // namespace content | 905 } // namespace content |
OLD | NEW |