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

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

Issue 1827123002: Move content/common/gpu/client to gpu/ipc/client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 4 years, 8 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 16 matching lines...) Expand all
27 void TestSignalSyncToken(const gpu::SyncToken& sync_token) { 27 void TestSignalSyncToken(const gpu::SyncToken& sync_token) {
28 base::RunLoop run_loop; 28 base::RunLoop run_loop;
29 context_support_->SignalSyncToken(sync_token, run_loop.QuitClosure()); 29 context_support_->SignalSyncToken(sync_token, run_loop.QuitClosure());
30 run_loop.Run(); 30 run_loop.Run();
31 } 31 }
32 32
33 // These tests should time out if the callback doesn't get called. 33 // These tests should time out if the callback doesn't get called.
34 void TestSignalQuery(GLuint query) { 34 void TestSignalQuery(GLuint query) {
35 base::RunLoop run_loop; 35 base::RunLoop run_loop;
36 context_support_->SignalQuery( 36 context_support_->SignalQuery(
37 query, 37 query, base::Bind(&RunOnlyOnce, run_loop.QuitClosure(),
38 base::Bind( 38 base::Owned(new int(0))));
39 &RunOnlyOnce, run_loop.QuitClosure(), base::Owned(new int(0))));
40 run_loop.Run(); 39 run_loop.Run();
41 } 40 }
42 }; 41 };
43 42
44 CONTEXT_TEST_F(SignalTest, BasicSignalSyncTokenTest) { 43 CONTEXT_TEST_F(SignalTest, BasicSignalSyncTokenTest) {
45 #if defined(OS_WIN) 44 #if defined(OS_WIN)
46 // The IPC version of ContextTestBase::SetUpOnMainThread does not succeed on 45 // The IPC version of ContextTestBase::SetUpOnMainThread does not succeed on
47 // some platforms. 46 // some platforms.
48 if (!gl_) 47 if (!gl_)
49 return; 48 return;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 128
130 // Signalling something that doesn't exist should run the callback 129 // Signalling something that doesn't exist should run the callback
131 // immediately. 130 // immediately.
132 TestSignalQuery(928729087); 131 TestSignalQuery(928729087);
133 TestSignalQuery(928729086); 132 TestSignalQuery(928729086);
134 TestSignalQuery(928729085); 133 TestSignalQuery(928729085);
135 TestSignalQuery(928729083); 134 TestSignalQuery(928729083);
136 TestSignalQuery(928729082); 135 TestSignalQuery(928729082);
137 TestSignalQuery(928729081); 136 TestSignalQuery(928729081);
138 }; 137 };
139
140 }; 138 };
OLDNEW
« no previous file with comments | « content/common/gpu/client/gpu_channel_host.cc ('k') | content/common/gpu/client/gpu_jpeg_decode_accelerator_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698