aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/GrEffectUnitTest.h
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-11-01 15:40:47 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-11-01 15:40:47 +0000
commitc3a58f345de16c185db3a20578c7ddf52bc89d38 (patch)
tree90b83991981cce5a6e19e212911122f240aa8470 /include/gpu/GrEffectUnitTest.h
parent66e534da8e2b3de928f7ce132da61947a73ab7cb (diff)
Reland r6233 with fix for config conversion texture matrices.
git-svn-id: http://skia.googlecode.com/svn/trunk@6238 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/gpu/GrEffectUnitTest.h')
-rw-r--r--include/gpu/GrEffectUnitTest.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/include/gpu/GrEffectUnitTest.h b/include/gpu/GrEffectUnitTest.h
index 427260c664..8cc2689d91 100644
--- a/include/gpu/GrEffectUnitTest.h
+++ b/include/gpu/GrEffectUnitTest.h
@@ -12,12 +12,20 @@
#include "GrNoncopyable.h"
#include "SkTArray.h"
+class SkMatrix;
+
namespace GrEffectUnitTest {
// Used to access the dummy textures in TestCreate procs.
enum {
kSkiaPMTextureIdx = 0,
kAlphaTextureIdx = 1,
};
+
+/**
+ * A helper for use in GrEffect::TestCreate functions.
+ */
+const SkMatrix& TestMatrix(SkRandom*);
+
}
#if SK_ALLOW_STATIC_GLOBAL_INITIALIZERS
@@ -56,12 +64,13 @@ private:
static GrEffectTestFactory gTestFactory; \
static GrEffect* TestCreate(SkRandom*, GrContext*, GrTexture* dummyTextures[2])
-/** GrEffect subclasses should insert this macro in their implemenation file. They must then
+/** GrEffect subclasses should insert this macro in their implementation file. They must then
* also implement this static function:
* GrEffect* TestCreate(SkRandom*, GrContext*, GrTexture* dummyTextures[2]);
- * dummyTextures[] are valied textures that they can optionally use for their texture accesses. The
- * first texture has config kSkia8888_PM_GrPixelConfig and the second has kAlpha_8_GrPixelConfig.
- * TestCreate functions are also free to create additional textures using the GrContext.
+ * dummyTextures[] are valid textures that can optionally be used to construct GrTextureAccesses.
+ * The first texture has config kSkia8888_PM_GrPixelConfig and the second has
+ * kAlpha_8_GrPixelConfig. TestCreate functions are also free to create additional textures using
+ * the GrContext.
*/
#define GR_DEFINE_EFFECT_TEST(Effect) \
GrEffectTestFactory Effect :: gTestFactory(Effect :: TestCreate)