| 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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 return texture_targets_.BoundTexture(target); | 328 return texture_targets_.BoundTexture(target); |
| 329 } | 329 } |
| 330 | 330 |
| 331 scoped_refptr<TestTexture> TestWebGraphicsContext3D::BoundTexture( | 331 scoped_refptr<TestTexture> TestWebGraphicsContext3D::BoundTexture( |
| 332 GLenum target) { | 332 GLenum target) { |
| 333 // The caller is expected to lock the namespace for texture access. | 333 // The caller is expected to lock the namespace for texture access. |
| 334 namespace_->lock.AssertAcquired(); | 334 namespace_->lock.AssertAcquired(); |
| 335 return namespace_->textures.TextureForId(BoundTextureId(target)); | 335 return namespace_->textures.TextureForId(BoundTextureId(target)); |
| 336 } | 336 } |
| 337 | 337 |
| 338 scoped_refptr<TestTexture> TestWebGraphicsContext3D::UnboundTexture( |
| 339 GLuint texture) { |
| 340 // The caller is expected to lock the namespace for texture access. |
| 341 namespace_->lock.AssertAcquired(); |
| 342 return namespace_->textures.TextureForId(texture); |
| 343 } |
| 344 |
| 338 void TestWebGraphicsContext3D::CheckTextureIsBound(GLenum target) { | 345 void TestWebGraphicsContext3D::CheckTextureIsBound(GLenum target) { |
| 339 DCHECK(BoundTextureId(target)); | 346 DCHECK(BoundTextureId(target)); |
| 340 } | 347 } |
| 341 | 348 |
| 342 GLuint TestWebGraphicsContext3D::createQueryEXT() { return 1u; } | 349 GLuint TestWebGraphicsContext3D::createQueryEXT() { return 1u; } |
| 343 | 350 |
| 344 void TestWebGraphicsContext3D::endQueryEXT(GLenum target) { | 351 void TestWebGraphicsContext3D::endQueryEXT(GLenum target) { |
| 345 if (times_end_query_succeeds_ >= 0) { | 352 if (times_end_query_succeeds_ >= 0) { |
| 346 if (!times_end_query_succeeds_) { | 353 if (!times_end_query_succeeds_) { |
| 347 loseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_ARB, | 354 loseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_ARB, |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 | 720 |
| 714 TestWebGraphicsContext3D::Buffer::Buffer() : target(0), size(0) {} | 721 TestWebGraphicsContext3D::Buffer::Buffer() : target(0), size(0) {} |
| 715 | 722 |
| 716 TestWebGraphicsContext3D::Buffer::~Buffer() {} | 723 TestWebGraphicsContext3D::Buffer::~Buffer() {} |
| 717 | 724 |
| 718 TestWebGraphicsContext3D::Image::Image() {} | 725 TestWebGraphicsContext3D::Image::Image() {} |
| 719 | 726 |
| 720 TestWebGraphicsContext3D::Image::~Image() {} | 727 TestWebGraphicsContext3D::Image::~Image() {} |
| 721 | 728 |
| 722 } // namespace cc | 729 } // namespace cc |
| OLD | NEW |