| 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 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 GLboolean TestWebGraphicsContext3D::unmapBufferCHROMIUM( | 594 GLboolean TestWebGraphicsContext3D::unmapBufferCHROMIUM( |
| 595 GLenum target) { | 595 GLenum target) { |
| 596 base::AutoLock lock(namespace_->lock); | 596 base::AutoLock lock(namespace_->lock); |
| 597 base::ScopedPtrHashMap<unsigned, Buffer>& buffers = namespace_->buffers; | 597 base::ScopedPtrHashMap<unsigned, Buffer>& buffers = namespace_->buffers; |
| 598 DCHECK_GT(buffers.count(bound_buffer_), 0u); | 598 DCHECK_GT(buffers.count(bound_buffer_), 0u); |
| 599 DCHECK_EQ(target, buffers.get(bound_buffer_)->target); | 599 DCHECK_EQ(target, buffers.get(bound_buffer_)->target); |
| 600 buffers.get(bound_buffer_)->pixels = nullptr; | 600 buffers.get(bound_buffer_)->pixels = nullptr; |
| 601 return true; | 601 return true; |
| 602 } | 602 } |
| 603 | 603 |
| 604 GLuint TestWebGraphicsContext3D::createImageCHROMIUM(ClientBuffer buffer, | 604 GLuint TestWebGraphicsContext3D::createImageCHROMIUM(ClientBuffer* buffers, |
| 605 GLsizei width, | 605 GLsizei width, |
| 606 GLsizei height, | 606 GLsizei height, |
| 607 GLenum internalformat) { | 607 GLenum internalformat) { |
| 608 DCHECK_EQ(GL_RGBA, static_cast<int>(internalformat)); | 608 DCHECK_EQ(GL_RGBA, static_cast<int>(internalformat)); |
| 609 GLuint image_id = NextImageId(); | 609 GLuint image_id = NextImageId(); |
| 610 base::AutoLock lock(namespace_->lock); | 610 base::AutoLock lock(namespace_->lock); |
| 611 base::hash_set<unsigned>& images = namespace_->images; | 611 base::hash_set<unsigned>& images = namespace_->images; |
| 612 images.insert(image_id); | 612 images.insert(image_id); |
| 613 return image_id; | 613 return image_id; |
| 614 } | 614 } |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 801 | 801 |
| 802 TestWebGraphicsContext3D::Buffer::Buffer() : target(0), size(0) {} | 802 TestWebGraphicsContext3D::Buffer::Buffer() : target(0), size(0) {} |
| 803 | 803 |
| 804 TestWebGraphicsContext3D::Buffer::~Buffer() {} | 804 TestWebGraphicsContext3D::Buffer::~Buffer() {} |
| 805 | 805 |
| 806 TestWebGraphicsContext3D::Image::Image() {} | 806 TestWebGraphicsContext3D::Image::Image() {} |
| 807 | 807 |
| 808 TestWebGraphicsContext3D::Image::~Image() {} | 808 TestWebGraphicsContext3D::Image::~Image() {} |
| 809 | 809 |
| 810 } // namespace cc | 810 } // namespace cc |
| OLD | NEW |