#include "src/gpu/graphite/PathAtlas.h"
#include "include/gpu/graphite/Recorder.h"
#include "src/gpu/graphite/Caps.h"
#include "src/gpu/graphite/RasterPathUtils.h"
#include "src/gpu/graphite/RecorderPriv.h"
#include "src/gpu/graphite/RendererProvider.h"
#include "src/gpu/graphite/TextureProxy.h"
#include "src/gpu/graphite/geom/Transform_graphite.h"
namespace skgpu::graphite {
namespace {
constexpr int kMinAtlasTextureSize = …;
}
PathAtlas::PathAtlas(Recorder* recorder, uint32_t requestedWidth, uint32_t requestedHeight)
: … { … }
PathAtlas::~PathAtlas() = default;
std::pair<const Renderer*, std::optional<PathAtlas::MaskAndOrigin>> PathAtlas::addShape(
const Rect& transformedShapeBounds,
const Shape& shape,
const Transform& localToDevice,
const SkStrokeRec& style) { … }
PathAtlas::DrawAtlasMgr::DrawAtlasMgr(size_t width, size_t height,
size_t plotWidth, size_t plotHeight,
DrawAtlas::UseStorageTextures useStorageTextures,
std::string_view label,
const Caps* caps) { … }
namespace {
uint32_t shape_key_list_index(const PlotLocator& locator, const DrawAtlas* drawAtlas) { … }
}
const TextureProxy* PathAtlas::DrawAtlasMgr::findOrCreateEntry(Recorder* recorder,
const Shape& shape,
const Transform& transform,
const SkStrokeRec& strokeRec,
skvx::half2 maskSize,
skvx::half2* outPos) { … }
const TextureProxy* PathAtlas::DrawAtlasMgr::addToAtlas(Recorder* recorder,
const Shape& shape,
const Transform& transform,
const SkStrokeRec& strokeRec,
skvx::half2 maskSize,
skvx::half2* outPos,
AtlasLocator* locator) { … }
bool PathAtlas::DrawAtlasMgr::recordUploads(DrawContext* dc, Recorder* recorder) { … }
void PathAtlas::DrawAtlasMgr::evict(PlotLocator plotLocator) { … }
void PathAtlas::DrawAtlasMgr::evictAll() { … }
void PathAtlas::DrawAtlasMgr::compact(Recorder* recorder) { … }
void PathAtlas::DrawAtlasMgr::purge(Recorder* recorder) { … }
}