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 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
584 GLboolean TestWebGraphicsContext3D::unmapBufferCHROMIUM( | 584 GLboolean TestWebGraphicsContext3D::unmapBufferCHROMIUM( |
585 GLenum target) { | 585 GLenum target) { |
586 base::AutoLock lock(namespace_->lock); | 586 base::AutoLock lock(namespace_->lock); |
587 base::ScopedPtrHashMap<unsigned, Buffer>& buffers = namespace_->buffers; | 587 base::ScopedPtrHashMap<unsigned, Buffer>& buffers = namespace_->buffers; |
588 DCHECK_GT(buffers.count(bound_buffer_), 0u); | 588 DCHECK_GT(buffers.count(bound_buffer_), 0u); |
589 DCHECK_EQ(target, buffers.get(bound_buffer_)->target); | 589 DCHECK_EQ(target, buffers.get(bound_buffer_)->target); |
590 buffers.get(bound_buffer_)->pixels = nullptr; | 590 buffers.get(bound_buffer_)->pixels = nullptr; |
591 return true; | 591 return true; |
592 } | 592 } |
593 | 593 |
594 GLuint TestWebGraphicsContext3D::createImageCHROMIUM(ClientBuffer buffer, | 594 GLuint TestWebGraphicsContext3D::createImageCHROMIUM(ClientBuffer* buffers, |
595 GLsizei width, | 595 GLsizei width, |
596 GLsizei height, | 596 GLsizei height, |
597 GLenum internalformat) { | 597 GLenum internalformat) { |
598 DCHECK_EQ(GL_RGBA, static_cast<int>(internalformat)); | 598 DCHECK_EQ(GL_RGBA, static_cast<int>(internalformat)); |
599 GLuint image_id = NextImageId(); | 599 GLuint image_id = NextImageId(); |
600 base::AutoLock lock(namespace_->lock); | 600 base::AutoLock lock(namespace_->lock); |
601 base::hash_set<unsigned>& images = namespace_->images; | 601 base::hash_set<unsigned>& images = namespace_->images; |
602 images.insert(image_id); | 602 images.insert(image_id); |
603 return image_id; | 603 return image_id; |
604 } | 604 } |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
791 | 791 |
792 TestWebGraphicsContext3D::Buffer::Buffer() : target(0), size(0) {} | 792 TestWebGraphicsContext3D::Buffer::Buffer() : target(0), size(0) {} |
793 | 793 |
794 TestWebGraphicsContext3D::Buffer::~Buffer() {} | 794 TestWebGraphicsContext3D::Buffer::~Buffer() {} |
795 | 795 |
796 TestWebGraphicsContext3D::Image::Image() {} | 796 TestWebGraphicsContext3D::Image::Image() {} |
797 | 797 |
798 TestWebGraphicsContext3D::Image::~Image() {} | 798 TestWebGraphicsContext3D::Image::~Image() {} |
799 | 799 |
800 } // namespace cc | 800 } // namespace cc |
OLD | NEW |