Index: cc/resources/texture_mailbox.h |
diff --git a/cc/resources/texture_mailbox.h b/cc/resources/texture_mailbox.h |
index a9b021b2390bc7d2fcd5e6603463a4b92192b787..3229028a3845e9aa801e8cf5885ce2cdf0cfb85d 100644 |
--- a/cc/resources/texture_mailbox.h |
+++ b/cc/resources/texture_mailbox.h |
@@ -20,44 +20,29 @@ namespace cc { |
class CC_EXPORT TextureMailbox { |
public: |
TextureMailbox(); |
- explicit TextureMailbox(const std::string& mailbox_name); |
- explicit TextureMailbox(const gpu::Mailbox& mailbox_name); |
- TextureMailbox(const gpu::Mailbox& mailbox_name, |
- unsigned sync_point); |
- TextureMailbox(const gpu::Mailbox& mailbox_name, |
- unsigned texture_target, |
- unsigned sync_point); |
- TextureMailbox(base::SharedMemory* shared_memory, |
- gfx::Size size); |
+ explicit TextureMailbox(const gpu::MailboxHolder& mailbox_holder); |
+ TextureMailbox(const gpu::Mailbox& mailbox, uint32 target, uint32 sync_point); |
+ TextureMailbox(base::SharedMemory* shared_memory, gfx::Size size); |
~TextureMailbox(); |
bool IsValid() const { return IsTexture() || IsSharedMemory(); } |
- bool IsTexture() const { return !name_.IsZero(); } |
+ bool IsTexture() const { return !mailbox_holder_.mailbox.IsZero(); } |
bool IsSharedMemory() const { return shared_memory_ != NULL; } |
bool Equals(const TextureMailbox&) const; |
- bool ContainsMailbox(const gpu::Mailbox&) const; |
- bool ContainsHandle(base::SharedMemoryHandle handle) const; |
- const int8* data() const { return name_.name; } |
- const gpu::Mailbox& name() const { return name_; } |
- void ResetSyncPoint() { sync_point_ = 0; } |
- unsigned target() const { return target_; } |
- unsigned sync_point() const { return sync_point_; } |
+ const gpu::Mailbox mailbox() const { return mailbox_holder_.mailbox; } |
+ uint32 target() const { return mailbox_holder_.texture_target; } |
+ uint32 sync_point() const { return mailbox_holder_.sync_point; } |
+ void set_sync_point(uint32 sync_point); |
danakj
2014/01/06 20:13:42
make this method inline as the name suggests it wi
sheu
2014/01/06 22:44:44
Done.
|
base::SharedMemory* shared_memory() const { return shared_memory_; } |
gfx::Size shared_memory_size() const { return shared_memory_size_; } |
size_t shared_memory_size_in_bytes() 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_; |
- unsigned target_; |
- unsigned sync_point_; |
+ gpu::MailboxHolder mailbox_holder_; |
base::SharedMemory* shared_memory_; |
gfx::Size shared_memory_size_; |
}; |