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

Unified Diff: cc/resources/texture_mailbox.h

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/resources/single_release_callback.cc ('k') | cc/resources/texture_mailbox.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/texture_mailbox.h
diff --git a/cc/resources/texture_mailbox.h b/cc/resources/texture_mailbox.h
index 94909392976a51b7c3cb440f370699608dfb4038..a9b021b2390bc7d2fcd5e6603463a4b92192b787 100644
--- a/cc/resources/texture_mailbox.h
+++ b/cc/resources/texture_mailbox.h
@@ -19,23 +19,16 @@ namespace cc {
// can hold a shared memory resource as well as a texture mailbox.
class CC_EXPORT TextureMailbox {
public:
- typedef base::Callback<void(unsigned sync_point,
- bool lost_resource)> ReleaseCallback;
TextureMailbox();
- TextureMailbox(const std::string& mailbox_name,
- const ReleaseCallback& callback);
+ explicit TextureMailbox(const std::string& mailbox_name);
+ explicit TextureMailbox(const gpu::Mailbox& mailbox_name);
TextureMailbox(const gpu::Mailbox& mailbox_name,
- const ReleaseCallback& callback);
- TextureMailbox(const gpu::Mailbox& mailbox_name,
- const ReleaseCallback& callback,
unsigned sync_point);
TextureMailbox(const gpu::Mailbox& mailbox_name,
- const ReleaseCallback& callback,
unsigned texture_target,
unsigned sync_point);
TextureMailbox(base::SharedMemory* shared_memory,
- gfx::Size size,
- const ReleaseCallback& callback);
+ gfx::Size size);
~TextureMailbox();
@@ -61,16 +54,8 @@ class CC_EXPORT TextureMailbox {
// storing a TextureMailbox in ResourceProvider. Then we can remove this.
void SetName(const gpu::Mailbox& name);
- // TODO(danakj): ReleaseCallback should be a separate scoped_ptr outside this
- // class to avoid silently adding references to the callback's internals.
- void RunReleaseCallback(unsigned sync_point, bool lost_resource);
-
- TextureMailbox CopyWithNewCallback(const ReleaseCallback& callback) const;
- const ReleaseCallback& callback() const { return callback_; }
-
private:
gpu::Mailbox name_;
- ReleaseCallback callback_;
unsigned target_;
unsigned sync_point_;
base::SharedMemory* shared_memory_;
« no previous file with comments | « cc/resources/single_release_callback.cc ('k') | cc/resources/texture_mailbox.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698