OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CC_RESOURCES_TEXTURE_MAILBOX_H_ | 5 #ifndef CC_RESOURCES_TEXTURE_MAILBOX_H_ |
6 #define CC_RESOURCES_TEXTURE_MAILBOX_H_ | 6 #define CC_RESOURCES_TEXTURE_MAILBOX_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | |
11 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
12 #include "cc/base/cc_export.h" | 11 #include "cc/base/cc_export.h" |
13 #include "gpu/command_buffer/common/mailbox_holder.h" | 12 #include "gpu/command_buffer/common/mailbox_holder.h" |
14 #include "ui/gfx/size.h" | 13 #include "ui/gfx/geometry/size.h" |
15 | 14 |
16 namespace cc { | 15 namespace cc { |
17 | 16 |
18 // TODO(skaslev, danakj) Rename this class more apropriately since now it | 17 // TODO(skaslev, danakj) Rename this class more apropriately since now it |
19 // can hold a shared memory resource as well as a texture mailbox. | 18 // can hold a shared memory resource as well as a texture mailbox. |
20 class CC_EXPORT TextureMailbox { | 19 class CC_EXPORT TextureMailbox { |
21 public: | 20 public: |
22 TextureMailbox(); | 21 TextureMailbox(); |
23 explicit TextureMailbox(const gpu::MailboxHolder& mailbox_holder); | 22 explicit TextureMailbox(const gpu::MailboxHolder& mailbox_holder); |
24 TextureMailbox(const gpu::Mailbox& mailbox, uint32 target, uint32 sync_point); | 23 TextureMailbox(const gpu::Mailbox& mailbox, uint32 target, uint32 sync_point); |
(...skipping 25 matching lines...) Expand all Loading... |
50 private: | 49 private: |
51 gpu::MailboxHolder mailbox_holder_; | 50 gpu::MailboxHolder mailbox_holder_; |
52 base::SharedMemory* shared_memory_; | 51 base::SharedMemory* shared_memory_; |
53 gfx::Size shared_memory_size_; | 52 gfx::Size shared_memory_size_; |
54 bool allow_overlay_; | 53 bool allow_overlay_; |
55 }; | 54 }; |
56 | 55 |
57 } // namespace cc | 56 } // namespace cc |
58 | 57 |
59 #endif // CC_RESOURCES_TEXTURE_MAILBOX_H_ | 58 #endif // CC_RESOURCES_TEXTURE_MAILBOX_H_ |
OLD | NEW |