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

Unified Diff: ui/compositor/layer.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 | « ui/compositor/layer.h ('k') | webkit/renderer/compositor_bindings/web_external_texture_layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer.cc
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc
index 357a9f9b70e0818982779825f01e703a72a3d2aa..88e51c928319be0e124a272221f6857b7d3ae8f2 100644
--- a/ui/compositor/layer.cc
+++ b/ui/compositor/layer.cc
@@ -503,8 +503,10 @@ void Layer::SetExternalTexture(Texture* texture) {
RecomputeDrawsContentAndUVRect();
}
-void Layer::SetTextureMailbox(const cc::TextureMailbox& mailbox,
- float scale_factor) {
+void Layer::SetTextureMailbox(
+ const cc::TextureMailbox& mailbox,
+ scoped_ptr<cc::SingleReleaseCallback> release_callback,
+ float scale_factor) {
DCHECK_EQ(type_, LAYER_TEXTURED);
DCHECK(!solid_color_layer_.get());
layer_updated_externally_ = true;
@@ -516,7 +518,7 @@ void Layer::SetTextureMailbox(const cc::TextureMailbox& mailbox,
SwitchToLayer(new_layer);
texture_layer_ = new_layer;
}
- texture_layer_->SetTextureMailbox(mailbox);
+ texture_layer_->SetTextureMailbox(mailbox, release_callback.Pass());
mailbox_ = mailbox;
mailbox_scale_factor_ = scale_factor;
RecomputeDrawsContentAndUVRect();
@@ -525,8 +527,7 @@ void Layer::SetTextureMailbox(const cc::TextureMailbox& mailbox,
cc::TextureMailbox Layer::GetTextureMailbox(float* scale_factor) {
if (scale_factor)
*scale_factor = mailbox_scale_factor_;
- cc::TextureMailbox::ReleaseCallback callback;
- return mailbox_.CopyWithNewCallback(callback);
+ return mailbox_;
}
void Layer::SetDelegatedFrame(scoped_ptr<cc::DelegatedFrameData> frame,
@@ -664,8 +665,10 @@ WebKit::WebGraphicsContext3D* Layer::Context3d() {
return NULL;
}
-bool Layer::PrepareTextureMailbox(cc::TextureMailbox* mailbox,
- bool use_shared_memory) {
+bool Layer::PrepareTextureMailbox(
+ cc::TextureMailbox* mailbox,
+ scoped_ptr<cc::SingleReleaseCallback>* release_callback,
+ bool use_shared_memory) {
return false;
}
« no previous file with comments | « ui/compositor/layer.h ('k') | webkit/renderer/compositor_bindings/web_external_texture_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698