aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/compute/skc/composition.c
blob: d9d51ba25a62dded79cafa8cd8c20703de8ba47f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/*
 * Copyright 2017 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can
 * be found in the LICENSE file.
 *
 */

//
//
//

#include "composition.h"
// #include "common.h"
// #include "context.h"

//
// high level composition object
//

skc_err
skc_composition_retain(skc_composition_t composition)
{
  composition->ref_count += 1;

  return SKC_ERR_SUCCESS;
}

skc_err
skc_composition_release(skc_composition_t composition)
{
  composition->release(composition->impl);

  return SKC_ERR_SUCCESS;
}

//
//
//

skc_err
skc_composition_seal(skc_composition_t composition)
{
  //
  // seal the composition
  //
  composition->seal(composition->impl);

  return SKC_ERR_SUCCESS;
}

//
//
//

skc_err
skc_composition_unseal(skc_composition_t composition, bool reset)
{
  //
  // unseal the composition
  //
  composition->unseal(composition->impl,reset);

  return SKC_ERR_SUCCESS;
}

//
//
//

skc_err
skc_composition_place(skc_composition_t    composition,
                      skc_raster_t const * rasters,
                      skc_layer_id const * layer_ids,
                      float        const * txs,
                      float        const * tys,
                      uint32_t             count) // NOTE: A PER-PLACE CLIP IS POSSIBLE
{
  return composition->place(composition->impl,rasters,layer_ids,txs,tys,count);
}

//
//
//

skc_err
skc_composition_get_bounds(skc_composition_t composition, int32_t bounds[4])
{
  //
  // not working yet -- need to think about the semantics
  //
  // Option 1: return tight bounds of entire composition
  // Option 2: ?
  //

  return SKC_ERR_SUCCESS;
}

//
//
//