/src/skia/include/core/SkBlender.h
Line | Count | Source |
1 | | /* |
2 | | * Copyright 2021 Google LLC |
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 SkBlender_DEFINED |
9 | | #define SkBlender_DEFINED |
10 | | |
11 | | #include "include/core/SkBlendMode.h" |
12 | | #include "include/core/SkFlattenable.h" |
13 | | |
14 | | /** |
15 | | * SkBlender represents a custom blend function in the Skia pipeline. A blender combines a source |
16 | | * color (the result of our paint) and destination color (from the canvas) into a final color. |
17 | | */ |
18 | | class SK_API SkBlender : public SkFlattenable { |
19 | | public: |
20 | | /** |
21 | | * Create a blender that implements the specified BlendMode. |
22 | | */ |
23 | | static sk_sp<SkBlender> Mode(SkBlendMode mode); |
24 | | |
25 | | private: |
26 | 2.99k | SkBlender() = default; |
27 | | friend class SkBlenderBase; |
28 | | }; |
29 | | |
30 | | #endif |