| 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 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 /** | 29 /** |
| 30 * Create a new GrGLPathRendering object from a given GrGLGpu. | 30 * Create a new GrGLPathRendering object from a given GrGLGpu. |
| 31 */ | 31 */ |
| 32 GrGLPathRendering(GrGLGpu* gpu); | 32 GrGLPathRendering(GrGLGpu* gpu); |
| 33 virtual ~GrGLPathRendering(); | 33 virtual ~GrGLPathRendering(); |
| 34 | 34 |
| 35 // GrPathRendering implementations. | 35 // GrPathRendering implementations. |
| 36 GrPath* createPath(const SkPath&, const GrStrokeInfo&) override; | 36 GrPath* createPath(const SkPath&, const GrStrokeInfo&) override; |
| 37 virtual GrPathRange* createPathRange(GrPathRange::PathGenerator*, | 37 virtual GrPathRange* createPathRange(GrPathRange::PathGenerator*, |
| 38 const GrStrokeInfo&) override; | 38 const GrStrokeInfo&) override; |
| 39 virtual GrPathRange* createGlyphs(const SkTypeface*, | |
| 40 const SkDescriptor*, | |
| 41 const GrStrokeInfo&) override; | |
| 42 | 39 |
| 43 /* Called when the 3D context state is unknown. */ | 40 /* Called when the 3D context state is unknown. */ |
| 44 void resetContext(); | 41 void resetContext(); |
| 45 | 42 |
| 46 /** | 43 /** |
| 47 * Called when the GPU resources have been lost and need to be abandoned | 44 * Called when the GPU resources have been lost and need to be abandoned |
| 48 * (for example after a context loss). | 45 * (for example after a context loss). |
| 49 */ | 46 */ |
| 50 void abandonGpuResources(); | 47 void abandonGpuResources(); |
| 51 | 48 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 68 void onDrawPaths(const DrawPathArgs&, const GrPathRange*, const void* indice
s, PathIndexType, | 65 void onDrawPaths(const DrawPathArgs&, const GrPathRange*, const void* indice
s, PathIndexType, |
| 69 const float transformValues[], PathTransformType, int count
) override; | 66 const float transformValues[], PathTransformType, int count
) override; |
| 70 private: | 67 private: |
| 71 /** | 68 /** |
| 72 * Mark certain functionality as not supported if the driver version is too | 69 * Mark certain functionality as not supported if the driver version is too |
| 73 * old and a backup implementation is not practical. | 70 * old and a backup implementation is not practical. |
| 74 */ | 71 */ |
| 75 struct Caps { | 72 struct Caps { |
| 76 bool stencilThenCoverSupport : 1; | 73 bool stencilThenCoverSupport : 1; |
| 77 bool fragmentInputGenSupport : 1; | 74 bool fragmentInputGenSupport : 1; |
| 78 bool glyphLoadingSupport : 1; | |
| 79 }; | 75 }; |
| 80 const Caps& caps() const { return fCaps; } | 76 const Caps& caps() const { return fCaps; } |
| 81 | 77 |
| 82 void flushPathStencilSettings(const GrStencilSettings&); | 78 void flushPathStencilSettings(const GrStencilSettings&); |
| 83 | 79 |
| 84 // NV_path_rendering v1.2 | 80 // NV_path_rendering v1.2 |
| 85 void stencilThenCoverFillPath(GrGLuint path, GrGLenum fillMode, | 81 void stencilThenCoverFillPath(GrGLuint path, GrGLenum fillMode, |
| 86 GrGLuint mask, GrGLenum coverMode); | 82 GrGLuint mask, GrGLenum coverMode); |
| 87 | 83 |
| 88 void stencilThenCoverStrokePath(GrGLuint path, GrGLint reference, | 84 void stencilThenCoverStrokePath(GrGLuint path, GrGLint reference, |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 MatrixState fHWProjectionMatrixState; | 132 MatrixState fHWProjectionMatrixState; |
| 137 GrStencilSettings fHWPathStencilSettings; | 133 GrStencilSettings fHWPathStencilSettings; |
| 138 struct PathTexGenData { | 134 struct PathTexGenData { |
| 139 GrGLenum fMode; | 135 GrGLenum fMode; |
| 140 GrGLint fNumComponents; | 136 GrGLint fNumComponents; |
| 141 GrGLfloat fCoefficients[3 * 3]; | 137 GrGLfloat fCoefficients[3 * 3]; |
| 142 }; | 138 }; |
| 143 }; | 139 }; |
| 144 | 140 |
| 145 #endif | 141 #endif |
| OLD | NEW |