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

Unified Diff: content/renderer/android/synchronous_compositor_output_surface.cc

Issue 15058004: cc: Rename VSync to BeginFrame (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 7 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/android/synchronous_compositor_output_surface.cc
diff --git a/content/renderer/android/synchronous_compositor_output_surface.cc b/content/renderer/android/synchronous_compositor_output_surface.cc
index e4a1be1432676923f035c3859d115b8e0dec0dd4..7acdf8a31b62e13e82872e3c2fdafe87a418f4b1 100644
--- a/content/renderer/android/synchronous_compositor_output_surface.cc
+++ b/content/renderer/android/synchronous_compositor_output_surface.cc
@@ -93,7 +93,7 @@ SynchronousCompositorOutputSurface::SynchronousCompositorOutputSurface(
new SoftwareDevice(this))),
compositor_client_(NULL),
routing_id_(routing_id),
- vsync_enabled_(false),
+ needs_begin_frame_(false),
did_swap_buffer_(false),
current_sw_canvas_(NULL) {
capabilities_.deferred_gl_initialization = true;
@@ -129,10 +129,10 @@ void SynchronousCompositorOutputSurface::SendFrameToParentCompositor(
// TODO(joth): Route page scale to the client, see http://crbug.com/237006
}
-void SynchronousCompositorOutputSurface::EnableVSyncNotification(
- bool enable_vsync) {
+void SynchronousCompositorOutputSurface::SetNeedsBeginFrame(
+ bool enable) {
DCHECK(CalledOnValidThread());
- vsync_enabled_ = enable_vsync;
+ needs_begin_frame_ = enable;
UpdateCompositorClientSettings();
}
@@ -197,13 +197,13 @@ void SynchronousCompositorOutputSurface::InvokeComposite(
// TODO(boliu): This assumes |transform| is identity and |damage_area| is the
// whole view. Tracking bug to implement this: crbug.com/230463.
client_->SetNeedsRedrawRect(damage_area);
- if (vsync_enabled_)
- client_->DidVSync(base::TimeTicks::Now());
+ if (needs_begin_frame_)
+ client_->BeginFrame(base::TimeTicks::Now());
}
void SynchronousCompositorOutputSurface::UpdateCompositorClientSettings() {
if (compositor_client_) {
- compositor_client_->SetContinuousInvalidate(vsync_enabled_);
+ compositor_client_->SetContinuousInvalidate(needs_begin_frame_);
}
}
« no previous file with comments | « content/renderer/android/synchronous_compositor_output_surface.h ('k') | content/renderer/gpu/compositor_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698