consolidate processing for sub runs multiple formats
Change-Id: Ief27a4a8051485bed20e1a5312457e778cb28171 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/482007 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Herb Derby <herb@google.com>
This commit is contained in:
parent
e4f148f09f
commit
3317b1b23e
@ -461,7 +461,6 @@ public:
|
|||||||
|
|
||||||
static GrSubRunOwner Make(const SkZip<SkGlyphVariant, SkPoint>& drawables,
|
static GrSubRunOwner Make(const SkZip<SkGlyphVariant, SkPoint>& drawables,
|
||||||
sk_sp<SkStrike>&& strike,
|
sk_sp<SkStrike>&& strike,
|
||||||
SkScalar,
|
|
||||||
GrMaskFormat format,
|
GrMaskFormat format,
|
||||||
GrTextBlob* blob,
|
GrTextBlob* blob,
|
||||||
GrSubRunAllocator* alloc);
|
GrSubRunAllocator* alloc);
|
||||||
@ -529,7 +528,6 @@ DirectMaskSubRun::DirectMaskSubRun(GrMaskFormat format,
|
|||||||
|
|
||||||
GrSubRunOwner DirectMaskSubRun::Make(const SkZip<SkGlyphVariant, SkPoint>& drawables,
|
GrSubRunOwner DirectMaskSubRun::Make(const SkZip<SkGlyphVariant, SkPoint>& drawables,
|
||||||
sk_sp<SkStrike>&& strike,
|
sk_sp<SkStrike>&& strike,
|
||||||
SkScalar,
|
|
||||||
GrMaskFormat format,
|
GrMaskFormat format,
|
||||||
GrTextBlob* blob,
|
GrTextBlob* blob,
|
||||||
GrSubRunAllocator* alloc) {
|
GrSubRunAllocator* alloc) {
|
||||||
@ -1382,6 +1380,33 @@ SkRect SDFTSubRun::deviceRect(const SkMatrix& drawMatrix, SkPoint drawOrigin) co
|
|||||||
GrAtlasSubRun* SDFTSubRun::testingOnly_atlasSubRun() {
|
GrAtlasSubRun* SDFTSubRun::testingOnly_atlasSubRun() {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<typename AddSingleMaskFormat>
|
||||||
|
void add_multi_mask_format(
|
||||||
|
AddSingleMaskFormat addSingleMaskFormat,
|
||||||
|
const SkZip<SkGlyphVariant, SkPoint>& drawables,
|
||||||
|
sk_sp<SkStrike>&& strike) {
|
||||||
|
if (drawables.empty()) { return; }
|
||||||
|
|
||||||
|
auto glyphSpan = drawables.get<0>();
|
||||||
|
SkGlyph* glyph = glyphSpan[0];
|
||||||
|
GrMaskFormat format = GrGlyph::FormatFromSkGlyph(glyph->maskFormat());
|
||||||
|
size_t startIndex = 0;
|
||||||
|
for (size_t i = 1; i < drawables.size(); i++) {
|
||||||
|
glyph = glyphSpan[i];
|
||||||
|
GrMaskFormat nextFormat = GrGlyph::FormatFromSkGlyph(glyph->maskFormat());
|
||||||
|
if (format != nextFormat) {
|
||||||
|
auto glyphsWithSameFormat = drawables.subspan(startIndex, i - startIndex);
|
||||||
|
// Take a ref on the strike. This should rarely happen.
|
||||||
|
addSingleMaskFormat(glyphsWithSameFormat, format, sk_sp<SkStrike>(strike));
|
||||||
|
format = nextFormat;
|
||||||
|
startIndex = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
auto glyphsWithSameFormat = drawables.last(drawables.size() - startIndex);
|
||||||
|
addSingleMaskFormat(glyphsWithSameFormat, format, std::move(strike));
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
// -- GrTextBlob::Key ------------------------------------------------------------------------------
|
// -- GrTextBlob::Key ------------------------------------------------------------------------------
|
||||||
@ -1601,45 +1626,6 @@ bool GrTextBlob::canReuse(const SkPaint& paint, const SkMatrix& positionMatrix)
|
|||||||
const GrTextBlob::Key& GrTextBlob::key() const { return fKey; }
|
const GrTextBlob::Key& GrTextBlob::key() const { return fKey; }
|
||||||
size_t GrTextBlob::size() const { return fSize; }
|
size_t GrTextBlob::size() const { return fSize; }
|
||||||
|
|
||||||
template<typename AddSingleMaskFormat>
|
|
||||||
void GrTextBlob::addMultiMaskFormat(
|
|
||||||
AddSingleMaskFormat addSingle,
|
|
||||||
const SkZip<SkGlyphVariant, SkPoint>& drawables,
|
|
||||||
sk_sp<SkStrike>&& strike,
|
|
||||||
SkScalar strikeToSourceScale) {
|
|
||||||
if (drawables.empty()) { return; }
|
|
||||||
|
|
||||||
auto addSameFormat = [&](const SkZip<SkGlyphVariant, SkPoint>& drawable,
|
|
||||||
GrMaskFormat format,
|
|
||||||
sk_sp<SkStrike>&& runStrike) {
|
|
||||||
GrSubRunOwner subRun = addSingle(
|
|
||||||
drawable, std::move(runStrike), strikeToSourceScale, format, this, &fAlloc);
|
|
||||||
if (subRun != nullptr) {
|
|
||||||
fSubRunList.append(std::move(subRun));
|
|
||||||
} else {
|
|
||||||
fSomeGlyphsExcluded = true;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
auto glyphSpan = drawables.get<0>();
|
|
||||||
SkGlyph* glyph = glyphSpan[0];
|
|
||||||
GrMaskFormat format = GrGlyph::FormatFromSkGlyph(glyph->maskFormat());
|
|
||||||
size_t startIndex = 0;
|
|
||||||
for (size_t i = 1; i < drawables.size(); i++) {
|
|
||||||
glyph = glyphSpan[i];
|
|
||||||
GrMaskFormat nextFormat = GrGlyph::FormatFromSkGlyph(glyph->maskFormat());
|
|
||||||
if (format != nextFormat) {
|
|
||||||
auto sameFormat = drawables.subspan(startIndex, i - startIndex);
|
|
||||||
// Take a ref on the strike. This should rarely happen.
|
|
||||||
addSameFormat(sameFormat, format, sk_sp<SkStrike>(strike));
|
|
||||||
format = nextFormat;
|
|
||||||
startIndex = i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
auto sameFormat = drawables.last(drawables.size() - startIndex);
|
|
||||||
addSameFormat(sameFormat, format, std::move(strike));
|
|
||||||
}
|
|
||||||
|
|
||||||
GrTextBlob::GrTextBlob(int allocSize,
|
GrTextBlob::GrTextBlob(int allocSize,
|
||||||
const SkMatrix& positionMatrix,
|
const SkMatrix& positionMatrix,
|
||||||
SkColor initialLuminance)
|
SkColor initialLuminance)
|
||||||
@ -1648,10 +1634,21 @@ GrTextBlob::GrTextBlob(int allocSize,
|
|||||||
, fInitialPositionMatrix{positionMatrix}
|
, fInitialPositionMatrix{positionMatrix}
|
||||||
, fInitialLuminance{initialLuminance} { }
|
, fInitialLuminance{initialLuminance} { }
|
||||||
|
|
||||||
void GrTextBlob::processDeviceMasks(const SkZip<SkGlyphVariant, SkPoint>& drawables,
|
void GrTextBlob::processDeviceMasks(
|
||||||
sk_sp<SkStrike>&& strike) {
|
const SkZip<SkGlyphVariant, SkPoint>& drawables, sk_sp<SkStrike>&& strike) {
|
||||||
SkASSERT(strike != nullptr);
|
SkASSERT(strike != nullptr);
|
||||||
this->addMultiMaskFormat(DirectMaskSubRun::Make, drawables, std::move(strike), 1);
|
auto addGlyphsWithSameFormat = [&] (const SkZip<SkGlyphVariant, SkPoint>& drawable,
|
||||||
|
GrMaskFormat format,
|
||||||
|
sk_sp<SkStrike>&& runStrike) {
|
||||||
|
GrSubRunOwner subRun = DirectMaskSubRun::Make(
|
||||||
|
drawable, std::move(runStrike), format, this, &fAlloc);
|
||||||
|
if (subRun != nullptr) {
|
||||||
|
fSubRunList.append(std::move(subRun));
|
||||||
|
} else {
|
||||||
|
fSomeGlyphsExcluded = true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
add_multi_mask_format(addGlyphsWithSameFormat, drawables, std::move(strike));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GrTextBlob::processSourcePaths(const SkZip<SkGlyphVariant, SkPoint>& drawables,
|
void GrTextBlob::processSourcePaths(const SkZip<SkGlyphVariant, SkPoint>& drawables,
|
||||||
@ -1679,8 +1676,18 @@ void GrTextBlob::processSourceSDFT(const SkZip<SkGlyphVariant, SkPoint>& drawabl
|
|||||||
void GrTextBlob::processSourceMasks(const SkZip<SkGlyphVariant, SkPoint>& drawables,
|
void GrTextBlob::processSourceMasks(const SkZip<SkGlyphVariant, SkPoint>& drawables,
|
||||||
sk_sp<SkStrike>&& strike,
|
sk_sp<SkStrike>&& strike,
|
||||||
SkScalar strikeToSourceScale) {
|
SkScalar strikeToSourceScale) {
|
||||||
this->addMultiMaskFormat(
|
auto addGlyphsWithSameFormat = [&] (const SkZip<SkGlyphVariant, SkPoint>& drawable,
|
||||||
TransformedMaskSubRun::Make, drawables, std::move(strike), strikeToSourceScale);
|
GrMaskFormat format,
|
||||||
|
sk_sp<SkStrike>&& runStrike) {
|
||||||
|
GrSubRunOwner subRun = TransformedMaskSubRun::Make(
|
||||||
|
drawable, std::move(runStrike), strikeToSourceScale, format, this, &fAlloc);
|
||||||
|
if (subRun != nullptr) {
|
||||||
|
fSubRunList.append(std::move(subRun));
|
||||||
|
} else {
|
||||||
|
fSomeGlyphsExcluded = true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
add_multi_mask_format(addGlyphsWithSameFormat, drawables, std::move(strike));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------- Begin no cache implementation -------------------------------------
|
// ----------------------------- Begin no cache implementation -------------------------------------
|
||||||
@ -2379,56 +2386,25 @@ GrSubRunNoCachePainter::GrSubRunNoCachePainter(skgpu::v1::SurfaceDrawContext* sd
|
|||||||
|
|
||||||
void GrSubRunNoCachePainter::processDeviceMasks(
|
void GrSubRunNoCachePainter::processDeviceMasks(
|
||||||
const SkZip<SkGlyphVariant, SkPoint>& drawables, sk_sp<SkStrike>&& strike) {
|
const SkZip<SkGlyphVariant, SkPoint>& drawables, sk_sp<SkStrike>&& strike) {
|
||||||
if (drawables.empty()) { return; }
|
auto addGlyphsWithSameFormat = [&] (const SkZip<SkGlyphVariant, SkPoint>& drawable,
|
||||||
|
GrMaskFormat format,
|
||||||
|
sk_sp<SkStrike>&& runStrike) {
|
||||||
|
this->draw(DirectMaskSubRunNoCache::Make(drawable, std::move(runStrike), format, fAlloc));
|
||||||
|
};
|
||||||
|
|
||||||
auto glyphSpan = drawables.get<0>();
|
add_multi_mask_format(addGlyphsWithSameFormat, drawables, std::move(strike));
|
||||||
SkGlyph* glyph = glyphSpan[0];
|
|
||||||
GrMaskFormat format = GrGlyph::FormatFromSkGlyph(glyph->maskFormat());
|
|
||||||
size_t startIndex = 0;
|
|
||||||
for (size_t i = 1; i < drawables.size(); i++) {
|
|
||||||
glyph = glyphSpan[i];
|
|
||||||
GrMaskFormat nextFormat = GrGlyph::FormatFromSkGlyph(glyph->maskFormat());
|
|
||||||
if (format != nextFormat) {
|
|
||||||
auto sameFormat = drawables.subspan(startIndex, i - startIndex);
|
|
||||||
// Take an extra ref on the strike. This should rarely happen.
|
|
||||||
this->draw(
|
|
||||||
DirectMaskSubRunNoCache::Make(sameFormat, sk_sp<SkStrike>(strike), format, fAlloc));
|
|
||||||
format = nextFormat;
|
|
||||||
startIndex = i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
auto sameFormat = drawables.last(drawables.size() - startIndex);
|
|
||||||
this->draw(DirectMaskSubRunNoCache::Make(sameFormat, std::move(strike), format, fAlloc));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GrSubRunNoCachePainter::processSourceMasks(const SkZip<SkGlyphVariant, SkPoint>& drawables,
|
void GrSubRunNoCachePainter::processSourceMasks(const SkZip<SkGlyphVariant, SkPoint>& drawables,
|
||||||
sk_sp<SkStrike>&& strike,
|
sk_sp<SkStrike>&& strike,
|
||||||
SkScalar strikeToSourceScale) {
|
SkScalar strikeToSourceScale) {
|
||||||
if (drawables.empty()) {
|
auto addGlyphsWithSameFormat = [&] (const SkZip<SkGlyphVariant, SkPoint>& drawable,
|
||||||
return;
|
GrMaskFormat format,
|
||||||
}
|
sk_sp<SkStrike>&& runStrike) {
|
||||||
|
this->draw(TransformedMaskSubRunNoCache::Make(
|
||||||
auto glyphSpan = drawables.get<0>();
|
drawable, std::move(runStrike), strikeToSourceScale, format, fAlloc));
|
||||||
SkGlyph* glyph = glyphSpan[0];
|
};
|
||||||
GrMaskFormat format = GrGlyph::FormatFromSkGlyph(glyph->maskFormat());
|
add_multi_mask_format(addGlyphsWithSameFormat, drawables, std::move(strike));
|
||||||
size_t startIndex = 0;
|
|
||||||
for (size_t i = 1; i < drawables.size(); i++) {
|
|
||||||
glyph = glyphSpan[i];
|
|
||||||
GrMaskFormat nextFormat = GrGlyph::FormatFromSkGlyph(glyph->maskFormat());
|
|
||||||
if (format != nextFormat) {
|
|
||||||
auto sameFormat = drawables.subspan(startIndex, i - startIndex);
|
|
||||||
this->draw(
|
|
||||||
// Add an extra ref to the strike. This should rarely happen.
|
|
||||||
TransformedMaskSubRunNoCache::Make(
|
|
||||||
sameFormat, sk_sp<SkStrike>(strike), strikeToSourceScale, format, fAlloc));
|
|
||||||
format = nextFormat;
|
|
||||||
startIndex = i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
auto sameFormat = drawables.last(drawables.size() - startIndex);
|
|
||||||
this->draw(
|
|
||||||
TransformedMaskSubRunNoCache::Make(
|
|
||||||
sameFormat, std::move(strike), strikeToSourceScale, format, fAlloc));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GrSubRunNoCachePainter::processSourcePaths(const SkZip<SkGlyphVariant, SkPoint>& drawables,
|
void GrSubRunNoCachePainter::processSourcePaths(const SkZip<SkGlyphVariant, SkPoint>& drawables,
|
||||||
@ -2600,13 +2576,6 @@ public:
|
|||||||
void* operator new(size_t, void* p) { return p; }
|
void* operator new(size_t, void* p) { return p; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
template<typename AddSingleMaskFormat>
|
|
||||||
void addMultiMaskFormat(
|
|
||||||
AddSingleMaskFormat addSingle,
|
|
||||||
const SkZip<SkGlyphVariant, SkPoint>& drawables,
|
|
||||||
sk_sp<SkStrike>&& strike,
|
|
||||||
SkScalar strikeToSourceScale);
|
|
||||||
|
|
||||||
const SkRect fSourceBounds;
|
const SkRect fSourceBounds;
|
||||||
const SkPaint fPaint;
|
const SkPaint fPaint;
|
||||||
const SkMatrix fInitialPositionMatrix;
|
const SkMatrix fInitialPositionMatrix;
|
||||||
@ -2626,43 +2595,6 @@ Slug::Slug(SkRect sourceBounds,
|
|||||||
, fOrigin{origin}
|
, fOrigin{origin}
|
||||||
, fAlloc {SkTAddOffset<char>(this, sizeof(Slug)), allocSize, allocSize/2} { }
|
, fAlloc {SkTAddOffset<char>(this, sizeof(Slug)), allocSize, allocSize/2} { }
|
||||||
|
|
||||||
template<typename AddSingleMaskFormat>
|
|
||||||
void Slug::addMultiMaskFormat(
|
|
||||||
AddSingleMaskFormat addSingle,
|
|
||||||
const SkZip<SkGlyphVariant, SkPoint>& drawables,
|
|
||||||
sk_sp<SkStrike>&& strike,
|
|
||||||
SkScalar strikeToSourceScale) {
|
|
||||||
if (drawables.empty()) { return; }
|
|
||||||
|
|
||||||
auto addSameFormat = [&](const SkZip<SkGlyphVariant, SkPoint>& drawable,
|
|
||||||
GrMaskFormat format,
|
|
||||||
sk_sp<SkStrike>&& runStrike) {
|
|
||||||
SlugSubRunOwner subRun = addSingle(
|
|
||||||
this, drawable, std::move(runStrike), strikeToSourceScale, format, &fAlloc);
|
|
||||||
if (subRun != nullptr) {
|
|
||||||
fSubRuns.append(std::move(subRun));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
auto glyphSpan = drawables.get<0>();
|
|
||||||
SkGlyph* glyph = glyphSpan[0];
|
|
||||||
GrMaskFormat format = GrGlyph::FormatFromSkGlyph(glyph->maskFormat());
|
|
||||||
size_t startIndex = 0;
|
|
||||||
for (size_t i = 1; i < drawables.size(); i++) {
|
|
||||||
glyph = glyphSpan[i];
|
|
||||||
GrMaskFormat nextFormat = GrGlyph::FormatFromSkGlyph(glyph->maskFormat());
|
|
||||||
if (format != nextFormat) {
|
|
||||||
auto sameFormat = drawables.subspan(startIndex, i - startIndex);
|
|
||||||
// Take a ref on the strike. This should rarely happen.
|
|
||||||
addSameFormat(sameFormat, format, sk_sp<SkStrike>(strike));
|
|
||||||
format = nextFormat;
|
|
||||||
startIndex = i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
auto sameFormat = drawables.last(drawables.size() - startIndex);
|
|
||||||
addSameFormat(sameFormat, format, std::move(strike));
|
|
||||||
}
|
|
||||||
|
|
||||||
void Slug::surfaceDraw(const GrClip* clip, const SkMatrixProvider& viewMatrix,
|
void Slug::surfaceDraw(const GrClip* clip, const SkMatrixProvider& viewMatrix,
|
||||||
skgpu::v1::SurfaceDrawContext* sdc) {
|
skgpu::v1::SurfaceDrawContext* sdc) {
|
||||||
for (const SlugSubRun& subRun : fSubRuns) {
|
for (const SlugSubRun& subRun : fSubRuns) {
|
||||||
@ -2684,7 +2616,6 @@ public:
|
|||||||
static SlugSubRunOwner Make(Slug* slug,
|
static SlugSubRunOwner Make(Slug* slug,
|
||||||
const SkZip<SkGlyphVariant, SkPoint>& drawables,
|
const SkZip<SkGlyphVariant, SkPoint>& drawables,
|
||||||
sk_sp<SkStrike>&& strike,
|
sk_sp<SkStrike>&& strike,
|
||||||
SkScalar strikeToSourceScale,
|
|
||||||
GrMaskFormat format,
|
GrMaskFormat format,
|
||||||
GrSubRunAllocator* alloc);
|
GrSubRunAllocator* alloc);
|
||||||
|
|
||||||
@ -2754,7 +2685,6 @@ DirectMaskSubRunSlug::DirectMaskSubRunSlug(Slug* slug,
|
|||||||
SlugSubRunOwner DirectMaskSubRunSlug::Make(Slug* slug,
|
SlugSubRunOwner DirectMaskSubRunSlug::Make(Slug* slug,
|
||||||
const SkZip<SkGlyphVariant, SkPoint>& drawables,
|
const SkZip<SkGlyphVariant, SkPoint>& drawables,
|
||||||
sk_sp<SkStrike>&& strike,
|
sk_sp<SkStrike>&& strike,
|
||||||
SkScalar strikeToSourceScale,
|
|
||||||
GrMaskFormat format,
|
GrMaskFormat format,
|
||||||
GrSubRunAllocator* alloc) {
|
GrSubRunAllocator* alloc) {
|
||||||
DevicePosition* glyphLeftTop = alloc->makePODArray<DevicePosition>(drawables.size());
|
DevicePosition* glyphLeftTop = alloc->makePODArray<DevicePosition>(drawables.size());
|
||||||
@ -3047,7 +2977,17 @@ DirectMaskSubRunSlug::deviceRectAndCheckTransform(const SkMatrix& positionMatrix
|
|||||||
|
|
||||||
void Slug::processDeviceMasks(
|
void Slug::processDeviceMasks(
|
||||||
const SkZip<SkGlyphVariant, SkPoint>& drawables, sk_sp<SkStrike>&& strike) {
|
const SkZip<SkGlyphVariant, SkPoint>& drawables, sk_sp<SkStrike>&& strike) {
|
||||||
this->addMultiMaskFormat(DirectMaskSubRunSlug::Make, drawables, std::move(strike), 1);
|
auto addGlyphsWithSameFormat = [&] (const SkZip<SkGlyphVariant, SkPoint>& drawable,
|
||||||
|
GrMaskFormat format,
|
||||||
|
sk_sp<SkStrike>&& runStrike) {
|
||||||
|
SlugSubRunOwner subRun = DirectMaskSubRunSlug::Make(
|
||||||
|
this, drawable, std::move(runStrike), format, &fAlloc);
|
||||||
|
if (subRun != nullptr) {
|
||||||
|
fSubRuns.append(std::move(subRun));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
add_multi_mask_format(addGlyphsWithSameFormat, drawables, std::move(strike));
|
||||||
}
|
}
|
||||||
|
|
||||||
sk_sp<Slug> Slug::Make(const SkMatrixProvider& viewMatrix,
|
sk_sp<Slug> Slug::Make(const SkMatrixProvider& viewMatrix,
|
||||||
@ -3691,8 +3631,18 @@ SkRect TransformedMaskSubRunSlug::deviceRect(const SkMatrix& drawMatrix, SkPoint
|
|||||||
void Slug::processSourceMasks(const SkZip<SkGlyphVariant, SkPoint>& drawables,
|
void Slug::processSourceMasks(const SkZip<SkGlyphVariant, SkPoint>& drawables,
|
||||||
sk_sp<SkStrike>&& strike,
|
sk_sp<SkStrike>&& strike,
|
||||||
SkScalar strikeToSourceScale) {
|
SkScalar strikeToSourceScale) {
|
||||||
this->addMultiMaskFormat(
|
|
||||||
TransformedMaskSubRunSlug::Make, drawables, std::move(strike), strikeToSourceScale);
|
auto addGlyphsWithSameFormat = [&] (const SkZip<SkGlyphVariant, SkPoint>& drawable,
|
||||||
|
GrMaskFormat format,
|
||||||
|
sk_sp<SkStrike>&& runStrike) {
|
||||||
|
SlugSubRunOwner subRun = TransformedMaskSubRunSlug::Make(
|
||||||
|
this, drawable, std::move(runStrike), strikeToSourceScale, format, &fAlloc);
|
||||||
|
if (subRun != nullptr) {
|
||||||
|
fSubRuns.append(std::move(subRun));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
add_multi_mask_format(addGlyphsWithSameFormat, drawables, std::move(strike));
|
||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
@ -250,13 +250,6 @@ public:
|
|||||||
private:
|
private:
|
||||||
GrTextBlob(int allocSize, const SkMatrix& positionMatrix, SkColor initialLuminance);
|
GrTextBlob(int allocSize, const SkMatrix& positionMatrix, SkColor initialLuminance);
|
||||||
|
|
||||||
template<typename AddSingleMaskFormat>
|
|
||||||
void addMultiMaskFormat(
|
|
||||||
AddSingleMaskFormat addSingle,
|
|
||||||
const SkZip<SkGlyphVariant, SkPoint>& drawables,
|
|
||||||
sk_sp<SkStrike>&& strike,
|
|
||||||
SkScalar strikeToSourceScale);
|
|
||||||
|
|
||||||
// Methods to satisfy SkGlyphRunPainterInterface
|
// Methods to satisfy SkGlyphRunPainterInterface
|
||||||
void processDeviceMasks(const SkZip<SkGlyphVariant, SkPoint>& drawables,
|
void processDeviceMasks(const SkZip<SkGlyphVariant, SkPoint>& drawables,
|
||||||
sk_sp<SkStrike>&& strike) override;
|
sk_sp<SkStrike>&& strike) override;
|
||||||
|
Loading…
Reference in New Issue
Block a user