Title: [149927] trunk/Source/WebCore
Revision
149927
Author
[email protected]
Date
2013-05-11 00:56:09 -0700 (Sat, 11 May 2013)

Log Message

Gradient::platformGradient: Vector reserveCapacity -> reserveInitialCapacity
https://bugs.webkit.org/show_bug.cgi?id=115779

Reviewed by Andreas Kling.

* platform/graphics/cg/GradientCG.cpp:
(WebCore::Gradient::platformGradient): Clang is surprisingly smart at removing
all the branches of this function. Remove two more with reserveInitialCapacity.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (149926 => 149927)


--- trunk/Source/WebCore/ChangeLog	2013-05-11 07:47:44 UTC (rev 149926)
+++ trunk/Source/WebCore/ChangeLog	2013-05-11 07:56:09 UTC (rev 149927)
@@ -1,3 +1,14 @@
+2013-05-11  Benjamin Poulain  <[email protected]>
+
+        Gradient::platformGradient: Vector reserveCapacity -> reserveInitialCapacity
+        https://bugs.webkit.org/show_bug.cgi?id=115779
+
+        Reviewed by Andreas Kling.
+
+        * platform/graphics/cg/GradientCG.cpp:
+        (WebCore::Gradient::platformGradient): Clang is surprisingly smart at removing
+        all the branches of this function. Remove two more with reserveInitialCapacity.
+
 2013-05-10  Alexey Proskuryakov  <[email protected]>
 
         <rdar://problem/13666412> Clean up some edge cases of URL parsing.

Modified: trunk/Source/WebCore/platform/graphics/cg/GradientCG.cpp (149926 => 149927)


--- trunk/Source/WebCore/platform/graphics/cg/GradientCG.cpp	2013-05-11 07:47:44 UTC (rev 149926)
+++ trunk/Source/WebCore/platform/graphics/cg/GradientCG.cpp	2013-05-11 07:56:09 UTC (rev 149927)
@@ -48,10 +48,10 @@
     
     const int cReservedStops = 3;
     Vector<CGFloat, 4 * cReservedStops> colorComponents;
-    colorComponents.reserveCapacity(m_stops.size() * 4); // RGBA components per stop
+    colorComponents.reserveInitialCapacity(m_stops.size() * 4); // RGBA components per stop
 
     Vector<CGFloat, cReservedStops> locations;
-    locations.reserveCapacity(m_stops.size());
+    locations.reserveInitialCapacity(m_stops.size());
 
     for (size_t i = 0; i < m_stops.size(); ++i) {
         colorComponents.uncheckedAppend(m_stops[i].red);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to