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 853e9f390ceeba93b4c301dff516cc436f2bb1d4..51e465715edc4b2e70121bc208244e0168864629 100644 |
--- a/gpu/command_buffer/service/texture_manager.cc |
+++ b/gpu/command_buffer/service/texture_manager.cc |
@@ -975,21 +975,29 @@ TextureDefinition* TextureManager::Save(Texture* texture) { |
GLuint old_service_id = texture->service_id(); |
bool immutable = texture->IsImmutable(); |
+ bool stream_texture = texture->IsStreamTexture(); |
GLuint new_service_id = 0; |
glGenTextures(1, &new_service_id); |
texture->SetServiceId(new_service_id); |
texture->SetImmutable(false); |
- |
- return new TextureDefinition(texture->target(), |
- old_service_id, |
- texture->min_filter(), |
- texture->mag_filter(), |
- texture->wrap_s(), |
- texture->wrap_t(), |
- texture->usage(), |
- immutable, |
- level_infos); |
+ texture->SetStreamTexture(false); |
+ |
+ scoped_ptr<TextureDefinition> definition( |
+ new TextureDefinition(texture->target(), |
+ old_service_id, |
+ texture->min_filter(), |
+ texture->mag_filter(), |
+ texture->wrap_s(), |
+ texture->wrap_t(), |
+ texture->usage(), |
+ immutable, |
+ level_infos)); |
+ |
+ if (stream_texture) |
+ definition->SetStreamTexture(); |
+ |
+ return definition.release(); |
} |
bool TextureManager::Restore( |
@@ -1043,6 +1051,7 @@ bool TextureManager::Restore( |
texture->SetServiceId(definition->ReleaseServiceId()); |
glBindTexture(texture->target(), texture->service_id()); |
texture->SetImmutable(definition->immutable()); |
+ texture->SetStreamTexture(definition->IsStreamTexture()); |
SetParameter(function_name, decoder, texture, GL_TEXTURE_MIN_FILTER, |
definition->min_filter()); |
SetParameter(function_name, decoder, texture, GL_TEXTURE_MAG_FILTER, |