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

Unified Diff: tools/gpu/vk/VkTestContext.cpp

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gpu/vk/VkTestContext.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gpu/vk/VkTestContext.cpp
diff --git a/tools/gpu/vk/VkTestContext.cpp b/tools/gpu/vk/VkTestContext.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..44be9fd2425813d144f9920ca6480a72ce380c5b
--- /dev/null
+++ b/tools/gpu/vk/VkTestContext.cpp
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2016 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "VkTestContext.h"
+
+#ifdef SK_VULKAN
+
+namespace {
+// TODO: Implement fence syncs and swap buffers
+class VkTestContextImpl : public sk_gpu_test::VkTestContext {
+public:
+ VkTestContextImpl()
+ : VkTestContext(sk_sp<const GrVkBackendContext>(GrVkBackendContext::Create())) {}
+
+ ~VkTestContextImpl() override { this->teardown(); }
+
+ void testAbandon() override {}
+
+protected:
+ void teardown() override { fVk.reset(nullptr); }
+
+private:
+ void onPlatformMakeCurrent() const override {}
+ void onPlatformSwapBuffers() const override {}
+
+ typedef sk_gpu_test::VkTestContext INHERITED;
+};
+}
+
+namespace sk_gpu_test {
+VkTestContext* CreatePlatformVkTestContext() {
+ return new VkTestContextImpl;
+}
+} // namespace sk_gpu_test
+
+#endif
« no previous file with comments | « tools/gpu/vk/VkTestContext.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698