| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 #ifndef GrGLPathRendering_DEFINED | 8 #ifndef GrGLPathRendering_DEFINED |
| 9 #define GrGLPathRendering_DEFINED | 9 #define GrGLPathRendering_DEFINED |
| 10 | 10 |
| 11 #include "SkRefCnt.h" | 11 #include "SkRefCnt.h" |
| 12 #include "GrPathRendering.h" | 12 #include "GrPathRendering.h" |
| 13 #include "GrStencil.h" | 13 #include "GrStencil.h" |
| 14 #include "gl/GrGLProgram.h" | |
| 15 #include "gl/GrGLTypes.h" | 14 #include "gl/GrGLTypes.h" |
| 15 #include "glsl/GrGLSLUtil.h" |
| 16 | 16 |
| 17 class GrGLNameAllocator; | 17 class GrGLNameAllocator; |
| 18 class GrGLGpu; | 18 class GrGLGpu; |
| 19 | 19 |
| 20 /** | 20 /** |
| 21 * This class wraps the NV_path_rendering extension and manages its various | 21 * This class wraps the NV_path_rendering extension and manages its various |
| 22 * API versions. If a method is not present in the GrGLInterface of the GrGLGpu | 22 * API versions. If a method is not present in the GrGLInterface of the GrGLGpu |
| 23 * (because the driver version is old), it tries to provide a backup | 23 * (because the driver version is old), it tries to provide a backup |
| 24 * implementation. But if a backup implementation is not practical, it marks the | 24 * implementation. But if a backup implementation is not practical, it marks the |
| 25 * method as not supported. | 25 * method as not supported. |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 if (kBottomLeft_GrSurfaceOrigin == fRenderTargetOrigin) { | 99 if (kBottomLeft_GrSurfaceOrigin == fRenderTargetOrigin) { |
| 100 combined.setAll(SkIntToScalar(2) / fRenderTargetSize.fWidth, 0,
-SK_Scalar1, | 100 combined.setAll(SkIntToScalar(2) / fRenderTargetSize.fWidth, 0,
-SK_Scalar1, |
| 101 0, -SkIntToScalar(2) / fRenderTargetSize.fHeight
, SK_Scalar1, | 101 0, -SkIntToScalar(2) / fRenderTargetSize.fHeight
, SK_Scalar1, |
| 102 0, 0, 1); | 102 0, 0, 1); |
| 103 } else { | 103 } else { |
| 104 combined.setAll(SkIntToScalar(2) / fRenderTargetSize.fWidth, 0,
-SK_Scalar1, | 104 combined.setAll(SkIntToScalar(2) / fRenderTargetSize.fWidth, 0,
-SK_Scalar1, |
| 105 0, SkIntToScalar(2) / fRenderTargetSize.fHeight,
-SK_Scalar1, | 105 0, SkIntToScalar(2) / fRenderTargetSize.fHeight,
-SK_Scalar1, |
| 106 0, 0, 1); | 106 0, 0, 1); |
| 107 } | 107 } |
| 108 combined.preConcat(fViewMatrix); | 108 combined.preConcat(fViewMatrix); |
| 109 GrGLGetMatrix<Size>(destMatrix, combined); | 109 GrGLSLGetMatrix<Size>(destMatrix, combined); |
| 110 } | 110 } |
| 111 }; | 111 }; |
| 112 GrGLGpu* gpu(); | 112 GrGLGpu* gpu(); |
| 113 | 113 |
| 114 SkAutoTDelete<GrGLNameAllocator> fPathNameAllocator; | 114 SkAutoTDelete<GrGLNameAllocator> fPathNameAllocator; |
| 115 MatrixState fHWProjectionMatrixState; | 115 MatrixState fHWProjectionMatrixState; |
| 116 GrStencilSettings fHWPathStencilSettings; | 116 GrStencilSettings fHWPathStencilSettings; |
| 117 Caps fCaps; | 117 Caps fCaps; |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 #endif | 120 #endif |
| OLD | NEW |