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

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

Issue 7554015: Implemented support for GL constext share groups in the renderer process. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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 2292 matching lines...) Expand 10 before | Expand all | Expand 10 after
2303 DeleteSharedIdsCHROMIUM del_cmd; 2303 DeleteSharedIdsCHROMIUM del_cmd;
2304 2304
2305 const GLuint kNamespaceId = id_namespaces::kTextures; 2305 const GLuint kNamespaceId = id_namespaces::kTextures;
2306 const GLuint kExpectedId1 = 1; 2306 const GLuint kExpectedId1 = 1;
2307 const GLuint kExpectedId2 = 2; 2307 const GLuint kExpectedId2 = 2;
2308 const GLuint kExpectedId3 = 4; 2308 const GLuint kExpectedId3 = 4;
2309 const GLuint kRegisterId = 3; 2309 const GLuint kRegisterId = 3;
2310 GLuint* ids = GetSharedMemoryAs<GLuint*>(); 2310 GLuint* ids = GetSharedMemoryAs<GLuint*>();
2311 gen_cmd.Init(kNamespaceId, 0, 2, kSharedMemoryId, kSharedMemoryOffset); 2311 gen_cmd.Init(kNamespaceId, 0, 2, kSharedMemoryId, kSharedMemoryOffset);
2312 EXPECT_EQ(error::kNoError, ExecuteCmd(gen_cmd)); 2312 EXPECT_EQ(error::kNoError, ExecuteCmd(gen_cmd));
2313 IdAllocator* id_allocator = GetIdAllocator(kNamespaceId); 2313 IdAllocatorInterface* id_allocator = GetIdAllocator(kNamespaceId);
2314 ASSERT_TRUE(id_allocator != NULL); 2314 ASSERT_TRUE(id_allocator != NULL);
2315 // This check is implementation dependant but it's kind of hard to check 2315 // This check is implementation dependant but it's kind of hard to check
2316 // otherwise. 2316 // otherwise.
2317 EXPECT_EQ(kExpectedId1, ids[0]); 2317 EXPECT_EQ(kExpectedId1, ids[0]);
2318 EXPECT_EQ(kExpectedId2, ids[1]); 2318 EXPECT_EQ(kExpectedId2, ids[1]);
2319 EXPECT_TRUE(id_allocator->InUse(kExpectedId1)); 2319 EXPECT_TRUE(id_allocator->InUse(kExpectedId1));
2320 EXPECT_TRUE(id_allocator->InUse(kExpectedId2)); 2320 EXPECT_TRUE(id_allocator->InUse(kExpectedId2));
2321 EXPECT_FALSE(id_allocator->InUse(kRegisterId)); 2321 EXPECT_FALSE(id_allocator->InUse(kRegisterId));
2322 EXPECT_FALSE(id_allocator->InUse(kExpectedId3)); 2322 EXPECT_FALSE(id_allocator->InUse(kExpectedId3));
2323 2323
(...skipping 2190 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

Powered by Google App Engine
This is Rietveld 408576698