WebKit Bugzilla
Attachment 358141 Details for
Bug 193058
: clang-tidy: Save 8 padding bytes on WebCore::BorderEdge
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch v1
bug-193058-20181229165853.patch (text/plain), 2.65 KB, created by
David Kilzer (:ddkilzer)
on 2018-12-29 16:58:54 PST
(
hide
)
Description:
Patch v1
Filename:
MIME Type:
Creator:
David Kilzer (:ddkilzer)
Created:
2018-12-29 16:58:54 PST
Size:
2.65 KB
patch
obsolete
>Subversion Revision: 239558 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index f828e8d6e3d9941fe60a30a85a5c98c37803d783..a5f0ab8651d949041f83481c740849a8417d39a9 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,17 @@ >+2018-12-29 David Kilzer <ddkilzer@apple.com> >+ >+ clang-tidy: Save 8 padding bytes on WebCore::BorderEdge >+ <https://webkit.org/b/193058> >+ <rdar://problem/46979275> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * 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-29 David Kilzer <ddkilzer@apple.com> > > Prefer RetainPtr<NSObject> to RetainPtr<NSObject *> >diff --git a/Source/WebCore/rendering/BorderEdge.cpp b/Source/WebCore/rendering/BorderEdge.cpp >index bb30f3d0c1bb55d4723a56494fb74f2730281f76..441efe45eb83c3e4342ac01fe576b5992bca57f7 100644 >--- a/Source/WebCore/rendering/BorderEdge.cpp >+++ b/Source/WebCore/rendering/BorderEdge.cpp >@@ -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; >diff --git a/Source/WebCore/rendering/BorderEdge.h b/Source/WebCore/rendering/BorderEdge.h >index 782cad9c515a05b712049097f6e6f0bcbe1dcbd7..acff0985431a3fefb505935daad898735df05035 100644 >--- a/Source/WebCore/rendering/BorderEdge.h >+++ b/Source/WebCore/rendering/BorderEdge.h >@@ -67,13 +67,13 @@ public: > private: > inline float borderWidthInDevicePixel(int logicalPixels) const { return LayoutUnit(logicalPixels / m_devicePixelRatio).toFloat(); } > >- LayoutUnit m_width; > Color m_color; >+ LayoutUnit m_width; >+ 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(); }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193058
: 358141