summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/service/texture_manager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gpu/command_buffer/service/texture_manager.cc')
-rw-r--r--gpu/command_buffer/service/texture_manager.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/gpu/command_buffer/service/texture_manager.cc b/gpu/command_buffer/service/texture_manager.cc
index d6a1dce..4369199 100644
--- a/gpu/command_buffer/service/texture_manager.cc
+++ b/gpu/command_buffer/service/texture_manager.cc
@@ -265,12 +265,13 @@ TextureManager::TextureManager(
max_cube_map_texture_size)) {
}
-void TextureManager::CreateTextureInfo(GLuint texture_id) {
+TextureManager::TextureInfo* TextureManager::CreateTextureInfo(
+ GLuint texture_id) {
+ TextureInfo::Ref info(new TextureInfo(texture_id));
std::pair<TextureInfoMap::iterator, bool> result =
- texture_infos_.insert(
- std::make_pair(texture_id,
- TextureInfo::Ref(new TextureInfo(texture_id))));
+ texture_infos_.insert(std::make_pair(texture_id, info));
DCHECK(result.second);
+ return info.get();
}
TextureManager::TextureInfo* TextureManager::GetTextureInfo(