Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Side by Side Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 2753843003: Create a new action triggered when a BeginMainFrame is not expected before vsync (Closed)
Patch Set: tweak scheduler to not schedule idle work after a commit. Complete renaming. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <limits> 10 #include <limits>
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 void RenderWidgetCompositor::BeginMainFrame(const cc::BeginFrameArgs& args) { 1033 void RenderWidgetCompositor::BeginMainFrame(const cc::BeginFrameArgs& args) {
1034 compositor_deps_->GetRendererScheduler()->WillBeginFrame(args); 1034 compositor_deps_->GetRendererScheduler()->WillBeginFrame(args);
1035 double frame_time_sec = (args.frame_time - base::TimeTicks()).InSecondsF(); 1035 double frame_time_sec = (args.frame_time - base::TimeTicks()).InSecondsF();
1036 delegate_->BeginMainFrame(frame_time_sec); 1036 delegate_->BeginMainFrame(frame_time_sec);
1037 } 1037 }
1038 1038
1039 void RenderWidgetCompositor::BeginMainFrameNotExpectedSoon() { 1039 void RenderWidgetCompositor::BeginMainFrameNotExpectedSoon() {
1040 compositor_deps_->GetRendererScheduler()->BeginFrameNotExpectedSoon(); 1040 compositor_deps_->GetRendererScheduler()->BeginFrameNotExpectedSoon();
1041 } 1041 }
1042 1042
1043 void RenderWidgetCompositor::BeginMainFrameNotExpectedUntil(
1044 base::TimeTicks time) {
1045 compositor_deps_->GetRendererScheduler()->BeginMainFrameNotExpectedUntil(
1046 time);
1047 }
1048
1043 void RenderWidgetCompositor::UpdateLayerTreeHost() { 1049 void RenderWidgetCompositor::UpdateLayerTreeHost() {
1044 delegate_->UpdateVisualState(); 1050 delegate_->UpdateVisualState();
1045 } 1051 }
1046 1052
1047 void RenderWidgetCompositor::ApplyViewportDeltas( 1053 void RenderWidgetCompositor::ApplyViewportDeltas(
1048 const gfx::Vector2dF& inner_delta, 1054 const gfx::Vector2dF& inner_delta,
1049 const gfx::Vector2dF& outer_delta, 1055 const gfx::Vector2dF& outer_delta,
1050 const gfx::Vector2dF& elastic_overscroll_delta, 1056 const gfx::Vector2dF& elastic_overscroll_delta,
1051 float page_scale, 1057 float page_scale,
1052 float top_controls_delta) { 1058 float top_controls_delta) {
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
1145 void RenderWidgetCompositor::SetContentSourceId(uint32_t id) { 1151 void RenderWidgetCompositor::SetContentSourceId(uint32_t id) {
1146 layer_tree_host_->SetContentSourceId(id); 1152 layer_tree_host_->SetContentSourceId(id);
1147 } 1153 }
1148 1154
1149 void RenderWidgetCompositor::SetLocalSurfaceId( 1155 void RenderWidgetCompositor::SetLocalSurfaceId(
1150 const cc::LocalSurfaceId& local_surface_id) { 1156 const cc::LocalSurfaceId& local_surface_id) {
1151 layer_tree_host_->SetLocalSurfaceId(local_surface_id); 1157 layer_tree_host_->SetLocalSurfaceId(local_surface_id);
1152 } 1158 }
1153 1159
1154 } // namespace content 1160 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698