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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 GL_CALL(UseProgram(programID)); | 251 GL_CALL(UseProgram(programID)); |
252 fHWProgramID = programID; | 252 fHWProgramID = programID; |
253 } | 253 } |
254 | 254 |
255 this->flushBlend(*optState.get(), kDrawLines_DrawType == type, srcCoeff,
dstCoeff); | 255 this->flushBlend(*optState.get(), kDrawLines_DrawType == type, srcCoeff,
dstCoeff); |
256 | 256 |
257 fCurrentProgram->setData(*optState.get(), type, dstCopy, &fSharedGLProgr
amState); | 257 fCurrentProgram->setData(*optState.get(), type, dstCopy, &fSharedGLProgr
amState); |
258 } | 258 } |
259 | 259 |
260 GrGLRenderTarget* glRT = static_cast<GrGLRenderTarget*>(optState->getRenderT
arget()); | 260 GrGLRenderTarget* glRT = static_cast<GrGLRenderTarget*>(optState->getRenderT
arget()); |
261 this->flushStencil(type); | 261 this->flushStencil(optState->getStencil(), type); |
262 this->flushScissor(glRT->getViewport(), glRT->origin()); | 262 this->flushScissor(glRT->getViewport(), glRT->origin()); |
263 this->flushAAState(*optState.get(), type); | 263 this->flushAAState(*optState.get(), type); |
264 | 264 |
265 SkIRect* devRect = NULL; | 265 SkIRect* devRect = NULL; |
266 SkIRect devClipBounds; | 266 SkIRect devClipBounds; |
267 if (optState->isClipState()) { | 267 if (optState->isClipState()) { |
268 this->getClip()->getConservativeBounds(optState->getRenderTarget(), &dev
ClipBounds); | 268 this->getClip()->getConservativeBounds(optState->getRenderTarget(), &dev
ClipBounds); |
269 devRect = &devClipBounds; | 269 devRect = &devClipBounds; |
270 } | 270 } |
271 // This must come after textures are flushed because a texture may need | 271 // This must come after textures are flushed because a texture may need |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 GrGLAttribTypeToLayout(attribType).fCount, | 352 GrGLAttribTypeToLayout(attribType).fCount, |
353 GrGLAttribTypeToLayout(attribType).fType, | 353 GrGLAttribTypeToLayout(attribType).fType, |
354 GrGLAttribTypeToLayout(attribType).fNormalized, | 354 GrGLAttribTypeToLayout(attribType).fNormalized, |
355 stride, | 355 stride, |
356 reinterpret_cast<GrGLvoid*>( | 356 reinterpret_cast<GrGLvoid*>( |
357 vertexOffsetInBytes + vertexAttrib->fOffset)); | 357 vertexOffsetInBytes + vertexAttrib->fOffset)); |
358 } | 358 } |
359 attribState->disableUnusedArrays(this, usedAttribArraysMask); | 359 attribState->disableUnusedArrays(this, usedAttribArraysMask); |
360 } | 360 } |
361 } | 361 } |
OLD | NEW |