Truly independent web browser
LibWeb: Keep the cached paint style of a solid canvas color
Andreas Klingc3e37f62f2f4
diff --git a/Libraries/LibWeb/HTML/Canvas/DrawingState.cpp b/Libraries/LibWeb/HTML/Canvas/DrawingState.cppindex 2503c88613e..8786777f7da 100644--- a/Libraries/LibWeb/HTML/Canvas/DrawingState.cpp+++ b/Libraries/LibWeb/HTML/Canvas/DrawingState.cpp@@ -14,7 +14,7 @@ NonnullRefPtr<Gfx::PaintStyle> FillOrStrokeStyle::to_gfx_paint_style()[&](Gfx::Color color) -> NonnullRefPtr<Gfx::PaintStyle> {if (!m_color_paint_style)m_color_paint_style = Gfx::SolidColorPaintStyle::create(color).release_value_but_fixme_should_propagate_errors();- return m_color_paint_style.release_nonnull();+ return *m_color_paint_style;},[&](auto handle) {return handle->to_gfx_paint_style();