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 #include "gpu/command_buffer/service/mailbox_manager.h" | 5 #include "gpu/command_buffer/service/mailbox_manager.h" |
6 | 6 |
7 #include "base/rand_util.h" | 7 #include "base/rand_util.h" |
8 #include "crypto/hmac.h" | 8 #include "crypto/hmac.h" |
9 #include "gpu/command_buffer/service/gl_utils.h" | 9 #include "gpu/command_buffer/service/gl_utils.h" |
10 #include "gpu/command_buffer/service/texture_definition.h" | 10 #include "gpu/command_buffer/service/texture_definition.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 return true; | 70 return true; |
71 } | 71 } |
72 | 72 |
73 void MailboxManager::DestroyOwnedTextures(TextureManager* owner, | 73 void MailboxManager::DestroyOwnedTextures(TextureManager* owner, |
74 bool have_context) { | 74 bool have_context) { |
75 TextureDefinitionMap::iterator it = textures_.begin(); | 75 TextureDefinitionMap::iterator it = textures_.begin(); |
76 while (it != textures_.end()) { | 76 while (it != textures_.end()) { |
77 TextureDefinitionMap::iterator current_it = it; | 77 TextureDefinitionMap::iterator current_it = it; |
78 ++it; | 78 ++it; |
79 if (current_it->second.owner == owner) { | 79 if (current_it->second.owner == owner) { |
80 NOTREACHED(); | |
81 GLuint service_id = current_it->second.definition->ReleaseServiceId(); | 80 GLuint service_id = current_it->second.definition->ReleaseServiceId(); |
82 if (have_context) | 81 if (have_context) |
83 glDeleteTextures(1, &service_id); | 82 glDeleteTextures(1, &service_id); |
84 textures_.erase(current_it); | 83 textures_.erase(current_it); |
85 } | 84 } |
86 } | 85 } |
87 } | 86 } |
88 | 87 |
89 void MailboxManager::SignMailboxName(MailboxName* name) { | 88 void MailboxManager::SignMailboxName(MailboxName* name) { |
90 bool success = hmac_.Sign( | 89 bool success = hmac_.Sign( |
(...skipping 26 matching lines...) Expand all Loading... |
117 TextureManager* owner) | 116 TextureManager* owner) |
118 : definition(definition), | 117 : definition(definition), |
119 owner(owner) { | 118 owner(owner) { |
120 } | 119 } |
121 | 120 |
122 MailboxManager::OwnedTextureDefinition::~OwnedTextureDefinition() { | 121 MailboxManager::OwnedTextureDefinition::~OwnedTextureDefinition() { |
123 } | 122 } |
124 | 123 |
125 } // namespace gles2 | 124 } // namespace gles2 |
126 } // namespace gpu | 125 } // namespace gpu |
OLD | NEW |