Flutter Engine
The Flutter Engine
Classes | Namespaces | Macros | Functions
SkShaderBase.h File Reference
#include "include/core/SkColor.h"
#include "include/core/SkFlattenable.h"
#include "include/core/SkMatrix.h"
#include "include/core/SkPoint.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkScalar.h"
#include "include/core/SkShader.h"
#include "include/core/SkSurfaceProps.h"
#include "include/core/SkTypes.h"
#include "include/private/base/SkNoncopyable.h"
#include <cstddef>
#include <cstdint>
#include <optional>
#include <tuple>

Go to the source code of this file.

Classes

class  SkShaders::MatrixRec
 
class  SkShaderBase
 
struct  SkShaderBase::GradientInfo
 
struct  SkShaderBase::ContextRec
 
class  SkShaderBase::Context
 

Namespaces

namespace  SkShaders
 

Macros

#define SK_ALL_SHADERS(M)
 
#define SK_ALL_GRADIENTS(M)
 
#define M(type)   k##type,
 
#define M(type)   k##type,
 

Functions

SkShaderBaseas_SB (SkShader *shader)
 
const SkShaderBaseas_SB (const SkShader *shader)
 
const SkShaderBaseas_SB (const sk_sp< SkShader > &shader)
 
void SkRegisterBlendShaderFlattenable ()
 
void SkRegisterColor4ShaderFlattenable ()
 
void SkRegisterColorShaderFlattenable ()
 
void SkRegisterCoordClampShaderFlattenable ()
 
void SkRegisterEmptyShaderFlattenable ()
 
void SkRegisterPerlinNoiseShaderFlattenable ()
 
void SkRegisterWorkingColorSpaceShaderFlattenable ()
 

Macro Definition Documentation

◆ M [1/2]

#define M (   type)    k##type,

Definition at line 209 of file SkShaderBase.h.

◆ M [2/2]

#define M (   type)    k##type,

Definition at line 209 of file SkShaderBase.h.

◆ SK_ALL_GRADIENTS

#define SK_ALL_GRADIENTS (   M)
Value:
M(Conical) \
M(Linear) \
M(Radial) \
M(Sweep)
#define M(type)
Definition: SkShaderBase.h:209

Definition at line 180 of file SkShaderBase.h.

◆ SK_ALL_SHADERS

#define SK_ALL_SHADERS (   M)
Value:
M(Blend) \
M(CTM) \
M(Color) \
M(Color4) \
M(Empty) \
M(GradientBase) \
M(Image) \
M(PerlinNoise) \
M(Picture) \
M(Runtime) \
M(Transform) \
M(TriColor) \
SK_API sk_sp< SkShader > Color(SkColor)
SK_API sk_sp< SkShader > CoordClamp(sk_sp< SkShader >, const SkRect &subset)
SK_API sk_sp< SkShader > Empty()
CanvasImage Image
Definition: dart_ui.cc:55
sk_sp< PrecompileShader > CTM(SkSpan< const sk_sp< PrecompileShader > > wrapped)
SK_API sk_sp< PrecompileShader > ColorFilter(SkSpan< const sk_sp< PrecompileShader > > shaders, SkSpan< const sk_sp< PrecompileColorFilter > > colorFilters)
SK_API sk_sp< PrecompileShader > LocalMatrix(SkSpan< const sk_sp< PrecompileShader > > wrapped)
SK_API sk_sp< PrecompileShader > WorkingColorSpace(SkSpan< const sk_sp< PrecompileShader > > shaders, SkSpan< const sk_sp< SkColorSpace > > colorSpaces)
SK_API sk_sp< PrecompileShader > Picture()
skgpu::graphite::Transform Transform

Definition at line 162 of file SkShaderBase.h.

Function Documentation

◆ as_SB() [1/3]

const SkShaderBase * as_SB ( const sk_sp< SkShader > &  shader)
inline

Definition at line 420 of file SkShaderBase.h.

420 {
421 return static_cast<SkShaderBase*>(shader.get());
422}
T * get() const
Definition: SkRefCnt.h:303

◆ as_SB() [2/3]

const SkShaderBase * as_SB ( const SkShader shader)
inline

Definition at line 416 of file SkShaderBase.h.

416 {
417 return static_cast<const SkShaderBase*>(shader);
418}

◆ as_SB() [3/3]

SkShaderBase * as_SB ( SkShader shader)
inline

Definition at line 412 of file SkShaderBase.h.

412 {
413 return static_cast<SkShaderBase*>(shader);
414}

◆ SkRegisterBlendShaderFlattenable()

void SkRegisterBlendShaderFlattenable ( )

Definition at line 139 of file SkBlendShader.cpp.

139 {
141 // Previous name
142 SkFlattenable::Register("SkShader_Blend", SkBlendShader::CreateProc);
143}
#define SK_REGISTER_FLATTENABLE(type)
static void Register(const char name[], Factory)

◆ SkRegisterColor4ShaderFlattenable()

void SkRegisterColor4ShaderFlattenable ( )

Definition at line 94 of file SkColorShader.cpp.

◆ SkRegisterColorShaderFlattenable()

void SkRegisterColorShaderFlattenable ( )

Definition at line 98 of file SkColorShader.cpp.

◆ SkRegisterCoordClampShaderFlattenable()

void SkRegisterCoordClampShaderFlattenable ( )

Definition at line 52 of file SkCoordClampShader.cpp.

52 {
54
55 // Previous name
56 SkFlattenable::Register("SkShader_CoordClamp", SkCoordClampShader::CreateProc);
57}

◆ SkRegisterEmptyShaderFlattenable()

void SkRegisterEmptyShaderFlattenable ( )

Definition at line 22 of file SkEmptyShader.cpp.

◆ SkRegisterPerlinNoiseShaderFlattenable()

void SkRegisterPerlinNoiseShaderFlattenable ( )

Definition at line 277 of file SkPerlinNoiseShaderImpl.cpp.

128 {
130 // Previous name
131 SkFlattenable::Register("SkPerlinNoiseShaderImpl", SkPerlinNoiseShader::CreateProc);
132}

◆ SkRegisterWorkingColorSpaceShaderFlattenable()

void SkRegisterWorkingColorSpaceShaderFlattenable ( )