Flutter Engine
The Flutter Engine
SkBlendModePriv.h
Go to the documentation of this file.
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
14
16class SkPaint;
17
18/**
19 * Sentinel value for SkBlendMode enum.
20 *
21 * Will never be a valid enum value, but will be storable in a byte.
22 */
23constexpr uint8_t kCustom_SkBlendMode = 0xFF;
24
26
29}
30
31bool SkBlendMode_ShouldPreScaleCoverage(SkBlendMode, bool rgb_coverage);
33
35
36enum class SkBlendFastPath {
37 kNormal, // draw normally
38 kSrcOver, //< draw as if in srcover mode
39 kSkipDrawing //< draw nothing
40};
41
42/**
43 * Given a paint, determine whether the paint's blend mode can be
44 * replaced with kSrcOver or not drawn at all. This can inform drawing optimizations.
45 */
46SkBlendFastPath CheckFastPath(const SkPaint&, bool dstIsOpaque);
47
48#endif
void SkBlendMode_AppendStages(SkBlendMode, SkRasterPipeline *)
Definition: SkBlendMode.cpp:97
SkBlendFastPath
SkPMColor4f SkBlendMode_Apply(SkBlendMode, const SkPMColor4f &src, const SkPMColor4f &dst)
constexpr uint8_t kCustom_SkBlendMode
static bool SkBlendMode_CaresAboutRBOrder(SkBlendMode mode)
bool SkBlendMode_ShouldPreScaleCoverage(SkBlendMode, bool rgb_coverage)
Definition: SkBlendMode.cpp:21
SkBlendFastPath CheckFastPath(const SkPaint &, bool dstIsOpaque)
bool SkBlendMode_SupportsCoverageAsAlpha(SkBlendMode)
Definition: SkBlendMode.cpp:53
SkBlendMode
Definition: SkBlendMode.h:38
@ kSrcOver
r = s + (1-sa)*d
@ kLastSeparableMode
last blend mode operating separately on components
@ kNormal
glyph outlines modified to improve constrast
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive mode
Definition: switches.h:228
dst
Definition: cp.py:12