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 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 GLenum internalformat, | 642 GLenum internalformat, |
643 GLenum usage) { | 643 GLenum usage) { |
644 DCHECK_EQ(GL_RGBA, static_cast<int>(internalformat)); | 644 DCHECK_EQ(GL_RGBA, static_cast<int>(internalformat)); |
645 GLuint image_id = NextImageId(); | 645 GLuint image_id = NextImageId(); |
646 base::AutoLock lock(namespace_->lock); | 646 base::AutoLock lock(namespace_->lock); |
647 base::hash_set<unsigned>& images = namespace_->images; | 647 base::hash_set<unsigned>& images = namespace_->images; |
648 images.insert(image_id); | 648 images.insert(image_id); |
649 return image_id; | 649 return image_id; |
650 } | 650 } |
651 | 651 |
652 GLuint TestWebGraphicsContext3D::insertSyncPoint() { | |
653 return static_cast<GLuint>(next_insert_fence_sync_++); | |
654 } | |
655 | |
656 GLuint64 TestWebGraphicsContext3D::insertFenceSync() { | 652 GLuint64 TestWebGraphicsContext3D::insertFenceSync() { |
657 return next_insert_fence_sync_++; | 653 return next_insert_fence_sync_++; |
658 } | 654 } |
659 | 655 |
660 void TestWebGraphicsContext3D::genSyncToken(GLuint64 fence_sync, | 656 void TestWebGraphicsContext3D::genSyncToken(GLuint64 fence_sync, |
661 GLbyte* sync_token) { | 657 GLbyte* sync_token) { |
662 gpu::SyncToken sync_token_data(gpu::CommandBufferNamespace::GPU_IO, 0, 0, | 658 gpu::SyncToken sync_token_data(gpu::CommandBufferNamespace::GPU_IO, 0, 0, |
663 fence_sync); | 659 fence_sync); |
664 sync_token_data.SetVerifyFlush(); | 660 sync_token_data.SetVerifyFlush(); |
665 memcpy(sync_token, &sync_token_data, sizeof(sync_token_data)); | 661 memcpy(sync_token, &sync_token_data, sizeof(sync_token_data)); |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
844 | 840 |
845 TestWebGraphicsContext3D::Buffer::Buffer() : target(0), size(0) {} | 841 TestWebGraphicsContext3D::Buffer::Buffer() : target(0), size(0) {} |
846 | 842 |
847 TestWebGraphicsContext3D::Buffer::~Buffer() {} | 843 TestWebGraphicsContext3D::Buffer::~Buffer() {} |
848 | 844 |
849 TestWebGraphicsContext3D::Image::Image() {} | 845 TestWebGraphicsContext3D::Image::Image() {} |
850 | 846 |
851 TestWebGraphicsContext3D::Image::~Image() {} | 847 TestWebGraphicsContext3D::Image::~Image() {} |
852 | 848 |
853 } // namespace cc | 849 } // namespace cc |
OLD | NEW |