Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(687)

Side by Side Diff: gpu/command_buffer/service/mailbox_manager.h

Issue 12612005: Revert 186627 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
11 #include "base/memory/linked_ptr.h" 11 #include "base/memory/linked_ptr.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "crypto/hmac.h" 13 #include "crypto/hmac.h"
14 #include "gpu/command_buffer/common/constants.h" 14 #include "gpu/command_buffer/common/constants.h"
15 #include "gpu/gpu_export.h" 15 #include "gpu/gpu_export.h"
16 16
17 // From gl2/gl2ext.h. 17 // From gl2/gl2ext.h.
18 #ifndef GL_MAILBOX_SIZE_CHROMIUM 18 #ifndef GL_MAILBOX_SIZE_CHROMIUM
19 #define GL_MAILBOX_SIZE_CHROMIUM 64 19 #define GL_MAILBOX_SIZE_CHROMIUM 64
20 #endif 20 #endif
21 21
22 typedef signed char GLbyte; 22 typedef signed char GLbyte;
23 23
24 namespace gpu { 24 namespace gpu {
25
26 struct Mailbox;
27
28 namespace gles2 { 25 namespace gles2 {
29 26
30 class TextureDefinition; 27 class TextureDefinition;
31 class TextureManager; 28 class TextureManager;
32 29
33 // Identifies a mailbox where a texture definition can be stored for 30 // Identifies a mailbox where a texture definition can be stored for
34 // transferring textures between contexts that are not in the same context 31 // transferring textures between contexts that are not in the same context
35 // 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.
36 struct GPU_EXPORT MailboxName { 33 struct GPU_EXPORT MailboxName {
37 MailboxName(); 34 MailboxName();
38 explicit MailboxName(const ::gpu::Mailbox& mailbox);
39 GLbyte key[GL_MAILBOX_SIZE_CHROMIUM / 2]; 35 GLbyte key[GL_MAILBOX_SIZE_CHROMIUM / 2];
40 GLbyte signature[GL_MAILBOX_SIZE_CHROMIUM / 2]; 36 GLbyte signature[GL_MAILBOX_SIZE_CHROMIUM / 2];
41 }; 37 };
42 38
43 // Manages resources scoped beyond the context or context group level. 39 // Manages resources scoped beyond the context or context group level.
44 class GPU_EXPORT MailboxManager : public base::RefCounted<MailboxManager> { 40 class GPU_EXPORT MailboxManager : public base::RefCounted<MailboxManager> {
45 public: 41 public:
46 MailboxManager(); 42 MailboxManager();
47 43
48 // 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
100 TextureDefinitionMap textures_; 96 TextureDefinitionMap textures_;
101 97
102 DISALLOW_COPY_AND_ASSIGN(MailboxManager); 98 DISALLOW_COPY_AND_ASSIGN(MailboxManager);
103 }; 99 };
104 } // namespage gles2 100 } // namespage gles2
105 } // namespace gpu 101 } // namespace gpu
106 102
107 #endif // GPU_COMMAND_BUFFER_SERVICE_MAILBOX_MANAGER_H_ 103 #endif // GPU_COMMAND_BUFFER_SERVICE_MAILBOX_MANAGER_H_
108 104
109 105
OLDNEW
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin_manager_impl.cc ('k') | gpu/command_buffer/service/mailbox_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698