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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 this); | 141 this); |
142 GrPrintf("------ VENDOR %s\n", vendor); | 142 GrPrintf("------ VENDOR %s\n", vendor); |
143 GrPrintf("------ RENDERER %s\n", renderer); | 143 GrPrintf("------ RENDERER %s\n", renderer); |
144 GrPrintf("------ VERSION %s\n", version); | 144 GrPrintf("------ VERSION %s\n", version); |
145 GrPrintf("------ EXTENSIONS\n"); | 145 GrPrintf("------ EXTENSIONS\n"); |
146 ctx.info().extensions().print(); | 146 ctx.info().extensions().print(); |
147 GrPrintf("\n"); | 147 GrPrintf("\n"); |
148 ctx.info().caps()->print(); | 148 ctx.info().caps()->print(); |
149 } | 149 } |
150 | 150 |
151 fProgramCache = SkNEW_ARGS(ProgramCache, (this->glContext())); | 151 fProgramCache = SkNEW_ARGS(ProgramCache, (this)); |
152 | 152 |
153 SkASSERT(this->glCaps().maxVertexAttributes() >= GrDrawState::kMaxVertexAttr
ibCnt); | 153 SkASSERT(this->glCaps().maxVertexAttributes() >= GrDrawState::kMaxVertexAttr
ibCnt); |
154 | 154 |
155 fLastSuccessfulStencilFmtIdx = 0; | 155 fLastSuccessfulStencilFmtIdx = 0; |
156 fHWProgramID = 0; | 156 fHWProgramID = 0; |
157 } | 157 } |
158 | 158 |
159 GrGpuGL::~GrGpuGL() { | 159 GrGpuGL::~GrGpuGL() { |
160 if (0 != fHWProgramID) { | 160 if (0 != fHWProgramID) { |
161 // detach the current program so there is no confusion on OpenGL's part | 161 // detach the current program so there is no confusion on OpenGL's part |
(...skipping 2416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2578 this->setVertexArrayID(gpu, 0); | 2578 this->setVertexArrayID(gpu, 0); |
2579 } | 2579 } |
2580 int attrCount = gpu->glCaps().maxVertexAttributes(); | 2580 int attrCount = gpu->glCaps().maxVertexAttributes(); |
2581 if (fDefaultVertexArrayAttribState.count() != attrCount) { | 2581 if (fDefaultVertexArrayAttribState.count() != attrCount) { |
2582 fDefaultVertexArrayAttribState.resize(attrCount); | 2582 fDefaultVertexArrayAttribState.resize(attrCount); |
2583 } | 2583 } |
2584 attribState = &fDefaultVertexArrayAttribState; | 2584 attribState = &fDefaultVertexArrayAttribState; |
2585 } | 2585 } |
2586 return attribState; | 2586 return attribState; |
2587 } | 2587 } |
OLD | NEW |