Index: src/gpu/batches/GrAtlasTextBatch.cpp |
diff --git a/src/gpu/batches/GrAtlasTextBatch.cpp b/src/gpu/batches/GrAtlasTextBatch.cpp |
index 32a64c3b1743c97d3347d12d205afd67fc5377a9..3c4b4a5135b118a64c27be450174bea084eced67 100644 |
--- a/src/gpu/batches/GrAtlasTextBatch.cpp |
+++ b/src/gpu/batches/GrAtlasTextBatch.cpp |
@@ -100,17 +100,16 @@ void GrAtlasTextBatch::onPrepareDraws(Target* target) const { |
FlushInfo flushInfo; |
if (this->usesDistanceFields()) { |
- flushInfo.fGeometryProcessor.reset( |
- this->setupDfProcessor(this->viewMatrix(), fFilteredColor, this->color(), texture)); |
+ flushInfo.fGeometryProcessor = |
+ this->setupDfProcessor(this->viewMatrix(), fFilteredColor, this->color(), texture); |
} else { |
GrTextureParams params(SkShader::kClamp_TileMode, GrTextureParams::kNone_FilterMode); |
- flushInfo.fGeometryProcessor.reset( |
- GrBitmapTextGeoProc::Create(this->color(), |
- texture, |
- params, |
- maskFormat, |
- localMatrix, |
- this->usesLocalCoords())); |
+ flushInfo.fGeometryProcessor = GrBitmapTextGeoProc::Make(this->color(), |
+ texture, |
+ params, |
+ maskFormat, |
+ localMatrix, |
+ this->usesLocalCoords()); |
} |
flushInfo.fGlyphsToFlush = 0; |
@@ -178,7 +177,7 @@ void GrAtlasTextBatch::flush(GrVertexBatch::Target* target, FlushInfo* flushInfo |
flushInfo->fIndexBuffer, flushInfo->fVertexOffset, |
kVerticesPerGlyph, kIndicesPerGlyph, flushInfo->fGlyphsToFlush, |
maxGlyphsPerDraw); |
- target->draw(flushInfo->fGeometryProcessor, mesh); |
+ target->draw(flushInfo->fGeometryProcessor.get(), mesh); |
flushInfo->fVertexOffset += kVerticesPerGlyph * flushInfo->fGlyphsToFlush; |
flushInfo->fGlyphsToFlush = 0; |
} |
@@ -246,9 +245,10 @@ bool GrAtlasTextBatch::onCombineIfPossible(GrBatch* t, const GrCaps& caps) { |
// TODO just use class params |
// TODO trying to figure out why lcd is so whack |
-GrGeometryProcessor* GrAtlasTextBatch::setupDfProcessor(const SkMatrix& viewMatrix, |
- SkColor filteredColor, |
- GrColor color, GrTexture* texture) const { |
+sk_sp<GrGeometryProcessor> GrAtlasTextBatch::setupDfProcessor(const SkMatrix& viewMatrix, |
+ SkColor filteredColor, |
+ GrColor color, |
+ GrTexture* texture) const { |
GrTextureParams params(SkShader::kClamp_TileMode, GrTextureParams::kBilerp_FilterMode); |
bool isLCD = this->isLCD(); |
// set up any flags |
@@ -277,32 +277,32 @@ GrGeometryProcessor* GrAtlasTextBatch::setupDfProcessor(const SkMatrix& viewMatr |
greenCorrection, |
blueCorrection); |
- return GrDistanceFieldLCDTextGeoProc::Create(color, |
- viewMatrix, |
- texture, |
- params, |
- widthAdjust, |
- flags, |
- this->usesLocalCoords()); |
+ return GrDistanceFieldLCDTextGeoProc::Make(color, |
+ viewMatrix, |
+ texture, |
+ params, |
+ widthAdjust, |
+ flags, |
+ this->usesLocalCoords()); |
} else { |
#ifdef SK_GAMMA_APPLY_TO_A8 |
U8CPU lum = SkColorSpaceLuminance::computeLuminance(SK_GAMMA_EXPONENT, filteredColor); |
float correction = fDistanceAdjustTable->getAdjustment( |
lum >> kDistanceAdjustLumShift, fUseGammaCorrectDistanceTable); |
- return GrDistanceFieldA8TextGeoProc::Create(color, |
- viewMatrix, |
- texture, |
- params, |
- correction, |
- flags, |
- this->usesLocalCoords()); |
+ return GrDistanceFieldA8TextGeoProc::Make(color, |
+ viewMatrix, |
+ texture, |
+ params, |
+ correction, |
+ flags, |
+ this->usesLocalCoords()); |
#else |
- return GrDistanceFieldA8TextGeoProc::Create(color, |
- viewMatrix, |
- texture, |
- params, |
- flags, |
- this->usesLocalCoords()); |
+ return GrDistanceFieldA8TextGeoProc::Make(color, |
+ viewMatrix, |
+ texture, |
+ params, |
+ flags, |
+ this->usesLocalCoords()); |
#endif |
} |