Index: src/gpu/GrPLSGeometryProcessor.h |
diff --git a/src/gpu/GrPLSGeometryProcessor.h b/src/gpu/GrPLSGeometryProcessor.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6affaaa4d349d7b7cd0bb091d8bbe99d29b94d44 |
--- /dev/null |
+++ b/src/gpu/GrPLSGeometryProcessor.h |
@@ -0,0 +1,31 @@ |
+/* |
+ * Copyright 2016 Google Inc. |
+ * |
+ * Use of this source code is governed by a BSD-style license that can be |
+ * found in the LICENSE file. |
+ */ |
+ |
+#ifndef GrPLSGeometryProcessor_DEFINED |
+#define GrPLSGeometryProcessor_DEFINED |
+ |
+#include "GrGeometryProcessor.h" |
+ |
+#define PLS_DATA_DECL "__pixel_localEXT PLSData {\n"\ |
bsalomon
2016/01/04 15:33:47
Seems like this should be in a GL/GLSL specific fi
|
+ " layout(rgba8i) ivec4 windings;\n"\ |
+ " layout(rgba8) vec4 dstColor;\n"\ |
+ "} pls;\n" |
+ |
+/** |
+ * A minor extension to GrGeometryProcessor that adds bounds tracking for pixel local storage |
+ * purposes. |
+ */ |
+class GrPLSGeometryProcessor : public GrGeometryProcessor { |
+public: |
+ SkRect fBounds; |
+ |
+ GrPixelLocalStorageState getPixelLocalStorageState() const override { |
+ return GrPixelLocalStorageState::kDraw_State; |
+ } |
bsalomon
2016/01/04 15:33:47
untab }
|
+}; |
+ |
+#endif |