OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
3 * | 3 * |
4 * 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 |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 | 8 |
9 #ifndef GrGLContext_DEFINED | 9 #ifndef GrGLContext_DEFINED |
10 #define GrGLContext_DEFINED | 10 #define GrGLContext_DEFINED |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 * Creates a GrGLContext from a GrGLInterface and the currently | 94 * Creates a GrGLContext from a GrGLInterface and the currently |
95 * bound OpenGL context accessible by the GrGLInterface. | 95 * bound OpenGL context accessible by the GrGLInterface. |
96 */ | 96 */ |
97 explicit GrGLContext(const GrGLInterface* interface); | 97 explicit GrGLContext(const GrGLInterface* interface); |
98 | 98 |
99 /** | 99 /** |
100 * Copies a GrGLContext | 100 * Copies a GrGLContext |
101 */ | 101 */ |
102 GrGLContext(const GrGLContext& ctx); | 102 GrGLContext(const GrGLContext& ctx); |
103 | 103 |
104 ~GrGLContext() { GrSafeUnref(fInterface); } | 104 ~GrGLContext() { SkSafeUnref(fInterface); } |
105 | 105 |
106 /** | 106 /** |
107 * Copies a GrGLContext | 107 * Copies a GrGLContext |
108 */ | 108 */ |
109 GrGLContext& operator= (const GrGLContext& ctx); | 109 GrGLContext& operator= (const GrGLContext& ctx); |
110 | 110 |
111 /** | 111 /** |
112 * Initializes a GrGLContext from a GrGLInterface and the currently | 112 * Initializes a GrGLContext from a GrGLInterface and the currently |
113 * bound OpenGL context accessible by the GrGLInterface. | 113 * bound OpenGL context accessible by the GrGLInterface. |
114 */ | 114 */ |
115 bool initialize(const GrGLInterface* interface); | 115 bool initialize(const GrGLInterface* interface); |
116 bool isInitialized() const { return fInfo.isInitialized(); } | 116 bool isInitialized() const { return fInfo.isInitialized(); } |
117 | 117 |
118 const GrGLInterface* interface() const { return fInterface; } | 118 const GrGLInterface* interface() const { return fInterface; } |
119 const GrGLContextInfo& info() const { return fInfo; } | 119 const GrGLContextInfo& info() const { return fInfo; } |
120 GrGLContextInfo& info() { return fInfo; } | 120 GrGLContextInfo& info() { return fInfo; } |
121 | 121 |
122 private: | 122 private: |
123 void reset(); | 123 void reset(); |
124 | 124 |
125 const GrGLInterface* fInterface; | 125 const GrGLInterface* fInterface; |
126 GrGLContextInfo fInfo; | 126 GrGLContextInfo fInfo; |
127 }; | 127 }; |
128 | 128 |
129 #endif | 129 #endif |
OLD | NEW |