diff options
author | 2017-07-13 15:07:54 -0400 | |
---|---|---|
committer | 2017-07-13 21:29:33 +0000 | |
commit | b76a72a659f53b8bf449c5ca2685045d08a21e43 (patch) | |
tree | cc2e1b3c997817f514438e79c248d3b890e65ef7 /tools/gpu/TestContext.h | |
parent | ee3e0bacc8bedd1e3ebfb52fbc8b1cc3ccdad358 (diff) |
Add support for creating a GrContext backed by Metal.
Also adds the support code to allow our TestContext to create a Metal
backend.
Bug: skia:
Change-Id: Ia850687019d79b897bb16e2c151f4f8526721ad9
Reviewed-on: https://skia-review.googlesource.com/22644
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'tools/gpu/TestContext.h')
-rw-r--r-- | tools/gpu/TestContext.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/gpu/TestContext.h b/tools/gpu/TestContext.h index ecb61e3b2a..84794f3c34 100644 --- a/tools/gpu/TestContext.h +++ b/tools/gpu/TestContext.h @@ -11,8 +11,12 @@ #include "FenceSync.h" #include "GrTypes.h" +#include "SkRefCnt.h" #include "../private/SkTemplates.h" +class GrContext; +struct GrContextOptions; + namespace sk_gpu_test { class GpuTimer; @@ -25,8 +29,6 @@ class TestContext : public SkNoncopyable { public: virtual ~TestContext(); - virtual bool isValid() const = 0; - bool fenceSyncSupport() const { return fFenceSync != nullptr; } FenceSync* fenceSync() { SkASSERT(fFenceSync); return fFenceSync.get(); } @@ -46,6 +48,8 @@ public: virtual GrBackend backend() = 0; virtual GrBackendContext backendContext() = 0; + virtual sk_sp<GrContext> makeGrContext(const GrContextOptions&); + /** Swaps front and back buffer (if the context has such buffers) */ void swapBuffers(); |