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

Unified Diff: Source/platform/fonts/shaping/HarfBuzzShaper.cpp

Issue 645363003: Consolidate most simple vs. complex Font methods (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: minor cleanup 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/fonts/shaping/HarfBuzzShaper.h ('k') | Source/platform/graphics/GraphicsContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/shaping/HarfBuzzShaper.cpp
diff --git a/Source/platform/fonts/shaping/HarfBuzzShaper.cpp b/Source/platform/fonts/shaping/HarfBuzzShaper.cpp
index bcf441c52f205f331c6ae205cf4aa08369f9f3f3..e1393ce18e96fbfc7f949e5fd83fb892b388737b 100644
--- a/Source/platform/fonts/shaping/HarfBuzzShaper.cpp
+++ b/Source/platform/fonts/shaping/HarfBuzzShaper.cpp
@@ -950,7 +950,8 @@ void HarfBuzzShaper::setGlyphPositionsForHarfBuzzRun(HarfBuzzRun* currentRun, hb
m_totalWidth += currentRun->width();
}
-void HarfBuzzShaper::fillGlyphBufferFromHarfBuzzRun(GlyphBufferWithOffsets* glyphBuffer, HarfBuzzRun* currentRun, float& carryAdvance)
+void HarfBuzzShaper::fillGlyphBufferFromHarfBuzzRun(GlyphBuffer* glyphBuffer,
+ HarfBuzzRun* currentRun, float& carryAdvance)
{
FloatSize* offsets = currentRun->offsets();
uint16_t* glyphs = currentRun->glyphs();
@@ -1049,12 +1050,9 @@ bool HarfBuzzShaper::fillGlyphBuffer(GlyphBuffer* glyphBuffer)
continue;
}
if (m_forTextEmphasis == ForTextEmphasis) {
- ASSERT(!glyphBuffer->hasOffsets());
fillGlyphBufferForTextEmphasis(glyphBuffer, currentRun);
} else {
- ASSERT(glyphBuffer->hasOffsets());
- fillGlyphBufferFromHarfBuzzRun(
- static_cast<GlyphBufferWithOffsets*>(glyphBuffer), currentRun, carryAdvance);
+ fillGlyphBufferFromHarfBuzzRun(glyphBuffer, currentRun, carryAdvance);
}
}
} else {
@@ -1065,12 +1063,9 @@ bool HarfBuzzShaper::fillGlyphBuffer(GlyphBuffer* glyphBuffer)
continue;
}
if (m_forTextEmphasis == ForTextEmphasis) {
- ASSERT(!glyphBuffer->hasOffsets());
fillGlyphBufferForTextEmphasis(glyphBuffer, currentRun);
} else {
- ASSERT(glyphBuffer->hasOffsets());
- fillGlyphBufferFromHarfBuzzRun(
- static_cast<GlyphBufferWithOffsets*>(glyphBuffer), currentRun, carryAdvance);
+ fillGlyphBufferFromHarfBuzzRun(glyphBuffer, currentRun, carryAdvance);
}
}
}
« no previous file with comments | « Source/platform/fonts/shaping/HarfBuzzShaper.h ('k') | Source/platform/graphics/GraphicsContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698