#include <UniformManager.h>
Definition at line 198 of file UniformManager.h.
◆ UniformManager()
skgpu::graphite::UniformManager::UniformManager |
( |
Layout |
layout | ) |
|
|
inline |
◆ finishUniformDataBlock()
Definition at line 51 of file UniformManager.cpp.
51 {
53 size_t paddingSize =
size - fStorage.
size();
54 if (paddingSize > 0) {
55 char* padding = fStorage.
append(paddingSize);
56 memset(padding, 0, paddingSize);
57 }
59}
static constexpr size_t SkAlignTo(size_t x, size_t alignment)
SkSpan(Container &&) -> SkSpan< std::remove_pointer_t< decltype(std::data(std::declval< Container >()))> >
◆ reset()
void skgpu::graphite::UniformManager::reset |
( |
| ) |
|
|
inline |
◆ resetWithNewLayout()
void skgpu::graphite::UniformManager::resetWithNewLayout |
( |
Layout |
layout | ) |
|
Definition at line 61 of file UniformManager.cpp.
61 {
63 fLayout = layout;
64 fReqAlignment = 0;
65 fWrotePaintColor = false;
66
67#ifdef SK_DEBUG
68 fOffsetCalculator = UniformOffsetCalculator(layout, 0);
69 fExpectedUniforms = {};
70 fExpectedUniformIndex = 0;
71#endif
72}
◆ size()
size_t skgpu::graphite::UniformManager::size |
( |
| ) |
const |
|
inline |
◆ write() [1/15]
void skgpu::graphite::UniformManager::write |
( |
const SkIRect & |
r | ) |
|
|
inline |
◆ write() [2/15]
void skgpu::graphite::UniformManager::write |
( |
const SkISize & |
s | ) |
|
|
inline |
◆ write() [3/15]
void skgpu::graphite::UniformManager::write |
( |
const SkM44 & |
m | ) |
|
|
inline |
Definition at line 257 of file UniformManager.h.
257 {
258
259
261 }
static const SkScalar * M44ColMajor(const SkM44 &m)
◆ write() [4/15]
void skgpu::graphite::UniformManager::write |
( |
const SkMatrix & |
m | ) |
|
|
inline |
Definition at line 267 of file UniformManager.h.
267 {
268
269
270 float colMajor[9] = {
m[0],
m[3],
m[6],
273 this->writeArray<SkSLType::kFloat3>(colMajor, 3);
274 }
◆ write() [5/15]
void skgpu::graphite::UniformManager::write |
( |
const SkPMColor4f & |
c | ) |
|
|
inline |
Definition at line 214 of file UniformManager.h.
214{ this->write<SkSLType::kFloat4>(c.
vec()); }
const float * vec() const
◆ write() [6/15]
void skgpu::graphite::UniformManager::write |
( |
const SkPoint & |
p | ) |
|
|
inline |
◆ write() [7/15]
void skgpu::graphite::UniformManager::write |
( |
const SkPoint3 & |
p | ) |
|
|
inline |
◆ write() [8/15]
void skgpu::graphite::UniformManager::write |
( |
const SkRect & |
r | ) |
|
|
inline |
◆ write() [9/15]
void skgpu::graphite::UniformManager::write |
( |
const SkSize & |
s | ) |
|
|
inline |
◆ write() [10/15]
void skgpu::graphite::UniformManager::write |
( |
const SkV2 & |
v | ) |
|
|
inline |
Definition at line 244 of file UniformManager.h.
244{ this->write<SkSLType::kFloat2>(v.
ptr()); }
const float * ptr() const
◆ write() [11/15]
void skgpu::graphite::UniformManager::write |
( |
const SkV3 & |
v | ) |
|
|
inline |
Definition at line 235 of file UniformManager.h.
235{ this->write<SkSLType::kFloat3>(v.
ptr()); }
const float * ptr() const
◆ write() [12/15]
void skgpu::graphite::UniformManager::write |
( |
const SkV4 & |
v | ) |
|
|
inline |
Definition at line 216 of file UniformManager.h.
216{ this->write<SkSLType::kFloat4>(v.
ptr()); }
const float * ptr() const
◆ write() [13/15]
void skgpu::graphite::UniformManager::write |
( |
const Uniform & |
u, |
|
|
const void * |
src |
|
) |
| |
Definition at line 92 of file UniformManager.cpp.
92 {
95
98
101 if (fullPrecision) {
107 }
108 } else {
114 }
115 }
116 } else {
117 if (fullPrecision) {
123 }
124 } else {
130 }
131 }
132 }
133}
int SkSLTypeMatrixSize(SkSLType type)
static constexpr bool SkSLTypeCanBeUniformValue(SkSLType type)
static constexpr int SkSLTypeVecLength(SkSLType type)
static constexpr bool UseFullPrecision(Layout layout)
static std::pair< SkSLType, int > adjust_for_matrix_type(SkSLType type, int count)
std::shared_ptr< const fml::Mapping > data
◆ write() [14/15]
void skgpu::graphite::UniformManager::write |
( |
float |
f | ) |
|
|
inline |
◆ write() [15/15]
void skgpu::graphite::UniformManager::write |
( |
int32_t |
i | ) |
|
|
inline |
◆ writeArray() [1/2]
Definition at line 227 of file UniformManager.h.
227 {
228 this->writeArray<SkSLType::kFloat4>(c.
data(), c.
size());
229 }
constexpr T * data() const
constexpr size_t size() const
◆ writeArray() [2/2]
void skgpu::graphite::UniformManager::writeArray |
( |
SkSpan< const SkV4 > |
v | ) |
|
|
inline |
◆ writeHalf() [1/11]
void skgpu::graphite::UniformManager::writeHalf |
( |
const SkM44 & |
m | ) |
|
|
inline |
◆ writeHalf() [2/11]
void skgpu::graphite::UniformManager::writeHalf |
( |
const SkMatrix & |
m | ) |
|
|
inline |
Definition at line 275 of file UniformManager.h.
275 {
276 float colMajor[9] = {
m[0],
m[3],
m[6],
279 this->writeArray<SkSLType::kHalf3>(colMajor, 3);
280 }
◆ writeHalf() [3/11]
void skgpu::graphite::UniformManager::writeHalf |
( |
const SkPMColor4f & |
c | ) |
|
|
inline |
◆ writeHalf() [4/11]
void skgpu::graphite::UniformManager::writeHalf |
( |
const SkPoint & |
p | ) |
|
|
inline |
◆ writeHalf() [5/11]
void skgpu::graphite::UniformManager::writeHalf |
( |
const SkPoint3 & |
p | ) |
|
|
inline |
◆ writeHalf() [6/11]
void skgpu::graphite::UniformManager::writeHalf |
( |
const SkRect & |
r | ) |
|
|
inline |
◆ writeHalf() [7/11]
void skgpu::graphite::UniformManager::writeHalf |
( |
const SkSize & |
s | ) |
|
|
inline |
◆ writeHalf() [8/11]
void skgpu::graphite::UniformManager::writeHalf |
( |
const SkV2 & |
v | ) |
|
|
inline |
◆ writeHalf() [9/11]
void skgpu::graphite::UniformManager::writeHalf |
( |
const SkV3 & |
v | ) |
|
|
inline |
◆ writeHalf() [10/11]
void skgpu::graphite::UniformManager::writeHalf |
( |
const SkV4 & |
v | ) |
|
|
inline |
◆ writeHalf() [11/11]
void skgpu::graphite::UniformManager::writeHalf |
( |
float |
f | ) |
|
|
inline |
◆ writeHalfArray()
void skgpu::graphite::UniformManager::writeHalfArray |
( |
SkSpan< const SkPMColor4f > |
c | ) |
|
|
inline |
◆ writePaintColor()
void skgpu::graphite::UniformManager::writePaintColor |
( |
const SkPMColor4f & |
color | ) |
|
|
inline |
Definition at line 287 of file UniformManager.h.
287 {
288 if (fWrotePaintColor) {
289
290
292 } else {
293 this->write<SkSLType::kFloat4>(&
color);
294 fWrotePaintColor = true;
295 }
296 }
The documentation for this class was generated from the following files: