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

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

Issue 10984009: Allow immutable textures into mailboxes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix spec Created 8 years, 3 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
« no previous file with comments | « gpu/command_buffer/service/texture_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/texture_manager.cc
diff --git a/gpu/command_buffer/service/texture_manager.cc b/gpu/command_buffer/service/texture_manager.cc
index 3c30519e9ff9134fc22326279883322d6ff449cb..aa786680bd78e103315c01df0b1ef9751d96427c 100644
--- a/gpu/command_buffer/service/texture_manager.cc
+++ b/gpu/command_buffer/service/texture_manager.cc
@@ -861,9 +861,6 @@ TextureDefinition* TextureManager::Save(TextureInfo* info) {
if (info->IsAttachedToFramebuffer())
return NULL;
- if (info->IsImmutable())
- return NULL;
-
TextureDefinition::LevelInfos level_infos(info->level_infos_.size());
for (size_t face = 0; face < level_infos.size(); ++face) {
GLenum target = info->target() == GL_TEXTURE_2D ?
@@ -897,13 +894,16 @@ TextureDefinition* TextureManager::Save(TextureInfo* info) {
}
GLuint old_service_id = info->service_id();
+ bool immutable = info->IsImmutable();
GLuint new_service_id = 0;
glGenTextures(1, &new_service_id);
info->SetServiceId(new_service_id);
+ info->SetImmutable(false);
return new TextureDefinition(info->target(),
old_service_id,
+ immutable,
level_infos);
}
@@ -916,9 +916,6 @@ bool TextureManager::Restore(TextureInfo* info,
if (info->IsAttachedToFramebuffer())
return false;
- if (info->IsImmutable())
- return false;
-
if (info->target() != definition->target())
return false;
@@ -951,6 +948,7 @@ bool TextureManager::Restore(TextureInfo* info,
GLuint old_service_id = info->service_id();
glDeleteTextures(1, &old_service_id);
info->SetServiceId(definition->ReleaseServiceId());
+ info->SetImmutable(definition->immutable());
return true;
}
« 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