#include "src/gpu/ganesh/text/GrAtlasManager.h"
#include "include/core/SkColorType.h"
#include "include/core/SkSize.h"
#include "include/core/SkSpan.h"
#include "include/private/base/SkMalloc.h"
#include "include/private/base/SkTLogic.h"
#include "src/base/SkAutoMalloc.h"
#include "src/core/SkDistanceFieldGen.h"
#include "src/core/SkGlyph.h"
#include "src/core/SkMask.h"
#include "src/core/SkMasks.h"
#include "src/core/SkStrikeSpec.h"
#include "src/gpu/ganesh/GrColor.h"
#include "src/gpu/ganesh/GrDeferredUpload.h"
#include "src/gpu/ganesh/GrMeshDrawTarget.h"
#include "src/text/gpu/Glyph.h"
#include "src/text/gpu/GlyphVector.h"
#include "src/text/gpu/StrikeCache.h"
#include <cstring>
#include <tuple>
Glyph;
MaskFormat;
GrAtlasManager::GrAtlasManager(GrProxyProvider* proxyProvider,
size_t maxTextureBytes,
GrDrawOpAtlas::AllowMultitexturing allowMultitexturing,
bool supportBilerpAtlas)
: … { … }
GrAtlasManager::~GrAtlasManager() = default;
void GrAtlasManager::freeAll() { … }
bool GrAtlasManager::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) { … }
GrDrawOpAtlas::ErrorCode GrAtlasManager::addGlyphToAtlas(const SkGlyph& skGlyph,
Glyph* glyph,
int srcPadding,
GrResourceProvider* resourceProvider,
GrDeferredUploadTarget* uploadTarget) { … }
GrDrawOpAtlas::ErrorCode GrAtlasManager::addToAtlas(GrResourceProvider* resourceProvider,
GrDeferredUploadTarget* target,
MaskFormat format,
int width, int height, const void* image,
skgpu::AtlasLocator* atlasLocator) { … }
void GrAtlasManager::addGlyphToBulkAndSetUseToken(skgpu::BulkUsePlotUpdater* updater,
MaskFormat format, Glyph* glyph,
skgpu::AtlasToken token) { … }
bool GrAtlasManager::initAtlas(MaskFormat format) { … }
namespace sktext::gpu {
std::tuple<bool, int> GlyphVector::regenerateAtlasForGanesh(
int begin, int end, MaskFormat maskFormat, int srcPadding, GrMeshDrawTarget* target) { … }
}