Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | |
michael@0 | 2 | /* |
michael@0 | 3 | * Copyright 2013 Google Inc. |
michael@0 | 4 | * |
michael@0 | 5 | * Use of this source code is governed by a BSD-style license that can be |
michael@0 | 6 | * found in the LICENSE file. |
michael@0 | 7 | */ |
michael@0 | 8 | |
michael@0 | 9 | #include "GrTypes.h" |
michael@0 | 10 | #include "GrColor.h" |
michael@0 | 11 | |
michael@0 | 12 | #ifndef GrBlend_DEFINED |
michael@0 | 13 | #define GrBlend_DEFINED |
michael@0 | 14 | |
michael@0 | 15 | static inline bool GrBlendCoeffRefsSrc(GrBlendCoeff coeff) { |
michael@0 | 16 | switch (coeff) { |
michael@0 | 17 | case kSC_GrBlendCoeff: |
michael@0 | 18 | case kISC_GrBlendCoeff: |
michael@0 | 19 | case kSA_GrBlendCoeff: |
michael@0 | 20 | case kISA_GrBlendCoeff: |
michael@0 | 21 | return true; |
michael@0 | 22 | default: |
michael@0 | 23 | return false; |
michael@0 | 24 | } |
michael@0 | 25 | } |
michael@0 | 26 | |
michael@0 | 27 | static inline bool GrBlendCoeffRefsDst(GrBlendCoeff coeff) { |
michael@0 | 28 | switch (coeff) { |
michael@0 | 29 | case kDC_GrBlendCoeff: |
michael@0 | 30 | case kIDC_GrBlendCoeff: |
michael@0 | 31 | case kDA_GrBlendCoeff: |
michael@0 | 32 | case kIDA_GrBlendCoeff: |
michael@0 | 33 | return true; |
michael@0 | 34 | default: |
michael@0 | 35 | return false; |
michael@0 | 36 | } |
michael@0 | 37 | } |
michael@0 | 38 | |
michael@0 | 39 | GrColor GrSimplifyBlend(GrBlendCoeff* srcCoeff, |
michael@0 | 40 | GrBlendCoeff* dstCoeff, |
michael@0 | 41 | GrColor srcColor, uint32_t srcCompFlags, |
michael@0 | 42 | GrColor dstColor, uint32_t dstCompFlags, |
michael@0 | 43 | GrColor constantColor); |
michael@0 | 44 | |
michael@0 | 45 | #endif |