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

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

Issue 863253002: Update from https://crrev.com/312600 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 135
136 bool GetSamplerServiceId(GLuint client_id, GLuint* service_id) const { 136 bool GetSamplerServiceId(GLuint client_id, GLuint* service_id) const {
137 return group_->GetSamplerServiceId(client_id, service_id); 137 return group_->GetSamplerServiceId(client_id, service_id);
138 } 138 }
139 139
140 bool GetTransformFeedbackServiceId( 140 bool GetTransformFeedbackServiceId(
141 GLuint client_id, GLuint* service_id) const { 141 GLuint client_id, GLuint* service_id) const {
142 return group_->GetTransformFeedbackServiceId(client_id, service_id); 142 return group_->GetTransformFeedbackServiceId(client_id, service_id);
143 } 143 }
144 144
145 bool GetSyncServiceId(GLuint client_id, GLsync* service_id) const {
146 return group_->GetSyncServiceId(client_id, service_id);
147 }
148
145 // This name doesn't match the underlying function, but doing it this way 149 // This name doesn't match the underlying function, but doing it this way
146 // prevents the need to special-case the unit test generation 150 // prevents the need to special-case the unit test generation
147 VertexAttribManager* GetVertexArrayInfo(GLuint client_id) { 151 VertexAttribManager* GetVertexArrayInfo(GLuint client_id) {
148 return decoder_->GetVertexArrayManager()->GetVertexAttribManager(client_id); 152 return decoder_->GetVertexArrayManager()->GetVertexAttribManager(client_id);
149 } 153 }
150 154
151 ProgramManager* program_manager() { 155 ProgramManager* program_manager() {
152 return group_->program_manager(); 156 return group_->program_manager();
153 } 157 }
154 158
155 ValuebufferManager* valuebuffer_manager() { 159 ValuebufferManager* valuebuffer_manager() {
156 return group_->valuebuffer_manager(); 160 return group_->valuebuffer_manager();
157 } 161 }
158 162
159 ValueStateMap* pending_valuebuffer_state() { 163 ValueStateMap* pending_valuebuffer_state() {
160 return group_->pending_valuebuffer_state(); 164 return group_->pending_valuebuffer_state();
161 } 165 }
162 166
163 ImageManager* GetImageManager() { return decoder_->GetImageManager(); } 167 ImageManager* GetImageManager() { return decoder_->GetImageManager(); }
164 168
165 void DoCreateProgram(GLuint client_id, GLuint service_id); 169 void DoCreateProgram(GLuint client_id, GLuint service_id);
166 void DoCreateShader(GLenum shader_type, GLuint client_id, GLuint service_id); 170 void DoCreateShader(GLenum shader_type, GLuint client_id, GLuint service_id);
171 void DoFenceSync(GLuint client_id, GLuint service_id);
167 172
168 void SetBucketAsCString(uint32 bucket_id, const char* str); 173 void SetBucketAsCString(uint32 bucket_id, const char* str);
174 // If we want a valid bucket, just set |count_in_header| as |count|,
175 // and set |str_end| as 0.
176 void SetBucketAsCStrings(uint32 bucket_id, GLsizei count, const char** str,
177 GLsizei count_in_header, char str_end);
169 178
170 void set_memory_tracker(MemoryTracker* memory_tracker) { 179 void set_memory_tracker(MemoryTracker* memory_tracker) {
171 memory_tracker_ = memory_tracker; 180 memory_tracker_ = memory_tracker;
172 } 181 }
173 182
174 struct InitState { 183 struct InitState {
175 InitState(); 184 InitState();
176 185
177 std::string extensions; 186 std::string extensions;
178 std::string gl_version; 187 std::string gl_version;
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 static const GLuint kServiceFramebufferId = 302; 446 static const GLuint kServiceFramebufferId = 302;
438 static const GLuint kServiceRenderbufferId = 303; 447 static const GLuint kServiceRenderbufferId = 303;
439 static const GLuint kServiceTextureId = 304; 448 static const GLuint kServiceTextureId = 304;
440 static const GLuint kServiceProgramId = 305; 449 static const GLuint kServiceProgramId = 305;
441 static const GLuint kServiceSamplerId = 306; 450 static const GLuint kServiceSamplerId = 306;
442 static const GLuint kServiceShaderId = 307; 451 static const GLuint kServiceShaderId = 307;
443 static const GLuint kServiceElementBufferId = 308; 452 static const GLuint kServiceElementBufferId = 308;
444 static const GLuint kServiceQueryId = 309; 453 static const GLuint kServiceQueryId = 309;
445 static const GLuint kServiceVertexArrayId = 310; 454 static const GLuint kServiceVertexArrayId = 310;
446 static const GLuint kServiceTransformFeedbackId = 311; 455 static const GLuint kServiceTransformFeedbackId = 311;
456 static const GLuint kServiceSyncId = 312;
447 457
448 static const int32 kSharedMemoryId = 401; 458 static const int32 kSharedMemoryId = 401;
449 static const size_t kSharedBufferSize = 2048; 459 static const size_t kSharedBufferSize = 2048;
450 static const uint32 kSharedMemoryOffset = 132; 460 static const uint32 kSharedMemoryOffset = 132;
451 static const int32 kInvalidSharedMemoryId = 402; 461 static const int32 kInvalidSharedMemoryId = 402;
452 static const uint32 kInvalidSharedMemoryOffset = kSharedBufferSize + 1; 462 static const uint32 kInvalidSharedMemoryOffset = kSharedBufferSize + 1;
453 static const uint32 kInitialResult = 0xBDBDBDBDu; 463 static const uint32 kInitialResult = 0xBDBDBDBDu;
454 static const uint8 kInitialMemoryValue = 0xBDu; 464 static const uint8 kInitialMemoryValue = 0xBDu;
455 465
456 static const uint32 kNewClientId = 501; 466 static const uint32 kNewClientId = 501;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 GLuint client_sampler_id_; 546 GLuint client_sampler_id_;
537 GLuint client_shader_id_; 547 GLuint client_shader_id_;
538 GLuint client_texture_id_; 548 GLuint client_texture_id_;
539 GLuint client_element_buffer_id_; 549 GLuint client_element_buffer_id_;
540 GLuint client_vertex_shader_id_; 550 GLuint client_vertex_shader_id_;
541 GLuint client_fragment_shader_id_; 551 GLuint client_fragment_shader_id_;
542 GLuint client_query_id_; 552 GLuint client_query_id_;
543 GLuint client_vertexarray_id_; 553 GLuint client_vertexarray_id_;
544 GLuint client_valuebuffer_id_; 554 GLuint client_valuebuffer_id_;
545 GLuint client_transformfeedback_id_; 555 GLuint client_transformfeedback_id_;
556 GLuint client_sync_id_;
546 557
547 uint32 shared_memory_id_; 558 uint32 shared_memory_id_;
548 uint32 shared_memory_offset_; 559 uint32 shared_memory_offset_;
549 void* shared_memory_address_; 560 void* shared_memory_address_;
550 void* shared_memory_base_; 561 void* shared_memory_base_;
551 562
552 GLuint service_renderbuffer_id_; 563 GLuint service_renderbuffer_id_;
553 bool service_renderbuffer_valid_; 564 bool service_renderbuffer_valid_;
554 565
555 uint32 immediate_buffer_[64]; 566 uint32 immediate_buffer_[64];
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 }; 672 };
662 673
663 // SpecializedSetup specializations that are needed in multiple unittest files. 674 // SpecializedSetup specializations that are needed in multiple unittest files.
664 template <> 675 template <>
665 void GLES2DecoderTestBase::SpecializedSetup<cmds::LinkProgram, 0>(bool valid); 676 void GLES2DecoderTestBase::SpecializedSetup<cmds::LinkProgram, 0>(bool valid);
666 677
667 } // namespace gles2 678 } // namespace gles2
668 } // namespace gpu 679 } // namespace gpu
669 680
670 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ 681 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698