skia2/include/gpu/vk/GrVkExtensions.h
Greg Daniel 45c9dab4c3 Let client pass in full extension to GrVkBackendContext.
Bug: skia:
Change-Id: I772ab4ccbca0f4f7e7d429d6c421b07d97f0606f
Reviewed-on: https://skia-review.googlesource.com/131880
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-06-27 14:29:45 +00:00

36 lines
1.1 KiB
C++

/*
* 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