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 commented Jan 17, 2018

Also replaces #2280

This change is Reviewable

@kvark kvark requested a review from glennw Jan 17, 2018
@glennw
glennw approved these changes Jan 17, 2018
Copy link
Member

glennw left a comment

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.

@glennw

glennw Jan 17, 2018

Member

This made me do a double take, but I guess it works :)

This comment has been minimized.

@kvark

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

@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

bors-servo commented Jan 17, 2018

📌 Commit 22767fa has been approved by glennw

@bors-servo
Copy link
Contributor

bors-servo commented Jan 17, 2018

Testing commit 22767fa with merge 2ca4413...

bors-servo added 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

bors-servo commented Jan 17, 2018

💔 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

bors-servo commented Jan 17, 2018

Trying commit 4584032 with merge 96825f5...

bors-servo added 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

bors-servo commented Jan 17, 2018

📌 Commit 4584032 has been approved by glennw

@bors-servo
Copy link
Contributor

bors-servo commented Jan 17, 2018

☀️ 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
3 checks passed
3 checks passed
Taskcluster (pull_request) TaskGroup: success
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
homu Test successful
Details
@kvark kvark deleted the kvark:format branch Jan 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.