31 auto quadData = [&]() {
37 instances.reserve(
count);
41 for (
auto [glyph, leftTop]: quadData()) {
42 auto[al, at, ar,
ab] = glyph->fAtlasLocator.getUVs();
43 instances.append(1) <<
AtlasPt{uint16_t(ar-al), uint16_t(
ab-at)}
44 <<
AtlasPt{uint16_t(al & 0x1fff), at}
45 << leftTop << uint16_t(al >> 13) <<
flags
47 << depth << ssboIndex;
60 const SkM44& positionMatrix = localToDevice.
matrix();
61 const bool compatibleMatrix = positionMatrix.
rc(0,0) == fCreationMatrix.
rc(0, 0) &&
62 positionMatrix.
rc(0,1) == fCreationMatrix.
rc(0, 1) &&
63 positionMatrix.
rc(1,0) == fCreationMatrix.
rc(1, 0) &&
64 positionMatrix.
rc(1,1) == fCreationMatrix.
rc(1, 1) &&
68 if (compatibleMatrix) {
69 const SkV4 mappedOrigin = positionMatrix.
map(drawOrigin.
x(), drawOrigin.
y(), 0.f, 1.f);
75 return {
Rect(fCreationBounds),
85 const SkMatrix viewDifference = this->viewDifference(
#define SkScalarRoundToInt(x)
static bool SkScalarIsInt(SkScalar x)
constexpr auto SkMakeZip(Ts &&... ts)
SkV4 map(float x, float y, float z, float w) const
SkScalar rc(int r, int c) const
static SkM44 Translate(SkScalar x, SkScalar y, SkScalar z=0)
SkScalar getTranslateY() const
SkScalar rc(int r, int c) const
bool hasPerspective() const
SkScalar getTranslateX() const
std::tuple< skgpu::graphite::Rect, skgpu::graphite::Transform > boundsAndDeviceMatrix(const skgpu::graphite::Transform &localToDevice, SkPoint drawOrigin) const
void fillInstanceData(skgpu::graphite::DrawWriter *dw, int offset, int count, unsigned short flags, skvx::ushort2 ssboIndex, SkSpan< const Glyph * > glyphs, SkScalar depth) const
FlutterSemanticsFlag flags
const CatchEntryMove ab[]
skgpu::graphite::Rect Rect
skgpu::graphite::Transform Transform
constexpr float y() const
constexpr float x() const