Commit graph

15 commits

Author SHA1 Message Date
Aliaksandr Kalenik
c9105955f6 LibWeb/WebGL: Add support for ANGLEInstancedArrays extension
This is only WebGL 1.0 extension. It's enabled in ANGLE by default.

Progress on https://ciechanow.ski/curves-and-surfaces/ that relies on
this extension.
2024-12-20 15:31:58 +01:00
Aliaksandr Kalenik
145bb0f849 LibWeb/WebGL: Implement getSupportedExtensions() 2024-12-13 09:19:10 +01:00
Aliaksandr Kalenik
c199be061a LibWeb/WebGL: Implement drawingBufferWidth and drawingBufferHeight 2024-12-13 09:19:10 +01:00
Andrew Kaster
af536e1192 LibWeb: Add stubbed-out WebGL2RenderingContext 2024-12-06 15:35:36 +01:00
Andrew Kaster
d8ccd6b87c LibWeb/WebGL: Don't crash when there's no skia backend context 2024-12-06 15:35:36 +01:00
Aliaksandr Kalenik
c817eb8d2b LibWeb/WebGL: Implement getContextAttributes() 2024-12-05 09:57:10 +01:00
Aliaksandr Kalenik
7e78d7d332 LibWeb/WebGL+Meta: Stub getSupportedExtensions() and getExtension() 2024-12-03 23:35:45 +01:00
Aliaksandr Kalenik
e2e54dccc3 LibWeb: Generate WebGLRenderingContext implementation 2024-12-03 23:35:45 +01:00
Aliaksandr Kalenik
38488b9ef3 LibWeb: Implement GLES2 context creation
For now only macOS is supported.

IOSurface is used as a backing store because it will allow us to read
it from Skia and write to it from OpenGL without any extra copying:
- ANGLE_metal_texture_client_buffer extension is used to create
  EGLSurface from IOSurface.
- Then the same IOSurface is wrapped into Metal texture and passed to
  Skia allowing to share the same memory between Skia Metal backend and
  ANGLE.
2024-12-03 23:35:45 +01:00
Aliaksandr Kalenik
d133b0aded LibWeb: Delete OpenGL function wrappers in OpenGLContext
It's going to be replaced by code genration in upcoming changes.
2024-12-03 23:35:45 +01: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
Aliaksandr Kalenik
f719b05ab9 LibWeb: Delegate painting surface allocation to canvas's active context
This change prepares for the addition of WebGL support, where painting
surface allocation process will differ from that of context2d.
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
Shannon Booth
9b79a686eb LibJS+LibWeb: Use realm.create<T> instead of heap.allocate<T>
The main motivation behind this is to remove JS specifics of the Realm
from the implementation of the Heap.

As a side effect of this change, this is a bit nicer to read than the
previous approach, and in my opinion, also makes it a little more clear
that this method is specific to a JavaScript Realm.
2024-11-13 16:51:44 -05: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/WebGLRenderingContext.cpp (Browse further)