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

Unified Diff: Source/platform/fonts/GlyphPageTreeNode.cpp

Issue 401553002: Introduce DEFINE_FONT_DATA_TYPE_CASTS, and use it (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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/FontFallbackList.cpp ('k') | Source/platform/fonts/SegmentedFontData.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/GlyphPageTreeNode.cpp
diff --git a/Source/platform/fonts/GlyphPageTreeNode.cpp b/Source/platform/fonts/GlyphPageTreeNode.cpp
index 3f0537f32b5a5fcb870a54c0ee483117b59d30eb..baa42fc2952da4daf0ffb852d09aadb47a1728c1 100644
--- a/Source/platform/fonts/GlyphPageTreeNode.cpp
+++ b/Source/platform/fonts/GlyphPageTreeNode.cpp
@@ -207,13 +207,13 @@ void GlyphPageTreeNode::initializePage(const FontData* fontData, unsigned pageNu
// for only 128 out of 256 characters.
bool haveGlyphs;
if (!fontData->isSegmented()) {
- m_page = GlyphPage::createForSingleFontData(this, static_cast<const SimpleFontData*>(fontData));
- haveGlyphs = fill(m_page.get(), 0, GlyphPage::size, buffer, bufferLength, static_cast<const SimpleFontData*>(fontData));
+ m_page = GlyphPage::createForSingleFontData(this, toSimpleFontData(fontData));
+ haveGlyphs = fill(m_page.get(), 0, GlyphPage::size, buffer, bufferLength, toSimpleFontData(fontData));
} else {
m_page = GlyphPage::createForMixedFontData(this);
haveGlyphs = false;
- const SegmentedFontData* segmentedFontData = static_cast<const SegmentedFontData*>(fontData);
+ const SegmentedFontData* segmentedFontData = toSegmentedFontData(fontData);
for (int i = segmentedFontData->numRanges() - 1; i >= 0; i--) {
const FontDataRange& range = segmentedFontData->rangeAt(i);
// all this casting is to ensure all the parameters to min and max have the same type,
« no previous file with comments | « Source/platform/fonts/FontFallbackList.cpp ('k') | Source/platform/fonts/SegmentedFontData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698