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

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: 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..92c87762ee4ce1933efa0c08559e993f7b4ce5a7 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 ?
@@ -904,6 +901,7 @@ TextureDefinition* TextureManager::Save(TextureInfo* info) {
return new TextureDefinition(info->target(),
old_service_id,
+ info->IsImmutable(),
level_infos);
}
@@ -916,8 +914,8 @@ bool TextureManager::Restore(TextureInfo* info,
if (info->IsAttachedToFramebuffer())
return false;
- if (info->IsImmutable())
- return false;
+ //if (info->IsImmutable())
apatrick_chromium 2012/09/24 22:55:16 This can be deleted.
piman 2012/09/24 22:59:50 Of course! Done.
+ // return false;
if (info->target() != definition->target())
return false;
@@ -951,6 +949,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