1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:37:35 +00:00

LibAccelGfx+LibWeb: Explicitly pass OpenGL context to Painter

Let's not assume there is one global OpenGL context because it might
change once we will start creating >1 page inside single WebContent
process or contexts for WebGL.
This commit is contained in:
Aliaksandr Kalenik 2023-12-16 16:22:11 +01:00 committed by Andreas Kling
parent ed1ade0534
commit 161082e282
8 changed files with 25 additions and 20 deletions

View file

@ -170,9 +170,8 @@ void main() {
HashMap<u32, GL::Texture> s_immutable_bitmap_texture_cache;
NonnullOwnPtr<Painter> Painter::create()
NonnullOwnPtr<Painter> Painter::create(Context& context)
{
auto& context = Context::the();
return make<Painter>(context);
}