diff --git a/BUILD.gn b/BUILD.gn index 20ed97202..c85f981ec 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -69,14 +69,19 @@ config("internal_config") { } config("extra_warnings") { + cflags = [] # Enable more default warnings on Windows. if (is_win) { - cflags = [ + cflags += [ "/we4244", # Conversion: possible loss of data. "/we4456", # Variable shadowing. "/we4458", # declaration hides class member. ] } + if (is_clang) { + # Remove when crbug.com/428099 is resolved. + cflags += ["-Winconsistent-missing-override"] + } } if (is_win) { diff --git a/src/libANGLE/renderer/d3d/ProgramD3D.h b/src/libANGLE/renderer/d3d/ProgramD3D.h index 82d5ba718..e4ed27589 100644 --- a/src/libANGLE/renderer/d3d/ProgramD3D.h +++ b/src/libANGLE/renderer/d3d/ProgramD3D.h @@ -216,54 +216,54 @@ class ProgramD3D : public ProgramImpl void dirtyAllUniforms(); - void setUniform1fv(GLint location, GLsizei count, const GLfloat *v); - void setUniform2fv(GLint location, GLsizei count, const GLfloat *v); - void setUniform3fv(GLint location, GLsizei count, const GLfloat *v); - void setUniform4fv(GLint location, GLsizei count, const GLfloat *v); - void setUniform1iv(GLint location, GLsizei count, const GLint *v); - void setUniform2iv(GLint location, GLsizei count, const GLint *v); - void setUniform3iv(GLint location, GLsizei count, const GLint *v); - void setUniform4iv(GLint location, GLsizei count, const GLint *v); - void setUniform1uiv(GLint location, GLsizei count, const GLuint *v); - void setUniform2uiv(GLint location, GLsizei count, const GLuint *v); - void setUniform3uiv(GLint location, GLsizei count, const GLuint *v); - void setUniform4uiv(GLint location, GLsizei count, const GLuint *v); + void setUniform1fv(GLint location, GLsizei count, const GLfloat *v) override; + void setUniform2fv(GLint location, GLsizei count, const GLfloat *v) override; + void setUniform3fv(GLint location, GLsizei count, const GLfloat *v) override; + void setUniform4fv(GLint location, GLsizei count, const GLfloat *v) override; + void setUniform1iv(GLint location, GLsizei count, const GLint *v) override; + void setUniform2iv(GLint location, GLsizei count, const GLint *v) override; + void setUniform3iv(GLint location, GLsizei count, const GLint *v) override; + void setUniform4iv(GLint location, GLsizei count, const GLint *v) override; + void setUniform1uiv(GLint location, GLsizei count, const GLuint *v) override; + void setUniform2uiv(GLint location, GLsizei count, const GLuint *v) override; + void setUniform3uiv(GLint location, GLsizei count, const GLuint *v) override; + void setUniform4uiv(GLint location, GLsizei count, const GLuint *v) override; void setUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value); + const GLfloat *value) override; void setUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value); + const GLfloat *value) override; void setUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value); + const GLfloat *value) override; void setUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value); + const GLfloat *value) override; void setUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value); + const GLfloat *value) override; void setUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value); + const GLfloat *value) override; void setUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value); + const GLfloat *value) override; void setUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value); + const GLfloat *value) override; void setUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value); + const GLfloat *value) override; void getUniformfv(const gl::Context *context, GLint location, GLfloat *params) const override; void getUniformiv(const gl::Context *context, GLint location, GLint *params) const override; diff --git a/src/libANGLE/renderer/d3d/TextureD3D.h b/src/libANGLE/renderer/d3d/TextureD3D.h index 2aea38c4e..547250d61 100644 --- a/src/libANGLE/renderer/d3d/TextureD3D.h +++ b/src/libANGLE/renderer/d3d/TextureD3D.h @@ -60,7 +60,7 @@ class TextureD3D : public TextureImpl GLenum target, size_t levels, GLenum internalFormat, - const gl::Extents &size); + const gl::Extents &size) override; gl::Error setStorageMultisample(const gl::Context *context, GLenum target, @@ -316,7 +316,7 @@ class TextureD3D_2D : public TextureD3D bool isValidLevel(int level) const; bool isLevelComplete(int level) const; - virtual bool isImageComplete(const gl::ImageIndex &index) const; + virtual bool isImageComplete(const gl::ImageIndex &index) const override; gl::Error updateStorageLevel(const gl::Context *context, int level); @@ -452,7 +452,7 @@ class TextureD3D_Cube : public TextureD3D bool isValidFaceLevel(int faceIndex, int level) const; bool isFaceLevelComplete(int faceIndex, int level) const; bool isCubeComplete() const; - virtual bool isImageComplete(const gl::ImageIndex &index) const; + virtual bool isImageComplete(const gl::ImageIndex &index) const override; gl::Error updateStorageFaceLevel(const gl::Context *context, int faceIndex, int level); gl::Error redefineImage(const gl::Context *context, @@ -568,7 +568,7 @@ class TextureD3D_3D : public TextureD3D bool isValidLevel(int level) const; bool isLevelComplete(int level) const; - virtual bool isImageComplete(const gl::ImageIndex &index) const; + virtual bool isImageComplete(const gl::ImageIndex &index) const override; gl::Error updateStorageLevel(const gl::Context *context, int level); gl::Error redefineImage(const gl::Context *context, @@ -589,8 +589,8 @@ class TextureD3D_2DArray : public TextureD3D gl::Error onDestroy(const gl::Context *context) override; virtual ImageD3D *getImage(int level, int layer) const; - virtual ImageD3D *getImage(const gl::ImageIndex &index) const; - virtual GLsizei getLayerCount(int level) const; + ImageD3D *getImage(const gl::ImageIndex &index) const override; + GLsizei getLayerCount(int level) const override; GLsizei getWidth(GLint level) const; GLsizei getHeight(GLint level) const; @@ -681,7 +681,7 @@ class TextureD3D_2DArray : public TextureD3D bool isValidLevel(int level) const; bool isLevelComplete(int level) const; - virtual bool isImageComplete(const gl::ImageIndex &index) const; + virtual bool isImageComplete(const gl::ImageIndex &index) const override; gl::Error updateStorageLevel(const gl::Context *context, int level); void deleteImages(); @@ -875,7 +875,7 @@ class TextureD3D_2DMultisample : public TextureD3D gl::ImageIndex getImageIndex(GLint mip, GLint layer) const override; bool isValidIndex(const gl::ImageIndex &index) const override; - virtual GLsizei getLayerCount(int level) const; + GLsizei getLayerCount(int level) const override; protected: void markAllImagesDirty() override; diff --git a/src/libANGLE/renderer/d3d/d3d11/Image11.h b/src/libANGLE/renderer/d3d/d3d11/Image11.h index 1adcf688b..fc198dd95 100644 --- a/src/libANGLE/renderer/d3d/d3d11/Image11.h +++ b/src/libANGLE/renderer/d3d/d3d11/Image11.h @@ -47,7 +47,7 @@ class Image11 : public ImageD3D bool unpackUnmultiplyAlpha, const Renderer11DeviceCaps &rendererCaps); - virtual bool isDirty() const; + bool isDirty() const override; gl::Error copyToStorage(const gl::Context *context, TextureStorage *storage, diff --git a/src/libANGLE/renderer/d3d/d3d9/Buffer9.h b/src/libANGLE/renderer/d3d/d3d9/Buffer9.h index ee0ad712d..143a502ba 100644 --- a/src/libANGLE/renderer/d3d/d3d9/Buffer9.h +++ b/src/libANGLE/renderer/d3d/d3d9/Buffer9.h @@ -24,8 +24,8 @@ class Buffer9 : public BufferD3D virtual ~Buffer9(); // BufferD3D implementation - virtual size_t getSize() const { return mSize; } - virtual bool supportsDirectBinding() const { return false; } + size_t getSize() const override { return mSize; } + bool supportsDirectBinding() const override { return false; } gl::Error getData(const gl::Context *context, const uint8_t **outData) override; // BufferImpl implementation diff --git a/src/libANGLE/renderer/d3d/d3d9/Image9.h b/src/libANGLE/renderer/d3d/d3d9/Image9.h index 7ece2aa96..d9b51c086 100644 --- a/src/libANGLE/renderer/d3d/d3d9/Image9.h +++ b/src/libANGLE/renderer/d3d/d3d9/Image9.h @@ -36,7 +36,7 @@ class Image9 : public ImageD3D D3DFORMAT getD3DFormat() const; - virtual bool isDirty() const; + bool isDirty() const override; gl::Error setManagedSurface2D(const gl::Context *context, TextureStorage *storage, diff --git a/src/libANGLE/renderer/d3d/d3d9/Renderer9.h b/src/libANGLE/renderer/d3d/d3d9/Renderer9.h index af735d733..b881703b8 100644 --- a/src/libANGLE/renderer/d3d/d3d9/Renderer9.h +++ b/src/libANGLE/renderer/d3d/d3d9/Renderer9.h @@ -167,7 +167,7 @@ class Renderer9 : public RendererD3D // lost device bool testDeviceLost() override; - bool testDeviceResettable(); + bool testDeviceResettable() override; VendorID getVendorId() const; std::string getRendererDescription() const; diff --git a/src/libANGLE/renderer/d3d/d3d9/SwapChain9.h b/src/libANGLE/renderer/d3d/d3d9/SwapChain9.h index 6b12fa396..288eec557 100644 --- a/src/libANGLE/renderer/d3d/d3d9/SwapChain9.h +++ b/src/libANGLE/renderer/d3d/d3d9/SwapChain9.h @@ -30,17 +30,18 @@ class SwapChain9 : public SwapChainD3D EGLint orientation); virtual ~SwapChain9(); - EGLint resize(const gl::Context *context, EGLint backbufferWidth, EGLint backbufferHeight); - virtual EGLint reset(const gl::Context *context, - EGLint backbufferWidth, - EGLint backbufferHeight, - EGLint swapInterval); - virtual EGLint swapRect(const gl::Context *context, - EGLint x, - EGLint y, - EGLint width, - EGLint height); - virtual void recreate(); + EGLint resize(const gl::Context *context, EGLint backbufferWidth, EGLint backbufferHeight) + override; + EGLint reset(const gl::Context *context, + EGLint backbufferWidth, + EGLint backbufferHeight, + EGLint swapInterval) override; + EGLint swapRect(const gl::Context *context, + EGLint x, + EGLint y, + EGLint width, + EGLint height) override; + void recreate() override; RenderTargetD3D *getColorRenderTarget() override { return &mColorRenderTarget; } RenderTargetD3D *getDepthStencilRenderTarget() override { return &mDepthStencilRenderTarget; } diff --git a/src/libANGLE/renderer/d3d/d3d9/TextureStorage9.h b/src/libANGLE/renderer/d3d/d3d9/TextureStorage9.h index 01b5efe97..9ea7e48f3 100644 --- a/src/libANGLE/renderer/d3d/d3d9/TextureStorage9.h +++ b/src/libANGLE/renderer/d3d/d3d9/TextureStorage9.h @@ -39,15 +39,12 @@ class TextureStorage9 : public TextureStorage IDirect3DSurface9 **outSurface) = 0; virtual gl::Error getBaseTexture(const gl::Context *context, IDirect3DBaseTexture9 **outTexture) = 0; - virtual gl::Error getRenderTarget(const gl::Context *context, - const gl::ImageIndex &index, - RenderTargetD3D **outRT) = 0; - virtual int getTopLevel() const; - virtual bool isRenderTarget() const; - virtual bool isManaged() const; + int getTopLevel() const override; + bool isRenderTarget() const override; + bool isManaged() const override; bool supportsNativeMipmapFunction() const override; - virtual int getLevelCount() const; + int getLevelCount() const override; gl::Error setData(const gl::Context *context, const gl::ImageIndex &index, @@ -155,4 +152,3 @@ class TextureStorage9_Cube : public TextureStorage9 } #endif // LIBANGLE_RENDERER_D3D_D3D9_TEXTURESTORAGE9_H_ -