aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/gpu/vk/GrVkBackendContext.h1
-rw-r--r--include/gpu/vk/GrVkExtensions.h35
-rw-r--r--include/gpu/vk/GrVkInterface.h21
3 files changed, 5 insertions, 52 deletions
diff --git a/include/gpu/vk/GrVkBackendContext.h b/include/gpu/vk/GrVkBackendContext.h
index 3775c345ce..fe018e494f 100644
--- a/include/gpu/vk/GrVkBackendContext.h
+++ b/include/gpu/vk/GrVkBackendContext.h
@@ -49,6 +49,7 @@ struct SK_API GrVkBackendContext {
uint32_t fFeatures;
sk_sp<const GrVkInterface> fInterface;
sk_sp<GrVkMemoryAllocator> fMemoryAllocator;
+
// This is deprecated and should be set to false. The client is responsible for managing the
// lifetime of the VkInstance and VkDevice objects.
bool fOwnsInstanceAndDevice = false;
diff --git a/include/gpu/vk/GrVkExtensions.h b/include/gpu/vk/GrVkExtensions.h
deleted file mode 100644
index a6badcd33f..0000000000
--- a/include/gpu/vk/GrVkExtensions.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2016 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef GrVkExtensions_DEFINED
-#define GrVkExtensions_DEFINED
-
-#include "../private/SkTArray.h"
-#include "SkString.h"
-
-/**
- * Helper class that eats in an array of extensions strings for instance and device and allows for
- * quicker querying if an extension is present.
- */
-class GrVkExtensions {
-public:
- GrVkExtensions(uint32_t instanceExtensionCount, const char* const* instanceExtensions,
- uint32_t deviceExtensionCount, const char* const* deviceExtensions);
- // TODO: Remove once we remove the old fExtensions from GrVkBackendContext
- GrVkExtensions(uint32_t extensionFlags);
-
- // TODO: Remove once we remove the old fExtensions from GrVkBackendContext
- static void GetExtensionArrayFromFlags(uint32_t extensionFlags,
- SkTArray<const char*>* extensions);
-
- bool hasExtension(const char[]) const;
-
-private:
- SkTArray<SkString> fExtensionStrings;
-};
-
-#endif
diff --git a/include/gpu/vk/GrVkInterface.h b/include/gpu/vk/GrVkInterface.h
index b4691e8994..05ce561829 100644
--- a/include/gpu/vk/GrVkInterface.h
+++ b/include/gpu/vk/GrVkInterface.h
@@ -11,7 +11,6 @@
#include "SkRefCnt.h"
#include "vk/GrVkDefines.h"
-#include "vk/GrVkExtensions.h"
////////////////////////////////////////////////////////////////////////////////
@@ -51,25 +50,17 @@ public:
GrVkInterface(GetProc getProc,
VkInstance instance,
VkDevice device,
- uint32_t instanceExtensionCount,
- const char* const* instanceExtensions,
- uint32_t deviceExtensionCount,
- const char* const* deviceExtensions);
+ uint32_t extensionFlags);
- // TODO: This is deprecated. Remove onces clients have switch to new interface
- GrVkInterface(GetProc getProc,
+ GrVkInterface(const GetInstanceProc&,
+ const GetDeviceProc&,
VkInstance instance,
VkDevice device,
uint32_t extensionFlags);
// Validates that the GrVkInterface supports its advertised standard. This means the necessary
// function pointers have been initialized for Vulkan version.
- bool validate() const;
-
- // This is deprecated since the extensions information is stored already on the GrVkInterface.
- bool validate(uint32_t /*extensionFlags*/) const {
- return this->validate();
- }
+ bool validate(uint32_t extensionFlags) const;
/**
* The function pointers are in a struct so that we can have a compiler generated assignment
@@ -217,10 +208,6 @@ public:
VkPtr<PFN_vkDestroyDebugReportCallbackEXT> fDestroyDebugReportCallbackEXT;
} fFunctions;
- GrVkExtensions fExtensions;
-
-private:
- void init(GetProc getProc, VkInstance instance, VkDevice device);
};
#endif