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

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: address review comments 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..dcab38c56efc623e9707473155880c22bd999dfe 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 ?
@@ -901,9 +898,11 @@ TextureDefinition* TextureManager::Save(TextureInfo* info) {
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,
+ info->IsImmutable(),
apatrick_chromium 2012/09/24 23:00:51 Need to call IsImmutable before SetImmutable.
piman 2012/09/24 23:03:37 Doh, thanks, done.
level_infos);
}
@@ -916,9 +915,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 +947,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