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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 fCurrentProgram.get()->ref(); | 249 fCurrentProgram.get()->ref(); |
250 | 250 |
251 GrGLuint programID = fCurrentProgram->programID(); | 251 GrGLuint programID = fCurrentProgram->programID(); |
252 if (fHWProgramID != programID) { | 252 if (fHWProgramID != programID) { |
253 GL_CALL(UseProgram(programID)); | 253 GL_CALL(UseProgram(programID)); |
254 fHWProgramID = programID; | 254 fHWProgramID = programID; |
255 } | 255 } |
256 | 256 |
257 this->flushBlend(*optState.get(), kDrawLines_DrawType == type, srcCoeff,
dstCoeff); | 257 this->flushBlend(*optState.get(), kDrawLines_DrawType == type, srcCoeff,
dstCoeff); |
258 | 258 |
259 fCurrentProgram->setData(*optState.get(), type, dstCopy); | 259 fCurrentProgram->setData(*optState.get(), type, dstCopy, &fSharedGLProgr
amState); |
260 } | 260 } |
261 | 261 |
262 GrGLRenderTarget* glRT = static_cast<GrGLRenderTarget*>(optState->getRenderT
arget()); | 262 GrGLRenderTarget* glRT = static_cast<GrGLRenderTarget*>(optState->getRenderT
arget()); |
263 this->flushStencil(optState->getStencil(), type); | 263 this->flushStencil(optState->getStencil(), type); |
264 this->flushScissor(scissorState, glRT->getViewport(), glRT->origin()); | 264 this->flushScissor(scissorState, glRT->getViewport(), glRT->origin()); |
265 this->flushAAState(*optState.get(), type); | 265 this->flushAAState(*optState.get(), type); |
266 | 266 |
267 SkIRect* devRect = NULL; | 267 SkIRect* devRect = NULL; |
268 SkIRect devClipBounds; | 268 SkIRect devClipBounds; |
269 if (optState->isClipState()) { | 269 if (optState->isClipState()) { |
(...skipping 84 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 |