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

Side by Side Diff: Source/core/layout/shapes/RasterShape.h

Issue 1318713003: Make classes and structures in core/layout fast-allocated. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « Source/core/layout/shapes/PolygonShape.h ('k') | Source/core/layout/svg/LayoutSVGInlineText.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 21 matching lines...) Expand all
32 32
33 #include "core/layout/shapes/Shape.h" 33 #include "core/layout/shapes/Shape.h"
34 #include "core/layout/shapes/ShapeInterval.h" 34 #include "core/layout/shapes/ShapeInterval.h"
35 #include "platform/geometry/FloatRect.h" 35 #include "platform/geometry/FloatRect.h"
36 #include "wtf/Assertions.h" 36 #include "wtf/Assertions.h"
37 #include "wtf/Vector.h" 37 #include "wtf/Vector.h"
38 38
39 namespace blink { 39 namespace blink {
40 40
41 class RasterShapeIntervals { 41 class RasterShapeIntervals {
42 WTF_MAKE_FAST_ALLOCATED(RasterShapeIntervals);
42 public: 43 public:
43 RasterShapeIntervals(unsigned size, int offset = 0) 44 RasterShapeIntervals(unsigned size, int offset = 0)
44 : m_offset(offset) 45 : m_offset(offset)
45 { 46 {
46 m_intervals.resize(clampTo<int>(size)); 47 m_intervals.resize(clampTo<int>(size));
47 } 48 }
48 49
49 void initializeBounds(); 50 void initializeBounds();
50 const IntRect& bounds() const { return m_bounds; } 51 const IntRect& bounds() const { return m_bounds; }
51 bool isEmpty() const { return m_bounds.isEmpty(); } 52 bool isEmpty() const { return m_bounds.isEmpty(); }
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 const RasterShapeIntervals& marginIntervals() const; 102 const RasterShapeIntervals& marginIntervals() const;
102 103
103 OwnPtr<RasterShapeIntervals> m_intervals; 104 OwnPtr<RasterShapeIntervals> m_intervals;
104 mutable OwnPtr<RasterShapeIntervals> m_marginIntervals; 105 mutable OwnPtr<RasterShapeIntervals> m_marginIntervals;
105 IntSize m_marginRectSize; 106 IntSize m_marginRectSize;
106 }; 107 };
107 108
108 } // namespace blink 109 } // namespace blink
109 110
110 #endif // RasterShape_h 111 #endif // RasterShape_h
OLDNEW
« no previous file with comments | « Source/core/layout/shapes/PolygonShape.h ('k') | Source/core/layout/svg/LayoutSVGInlineText.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698