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

Unified Diff: cc/trees/thread_proxy.cc

Issue 15058004: cc: Rename VSync to BeginFrame (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix test compiler errors 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: cc/trees/thread_proxy.cc
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
index aff281fb3c1993fb2fa438927ee58e131ed1dd55..e486f2244744372ce620fb31421dc404214ddf42 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -58,11 +58,12 @@ ThreadProxy::ThreadProxy(LayerTreeHost* layer_tree_host,
completion_event_for_commit_held_on_tree_activation_(NULL),
texture_acquisition_completion_event_on_impl_thread_(NULL),
next_frame_is_newly_committed_frame_on_impl_thread_(false),
- render_vsync_enabled_(layer_tree_host->settings().render_vsync_enabled),
- render_vsync_notification_enabled_(
- layer_tree_host->settings().render_vsync_notification_enabled),
- synchronously_disable_vsync_(
- layer_tree_host->settings().synchronously_disable_vsync),
+ throttle_frame_production_(
+ layer_tree_host->settings().throttle_frame_production),
+ render_begin_frame_notification_enabled_(
+ layer_tree_host->settings().render_begin_frame_notification_enabled),
+ using_synchronous_renderer_compositor_(
+ layer_tree_host->settings().using_synchronous_renderer_compositor),
vsync_client_(NULL),
inside_draw_(false),
defer_commits_(false),
@@ -326,9 +327,9 @@ void ThreadProxy::OnVSyncParametersChanged(base::TimeTicks timebase,
scheduler_on_impl_thread_->SetTimebaseAndInterval(timebase, interval);
}
-void ThreadProxy::DidVSync(base::TimeTicks frame_time) {
+void ThreadProxy::DidBeginFrame(base::TimeTicks frame_time) {
DCHECK(IsImplThread());
- TRACE_EVENT0("cc", "ThreadProxy::DidVSync");
+ TRACE_EVENT0("cc", "ThreadProxy::DidBeginFrame");
if (vsync_client_)
vsync_client_->DidVSync(frame_time);
}
@@ -338,7 +339,7 @@ void ThreadProxy::RequestVSyncNotification(VSyncClient* client) {
TRACE_EVENT1(
"cc", "ThreadProxy::RequestVSyncNotification", "enable", !!client);
vsync_client_ = client;
- layer_tree_host_impl_->EnableVSyncNotification(!!client);
+ layer_tree_host_impl_->EnableBeginFrameNotification(!!client);
}
void ThreadProxy::OnCanDrawStateChanged(bool can_draw) {
@@ -941,7 +942,7 @@ ThreadProxy::ScheduledActionDrawAndSwapInternal(bool forced_draw) {
if (draw_frame) {
layer_tree_host_impl_->DrawLayers(
&frame,
- scheduler_on_impl_thread_->LastVSyncTime());
+ scheduler_on_impl_thread_->LastBeginFrameTime());
result.did_draw = true;
}
layer_tree_host_impl_->DidDrawAllLayers(frame);
@@ -1110,12 +1111,12 @@ void ThreadProxy::InitializeImplOnImplThread(
base::Time::kMicrosecondsPerSecond /
layer_tree_host_->settings().refresh_rate);
scoped_ptr<FrameRateController> frame_rate_controller;
- if (render_vsync_enabled_) {
- if (render_vsync_notification_enabled_) {
+ if (throttle_frame_production_) {
+ if (render_begin_frame_notification_enabled_) {
frame_rate_controller.reset(
new FrameRateController(VSyncTimeSource::Create(
this,
- synchronously_disable_vsync_ ?
+ using_synchronous_renderer_compositor_ ?
VSyncTimeSource::DISABLE_SYNCHRONOUSLY :
VSyncTimeSource::DISABLE_ON_NEXT_TICK)));
} else {
@@ -1206,7 +1207,7 @@ void ThreadProxy::LayerTreeHostClosedOnImplThread(CompletionEvent* completion) {
DCHECK(IsImplThread());
layer_tree_host_->DeleteContentsTexturesOnImplThread(
layer_tree_host_impl_->resource_provider());
- layer_tree_host_impl_->EnableVSyncNotification(false);
+ layer_tree_host_impl_->EnableBeginFrameNotification(false);
input_handler_client_on_impl_thread_.reset();
scheduler_on_impl_thread_.reset();
layer_tree_host_impl_.reset();
@@ -1368,11 +1369,11 @@ void ThreadProxy::StartScrollbarAnimationOnImplThread() {
layer_tree_host_impl_->CurrentFrameTimeTicks());
}
-void ThreadProxy::DidReceiveLastInputEventForVSync(
+void ThreadProxy::DidReceiveLastInputEventForBeginFrame(
base::TimeTicks frame_time) {
- if (render_vsync_notification_enabled_) {
- TRACE_EVENT0("cc", "ThreadProxy::DidReceiveLastInputEventForVSync");
- DidVSync(frame_time);
+ if (render_begin_frame_notification_enabled_) {
+ TRACE_EVENT0("cc", "ThreadProxy::DidReceiveLastInputEventForBeginFrame");
+ DidBeginFrame(frame_time);
}
}

Powered by Google App Engine
This is Rietveld 408576698