chromium: fix build against harfbuzz 2.x

This commit is contained in:
Rasmus Thomsen 2018-10-24 16:37:55 +02:00 committed by maxice8
parent 09cc5525a8
commit 33c04f6f9f

View File

@ -0,0 +1,24 @@
Source: Tom Briden <tom@decompile.me.uk>
Upstream: No
Reason: Fix building against harfbuzz[>=2.0.0]
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc 2018-10-23 10:44:18.808106392 +0100
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc 2018-10-23 10:44:59.552246024 +0100
@@ -138,7 +138,7 @@
static void HarfBuzzGetGlyphHorizontalAdvances(hb_font_t* font,
void* font_data,
unsigned count,
- hb_codepoint_t* first_glyph,
+ const hb_codepoint_t* first_glyph,
unsigned int glyph_stride,
hb_position_t* first_advance,
unsigned int advance_stride,
@@ -146,7 +146,7 @@
HarfBuzzFontData* hb_font_data =
reinterpret_cast<HarfBuzzFontData*>(font_data);
SkiaTextMetrics(&hb_font_data->paint_)
- .GetGlyphWidthForHarfBuzz(count, first_glyph, glyph_stride, first_advance,
+ .GetGlyphWidthForHarfBuzz(count, (hb_codepoint_t*)first_glyph, glyph_stride, first_advance,
advance_stride);
}