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 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 images.insert(image_id); | 648 images.insert(image_id); |
649 return image_id; | 649 return image_id; |
650 } | 650 } |
651 | 651 |
652 GLuint64 TestWebGraphicsContext3D::insertFenceSync() { | 652 GLuint64 TestWebGraphicsContext3D::insertFenceSync() { |
653 return next_insert_fence_sync_++; | 653 return next_insert_fence_sync_++; |
654 } | 654 } |
655 | 655 |
656 void TestWebGraphicsContext3D::genSyncToken(GLuint64 fence_sync, | 656 void TestWebGraphicsContext3D::genSyncToken(GLuint64 fence_sync, |
657 GLbyte* sync_token) { | 657 GLbyte* sync_token) { |
658 gpu::SyncToken sync_token_data(gpu::CommandBufferNamespace::GPU_IO, 0, 0, | 658 gpu::SyncToken sync_token_data(gpu::CommandBufferNamespace::GPU_IO, 0, |
659 fence_sync); | 659 gpu::CommandBufferId(), fence_sync); |
660 sync_token_data.SetVerifyFlush(); | 660 sync_token_data.SetVerifyFlush(); |
661 memcpy(sync_token, &sync_token_data, sizeof(sync_token_data)); | 661 memcpy(sync_token, &sync_token_data, sizeof(sync_token_data)); |
662 } | 662 } |
663 | 663 |
664 void TestWebGraphicsContext3D::waitSyncToken(const GLbyte* sync_token) { | 664 void TestWebGraphicsContext3D::waitSyncToken(const GLbyte* sync_token) { |
665 if (sync_token) { | 665 if (sync_token) { |
666 gpu::SyncToken sync_token_data; | 666 gpu::SyncToken sync_token_data; |
667 memcpy(sync_token_data.GetData(), sync_token, sizeof(sync_token_data)); | 667 memcpy(sync_token_data.GetData(), sync_token, sizeof(sync_token_data)); |
668 if (sync_token_data.HasData()) | 668 if (sync_token_data.HasData()) |
669 last_waited_sync_token_ = sync_token_data; | 669 last_waited_sync_token_ = sync_token_data; |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
840 | 840 |
841 TestWebGraphicsContext3D::Buffer::Buffer() : target(0), size(0) {} | 841 TestWebGraphicsContext3D::Buffer::Buffer() : target(0), size(0) {} |
842 | 842 |
843 TestWebGraphicsContext3D::Buffer::~Buffer() {} | 843 TestWebGraphicsContext3D::Buffer::~Buffer() {} |
844 | 844 |
845 TestWebGraphicsContext3D::Image::Image() {} | 845 TestWebGraphicsContext3D::Image::Image() {} |
846 | 846 |
847 TestWebGraphicsContext3D::Image::~Image() {} | 847 TestWebGraphicsContext3D::Image::~Image() {} |
848 | 848 |
849 } // namespace cc | 849 } // namespace cc |
OLD | NEW |