aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/private/GrSharedEnums.h
blob: d745b70bd4369d229955f2282f33d71e09ace81c (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
/*
 * 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 GrSharedEnums_DEFINED
#define GrSharedEnums_DEFINED

/*************************************************************************************************/
/* This file is used from both C++ and SkSL, so we need to stick to syntax compatible with both. */
/*************************************************************************************************/

/**
 * We have coverage effects that clip rendering to the edge of some geometric primitive.
 * This enum specifies how that clipping is performed. Not all factories that take a
 * GrProcessorEdgeType will succeed with all values and it is up to the caller to check for
 * a NULL return.
 */
enum class GrClipEdgeType {
    kFillBW,
    kFillAA,
    kInverseFillBW,
    kInverseFillAA,
    kHairlineAA,

    kLast = kHairlineAA
};

enum class PMConversion {
    kToPremul        = 0,
    kToUnpremul      = 1,
    kPMConversionCnt = 2
};

#endif