OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 #include "gl/SkGLContextHelper.h" | 8 #include "gl/SkGLContextHelper.h" |
9 #include "GrGLUtil.h" | 9 #include "GrGLUtil.h" |
10 | 10 |
11 SK_DEFINE_INST_COUNT(SkGLContextHelper) | |
12 | |
13 SkGLContextHelper::SkGLContextHelper() | 11 SkGLContextHelper::SkGLContextHelper() |
14 : fFBO(0) | 12 : fFBO(0) |
15 , fColorBufferID(0) | 13 , fColorBufferID(0) |
16 , fDepthStencilBufferID(0) | 14 , fDepthStencilBufferID(0) |
17 , fGL(NULL) { | 15 , fGL(NULL) { |
18 } | 16 } |
19 | 17 |
20 SkGLContextHelper::~SkGLContextHelper() { | 18 SkGLContextHelper::~SkGLContextHelper() { |
21 | 19 |
22 if (fGL) { | 20 if (fGL) { |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 fGL->unref(); | 129 fGL->unref(); |
132 fGL = NULL; | 130 fGL = NULL; |
133 this->destroyGLContext(); | 131 this->destroyGLContext(); |
134 return false; | 132 return false; |
135 } else { | 133 } else { |
136 return true; | 134 return true; |
137 } | 135 } |
138 } | 136 } |
139 return false; | 137 return false; |
140 } | 138 } |
OLD | NEW |