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

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

Issue 1859703002: convert //gpu to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: undo part of clang-format Created 4 years, 8 months 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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 static const GLint kBadUniformIndex = 1000; 620 static const GLint kBadUniformIndex = 1000;
621 621
622 static const GLint kOutputVariable1Size = 0; 622 static const GLint kOutputVariable1Size = 0;
623 static const GLenum kOutputVariable1Type = GL_FLOAT_VEC4; 623 static const GLenum kOutputVariable1Type = GL_FLOAT_VEC4;
624 static const GLuint kOutputVariable1ColorName = 7; 624 static const GLuint kOutputVariable1ColorName = 7;
625 static const GLuint kOutputVariable1Index = 0; 625 static const GLuint kOutputVariable1Index = 0;
626 static const char* kOutputVariable1Name; 626 static const char* kOutputVariable1Name;
627 static const char* kOutputVariable1NameESSL3; 627 static const char* kOutputVariable1NameESSL3;
628 628
629 // Use StrictMock to make 100% sure we know how GL will be called. 629 // Use StrictMock to make 100% sure we know how GL will be called.
630 scoped_ptr< ::testing::StrictMock< ::gfx::MockGLInterface> > gl_; 630 std::unique_ptr<::testing::StrictMock<::gfx::MockGLInterface>> gl_;
631 scoped_refptr<gfx::GLSurfaceStub> surface_; 631 scoped_refptr<gfx::GLSurfaceStub> surface_;
632 scoped_refptr<GLContextMock> context_; 632 scoped_refptr<GLContextMock> context_;
633 scoped_ptr<MockGLES2Decoder> mock_decoder_; 633 std::unique_ptr<MockGLES2Decoder> mock_decoder_;
634 scoped_ptr<GLES2Decoder> decoder_; 634 std::unique_ptr<GLES2Decoder> decoder_;
635 MemoryTracker* memory_tracker_; 635 MemoryTracker* memory_tracker_;
636 636
637 GLuint client_buffer_id_; 637 GLuint client_buffer_id_;
638 GLuint client_framebuffer_id_; 638 GLuint client_framebuffer_id_;
639 GLuint client_program_id_; 639 GLuint client_program_id_;
640 GLuint client_renderbuffer_id_; 640 GLuint client_renderbuffer_id_;
641 GLuint client_sampler_id_; 641 GLuint client_sampler_id_;
642 GLuint client_shader_id_; 642 GLuint client_shader_id_;
643 GLuint client_texture_id_; 643 GLuint client_texture_id_;
644 GLuint client_element_buffer_id_; 644 GLuint client_element_buffer_id_;
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 private: 747 private:
748 GLuint bound_array_buffer_object_; 748 GLuint bound_array_buffer_object_;
749 GLuint bound_vertex_array_object_; 749 GLuint bound_vertex_array_object_;
750 }; // class MockGLStates 750 }; // class MockGLStates
751 751
752 void AddExpectationsForVertexAttribManager(); 752 void AddExpectationsForVertexAttribManager();
753 void SetupMockGLBehaviors(); 753 void SetupMockGLBehaviors();
754 754
755 void SetupInitStateManualExpectations(bool es3_capable); 755 void SetupInitStateManualExpectations(bool es3_capable);
756 756
757 scoped_ptr< ::testing::StrictMock<MockCommandBufferEngine> > engine_; 757 std::unique_ptr<::testing::StrictMock<MockCommandBufferEngine>> engine_;
758 GpuPreferences gpu_preferences_; 758 GpuPreferences gpu_preferences_;
759 scoped_refptr<ContextGroup> group_; 759 scoped_refptr<ContextGroup> group_;
760 MockGLStates gl_states_; 760 MockGLStates gl_states_;
761 base::MessageLoop message_loop_; 761 base::MessageLoop message_loop_;
762 }; 762 };
763 763
764 class GLES2DecoderWithShaderTestBase : public GLES2DecoderTestBase { 764 class GLES2DecoderWithShaderTestBase : public GLES2DecoderTestBase {
765 public: 765 public:
766 GLES2DecoderWithShaderTestBase() 766 GLES2DecoderWithShaderTestBase()
767 : GLES2DecoderTestBase() { 767 : GLES2DecoderTestBase() {
768 } 768 }
769 769
770 protected: 770 protected:
771 void SetUp() override; 771 void SetUp() override;
772 void TearDown() override; 772 void TearDown() override;
773 }; 773 };
774 774
775 // SpecializedSetup specializations that are needed in multiple unittest files. 775 // SpecializedSetup specializations that are needed in multiple unittest files.
776 template <> 776 template <>
777 void GLES2DecoderTestBase::SpecializedSetup<cmds::LinkProgram, 0>(bool valid); 777 void GLES2DecoderTestBase::SpecializedSetup<cmds::LinkProgram, 0>(bool valid);
778 778
779 } // namespace gles2 779 } // namespace gles2
780 } // namespace gpu 780 } // namespace gpu
781 781
782 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ 782 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698