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

Unified Diff: cc/trees/layer_tree_host_unittest.cc

Issue 218633010: cc: Handle retroactive BeginFrames in the Scheduler. (Closed) Base URL: http://git.chromium.org/chromium/src.git@compositorVsyncDisable
Patch Set: rebase Created 6 years, 8 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/layer_tree_host_unittest.cc
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
index 391f7c083e474a6c40428f4b50e04546b4410b00..113428e12b203c8e36b63d897ef34eead914cff2 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -1107,15 +1107,11 @@ class LayerTreeHostTestFrameTimeUpdatesAfterActivationFails
if (impl->pending_tree())
frame_count_with_pending_tree_++;
- if (frame_count_with_pending_tree_ == 2)
- impl->BlockNotifyReadyToActivateForTesting(false);
- }
-
- virtual void DidBeginImplFrameOnThread(LayerTreeHostImpl* impl,
- const BeginFrameArgs& args) OVERRIDE {
if (frame_count_with_pending_tree_ == 1) {
EXPECT_EQ(first_frame_time_.ToInternalValue(), 0);
first_frame_time_ = impl->CurrentFrameTimeTicks();
+ } else if (frame_count_with_pending_tree_ == 2) {
+ impl->BlockNotifyReadyToActivateForTesting(false);
}
}
@@ -2664,16 +2660,16 @@ class LayerTreeHostTestLCDNotification : public LayerTreeHostTest {
SINGLE_THREAD_TEST_F(LayerTreeHostTestLCDNotification);
-// Verify that the BeginImplFrame notification is used to initiate rendering.
-class LayerTreeHostTestBeginImplFrameNotification : public LayerTreeHostTest {
+// Verify that the BeginFrame notification is used to initiate rendering.
+class LayerTreeHostTestBeginFrameNotification : public LayerTreeHostTest {
public:
virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE {
settings->begin_impl_frame_scheduling_enabled = true;
}
virtual void BeginTest() OVERRIDE {
- // This will trigger a SetNeedsBeginImplFrame which will trigger a
- // BeginImplFrame.
+ // This will trigger a SetNeedsBeginFrame which will trigger a
+ // BeginFrame.
PostSetNeedsCommitToMainThread();
}
@@ -2691,9 +2687,9 @@ class LayerTreeHostTestBeginImplFrameNotification : public LayerTreeHostTest {
base::TimeTicks frame_time_;
};
-MULTI_THREAD_TEST_F(LayerTreeHostTestBeginImplFrameNotification);
+MULTI_THREAD_TEST_F(LayerTreeHostTestBeginFrameNotification);
-class LayerTreeHostTestBeginImplFrameNotificationShutdownWhileEnabled
+class LayerTreeHostTestBeginFrameNotificationShutdownWhileEnabled
: public LayerTreeHostTest {
public:
virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE {
@@ -2704,11 +2700,11 @@ class LayerTreeHostTestBeginImplFrameNotificationShutdownWhileEnabled
virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); }
virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) OVERRIDE {
- // The BeginImplFrame notification is turned off now but will get enabled
+ // The BeginFrame notification is turned off now but will get enabled
// once we return. End test while it's enabled.
ImplThreadTaskRunner()->PostTask(
FROM_HERE,
- base::Bind(&LayerTreeHostTestBeginImplFrameNotification::EndTest,
+ base::Bind(&LayerTreeHostTestBeginFrameNotification::EndTest,
base::Unretained(this)));
}
@@ -2716,7 +2712,7 @@ class LayerTreeHostTestBeginImplFrameNotificationShutdownWhileEnabled
};
MULTI_THREAD_TEST_F(
- LayerTreeHostTestBeginImplFrameNotificationShutdownWhileEnabled);
+ LayerTreeHostTestBeginFrameNotificationShutdownWhileEnabled);
class LayerTreeHostTestAbortedCommitDoesntStall : public LayerTreeHostTest {
protected:

Powered by Google App Engine
This is Rietveld 408576698