aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/gpu/vk/VkTestContext.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gpu/vk/VkTestContext.h')
-rw-r--r--tools/gpu/vk/VkTestContext.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/gpu/vk/VkTestContext.h b/tools/gpu/vk/VkTestContext.h
index 9fd4170d9d..0e62cc0b8c 100644
--- a/tools/gpu/vk/VkTestContext.h
+++ b/tools/gpu/vk/VkTestContext.h
@@ -19,16 +19,18 @@ class VkTestContext : public TestContext {
public:
virtual GrBackend backend() override { return kVulkan_GrBackend; }
- sk_sp<const GrVkBackendContext> getVkBackendContext() {
+ const GrVkBackendContext& getVkBackendContext() {
return fVk;
}
- const GrVkInterface* vk() const { return fVk->fInterface.get(); }
+ const GrVkInterface* vk() const { return fVk.fInterface.get(); }
protected:
- VkTestContext(sk_sp<const GrVkBackendContext> vk) : fVk(std::move(vk)) {}
+ VkTestContext(const GrVkBackendContext& vk, bool ownsContext)
+ : fVk(vk), fOwnsContext(ownsContext) {}
- sk_sp<const GrVkBackendContext> fVk;
+ GrVkBackendContext fVk;
+ bool fOwnsContext;
private:
typedef TestContext INHERITED;