aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/compute/skc/skc_styling.h
blob: 62b9e14067e7aac498ef33914924fce39c3916e1 (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
/*
 * Copyright 2017 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can
 * be found in the LICENSE file.
 *
 */

#ifndef SKC_ONCE_SKC_STYLING
#define SKC_ONCE_SKC_STYLING

//
// STYLING COMMANDS
//
// FIXME -- THESE ARE PLATFORM "CAPABILITIES" AND PRESENCE OF ANY
// EXOTIC NON-CORE COMMANDS SHOULD BE DETERMINED AT RUNTIME
//

typedef enum skc_styling_opcode_e {

  SKC_STYLING_OPCODE_NOOP,

  SKC_STYLING_OPCODE_COVER_NONZERO,
  SKC_STYLING_OPCODE_COVER_EVENODD,
  SKC_STYLING_OPCODE_COVER_ACCUMULATE,
  SKC_STYLING_OPCODE_COVER_MASK,

  SKC_STYLING_OPCODE_COVER_WIP_ZERO,
  SKC_STYLING_OPCODE_COVER_ACC_ZERO,
  SKC_STYLING_OPCODE_COVER_MASK_ZERO,
  SKC_STYLING_OPCODE_COVER_MASK_ONE,
  SKC_STYLING_OPCODE_COVER_MASK_INVERT,

  SKC_STYLING_OPCODE_COLOR_FILL_SOLID,
  SKC_STYLING_OPCODE_COLOR_FILL_GRADIENT_LINEAR,

  SKC_STYLING_OPCODE_COLOR_WIP_ZERO,
  SKC_STYLING_OPCODE_COLOR_ACC_ZERO,

  SKC_STYLING_OPCODE_BLEND_OVER,
  SKC_STYLING_OPCODE_BLEND_PLUS,
  SKC_STYLING_OPCODE_BLEND_MULTIPLY,
  SKC_STYLING_OPCODE_BLEND_KNOCKOUT,

  SKC_STYLING_OPCODE_COVER_WIP_MOVE_TO_MASK,
  SKC_STYLING_OPCODE_COVER_ACC_MOVE_TO_MASK,

  SKC_STYLING_OPCODE_BACKGROUND_OVER,

  SKC_STYLING_OPCODE_SURFACE_COMPOSITE,

  SKC_STYLING_OPCODE_COLOR_ACC_TEST_OPACITY,

  //
  //
  //

  SKC_STYLING_OPCODE_COUNT,

  //
  //
  //

  SKC_STYLING_OPCODE_IS_FINAL = 0x80000000

} skc_styling_opcode_e;

//
//
//

typedef enum skc_styling_gradient_type_e {

  SKC_STYLING_GRADIENT_TYPE_LINEAR_NON_REPEATING,
  SKC_STYLING_GRADIENT_TYPE_LINEAR_REPEATING,
  SKC_STYLING_GRADIENT_TYPE_LINEAR_REFLECTING,

  SKC_STYLING_GRADIENT_TYPE_COUNT

} skc_styling_gradient_type_e;

//
// FIXME -- bury all of this once we stabilize styling
//

#define SKC_STYLING_CMDS(...) _countof(__VA_ARGS__),__VA_ARGS__
#define SKC_GROUP_IDS(...)    _countof(__VA_ARGS__),__VA_ARGS__

//
//
//

#endif

//
//
//