OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright 2011 Google Inc. |
| 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. |
| 6 */ |
| 7 |
| 8 #include "gl/SkNullGLContext.h" |
| 9 #include "gl/GrGLInterface.h" |
| 10 |
| 11 SkNullGLContext* SkNullGLContext::Create() { |
| 12 SkNullGLContext* ctx = new SkNullGLContext; |
| 13 if (!ctx->isValid()) { |
| 14 delete ctx; |
| 15 return nullptr; |
| 16 } |
| 17 return ctx; |
| 18 } |
| 19 |
| 20 SkNullGLContext::SkNullGLContext() { |
| 21 this->init(GrGLCreateNullInterface()); |
| 22 } |
| 23 |
| 24 SkNullGLContext::~SkNullGLContext() { |
| 25 this->teardown(); |
| 26 } |
OLD | NEW |