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

Unified Diff: cc/quads/render_pass_unittest.cc

Issue 14060015: cc: Async readback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 8 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 | « cc/quads/render_pass.cc ('k') | cc/resources/resource_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/quads/render_pass_unittest.cc
diff --git a/cc/quads/render_pass_unittest.cc b/cc/quads/render_pass_unittest.cc
index f2271b59192a531140c5a86f5afc8ecddd6a2753..9ab0123d2619c61643e1dd10f90e776d4602bcb5 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));
}
« no previous file with comments | « cc/quads/render_pass.cc ('k') | cc/resources/resource_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698