Flutter Engine
The Flutter Engine
Public Types | Public Member Functions | Protected Attributes | List of all members
skgpu::graphite::KeyContext Class Reference

#include <KeyContext.h>

Inheritance diagram for skgpu::graphite::KeyContext:
skgpu::graphite::KeyContextWithColorInfo skgpu::graphite::KeyContextWithCoordClamp skgpu::graphite::KeyContextWithLocalMatrix skgpu::graphite::KeyContextWithScope

Public Types

enum class  OptimizeSampling : bool { kNo = false , kYes = true }
 
enum class  Scope { kDefault , kRuntimeEffect }
 

Public Member Functions

 KeyContext (const Caps *caps, ShaderCodeDictionary *dict, RuntimeEffectDictionary *rtEffectDict, const SkColorInfo &dstColorInfo, sk_sp< TextureProxy > dstTexture, SkIPoint dstOffset)
 
 KeyContext (Recorder *, const SkM44 &local2Dev, const SkColorInfo &dstColorInfo, OptimizeSampling optimizeSampling, const SkColor4f &paintColor, sk_sp< TextureProxy > dstTexture, SkIPoint dstOffset)
 
 KeyContext (const KeyContext &)
 
Recorderrecorder () const
 
const Capscaps () const
 
const SkM44local2Dev () const
 
const SkMatrixlocalMatrix () const
 
ShaderCodeDictionarydict () const
 
RuntimeEffectDictionaryrtEffectDict () const
 
const SkColorInfodstColorInfo () const
 
sk_sp< TextureProxydstTexture () const
 
SkIPoint dstOffset () const
 
const SkPMColor4fpaintColor () const
 
Scope scope () const
 
OptimizeSampling optimizeSampling () const
 

Protected Attributes

RecorderfRecorder = nullptr
 
SkM44 fLocal2Dev
 
SkMatrixfLocalMatrix = nullptr
 
ShaderCodeDictionaryfDictionary
 
RuntimeEffectDictionaryfRTEffectDict
 
SkColorInfo fDstColorInfo
 
SkPMColor4f fPaintColor = SK_PMColor4fBLACK
 
Scope fScope = Scope::kDefault
 
OptimizeSampling fOptimizeSampling = OptimizeSampling::kNo
 

Detailed Description

Definition at line 29 of file KeyContext.h.

Member Enumeration Documentation

◆ OptimizeSampling

Enumerator
kNo 
kYes 

Definition at line 31 of file KeyContext.h.

31: bool { kNo = false, kYes = true };
@ kYes
Do pre-clip the geometry before applying the (perspective) matrix.
@ kNo
Don't pre-clip the geometry before applying the (perspective) matrix.

◆ Scope

Enumerator
kDefault 
kRuntimeEffect 

Definition at line 76 of file KeyContext.h.

Constructor & Destructor Documentation

◆ KeyContext() [1/3]

skgpu::graphite::KeyContext::KeyContext ( const Caps caps,
ShaderCodeDictionary dict,
RuntimeEffectDictionary rtEffectDict,
const SkColorInfo dstColorInfo,
sk_sp< TextureProxy dstTexture,
SkIPoint  dstOffset 
)
inline

Definition at line 33 of file KeyContext.h.

42 , fCaps(caps)
43 , fDstTexture(std::move(dstTexture))
44 , fDstOffset(dstOffset) {}
RuntimeEffectDictionary * rtEffectDict() const
Definition: KeyContext.h:65
SkIPoint dstOffset() const
Definition: KeyContext.h:72
RuntimeEffectDictionary * fRTEffectDict
Definition: KeyContext.h:89
sk_sp< TextureProxy > dstTexture() const
Definition: KeyContext.h:70
const SkColorInfo & dstColorInfo() const
Definition: KeyContext.h:67
ShaderCodeDictionary * fDictionary
Definition: KeyContext.h:88
ShaderCodeDictionary * dict() const
Definition: KeyContext.h:64
const Caps * caps() const
Definition: KeyContext.h:59

◆ KeyContext() [2/3]

skgpu::graphite::KeyContext::KeyContext ( Recorder recorder,
const SkM44 local2Dev,
const SkColorInfo dstColorInfo,
OptimizeSampling  optimizeSampling,
const SkColor4f paintColor,
sk_sp< TextureProxy dstTexture,
SkIPoint  dstOffset 
)

Definition at line 15 of file KeyContext.cpp.

24 , fLocalMatrix(nullptr)
27 , fCaps(recorder->priv().caps())
28 , fDstTexture(std::move(dstTexture))
29 , fDstOffset(dstOffset) {
34}
const SkM44 & local2Dev() const
Definition: KeyContext.h:61
Recorder * recorder() const
Definition: KeyContext.h:57
const SkPMColor4f & paintColor() const
Definition: KeyContext.h:74
OptimizeSampling optimizeSampling() const
Definition: KeyContext.h:82
OptimizeSampling fOptimizeSampling
Definition: KeyContext.h:96
static SkColor4f Color4fPrepForDst(SkColor4f srgb, const SkColorInfo &dstColorInfo)
Definition: PaintParams.cpp:85
const RuntimeEffectDictionary * runtimeEffectDictionary() const
Definition: RecorderPriv.h:35
const ShaderCodeDictionary * shaderCodeDictionary() const
Definition: RecorderPriv.h:41
const Caps * caps() const
Definition: RecorderPriv.h:31
float fA
alpha component
Definition: SkColor.h:266

