C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}

NOPRESUBMIT=true

BUG=skia:
DOCS_PREVIEW= https://skia.org/?cl=1037793002

Review URL: https://codereview.chromium.org/1037793002
This commit is contained in:
mtklein 2015-03-25 18:17:31 -07:00 committed by Commit bot
parent 02fd592c8d
commit 36352bf5e3
704 changed files with 4264 additions and 4290 deletions

View File

@ -39,9 +39,9 @@ CLASS_DIAGRAMS = YES
# CLASS_GRAPH = YES
# COLLABORATION_GRAPH = YES
# UML_LOOK = YES
# GRAPHICAL_HIERARCHY = YES
# GRAPHICAL_HIERARCHY = YES
# Make SkDEBUGCODE disappear, but not SK_OVERRIDE.
# Make SkDEBUGCODE disappear.
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = YES

View File

@ -108,7 +108,7 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
@ -146,7 +146,7 @@ protected:
}
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkPaint paint;
paint.setAntiAlias(false);
paint.setFilterQuality(kLow_SkFilterQuality);

View File

@ -38,19 +38,19 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
SkIPoint onGetSize() SK_OVERRIDE {
SkIPoint onGetSize() override {
return SkIPoint::Make(640, 100);
}
void onPreDraw() SK_OVERRIDE {
void onPreDraw() override {
make_path(fPath);
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkPaint paint;
paint.setAntiAlias(true);
paint.setStyle(SkPaint::kStroke_Style);

View File

@ -247,7 +247,7 @@ protected:
INHERITED::onDraw(loops, canvas);
}
void setupPaint(SkPaint* paint) SK_OVERRIDE {
void setupPaint(SkPaint* paint) override {
this->INHERITED::setupPaint(paint);
int index = 0;
@ -303,7 +303,7 @@ protected:
return fFullName.c_str();
}
void onDrawIntoBitmap(const SkBitmap& bm) SK_OVERRIDE {
void onDrawIntoBitmap(const SkBitmap& bm) override {
const int w = bm.width();
const int h = bm.height();

View File

@ -59,7 +59,7 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
fName.printf("bitmaprect_%02X_%sfilter_%s",
fAlpha,
kNone_SkFilterQuality == fFilterQuality ? "no" : "",
@ -67,7 +67,7 @@ protected:
return fName.c_str();
}
void onPreDraw() SK_OVERRIDE {
void onPreDraw() override {
fBitmap.allocPixels();
fBitmap.setAlphaType(kOpaque_SkAlphaType);
fBitmap.eraseColor(SK_ColorBLACK);
@ -87,7 +87,7 @@ protected:
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkRandom rand;
SkPaint paint;

View File

@ -48,7 +48,7 @@ protected:
return float(outputSize())/inputSize();
}
SkIPoint onGetSize() SK_OVERRIDE {
SkIPoint onGetSize() override {
return SkIPoint::Make( fOutputSize, fOutputSize );
}
@ -88,7 +88,7 @@ class BitmapFilterScaleBench: public BitmapScaleBench {
setName( "filter" );
}
protected:
void doScaleImage() SK_OVERRIDE {
void doScaleImage() override {
SkCanvas canvas( fOutputBitmap );
SkPaint paint;

View File

@ -31,18 +31,18 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
void onPreDraw() SK_OVERRIDE {
void onPreDraw() override {
if (!fInitialized) {
make_checkerboard();
fInitialized = true;
}
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkPaint paint;
paint.setImageFilter(SkBlurImageFilter::Create(fSigmaX, fSigmaY))->unref();

View File

@ -88,7 +88,7 @@ class BlurRectDirectBench: public BlurRectBench {
this->setName(name);
}
protected:
void makeBlurryRect(const SkRect& r) SK_OVERRIDE {
void makeBlurryRect(const SkRect& r) override {
SkMask mask;
SkBlurMask::BlurRect(SkBlurMask::ConvertRadiusToSigma(this->radius()),
&mask, r, kNormal_SkBlurStyle);
@ -110,7 +110,7 @@ public:
}
protected:
void preBenchSetup(const SkRect& r) SK_OVERRIDE {
void preBenchSetup(const SkRect& r) override {
SkMask::FreeImage(fSrcMask.fImage);
r.roundOut(&fSrcMask.fBounds);
@ -142,7 +142,7 @@ public:
protected:
void makeBlurryRect(const SkRect&) SK_OVERRIDE {
void makeBlurryRect(const SkRect&) override {
SkMask mask;
mask.fImage = NULL;
SkBlurMask::BoxBlur(&mask, fSrcMask, SkBlurMask::ConvertRadiusToSigma(this->radius()),
@ -169,7 +169,7 @@ public:
protected:
void makeBlurryRect(const SkRect&) SK_OVERRIDE {
void makeBlurryRect(const SkRect&) override {
SkMask mask;
mask.fImage = NULL;
SkBlurMask::BlurGroundTruth(SkBlurMask::ConvertRadiusToSigma(this->radius()),

View File

@ -21,7 +21,7 @@ public:
fInner = inner;
}
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
@ -29,7 +29,7 @@ public:
fName = name;
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkPaint paint;
paint.setMaskFilter(SkBlurMaskFilter::Create(kNormal_SkBlurStyle, fRadius))->unref();

View File

@ -30,16 +30,16 @@ public:
fRRect.setRectXY(r, SkIntToScalar(cornerRadius), SkIntToScalar(cornerRadius));
}
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
SkIPoint onGetSize() SK_OVERRIDE {
SkIPoint onGetSize() override {
return SkIPoint::Make(SkScalarCeilToInt(fRRect.rect().width()),
SkScalarCeilToInt(fRRect.rect().height()));
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkLayerDrawLooper::Builder looperBuilder;
{
SkLayerDrawLooper::LayerInfo info;

View File

@ -94,7 +94,7 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
if (fAA) {
return "chart_aa";
} else {
@ -102,7 +102,7 @@ protected:
}
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
bool sizeChanged = false;
if (canvas->getDeviceSize() != fSize) {
fSize = canvas->getDeviceSize();

View File

@ -35,7 +35,7 @@ public:
}
}
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}

View File

@ -81,11 +81,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
fProc(loops, fPaint, fText, sizeof(fText), NGLYPHS);
}

View File

@ -27,22 +27,22 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return "colorcube";
}
void onPreDraw() SK_OVERRIDE {
void onPreDraw() override {
if (!SkToBool(fCubeData)) {
this->makeCubeData();
this->make_bitmap();
}
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
this->test(loops, canvas);
}
SkIPoint onGetSize() SK_OVERRIDE {
SkIPoint onGetSize() override {
return SkIPoint::Make(fSize.width(), fSize.height());
}

View File

@ -68,11 +68,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return isSmall() ? "colorfilter_dim_bright_small" : "colorfilter_dim_bright_large";
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkRect r = getFilterRect();
SkPaint paint;
paint.setColor(SK_ColorRED);
@ -98,11 +98,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return isSmall() ? "colorfilter_bright_gray_small" : "colorfilter_bright_gray_large";
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkRect r = getFilterRect();
SkPaint paint;
paint.setColor(SK_ColorRED);
@ -125,11 +125,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return isSmall() ? "colorfilter_gray_bright_small" : "colorfilter_gray_bright_large";
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkRect r = getFilterRect();
SkPaint paint;
paint.setColor(SK_ColorRED);
@ -152,11 +152,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return isSmall() ? "colorfilter_blue_bright_small" : "colorfilter_blue_bright_large";
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkRect r = getFilterRect();
SkPaint paint;
paint.setColor(SK_ColorRED);
@ -179,11 +179,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return isSmall() ? "colorfilter_bright_blue_small" : "colorfilter_bright_blue_large";
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkRect r = getFilterRect();
SkPaint paint;
paint.setColor(SK_ColorRED);
@ -206,11 +206,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return isSmall() ? "colorfilter_bright_small" : "colorfilter_bright_large";
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkRect r = getFilterRect();
SkPaint paint;
paint.setColor(SK_ColorRED);
@ -232,11 +232,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return isSmall() ? "colorfilter_blue_small" : "colorfilter_blue_large";
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkRect r = getFilterRect();
SkPaint paint;
paint.setColor(SK_ColorRED);
@ -258,11 +258,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return isSmall() ? "colorfilter_gray_small" : "colorfilter_gray_large";
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkRect r = getFilterRect();
SkPaint paint;
paint.setColor(SK_ColorRED);
@ -284,11 +284,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return isSmall() ? "table_colorfilter_small" : "table_colorfilter_large";
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkRect r = getFilterRect();
SkPaint paint;
paint.setColor(SK_ColorRED);
@ -322,11 +322,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return isSmall() ? "luma_colorfilter_small" : "luma_colorfilter_large";
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkRect r = getFilterRect();
SkPaint paint;
paint.setColor(SK_ColorRED);

View File

@ -12,13 +12,13 @@ public:
fName.append(kScale ? "_255" : "_256");
}
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
const char* onGetName() SK_OVERRIDE { return fName.c_str(); }
const char* onGetName() override { return fName.c_str(); }
void onPreDraw() SK_OVERRIDE {
void onPreDraw() override {
// A handful of random srcs and dsts.
SkRandom rand;
for (int i = 0; i < kInputs; i++) {
@ -33,7 +33,7 @@ public:
if (kScale) fScales[256] = 255; // We'll just do 255 twice if we're limited to [0,255].
}
void onDraw(const int loops, SkCanvas*) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas*) override {
// We xor results of FourByteInterp into junk to make sure the function runs.
volatile SkPMColor junk = 0;

View File

@ -44,11 +44,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
if (fDrawCoverage) {
for (int i = 0; i < loops; ++i) {
fDraw.drawPathCoverage(fPath, fPaint);

View File

@ -57,11 +57,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkPaint paint;
this->setupPaint(&paint);
paint.setStyle(SkPaint::kStroke_Style);
@ -106,7 +106,7 @@ public:
protected:
virtual void handlePath(SkCanvas* canvas, const SkPath& path,
const SkPaint& paint, int N) SK_OVERRIDE {
const SkPaint& paint, int N) override {
SkPoint pts[2];
if (!path.isLine(pts) || pts[0].fY != pts[1].fY) {
this->INHERITED::handlePath(canvas, path, paint, N);
@ -190,11 +190,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
void onDraw(const int loops, SkCanvas*) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas*) override {
SkPath dst;
for (int i = 0; i < loops; ++i) {
SkStrokeRec rec(SkStrokeRec::kHairline_InitStyle);
@ -228,11 +228,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkPaint paint;
this->setupPaint(&paint);
paint.setStrokeWidth(fStrokeWidth);
@ -267,11 +267,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkPaint p;
this->setupPaint(&p);
p.setColor(SK_ColorBLACK);
@ -353,11 +353,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkPaint p;
this->setupPaint(&p);
p.setStyle(SkPaint::kStroke_Style);
@ -393,11 +393,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkPaint p;
this->setupPaint(&p);
p.setColor(SK_ColorBLACK);

View File

@ -22,9 +22,9 @@ public:
DecodingBench(SkString path, SkColorType colorType);
protected:
const char* onGetName() SK_OVERRIDE;
bool isSuitableFor(Backend backend) SK_OVERRIDE;
void onDraw(const int n, SkCanvas* canvas) SK_OVERRIDE;
const char* onGetName() override;
bool isSuitableFor(Backend backend) override;
void onDraw(const int n, SkCanvas* canvas) override;
private:
SkString fName;

View File

@ -23,9 +23,9 @@ public:
const int divisor);
protected:
const char* onGetName() SK_OVERRIDE;
bool isSuitableFor(Backend backend) SK_OVERRIDE;
void onDraw(const int n, SkCanvas* canvas) SK_OVERRIDE;
const char* onGetName() override;
bool isSuitableFor(Backend backend) override;
void onDraw(const int n, SkCanvas* canvas) override;
private:
SkString fName;

View File

@ -26,12 +26,12 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fDiscardableContents ? "DeferredSurfaceCopy_discardable" :
"DeferredSurfaceCopy_nonDiscardable";
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
// The canvas is not actually used for this test except to provide
// configuration information: gpu, multisampling, size, etc?
SkImageInfo info = SkImageInfo::MakeN32Premul(kSurfaceWidth, kSurfaceHeight);

View File

@ -22,7 +22,7 @@ public:
}
protected:
void onPreDraw() SK_OVERRIDE {
void onPreDraw() override {
if (!fInitialized) {
this->makeBitmap();
this->makeCheckerboard();
@ -91,11 +91,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return this->isSmall() ? "displacement_zero_small" : "displacement_zero_large";
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkPaint paint;
SkAutoTUnref<SkImageFilter> displ(SkBitmapSource::Create(fCheckerboard));
// No displacement effect
@ -118,11 +118,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return isSmall() ? "displacement_alpha_small" : "displacement_alpha_large";
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkPaint paint;
SkAutoTUnref<SkImageFilter> displ(SkBitmapSource::Create(fCheckerboard));
// Displacement, with 1 alpha component (which isn't pre-multiplied)
@ -144,11 +144,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return isSmall() ? "displacement_full_small" : "displacement_full_large";
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkPaint paint;
SkAutoTUnref<SkImageFilter> displ(SkBitmapSource::Create(fCheckerboard));
// Displacement, with 2 non-alpha components

View File

@ -122,12 +122,12 @@ public:
ETCBitmapBench(bool decompress, Backend backend)
: fDecompress(decompress), fBackend(backend) { }
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == this->fBackend;
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
if (kGPU_Backend == this->fBackend) {
if (this->fDecompress) {
return "etc1bitmap_render_gpu_decompressed";
@ -144,7 +144,7 @@ protected:
}
}
void onPreDraw() SK_OVERRIDE {
void onPreDraw() override {
if (NULL == fPKMData) {
SkDebugf("Failed to load PKM data!\n");
return;
@ -162,7 +162,7 @@ protected:
}
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
for (int i = 0; i < loops; ++i) {
canvas->drawBitmap(this->fBitmap, 0, 0, NULL);
}
@ -187,7 +187,7 @@ public:
: ETCBitmapBench(decompress, backend) { }
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
if (kGPU_Backend == this->backend()) {
if (this->decompress()) {
return "etc1bitmap_upload_gpu_decompressed";
@ -204,7 +204,7 @@ protected:
}
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkPixelRef* pr = fBitmap.pixelRef();
for (int i = 0; i < loops; ++i) {
if (pr) {

View File

@ -20,9 +20,9 @@ public:
FSRectBench() : fInit(false) { }
protected:
const char* onGetName() SK_OVERRIDE { return "fullscreen_rects"; }
const char* onGetName() override { return "fullscreen_rects"; }
void onPreDraw() SK_OVERRIDE {
void onPreDraw() override {
if (!fInit) {
SkRandom rand;
static const SkScalar kMinOffset = 0;
@ -39,7 +39,7 @@ protected:
}
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkPaint paint;
for (int i = 0; i < loops; ++i) {
paint.setColor(fColors[i % N]);

View File

@ -28,11 +28,11 @@ public:
FontCacheBench() {}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return "fontcache";
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkPaint paint;
this->setupPaint(&paint);
paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
@ -104,11 +104,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return "fontefficiency";
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
static bool gDone;
if (gDone) {
return;

View File

@ -21,10 +21,10 @@ public:
virtual ~GMBench();
protected:
const char* onGetName() SK_OVERRIDE;
bool isSuitableFor(Backend backend) SK_OVERRIDE;
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE;
SkIPoint onGetSize() SK_OVERRIDE;
const char* onGetName() override;
bool isSuitableFor(Backend backend) override;
void onDraw(const int loops, SkCanvas* canvas) override;
SkIPoint onGetSize() override;
private:
skiagm::GM* fGM;

View File

@ -74,11 +74,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
void onPreDraw() SK_OVERRIDE {
void onPreDraw() override {
if (!fInitialized) {
this->makeCheckerboard();
this->makeAtlas();
@ -86,7 +86,7 @@ protected:
}
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkRandom scaleRand;
SkRandom transRand;
SkRandom rotRand;

View File

@ -16,11 +16,11 @@ public:
fName.printf("geo_%s", suffix);
}
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return kNonRendering_Backend == backend;
}
@ -65,7 +65,7 @@ public:
GeoRectBench_intersect() : GeoRectBench("rect_intersect") {}
protected:
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
for (int outer = 0; outer < loops; ++outer) {
int count = 0;
for (size_t i = 0; i < SK_ARRAY_COUNT(fRects); ++i) {
@ -82,7 +82,7 @@ public:
GeoRectBench_intersect_rect() : GeoRectBench("rect_intersect_rect") {}
protected:
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
for (int outer = 0; outer < loops; ++outer) {
int count = 0;
SkRect r;
@ -99,7 +99,7 @@ public:
GeoRectBench_Intersects() : GeoRectBench("rect_Intersects") {}
protected:
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
for (int outer = 0; outer < loops; ++outer) {
int count = 0;
for (size_t i = 0; i < SK_ARRAY_COUNT(fRects); ++i) {
@ -115,7 +115,7 @@ public:
GeoRectBench_sort() : GeoRectBench("rect_sort") {}
protected:
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
for (int outer = 0; outer < loops; ++outer) {
for (size_t i = 0; i < SK_ARRAY_COUNT(fRects); ++i) {
fRects[i].sort();
@ -148,7 +148,7 @@ class EvalQuadAt0 : public QuadBenchBase {
public:
EvalQuadAt0() : QuadBenchBase("evalquadat0") {}
protected:
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkPoint result;
for (int outer = 0; outer < loops; ++outer) {
SkEvalQuadAt(fPts, 0.5f, &result);
@ -164,7 +164,7 @@ class EvalQuadAt1 : public QuadBenchBase {
public:
EvalQuadAt1() : QuadBenchBase("evalquadat1") {}
protected:
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkPoint result;
for (int outer = 0; outer < loops; ++outer) {
result = SkEvalQuadAt(fPts, 0.5f);
@ -182,7 +182,7 @@ class EvalQuadTangentAt0 : public QuadBenchBase {
public:
EvalQuadTangentAt0() : QuadBenchBase("evalquadtangentat0") {}
protected:
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkPoint result;
for (int outer = 0; outer < loops; ++outer) {
SkEvalQuadAt(fPts, 0.5f, NULL, &result);
@ -198,7 +198,7 @@ class EvalQuadTangentAt1 : public QuadBenchBase {
public:
EvalQuadTangentAt1() : QuadBenchBase("evalquadtangentat1") {}
protected:
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkPoint result;
for (int outer = 0; outer < loops; ++outer) {
result = SkEvalQuadTangentAt(fPts, 0.5f);
@ -216,7 +216,7 @@ class ChopQuadAt0 : public QuadBenchBase {
public:
ChopQuadAt0() : QuadBenchBase("chopquadat0") {}
protected:
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkPoint dst[5];
for (int outer = 0; outer < loops; ++outer) {
SkChopQuadAt(fPts, dst, 0.5f);
@ -232,7 +232,7 @@ class ChopQuadAt1 : public QuadBenchBase {
public:
ChopQuadAt1() : QuadBenchBase("chopquadat1") {}
protected:
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkPoint dst[5];
for (int outer = 0; outer < loops; ++outer) {
SkChopQuadAt2(fPts, dst, 0.5f);
@ -248,7 +248,7 @@ class ChopCubicAt0 : public QuadBenchBase {
public:
ChopCubicAt0() : QuadBenchBase("chopcubicat0") {}
protected:
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkPoint dst[7];
for (int outer = 0; outer < loops; ++outer) {
SkChopCubicAt(fPts, dst, 0.5f);
@ -264,7 +264,7 @@ class ChopCubicAt1 : public QuadBenchBase {
public:
ChopCubicAt1() : QuadBenchBase("chopcubicat1") {}
protected:
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkPoint dst[7];
for (int outer = 0; outer < loops; ++outer) {
SkChopCubicAt2(fPts, dst, 0.5f);

View File

@ -32,7 +32,7 @@ GrMemoryPool A::gBenchPool(10 * (1 << 10), 10 * (1 << 10));
*/
class GrMemoryPoolBenchStack : public Benchmark {
public:
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
@ -94,7 +94,7 @@ GrMemoryPool B::gBenchPool(10 * (1 << 10), 10 * (1 << 10));
*/
class GrMemoryPoolBenchRandom : public Benchmark {
public:
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
@ -142,7 +142,7 @@ class GrMemoryPoolBenchQueue : public Benchmark {
M = 4 * (1 << 10),
};
public:
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}

View File

@ -21,25 +21,25 @@ public:
fName.append("ordered_set_build");
}
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return kNonRendering_Backend == backend;
}
virtual ~GrOrderedSetBuildBench() {}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
void onPreDraw() SK_OVERRIDE {
void onPreDraw() override {
SkRandom rand;
for (int j = 0; j < NUM_ELEMENTS; ++j) {
fData[j] = rand.nextU() % NUM_ELEMENTS;
}
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
for (int i = 0; i < loops; ++i) {
GrOrderedSet<int> set;
for (int j = 0; j < NUM_ELEMENTS; ++j) {
@ -62,18 +62,18 @@ public:
fName.append("ordered_set_find");
}
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return kNonRendering_Backend == backend;
}
virtual ~GrOrderedSetFindBench() {}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
void onPreDraw() SK_OVERRIDE {
void onPreDraw() override {
SkRandom rand;
for (int j = 0; j < NUM_ELEMENTS; ++j) {
fData[j] = rand.nextU() % 1500;
@ -81,7 +81,7 @@ protected:
}
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
for (int i = 0; i < loops; ++i) {
for (int j = 0; j < NUM_ELEMENTS; ++j) {
fSet.find(fData[j]);
@ -103,25 +103,25 @@ public:
fName.append("ordered_set_remove");
}
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return kNonRendering_Backend == backend;
}
virtual ~GrOrderedSetRemoveBench() {}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
void onPreDraw() SK_OVERRIDE {
void onPreDraw() override {
SkRandom rand;
for (int j = 0; j < NUM_ELEMENTS; ++j) {
fSet.insert(rand.nextU() % NUM_ELEMENTS);
}
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
typedef GrOrderedSet<int>::Iter SetIter;
for (int i = 0; i < loops; ++i) {
GrOrderedSet<int> testSet;

View File

@ -36,7 +36,7 @@ public:
}
private:
size_t onGpuMemorySize() const SK_OVERRIDE { return 100; }
size_t onGpuMemorySize() const override { return 100; }
typedef GrGpuResource INHERITED;
};
@ -53,16 +53,16 @@ static void populate_cache(GrGpu* gpu, int resourceCount) {
class GrResourceCacheBenchAdd : public Benchmark {
public:
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return "grresourcecache_add";
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkAutoTUnref<GrContext> context(GrContext::CreateMockContext());
if (NULL == context) {
return;
@ -90,16 +90,16 @@ private:
class GrResourceCacheBenchFind : public Benchmark {
public:
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return "grresourcecache_find";
}
void onPreDraw() SK_OVERRIDE {
void onPreDraw() override {
fContext.reset(GrContext::CreateMockContext());
if (!fContext) {
return;
@ -118,7 +118,7 @@ protected:
populate_cache(gpu, CACHE_SIZE_COUNT);
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
if (!fContext) {
return;
}

View File

@ -42,7 +42,7 @@ public:
virtual void makePath(SkPath*) = 0;
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
fName.printf("path_hairline_%s_%s_",
fFlags & kBig_Flag ? "big" : "small",
fFlags & kAA_Flag ? "AA" : "noAA");
@ -50,7 +50,7 @@ protected:
return fName.c_str();
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkPaint paint(fPaint);
this->setupPaint(&paint);
@ -80,10 +80,10 @@ class LinePathBench : public HairlinePathBench {
public:
LinePathBench(Flags flags) : INHERITED(flags) {}
void appendName(SkString* name) SK_OVERRIDE {
void appendName(SkString* name) override {
name->append("line");
}
void makePath(SkPath* path) SK_OVERRIDE {
void makePath(SkPath* path) override {
SkRandom rand;
int size = SK_ARRAY_COUNT(points);
int hSize = size / 2;
@ -112,10 +112,10 @@ class QuadPathBench : public HairlinePathBench {
public:
QuadPathBench(Flags flags) : INHERITED(flags) {}
void appendName(SkString* name) SK_OVERRIDE {
void appendName(SkString* name) override {
name->append("quad");
}
void makePath(SkPath* path) SK_OVERRIDE {
void makePath(SkPath* path) override {
SkRandom rand;
int size = SK_ARRAY_COUNT(points);
int hSize = size / 2;
@ -144,10 +144,10 @@ class ConicPathBench : public HairlinePathBench {
public:
ConicPathBench(Flags flags) : INHERITED(flags) {}
void appendName(SkString* name) SK_OVERRIDE {
void appendName(SkString* name) override {
name->append("conic");
}
void makePath(SkPath* path) SK_OVERRIDE {
void makePath(SkPath* path) override {
SkRandom rand;
SkRandom randWeight;
int size = SK_ARRAY_COUNT(points);
@ -180,10 +180,10 @@ class CubicPathBench : public HairlinePathBench {
public:
CubicPathBench(Flags flags) : INHERITED(flags) {}
void appendName(SkString* name) SK_OVERRIDE {
void appendName(SkString* name) override {
name->append("cubic");
}
void makePath(SkPath* path) SK_OVERRIDE {
void makePath(SkPath* path) override {
SkRandom rand;
int size = SK_ARRAY_COUNT(points);
int hSize = size / 2;

View File

@ -24,8 +24,8 @@ struct TestRec : public SkResourceCache::Rec {
TestRec(const TestKey& key, intptr_t value) : fKey(key), fValue(value) {}
const Key& getKey() const SK_OVERRIDE { return fKey; }
size_t bytesUsed() const SK_OVERRIDE { return sizeof(fKey) + sizeof(fValue); }
const Key& getKey() const override { return fKey; }
size_t bytesUsed() const override { return sizeof(fKey) + sizeof(fValue); }
static bool Visitor(const SkResourceCache::Rec&, void*) {
return true;
@ -49,11 +49,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return "imagecache";
}
void onDraw(const int loops, SkCanvas*) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas*) override {
if (fCache.getTotalBytesUsed() == 0) {
this->populateCache();
}

View File

@ -39,7 +39,7 @@ protected:
}
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
makeBitmap();
for(int i = 0; i < loops; i++) {
@ -79,11 +79,11 @@ public:
virtual ~TableCollapseBench() {}
protected:
virtual const char* onGetName() SK_OVERRIDE {
virtual const char* onGetName() override {
return "image_filter_collapse_table";
}
virtual void onPreDraw() SK_OVERRIDE {
virtual void onPreDraw() override {
for (int i = 0; i < 256; ++i) {
int n = i >> 5;
table1[i] = (n << 5) | (n << 2) | (n >> 1);
@ -135,11 +135,11 @@ public:
virtual ~MatrixCollapseBench() {}
protected:
virtual const char* onGetName() SK_OVERRIDE {
virtual const char* onGetName() override {
return "image_filter_collapse_matrix";
}
virtual void onPreDraw() SK_OVERRIDE {
virtual void onPreDraw() override {
SkColorFilter* colorFilters[] = {
make_brightness(0.1f),
make_grayscale(),

View File

@ -21,11 +21,11 @@ public:
ImageFilterDAGBench() {}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return "image_filter_dag";
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
for (int j = 0; j < loops; j++) {
SkAutoTUnref<SkImageFilter> blur(SkBlurImageFilter::Create(20.0f, 20.0f));
SkImageFilter* inputs[kNumInputs];

View File

@ -22,7 +22,7 @@ public:
fDx = 0.1257f;
}
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
@ -51,7 +51,7 @@ public:
Fixed16D16Interp() : INHERITED("16.16") {}
protected:
void performTest(int16_t dst[], float fx, float dx, int count) SK_OVERRIDE {
void performTest(int16_t dst[], float fx, float dx, int count) override {
SkFixed curr = SkFloatToFixed(fx);
SkFixed step = SkFloatToFixed(dx);
for (int i = 0; i < count; i += 4) {
@ -70,7 +70,7 @@ public:
Fixed32D32Interp() : INHERITED("32.32") {}
protected:
void performTest(int16_t dst[], float fx, float dx, int count) SK_OVERRIDE {
void performTest(int16_t dst[], float fx, float dx, int count) override {
int64_t curr = (int64_t)(fx * 65536 * 655536);
int64_t step = (int64_t)(dx * 65536 * 655536);
SkFixed tmp;
@ -101,7 +101,7 @@ public:
Fixed16D48Interp() : INHERITED("16.48") {}
protected:
void performTest(int16_t dst[], float fx, float dx, int count) SK_OVERRIDE {
void performTest(int16_t dst[], float fx, float dx, int count) override {
int64_t curr = (int64_t)(fx * 65536 * 655536 * 65536);
int64_t step = (int64_t)(dx * 65536 * 655536 * 65536);
SkFixed tmp;
@ -121,7 +121,7 @@ public:
FloatInterp() : INHERITED("float") {}
protected:
void performTest(int16_t dst[], float fx, float dx, int count) SK_OVERRIDE {
void performTest(int16_t dst[], float fx, float dx, int count) override {
SkFixed tmp;
for (int i = 0; i < count; i += 4) {
tmp = SkFloatToFixed(fx); dst[i + 0] = TILE(tmp, count); fx += dx;
@ -139,7 +139,7 @@ public:
DoubleInterp() : INHERITED("double") {}
protected:
void performTest(int16_t dst[], float fx, float dx, int count) SK_OVERRIDE {
void performTest(int16_t dst[], float fx, float dx, int count) override {
double ffx = fx;
double ddx = dx;
SkFixed tmp;

View File

@ -101,11 +101,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fIsSmall ? "lightingpointlitdiffuse_small" : "lightingpointlitdiffuse_large";
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
draw(loops, canvas, SkLightingImageFilter::CreatePointLitDiffuse(getPointLocation(),
getWhite(),
getSurfaceScale(),
@ -122,11 +122,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fIsSmall ? "lightingdistantlitdiffuse_small" : "lightingdistantlitdiffuse_large";
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
draw(loops, canvas, SkLightingImageFilter::CreateDistantLitDiffuse(getDistantDirection(),
getWhite(),
getSurfaceScale(),
@ -143,11 +143,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fIsSmall ? "lightingspotlitdiffuse_small" : "lightingspotlitdiffuse_large";
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
draw(loops, canvas, SkLightingImageFilter::CreateSpotLitDiffuse(getSpotLocation(),
getSpotTarget(),
getSpotExponent(),
@ -167,11 +167,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fIsSmall ? "lightingpointlitspecular_small" : "lightingpointlitspecular_large";
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
draw(loops, canvas, SkLightingImageFilter::CreatePointLitSpecular(getPointLocation(),
getWhite(),
getSurfaceScale(),
@ -189,11 +189,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fIsSmall ? "lightingdistantlitspecular_small" : "lightingdistantlitspecular_large";
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
draw(loops, canvas, SkLightingImageFilter::CreateDistantLitSpecular(getDistantDirection(),
getWhite(),
getSurfaceScale(),
@ -211,11 +211,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fIsSmall ? "lightingspotlitspecular_small" : "lightingspotlitspecular_large";
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
draw(loops, canvas, SkLightingImageFilter::CreateSpotLitSpecular(getSpotLocation(),
getSpotTarget(),
getSpotExponent(),

View File

@ -38,11 +38,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkPaint paint;
this->setupPaint(&paint);

View File

@ -22,18 +22,18 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fIsSmall ? "magnifier_small" : "magnifier_large";
}
void onPreDraw() SK_OVERRIDE {
void onPreDraw() override {
if (!fInitialized) {
make_checkerboard();
fInitialized = true;
}
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
const int w = fIsSmall ? FILTER_WIDTH_SMALL : FILTER_WIDTH_LARGE;
const int h = fIsSmall ? FILTER_HEIGHT_SMALL : FILTER_HEIGHT_LARGE;
SkPaint paint;

View File

@ -31,7 +31,7 @@ public:
}
}
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
@ -68,7 +68,7 @@ protected:
virtual void performTest(float* SK_RESTRICT dst,
const float* SK_RESTRICT src,
int count) SK_OVERRIDE {
int count) override {
uint32_t* d = SkTCast<uint32_t*>(dst);
const uint32_t* s = SkTCast<const uint32_t*>(src);
this->performITest(d, s, count);
@ -166,7 +166,7 @@ public:
protected:
virtual void performITest(uint32_t* SK_RESTRICT dst,
const uint32_t* SK_RESTRICT src,
int count) SK_OVERRIDE {
int count) override {
for (int i = 0; i < count; ++i) {
dst[i] = QMul64(src[i], (uint8_t)i);
}
@ -181,7 +181,7 @@ public:
protected:
virtual void performITest(uint32_t* SK_RESTRICT dst,
const uint32_t* SK_RESTRICT src,
int count) SK_OVERRIDE {
int count) override {
for (int i = 0; i < count; ++i) {
dst[i] = SkAlphaMulQ(src[i], (uint8_t)i);
}
@ -285,7 +285,7 @@ public:
}
}
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
@ -353,7 +353,7 @@ public:
}
}
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
@ -414,7 +414,7 @@ public:
}
}
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
@ -470,7 +470,7 @@ public:
fName = "point_normalize";
}
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
@ -517,7 +517,7 @@ public:
}
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
@ -553,7 +553,7 @@ public:
fName.printf("divmod_%s", name);
}
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}

View File

@ -17,7 +17,7 @@ public:
fName.printf("matrix44_%s", name);
}
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}

View File

@ -18,7 +18,7 @@ public:
fName.printf("matrix_%s", name);
}
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
@ -290,7 +290,7 @@ public:
}
}
void performTest() SK_OVERRIDE {
void performTest() override {
if (fNewWay) {
for (int i = 0; i < 1000000; ++i) {
fM.mapPts(fDst, fSrc, N);

View File

@ -18,15 +18,15 @@ public:
, fMemcpy32(memcpy32)
, fName(SkStringPrintf("%s_%d", name, count)) {}
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
void onPreDraw() SK_OVERRIDE {
void onPreDraw() override {
fDst.reset(fCount);
fSrc.reset(fCount);
@ -36,7 +36,7 @@ public:
}
}
void onDraw(const int loops, SkCanvas*) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas*) override {
for (int i = 0; i < loops; i++) {
fMemcpy32(fDst, fSrc, fCount);
}

View File

@ -21,16 +21,16 @@ public:
fName.printf("chunkalloc_" SK_SIZE_T_SPECIFIER, minSize);
}
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
void onDraw(const int loops, SkCanvas*) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas*) override {
size_t inc = fMinSize >> 4;
SkASSERT(inc > 0);
size_t total = fMinSize * 64;

View File

@ -35,18 +35,18 @@ public:
fName.printf("memset%d_%d_%d", type, minSize, maxSize);
}
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
virtual void performTest() = 0;
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
for (int i = 0; i < loops; ++i) {
this->performTest();
}
@ -63,7 +63,7 @@ public:
: INHERITED(MEMSET32, minSize, maxSize) {}
protected:
void performTest() SK_OVERRIDE {
void performTest() override {
for(int j = fMinSize; j < fMaxSize; ++j){
sk_memset32(kBuffer, VALUE32, j);
sk_memset32(kBuffer + 1, VALUE32, j);
@ -82,7 +82,7 @@ public:
: INHERITED(MEMSET16, minSize, maxSize) {}
protected:
void performTest() SK_OVERRIDE {
void performTest() override {
for(int j = fMinSize; j < fMaxSize; ++j){
sk_memset16(kBuffer, VALUE16, j);
sk_memset16(kBuffer + 1, VALUE16, j);

View File

@ -20,11 +20,11 @@ public:
MergeBench(bool small) : fIsSmall(small), fInitialized(false) { }
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fIsSmall ? "merge_small" : "merge_large";
}
void onPreDraw() SK_OVERRIDE {
void onPreDraw() override {
if (!fInitialized) {
make_bitmap();
make_checkerboard();
@ -32,7 +32,7 @@ protected:
}
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkRect r = fIsSmall ? SkRect::MakeWH(FILTER_WIDTH_SMALL, FILTER_HEIGHT_SMALL) :
SkRect::MakeWH(FILTER_WIDTH_LARGE, FILTER_HEIGHT_LARGE);
SkPaint paint;

View File

@ -16,18 +16,18 @@ public:
MipMapBench() {}
protected:
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return kNonRendering_Backend == backend;
}
const char* onGetName() SK_OVERRIDE { return "mipmap_build"; }
const char* onGetName() override { return "mipmap_build"; }
void onPreDraw() SK_OVERRIDE {
void onPreDraw() override {
fBitmap.allocN32Pixels(1000, 1000, true);
fBitmap.eraseColor(SK_ColorWHITE); // so we don't read uninitialized memory
}
void onDraw(const int loops, SkCanvas*) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas*) override {
for (int i = 0; i < loops; i++) {
SkMipMap::Build(fBitmap, NULL)->unref();
}

View File

@ -9,7 +9,7 @@
class MutexBench : public Benchmark {
public:
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}

View File

@ -24,7 +24,7 @@ template <bool kClamp, bool kWide>
struct PMFloatGetSetBench : public Benchmark {
PMFloatGetSetBench() {}
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
switch (kClamp << 1 | kWide) {
case 0: return "SkPMFloat_get_1x";
case 1: return "SkPMFloat_get_4x";
@ -34,9 +34,9 @@ struct PMFloatGetSetBench : public Benchmark {
SkFAIL("unreachable");
return "oh bother";
}
bool isSuitableFor(Backend backend) SK_OVERRIDE { return backend == kNonRendering_Backend; }
bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; }
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
// Unlike blackhole, junk can and probably will be a register.
uint32_t junk = 0;
uint32_t seed = 0;

View File

@ -82,7 +82,7 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
SkString vertexMode;
switch (fVertexMode) {
case kNone_VertexMode:
@ -107,7 +107,7 @@ protected:
return fName.c_str();
}
void onPreDraw() SK_OVERRIDE {
void onPreDraw() override {
this->setCubics();
this->setColors();
this->setTexCoords();
@ -123,7 +123,7 @@ protected:
}
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
canvas->scale(fScale.x(), fScale.y());
for (int i = 0; i < loops; i++) {
switch (fVertexMode) {
@ -161,11 +161,11 @@ public:
SquarePatchBench(SkPoint scale, VertexMode vertexMode)
: INHERITED(scale, vertexMode) { }
void appendName(SkString* name) SK_OVERRIDE {
void appendName(SkString* name) override {
name->append("square");
}
void setCubics() SK_OVERRIDE {
void setCubics() override {
const SkPoint points[SkPatchUtils::kNumCtrlPts] = {
//top points
{100,100},{150,100},{250,100}, {300,100},
@ -187,11 +187,11 @@ public:
LODDiffPatchBench(SkPoint scale, VertexMode vertexMode)
: INHERITED(scale, vertexMode) { }
void appendName(SkString* name) SK_OVERRIDE {
void appendName(SkString* name) override {
name->append("LOD_Diff");
}
void setCubics() SK_OVERRIDE {
void setCubics() override {
const SkPoint points[SkPatchUtils::kNumCtrlPts] = {
//top points
{100,175},{150,100},{250,100}, {300,0},
@ -213,11 +213,11 @@ public:
LoopPatchBench(SkPoint scale, VertexMode vertexMode)
: INHERITED(scale, vertexMode) { }
void appendName(SkString* name) SK_OVERRIDE {
void appendName(SkString* name) override {
name->append("loop");
}
void setCubics() SK_OVERRIDE {
void setCubics() override {
const SkPoint points[SkPatchUtils::kNumCtrlPts] = {
//top points
{100,100},{300,200},{100,200}, {300,100},

View File

@ -163,7 +163,7 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
SkString vertexMode;
switch (fVertexMode) {
case kNone_VertexMode:
@ -200,7 +200,7 @@ protected:
return fName.c_str();
}
void onPreDraw() SK_OVERRIDE {
void onPreDraw() override {
this->setGrid();
switch (fVertexMode) {
case kTexCoords_VertexMode:
@ -214,7 +214,7 @@ protected:
this->setupPaint(&fPaint);
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
this->setScale(canvas);
for (int i = 0; i < loops; i++) {
fGrid.draw(canvas, fPaint);

View File

@ -42,7 +42,7 @@ public:
virtual int complexity() { return 0; }
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
fName.printf("path_%s_%s_",
fFlags & kStroke_Flag ? "stroke" : "fill",
fFlags & kBig_Flag ? "big" : "small");
@ -50,7 +50,7 @@ protected:
return fName.c_str();
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkPaint paint(fPaint);
this->setupPaint(&paint);
@ -81,10 +81,10 @@ class TrianglePathBench : public PathBench {
public:
TrianglePathBench(Flags flags) : INHERITED(flags) {}
void appendName(SkString* name) SK_OVERRIDE {
void appendName(SkString* name) override {
name->append("triangle");
}
void makePath(SkPath* path) SK_OVERRIDE {
void makePath(SkPath* path) override {
static const int gCoord[] = {
10, 10, 15, 5, 20, 20
};
@ -101,10 +101,10 @@ class RectPathBench : public PathBench {
public:
RectPathBench(Flags flags) : INHERITED(flags) {}
void appendName(SkString* name) SK_OVERRIDE {
void appendName(SkString* name) override {
name->append("rect");
}
void makePath(SkPath* path) SK_OVERRIDE {
void makePath(SkPath* path) override {
SkRect r = { 10, 10, 20, 20 };
path->addRect(r);
}
@ -116,10 +116,10 @@ class OvalPathBench : public PathBench {
public:
OvalPathBench(Flags flags) : INHERITED(flags) {}
void appendName(SkString* name) SK_OVERRIDE {
void appendName(SkString* name) override {
name->append("oval");
}
void makePath(SkPath* path) SK_OVERRIDE {
void makePath(SkPath* path) override {
SkRect r = { 10, 10, 23, 20 };
path->addOval(r);
}
@ -131,10 +131,10 @@ class CirclePathBench: public PathBench {
public:
CirclePathBench(Flags flags) : INHERITED(flags) {}
void appendName(SkString* name) SK_OVERRIDE {
void appendName(SkString* name) override {
name->append("circle");
}
void makePath(SkPath* path) SK_OVERRIDE {
void makePath(SkPath* path) override {
path->addCircle(SkIntToScalar(20), SkIntToScalar(20),
SkIntToScalar(10));
}
@ -146,7 +146,7 @@ class SawToothPathBench : public PathBench {
public:
SawToothPathBench(Flags flags) : INHERITED(flags) {}
void appendName(SkString* name) SK_OVERRIDE {
void appendName(SkString* name) override {
name->append("sawtooth");
}
virtual void makePath(SkPath* path) {
@ -167,7 +167,7 @@ public:
path->lineTo(x0, y + 2 * dy);
path->close();
}
int complexity() SK_OVERRIDE { return 1; }
int complexity() override { return 1; }
private:
typedef PathBench INHERITED;
};
@ -176,10 +176,10 @@ class LongCurvedPathBench : public PathBench {
public:
LongCurvedPathBench(Flags flags) : INHERITED(flags) {}
void appendName(SkString* name) SK_OVERRIDE {
void appendName(SkString* name) override {
name->append("long_curved");
}
void makePath(SkPath* path) SK_OVERRIDE {
void makePath(SkPath* path) override {
SkRandom rand (12);
int i;
for (i = 0; i < 100; i++) {
@ -190,7 +190,7 @@ public:
}
path->close();
}
int complexity() SK_OVERRIDE { return 2; }
int complexity() override { return 2; }
private:
typedef PathBench INHERITED;
};
@ -199,24 +199,24 @@ class LongLinePathBench : public PathBench {
public:
LongLinePathBench(Flags flags) : INHERITED(flags) {}
void appendName(SkString* name) SK_OVERRIDE {
void appendName(SkString* name) override {
name->append("long_line");
}
void makePath(SkPath* path) SK_OVERRIDE {
void makePath(SkPath* path) override {
SkRandom rand;
path->moveTo(rand.nextUScalar1() * 640, rand.nextUScalar1() * 480);
for (size_t i = 1; i < 100; i++) {
path->lineTo(rand.nextUScalar1() * 640, rand.nextUScalar1() * 480);
}
}
int complexity() SK_OVERRIDE { return 2; }
int complexity() override { return 2; }
private:
typedef PathBench INHERITED;
};
class RandomPathBench : public Benchmark {
public:
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
@ -321,15 +321,15 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return "path_create";
}
void onPreDraw() SK_OVERRIDE {
void onPreDraw() override {
this->createData(10, 100);
}
void onDraw(const int loops, SkCanvas*) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas*) override {
for (int i = 0; i < loops; ++i) {
if (i % 1000 == 0) {
fPath.reset(); // PathRef memory can grow without bound otherwise.
@ -351,10 +351,10 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return "path_copy";
}
void onPreDraw() SK_OVERRIDE {
void onPreDraw() override {
this->createData(10, 100);
fPaths.reset(kPathCnt);
fCopies.reset(kPathCnt);
@ -363,7 +363,7 @@ protected:
}
this->finishedMakingPaths();
}
void onDraw(const int loops, SkCanvas*) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas*) override {
for (int i = 0; i < loops; ++i) {
int idx = i & (kPathCnt - 1);
fCopies[idx] = fPaths[idx];
@ -386,11 +386,11 @@ public:
PathTransformBench(bool inPlace) : fInPlace(inPlace) {}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fInPlace ? "path_transform_in_place" : "path_transform_copy";
}
void onPreDraw() SK_OVERRIDE {
void onPreDraw() override {
fMatrix.setScale(5 * SK_Scalar1, 6 * SK_Scalar1);
this->createData(10, 100);
fPaths.reset(kPathCnt);
@ -403,7 +403,7 @@ protected:
}
}
void onDraw(const int loops, SkCanvas*) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas*) override {
if (fInPlace) {
for (int i = 0; i < loops; ++i) {
fPaths[i & (kPathCnt - 1)].transform(fMatrix);
@ -434,11 +434,11 @@ public:
PathEqualityBench() { }
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return "path_equality_50%";
}
void onPreDraw() SK_OVERRIDE {
void onPreDraw() override {
fParity = 0;
this->createData(10, 100);
fPaths.reset(kPathCnt);
@ -450,7 +450,7 @@ protected:
this->finishedMakingPaths();
}
void onDraw(const int loops, SkCanvas*) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas*) override {
for (int i = 0; i < loops; ++i) {
int idx = i & (kPathCnt - 1);
fParity ^= (fPaths[idx] == fCopies[idx & ~0x1]);
@ -483,7 +483,7 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
switch (fType) {
case kAdd_AddType:
return "path_add_path";
@ -501,7 +501,7 @@ protected:
}
}
void onPreDraw() SK_OVERRIDE {
void onPreDraw() override {
// reversePathTo assumes a single contour path.
bool allowMoves = kReversePathTo_AddType != fType;
this->createData(10, 100, allowMoves);
@ -514,7 +514,7 @@ protected:
this->finishedMakingPaths();
}
void onDraw(const int loops, SkCanvas*) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas*) override {
switch (fType) {
case kAdd_AddType:
for (int i = 0; i < loops; ++i) {
@ -578,11 +578,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkPaint paint;
paint.setColor(SK_ColorBLACK);
@ -642,7 +642,7 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
@ -688,7 +688,7 @@ protected:
SkASSERT(path->isConvex());
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkRandom rand;
SkRect r;
@ -753,23 +753,23 @@ public:
}
}
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
private:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
void onDraw(const int loops, SkCanvas*) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas*) override {
for (int i = 0; i < loops; ++i) {
const SkRect& rect = fQueryRects[i % kQueryRectCnt];
fParity = fParity != fPath.conservativelyContainsRect(rect);
}
}
void onPreDraw() SK_OVERRIDE {
void onPreDraw() override {
fQueryRects.setCount(kQueryRectCnt);
SkRandom rand;
@ -817,11 +817,11 @@ public:
}
private:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return "ratquad-chop-0.5";
}
void onDraw(const int loops, SkCanvas*) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas*) override {
SkConic dst[2];
for (int i = 0; i < loops; ++i) {
fRQ.chopAt(0.5f, dst);
@ -846,14 +846,14 @@ public:
fName.printf("conic-chop-half%d", useV2);
}
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
private:
const char* onGetName() SK_OVERRIDE { return fName.c_str(); }
const char* onGetName() override { return fName.c_str(); }
void onDraw(const int loops, SkCanvas*) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas*) override {
if (fUseV2) {
for (int i = 0; i < loops; ++i) {
fRQ.chop2(fDst);
@ -875,7 +875,7 @@ public:
ConicBench_EvalPos(bool useV2) : ConicBench_ChopHalf(useV2) {
fName.printf("conic-eval-pos%d", useV2);
}
void onDraw(const int loops, SkCanvas*) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas*) override {
if (fUseV2) {
for (int i = 0; i < loops; ++i) {
for (int j = 0; j < 1000; ++j) {
@ -899,7 +899,7 @@ public:
ConicBench_EvalTan(bool useV2) : ConicBench_ChopHalf(useV2) {
fName.printf("conic-eval-tan%d", useV2);
}
void onDraw(const int loops, SkCanvas*) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas*) override {
if (fUseV2) {
for (int i = 0; i < loops; ++i) {
for (int j = 0; j < 1000; ++j) {
@ -940,7 +940,7 @@ public:
}
}
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
@ -959,11 +959,11 @@ public:
ConicBench_ComputeError() {}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return "conic-compute-error";
}
void onDraw(const int loops, SkCanvas*) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas*) override {
SkVector err;
for (int i = 0; i < loops; ++i) {
for (int j = 0; j < CONICS; ++j) {
@ -981,11 +981,11 @@ public:
ConicBench_asQuadTol() {}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return "conic-asQuadTol";
}
void onDraw(const int loops, SkCanvas*) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas*) override {
for (int i = 0; i < loops; ++i) {
for (int j = 0; j < CONICS; ++j) {
fConics[j].asQuadTol(SK_ScalarHalf);
@ -1002,11 +1002,11 @@ public:
ConicBench_quadPow2() {}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return "conic-quadPow2";
}
void onDraw(const int loops, SkCanvas*) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas*) override {
for (int i = 0; i < loops; ++i) {
for (int j = 0; j < CONICS; ++j) {
fConics[j].computeQuadPOW2(SK_ScalarHalf);

View File

@ -56,16 +56,16 @@ public:
}
}
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
void onDraw(const int loops, SkCanvas*) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas*) override {
if (fRaw) {
for (int i = 0; i < loops; ++i) {
SkPath::RawIter iter(fPath);

View File

@ -17,11 +17,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return "perlinnoise";
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
this->test(loops, canvas, 0, 0, SkPerlinNoiseShader::kFractalNoise_Type,
0.1f, 0.1f, 3, 0, false);
}

View File

@ -26,7 +26,7 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
@ -139,7 +139,7 @@ public:
: INHERITED("playback", maxLevel, maxPictureLevel) {
}
protected:
void onPreDraw() SK_OVERRIDE {
void onPreDraw() override {
this->INHERITED::onPreDraw();
SkIPoint canvasSize = onGetSize();

View File

@ -72,7 +72,7 @@ class TextPlaybackBench : public PicturePlaybackBench {
public:
TextPlaybackBench() : INHERITED("drawText") { }
protected:
void recordCanvas(SkCanvas* canvas) SK_OVERRIDE {
void recordCanvas(SkCanvas* canvas) override {
SkPaint paint;
paint.setTextSize(fTextSize);
paint.setColor(SK_ColorBLACK);
@ -97,7 +97,7 @@ public:
: INHERITED(drawPosH ? "drawPosTextH" : "drawPosText")
, fDrawPosH(drawPosH) { }
protected:
void recordCanvas(SkCanvas* canvas) SK_OVERRIDE {
void recordCanvas(SkCanvas* canvas) override {
SkPaint paint;
paint.setTextSize(fTextSize);
paint.setColor(SK_ColorBLACK);
@ -159,10 +159,10 @@ public:
}
}
const char* onGetName() SK_OVERRIDE { return fName.c_str(); }
SkIPoint onGetSize() SK_OVERRIDE { return SkIPoint::Make(1024,1024); }
const char* onGetName() override { return fName.c_str(); }
SkIPoint onGetSize() override { return SkIPoint::Make(1024,1024); }
void onPreDraw() SK_OVERRIDE {
void onPreDraw() override {
SkAutoTDelete<SkBBHFactory> factory;
switch (fBBH) {
case kNone: break;
@ -185,7 +185,7 @@ public:
fPic.reset(recorder.endRecording());
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
for (int i = 0; i < loops; i++) {
// This inner loop guarantees we make the same choices for all bench variants.
SkRandom rand;

View File

@ -25,11 +25,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
void onPreDraw() SK_OVERRIDE {
void onPreDraw() override {
SkImageInfo info = SkImageInfo::Make(W, H, fColorType, kUnpremul_SkAlphaType);
fBmp1.allocPixels(info); // used in writePixels
@ -43,7 +43,7 @@ protected:
fBmp2.allocPixels(info); // used in readPixels()
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
canvas->clear(SK_ColorBLACK);
for (int loop = 0; loop < loops; ++loop) {

View File

@ -26,15 +26,15 @@ public:
fName.printf("rtree_%s_build", name);
}
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkRandom rand;
SkAutoTMalloc<SkRect> rects(NUM_BUILD_RECTS);
for (int i = 0; i < NUM_BUILD_RECTS; ++i) {
@ -60,14 +60,14 @@ public:
fName.printf("rtree_%s_query", name);
}
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
void onPreDraw() SK_OVERRIDE {
void onPreDraw() override {
SkRandom rand;
SkAutoTMalloc<SkRect> rects(NUM_QUERY_RECTS);
for (int i = 0; i < NUM_QUERY_RECTS; ++i) {
@ -76,7 +76,7 @@ protected:
fTree.insert(rects.get(), NUM_QUERY_RECTS);
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkRandom rand;
for (int i = 0; i < loops; ++i) {
SkTDArray<unsigned> hits;

View File

@ -20,11 +20,11 @@ public:
ReadPixBench() {}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return "readpix";
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
canvas->clear(SK_ColorBLACK);
SkISize size = canvas->getDeviceSize();

View File

@ -16,10 +16,10 @@ public:
RecordingBench(const char* name, const SkPicture*, bool useBBH);
protected:
const char* onGetName() SK_OVERRIDE;
bool isSuitableFor(Backend) SK_OVERRIDE;
void onDraw(const int loops, SkCanvas*) SK_OVERRIDE;
SkIPoint onGetSize() SK_OVERRIDE;
const char* onGetName() override;
bool isSuitableFor(Backend) override;
void onDraw(const int loops, SkCanvas*) override;
SkIPoint onGetSize() override;
private:
SkAutoTUnref<const SkPicture> fSrc;

View File

@ -92,14 +92,14 @@ public:
}
protected:
void setupPaint(SkPaint* paint) SK_OVERRIDE {
void setupPaint(SkPaint* paint) override {
this->INHERITED::setupPaint(paint);
// srcmode is most interesting when we're not opaque
paint->setAlpha(0x80);
paint->setXfermode(fMode);
}
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
fName.set(this->INHERITED::onGetName());
fName.prepend("srcmode_");
return fName.c_str();

View File

@ -64,15 +64,15 @@ public:
}
protected:
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return kNonRendering_Backend == backend;
}
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
void onPreDraw() SK_OVERRIDE {
void onPreDraw() override {
SkASSERT(NULL == fRectanizer.get());
if (kPow2_RectanizerType == fRectanizerType) {
@ -83,7 +83,7 @@ protected:
}
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkRandom rand;
SkIPoint16 loc;
SkISize size;

View File

@ -20,11 +20,11 @@ public:
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return "rectori";
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkRandom Random;
for (int i = 0; i < loops; i++) {

View File

@ -18,7 +18,7 @@ class AtomicInc32 : public Benchmark {
public:
AtomicInc32() : fX(0) {}
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
@ -42,7 +42,7 @@ class AtomicInc64 : public Benchmark {
public:
AtomicInc64() : fX(0) {}
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
@ -64,7 +64,7 @@ private:
class RefCntBench_Stack : public Benchmark {
public:
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
@ -100,7 +100,7 @@ private:
class RefCntBench_Heap : public Benchmark {
public:
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
@ -127,7 +127,7 @@ private:
class RefCntBench_New : public Benchmark {
public:
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
@ -155,7 +155,7 @@ private:
class WeakRefCntBench_Stack : public Benchmark {
public:
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
@ -186,16 +186,16 @@ public:
class WeakRefCntBench_Heap : public Benchmark {
public:
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return "ref_cnt_heap_weak";
}
void onDraw(const int loops, SkCanvas*) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas*) override {
char memory[sizeof(PlacedWeakRefCnt)];
for (int i = 0; i < loops; ++i) {
PlacedWeakRefCnt* ref = new (memory) PlacedWeakRefCnt();
@ -213,16 +213,16 @@ private:
class WeakRefCntBench_New : public Benchmark {
public:
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return "ref_cnt_new_weak";
}
void onDraw(const int loops, SkCanvas*) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas*) override {
for (int i = 0; i < loops; ++i) {
SkWeakRefCnt* ref = new SkWeakRefCnt();
for (int j = 0; j < M; ++j) {

View File

@ -99,7 +99,7 @@ public:
}
}
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}

View File

@ -45,14 +45,14 @@ public:
fB.setRect(0, 0, H, W);
}
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
protected:
const char* onGetName() SK_OVERRIDE { return fName.c_str(); }
const char* onGetName() override { return fName.c_str(); }
void onDraw(const int loops, SkCanvas*) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas*) override {
Proc proc = fProc;
for (int i = 0; i < loops; ++i) {

View File

@ -104,11 +104,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
void onPreDraw() SK_OVERRIDE {
void onPreDraw() override {
fBitmap.allocPixels();
fBitmap.eraseColor(kOpaque_SkAlphaType == fAlphaType ? SK_ColorWHITE : 0);
@ -127,7 +127,7 @@ protected:
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkPaint paint(fPaint);
this->setupPaint(&paint);

View File

@ -75,9 +75,9 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE { return fName.c_str(); }
const char* onGetName() override { return fName.c_str(); }
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkPaint paint;
paint.setAntiAlias(fAA);
paint.setXfermodeMode(fMode);

View File

@ -19,16 +19,16 @@ class SKPBench : public Benchmark {
public:
SKPBench(const char* name, const SkPicture*, const SkIRect& devClip, SkScalar scale,
bool useMultiPictureDraw);
~SKPBench() SK_OVERRIDE;
~SKPBench() override;
protected:
const char* onGetName() SK_OVERRIDE;
const char* onGetUniqueName() SK_OVERRIDE;
void onPerCanvasPreDraw(SkCanvas*) SK_OVERRIDE;
void onPerCanvasPostDraw(SkCanvas*) SK_OVERRIDE;
bool isSuitableFor(Backend backend) SK_OVERRIDE;
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE;
SkIPoint onGetSize() SK_OVERRIDE;
const char* onGetName() override;
const char* onGetUniqueName() override;
void onPerCanvasPreDraw(SkCanvas*) override;
void onPerCanvasPostDraw(SkCanvas*) override;
bool isSuitableFor(Backend backend) override;
void onDraw(const int loops, SkCanvas* canvas) override;
SkIPoint onGetSize() override;
private:
SkAutoTUnref<const SkPicture> fPic;

View File

@ -18,7 +18,7 @@ public:
fName.printf("scalar_%s", name);
}
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
@ -27,11 +27,11 @@ public:
protected:
virtual int mulLoopCount() const { return 1; }
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
for (int i = 0; i < loops; i++) {
this->performTest();
}
@ -101,8 +101,8 @@ public:
}
}
protected:
int mulLoopCount() const SK_OVERRIDE { return 1; }
void performTest() SK_OVERRIDE {
int mulLoopCount() const override { return 1; }
void performTest() override {
int sum = 0;
for (size_t i = 0; i < ARRAY_N; ++i) {
// We pass -fArray[i], so the compiler can't cheat and treat the
@ -140,16 +140,16 @@ public:
}
}
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return "rect_bounds";
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkRect r;
for (int i = 0; i < loops; ++i) {
for (int i = 0; i < 1000; ++i) {

View File

@ -36,16 +36,16 @@ public:
}
}
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
void onPreDraw() SK_OVERRIDE {
void onPreDraw() override {
SkString resourcePath = GetResourcePath();
if (resourcePath.isEmpty()) {
fValid = false;
@ -73,7 +73,7 @@ protected:
}
}
void onDraw(const int loops, SkCanvas*) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas*) override {
if (!fValid) {
#ifdef SK_DEBUG
SkDebugf("stream was invalid: %s\n", fFilename.c_str());

View File

@ -107,22 +107,22 @@ public:
fName.printf("sort_%s_%s", gSorts[s].fName, gRec[t].fName);
}
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
// Delayed initialization only done if onDraw will be called.
void onPreDraw() SK_OVERRIDE {
void onPreDraw() override {
fUnsorted.reset(N);
gRec[fType].fProc(fUnsorted.get());
}
void onDraw(const int loops, SkCanvas*) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas*) override {
SkAutoTMalloc<int> sorted(N);
for (int i = 0; i < loops; i++) {
memcpy(sorted.get(), fUnsorted.get(), N*sizeof(int));

View File

@ -41,11 +41,11 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return fName.c_str();
}
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkISize size = canvas->getDeviceSize();
canvas->clear(0xFFFF0000);

View File

@ -12,16 +12,16 @@
class WriterBench : public Benchmark {
public:
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
protected:
const char* onGetName() SK_OVERRIDE {
const char* onGetName() override {
return "writer";
}
void onDraw(const int loops, SkCanvas*) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas*) override {
static const char gStr[] = "abcdefghimjklmnopqrstuvwxyz";
static const size_t gLen = strlen(gStr);
SkWriter32 writer;

View File

@ -29,9 +29,9 @@ public:
}
protected:
const char* onGetName() SK_OVERRIDE { return fName.c_str(); }
const char* onGetName() override { return fName.c_str(); }
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
SkISize size = canvas->getDeviceSize();
SkRandom random;
for (int i = 0; i < loops; ++i) {
@ -63,14 +63,14 @@ private:
class XferCreateBench : public Benchmark {
public:
bool isSuitableFor(Backend backend) SK_OVERRIDE {
bool isSuitableFor(Backend backend) override {
return backend == kNonRendering_Backend;
}
protected:
const char* onGetName() SK_OVERRIDE { return "xfermode_create"; }
const char* onGetName() override { return "xfermode_create"; }
void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
void onDraw(const int loops, SkCanvas* canvas) override {
for (int outer = 0; outer < loops * 10; ++outer) {
for (int i = 0; i <= SkXfermode::kLastMode; ++i) {
SkXfermode* xfer = SkXfermode::Create(SkXfermode::Mode(i));

View File

@ -215,9 +215,9 @@ static void push_sink(const char* tag, Sink* s) {
}
// Try a noop Src as a canary. If it fails, skip this sink.
struct : public Src {
Error draw(SkCanvas*) const SK_OVERRIDE { return ""; }
SkISize size() const SK_OVERRIDE { return SkISize::Make(16, 16); }
Name name() const SK_OVERRIDE { return "noop"; }
Error draw(SkCanvas*) const override { return ""; }
SkISize size() const override { return SkISize::Make(16, 16); }
Name name() const override { return "noop"; }
} noop;
SkBitmap bitmap;
@ -526,14 +526,14 @@ static void gather_tests() {
static void run_test(skiatest::Test* test) {
struct : public skiatest::Reporter {
void reportFailed(const skiatest::Failure& failure) SK_OVERRIDE {
void reportFailed(const skiatest::Failure& failure) override {
fail(failure.toString());
JsonWriter::AddTestFailure(failure);
}
bool allowExtendedTest() const SK_OVERRIDE {
bool allowExtendedTest() const override {
return FLAGS_pathOpsExtended;
}
bool verbose() const SK_OVERRIDE { return FLAGS_veryVerbose; }
bool verbose() const override { return FLAGS_veryVerbose; }
} reporter;
WallTimer timer;
timer.start();

View File

@ -450,12 +450,12 @@ Error ViaMatrix::draw(const Src& src, SkBitmap* bitmap, SkWStream* stream, SkStr
fSize = auto_compute_translate(&fMatrix, src.size().width(), src.size().height());
}
Error draw(SkCanvas* canvas) const SK_OVERRIDE {
Error draw(SkCanvas* canvas) const override {
canvas->concat(fMatrix);
return fSrc.draw(canvas);
}
SkISize size() const SK_OVERRIDE { return fSize; }
Name name() const SK_OVERRIDE { sk_throw(); return ""; } // No one should be calling this.
SkISize size() const override { return fSize; }
Name name() const override { sk_throw(); return ""; } // No one should be calling this.
} proxy(src, fMatrix);
return fSink->draw(proxy, bitmap, stream, log);
}
@ -505,15 +505,15 @@ Error ViaPipe::draw(const Src& src, SkBitmap* bitmap, SkWStream* stream, SkStrin
const Src& fSrc;
ProxySrc(const Src& src) : fSrc(src) {}
Error draw(SkCanvas* canvas) const SK_OVERRIDE {
Error draw(SkCanvas* canvas) const override {
SkISize size = this->size();
PipeController controller(canvas, &SkImageDecoder::DecodeMemory);
SkGPipeWriter pipe;
const uint32_t kFlags = 0; // We mirror SkDeferredCanvas, which doesn't use any flags.
return fSrc.draw(pipe.startRecording(&controller, kFlags, size.width(), size.height()));
}
SkISize size() const SK_OVERRIDE { return fSrc.size(); }
Name name() const SK_OVERRIDE { sk_throw(); return ""; } // No one should be calling this.
SkISize size() const override { return fSrc.size(); }
Name name() const override { sk_throw(); return ""; } // No one should be calling this.
} proxy(src);
return fSink->draw(proxy, bitmap, stream, log);
}
@ -546,12 +546,12 @@ Error ViaSerialization::draw(const Src& src, SkBitmap* bitmap, SkWStream* stream
const SkISize fSize;
ProxySrc(const SkPicture* pic, SkISize size) : fPic(pic), fSize(size) {}
Error draw(SkCanvas* canvas) const SK_OVERRIDE {
Error draw(SkCanvas* canvas) const override {
canvas->drawPicture(fPic);
return "";
}
SkISize size() const SK_OVERRIDE { return fSize; }
Name name() const SK_OVERRIDE { sk_throw(); return ""; } // No one should be calling this.
SkISize size() const override { return fSize; }
Name name() const override { sk_throw(); return ""; } // No one should be calling this.
} proxy(deserialized, src.size());
return fSink->draw(proxy, bitmap, stream, log);
}
@ -583,7 +583,7 @@ Error ViaTiles::draw(const Src& src, SkBitmap* bitmap, SkWStream* stream, SkStri
ProxySrc(int w, int h, const SkPicture* pic, SkISize size)
: fW(w), fH(h), fPic(pic), fSize(size) {}
Error draw(SkCanvas* canvas) const SK_OVERRIDE {
Error draw(SkCanvas* canvas) const override {
const int xTiles = (fSize.width() + fW - 1) / fW,
yTiles = (fSize.height() + fH - 1) / fH;
SkMultiPictureDraw mpd(xTiles*yTiles);
@ -616,8 +616,8 @@ Error ViaTiles::draw(const Src& src, SkBitmap* bitmap, SkWStream* stream, SkStri
surfaces.unrefAll();
return "";
}
SkISize size() const SK_OVERRIDE { return fSize; }
Name name() const SK_OVERRIDE { sk_throw(); return ""; } // No one should be calling this.
SkISize size() const override { return fSize; }
Name name() const override { sk_throw(); return ""; } // No one should be calling this.
} proxy(fW, fH, pic, src.size());
return fSink->draw(proxy, bitmap, stream, log);
}

View File

@ -81,9 +81,9 @@ class GMSrc : public Src {
public:
explicit GMSrc(skiagm::GMRegistry::Factory);
Error draw(SkCanvas*) const SK_OVERRIDE;
SkISize size() const SK_OVERRIDE;
Name name() const SK_OVERRIDE;
Error draw(SkCanvas*) const override;
SkISize size() const override;
Name name() const override;
private:
skiagm::GMRegistry::Factory fFactory;
};
@ -96,9 +96,9 @@ public:
};
CodecSrc(Path, Mode);
Error draw(SkCanvas*) const SK_OVERRIDE;
SkISize size() const SK_OVERRIDE;
Name name() const SK_OVERRIDE;
Error draw(SkCanvas*) const override;
SkISize size() const override;
Name name() const override;
private:
Path fPath;
Mode fMode;
@ -111,9 +111,9 @@ public:
// divisor > 0 means decode in subsets, dividing into a divisor x divisor grid.
explicit ImageSrc(Path path, int divisor = 0);
Error draw(SkCanvas*) const SK_OVERRIDE;
SkISize size() const SK_OVERRIDE;
Name name() const SK_OVERRIDE;
Error draw(SkCanvas*) const override;
SkISize size() const override;
Name name() const override;
private:
Path fPath;
const int fDivisor;
@ -123,9 +123,9 @@ class SKPSrc : public Src {
public:
explicit SKPSrc(Path path);
Error draw(SkCanvas*) const SK_OVERRIDE;
SkISize size() const SK_OVERRIDE;
Name name() const SK_OVERRIDE;
Error draw(SkCanvas*) const override;
SkISize size() const override;
Name name() const override;
private:
Path fPath;
};
@ -136,9 +136,9 @@ class NullSink : public Sink {
public:
NullSink() {}
Error draw(const Src& src, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE;
int enclave() const SK_OVERRIDE { return kAnyThread_Enclave; }
const char* fileExtension() const SK_OVERRIDE { return ""; }
Error draw(const Src& src, SkBitmap*, SkWStream*, SkString*) const override;
int enclave() const override { return kAnyThread_Enclave; }
const char* fileExtension() const override { return ""; }
};
@ -146,9 +146,9 @@ class GPUSink : public Sink {
public:
GPUSink(GrContextFactory::GLContextType, GrGLStandard, int samples, bool dfText, bool threaded);
Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE;
int enclave() const SK_OVERRIDE;
const char* fileExtension() const SK_OVERRIDE { return "png"; }
Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
int enclave() const override;
const char* fileExtension() const override { return "png"; }
private:
GrContextFactory::GLContextType fContextType;
GrGLStandard fGpuAPI;
@ -161,27 +161,27 @@ class PDFSink : public Sink {
public:
PDFSink();
Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE;
int enclave() const SK_OVERRIDE { return kAnyThread_Enclave; }
const char* fileExtension() const SK_OVERRIDE { return "pdf"; }
Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
int enclave() const override { return kAnyThread_Enclave; }
const char* fileExtension() const override { return "pdf"; }
};
class XPSSink : public Sink {
public:
XPSSink();
Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE;
int enclave() const SK_OVERRIDE { return kAnyThread_Enclave; }
const char* fileExtension() const SK_OVERRIDE { return "xps"; }
Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
int enclave() const override { return kAnyThread_Enclave; }
const char* fileExtension() const override { return "xps"; }
};
class RasterSink : public Sink {
public:
explicit RasterSink(SkColorType);
Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE;
int enclave() const SK_OVERRIDE { return kAnyThread_Enclave; }
const char* fileExtension() const SK_OVERRIDE { return "png"; }
Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
int enclave() const override { return kAnyThread_Enclave; }
const char* fileExtension() const override { return "png"; }
private:
SkColorType fColorType;
};
@ -190,18 +190,18 @@ class SKPSink : public Sink {
public:
SKPSink();
Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE;
int enclave() const SK_OVERRIDE { return kAnyThread_Enclave; }
const char* fileExtension() const SK_OVERRIDE { return "skp"; }
Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
int enclave() const override { return kAnyThread_Enclave; }
const char* fileExtension() const override { return "skp"; }
};
class SVGSink : public Sink {
public:
SVGSink();
Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE;
int enclave() const SK_OVERRIDE { return kAnyThread_Enclave; }
const char* fileExtension() const SK_OVERRIDE { return "svg"; }
Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
int enclave() const override { return kAnyThread_Enclave; }
const char* fileExtension() const override { return "svg"; }
};
@ -211,9 +211,9 @@ class ViaMatrix : public Sink {
public:
ViaMatrix(SkMatrix, Sink*);
Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE;
int enclave() const SK_OVERRIDE { return fSink->enclave(); }
const char* fileExtension() const SK_OVERRIDE { return fSink->fileExtension(); }
Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
int enclave() const override { return fSink->enclave(); }
const char* fileExtension() const override { return fSink->fileExtension(); }
private:
SkMatrix fMatrix;
SkAutoTDelete<Sink> fSink;
@ -223,9 +223,9 @@ class ViaUpright : public Sink {
public:
ViaUpright(SkMatrix, Sink*);
Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE;
int enclave() const SK_OVERRIDE { return fSink->enclave(); }
const char* fileExtension() const SK_OVERRIDE { return fSink->fileExtension(); }
Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
int enclave() const override { return fSink->enclave(); }
const char* fileExtension() const override { return fSink->fileExtension(); }
private:
SkMatrix fMatrix;
SkAutoTDelete<Sink> fSink;
@ -235,9 +235,9 @@ class ViaPipe : public Sink {
public:
explicit ViaPipe(Sink*);
Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE;
int enclave() const SK_OVERRIDE { return fSink->enclave(); }
const char* fileExtension() const SK_OVERRIDE { return fSink->fileExtension(); }
Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
int enclave() const override { return fSink->enclave(); }
const char* fileExtension() const override { return fSink->fileExtension(); }
private:
SkAutoTDelete<Sink> fSink;
};
@ -246,9 +246,9 @@ class ViaSerialization : public Sink {
public:
explicit ViaSerialization(Sink*);
Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE;
int enclave() const SK_OVERRIDE { return fSink->enclave(); }
const char* fileExtension() const SK_OVERRIDE { return fSink->fileExtension(); }
Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
int enclave() const override { return fSink->enclave(); }
const char* fileExtension() const override { return fSink->fileExtension(); }
private:
SkAutoTDelete<Sink> fSink;
};
@ -257,9 +257,9 @@ class ViaTiles : public Sink {
public:
ViaTiles(int w, int h, SkBBHFactory*, Sink*);
Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE;
int enclave() const SK_OVERRIDE { return fSink->enclave(); }
const char* fileExtension() const SK_OVERRIDE { return fSink->fileExtension(); }
Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
int enclave() const override { return fSink->enclave(); }
const char* fileExtension() const override { return fSink->fileExtension(); }
private:
const int fW, fH;
SkAutoTDelete<SkBBHFactory> fFactory;

View File

@ -39,7 +39,7 @@ namespace {
class ContextFactory : public android::uirenderer::IContextFactory {
public:
android::uirenderer::AnimationContext* createAnimationContext
(android::uirenderer::renderthread::TimeLord& clock) SK_OVERRIDE {
(android::uirenderer::renderthread::TimeLord& clock) override {
return new android::uirenderer::AnimationContext(clock);
}
};
@ -181,7 +181,7 @@ Error ViaAndroidSDK::draw(const Src& src,
ProxySrc(const Src& src)
: fSrc(src) {}
Error draw(SkCanvas* canvas) const SK_OVERRIDE {
Error draw(SkCanvas* canvas) const override {
// Pass through HWUI's upper layers to get operational transforms
SkAutoTDelete<android::Canvas> ac (android::Canvas::create_canvas(canvas));
SkAutoTUnref<android::uirenderer::SkiaCanvasProxy> scProxy
@ -195,8 +195,8 @@ Error ViaAndroidSDK::draw(const Src& src,
return "";
}
SkISize size() const SK_OVERRIDE { return fSrc.size(); }
Name name() const SK_OVERRIDE { sk_throw(); return ""; }
SkISize size() const override { return fSrc.size(); }
Name name() const override { sk_throw(); return ""; }
} proxy(src);
return fSink->draw(proxy, bitmap, stream, log);

View File

@ -22,9 +22,9 @@ class HWUISink : public Sink {
public:
HWUISink() { }
Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE;
int enclave() const SK_OVERRIDE { return kGPU_Enclave; }
const char* fileExtension() const SK_OVERRIDE { return "png"; }
Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
int enclave() const override { return kGPU_Enclave; }
const char* fileExtension() const override { return "png"; }
};
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
@ -35,9 +35,9 @@ class ViaAndroidSDK : public Sink {
public:
explicit ViaAndroidSDK(Sink*);
Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE;
int enclave() const SK_OVERRIDE { return fSink->enclave(); }
const char* fileExtension() const SK_OVERRIDE { return fSink->fileExtension(); }
Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
int enclave() const override { return fSink->enclave(); }
const char* fileExtension() const override { return fSink->fileExtension(); }
private:
SkAutoTDelete<Sink> fSink;

View File

@ -25,7 +25,7 @@ public:
kGPU_DeviceType,
};
HelloWorldWindow(void* hwnd);
virtual ~HelloWorldWindow() SK_OVERRIDE;
virtual ~HelloWorldWindow() override;
// Changes the device type of the object.
bool setUpBackend();
@ -33,7 +33,7 @@ public:
DeviceType getDeviceType() const { return fType; }
protected:
SkSurface* createSurface() SK_OVERRIDE {
SkSurface* createSurface() override {
if (kGPU_DeviceType == fType) {
SkSurfaceProps props(INHERITED::getSurfaceProps());
return SkSurface::NewRenderTargetDirect(fRenderTarget, &props);
@ -43,16 +43,16 @@ protected:
return fSurface = SkSurface::NewRaster(info);
}
void draw(SkCanvas* canvas) SK_OVERRIDE;
void draw(SkCanvas* canvas) override;
void drawContents(SkCanvas* canvas);
void onSizeChange() SK_OVERRIDE;
void onSizeChange() override;
private:
bool findNextMatch(); // Set example to the first one that matches FLAGS_match.
void setTitle();
void setUpRenderTarget();
bool onHandleChar(SkUnichar unichar) SK_OVERRIDE;
bool onHandleChar(SkUnichar unichar) override;
void tearDownBackend();
// draw contents

View File

@ -16,13 +16,13 @@ public:
virtual bool canDrawPath(const SkPath& path,
const SkStrokeRec& stroke,
const GrDrawTarget* target,
bool antiAlias) const SK_OVERRIDE;
bool antiAlias) const override;
protected:
virtual bool onDrawPath(const SkPath& path,
const SkStrokeRec& stroke,
GrDrawTarget* target,
bool antiAlias) SK_OVERRIDE;
bool antiAlias) override;
private:
typedef GrPathRenderer INHERITED;

View File

@ -26,13 +26,13 @@ public:
explicit SkNulCanvas(const SkBitmap& bitmap) : SkCanvas(bitmap) {}
virtual ~SkNulCanvas() {}
void beginCommentGroup(const char* description) SK_OVERRIDE {}
void addComment(const char* kywd, const char* value) SK_OVERRIDE {}
void endCommentGroup() SK_OVERRIDE {}
SkDrawFilter* setDrawFilter(SkDrawFilter* filter) SK_OVERRIDE {return NULL;}
void beginCommentGroup(const char* description) override {}
void addComment(const char* kywd, const char* value) override {}
void endCommentGroup() override {}
SkDrawFilter* setDrawFilter(SkDrawFilter* filter) override {return NULL;}
bool isClipEmpty() const SK_OVERRIDE { return false; }
bool getClipBounds(SkRect* bounds) const SK_OVERRIDE {
bool isClipEmpty() const override { return false; }
bool getClipBounds(SkRect* bounds) const override {
if (NULL != bounds) {
bounds->setXYWH(0, 0,
SkIntToScalar(this->imageInfo().width()),
@ -40,7 +40,7 @@ public:
}
return true;
}
bool getClipDeviceBounds(SkIRect* bounds) const SK_OVERRIDE {
bool getClipDeviceBounds(SkIRect* bounds) const override {
if (NULL != bounds) {
bounds->setLargest();
}
@ -52,54 +52,54 @@ protected:
virtual SkBaseDevice* setDevice(SkBaseDevice* device) {return NULL;}
virtual SaveLayerStrategy willSaveLayer(const SkRect* bounds, const SkPaint* paint,
SaveFlags flags) SK_OVERRIDE {
SaveFlags flags) override {
this->INHERITED::willSaveLayer(bounds, paint, flags);
return kNoLayer_SaveLayerStrategy;
}
virtual void onDrawText(const void* text, size_t byteLength, SkScalar x,
SkScalar y, const SkPaint& paint) SK_OVERRIDE {}
SkScalar y, const SkPaint& paint) override {}
virtual void onDrawPosText(const void* text, size_t byteLength,
const SkPoint pos[], const SkPaint& paint) SK_OVERRIDE {}
const SkPoint pos[], const SkPaint& paint) override {}
virtual void onDrawPosTextH(const void* text, size_t byteLength,
const SkScalar xpos[], SkScalar constY,
const SkPaint& paint) SK_OVERRIDE {}
const SkPaint& paint) override {}
virtual void onDrawTextOnPath(const void* text, size_t byteLength,
const SkPath& path, const SkMatrix* matrix,
const SkPaint& paint) SK_OVERRIDE {}
const SkPaint& paint) override {}
void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE {}
void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE {}
void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE {}
void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE {}
void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) override {}
void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) override {}
void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) override {}
void onClipRegion(const SkRegion&, SkRegion::Op) override {}
void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) SK_OVERRIDE {}
void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) override {}
void onDrawPaint(const SkPaint& paint) SK_OVERRIDE {}
void onDrawPaint(const SkPaint& paint) override {}
void onDrawPoints(PointMode mode, size_t count, const SkPoint pts[],
const SkPaint& paint) SK_OVERRIDE {}
void onDrawRect(const SkRect& rect, const SkPaint& paint) SK_OVERRIDE {}
void onDrawOval(const SkRect& oval, const SkPaint&) SK_OVERRIDE {}
void onDrawRRect(const SkRRect& rrect, const SkPaint& paint) SK_OVERRIDE {}
void onDrawPath(const SkPath& path, const SkPaint& paint) SK_OVERRIDE {}
const SkPaint& paint) override {}
void onDrawRect(const SkRect& rect, const SkPaint& paint) override {}
void onDrawOval(const SkRect& oval, const SkPaint&) override {}
void onDrawRRect(const SkRRect& rrect, const SkPaint& paint) override {}
void onDrawPath(const SkPath& path, const SkPaint& paint) override {}
void onDrawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top,
const SkPaint* paint = NULL) SK_OVERRIDE {}
const SkPaint* paint = NULL) override {}
void onDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src,
const SkRect& dst,
const SkPaint* paint,
DrawBitmapRectFlags flags) SK_OVERRIDE {}
void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*) SK_OVERRIDE {}
DrawBitmapRectFlags flags) override {}
void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*) override {}
void onDrawImageRect(const SkImage*, const SkRect* src, const SkRect& dst,
const SkPaint*) SK_OVERRIDE{}
const SkPaint*) override{}
void onDrawBitmapNine(const SkBitmap& bitmap, const SkIRect& center,
const SkRect& dst, const SkPaint* paint = NULL) SK_OVERRIDE {}
const SkRect& dst, const SkPaint* paint = NULL) override {}
void onDrawSprite(const SkBitmap& bitmap, int left, int top,
const SkPaint* paint = NULL) SK_OVERRIDE {}
const SkPaint* paint = NULL) override {}
void onDrawVertices(VertexMode vmode, int vertexCount,
const SkPoint vertices[], const SkPoint texs[],
const SkColor colors[], SkXfermode* xmode,
const uint16_t indices[], int indexCount,
const SkPaint& paint) SK_OVERRIDE {}
const SkPaint& paint) override {}
private:

View File

@ -19,8 +19,8 @@ public:
SkCanvas* canvas)
: INHERITED(tokenizer, pdfContext, canvas) {}
SkPdfResult consumeToken(PdfToken& token) SK_OVERRIDE;
void loop() SK_OVERRIDE;
SkPdfResult consumeToken(PdfToken& token) override;
void loop() override;
private:
typedef SkPdfTokenLooper INHERITED;

View File

@ -212,8 +212,8 @@ public:
explicit PdfInlineImageLooper(SkPdfTokenLooper* parent)
: INHERITED(parent) {}
SkPdfResult consumeToken(PdfToken& token) SK_OVERRIDE;
void loop() SK_OVERRIDE;
SkPdfResult consumeToken(PdfToken& token) override;
void loop() override;
private:
typedef SkPdfTokenLooper INHERITED;
@ -224,8 +224,8 @@ public:
explicit PdfCompatibilitySectionLooper(SkPdfTokenLooper* parent)
: INHERITED (parent) {}
SkPdfResult consumeToken(PdfToken& token) SK_OVERRIDE;
void loop() SK_OVERRIDE;
SkPdfResult consumeToken(PdfToken& token) override;
void loop() override;
private:
typedef SkPdfTokenLooper INHERITED;

View File

@ -25,15 +25,15 @@ public:
virtual ~SkV8ExampleWindow();
protected:
void onDraw(SkCanvas* canvas) SK_OVERRIDE;
void onSizeChange() SK_OVERRIDE;
void onDraw(SkCanvas* canvas) override;
void onSizeChange() override;
#if SK_SUPPORT_GPU
SkSurface* createSurface() SK_OVERRIDE;
SkSurface* createSurface() override;
#endif
#ifdef SK_BUILD_FOR_WIN
void onHandleInval(const SkIRect&) SK_OVERRIDE;
void onHandleInval(const SkIRect&) override;
#endif
void windowSizeChanged();

View File

@ -20,11 +20,11 @@ public:
virtual bool canDrawPath(const SkPath& path,
const SkStrokeRec& stroke,
const GrDrawTarget* target,
bool antiAlias) const SK_OVERRIDE;
bool antiAlias) const override;
protected:
virtual bool onDrawPath(const SkPath& path,
const SkStrokeRec& stroke,
GrDrawTarget* target,
bool antiAlias) SK_OVERRIDE;
bool antiAlias) override;
};

View File

@ -40,7 +40,7 @@ public:
#endif
}
void setUpBackend(SampleWindow* win, int msaaSampleCount) SK_OVERRIDE {
void setUpBackend(SampleWindow* win, int msaaSampleCount) override {
SkASSERT(SkOSWindow::kNone_BackEndType == fBackend);
fBackend = SkOSWindow::kNone_BackEndType;
@ -101,7 +101,7 @@ public:
this->windowSizeChanged(win);
}
void tearDownBackend(SampleWindow *win) SK_OVERRIDE {
void tearDownBackend(SampleWindow *win) override {
#if SK_SUPPORT_GPU
SkSafeUnref(fCurContext);
fCurContext = NULL;
@ -116,7 +116,7 @@ public:
fBackend = SampleWindow::kNone_BackEndType;
}
SkSurface* createSurface(SampleWindow::DeviceType dType, SampleWindow* win) SK_OVERRIDE{
SkSurface* createSurface(SampleWindow::DeviceType dType, SampleWindow* win) override{
#if SK_SUPPORT_GPU
if (SampleWindow::IsGpuDeviceType(dType) && fCurContext) {
SkSurfaceProps props(win->getSurfaceProps());
@ -128,7 +128,7 @@ public:
virtual void publishCanvas(SampleWindow::DeviceType dType,
SkCanvas* canvas,
SampleWindow* win) SK_OVERRIDE {
SampleWindow* win) override {
#if SK_SUPPORT_GPU
if (NULL != fCurContext) {
fCurContext->flush();
@ -137,7 +137,7 @@ public:
win->present();
}
void windowSizeChanged(SampleWindow* win) SK_OVERRIDE {
void windowSizeChanged(SampleWindow* win) override {
#if SK_SUPPORT_GPU
if (NULL != fCurContext) {
SkOSWindow::AttachmentInfo info;
@ -159,7 +159,7 @@ public:
#endif
}
GrContext* getGrContext() SK_OVERRIDE {
GrContext* getGrContext() override {
#if SK_SUPPORT_GPU
return fCurContext;
#else
@ -167,7 +167,7 @@ public:
#endif
}
GrRenderTarget* getGrRenderTarget() SK_OVERRIDE {
GrRenderTarget* getGrRenderTarget() override {
#if SK_SUPPORT_GPU
return fCurRenderTarget;
#else

View File

@ -25,10 +25,10 @@ public:
virtual ~PageCachingDocument();
virtual SkCanvas* onBeginPage(SkScalar width,
SkScalar height,
const SkRect& content) SK_OVERRIDE;
void onEndPage() SK_OVERRIDE;
bool onClose(SkWStream*) SK_OVERRIDE;
void onAbort() SK_OVERRIDE;
const SkRect& content) override;
void onEndPage() override;
bool onClose(SkWStream*) override;
void onAbort() override;
private:
struct Page {

View File

@ -19,10 +19,10 @@ class SkDmuxWStream : public SkWStream {
public:
SkDmuxWStream(SkWStream* const streamArray[], size_t count);
~SkDmuxWStream();
virtual bool write(const void* buffer, size_t size) SK_OVERRIDE;
virtual void newline() SK_OVERRIDE;
virtual void flush() SK_OVERRIDE;
virtual size_t bytesWritten() const SK_OVERRIDE;
virtual bool write(const void* buffer, size_t size) override;
virtual void newline() override;
virtual void flush() override;
virtual size_t bytesWritten() const override;
private:
SkTDArray<SkWStream*> fWStreams;

View File

@ -31,11 +31,11 @@ class NullWStream : public SkWStream {
public:
NullWStream() : fBytesWritten(0) {
}
bool write(const void*, size_t size) SK_OVERRIDE {
bool write(const void*, size_t size) override {
fBytesWritten += size;
return true;
}
size_t bytesWritten() const SK_OVERRIDE {
size_t bytesWritten() const override {
return fBytesWritten;
}
size_t fBytesWritten;

View File

@ -71,15 +71,15 @@ public:
}
protected:
SkString onShortName() SK_OVERRIDE {
SkString onShortName() override {
return SkString("aaclip");
}
SkISize onISize() SK_OVERRIDE {
SkISize onISize() override {
return SkISize::Make(240, 120);
}
void onDraw(SkCanvas* canvas) SK_OVERRIDE {
void onDraw(SkCanvas* canvas) override {
// Initial pixel-boundary-aligned draw
draw_rect_tests(canvas);
@ -154,15 +154,15 @@ public:
CGImageGM() {}
protected:
SkString onShortName() SK_OVERRIDE {
SkString onShortName() override {
return SkString("cgimage");
}
SkISize onISize() SK_OVERRIDE {
SkISize onISize() override {
return SkISize::Make(800, 250);
}
void onDraw(SkCanvas* canvas) SK_OVERRIDE {
void onDraw(SkCanvas* canvas) override {
const struct {
SkColorType fCT;
SkAlphaType fAT;

View File

@ -134,13 +134,13 @@ namespace skiagm {
protected:
SkString onShortName() SK_OVERRIDE {
SkString onShortName() override {
return SkString("aarectmodes");
}
SkISize onISize() SK_OVERRIDE { return SkISize::Make(640, 480); }
SkISize onISize() override { return SkISize::Make(640, 480); }
void onDraw(SkCanvas* canvas) SK_OVERRIDE {
void onDraw(SkCanvas* canvas) override {
if (false) { // avoid bit rot, suppress warning
test4(canvas);
}

View File

@ -16,11 +16,11 @@ public:
AddArcGM() : fRotate(0) {}
protected:
SkString onShortName() SK_OVERRIDE { return SkString("addarc"); }
SkString onShortName() override { return SkString("addarc"); }
SkISize onISize() SK_OVERRIDE { return SkISize::Make(1040, 1040); }
SkISize onISize() override { return SkISize::Make(1040, 1040); }
void onDraw(SkCanvas* canvas) SK_OVERRIDE {
void onDraw(SkCanvas* canvas) override {
canvas->translate(20, 20);
SkRect r = SkRect::MakeWH(1000, 1000);
@ -51,7 +51,7 @@ protected:
}
}
bool onAnimate(const SkAnimTimer& timer) SK_OVERRIDE {
bool onAnimate(const SkAnimTimer& timer) override {
fRotate = timer.scaled(1, 360);
return true;
}
@ -71,11 +71,11 @@ public:
AddArcMeasGM() {}
protected:
SkString onShortName() SK_OVERRIDE { return SkString("addarc_meas"); }
SkString onShortName() override { return SkString("addarc_meas"); }
SkISize onISize() SK_OVERRIDE { return SkISize::Make(2*R + 40, 2*R + 40); }
SkISize onISize() override { return SkISize::Make(2*R + 40, 2*R + 40); }
void onDraw(SkCanvas* canvas) SK_OVERRIDE {
void onDraw(SkCanvas* canvas) override {
canvas->translate(R + 20, R + 20);
SkPaint paint;
@ -122,11 +122,11 @@ public:
StrokeCircleGM() : fRotate(0) {}
protected:
SkString onShortName() SK_OVERRIDE { return SkString("strokecircle"); }
SkString onShortName() override { return SkString("strokecircle"); }
SkISize onISize() SK_OVERRIDE { return SkISize::Make(520, 520); }
SkISize onISize() override { return SkISize::Make(520, 520); }
void onDraw(SkCanvas* canvas) SK_OVERRIDE {
void onDraw(SkCanvas* canvas) override {
canvas->scale(20, 20);
canvas->translate(13, 13);
@ -151,7 +151,7 @@ protected:
}
}
bool onAnimate(const SkAnimTimer& timer) SK_OVERRIDE {
bool onAnimate(const SkAnimTimer& timer) override {
fRotate = timer.scaled(60, 360);
return true;
}
@ -178,11 +178,11 @@ public:
ManyArcsGM() {}
protected:
SkString onShortName() SK_OVERRIDE { return SkString("manyarcs"); }
SkString onShortName() override { return SkString("manyarcs"); }
SkISize onISize() SK_OVERRIDE { return SkISize::Make(620, 330); }
SkISize onISize() override { return SkISize::Make(620, 330); }
void onDraw(SkCanvas* canvas) SK_OVERRIDE {
void onDraw(SkCanvas* canvas) override {
SkPaint paint;
paint.setAntiAlias(true);
paint.setStyle(SkPaint::kStroke_Style);

View File

@ -14,11 +14,11 @@ public:
AlphaGradientsGM() {}
protected:
SkString onShortName() SK_OVERRIDE {
SkString onShortName() override {
return SkString("alphagradients");
}
SkISize onISize() SK_OVERRIDE {
SkISize onISize() override {
return SkISize::Make(640, 480);
}
@ -38,7 +38,7 @@ protected:
canvas->drawRect(r, paint);
}
void onDraw(SkCanvas* canvas) SK_OVERRIDE {
void onDraw(SkCanvas* canvas) override {
static const struct {
SkColor fColor0;
SkColor fColor1;

View File

@ -21,15 +21,15 @@ public:
protected:
SkString onShortName() SK_OVERRIDE {
SkString onShortName() override {
return SkString("arcofzorro");
}
SkISize onISize() SK_OVERRIDE {
SkISize onISize() override {
return SkISize::Make(1000, 1000);
}
void onDraw(SkCanvas* canvas) SK_OVERRIDE {
void onDraw(SkCanvas* canvas) override {
SkRandom rand;
SkRect rect = SkRect::MakeXYWH(10, 10, 200, 200);

View File

@ -53,15 +53,15 @@ public:
virtual ~ASTCBitmapGM() { }
protected:
SkString onShortName() SK_OVERRIDE {
SkString onShortName() override {
return SkString("astcbitmap");
}
SkISize onISize() SK_OVERRIDE {
SkISize onISize() override {
return SkISize::Make(kGMDimension, kGMDimension);
}
void onDraw(SkCanvas* canvas) SK_OVERRIDE {
void onDraw(SkCanvas* canvas) override {
for (int j = 0; j < 4; ++j) {
for (int i = 0; i < 4; ++i) {
SkString filename = GetResourcePath(get_astc_filename(j*4+i));

View File

@ -36,7 +36,7 @@ public:
SkRect fBounds;
};
const char* name() const SK_OVERRIDE { return "BezierCubicOrConicTestBatch"; }
const char* name() const override { return "BezierCubicOrConicTestBatch"; }
static GrBatch* Create(const GrGeometryProcessor* gp, const Geometry& geo,
const SkScalar klmEqs[9], SkScalar sign) {
@ -60,12 +60,12 @@ private:
float fKLM[4]; // The last value is ignored. The effect expects a vec4f.
};
Geometry* geoData(int index) SK_OVERRIDE {
Geometry* geoData(int index) override {
SkASSERT(0 == index);
return &fGeometry;
}
void onGenerateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) SK_OVERRIDE {
void onGenerateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override {
size_t vertexStride = this->geometryProcessor()->getVertexStride();
const GrVertexBuffer* vertexBuffer;
@ -124,15 +124,15 @@ public:
}
protected:
SkString onShortName() SK_OVERRIDE {
SkString onShortName() override {
return SkString("bezier_cubic_effects");
}
SkISize onISize() SK_OVERRIDE {
SkISize onISize() override {
return SkISize::Make(800, 800);
}
void onDraw(SkCanvas* canvas) SK_OVERRIDE {
void onDraw(SkCanvas* canvas) override {
GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget();
if (NULL == rt) {
this->drawGpuOnlyMessage(canvas);
@ -270,16 +270,16 @@ public:
}
protected:
SkString onShortName() SK_OVERRIDE {
SkString onShortName() override {
return SkString("bezier_conic_effects");
}
SkISize onISize() SK_OVERRIDE {
SkISize onISize() override {
return SkISize::Make(800, 800);
}
void onDraw(SkCanvas* canvas) SK_OVERRIDE {
void onDraw(SkCanvas* canvas) override {
GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget();
if (NULL == rt) {
this->drawGpuOnlyMessage(canvas);
@ -447,7 +447,7 @@ public:
SkRect fBounds;
};
const char* name() const SK_OVERRIDE { return "BezierQuadTestBatch"; }
const char* name() const override { return "BezierQuadTestBatch"; }
static GrBatch* Create(const GrGeometryProcessor* gp, const Geometry& geo,
const GrPathUtils::QuadUVMatrix& devToUV) {
@ -467,12 +467,12 @@ private:
float fKLM[4]; // The last value is ignored. The effect expects a vec4f.
};
Geometry* geoData(int index) SK_OVERRIDE {
Geometry* geoData(int index) override {
SkASSERT(0 == index);
return &fGeometry;
}
void onGenerateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) SK_OVERRIDE {
void onGenerateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override {
size_t vertexStride = this->geometryProcessor()->getVertexStride();
const GrVertexBuffer* vertexBuffer;
@ -528,16 +528,16 @@ public:
}
protected:
SkString onShortName() SK_OVERRIDE {
SkString onShortName() override {
return SkString("bezier_quad_effects");
}
SkISize onISize() SK_OVERRIDE {
SkISize onISize() override {
return SkISize::Make(800, 800);
}
void onDraw(SkCanvas* canvas) SK_OVERRIDE {
void onDraw(SkCanvas* canvas) override {
GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget();
if (NULL == rt) {
this->drawGpuOnlyMessage(canvas);

View File

@ -47,15 +47,15 @@ public:
protected:
SkString onShortName() SK_OVERRIDE {
SkString onShortName() override {
return SkString("beziers");
}
SkISize onISize() SK_OVERRIDE {
SkISize onISize() override {
return SkISize::Make(W, H*2);
}
void onDraw(SkCanvas* canvas) SK_OVERRIDE {
void onDraw(SkCanvas* canvas) override {
SkPaint paint;
paint.setStyle(SkPaint::kStroke_Style);
paint.setStrokeWidth(SkIntToScalar(9)/2);

View File

@ -23,15 +23,15 @@ public:
}
protected:
SkString onShortName() SK_OVERRIDE {
SkString onShortName() override {
return SkString("bigblurs");
}
SkISize onISize() SK_OVERRIDE {
SkISize onISize() override {
return SkISize::Make(kWidth, kHeight);
}
void onDraw(SkCanvas* canvas) SK_OVERRIDE {
void onDraw(SkCanvas* canvas) override {
static const int kBig = 65536;
static const SkScalar kSigma = SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(4));

Some files were not shown because too many files have changed in this diff Show More