Chromium Code Reviews| Index: include/gpu/GrProcessorUnitTest.h |
| diff --git a/include/gpu/GrProcessorUnitTest.h b/include/gpu/GrProcessorUnitTest.h |
| index 3e1601dc8e049e20c9c4110f9d917b5db4559e87..ab77ccdbd7082b3aed0b2747fd88f5b180717995 100644 |
| --- a/include/gpu/GrProcessorUnitTest.h |
| +++ b/include/gpu/GrProcessorUnitTest.h |
| @@ -88,6 +88,14 @@ private: |
| const GrDrawTargetCaps&, \ |
| GrTexture* dummyTextures[2]) |
| +#define GR_DECLARE_XP_FACTORY_TEST \ |
| + static GrProcessorTestFactory<GrXPFactory> gTestFactory SK_UNUSED; \ |
| + static GrXPFactory* TestCreate(SkRandom*, \ |
| + GrContext*, \ |
| + const GrDrawTargetCaps&, \ |
| + GrTexture* dummyTextures[2]) |
| + |
| + |
| /** GrProcessor subclasses should insert this macro in their implementation file. They must then |
| * also implement this static function: |
| * GrProcessor* TestCreate(SkRandom*, |
| @@ -102,6 +110,9 @@ private: |
| #define GR_DEFINE_FRAGMENT_PROCESSOR_TEST(Effect) \ |
| GrProcessorTestFactory<GrFragmentProcessor> Effect :: gTestFactory(Effect :: TestCreate) |
| +#define GR_DEFINE_XP_FACTORY_TEST(Factory) \ |
| + GrProcessorTestFactory<GrXPFactory> Factory :: gTestFactory(Factory :: TestCreate) |
| + |
| #define GR_DEFINE_GEOMETRY_PROCESSOR_TEST(Effect) \ |
| GrProcessorTestFactory<GrGeometryProcessor> Effect :: gTestFactory(Effect :: TestCreate) |
| @@ -118,6 +129,15 @@ private: |
| // The unit test relies on static initializers. Just declare the TestCreate function so that |
| // its definitions will compile. |
| +#define GR_DECLARE_XP_FACTORY_TEST \ |
| + static GrXPFactory* TestCreate(SkRandom*, \ |
| + GrContext*, \ |
| + const GrDrawTargetCaps&, \ |
| + GrTexture* dummyTextures[2]) |
|
joshualitt
2014/12/08 19:46:40
alignment
egdaniel
2014/12/09 21:10:46
Done.
|
| +#define GR_DEFINE_XP_FACTORY_TEST(X) |
| + |
| +// The unit test relies on static initializers. Just declare the TestCreate function so that |
| +// its definitions will compile. |
| #define GR_DECLARE_GEOMETRY_PROCESSOR_TEST \ |
| static GrGeometryProcessor* TestCreate(SkRandom*, \ |
| GrContext*, \ |