#include "src/gpu/graphite/text/TextAtlasManager.h"
#include "include/core/SkColorSpace.h"
#include "include/gpu/graphite/Recorder.h"
#include "src/base/SkAutoMalloc.h"
#include "src/core/SkDistanceFieldGen.h"
#include "src/core/SkMasks.h"
#include "src/gpu/graphite/AtlasProvider.h"
#include "src/gpu/graphite/DrawAtlas.h"
#include "src/gpu/graphite/RecorderPriv.h"
#include "src/gpu/graphite/TextureProxy.h"
#include "src/sksl/SkSLUtil.h"
#include "src/text/gpu/Glyph.h"
#include "src/text/gpu/GlyphVector.h"
#include "src/text/gpu/StrikeCache.h"
Glyph;
namespace skgpu::graphite {
TextAtlasManager::TextAtlasManager(Recorder* recorder)
: … { … }
TextAtlasManager::~TextAtlasManager() = default;
void TextAtlasManager::freeAll() { … }
bool TextAtlasManager::hasGlyph(MaskFormat format, Glyph* glyph) { … }
template <typename INT_TYPE>
static void expand_bits(INT_TYPE* dst,
const uint8_t* src,
int width,
int height,
int dstRowBytes,
int srcRowBytes) { … }
static void get_packed_glyph_image(
const SkGlyph& glyph, int dstRB, MaskFormat expectedMaskFormat, void* dst) { … }
MaskFormat TextAtlasManager::resolveMaskFormat(MaskFormat format) const { … }
DrawAtlas::ErrorCode TextAtlasManager::addGlyphToAtlas(const SkGlyph& skGlyph,
Glyph* glyph,
int srcPadding) { … }
bool TextAtlasManager::recordUploads(DrawContext* dc) { … }
void TextAtlasManager::addGlyphToBulkAndSetUseToken(BulkUsePlotUpdater* updater,
MaskFormat format,
Glyph* glyph,
AtlasToken token) { … }
void TextAtlasManager::setAtlasDimensionsToMinimum_ForTesting() { … }
bool TextAtlasManager::initAtlas(MaskFormat format) { … }
void TextAtlasManager::compact() { … }
void TextAtlasManager::purge() { … }
}
namespace sktext::gpu {
DrawAtlas;
std::tuple<bool, int> GlyphVector::regenerateAtlasForGraphite(int begin,
int end,
skgpu::MaskFormat maskFormat,
int srcPadding,
skgpu::graphite::Recorder* recorder) { … }
}