| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 766 return id; | 766 return id; |
| 767 } | 767 } |
| 768 | 768 |
| 769 void TestWebGraphicsContext3D::RetireRenderbufferId(GLuint id) { | 769 void TestWebGraphicsContext3D::RetireRenderbufferId(GLuint id) { |
| 770 base::AutoLock lock_for_renderbuffer_access(namespace_->lock); | 770 base::AutoLock lock_for_renderbuffer_access(namespace_->lock); |
| 771 DCHECK(namespace_->renderbuffer_set.find(id) != | 771 DCHECK(namespace_->renderbuffer_set.find(id) != |
| 772 namespace_->renderbuffer_set.end()); | 772 namespace_->renderbuffer_set.end()); |
| 773 namespace_->renderbuffer_set.erase(id); | 773 namespace_->renderbuffer_set.erase(id); |
| 774 } | 774 } |
| 775 | 775 |
| 776 void TestWebGraphicsContext3D::SetMaxTransferBufferUsageBytes( | |
| 777 size_t max_transfer_buffer_usage_bytes) { | |
| 778 test_capabilities_.max_transfer_buffer_usage_bytes = | |
| 779 max_transfer_buffer_usage_bytes; | |
| 780 } | |
| 781 | |
| 782 void TestWebGraphicsContext3D::SetMaxSamples(int max_samples) { | 776 void TestWebGraphicsContext3D::SetMaxSamples(int max_samples) { |
| 783 test_capabilities_.gpu.max_samples = max_samples; | 777 test_capabilities_.max_samples = max_samples; |
| 784 } | 778 } |
| 785 | 779 |
| 786 TestWebGraphicsContext3D::TextureTargets::TextureTargets() { | 780 TestWebGraphicsContext3D::TextureTargets::TextureTargets() { |
| 787 // Initialize default bindings. | 781 // Initialize default bindings. |
| 788 bound_textures_[GL_TEXTURE_2D] = 0; | 782 bound_textures_[GL_TEXTURE_2D] = 0; |
| 789 bound_textures_[GL_TEXTURE_EXTERNAL_OES] = 0; | 783 bound_textures_[GL_TEXTURE_EXTERNAL_OES] = 0; |
| 790 bound_textures_[GL_TEXTURE_RECTANGLE_ARB] = 0; | 784 bound_textures_[GL_TEXTURE_RECTANGLE_ARB] = 0; |
| 791 } | 785 } |
| 792 | 786 |
| 793 TestWebGraphicsContext3D::TextureTargets::~TextureTargets() {} | 787 TestWebGraphicsContext3D::TextureTargets::~TextureTargets() {} |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 841 | 835 |
| 842 TestWebGraphicsContext3D::Buffer::Buffer() : target(0), size(0) {} | 836 TestWebGraphicsContext3D::Buffer::Buffer() : target(0), size(0) {} |
| 843 | 837 |
| 844 TestWebGraphicsContext3D::Buffer::~Buffer() {} | 838 TestWebGraphicsContext3D::Buffer::~Buffer() {} |
| 845 | 839 |
| 846 TestWebGraphicsContext3D::Image::Image() {} | 840 TestWebGraphicsContext3D::Image::Image() {} |
| 847 | 841 |
| 848 TestWebGraphicsContext3D::Image::~Image() {} | 842 TestWebGraphicsContext3D::Image::~Image() {} |
| 849 | 843 |
| 850 } // namespace cc | 844 } // namespace cc |
| OLD | NEW |