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

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

Issue 7358006: Cache OpenGL program info on the client side of the command buffer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 4 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) 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 4258 matching lines...) Expand 10 before | Expand all | Expand 10 after
4269 EXPECT_GT(bucket->size(), 0u); 4269 EXPECT_GT(bucket->size(), 0u);
4270 } 4270 }
4271 4271
4272 TEST_F(GLES2DecoderWithShaderTest, GetProgramInfoCHROMIUMInvalidArgs) { 4272 TEST_F(GLES2DecoderWithShaderTest, GetProgramInfoCHROMIUMInvalidArgs) {
4273 const uint32 kBucketId = 123; 4273 const uint32 kBucketId = 123;
4274 CommonDecoder::Bucket* bucket = decoder_->GetBucket(kBucketId); 4274 CommonDecoder::Bucket* bucket = decoder_->GetBucket(kBucketId);
4275 EXPECT_TRUE(bucket == NULL); 4275 EXPECT_TRUE(bucket == NULL);
4276 GetProgramInfoCHROMIUM cmd; 4276 GetProgramInfoCHROMIUM cmd;
4277 cmd.Init(kInvalidClientId, kBucketId); 4277 cmd.Init(kInvalidClientId, kBucketId);
4278 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 4278 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
4279 EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); 4279 EXPECT_EQ(GL_NO_ERROR, GetGLError());
4280 bucket = decoder_->GetBucket(kBucketId); 4280 bucket = decoder_->GetBucket(kBucketId);
4281 ASSERT_TRUE(bucket != NULL); 4281 ASSERT_TRUE(bucket != NULL);
4282 EXPECT_EQ(sizeof(ProgramInfoHeader), bucket->size()); 4282 EXPECT_EQ(sizeof(ProgramInfoHeader), bucket->size());
4283 ProgramInfoHeader* info = bucket->GetDataAs<ProgramInfoHeader*>( 4283 ProgramInfoHeader* info = bucket->GetDataAs<ProgramInfoHeader*>(
4284 0, sizeof(ProgramInfoHeader)); 4284 0, sizeof(ProgramInfoHeader));
4285 ASSERT_TRUE(info != 0); 4285 ASSERT_TRUE(info != 0);
4286 EXPECT_EQ(0u, info->link_status); 4286 EXPECT_EQ(0u, info->link_status);
4287 EXPECT_EQ(0u, info->num_attribs); 4287 EXPECT_EQ(0u, info->num_attribs);
4288 EXPECT_EQ(0u, info->num_uniforms); 4288 EXPECT_EQ(0u, info->num_uniforms);
4289 } 4289 }
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
4514 // TODO(gman): TexImage2DImmediate 4514 // TODO(gman): TexImage2DImmediate
4515 4515
4516 // TODO(gman): TexSubImage2DImmediate 4516 // TODO(gman): TexSubImage2DImmediate
4517 4517
4518 // TODO(gman): UseProgram 4518 // TODO(gman): UseProgram
4519 4519
4520 // TODO(gman): SwapBuffers 4520 // TODO(gman): SwapBuffers
4521 4521
4522 } // namespace gles2 4522 } // namespace gles2
4523 } // namespace gpu 4523 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | gpu/command_buffer/service/program_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698