aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar tfarina <tfarina@chromium.org>2014-12-14 15:20:10 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-12-14 15:20:11 -0800
commit912ed6ebb8e2813e72ed7a3dec3b6710ba7e7405 (patch)
treea7a10b5d36f9409932ba755f63c7c2de3cad4044
parent451e822705174c8fe9f5b172c8783d9be3c4c79c (diff)
Cleanup: Mark some overridden methods with 'SK_OVERRIDE'.
This fixes errors like this: ../../include/gpu/effects/GrPorterDuffXferProcessor.h:27:25: error: 'name' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override] BUG=skia:3075 TEST=ninja -C out/Debug skia_lib TBR=bsalomon@google.com Review URL: https://codereview.chromium.org/804813002
-rw-r--r--include/effects/SkLayerRasterizer.h2
-rw-r--r--include/effects/SkPixelXorXfermode.h2
-rw-r--r--include/gpu/effects/GrPorterDuffXferProcessor.h2
-rw-r--r--include/utils/SkDeferredCanvas.h2
-rw-r--r--src/effects/SkColorMatrixFilter.cpp2
-rw-r--r--src/effects/SkLightingImageFilter.cpp12
-rw-r--r--src/effects/gradients/SkLinearGradient.cpp2
-rw-r--r--src/effects/gradients/SkTwoPointConicalGradient.h2
-rw-r--r--src/gpu/GrDrawTarget.h2
-rw-r--r--src/gpu/GrGeometryProcessor.h4
-rw-r--r--src/gpu/GrInOrderDrawBuffer.h4
-rw-r--r--src/gpu/SkGpuDevice.h2
-rw-r--r--src/gpu/effects/GrConvolutionEffect.h2
-rw-r--r--src/gpu/effects/GrYUVtoRGBEffect.cpp2
-rw-r--r--src/gpu/gl/GrGLPathRange.h2
-rw-r--r--src/gpu/gl/GrGLRenderTarget.h6
-rw-r--r--src/gpu/gl/builders/GrGLLegacyNvprProgramBuilder.h2
-rw-r--r--src/gpu/gl/builders/GrGLNvprProgramBuilder.h2
-rw-r--r--src/images/SkImageDecoder_libjpeg.cpp2
-rw-r--r--src/utils/SkTextureCompressor_Blitter.h2
20 files changed, 28 insertions, 30 deletions
diff --git a/include/effects/SkLayerRasterizer.h b/include/effects/SkLayerRasterizer.h
index 1d66383ec9..02dfc35332 100644
--- a/include/effects/SkLayerRasterizer.h
+++ b/include/effects/SkLayerRasterizer.h
@@ -74,7 +74,7 @@ protected:
// override from SkRasterizer
virtual bool onRasterize(const SkPath& path, const SkMatrix& matrix,
const SkIRect* clipBounds,
- SkMask* mask, SkMask::CreateMode mode) const;
+ SkMask* mask, SkMask::CreateMode mode) const SK_OVERRIDE;
private:
const SkDeque* const fLayers;
diff --git a/include/effects/SkPixelXorXfermode.h b/include/effects/SkPixelXorXfermode.h
index 758a5e9815..275bc17559 100644
--- a/include/effects/SkPixelXorXfermode.h
+++ b/include/effects/SkPixelXorXfermode.h
@@ -29,7 +29,7 @@ protected:
virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
// override from SkXfermode
- virtual SkPMColor xferColor(SkPMColor src, SkPMColor dst) const;
+ virtual SkPMColor xferColor(SkPMColor src, SkPMColor dst) const SK_OVERRIDE;
private:
SkColor fOpColor;
diff --git a/include/gpu/effects/GrPorterDuffXferProcessor.h b/include/gpu/effects/GrPorterDuffXferProcessor.h
index 59499742d2..6c860b971c 100644
--- a/include/gpu/effects/GrPorterDuffXferProcessor.h
+++ b/include/gpu/effects/GrPorterDuffXferProcessor.h
@@ -24,7 +24,7 @@ public:
virtual ~GrPorterDuffXferProcessor();
- virtual const char* name() const { return "Porter Duff"; }
+ virtual const char* name() const SK_OVERRIDE { return "Porter Duff"; }
void getGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const SK_OVERRIDE;
diff --git a/include/utils/SkDeferredCanvas.h b/include/utils/SkDeferredCanvas.h
index fca4dcd946..e128707a4c 100644
--- a/include/utils/SkDeferredCanvas.h
+++ b/include/utils/SkDeferredCanvas.h
@@ -235,7 +235,7 @@ public:
};
protected:
- virtual SkCanvas* canvasForDrawIter();
+ virtual SkCanvas* canvasForDrawIter() SK_OVERRIDE;
SkDeferredDevice* getDeferredDevice() const;
private:
diff --git a/src/effects/SkColorMatrixFilter.cpp b/src/effects/SkColorMatrixFilter.cpp
index 32f94d9240..2fa9e5d4ed 100644
--- a/src/effects/SkColorMatrixFilter.cpp
+++ b/src/effects/SkColorMatrixFilter.cpp
@@ -416,7 +416,7 @@ private:
this->initClassID<ColorMatrixEffect>();
}
- virtual bool onIsEqual(const GrFragmentProcessor& s) const {
+ virtual bool onIsEqual(const GrFragmentProcessor& s) const SK_OVERRIDE {
const ColorMatrixEffect& cme = s.cast<ColorMatrixEffect>();
return cme.fMatrix == fMatrix;
}
diff --git a/src/effects/SkLightingImageFilter.cpp b/src/effects/SkLightingImageFilter.cpp
index e53cb02569..8acd7fd97d 100644
--- a/src/effects/SkLightingImageFilter.cpp
+++ b/src/effects/SkLightingImageFilter.cpp
@@ -590,7 +590,7 @@ public:
return fDirection;
};
SkPoint3 lightColor(const SkPoint3&) const { return color(); }
- virtual LightType type() const { return kDistant_LightType; }
+ virtual LightType type() const SK_OVERRIDE { return kDistant_LightType; }
const SkPoint3& direction() const { return fDirection; }
virtual GrGLLight* createGLLight() const SK_OVERRIDE {
#if SK_SUPPORT_GPU
@@ -620,7 +620,7 @@ protected:
SkDistantLight(const SkPoint3& direction, const SkPoint3& color)
: INHERITED(color), fDirection(direction) {
}
- virtual SkLight* transform(const SkMatrix& matrix) const {
+ virtual SkLight* transform(const SkMatrix& matrix) const SK_OVERRIDE {
return new SkDistantLight(direction(), color());
}
virtual void onFlattenLight(SkWriteBuffer& buffer) const SK_OVERRIDE {
@@ -647,7 +647,7 @@ public:
return direction;
};
SkPoint3 lightColor(const SkPoint3&) const { return color(); }
- virtual LightType type() const { return kPoint_LightType; }
+ virtual LightType type() const SK_OVERRIDE { return kPoint_LightType; }
const SkPoint3& location() const { return fLocation; }
virtual GrGLLight* createGLLight() const SK_OVERRIDE {
#if SK_SUPPORT_GPU
@@ -666,7 +666,7 @@ public:
return INHERITED::isEqual(other) &&
fLocation == o.fLocation;
}
- virtual SkLight* transform(const SkMatrix& matrix) const {
+ virtual SkLight* transform(const SkMatrix& matrix) const SK_OVERRIDE {
SkPoint location2 = SkPoint::Make(fLocation.fX, fLocation.fY);
matrix.mapPoints(&location2, 1);
// Use X scale and Y scale on Z and average the result
@@ -710,7 +710,7 @@ public:
fConeScale = SkScalarInvert(antiAliasThreshold);
}
- virtual SkLight* transform(const SkMatrix& matrix) const {
+ virtual SkLight* transform(const SkMatrix& matrix) const SK_OVERRIDE {
SkPoint location2 = SkPoint::Make(fLocation.fX, fLocation.fY);
matrix.mapPoints(&location2, 1);
// Use X scale and Y scale on Z and average the result
@@ -755,7 +755,7 @@ public:
#endif
}
virtual bool requiresFragmentPosition() const SK_OVERRIDE { return true; }
- virtual LightType type() const { return kSpot_LightType; }
+ virtual LightType type() const SK_OVERRIDE { return kSpot_LightType; }
const SkPoint3& location() const { return fLocation; }
const SkPoint3& target() const { return fTarget; }
SkScalar specularExponent() const { return fSpecularExponent; }
diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp
index 6bd5d83e32..1da8c7a311 100644
--- a/src/effects/gradients/SkLinearGradient.cpp
+++ b/src/effects/gradients/SkLinearGradient.cpp
@@ -493,7 +493,7 @@ public:
virtual ~GrLinearGradient() { }
- virtual const char* name() const { return "Linear Gradient"; }
+ virtual const char* name() const SK_OVERRIDE { return "Linear Gradient"; }
virtual void getGLProcessorKey(const GrGLCaps& caps,
GrProcessorKeyBuilder* b) const SK_OVERRIDE {
diff --git a/src/effects/gradients/SkTwoPointConicalGradient.h b/src/effects/gradients/SkTwoPointConicalGradient.h
index 941d12bc5a..3537791e54 100644
--- a/src/effects/gradients/SkTwoPointConicalGradient.h
+++ b/src/effects/gradients/SkTwoPointConicalGradient.h
@@ -60,7 +60,7 @@ public:
virtual BitmapType asABitmap(SkBitmap* bitmap,
SkMatrix* matrix,
- TileMode* xy) const;
+ TileMode* xy) const SK_OVERRIDE;
virtual SkShader::GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE;
virtual bool asFragmentProcessor(GrContext*, const SkPaint&, const SkMatrix*, GrColor*,
GrFragmentProcessor**) const SK_OVERRIDE;
diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h
index 770e8852b2..26de8675d5 100644
--- a/src/gpu/GrDrawTarget.h
+++ b/src/gpu/GrDrawTarget.h
@@ -844,7 +844,7 @@ protected:
GrClipMaskManager fClipMaskManager;
private:
- GrClipMaskManager* clipMaskManager() { return &fClipMaskManager; }
+ GrClipMaskManager* clipMaskManager() SK_OVERRIDE { return &fClipMaskManager; }
virtual bool setupClip(const SkRect* devBounds,
GrDrawState::AutoRestoreEffects* are,
diff --git a/src/gpu/GrGeometryProcessor.h b/src/gpu/GrGeometryProcessor.h
index 50ecac48ba..7481515577 100644
--- a/src/gpu/GrGeometryProcessor.h
+++ b/src/gpu/GrGeometryProcessor.h
@@ -80,8 +80,6 @@ public:
, fHasVertexCoverage(false)
, fHasLocalCoords(false) {}
- virtual const char* name() const = 0;
-
/**
* Sets a unique key on the GrProcessorKeyBuilder that is directly associated with this geometry
* processor's GL backend implementation.
@@ -161,7 +159,7 @@ public:
virtual void initBatchTracker(GrBatchTracker*, const InitBT&) const {}
GrColor color() const { return fColor; }
- uint8_t coverage() const { return fCoverage; }
+ uint8_t coverage() const SK_OVERRIDE { return fCoverage; }
// TODO this is a total hack until the gp can own whether or not it uses uniform
// color / coverage
diff --git a/src/gpu/GrInOrderDrawBuffer.h b/src/gpu/GrInOrderDrawBuffer.h
index 9b850a7849..060e42ee7a 100644
--- a/src/gpu/GrInOrderDrawBuffer.h
+++ b/src/gpu/GrInOrderDrawBuffer.h
@@ -42,7 +42,7 @@ public:
~GrInOrderDrawBuffer() SK_OVERRIDE;
// tracking for draws
- DrawToken getCurrentDrawToken() { return DrawToken(this, fDrawID); }
+ DrawToken getCurrentDrawToken() SK_OVERRIDE { return DrawToken(this, fDrawID); }
void clearStencilClip(const SkIRect& rect,
bool insideClip,
@@ -250,7 +250,7 @@ private:
// Records any trace markers for a command after adding it to the buffer.
void recordTraceMarkersIfNecessary();
- virtual bool isIssued(uint32_t drawID) { return drawID != fDrawID; }
+ virtual bool isIssued(uint32_t drawID) SK_OVERRIDE { return drawID != fDrawID; }
// TODO: Use a single allocator for commands and records
enum {
diff --git a/src/gpu/SkGpuDevice.h b/src/gpu/SkGpuDevice.h
index 9023a630e8..b600f993cd 100644
--- a/src/gpu/SkGpuDevice.h
+++ b/src/gpu/SkGpuDevice.h
@@ -95,7 +95,7 @@ public:
const SkPaint& paint,
SkCanvas::DrawBitmapRectFlags flags) SK_OVERRIDE;
virtual void drawSprite(const SkDraw&, const SkBitmap& bitmap,
- int x, int y, const SkPaint& paint);
+ int x, int y, const SkPaint& paint) SK_OVERRIDE;
virtual void drawText(const SkDraw&, const void* text, size_t len,
SkScalar x, SkScalar y, const SkPaint&) SK_OVERRIDE;
virtual void drawPosText(const SkDraw&, const void* text, size_t len,
diff --git a/src/gpu/effects/GrConvolutionEffect.h b/src/gpu/effects/GrConvolutionEffect.h
index 1d0950bfa5..0d1226b3aa 100644
--- a/src/gpu/effects/GrConvolutionEffect.h
+++ b/src/gpu/effects/GrConvolutionEffect.h
@@ -96,7 +96,7 @@ private:
virtual bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE;
- virtual void onComputeInvariantOutput(GrInvariantOutput* inout) const {
+ virtual void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE {
// If the texture was opaque we could know that the output color if we knew the sum of the
// kernel values.
inout->mulByUnknownFourComponents();
diff --git a/src/gpu/effects/GrYUVtoRGBEffect.cpp b/src/gpu/effects/GrYUVtoRGBEffect.cpp
index 50d0e52d6e..e8c7ff7aca 100644
--- a/src/gpu/effects/GrYUVtoRGBEffect.cpp
+++ b/src/gpu/effects/GrYUVtoRGBEffect.cpp
@@ -104,7 +104,7 @@ private:
this->addTextureAccess(&fVAccess);
}
- virtual bool onIsEqual(const GrFragmentProcessor& sBase) const {
+ virtual bool onIsEqual(const GrFragmentProcessor& sBase) const SK_OVERRIDE {
const YUVtoRGBEffect& s = sBase.cast<YUVtoRGBEffect>();
return fColorSpace == s.getColorSpace();
}
diff --git a/src/gpu/gl/GrGLPathRange.h b/src/gpu/gl/GrGLPathRange.h
index 8fde666e7e..5fbfb1f917 100644
--- a/src/gpu/gl/GrGLPathRange.h
+++ b/src/gpu/gl/GrGLPathRange.h
@@ -42,7 +42,7 @@ public:
GrGLuint basePathID() const { return fBasePathID; }
protected:
- virtual void onInitPath(int index, const SkPath&) const;
+ virtual void onInitPath(int index, const SkPath&) const SK_OVERRIDE;
virtual void onRelease() SK_OVERRIDE;
virtual void onAbandon() SK_OVERRIDE;
diff --git a/src/gpu/gl/GrGLRenderTarget.h b/src/gpu/gl/GrGLRenderTarget.h
index e66475d92c..079e9d5c53 100644
--- a/src/gpu/gl/GrGLRenderTarget.h
+++ b/src/gpu/gl/GrGLRenderTarget.h
@@ -42,9 +42,9 @@ public:
GrGLuint textureFBOID() const { return fTexFBOID; }
// override of GrRenderTarget
- virtual GrBackendObject getRenderTargetHandle() const { return this->renderFBOID(); }
- virtual GrBackendObject getRenderTargetResolvedHandle() const { return this->textureFBOID(); }
- virtual ResolveType getResolveType() const {
+ virtual GrBackendObject getRenderTargetHandle() const SK_OVERRIDE { return this->renderFBOID(); }
+ virtual GrBackendObject getRenderTargetResolvedHandle() const SK_OVERRIDE { return this->textureFBOID(); }
+ virtual ResolveType getResolveType() const SK_OVERRIDE {
if (!this->isMultisampled() ||
fRTFBOID == fTexFBOID) {
// catches FBO 0 and non MSAA case
diff --git a/src/gpu/gl/builders/GrGLLegacyNvprProgramBuilder.h b/src/gpu/gl/builders/GrGLLegacyNvprProgramBuilder.h
index b25759e795..7f7b0fc41c 100644
--- a/src/gpu/gl/builders/GrGLLegacyNvprProgramBuilder.h
+++ b/src/gpu/gl/builders/GrGLLegacyNvprProgramBuilder.h
@@ -14,7 +14,7 @@ class GrGLLegacyNvprProgramBuilder : public GrGLProgramBuilder {
public:
GrGLLegacyNvprProgramBuilder(GrGpuGL*, const GrOptDrawState&);
- virtual GrGLProgram* createProgram(GrGLuint programID);
+ virtual GrGLProgram* createProgram(GrGLuint programID) SK_OVERRIDE;
private:
int addTexCoordSets(int count);
diff --git a/src/gpu/gl/builders/GrGLNvprProgramBuilder.h b/src/gpu/gl/builders/GrGLNvprProgramBuilder.h
index 48fa96c8d7..5f239055fa 100644
--- a/src/gpu/gl/builders/GrGLNvprProgramBuilder.h
+++ b/src/gpu/gl/builders/GrGLNvprProgramBuilder.h
@@ -25,7 +25,7 @@ public:
typedef GrTAllocator<SeparableVaryingInfo> SeparableVaryingInfoArray;
- virtual GrGLProgram* createProgram(GrGLuint programID);
+ virtual GrGLProgram* createProgram(GrGLuint programID) SK_OVERRIDE;
private:
virtual void emitTransforms(const GrPendingFragmentStage&,
diff --git a/src/images/SkImageDecoder_libjpeg.cpp b/src/images/SkImageDecoder_libjpeg.cpp
index 77d1c5feff..18e71fad3b 100644
--- a/src/images/SkImageDecoder_libjpeg.cpp
+++ b/src/images/SkImageDecoder_libjpeg.cpp
@@ -229,7 +229,7 @@ public:
}
#endif
- virtual Format getFormat() const {
+ virtual Format getFormat() const SK_OVERRIDE {
return kJPEG_Format;
}
diff --git a/src/utils/SkTextureCompressor_Blitter.h b/src/utils/SkTextureCompressor_Blitter.h
index 0c26a7a7eb..cdf2fb680d 100644
--- a/src/utils/SkTextureCompressor_Blitter.h
+++ b/src/utils/SkTextureCompressor_Blitter.h
@@ -378,7 +378,7 @@ public:
* to preserve semantics if blitAntiH doesn't get called in too many
* weird ways...
*/
- virtual int requestRowsPreserved() const { return BlockDim; }
+ virtual int requestRowsPreserved() const SK_OVERRIDE { return BlockDim; }
private:
static const int kPixelsPerBlock = BlockDim * BlockDim;