Chromium Code Reviews| Index: gpu/command_buffer/service/texture_definition.cc |
| diff --git a/gpu/command_buffer/service/texture_definition.cc b/gpu/command_buffer/service/texture_definition.cc |
| index a5fe1d388deee2fef9c3095ca42371eee0fef590..30ca1e7a00ba44b8438251fa485cfe1a5a85eea7 100644 |
| --- a/gpu/command_buffer/service/texture_definition.cc |
| +++ b/gpu/command_buffer/service/texture_definition.cc |
| @@ -411,6 +411,12 @@ void TextureDefinition::UpdateTexture(Texture* texture) const { |
| glGenTextures(1, &service_id); |
| old_service_id = texture->service_id(); |
| texture->SetServiceId(service_id); |
| + |
| + GLint bound_id = 0; |
| + glGetIntegerv(target_, &bound_id); |
|
no sievers
2015/04/29 21:04:43
This doesn't work. It will generate a GL error I a
boliu
2015/04/29 21:16:14
Meh, missed the giant block doing the GL_TEXTURE2D
|
| + if (bound_id == static_cast<GLint>(old_service_id)) { |
| + glBindTexture(target_, service_id); |
| + } |
| } |
| UpdateTextureInternal(texture); |