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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzFace.cpp

Issue 2547053003: s/ passed(...) / WTF::passed(...) / to avoid future ambiguity w/ base::Passed. (Closed)
Patch Set: Rebasing... Created 4 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 Google Inc. All rights reserved. 2 * Copyright (c) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 ASSERT(hbFont); 117 ASSERT(hbFont);
118 return adoptRef(new HbFontCacheEntry(hbFont)); 118 return adoptRef(new HbFontCacheEntry(hbFont));
119 } 119 }
120 120
121 hb_font_t* hbFont() { return m_hbFont.get(); } 121 hb_font_t* hbFont() { return m_hbFont.get(); }
122 HarfBuzzFontData* hbFontData() { return m_hbFontData.get(); } 122 HarfBuzzFontData* hbFontData() { return m_hbFontData.get(); }
123 123
124 private: 124 private:
125 explicit HbFontCacheEntry(hb_font_t* font) 125 explicit HbFontCacheEntry(hb_font_t* font)
126 : m_hbFont(HbFontUniquePtr(font)), 126 : m_hbFont(HbFontUniquePtr(font)),
127 m_hbFontData(makeUnique<HarfBuzzFontData>()){}; 127 m_hbFontData(WTF::makeUnique<HarfBuzzFontData>()){};
128 128
129 HbFontUniquePtr m_hbFont; 129 HbFontUniquePtr m_hbFont;
130 std::unique_ptr<HarfBuzzFontData> m_hbFontData; 130 std::unique_ptr<HarfBuzzFontData> m_hbFontData;
131 }; 131 };
132 132
133 typedef HashMap<uint64_t, 133 typedef HashMap<uint64_t,
134 RefPtr<HbFontCacheEntry>, 134 RefPtr<HbFontCacheEntry>,
135 WTF::IntHash<uint64_t>, 135 WTF::IntHash<uint64_t>,
136 WTF::UnsignedWithZeroKeyHashTraits<uint64_t>> 136 WTF::UnsignedWithZeroKeyHashTraits<uint64_t>>
137 HarfBuzzFontCache; 137 HarfBuzzFontCache;
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 m_harfBuzzFontData->m_paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding); 386 m_harfBuzzFontData->m_paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
387 m_harfBuzzFontData->m_rangeSet = rangeSet; 387 m_harfBuzzFontData->m_rangeSet = rangeSet;
388 m_harfBuzzFontData->updateSimpleFontData(m_platformData); 388 m_harfBuzzFontData->updateSimpleFontData(m_platformData);
389 ASSERT(m_harfBuzzFontData->m_simpleFontData); 389 ASSERT(m_harfBuzzFontData->m_simpleFontData);
390 int scale = SkiaScalarToHarfBuzzPosition(m_platformData->size()); 390 int scale = SkiaScalarToHarfBuzzPosition(m_platformData->size());
391 hb_font_set_scale(m_unscaledFont, scale, scale); 391 hb_font_set_scale(m_unscaledFont, scale, scale);
392 return m_unscaledFont; 392 return m_unscaledFont;
393 } 393 }
394 394
395 } // namespace blink 395 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698