blob: d9d51ba25a62dded79cafa8cd8c20703de8ba47f [file] [log] [blame]
Allan MacKinnon4359d522018-06-19 13:57:04 -07001/*
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//
10//
11//
12
13#include "composition.h"
14// #include "common.h"
15// #include "context.h"
16
17//
18// high level composition object
19//
20
21skc_err
22skc_composition_retain(skc_composition_t composition)
23{
24 composition->ref_count += 1;
25
26 return SKC_ERR_SUCCESS;
27}
28
29skc_err
30skc_composition_release(skc_composition_t composition)
31{
32 composition->release(composition->impl);
33
34 return SKC_ERR_SUCCESS;
35}
36
37//
38//
39//
40
41skc_err
42skc_composition_seal(skc_composition_t composition)
43{
44 //
45 // seal the composition
46 //
47 composition->seal(composition->impl);
48
49 return SKC_ERR_SUCCESS;
50}
51
52//
53//
54//
55
56skc_err
57skc_composition_unseal(skc_composition_t composition, bool reset)
58{
59 //
60 // unseal the composition
61 //
62 composition->unseal(composition->impl,reset);
63
64 return SKC_ERR_SUCCESS;
65}
66
67//
68//
69//
70
71skc_err
72skc_composition_place(skc_composition_t composition,
73 skc_raster_t const * rasters,
74 skc_layer_id const * layer_ids,
75 float const * txs,
76 float const * tys,
77 uint32_t count) // NOTE: A PER-PLACE CLIP IS POSSIBLE
78{
79 return composition->place(composition->impl,rasters,layer_ids,txs,tys,count);
80}
81
82//
83//
84//
85
86skc_err
87skc_composition_get_bounds(skc_composition_t composition, int32_t bounds[4])
88{
89 //
90 // not working yet -- need to think about the semantics
91 //
92 // Option 1: return tight bounds of entire composition
93 // Option 2: ?
94 //
95
96 return SKC_ERR_SUCCESS;
97}
98
99//
100//
101//