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

Unified Diff: gpu/command_buffer/service/texture_manager.cc

Issue 9968113: Addition of GL_CHROMIUM_copy_texture extension. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Correcting glEnableVertexAttribArray state. Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698