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

Side by Side Diff: Source/platform/fonts/GlyphPageTreeNode.h

Issue 397733004: Allow assertions to be enabled in Blink Release builds. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/platform/Timer.cpp ('k') | Source/platform/fonts/GlyphPageTreeNode.cpp » ('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) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. 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 copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 static size_t treeGlyphPageCount(); 96 static size_t treeGlyphPageCount();
97 size_t pageCount() const; 97 size_t pageCount() const;
98 98
99 private: 99 private:
100 GlyphPageTreeNode() 100 GlyphPageTreeNode()
101 : m_parent(0) 101 : m_parent(0)
102 , m_level(0) 102 , m_level(0)
103 , m_isSystemFallback(false) 103 , m_isSystemFallback(false)
104 , m_customFontCount(0) 104 , m_customFontCount(0)
105 #ifndef NDEBUG 105 #if ENABLE(ASSERT)
106 , m_pageNumber(0) 106 , m_pageNumber(0)
107 #endif 107 #endif
108 { 108 {
109 } 109 }
110 110
111 static GlyphPageTreeNode* getRoot(unsigned pageNumber); 111 static GlyphPageTreeNode* getRoot(unsigned pageNumber);
112 void initializePage(const FontData*, unsigned pageNumber); 112 void initializePage(const FontData*, unsigned pageNumber);
113 113
114 #ifndef NDEBUG 114 #ifndef NDEBUG
115 void showSubtree(); 115 void showSubtree();
116 #endif 116 #endif
117 117
118 static HashMap<int, GlyphPageTreeNode*>* roots; 118 static HashMap<int, GlyphPageTreeNode*>* roots;
119 static GlyphPageTreeNode* pageZeroRoot; 119 static GlyphPageTreeNode* pageZeroRoot;
120 120
121 typedef HashMap<const FontData*, OwnPtr<GlyphPageTreeNode> > GlyphPageTreeNo deMap; 121 typedef HashMap<const FontData*, OwnPtr<GlyphPageTreeNode> > GlyphPageTreeNo deMap;
122 122
123 GlyphPageTreeNodeMap m_children; 123 GlyphPageTreeNodeMap m_children;
124 GlyphPageTreeNode* m_parent; 124 GlyphPageTreeNode* m_parent;
125 RefPtr<GlyphPage> m_page; 125 RefPtr<GlyphPage> m_page;
126 unsigned m_level : 31; 126 unsigned m_level : 31;
127 bool m_isSystemFallback : 1; 127 bool m_isSystemFallback : 1;
128 unsigned m_customFontCount; 128 unsigned m_customFontCount;
129 OwnPtr<GlyphPageTreeNode> m_systemFallbackChild; 129 OwnPtr<GlyphPageTreeNode> m_systemFallbackChild;
130 130
131 #if ENABLE(ASSERT)
132 unsigned m_pageNumber;
133 #endif
131 #ifndef NDEBUG 134 #ifndef NDEBUG
132 unsigned m_pageNumber;
133
134 friend void ::showGlyphPageTrees(); 135 friend void ::showGlyphPageTrees();
135 friend void ::showGlyphPageTree(unsigned pageNumber); 136 friend void ::showGlyphPageTree(unsigned pageNumber);
136 #endif 137 #endif
137 }; 138 };
138 139
139 } // namespace WebCore 140 } // namespace WebCore
140 141
141 #endif // GlyphPageTreeNode_h 142 #endif // GlyphPageTreeNode_h
OLDNEW
« no previous file with comments | « Source/platform/Timer.cpp ('k') | Source/platform/fonts/GlyphPageTreeNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698