Drop hb-ot-color-colr-table.cc

Move everything into the .hh file.
pull/3997/head
Matthias Clasen 2 years ago committed by خالد حسني (Khaled Hosny)
parent 27684f14be
commit dc5179d465
  1. 1
      src/Makefile.sources
  2. 1
      src/harfbuzz-subset.cc
  3. 1
      src/harfbuzz.cc
  4. 27
      src/hb-ot-color-colr-table.cc
  5. 26
      src/hb-ot-color-colr-table.hh
  6. 1
      src/meson.build

@ -70,7 +70,6 @@ HB_BASE_sources = \
hb-ot-cmap-table.hh \ hb-ot-cmap-table.hh \
hb-ot-color-cbdt-table.hh \ hb-ot-color-cbdt-table.hh \
hb-ot-color-colr-table.hh \ hb-ot-color-colr-table.hh \
hb-ot-color-colr-table.cc \
hb-ot-color-cpal-table.hh \ hb-ot-color-cpal-table.hh \
hb-ot-color-sbix-table.hh \ hb-ot-color-sbix-table.hh \
hb-ot-color-svg-table.hh \ hb-ot-color-svg-table.hh \

@ -14,7 +14,6 @@
#include "hb-number.cc" #include "hb-number.cc"
#include "hb-ot-cff1-table.cc" #include "hb-ot-cff1-table.cc"
#include "hb-ot-cff2-table.cc" #include "hb-ot-cff2-table.cc"
#include "hb-ot-color-colr-table.cc"
#include "hb-ot-color.cc" #include "hb-ot-color.cc"
#include "hb-ot-face.cc" #include "hb-ot-face.cc"
#include "hb-ot-font.cc" #include "hb-ot-font.cc"

@ -19,7 +19,6 @@
#include "hb-number.cc" #include "hb-number.cc"
#include "hb-ot-cff1-table.cc" #include "hb-ot-cff1-table.cc"
#include "hb-ot-cff2-table.cc" #include "hb-ot-cff2-table.cc"
#include "hb-ot-color-colr-table.cc"
#include "hb-ot-color.cc" #include "hb-ot-color.cc"
#include "hb-ot-face.cc" #include "hb-ot-face.cc"
#include "hb-ot-font.cc" #include "hb-ot-font.cc"

@ -1,27 +0,0 @@
#include "hb-ot-color-colr-table.hh"
namespace OT {
void PaintColrLayers::paint_glyph (hb_paint_context_t *c) const
{
const LayerList &paint_offset_lists = c->get_colr_table ()->get_layerList ();
for (unsigned i = firstLayerIndex; i < firstLayerIndex + numLayers; i++)
{
const Paint &paint = paint_offset_lists.get_paint (i);
c->funcs->push_group (c->data);
c->recurse (paint);
c->funcs->pop_group (c->data, HB_PAINT_COMPOSITE_MODE_SRC_OVER);
}
}
void PaintColrGlyph::paint_glyph (hb_paint_context_t *c) const
{
const COLR *colr_table = c->get_colr_table ();
const Paint *paint = colr_table->get_base_glyph_paint (gid);
// TODO apply clipbox
if (paint)
c->recurse (*paint);
}
}

@ -562,7 +562,7 @@ struct PaintColrLayers
return_trace (c->check_struct (this)); return_trace (c->check_struct (this));
} }
HB_INTERNAL void paint_glyph (hb_paint_context_t *c) const; inline void paint_glyph (hb_paint_context_t *c) const;
HBUINT8 format; /* format = 1 */ HBUINT8 format; /* format = 1 */
HBUINT8 numLayers; HBUINT8 numLayers;
@ -820,7 +820,7 @@ struct PaintColrGlyph
return_trace (c->check_struct (this)); return_trace (c->check_struct (this));
} }
HB_INTERNAL void paint_glyph (hb_paint_context_t *c) const; inline void paint_glyph (hb_paint_context_t *c) const;
HBUINT8 format; /* format = 11 */ HBUINT8 format; /* format = 11 */
HBUINT16 gid; HBUINT16 gid;
@ -2154,6 +2154,28 @@ hb_paint_context_t::recurse (const Paint &paint)
depth_left++; depth_left++;
} }
void PaintColrLayers::paint_glyph (hb_paint_context_t *c) const
{
const LayerList &paint_offset_lists = c->get_colr_table ()->get_layerList ();
for (unsigned i = firstLayerIndex; i < firstLayerIndex + numLayers; i++)
{
const Paint &paint = paint_offset_lists.get_paint (i);
c->funcs->push_group (c->data);
c->recurse (paint);
c->funcs->pop_group (c->data, HB_PAINT_COMPOSITE_MODE_SRC_OVER);
}
}
void PaintColrGlyph::paint_glyph (hb_paint_context_t *c) const
{
const COLR *colr_table = c->get_colr_table ();
const Paint *paint = colr_table->get_base_glyph_paint (gid);
// TODO apply clipbox
if (paint)
c->recurse (*paint);
}
} /* namespace OT */ } /* namespace OT */
#endif /* HB_OT_COLOR_COLR_TABLE_HH */ #endif /* HB_OT_COLOR_COLR_TABLE_HH */

@ -78,7 +78,6 @@ hb_base_sources = files(
'hb-ot-cmap-table.hh', 'hb-ot-cmap-table.hh',
'hb-ot-color-cbdt-table.hh', 'hb-ot-color-cbdt-table.hh',
'hb-ot-color-colr-table.hh', 'hb-ot-color-colr-table.hh',
'hb-ot-color-colr-table.cc',
'hb-ot-color-cpal-table.hh', 'hb-ot-color-cpal-table.hh',
'hb-ot-color-sbix-table.hh', 'hb-ot-color-sbix-table.hh',
'hb-ot-color-svg-table.hh', 'hb-ot-color-svg-table.hh',

Loading…
Cancel
Save