44 auto slug = this->onConvertGlyphRunListToSlug(glyphRunList, layer->paint());
45 this->
drawSlug(slug.get(), layer->paint());
66 auto slug = this->onConvertGlyphRunListToSlug(glyphRunList, layer->paint());
67 if (slug !=
nullptr) {
68 bytes = slug->serialize();
72 if (bytes !=
nullptr) {
74 this->
drawSlug(slug.get(), layer->paint());
107 DiscardableHandleManager::assertHandleValid(
id);
115 DiscardableHandleManager::notifyReadFailure(
data);
123 bool fIsLocked{
false};
130 , fStrikeServer(fServerHandleManager.
get())
131 , fStrikeClient(fClientHandleManager) {}
150 std::vector<uint8_t> glyphBytes;
152 auto analysisCanvas = fStrikeServer.makeAnalysisCanvas(
153 this->topDevice()->
width(),
154 this->topDevice()->
height(),
156 this->topDevice()->imageInfo().refColorSpace(),
163 analysisCanvas->setMatrix(this->getLocalToDevice());
164 auto slug = analysisCanvas->onConvertGlyphRunListToSlug(glyphRunList,
166 if (slug !=
nullptr) {
167 slugBytes = slug->serialize();
169 fStrikeServer.writeStrikeData(&glyphBytes);
172 if (!glyphBytes.empty()) {
173 fStrikeClient.readStrikeData(glyphBytes.data(), glyphBytes.size());
175 if (slugBytes !=
nullptr) {
177 slugBytes->
data(), slugBytes->
size(), &fStrikeClient);
178 this->
drawSlug(slug.get(), layer->paint());
uint32_t SkDiscardableHandleId
sk_sp< T > sk_ref_sp(T *obj)
bool deleteHandle(SkDiscardableHandleId id) override
void notifyReadFailure(const ReadFailureData &data) override
void assertHandleValid(SkDiscardableHandleId id) override
void notifyCacheMiss(SkStrikeClient::CacheMissType type, int fontSize) override
bool lockHandle(SkDiscardableHandleId id) override
SkDiscardableHandleId createHandle() override
bool isHandleDeleted(SkDiscardableHandleId id) override
virtual void onDrawGlyphRunList(const sktext::GlyphRunList &glyphRunList, const SkPaint &paint)
const void * data() const
SkRect sourceBoundsWithOrigin() const
static sk_sp< Slug > Deserialize(const void *data, size_t size, const SkStrikeClient *client=nullptr)
drawSlug(r.slug.get(), r.paint)) DRAW(DrawAtlas
Optional< SkRect > bounds
const myers::Point & get(const myers::Segment &)
std::shared_ptr< const fml::Mapping > data