Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CC_TEXTURE_MAILBOX_H_ | |
| 6 #define CC_TEXTURE_MAILBOX_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/basictypes.h" | |
| 11 #include "base/callback.h" | |
| 12 #include "cc/cc_export.h" | |
| 13 #include "cc/transferable_resource.h" | |
| 14 | |
| 15 namespace cc { | |
| 16 | |
| 17 class CC_EXPORT TextureMailbox { | |
| 18 public: | |
| 19 typedef base::Callback<void(unsigned)> ReleaseCallback; | |
| 20 TextureMailbox(); | |
| 21 TextureMailbox(const std::string& name, | |
| 22 const ReleaseCallback& callback); | |
| 23 TextureMailbox(const Mailbox& name, | |
| 24 const ReleaseCallback& callback); | |
| 25 ~TextureMailbox(); | |
| 26 | |
| 27 const ReleaseCallback& callback() const { return callback_; } | |
| 28 const int8* data() const { return name_.name; } | |
| 29 bool Equals(const TextureMailbox&) const; | |
| 30 bool IsEmpty() const; | |
| 31 const Mailbox& name() const { return name_; } | |
| 32 void RunReleaseCallback(unsigned sync_point) const; | |
| 33 void SetName(const int8* data); | |
|
piman
2013/01/17 21:30:01
Can we make this take a Mailbox as well? I think i
alexst (slow to review)
2013/01/17 22:10:11
Done.
| |
| 34 | |
| 35 private: | |
| 36 Mailbox name_; | |
| 37 ReleaseCallback callback_; | |
| 38 }; | |
| 39 | |
| 40 } // namespace cc | |
| 41 | |
| 42 #endif // CC_TEXTURE_MAILBOX_H_ | |
| OLD | NEW |