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

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

Issue 858663002: Fix template angle bracket syntax in platform (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase 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 unified diff | Download patch
« no previous file with comments | « Source/platform/fonts/WidthCache.h ('k') | Source/platform/fonts/skia/FontCacheSkia.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 private: 75 private:
76 explicit FaceCacheEntry(hb_face_t* face) 76 explicit FaceCacheEntry(hb_face_t* face)
77 : m_face(face) 77 : m_face(face)
78 { } 78 { }
79 79
80 hb_face_t* m_face; 80 hb_face_t* m_face;
81 HashMap<uint32_t, uint16_t> m_glyphCache; 81 HashMap<uint32_t, uint16_t> m_glyphCache;
82 }; 82 };
83 83
84 typedef HashMap<uint64_t, RefPtr<FaceCacheEntry>, WTF::IntHash<uint64_t>, WTF::U nsignedWithZeroKeyHashTraits<uint64_t> > HarfBuzzFaceCache; 84 typedef HashMap<uint64_t, RefPtr<FaceCacheEntry>, WTF::IntHash<uint64_t>, WTF::U nsignedWithZeroKeyHashTraits<uint64_t>> HarfBuzzFaceCache;
85 85
86 static HarfBuzzFaceCache* harfBuzzFaceCache() 86 static HarfBuzzFaceCache* harfBuzzFaceCache()
87 { 87 {
88 DEFINE_STATIC_LOCAL(HarfBuzzFaceCache, s_harfBuzzFaceCache, ()); 88 DEFINE_STATIC_LOCAL(HarfBuzzFaceCache, s_harfBuzzFaceCache, ());
89 return &s_harfBuzzFaceCache; 89 return &s_harfBuzzFaceCache;
90 } 90 }
91 91
92 HarfBuzzFace::HarfBuzzFace(FontPlatformData* platformData, uint64_t uniqueID) 92 HarfBuzzFace::HarfBuzzFace(FontPlatformData* platformData, uint64_t uniqueID)
93 : m_platformData(platformData) 93 : m_platformData(platformData)
94 , m_uniqueID(uniqueID) 94 , m_uniqueID(uniqueID)
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 hb_font_t* font = hb_font_create(m_face); 337 hb_font_t* font = hb_font_create(m_face);
338 hb_font_set_funcs(font, harfBuzzSkiaGetFontFuncs(), hbFontData, destroyHarfB uzzFontData); 338 hb_font_set_funcs(font, harfBuzzSkiaGetFontFuncs(), hbFontData, destroyHarfB uzzFontData);
339 float size = m_platformData->size(); 339 float size = m_platformData->size();
340 int scale = SkiaScalarToHarfBuzzPosition(size); 340 int scale = SkiaScalarToHarfBuzzPosition(size);
341 hb_font_set_scale(font, scale, scale); 341 hb_font_set_scale(font, scale, scale);
342 hb_font_make_immutable(font); 342 hb_font_make_immutable(font);
343 return font; 343 return font;
344 } 344 }
345 345
346 } // namespace blink 346 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/fonts/WidthCache.h ('k') | Source/platform/fonts/skia/FontCacheSkia.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698