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

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

Issue 1335873002: Initialize default texture for GL_TEXTURE_3D and GL_TEXTURE_2D_ARRAY (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix default argument 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
« no previous file with comments | « no previous file | gpu/command_buffer/service/test_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_TEST_HELPER_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_TEST_HELPER_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_TEST_HELPER_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_TEST_HELPER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "gpu/command_buffer/service/shader_translator.h" 11 #include "gpu/command_buffer/service/shader_translator.h"
12 #include "ui/gl/gl_implementation.h" 12 #include "ui/gl/gl_implementation.h"
13 #include "ui/gl/gl_mock.h" 13 #include "ui/gl/gl_mock.h"
14 14
15 namespace gpu { 15 namespace gpu {
16 namespace gles2 { 16 namespace gles2 {
17 17
18 struct DisallowedFeatures; 18 struct DisallowedFeatures;
19 class Buffer; 19 class Buffer;
20 class BufferManager; 20 class BufferManager;
21 class MockErrorState; 21 class MockErrorState;
22 class Shader; 22 class Shader;
23 class TextureRef; 23 class TextureRef;
24 class TextureManager; 24 class TextureManager;
25 25
26 class TestHelper { 26 class TestHelper {
27 public: 27 public:
28 static const GLuint kServiceBlackTexture2dId = 701; 28 static const GLuint kServiceBlackTexture2dId = 701;
29 static const GLuint kServiceDefaultTexture2dId = 702; 29 static const GLuint kServiceDefaultTexture2dId = 702;
30 static const GLuint kServiceBlackTextureCubemapId = 703; 30 static const GLuint kServiceBlackTexture3dId = 703;
31 static const GLuint kServiceDefaultTextureCubemapId = 704; 31 static const GLuint kServiceDefaultTexture3dId = 704;
32 static const GLuint kServiceBlackExternalTextureId = 705; 32 static const GLuint kServiceBlackTexture2dArrayId = 705;
33 static const GLuint kServiceDefaultExternalTextureId = 706; 33 static const GLuint kServiceDefaultTexture2dArrayId = 706;
34 static const GLuint kServiceBlackRectangleTextureId = 707; 34 static const GLuint kServiceBlackTextureCubemapId = 707;
35 static const GLuint kServiceDefaultRectangleTextureId = 708; 35 static const GLuint kServiceDefaultTextureCubemapId = 708;
36 static const GLuint kServiceBlackExternalTextureId = 709;
37 static const GLuint kServiceDefaultExternalTextureId = 710;
38 static const GLuint kServiceBlackRectangleTextureId = 711;
39 static const GLuint kServiceDefaultRectangleTextureId = 712;
36 40
37 static const GLint kMaxSamples = 4; 41 static const GLint kMaxSamples = 4;
38 static const GLint kMaxRenderbufferSize = 1024; 42 static const GLint kMaxRenderbufferSize = 1024;
39 static const GLint kMaxTextureSize = 2048; 43 static const GLint kMaxTextureSize = 2048;
40 static const GLint kMaxCubeMapTextureSize = 256; 44 static const GLint kMaxCubeMapTextureSize = 256;
41 static const GLint kMax3DTextureSize = 256; 45 static const GLint kMax3DTextureSize = 256;
42 static const GLint kMaxRectangleTextureSize = 64; 46 static const GLint kMaxRectangleTextureSize = 64;
43 static const GLint kNumVertexAttribs = 16; 47 static const GLint kNumVertexAttribs = 16;
44 static const GLint kNumTextureUnits = 8; 48 static const GLint kNumTextureUnits = 8;
45 static const GLint kMaxTextureImageUnits = 8; 49 static const GLint kMaxTextureImageUnits = 8;
(...skipping 30 matching lines...) Expand all
76 const char* gl_version, 80 const char* gl_version,
77 bool bind_generates_resource); 81 bool bind_generates_resource);
78 static void SetupFeatureInfoInitExpectations( 82 static void SetupFeatureInfoInitExpectations(
79 ::gfx::MockGLInterface* gl, const char* extensions); 83 ::gfx::MockGLInterface* gl, const char* extensions);
80 static void SetupFeatureInfoInitExpectationsWithGLVersion( 84 static void SetupFeatureInfoInitExpectationsWithGLVersion(
81 ::gfx::MockGLInterface* gl, 85 ::gfx::MockGLInterface* gl,
82 const char* extensions, 86 const char* extensions,
83 const char* gl_renderer, 87 const char* gl_renderer,
84 const char* gl_version); 88 const char* gl_version);
85 static void SetupTextureManagerInitExpectations(::gfx::MockGLInterface* gl, 89 static void SetupTextureManagerInitExpectations(::gfx::MockGLInterface* gl,
90 bool is_es3_enabled,
86 const char* extensions, 91 const char* extensions,
87 bool use_default_textures); 92 bool use_default_textures);
88 static void SetupTextureManagerDestructionExpectations( 93 static void SetupTextureManagerDestructionExpectations(
89 ::gfx::MockGLInterface* gl, 94 ::gfx::MockGLInterface* gl,
95 bool is_es3_enabled,
90 const char* extensions, 96 const char* extensions,
91 bool use_default_textures); 97 bool use_default_textures);
92 98
93 static void SetupExpectationsForClearingUniforms( 99 static void SetupExpectationsForClearingUniforms(
94 ::gfx::MockGLInterface* gl, UniformInfo* uniforms, size_t num_uniforms); 100 ::gfx::MockGLInterface* gl, UniformInfo* uniforms, size_t num_uniforms);
95 101
96 static void SetupShader( 102 static void SetupShader(
97 ::gfx::MockGLInterface* gl, 103 ::gfx::MockGLInterface* gl,
98 AttribInfo* attribs, size_t num_attribs, 104 AttribInfo* attribs, size_t num_attribs,
99 UniformInfo* uniforms, size_t num_uniforms, 105 UniformInfo* uniforms, size_t num_uniforms,
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 165
160 private: 166 private:
161 gfx::GLImplementation old_implementation_; 167 gfx::GLImplementation old_implementation_;
162 }; 168 };
163 169
164 } // namespace gles2 170 } // namespace gles2
165 } // namespace gpu 171 } // namespace gpu
166 172
167 #endif // GPU_COMMAND_BUFFER_SERVICE_TEST_HELPER_H_ 173 #endif // GPU_COMMAND_BUFFER_SERVICE_TEST_HELPER_H_
168 174
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698