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 61f2acc5d188873b7d6731f18e5e8e2c801f7c1f..040e15f31fd80974e9e5be9ff1e6dc5cb1addd9a 100644 |
| --- a/gpu/command_buffer/service/texture_manager.cc |
| +++ b/gpu/command_buffer/service/texture_manager.cc |
| @@ -1487,10 +1487,17 @@ void Texture::SetLevelImageInternal(GLenum target, |
| face_infos_[face_index].level_infos[level]; |
| DCHECK_EQ(info.target, target); |
| DCHECK_EQ(info.level, level); |
| + bool image_previously_bound = !!info.image; |
| info.image = image; |
| info.stream_texture_image = stream_texture_image; |
| info.image_state = state; |
| + |
| + // Clear the unowned service id because the previous image might own it, in |
| + // which case it's no longer valid. |
| + if (image_previously_bound && level == 0) |
|
liberato (no reviews please)
2016/05/26 16:59:19
i don't think that one needs to check if an image
|
| + SetUnownedServiceId(0); |
| + |
| UpdateCanRenderCondition(); |
| UpdateHasImages(); |
| UpdateEmulatingRGB(); |