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

Side by Side Diff: tools/gpu/vk/VkTestContext.cpp

Issue 1965273004: Nanobench running on Vulkan (Closed) Base URL: https://chromium.googlesource.com/skia.git@gltotest
Patch Set: Created 4 years, 7 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 | « tools/gpu/gl/GLTestContext.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "VkTestContext.h" 8 #include "VkTestContext.h"
9 9
10 #ifdef SK_VULKAN 10 #ifdef SK_VULKAN
11 11
12 namespace { 12 namespace {
13 // TODO: Implement fence syncs and swap buffers 13 // TODO: Implement fence syncs, swap buffers, submit, and flush
14 class VkTestContextImpl : public sk_gpu_test::VkTestContext { 14 class VkTestContextImpl : public sk_gpu_test::VkTestContext {
15 public: 15 public:
16 VkTestContextImpl() 16 VkTestContextImpl()
17 : VkTestContext(sk_sp<const GrVkBackendContext>(GrVkBackendContext::Crea te())) {} 17 : VkTestContext(sk_sp<const GrVkBackendContext>(GrVkBackendContext::Crea te())) {}
18 18
19 ~VkTestContextImpl() override { this->teardown(); } 19 ~VkTestContextImpl() override { this->teardown(); }
20 20
21 void testAbandon() override {} 21 void testAbandon() override {}
22 22
23 void submit() override {}
24 void finish() override {}
25
23 protected: 26 protected:
24 void teardown() override { fVk.reset(nullptr); } 27 void teardown() override { fVk.reset(nullptr); }
25 28
26 private: 29 private:
27 void onPlatformMakeCurrent() const override {} 30 void onPlatformMakeCurrent() const override {}
28 void onPlatformSwapBuffers() const override {} 31 void onPlatformSwapBuffers() const override {}
29 32
30 typedef sk_gpu_test::VkTestContext INHERITED; 33 typedef sk_gpu_test::VkTestContext INHERITED;
31 }; 34 };
32 } 35 }
33 36
34 namespace sk_gpu_test { 37 namespace sk_gpu_test {
35 VkTestContext* CreatePlatformVkTestContext() { 38 VkTestContext* CreatePlatformVkTestContext() {
36 return new VkTestContextImpl; 39 return new VkTestContextImpl;
37 } 40 }
38 } // namespace sk_gpu_test 41 } // namespace sk_gpu_test
39 42
40 #endif 43 #endif
OLDNEW
« no previous file with comments | « tools/gpu/gl/GLTestContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698