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

Side by Side Diff: gpu/command_buffer/client/gles2_implementation_unittest.cc

Issue 9837124: Add ShareGroup to GLES2Implemenation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation.cc ('k') | gpu/demos/framework/window.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Tests for GLES2Implementation. 5 // Tests for GLES2Implementation.
6 6
7 #include "gpu/command_buffer/client/gles2_implementation.h" 7 #include "gpu/command_buffer/client/gles2_implementation.h"
8 8
9 #include <GLES2/gl2ext.h> 9 #include <GLES2/gl2ext.h>
10 #include "gpu/command_buffer/client/client_test_helper.h" 10 #include "gpu/command_buffer/client/client_test_helper.h"
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 GetNextToken(); 402 GetNextToken();
403 start += num; 403 start += num;
404 ids += num; 404 ids += num;
405 num_ids -= num; 405 num_ids -= num;
406 } 406 }
407 } 407 }
408 } 408 }
409 409
410 gl_.reset(new GLES2Implementation( 410 gl_.reset(new GLES2Implementation(
411 helper_.get(), 411 helper_.get(),
412 NULL,
412 transfer_buffer_.get(), 413 transfer_buffer_.get(),
413 shared_resources, 414 shared_resources,
414 bind_generates_resource)); 415 bind_generates_resource));
415 ASSERT_TRUE(gl_->Initialize( 416 ASSERT_TRUE(gl_->Initialize(
416 kTransferBufferSize, 417 kTransferBufferSize,
417 kTransferBufferSize, 418 kTransferBufferSize,
418 kTransferBufferSize)); 419 kTransferBufferSize));
419 } 420 }
420 421
421 EXPECT_CALL(*command_buffer(), OnFlush()) 422 EXPECT_CALL(*command_buffer(), OnFlush())
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 const GLint GLES2ImplementationTest::kNumShaderBinaryFormats; 520 const GLint GLES2ImplementationTest::kNumShaderBinaryFormats;
520 const GLuint GLES2ImplementationTest::kStartId; 521 const GLuint GLES2ImplementationTest::kStartId;
521 const GLuint GLES2ImplementationTest::kBuffersStartId; 522 const GLuint GLES2ImplementationTest::kBuffersStartId;
522 const GLuint GLES2ImplementationTest::kFramebuffersStartId; 523 const GLuint GLES2ImplementationTest::kFramebuffersStartId;
523 const GLuint GLES2ImplementationTest::kProgramsAndShadersStartId; 524 const GLuint GLES2ImplementationTest::kProgramsAndShadersStartId;
524 const GLuint GLES2ImplementationTest::kRenderbuffersStartId; 525 const GLuint GLES2ImplementationTest::kRenderbuffersStartId;
525 const GLuint GLES2ImplementationTest::kTexturesStartId; 526 const GLuint GLES2ImplementationTest::kTexturesStartId;
526 const GLuint GLES2ImplementationTest::kQueriesStartId; 527 const GLuint GLES2ImplementationTest::kQueriesStartId;
527 #endif 528 #endif
528 529
530 TEST_F(GLES2ImplementationTest, Basic) {
531 EXPECT_TRUE(gl_->share_group() != NULL);
532 }
533
529 TEST_F(GLES2ImplementationTest, ShaderSource) { 534 TEST_F(GLES2ImplementationTest, ShaderSource) {
530 const uint32 kBucketId = GLES2Implementation::kResultBucketId; 535 const uint32 kBucketId = GLES2Implementation::kResultBucketId;
531 const GLuint kShaderId = 456; 536 const GLuint kShaderId = 456;
532 const char* kString1 = "foobar"; 537 const char* kString1 = "foobar";
533 const char* kString2 = "barfoo"; 538 const char* kString2 = "barfoo";
534 const size_t kString1Size = strlen(kString1); 539 const size_t kString1Size = strlen(kString1);
535 const size_t kString2Size = strlen(kString2); 540 const size_t kString2Size = strlen(kString2);
536 const size_t kString3Size = 1; // Want the NULL; 541 const size_t kString3Size = 1; // Want the NULL;
537 const size_t kSourceSize = kString1Size + kString2Size + kString3Size; 542 const size_t kSourceSize = kString1Size + kString2Size + kString3Size;
538 const size_t kPaddedString1Size = 543 const size_t kPaddedString1Size =
(...skipping 1896 matching lines...) Expand 10 before | Expand all | Expand 10 after
2435 EXPECT_TRUE(NoCommandsWritten()); 2440 EXPECT_TRUE(NoCommandsWritten());
2436 EXPECT_EQ(0u, available); 2441 EXPECT_EQ(0u, available);
2437 } 2442 }
2438 2443
2439 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h" 2444 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h"
2440 2445
2441 } // namespace gles2 2446 } // namespace gles2
2442 } // namespace gpu 2447 } // namespace gpu
2443 2448
2444 2449
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation.cc ('k') | gpu/demos/framework/window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698