aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/text/GrAtlasTextBlob.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/text/GrAtlasTextBlob.cpp')
-rw-r--r--src/gpu/text/GrAtlasTextBlob.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/gpu/text/GrAtlasTextBlob.cpp b/src/gpu/text/GrAtlasTextBlob.cpp
index 90bcf5a224..35e783019f 100644
--- a/src/gpu/text/GrAtlasTextBlob.cpp
+++ b/src/gpu/text/GrAtlasTextBlob.cpp
@@ -250,8 +250,8 @@ inline std::unique_ptr<GrAtlasTextOp> GrAtlasTextBlob::makeOp(
const Run::SubRunInfo& info, int glyphCount, uint16_t run, uint16_t subRun,
const SkMatrix& viewMatrix, SkScalar x, SkScalar y, const SkIRect& clipRect,
const GrTextUtils::Paint& paint, const SkSurfaceProps& props,
- const GrDistanceFieldAdjustTable* distanceAdjustTable, GrAtlasGlyphCache* cache,
- GrTextUtils::Target* target) {
+ const GrDistanceFieldAdjustTable* distanceAdjustTable,
+ GrRestrictedAtlasManager* restrictedAtlasManager, GrTextUtils::Target* target) {
GrMaskFormat format = info.maskFormat();
GrPaint grPaint;
@@ -260,11 +260,12 @@ inline std::unique_ptr<GrAtlasTextOp> GrAtlasTextBlob::makeOp(
if (info.drawAsDistanceFields()) {
bool useBGR = SkPixelGeometryIsBGR(props.pixelGeometry());
op = GrAtlasTextOp::MakeDistanceField(
- std::move(grPaint), glyphCount, cache, distanceAdjustTable,
+ std::move(grPaint), glyphCount, restrictedAtlasManager, distanceAdjustTable,
target->colorSpaceInfo().isGammaCorrect(), paint.luminanceColor(),
info.hasUseLCDText(), useBGR, info.isAntiAliased());
} else {
- op = GrAtlasTextOp::MakeBitmap(std::move(grPaint), format, glyphCount, cache);
+ op = GrAtlasTextOp::MakeBitmap(std::move(grPaint), format,
+ glyphCount, restrictedAtlasManager);
}
GrAtlasTextOp::Geometry& geometry = op->geometry();
geometry.fViewMatrix = viewMatrix;
@@ -300,8 +301,8 @@ static void calculate_translation(bool applyVM,
}
}
-void GrAtlasTextBlob::flush(GrAtlasGlyphCache* atlasGlyphCache, GrTextUtils::Target* target,
- const SkSurfaceProps& props,
+void GrAtlasTextBlob::flush(GrRestrictedAtlasManager* restrictedAtlasManager,
+ GrTextUtils::Target* target, const SkSurfaceProps& props,
const GrDistanceFieldAdjustTable* distanceAdjustTable,
const GrTextUtils::Paint& paint, const GrClip& clip,
const SkMatrix& viewMatrix, const SkIRect& clipBounds,
@@ -376,7 +377,7 @@ void GrAtlasTextBlob::flush(GrAtlasGlyphCache* atlasGlyphCache, GrTextUtils::Tar
if (submitOp) {
auto op = this->makeOp(info, glyphCount, runIndex, subRun, viewMatrix, x, y,
clipRect, std::move(paint), props, distanceAdjustTable,
- atlasGlyphCache, target);
+ restrictedAtlasManager, target);
if (op) {
if (skipClip) {
target->addDrawOp(GrNoClip(), std::move(op));
@@ -394,12 +395,12 @@ void GrAtlasTextBlob::flush(GrAtlasGlyphCache* atlasGlyphCache, GrTextUtils::Tar
std::unique_ptr<GrDrawOp> GrAtlasTextBlob::test_makeOp(
int glyphCount, uint16_t run, uint16_t subRun, const SkMatrix& viewMatrix,
SkScalar x, SkScalar y, const GrTextUtils::Paint& paint, const SkSurfaceProps& props,
- const GrDistanceFieldAdjustTable* distanceAdjustTable, GrAtlasGlyphCache* cache,
- GrTextUtils::Target* target) {
+ const GrDistanceFieldAdjustTable* distanceAdjustTable,
+ GrRestrictedAtlasManager* restrictedAtlasManager, GrTextUtils::Target* target) {
const GrAtlasTextBlob::Run::SubRunInfo& info = fRuns[run].fSubRunInfo[subRun];
SkIRect emptyRect = SkIRect::MakeEmpty();
return this->makeOp(info, glyphCount, run, subRun, viewMatrix, x, y, emptyRect, paint, props,
- distanceAdjustTable, cache, target);
+ distanceAdjustTable, restrictedAtlasManager, target);
}
void GrAtlasTextBlob::AssertEqual(const GrAtlasTextBlob& l, const GrAtlasTextBlob& r) {