mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
LibWeb/WebGL: Implement WEBGL_compressed_texture_s3tc extension
This commit is contained in:
parent
484008d440
commit
958938655d
Notes:
github-actions[bot]
2025-02-09 00:01:44 +00:00
Author: https://github.com/Lubrsi
Commit: 958938655d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3385
11 changed files with 137 additions and 2 deletions
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright (c) 2025, Luke Wilde <luke@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/Bindings/PlatformObject.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
#include <LibWeb/WebGL/WebGLRenderingContextBase.h>
|
||||
|
||||
namespace Web::WebGL::Extensions {
|
||||
|
||||
class WebGLCompressedTextureS3tc : public Bindings::PlatformObject {
|
||||
WEB_PLATFORM_OBJECT(WebGLCompressedTextureS3tc, Bindings::PlatformObject);
|
||||
GC_DECLARE_ALLOCATOR(WebGLCompressedTextureS3tc);
|
||||
|
||||
public:
|
||||
static JS::ThrowCompletionOr<GC::Ptr<WebGLCompressedTextureS3tc>> create(JS::Realm&, WebGLRenderingContextBase*);
|
||||
|
||||
protected:
|
||||
void initialize(JS::Realm&) override;
|
||||
void visit_edges(Visitor&) override;
|
||||
|
||||
private:
|
||||
WebGLCompressedTextureS3tc(JS::Realm&, WebGLRenderingContextBase*);
|
||||
|
||||
// FIXME: It should be GC::Ptr instead of raw pointer, but we need to make WebGLRenderingContextBase inherit from PlatformObject first.
|
||||
WebGLRenderingContextBase* m_context;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue