summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2021-04-14 23:22:45 +0300
committerAndreas Kling <kling@serenityos.org>2021-04-14 23:01:23 +0200
commit0a580ef891e766aa08513fb9cdec4b21124530d3 (patch)
tree8f826501316edcc0dd9ad37722d3611ef9e85523 /Userland
parentb7c3f046f7133656b51187afbe7f0dcec53035f2 (diff)
downloadserenity-0a580ef891e766aa08513fb9cdec4b21124530d3.zip
LibWeb: Request repaint on canvas path finalizaiton via fill/stroke
Since these were not requesting a repaint the drawn path was not being rendered until a repaint was forced in some other way (window resize).
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp b/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp
index ebb7640ce6..bb2fee79d9 100644
--- a/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp
+++ b/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp
@@ -195,6 +195,7 @@ void CanvasRenderingContext2D::stroke()
return;
painter->stroke_path(m_path, m_stroke_style, m_line_width);
+ did_draw(m_path.bounding_box());
}
void CanvasRenderingContext2D::fill(Gfx::Painter::WindingRule winding)
@@ -206,6 +207,7 @@ void CanvasRenderingContext2D::fill(Gfx::Painter::WindingRule winding)
auto path = m_path;
path.close_all_subpaths();
painter->fill_path(path, m_fill_style, winding);
+ did_draw(m_path.bounding_box());
}
void CanvasRenderingContext2D::fill(const String& fill_rule)