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

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

Issue 1809553002: blink: Remove unused or rarely used methods from WebGraphicsContext3D (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wgc3d
Patch Set: wgc3d-unused: WebMediaPlayerAndroid::copyVideoTextureToPlatformTexture Created 4 years, 9 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"
11 #include "gpu/GLES2/gl2extchromium.h" 11 #include "gpu/GLES2/gl2extchromium.h"
12 #include "gpu/command_buffer/client/context_support.h" 12 #include "gpu/command_buffer/client/context_support.h"
13 #include "gpu/command_buffer/client/gles2_interface.h"
13 #include "gpu/command_buffer/common/sync_token.h" 14 #include "gpu/command_buffer/common/sync_token.h"
14 15
15 namespace { 16 namespace {
16 17
17 class SignalTest : public ContextTestBase { 18 class SignalTest : public ContextTestBase {
18 public: 19 public:
19 static void RunOnlyOnce(base::Closure cb, int* tmp) { 20 static void RunOnlyOnce(base::Closure cb, int* tmp) {
20 CHECK_EQ(*tmp, 0); 21 CHECK_EQ(*tmp, 0);
21 ++*tmp; 22 ++*tmp;
22 cb.Run(); 23 cb.Run();
(...skipping 15 matching lines...) Expand all
38 &RunOnlyOnce, run_loop.QuitClosure(), base::Owned(new int(0)))); 39 &RunOnlyOnce, run_loop.QuitClosure(), base::Owned(new int(0))));
39 run_loop.Run(); 40 run_loop.Run();
40 } 41 }
41 }; 42 };
42 43
43 CONTEXT_TEST_F(SignalTest, BasicSignalSyncTokenTest) { 44 CONTEXT_TEST_F(SignalTest, BasicSignalSyncTokenTest) {
44 if (!context_) 45 if (!context_)
45 return; 46 return;
46 47
47 const blink::WGC3Duint64 fence_sync = context_->insertFenceSyncCHROMIUM(); 48 const blink::WGC3Duint64 fence_sync = context_->insertFenceSyncCHROMIUM();
48 context_->shallowFlushCHROMIUM(); 49 context_->GetGLInterface()->ShallowFlushCHROMIUM();
49 50
50 gpu::SyncToken sync_token; 51 gpu::SyncToken sync_token;
51 ASSERT_TRUE(context_->genSyncTokenCHROMIUM(fence_sync, sync_token.GetData())); 52 ASSERT_TRUE(context_->genSyncTokenCHROMIUM(fence_sync, sync_token.GetData()));
52 53
53 TestSignalSyncToken(sync_token); 54 TestSignalSyncToken(sync_token);
54 }; 55 };
55 56
56 CONTEXT_TEST_F(SignalTest, EmptySignalSyncTokenTest) { 57 CONTEXT_TEST_F(SignalTest, EmptySignalSyncTokenTest) {
57 if (!context_) 58 if (!context_)
58 return; 59 return;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // immediately. 105 // immediately.
105 TestSignalQuery(928729087); 106 TestSignalQuery(928729087);
106 TestSignalQuery(928729086); 107 TestSignalQuery(928729086);
107 TestSignalQuery(928729085); 108 TestSignalQuery(928729085);
108 TestSignalQuery(928729083); 109 TestSignalQuery(928729083);
109 TestSignalQuery(928729082); 110 TestSignalQuery(928729082);
110 TestSignalQuery(928729081); 111 TestSignalQuery(928729081);
111 }; 112 };
112 113
113 }; 114 };
OLDNEW
« no previous file with comments | « content/common/gpu/client/gl_helper_unittest.cc ('k') | content/renderer/media/android/webmediaplayer_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698