Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upRemove ImageFormat::Invalid #2317
Conversation
|
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 { | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
kvark
Jan 17, 2018
Author
Member
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+ |
|
|
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. |
|
|
|
@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. |
|
|
|
|
kvark commentedJan 17, 2018
•
edited
Also replaces #2280
This change is