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

Unified Diff: Source/core/layout/TextAutosizer.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, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/layout/SubtreeLayoutScope.h ('k') | Source/core/layout/VerticalPositionCache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/TextAutosizer.h
diff --git a/Source/core/layout/TextAutosizer.h b/Source/core/layout/TextAutosizer.h
index 9635c0e6c0c4508f9ae9fbbfffece83c55956cfb..202efa951d2712d6cdf85b8755070cc7d948e525 100644
--- a/Source/core/layout/TextAutosizer.h
+++ b/Source/core/layout/TextAutosizer.h
@@ -52,6 +52,7 @@ class LayoutBlock;
// http://tinyurl.com/TextAutosizer
class CORE_EXPORT TextAutosizer final : public NoBaseWillBeGarbageCollectedFinalized<TextAutosizer> {
+ WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(TextAutosizer);
WTF_MAKE_NONCOPYABLE(TextAutosizer);
public:
static PassOwnPtrWillBeRawPtr<TextAutosizer> create(const Document* document)
@@ -80,6 +81,7 @@ public:
};
class TableLayoutScope : LayoutScope {
+ STACK_ALLOCATED();
public:
explicit TableLayoutScope(LayoutTable*);
};
@@ -138,6 +140,8 @@ private:
// belong to a supercluster will share a common multiplier and
// text-length-based autosizing status.
struct Supercluster {
+ WTF_MAKE_FAST_ALLOCATED(Supercluster);
+ public:
explicit Supercluster(const BlockSet* roots)
: m_roots(roots)
, m_hasEnoughTextToAutosize(UnknownAmountOfText)
@@ -151,6 +155,8 @@ private:
};
struct Cluster {
+ WTF_MAKE_FAST_ALLOCATED(Cluster);
+ public:
explicit Cluster(const LayoutBlock* root, BlockFlags flags, Cluster* parent, Supercluster* supercluster = nullptr)
: m_root(root)
, m_flags(flags)
@@ -186,6 +192,7 @@ private:
};
struct FingerprintSourceData {
+ STACK_ALLOCATED();
FingerprintSourceData()
: m_parentHash(0)
, m_qualifiedNameHash(0)
@@ -213,6 +220,7 @@ private:
// Fingerprints are computed during style recalc, for (some subset of)
// blocks that will become cluster roots.
class FingerprintMapper {
+ DISALLOW_ALLOCATION();
public:
void add(const LayoutObject*, Fingerprint);
void addTentativeClusterRoot(const LayoutBlock*, Fingerprint);
@@ -233,6 +241,7 @@ private:
};
struct PageInfo {
+ DISALLOW_ALLOCATION();
PageInfo()
: m_frameWidth(0)
, m_layoutWidth(0)
« no previous file with comments | « Source/core/layout/SubtreeLayoutScope.h ('k') | Source/core/layout/VerticalPositionCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698