diff options
Diffstat (limited to 'chromium/cc/resources/texture_mailbox.h')
-rw-r--r-- | chromium/cc/resources/texture_mailbox.h | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/chromium/cc/resources/texture_mailbox.h b/chromium/cc/resources/texture_mailbox.h index 855287df2d1..a9b021b2390 100644 --- a/chromium/cc/resources/texture_mailbox.h +++ b/chromium/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(); @@ -47,12 +40,9 @@ class CC_EXPORT TextureMailbox { bool ContainsMailbox(const gpu::Mailbox&) const; bool ContainsHandle(base::SharedMemoryHandle handle) const; - const ReleaseCallback& callback() const { return callback_; } const int8* data() const { return name_.name; } const gpu::Mailbox& name() const { return name_; } void ResetSyncPoint() { sync_point_ = 0; } - void RunReleaseCallback(unsigned sync_point, bool lost_resource) const; - void SetName(const gpu::Mailbox&); unsigned target() const { return target_; } unsigned sync_point() const { return sync_point_; } @@ -60,11 +50,12 @@ class CC_EXPORT TextureMailbox { gfx::Size shared_memory_size() const { return shared_memory_size_; } size_t shared_memory_size_in_bytes() const; - TextureMailbox CopyWithNewCallback(const ReleaseCallback& callback) const; + // TODO(danakj): ReleaseCallback should be separate from this class, and stop + // storing a TextureMailbox in ResourceProvider. Then we can remove this. + void SetName(const gpu::Mailbox& name); private: gpu::Mailbox name_; - ReleaseCallback callback_; unsigned target_; unsigned sync_point_; base::SharedMemory* shared_memory_; |