| 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 "GrEffect.h" | 10 #include "GrEffect.h" |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 //////////////////////////////////////////////////////////////////////////////// | 201 //////////////////////////////////////////////////////////////////////////////// |
| 202 | 202 |
| 203 #define GL_CALL(X) GR_GL_CALL(this->glInterface(), X) | 203 #define GL_CALL(X) GR_GL_CALL(this->glInterface(), X) |
| 204 | 204 |
| 205 bool GrGpuGL::flushGraphicsState(DrawType type, const GrDeviceCoordTexture* dstC
opy) { | 205 bool GrGpuGL::flushGraphicsState(DrawType type, const GrDeviceCoordTexture* dstC
opy) { |
| 206 const GrDrawState& drawState = this->getDrawState(); | 206 const GrDrawState& drawState = this->getDrawState(); |
| 207 | 207 |
| 208 // GrGpu::setupClipAndFlushState should have already checked this and bailed
if not true. | 208 // GrGpu::setupClipAndFlushState should have already checked this and bailed
if not true. |
| 209 SkASSERT(NULL != drawState.getRenderTarget()); | 209 SkASSERT(NULL != drawState.getRenderTarget()); |
| 210 | 210 |
| 211 if (kStencilPath_DrawType == type || kFillPath_DrawType == type) { | 211 if (kStencilPath_DrawType == type || kDrawPath_DrawType == type) { |
| 212 const GrRenderTarget* rt = this->getDrawState().getRenderTarget(); | 212 const GrRenderTarget* rt = this->getDrawState().getRenderTarget(); |
| 213 SkISize size; | 213 SkISize size; |
| 214 size.set(rt->width(), rt->height()); | 214 size.set(rt->width(), rt->height()); |
| 215 this->setProjectionMatrix(drawState.getViewMatrix(), size, rt->origin())
; | 215 this->setProjectionMatrix(drawState.getViewMatrix(), size, rt->origin())
; |
| 216 } | 216 } |
| 217 | 217 |
| 218 if (kStencilPath_DrawType != type) { | 218 if (kStencilPath_DrawType != type) { |
| 219 this->flushMiscFixedFunctionState(); | 219 this->flushMiscFixedFunctionState(); |
| 220 | 220 |
| 221 GrBlendCoeff srcCoeff; | 221 GrBlendCoeff srcCoeff; |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 GrGLAttribTypeToLayout(attribType).fType, | 365 GrGLAttribTypeToLayout(attribType).fType, |
| 366 GrGLAttribTypeToLayout(attribType).fNormalized, | 366 GrGLAttribTypeToLayout(attribType).fNormalized, |
| 367 stride, | 367 stride, |
| 368 reinterpret_cast<GrGLvoid*>( | 368 reinterpret_cast<GrGLvoid*>( |
| 369 vertexOffsetInBytes + vertexAttrib->fOffset)); | 369 vertexOffsetInBytes + vertexAttrib->fOffset)); |
| 370 } | 370 } |
| 371 | 371 |
| 372 attribState->disableUnusedArrays(this, usedAttribArraysMask, false); | 372 attribState->disableUnusedArrays(this, usedAttribArraysMask, false); |
| 373 } | 373 } |
| 374 } | 374 } |
| OLD | NEW |