Title: [96624] trunk/Source/WebCore
Revision
96624
Author
mdela...@apple.com
Date
2011-10-04 11:41:41 -0700 (Tue, 04 Oct 2011)

Log Message

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.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (96623 => 96624)


--- trunk/Source/WebCore/ChangeLog	2011-10-04 18:39:33 UTC (rev 96623)
+++ trunk/Source/WebCore/ChangeLog	2011-10-04 18:41:41 UTC (rev 96624)
@@ -1,3 +1,19 @@
+2011-10-04  Matthew Delaney  <mdela...@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  <s...@webkit.org>
 
         Add support for the CSP connect-src directive

Modified: trunk/Source/WebCore/html/HTMLCanvasElement.cpp (96623 => 96624)


--- trunk/Source/WebCore/html/HTMLCanvasElement.cpp	2011-10-04 18:39:33 UTC (rev 96623)
+++ trunk/Source/WebCore/html/HTMLCanvasElement.cpp	2011-10-04 18:41:41 UTC (rev 96624)
@@ -458,6 +458,7 @@
     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);

Modified: trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp (96623 => 96624)


--- trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp	2011-10-04 18:39:33 UTC (rev 96623)
+++ trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp	2011-10-04 18:41:41 UTC (rev 96624)
@@ -122,10 +122,6 @@
 #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()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to