Commit graph

11 commits

Author SHA1 Message Date
Undefine
044ac2dd28 LibWeb: Fix WebGL getError
getError was just calling out to glGetError and never checking our
error value that we were maintaining ourselves.
2025-11-06 19:02:36 +01:00
Undefine
e7aeb71d29 LibWeb: Move WebGL error variable to WebGLRenderingContextBase
Implementations in both WebGL1 and WebGL2 were the same and most
probably will stay the same.
2025-11-06 19:02:36 +01:00
Luke Wilde
8adde0980a LibWeb/WebGL: Respect UNPACK_PREMULTIPLY_ALPHA
Fixes splats on https://superspl.at having dark splotches, as they
expect textures with unpremultiplied alpha.
2025-11-04 17:06:24 +01:00
Luke Wilde
3ca4ff6037 LibWeb/WebGL: Don't attempt to do texture transforms on an empty texture
Skia will not give us a surface if the width or height is zero.
2025-10-28 10:05:56 -07:00
Luke Wilde
d733bf54cc LibWeb/WebGL: Avoid copying canvas surface when uploading it 2025-10-25 12:56:17 +02:00
Luke Wilde
d65f0e4490 LibWeb/WebGL: Calculate the correct pitch for compacted types
It's not correct to multiply the number of components by the number of
bytes, since compact formats such as 4_4_4_4 have 4 components but
_always_ stored in 2 bytes, not 8 if you were to do such a
multiplication.

Fixes textures on Google Maps having large blank stripes.
2025-10-25 12:56:17 +02:00
Luke Wilde
3e7061da40 LibWeb/WebGL: Respect UNPACK_FLIP_Y_WEBGL pixel storage parameter
When this is true, we have to vertically flip TexImageSource provided
images before uploading them.

Fixes several graphical glitches on Google Maps.
Fixes globe being upside down on Shopify's homepage.
Likely fixes more websites.
2025-10-25 12:56:17 +02:00
Aliaksandr Kalenik
20490d146c LibWeb/WebGL: Deduplicate read_and_pixel_convert_texture_image_source()
After we commited code produced by WebGL generator this function ended
up duplicated between WebGL 1 and 2 contexts.
2025-10-02 18:41:02 +02:00
Aliaksandr Kalenik
4bf9bf7972 LibWeb: Merge WebGLRenderingContextBase into WebGLRenderingContext
There is no need to have a separate class for WebGLRenderingContextBase
mixin.
2024-12-03 23:35:45 +01:00
Shannon Booth
f87041bf3a LibGC+Everywhere: Factor out a LibGC from LibJS
Resulting in a massive rename across almost everywhere! Alongside the
namespace change, we now have the following names:

 * JS::NonnullGCPtr -> GC::Ref
 * JS::GCPtr -> GC::Ptr
 * JS::HeapFunction -> GC::Function
 * JS::CellImpl -> GC::Cell
 * JS::Handle -> GC::Root
2024-11-15 14:49:20 +01:00
Timothy Flynn
93712b24bf Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Renamed from Userland/Libraries/LibWeb/WebGL/WebGLRenderingContextBase.cpp (Browse further)