GrContext* GrContext::Create(GrBackend backend, GrBackendContext backendContext, const GrContextOptions& options) { GrContext* context = SkNEW(GrContext); if (context->init(backend, backendContext, options)) { return context; } else { context->unref(); return NULL; } }
GrContext* GrContext::Create(GrBackend backend, GrBackendContext backendContext, const GrContextOptions& options) { GrContext* context = new GrContext; if (context->init(backend, backendContext, options)) { return context; } else { context->unref(); return nullptr; } }