Chromium Code Reviews| 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..a7d872899ce4d81a16e3ea8d9d7fcd94b45cd3c3 100644 |
| --- a/gpu/command_buffer/service/texture_manager.cc |
| +++ b/gpu/command_buffer/service/texture_manager.cc |
| @@ -939,6 +939,10 @@ TextureDefinition* TextureManager::Save(Texture* texture) { |
| if (texture->IsAttachedToFramebuffer()) |
| return NULL; |
| + if (texture->target() == GL_TEXTURE_EXTERNAL_OES && |
| + !texture->IsStreamTexture()) |
| + return NULL; |
| + |
| TextureDefinition::LevelInfos level_infos(texture->level_infos_.size()); |
| for (size_t face = 0; face < level_infos.size(); ++face) { |
| GLenum target = |
| @@ -1013,6 +1017,15 @@ bool TextureManager::Restore( |
| if (texture->level_infos_[0].size() < definition->level_infos()[0].size()) |
| return false; |
| + if (texture->target() == GL_TEXTURE_EXTERNAL_OES) { |
| + if (definition->wrap_t() != GL_CLAMP_TO_EDGE || |
| + definition->wrap_s() != GL_CLAMP_TO_EDGE || |
| + definition->min_filter() != GL_LINEAR) { |
|
piman
2013/04/13 17:11:36
Is this needed? We checked texture->target() == de
no sievers
2013/04/15 17:33:44
True, removed. This validation does not add any va
|
| + return false; |
| + } |
| + texture->SetStreamTexture(true); |
| + } |
| + |
| for (size_t face = 0; face < definition->level_infos().size(); ++face) { |
| GLenum target = |
| texture->target() == GL_TEXTURE_CUBE_MAP ? FaceIndexToGLTarget(face) |