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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/Font.h

Issue 2718043003: Refactor InspectorCSSAgent to avoid an intermediate GlyphBuffer (Closed)
Patch Set: cleanup Created 3 years, 9 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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2006, 2007, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2006, 2007, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) 2008 Holger Hans Peter Freyther 6 * Copyright (C) 2008 Holger Hans Peter Freyther
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 private: 201 private:
202 bool shouldSkipDrawing() const { 202 bool shouldSkipDrawing() const {
203 return m_fontFallbackList && m_fontFallbackList->shouldSkipDrawing(); 203 return m_fontFallbackList && m_fontFallbackList->shouldSkipDrawing();
204 } 204 }
205 205
206 FontDescription m_fontDescription; 206 FontDescription m_fontDescription;
207 mutable RefPtr<FontFallbackList> m_fontFallbackList; 207 mutable RefPtr<FontFallbackList> m_fontFallbackList;
208 mutable unsigned m_canShapeWordByWord : 1; 208 mutable unsigned m_canShapeWordByWord : 1;
209 mutable unsigned m_shapeWordByWordComputed : 1; 209 mutable unsigned m_shapeWordByWordComputed : 1;
210 210
211 // For accessing buildGlyphBuffer and retrieving fonts used in rendering a 211 // For m_fontDescription & m_fontFallbackList access.
212 // node. 212 friend class CachingWordShaper;
213 friend class InspectorCSSAgent;
214 }; 213 };
215 214
216 inline Font::~Font() {} 215 inline Font::~Font() {}
217 216
218 inline const SimpleFontData* Font::primaryFont() const { 217 inline const SimpleFontData* Font::primaryFont() const {
219 ASSERT(m_fontFallbackList); 218 ASSERT(m_fontFallbackList);
220 return m_fontFallbackList->primarySimpleFontData(m_fontDescription); 219 return m_fontFallbackList->primarySimpleFontData(m_fontDescription);
221 } 220 }
222 221
223 inline const FontData* Font::fontDataAt(unsigned index) const { 222 inline const FontData* Font::fontDataAt(unsigned index) const {
(...skipping 20 matching lines...) Expand all
244 // advance an additional tab stop. 243 // advance an additional tab stop.
245 if (distanceToTabStop < fontData->spaceWidth() / 2) 244 if (distanceToTabStop < fontData->spaceWidth() / 2)
246 distanceToTabStop += baseTabWidth; 245 distanceToTabStop += baseTabWidth;
247 246
248 return distanceToTabStop; 247 return distanceToTabStop;
249 } 248 }
250 249
251 } // namespace blink 250 } // namespace blink
252 251
253 #endif 252 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp ('k') | third_party/WebKit/Source/platform/fonts/Font.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698