aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar tfarina <tfarina@chromium.org>2015-04-25 12:59:44 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-04-25 12:59:45 -0700
commit283b5878e7225a49511cbd3f0fa12603a51319df (patch)
tree17a6f1c2cab7f84f34a53f3c6b4f72cf812d16a4 /src
parent130444fdaf737c5931a934018ab50b0c91a3499e (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/utils/SkDeferredCanvas.cpp78
-rw-r--r--src/utils/SkEventTracer.cpp12
-rw-r--r--src/utils/SkTextBox.cpp12
-rw-r--r--src/utils/SkTextureCompressor_Blitter.h12
-rw-r--r--src/utils/debugger/SkDebugCanvas.cpp2
5 files changed, 58 insertions, 58 deletions
diff --git a/src/utils/SkDeferredCanvas.cpp b/src/utils/SkDeferredCanvas.cpp
index d2488231d5..d5cf97bd04 100644
--- a/src/utils/SkDeferredCanvas.cpp
+++ b/src/utils/SkDeferredCanvas.cpp
@@ -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;
}
diff --git a/src/utils/SkEventTracer.cpp b/src/utils/SkEventTracer.cpp
index b114c21c8f..d9f925852e 100644
--- a/src/utils/SkEventTracer.cpp
+++ b/src/utils/SkEventTracer.cpp
@@ -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.
diff --git a/src/utils/SkTextBox.cpp b/src/utils/SkTextBox.cpp
index 05b3b49e45..af05cadfc6 100644
--- a/src/utils/SkTextBox.cpp
+++ b/src/utils/SkTextBox.cpp
@@ -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);
diff --git a/src/utils/SkTextureCompressor_Blitter.h b/src/utils/SkTextureCompressor_Blitter.h
index 613b3d96bd..73d8ee4ffb 100644
--- a/src/utils/SkTextureCompressor_Blitter.h
+++ b/src/utils/SkTextureCompressor_Blitter.h
@@ -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.
diff --git a/src/utils/debugger/SkDebugCanvas.cpp b/src/utils/debugger/SkDebugCanvas.cpp
index 1b50efaa32..21272d7d24 100644
--- a/src/utils/debugger/SkDebugCanvas.cpp
+++ b/src/utils/debugger/SkDebugCanvas.cpp
@@ -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
};