mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-01 06:07:59 +00:00
LibGfx+LibWeb: Cache SkImage in ImmutableBitmap
By caching the SkImage that is reused across repaints, we allow Skia t optimize GPU texture caching. ImmutableBitmap is chosen to own the SkImage because it guarantees that the underlying pixels cannot be modified. This is not the case for Gfx::Bitmap, where invalidating the SkImage would be challenging since it exposes pointers to underlying data through methods like scanline().
This commit is contained in:
committed by
Alexander Kalenik
parent
460803d2da
commit
698bca686e
@@ -53,7 +53,7 @@ void WebGLRenderingContextBase::present()
|
||||
// FIXME: Is this the operation it means?
|
||||
m_context->gl_flush();
|
||||
|
||||
m_context->present(canvas_element().surface()->create_snapshot()->bitmap());
|
||||
m_context->present();
|
||||
|
||||
// "By default, after compositing the contents of the drawing buffer shall be cleared to their default values, as shown in the table above.
|
||||
// This default behavior can be changed by setting the preserveDrawingBuffer attribute of the WebGLContextAttributes object.
|
||||
|
||||
Reference in New Issue
Block a user