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

Unified Diff: Source/platform/fonts/mac/SimpleFontDataCoreText.cpp

Issue 244253003: SimpleFontData::fillGlyphPage should not set zero for missing glyphs (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix expectation Created 6 years, 8 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/GlyphPageTreeNode.cpp ('k') | Source/platform/fonts/skia/SimpleFontDataSkia.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/mac/SimpleFontDataCoreText.cpp
diff --git a/Source/platform/fonts/mac/SimpleFontDataCoreText.cpp b/Source/platform/fonts/mac/SimpleFontDataCoreText.cpp
index b1940d0effecfa753f4b8322551cc131a3145a70..e3b0b86a380881df4fb2f31582a8699eda766ca4 100644
--- a/Source/platform/fonts/mac/SimpleFontDataCoreText.cpp
+++ b/Source/platform/fonts/mac/SimpleFontDataCoreText.cpp
@@ -105,9 +105,7 @@ bool SimpleFontData::fillGlyphPage(GlyphPage* pageToFill, unsigned offset, unsig
if (!shouldUseCoreText(buffer, bufferLength, this)) {
CGFontGetGlyphsForUnichars(platformData().cgFont(), buffer, glyphs.data(), bufferLength);
for (unsigned i = 0; i < length; ++i) {
- if (!glyphs[i]) {
- pageToFill->setGlyphDataForIndex(offset + i, 0, 0);
- } else {
+ if (glyphs[i]) {
pageToFill->setGlyphDataForIndex(offset + i, glyphs[i], this);
haveGlyphs = true;
}
@@ -118,9 +116,7 @@ bool SimpleFontData::fillGlyphPage(GlyphPage* pageToFill, unsigned offset, unsig
// places the glyphs at indices corresponding to the first character of each pair.
unsigned glyphStep = bufferLength / length;
for (unsigned i = 0; i < length; ++i) {
- if (!glyphs[i * glyphStep]) {
- pageToFill->setGlyphDataForIndex(offset + i, 0, 0);
- } else {
+ if (glyphs[i * glyphStep]) {
pageToFill->setGlyphDataForIndex(offset + i, glyphs[i * glyphStep], this);
haveGlyphs = true;
}
@@ -134,10 +130,6 @@ bool SimpleFontData::fillGlyphPage(GlyphPage* pageToFill, unsigned offset, unsig
CFArrayRef runArray = CTLineGetGlyphRuns(line.get());
CFIndex runCount = CFArrayGetCount(runArray);
- // Initialize glyph entries
- for (unsigned index = 0; index < length; ++index)
- pageToFill->setGlyphDataForIndex(offset + index, 0, 0);
-
Vector<CGGlyph, 512> glyphVector;
Vector<CFIndex, 512> indexVector;
bool done = false;
« no previous file with comments | « Source/platform/fonts/GlyphPageTreeNode.cpp ('k') | Source/platform/fonts/skia/SimpleFontDataSkia.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698