Skip to content
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

Merged
merged 3 commits into from
Jan 17, 2018
Merged

Remove ImageFormat::Invalid #2317

merged 3 commits into from
Jan 17, 2018

Conversation

kvark
Copy link
Member

@kvark kvark commented Jan 17, 2018

Also replaces #2280

This change is Reviewable

@kvark kvark requested a review from glennw January 17, 2018 20:55
Copy link
Member

@glennw glennw left a 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 {
Copy link
Member

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 :)

Copy link
Member Author

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).

@kvark
Copy link
Member Author

kvark commented Jan 17, 2018

Let me know if you want the version bumped here. Otherwise this should be ready to go.

@glennw
Copy link
Member

glennw commented Jan 17, 2018

@bors-servo r+ 🚢

@bors-servo
Copy link
Contributor

📌 Commit 22767fa has been approved by glennw

@bors-servo
Copy link
Contributor

⌛ Testing commit 22767fa with merge 2ca4413...

bors-servo pushed a commit that referenced this pull request Jan 17, 2018
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 -->
@kvark
Copy link
Member Author

kvark commented Jan 17, 2018

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
Copy link
Contributor

💔 Test failed - status-taskcluster

@kvark
Copy link
Member Author

kvark commented Jan 17, 2018

@bors-servo try
@glennw so I found the problem, and the solution (see last commit) may be concerning. Please take a look.

@bors-servo
Copy link
Contributor

⌛ Trying commit 4584032 with merge 96825f5...

bors-servo pushed a commit that referenced this pull request Jan 17, 2018
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 -->
@kvark
Copy link
Member Author

kvark commented Jan 17, 2018

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.
@bors-servo r=glennw

@bors-servo
Copy link
Contributor

📌 Commit 4584032 has been approved by glennw

@bors-servo
Copy link
Contributor

☀️ Test successful - status-appveyor, status-taskcluster
Approved by: glennw
Pushing 96825f5 to master...

@bors-servo bors-servo merged commit 4584032 into servo:master Jan 17, 2018
@kvark kvark deleted the format branch January 18, 2018 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants