aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/gpu/TestContext.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gpu/TestContext.h')
-rw-r--r--tools/gpu/TestContext.h8
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();