Update {virtual,override} to follow C++11 style in src/utils.
The Google style guide states that only one of {virtual,override,final} should be used for each declaration, since override implies virtual and final implies both virtual and override. The entries were found using the following command line: $ find src/utils -iname "*.h" -o -iname "*.cpp" | xargs pcregrep -M "[^\n/]+virtual\ [^;{]+\ [a-zA-Z0-9_]+\([^;{]+\ override[ \n]*[;{]" The regex was a courtesy of nick@chromium.org BUG=None R=mtklein@google.com Review URL: https://codereview.chromium.org/1099333004
This commit is contained in:
parent
130444fdaf
commit
283b5878e7
@ -175,57 +175,57 @@ protected:
|
||||
// deferred device
|
||||
void drawPaint(const SkDraw&, const SkPaint& paint) override
|
||||
{SkASSERT(0);}
|
||||
virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode,
|
||||
size_t count, const SkPoint[],
|
||||
const SkPaint& paint) override
|
||||
void drawPoints(const SkDraw&, SkCanvas::PointMode mode,
|
||||
size_t count, const SkPoint[],
|
||||
const SkPaint& paint) override
|
||||
{SkASSERT(0);}
|
||||
virtual void drawRect(const SkDraw&, const SkRect& r,
|
||||
const SkPaint& paint) override
|
||||
void drawRect(const SkDraw&, const SkRect& r,
|
||||
const SkPaint& paint) override
|
||||
{SkASSERT(0);}
|
||||
void drawOval(const SkDraw&, const SkRect&, const SkPaint&) override
|
||||
{SkASSERT(0);}
|
||||
virtual void drawRRect(const SkDraw&, const SkRRect& rr,
|
||||
const SkPaint& paint) override
|
||||
void drawRRect(const SkDraw&, const SkRRect& rr,
|
||||
const SkPaint& paint) override
|
||||
{SkASSERT(0);}
|
||||
virtual void drawPath(const SkDraw&, const SkPath& path,
|
||||
const SkPaint& paint,
|
||||
const SkMatrix* prePathMatrix = NULL,
|
||||
bool pathIsMutable = false) override
|
||||
void drawPath(const SkDraw&, const SkPath& path,
|
||||
const SkPaint& paint,
|
||||
const SkMatrix* prePathMatrix = NULL,
|
||||
bool pathIsMutable = false) override
|
||||
{SkASSERT(0);}
|
||||
virtual void drawBitmap(const SkDraw&, const SkBitmap& bitmap,
|
||||
const SkMatrix& matrix, const SkPaint& paint) override
|
||||
void drawBitmap(const SkDraw&, const SkBitmap& bitmap,
|
||||
const SkMatrix& matrix, const SkPaint& paint) override
|
||||
{SkASSERT(0);}
|
||||
virtual void drawBitmapRect(const SkDraw&, const SkBitmap&, const SkRect*,
|
||||
const SkRect&, const SkPaint&,
|
||||
SkCanvas::DrawBitmapRectFlags) override
|
||||
void drawBitmapRect(const SkDraw&, const SkBitmap&, const SkRect*,
|
||||
const SkRect&, const SkPaint&,
|
||||
SkCanvas::DrawBitmapRectFlags) override
|
||||
{SkASSERT(0);}
|
||||
virtual void drawSprite(const SkDraw&, const SkBitmap& bitmap,
|
||||
int x, int y, const SkPaint& paint) override
|
||||
void drawSprite(const SkDraw&, const SkBitmap& bitmap,
|
||||
int x, int y, const SkPaint& paint) override
|
||||
{SkASSERT(0);}
|
||||
virtual void drawText(const SkDraw&, const void* text, size_t len,
|
||||
SkScalar x, SkScalar y, const SkPaint& paint) override
|
||||
void drawText(const SkDraw&, const void* text, size_t len,
|
||||
SkScalar x, SkScalar y, const SkPaint& paint) override
|
||||
{SkASSERT(0);}
|
||||
virtual void drawPosText(const SkDraw&, const void* text, size_t len,
|
||||
const SkScalar pos[], int scalarsPerPos,
|
||||
const SkPoint& offset, const SkPaint& paint) override
|
||||
void drawPosText(const SkDraw&, const void* text, size_t len,
|
||||
const SkScalar pos[], int scalarsPerPos,
|
||||
const SkPoint& offset, const SkPaint& paint) override
|
||||
{SkASSERT(0);}
|
||||
virtual void drawTextOnPath(const SkDraw&, const void* text,
|
||||
size_t len, const SkPath& path,
|
||||
const SkMatrix* matrix,
|
||||
const SkPaint& paint) override
|
||||
void drawTextOnPath(const SkDraw&, const void* text,
|
||||
size_t len, const SkPath& path,
|
||||
const SkMatrix* matrix,
|
||||
const SkPaint& paint) override
|
||||
{SkASSERT(0);}
|
||||
virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode,
|
||||
int vertexCount, const SkPoint verts[],
|
||||
const SkPoint texs[], const SkColor colors[],
|
||||
SkXfermode* xmode, const uint16_t indices[],
|
||||
int indexCount, const SkPaint& paint) override
|
||||
void drawVertices(const SkDraw&, SkCanvas::VertexMode,
|
||||
int vertexCount, const SkPoint verts[],
|
||||
const SkPoint texs[], const SkColor colors[],
|
||||
SkXfermode* xmode, const uint16_t indices[],
|
||||
int indexCount, const SkPaint& paint) override
|
||||
{SkASSERT(0);}
|
||||
virtual void drawPatch(const SkDraw&, const SkPoint cubics[12], const SkColor colors[4],
|
||||
const SkPoint texCoords[4], SkXfermode* xmode,
|
||||
const SkPaint& paint) override
|
||||
void drawPatch(const SkDraw&, const SkPoint cubics[12], const SkColor colors[4],
|
||||
const SkPoint texCoords[4], SkXfermode* xmode,
|
||||
const SkPaint& paint) override
|
||||
{SkASSERT(0);}
|
||||
virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y,
|
||||
const SkPaint&) override
|
||||
void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y,
|
||||
const SkPaint&) override
|
||||
{SkASSERT(0);}
|
||||
|
||||
void lockPixels() override {}
|
||||
@ -234,8 +234,8 @@ protected:
|
||||
bool canHandleImageFilter(const SkImageFilter*) override {
|
||||
return false;
|
||||
}
|
||||
virtual bool filterImage(const SkImageFilter*, const SkBitmap&,
|
||||
const SkImageFilter::Context&, SkBitmap*, SkIPoint*) override {
|
||||
bool filterImage(const SkImageFilter*, const SkBitmap&,
|
||||
const SkImageFilter::Context&, SkBitmap*, SkIPoint*) override {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include "SkLazyPtr.h"
|
||||
|
||||
class SkDefaultEventTracer : public SkEventTracer {
|
||||
virtual SkEventTracer::Handle
|
||||
SkEventTracer::Handle
|
||||
addTraceEvent(char phase,
|
||||
const uint8_t* categoryEnabledFlag,
|
||||
const char* name,
|
||||
@ -21,20 +21,20 @@ class SkDefaultEventTracer : public SkEventTracer {
|
||||
const uint64_t* argValues,
|
||||
uint8_t flags) override { return 0; }
|
||||
|
||||
virtual void
|
||||
void
|
||||
updateTraceEventDuration(const uint8_t* categoryEnabledFlag,
|
||||
const char* name,
|
||||
SkEventTracer::Handle handle) override {};
|
||||
SkEventTracer::Handle handle) override {}
|
||||
|
||||
const uint8_t* getCategoryGroupEnabled(const char* name) override {
|
||||
static uint8_t no = 0;
|
||||
return &no;
|
||||
};
|
||||
virtual const char* getCategoryGroupName(
|
||||
}
|
||||
const char* getCategoryGroupName(
|
||||
const uint8_t* categoryEnabledFlag) override {
|
||||
static const char* dummy = "dummy";
|
||||
return dummy;
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
// We prefer gUserTracer if it's been set, otherwise we fall back on gDefaultTracer.
|
||||
|
@ -244,9 +244,9 @@ class CanvasVisitor : public SkTextBox::Visitor {
|
||||
SkCanvas* fCanvas;
|
||||
public:
|
||||
CanvasVisitor(SkCanvas* canvas) : fCanvas(canvas) {}
|
||||
|
||||
virtual void operator()(const char text[], size_t length, SkScalar x, SkScalar y,
|
||||
const SkPaint& paint) override {
|
||||
|
||||
void operator()(const char text[], size_t length, SkScalar x, SkScalar y,
|
||||
const SkPaint& paint) override {
|
||||
fCanvas->drawText(text, length, x, y, paint);
|
||||
}
|
||||
};
|
||||
@ -282,9 +282,9 @@ SkScalar SkTextBox::getTextHeight() const {
|
||||
class TextBlobVisitor : public SkTextBox::Visitor {
|
||||
public:
|
||||
SkTextBlobBuilder fBuilder;
|
||||
|
||||
virtual void operator()(const char text[], size_t length, SkScalar x, SkScalar y,
|
||||
const SkPaint& paint) override {
|
||||
|
||||
void operator()(const char text[], size_t length, SkScalar x, SkScalar y,
|
||||
const SkPaint& paint) override {
|
||||
SkPaint p(paint);
|
||||
p.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
|
||||
const int count = paint.countText(text, length);
|
||||
|
@ -91,12 +91,12 @@ public:
|
||||
// path does end up here, then this needs to be investigated.
|
||||
SkFAIL("Not implemented!");
|
||||
}
|
||||
|
||||
|
||||
// Blit a horizontal run of antialiased pixels; runs[] is a *sparse*
|
||||
// zero-terminated run-length encoding of spans of constant alpha values.
|
||||
virtual void blitAntiH(int x, int y,
|
||||
const SkAlpha antialias[],
|
||||
const int16_t runs[]) override {
|
||||
void blitAntiH(int x, int y,
|
||||
const SkAlpha antialias[],
|
||||
const int16_t runs[]) override {
|
||||
SkASSERT(0 == x);
|
||||
|
||||
// Make sure that the new row to blit is either the first
|
||||
@ -278,8 +278,8 @@ public:
|
||||
// Blit a rectangle with one alpha-blended column on the left,
|
||||
// width (zero or more) opaque pixels, and one alpha-blended column
|
||||
// on the right. The result will always be at least two pixels wide.
|
||||
virtual void blitAntiRect(int x, int y, int width, int height,
|
||||
SkAlpha leftAlpha, SkAlpha rightAlpha) override {
|
||||
void blitAntiRect(int x, int y, int width, int height,
|
||||
SkAlpha leftAlpha, SkAlpha rightAlpha) override {
|
||||
// This function is currently not implemented. It is not explicitly
|
||||
// required by the contract, but if at some time a code path runs into
|
||||
// this function (which is entirely possible), it needs to be implemented.
|
||||
|
@ -53,7 +53,7 @@ public:
|
||||
|
||||
Factory getFactory() const override { return NULL; }
|
||||
#ifndef SK_IGNORE_TO_STRING
|
||||
virtual void toString(SkString* str) const override { str->set("OverdrawXfermode"); }
|
||||
void toString(SkString* str) const override { str->set("OverdrawXfermode"); }
|
||||
#endif
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user