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

Side by Side Diff: content/common/gpu/client/gpu_context_tests.h

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
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 // These tests are run twice: 5 // These tests are run twice:
6 // Once in a gpu test with an in-process WebGraphicsContext3D. 6 // Once in a gpu test with an in-process WebGraphicsContext3D.
7 // Once in a browsertest with a gpu-process WebGraphicsContext3D. 7 // Once in a browsertest with a gpu-process WebGraphicsContext3D.
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 gpu::SyncToken sync_token; 62 gpu::SyncToken sync_token;
63 TestSignalSyncToken(sync_token); 63 TestSignalSyncToken(sync_token);
64 }; 64 };
65 65
66 CONTEXT_TEST_F(SignalTest, InvalidSignalSyncTokenTest) { 66 CONTEXT_TEST_F(SignalTest, InvalidSignalSyncTokenTest) {
67 if (!context_) 67 if (!context_)
68 return; 68 return;
69 69
70 // Signalling something that doesn't exist should run the callback 70 // Signalling something that doesn't exist should run the callback
71 // immediately. 71 // immediately.
72 gpu::SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO, 72 gpu::SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO, 0,
73 0, 73 gpu::CommandBufferId::FromUnsafeValue(1297824234),
74 1297824234,
75 9123743439); 74 9123743439);
76 TestSignalSyncToken(sync_token); 75 TestSignalSyncToken(sync_token);
77 }; 76 };
78 77
79 CONTEXT_TEST_F(SignalTest, BasicSignalQueryTest) { 78 CONTEXT_TEST_F(SignalTest, BasicSignalQueryTest) {
80 if (!context_) 79 if (!context_)
81 return; 80 return;
82 81
83 unsigned query = context_->createQueryEXT(); 82 unsigned query = context_->createQueryEXT();
84 context_->beginQueryEXT(GL_COMMANDS_ISSUED_CHROMIUM, query); 83 context_->beginQueryEXT(GL_COMMANDS_ISSUED_CHROMIUM, query);
(...skipping 20 matching lines...) Expand all
105 // immediately. 104 // immediately.
106 TestSignalQuery(928729087); 105 TestSignalQuery(928729087);
107 TestSignalQuery(928729086); 106 TestSignalQuery(928729086);
108 TestSignalQuery(928729085); 107 TestSignalQuery(928729085);
109 TestSignalQuery(928729083); 108 TestSignalQuery(928729083);
110 TestSignalQuery(928729082); 109 TestSignalQuery(928729082);
111 TestSignalQuery(928729081); 110 TestSignalQuery(928729081);
112 }; 111 };
113 112
114 }; 113 };
OLDNEW
« no previous file with comments | « content/common/gpu/client/command_buffer_proxy_impl.cc ('k') | content/common/gpu/gpu_command_buffer_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698