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

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: Add BeginMainFrameNotExpectedUntil to content::CompositorImpl for Android. Created 3 years, 7 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 void RenderWidgetCompositor::SetContentSourceId(uint32_t id) { 1155 void RenderWidgetCompositor::SetContentSourceId(uint32_t id) {
1150 layer_tree_host_->SetContentSourceId(id); 1156 layer_tree_host_->SetContentSourceId(id);
1151 } 1157 }
1152 1158
1153 void RenderWidgetCompositor::SetLocalSurfaceId( 1159 void RenderWidgetCompositor::SetLocalSurfaceId(
1154 const cc::LocalSurfaceId& local_surface_id) { 1160 const cc::LocalSurfaceId& local_surface_id) {
1155 layer_tree_host_->SetLocalSurfaceId(local_surface_id); 1161 layer_tree_host_->SetLocalSurfaceId(local_surface_id);
1156 } 1162 }
1157 1163
1158 } // namespace content 1164 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698