aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental
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 /experimental
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 'experimental')
-rw-r--r--experimental/GLFWTest/glfw_main.cpp4
-rw-r--r--experimental/SkV8Example/SkV8Example.cpp3
-rw-r--r--experimental/iOSSampleApp/SkSampleUIView.mm3
3 files changed, 4 insertions, 6 deletions
diff --git a/experimental/GLFWTest/glfw_main.cpp b/experimental/GLFWTest/glfw_main.cpp
index 63ea1f1d9f..6b8412ce9b 100644
--- a/experimental/GLFWTest/glfw_main.cpp
+++ b/experimental/GLFWTest/glfw_main.cpp
@@ -31,8 +31,8 @@ static void key_callback(GLFWwindow* window, int key, int scancode, int action,
static void init_skia(int w, int h) {
- sContext = GrContext::Create(kOpenGL_GrBackend, 0);
-
+ sContext = GrContext::MakeGL(nullptr).release();
+
GrBackendRenderTargetDesc desc;
desc.fWidth = w;
desc.fHeight = h;
diff --git a/experimental/SkV8Example/SkV8Example.cpp b/experimental/SkV8Example/SkV8Example.cpp
index a6a2a7e816..ca63e071b7 100644
--- a/experimental/SkV8Example/SkV8Example.cpp
+++ b/experimental/SkV8Example/SkV8Example.cpp
@@ -78,8 +78,7 @@ void SkV8ExampleWindow::windowSizeChanged() {
}
fCurIntf = GrGLCreateNativeInterface();
- fCurContext = GrContext::Create(
- kOpenGL_GrBackend, (GrBackendContext) fCurIntf);
+ fCurContext = GrContext::MakeGL(fCurIntf).release();
if (NULL == fCurIntf || NULL == fCurContext) {
printf("Failed to initialize GL.");
exit(1);
diff --git a/experimental/iOSSampleApp/SkSampleUIView.mm b/experimental/iOSSampleApp/SkSampleUIView.mm
index b1e04873cd..39eef5647c 100644
--- a/experimental/iOSSampleApp/SkSampleUIView.mm
+++ b/experimental/iOSSampleApp/SkSampleUIView.mm
@@ -89,8 +89,7 @@ public:
SkASSERT(NULL == fCurContext);
if (SkOSWindow::kNone_BackEndType != fBackend) {
- fCurContext = GrContext::Create(kOpenGL_GrBackend,
- (GrBackendContext) fCurIntf);
+ fCurContext = GrContext::MakeGL(fCurIntf).release();
}
if ((NULL == fCurContext || NULL == fCurIntf) &&