Replace sparkle with glow in components/canvas#33918
Conversation
49d93c3 to
2d82205
Compare
|
I started working on components/canvas (it's the most complex and the last one) in this PR, but it will be landed as separate PR in the end. There is some more stuff missing in glow a lot is covered by grovesNL/glow#317. |
2d82205 to
8da87f2
Compare
|
There are two types of todos:
|
|
🔨 Triggering try run (#11532818911) for Linux WPT |
|
Test results for linux-wpt-layout-2020 from try job (#11532818911): Flaky unexpected result (14)
Stable unexpected results that are known to be intermittent (12)
Stable unexpected results (5)
|
|
|
|
🔨 Triggering try run (#11534551078) for Linux WPT |
|
Test results for linux-wpt-layout-2020 from try job (#11534551078): Flaky unexpected result (13)
Stable unexpected results that are known to be intermittent (5)
Stable unexpected results (2)
|
|
|
|
🔨 Triggering try run (#11542244209) for Linux WPT, Windows |
|
Test results for linux-wpt-layout-2020 from try job (#11542244209): Flaky unexpected result (13)
Stable unexpected results that are known to be intermittent (9)
Stable unexpected results (2)
|
|
|
|
Interestingly we also failed this test with sparkle but differently (hence WPT failure): OK /_webgl/conformance2/renderbuffers/readbuffer.html I am not sure what causes difference tho. |
mrobinson
left a comment
There was a problem hiding this comment.
Great work! I know this is waiting on some things, but here is an initial review.
| if err != 0 { | ||
| warn!("Error enabling GL program point size: {}", err); | ||
| unsafe { | ||
| // XXX: Do we even need to this? |
There was a problem hiding this comment.
What's the minimum version of OpenGL that we support?
There was a problem hiding this comment.
IDK, I also asked this on zulip: https://servo.zulipchat.com/#narrow/channel/263398-general/topic/GL.2FGLES.20versions.20supported, as this would allow us to remove some old GLES/GL handling.
sparkle with glow in components/shared/canvas
Actually this PR currently also contains changes to component/canvas that will be landed as separate PR (only first two commits will remain here). |
5427702 to
0e3db54
Compare
diff --git a/components/canvas/webgl_thread.rs b/components/canvas/webgl_thread.rs
index e45567d8b4..990f7b0225 100644
--- a/components/canvas/webgl_thread.rs
+++ b/components/canvas/webgl_thread.rs
@@ -1206,7 +1206,11 @@ impl WebGLImpl {
let len = bytes_per_type(pixel_type) *
components_per_format(format) *
rect.size.area() as usize;
- let mut pixels = vec![0; len];
+ let mut pixels: Vec<u8> = Vec::new();
+ pixels.reserve(len);
+ unsafe {
+ pixels.set_len(len);
+ }
unsafe {
// We don't want any alignment padding on pixel rows.
gl.pixel_store_i32(glow::PACK_ALIGNMENT, 1);makes test pass like in sparkle, so new behavior is more correct (0,0,255,255 values were coming from previous allocation of pixels). This command also triggers Last GL operation failed warning (hence no data is written) but this should be solved separately. |
|
🔨 Triggering try run (#11710691640) for Linux WPT |
|
Test results for linux-wpt-layout-2020 from try job (#11710691640): Flaky unexpected result (19)
Stable unexpected results that are known to be intermittent (14)
Stable unexpected results (35)
|
|
|
|
🔨 Triggering try run (#11711514821) for Linux WPT |
|
Test results for linux-wpt-layout-2020 from try job (#11711514821): Flaky unexpected result (19)
Stable unexpected results that are known to be intermittent (10)
|
|
✨ Try run (#11711514821) succeeded. |
sparkle with glow in components/shared/canvassparkle with glow in components/canvas
Signed-off-by: sagudev <[email protected]>
8d7a3bc to
d8a5610
Compare
Signed-off-by: sagudev <[email protected]>
|
🔨 Triggering try run (#11927810662) for Linux WPT |
|
Test results for linux-wpt-layout-2020 from try job (#11927810662): Flaky unexpected result (18)
Stable unexpected results that are known to be intermittent (10)
|
|
✨ Try run (#11927810662) succeeded. |
Removes last usage of sparkle 🎊.
This is part of #33539.
./mach build -ddoes not report any errors./mach test-tidydoes not report any errors