| Index: src/gpu/gl/GrGLProgram.h
|
| diff --git a/src/gpu/gl/GrGLProgram.h b/src/gpu/gl/GrGLProgram.h
|
| index 283ac03d229233279ef3e6df5c727a9af7a31ca9..4a16b0cf4cec044539fb0bd5f12940fc7d1df8ed 100644
|
| --- a/src/gpu/gl/GrGLProgram.h
|
| +++ b/src/gpu/gl/GrGLProgram.h
|
| @@ -100,6 +100,20 @@ public:
|
| fRenderTargetSize.fHeight = -1;
|
| fRenderTargetOrigin = (GrSurfaceOrigin) -1;
|
| }
|
| + template<int Size> void getGLMatrix(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, SkMatrix::I()[8]);
|
| + } else {
|
| + combined.setAll(SkIntToScalar(2) / fRenderTargetSize.fWidth, 0, -SK_Scalar1,
|
| + 0, SkIntToScalar(2) / fRenderTargetSize.fHeight, -SK_Scalar1,
|
| + 0, 0, SkMatrix::I()[8]);
|
| + }
|
| + combined.setConcat(combined, fViewMatrix);
|
| + GrGLGetMatrix<Size>(destMatrix, combined);
|
| + }
|
| };
|
|
|
| /**
|
|
|