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 #include "GrGpuGL.h" | 8 #include "GrGpuGL.h" |
9 | 9 |
10 #include "builders/GrGLProgramBuilder.h" | 10 #include "builders/GrGLProgramBuilder.h" |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 } | 197 } |
198 ++fCurrLRUStamp; | 198 ++fCurrLRUStamp; |
199 return entry->fProgram; | 199 return entry->fProgram; |
200 } | 200 } |
201 | 201 |
202 //////////////////////////////////////////////////////////////////////////////// | 202 //////////////////////////////////////////////////////////////////////////////// |
203 | 203 |
204 #define GL_CALL(X) GR_GL_CALL(this->glInterface(), X) | 204 #define GL_CALL(X) GR_GL_CALL(this->glInterface(), X) |
205 | 205 |
206 bool GrGpuGL::flushGraphicsState(DrawType type, | 206 bool GrGpuGL::flushGraphicsState(DrawType type, |
207 const ScissorState& scissorState, | 207 const GrClipMaskManager::ScissorState& scissorS
tate, |
208 const GrDeviceCoordTexture* dstCopy) { | 208 const GrDeviceCoordTexture* dstCopy) { |
209 SkAutoTUnref<GrOptDrawState> optState(GrOptDrawState::Create(this->getDrawSt
ate(), | 209 SkAutoTUnref<GrOptDrawState> optState(GrOptDrawState::Create(this->getDrawSt
ate(), |
210 *this->caps(), | 210 *this->caps(), |
211 type)); | 211 type)); |
212 | 212 |
213 if (!optState) { | 213 if (!optState) { |
214 return false; | 214 return false; |
215 } | 215 } |
216 | 216 |
217 // GrGpu::setupClipAndFlushState should have already checked this and bailed
if not true. | 217 // GrGpu::setupClipAndFlushState should have already checked this and bailed
if not true. |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 GrGLAttribTypeToLayout(attribType).fCount, | 354 GrGLAttribTypeToLayout(attribType).fCount, |
355 GrGLAttribTypeToLayout(attribType).fType, | 355 GrGLAttribTypeToLayout(attribType).fType, |
356 GrGLAttribTypeToLayout(attribType).fNormalized, | 356 GrGLAttribTypeToLayout(attribType).fNormalized, |
357 stride, | 357 stride, |
358 reinterpret_cast<GrGLvoid*>( | 358 reinterpret_cast<GrGLvoid*>( |
359 vertexOffsetInBytes + vertexAttrib->fOffset)); | 359 vertexOffsetInBytes + vertexAttrib->fOffset)); |
360 } | 360 } |
361 attribState->disableUnusedArrays(this, usedAttribArraysMask); | 361 attribState->disableUnusedArrays(this, usedAttribArraysMask); |
362 } | 362 } |
363 } | 363 } |
OLD | NEW |