Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(496)

Side by Side Diff: cc/test/test_web_graphics_context_3d.cc

Issue 1548443002: Introducing gpu::CommandBufferId as a distinct, IdType<...>-based type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@type-safe-save-package-id-self-contained
Patch Set: Rebasing... Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/test/render_pass_test_utils.cc ('k') | cc/trees/layer_tree_host_perftest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/test/render_pass_test_utils.cc ('k') | cc/trees/layer_tree_host_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698