Commit 8c076a71 authored by mdelaney@apple.com's avatar mdelaney@apple.com

Allow canvas backing store to be lazily allocated

https://bugs.webkit.org/show_bug.cgi?id=67054

Reviewed by Darin Adler.

No new tests; doesn't affect behavior.

* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::createImageBuffer): Removed the setting of lineWidth
that caused the eager creation of ImageBuffer to use its GraphicsContext.
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D): Added in default
line width setting along with other default context settings.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent fd9cb027
2011-10-04 Matthew Delaney <mdelaney@apple.com>
Allow canvas backing store to be lazily allocated
https://bugs.webkit.org/show_bug.cgi?id=67054
Reviewed by Darin Adler.
No new tests; doesn't affect behavior.
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::createImageBuffer): Removed the setting of lineWidth
that caused the eager creation of ImageBuffer to use its GraphicsContext.
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D): Added in default
line width setting along with other default context settings.
2011-10-04 Sam Weinig <sam@webkit.org>
Add support for the CSP connect-src directive
......@@ -458,6 +458,7 @@ void HTMLCanvasElement::createImageBuffer() const
m_imageBuffer->context()->scale(FloatSize(bufferSize.width() / logicalSize.width(), bufferSize.height() / logicalSize.height()));
m_imageBuffer->context()->setShadowsIgnoreTransforms(true);
m_imageBuffer->context()->setImageInterpolationQuality(DefaultInterpolationQuality);
m_imageBuffer->context()->setStrokeThickness(1);
#if USE(JSC)
JSC::JSLock lock(JSC::SilenceAssertionsOnly);
......
......@@ -122,10 +122,6 @@ CanvasRenderingContext2D::CanvasRenderingContext2D(HTMLCanvasElement* canvas, bo
#if !ENABLE(DASHBOARD_SUPPORT)
ASSERT_UNUSED(usesDashboardCompatibilityMode, !usesDashboardCompatibilityMode);
#endif
// Make sure that even if the drawingContext() has a different default
// thickness, it is in sync with the canvas thickness.
setLineWidth(lineWidth());
}
void CanvasRenderingContext2D::unwindStateStack()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment