mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +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:
parent
28388f1fd2
commit
30d915c361
Notes:
github-actions[bot]
2024-12-20 19:48:39 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 30d915c361
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2994
4 changed files with 20 additions and 19 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue