mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-22 09:12:13 -05:00
LibWeb/WebGL: Move extensions into their own folder
This commit is contained in:
parent
cfbd125e57
commit
de77a5e3ea
Notes:
github-actions[bot]
2025-01-21 20:37:44 +00:00
Author: https://github.com/Lubrsi Commit: https://github.com/LadybirdBrowser/ladybird/commit/de77a5e3ea5 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3239 Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/kalenikaliaksandr
15 changed files with 30 additions and 26 deletions
|
@ -823,9 +823,10 @@ set(SOURCES
|
|||
WebDriver/Response.cpp
|
||||
WebDriver/Screenshot.cpp
|
||||
WebDriver/TimeoutsConfiguration.cpp
|
||||
WebGL/ANGLEInstancedArrays.cpp
|
||||
WebGL/Extensions/ANGLEInstancedArrays.cpp
|
||||
WebGL/Extensions/OESVertexArrayObject.cpp
|
||||
WebGL/Extensions/WebGLVertexArrayObjectOES.cpp
|
||||
WebGL/EventNames.cpp
|
||||
WebGL/OESVertexArrayObject.cpp
|
||||
WebGL/OpenGLContext.cpp
|
||||
WebGL/WebGL2RenderingContext.cpp
|
||||
WebGL/WebGLActiveInfo.cpp
|
||||
|
@ -846,7 +847,6 @@ set(SOURCES
|
|||
WebGL/WebGLTransformFeedback.cpp
|
||||
WebGL/WebGLUniformLocation.cpp
|
||||
WebGL/WebGLVertexArrayObject.cpp
|
||||
WebGL/WebGLVertexArrayObjectOES.cpp
|
||||
WebIDL/AbstractOperations.cpp
|
||||
WebIDL/Buffers.cpp
|
||||
WebIDL/CallbackType.cpp
|
||||
|
|
|
@ -841,8 +841,6 @@ struct OscillatorOptions;
|
|||
}
|
||||
|
||||
namespace Web::WebGL {
|
||||
class ANGLEInstancedArrays;
|
||||
class OESVertexArrayObject;
|
||||
class OpenGLContext;
|
||||
class WebGL2RenderingContext;
|
||||
class WebGLActiveInfo;
|
||||
|
@ -860,6 +858,11 @@ class WebGLSync;
|
|||
class WebGLTexture;
|
||||
class WebGLUniformLocation;
|
||||
class WebGLVertexArrayObject;
|
||||
}
|
||||
|
||||
namespace Web::WebGL::Extensions {
|
||||
class ANGLEInstancedArrays;
|
||||
class OESVertexArrayObject;
|
||||
class WebGLVertexArrayObjectOES;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <LibJS/Runtime/Realm.h>
|
||||
#include <LibWeb/Bindings/ANGLEInstancedArraysPrototype.h>
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/WebGL/ANGLEInstancedArrays.h>
|
||||
#include <LibWeb/WebGL/Extensions/ANGLEInstancedArrays.h>
|
||||
#include <LibWeb/WebGL/OpenGLContext.h>
|
||||
#include <LibWeb/WebGL/WebGLRenderingContext.h>
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
|||
#include <GLES2/gl2.h>
|
||||
#include <GLES2/gl2ext.h>
|
||||
|
||||
namespace Web::WebGL {
|
||||
namespace Web::WebGL::Extensions {
|
||||
|
||||
GC_DEFINE_ALLOCATOR(ANGLEInstancedArrays);
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
#include <LibWeb/Forward.h>
|
||||
#include <LibWeb/WebGL/Types.h>
|
||||
|
||||
namespace Web::WebGL {
|
||||
namespace Web::WebGL::Extensions {
|
||||
|
||||
class ANGLEInstancedArrays : public Bindings::PlatformObject {
|
||||
WEB_PLATFORM_OBJECT(ANGLEInstancedArrays, Bindings::PlatformObject);
|
|
@ -5,9 +5,10 @@
|
|||
*/
|
||||
|
||||
#include <LibJS/Runtime/Realm.h>
|
||||
#include <LibWeb/Bindings/OESVertexArrayObjectPrototype.h>
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/WebGL/OESVertexArrayObject.h>
|
||||
#include <LibWeb/Bindings/OESVertexArrayObjectPrototype.h>
|
||||
#include <LibWeb/WebGL/Extensions/OESVertexArrayObject.h>
|
||||
#include <LibWeb/WebGL/Extensions/WebGLVertexArrayObjectOES.h>
|
||||
#include <LibWeb/WebGL/OpenGLContext.h>
|
||||
#include <LibWeb/WebGL/WebGLRenderingContext.h>
|
||||
|
||||
|
@ -15,7 +16,7 @@
|
|||
#include <GLES2/gl2.h>
|
||||
#include <GLES2/gl2ext.h>
|
||||
|
||||
namespace Web::WebGL {
|
||||
namespace Web::WebGL::Extensions {
|
||||
|
||||
GC_DEFINE_ALLOCATOR(OESVertexArrayObject);
|
||||
|
|
@ -9,9 +9,8 @@
|
|||
#include <LibWeb/Bindings/PlatformObject.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
#include <LibWeb/WebGL/Types.h>
|
||||
#include <LibWeb/WebGL/WebGLVertexArrayObjectOES.h>
|
||||
|
||||
namespace Web::WebGL {
|
||||
namespace Web::WebGL::Extensions {
|
||||
|
||||
class OESVertexArrayObject : public Bindings::PlatformObject {
|
||||
WEB_PLATFORM_OBJECT(OESVertexArrayObject, Bindings::PlatformObject);
|
|
@ -1,5 +1,5 @@
|
|||
#import <WebGL/Extensions/WebGLVertexArrayObjectOES.idl>
|
||||
#import <WebGL/Types.idl>
|
||||
#import <WebGL/WebGLVertexArrayObjectOES.idl>
|
||||
|
||||
// https://registry.khronos.org/webgl/extensions/OES_vertex_array_object/
|
||||
// NOTE: Original OES_vertex_array_object name is changed to title case,
|
|
@ -8,9 +8,9 @@
|
|||
#include <LibJS/Runtime/Realm.h>
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/Bindings/WebGLVertexArrayObjectOESPrototype.h>
|
||||
#include <LibWeb/WebGL/WebGLVertexArrayObjectOES.h>
|
||||
#include <LibWeb/WebGL/Extensions/WebGLVertexArrayObjectOES.h>
|
||||
|
||||
namespace Web::WebGL {
|
||||
namespace Web::WebGL::Extensions {
|
||||
|
||||
GC_DEFINE_ALLOCATOR(WebGLVertexArrayObjectOES);
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
#include <LibWeb/WebGL/Types.h>
|
||||
#include <LibWeb/WebGL/WebGLObject.h>
|
||||
|
||||
namespace Web::WebGL {
|
||||
namespace Web::WebGL::Extensions {
|
||||
|
||||
class WebGLVertexArrayObjectOES : public WebGLObject {
|
||||
WEB_PLATFORM_OBJECT(WebGLVertexArrayObjectOES, WebGLObject);
|
|
@ -13,9 +13,9 @@
|
|||
#include <LibWeb/HTML/TraversableNavigable.h>
|
||||
#include <LibWeb/Infra/Strings.h>
|
||||
#include <LibWeb/Painting/Paintable.h>
|
||||
#include <LibWeb/WebGL/ANGLEInstancedArrays.h>
|
||||
#include <LibWeb/WebGL/EventNames.h>
|
||||
#include <LibWeb/WebGL/OESVertexArrayObject.h>
|
||||
#include <LibWeb/WebGL/Extensions/ANGLEInstancedArrays.h>
|
||||
#include <LibWeb/WebGL/Extensions/OESVertexArrayObject.h>
|
||||
#include <LibWeb/WebGL/OpenGLContext.h>
|
||||
#include <LibWeb/WebGL/WebGLContextEvent.h>
|
||||
#include <LibWeb/WebGL/WebGLRenderingContext.h>
|
||||
|
@ -191,7 +191,7 @@ JS::Object* WebGLRenderingContext::get_extension(String const& name)
|
|||
|
||||
if (Infra::is_ascii_case_insensitive_match(name, "ANGLE_instanced_arrays"sv)) {
|
||||
if (!m_angle_instanced_arrays_extension) {
|
||||
m_angle_instanced_arrays_extension = MUST(ANGLEInstancedArrays::create(realm(), *this));
|
||||
m_angle_instanced_arrays_extension = MUST(Extensions::ANGLEInstancedArrays::create(realm(), *this));
|
||||
}
|
||||
|
||||
VERIFY(m_angle_instanced_arrays_extension);
|
||||
|
@ -200,7 +200,7 @@ JS::Object* WebGLRenderingContext::get_extension(String const& name)
|
|||
|
||||
if (Infra::is_ascii_case_insensitive_match(name, "OES_vertex_array_object"sv)) {
|
||||
if (!m_oes_vertex_array_object_extension) {
|
||||
m_oes_vertex_array_object_extension = MUST(OESVertexArrayObject::create(realm(), *this));
|
||||
m_oes_vertex_array_object_extension = MUST(Extensions::OESVertexArrayObject::create(realm(), *this));
|
||||
}
|
||||
|
||||
VERIFY(m_oes_vertex_array_object_extension);
|
||||
|
|
|
@ -81,8 +81,8 @@ private:
|
|||
|
||||
// Extensions
|
||||
// "Multiple calls to getExtension with the same extension string, taking into account case-insensitive comparison, must return the same object as long as the extension is enabled."
|
||||
GC::Ptr<ANGLEInstancedArrays> m_angle_instanced_arrays_extension;
|
||||
GC::Ptr<OESVertexArrayObject> m_oes_vertex_array_object_extension;
|
||||
GC::Ptr<Extensions::ANGLEInstancedArrays> m_angle_instanced_arrays_extension;
|
||||
GC::Ptr<Extensions::OESVertexArrayObject> m_oes_vertex_array_object_extension;
|
||||
|
||||
virtual void set_error(GLenum error) override;
|
||||
};
|
||||
|
|
|
@ -380,8 +380,9 @@ libweb_js_bindings(WebAudio/OscillatorNode)
|
|||
libweb_js_bindings(WebAudio/PannerNode)
|
||||
libweb_js_bindings(WebAudio/PeriodicWave)
|
||||
libweb_js_bindings(WebAudio/StereoPannerNode)
|
||||
libweb_js_bindings(WebGL/ANGLEInstancedArrays)
|
||||
libweb_js_bindings(WebGL/OESVertexArrayObject)
|
||||
libweb_js_bindings(WebGL/Extensions/ANGLEInstancedArrays)
|
||||
libweb_js_bindings(WebGL/Extensions/OESVertexArrayObject)
|
||||
libweb_js_bindings(WebGL/Extensions/WebGLVertexArrayObjectOES)
|
||||
libweb_js_bindings(WebGL/WebGL2RenderingContext)
|
||||
libweb_js_bindings(WebGL/WebGLActiveInfo)
|
||||
libweb_js_bindings(WebGL/WebGLBuffer)
|
||||
|
@ -400,7 +401,6 @@ libweb_js_bindings(WebGL/WebGLTexture)
|
|||
libweb_js_bindings(WebGL/WebGLTransformFeedback)
|
||||
libweb_js_bindings(WebGL/WebGLUniformLocation)
|
||||
libweb_js_bindings(WebGL/WebGLVertexArrayObject)
|
||||
libweb_js_bindings(WebGL/WebGLVertexArrayObjectOES)
|
||||
libweb_js_bindings(WebIDL/DOMException)
|
||||
libweb_js_bindings(WebSockets/WebSocket)
|
||||
libweb_js_bindings(WebVTT/VTTCue)
|
||||
|
|
|
@ -4440,6 +4440,7 @@ using namespace Web::UserTiming;
|
|||
using namespace Web::WebAssembly;
|
||||
using namespace Web::WebAudio;
|
||||
using namespace Web::WebGL;
|
||||
using namespace Web::WebGL::Extensions;
|
||||
using namespace Web::WebIDL;
|
||||
using namespace Web::WebVTT;
|
||||
using namespace Web::XHR;
|
||||
|
|
Loading…
Reference in a new issue