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

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

Issue 2041113004: sk_sp for gpu. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Reserve correctly. 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
« no previous file with comments | « src/gpu/batches/GrAADistanceFieldPathRenderer.cpp ('k') | src/gpu/batches/GrAAHairLinePathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrAAFillRectBatch.cpp
diff --git a/src/gpu/batches/GrAAFillRectBatch.cpp b/src/gpu/batches/GrAAFillRectBatch.cpp
index 2c90b8bcf2e06558dbb8d68ecc3d721363a1cc00..94cef02a1a7f7156102ca8a029db2e10513dbaf0 100644
--- a/src/gpu/batches/GrAAFillRectBatch.cpp
+++ b/src/gpu/batches/GrAAFillRectBatch.cpp
@@ -44,7 +44,7 @@ const GrBuffer* get_index_buffer(GrResourceProvider* resourceProvider) {
gAAFillRectIndexBufferKey);
}
-static const GrGeometryProcessor* create_fill_rect_gp(
+static sk_sp<GrGeometryProcessor> create_fill_rect_gp(
const SkMatrix& viewMatrix,
const GrXPOverridesForBatch& overrides,
GrDefaultGeoProcFactory::LocalCoords::Type localCoordsType) {
@@ -65,11 +65,11 @@ static const GrGeometryProcessor* create_fill_rect_gp(
// We assume the caller has inverted the viewmatrix
if (LocalCoords::kHasExplicit_Type == localCoordsType) {
LocalCoords localCoords(localCoordsType);
- return GrDefaultGeoProcFactory::Create(color, coverage, localCoords, SkMatrix::I());
+ return GrDefaultGeoProcFactory::Make(color, coverage, localCoords, SkMatrix::I());
} else {
LocalCoords localCoords(overrides.readsLocalCoords() ? localCoordsType :
LocalCoords::kUnused_Type);
- return CreateForDeviceSpace(color, coverage, localCoords, viewMatrix);
+ return MakeForDeviceSpace(color, coverage, localCoords, viewMatrix);
}
}
@@ -239,9 +239,9 @@ public:
return !overrides.readsLocalCoords() || mine.fViewMatrix.cheapEqualTo(theirs.fViewMatrix);
}
- static const GrGeometryProcessor* CreateGP(const Geometry& geo,
+ static sk_sp<GrGeometryProcessor> MakeGP(const Geometry& geo,
const GrXPOverridesForBatch& overrides) {
- const GrGeometryProcessor* gp =
+ sk_sp<GrGeometryProcessor> gp =
create_fill_rect_gp(geo.fViewMatrix, overrides,
GrDefaultGeoProcFactory::LocalCoords::kUsePosition_Type);
@@ -286,9 +286,9 @@ public:
return true;
}
- static const GrGeometryProcessor* CreateGP(const Geometry& geo,
+ static sk_sp<GrGeometryProcessor> MakeGP(const Geometry& geo,
const GrXPOverridesForBatch& overrides) {
- const GrGeometryProcessor* gp =
+ sk_sp<GrGeometryProcessor> gp =
create_fill_rect_gp(geo.fViewMatrix, overrides,
GrDefaultGeoProcFactory::LocalCoords::kHasExplicit_Type);
« no previous file with comments | « src/gpu/batches/GrAADistanceFieldPathRenderer.cpp ('k') | src/gpu/batches/GrAAHairLinePathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698