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

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

Issue 11194042: Implement TextureImageTransportSurface using texture mailbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased, fixed post sub buffer, use multiple mailbox names Created 8 years, 1 month 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 | Annotate | Revision Log
OLDNEW
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 18 matching lines...) Expand all
29 SignMailboxName(name); 29 SignMailboxName(name);
30 } 30 }
31 31
32 TextureDefinition* MailboxManager::ConsumeTexture(unsigned target, 32 TextureDefinition* MailboxManager::ConsumeTexture(unsigned target,
33 const MailboxName& name) { 33 const MailboxName& name) {
34 if (!IsMailboxNameValid(name)) 34 if (!IsMailboxNameValid(name))
35 return NULL; 35 return NULL;
36 36
37 TextureDefinitionMap::iterator it = 37 TextureDefinitionMap::iterator it =
38 textures_.find(TargetName(target, name)); 38 textures_.find(TargetName(target, name));
39 if (it == textures_.end()) { 39 if (it == textures_.end()) {
piman 2012/11/09 22:02:01 nit: no need for braces any more.
no sievers 2012/11/19 20:30:44 Done.
40 NOTREACHED();
41 return NULL; 40 return NULL;
42 } 41 }
43 42
44 TextureDefinition* definition = it->second.definition.release(); 43 TextureDefinition* definition = it->second.definition.release();
45 textures_.erase(it); 44 textures_.erase(it);
46 45
47 return definition; 46 return definition;
48 } 47 }
49 48
50 bool MailboxManager::ProduceTexture(unsigned target, 49 bool MailboxManager::ProduceTexture(unsigned target,
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 TextureManager* owner) 115 TextureManager* owner)
117 : definition(definition), 116 : definition(definition),
118 owner(owner) { 117 owner(owner) {
119 } 118 }
120 119
121 MailboxManager::OwnedTextureDefinition::~OwnedTextureDefinition() { 120 MailboxManager::OwnedTextureDefinition::~OwnedTextureDefinition() {
122 } 121 }
123 122
124 } // namespace gles2 123 } // namespace gles2
125 } // namespace gpu 124 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698