| 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 23 matching lines...) Expand all Loading... |
| 34 // Put the texture into the named mailbox. | 34 // Put the texture into the named mailbox. |
| 35 void ProduceTexture(unsigned target, | 35 void ProduceTexture(unsigned target, |
| 36 const Mailbox& mailbox, | 36 const Mailbox& mailbox, |
| 37 Texture* texture); | 37 Texture* texture); |
| 38 | 38 |
| 39 // Returns whether this manager synchronizes with other instances. | 39 // Returns whether this manager synchronizes with other instances. |
| 40 bool UsesSync() { return sync_ != NULL; } | 40 bool UsesSync() { return sync_ != NULL; } |
| 41 | 41 |
| 42 // Used with the MailboxSynchronizer to push/pull texture state to/from | 42 // Used with the MailboxSynchronizer to push/pull texture state to/from |
| 43 // other manager instances. | 43 // other manager instances. |
| 44 void PushTextureUpdates(); | 44 void PushTextureUpdates(uint32 sync_point); |
| 45 void PullTextureUpdates(); | 45 void PullTextureUpdates(uint32 sync_point); |
| 46 | 46 |
| 47 // Destroy any mailbox that reference the given texture. | 47 // Destroy any mailbox that reference the given texture. |
| 48 void TextureDeleted(Texture* texture); | 48 void TextureDeleted(Texture* texture); |
| 49 | 49 |
| 50 private: | 50 private: |
| 51 friend class base::RefCounted<MailboxManager>; | 51 friend class base::RefCounted<MailboxManager>; |
| 52 friend class MailboxSynchronizer; | 52 friend class MailboxSynchronizer; |
| 53 | 53 |
| 54 ~MailboxManager(); | 54 ~MailboxManager(); |
| 55 | 55 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 78 | 78 |
| 79 MailboxSynchronizer* sync_; | 79 MailboxSynchronizer* sync_; |
| 80 | 80 |
| 81 DISALLOW_COPY_AND_ASSIGN(MailboxManager); | 81 DISALLOW_COPY_AND_ASSIGN(MailboxManager); |
| 82 }; | 82 }; |
| 83 } // namespage gles2 | 83 } // namespage gles2 |
| 84 } // namespace gpu | 84 } // namespace gpu |
| 85 | 85 |
| 86 #endif // GPU_COMMAND_BUFFER_SERVICE_MAILBOX_MANAGER_H_ | 86 #endif // GPU_COMMAND_BUFFER_SERVICE_MAILBOX_MANAGER_H_ |
| 87 | 87 |
| OLD | NEW |