summaryrefslogtreecommitdiffstats
path: root/cc/test
diff options
context:
space:
mode:
authorbrianderson@chromium.org <brianderson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-23 10:45:03 +0000
committerbrianderson@chromium.org <brianderson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-23 10:45:03 +0000
commitc8cbae7f41a1212bce61523021a60ee78783993b (patch)
tree8a57d88602df03a587c2dcd2a95039b20ec4ef83 /cc/test
parent280755cad298b37cd6ead4d16337c4e1ed79f1a0 (diff)
downloadchromium_src-c8cbae7f41a1212bce61523021a60ee78783993b.zip
chromium_src-c8cbae7f41a1212bce61523021a60ee78783993b.tar.gz
chromium_src-c8cbae7f41a1212bce61523021a60ee78783993b.tar.bz2
cc: Rename VSync to BeginFrame
We are replacing hard vsync scheduling with BeginFrame+deadline intervals. This patch removes references to vsync in CC where it will no longer make sense. (One exception is cc::VSyncTimeSource, which will be removed in future patches to be incorporated into the scheduler itself.) Additionally, BeginFrames are clarified with suffixes whenever context is not enough and existing identifiers associated with BeginFrame when it no longer makes sense are renamed. A summary of the important renames are as follows: Browser Side Renames: COutputSurface::EnableVSyncNotification -> SetNeedsBeginFrame COutputSurface::OnDidVSync -> OnBeginFrame ViewHostMsg_SetVSyncNotificationEnabled -> ViewHostMsg_SetNeedsBeginFrame ViewMsg_DidVSync -> ViewMsg_BeginFrame Impl Side Renames: LTHI::EnableVSyncNotification -> SetNeedsBeginFrame LTHI::DidVSync -> BeginFrame LTHI::DidRecieveLastInputEventForVSync -> DidReceiveLastInputEventForBeginFrame Main+Impl Side Renames: LTHIClient::DidVSync -> BeginFrameOnImplThread LTHIClient::DidRecieveLastInputEventForVSync -> DidReceiveLastInputEventForBeginFrameOnImplThread TProxy::BeginFrame -> BeginFrameOnMainThread TProxy::ForceBeginFrameOnImplThread -> ForceCommitOnImplThread TProxy::BeginFrameCompleteOnImplThread -> StartCommitOnImplThread Scheduler::BeginFrameComplete -> FinishCommit Scheduler::BeginFrameAborted -> BeginFrameAbortedByMainThread Scheduler::LastVsyncTime -> LastBeginFrameOnImplThreadTime Scheduler::VSyncTick -> BeginFrame SchedulerSM::VSyncCallbackNeeded -> BeginFrameNeededByImplThread SchedulerSM::ACTION_BEGIN_FRAME -> ACTION_SEND_BEGIN_FRAME_TO_MAIN_THREAD FRC::DidBeginFrame -> DidSwapBuffers FRC::DidFinishFrame -> DidSwapBuffersComplete Random Renames: LTSettings::render_vsync_enabled -> throttle_frame_production LTSettings::render_vsync_notification_enabled -> render_parent_drives_begin_frame LTSettings::synchronously_disable_vsync -> using_synchronous_renderer_compositor RenderWidget::SynchronouslyDisableVSync -> UsingSynchronousRendererCompositor BUG=240945 Review URL: https://chromiumcodereview.appspot.com/15058004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201739 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test')
-rw-r--r--cc/test/fake_layer_tree_host_impl_client.h7
-rw-r--r--cc/test/fake_output_surface.cc10
-rw-r--r--cc/test/fake_output_surface.h10
-rw-r--r--cc/test/layer_tree_test.cc3
4 files changed, 16 insertions, 14 deletions
diff --git a/cc/test/fake_layer_tree_host_impl_client.h b/cc/test/fake_layer_tree_host_impl_client.h
index abcebf1..7a16830 100644
--- a/cc/test/fake_layer_tree_host_impl_client.h
+++ b/cc/test/fake_layer_tree_host_impl_client.h
@@ -17,7 +17,8 @@ class FakeLayerTreeHostImplClient : public LayerTreeHostImplClient {
virtual void OnVSyncParametersChanged(
base::TimeTicks,
base::TimeDelta) OVERRIDE {}
- virtual void DidVSync(base::TimeTicks frame_time) OVERRIDE {}
+ virtual void BeginFrameOnImplThread(base::TimeTicks frame_time)
+ OVERRIDE {}
virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE {}
virtual void OnHasPendingTreeStateChanged(bool has_pending_tree) OVERRIDE {}
virtual void SetNeedsRedrawOnImplThread() OVERRIDE {}
@@ -37,8 +38,8 @@ class FakeLayerTreeHostImplClient : public LayerTreeHostImplClient {
virtual void RenewTreePriority() OVERRIDE {}
virtual void RequestScrollbarAnimationOnImplThread(base::TimeDelta)
OVERRIDE {}
- virtual void DidReceiveLastInputEventForVSync(base::TimeTicks frame_time)
- OVERRIDE {}
+ virtual void DidReceiveLastInputEventForBeginFrameOnImplThread(
+ base::TimeTicks frame_time) OVERRIDE {}
virtual void DidActivatePendingTree() OVERRIDE {}
};
diff --git a/cc/test/fake_output_surface.cc b/cc/test/fake_output_surface.cc
index 1196419..eae7169 100644
--- a/cc/test/fake_output_surface.cc
+++ b/cc/test/fake_output_surface.cc
@@ -15,7 +15,7 @@ FakeOutputSurface::FakeOutputSurface(
scoped_ptr<WebKit::WebGraphicsContext3D> context3d, bool has_parent)
: OutputSurface(context3d.Pass()),
num_sent_frames_(0),
- vsync_notification_enabled_(false),
+ needs_begin_frame_(false),
forced_draw_to_software_device_(false),
weak_ptr_factory_(this) {
capabilities_.has_parent_compositor = has_parent;
@@ -41,12 +41,12 @@ void FakeOutputSurface::SendFrameToParentCompositor(
weak_ptr_factory_.GetWeakPtr()));
}
-void FakeOutputSurface::EnableVSyncNotification(bool enable) {
- vsync_notification_enabled_ = enable;
+void FakeOutputSurface::SetNeedsBeginFrame(bool enable) {
+ needs_begin_frame_ = enable;
}
-void FakeOutputSurface::DidVSync(base::TimeTicks frame_time) {
- client_->DidVSync(frame_time);
+void FakeOutputSurface::BeginFrame(base::TimeTicks frame_time) {
+ client_->BeginFrame(frame_time);
}
bool FakeOutputSurface::ForcedDrawToSoftwareDevice() const {
diff --git a/cc/test/fake_output_surface.h b/cc/test/fake_output_surface.h
index 435756d..e74cc5f 100644
--- a/cc/test/fake_output_surface.h
+++ b/cc/test/fake_output_surface.h
@@ -70,11 +70,11 @@ class FakeOutputSurface : public OutputSurface {
CompositorFrame& last_sent_frame() { return last_sent_frame_; }
size_t num_sent_frames() { return num_sent_frames_; }
- virtual void EnableVSyncNotification(bool enable) OVERRIDE;
- bool vsync_notification_enabled() const {
- return vsync_notification_enabled_;
+ virtual void SetNeedsBeginFrame(bool enable) OVERRIDE;
+ bool needs_begin_frame() const {
+ return needs_begin_frame_;
}
- void DidVSync(base::TimeTicks frame_time);
+ void BeginFrame(base::TimeTicks frame_time);
void set_forced_draw_to_software_device(bool forced) {
forced_draw_to_software_device_ = forced;
@@ -94,7 +94,7 @@ class FakeOutputSurface : public OutputSurface {
CompositorFrame last_sent_frame_;
size_t num_sent_frames_;
- bool vsync_notification_enabled_;
+ bool needs_begin_frame_;
bool forced_draw_to_software_device_;
base::WeakPtrFactory<FakeOutputSurface> weak_ptr_factory_;
};
diff --git a/cc/test/layer_tree_test.cc b/cc/test/layer_tree_test.cc
index 680b262..ef007df 100644
--- a/cc/test/layer_tree_test.cc
+++ b/cc/test/layer_tree_test.cc
@@ -544,7 +544,8 @@ void LayerTreeTest::RunTest(bool threaded,
delegating_renderer_ = delegating_renderer;
- // Spend less time waiting for vsync because the output is mocked out.
+ // Spend less time waiting for BeginFrame because the output is
+ // mocked out.
settings_.refresh_rate = 200.0;
if (impl_side_painting) {
DCHECK(threaded) <<