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

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

Issue 1309743005: command_buffer: Implement EXT_blend_func_extended (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@new-05-path-fragment-input-gen
Patch Set: address review comments Created 5 years, 3 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 "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 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 static const GLenum kUniform3Type = GL_FLOAT_VEC3; 573 static const GLenum kUniform3Type = GL_FLOAT_VEC3;
574 static const GLenum kUniform4Type = GL_UNSIGNED_INT; 574 static const GLenum kUniform4Type = GL_UNSIGNED_INT;
575 static const GLenum kUniform5Type = GL_UNSIGNED_INT_VEC2; 575 static const GLenum kUniform5Type = GL_UNSIGNED_INT_VEC2;
576 static const GLenum kUniform6Type = GL_UNSIGNED_INT_VEC3; 576 static const GLenum kUniform6Type = GL_UNSIGNED_INT_VEC3;
577 static const GLenum kUniform7Type = GL_UNSIGNED_INT_VEC4; 577 static const GLenum kUniform7Type = GL_UNSIGNED_INT_VEC4;
578 static const GLenum kUniformSamplerExternalType = GL_SAMPLER_EXTERNAL_OES; 578 static const GLenum kUniformSamplerExternalType = GL_SAMPLER_EXTERNAL_OES;
579 static const GLenum kUniformCubemapType = GL_SAMPLER_CUBE; 579 static const GLenum kUniformCubemapType = GL_SAMPLER_CUBE;
580 static const GLint kInvalidUniformLocation = 30; 580 static const GLint kInvalidUniformLocation = 30;
581 static const GLint kBadUniformIndex = 1000; 581 static const GLint kBadUniformIndex = 1000;
582 582
583 static const GLint kOutputVariable1Size = 0;
584 static const GLenum kOutputVariable1Type = GL_FLOAT_VEC4;
585 static const GLuint kOutputVariable1ColorName = 7;
586 static const GLuint kOutputVariable1Index = 0;
587 static const char* kOutputVariable1Name;
588 static const char* kOutputVariable1NameESSL3;
589
583 // Use StrictMock to make 100% sure we know how GL will be called. 590 // Use StrictMock to make 100% sure we know how GL will be called.
584 scoped_ptr< ::testing::StrictMock< ::gfx::MockGLInterface> > gl_; 591 scoped_ptr< ::testing::StrictMock< ::gfx::MockGLInterface> > gl_;
585 scoped_refptr<gfx::GLSurfaceStub> surface_; 592 scoped_refptr<gfx::GLSurfaceStub> surface_;
586 scoped_refptr<GLContextMock> context_; 593 scoped_refptr<GLContextMock> context_;
587 scoped_ptr<MockGLES2Decoder> mock_decoder_; 594 scoped_ptr<MockGLES2Decoder> mock_decoder_;
588 scoped_ptr<GLES2Decoder> decoder_; 595 scoped_ptr<GLES2Decoder> decoder_;
589 MemoryTracker* memory_tracker_; 596 MemoryTracker* memory_tracker_;
590 597
591 GLuint client_buffer_id_; 598 GLuint client_buffer_id_;
592 GLuint client_framebuffer_id_; 599 GLuint client_framebuffer_id_;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 bool cached_dither; 638 bool cached_dither;
632 bool cached_polygon_offset_fill; 639 bool cached_polygon_offset_fill;
633 bool cached_sample_alpha_to_coverage; 640 bool cached_sample_alpha_to_coverage;
634 bool cached_sample_coverage; 641 bool cached_sample_coverage;
635 bool cached_scissor_test; 642 bool cached_scissor_test;
636 bool cached_stencil_test; 643 bool cached_stencil_test;
637 }; 644 };
638 645
639 EnableFlags enable_flags_; 646 EnableFlags enable_flags_;
640 647
648 int shader_language_version_;
649
641 private: 650 private:
642 class MockCommandBufferEngine : public CommandBufferEngine { 651 class MockCommandBufferEngine : public CommandBufferEngine {
643 public: 652 public:
644 MockCommandBufferEngine(); 653 MockCommandBufferEngine();
645 654
646 ~MockCommandBufferEngine() override; 655 ~MockCommandBufferEngine() override;
647 656
648 scoped_refptr<gpu::Buffer> GetSharedMemoryBuffer(int32 shm_id) override; 657 scoped_refptr<gpu::Buffer> GetSharedMemoryBuffer(int32 shm_id) override;
649 658
650 void ClearSharedMemory() { 659 void ClearSharedMemory() {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 }; 730 };
722 731
723 // SpecializedSetup specializations that are needed in multiple unittest files. 732 // SpecializedSetup specializations that are needed in multiple unittest files.
724 template <> 733 template <>
725 void GLES2DecoderTestBase::SpecializedSetup<cmds::LinkProgram, 0>(bool valid); 734 void GLES2DecoderTestBase::SpecializedSetup<cmds::LinkProgram, 0>(bool valid);
726 735
727 } // namespace gles2 736 } // namespace gles2
728 } // namespace gpu 737 } // namespace gpu
729 738
730 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ 739 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698