You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fnrecreate(&mutself,size:Size2D<i32>){self.drawtarget = CanvasPaintThread::create(size);// Webrender doesn't let images change size, so we clear the webrender image key.ifletSome(image_key) = self.image_key.take(){self.webrender_api.delete_image(image_key);}}
The key is being deleted immediately, but it might still be in use by the display list builder. Really, we should flag the key for being deleted in the next epoch, not the current epoch.
The text was updated successfully, but these errors were encountered:
Looking at the code for html images, it looks like the reason why we're not hitting the problem there is that we're just never removing images from the image cache: #12881.
…=jdm
Don't delete webrender image keys immediately.
<!-- Please describe your changes on the following line: -->
We currently delete webrender image id's immediately on resizing a canvas, which can cause panics. This PR delays deleting the image id until an epoch has passed.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix#17534
- [X] These changes do not require tests because the intermittent failure is already triggered by the css-paint-api tests.
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- 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/17606)
<!-- Reviewable:end -->
A lovely webrender panic:
The cause is
servo/components/canvas/canvas_paint_thread.rs
Line 549 in 2843eb5
The key is being deleted immediately, but it might still be in use by the display list builder. Really, we should flag the key for being deleted in the next epoch, not the current epoch.
The text was updated successfully, but these errors were encountered: