1 /* 2 * Copyright 2017 Google Inc. 3 * 4 * Use of this source code is governed by a BSD-style license that can 5 * be found in the LICENSE file. 6 * 7 */ 8 9 #pragma once 10 11 // 12 // 13 // 14 15 #include "skc.h" 16 #include "types.h" 17 18 // 19 // FIXME -- relax the const correctness 20 // 21 22 struct skc_context 23 { 24 struct skc_runtime * runtime; 25 26 // 27 // 28 // 29 30 bool (* yield )(struct skc_runtime * const runtime); 31 32 void (* wait )(struct skc_runtime * const runtime); 33 34 // 35 // 36 // 37 38 skc_err (* path_builder )(struct skc_context * const context, 39 skc_path_builder_t * const path_builder); 40 41 skc_err (* path_retain )(struct skc_runtime * const runtime, 42 skc_path_t const * paths, 43 uint32_t count); 44 45 skc_err (* path_release )(struct skc_runtime * const runtime, 46 skc_path_t const * paths, 47 uint32_t count); 48 49 skc_err (* path_flush )(struct skc_runtime * const runtime, 50 skc_path_t const * paths, 51 uint32_t count); 52 53 // 54 // 55 // 56 57 skc_err (* raster_builder )(struct skc_context * const context, 58 skc_raster_builder_t * const raster_builder); 59 60 skc_err (* raster_retain )(struct skc_runtime * const runtime, 61 skc_raster_t const * rasters, 62 uint32_t count); 63 64 skc_err (* raster_release )(struct skc_runtime * const runtime, 65 skc_raster_t const * rasters, 66 uint32_t count); 67 68 skc_err (* raster_flush )(struct skc_runtime * const runtime, 69 skc_raster_t const * rasters, 70 uint32_t count); 71 // 72 // 73 // 74 75 skc_err (* composition )(struct skc_context * const context, 76 skc_composition_t * const composition); 77 78 // 79 // 80 // 81 82 skc_err (* styling )(struct skc_context * const context, 83 skc_styling_t * const styling, 84 uint32_t const layers_count, 85 uint32_t const groups_count, 86 uint32_t const extras_count); 87 88 // 89 // 90 // 91 92 skc_err (* surface )(struct skc_context * const context, 93 skc_surface_t * const surface); 94 // 95 // 96 // 97 98 skc_int refcount; 99 }; 100 101 // 102 // 103 // 104