OLD | NEW |
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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 void ResetDecoder(); | 214 void ResetDecoder(); |
215 | 215 |
216 const ContextGroup& group() const { | 216 const ContextGroup& group() const { |
217 return *group_.get(); | 217 return *group_.get(); |
218 } | 218 } |
219 | 219 |
220 void LoseContexts(error::ContextLostReason reason) const { | 220 void LoseContexts(error::ContextLostReason reason) const { |
221 group_->LoseContexts(reason); | 221 group_->LoseContexts(reason); |
222 } | 222 } |
223 | 223 |
224 ::testing::StrictMock< ::gfx::MockGLInterface>* GetGLMock() const { | 224 ::testing::StrictMock<::gl::MockGLInterface>* GetGLMock() const { |
225 return gl_.get(); | 225 return gl_.get(); |
226 } | 226 } |
227 | 227 |
228 GLES2Decoder* GetDecoder() const { | 228 GLES2Decoder* GetDecoder() const { |
229 return decoder_.get(); | 229 return decoder_.get(); |
230 } | 230 } |
231 | 231 |
232 uint32_t GetAndClearBackbufferClearBitsForTest() const { | 232 uint32_t GetAndClearBackbufferClearBitsForTest() const { |
233 return decoder_->GetAndClearBackbufferClearBitsForTest(); | 233 return decoder_->GetAndClearBackbufferClearBitsForTest(); |
234 } | 234 } |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
615 static const GLint kBadUniformIndex = 1000; | 615 static const GLint kBadUniformIndex = 1000; |
616 | 616 |
617 static const GLint kOutputVariable1Size = 0; | 617 static const GLint kOutputVariable1Size = 0; |
618 static const GLenum kOutputVariable1Type = GL_FLOAT_VEC4; | 618 static const GLenum kOutputVariable1Type = GL_FLOAT_VEC4; |
619 static const GLuint kOutputVariable1ColorName = 7; | 619 static const GLuint kOutputVariable1ColorName = 7; |
620 static const GLuint kOutputVariable1Index = 0; | 620 static const GLuint kOutputVariable1Index = 0; |
621 static const char* kOutputVariable1Name; | 621 static const char* kOutputVariable1Name; |
622 static const char* kOutputVariable1NameESSL3; | 622 static const char* kOutputVariable1NameESSL3; |
623 | 623 |
624 // Use StrictMock to make 100% sure we know how GL will be called. | 624 // Use StrictMock to make 100% sure we know how GL will be called. |
625 std::unique_ptr<::testing::StrictMock<::gfx::MockGLInterface>> gl_; | 625 std::unique_ptr<::testing::StrictMock<::gl::MockGLInterface>> gl_; |
626 scoped_refptr<gfx::GLSurfaceStub> surface_; | 626 scoped_refptr<gl::GLSurfaceStub> surface_; |
627 scoped_refptr<GLContextMock> context_; | 627 scoped_refptr<GLContextMock> context_; |
628 std::unique_ptr<MockGLES2Decoder> mock_decoder_; | 628 std::unique_ptr<MockGLES2Decoder> mock_decoder_; |
629 std::unique_ptr<GLES2Decoder> decoder_; | 629 std::unique_ptr<GLES2Decoder> decoder_; |
630 MemoryTracker* memory_tracker_; | 630 MemoryTracker* memory_tracker_; |
631 | 631 |
632 GLuint client_buffer_id_; | 632 GLuint client_buffer_id_; |
633 GLuint client_framebuffer_id_; | 633 GLuint client_framebuffer_id_; |
634 GLuint client_program_id_; | 634 GLuint client_program_id_; |
635 GLuint client_renderbuffer_id_; | 635 GLuint client_renderbuffer_id_; |
636 GLuint client_sampler_id_; | 636 GLuint client_sampler_id_; |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
767 }; | 767 }; |
768 | 768 |
769 // SpecializedSetup specializations that are needed in multiple unittest files. | 769 // SpecializedSetup specializations that are needed in multiple unittest files. |
770 template <> | 770 template <> |
771 void GLES2DecoderTestBase::SpecializedSetup<cmds::LinkProgram, 0>(bool valid); | 771 void GLES2DecoderTestBase::SpecializedSetup<cmds::LinkProgram, 0>(bool valid); |
772 | 772 |
773 } // namespace gles2 | 773 } // namespace gles2 |
774 } // namespace gpu | 774 } // namespace gpu |
775 | 775 |
776 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ | 776 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ |
OLD | NEW |