diff options
author | 2018-06-19 13:57:04 -0700 | |
---|---|---|
committer | 2018-06-20 01:19:18 +0000 | |
commit | 4359d529121fc1f39f882693d641c0133d138d41 (patch) | |
tree | d2c3239162e68d24d5c2cebc8a4f6659860cc2a0 /src/compute/skc/raster_builder.h | |
parent | 47c29fa64b3ffc1eec7723d40e9862b2d2a8443f (diff) |
Skia Compute core files
Bug: skia:
Change-Id: I4bba49cf20eff013e581800a3f114c85acd8498c
Reviewed-on: https://skia-review.googlesource.com/135782
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Diffstat (limited to 'src/compute/skc/raster_builder.h')
-rw-r--r-- | src/compute/skc/raster_builder.h | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/src/compute/skc/raster_builder.h b/src/compute/skc/raster_builder.h new file mode 100644 index 0000000000..9996a2bfd7 --- /dev/null +++ b/src/compute/skc/raster_builder.h @@ -0,0 +1,79 @@ +/* + * Copyright 2017 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can + * be found in the LICENSE file. + * + */ + +#pragma once + +// +// +// + +#include "skc.h" +#include "assert_state.h" +#include "extent_ring.h" // note that these structs are *not* opaque + +// +// +// + +typedef enum skc_raster_builder_state_e { + + SKC_RASTER_BUILDER_STATE_READY, + SKC_RASTER_BUILDER_STATE_BUILDING + +} skc_raster_builder_state_e; + +// +// Construct and dispose of a raster builder and its opaque +// implementation. +// + +struct skc_raster_builder +{ + struct skc_context * context; + + struct skc_raster_builder_impl * impl; + + skc_err (* add )(struct skc_raster_builder_impl * const impl, skc_path_t const * paths, skc_uint count); + void (* end )(struct skc_raster_builder_impl * const impl, skc_raster_t * const raster); + void (* start )(struct skc_raster_builder_impl * const impl); + void (* force )(struct skc_raster_builder_impl * const impl); + void (* release)(struct skc_raster_builder_impl * const impl); + + struct { + skc_path_t * extent; + struct skc_extent_ring ring; + } path_ids; + + struct { + union skc_transform * extent; + struct skc_extent_ring ring; + } transforms; + + struct { + union skc_path_clip * extent; + struct skc_extent_ring ring; + } clips; + + struct { + union skc_cmd_fill * extent; + struct skc_extent_ring ring; + } fill_cmds; + + struct { + skc_raster_t * extent; + struct skc_extent_ring ring; + } raster_ids; + + skc_uint refcount; // FIXME -- split this into host and impl refcounts + + SKC_ASSERT_STATE_DECLARE(skc_raster_builder_state_e); +}; + +// +// +// |