summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-04-22 00:09:23 +0200
committerAndreas Kling <kling@serenityos.org>2020-04-22 00:09:23 +0200
commitef69f900c79d4c6a415a197f30606b97a49eb6b4 (patch)
treeea3ef8c135c0481f559217d540ea6be90855f023
parent5326eebb1b18627a75c7a6b03b8b988a347ab86c (diff)
downloadserenity-ef69f900c79d4c6a415a197f30606b97a49eb6b4.zip
LibWeb: Invalidate the canvas element after put_image_data()
This makes sure we repaint it right away so we can see the changes.
-rw-r--r--Libraries/LibWeb/DOM/CanvasRenderingContext2D.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Libraries/LibWeb/DOM/CanvasRenderingContext2D.cpp b/Libraries/LibWeb/DOM/CanvasRenderingContext2D.cpp
index 379e7e21dc..8359cbaf44 100644
--- a/Libraries/LibWeb/DOM/CanvasRenderingContext2D.cpp
+++ b/Libraries/LibWeb/DOM/CanvasRenderingContext2D.cpp
@@ -188,6 +188,8 @@ void CanvasRenderingContext2D::put_image_data(const ImageData& image_data, float
return;
painter->blit(Gfx::Point(x, y), image_data.bitmap(), image_data.bitmap().rect());
+
+ did_draw(Gfx::FloatRect(x, y, image_data.width(), image_data.height()));
}
}