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

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

Issue 788123002: Add sampler related ES3 APIs to command buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 } 124 }
125 125
126 Valuebuffer* GetValuebuffer(GLuint client_id) { 126 Valuebuffer* GetValuebuffer(GLuint client_id) {
127 return group_->valuebuffer_manager()->GetValuebuffer(client_id); 127 return group_->valuebuffer_manager()->GetValuebuffer(client_id);
128 } 128 }
129 129
130 QueryManager::Query* GetQueryInfo(GLuint client_id) { 130 QueryManager::Query* GetQueryInfo(GLuint client_id) {
131 return decoder_->GetQueryManager()->GetQuery(client_id); 131 return decoder_->GetQueryManager()->GetQuery(client_id);
132 } 132 }
133 133
134 bool GetSamplerServiceId(GLuint client_id, GLuint* service_id) const {
135 return group_->GetSamplerServiceId(client_id, service_id);
136 }
137
134 // This name doesn't match the underlying function, but doing it this way 138 // This name doesn't match the underlying function, but doing it this way
135 // prevents the need to special-case the unit test generation 139 // prevents the need to special-case the unit test generation
136 VertexAttribManager* GetVertexArrayInfo(GLuint client_id) { 140 VertexAttribManager* GetVertexArrayInfo(GLuint client_id) {
137 return decoder_->GetVertexArrayManager()->GetVertexAttribManager(client_id); 141 return decoder_->GetVertexArrayManager()->GetVertexAttribManager(client_id);
138 } 142 }
139 143
140 ProgramManager* program_manager() { 144 ProgramManager* program_manager() {
141 return group_->program_manager(); 145 return group_->program_manager();
142 } 146 }
143 147
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 static const GLint kViewportHeight = kBackBufferHeight; 424 static const GLint kViewportHeight = kBackBufferHeight;
421 425
422 static const GLuint kServiceAttrib0BufferId = 801; 426 static const GLuint kServiceAttrib0BufferId = 801;
423 static const GLuint kServiceFixedAttribBufferId = 802; 427 static const GLuint kServiceFixedAttribBufferId = 802;
424 428
425 static const GLuint kServiceBufferId = 301; 429 static const GLuint kServiceBufferId = 301;
426 static const GLuint kServiceFramebufferId = 302; 430 static const GLuint kServiceFramebufferId = 302;
427 static const GLuint kServiceRenderbufferId = 303; 431 static const GLuint kServiceRenderbufferId = 303;
428 static const GLuint kServiceTextureId = 304; 432 static const GLuint kServiceTextureId = 304;
429 static const GLuint kServiceProgramId = 305; 433 static const GLuint kServiceProgramId = 305;
430 static const GLuint kServiceShaderId = 306; 434 static const GLuint kServiceSamplerId = 306;
435 static const GLuint kServiceShaderId = 307;
431 static const GLuint kServiceElementBufferId = 308; 436 static const GLuint kServiceElementBufferId = 308;
432 static const GLuint kServiceQueryId = 309; 437 static const GLuint kServiceQueryId = 309;
433 static const GLuint kServiceVertexArrayId = 310; 438 static const GLuint kServiceVertexArrayId = 310;
434 439
435 static const int32 kSharedMemoryId = 401; 440 static const int32 kSharedMemoryId = 401;
436 static const size_t kSharedBufferSize = 2048; 441 static const size_t kSharedBufferSize = 2048;
437 static const uint32 kSharedMemoryOffset = 132; 442 static const uint32 kSharedMemoryOffset = 132;
438 static const int32 kInvalidSharedMemoryId = 402; 443 static const int32 kInvalidSharedMemoryId = 402;
439 static const uint32 kInvalidSharedMemoryOffset = kSharedBufferSize + 1; 444 static const uint32 kInvalidSharedMemoryOffset = kSharedBufferSize + 1;
440 static const uint32 kInitialResult = 0xBDBDBDBDu; 445 static const uint32 kInitialResult = 0xBDBDBDBDu;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 scoped_refptr<gfx::GLSurfaceStub> surface_; 518 scoped_refptr<gfx::GLSurfaceStub> surface_;
514 scoped_refptr<gfx::GLContextStubWithExtensions> context_; 519 scoped_refptr<gfx::GLContextStubWithExtensions> context_;
515 scoped_ptr<MockGLES2Decoder> mock_decoder_; 520 scoped_ptr<MockGLES2Decoder> mock_decoder_;
516 scoped_ptr<GLES2Decoder> decoder_; 521 scoped_ptr<GLES2Decoder> decoder_;
517 MemoryTracker* memory_tracker_; 522 MemoryTracker* memory_tracker_;
518 523
519 GLuint client_buffer_id_; 524 GLuint client_buffer_id_;
520 GLuint client_framebuffer_id_; 525 GLuint client_framebuffer_id_;
521 GLuint client_program_id_; 526 GLuint client_program_id_;
522 GLuint client_renderbuffer_id_; 527 GLuint client_renderbuffer_id_;
528 GLuint client_sampler_id_;
523 GLuint client_shader_id_; 529 GLuint client_shader_id_;
524 GLuint client_texture_id_; 530 GLuint client_texture_id_;
525 GLuint client_element_buffer_id_; 531 GLuint client_element_buffer_id_;
526 GLuint client_vertex_shader_id_; 532 GLuint client_vertex_shader_id_;
527 GLuint client_fragment_shader_id_; 533 GLuint client_fragment_shader_id_;
528 GLuint client_query_id_; 534 GLuint client_query_id_;
529 GLuint client_vertexarray_id_; 535 GLuint client_vertexarray_id_;
530 GLuint client_valuebuffer_id_; 536 GLuint client_valuebuffer_id_;
531 537
532 uint32 shared_memory_id_; 538 uint32 shared_memory_id_;
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 }; 652 };
647 653
648 // SpecializedSetup specializations that are needed in multiple unittest files. 654 // SpecializedSetup specializations that are needed in multiple unittest files.
649 template <> 655 template <>
650 void GLES2DecoderTestBase::SpecializedSetup<cmds::LinkProgram, 0>(bool valid); 656 void GLES2DecoderTestBase::SpecializedSetup<cmds::LinkProgram, 0>(bool valid);
651 657
652 } // namespace gles2 658 } // namespace gles2
653 } // namespace gpu 659 } // namespace gpu
654 660
655 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ 661 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698