Title: [239563] trunk/Source/WebCore
Revision
239563
Author
[email protected]
Date
2018-12-30 13:56:50 -0800 (Sun, 30 Dec 2018)

Log Message

clang-tidy: Save 8 padding bytes on WebCore::BorderEdge
<https://webkit.org/b/193058>
<rdar://problem/46979275>

Reviewed by Yusuke Suzuki.

* rendering/BorderEdge.cpp:
(WebCore::BorderEdge::BorderEdge): Reorder initialization to
match new instance variable order.
* rendering/BorderEdge.h: Reorder instance variables to save
8 padding bytes.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (239562 => 239563)


--- trunk/Source/WebCore/ChangeLog	2018-12-30 21:23:11 UTC (rev 239562)
+++ trunk/Source/WebCore/ChangeLog	2018-12-30 21:56:50 UTC (rev 239563)
@@ -1,3 +1,17 @@
+2018-12-30  David Kilzer  <[email protected]>
+
+        clang-tidy: Save 8 padding bytes on WebCore::BorderEdge
+        <https://webkit.org/b/193058>
+        <rdar://problem/46979275>
+
+        Reviewed by Yusuke Suzuki.
+
+        * rendering/BorderEdge.cpp:
+        (WebCore::BorderEdge::BorderEdge): Reorder initialization to
+        match new instance variable order.
+        * rendering/BorderEdge.h: Reorder instance variables to save
+        8 padding bytes.
+
 2018-12-28  Yusuke Suzuki  <[email protected]>
 
         [JSC] Remove one indirection in JSObject::toStringName

Modified: trunk/Source/WebCore/rendering/BorderEdge.cpp (239562 => 239563)


--- trunk/Source/WebCore/rendering/BorderEdge.cpp	2018-12-30 21:23:11 UTC (rev 239562)
+++ trunk/Source/WebCore/rendering/BorderEdge.cpp	2018-12-30 21:56:50 UTC (rev 239563)
@@ -34,12 +34,12 @@
 namespace WebCore {
 
 BorderEdge::BorderEdge(float edgeWidth, Color edgeColor, BorderStyle edgeStyle, bool edgeIsTransparent, bool edgeIsPresent, float devicePixelRatio)
-    : m_width(edgeWidth)
-    , m_color(edgeColor)
+    : m_color(edgeColor)
+    , m_width(edgeWidth)
+    , m_devicePixelRatio(devicePixelRatio)
     , m_style(edgeStyle)
     , m_isTransparent(edgeIsTransparent)
     , m_isPresent(edgeIsPresent)
-    , m_devicePixelRatio(devicePixelRatio)
 {
     if (edgeStyle == BorderStyle::Double && edgeWidth  < borderWidthInDevicePixel(3))
         m_style = BorderStyle::Solid;

Modified: trunk/Source/WebCore/rendering/BorderEdge.h (239562 => 239563)


--- trunk/Source/WebCore/rendering/BorderEdge.h	2018-12-30 21:23:11 UTC (rev 239562)
+++ trunk/Source/WebCore/rendering/BorderEdge.h	2018-12-30 21:56:50 UTC (rev 239563)
@@ -67,13 +67,13 @@
 private:
     inline float borderWidthInDevicePixel(int logicalPixels) const { return LayoutUnit(logicalPixels / m_devicePixelRatio).toFloat(); }
 
+    Color m_color;
     LayoutUnit m_width;
-    Color m_color;
+    float m_flooredToDevicePixelWidth { 0 };
+    float m_devicePixelRatio { 1 };
     BorderStyle m_style { BorderStyle::Hidden };
     bool m_isTransparent { false };
     bool m_isPresent { false };
-    float m_flooredToDevicePixelWidth { 0 };
-    float m_devicePixelRatio { 1 };
 };
 
 inline bool edgesShareColor(const BorderEdge& firstEdge, const BorderEdge& secondEdge) { return firstEdge.color() == secondEdge.color(); }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to