Index: include/gpu/GrCaps.h |
diff --git a/include/gpu/GrCaps.h b/include/gpu/GrCaps.h |
index e2e59c30a4c7701b1f85e3174262982c6f006484..05da8d7cadf40d5af5eafa185b03ad761c8b7029 100644 |
--- a/include/gpu/GrCaps.h |
+++ b/include/gpu/GrCaps.h |
@@ -81,6 +81,24 @@ public: |
*/ |
bool floatPrecisionVaries() const { return fShaderPrecisionVaries; } |
+ /** |
+ * PLS storage size in bytes (0 when not supported). The PLS spec defines a minimum size of 16 |
+ * bytes whenever PLS is supported. |
+ */ |
+ int pixelLocalStorageSize() const { return fPixelLocalStorageSize; } |
+ |
+ /** |
+ * True if this context supports the necessary extensions and features to enable the PLS path |
+ * renderer. |
+ */ |
+ bool plsPathRenderingSupport() const { |
+#if GR_ENABLE_PLS_PATH_RENDERING |
+ return fPLSPathRenderingSupport; |
+#else |
+ return false; |
+#endif |
+ } |
+ |
protected: |
/** Subclasses must call this after initialization in order to apply caps overrides requested by |
the client. Note that overrides will only reduce the caps never expand them. */ |
@@ -94,6 +112,8 @@ protected: |
bool fShaderPrecisionVaries; |
PrecisionInfo fFloatPrecisions[kGrShaderTypeCount][kGrSLPrecisionCount]; |
+ int fPixelLocalStorageSize; |
+ bool fPLSPathRenderingSupport; |
private: |
virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; |