added support for PLS path rendering
BUG=skia:3555
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1541903002
Committed: https://skia.googlesource.com/skia/+/7df3f5e127f8016d17b637cc48a6a4718f1a6822
Review URL: https://codereview.chromium.org/1541903002
diff --git a/include/gpu/GrCaps.h b/include/gpu/GrCaps.h
index e2e59c3..05da8d7 100644
--- a/include/gpu/GrCaps.h
+++ b/include/gpu/GrCaps.h
@@ -81,6 +81,24 @@
*/
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 @@
bool fShaderPrecisionVaries;
PrecisionInfo fFloatPrecisions[kGrShaderTypeCount][kGrSLPrecisionCount];
+ int fPixelLocalStorageSize;
+ bool fPLSPathRenderingSupport;
private:
virtual void onApplyOptionsOverrides(const GrContextOptions&) {};