egdaniel | 0063a9b | 2015-01-15 10:52:32 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
| 8 | #ifndef GrCustomXfermode_DEFINED |
| 9 | #define GrCustomXfermode_DEFINED |
| 10 | |
Mike Reed | d470673 | 2016-11-15 16:44:34 -0500 | [diff] [blame] | 11 | #include "SkBlendMode.h" |
| 12 | #include "SkRefCnt.h" |
egdaniel | 0063a9b | 2015-01-15 10:52:32 -0800 | [diff] [blame] | 13 | |
egdaniel | 0063a9b | 2015-01-15 10:52:32 -0800 | [diff] [blame] | 14 | class GrTexture; |
Mike Reed | d470673 | 2016-11-15 16:44:34 -0500 | [diff] [blame] | 15 | class GrXPFactory; |
egdaniel | 0063a9b | 2015-01-15 10:52:32 -0800 | [diff] [blame] | 16 | |
| 17 | /** |
| 18 | * Custom Xfer modes are used for blending when the blend mode cannot be represented using blend |
bsalomon | ae4738f | 2015-09-15 15:33:27 -0700 | [diff] [blame] | 19 | * coefficients. |
egdaniel | 0063a9b | 2015-01-15 10:52:32 -0800 | [diff] [blame] | 20 | */ |
| 21 | namespace GrCustomXfermode { |
Mike Reed | 7d954ad | 2016-10-28 15:42:34 -0400 | [diff] [blame] | 22 | bool IsSupportedMode(SkBlendMode mode); |
Brian Salomon | a163392 | 2017-01-09 11:46:10 -0500 | [diff] [blame] | 23 | const GrXPFactory* Get(SkBlendMode mode); |
egdaniel | 0063a9b | 2015-01-15 10:52:32 -0800 | [diff] [blame] | 24 | }; |
| 25 | |
| 26 | #endif |