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

Return the old draw buffer when resizing. #132

Merged
merged 1 commit into from
Jan 16, 2019
Merged

Return the old draw buffer when resizing. #132

merged 1 commit into from
Jan 16, 2019

Conversation

jdm
Copy link
Member

@jdm jdm commented Jan 14, 2019

No description provided.

@jdm
Copy link
Member Author

jdm commented Jan 14, 2019

r? @emilio

pub fn resize(&mut self, size: Size2D<i32>) -> Result<DrawBuffer, &'static str> {
if let Some(draw_buffer) = self.draw_buffer.take() {
let color_attachment_type = draw_buffer.color_attachment_type();
self.init_offscreen(size, color_attachment_type).map(|()| draw_buffer)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably slightly nicer like:

self.init_offscreen(..)?;
Ok(draw_buffer)

But no big deal.

@jdm
Copy link
Member Author

jdm commented Jan 16, 2019

@bors-servo r=emilio

@jdm jdm merged commit b5228c0 into servo:master Jan 16, 2019
bors-servo pushed a commit to servo/servo that referenced this pull request Jan 17, 2019
Update webrender

Depends on servo/surfman#132.

<!-- 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/22598)
<!-- Reviewable:end -->
bors-servo pushed a commit to servo/servo that referenced this pull request Jan 18, 2019
Update webrender

Depends on servo/surfman#132.

<!-- 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/22598)
<!-- Reviewable:end -->
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.

2 participants