diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-26 16:18:25 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-26 16:18:25 +0000 |
commit | 18a7019dbdee8d72bcdf060fb656295f3b64b60d (patch) | |
tree | 7e4dceed39c7dee39ccb37dd34c33c9e4fe6cdae /cc/quads/render_pass_unittest.cc | |
parent | ebf258d7abe7d118039b56fa3a0c12ed5eb5ceee (diff) | |
download | chromium_src-18a7019dbdee8d72bcdf060fb656295f3b64b60d.zip chromium_src-18a7019dbdee8d72bcdf060fb656295f3b64b60d.tar.gz chromium_src-18a7019dbdee8d72bcdf060fb656295f3b64b60d.tar.bz2 |
cc: Async readback.
Provide a path to get a readback of a layer's subtree via an
asynchronous mechanism.
This path is used for all the cc pixel tests, to show that it
works. Also by some unit tests:
LayerTreeHostTestAsyncReadback.GLRenderer_RunSingleThread
LayerTreeHostTestAsyncReadback.GLRenderer_RunMultiThread
LayerTreeHostTestAsyncReadback.SoftwareRenderer_RunSingleThread
LayerTreeHostTestAsyncReadback.SoftwareRenderer_RunMultiThread
LayerTreeHostTestAsyncReadbackLayerDestroyed.RunSingleThread
LayerTreeHostTestAsyncReadbackLayerDestroyed.RunMultiThread
BUG=179896
Review URL: https://chromiumcodereview.appspot.com/14060015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196747 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/quads/render_pass_unittest.cc')
-rw-r--r-- | cc/quads/render_pass_unittest.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cc/quads/render_pass_unittest.cc b/cc/quads/render_pass_unittest.cc index f2271b5..9ab0123 100644 --- a/cc/quads/render_pass_unittest.cc +++ b/cc/quads/render_pass_unittest.cc @@ -29,6 +29,7 @@ struct RenderPassSize { gfx::RectF damage_rect; bool has_transparent_background; bool has_occlusion_from_outside_target_surface; + std::vector<RenderPass::RequestCopyAsBitmapCallback> copy_callbacks; }; TEST(RenderPassTest, CopyShouldBeIdenticalExceptIdAndQuads) { @@ -47,6 +48,7 @@ TEST(RenderPassTest, CopyShouldBeIdenticalExceptIdAndQuads) { transform_to_root, has_transparent_background, has_occlusion_from_outside_target_surface); + pass->copy_callbacks.push_back(RenderPass::RequestCopyAsBitmapCallback()); // Stick a quad in the pass, this should not get copied. scoped_ptr<SharedQuadState> shared_state = SharedQuadState::Create(); @@ -72,6 +74,9 @@ TEST(RenderPassTest, CopyShouldBeIdenticalExceptIdAndQuads) { copy->has_occlusion_from_outside_target_surface); EXPECT_EQ(0u, copy->quad_list.size()); + // The copy callback should not be copied/duplicated. + EXPECT_EQ(0u, copy->copy_callbacks.size()); + EXPECT_EQ(sizeof(RenderPassSize), sizeof(RenderPass)); } |