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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 static char mailbox_name2 = '1'; | 432 static char mailbox_name2 = '1'; |
433 mailbox[0] = mailbox_name1; | 433 mailbox[0] = mailbox_name1; |
434 mailbox[1] = mailbox_name2; | 434 mailbox[1] = mailbox_name2; |
435 mailbox[2] = '\0'; | 435 mailbox[2] = '\0'; |
436 if (++mailbox_name1 == 0) { | 436 if (++mailbox_name1 == 0) { |
437 mailbox_name1 = '1'; | 437 mailbox_name1 = '1'; |
438 ++mailbox_name2; | 438 ++mailbox_name2; |
439 } | 439 } |
440 } | 440 } |
441 | 441 |
| 442 GLuint TestWebGraphicsContext3D::createAndConsumeTextureCHROMIUM( |
| 443 GLenum target, |
| 444 const GLbyte* mailbox) { |
| 445 return createTexture(); |
| 446 } |
| 447 |
442 void TestWebGraphicsContext3D::loseContextCHROMIUM(GLenum current, | 448 void TestWebGraphicsContext3D::loseContextCHROMIUM(GLenum current, |
443 GLenum other) { | 449 GLenum other) { |
444 if (context_lost_) | 450 if (context_lost_) |
445 return; | 451 return; |
446 context_lost_ = true; | 452 context_lost_ = true; |
447 if (!context_lost_callback_.is_null()) | 453 if (!context_lost_callback_.is_null()) |
448 context_lost_callback_.Run(); | 454 context_lost_callback_.Run(); |
449 | 455 |
450 for (size_t i = 0; i < shared_contexts_.size(); ++i) | 456 for (size_t i = 0; i < shared_contexts_.size(); ++i) |
451 shared_contexts_[i]->loseContextCHROMIUM(current, other); | 457 shared_contexts_[i]->loseContextCHROMIUM(current, other); |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
720 | 726 |
721 TestWebGraphicsContext3D::Buffer::Buffer() : target(0), size(0) {} | 727 TestWebGraphicsContext3D::Buffer::Buffer() : target(0), size(0) {} |
722 | 728 |
723 TestWebGraphicsContext3D::Buffer::~Buffer() {} | 729 TestWebGraphicsContext3D::Buffer::~Buffer() {} |
724 | 730 |
725 TestWebGraphicsContext3D::Image::Image() {} | 731 TestWebGraphicsContext3D::Image::Image() {} |
726 | 732 |
727 TestWebGraphicsContext3D::Image::~Image() {} | 733 TestWebGraphicsContext3D::Image::~Image() {} |
728 | 734 |
729 } // namespace cc | 735 } // namespace cc |
OLD | NEW |