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

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

Issue 116423007: Moving Text Simple/Complex Path prefix from Font.cpp to new File (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixing merge issues Created 6 years, 11 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/platform/blink_platform.gypi ('k') | Source/platform/fonts/Font.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) 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 13 matching lines...) Expand all
24 24
25 #ifndef Font_h 25 #ifndef Font_h
26 #define Font_h 26 #define Font_h
27 27
28 #include "platform/PlatformExport.h" 28 #include "platform/PlatformExport.h"
29 #include "platform/fonts/FontDescription.h" 29 #include "platform/fonts/FontDescription.h"
30 #include "platform/fonts/FontFallbackList.h" 30 #include "platform/fonts/FontFallbackList.h"
31 #include "platform/fonts/SimpleFontData.h" 31 #include "platform/fonts/SimpleFontData.h"
32 #include "platform/fonts/TypesettingFeatures.h" 32 #include "platform/fonts/TypesettingFeatures.h"
33 #include "platform/text/TextDirection.h" 33 #include "platform/text/TextDirection.h"
34 #include "platform/text/TextPath.h"
34 #include "wtf/HashMap.h" 35 #include "wtf/HashMap.h"
35 #include "wtf/HashSet.h" 36 #include "wtf/HashSet.h"
36 #include "wtf/MathExtras.h" 37 #include "wtf/MathExtras.h"
37 #include "wtf/unicode/CharacterNames.h" 38 #include "wtf/unicode/CharacterNames.h"
38 39
39 // "X11/X.h" defines Complex to 0 and conflicts 40 // "X11/X.h" defines Complex to 0 and conflicts
40 // with Complex value in CodePath enum. 41 // with Complex value in CodePath enum.
41 #ifdef Complex 42 #ifdef Complex
42 #undef Complex 43 #undef Complex
43 #endif 44 #endif
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 156
156 static bool isCJKIdeograph(UChar32); 157 static bool isCJKIdeograph(UChar32);
157 static bool isCJKIdeographOrSymbol(UChar32); 158 static bool isCJKIdeographOrSymbol(UChar32);
158 159
159 static unsigned expansionOpportunityCount(const LChar*, size_t length, TextD irection, bool& isAfterExpansion); 160 static unsigned expansionOpportunityCount(const LChar*, size_t length, TextD irection, bool& isAfterExpansion);
160 static unsigned expansionOpportunityCount(const UChar*, size_t length, TextD irection, bool& isAfterExpansion); 161 static unsigned expansionOpportunityCount(const UChar*, size_t length, TextD irection, bool& isAfterExpansion);
161 162
162 static void setShouldUseSmoothing(bool); 163 static void setShouldUseSmoothing(bool);
163 static bool shouldUseSmoothing(); 164 static bool shouldUseSmoothing();
164 165
165 enum CodePath { Auto, Simple, Complex, SimpleWithGlyphOverflow };
166 CodePath codePath(const TextRun&) const; 166 CodePath codePath(const TextRun&) const;
167 static CodePath characterRangeCodePath(const LChar*, unsigned) { return Simp le; } 167 static CodePath characterRangeCodePath(const LChar*, unsigned) { return Simp lePath; }
168 static CodePath characterRangeCodePath(const UChar*, unsigned len); 168 static CodePath characterRangeCodePath(const UChar*, unsigned len);
169 169
170 private: 170 private:
171 enum ForTextEmphasisOrNot { NotForTextEmphasis, ForTextEmphasis }; 171 enum ForTextEmphasisOrNot { NotForTextEmphasis, ForTextEmphasis };
172 172
173 // Returns the initial in-stream advance. 173 // Returns the initial in-stream advance.
174 float getGlyphsAndAdvancesForSimpleText(const TextRun&, int from, int to, Gl yphBuffer&, ForTextEmphasisOrNot = NotForTextEmphasis) const; 174 float getGlyphsAndAdvancesForSimpleText(const TextRun&, int from, int to, Gl yphBuffer&, ForTextEmphasisOrNot = NotForTextEmphasis) const;
175 void drawSimpleText(GraphicsContext*, const TextRunPaintInfo&, const FloatPo int&) const; 175 void drawSimpleText(GraphicsContext*, const TextRunPaintInfo&, const FloatPo int&) const;
176 void drawEmphasisMarksForSimpleText(GraphicsContext*, const TextRunPaintInfo &, const AtomicString& mark, const FloatPoint&) const; 176 void drawEmphasisMarksForSimpleText(GraphicsContext*, const TextRunPaintInfo &, const AtomicString& mark, const FloatPoint&) const;
177 void drawGlyphs(GraphicsContext*, const SimpleFontData*, const GlyphBuffer&, unsigned from, unsigned numGlyphs, const FloatPoint&, const FloatRect& textRect ) const; 177 void drawGlyphs(GraphicsContext*, const SimpleFontData*, const GlyphBuffer&, unsigned from, unsigned numGlyphs, const FloatPoint&, const FloatRect& textRect ) const;
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 333
334 namespace WTF { 334 namespace WTF {
335 335
336 template <> struct PLATFORM_EXPORT OwnedPtrDeleter<WebCore::TextLayout> { 336 template <> struct PLATFORM_EXPORT OwnedPtrDeleter<WebCore::TextLayout> {
337 static void deletePtr(WebCore::TextLayout*); 337 static void deletePtr(WebCore::TextLayout*);
338 }; 338 };
339 339
340 } 340 }
341 341
342 #endif 342 #endif
OLDNEW
« no previous file with comments | « Source/platform/blink_platform.gypi ('k') | Source/platform/fonts/Font.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698