Flutter Engine
The Flutter Engine
GrBlendFragmentProcessor.h
Go to the documentation of this file.
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 GrBlendFragmentProcessor_DEFINED
9#define GrBlendFragmentProcessor_DEFINED
10
12
13#include <memory>
14#include <utility>
15
16enum class SkBlendMode;
17
19
20/**
21 * Blends src and dst inputs according to the blend mode. If either input is null, fInputColor is
22 * used instead.
23 * - When `shareBlendLogic` is false, the blend function logic is written directly into the code.
24 * - When `shareBlendLogic` is true, most Porter-Duff blends share the same code, and a uniform
25 * is used to pick the blend type. This can reduce our overall shader count.
26 */
27std::unique_ptr<GrFragmentProcessor> Make(std::unique_ptr<GrFragmentProcessor> src,
28 std::unique_ptr<GrFragmentProcessor> dst,
30 bool shareBlendLogic = true);
31/**
32 * Blends src and dst inputs according to the blend mode. If either input is null, fInputColor is
33 * used instead. Hard-wires a single blend mode into the code (slightly reducing complexity).
34 */
35template <SkBlendMode mode>
36std::unique_ptr<GrFragmentProcessor> Make(std::unique_ptr<GrFragmentProcessor> src,
37 std::unique_ptr<GrFragmentProcessor> dst) {
38 return Make(std::move(src), std::move(dst), mode, /*shareBlendLogic=*/false);
39}
40
41
42} // namespace GrBlendFragmentProcessor
43
44#endif
SkBlendMode
Definition: SkBlendMode.h:38
std::unique_ptr< GrFragmentProcessor > Make(std::unique_ptr< GrFragmentProcessor > src, std::unique_ptr< GrFragmentProcessor > dst, SkBlendMode mode, bool shareBlendLogic=true)
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