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

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     2 /*
     3  * Copyright 2013 Google Inc.
     4  *
     5  * Use of this source code is governed by a BSD-style license that can be
     6  * found in the LICENSE file.
     7  */
     9 #include "GrTypes.h"
    10 #include "GrColor.h"
    12 #ifndef GrBlend_DEFINED
    13 #define GrBlend_DEFINED
    15 static inline bool GrBlendCoeffRefsSrc(GrBlendCoeff coeff) {
    16     switch (coeff) {
    17         case kSC_GrBlendCoeff:
    18         case kISC_GrBlendCoeff:
    19         case kSA_GrBlendCoeff:
    20         case kISA_GrBlendCoeff:
    21             return true;
    22         default:
    23             return false;
    24     }
    25 }
    27 static inline bool GrBlendCoeffRefsDst(GrBlendCoeff coeff) {
    28     switch (coeff) {
    29         case kDC_GrBlendCoeff:
    30         case kIDC_GrBlendCoeff:
    31         case kDA_GrBlendCoeff:
    32         case kIDA_GrBlendCoeff:
    33             return true;
    34         default:
    35             return false;
    36     }
    37 }
    39 GrColor GrSimplifyBlend(GrBlendCoeff* srcCoeff,
    40                         GrBlendCoeff* dstCoeff,
    41                         GrColor srcColor, uint32_t srcCompFlags,
    42                         GrColor dstColor, uint32_t dstCompFlags,
    43                         GrColor constantColor);
    45 #endif

mercurial