28 , fCachedAtlasMgr(fWidth, fHeight, fWidth, fHeight, recorder->
priv().caps())
32 recorder->
priv().caps())
33 , fUncachedAtlasMgr(fWidth, fHeight, fWidth, fHeight, recorder->
priv().caps()) {
38 fCachedAtlasMgr.recordUploads(dc,
fRecorder);
39 fSmallPathAtlasMgr.recordUploads(dc,
fRecorder);
40 fUncachedAtlasMgr.recordUploads(dc,
fRecorder);
49 bool hasKey = shape.
hasKey();
51 constexpr int kMaxSmallPathSize = 162;
54 if (maskSize.x() <= kMaxSmallPathSize && maskSize.y() <= kMaxSmallPathSize) {
55 proxy = fSmallPathAtlasMgr.findOrCreateEntry(
fRecorder,
63 proxy = fCachedAtlasMgr.findOrCreateEntry(
fRecorder,
77 return fUncachedAtlasMgr.addToAtlas(
fRecorder,
88bool RasterPathAtlas::RasterAtlasMgr::onAddToAtlas(
const Shape& shape,
98 SkIPoint renderPos = fDrawAtlas->prepForRender(locator, &
dst);
101 if (!helper.init(fDrawAtlas->plotSize())) {
105 shapeBounds.
offset(renderPos.
x()+kEntryPadding, renderPos.
y()+kEntryPadding);
106 helper.drawShape(shape,
transform, strokeRec, shapeBounds);
void recordUploads(DrawContext *)
const TextureProxy * onAddShape(const Shape &, const Transform &transform, const SkStrokeRec &, skvx::half2 maskSize, skvx::half2 *outPos) override
RasterPathAtlas(Recorder *recorder)
FlPixelBufferTexturePrivate * priv
static float max(float r, float g, float b)
static constexpr uint32_t kSmallPathPlotWidth
static constexpr uint32_t kDefaultAtlasDim
static constexpr uint32_t kSmallPathPlotHeight
static SkColor4f transform(SkColor4f c, SkColorSpace *src, SkColorSpace *dst)
constexpr int32_t y() const
constexpr int32_t x() const
void offset(int32_t dx, int32_t dy)