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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 SkDebugf("------ RENDERER %s\n", renderer); | 139 SkDebugf("------ RENDERER %s\n", renderer); |
140 SkDebugf("------ VERSION %s\n", version); | 140 SkDebugf("------ VERSION %s\n", version); |
141 SkDebugf("------ EXTENSIONS\n"); | 141 SkDebugf("------ EXTENSIONS\n"); |
142 ctx.extensions().print(); | 142 ctx.extensions().print(); |
143 SkDebugf("\n"); | 143 SkDebugf("\n"); |
144 SkDebugf(this->glCaps().dump().c_str()); | 144 SkDebugf(this->glCaps().dump().c_str()); |
145 } | 145 } |
146 | 146 |
147 fProgramCache = SkNEW_ARGS(ProgramCache, (this)); | 147 fProgramCache = SkNEW_ARGS(ProgramCache, (this)); |
148 | 148 |
149 SkASSERT(this->glCaps().maxVertexAttributes() >= GrDrawState::kMaxVertexAttr
ibCnt); | 149 SkASSERT(this->glCaps().maxVertexAttributes() >= GrGeometryProcessor::kMaxVe
rtexAttribs); |
150 | 150 |
151 fLastSuccessfulStencilFmtIdx = 0; | 151 fLastSuccessfulStencilFmtIdx = 0; |
152 fHWProgramID = 0; | 152 fHWProgramID = 0; |
153 | 153 |
154 if (this->glCaps().pathRenderingSupport()) { | 154 if (this->glCaps().pathRenderingSupport()) { |
155 fPathRendering.reset(new GrGLPathRendering(this)); | 155 fPathRendering.reset(new GrGLPathRendering(this)); |
156 } | 156 } |
157 } | 157 } |
158 | 158 |
159 GrGpuGL::~GrGpuGL() { | 159 GrGpuGL::~GrGpuGL() { |
(...skipping 2413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2573 this->setVertexArrayID(gpu, 0); | 2573 this->setVertexArrayID(gpu, 0); |
2574 } | 2574 } |
2575 int attrCount = gpu->glCaps().maxVertexAttributes(); | 2575 int attrCount = gpu->glCaps().maxVertexAttributes(); |
2576 if (fDefaultVertexArrayAttribState.count() != attrCount) { | 2576 if (fDefaultVertexArrayAttribState.count() != attrCount) { |
2577 fDefaultVertexArrayAttribState.resize(attrCount); | 2577 fDefaultVertexArrayAttribState.resize(attrCount); |
2578 } | 2578 } |
2579 attribState = &fDefaultVertexArrayAttribState; | 2579 attribState = &fDefaultVertexArrayAttribState; |
2580 } | 2580 } |
2581 return attribState; | 2581 return attribState; |
2582 } | 2582 } |
OLD | NEW |