OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 GPU_COMMAND_BUFFER_SERVICE_MAILBOX_MANAGER_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_MAILBOX_MANAGER_H_ |
6 #define GPU_COMMAND_BUFFER_SERVICE_MAILBOX_MANAGER_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_MAILBOX_MANAGER_H_ |
7 | 7 |
8 #include <functional> | 8 #include <functional> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 namespace gpu { | 24 namespace gpu { |
25 namespace gles2 { | 25 namespace gles2 { |
26 | 26 |
27 class TextureDefinition; | 27 class TextureDefinition; |
28 class TextureManager; | 28 class TextureManager; |
29 | 29 |
30 // Identifies a mailbox where a texture definition can be stored for | 30 // Identifies a mailbox where a texture definition can be stored for |
31 // transferring textures between contexts that are not in the same context | 31 // transferring textures between contexts that are not in the same context |
32 // group. It is a random key signed with a hash of a private key. | 32 // group. It is a random key signed with a hash of a private key. |
33 struct MailboxName { | 33 struct GPU_EXPORT MailboxName { |
| 34 MailboxName(); |
34 GLbyte key[GL_MAILBOX_SIZE_CHROMIUM / 2]; | 35 GLbyte key[GL_MAILBOX_SIZE_CHROMIUM / 2]; |
35 GLbyte signature[GL_MAILBOX_SIZE_CHROMIUM / 2]; | 36 GLbyte signature[GL_MAILBOX_SIZE_CHROMIUM / 2]; |
36 }; | 37 }; |
37 | 38 |
38 // Manages resources scoped beyond the context or context group level. | 39 // Manages resources scoped beyond the context or context group level. |
39 class GPU_EXPORT MailboxManager : public base::RefCounted<MailboxManager> { | 40 class GPU_EXPORT MailboxManager : public base::RefCounted<MailboxManager> { |
40 public: | 41 public: |
41 MailboxManager(); | 42 MailboxManager(); |
42 | 43 |
43 // Generate a unique mailbox name signed with the manager's private key. | 44 // Generate a unique mailbox name signed with the manager's private key. |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 TextureDefinitionMap textures_; | 96 TextureDefinitionMap textures_; |
96 | 97 |
97 DISALLOW_COPY_AND_ASSIGN(MailboxManager); | 98 DISALLOW_COPY_AND_ASSIGN(MailboxManager); |
98 }; | 99 }; |
99 } // namespage gles2 | 100 } // namespage gles2 |
100 } // namespace gpu | 101 } // namespace gpu |
101 | 102 |
102 #endif // GPU_COMMAND_BUFFER_SERVICE_MAILBOX_MANAGER_H_ | 103 #endif // GPU_COMMAND_BUFFER_SERVICE_MAILBOX_MANAGER_H_ |
103 | 104 |
104 | 105 |
OLD | NEW |