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

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: SingleReleaseCallback 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
« no previous file with comments | « cc/test/layer_tree_pixel_test.cc ('k') | content/browser/renderer_host/render_widget_host_view_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..28b80b9430c227cf90895a6ec8221d4568948ec7 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<SingleReleaseCallback> 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()));
}
« no previous file with comments | « cc/test/layer_tree_pixel_test.cc ('k') | content/browser/renderer_host/render_widget_host_view_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698