Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 669034 | Differences between
and this patch

Collapse All | Expand All

(-)a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc (-1 / +1 lines)
Lines 139-145 static hb_position_t HarfBuzzGetGlyphHorizontalAdvance(hb_font_t* hb_font, Link Here
139
static void HarfBuzzGetGlyphHorizontalAdvances(hb_font_t* font,
139
static void HarfBuzzGetGlyphHorizontalAdvances(hb_font_t* font,
140
                                               void* font_data,
140
                                               void* font_data,
141
                                               unsigned count,
141
                                               unsigned count,
142
                                               hb_codepoint_t* first_glyph,
142
                                               const hb_codepoint_t* first_glyph,
143
                                               unsigned int glyph_stride,
143
                                               unsigned int glyph_stride,
144
                                               hb_position_t* first_advance,
144
                                               hb_position_t* first_advance,
145
                                               unsigned int advance_stride,
145
                                               unsigned int advance_stride,
(-)a/third_party/blink/renderer/platform/fonts/skia/skia_text_metrics.cc (-2 / +7 lines)
Lines 18-23 T* advance_by_byte_size(T* p, unsigned byte_size) { Link Here
18
  return reinterpret_cast<T*>(reinterpret_cast<uint8_t*>(p) + byte_size);
18
  return reinterpret_cast<T*>(reinterpret_cast<uint8_t*>(p) + byte_size);
19
}
19
}
20
20
21
template <class T>
22
T* advance_by_byte_size_const(T* p, unsigned byte_size) {
23
  return reinterpret_cast<T*>(reinterpret_cast<const uint8_t*>(p) + byte_size);
24
}
25
21
}  // namespace
26
}  // namespace
22
27
23
SkiaTextMetrics::SkiaTextMetrics(const SkPaint* paint) : paint_(paint) {
28
SkiaTextMetrics::SkiaTextMetrics(const SkPaint* paint) : paint_(paint) {
Lines 39-45 void SkiaTextMetrics::GetGlyphWidthForHarfBuzz(hb_codepoint_t codepoint, Link Here
39
}
44
}
40
45
41
void SkiaTextMetrics::GetGlyphWidthForHarfBuzz(unsigned count,
46
void SkiaTextMetrics::GetGlyphWidthForHarfBuzz(unsigned count,
42
                                               hb_codepoint_t* glyphs,
47
                                               const hb_codepoint_t* glyphs,
43
                                               unsigned glyph_stride,
48
                                               unsigned glyph_stride,
44
                                               hb_position_t* advances,
49
                                               hb_position_t* advances,
45
                                               unsigned advance_stride) {
50
                                               unsigned advance_stride) {
Lines 48-54 void SkiaTextMetrics::GetGlyphWidthForHarfBuzz(unsigned count, Link Here
48
  // array that copy them to a regular array.
53
  // array that copy them to a regular array.
49
  Vector<Glyph, 256> glyph_array(count);
54
  Vector<Glyph, 256> glyph_array(count);
50
  for (unsigned i = 0; i < count;
55
  for (unsigned i = 0; i < count;
51
       i++, glyphs = advance_by_byte_size(glyphs, glyph_stride)) {
56
       i++, glyphs = advance_by_byte_size_const(glyphs, glyph_stride)) {
52
    glyph_array[i] = *glyphs;
57
    glyph_array[i] = *glyphs;
53
  }
58
  }
54
  Vector<SkScalar, 256> sk_width_array(count);
59
  Vector<SkScalar, 256> sk_width_array(count);
(-)a/third_party/blink/renderer/platform/fonts/skia/skia_text_metrics.h (-2 / +1 lines)
Lines 19-25 class SkiaTextMetrics final { Link Here
19
19
20
  void GetGlyphWidthForHarfBuzz(hb_codepoint_t, hb_position_t* width);
20
  void GetGlyphWidthForHarfBuzz(hb_codepoint_t, hb_position_t* width);
21
  void GetGlyphWidthForHarfBuzz(unsigned count,
21
  void GetGlyphWidthForHarfBuzz(unsigned count,
22
                                hb_codepoint_t* first_glyph,
22
                                const hb_codepoint_t* first_glyph,
23
                                unsigned glyph_stride,
23
                                unsigned glyph_stride,
24
                                hb_position_t* first_advance,
24
                                hb_position_t* first_advance,
25
                                unsigned advance_stride);
25
                                unsigned advance_stride);
26
- 

Return to bug 669034