| Index: src/gpu/gl/SkNullGLContext.cpp
|
| diff --git a/src/gpu/gl/SkNullGLContext.cpp b/src/gpu/gl/SkNullGLContext.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a2c5066273f823fb1c5289a035e5e8c51308be24
|
| --- /dev/null
|
| +++ b/src/gpu/gl/SkNullGLContext.cpp
|
| @@ -0,0 +1,26 @@
|
| +/*
|
| + * Copyright 2011 Google Inc.
|
| + *
|
| + * Use of this source code is governed by a BSD-style license that can be
|
| + * found in the LICENSE file.
|
| + */
|
| +
|
| +#include "gl/SkNullGLContext.h"
|
| +#include "gl/GrGLInterface.h"
|
| +
|
| +SkNullGLContext* SkNullGLContext::Create() {
|
| + SkNullGLContext* ctx = new SkNullGLContext;
|
| + if (!ctx->isValid()) {
|
| + delete ctx;
|
| + return nullptr;
|
| + }
|
| + return ctx;
|
| +}
|
| +
|
| +SkNullGLContext::SkNullGLContext() {
|
| + this->init(GrGLCreateNullInterface());
|
| +}
|
| +
|
| +SkNullGLContext::~SkNullGLContext() {
|
| + this->teardown();
|
| +}
|
|
|