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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc

Issue 10450030: Defer initializing the CopyTextureCHROMIUMResourceManager (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
===================================================================
--- gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc (revision 138818)
+++ gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc (working copy)
@@ -72,125 +72,6 @@
}
}
-// Setup the expectations required for the inialiazation of the resources
-// used by the GL_CHROMIUM_copy_texture extension.
-void GLES2DecoderTestBase::AddExpectationsForCopyTextureCHROMIUM() {
- static GLuint copy_texture_chromium_buffer_ids[] = {
- kServiceCopyTextureChromiumVertexBufferId,
- kServiceCopyTextureChromiumTextureBufferId
- };
- EXPECT_CALL(*gl_, GenBuffersARB(arraysize(copy_texture_chromium_buffer_ids),
- _))
- .WillOnce(SetArrayArgument<1>(copy_texture_chromium_buffer_ids,
- copy_texture_chromium_buffer_ids + arraysize(
- copy_texture_chromium_buffer_ids)))
- .RetiresOnSaturation();
-
- EXPECT_CALL(*gl_, BindBuffer(GL_ARRAY_BUFFER,
- kServiceCopyTextureChromiumVertexBufferId))
- .Times(1)
- .RetiresOnSaturation();
-
- EXPECT_CALL(*gl_, BufferData(GL_ARRAY_BUFFER, 16 * sizeof(GLfloat), _,
- GL_STATIC_DRAW))
- .Times(1)
- .RetiresOnSaturation();
-
- EXPECT_CALL(*gl_, BindBuffer(GL_ARRAY_BUFFER,
- kServiceCopyTextureChromiumTextureBufferId))
- .Times(1)
- .RetiresOnSaturation();
-
- EXPECT_CALL(*gl_, BufferData(GL_ARRAY_BUFFER, 8 * sizeof(GLfloat), _,
- GL_STATIC_DRAW))
- .Times(1)
- .RetiresOnSaturation();
-
- static GLuint copy_texture_chromium_fbo_ids[] = {
- kServiceCopyTextureChromiumFBOId
- };
- EXPECT_CALL(*gl_, GenFramebuffersEXT(arraysize(copy_texture_chromium_fbo_ids),
- _))
- .WillOnce(SetArrayArgument<1>(copy_texture_chromium_fbo_ids,
- copy_texture_chromium_fbo_ids + arraysize(
- copy_texture_chromium_fbo_ids)))
- .RetiresOnSaturation();
-
- for (int shader = 0; shader < 5; ++shader) {
- EXPECT_CALL(*gl_, CreateShader(
- shader == 0 ? GL_VERTEX_SHADER : GL_FRAGMENT_SHADER))
- .WillOnce(Return(kServiceCopyTextureChromiumShaderId + shader))
- .RetiresOnSaturation();
-
- EXPECT_CALL(*gl_, ShaderSource(kServiceCopyTextureChromiumShaderId + shader,
- 1, _, 0))
- .Times(1)
- .RetiresOnSaturation();
-
- EXPECT_CALL(*gl_, CompileShader(
- kServiceCopyTextureChromiumShaderId + shader))
- .Times(1)
- .RetiresOnSaturation();
-#ifndef NDEBUG
- EXPECT_CALL(*gl_, GetShaderiv(kServiceCopyTextureChromiumShaderId + shader,
- GL_COMPILE_STATUS, _))
- .WillOnce(SetArgPointee<2>(GL_TRUE))
- .RetiresOnSaturation();
-#endif
- }
-
- for (int program = 0; program < 4; ++program) {
- EXPECT_CALL(*gl_, CreateProgram())
- .WillOnce(Return(kServiceCopyTextureChromiumProgramId + program))
- .RetiresOnSaturation();
-
- EXPECT_CALL(*gl_, AttachShader(
- kServiceCopyTextureChromiumProgramId + program,
- kServiceCopyTextureChromiumShaderId))
- .Times(1)
- .RetiresOnSaturation();
-
- EXPECT_CALL(*gl_, AttachShader(
- kServiceCopyTextureChromiumProgramId + program,
- kServiceCopyTextureChromiumShaderId + program + 1))
- .Times(1)
- .RetiresOnSaturation();
-
- EXPECT_CALL(*gl_, BindAttribLocation(
- kServiceCopyTextureChromiumProgramId + program, 0, _))
- .Times(1)
- .RetiresOnSaturation();
-
- EXPECT_CALL(*gl_, BindAttribLocation(
- kServiceCopyTextureChromiumProgramId + program, 1, _))
- .Times(1)
- .RetiresOnSaturation();
-
- EXPECT_CALL(*gl_, LinkProgram(
- kServiceCopyTextureChromiumProgramId + program))
- .Times(1)
- .RetiresOnSaturation();
-
-#ifndef NDEBUG
- EXPECT_CALL(*gl_, GetProgramiv(
- kServiceCopyTextureChromiumProgramId + program, GL_LINK_STATUS, _))
- .WillOnce(SetArgPointee<2>(true))
- .RetiresOnSaturation();
-#endif
-
- EXPECT_CALL(*gl_, GetUniformLocation(
- kServiceCopyTextureChromiumProgramId + program, _))
- .WillOnce(Return(kServiceCopyTextureChromiumSamplerLocation))
- .RetiresOnSaturation();
- }
-
- for (int shader = 0; shader < 5; ++shader)
- EXPECT_CALL(*gl_,
- DeleteShader(kServiceCopyTextureChromiumShaderId + shader))
- .Times(1)
- .RetiresOnSaturation();
-}
-
void GLES2DecoderTestBase::InitDecoder(
const char* extensions,
bool has_alpha,
@@ -211,7 +92,6 @@
EXPECT_TRUE(group_->Initialize(DisallowedFeatures(), NULL));
- AddExpectationsForCopyTextureCHROMIUM();
AddExpectationsForVertexAttribManager();
EXPECT_CALL(*gl_, EnableVertexAttribArray(0))
@@ -377,19 +257,7 @@
// All Tests should have read all their GLErrors before getting here.
EXPECT_EQ(GL_NO_ERROR, GetGLError());
- EXPECT_CALL(*gl_, DeleteFramebuffersEXT(1,
- Pointee(kServiceCopyTextureChromiumFBOId)))
- .Times(1)
- .RetiresOnSaturation();
- EXPECT_CALL(*gl_, DeleteProgram(_))
- .Times(4)
- .RetiresOnSaturation();
-
- EXPECT_CALL(*gl_, DeleteBuffersARB(2, _))
- .Times(1)
- .RetiresOnSaturation();
-
EXPECT_CALL(*gl_, DeleteBuffersARB(1, _))
.Times(2)
.RetiresOnSaturation();
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698