| Index: cc/trees/layer_tree_host_unittest.cc
|
| diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
|
| index 7191712c620e7129a260c2af237985ee15f88231..398e64d857b8340d231fecb362f92b4a4c7097fa 100644
|
| --- a/cc/trees/layer_tree_host_unittest.cc
|
| +++ b/cc/trees/layer_tree_host_unittest.cc
|
| @@ -1564,9 +1564,9 @@ class LayerTreeHostTestEvictTextures : public LayerTreeHostTest {
|
| // textures) go through and draw a frame, then end the test.
|
| //
|
| // Commits 1+2 test the eviction recovery path where eviction happens outside
|
| - // of the beginFrame/commit pair.
|
| + // of the beginMainFrame/commit pair.
|
| // Commits 3+4 test the eviction recovery path where eviction happens inside
|
| - // the beginFrame/commit pair.
|
| + // the beginMainFrame/commit pair.
|
| // Commits 5+6 test the path where an eviction happens during the eviction
|
| // recovery path.
|
| virtual void DidCommit() OVERRIDE {
|
| @@ -2321,11 +2321,11 @@ class LayerTreeHostTestLCDNotification : public LayerTreeHostTest {
|
|
|
| SINGLE_THREAD_TEST_F(LayerTreeHostTestLCDNotification);
|
|
|
| -// Verify that the vsync notification is used to initiate rendering.
|
| -class LayerTreeHostTestVSyncNotification : public LayerTreeHostTest {
|
| +// Verify that the BeginImplFrame notification is used to initiate rendering.
|
| +class LayerTreeHostTestBeginImplFrameNotification : public LayerTreeHostTest {
|
| public:
|
| virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE {
|
| - settings->render_vsync_notification_enabled = true;
|
| + settings->render_parent_drives_begin_impl_frame_ = true;
|
| }
|
|
|
| virtual void BeginTest() OVERRIDE {
|
| @@ -2336,23 +2336,23 @@ class LayerTreeHostTestVSyncNotification : public LayerTreeHostTest {
|
| FakeOutputSurface* fake_output_surface =
|
| reinterpret_cast<FakeOutputSurface*>(host_impl->output_surface());
|
|
|
| - // The vsync notification is turned off now but will get enabled once we
|
| - // return, so post a task to trigger it.
|
| - ASSERT_FALSE(fake_output_surface->vsync_notification_enabled());
|
| - PostVSyncOnImplThread(fake_output_surface);
|
| + // The BeginImplFrame notification is turned off now but will get
|
| + // enabled once we return, so post a task to trigger it.
|
| + ASSERT_FALSE(fake_output_surface->needs_begin_impl_frame());
|
| + PostBeginImplFrameOnImplThread(fake_output_surface);
|
| }
|
|
|
| - void PostVSyncOnImplThread(FakeOutputSurface* fake_output_surface) {
|
| + void PostBeginImplFrameOnImplThread(FakeOutputSurface* fake_output_surface) {
|
| DCHECK(ImplThread());
|
| ImplThread()->PostTask(
|
| - base::Bind(&LayerTreeHostTestVSyncNotification::DidVSync,
|
| + base::Bind(&LayerTreeHostTestBeginImplFrameNotification::BeginImplFrame,
|
| base::Unretained(this),
|
| base::Unretained(fake_output_surface)));
|
| }
|
|
|
| - void DidVSync(FakeOutputSurface* fake_output_surface) {
|
| - ASSERT_TRUE(fake_output_surface->vsync_notification_enabled());
|
| - fake_output_surface->DidVSync(frame_time_);
|
| + void BeginImplFrame(FakeOutputSurface* fake_output_surface) {
|
| + ASSERT_TRUE(fake_output_surface->needs_begin_impl_frame());
|
| + fake_output_surface->BeginImplFrame(frame_time_);
|
| }
|
|
|
| virtual bool PrepareToDrawOnThread(
|
| @@ -2369,34 +2369,36 @@ class LayerTreeHostTestVSyncNotification : public LayerTreeHostTest {
|
| base::TimeTicks frame_time_;
|
| };
|
|
|
| -MULTI_THREAD_TEST_F(LayerTreeHostTestVSyncNotification);
|
| +MULTI_THREAD_TEST_F(LayerTreeHostTestBeginImplFrameNotification);
|
|
|
| -class LayerTreeHostTestVSyncNotificationShutdownWhileEnabled
|
| +class LayerTreeHostTestBeginImplFrameNotificationShutdownWhileEnabled
|
| : public LayerTreeHostTest {
|
| public:
|
| virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE {
|
| - settings->render_vsync_notification_enabled = true;
|
| - settings->synchronously_disable_vsync = true;
|
| + settings->render_parent_drives_begin_impl_frame_ = true;
|
| + settings->using_synchronous_renderer_compositor = true;
|
| }
|
|
|
| virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); }
|
|
|
| virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) OVERRIDE {
|
| - // The vsync notification is turned off now but will get enabled once we
|
| - // return. End test while it's enabled.
|
| + // The BeginImplFrame notification is turned off now but will get enabled
|
| + // once we return. End test while it's enabled.
|
| ImplThread()->PostTask(base::Bind(
|
| - &LayerTreeHostTestVSyncNotification::EndTest, base::Unretained(this)));
|
| + &LayerTreeHostTestBeginImplFrameNotification::EndTest,
|
| + base::Unretained(this)));
|
| }
|
|
|
| virtual void AfterTest() OVERRIDE {}
|
| };
|
|
|
| -MULTI_THREAD_TEST_F(LayerTreeHostTestVSyncNotificationShutdownWhileEnabled);
|
| +MULTI_THREAD_TEST_F(
|
| + LayerTreeHostTestBeginImplFrameNotificationShutdownWhileEnabled);
|
|
|
| class LayerTreeHostTestInputDrivenRendering : public LayerTreeHostTest {
|
| public:
|
| virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE {
|
| - settings->render_vsync_notification_enabled = true;
|
| + settings->render_parent_drives_begin_impl_frame_ = true;
|
| }
|
|
|
| virtual void BeginTest() OVERRIDE {
|
| @@ -2405,8 +2407,8 @@ class LayerTreeHostTestInputDrivenRendering : public LayerTreeHostTest {
|
| }
|
|
|
| virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) OVERRIDE {
|
| - // Post a task to send the final input event for the current vsync; it
|
| - // should trigger rendering.
|
| + // Post a task to send the final input event for the current BeginImplFrame;
|
| + // it should trigger rendering.
|
| ImplThread()->PostTask(
|
| base::Bind(&LayerTreeHostTestInputDrivenRendering::SendFinalInputEvent,
|
| base::Unretained(this),
|
| @@ -2414,7 +2416,7 @@ class LayerTreeHostTestInputDrivenRendering : public LayerTreeHostTest {
|
| }
|
|
|
| void SendFinalInputEvent(LayerTreeHostImpl* host_impl) {
|
| - host_impl->DidReceiveLastInputEventForVSync(frame_time_);
|
| + host_impl->DidReceiveLastInputEventForBeginImplFrame(frame_time_);
|
| }
|
|
|
| virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) OVERRIDE {
|
|
|