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

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

Issue 2144733005: [WIP] cc: Plumb SurfaceId from clients Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ensure only SurfaceFactoy and tests can update hierarchy Created 4 years, 5 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/draw_waiter_for_test.h ('k') | ui/compositor/test/in_process_context_factory.h » ('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.cc
diff --git a/ui/compositor/test/draw_waiter_for_test.cc b/ui/compositor/test/draw_waiter_for_test.cc
index 92f6698bf3dfa0ed9e5ebd465a39b8ad1aea7028..1a2cb612e72935e8b01d89952e382abe899354fb 100644
--- a/ui/compositor/test/draw_waiter_for_test.cc
+++ b/ui/compositor/test/draw_waiter_for_test.cc
@@ -9,6 +9,12 @@
namespace ui {
// static
+void DrawWaiterForTest::WaitForCompositingInitialized(Compositor* compositor) {
+ DrawWaiterForTest waiter(WAIT_FOR_COMPOSITING_INITIALIZED);
+ waiter.WaitImpl(compositor);
+}
+
+// static
void DrawWaiterForTest::WaitForCompositingStarted(Compositor* compositor) {
DrawWaiterForTest waiter(WAIT_FOR_COMPOSITING_STARTED);
waiter.WaitImpl(compositor);
@@ -38,6 +44,11 @@ void DrawWaiterForTest::WaitImpl(Compositor* compositor) {
compositor->RemoveObserver(this);
}
+void DrawWaiterForTest::OnCompositingInitialized(Compositor* compositor) {
+ if (wait_event_ == WAIT_FOR_COMPOSITING_INITIALIZED)
+ wait_run_loop_->Quit();
+}
+
void DrawWaiterForTest::OnCompositingDidCommit(Compositor* compositor) {
if (wait_event_ == WAIT_FOR_COMMIT)
wait_run_loop_->Quit();
« no previous file with comments | « ui/compositor/test/draw_waiter_for_test.h ('k') | ui/compositor/test/in_process_context_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698