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

Unified Diff: ui/compositor/test/draw_waiter_for_test.h

Issue 638653003: Make ui::Compositor use ui::Scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 11 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
« no previous file with comments | « ui/compositor/test/context_factories_for_test.cc ('k') | ui/compositor/test/draw_waiter_for_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/test/draw_waiter_for_test.h
diff --git a/ui/compositor/test/draw_waiter_for_test.h b/ui/compositor/test/draw_waiter_for_test.h
index 5576d27054a0d59f3e9267f3a28f5221e16a459d..7e3de14f1e34b06e7da5e268983eead4a129e15a 100644
--- a/ui/compositor/test/draw_waiter_for_test.h
+++ b/ui/compositor/test/draw_waiter_for_test.h
@@ -20,13 +20,21 @@ class DrawWaiterForTest : public CompositorObserver {
// Waits for a draw to be issued by the compositor. If the test times out
// here, there may be a logic error in the compositor code causing it
// not to draw.
- static void Wait(Compositor* compositor);
+ static void WaitForCompositingStarted(Compositor* compositor);
+
+ // Waits for a swap to be completed from the compositor.
+ static void WaitForCompositingEnded(Compositor* compositor);
// Waits for a commit instead of a draw.
static void WaitForCommit(Compositor* compositor);
private:
- DrawWaiterForTest();
+ enum WaitEvent {
+ WAIT_FOR_COMMIT,
+ WAIT_FOR_COMPOSITING_STARTED,
+ WAIT_FOR_COMPOSITING_ENDED,
+ };
+ DrawWaiterForTest(WaitEvent wait_event);
~DrawWaiterForTest();
void WaitImpl(Compositor* compositor);
@@ -42,7 +50,7 @@ class DrawWaiterForTest : public CompositorObserver {
scoped_ptr<base::RunLoop> wait_run_loop_;
- bool wait_for_commit_;
+ WaitEvent wait_event_;
DISALLOW_COPY_AND_ASSIGN(DrawWaiterForTest);
};
« no previous file with comments | « ui/compositor/test/context_factories_for_test.cc ('k') | ui/compositor/test/draw_waiter_for_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698