aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/gpu/gl
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2017-07-25 10:05:01 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-25 14:33:03 +0000
commit02611d9afdd887ee443825ac88377f2eea093380 (patch)
tree3e35b4e4fde4b6f387f7bdb345b049c1ab76e182 /tools/gpu/gl
parent10b6ad13f996d2f522bc057d17acea58e43a7f0b (diff)
Add Make[backend] calls for creating GrContexts
Docs-Preview: https://skia.org/?cl=26369 Bug: skia: Change-Id: I460ee63e466f85b05918479f068a2e5ca2d70550 Reviewed-on: https://skia-review.googlesource.com/26369 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'tools/gpu/gl')
-rw-r--r--tools/gpu/gl/GLTestContext.cpp6
-rw-r--r--tools/gpu/gl/GLTestContext.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/tools/gpu/gl/GLTestContext.cpp b/tools/gpu/gl/GLTestContext.cpp
index abbb8a618c..91fa82ff9a 100644
--- a/tools/gpu/gl/GLTestContext.cpp
+++ b/tools/gpu/gl/GLTestContext.cpp
@@ -7,6 +7,7 @@
#include "GLTestContext.h"
+#include "GrContext.h"
#include "GpuTimer.h"
#include "gl/GrGLUtil.h"
@@ -286,4 +287,9 @@ GrGLint GLTestContext::createTextureRectangle(int width, int height, GrGLenum in
externalFormat, externalType, data));
return id;
}
+
+sk_sp<GrContext> GLTestContext::makeGrContext(const GrContextOptions& options) {
+ return GrContext::MakeGL(fGL.get(), options);
+}
+
} // namespace sk_gpu_test
diff --git a/tools/gpu/gl/GLTestContext.h b/tools/gpu/gl/GLTestContext.h
index f5afa31a7f..701000e24b 100644
--- a/tools/gpu/gl/GLTestContext.h
+++ b/tools/gpu/gl/GLTestContext.h
@@ -75,6 +75,8 @@ public:
}
}
+ sk_sp<GrContext> makeGrContext(const GrContextOptions& options) override;
+
protected:
GLTestContext();