8#ifndef skgpu_graphite_PipelineData_DEFINED
9#define skgpu_graphite_PipelineData_DEFINED
40 const char*
data()
const {
return fData.
data(); }
43 uint32_t
hash()
const;
46 return fData.
size() == that.fData.
size() &&
62 bool empty()
const {
return fTextureData.empty(); }
63 int numTextures()
const {
return SkTo<int>(fTextureData.size()); }
68 uint32_t
hash()
const;
71 fTextureData.push_back({std::move(proxy), samplerDesc});
80 std::vector<SampledTexture> fTextureData;
108 template <
typename T>
void write(
const T& t) { fUniformManager.
write(t); }
134 int* existingOfffset = fGradientOffsetCache.
find(shader);
135 if (existingOfffset) {
136 return std::make_pair(
nullptr, *existingOfffset);
139 auto dataPair = this->allocateFloatData(numStops * 5);
140 fGradientOffsetCache.
set(shader, dataPair.second);
148 std::pair<float*, int> allocateFloatData(
int size) {
149 int lastSize = fGradientStorage.
size();
151 float* startPtr = fGradientStorage.
begin() + lastSize;
153 return std::make_pair(startPtr, lastSize);
157 friend class UniformExpectationsValidator;
160 void doneWithExpectedUniforms() { fUniformManager.doneWithExpectedUniforms(); }
163 TextureDataBlock fTextureDataBlock;
164 UniformManager fUniformManager;
173class UniformExpectationsValidator {
175 UniformExpectationsValidator(PipelineDataGatherer *gatherer,
178 ~UniformExpectationsValidator() {
179 fGatherer->doneWithExpectedUniforms();
183 PipelineDataGatherer *fGatherer;
185 UniformExpectationsValidator(UniformExpectationsValidator &&) =
delete;
186 UniformExpectationsValidator(
const UniformExpectationsValidator &) =
delete;
187 UniformExpectationsValidator &operator=(UniformExpectationsValidator &&) =
delete;
188 UniformExpectationsValidator &operator=(
const UniformExpectationsValidator &) =
delete;
constexpr T * data() const
constexpr size_t size() const
const SamplerDesc & samplerDesc
PipelineDataGatherer(Layout layout)
std::pair< float *, int > allocateGradientData(int numStops, const SkGradientBaseShader *shader)
void write(const Uniform &u, const void *data)
void writeHalf(const T &t)
SkSpan< const float > gradientBufferData() const
void writeHalfArray(SkSpan< const T > t)
void resetWithNewLayout(Layout layout)
bool hasGradientBufferData() const
UniformDataBlock finishUniformDataBlock()
void writeArray(SkSpan< const T > t)
const TextureDataBlock & textureDataBlock()
SkDEBUGCODE(void checkReset();) void add(sk_sp< TextureProxy > proxy
void writePaintColor(const SkPMColor4f &color)
std::pair< sk_sp< TextureProxy >, SamplerDesc > SampledTexture
TextureDataBlock()=default
bool operator==(const TextureDataBlock &) const
static TextureDataBlock * Make(const TextureDataBlock &, SkArenaAlloc *)
void add(sk_sp< TextureProxy > proxy, const SamplerDesc &samplerDesc)
bool operator!=(const TextureDataBlock &other) const
const SampledTexture & texture(int index) const
V * find(const K &key) const
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 keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
std::shared_ptr< const fml::Mapping > data