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

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

Issue 12321068: Add GL State Restoring Functions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 9 months 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
« no previous file with comments | « gpu/command_buffer/service/texture_manager.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/texture_manager.h" 5 #include "gpu/command_buffer/service/texture_manager.h"
6 #include "base/bits.h" 6 #include "base/bits.h"
7 #include "base/stringprintf.h" 7 #include "base/stringprintf.h"
8 #include "gpu/command_buffer/common/gles2_cmd_utils.h" 8 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
9 #include "gpu/command_buffer/service/feature_info.h" 9 #include "gpu/command_buffer/service/feature_info.h"
10 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 10 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
(...skipping 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after
1099 ++num_unrenderable_textures_; 1099 ++num_unrenderable_textures_;
1100 } 1100 }
1101 if (!info->SafeToRenderFrom()) { 1101 if (!info->SafeToRenderFrom()) {
1102 ++num_unsafe_textures_; 1102 ++num_unsafe_textures_;
1103 } 1103 }
1104 num_uncleared_mips_ += info->num_uncleared_mips(); 1104 num_uncleared_mips_ += info->num_uncleared_mips();
1105 return info.get(); 1105 return info.get();
1106 } 1106 }
1107 1107
1108 TextureManager::TextureInfo* TextureManager::GetTextureInfo( 1108 TextureManager::TextureInfo* TextureManager::GetTextureInfo(
1109 GLuint client_id) { 1109 GLuint client_id) const {
1110 TextureInfoMap::iterator it = texture_infos_.find(client_id); 1110 TextureInfoMap::const_iterator it = texture_infos_.find(client_id);
1111 return it != texture_infos_.end() ? it->second : NULL; 1111 return it != texture_infos_.end() ? it->second : NULL;
1112 } 1112 }
1113 1113
1114 void TextureManager::RemoveTextureInfo(GLuint client_id) { 1114 void TextureManager::RemoveTextureInfo(GLuint client_id) {
1115 TextureInfoMap::iterator it = texture_infos_.find(client_id); 1115 TextureInfoMap::iterator it = texture_infos_.find(client_id);
1116 if (it != texture_infos_.end()) { 1116 if (it != texture_infos_.end()) {
1117 TextureInfo* info = it->second; 1117 TextureInfo* info = it->second;
1118 info->MarkAsDeleted(); 1118 info->MarkAsDeleted();
1119 texture_infos_.erase(it); 1119 texture_infos_.erase(it);
1120 } 1120 }
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
1245 tex_define_params.border, 1245 tex_define_params.border,
1246 tex_define_params.format, 1246 tex_define_params.format,
1247 tex_define_params.type, 1247 tex_define_params.type,
1248 true); // cleared 1248 true); // cleared
1249 pending_async_transfers_.pop_front(); 1249 pending_async_transfers_.pop_front();
1250 } 1250 }
1251 } 1251 }
1252 1252
1253 } // namespace gles2 1253 } // namespace gles2
1254 } // namespace gpu 1254 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/texture_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698