Auto merge of #21781 - servo:jdm-patch-31, r=nox

webgl: Restore active texture if it's changed while deleting a texture.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21781)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2018-09-22 06:34:20 -04:00 committed by GitHub
commit cc53ec805d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2221,7 +2221,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
}
// Restore bound texture unit if it has been changed.
if active_unit_enum == self.textures.active_unit_enum() {
if active_unit_enum != self.textures.active_unit_enum() {
self.send_command(WebGLCommand::ActiveTexture(
self.textures.active_unit_enum(),
));