| 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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 mailbox_name1 = '1'; | 437 mailbox_name1 = '1'; |
| 438 ++mailbox_name2; | 438 ++mailbox_name2; |
| 439 } | 439 } |
| 440 } | 440 } |
| 441 | 441 |
| 442 void TestWebGraphicsContext3D::loseContextCHROMIUM(GLenum current, | 442 void TestWebGraphicsContext3D::loseContextCHROMIUM(GLenum current, |
| 443 GLenum other) { | 443 GLenum other) { |
| 444 if (context_lost_) | 444 if (context_lost_) |
| 445 return; | 445 return; |
| 446 context_lost_ = true; | 446 context_lost_ = true; |
| 447 |
| 447 if (!context_lost_callback_.is_null()) | 448 if (!context_lost_callback_.is_null()) |
| 448 context_lost_callback_.Run(); | 449 context_lost_callback_.Run(); |
| 449 | 450 |
| 450 for (size_t i = 0; i < shared_contexts_.size(); ++i) | 451 for (size_t i = 0; i < shared_contexts_.size(); ++i) |
| 451 shared_contexts_[i]->loseContextCHROMIUM(current, other); | 452 shared_contexts_[i]->loseContextCHROMIUM(current, other); |
| 452 shared_contexts_.clear(); | 453 shared_contexts_.clear(); |
| 453 } | 454 } |
| 454 | 455 |
| 455 void TestWebGraphicsContext3D::finish() { | 456 void TestWebGraphicsContext3D::finish() { |
| 456 test_support_->CallAllSyncPointCallbacks(); | 457 test_support_->CallAllSyncPointCallbacks(); |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 720 | 721 |
| 721 TestWebGraphicsContext3D::Buffer::Buffer() : target(0), size(0) {} | 722 TestWebGraphicsContext3D::Buffer::Buffer() : target(0), size(0) {} |
| 722 | 723 |
| 723 TestWebGraphicsContext3D::Buffer::~Buffer() {} | 724 TestWebGraphicsContext3D::Buffer::~Buffer() {} |
| 724 | 725 |
| 725 TestWebGraphicsContext3D::Image::Image() {} | 726 TestWebGraphicsContext3D::Image::Image() {} |
| 726 | 727 |
| 727 TestWebGraphicsContext3D::Image::~Image() {} | 728 TestWebGraphicsContext3D::Image::~Image() {} |
| 728 | 729 |
| 729 } // namespace cc | 730 } // namespace cc |
| OLD | NEW |