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