diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2018-09-19 13:36:24 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-19 13:36:24 -0400 |
commit | b1c6281d3ccba6a5ce8f09fb704c33054a0af37c (patch) | |
tree | ca16ef495b3305552b8404c6f7ae7b3d69bc3b22 | |
parent | d19ce148b6c26b07ad06bacc0ebdaf1a4faf2893 (diff) | |
parent | ee916d5c637da0815c402c39496899e671ea2c9e (diff) | |
download | servo-b1c6281d3ccba6a5ce8f09fb704c33054a0af37c.tar.gz servo-b1c6281d3ccba6a5ce8f09fb704c33054a0af37c.zip |
Auto merge of #21353 - DanxiongLei:damonlei_fix, r=jdm
fix(webgl): fix issue https://github.com/servo/servo/issues/21352
If we have a bounded framebuffer previously, which is not the one to delete.
we would not change the !binding, but we would change the GLSide with Command::BindFramebuffer(Default).
change it to:
check the id before sending the Command
---
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [x] These changes fix #21352
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because `it's obviously simple.`
<!-- 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/21353)
<!-- Reviewable:end -->
-rw-r--r-- | components/script/dom/webglrenderingcontext.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs index fadfb42f668..fba14223df9 100644 --- a/components/script/dom/webglrenderingcontext.rs +++ b/components/script/dom/webglrenderingcontext.rs @@ -92,10 +92,9 @@ macro_rules! handle_object_deletion { if let Some(bound_object) = $binding.get() { if bound_object.id() == $object.id() { $binding.set(None); - } - - if let Some(command) = $unbind_command { - $self_.send_command(command); + if let Some(command) = $unbind_command { + $self_.send_command(command); + } } } }; |