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

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

Issue 812543002: Update from https://crrev.com/308331 (Closed) Base URL: git@github.com:domokit/mojo.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
138 bool GetTransformFeedbackServiceId(
139 GLuint client_id, GLuint* service_id) const {
140 return group_->GetTransformFeedbackServiceId(client_id, service_id);
141 }
142
134 // This name doesn't match the underlying function, but doing it this way 143 // This name doesn't match the underlying function, but doing it this way
135 // prevents the need to special-case the unit test generation 144 // prevents the need to special-case the unit test generation
136 VertexAttribManager* GetVertexArrayInfo(GLuint client_id) { 145 VertexAttribManager* GetVertexArrayInfo(GLuint client_id) {
137 return decoder_->GetVertexArrayManager()->GetVertexAttribManager(client_id); 146 return decoder_->GetVertexArrayManager()->GetVertexAttribManager(client_id);
138 } 147 }
139 148
140 ProgramManager* program_manager() { 149 ProgramManager* program_manager() {
141 return group_->program_manager(); 150 return group_->program_manager();
142 } 151 }
143 152
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 static const GLint kViewportHeight = kBackBufferHeight; 429 static const GLint kViewportHeight = kBackBufferHeight;
421 430
422 static const GLuint kServiceAttrib0BufferId = 801; 431 static const GLuint kServiceAttrib0BufferId = 801;
423 static const GLuint kServiceFixedAttribBufferId = 802; 432 static const GLuint kServiceFixedAttribBufferId = 802;
424 433
425 static const GLuint kServiceBufferId = 301; 434 static const GLuint kServiceBufferId = 301;
426 static const GLuint kServiceFramebufferId = 302; 435 static const GLuint kServiceFramebufferId = 302;
427 static const GLuint kServiceRenderbufferId = 303; 436 static const GLuint kServiceRenderbufferId = 303;
428 static const GLuint kServiceTextureId = 304; 437 static const GLuint kServiceTextureId = 304;
429 static const GLuint kServiceProgramId = 305; 438 static const GLuint kServiceProgramId = 305;
430 static const GLuint kServiceShaderId = 306; 439 static const GLuint kServiceSamplerId = 306;
440 static const GLuint kServiceShaderId = 307;
431 static const GLuint kServiceElementBufferId = 308; 441 static const GLuint kServiceElementBufferId = 308;
432 static const GLuint kServiceQueryId = 309; 442 static const GLuint kServiceQueryId = 309;
433 static const GLuint kServiceVertexArrayId = 310; 443 static const GLuint kServiceVertexArrayId = 310;
444 static const GLuint kServiceTransformFeedbackId = 311;
434 445
435 static const int32 kSharedMemoryId = 401; 446 static const int32 kSharedMemoryId = 401;
436 static const size_t kSharedBufferSize = 2048; 447 static const size_t kSharedBufferSize = 2048;
437 static const uint32 kSharedMemoryOffset = 132; 448 static const uint32 kSharedMemoryOffset = 132;
438 static const int32 kInvalidSharedMemoryId = 402; 449 static const int32 kInvalidSharedMemoryId = 402;
439 static const uint32 kInvalidSharedMemoryOffset = kSharedBufferSize + 1; 450 static const uint32 kInvalidSharedMemoryOffset = kSharedBufferSize + 1;
440 static const uint32 kInitialResult = 0xBDBDBDBDu; 451 static const uint32 kInitialResult = 0xBDBDBDBDu;
441 static const uint8 kInitialMemoryValue = 0xBDu; 452 static const uint8 kInitialMemoryValue = 0xBDu;
442 453
443 static const uint32 kNewClientId = 501; 454 static const uint32 kNewClientId = 501;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 scoped_refptr<gfx::GLSurfaceStub> surface_; 524 scoped_refptr<gfx::GLSurfaceStub> surface_;
514 scoped_refptr<gfx::GLContextStubWithExtensions> context_; 525 scoped_refptr<gfx::GLContextStubWithExtensions> context_;
515 scoped_ptr<MockGLES2Decoder> mock_decoder_; 526 scoped_ptr<MockGLES2Decoder> mock_decoder_;
516 scoped_ptr<GLES2Decoder> decoder_; 527 scoped_ptr<GLES2Decoder> decoder_;
517 MemoryTracker* memory_tracker_; 528 MemoryTracker* memory_tracker_;
518 529
519 GLuint client_buffer_id_; 530 GLuint client_buffer_id_;
520 GLuint client_framebuffer_id_; 531 GLuint client_framebuffer_id_;
521 GLuint client_program_id_; 532 GLuint client_program_id_;
522 GLuint client_renderbuffer_id_; 533 GLuint client_renderbuffer_id_;
534 GLuint client_sampler_id_;
523 GLuint client_shader_id_; 535 GLuint client_shader_id_;
524 GLuint client_texture_id_; 536 GLuint client_texture_id_;
525 GLuint client_element_buffer_id_; 537 GLuint client_element_buffer_id_;
526 GLuint client_vertex_shader_id_; 538 GLuint client_vertex_shader_id_;
527 GLuint client_fragment_shader_id_; 539 GLuint client_fragment_shader_id_;
528 GLuint client_query_id_; 540 GLuint client_query_id_;
529 GLuint client_vertexarray_id_; 541 GLuint client_vertexarray_id_;
530 GLuint client_valuebuffer_id_; 542 GLuint client_valuebuffer_id_;
543 GLuint client_transformfeedback_id_;
531 544
532 uint32 shared_memory_id_; 545 uint32 shared_memory_id_;
533 uint32 shared_memory_offset_; 546 uint32 shared_memory_offset_;
534 void* shared_memory_address_; 547 void* shared_memory_address_;
535 void* shared_memory_base_; 548 void* shared_memory_base_;
536 549
537 GLuint service_renderbuffer_id_; 550 GLuint service_renderbuffer_id_;
538 bool service_renderbuffer_valid_; 551 bool service_renderbuffer_valid_;
539 552
540 uint32 immediate_buffer_[64]; 553 uint32 immediate_buffer_[64];
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 }; 659 };
647 660
648 // SpecializedSetup specializations that are needed in multiple unittest files. 661 // SpecializedSetup specializations that are needed in multiple unittest files.
649 template <> 662 template <>
650 void GLES2DecoderTestBase::SpecializedSetup<cmds::LinkProgram, 0>(bool valid); 663 void GLES2DecoderTestBase::SpecializedSetup<cmds::LinkProgram, 0>(bool valid);
651 664
652 } // namespace gles2 665 } // namespace gles2
653 } // namespace gpu 666 } // namespace gpu
654 667
655 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ 668 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698