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

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

Issue 1331843005: Implemented new fence syncs which replaces the old sync points. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reverted mojo readme, changed wait() to take a pointer Created 5 years, 2 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "gpu/command_buffer/common/mailbox.h" 9 #include "gpu/command_buffer/common/mailbox.h"
10 #include "gpu/gpu_export.h" 10 #include "gpu/gpu_export.h"
11 11
12 namespace gpu { 12 namespace gpu {
13 namespace gles2 { 13 namespace gles2 {
14 14
15 class Texture; 15 class Texture;
16 struct SyncToken;
16 17
17 // Manages resources scoped beyond the context or context group level. 18 // Manages resources scoped beyond the context or context group level.
18 class GPU_EXPORT MailboxManager : public base::RefCounted<MailboxManager> { 19 class GPU_EXPORT MailboxManager : public base::RefCounted<MailboxManager> {
19 public: 20 public:
20 static scoped_refptr<MailboxManager> Create(); 21 static scoped_refptr<MailboxManager> Create();
21 22
22 // Look up the texture definition from the named mailbox. 23 // Look up the texture definition from the named mailbox.
23 virtual Texture* ConsumeTexture(const Mailbox& mailbox) = 0; 24 virtual Texture* ConsumeTexture(const Mailbox& mailbox) = 0;
24 25
25 // Put the texture into the named mailbox. 26 // Put the texture into the named mailbox.
26 virtual void ProduceTexture(const Mailbox& mailbox, Texture* texture) = 0; 27 virtual void ProduceTexture(const Mailbox& mailbox, Texture* texture) = 0;
27 28
28 // If |true| then Pull/PushTextureUpdates() needs to be called. 29 // If |true| then Pull/PushTextureUpdates() needs to be called.
29 virtual bool UsesSync() = 0; 30 virtual bool UsesSync() = 0;
30 31
31 // Used to synchronize texture state across share groups. 32 // Used to synchronize texture state across share groups.
32 virtual void PushTextureUpdates(uint32 sync_point) = 0; 33 virtual void PushTextureUpdates(const SyncToken& token) = 0;
33 virtual void PullTextureUpdates(uint32 sync_point) = 0; 34 virtual void PullTextureUpdates(const SyncToken& token) = 0;
34 35
35 // Destroy any mailbox that reference the given texture. 36 // Destroy any mailbox that reference the given texture.
36 virtual void TextureDeleted(Texture* texture) = 0; 37 virtual void TextureDeleted(Texture* texture) = 0;
37 38
38 protected: 39 protected:
39 MailboxManager() {} 40 MailboxManager() {}
40 virtual ~MailboxManager() {} 41 virtual ~MailboxManager() {}
41 42
42 private: 43 private:
43 friend class base::RefCounted<MailboxManager>; 44 friend class base::RefCounted<MailboxManager>;
44 45
45 DISALLOW_COPY_AND_ASSIGN(MailboxManager); 46 DISALLOW_COPY_AND_ASSIGN(MailboxManager);
46 }; 47 };
47 48
48 } // namespage gles2 49 } // namespage gles2
49 } // namespace gpu 50 } // namespace gpu
50 51
51 #endif // GPU_COMMAND_BUFFER_SERVICE_MAILBOX_MANAGER_H_ 52 #endif // GPU_COMMAND_BUFFER_SERVICE_MAILBOX_MANAGER_H_
52 53
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/in_process_command_buffer.cc ('k') | gpu/command_buffer/service/mailbox_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698