Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(284)

Unified Diff: src/gpu/batches/GrMSAAPathRenderer.cpp

Issue 2041113004: sk_sp for gpu. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Make it run. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/gpu/batches/GrMSAAPathRenderer.cpp
diff --git a/src/gpu/batches/GrMSAAPathRenderer.cpp b/src/gpu/batches/GrMSAAPathRenderer.cpp
index 45971f568dc1d5e51d8cb8c0e72e613f31a97928..28bcd2ee61ce7b9cb0a384456ff363e53cfc8f40 100644
--- a/src/gpu/batches/GrMSAAPathRenderer.cpp
+++ b/src/gpu/batches/GrMSAAPathRenderer.cpp
@@ -392,13 +392,13 @@ private:
SkASSERT(quadVertexOffset <= fMaxQuadVertices && quadIndexOffset <= fMaxQuadIndices);
if (lineVertexOffset) {
- SkAutoTUnref<const GrGeometryProcessor> lineGP;
+ sk_sp<GrGeometryProcessor> lineGP;
{
using namespace GrDefaultGeoProcFactory;
- lineGP.reset(GrDefaultGeoProcFactory::Create(Color(Color::kAttribute_Type),
- Coverage(255),
- LocalCoords(LocalCoords::kUnused_Type),
- fViewMatrix));
+ lineGP = GrDefaultGeoProcFactory::Make(Color(Color::kAttribute_Type),
+ Coverage(255),
+ LocalCoords(LocalCoords::kUnused_Type),
+ fViewMatrix);
}
SkASSERT(lineVertexStride == lineGP->getVertexStride());
@@ -411,7 +411,7 @@ private:
lineMeshes.init(primitiveType, lineVertexBuffer, firstLineVertex,
lineVertexOffset);
}
- target->draw(lineGP, lineMeshes);
+ target->draw(lineGP.get(), lineMeshes);
}
if (quadVertexOffset) {
@@ -749,7 +749,7 @@ void GrMSAAPathRenderer::onStencilPath(const StencilPathArgs& args) {
SkASSERT(SkPath::kInverseWinding_FillType != args.fPath->getFillType());
GrPaint paint;
- SkSafeUnref(paint.setXPFactory(GrDisableColorXPFactory::Create()));
+ paint.setXPFactory(GrDisableColorXPFactory::Create());
paint.setAntiAlias(args.fIsAA);
this->internalDrawPath(args.fDrawContext,

Powered by Google App Engine
This is Rietveld 408576698