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

Unified Diff: cc/trees/layer_tree_host_pixeltest_readback.cc

Issue 23648014: cc: Move TextureMailbox::ReleaseCallback to SingleReleaseCallback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: releasecallback: dchecks Created 7 years, 3 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
Index: cc/trees/layer_tree_host_pixeltest_readback.cc
diff --git a/cc/trees/layer_tree_host_pixeltest_readback.cc b/cc/trees/layer_tree_host_pixeltest_readback.cc
index 1c8380b258db845d426d80a2c50054a13b9a49aa..aeb7ec27d106e1dfe7faf1717ec4a4b36c0fe5c6 100644
--- a/cc/trees/layer_tree_host_pixeltest_readback.cc
+++ b/cc/trees/layer_tree_host_pixeltest_readback.cc
@@ -58,13 +58,15 @@ class LayerTreeHostReadbackPixelTest : public LayerTreePixelTest {
EXPECT_TRUE(proxy()->IsMainThread());
EXPECT_TRUE(result->HasTexture());
- scoped_ptr<TextureMailbox> texture_mailbox = result->TakeTexture().Pass();
- EXPECT_TRUE(texture_mailbox->IsValid());
- EXPECT_TRUE(texture_mailbox->IsTexture());
+ TextureMailbox texture_mailbox;
+ scoped_ptr<ScopedReleaseCallback> release_callback;
+ result->TakeTexture(&texture_mailbox, &release_callback);
+ EXPECT_TRUE(texture_mailbox.IsValid());
+ EXPECT_TRUE(texture_mailbox.IsTexture());
scoped_ptr<SkBitmap> bitmap =
- CopyTextureMailboxToBitmap(result->size(), *texture_mailbox);
- texture_mailbox->RunReleaseCallback(0, false);
+ CopyTextureMailboxToBitmap(result->size(), texture_mailbox);
+ release_callback->Run(0, false);
ReadbackResultAsBitmap(CopyOutputResult::CreateBitmapResult(bitmap.Pass()));
}

Powered by Google App Engine
This is Rietveld 408576698