Add SK_OVERRIDE to a few places that are missing it.

This was done automatically by running clang-modernize -add-override -override-macros.

It's not clear to me whether include/ is already clean or I just can't get the tool to work for headers.

BUG=skia:

Review URL: https://codereview.chromium.org/808463002
This commit is contained in:
mtklein 2014-12-15 09:08:33 -08:00 committed by Commit bot
parent 1d09ee7c04
commit e8307dc0d0
9 changed files with 53 additions and 53 deletions

View File

@ -736,24 +736,24 @@ public:
, fShaderContext(shaderContext)
{}
virtual void blitH(int x, int y, int width) {
virtual void blitH(int x, int y, int width) SK_OVERRIDE {
fProxy->blitH(x, y, width);
}
virtual void blitAntiH(int x, int y, const SkAlpha antialias[],
const int16_t runs[]) {
const int16_t runs[]) SK_OVERRIDE {
fProxy->blitAntiH(x, y, antialias, runs);
}
virtual void blitV(int x, int y, int height, SkAlpha alpha) {
virtual void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE {
fProxy->blitV(x, y, height, alpha);
}
virtual void blitRect(int x, int y, int width, int height) {
virtual void blitRect(int x, int y, int width, int height) SK_OVERRIDE {
fProxy->blitRect(x, y, width, height);
}
virtual void blitMask(const SkMask& mask, const SkIRect& clip) {
virtual void blitMask(const SkMask& mask, const SkIRect& clip) SK_OVERRIDE {
if (mask.fFormat == SkMask::k3D_Format) {
fShaderContext->set3DMask(&mask);

View File

@ -59,14 +59,14 @@ void sk_dither_memset16(uint16_t dst[], uint16_t value, uint16_t other,
class SkRGB16_Blitter : public SkRasterBlitter {
public:
SkRGB16_Blitter(const SkBitmap& device, const SkPaint& paint);
virtual void blitH(int x, int y, int width);
virtual void blitH(int x, int y, int width) SK_OVERRIDE;
virtual void blitAntiH(int x, int y, const SkAlpha* antialias,
const int16_t* runs);
virtual void blitV(int x, int y, int height, SkAlpha alpha);
virtual void blitRect(int x, int y, int width, int height);
const int16_t* runs) SK_OVERRIDE;
virtual void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE;
virtual void blitRect(int x, int y, int width, int height) SK_OVERRIDE;
virtual void blitMask(const SkMask&,
const SkIRect&);
virtual const SkBitmap* justAnOpaqueColor(uint32_t*);
const SkIRect&) SK_OVERRIDE;
virtual const SkBitmap* justAnOpaqueColor(uint32_t*) SK_OVERRIDE;
protected:
SkPMColor fSrcColor32;
@ -86,13 +86,13 @@ protected:
class SkRGB16_Opaque_Blitter : public SkRGB16_Blitter {
public:
SkRGB16_Opaque_Blitter(const SkBitmap& device, const SkPaint& paint);
virtual void blitH(int x, int y, int width);
virtual void blitH(int x, int y, int width) SK_OVERRIDE;
virtual void blitAntiH(int x, int y, const SkAlpha* antialias,
const int16_t* runs);
virtual void blitV(int x, int y, int height, SkAlpha alpha);
virtual void blitRect(int x, int y, int width, int height);
const int16_t* runs) SK_OVERRIDE;
virtual void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE;
virtual void blitRect(int x, int y, int width, int height) SK_OVERRIDE;
virtual void blitMask(const SkMask&,
const SkIRect&);
const SkIRect&) SK_OVERRIDE;
private:
typedef SkRGB16_Blitter INHERITED;
@ -102,9 +102,9 @@ private:
class SkRGB16_Black_Blitter : public SkRGB16_Opaque_Blitter {
public:
SkRGB16_Black_Blitter(const SkBitmap& device, const SkPaint& paint);
virtual void blitMask(const SkMask&, const SkIRect&);
virtual void blitMask(const SkMask&, const SkIRect&) SK_OVERRIDE;
virtual void blitAntiH(int x, int y, const SkAlpha* antialias,
const int16_t* runs);
const int16_t* runs) SK_OVERRIDE;
private:
typedef SkRGB16_Opaque_Blitter INHERITED;
@ -116,10 +116,10 @@ public:
SkRGB16_Shader_Blitter(const SkBitmap& device, const SkPaint& paint,
SkShader::Context* shaderContext);
virtual ~SkRGB16_Shader_Blitter();
virtual void blitH(int x, int y, int width);
virtual void blitH(int x, int y, int width) SK_OVERRIDE;
virtual void blitAntiH(int x, int y, const SkAlpha* antialias,
const int16_t* runs);
virtual void blitRect(int x, int y, int width, int height);
const int16_t* runs) SK_OVERRIDE;
virtual void blitRect(int x, int y, int width, int height) SK_OVERRIDE;
protected:
SkPMColor* fBuffer;
@ -138,10 +138,10 @@ class SkRGB16_Shader16_Blitter : public SkRGB16_Shader_Blitter {
public:
SkRGB16_Shader16_Blitter(const SkBitmap& device, const SkPaint& paint,
SkShader::Context* shaderContext);
virtual void blitH(int x, int y, int width);
virtual void blitH(int x, int y, int width) SK_OVERRIDE;
virtual void blitAntiH(int x, int y, const SkAlpha* antialias,
const int16_t* runs);
virtual void blitRect(int x, int y, int width, int height);
const int16_t* runs) SK_OVERRIDE;
virtual void blitRect(int x, int y, int width, int height) SK_OVERRIDE;
private:
typedef SkRGB16_Shader_Blitter INHERITED;
@ -152,9 +152,9 @@ public:
SkRGB16_Shader_Xfermode_Blitter(const SkBitmap& device, const SkPaint& paint,
SkShader::Context* shaderContext);
virtual ~SkRGB16_Shader_Xfermode_Blitter();
virtual void blitH(int x, int y, int width);
virtual void blitH(int x, int y, int width) SK_OVERRIDE;
virtual void blitAntiH(int x, int y, const SkAlpha* antialias,
const int16_t* runs);
const int16_t* runs) SK_OVERRIDE;
private:
SkXfermode* fXfermode;

View File

@ -434,7 +434,7 @@ public:
}
SK_DECLARE_INTERNAL_LLIST_INTERFACE(Value);
};
virtual bool get(const Key& key, SkBitmap* result, SkIPoint* offset) const {
virtual bool get(const Key& key, SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE {
SkAutoMutexAcquire mutex(fMutex);
if (Value* v = fLookup.find(key)) {
*result = v->fBitmap;
@ -447,7 +447,7 @@ public:
}
return false;
}
virtual void set(const Key& key, const SkBitmap& result, const SkIPoint& offset) {
virtual void set(const Key& key, const SkBitmap& result, const SkIPoint& offset) SK_OVERRIDE {
SkAutoMutexAcquire mutex(fMutex);
if (Value* v = fLookup.find(key)) {
removeInternal(v);

View File

@ -43,7 +43,7 @@ public:
void copyToRect(SkIRect*) const;
void copyToRgn(SkRegion::RunType runs[]) const;
virtual void blitH(int x, int y, int width);
virtual void blitH(int x, int y, int width) SK_OVERRIDE;
#ifdef SK_DEBUG
void dump() const {

View File

@ -332,7 +332,7 @@ public:
}
// overrides
virtual void blitH(int x, int y, int width) {
virtual void blitH(int x, int y, int width) SK_OVERRIDE {
int invWidth = x - fPrevX;
if (invWidth > 0) {
fBlitter->blitH(fPrevX, y, invWidth);
@ -341,19 +341,19 @@ public:
}
// we do not expect to get called with these entrypoints
virtual void blitAntiH(int, int, const SkAlpha[], const int16_t runs[]) {
virtual void blitAntiH(int, int, const SkAlpha[], const int16_t runs[]) SK_OVERRIDE {
SkDEBUGFAIL("blitAntiH unexpected");
}
virtual void blitV(int x, int y, int height, SkAlpha alpha) {
virtual void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE {
SkDEBUGFAIL("blitV unexpected");
}
virtual void blitRect(int x, int y, int width, int height) {
virtual void blitRect(int x, int y, int width, int height) SK_OVERRIDE {
SkDEBUGFAIL("blitRect unexpected");
}
virtual void blitMask(const SkMask&, const SkIRect& clip) {
virtual void blitMask(const SkMask&, const SkIRect& clip) SK_OVERRIDE {
SkDEBUGFAIL("blitMask unexpected");
}
virtual const SkBitmap* justAnOpaqueColor(uint32_t* value) {
virtual const SkBitmap* justAnOpaqueColor(uint32_t* value) SK_OVERRIDE {
SkDEBUGFAIL("justAnOpaqueColor unexpected");
return NULL;
}

View File

@ -34,7 +34,7 @@ public:
fAlpha = alpha;
}
virtual void blitRect(int x, int y, int width, int height) {
virtual void blitRect(int x, int y, int width, int height) SK_OVERRIDE {
SkASSERT(width > 0 && height > 0);
uint32_t* SK_RESTRICT dst = fDevice->getAddr32(x, y);
const uint32_t* SK_RESTRICT src = fSource->getAddr32(x - fLeft,
@ -92,7 +92,7 @@ public:
}
virtual void setup(const SkBitmap& device, int left, int top,
const SkPaint& paint) {
const SkPaint& paint) SK_OVERRIDE {
this->INHERITED::setup(device, left, top, paint);
int width = device.width();
@ -122,7 +122,7 @@ public:
Sprite_D32_S32A_XferFilter(const SkBitmap& source, const SkPaint& paint)
: Sprite_D32_XferFilter(source, paint) {}
virtual void blitRect(int x, int y, int width, int height) {
virtual void blitRect(int x, int y, int width, int height) SK_OVERRIDE {
SkASSERT(width > 0 && height > 0);
uint32_t* SK_RESTRICT dst = fDevice->getAddr32(x, y);
const uint32_t* SK_RESTRICT src = fSource->getAddr32(x - fLeft,
@ -169,7 +169,7 @@ public:
Sprite_D32_S4444_XferFilter(const SkBitmap& source, const SkPaint& paint)
: Sprite_D32_XferFilter(source, paint) {}
virtual void blitRect(int x, int y, int width, int height) {
virtual void blitRect(int x, int y, int width, int height) SK_OVERRIDE {
SkASSERT(width > 0 && height > 0);
SkPMColor* SK_RESTRICT dst = fDevice->getAddr32(x, y);
const SkPMColor16* SK_RESTRICT src = fSource->getAddr16(x - fLeft,
@ -216,7 +216,7 @@ class Sprite_D32_S4444_Opaque : public SkSpriteBlitter {
public:
Sprite_D32_S4444_Opaque(const SkBitmap& source) : SkSpriteBlitter(source) {}
virtual void blitRect(int x, int y, int width, int height) {
virtual void blitRect(int x, int y, int width, int height) SK_OVERRIDE {
SkASSERT(width > 0 && height > 0);
SkPMColor* SK_RESTRICT dst = fDevice->getAddr32(x, y);
const SkPMColor16* SK_RESTRICT src = fSource->getAddr16(x - fLeft,
@ -245,7 +245,7 @@ class Sprite_D32_S4444 : public SkSpriteBlitter {
public:
Sprite_D32_S4444(const SkBitmap& source) : SkSpriteBlitter(source) {}
virtual void blitRect(int x, int y, int width, int height) {
virtual void blitRect(int x, int y, int width, int height) SK_OVERRIDE {
SkASSERT(width > 0 && height > 0);
SkPMColor* SK_RESTRICT dst = fDevice->getAddr32(x, y);
const SkPMColor16* SK_RESTRICT src = fSource->getAddr16(x - fLeft,

View File

@ -54,7 +54,7 @@ public:
: SkSpriteBlitter(source) {}
// overrides
virtual void blitRect(int x, int y, int width, int height) {
virtual void blitRect(int x, int y, int width, int height) SK_OVERRIDE {
uint16_t* SK_RESTRICT dst = fDevice->getAddr16(x, y);
const uint16_t* SK_RESTRICT src = fSource->getAddr16(x - fLeft,
y - fTop);
@ -264,7 +264,7 @@ public:
// overrides
virtual void setup(const SkBitmap& device, int left, int top,
const SkPaint& paint) {
const SkPaint& paint) SK_OVERRIDE {
this->INHERITED::setup(device, left, top, paint);
unsigned flags = 0;
@ -281,7 +281,7 @@ public:
fProc = SkBlitRow::Factory(flags, kRGB_565_SkColorType);
}
virtual void blitRect(int x, int y, int width, int height) {
virtual void blitRect(int x, int y, int width, int height) SK_OVERRIDE {
uint16_t* SK_RESTRICT dst = fDevice->getAddr16(x, y);
const SkPMColor* SK_RESTRICT src = fSource->getAddr32(x - fLeft,
y - fTop);

View File

@ -24,11 +24,11 @@ public:
SkDescriptor::Free(fDesc);
}
virtual int getNumPaths() {
virtual int getNumPaths() SK_OVERRIDE {
return fScalerContext->getGlyphCount();
}
virtual void generatePath(int glyphID, SkPath* out) {
virtual void generatePath(int glyphID, SkPath* out) SK_OVERRIDE {
SkGlyph skGlyph;
skGlyph.init(SkGlyph::MakeID(glyphID));
fScalerContext->getMetrics(&skGlyph);
@ -37,7 +37,7 @@ public:
out->transform(fFlipMatrix); // Load glyphs with the inverted y-direction.
}
virtual bool isEqualTo(const SkDescriptor& desc) const {
virtual bool isEqualTo(const SkDescriptor& desc) const SK_OVERRIDE {
return fDesc->equals(desc);
}

View File

@ -515,10 +515,10 @@ public:
fResources.unrefAll();
}
virtual bool isValid() { return fResources.count() > 0; }
virtual bool isValid() SK_OVERRIDE { return fResources.count() > 0; }
void getResources(const SkTSet<SkPDFObject*>& knownResourceObjects,
SkTSet<SkPDFObject*>* newResourceObjects) {
SkTSet<SkPDFObject*>* newResourceObjects) SK_OVERRIDE {
GetResourcesHelper(&fResources,
knownResourceObjects,
newResourceObjects);
@ -548,7 +548,7 @@ public:
}
}
virtual bool isValid() {
virtual bool isValid() SK_OVERRIDE {
return fColorShader.get() != NULL;
}
@ -558,7 +558,7 @@ private:
SkPDFGraphicState* CreateSMaskGraphicState();
void getResources(const SkTSet<SkPDFObject*>& knownResourceObjects,
SkTSet<SkPDFObject*>* newResourceObjects) {
SkTSet<SkPDFObject*>* newResourceObjects) SK_OVERRIDE {
fResourceDict->getReferencedResources(knownResourceObjects,
newResourceObjects,
true);
@ -578,10 +578,10 @@ public:
fResources.unrefAll();
}
virtual bool isValid() { return size() > 0; }
virtual bool isValid() SK_OVERRIDE { return size() > 0; }
void getResources(const SkTSet<SkPDFObject*>& knownResourceObjects,
SkTSet<SkPDFObject*>* newResourceObjects) {
SkTSet<SkPDFObject*>* newResourceObjects) SK_OVERRIDE {
GetResourcesHelper(&fResources.toArray(),
knownResourceObjects,
newResourceObjects);