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

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

Issue 12647003: Refactor a bunch of Texture related GPU code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
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 "ui/gl/gl_mock.h" 8 #include "ui/gl/gl_mock.h"
9 9
10 namespace gpu { 10 namespace gpu {
11 namespace gles2 { 11 namespace gles2 {
12 12
13 struct DisallowedFeatures; 13 struct DisallowedFeatures;
14 class Buffer; 14 class Buffer;
15 class BufferManager; 15 class BufferManager;
16 class MockGLES2Decoder; 16 class MockGLES2Decoder;
17 class Texture;
18 class TextureManager;
17 19
18 class TestHelper { 20 class TestHelper {
19 public: 21 public:
20 static const GLuint kServiceBlackTexture2dId = 701; 22 static const GLuint kServiceBlackTexture2dId = 701;
21 static const GLuint kServiceDefaultTexture2dId = 702; 23 static const GLuint kServiceDefaultTexture2dId = 702;
22 static const GLuint kServiceBlackTextureCubemapId = 703; 24 static const GLuint kServiceBlackTextureCubemapId = 703;
23 static const GLuint kServiceDefaultTextureCubemapId = 704; 25 static const GLuint kServiceDefaultTextureCubemapId = 704;
24 static const GLuint kServiceBlackExternalTextureId = 705; 26 static const GLuint kServiceBlackExternalTextureId = 705;
25 static const GLuint kServiceDefaultExternalTextureId = 706; 27 static const GLuint kServiceDefaultExternalTextureId = 706;
26 static const GLuint kServiceBlackRectangleTextureId = 707; 28 static const GLuint kServiceBlackRectangleTextureId = 707;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 static void SetupProgramSuccessExpectations(::gfx::MockGLInterface* gl, 89 static void SetupProgramSuccessExpectations(::gfx::MockGLInterface* gl,
88 AttribInfo* attribs, size_t num_attribs, 90 AttribInfo* attribs, size_t num_attribs,
89 UniformInfo* uniforms, size_t num_uniforms, 91 UniformInfo* uniforms, size_t num_uniforms,
90 GLuint service_id); 92 GLuint service_id);
91 93
92 static void DoBufferData( 94 static void DoBufferData(
93 ::gfx::MockGLInterface* gl, MockGLES2Decoder* decoder, 95 ::gfx::MockGLInterface* gl, MockGLES2Decoder* decoder,
94 BufferManager* manager, Buffer* buffer, GLsizeiptr size, GLenum usage, 96 BufferManager* manager, Buffer* buffer, GLsizeiptr size, GLenum usage,
95 const GLvoid* data, GLenum error); 97 const GLvoid* data, GLenum error);
96 98
99 static void SetTexParameterWithExpectations(
100 ::gfx::MockGLInterface* gl, MockGLES2Decoder* decoder,
101 TextureManager* manager, Texture* texture,
102 GLenum pname, GLint value, GLenum error);
103
97 private: 104 private:
98 static void SetupTextureInitializationExpectations( 105 static void SetupTextureInitializationExpectations(
99 ::gfx::MockGLInterface* gl, GLenum target); 106 ::gfx::MockGLInterface* gl, GLenum target);
100 static void SetupTextureDestructionExpectations( 107 static void SetupTextureDestructionExpectations(
101 ::gfx::MockGLInterface* gl, GLenum target); 108 ::gfx::MockGLInterface* gl, GLenum target);
102 }; 109 };
103 110
104 } // namespace gles2 111 } // namespace gles2
105 } // namespace gpu 112 } // namespace gpu
106 113
107 #endif // GPU_COMMAND_BUFFER_SERVICE_TEST_HELPER_H_ 114 #endif // GPU_COMMAND_BUFFER_SERVICE_TEST_HELPER_H_
108 115
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h ('k') | gpu/command_buffer/service/test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698