OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 #include "GrGpuGL.h" | 9 #include "GrGpuGL.h" |
10 #include "GrGLStencilBuffer.h" | 10 #include "GrGLStencilBuffer.h" |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 this); | 173 this); |
174 GrPrintf("------ VENDOR %s\n", vendor); | 174 GrPrintf("------ VENDOR %s\n", vendor); |
175 GrPrintf("------ RENDERER %s\n", renderer); | 175 GrPrintf("------ RENDERER %s\n", renderer); |
176 GrPrintf("------ VERSION %s\n", version); | 176 GrPrintf("------ VERSION %s\n", version); |
177 GrPrintf("------ EXTENSIONS\n %s \n", ext); | 177 GrPrintf("------ EXTENSIONS\n %s \n", ext); |
178 ctx.info().caps()->print(); | 178 ctx.info().caps()->print(); |
179 } | 179 } |
180 | 180 |
181 fProgramCache = SkNEW_ARGS(ProgramCache, (this->glContext())); | 181 fProgramCache = SkNEW_ARGS(ProgramCache, (this->glContext())); |
182 | 182 |
183 GrAssert(this->glCaps().maxVertexAttributes() >= GrDrawState::kVertexAttribC
nt); | 183 GrAssert(this->glCaps().maxVertexAttributes() >= GrDrawState::kMaxVertexAttr
ibCnt); |
184 GrAssert(this->glCaps().maxVertexAttributes() > GrDrawState::kColorOverrideA
ttribIndexValue); | |
185 GrAssert(this->glCaps().maxVertexAttributes() > GrDrawState::kCoverageOverri
deAttribIndexValue); | |
186 | 184 |
187 fLastSuccessfulStencilFmtIdx = 0; | 185 fLastSuccessfulStencilFmtIdx = 0; |
188 if (false) { // avoid bit rot, suppress warning | 186 if (false) { // avoid bit rot, suppress warning |
189 fbo_test(this->glInterface(), 0, 0); | 187 fbo_test(this->glInterface(), 0, 0); |
190 } | 188 } |
191 } | 189 } |
192 | 190 |
193 GrGpuGL::~GrGpuGL() { | 191 GrGpuGL::~GrGpuGL() { |
194 if (0 != fHWProgramID) { | 192 if (0 != fHWProgramID) { |
195 // detach the current program so there is no confusion on OpenGL's part | 193 // detach the current program so there is no confusion on OpenGL's part |
(...skipping 2059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2255 this->setVertexArrayID(gpu, 0); | 2253 this->setVertexArrayID(gpu, 0); |
2256 } | 2254 } |
2257 int attrCount = gpu->glCaps().maxVertexAttributes(); | 2255 int attrCount = gpu->glCaps().maxVertexAttributes(); |
2258 if (fDefaultVertexArrayAttribState.count() != attrCount) { | 2256 if (fDefaultVertexArrayAttribState.count() != attrCount) { |
2259 fDefaultVertexArrayAttribState.resize(attrCount); | 2257 fDefaultVertexArrayAttribState.resize(attrCount); |
2260 } | 2258 } |
2261 attribState = &fDefaultVertexArrayAttribState; | 2259 attribState = &fDefaultVertexArrayAttribState; |
2262 } | 2260 } |
2263 return attribState; | 2261 return attribState; |
2264 } | 2262 } |
OLD | NEW |