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

Unified Diff: bench/RectBench.cpp

Issue 1368673004: use override to make the new xcode happier (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/RectBench.cpp
diff --git a/bench/RectBench.cpp b/bench/RectBench.cpp
index 23fb7c50c26c5af12435ca4f28e216f1c739e231..ae8cb7ab7d6da3207604057f2fb49ade9651b175 100644
--- a/bench/RectBench.cpp
+++ b/bench/RectBench.cpp
@@ -46,9 +46,9 @@ protected:
c->drawRect(r, p);
}
- virtual const char* onGetName() { return computeName("rects"); }
+ const char* onGetName() override { return computeName("rects"); }
- virtual void onPreDraw() {
+ void onPreDraw() override {
SkRandom rand;
const SkScalar offset = SK_Scalar1/3;
for (int i = 0; i < N; i++) {
@@ -67,7 +67,7 @@ protected:
}
}
- virtual void onDraw(const int loops, SkCanvas* canvas) {
+ void onDraw(const int loops, SkCanvas* canvas) override {
SkPaint paint;
if (fStroke > 0) {
paint.setStyle(SkPaint::kStroke_Style);
@@ -142,20 +142,20 @@ class OvalBench : public RectBench {
public:
OvalBench(int shift, int stroke = 0) : RectBench(shift, stroke) {}
protected:
- virtual void drawThisRect(SkCanvas* c, const SkRect& r, const SkPaint& p) {
+ void drawThisRect(SkCanvas* c, const SkRect& r, const SkPaint& p) override {
c->drawOval(r, p);
}
- virtual const char* onGetName() { return computeName("ovals"); }
+ const char* onGetName() override { return computeName("ovals"); }
};
class RRectBench : public RectBench {
public:
RRectBench(int shift, int stroke = 0) : RectBench(shift, stroke) {}
protected:
- virtual void drawThisRect(SkCanvas* c, const SkRect& r, const SkPaint& p) {
+ void drawThisRect(SkCanvas* c, const SkRect& r, const SkPaint& p) override {
c->drawRoundRect(r, r.width() / 4, r.height() / 4, p);
}
- virtual const char* onGetName() { return computeName("rrects"); }
+ const char* onGetName() override { return computeName("rrects"); }
};
class PointsBench : public RectBench {
@@ -170,7 +170,7 @@ public:
}
protected:
- virtual void onDraw(const int loops, SkCanvas* canvas) {
+ void onDraw(const int loops, SkCanvas* canvas) override {
SkScalar gSizes[] = {
SkIntToScalar(7), 0
};
@@ -193,7 +193,7 @@ protected:
}
}
}
- virtual const char* onGetName() { return fName; }
+ const char* onGetName() override { return fName; }
};
/*******************************************************************************
@@ -218,7 +218,7 @@ public:
}
protected:
- virtual void onDraw(const int loops, SkCanvas* canvas) {
+ void onDraw(const int loops, SkCanvas* canvas) override {
SkScalar gSizes[] = {
SkIntToScalar(13), SkIntToScalar(24)
};
@@ -269,7 +269,7 @@ protected:
}
}
}
- virtual const char* onGetName() { return fName; }
+ const char* onGetName() override { return fName; }
private:
typedef RectBench INHERITED;
kMaskType _type;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698