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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 return texture_targets_.BoundTexture(target); | 329 return texture_targets_.BoundTexture(target); |
330 } | 330 } |
331 | 331 |
332 scoped_refptr<TestTexture> TestWebGraphicsContext3D::BoundTexture( | 332 scoped_refptr<TestTexture> TestWebGraphicsContext3D::BoundTexture( |
333 GLenum target) { | 333 GLenum target) { |
334 // The caller is expected to lock the namespace for texture access. | 334 // The caller is expected to lock the namespace for texture access. |
335 namespace_->lock.AssertAcquired(); | 335 namespace_->lock.AssertAcquired(); |
336 return namespace_->textures.TextureForId(BoundTextureId(target)); | 336 return namespace_->textures.TextureForId(BoundTextureId(target)); |
337 } | 337 } |
338 | 338 |
| 339 scoped_refptr<TestTexture> TestWebGraphicsContext3D::UnboundTexture( |
| 340 GLuint texture) { |
| 341 // The caller is expected to lock the namespace for texture access. |
| 342 namespace_->lock.AssertAcquired(); |
| 343 return namespace_->textures.TextureForId(texture); |
| 344 } |
| 345 |
339 void TestWebGraphicsContext3D::CheckTextureIsBound(GLenum target) { | 346 void TestWebGraphicsContext3D::CheckTextureIsBound(GLenum target) { |
340 DCHECK(BoundTextureId(target)); | 347 DCHECK(BoundTextureId(target)); |
341 } | 348 } |
342 | 349 |
343 GLuint TestWebGraphicsContext3D::createQueryEXT() { return 1u; } | 350 GLuint TestWebGraphicsContext3D::createQueryEXT() { return 1u; } |
344 | 351 |
345 void TestWebGraphicsContext3D::endQueryEXT(GLenum target) { | 352 void TestWebGraphicsContext3D::endQueryEXT(GLenum target) { |
346 if (times_end_query_succeeds_ >= 0) { | 353 if (times_end_query_succeeds_ >= 0) { |
347 if (!times_end_query_succeeds_) { | 354 if (!times_end_query_succeeds_) { |
348 loseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_ARB, | 355 loseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_ARB, |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
740 | 747 |
741 TestWebGraphicsContext3D::Buffer::Buffer() : target(0), size(0) {} | 748 TestWebGraphicsContext3D::Buffer::Buffer() : target(0), size(0) {} |
742 | 749 |
743 TestWebGraphicsContext3D::Buffer::~Buffer() {} | 750 TestWebGraphicsContext3D::Buffer::~Buffer() {} |
744 | 751 |
745 TestWebGraphicsContext3D::Image::Image() {} | 752 TestWebGraphicsContext3D::Image::Image() {} |
746 | 753 |
747 TestWebGraphicsContext3D::Image::~Image() {} | 754 TestWebGraphicsContext3D::Image::~Image() {} |
748 | 755 |
749 } // namespace cc | 756 } // namespace cc |
OLD | NEW |