OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "cc/test/test_web_graphics_context_3d.h" | 5 #include "cc/test/test_web_graphics_context_3d.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 | 429 |
430 void TestWebGraphicsContext3D::genMailboxCHROMIUM(GLbyte* mailbox) { | 430 void TestWebGraphicsContext3D::genMailboxCHROMIUM(GLbyte* mailbox) { |
431 if (times_gen_mailbox_succeeds_ >= 0) { | 431 if (times_gen_mailbox_succeeds_ >= 0) { |
432 if (!times_gen_mailbox_succeeds_) { | 432 if (!times_gen_mailbox_succeeds_) { |
433 loseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_ARB, | 433 loseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_ARB, |
434 GL_INNOCENT_CONTEXT_RESET_ARB); | 434 GL_INNOCENT_CONTEXT_RESET_ARB); |
435 } | 435 } |
436 --times_gen_mailbox_succeeds_; | 436 --times_gen_mailbox_succeeds_; |
437 } | 437 } |
438 if (context_lost_) { | 438 if (context_lost_) { |
439 memset(mailbox, 0, 64); | 439 memset(mailbox, 0, GL_MAILBOX_SIZE_CHROMIUM); |
440 return; | 440 return; |
441 } | 441 } |
442 | 442 |
443 static char mailbox_name1 = '1'; | 443 static char mailbox_name1 = '1'; |
444 static char mailbox_name2 = '1'; | 444 static char mailbox_name2 = '1'; |
445 mailbox[0] = mailbox_name1; | 445 mailbox[0] = mailbox_name1; |
446 mailbox[1] = mailbox_name2; | 446 mailbox[1] = mailbox_name2; |
447 mailbox[2] = '\0'; | 447 mailbox[2] = '\0'; |
448 if (++mailbox_name1 == 0) { | 448 if (++mailbox_name1 == 0) { |
449 mailbox_name1 = '1'; | 449 mailbox_name1 = '1'; |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
745 | 745 |
746 TestWebGraphicsContext3D::Buffer::Buffer() : target(0), size(0) {} | 746 TestWebGraphicsContext3D::Buffer::Buffer() : target(0), size(0) {} |
747 | 747 |
748 TestWebGraphicsContext3D::Buffer::~Buffer() {} | 748 TestWebGraphicsContext3D::Buffer::~Buffer() {} |
749 | 749 |
750 TestWebGraphicsContext3D::Image::Image() {} | 750 TestWebGraphicsContext3D::Image::Image() {} |
751 | 751 |
752 TestWebGraphicsContext3D::Image::~Image() {} | 752 TestWebGraphicsContext3D::Image::~Image() {} |
753 | 753 |
754 } // namespace cc | 754 } // namespace cc |
OLD | NEW |