1 | /* |
---|---|
2 | * Copyright 2016 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 SkBlendModePriv_DEFINED |
9 | #define SkBlendModePriv_DEFINED |
10 | |
11 | #include "include/core/SkBlendMode.h" |
12 | #include "include/core/SkColor.h" |
13 | #include "include/private/SkColorData.h" |
14 | |
15 | class SkRasterPipeline; |
16 | |
17 | bool SkBlendMode_SupportsCoverageAsAlpha(SkBlendMode); |
18 | |
19 | static inline bool SkBlendMode_CaresAboutRBOrder(SkBlendMode mode) { |
20 | return (mode > SkBlendMode::kLastSeparableMode); |
21 | } |
22 | |
23 | bool SkBlendMode_ShouldPreScaleCoverage(SkBlendMode, bool rgb_coverage); |
24 | void SkBlendMode_AppendStages(SkBlendMode, SkRasterPipeline*); |
25 | |
26 | SkPMColor4f SkBlendMode_Apply(SkBlendMode, const SkPMColor4f& src, const SkPMColor4f& dst); |
27 | |
28 | #if SK_SUPPORT_GPU |
29 | #include "src/gpu/GrXferProcessor.h" |
30 | const GrXPFactory* SkBlendMode_AsXPFactory(SkBlendMode); |
31 | #endif |
32 | |
33 | #endif |
34 |