Chromium Code Reviews| OLD | NEW |
|---|---|
| 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" |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 22 // Look up the texture definition from the named mailbox. | 22 // Look up the texture definition from the named mailbox. |
| 23 virtual Texture* ConsumeTexture(const Mailbox& mailbox) = 0; | 23 virtual Texture* ConsumeTexture(const Mailbox& mailbox) = 0; |
| 24 | 24 |
| 25 // Put the texture into the named mailbox. | 25 // Put the texture into the named mailbox. |
| 26 virtual void ProduceTexture(const Mailbox& mailbox, Texture* texture) = 0; | 26 virtual void ProduceTexture(const Mailbox& mailbox, Texture* texture) = 0; |
| 27 | 27 |
| 28 // If |true| then Pull/PushTextureUpdates() needs to be called. | 28 // If |true| then Pull/PushTextureUpdates() needs to be called. |
| 29 virtual bool UsesSync() = 0; | 29 virtual bool UsesSync() = 0; |
| 30 | 30 |
| 31 // Used to synchronize texture state across share groups. | 31 // Used to synchronize texture state across share groups. |
| 32 virtual void PushTextureUpdates(uint32 sync_point) = 0; | 32 virtual void PushTextureUpdates(int channel_client_id, |
| 33 virtual void PullTextureUpdates(uint32 sync_point) = 0; | 33 uint32 route_id, |
| 34 uint32 release) = 0; | |
|
piman
2015/09/10 23:55:32
nit: Maybe you can pass a const SyncToken& here an
David Yen
2015/09/23 18:30:34
Done.
| |
| 35 virtual void PullTextureUpdates(int channel_client_id, | |
| 36 uint32 route_id, | |
| 37 uint32 release) = 0; | |
| 34 | 38 |
| 35 // Destroy any mailbox that reference the given texture. | 39 // Destroy any mailbox that reference the given texture. |
| 36 virtual void TextureDeleted(Texture* texture) = 0; | 40 virtual void TextureDeleted(Texture* texture) = 0; |
| 37 | 41 |
| 38 protected: | 42 protected: |
| 39 MailboxManager() {} | 43 MailboxManager() {} |
| 40 virtual ~MailboxManager() {} | 44 virtual ~MailboxManager() {} |
| 41 | 45 |
| 42 private: | 46 private: |
| 43 friend class base::RefCounted<MailboxManager>; | 47 friend class base::RefCounted<MailboxManager>; |
| 44 | 48 |
| 45 DISALLOW_COPY_AND_ASSIGN(MailboxManager); | 49 DISALLOW_COPY_AND_ASSIGN(MailboxManager); |
| 46 }; | 50 }; |
| 47 | 51 |
| 48 } // namespage gles2 | 52 } // namespage gles2 |
| 49 } // namespace gpu | 53 } // namespace gpu |
| 50 | 54 |
| 51 #endif // GPU_COMMAND_BUFFER_SERVICE_MAILBOX_MANAGER_H_ | 55 #endif // GPU_COMMAND_BUFFER_SERVICE_MAILBOX_MANAGER_H_ |
| 52 | 56 |
| OLD | NEW |