◆ KeyContext() [3/3]

skgpu::graphite::KeyContext::KeyContext ( const KeyContext other)

Definition at line 36 of file KeyContext.cpp.

37 : fRecorder(other.fRecorder)
38 , fLocal2Dev(other.fLocal2Dev)
39 , fLocalMatrix(other.fLocalMatrix)
40 , fDictionary(other.fDictionary)
41 , fRTEffectDict(other.fRTEffectDict)
42 , fDstColorInfo(other.fDstColorInfo)
43 , fPaintColor(other.fPaintColor)
44 , fScope(other.fScope)
45 , fOptimizeSampling(other.fOptimizeSampling)
46 , fCaps(other.fCaps)
47 , fDstTexture(other.fDstTexture)
48 , fDstOffset(other.fDstOffset) {}

Member Function Documentation

◆ caps()

const Caps * skgpu::graphite::KeyContext::caps ( ) const
inline

Definition at line 59 of file KeyContext.h.

59{ return fCaps; }

◆ dict()

ShaderCodeDictionary * skgpu::graphite::KeyContext::dict ( ) const
inline

Definition at line 64 of file KeyContext.h.

64{ return fDictionary; }

◆ dstColorInfo()

const SkColorInfo & skgpu::graphite::KeyContext::dstColorInfo ( ) const
inline

Definition at line 67 of file KeyContext.h.

67{ return fDstColorInfo; }

◆ dstOffset()

SkIPoint skgpu::graphite::KeyContext::dstOffset ( ) const
inline

Definition at line 72 of file KeyContext.h.

72{ return fDstOffset; }

◆ dstTexture()

sk_sp< TextureProxy > skgpu::graphite::KeyContext::dstTexture ( ) const
inline

Definition at line 70 of file KeyContext.h.

70{ return fDstTexture; }

◆ local2Dev()

const SkM44 & skgpu::graphite::KeyContext::local2Dev ( ) const
inline

Definition at line 61 of file KeyContext.h.

61{ return fLocal2Dev; }

◆ localMatrix()

const SkMatrix * skgpu::graphite::KeyContext::localMatrix ( ) const
inline

Definition at line 62 of file KeyContext.h.

62{ return fLocalMatrix; }

◆ optimizeSampling()

OptimizeSampling skgpu::graphite::KeyContext::optimizeSampling ( ) const
inline

Definition at line 82 of file KeyContext.h.

82{ return fOptimizeSampling; }

◆ paintColor()

const SkPMColor4f & skgpu::graphite::KeyContext::paintColor ( ) const
inline

Definition at line 74 of file KeyContext.h.

74{ return fPaintColor; }

◆ recorder()

Recorder * skgpu::graphite::KeyContext::recorder ( ) const
inline

Definition at line 57 of file KeyContext.h.

57{ return fRecorder; }

◆ rtEffectDict()

RuntimeEffectDictionary * skgpu::graphite::KeyContext::rtEffectDict ( ) const
inline

Definition at line 65 of file KeyContext.h.

65{ return fRTEffectDict; }

◆ scope()

Scope skgpu::graphite::KeyContext::scope ( ) const
inline

Definition at line 81 of file KeyContext.h.

81{ return fScope; }

Member Data Documentation

◆ fDictionary

ShaderCodeDictionary* skgpu::graphite::KeyContext::fDictionary
protected

Definition at line 88 of file KeyContext.h.

◆ fDstColorInfo

SkColorInfo skgpu::graphite::KeyContext::fDstColorInfo
protected

Definition at line 90 of file KeyContext.h.

◆ fLocal2Dev

SkM44 skgpu::graphite::KeyContext::fLocal2Dev
protected

Definition at line 86 of file KeyContext.h.

◆ fLocalMatrix

SkMatrix* skgpu::graphite::KeyContext::fLocalMatrix = nullptr
protected

Definition at line 87 of file KeyContext.h.

◆ fOptimizeSampling

OptimizeSampling skgpu::graphite::KeyContext::fOptimizeSampling = OptimizeSampling::kNo
protected

Definition at line 96 of file KeyContext.h.

◆ fPaintColor

SkPMColor4f skgpu::graphite::KeyContext::fPaintColor = SK_PMColor4fBLACK
protected

Definition at line 94 of file KeyContext.h.

◆ fRecorder

Recorder* skgpu::graphite::KeyContext::fRecorder = nullptr
protected

Definition at line 85 of file KeyContext.h.

◆ fRTEffectDict

RuntimeEffectDictionary* skgpu::graphite::KeyContext::fRTEffectDict
protected

Definition at line 89 of file KeyContext.h.

◆ fScope

Scope skgpu::graphite::KeyContext::fScope = Scope::kDefault
protected

Definition at line 95 of file KeyContext.h.


The documentation for this class was generated from the following files: