diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-05-31 12:52:43 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-05-31 12:52:43 +0000 |
commit | 13f1b6f1569bb5c639ca762f6b153133173c6295 (patch) | |
tree | 8bfa31fca505c479223b1a6360c44f9ae4e899c9 /src | |
parent | e5720e3202d83790f37c9e5104d71a190107b9a3 (diff) |
Add a bunch of SK_OVERRIDES and remove and unused function
Review URL: http://codereview.appspot.com/6245072/
git-svn-id: http://skia.googlecode.com/svn/trunk@4088 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/GrDrawState.h | 4 | ||||
-rw-r--r-- | src/gpu/GrGpu.h | 28 | ||||
-rw-r--r-- | src/gpu/GrInOrderDrawBuffer.h | 28 | ||||
-rw-r--r-- | src/gpu/gl/GrGpuGL.h | 37 | ||||
-rw-r--r-- | src/gpu/gl/GrGpuGLShaders.h | 6 |
5 files changed, 54 insertions, 49 deletions
diff --git a/src/gpu/GrDrawState.h b/src/gpu/GrDrawState.h index 5490b6851f..5342d9a4c7 100644 --- a/src/gpu/GrDrawState.h +++ b/src/gpu/GrDrawState.h @@ -671,10 +671,6 @@ public: return 0 != (stateBit & fFlagBits); } - void copyStateFlags(const GrDrawState& ds) { - fFlagBits = ds.fFlagBits; - } - /** * Flags that do not affect rendering. */ diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h index 500673bd30..f14c17f5cf 100644 --- a/src/gpu/GrGpu.h +++ b/src/gpu/GrGpu.h @@ -316,7 +316,7 @@ public: void removeResource(GrResource* resource); // GrDrawTarget overrides - virtual void clear(const GrIRect* rect, GrColor color); + virtual void clear(const GrIRect* rect, GrColor color) SK_OVERRIDE; virtual void purgeResources() SK_OVERRIDE { // The clip mask manager can rebuild all its clip masks so just @@ -413,18 +413,20 @@ protected: // GrDrawTarget overrides virtual bool onReserveVertexSpace(GrVertexLayout vertexLayout, int vertexCount, - void** vertices); - virtual bool onReserveIndexSpace(int indexCount, void** indices); - virtual void releaseReservedVertexSpace(); - virtual void releaseReservedIndexSpace(); + void** vertices) SK_OVERRIDE; + virtual bool onReserveIndexSpace(int indexCount, + void** indices) SK_OVERRIDE; + virtual void releaseReservedVertexSpace() SK_OVERRIDE; + virtual void releaseReservedIndexSpace() SK_OVERRIDE; virtual void onSetVertexSourceToArray(const void* vertexArray, - int vertexCount); + int vertexCount) SK_OVERRIDE; virtual void onSetIndexSourceToArray(const void* indexArray, - int indexCount); - virtual void releaseVertexArray(); - virtual void releaseIndexArray(); - virtual void geometrySourceWillPush(); - virtual void geometrySourceWillPop(const GeometrySrcState& restoredState); + int indexCount) SK_OVERRIDE; + virtual void releaseVertexArray() SK_OVERRIDE; + virtual void releaseIndexArray() SK_OVERRIDE; + virtual void geometrySourceWillPush() SK_OVERRIDE; + virtual void geometrySourceWillPop( + const GeometrySrcState& restoredState) SK_OVERRIDE; // Helpers for setting up geometry state void finalizeReservedVertices(); @@ -546,10 +548,10 @@ private: int startVertex, int startIndex, int vertexCount, - int indexCount); + int indexCount) SK_OVERRIDE; virtual void onDrawNonIndexed(GrPrimitiveType type, int startVertex, - int vertexCount); + int vertexCount) SK_OVERRIDE; // readies the pools to provide vertex/index data. void prepareVertexPool(); diff --git a/src/gpu/GrInOrderDrawBuffer.h b/src/gpu/GrInOrderDrawBuffer.h index fa3e0a2613..a467f6c173 100644 --- a/src/gpu/GrInOrderDrawBuffer.h +++ b/src/gpu/GrInOrderDrawBuffer.h @@ -143,25 +143,27 @@ private: int startVertex, int startIndex, int vertexCount, - int indexCount); + int indexCount) SK_OVERRIDE; virtual void onDrawNonIndexed(GrPrimitiveType primitiveType, int startVertex, - int vertexCount); + int vertexCount) SK_OVERRIDE; virtual bool onReserveVertexSpace(GrVertexLayout layout, int vertexCount, - void** vertices); - virtual bool onReserveIndexSpace(int indexCount, void** indices); - virtual void releaseReservedVertexSpace(); - virtual void releaseReservedIndexSpace(); + void** vertices) SK_OVERRIDE; + virtual bool onReserveIndexSpace(int indexCount, + void** indices) SK_OVERRIDE; + virtual void releaseReservedVertexSpace() SK_OVERRIDE; + virtual void releaseReservedIndexSpace() SK_OVERRIDE; virtual void onSetVertexSourceToArray(const void* vertexArray, - int vertexCount); + int vertexCount) SK_OVERRIDE; virtual void onSetIndexSourceToArray(const void* indexArray, - int indexCount); - virtual void releaseVertexArray(); - virtual void releaseIndexArray(); - virtual void geometrySourceWillPush(); - virtual void geometrySourceWillPop(const GeometrySrcState& restoredState); - virtual void clipWillBeSet(const GrClip& newClip); + int indexCount) SK_OVERRIDE; + virtual void releaseVertexArray() SK_OVERRIDE; + virtual void releaseIndexArray() SK_OVERRIDE; + virtual void geometrySourceWillPush() SK_OVERRIDE; + virtual void geometrySourceWillPop( + const GeometrySrcState& restoredState) SK_OVERRIDE; + virtual void clipWillBeSet(const GrClip& newClip) SK_OVERRIDE; bool needsNewState() const; bool needsNewClip() const; diff --git a/src/gpu/gl/GrGpuGL.h b/src/gpu/gl/GrGpuGL.h index d140de3477..d2557405c9 100644 --- a/src/gpu/gl/GrGpuGL.h +++ b/src/gpu/gl/GrGpuGL.h @@ -103,21 +103,25 @@ protected: virtual GrTexture* onCreateTexture(const GrTextureDesc& desc, const void* srcData, - size_t rowBytes); + size_t rowBytes) SK_OVERRIDE; virtual GrVertexBuffer* onCreateVertexBuffer(uint32_t size, - bool dynamic); + bool dynamic) SK_OVERRIDE; virtual GrIndexBuffer* onCreateIndexBuffer(uint32_t size, - bool dynamic); - virtual GrTexture* onCreatePlatformTexture(const GrPlatformTextureDesc& desc) SK_OVERRIDE; - virtual GrRenderTarget* onCreatePlatformRenderTarget(const GrPlatformRenderTargetDesc& desc) SK_OVERRIDE; + bool dynamic) SK_OVERRIDE; + virtual GrTexture* onCreatePlatformTexture( + const GrPlatformTextureDesc& desc) SK_OVERRIDE; + virtual GrRenderTarget* onCreatePlatformRenderTarget( + const GrPlatformRenderTargetDesc& desc) SK_OVERRIDE; virtual bool createStencilBufferForRenderTarget(GrRenderTarget* rt, - int width, int height); - virtual bool attachStencilBufferToRenderTarget(GrStencilBuffer* sb, - GrRenderTarget* rt); + int width, + int height) SK_OVERRIDE; + virtual bool attachStencilBufferToRenderTarget( + GrStencilBuffer* sb, + GrRenderTarget* rt) SK_OVERRIDE; - virtual void onClear(const GrIRect* rect, GrColor color); + virtual void onClear(const GrIRect* rect, GrColor color) SK_OVERRIDE; - virtual void onForceRenderTargetFlush(); + virtual void onForceRenderTargetFlush() SK_OVERRIDE; virtual bool onReadPixels(GrRenderTarget* target, int left, int top, @@ -139,15 +143,16 @@ protected: uint32_t startVertex, uint32_t startIndex, uint32_t vertexCount, - uint32_t indexCount); + uint32_t indexCount) SK_OVERRIDE; virtual void onGpuDrawNonIndexed(GrPrimitiveType type, uint32_t vertexCount, - uint32_t numVertices); - virtual void enableScissoring(const GrIRect& rect); - virtual void disableScissor(); + uint32_t numVertices) SK_OVERRIDE; + virtual void enableScissoring(const GrIRect& rect) SK_OVERRIDE; + virtual void disableScissor() SK_OVERRIDE; - virtual void clearStencil(); - virtual void clearStencilClip(const GrIRect& rect, bool insideClip); + virtual void clearStencil() SK_OVERRIDE; + virtual void clearStencilClip(const GrIRect& rect, + bool insideClip) SK_OVERRIDE; // binds texture unit in GL void setTextureUnit(int unitIdx); diff --git a/src/gpu/gl/GrGpuGLShaders.h b/src/gpu/gl/GrGpuGLShaders.h index f16fa02ab9..c7cdd2b5f5 100644 --- a/src/gpu/gl/GrGpuGLShaders.h +++ b/src/gpu/gl/GrGpuGLShaders.h @@ -22,18 +22,18 @@ public: GrGpuGLShaders(const GrGLContextInfo& ctxInfo); virtual ~GrGpuGLShaders(); - virtual void abandonResources(); + virtual void abandonResources() SK_OVERRIDE; bool programUnitTest(); protected: // overrides from GrGpu virtual void onResetContext() SK_OVERRIDE; - virtual bool flushGraphicsState(GrPrimitiveType type); + virtual bool flushGraphicsState(GrPrimitiveType type) SK_OVERRIDE; virtual void setupGeometry(int* startVertex, int* startIndex, int vertexCount, - int indexCount); + int indexCount) SK_OVERRIDE; private: |