| 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 21 matching lines...) Expand all Loading... |
| 32 GrGLPathRendering(GrGpuGL* gpu); | 32 GrGLPathRendering(GrGpuGL* gpu); |
| 33 virtual ~GrGLPathRendering(); | 33 virtual ~GrGLPathRendering(); |
| 34 | 34 |
| 35 // GrPathRendering implementations. | 35 // GrPathRendering implementations. |
| 36 virtual GrPath* createPath(const SkPath&, const SkStrokeRec&) SK_OVERRIDE; | 36 virtual GrPath* createPath(const SkPath&, const SkStrokeRec&) SK_OVERRIDE; |
| 37 virtual GrPathRange* createPathRange(GrPathRange::PathGenerator*, | 37 virtual GrPathRange* createPathRange(GrPathRange::PathGenerator*, |
| 38 const SkStrokeRec&) SK_OVERRIDE; | 38 const SkStrokeRec&) SK_OVERRIDE; |
| 39 virtual GrPathRange* createGlyphs(const SkTypeface*, | 39 virtual GrPathRange* createGlyphs(const SkTypeface*, |
| 40 const SkDescriptor*, | 40 const SkDescriptor*, |
| 41 const SkStrokeRec&) SK_OVERRIDE; | 41 const SkStrokeRec&) SK_OVERRIDE; |
| 42 virtual void stencilPath(const GrPath*, SkPath::FillType) SK_OVERRIDE; | 42 virtual void stencilPath(const GrPath*, const GrStencilSettings&) SK_OVERRID
E; |
| 43 virtual void drawPath(const GrPath*, SkPath::FillType) SK_OVERRIDE; | 43 virtual void drawPath(const GrPath*, const GrStencilSettings&) SK_OVERRIDE; |
| 44 virtual void drawPaths(const GrPathRange*, const uint32_t indices[], int cou
nt, | 44 virtual void drawPaths(const GrPathRange*, const uint32_t indices[], int cou
nt, |
| 45 const float transforms[], PathTransformType, | 45 const float transforms[], PathTransformType, |
| 46 SkPath::FillType) SK_OVERRIDE; | 46 const GrStencilSettings&) SK_OVERRIDE; |
| 47 | 47 |
| 48 /* Called when the 3D context state is unknown. */ | 48 /* Called when the 3D context state is unknown. */ |
| 49 void resetContext(); | 49 void resetContext(); |
| 50 | 50 |
| 51 /** | 51 /** |
| 52 * Called when the GPU resources have been lost and need to be abandoned | 52 * Called when the GPU resources have been lost and need to be abandoned |
| 53 * (for example after a context loss). | 53 * (for example after a context loss). |
| 54 */ | 54 */ |
| 55 void abandonGpuResources(); | 55 void abandonGpuResources(); |
| 56 | 56 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 * Mark certain functionality as not supported if the driver version is too | 100 * Mark certain functionality as not supported if the driver version is too |
| 101 * old and a backup implementation is not practical. | 101 * old and a backup implementation is not practical. |
| 102 */ | 102 */ |
| 103 struct Caps { | 103 struct Caps { |
| 104 bool stencilThenCoverSupport : 1; | 104 bool stencilThenCoverSupport : 1; |
| 105 bool fragmentInputGenSupport : 1; | 105 bool fragmentInputGenSupport : 1; |
| 106 bool glyphLoadingSupport : 1; | 106 bool glyphLoadingSupport : 1; |
| 107 }; | 107 }; |
| 108 const Caps& caps() const { return fCaps; } | 108 const Caps& caps() const { return fCaps; } |
| 109 | 109 |
| 110 void flushPathStencilSettings(SkPath::FillType fill); | 110 void flushPathStencilSettings(const GrStencilSettings&); |
| 111 | 111 |
| 112 // NV_path_rendering v1.2 | 112 // NV_path_rendering v1.2 |
| 113 void stencilThenCoverFillPath(GrGLuint path, GrGLenum fillMode, | 113 void stencilThenCoverFillPath(GrGLuint path, GrGLenum fillMode, |
| 114 GrGLuint mask, GrGLenum coverMode); | 114 GrGLuint mask, GrGLenum coverMode); |
| 115 | 115 |
| 116 void stencilThenCoverStrokePath(GrGLuint path, GrGLint reference, | 116 void stencilThenCoverStrokePath(GrGLuint path, GrGLint reference, |
| 117 GrGLuint mask, GrGLenum coverMode); | 117 GrGLuint mask, GrGLenum coverMode); |
| 118 | 118 |
| 119 void stencilThenCoverFillPathInstanced( | 119 void stencilThenCoverFillPathInstanced( |
| 120 GrGLsizei numPaths, GrGLenum pathNameType, const GrGLvoid *paths, | 120 GrGLsizei numPaths, GrGLenum pathNameType, const GrGLvoid *paths, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 134 struct PathTexGenData { | 134 struct PathTexGenData { |
| 135 GrGLenum fMode; | 135 GrGLenum fMode; |
| 136 GrGLint fNumComponents; | 136 GrGLint fNumComponents; |
| 137 GrGLfloat fCoefficients[3 * 3]; | 137 GrGLfloat fCoefficients[3 * 3]; |
| 138 }; | 138 }; |
| 139 int fHWActivePathTexGenSets; | 139 int fHWActivePathTexGenSets; |
| 140 SkTArray<PathTexGenData, true> fHWPathTexGenSettings; | 140 SkTArray<PathTexGenData, true> fHWPathTexGenSettings; |
| 141 }; | 141 }; |
| 142 | 142 |
| 143 #endif | 143 #endif |
| OLD | NEW |