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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc

Issue 8515023: Allow deleted resources to be used (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
6 6
7 #include "base/atomicops.h" 7 #include "base/atomicops.h"
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/common/gl_mock.h" 10 #include "gpu/command_buffer/common/gl_mock.h"
(...skipping 5374 matching lines...) Expand 10 before | Expand all | Expand 10 after
5385 false); // stencil enabled 5385 false); // stencil enabled
5386 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) 5386 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices))
5387 .Times(1) 5387 .Times(1)
5388 .RetiresOnSaturation(); 5388 .RetiresOnSaturation();
5389 DrawArrays cmd; 5389 DrawArrays cmd;
5390 cmd.Init(GL_TRIANGLES, 0, kNumVertices); 5390 cmd.Init(GL_TRIANGLES, 0, kNumVertices);
5391 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 5391 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
5392 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 5392 EXPECT_EQ(GL_NO_ERROR, GetGLError());
5393 } 5393 }
5394 5394
5395 TEST_F(GLES2DecoderWithShaderTest, CopyTexImageWithInCompleteFBOFails) {
5396 GLenum target = GL_TEXTURE_2D;
5397 GLint level = 0;
5398 GLenum internal_format = GL_RGBA;
5399 GLsizei width = 2;
5400 GLsizei height = 4;
5401 GLint border = 0;
5402 SetupTexture();
5403 DoBindRenderbuffer(GL_RENDERBUFFER, client_renderbuffer_id_,
5404 kServiceRenderbufferId);
5405 DoBindFramebuffer(GL_FRAMEBUFFER, client_framebuffer_id_,
5406 kServiceFramebufferId);
5407 DoRenderbufferStorage(
5408 GL_RENDERBUFFER, GL_RGBA4, GL_RGBA, 0, 0, GL_NO_ERROR);
5409 DoFramebufferRenderbuffer(
5410 GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER,
5411 client_renderbuffer_id_, kServiceRenderbufferId, GL_NO_ERROR);
5412
5413 EXPECT_CALL(*gl_, CopyTexImage2D(_, _, _, _, _, _, _, _))
5414 .Times(0)
5415 .RetiresOnSaturation();
5416 CopyTexImage2D cmd;
5417 cmd.Init(target, level, internal_format, 0, 0, width, height, border);
5418 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
5419 EXPECT_EQ(GL_INVALID_FRAMEBUFFER_OPERATION, GetGLError());
5420 }
5395 5421
5396 5422
5397 // TODO(gman): Complete this test. 5423 // TODO(gman): Complete this test.
5398 // TEST_F(GLES2DecoderTest, CompressedTexImage2DGLError) { 5424 // TEST_F(GLES2DecoderTest, CompressedTexImage2DGLError) {
5399 // } 5425 // }
5400 5426
5401 // TODO(gman): BufferData 5427 // TODO(gman): BufferData
5402 5428
5403 // TODO(gman): BufferDataImmediate 5429 // TODO(gman): BufferDataImmediate
5404 5430
(...skipping 18 matching lines...) Expand all
5423 // TODO(gman): TexImage2DImmediate 5449 // TODO(gman): TexImage2DImmediate
5424 5450
5425 // TODO(gman): TexSubImage2DImmediate 5451 // TODO(gman): TexSubImage2DImmediate
5426 5452
5427 // TODO(gman): UseProgram 5453 // TODO(gman): UseProgram
5428 5454
5429 // TODO(gman): SwapBuffers 5455 // TODO(gman): SwapBuffers
5430 5456
5431 } // namespace gles2 5457 } // namespace gles2
5432 } // namespace gpu 5458 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | gpu/command_buffer/service/texture_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698