-
Notifications
You must be signed in to change notification settings - Fork 282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove ImageFormat::Invalid #2317
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
@@ -1269,7 +1253,7 @@ impl Device { | |||
pub fn free_texture_storage(&mut self, texture: &mut Texture) { | |||
debug_assert!(self.inside_frame); | |||
|
|||
if texture.format == ImageFormat::Invalid { | |||
if texture.width + texture.height == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This made me do a double take, but I guess it works :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I see, the only case it tries to handle is when the texture wasn't ever given contents (leaving the size to 0 and the format to Invalid
).
Let me know if you want the version bumped here. Otherwise this should be ready to go. |
@bors-servo r+ 🚢 |
📌 Commit 22767fa has been approved by |
Remove ImageFormat::Invalid <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/2317) <!-- Reviewable:end -->
Now that I think of it, this change is effectively a better solution to the flickering problem than the workaround I put it previously. Angle has problems with changing the format, and this PR makes us not even attempt to change the format ever. |
💔 Test failed - status-taskcluster |
@bors-servo try |
Remove ImageFormat::Invalid <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/2317) <!-- Reviewable:end -->
result of IRC discussion: having a hashmap for the free lists of texture cache is not ideal but not really a performance concern, and we can proceed with it. |
📌 Commit 4584032 has been approved by |
☀️ Test successful - status-appveyor, status-taskcluster |
Also replaces #2280
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)