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

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

Issue 608413002: Change SimpleShaper::advance to take unsigned (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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 | « no previous file | Source/platform/fonts/SimpleShaper.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) 2003, 2006, 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2006, 2008, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Holger Hans Peter Freyther 3 * Copyright (C) 2008 Holger Hans Peter Freyther
4 * Copyright (C) 2014 Google Inc. All rights reserved. 4 * Copyright (C) 2014 Google Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 25 matching lines...) Expand all
36 class GlyphBuffer; 36 class GlyphBuffer;
37 class SimpleFontData; 37 class SimpleFontData;
38 class TextRun; 38 class TextRun;
39 struct GlyphData; 39 struct GlyphData;
40 40
41 struct PLATFORM_EXPORT SimpleShaper { 41 struct PLATFORM_EXPORT SimpleShaper {
42 WTF_MAKE_FAST_ALLOCATED; 42 WTF_MAKE_FAST_ALLOCATED;
43 public: 43 public:
44 SimpleShaper(const Font*, const TextRun&, HashSet<const SimpleFontData*>* fa llbackFonts = 0, bool accountForGlyphBounds = false, bool forTextEmphasis = fals e); 44 SimpleShaper(const Font*, const TextRun&, HashSet<const SimpleFontData*>* fa llbackFonts = 0, bool accountForGlyphBounds = false, bool forTextEmphasis = fals e);
45 45
46 unsigned advance(int to, GlyphBuffer* = 0); 46 unsigned advance(unsigned to, GlyphBuffer* = 0);
47 bool advanceOneCharacter(float& width); 47 bool advanceOneCharacter(float& width);
48 48
49 float maxGlyphBoundingBoxY() const { ASSERT(m_accountForGlyphBounds); return m_maxGlyphBoundingBoxY; } 49 float maxGlyphBoundingBoxY() const { ASSERT(m_accountForGlyphBounds); return m_maxGlyphBoundingBoxY; }
50 float minGlyphBoundingBoxY() const { ASSERT(m_accountForGlyphBounds); return m_minGlyphBoundingBoxY; } 50 float minGlyphBoundingBoxY() const { ASSERT(m_accountForGlyphBounds); return m_minGlyphBoundingBoxY; }
51 float firstGlyphOverflow() const { ASSERT(m_accountForGlyphBounds); return m _firstGlyphOverflow; } 51 float firstGlyphOverflow() const { ASSERT(m_accountForGlyphBounds); return m _firstGlyphOverflow; }
52 float lastGlyphOverflow() const { ASSERT(m_accountForGlyphBounds); return m_ lastGlyphOverflow; } 52 float lastGlyphOverflow() const { ASSERT(m_accountForGlyphBounds); return m_ lastGlyphOverflow; }
53 53
54 const TextRun& run() const { return m_run; } 54 const TextRun& run() const { return m_run; }
55 float runWidthSoFar() const { return m_runWidthSoFar; } 55 float runWidthSoFar() const { return m_runWidthSoFar; }
56 unsigned currentOffset() { return m_currentCharacter; } 56 unsigned currentOffset() { return m_currentCharacter; }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 float m_firstGlyphOverflow; 95 float m_firstGlyphOverflow;
96 float m_lastGlyphOverflow; 96 float m_lastGlyphOverflow;
97 97
98 bool m_accountForGlyphBounds : 1; 98 bool m_accountForGlyphBounds : 1;
99 bool m_forTextEmphasis : 1; 99 bool m_forTextEmphasis : 1;
100 }; 100 };
101 101
102 } // namespace blink 102 } // namespace blink
103 103
104 #endif 104 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/platform/fonts/SimpleShaper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698