Mark the leaf classes of GrOp final.

Change-Id: Ie8acbca972ce8628fc0a2a216a62c34c2a91059a
Reviewed-on: https://skia-review.googlesource.com/5927
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This commit is contained in:
Herb Derby 2016-12-13 15:18:55 -05:00 committed by Skia Commit-Bot
parent 544851b59b
commit 60c05f98aa
23 changed files with 27 additions and 27 deletions

View File

@ -597,7 +597,7 @@ static const uint16_t* circle_type_to_indices(bool stroked) {
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
class CircleBatch : public GrMeshDrawOp { class CircleBatch final : public GrMeshDrawOp {
public: public:
DEFINE_OP_CLASS_ID DEFINE_OP_CLASS_ID
@ -883,7 +883,7 @@ private:
SkPoint center = SkPoint::Make(bounds.centerX(), bounds.centerY()); SkPoint center = SkPoint::Make(bounds.centerX(), bounds.centerY());
SkScalar halfWidth = 0.5f*bounds.width(); SkScalar halfWidth = 0.5f*bounds.width();
SkScalar octOffset = 0.41421356237f; // sqrt(2) - 1 SkScalar octOffset = 0.41421356237f; // sqrt(2) - 1
v0->fPos = center + SkPoint::Make(-octOffset*halfWidth, -halfWidth); v0->fPos = center + SkPoint::Make(-octOffset*halfWidth, -halfWidth);
v0->fColor = color; v0->fColor = color;
v0->fOffset = SkPoint::Make(-octOffset, -1); v0->fOffset = SkPoint::Make(-octOffset, -1);

View File

@ -732,7 +732,7 @@ static sk_sp<GrGeometryProcessor> create_fill_gp(bool tweakAlphaForCoverage,
return MakeForDeviceSpace(color, coverage, localCoords, viewMatrix); return MakeForDeviceSpace(color, coverage, localCoords, viewMatrix);
} }
class AAConvexPathBatch : public GrMeshDrawOp { class AAConvexPathBatch final : public GrMeshDrawOp {
public: public:
DEFINE_OP_CLASS_ID DEFINE_OP_CLASS_ID
AAConvexPathBatch(GrColor color, const SkMatrix& viewMatrix, const SkPath& path) AAConvexPathBatch(GrColor color, const SkMatrix& viewMatrix, const SkPath& path)

View File

@ -118,7 +118,7 @@ bool GrAADistanceFieldPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) c
// padding around path bounds to allow for antialiased pixels // padding around path bounds to allow for antialiased pixels
static const SkScalar kAntiAliasPad = 1.0f; static const SkScalar kAntiAliasPad = 1.0f;
class AADistanceFieldPathBatch : public GrMeshDrawOp { class AADistanceFieldPathBatch final : public GrMeshDrawOp {
public: public:
DEFINE_OP_CLASS_ID DEFINE_OP_CLASS_ID

View File

@ -157,7 +157,7 @@ static void generate_aa_fill_rect_geometry(intptr_t verts,
} }
} }
} }
class AAFillRectBatch : public GrMeshDrawOp { class AAFillRectBatch final : public GrMeshDrawOp {
public: public:
DEFINE_OP_CLASS_ID DEFINE_OP_CLASS_ID

View File

@ -675,7 +675,7 @@ bool check_bounds(const SkMatrix& viewMatrix, const SkRect& devBounds, void* ver
return true; return true;
} }
class AAHairlineBatch : public GrMeshDrawOp { class AAHairlineBatch final : public GrMeshDrawOp {
public: public:
DEFINE_OP_CLASS_ID DEFINE_OP_CLASS_ID

View File

@ -123,7 +123,7 @@ static sk_sp<GrGeometryProcessor> create_fill_gp(bool tweakAlphaForCoverage,
return MakeForDeviceSpace(color, coverage, localCoords, viewMatrix); return MakeForDeviceSpace(color, coverage, localCoords, viewMatrix);
} }
class AAFlatteningConvexPathBatch : public GrMeshDrawOp { class AAFlatteningConvexPathBatch final : public GrMeshDrawOp {
public: public:
DEFINE_OP_CLASS_ID DEFINE_OP_CLASS_ID
@ -377,7 +377,7 @@ DRAW_BATCH_TEST_DEFINE(AAFlatteningConvexPathBatch) {
SkPath path = GrTest::TestPathConvex(random); SkPath path = GrTest::TestPathConvex(random);
SkStrokeRec::Style styles[3] = { SkStrokeRec::kFill_Style, SkStrokeRec::Style styles[3] = { SkStrokeRec::kFill_Style,
SkStrokeRec::kStroke_Style, SkStrokeRec::kStroke_Style,
SkStrokeRec::kStrokeAndFill_Style }; SkStrokeRec::kStrokeAndFill_Style };
SkStrokeRec::Style style = styles[random->nextU() % 3]; SkStrokeRec::Style style = styles[random->nextU() % 3];
@ -396,7 +396,7 @@ DRAW_BATCH_TEST_DEFINE(AAFlatteningConvexPathBatch) {
miterLimit = random->nextRangeF(0.5f, 2.0f); miterLimit = random->nextRangeF(0.5f, 2.0f);
} }
return new AAFlatteningConvexPathBatch(color, viewMatrix, path, strokeWidth, return new AAFlatteningConvexPathBatch(color, viewMatrix, path, strokeWidth,
style, join, miterLimit); style, join, miterLimit);
} }

View File

@ -116,7 +116,7 @@ static sk_sp<GrGeometryProcessor> create_stroke_rect_gp(bool tweakAlphaForCovera
return MakeForDeviceSpace(color, coverage, localCoords, viewMatrix); return MakeForDeviceSpace(color, coverage, localCoords, viewMatrix);
} }
class AAStrokeRectBatch : public GrMeshDrawOp { class AAStrokeRectBatch final : public GrMeshDrawOp {
public: public:
DEFINE_OP_CLASS_ID DEFINE_OP_CLASS_ID

View File

@ -233,7 +233,7 @@ sk_sp<GrGeometryProcessor> RectGeometryProcessor::TestCreate(GrProcessorTestData
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
class AnalyticRectBatch : public GrMeshDrawOp { class AnalyticRectBatch final : public GrMeshDrawOp {
public: public:
DEFINE_OP_CLASS_ID DEFINE_OP_CLASS_ID

View File

@ -13,7 +13,7 @@
#include "text/GrAtlasTextContext.h" #include "text/GrAtlasTextContext.h"
#include "text/GrDistanceFieldAdjustTable.h" #include "text/GrDistanceFieldAdjustTable.h"
class GrAtlasTextBatch : public GrMeshDrawOp { class GrAtlasTextBatch final : public GrMeshDrawOp {
public: public:
DEFINE_OP_CLASS_ID DEFINE_OP_CLASS_ID

View File

@ -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: public:
DEFINE_OP_CLASS_ID DEFINE_OP_CLASS_ID

View File

@ -12,7 +12,7 @@
#include "GrDefaultGeoProcFactory.h" #include "GrDefaultGeoProcFactory.h"
#include "GrMeshDrawOp.h" #include "GrMeshDrawOp.h"
class GrDrawAtlasBatch : public GrMeshDrawOp { class GrDrawAtlasBatch final : public GrMeshDrawOp {
public: public:
DEFINE_OP_CLASS_ID DEFINE_OP_CLASS_ID

View File

@ -18,7 +18,7 @@
class GrOpFlushState; class GrOpFlushState;
struct GrInitInvariantOutput; struct GrInitInvariantOutput;
class GrDrawVerticesBatch : public GrMeshDrawOp { class GrDrawVerticesBatch final : public GrMeshDrawOp {
public: public:
DEFINE_OP_CLASS_ID DEFINE_OP_CLASS_ID

View File

@ -214,7 +214,7 @@ private:
typedef GrGeometryProcessor INHERITED; typedef GrGeometryProcessor INHERITED;
}; };
class MSAAPathBatch : public GrMeshDrawOp { class MSAAPathBatch final : public GrMeshDrawOp {
public: public:
DEFINE_OP_CLASS_ID DEFINE_OP_CLASS_ID

View File

@ -23,7 +23,7 @@ static sk_sp<GrGeometryProcessor> create_gp(bool readsCoverage) {
return GrDefaultGeoProcFactory::Make(color, coverage, localCoords, SkMatrix::I()); return GrDefaultGeoProcFactory::Make(color, coverage, localCoords, SkMatrix::I());
} }
class GrNonAANinePatchBatch : public GrMeshDrawOp { class GrNonAANinePatchBatch final : public GrMeshDrawOp {
public: public:
DEFINE_OP_CLASS_ID DEFINE_OP_CLASS_ID

View File

@ -71,7 +71,7 @@ static void tesselate(intptr_t vertices,
} }
} }
class NonAAFillRectBatch : public GrMeshDrawOp { class NonAAFillRectBatch final : public GrMeshDrawOp {
public: public:
DEFINE_OP_CLASS_ID DEFINE_OP_CLASS_ID

View File

@ -90,7 +90,7 @@ static void tesselate(intptr_t vertices,
} }
// We handle perspective in the local matrix or viewmatrix with special batches // We handle perspective in the local matrix or viewmatrix with special batches
class GrNonAAFillRectPerspectiveBatch : public GrMeshDrawOp { class GrNonAAFillRectPerspectiveBatch final : public GrMeshDrawOp {
public: public:
DEFINE_OP_CLASS_ID DEFINE_OP_CLASS_ID

View File

@ -45,7 +45,7 @@ inline static bool allowed_stroke(const SkStrokeRec& stroke) {
(stroke.getJoin() == SkPaint::kMiter_Join && stroke.getMiter() > SK_ScalarSqrt2); (stroke.getJoin() == SkPaint::kMiter_Join && stroke.getMiter() > SK_ScalarSqrt2);
} }
class NonAAStrokeRectBatch : public GrMeshDrawOp { class NonAAStrokeRectBatch final : public GrMeshDrawOp {
public: public:
DEFINE_OP_CLASS_ID DEFINE_OP_CLASS_ID

View File

@ -763,7 +763,7 @@ bool GrPLSPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const {
path.getFillType() == SkPath::FillType::kWinding_FillType; path.getFillType() == SkPath::FillType::kWinding_FillType;
} }
class PLSPathBatch : public GrMeshDrawOp { class PLSPathBatch final : public GrMeshDrawOp {
public: public:
DEFINE_OP_CLASS_ID DEFINE_OP_CLASS_ID
PLSPathBatch(GrColor color, const SkPath& path, const SkMatrix& viewMatrix) PLSPathBatch(GrColor color, const SkPath& path, const SkMatrix& viewMatrix)

View File

@ -50,7 +50,7 @@ static void tesselate_region(intptr_t vertices,
} }
} }
class RegionBatch : public GrMeshDrawOp { class RegionBatch final : public GrMeshDrawOp {
public: public:
DEFINE_OP_CLASS_ID DEFINE_OP_CLASS_ID

View File

@ -225,7 +225,7 @@ private:
// The inner radius in the vertex data must be specified in normalized space. // The inner radius in the vertex data must be specified in normalized space.
innerRadius = innerRadius / outerRadius; innerRadius = innerRadius / outerRadius;
SkPoint center = SkPoint::Make(bounds.centerX(), bounds.centerY()); SkPoint center = SkPoint::Make(bounds.centerX(), bounds.centerY());
SkScalar halfWidth = 0.5f*bounds.width(); SkScalar halfWidth = 0.5f*bounds.width();
SkScalar octOffset = 0.41421356237f; // sqrt(2) - 1 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 // 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 // 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: public:
DEFINE_OP_CLASS_ID DEFINE_OP_CLASS_ID

View File

@ -156,7 +156,7 @@ bool GrTessellatingPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) cons
return true; return true;
} }
class TessellatingPathBatch : public GrMeshDrawOp { class TessellatingPathBatch final : public GrMeshDrawOp {
public: public:
DEFINE_OP_CLASS_ID DEFINE_OP_CLASS_ID

View File

@ -238,7 +238,7 @@ static sk_sp<GrGeometryProcessor> make_dash_gp(GrColor,
const SkMatrix& localMatrix, const SkMatrix& localMatrix,
bool usesLocalCoords); bool usesLocalCoords);
class DashBatch : public GrMeshDrawOp { class DashBatch final : public GrMeshDrawOp {
public: public:
DEFINE_OP_CLASS_ID DEFINE_OP_CLASS_ID
struct Geometry { struct Geometry {

View File

@ -15,7 +15,7 @@
namespace gr_instanced { namespace gr_instanced {
class GLInstancedRendering::GLBatch : public InstancedRendering::Batch { class GLInstancedRendering::GLBatch final : public InstancedRendering::Batch {
public: public:
DEFINE_OP_CLASS_ID DEFINE_OP_CLASS_ID