Add XferProcessor factory in GrPaint and GrDrawState.
In this CL the XP should have zero effect on the actual rendering pipeline.
BUG=skia:
Review URL: https://codereview.chromium.org/751283002
diff --git a/src/gpu/GrProcessor.cpp b/src/gpu/GrProcessor.cpp
index d850d68..8aeef04 100644
--- a/src/gpu/GrProcessor.cpp
+++ b/src/gpu/GrProcessor.cpp
@@ -28,6 +28,13 @@
}
template<>
+SkTArray<GrProcessorTestFactory<GrXferProcessor>*, true>*
+GrProcessorTestFactory<GrXferProcessor>::GetFactories() {
+ static SkTArray<GrProcessorTestFactory<GrXferProcessor>*, true> gFactories;
+ return &gFactories;
+}
+
+template<>
SkTArray<GrProcessorTestFactory<GrGeometryProcessor>*, true>*
GrProcessorTestFactory<GrGeometryProcessor>::GetFactories() {
static SkTArray<GrProcessorTestFactory<GrGeometryProcessor>*, true> gFactories;
@@ -41,6 +48,7 @@
*/
static const int kFPFactoryCount = 37;
static const int kGPFactoryCount = 14;
+static const int kXPFactoryCount = 0;
template<>
void GrProcessorTestFactory<GrFragmentProcessor>::VerifyFactoryCount() {
@@ -56,6 +64,13 @@
}
}
+template<>
+void GrProcessorTestFactory<GrXferProcessor>::VerifyFactoryCount() {
+ if (kXPFactoryCount != GetFactories()->count()) {
+ SkFAIL("Wrong number of xfer processor factories!");
+ }
+}
+
#endif
namespace GrProcessorUnitTest {