blob: f6849e4484606af5d58f237729db67838b08efac [file] [log] [blame]
bsalomon18a2f9d2016-05-11 10:09:18 -07001/*
2 * Copyright 2016 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#include "VkTestContext.h"
9
10#ifdef SK_VULKAN
11
12namespace {
bsalomonc8699322016-05-11 11:55:36 -070013// TODO: Implement fence syncs, swap buffers, submit, and flush
bsalomon18a2f9d2016-05-11 10:09:18 -070014class VkTestContextImpl : public sk_gpu_test::VkTestContext {
15public:
16 VkTestContextImpl()
17 : VkTestContext(sk_sp<const GrVkBackendContext>(GrVkBackendContext::Create())) {}
18
19 ~VkTestContextImpl() override { this->teardown(); }
20
21 void testAbandon() override {}
22
bsalomonc8699322016-05-11 11:55:36 -070023 void submit() override {}
24 void finish() override {}
25
bsalomon18a2f9d2016-05-11 10:09:18 -070026protected:
27 void teardown() override { fVk.reset(nullptr); }
28
29private:
30 void onPlatformMakeCurrent() const override {}
31 void onPlatformSwapBuffers() const override {}
32
33 typedef sk_gpu_test::VkTestContext INHERITED;
34};
35}
36
37namespace sk_gpu_test {
38VkTestContext* CreatePlatformVkTestContext() {
39 return new VkTestContextImpl;
40}
41} // namespace sk_gpu_test
42
43#endif