diff options
author | dcheng <dcheng@chromium.org> | 2014-10-27 14:52:11 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-27 21:52:28 +0000 |
commit | 62e71797ea280c15fe2822cdb2d46a8f3f826f4f (patch) | |
tree | 3676ed610961929c28b3599f05f73bd4a29fa985 /gpu/command_buffer/tests | |
parent | 578ab408a9a10b59297b8364a50987a8dd088cdf (diff) | |
download | chromium_src-62e71797ea280c15fe2822cdb2d46a8f3f826f4f.zip chromium_src-62e71797ea280c15fe2822cdb2d46a8f3f826f4f.tar.gz chromium_src-62e71797ea280c15fe2822cdb2d46a8f3f826f4f.tar.bz2 |
Standardize usage of virtual/override/final specifiers.
The Google C++ style guide states:
Explicitly annotate overrides of virtual functions or virtual
destructors with an override or (less frequently) final specifier.
Older (pre-C++11) code will use the virtual keyword as an inferior
alternative annotation. For clarity, use exactly one of override,
final, or virtual when declaring an override.
To better conform to these guidelines, the following constructs have
been rewritten:
- if a base class has a virtual destructor, then:
virtual ~Foo(); -> ~Foo() override;
- virtual void Foo() override; -> void Foo() override;
- virtual void Foo() override final; -> void Foo() final;
This patch was automatically generated. The clang plugin can generate
fixit hints, which are suggested edits when it is 100% sure it knows how
to fix a problem. The hints from the clang plugin were applied to the
source tree using the tool in https://codereview.chromium.org/598073004.
BUG=417463
R=sievers@chromium.org
Review URL: https://codereview.chromium.org/682743002
Cr-Commit-Position: refs/heads/master@{#301454}
Diffstat (limited to 'gpu/command_buffer/tests')
19 files changed, 38 insertions, 72 deletions
diff --git a/gpu/command_buffer/tests/compressed_texture_test.cc b/gpu/command_buffer/tests/compressed_texture_test.cc index 8c214b2..754e2d4 100644 --- a/gpu/command_buffer/tests/compressed_texture_test.cc +++ b/gpu/command_buffer/tests/compressed_texture_test.cc @@ -148,15 +148,13 @@ static void ToRGB888(uint16 rgb565, uint8 rgb888[]) { class CompressedTextureTest : public ::testing::TestWithParam<GLenum> { protected: - virtual void SetUp() { + void SetUp() override { GLManager::Options options; options.size = gfx::Size(kTextureWidth, kTextureHeight); gl_.Initialize(options); } - virtual void TearDown() { - gl_.Destroy(); - } + void TearDown() override { gl_.Destroy(); } GLuint LoadProgram() { const char* v_shader_src = SHADER( diff --git a/gpu/command_buffer/tests/gl_bind_uniform_location_unittest.cc b/gpu/command_buffer/tests/gl_bind_uniform_location_unittest.cc index c313273..81e2435 100644 --- a/gpu/command_buffer/tests/gl_bind_uniform_location_unittest.cc +++ b/gpu/command_buffer/tests/gl_bind_uniform_location_unittest.cc @@ -18,15 +18,13 @@ namespace gpu { class BindUniformLocationTest : public testing::Test { protected: static const GLsizei kResolution = 4; - virtual void SetUp() { + void SetUp() override { GLManager::Options options; options.size = gfx::Size(kResolution, kResolution); gl_.Initialize(options); } - virtual void TearDown() { - gl_.Destroy(); - } + void TearDown() override { gl_.Destroy(); } GLManager gl_; }; diff --git a/gpu/command_buffer/tests/gl_chromium_framebuffer_multisample_unittest.cc b/gpu/command_buffer/tests/gl_chromium_framebuffer_multisample_unittest.cc index fe61d51..9d36a26 100644 --- a/gpu/command_buffer/tests/gl_chromium_framebuffer_multisample_unittest.cc +++ b/gpu/command_buffer/tests/gl_chromium_framebuffer_multisample_unittest.cc @@ -15,13 +15,9 @@ namespace gpu { class GLChromiumFramebufferMultisampleTest : public testing::Test { protected: - virtual void SetUp() { - gl_.Initialize(GLManager::Options()); - } + void SetUp() override { gl_.Initialize(GLManager::Options()); } - virtual void TearDown() { - gl_.Destroy(); - } + void TearDown() override { gl_.Destroy(); } GLManager gl_; }; diff --git a/gpu/command_buffer/tests/gl_chromium_path_rendering_unittest.cc b/gpu/command_buffer/tests/gl_chromium_path_rendering_unittest.cc index 1d90053..0d17b7c 100644 --- a/gpu/command_buffer/tests/gl_chromium_path_rendering_unittest.cc +++ b/gpu/command_buffer/tests/gl_chromium_path_rendering_unittest.cc @@ -19,13 +19,13 @@ class CHROMIUMPathRenderingTest : public testing::Test { static const GLsizei kResolution = 100; protected: - virtual void SetUp() { + void SetUp() override { GLManager::Options options; options.size = gfx::Size(kResolution, kResolution); gl_.Initialize(options); } - virtual void TearDown() { gl_.Destroy(); } + void TearDown() override { gl_.Destroy(); } void ExpectEqualMatrix(const GLfloat* expected, const GLfloat* actual) { for (size_t i = 0; i < 16; ++i) { diff --git a/gpu/command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc b/gpu/command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc index d03b121..2c44e1a 100644 --- a/gpu/command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc +++ b/gpu/command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc @@ -20,7 +20,7 @@ namespace gpu { // A collection of tests that exercise the GL_CHROMIUM_copy_texture extension. class GLCopyTextureCHROMIUMTest : public testing::Test { protected: - virtual void SetUp() { + void SetUp() override { gl_.Initialize(GLManager::Options()); glGenTextures(2, textures_); @@ -39,7 +39,7 @@ class GLCopyTextureCHROMIUMTest : public testing::Test { textures_[1], 0); } - virtual void TearDown() { + void TearDown() override { glDeleteTextures(2, textures_); glDeleteFramebuffers(1, &framebuffer_id_); gl_.Destroy(); diff --git a/gpu/command_buffer/tests/gl_depth_texture_unittest.cc b/gpu/command_buffer/tests/gl_depth_texture_unittest.cc index 83bb84c..5bbbb06 100644 --- a/gpu/command_buffer/tests/gl_depth_texture_unittest.cc +++ b/gpu/command_buffer/tests/gl_depth_texture_unittest.cc @@ -17,15 +17,13 @@ namespace gpu { class DepthTextureTest : public testing::Test { protected: static const GLsizei kResolution = 64; - virtual void SetUp() { + void SetUp() override { GLManager::Options options; options.size = gfx::Size(kResolution, kResolution); gl_.Initialize(options); } - virtual void TearDown() { - gl_.Destroy(); - } + void TearDown() override { gl_.Destroy(); } GLuint SetupUnitQuad(GLint position_location); diff --git a/gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc b/gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc index 745ceb9..8430dfb 100644 --- a/gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc +++ b/gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc @@ -37,7 +37,7 @@ static const int kImageBytesPerPixel = 4; class GpuMemoryBufferTest : public testing::Test { protected: - virtual void SetUp() { + void SetUp() override { gl_.Initialize(GLManager::Options()); gl_.MakeCurrent(); @@ -58,7 +58,7 @@ class GpuMemoryBufferTest : public testing::Test { 0); } - virtual void TearDown() { + void TearDown() override { glDeleteTextures(2, texture_ids_); glDeleteFramebuffers(1, &framebuffer_id_); diff --git a/gpu/command_buffer/tests/gl_lose_context_chromium_unittest.cc b/gpu/command_buffer/tests/gl_lose_context_chromium_unittest.cc index 547c1ed..94381ac 100644 --- a/gpu/command_buffer/tests/gl_lose_context_chromium_unittest.cc +++ b/gpu/command_buffer/tests/gl_lose_context_chromium_unittest.cc @@ -17,7 +17,7 @@ namespace gpu { class GLLoseContextTest : public testing::Test { protected: - virtual void SetUp() { + void SetUp() override { GLManager::Options options; gl2_.Initialize(options); options.context_lost_allowed = true; @@ -26,7 +26,7 @@ class GLLoseContextTest : public testing::Test { gl1b_.Initialize(options); } - virtual void TearDown() { + void TearDown() override { gl1a_.Destroy(); gl1b_.Destroy(); gl2_.Destroy(); diff --git a/gpu/command_buffer/tests/gl_pointcoord_unittest.cc b/gpu/command_buffer/tests/gl_pointcoord_unittest.cc index fe71eed..d9501b0 100644 --- a/gpu/command_buffer/tests/gl_pointcoord_unittest.cc +++ b/gpu/command_buffer/tests/gl_pointcoord_unittest.cc @@ -19,15 +19,13 @@ class PointCoordTest : public testing::Test { static const GLsizei kResolution = 256; protected: - virtual void SetUp() { + void SetUp() override { GLManager::Options options; options.size = gfx::Size(kResolution, kResolution); gl_.Initialize(options); } - virtual void TearDown() { - gl_.Destroy(); - } + void TearDown() override { gl_.Destroy(); } GLuint SetupQuad(GLint position_location, GLfloat pixel_offset); diff --git a/gpu/command_buffer/tests/gl_program_unittest.cc b/gpu/command_buffer/tests/gl_program_unittest.cc index b99aa58..aec95b2 100644 --- a/gpu/command_buffer/tests/gl_program_unittest.cc +++ b/gpu/command_buffer/tests/gl_program_unittest.cc @@ -16,13 +16,9 @@ namespace gpu { class GLProgramTest : public testing::Test { protected: - virtual void SetUp() { - gl_.Initialize(GLManager::Options()); - } + void SetUp() override { gl_.Initialize(GLManager::Options()); } - virtual void TearDown() { - gl_.Destroy(); - } + void TearDown() override { gl_.Destroy(); } GLManager gl_; }; diff --git a/gpu/command_buffer/tests/gl_query_unittest.cc b/gpu/command_buffer/tests/gl_query_unittest.cc index 87235e5..0104430 100644 --- a/gpu/command_buffer/tests/gl_query_unittest.cc +++ b/gpu/command_buffer/tests/gl_query_unittest.cc @@ -16,13 +16,9 @@ namespace gpu { class QueryTest : public testing::Test { protected: - virtual void SetUp() { - gl_.Initialize(GLManager::Options()); - } + void SetUp() override { gl_.Initialize(GLManager::Options()); } - virtual void TearDown() { - gl_.Destroy(); - } + void TearDown() override { gl_.Destroy(); } GLManager gl_; }; diff --git a/gpu/command_buffer/tests/gl_readback_unittest.cc b/gpu/command_buffer/tests/gl_readback_unittest.cc index e67cbdc..cbda25c 100644 --- a/gpu/command_buffer/tests/gl_readback_unittest.cc +++ b/gpu/command_buffer/tests/gl_readback_unittest.cc @@ -21,13 +21,9 @@ namespace gpu { class GLReadbackTest : public testing::Test { protected: - virtual void SetUp() { - gl_.Initialize(GLManager::Options()); - } + void SetUp() override { gl_.Initialize(GLManager::Options()); } - virtual void TearDown() { - gl_.Destroy(); - } + void TearDown() override { gl_.Destroy(); } static void WaitForQueryCallback(int q, base::Closure cb) { unsigned int done = 0; diff --git a/gpu/command_buffer/tests/gl_shared_resources_unittest.cc b/gpu/command_buffer/tests/gl_shared_resources_unittest.cc index 136b57a..0f7ffe8 100644 --- a/gpu/command_buffer/tests/gl_shared_resources_unittest.cc +++ b/gpu/command_buffer/tests/gl_shared_resources_unittest.cc @@ -15,7 +15,7 @@ namespace gpu { class GLSharedResources : public testing::Test { protected: - virtual void SetUp() { + void SetUp() override { GLManager::Options options; options.bind_generates_resource = true; gl1_.Initialize(options); @@ -23,7 +23,7 @@ class GLSharedResources : public testing::Test { gl2_.Initialize(options); } - virtual void TearDown() { + void TearDown() override { gl1_.Destroy(); gl2_.Destroy(); } diff --git a/gpu/command_buffer/tests/gl_stream_draw_unittest.cc b/gpu/command_buffer/tests/gl_stream_draw_unittest.cc index 7ccd48d..90968c8 100644 --- a/gpu/command_buffer/tests/gl_stream_draw_unittest.cc +++ b/gpu/command_buffer/tests/gl_stream_draw_unittest.cc @@ -19,15 +19,13 @@ class GLStreamDrawTest : public testing::Test { protected: static const int kSize = 4; - virtual void SetUp() { + void SetUp() override { GLManager::Options options; options.size = gfx::Size(kSize, kSize); gl_.Initialize(options); } - virtual void TearDown() { - gl_.Destroy(); - } + void TearDown() override { gl_.Destroy(); } GLManager gl_; }; diff --git a/gpu/command_buffer/tests/gl_texture_mailbox_unittest.cc b/gpu/command_buffer/tests/gl_texture_mailbox_unittest.cc index 1ce8303..3ceb5ff 100644 --- a/gpu/command_buffer/tests/gl_texture_mailbox_unittest.cc +++ b/gpu/command_buffer/tests/gl_texture_mailbox_unittest.cc @@ -54,14 +54,14 @@ uint32 ReadTexel(GLuint id, GLint x, GLint y) { class GLTextureMailboxTest : public testing::Test { protected: - virtual void SetUp() { + void SetUp() override { gl1_.Initialize(GLManager::Options()); GLManager::Options options; options.share_mailbox_manager = &gl1_; gl2_.Initialize(options); } - virtual void TearDown() { + void TearDown() override { gl1_.Destroy(); gl2_.Destroy(); } diff --git a/gpu/command_buffer/tests/gl_texture_storage_unittest.cc b/gpu/command_buffer/tests/gl_texture_storage_unittest.cc index b28baf0..1f14e28 100644 --- a/gpu/command_buffer/tests/gl_texture_storage_unittest.cc +++ b/gpu/command_buffer/tests/gl_texture_storage_unittest.cc @@ -15,7 +15,7 @@ namespace gpu { class TextureStorageTest : public testing::Test { protected: static const GLsizei kResolution = 64; - virtual void SetUp() { + void SetUp() override { GLManager::Options options; options.size = gfx::Size(kResolution, kResolution); gl_.Initialize(options); @@ -37,9 +37,7 @@ class TextureStorageTest : public testing::Test { extensions), "GL_EXT_texture_storage"); } - virtual void TearDown() { - gl_.Destroy(); - } + void TearDown() override { gl_.Destroy(); } GLManager gl_; GLuint tex_; diff --git a/gpu/command_buffer/tests/gl_unittest.cc b/gpu/command_buffer/tests/gl_unittest.cc index f5c380f..9915190 100644 --- a/gpu/command_buffer/tests/gl_unittest.cc +++ b/gpu/command_buffer/tests/gl_unittest.cc @@ -14,13 +14,9 @@ namespace gpu { class GLTest : public testing::Test { protected: - virtual void SetUp() { - gl_.Initialize(GLManager::Options()); - } + void SetUp() override { gl_.Initialize(GLManager::Options()); } - virtual void TearDown() { - gl_.Destroy(); - } + void TearDown() override { gl_.Destroy(); } GLManager gl_; }; diff --git a/gpu/command_buffer/tests/gl_virtual_contexts_unittest.cc b/gpu/command_buffer/tests/gl_virtual_contexts_unittest.cc index 17cfa9f..9373c38 100644 --- a/gpu/command_buffer/tests/gl_virtual_contexts_unittest.cc +++ b/gpu/command_buffer/tests/gl_virtual_contexts_unittest.cc @@ -26,7 +26,7 @@ class GLVirtualContextsTest : public testing::Test { static const uint8 kExpectedRed[4]; static const uint8 kExpectedGreen[4]; - virtual void SetUp() { + void SetUp() override { GLManager::Options options; options.size = gfx::Size(kSize0, kSize0); gl_real_.Initialize(options); @@ -38,7 +38,7 @@ class GLVirtualContextsTest : public testing::Test { gl2_.Initialize(options); } - virtual void TearDown() { + void TearDown() override { gl1_.Destroy(); gl2_.Destroy(); gl_real_shared_.Destroy(); diff --git a/gpu/command_buffer/tests/occlusion_query_unittest.cc b/gpu/command_buffer/tests/occlusion_query_unittest.cc index 7cbb1a8..2f749c7 100644 --- a/gpu/command_buffer/tests/occlusion_query_unittest.cc +++ b/gpu/command_buffer/tests/occlusion_query_unittest.cc @@ -14,15 +14,13 @@ namespace gpu { class OcclusionQueryTest : public testing::Test { protected: - virtual void SetUp() { + void SetUp() override { GLManager::Options options; options.size = gfx::Size(512, 512); gl_.Initialize(options); } - virtual void TearDown() { - gl_.Destroy(); - } + void TearDown() override { gl_.Destroy(); } void DrawRect(float x, float z, float scale, float* color); |