gfx/skia/trunk/src/gpu/GrBlend.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/skia/trunk/src/gpu/GrBlend.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,45 @@
     1.4 +
     1.5 +/*
     1.6 + * Copyright 2013 Google Inc.
     1.7 + *
     1.8 + * Use of this source code is governed by a BSD-style license that can be
     1.9 + * found in the LICENSE file.
    1.10 + */
    1.11 +
    1.12 +#include "GrTypes.h"
    1.13 +#include "GrColor.h"
    1.14 +
    1.15 +#ifndef GrBlend_DEFINED
    1.16 +#define GrBlend_DEFINED
    1.17 +
    1.18 +static inline bool GrBlendCoeffRefsSrc(GrBlendCoeff coeff) {
    1.19 +    switch (coeff) {
    1.20 +        case kSC_GrBlendCoeff:
    1.21 +        case kISC_GrBlendCoeff:
    1.22 +        case kSA_GrBlendCoeff:
    1.23 +        case kISA_GrBlendCoeff:
    1.24 +            return true;
    1.25 +        default:
    1.26 +            return false;
    1.27 +    }
    1.28 +}
    1.29 +
    1.30 +static inline bool GrBlendCoeffRefsDst(GrBlendCoeff coeff) {
    1.31 +    switch (coeff) {
    1.32 +        case kDC_GrBlendCoeff:
    1.33 +        case kIDC_GrBlendCoeff:
    1.34 +        case kDA_GrBlendCoeff:
    1.35 +        case kIDA_GrBlendCoeff:
    1.36 +            return true;
    1.37 +        default:
    1.38 +            return false;
    1.39 +    }
    1.40 +}
    1.41 +
    1.42 +GrColor GrSimplifyBlend(GrBlendCoeff* srcCoeff,
    1.43 +                        GrBlendCoeff* dstCoeff,
    1.44 +                        GrColor srcColor, uint32_t srcCompFlags,
    1.45 +                        GrColor dstColor, uint32_t dstCompFlags,
    1.46 +                        GrColor constantColor);
    1.47 +
    1.48 +#endif

mercurial