Chromium Code Reviews| Index: cc/texture_mailbox.h |
| diff --git a/cc/texture_mailbox.h b/cc/texture_mailbox.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..70ebccdfcfae89d68a7f2fbfc367a78582a8e22e |
| --- /dev/null |
| +++ b/cc/texture_mailbox.h |
| @@ -0,0 +1,42 @@ |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CC_TEXTURE_MAILBOX_H_ |
| +#define CC_TEXTURE_MAILBOX_H_ |
| + |
| +#include <string> |
| + |
| +#include "base/basictypes.h" |
| +#include "base/callback.h" |
| +#include "cc/cc_export.h" |
| +#include "cc/transferable_resource.h" |
| + |
| +namespace cc { |
| + |
| +class CC_EXPORT TextureMailbox { |
| + public: |
| + typedef base::Callback<void(unsigned)> ReleaseCallback; |
| + TextureMailbox(); |
| + TextureMailbox(const std::string& name, |
|
danakj
2013/01/18 00:13:08
nit: same variable name as the .cc
|
| + const ReleaseCallback& callback); |
| + TextureMailbox(const Mailbox& name, |
| + const ReleaseCallback& callback); |
| + ~TextureMailbox(); |
| + |
| + const ReleaseCallback& callback() const { return callback_; } |
| + const int8* data() const { return name_.name; } |
| + bool Equals(const TextureMailbox&) const; |
| + bool IsEmpty() const; |
| + const Mailbox& name() const { return name_; } |
| + void RunReleaseCallback(unsigned sync_point) const; |
| + void SetName(const Mailbox&); |
| + |
| + private: |
| + Mailbox name_; |
| + ReleaseCallback callback_; |
| +}; |
| + |
| +} // namespace cc |
| + |
| +#endif // CC_TEXTURE_MAILBOX_H_ |