Chromium Code Reviews| Index: src/gpu/gl/GrGLProgram.h |
| diff --git a/src/gpu/gl/GrGLProgram.h b/src/gpu/gl/GrGLProgram.h |
| index 3ee71b85b1383e96afed343fa383c6d013d4bdea..578aed1aa765cb40bbba57649bfff0e8961739d0 100644 |
| --- a/src/gpu/gl/GrGLProgram.h |
| +++ b/src/gpu/gl/GrGLProgram.h |
| @@ -66,44 +66,17 @@ public: |
| * target may require us to perform a mirror-flip. |
| */ |
| struct MatrixState { |
|
bsalomon
2014/12/30 13:19:39
Change to RenderTargetState? Also, the above comme
|
| - SkMatrix fViewMatrix; |
| SkISize fRenderTargetSize; |
| GrSurfaceOrigin fRenderTargetOrigin; |
| MatrixState() { this->invalidate(); } |
| void invalidate() { |
| - fViewMatrix = SkMatrix::InvalidMatrix(); |
| fRenderTargetSize.fWidth = -1; |
| fRenderTargetSize.fHeight = -1; |
| fRenderTargetOrigin = (GrSurfaceOrigin) -1; |
| } |
| /** |
| - * Gets a matrix that goes from local coords to Skia's device coordinates. |
| - */ |
| - template<int Size> void getGLMatrix(GrGLfloat* destMatrix) { |
| - GrGLGetMatrix<Size>(destMatrix, fViewMatrix); |
| - } |
| - |
| - /** |
| - * Gets a matrix that goes from local coordinates to GL normalized device coords. |
| - */ |
| - template<int Size> void getRTAdjustedGLMatrix(GrGLfloat* destMatrix) { |
| - SkMatrix combined; |
| - if (kBottomLeft_GrSurfaceOrigin == fRenderTargetOrigin) { |
| - combined.setAll(SkIntToScalar(2) / fRenderTargetSize.fWidth, 0, -SK_Scalar1, |
| - 0, -SkIntToScalar(2) / fRenderTargetSize.fHeight, SK_Scalar1, |
| - 0, 0, 1); |
| - } else { |
| - combined.setAll(SkIntToScalar(2) / fRenderTargetSize.fWidth, 0, -SK_Scalar1, |
| - 0, SkIntToScalar(2) / fRenderTargetSize.fHeight, -SK_Scalar1, |
| - 0, 0, 1); |
| - } |
| - combined.preConcat(fViewMatrix); |
| - GrGLGetMatrix<Size>(destMatrix, combined); |
| - } |
| - |
| - /** |
| * Gets a vec4 that adjusts the position from Skia device coords to GL's normalized device |
| * coords. Assuming the transformed position, pos, is a homogeneous vec3, the vec, v, is |
| * applied as such: |