Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(330)

Unified Diff: src/gpu/gl/GrGLPathRendering.h

Issue 1206333003: Revert of Cleanup legacy NVPR-related definitions (Closed) Base URL: https://skia.googlesource.com/skia.git@chromium-pathrendering-prepare-02
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLInterface.cpp ('k') | src/gpu/gl/GrGLPathRendering.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLPathRendering.h
diff --git a/src/gpu/gl/GrGLPathRendering.h b/src/gpu/gl/GrGLPathRendering.h
index 86cf1b1698ac8aed0e6f3d18d119ffb8a6588ce6..20fd4967b7de0469595b4c2f37c36ba35db48e74 100644
--- a/src/gpu/gl/GrGLPathRendering.h
+++ b/src/gpu/gl/GrGLPathRendering.h
@@ -65,7 +65,34 @@
void onDrawPaths(const DrawPathArgs&, const GrPathRange*, const void* indices, PathIndexType,
const float transformValues[], PathTransformType, int count) override;
private:
+ /**
+ * Mark certain functionality as not supported if the driver version is too
+ * old and a backup implementation is not practical.
+ */
+ struct Caps {
+ bool stencilThenCoverSupport : 1;
+ bool fragmentInputGenSupport : 1;
+ };
+ const Caps& caps() const { return fCaps; }
+
void flushPathStencilSettings(const GrStencilSettings&);
+
+ // NV_path_rendering v1.2
+ void stencilThenCoverFillPath(GrGLuint path, GrGLenum fillMode,
+ GrGLuint mask, GrGLenum coverMode);
+
+ void stencilThenCoverStrokePath(GrGLuint path, GrGLint reference,
+ GrGLuint mask, GrGLenum coverMode);
+
+ void stencilThenCoverFillPathInstanced(
+ GrGLsizei numPaths, GrGLenum pathNameType, const GrGLvoid *paths,
+ GrGLuint pathBase, GrGLenum fillMode, GrGLuint mask, GrGLenum coverMode,
+ GrGLenum transformType, const GrGLfloat *transformValues);
+
+ void stencilThenCoverStrokePathInstanced(
+ GrGLsizei numPaths, GrGLenum pathNameType, const GrGLvoid *paths,
+ GrGLuint pathBase, GrGLint reference, GrGLuint mask, GrGLenum coverMode,
+ GrGLenum transformType, const GrGLfloat *transformValues);
struct MatrixState {
SkMatrix fViewMatrix;
@@ -101,8 +128,14 @@
GrGLGpu* gpu();
SkAutoTDelete<GrGLNameAllocator> fPathNameAllocator;
+ Caps fCaps;
MatrixState fHWProjectionMatrixState;
GrStencilSettings fHWPathStencilSettings;
+ struct PathTexGenData {
+ GrGLenum fMode;
+ GrGLint fNumComponents;
+ GrGLfloat fCoefficients[3 * 3];
+ };
};
#endif
« no previous file with comments | « src/gpu/gl/GrGLInterface.cpp ('k') | src/gpu/gl/GrGLPathRendering.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698