mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-28 04:08:08 +00:00
LibGfx+LibWeb: Specify bottom left origin for WebGL's PaintingSurface
By doing that we eliminate the need for the vertical flip flag. As a side effect it fixes the bug when doing: `canvasContext2d.drawImage(canvasWithWebGLContext, 0, 0);` produced a flipped image because we didn't account for different origin while serializing PaintingSurface into Gfx::Bitmap. Visual progress on https://ciechanow.ski/curves-and-surfaces/
This commit is contained in:
committed by
Alexander Kalenik
parent
28388f1fd2
commit
30d915c361
@@ -126,8 +126,7 @@ void OpenGLContext::allocate_painting_surface_if_needed()
|
||||
VERIFY(!m_size.is_empty());
|
||||
|
||||
auto iosurface = Core::IOSurfaceHandle::create(m_size.width(), m_size.height());
|
||||
m_painting_surface = Gfx::PaintingSurface::wrap_iosurface(iosurface, m_skia_backend_context);
|
||||
m_painting_surface->set_flip_vertically();
|
||||
m_painting_surface = Gfx::PaintingSurface::wrap_iosurface(iosurface, m_skia_backend_context, Gfx::PaintingSurface::Origin::BottomLeft);
|
||||
|
||||
auto width = m_size.width();
|
||||
auto height = m_size.height();
|
||||
|
||||
Reference in New Issue
Block a user