summaryrefslogtreecommitdiffstats
path: root/gpu
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-30 15:09:00 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-30 15:09:00 +0000
commitb8e97b653eda5505e2bf87a17eff7b2712042782 (patch)
tree310adc22a049ca434ae89a7e59a2a96691d750f4 /gpu
parent76426b59b704454aae5af4f6c01eb0a86e54c8bb (diff)
downloadchromium_src-b8e97b653eda5505e2bf87a17eff7b2712042782.zip
chromium_src-b8e97b653eda5505e2bf87a17eff7b2712042782.tar.gz
chromium_src-b8e97b653eda5505e2bf87a17eff7b2712042782.tar.bz2
gpu: Fix clang warnings about missing virtual and OVERRIDE annotations.
BUG=115047 TBR=apatrick@chromium.org Review URL: https://chromiumcodereview.appspot.com/11023006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159440 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r--gpu/command_buffer/client/program_info_manager.cc118
-rw-r--r--gpu/command_buffer/client/share_group.cc43
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.cc71
3 files changed, 132 insertions, 100 deletions
diff --git a/gpu/command_buffer/client/program_info_manager.cc b/gpu/command_buffer/client/program_info_manager.cc
index eb5ee32..dd2b784 100644
--- a/gpu/command_buffer/client/program_info_manager.cc
+++ b/gpu/command_buffer/client/program_info_manager.cc
@@ -2,13 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <map>
+
+#include "base/compiler_specific.h"
#include "../client/program_info_manager.h"
#include "../client/atomicops.h"
#include "../client/gles2_implementation.h"
#include "../common/gles2_cmd_utils.h"
-#include <map>
-
namespace gpu {
namespace gles2 {
@@ -17,28 +18,40 @@ class NonCachedProgramInfoManager : public ProgramInfoManager {
NonCachedProgramInfoManager();
virtual ~NonCachedProgramInfoManager();
- virtual void CreateInfo(GLuint program);
-
- virtual void DeleteInfo(GLuint program);
-
- virtual bool GetProgramiv(
- GLES2Implementation* gl, GLuint program, GLenum pname, GLint* params);
-
- virtual GLint GetAttribLocation(
- GLES2Implementation* gl, GLuint program, const char* name);
-
- virtual GLint GetUniformLocation(
- GLES2Implementation* gl, GLuint program, const char* name);
-
- virtual bool GetActiveAttrib(
- GLES2Implementation* gl,
- GLuint program, GLuint index, GLsizei bufsize, GLsizei* length,
- GLint* size, GLenum* type, char* name);
-
- virtual bool GetActiveUniform(
- GLES2Implementation* gl,
- GLuint program, GLuint index, GLsizei bufsize, GLsizei* length,
- GLint* size, GLenum* type, char* name);
+ virtual void CreateInfo(GLuint program) OVERRIDE;
+
+ virtual void DeleteInfo(GLuint program) OVERRIDE;
+
+ virtual bool GetProgramiv(GLES2Implementation* gl,
+ GLuint program,
+ GLenum pname,
+ GLint* params) OVERRIDE;
+
+ virtual GLint GetAttribLocation(GLES2Implementation* gl,
+ GLuint program,
+ const char* name) OVERRIDE;
+
+ virtual GLint GetUniformLocation(GLES2Implementation* gl,
+ GLuint program,
+ const char* name) OVERRIDE;
+
+ virtual bool GetActiveAttrib(GLES2Implementation* gl,
+ GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name) OVERRIDE;
+
+ virtual bool GetActiveUniform(GLES2Implementation* gl,
+ GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name) OVERRIDE;
};
@@ -93,29 +106,40 @@ class CachedProgramInfoManager : public ProgramInfoManager {
CachedProgramInfoManager();
virtual ~CachedProgramInfoManager();
- virtual void CreateInfo(GLuint program);
-
- virtual void DeleteInfo(GLuint program);
-
- virtual bool GetProgramiv(
- GLES2Implementation* gl,
- GLuint program, GLenum pname, GLint* params);
-
- virtual GLint GetAttribLocation(
- GLES2Implementation* gl, GLuint program, const char* name);
-
- virtual GLint GetUniformLocation(
- GLES2Implementation* gl, GLuint program, const char* name);
-
- virtual bool GetActiveAttrib(
- GLES2Implementation* gl,
- GLuint program, GLuint index, GLsizei bufsize, GLsizei* length,
- GLint* size, GLenum* type, char* name);
-
- virtual bool GetActiveUniform(
- GLES2Implementation* gl,
- GLuint program, GLuint index, GLsizei bufsize, GLsizei* length,
- GLint* size, GLenum* type, char* name);
+ virtual void CreateInfo(GLuint program) OVERRIDE;
+
+ virtual void DeleteInfo(GLuint program) OVERRIDE;
+
+ virtual bool GetProgramiv(GLES2Implementation* gl,
+ GLuint program,
+ GLenum pname,
+ GLint* params) OVERRIDE;
+
+ virtual GLint GetAttribLocation(GLES2Implementation* gl,
+ GLuint program,
+ const char* name) OVERRIDE;
+
+ virtual GLint GetUniformLocation(GLES2Implementation* gl,
+ GLuint program,
+ const char* name) OVERRIDE;
+
+ virtual bool GetActiveAttrib(GLES2Implementation* gl,
+ GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name) OVERRIDE;
+
+ virtual bool GetActiveUniform(GLES2Implementation* gl,
+ GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name) OVERRIDE;
private:
class ProgramInfo {
diff --git a/gpu/command_buffer/client/share_group.cc b/gpu/command_buffer/client/share_group.cc
index 40bd1ca..041d79d 100644
--- a/gpu/command_buffer/client/share_group.cc
+++ b/gpu/command_buffer/client/share_group.cc
@@ -66,11 +66,11 @@ class IdHandler : public IdHandlerInterface {
// An id handler that require Gen before Bind.
class StrictIdHandler : public IdHandler {
public:
- StrictIdHandler() { }
- virtual ~StrictIdHandler() { }
+ StrictIdHandler() {}
+ virtual ~StrictIdHandler() {}
// Overridden from IdHandler.
- virtual bool MarkAsUsedForBind(GLuint id) {
+ virtual bool MarkAsUsedForBind(GLuint id) OVERRIDE {
GPU_DCHECK(id == 0 || id_allocator_.InUse(id));
return IdHandler::MarkAsUsedForBind(id);
}
@@ -122,21 +122,23 @@ class SharedIdHandler : public IdHandlerInterface {
: id_namespace_(id_namespace) {
}
- virtual ~SharedIdHandler() { }
+ virtual ~SharedIdHandler() {}
// Overridden from IdHandlerInterface.
- virtual void Destroy(GLES2Implementation* /* gl_impl */) {
+ virtual void Destroy(GLES2Implementation* /* gl_impl */) OVERRIDE {
}
- virtual void MakeIds(
- GLES2Implementation* gl_impl,
- GLuint id_offset, GLsizei n, GLuint* ids) {
+ virtual void MakeIds(GLES2Implementation* gl_impl,
+ GLuint id_offset,
+ GLsizei n,
+ GLuint* ids) OVERRIDE {
gl_impl->GenSharedIdsCHROMIUM(id_namespace_, id_offset, n, ids);
}
- virtual bool FreeIds(
- GLES2Implementation* gl_impl,
- GLsizei n, const GLuint* ids, DeleteFn delete_fn) {
+ virtual bool FreeIds(GLES2Implementation* gl_impl,
+ GLsizei n,
+ const GLuint* ids,
+ DeleteFn delete_fn) OVERRIDE {
gl_impl->DeleteSharedIdsCHROMIUM(id_namespace_, n, ids);
(gl_impl->*delete_fn)(n, ids);
// We need to ensure that the delete call is evaluated on the service side
@@ -145,7 +147,7 @@ class SharedIdHandler : public IdHandlerInterface {
return true;
}
- virtual bool MarkAsUsedForBind(GLuint id) {
+ virtual bool MarkAsUsedForBind(GLuint id) OVERRIDE {
// This has no meaning for shared resources.
return true;
}
@@ -162,28 +164,31 @@ class ThreadSafeIdHandlerWrapper : public IdHandlerInterface {
virtual ~ThreadSafeIdHandlerWrapper() { }
// Overridden from IdHandlerInterface.
- virtual void Destroy(GLES2Implementation* gl_impl) {
+ virtual void Destroy(GLES2Implementation* gl_impl) OVERRIDE {
AutoLock auto_lock(lock_);
id_handler_->Destroy(gl_impl);
}
// Overridden from IdHandlerInterface.
- virtual void MakeIds(
- GLES2Implementation* gl_impl, GLuint id_offset, GLsizei n, GLuint* ids) {
+ virtual void MakeIds(GLES2Implementation* gl_impl,
+ GLuint id_offset,
+ GLsizei n,
+ GLuint* ids) OVERRIDE {
AutoLock auto_lock(lock_);
id_handler_->MakeIds(gl_impl, id_offset, n, ids);
}
// Overridden from IdHandlerInterface.
- virtual bool FreeIds(
- GLES2Implementation* gl_impl, GLsizei n, const GLuint* ids,
- DeleteFn delete_fn) {
+ virtual bool FreeIds(GLES2Implementation* gl_impl,
+ GLsizei n,
+ const GLuint* ids,
+ DeleteFn delete_fn) OVERRIDE {
AutoLock auto_lock(lock_);
return id_handler_->FreeIds(gl_impl, n, ids, delete_fn);
}
// Overridden from IdHandlerInterface.
- virtual bool MarkAsUsedForBind(GLuint id) {
+ virtual bool MarkAsUsedForBind(GLuint id) OVERRIDE {
AutoLock auto_lock(lock_);
return id_handler_->MarkAsUsedForBind(id);
}
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 01ed120..a26c6b3 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -480,15 +480,15 @@ class GLES2DecoderImpl : public base::SupportsWeakPtr<GLES2DecoderImpl>,
static const int kMaxLogMessages = 256;
explicit GLES2DecoderImpl(ContextGroup* group);
- ~GLES2DecoderImpl();
+ virtual ~GLES2DecoderImpl();
// Overridden from AsyncAPIInterface.
virtual Error DoCommand(unsigned int command,
unsigned int arg_count,
- const void* args);
+ const void* args) OVERRIDE;
// Overridden from AsyncAPIInterface.
- virtual const char* GetCommandName(unsigned int command_id) const;
+ virtual const char* GetCommandName(unsigned int command_id) const OVERRIDE;
// Overridden from GLES2Decoder.
virtual bool Initialize(const scoped_refptr<gfx::GLSurface>& surface,
@@ -497,37 +497,41 @@ class GLES2DecoderImpl : public base::SupportsWeakPtr<GLES2DecoderImpl>,
const gfx::Size& size,
const DisallowedFeatures& disallowed_features,
const char* allowed_extensions,
- const std::vector<int32>& attribs);
- virtual void Destroy(bool have_context);
+ const std::vector<int32>& attribs) OVERRIDE;
+ virtual void Destroy(bool have_context) OVERRIDE;
virtual void SetSurface(
const scoped_refptr<gfx::GLSurface>& surface) OVERRIDE;
virtual bool SetParent(GLES2Decoder* parent_decoder,
- uint32 parent_texture_id);
- virtual bool ResizeOffscreenFrameBuffer(const gfx::Size& size);
+ uint32 parent_texture_id) OVERRIDE;
+ virtual bool ResizeOffscreenFrameBuffer(const gfx::Size& size) OVERRIDE;
void UpdateParentTextureInfo();
- virtual bool MakeCurrent();
- virtual void ReleaseCurrent();
- virtual GLES2Util* GetGLES2Util() { return &util_; }
- virtual gfx::GLContext* GetGLContext() { return context_.get(); }
- virtual ContextGroup* GetContextGroup() { return group_.get(); }
- virtual QueryManager* GetQueryManager() { return query_manager_.get(); }
- virtual VertexArrayManager* GetVertexArrayManager() {
+ virtual bool MakeCurrent() OVERRIDE;
+ virtual void ReleaseCurrent() OVERRIDE;
+ virtual GLES2Util* GetGLES2Util() OVERRIDE { return &util_; }
+ virtual gfx::GLContext* GetGLContext() OVERRIDE { return context_.get(); }
+ virtual ContextGroup* GetContextGroup() OVERRIDE { return group_.get(); }
+ virtual QueryManager* GetQueryManager() OVERRIDE {
+ return query_manager_.get();
+ }
+ virtual VertexArrayManager* GetVertexArrayManager() OVERRIDE {
return vertex_array_manager_.get();
}
- virtual bool ProcessPendingQueries();
+ virtual bool ProcessPendingQueries() OVERRIDE;
- virtual void SetGLError(
- GLenum error, const char* function_name, const char* msg);
- virtual void SetGLErrorInvalidEnum(
- const char* function_name, GLenum value, const char* label);
+ virtual void SetGLError(GLenum error,
+ const char* function_name,
+ const char* msg);
+ virtual void SetGLErrorInvalidEnum(const char* function_name,
+ GLenum value,
+ const char* label);
virtual void SetResizeCallback(
- const base::Callback<void(gfx::Size)>& callback);
+ const base::Callback<void(gfx::Size)>& callback) OVERRIDE;
- virtual void SetMsgCallback(const MsgCallback& callback);
+ virtual void SetMsgCallback(const MsgCallback& callback) OVERRIDE;
- virtual void SetStreamTextureManager(StreamTextureManager* manager);
+ virtual void SetStreamTextureManager(StreamTextureManager* manager) OVERRIDE;
virtual bool GetServiceTextureId(uint32 client_texture_id,
- uint32* service_texture_id);
+ uint32* service_texture_id) OVERRIDE;
virtual uint32 GetGLError() OVERRIDE;
@@ -553,7 +557,7 @@ class GLES2DecoderImpl : public base::SupportsWeakPtr<GLES2DecoderImpl>,
bool BoundFramebufferHasDepthAttachment();
bool BoundFramebufferHasStencilAttachment();
- virtual error::ContextLostReason GetContextLostReason();
+ virtual error::ContextLostReason GetContextLostReason() OVERRIDE;
private:
friend class ScopedGLErrorSuppressor;
@@ -955,16 +959,15 @@ class GLES2DecoderImpl : public base::SupportsWeakPtr<GLES2DecoderImpl>,
GLenum target, FramebufferManager::FramebufferInfo* info);
// overridden from GLES2Decoder
- virtual bool ClearLevel(
- unsigned service_id,
- unsigned bind_target,
- unsigned target,
- int level,
- unsigned format,
- unsigned type,
- int width,
- int height,
- bool is_texture_immutable);
+ virtual bool ClearLevel(unsigned service_id,
+ unsigned bind_target,
+ unsigned target,
+ int level,
+ unsigned format,
+ unsigned type,
+ int width,
+ int height,
+ bool is_texture_immutable) OVERRIDE;
// Restore all GL state that affects clearing.
void RestoreClearState();