Index: gpu/command_buffer/service/texture_manager.cc |
=================================================================== |
--- gpu/command_buffer/service/texture_manager.cc (revision 132190) |
+++ gpu/command_buffer/service/texture_manager.cc (working copy) |
@@ -326,6 +326,21 @@ |
return false; |
} |
+bool TextureManager::TextureInfo::SetLevelSize( |
greggman
2012/04/17 04:58:06
Honestly, I feel like it might be better if you de
|
+ GLint face, GLint level, GLsizei width, GLsizei height) { |
+ size_t face_index = GLTargetToFaceIndex(face); |
+ if (level >= 0 && face_index < level_infos_.size() && |
+ static_cast<size_t>(level) < level_infos_[face_index].size()) { |
+ LevelInfo& info = level_infos_[face_index][level]; |
+ if (info.target!= 0) { |
+ info.width = width; |
+ info.height = height; |
+ return true; |
+ } |
+ } |
+ return false; |
+} |
+ |
bool TextureManager::TextureInfo::GetLevelType( |
GLint face, GLint level, GLenum* type, GLenum* internal_format) const { |
DCHECK(type); |
@@ -333,7 +348,7 @@ |
size_t face_index = GLTargetToFaceIndex(face); |
if (level >= 0 && face_index < level_infos_.size() && |
static_cast<size_t>(level) < level_infos_[face_index].size()) { |
- const LevelInfo& info = level_infos_[GLTargetToFaceIndex(face)][level]; |
+ const LevelInfo& info = level_infos_[face_index][level]; |
if (info.target != 0) { |
*type = info.type; |
*internal_format = info.internal_format; |