< prev index next >

src/java.desktop/share/native/libfontmanager/harfbuzz/hb-shape-plan.hh

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright © 2012  Google, Inc.
+ * Copyright © 2012,2018  Google, Inc.
  *
  *  This is part of HarfBuzz, a text shaping library.
  *
  * Permission is hereby granted, without written agreement and without
  * license or royalty fees, to use, copy, modify, and distribute this

@@ -22,46 +22,51 @@
  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  *
  * Google Author(s): Behdad Esfahbod
  */
 
-#ifndef HB_SHAPE_PLAN_PRIVATE_HH
-#define HB_SHAPE_PLAN_PRIVATE_HH
+#ifndef HB_SHAPE_PLAN_HH
+#define HB_SHAPE_PLAN_HH
 
-#include "hb-private.hh"
-#include "hb-object-private.hh"
-#include "hb-shaper-private.hh"
+#include "hb.hh"
+#include "hb-shaper.hh"
+#include "hb-ot-shape.hh"
 
 
-struct hb_shape_plan_t
+struct hb_shape_plan_key_t
 {
-  hb_object_header_t header;
-  ASSERT_POD ();
-
-  hb_bool_t default_shaper_list;
-  hb_face_t *face_unsafe; /* We don't carry a reference to face. */
   hb_segment_properties_t props;
 
+  const hb_feature_t      *user_features;
+  unsigned int             num_user_features;
+
+  hb_ot_shape_plan_key_t   ot;
+
   hb_shape_func_t *shaper_func;
   const char *shaper_name;
 
-  hb_feature_t *user_features;
-  unsigned int num_user_features;
+  HB_INTERNAL inline bool init (bool                           copy,
+                                hb_face_t                     *face,
+                                const hb_segment_properties_t *props,
+                                const hb_feature_t            *user_features,
+                                unsigned int                   num_user_features,
+                                const int                     *coords,
+                                unsigned int                   num_coords,
+                                const char * const            *shaper_list);
+
+  HB_INTERNAL inline void free () { ::free ((void *) user_features); }
 
-  int *coords;
-  unsigned int num_coords;
+  HB_INTERNAL bool user_features_match (const hb_shape_plan_key_t *other);
 
-  struct hb_shaper_data_t shaper_data;
+  HB_INTERNAL bool equal (const hb_shape_plan_key_t *other);
 };
 
-#define HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS \
-        , const hb_feature_t *user_features \
-        , unsigned int        num_user_features \
-        , const int          *coords \
-        , unsigned int        num_coords
-#define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_PROTOTYPE(shaper, shape_plan);
-#include "hb-shaper-list.hh"
-#undef HB_SHAPER_IMPLEMENT
-#undef HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS
+struct hb_shape_plan_t
+{
+  hb_object_header_t header;
+  hb_face_t *face_unsafe; /* We don't carry a reference to face. */
+  hb_shape_plan_key_t key;
+  hb_ot_shape_plan_t ot;
+};
 
 
-#endif /* HB_SHAPE_PLAN_PRIVATE_HH */
+#endif /* HB_SHAPE_PLAN_HH */
< prev index next >