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 upImplement HTMLCanvasElement.toDataURL for WebGL canvas (fixes #19147) #20400
Conversation
highfive
commented
Mar 23, 2018
|
Heads up! This PR modifies the following files:
|
|
Looks... reasonable, but I don't know where the WebGL error there should come from, so want links :) |
| } | ||
|
|
||
| if let Some((fb_width, fb_height)) = self.get_current_framebuffer_size() { | ||
| if width > fb_width as u32 { |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| // Used by HTMLCanvasElement.toDataURL | ||
| pub fn get_image_data(&self, mut width: u32, mut height: u32) -> Option<Vec<u8>> { | ||
| if !self.validate_framebuffer_complete() { | ||
| return None; |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| height = fb_height as u32; | ||
| } | ||
| } else { | ||
| self.webgl_error(InvalidOperation); |
This comment has been minimized.
This comment has been minimized.
| @@ -346,11 +346,24 @@ impl HTMLCanvasElementMethods for HTMLCanvasElement { | |||
| Finite::wrap(self.Height() as f64), | |||
| )? | |||
| } | |||
| Some(CanvasContext::WebGL(ref context)) => { | |||
| if let Some(data) = context.get_image_data(self.Width(), self.Height()) { | |||
This comment has been minimized.
This comment has been minimized.
|
r=me assuming |
|
Yep @bors-servo r=emilio p=1 |
|
|
Implement HTMLCanvasElement.toDataURL for WebGL canvas (fixes #19147) <!-- 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/20400) <!-- Reviewable:end -->
|
|
|
@bors-servo r=emilio |
|
|
Implement HTMLCanvasElement.toDataURL for WebGL canvas (fixes #19147) <!-- 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/20400) <!-- Reviewable:end -->
|
|
This might just be a test that now intermittently times out. |
|
Yes, most probably. I'll file the issue soon. |
|
@bors-servo try Doing a try run to see if it's a more rampant problem or just related to this one test. |
|
@bors-servo clean try |
|
@bors-servo r- try retry |
Implement HTMLCanvasElement.toDataURL for WebGL canvas (fixes #19147) <!-- 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/20400) <!-- Reviewable:end -->
|
@jdm Wow, what were the odds that we would stress test Homu… |
|
|
|
@bors-servo try- r=emilio #20408 |
|
|
Implement HTMLCanvasElement.toDataURL for WebGL canvas (fixes #19147) <!-- 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/20400) <!-- Reviewable:end -->
|
|
|
@bors-servo retry #20408 |
Implement HTMLCanvasElement.toDataURL for WebGL canvas (fixes #19147) <!-- 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/20400) <!-- Reviewable:end -->
|
|
nox commentedMar 23, 2018
•
edited by SimonSapin
This change is