Flutter Engine
The Flutter Engine
GrGLSLBlend.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 GrGLBlend_DEFINED
9#define GrGLBlend_DEFINED
10
12
13#include <string>
14
16class GrProcessor;
17enum class SkBlendMode;
18
19namespace GrGLSLBlend {
20
21/**
22 * Returns an SkSL expression that blends the passed-in srcColor and dstColor values.
23 * Matching calls to SetBlendModeUniformData and BlendKey must be made from your GrProcessor.
24 */
25std::string BlendExpression(const GrProcessor* processor,
26 GrGLSLUniformHandler* uniformHandler,
27 GrGLSLProgramDataManager::UniformHandle* uniform,
28 const char* srcColor,
29 const char* dstColor,
31
32/**
33 * Returns a key, for use in onAddToKey from any GrProcessor. You must pass the same blend mode that
34 * was passed to BlendExpression
35 */
37
38/**
39 * Sets up uniforms, for use in onSetData from any GrProcessor. You must pass the same uniform and
40 * blend mode that were passed to BlendExpression.
41 */
43 GrGLSLProgramDataManager::UniformHandle uniform,
45
46} // namespace GrGLSLBlend
47
48#endif
SkBlendMode
Definition: SkBlendMode.h:38
std::string BlendExpression(const GrProcessor *processor, GrGLSLUniformHandler *uniformHandler, GrGLSLProgramDataManager::UniformHandle *blendUniform, const char *srcColor, const char *dstColor, SkBlendMode mode)
Definition: GrGLSLBlend.cpp:20
int BlendKey(SkBlendMode mode)
Definition: GrGLSLBlend.cpp:40
void SetBlendModeUniformData(const GrGLSLProgramDataManager &pdman, GrGLSLProgramDataManager::UniformHandle blendUniform, SkBlendMode mode)
Definition: GrGLSLBlend.cpp:73
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