aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu
diff options
context:
space:
mode:
Diffstat (limited to 'include/gpu')
-rw-r--r--include/gpu/GrContext.h10
-rw-r--r--include/gpu/GrEffectUnitTest.h17
2 files changed, 21 insertions, 6 deletions
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 29ac95a918..89cd171a5c 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -928,8 +928,14 @@ private:
// for use with textures released from an GrAutoScratchTexture.
void addExistingTextureToCache(GrTexture* texture);
- GrEffect* createPMToUPMEffect(GrTexture* texture, bool swapRAndB);
- GrEffect* createUPMToPMEffect(GrTexture* texture, bool swapRAndB);
+ bool installPMToUPMEffect(GrTexture* texture,
+ bool swapRAndB,
+ const GrMatrix& matrix,
+ GrEffectStage* stage);
+ bool installUPMToPMEffect(GrTexture* texture,
+ bool swapRAndB,
+ const GrMatrix& matrix,
+ GrEffectStage* stage);
typedef GrRefCnt INHERITED;
};
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)