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

#include <PipelineData.h>

Public Member Functions

 PipelineDataGatherer (Layout layout)
 
void resetWithNewLayout (Layout layout)
 
 SkDEBUGCODE (void checkReset();) void add(sk_sp< TextureProxy > proxy
 
bool hasTextures () const
 
const TextureDataBlocktextureDataBlock ()
 
template<typename T >
void write (const T &t)
 
template<typename T >
void writeHalf (const T &t)
 
template<typename T >
void writeArray (SkSpan< const T > t)
 
template<typename T >
void writeHalfArray (SkSpan< const T > t)
 
void write (const Uniform &u, const void *data)
 
void writePaintColor (const SkPMColor4f &color)
 
bool hasUniforms () const
 
bool hasGradientBufferData () const
 
SkSpan< const float > gradientBufferData () const
 
UniformDataBlock finishUniformDataBlock ()
 
std::pair< float *, intallocateGradientData (int numStops, const SkGradientBaseShader *shader)
 

Public Attributes

const SamplerDescsamplerDesc
 

Detailed Description

Definition at line 91 of file PipelineData.h.

Constructor & Destructor Documentation

◆ PipelineDataGatherer()

skgpu::graphite::PipelineDataGatherer::PipelineDataGatherer ( Layout  layout)

Definition at line 15 of file PipelineData.cpp.

16 : fUniformManager(layout) {}

Member Function Documentation

◆ allocateGradientData()

std::pair< float *, int > skgpu::graphite::PipelineDataGatherer::allocateGradientData ( int  numStops,
const SkGradientBaseShader shader 
)
inline

Definition at line 133 of file PipelineData.h.

133 {
134 int* existingOfffset = fGradientOffsetCache.find(shader);
135 if (existingOfffset) {
136 return std::make_pair(nullptr, *existingOfffset);
137 }
138
139 auto dataPair = this->allocateFloatData(numStops * 5);
140 fGradientOffsetCache.set(shader, dataPair.second);
141
142 return dataPair;
143 }
V * find(const K &key) const
Definition: SkTHash.h:494
V * set(K key, V val)
Definition: SkTHash.h:487

◆ finishUniformDataBlock()

UniformDataBlock skgpu::graphite::PipelineDataGatherer::finishUniformDataBlock ( )
inline

Definition at line 127 of file PipelineData.h.

127{ return fUniformManager.finishUniformDataBlock(); }
UniformDataBlock finishUniformDataBlock()

◆ gradientBufferData()

SkSpan< const float > skgpu::graphite::PipelineDataGatherer::gradientBufferData ( ) const
inline

Definition at line 123 of file PipelineData.h.

123{ return fGradientStorage; }

◆ hasGradientBufferData()

bool skgpu::graphite::PipelineDataGatherer::hasGradientBufferData ( ) const
inline

Definition at line 121 of file PipelineData.h.

121{ return !fGradientStorage.empty(); }
bool empty() const
Definition: SkTDArray.h:135

◆ hasTextures()

bool skgpu::graphite::PipelineDataGatherer::hasTextures ( ) const
inline

Definition at line 103 of file PipelineData.h.

103{ return !fTextureDataBlock.empty(); }

◆ hasUniforms()

bool skgpu::graphite::PipelineDataGatherer::hasUniforms ( ) const
inline

Definition at line 119 of file PipelineData.h.

119{ return fUniformManager.size(); }

◆ resetWithNewLayout()

void skgpu::graphite::PipelineDataGatherer::resetWithNewLayout ( Layout  layout)

Definition at line 18 of file PipelineData.cpp.

18 {
19 fUniformManager.resetWithNewLayout(layout);
20 fTextureDataBlock.reset();
21}
void resetWithNewLayout(Layout layout)

◆ SkDEBUGCODE()

skgpu::graphite::PipelineDataGatherer::SkDEBUGCODE ( void checkReset();  )

◆ textureDataBlock()

const TextureDataBlock & skgpu::graphite::PipelineDataGatherer::textureDataBlock ( )
inline

Definition at line 105 of file PipelineData.h.

105{ return fTextureDataBlock; }

◆ write() [1/2]

template<typename T >
void skgpu::graphite::PipelineDataGatherer::write ( const T t)
inline

Definition at line 108 of file PipelineData.h.

108{ fUniformManager.write(t); }

◆ write() [2/2]

void skgpu::graphite::PipelineDataGatherer::write ( const Uniform u,
const void *  data 
)
inline

Definition at line 115 of file PipelineData.h.

115{ fUniformManager.write(u, data); }
std::shared_ptr< const fml::Mapping > data
Definition: texture_gles.cc:63

◆ writeArray()

template<typename T >
void skgpu::graphite::PipelineDataGatherer::writeArray ( SkSpan< const T t)
inline

Definition at line 110 of file PipelineData.h.

110{ fUniformManager.writeArray(t); }
void writeArray(SkSpan< const SkV4 > v)

◆ writeHalf()

template<typename T >
void skgpu::graphite::PipelineDataGatherer::writeHalf ( const T t)
inline

Definition at line 109 of file PipelineData.h.

109{ fUniformManager.writeHalf(t); }

◆ writeHalfArray()

template<typename T >
void skgpu::graphite::PipelineDataGatherer::writeHalfArray ( SkSpan< const T t)
inline

Definition at line 111 of file PipelineData.h.

111 {
112 fUniformManager.writeHalfArray(t);
113 }
void writeHalfArray(SkSpan< const SkPMColor4f > c)

◆ writePaintColor()

void skgpu::graphite::PipelineDataGatherer::writePaintColor ( const SkPMColor4f color)
inline

Definition at line 117 of file PipelineData.h.

117{ fUniformManager.writePaintColor(color); }
void writePaintColor(const SkPMColor4f &color)
DlColor color

Member Data Documentation

◆ samplerDesc

const SamplerDesc& skgpu::graphite::PipelineDataGatherer::samplerDesc
Initial value:
{
fTextureDataBlock.add(std::move(proxy), samplerDesc)
void add(sk_sp< TextureProxy > proxy, const SamplerDesc &samplerDesc)
Definition: PipelineData.h:70

Definition at line 100 of file PipelineData.h.


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