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

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

Issue 1964243003: Add base class for GLTestContext and add new subclass VkTestContext. (Closed) Base URL: https://chromium.googlesource.com/skia.git@ContextInfo
Patch Set: move #include "GrVkBackendContext.h" inside #ifdef SK_VULKAN 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') | tools/gpu/vk/VkTestContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
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 #ifndef VkTestContext_DEFINED
9 #define VkTestContext_DEFINED
10
11 #include "TestContext.h"
12
13 #ifdef SK_VULKAN
14
15 #include "vk/GrVkBackendContext.h"
16
17 namespace sk_gpu_test {
18 class VkTestContext : public TestContext {
19 public:
20 virtual GrBackend backend() override { return kVulkan_GrBackend; }
21 virtual GrBackendContext backendContext() override {
22 return reinterpret_cast<GrBackendContext>(fVk.get());
23 }
24
25 bool isValid() const override { return NULL != this->vk(); }
26
27 const GrVkInterface* vk() const { return fVk->fInterface; };
28
29 protected:
30 VkTestContext(sk_sp<const GrVkBackendContext> vk) : fVk(std::move(vk)) {};
31
32 sk_sp<const GrVkBackendContext> fVk;
33
34 private:
35 typedef TestContext INHERITED;
36 };
37
38 /**
39 * Creates Vk context object bound to the native Vk library.
40 */
41 VkTestContext* CreatePlatformVkTestContext();
42
43 } // namespace sk_gpu_test
44
45 #endif
46
47 #endif
OLDNEW
« no previous file with comments | « tools/gpu/gl/GLTestContext.cpp ('k') | tools/gpu/vk/VkTestContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698