diff --git a/src/gpu/GrOvalRenderer.cpp b/src/gpu/GrOvalRenderer.cpp index 9adfb0c1e0..0b6ee5ee50 100644 --- a/src/gpu/GrOvalRenderer.cpp +++ b/src/gpu/GrOvalRenderer.cpp @@ -597,7 +597,7 @@ static const uint16_t* circle_type_to_indices(bool stroked) { /////////////////////////////////////////////////////////////////////////////// -class CircleBatch : public GrMeshDrawOp { +class CircleBatch final : public GrMeshDrawOp { public: DEFINE_OP_CLASS_ID @@ -883,7 +883,7 @@ private: SkPoint center = SkPoint::Make(bounds.centerX(), bounds.centerY()); SkScalar halfWidth = 0.5f*bounds.width(); SkScalar octOffset = 0.41421356237f; // sqrt(2) - 1 - + v0->fPos = center + SkPoint::Make(-octOffset*halfWidth, -halfWidth); v0->fColor = color; v0->fOffset = SkPoint::Make(-octOffset, -1); diff --git a/src/gpu/batches/GrAAConvexPathRenderer.cpp b/src/gpu/batches/GrAAConvexPathRenderer.cpp index 69b99fd7d4..66ec342bdb 100644 --- a/src/gpu/batches/GrAAConvexPathRenderer.cpp +++ b/src/gpu/batches/GrAAConvexPathRenderer.cpp @@ -732,7 +732,7 @@ static sk_sp create_fill_gp(bool tweakAlphaForCoverage, return MakeForDeviceSpace(color, coverage, localCoords, viewMatrix); } -class AAConvexPathBatch : public GrMeshDrawOp { +class AAConvexPathBatch final : public GrMeshDrawOp { public: DEFINE_OP_CLASS_ID AAConvexPathBatch(GrColor color, const SkMatrix& viewMatrix, const SkPath& path) diff --git a/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp b/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp index 87dcbb34fe..6d0eeeaac2 100644 --- a/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp +++ b/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp @@ -118,7 +118,7 @@ bool GrAADistanceFieldPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) c // padding around path bounds to allow for antialiased pixels static const SkScalar kAntiAliasPad = 1.0f; -class AADistanceFieldPathBatch : public GrMeshDrawOp { +class AADistanceFieldPathBatch final : public GrMeshDrawOp { public: DEFINE_OP_CLASS_ID diff --git a/src/gpu/batches/GrAAFillRectBatch.cpp b/src/gpu/batches/GrAAFillRectBatch.cpp index 01392d099e..cad896e5e5 100644 --- a/src/gpu/batches/GrAAFillRectBatch.cpp +++ b/src/gpu/batches/GrAAFillRectBatch.cpp @@ -157,7 +157,7 @@ static void generate_aa_fill_rect_geometry(intptr_t verts, } } } -class AAFillRectBatch : public GrMeshDrawOp { +class AAFillRectBatch final : public GrMeshDrawOp { public: DEFINE_OP_CLASS_ID diff --git a/src/gpu/batches/GrAAHairLinePathRenderer.cpp b/src/gpu/batches/GrAAHairLinePathRenderer.cpp index 29231cdc55..76bdf8e01d 100644 --- a/src/gpu/batches/GrAAHairLinePathRenderer.cpp +++ b/src/gpu/batches/GrAAHairLinePathRenderer.cpp @@ -675,7 +675,7 @@ bool check_bounds(const SkMatrix& viewMatrix, const SkRect& devBounds, void* ver return true; } -class AAHairlineBatch : public GrMeshDrawOp { +class AAHairlineBatch final : public GrMeshDrawOp { public: DEFINE_OP_CLASS_ID diff --git a/src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp b/src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp index dc1cd8a273..0fdb3c9c66 100644 --- a/src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp +++ b/src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp @@ -123,7 +123,7 @@ static sk_sp create_fill_gp(bool tweakAlphaForCoverage, return MakeForDeviceSpace(color, coverage, localCoords, viewMatrix); } -class AAFlatteningConvexPathBatch : public GrMeshDrawOp { +class AAFlatteningConvexPathBatch final : public GrMeshDrawOp { public: DEFINE_OP_CLASS_ID @@ -377,7 +377,7 @@ DRAW_BATCH_TEST_DEFINE(AAFlatteningConvexPathBatch) { SkPath path = GrTest::TestPathConvex(random); SkStrokeRec::Style styles[3] = { SkStrokeRec::kFill_Style, - SkStrokeRec::kStroke_Style, + SkStrokeRec::kStroke_Style, SkStrokeRec::kStrokeAndFill_Style }; SkStrokeRec::Style style = styles[random->nextU() % 3]; @@ -396,7 +396,7 @@ DRAW_BATCH_TEST_DEFINE(AAFlatteningConvexPathBatch) { miterLimit = random->nextRangeF(0.5f, 2.0f); } - return new AAFlatteningConvexPathBatch(color, viewMatrix, path, strokeWidth, + return new AAFlatteningConvexPathBatch(color, viewMatrix, path, strokeWidth, style, join, miterLimit); } diff --git a/src/gpu/batches/GrAAStrokeRectBatch.cpp b/src/gpu/batches/GrAAStrokeRectBatch.cpp index 008faa0f44..785cefe897 100644 --- a/src/gpu/batches/GrAAStrokeRectBatch.cpp +++ b/src/gpu/batches/GrAAStrokeRectBatch.cpp @@ -116,7 +116,7 @@ static sk_sp create_stroke_rect_gp(bool tweakAlphaForCovera return MakeForDeviceSpace(color, coverage, localCoords, viewMatrix); } -class AAStrokeRectBatch : public GrMeshDrawOp { +class AAStrokeRectBatch final : public GrMeshDrawOp { public: DEFINE_OP_CLASS_ID diff --git a/src/gpu/batches/GrAnalyticRectBatch.cpp b/src/gpu/batches/GrAnalyticRectBatch.cpp index e87319c4b6..16c1382e8f 100644 --- a/src/gpu/batches/GrAnalyticRectBatch.cpp +++ b/src/gpu/batches/GrAnalyticRectBatch.cpp @@ -233,7 +233,7 @@ sk_sp RectGeometryProcessor::TestCreate(GrProcessorTestData /////////////////////////////////////////////////////////////////////////////// -class AnalyticRectBatch : public GrMeshDrawOp { +class AnalyticRectBatch final : public GrMeshDrawOp { public: DEFINE_OP_CLASS_ID diff --git a/src/gpu/batches/GrAtlasTextBatch.h b/src/gpu/batches/GrAtlasTextBatch.h index 7109ede3e3..313a78e940 100644 --- a/src/gpu/batches/GrAtlasTextBatch.h +++ b/src/gpu/batches/GrAtlasTextBatch.h @@ -13,7 +13,7 @@ #include "text/GrAtlasTextContext.h" #include "text/GrDistanceFieldAdjustTable.h" -class GrAtlasTextBatch : public GrMeshDrawOp { +class GrAtlasTextBatch final : public GrMeshDrawOp { public: DEFINE_OP_CLASS_ID diff --git a/src/gpu/batches/GrDefaultPathRenderer.cpp b/src/gpu/batches/GrDefaultPathRenderer.cpp index d4f34818b8..07eee5460f 100644 --- a/src/gpu/batches/GrDefaultPathRenderer.cpp +++ b/src/gpu/batches/GrDefaultPathRenderer.cpp @@ -94,7 +94,7 @@ static inline void add_quad(SkPoint** vert, const SkPoint* base, const SkPoint p } } -class DefaultPathBatch : public GrMeshDrawOp { +class DefaultPathBatch final : public GrMeshDrawOp { public: DEFINE_OP_CLASS_ID diff --git a/src/gpu/batches/GrDrawAtlasBatch.h b/src/gpu/batches/GrDrawAtlasBatch.h index 602258749b..8601a05396 100644 --- a/src/gpu/batches/GrDrawAtlasBatch.h +++ b/src/gpu/batches/GrDrawAtlasBatch.h @@ -12,7 +12,7 @@ #include "GrDefaultGeoProcFactory.h" #include "GrMeshDrawOp.h" -class GrDrawAtlasBatch : public GrMeshDrawOp { +class GrDrawAtlasBatch final : public GrMeshDrawOp { public: DEFINE_OP_CLASS_ID diff --git a/src/gpu/batches/GrDrawVerticesBatch.h b/src/gpu/batches/GrDrawVerticesBatch.h index 4a38707105..4f1bedea75 100644 --- a/src/gpu/batches/GrDrawVerticesBatch.h +++ b/src/gpu/batches/GrDrawVerticesBatch.h @@ -18,7 +18,7 @@ class GrOpFlushState; struct GrInitInvariantOutput; -class GrDrawVerticesBatch : public GrMeshDrawOp { +class GrDrawVerticesBatch final : public GrMeshDrawOp { public: DEFINE_OP_CLASS_ID diff --git a/src/gpu/batches/GrMSAAPathRenderer.cpp b/src/gpu/batches/GrMSAAPathRenderer.cpp index 84017d63ef..dca7500f43 100644 --- a/src/gpu/batches/GrMSAAPathRenderer.cpp +++ b/src/gpu/batches/GrMSAAPathRenderer.cpp @@ -214,7 +214,7 @@ private: typedef GrGeometryProcessor INHERITED; }; -class MSAAPathBatch : public GrMeshDrawOp { +class MSAAPathBatch final : public GrMeshDrawOp { public: DEFINE_OP_CLASS_ID diff --git a/src/gpu/batches/GrNinePatch.cpp b/src/gpu/batches/GrNinePatch.cpp index 21a4185067..ada74031db 100644 --- a/src/gpu/batches/GrNinePatch.cpp +++ b/src/gpu/batches/GrNinePatch.cpp @@ -23,7 +23,7 @@ static sk_sp create_gp(bool readsCoverage) { return GrDefaultGeoProcFactory::Make(color, coverage, localCoords, SkMatrix::I()); } -class GrNonAANinePatchBatch : public GrMeshDrawOp { +class GrNonAANinePatchBatch final : public GrMeshDrawOp { public: DEFINE_OP_CLASS_ID diff --git a/src/gpu/batches/GrNonAAFillRectBatch.cpp b/src/gpu/batches/GrNonAAFillRectBatch.cpp index abebe627d0..2dbced3b17 100644 --- a/src/gpu/batches/GrNonAAFillRectBatch.cpp +++ b/src/gpu/batches/GrNonAAFillRectBatch.cpp @@ -71,7 +71,7 @@ static void tesselate(intptr_t vertices, } } -class NonAAFillRectBatch : public GrMeshDrawOp { +class NonAAFillRectBatch final : public GrMeshDrawOp { public: DEFINE_OP_CLASS_ID diff --git a/src/gpu/batches/GrNonAAFillRectPerspectiveBatch.cpp b/src/gpu/batches/GrNonAAFillRectPerspectiveBatch.cpp index 9bcab05721..094c5aeb24 100644 --- a/src/gpu/batches/GrNonAAFillRectPerspectiveBatch.cpp +++ b/src/gpu/batches/GrNonAAFillRectPerspectiveBatch.cpp @@ -90,7 +90,7 @@ static void tesselate(intptr_t vertices, } // We handle perspective in the local matrix or viewmatrix with special batches -class GrNonAAFillRectPerspectiveBatch : public GrMeshDrawOp { +class GrNonAAFillRectPerspectiveBatch final : public GrMeshDrawOp { public: DEFINE_OP_CLASS_ID diff --git a/src/gpu/batches/GrNonAAStrokeRectBatch.cpp b/src/gpu/batches/GrNonAAStrokeRectBatch.cpp index f5493c6a72..b706465f72 100644 --- a/src/gpu/batches/GrNonAAStrokeRectBatch.cpp +++ b/src/gpu/batches/GrNonAAStrokeRectBatch.cpp @@ -45,7 +45,7 @@ inline static bool allowed_stroke(const SkStrokeRec& stroke) { (stroke.getJoin() == SkPaint::kMiter_Join && stroke.getMiter() > SK_ScalarSqrt2); } -class NonAAStrokeRectBatch : public GrMeshDrawOp { +class NonAAStrokeRectBatch final : public GrMeshDrawOp { public: DEFINE_OP_CLASS_ID diff --git a/src/gpu/batches/GrPLSPathRenderer.cpp b/src/gpu/batches/GrPLSPathRenderer.cpp index ae6485f1e0..083e111638 100644 --- a/src/gpu/batches/GrPLSPathRenderer.cpp +++ b/src/gpu/batches/GrPLSPathRenderer.cpp @@ -763,7 +763,7 @@ bool GrPLSPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const { path.getFillType() == SkPath::FillType::kWinding_FillType; } -class PLSPathBatch : public GrMeshDrawOp { +class PLSPathBatch final : public GrMeshDrawOp { public: DEFINE_OP_CLASS_ID PLSPathBatch(GrColor color, const SkPath& path, const SkMatrix& viewMatrix) diff --git a/src/gpu/batches/GrRegionBatch.cpp b/src/gpu/batches/GrRegionBatch.cpp index 72be6c8c12..4b5fd38bd4 100644 --- a/src/gpu/batches/GrRegionBatch.cpp +++ b/src/gpu/batches/GrRegionBatch.cpp @@ -50,7 +50,7 @@ static void tesselate_region(intptr_t vertices, } } -class RegionBatch : public GrMeshDrawOp { +class RegionBatch final : public GrMeshDrawOp { public: DEFINE_OP_CLASS_ID diff --git a/src/gpu/batches/GrShadowRRectBatch.cpp b/src/gpu/batches/GrShadowRRectBatch.cpp index b2997879cf..35a3da7fdb 100755 --- a/src/gpu/batches/GrShadowRRectBatch.cpp +++ b/src/gpu/batches/GrShadowRRectBatch.cpp @@ -225,7 +225,7 @@ private: // The inner radius in the vertex data must be specified in normalized space. innerRadius = innerRadius / outerRadius; - + SkPoint center = SkPoint::Make(bounds.centerX(), bounds.centerY()); SkScalar halfWidth = 0.5f*bounds.width(); SkScalar octOffset = 0.41421356237f; // sqrt(2) - 1 @@ -504,7 +504,7 @@ static const uint16_t* rrect_type_to_indices(RRectType type) { // each vertex is also given the normalized x & y distance from the interior rect's edge // the GP takes the min of those depths +1 to get the normalized distance to the outer edge -class ShadowCircularRRectBatch : public GrMeshDrawOp { +class ShadowCircularRRectBatch final : public GrMeshDrawOp { public: DEFINE_OP_CLASS_ID diff --git a/src/gpu/batches/GrTessellatingPathRenderer.cpp b/src/gpu/batches/GrTessellatingPathRenderer.cpp index f2616e414a..6b39276c07 100644 --- a/src/gpu/batches/GrTessellatingPathRenderer.cpp +++ b/src/gpu/batches/GrTessellatingPathRenderer.cpp @@ -156,7 +156,7 @@ bool GrTessellatingPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) cons return true; } -class TessellatingPathBatch : public GrMeshDrawOp { +class TessellatingPathBatch final : public GrMeshDrawOp { public: DEFINE_OP_CLASS_ID diff --git a/src/gpu/effects/GrDashingEffect.cpp b/src/gpu/effects/GrDashingEffect.cpp index 02c0d22915..4f85bf48d3 100644 --- a/src/gpu/effects/GrDashingEffect.cpp +++ b/src/gpu/effects/GrDashingEffect.cpp @@ -238,7 +238,7 @@ static sk_sp make_dash_gp(GrColor, const SkMatrix& localMatrix, bool usesLocalCoords); -class DashBatch : public GrMeshDrawOp { +class DashBatch final : public GrMeshDrawOp { public: DEFINE_OP_CLASS_ID struct Geometry { diff --git a/src/gpu/instanced/GLInstancedRendering.cpp b/src/gpu/instanced/GLInstancedRendering.cpp index d680189dc0..b61b701edd 100644 --- a/src/gpu/instanced/GLInstancedRendering.cpp +++ b/src/gpu/instanced/GLInstancedRendering.cpp @@ -15,7 +15,7 @@ namespace gr_instanced { -class GLInstancedRendering::GLBatch : public InstancedRendering::Batch { +class GLInstancedRendering::GLBatch final : public InstancedRendering::Batch { public: DEFINE_OP_CLASS_ID