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

Unified Diff: Source/platform/fonts/shaping/SimpleShaper.h

Issue 860163004: Using FloatRect in SimpleShaper and remove GlyphBounds (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Comment fixes Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/fonts/shaping/HarfBuzzShaper.cpp ('k') | Source/platform/fonts/shaping/SimpleShaper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/shaping/SimpleShaper.h
diff --git a/Source/platform/fonts/shaping/SimpleShaper.h b/Source/platform/fonts/shaping/SimpleShaper.h
index acaab8839553d6d65b477bc3093c71abf4d6b6a9..ff8fb8b1f894c321c4c7bcf104a8b9f6dd09d483 100644
--- a/Source/platform/fonts/shaping/SimpleShaper.h
+++ b/Source/platform/fonts/shaping/SimpleShaper.h
@@ -24,6 +24,8 @@
#define SimpleShaper_h
#include "platform/PlatformExport.h"
+#include "platform/geometry/FloatPoint.h"
+#include "platform/geometry/FloatRect.h"
#include "platform/text/TextRun.h"
#include "wtf/HashSet.h"
#include "wtf/unicode/Unicode.h"
@@ -39,22 +41,7 @@ struct GlyphData;
struct PLATFORM_EXPORT SimpleShaper {
WTF_MAKE_FAST_ALLOCATED;
public:
- class GlyphBounds {
- public:
- GlyphBounds()
- {
- maxGlyphBoundingBoxY = std::numeric_limits<float>::min();
- minGlyphBoundingBoxY = std::numeric_limits<float>::max();
- firstGlyphOverflow = 0;
- lastGlyphOverflow = 0;
- }
- float maxGlyphBoundingBoxY;
- float minGlyphBoundingBoxY;
- float firstGlyphOverflow;
- float lastGlyphOverflow;
- };
-
- SimpleShaper(const Font*, const TextRun&, HashSet<const SimpleFontData*>* fallbackFonts = 0, GlyphBounds* = 0, bool forTextEmphasis = false);
+ SimpleShaper(const Font*, const TextRun&, HashSet<const SimpleFontData*>* fallbackFonts = 0, FloatRect* = 0, bool forTextEmphasis = false);
unsigned advance(unsigned to, GlyphBuffer* = 0);
bool advanceOneCharacter(float& width);
@@ -82,13 +69,12 @@ private:
float characterWidth(UChar32, const GlyphData&) const;
void cacheFallbackFont(const SimpleFontData*, const SimpleFontData* primaryFont);
float adjustSpacing(float, const CharacterData&);
- void updateGlyphBounds(const GlyphData&, float width, bool firstCharacter);
template <typename TextIterator>
unsigned advanceInternal(TextIterator&, GlyphBuffer*);
HashSet<const SimpleFontData*>* m_fallbackFonts;
- GlyphBounds* m_bounds;
+ FloatRect* m_glyphBoundingBox;
bool m_forTextEmphasis : 1;
};
« no previous file with comments | « Source/platform/fonts/shaping/HarfBuzzShaper.cpp ('k') | Source/platform/fonts/shaping/SimpleShaper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698