Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(358)

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.h

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org>
4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2006 Apple Computer, Inc 5 * Copyright (C) 2006 Apple Computer, Inc
6 * Copyright (C) 2009 Google, Inc. 6 * Copyright (C) 2009 Google, Inc.
7 * Copyright (C) 2011 Renata Hodovan <reni@webkit.org> 7 * Copyright (C) 2011 Renata Hodovan <reni@webkit.org>
8 * Copyright (C) 2011 University of Szeged 8 * Copyright (C) 2011 University of Szeged
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 12 matching lines...) Expand all
23 * Boston, MA 02110-1301, USA. 23 * Boston, MA 02110-1301, USA.
24 */ 24 */
25 25
26 #ifndef LayoutSVGShape_h 26 #ifndef LayoutSVGShape_h
27 #define LayoutSVGShape_h 27 #define LayoutSVGShape_h
28 28
29 #include "core/layout/svg/LayoutSVGModelObject.h" 29 #include "core/layout/svg/LayoutSVGModelObject.h"
30 #include "core/layout/svg/SVGMarkerData.h" 30 #include "core/layout/svg/SVGMarkerData.h"
31 #include "platform/geometry/FloatRect.h" 31 #include "platform/geometry/FloatRect.h"
32 #include "platform/transforms/AffineTransform.h" 32 #include "platform/transforms/AffineTransform.h"
33 #include "wtf/OwnPtr.h"
33 #include "wtf/Vector.h" 34 #include "wtf/Vector.h"
34 #include <memory>
35 35
36 namespace blink { 36 namespace blink {
37 37
38 class FloatPoint; 38 class FloatPoint;
39 class PointerEventsHitRules; 39 class PointerEventsHitRules;
40 class SVGGeometryElement; 40 class SVGGeometryElement;
41 41
42 enum ShapeGeometryCodePath { 42 enum ShapeGeometryCodePath {
43 PathGeometry, 43 PathGeometry,
44 RectGeometryFastPath, 44 RectGeometryFastPath,
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 FloatRect strokeBoundingBox() const final { return m_strokeBoundingBox; } 124 FloatRect strokeBoundingBox() const final { return m_strokeBoundingBox; }
125 FloatRect calculateObjectBoundingBox() const; 125 FloatRect calculateObjectBoundingBox() const;
126 FloatRect calculateStrokeBoundingBox() const; 126 FloatRect calculateStrokeBoundingBox() const;
127 void updateLocalTransform(); 127 void updateLocalTransform();
128 128
129 private: 129 private:
130 AffineTransform m_localTransform; 130 AffineTransform m_localTransform;
131 // TODO(fmalita): the Path is now cached in SVGPath; while this additional c ache is just a 131 // TODO(fmalita): the Path is now cached in SVGPath; while this additional c ache is just a
132 // shallow copy, it certainly has a complexity/state management cost (plus a llocation & storage 132 // shallow copy, it certainly has a complexity/state management cost (plus a llocation & storage
133 // overhead) - so we should look into removing it. 133 // overhead) - so we should look into removing it.
134 std::unique_ptr<Path> m_path; 134 OwnPtr<Path> m_path;
135 mutable std::unique_ptr<LayoutSVGShapeRareData> m_rareData; 135 mutable OwnPtr<LayoutSVGShapeRareData> m_rareData;
136 136
137 bool m_needsBoundariesUpdate : 1; 137 bool m_needsBoundariesUpdate : 1;
138 bool m_needsShapeUpdate : 1; 138 bool m_needsShapeUpdate : 1;
139 bool m_needsTransformUpdate : 1; 139 bool m_needsTransformUpdate : 1;
140 }; 140 };
141 141
142 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGShape, isSVGShape()); 142 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGShape, isSVGShape());
143 143
144 } // namespace blink 144 } // namespace blink
145 145
146 #endif 146 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698