Index: include/gpu/GrProcessorUnitTest.h |
diff --git a/include/gpu/GrProcessorUnitTest.h b/include/gpu/GrProcessorUnitTest.h |
index 8a17521bfce2bfd6f92f77c992301759de70285f..b18c7072fdd38a0d2048bfcecb719d5270480d9d 100644 |
--- a/include/gpu/GrProcessorUnitTest.h |
+++ b/include/gpu/GrProcessorUnitTest.h |
@@ -15,14 +15,20 @@ |
class SkMatrix; |
class GrCaps; |
class GrContext; |
+struct GrProcessorTestData; |
namespace GrProcessorUnitTest { |
+ |
// Used to access the dummy textures in TestCreate procs. |
enum { |
kSkiaPMTextureIdx = 0, |
kAlphaTextureIdx = 1, |
}; |
+/** This allows parent FPs to implement a test create with known leaf children in order to avoid |
+creating an unbounded FP tree which may overflow various shader limits. */ |
+const GrFragmentProcessor* CreateChildFP(GrProcessorTestData*); |
+ |
} |
/* |
@@ -57,10 +63,8 @@ struct GrProcessorTestData { |
class GrProcessor; |
class GrTexture; |
-template <class Processor> |
-class GrProcessorTestFactory : SkNoncopyable { |
+template <class Processor> class GrProcessorTestFactory : SkNoncopyable { |
public: |
- |
typedef const Processor* (*CreateProc)(GrProcessorTestData*); |
GrProcessorTestFactory(CreateProc createProc) { |
@@ -111,7 +115,6 @@ private: |
static GrProcessorTestFactory<GrXPFactory> gTestFactory SK_UNUSED; \ |
static const GrXPFactory* TestCreate(GrProcessorTestData*) |
- |
/** GrProcessor subclasses should insert this macro in their implementation file. They must then |
* also implement this static function: |
* GrProcessor* TestCreate(GrProcessorTestData*); |