summaryrefslogtreecommitdiffstats
path: root/cc/trees
diff options
context:
space:
mode:
Diffstat (limited to 'cc/trees')
-rw-r--r--cc/trees/layer_tree_host_unittest_context.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/cc/trees/layer_tree_host_unittest_context.cc b/cc/trees/layer_tree_host_unittest_context.cc
index 3113207..03b8d7f 100644
--- a/cc/trees/layer_tree_host_unittest_context.cc
+++ b/cc/trees/layer_tree_host_unittest_context.cc
@@ -1403,13 +1403,16 @@ class LayerTreeHostContextTestCompositeAndReadbackBeforeOutputSurfaceInit
times_output_surface_created_ = 0;
+ // Post the SetNeedsCommit before the readback to make sure it is run
+ // on the main thread before the readback's replacement commit when
+ // we have a threaded compositor.
+ PostSetNeedsCommitToMainThread();
+
char pixels[4];
bool result = layer_tree_host()->CompositeAndReadback(
&pixels, gfx::Rect(1, 1));
EXPECT_EQ(!delegating_renderer(), result);
EXPECT_EQ(1, times_output_surface_created_);
-
- PostSetNeedsCommitToMainThread();
}
virtual void DidInitializeOutputSurface(bool succeeded) OVERRIDE {