From 02611d9afdd887ee443825ac88377f2eea093380 Mon Sep 17 00:00:00 2001 From: Greg Daniel Date: Tue, 25 Jul 2017 10:05:01 -0400 Subject: 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 Reviewed-by: Brian Salomon --- example/HelloWorld.cpp | 2 +- example/SkiaSDLExample.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'example') diff --git a/example/HelloWorld.cpp b/example/HelloWorld.cpp index 464ec4429d..2375e0016f 100644 --- a/example/HelloWorld.cpp +++ b/example/HelloWorld.cpp @@ -70,7 +70,7 @@ bool HelloWorldWindow::setUpBackend() { fInterface = GrGLCreateNativeInterface(); SkASSERT(NULL != fInterface); - fContext = GrContext::Create(kOpenGL_GrBackend, (GrBackendContext)fInterface); + fContext = GrContext::MakeGL(fInterface).release(); SkASSERT(NULL != fContext); this->setUpGpuBackedSurface(); diff --git a/example/SkiaSDLExample.cpp b/example/SkiaSDLExample.cpp index 813485f8a3..3c4dccccb2 100644 --- a/example/SkiaSDLExample.cpp +++ b/example/SkiaSDLExample.cpp @@ -187,8 +187,7 @@ int main(int argc, char** argv) { sk_sp interface(GrGLCreateNativeInterface()); // setup contexts - sk_sp grContext(GrContext::Create(kOpenGL_GrBackend, - (GrBackendContext)interface.get())); + sk_sp grContext(GrContext::MakeGL(interface.get())); SkASSERT(grContext); // Wrap the frame buffer object attached to the screen in a Skia render target so Skia can -- cgit v1.2.3