diff options
author | brianderson@chromium.org <brianderson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-30 10:33:22 +0000 |
---|---|---|
committer | brianderson@chromium.org <brianderson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-30 10:33:22 +0000 |
commit | 469e157f518ed2ba1490b01d5e2038eaf2aea5c8 (patch) | |
tree | e07b84ddf48c8fa5582416c7bb4c1b84548bf83d /cc/trees | |
parent | ccb6abaf98e28b9fa0d4642c46bdf72ee7cfb078 (diff) | |
download | chromium_src-469e157f518ed2ba1490b01d5e2038eaf2aea5c8.zip chromium_src-469e157f518ed2ba1490b01d5e2038eaf2aea5c8.tar.gz chromium_src-469e157f518ed2ba1490b01d5e2038eaf2aea5c8.tar.bz2 |
cc: Deflake LayerTreeHostContextTestCompositeAndReadbackBeforeOutputSurfaceInit
BUG=280508
Review URL: https://codereview.chromium.org/51513002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231806 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/trees')
-rw-r--r-- | cc/trees/layer_tree_host_unittest_context.cc | 7 |
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 { |