mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:57:45 +00:00
LibWeb: Move set_needs_display() from layout node to paintable
For this method, there is no need to go through the layout node when we can directly reach the paintable.
This commit is contained in:
parent
814bed33b4
commit
7c2713c14f
21 changed files with 97 additions and 87 deletions
|
@ -8,6 +8,7 @@
|
|||
#include <LibGL/GLContext.h>
|
||||
#include <LibWeb/HTML/HTMLCanvasElement.h>
|
||||
#include <LibWeb/Layout/Node.h>
|
||||
#include <LibWeb/Painting/Paintable.h>
|
||||
#include <LibWeb/WebGL/WebGLRenderingContextBase.h>
|
||||
|
||||
namespace Web::WebGL {
|
||||
|
@ -99,9 +100,9 @@ void WebGLRenderingContextBase::needs_to_present()
|
|||
{
|
||||
m_should_present = true;
|
||||
|
||||
if (!canvas_element().layout_node())
|
||||
if (!canvas_element().paintable())
|
||||
return;
|
||||
canvas_element().layout_node()->set_needs_display();
|
||||
canvas_element().paintable()->set_needs_display();
|
||||
}
|
||||
|
||||
void WebGLRenderingContextBase::set_error(GLenum error)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue