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

Unified Diff: content/renderer/browser_plugin/browser_plugin_compositing_helper.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
Index: content/renderer/browser_plugin/browser_plugin_compositing_helper.cc
diff --git a/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc b/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc
index 7d02f31aea9d198a26af657707d29747ba11cc80..c7e1ae88432ec02735720527f98aa4cb5bfcab7b 100644
--- a/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc
+++ b/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc
@@ -8,6 +8,7 @@
#include "cc/layers/solid_color_layer.h"
#include "cc/layers/texture_layer.h"
#include "cc/output/context_provider.h"
+#include "cc/resources/single_release_callback.h"
#include "content/common/browser_plugin/browser_plugin_messages.h"
#include "content/common/gpu/client/context_provider_command_buffer.h"
#include "content/renderer/browser_plugin/browser_plugin_manager.h"
@@ -238,21 +239,20 @@ void BrowserPluginCompositingHelper::OnBuffersSwappedPrivate(
}
cc::TextureMailbox texture_mailbox;
+ scoped_ptr<cc::SingleReleaseCallback> release_callback;
if (current_mailbox_valid) {
- cc::TextureMailbox::ReleaseCallback callback =
+ release_callback = cc::SingleReleaseCallback::Create(
base::Bind(&BrowserPluginCompositingHelper::MailboxReleased,
scoped_refptr<BrowserPluginCompositingHelper>(this),
- mailbox);
- if (is_software_frame) {
- texture_mailbox = cc::TextureMailbox(mailbox.shared_memory,
- mailbox.size, callback);
- } else {
- texture_mailbox = cc::TextureMailbox(mailbox.name, callback, sync_point);
- }
+ mailbox)).Pass();
+ if (is_software_frame)
+ texture_mailbox = cc::TextureMailbox(mailbox.shared_memory, mailbox.size);
+ else
+ texture_mailbox = cc::TextureMailbox(mailbox.name, sync_point);
}
texture_layer_->SetFlipped(!is_software_frame);
- texture_layer_->SetTextureMailbox(texture_mailbox);
+ texture_layer_->SetTextureMailbox(texture_mailbox, release_callback.Pass());
texture_layer_->SetNeedsDisplay();
last_mailbox_valid_ = current_mailbox_valid;
}
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.cc ('k') | content/renderer/pepper/pepper_graphics_2d_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698