Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1418)

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h

Issue 682743002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_
7 7
8 #include "gpu/command_buffer/common/gles2_cmd_format.h" 8 #include "gpu/command_buffer/common/gles2_cmd_format.h"
9 #include "gpu/command_buffer/common/gles2_cmd_utils.h" 9 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
10 #include "gpu/command_buffer/service/buffer_manager.h" 10 #include "gpu/command_buffer/service/buffer_manager.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 template <typename T, typename Command> 63 template <typename T, typename Command>
64 T GetImmediateDataAs(Command* cmd) { 64 T GetImmediateDataAs(Command* cmd) {
65 return reinterpret_cast<T>(ImmediateDataAddress(cmd)); 65 return reinterpret_cast<T>(ImmediateDataAddress(cmd));
66 } 66 }
67 67
68 void ClearSharedMemory() { 68 void ClearSharedMemory() {
69 engine_->ClearSharedMemory(); 69 engine_->ClearSharedMemory();
70 } 70 }
71 71
72 virtual void SetUp() override; 72 void SetUp() override;
73 virtual void TearDown() override; 73 void TearDown() override;
74 74
75 template <typename T> 75 template <typename T>
76 error::Error ExecuteCmd(const T& cmd) { 76 error::Error ExecuteCmd(const T& cmd) {
77 COMPILE_ASSERT(T::kArgFlags == cmd::kFixed, Cmd_kArgFlags_not_kFixed); 77 COMPILE_ASSERT(T::kArgFlags == cmd::kFixed, Cmd_kArgFlags_not_kFixed);
78 return decoder_->DoCommands( 78 return decoder_->DoCommands(
79 1, (const void*)&cmd, ComputeNumEntries(sizeof(cmd)), 0); 79 1, (const void*)&cmd, ComputeNumEntries(sizeof(cmd)), 0);
80 } 80 }
81 81
82 template <typename T> 82 template <typename T>
83 error::Error ExecuteImmediateCmd(const T& cmd, size_t data_size) { 83 error::Error ExecuteImmediateCmd(const T& cmd, size_t data_size) {
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 MockGLStates gl_states_; 620 MockGLStates gl_states_;
621 }; 621 };
622 622
623 class GLES2DecoderWithShaderTestBase : public GLES2DecoderTestBase { 623 class GLES2DecoderWithShaderTestBase : public GLES2DecoderTestBase {
624 public: 624 public:
625 GLES2DecoderWithShaderTestBase() 625 GLES2DecoderWithShaderTestBase()
626 : GLES2DecoderTestBase() { 626 : GLES2DecoderTestBase() {
627 } 627 }
628 628
629 protected: 629 protected:
630 virtual void SetUp() override; 630 void SetUp() override;
631 virtual void TearDown() override; 631 void TearDown() override;
632
633 }; 632 };
634 633
635 // SpecializedSetup specializations that are needed in multiple unittest files. 634 // SpecializedSetup specializations that are needed in multiple unittest files.
636 template <> 635 template <>
637 void GLES2DecoderTestBase::SpecializedSetup<cmds::LinkProgram, 0>(bool valid); 636 void GLES2DecoderTestBase::SpecializedSetup<cmds::LinkProgram, 0>(bool valid);
638 637
639 } // namespace gles2 638 } // namespace gles2
640 } // namespace gpu 639 } // namespace gpu
641 640
642 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ 641 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698