Truly independent web browser
Compositor: Stop compiling the generated GL function table
Aliaksandr Kalenik3ebb554c9681
diff --git a/Libraries/LibCompositing/CMakeLists.txt b/Libraries/LibCompositing/CMakeLists.txtindex b95c30c0350..84cdd79ce5a 100644--- a/Libraries/LibCompositing/CMakeLists.txt+++ b/Libraries/LibCompositing/CMakeLists.txt@@ -61,7 +61,7 @@ ladybird_lib(LibCompositing compositing EXPLICIT_SYMBOL_EXPORT)target_link_libraries(LibCompositing PUBLIC LibWebCommon)target_link_libraries(LibCompositing PRIVATE LibCore LibGfx LibIPC LibMedia LibThreading libcompositing_rust)-# The generated WebGLCommands.h includes the generated GLFunctions.h, whose implementation the Compositor compiles.+# The generated WebGLCommands.h includes the generated GLFunctions.h.add_dependencies(LibCompositing generate_GLFunctions.cpp)# The WebGL command stream headers include ANGLE's GLES headers for the GL constants and types,diff --git a/Services/Compositor/CMakeLists.txt b/Services/Compositor/CMakeLists.txtindex c6cf63e0d5e..08f6fa44689 100644--- a/Services/Compositor/CMakeLists.txt+++ b/Services/Compositor/CMakeLists.txt@@ -36,7 +36,6 @@ set(GENERATED_SOURCESCompositorWebContentServerEndpoint.hRenderClockClientEndpoint.hRenderClockServerEndpoint.h- ${CMAKE_BINARY_DIR}/Libraries/LibCompositing/WebGL/GLFunctions.cpp)import_rust_crate(MANIFEST_PATH Rust/Cargo.toml CRATE_NAME compositor_core FEATURES allocator FFI_HEADER CompositorCoreRustFFI.h)diff --git a/Services/Compositor/OpenGLContext.cpp b/Services/Compositor/OpenGLContext.cppindex e4162fcf8bf..f24f89a66b1 100644--- a/Services/Compositor/OpenGLContext.cpp+++ b/Services/Compositor/OpenGLContext.cpp@@ -936,7 +936,7 @@ static Optional<GLenum> texture_binding_for_copy_destination(GLenum target)}#endif-bool OpenGLContext::copy_image_into_bound_texture([[maybe_unused]] SkImage const& image, [[maybe_unused]] Gfx::IntSize source_size, [[maybe_unused]] Gfx::IntSize size, [[maybe_unused]] GLenum target, [[maybe_unused]] GLint level, [[maybe_unused]] GLint xoffset, [[maybe_unused]] GLint yoffset, [[maybe_unused]] bool flip_y, [[maybe_unused]] bool premultiply_alpha)+bool OpenGLContext::copy_image_into_bound_texture([[maybe_unused]] SkImage const& image, [[maybe_unused]] Gfx::IntSize source_size, [[maybe_unused]] Gfx::IntSize size, [[maybe_unused]] u32 target, [[maybe_unused]] i32 level, [[maybe_unused]] i32 xoffset, [[maybe_unused]] i32 yoffset, [[maybe_unused]] bool flip_y, [[maybe_unused]] bool premultiply_alpha){#ifdef ENABLE_WEBGLauto destination_binding = texture_binding_for_copy_destination(target);diff --git a/Services/Compositor/OpenGLContext.h b/Services/Compositor/OpenGLContext.hindex da592032170..7558a6420ed 100644--- a/Services/Compositor/OpenGLContext.h+++ b/Services/Compositor/OpenGLContext.h@@ -14,7 +14,7 @@#include <AK/Vector.h>#include <Compositor/PaintingSurface.h>#include <Compositor/PresentableSurface.h>-#include <LibCompositing/WebGL/GLFunctions.h>+#include <LibCompositing/WebGL/Types.h>#include <LibGfx/Forward.h>#include <LibGfx/Size.h>@@ -26,7 +26,7 @@ class SkImage;namespace Compositor {-class OpenGLContext : public Compositing::WebGL::GLFunctions {+class OpenGLContext {public:AK_ALLOC_WITH_KMALLOC;@@ -71,7 +71,7 @@ public:bool supports_pack_subimage_parameters() const;bool can_copy_images_into_textures();// The source size is the part of the image to copy, which can be smaller than the image.- bool copy_image_into_bound_texture(SkImage const&, Gfx::IntSize source_size, Gfx::IntSize, GLenum target, GLint level, GLint xoffset, GLint yoffset, bool flip_y, bool premultiply_alpha);+ bool copy_image_into_bound_texture(SkImage const&, Gfx::IntSize source_size, Gfx::IntSize, u32 target, i32 level, i32 xoffset, i32 yoffset, bool flip_y, bool premultiply_alpha);private:struct ColorBuffer;