| 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 2215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2226 renderTargetSize == fHWProjectionMatrixState.fRenderTargetSize && | 2226 renderTargetSize == fHWProjectionMatrixState.fRenderTargetSize && |
| 2227 matrix.cheapEqualTo(fHWProjectionMatrixState.fViewMatrix)) { | 2227 matrix.cheapEqualTo(fHWProjectionMatrixState.fViewMatrix)) { |
| 2228 return; | 2228 return; |
| 2229 } | 2229 } |
| 2230 | 2230 |
| 2231 fHWProjectionMatrixState.fViewMatrix = matrix; | 2231 fHWProjectionMatrixState.fViewMatrix = matrix; |
| 2232 fHWProjectionMatrixState.fRenderTargetSize = renderTargetSize; | 2232 fHWProjectionMatrixState.fRenderTargetSize = renderTargetSize; |
| 2233 fHWProjectionMatrixState.fRenderTargetOrigin = renderTargetOrigin; | 2233 fHWProjectionMatrixState.fRenderTargetOrigin = renderTargetOrigin; |
| 2234 | 2234 |
| 2235 GrGLfloat glMatrix[4 * 4]; | 2235 GrGLfloat glMatrix[4 * 4]; |
| 2236 fHWProjectionMatrixState.getGLMatrix<4>(glMatrix); | 2236 fHWProjectionMatrixState.getRTAdjustedGLMatrix<4>(glMatrix); |
| 2237 GL_CALL(MatrixLoadf(GR_GL_PROJECTION, glMatrix)); | 2237 GL_CALL(MatrixLoadf(GR_GL_PROJECTION, glMatrix)); |
| 2238 } | 2238 } |
| 2239 | 2239 |
| 2240 void GrGpuGL::enablePathTexGen(int unitIdx, | 2240 void GrGpuGL::enablePathTexGen(int unitIdx, |
| 2241 PathTexGenComponents components, | 2241 PathTexGenComponents components, |
| 2242 const GrGLfloat* coefficients) { | 2242 const GrGLfloat* coefficients) { |
| 2243 SkASSERT(this->glCaps().pathRenderingSupport()); | 2243 SkASSERT(this->glCaps().pathRenderingSupport()); |
| 2244 SkASSERT(components >= kS_PathTexGenComponents && | 2244 SkASSERT(components >= kS_PathTexGenComponents && |
| 2245 components <= kSTR_PathTexGenComponents); | 2245 components <= kSTR_PathTexGenComponents); |
| 2246 SkASSERT(this->glCaps().maxFixedFunctionTextureCoords() >= unitIdx); | 2246 SkASSERT(this->glCaps().maxFixedFunctionTextureCoords() >= unitIdx); |
| (...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2803 this->setVertexArrayID(gpu, 0); | 2803 this->setVertexArrayID(gpu, 0); |
| 2804 } | 2804 } |
| 2805 int attrCount = gpu->glCaps().maxVertexAttributes(); | 2805 int attrCount = gpu->glCaps().maxVertexAttributes(); |
| 2806 if (fDefaultVertexArrayAttribState.count() != attrCount) { | 2806 if (fDefaultVertexArrayAttribState.count() != attrCount) { |
| 2807 fDefaultVertexArrayAttribState.resize(attrCount); | 2807 fDefaultVertexArrayAttribState.resize(attrCount); |
| 2808 } | 2808 } |
| 2809 attribState = &fDefaultVertexArrayAttribState; | 2809 attribState = &fDefaultVertexArrayAttribState; |
| 2810 } | 2810 } |
| 2811 return attribState; | 2811 return attribState; |
| 2812 } | 2812 } |
| OLD | NEW |