Remove bilerp flag from GrTextBlob's API
Change-Id: Ie1330ee4f9ae2eeedb0dfb378b753dcfd9293107 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531322 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Herb Derby <herb@google.com>
This commit is contained in:
parent
a370ecf9fc
commit
07f53c1bb6
@ -52,7 +52,7 @@ class DirectMaskGlyphVertexFillBenchmark : public Benchmark {
|
||||
const SkPoint drawOrigin = glyphRunList.origin();
|
||||
drawMatrix.preTranslate(drawOrigin.x(), drawOrigin.y());
|
||||
GrSDFTControl control{false, props.isUseDeviceIndependentFonts(), 256, 256};
|
||||
fBlob = GrTextBlob::Make(glyphRunList, paint, drawMatrix, false, control, &painter);
|
||||
fBlob = GrTextBlob::Make(glyphRunList, paint, drawMatrix, control, &painter);
|
||||
|
||||
const GrAtlasSubRun* subRun = fBlob->testingOnlyFirstSubRun();
|
||||
SkASSERT(subRun);
|
||||
|
@ -509,7 +509,7 @@ GrOp::Owner AtlasTextOp::CreateOpTestingOnly(SurfaceDrawContext* sdc,
|
||||
|
||||
SkGlyphRunListPainter* painter = sdc->glyphRunPainter();
|
||||
sk_sp<GrTextBlob> blob = GrTextBlob::Make(
|
||||
glyphRunList, skPaint, drawMatrix, false, control, painter);
|
||||
glyphRunList, skPaint, drawMatrix, control, painter);
|
||||
|
||||
const GrAtlasSubRun* subRun = blob->testingOnlyFirstSubRun();
|
||||
if (!subRun) {
|
||||
|
@ -2061,7 +2061,6 @@ GrTextBlob::~GrTextBlob() = default;
|
||||
sk_sp<GrTextBlob> GrTextBlob::Make(const SkGlyphRunList& glyphRunList,
|
||||
const SkPaint& paint,
|
||||
const SkMatrix& positionMatrix,
|
||||
bool supportBilerpAtlas,
|
||||
const GrSDFTControl& control,
|
||||
SkGlyphRunListPainter* painter) {
|
||||
// The difference in alignment from the per-glyph data to the SubRun;
|
||||
@ -2084,7 +2083,7 @@ sk_sp<GrTextBlob> GrTextBlob::Make(const SkGlyphRunList& glyphRunList,
|
||||
SkColor initialLuminance = SkPaintPriv::ComputeLuminanceColor(paint);
|
||||
sk_sp<GrTextBlob> blob{
|
||||
new (allocation) GrTextBlob(
|
||||
bytesNeededForSubRun, supportBilerpAtlas, positionMatrix, initialLuminance)};
|
||||
bytesNeededForSubRun, positionMatrix, initialLuminance)};
|
||||
|
||||
const uint64_t uniqueID = glyphRunList.uniqueID();
|
||||
for (auto& glyphRun : glyphRunList) {
|
||||
@ -2156,12 +2155,11 @@ const GrAtlasSubRun* GrTextBlob::testingOnlyFirstSubRun() const {
|
||||
}
|
||||
|
||||
GrTextBlob::GrTextBlob(int allocSize,
|
||||
bool supportBilerpAtlas,
|
||||
const SkMatrix& positionMatrix,
|
||||
SkColor initialLuminance)
|
||||
: fAlloc{SkTAddOffset<char>(this, sizeof(GrTextBlob)), allocSize, allocSize/2}
|
||||
, fSize{allocSize}
|
||||
, fSupportBilerpAtlas{supportBilerpAtlas}
|
||||
, fSupportBilerpAtlas{false}
|
||||
, fInitialPositionMatrix{positionMatrix}
|
||||
, fInitialLuminance{initialLuminance} { }
|
||||
|
||||
|
@ -219,7 +219,6 @@ public:
|
||||
static sk_sp<GrTextBlob> Make(const SkGlyphRunList& glyphRunList,
|
||||
const SkPaint& paint,
|
||||
const SkMatrix& positionMatrix,
|
||||
bool supportBilerpAtlas,
|
||||
const GrSDFTControl& control,
|
||||
SkGlyphRunListPainter* painter);
|
||||
|
||||
@ -253,7 +252,6 @@ public:
|
||||
|
||||
private:
|
||||
GrTextBlob(int allocSize,
|
||||
bool supportBilerpAtlas,
|
||||
const SkMatrix& positionMatrix,
|
||||
SkColor initialLuminance);
|
||||
|
||||
|
@ -53,10 +53,8 @@ void GrTextBlobRedrawCoordinator::drawGlyphRunList(SkCanvas* canvas,
|
||||
this->remove(blob.get());
|
||||
}
|
||||
|
||||
const bool padAtlas =
|
||||
sdc->recordingContext()->priv().options().fSupportBilerpFromGlyphAtlas;
|
||||
blob = GrTextBlob::Make(
|
||||
glyphRunList, paint, positionMatrix, padAtlas, control, sdc->glyphRunPainter());
|
||||
glyphRunList, paint, positionMatrix, control, sdc->glyphRunPainter());
|
||||
|
||||
if (canCache) {
|
||||
blob->addKey(key);
|
||||
|
Loading…
Reference in New Issue
Block a user