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

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

Issue 2837213003: Restore samplers' state across virtualized GL contexts. (Closed)
Patch Set: Add unit tests covering restoration of sampler state. Created 3 years, 7 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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 void SetupInitStateExpectations(bool es3_capable); 243 void SetupInitStateExpectations(bool es3_capable);
244 void ExpectEnableDisable(GLenum cap, bool enable); 244 void ExpectEnableDisable(GLenum cap, bool enable);
245 245
246 // Setups up a shader for testing glUniform. 246 // Setups up a shader for testing glUniform.
247 void SetupShaderForUniform(GLenum uniform_type); 247 void SetupShaderForUniform(GLenum uniform_type);
248 void SetupDefaultProgram(); 248 void SetupDefaultProgram();
249 void SetupCubemapProgram(); 249 void SetupCubemapProgram();
250 void SetupSamplerExternalProgram(); 250 void SetupSamplerExternalProgram();
251 void SetupTexture(); 251 void SetupTexture();
252 252
253 // Sets up a sampler on texture unit 0 for certain ES3-specific tests.
254 void SetupSampler();
255
253 // Note that the error is returned as GLint instead of GLenum. 256 // Note that the error is returned as GLint instead of GLenum.
254 // This is because there is a mismatch in the types of GLenum and 257 // This is because there is a mismatch in the types of GLenum and
255 // the error values GL_NO_ERROR, GL_INVALID_ENUM, etc. GLenum is 258 // the error values GL_NO_ERROR, GL_INVALID_ENUM, etc. GLenum is
256 // typedef'd as unsigned int while the error values are defined as 259 // typedef'd as unsigned int while the error values are defined as
257 // integers. This is problematic for template functions such as 260 // integers. This is problematic for template functions such as
258 // EXPECT_EQ that expect both types to be the same. 261 // EXPECT_EQ that expect both types to be the same.
259 GLint GetGLError(); 262 GLint GetGLError();
260 263
261 void DoBindBuffer(GLenum target, GLuint client_id, GLuint service_id); 264 void DoBindBuffer(GLenum target, GLuint client_id, GLuint service_id);
262 void DoBindFramebuffer(GLenum target, GLuint client_id, GLuint service_id); 265 void DoBindFramebuffer(GLenum target, GLuint client_id, GLuint service_id);
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 if (arg[i] != array[i]) 789 if (arg[i] != array[i])
787 return false; 790 return false;
788 } 791 }
789 return true; 792 return true;
790 } 793 }
791 794
792 } // namespace gles2 795 } // namespace gles2
793 } // namespace gpu 796 } // namespace gpu
794 797
795 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ 798 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698