Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
src
gpu
ganesh
glsl
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
11
#include "
src/gpu/ganesh/glsl/GrGLSLProgramDataManager.h
"
12
13
#include <string>
14
15
class
GrGLSLUniformHandler
;
16
class
GrProcessor
;
17
enum class
SkBlendMode
;
18
19
namespace
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
*/
25
std::string
BlendExpression
(
const
GrProcessor
* processor,
26
GrGLSLUniformHandler
* uniformHandler,
27
GrGLSLProgramDataManager::UniformHandle* uniform,
28
const
char
* srcColor,
29
const
char
* dstColor,
30
SkBlendMode
mode);
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
*/
36
int
BlendKey
(
SkBlendMode
mode);
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
*/
42
void
SetBlendModeUniformData
(
const
GrGLSLProgramDataManager
& pdman,
43
GrGLSLProgramDataManager::UniformHandle uniform,
44
SkBlendMode
mode);
45
46
}
// namespace GrGLSLBlend
47
48
#endif
GrGLSLProgramDataManager.h
SkBlendMode
SkBlendMode
Definition
SkBlendMode.h:38
GrGLSLProgramDataManager
Definition
GrGLSLProgramDataManager.h:26
GrGLSLUniformHandler
Definition
GrGLSLUniformHandler.h:41
GrProcessor
Definition
GrProcessor.h:22
GrGLSLBlend
Definition
GrGLSLBlend.cpp:18
GrGLSLBlend::BlendExpression
std::string BlendExpression(const GrProcessor *processor, GrGLSLUniformHandler *uniformHandler, GrGLSLProgramDataManager::UniformHandle *blendUniform, const char *srcColor, const char *dstColor, SkBlendMode mode)
Definition
GrGLSLBlend.cpp:20
GrGLSLBlend::BlendKey
int BlendKey(SkBlendMode mode)
Definition
GrGLSLBlend.cpp:40
GrGLSLBlend::SetBlendModeUniformData
void SetBlendModeUniformData(const GrGLSLProgramDataManager &pdman, GrGLSLProgramDataManager::UniformHandle blendUniform, SkBlendMode mode)
Definition
GrGLSLBlend.cpp:73
Generated on Fri Apr 26 2024 06:17:02 for Flutter Engine by
1.9.8