| 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_SYNC_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_MAILBOX_MANAGER_SYNC_H_ |
| 6 #define GPU_COMMAND_BUFFER_SERVICE_MAILBOX_MANAGER_SYNC_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_MAILBOX_MANAGER_SYNC_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 TextureList textures_; | 72 TextureList textures_; |
| 73 TextureDefinition definition_; | 73 TextureDefinition definition_; |
| 74 | 74 |
| 75 typedef std::map<Mailbox, scoped_refptr<TextureGroup>> | 75 typedef std::map<Mailbox, scoped_refptr<TextureGroup>> |
| 76 MailboxToGroupMap; | 76 MailboxToGroupMap; |
| 77 static base::LazyInstance<MailboxToGroupMap> mailbox_to_group_; | 77 static base::LazyInstance<MailboxToGroupMap> mailbox_to_group_; |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 struct TextureGroupRef { | 80 struct TextureGroupRef { |
| 81 TextureGroupRef(unsigned version, TextureGroup* group); | 81 TextureGroupRef(unsigned version, TextureGroup* group); |
| 82 TextureGroupRef(const TextureGroupRef& other); |
| 82 ~TextureGroupRef(); | 83 ~TextureGroupRef(); |
| 83 unsigned version; | 84 unsigned version; |
| 84 scoped_refptr<TextureGroup> group; | 85 scoped_refptr<TextureGroup> group; |
| 85 }; | 86 }; |
| 86 static void UpdateDefinitionLocked(Texture* texture, | 87 static void UpdateDefinitionLocked(Texture* texture, |
| 87 TextureGroupRef* group_ref); | 88 TextureGroupRef* group_ref); |
| 88 | 89 |
| 89 typedef std::map<Texture*, TextureGroupRef> TextureToGroupMap; | 90 typedef std::map<Texture*, TextureGroupRef> TextureToGroupMap; |
| 90 TextureToGroupMap texture_to_group_; | 91 TextureToGroupMap texture_to_group_; |
| 91 | 92 |
| 92 DISALLOW_COPY_AND_ASSIGN(MailboxManagerSync); | 93 DISALLOW_COPY_AND_ASSIGN(MailboxManagerSync); |
| 93 }; | 94 }; |
| 94 | 95 |
| 95 } // namespage gles2 | 96 } // namespage gles2 |
| 96 } // namespace gpu | 97 } // namespace gpu |
| 97 | 98 |
| 98 #endif // GPU_COMMAND_BUFFER_SERVICE_MAILBOX_MANAGER_SYNC_H_ | 99 #endif // GPU_COMMAND_BUFFER_SERVICE_MAILBOX_MANAGER_SYNC_H_ |
| 99 | 100 |
| OLD | NEW |