aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/core/SkColorFilter.h4
-rw-r--r--include/core/SkImageFilter.h8
-rw-r--r--include/core/SkShader.h6
-rw-r--r--include/effects/SkColorMatrixFilter.h2
-rw-r--r--include/effects/SkMagnifierImageFilter.h2
-rw-r--r--include/effects/SkMatrixConvolutionImageFilter.h2
-rw-r--r--include/gpu/GrContext.h6
-rw-r--r--include/gpu/GrCustomStageUnitTest.h28
-rw-r--r--include/gpu/GrEffect.h (renamed from include/gpu/GrCustomStage.h)16
-rw-r--r--include/gpu/GrPaint.h4
-rw-r--r--include/gpu/GrProgramStageFactory.h20
-rw-r--r--include/gpu/GrSamplerState.h16
-rw-r--r--include/gpu/GrTextureAccess.h6
13 files changed, 60 insertions, 60 deletions
diff --git a/include/core/SkColorFilter.h b/include/core/SkColorFilter.h
index f8163b2b57..d470672a3f 100644
--- a/include/core/SkColorFilter.h
+++ b/include/core/SkColorFilter.h
@@ -15,7 +15,7 @@
#include "SkXfermode.h"
class SkBitmap;
-class GrCustomStage;
+class GrEffect;
class GrContext;
class SK_API SkColorFilter : public SkFlattenable {
@@ -118,7 +118,7 @@ public:
/** A subclass may implement this factory function to work with the GPU backend. If the return
is non-NULL then the caller owns a ref on the returned object.
*/
- virtual GrCustomStage* asNewCustomStage(GrContext*) const;
+ virtual GrEffect* asNewCustomStage(GrContext*) const;
SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP()
protected:
diff --git a/include/core/SkImageFilter.h b/include/core/SkImageFilter.h
index ecbf79dda3..f37d5a39fa 100644
--- a/include/core/SkImageFilter.h
+++ b/include/core/SkImageFilter.h
@@ -17,7 +17,7 @@ class SkMatrix;
struct SkIPoint;
struct SkIRect;
struct SkRect;
-class GrCustomStage;
+class GrEffect;
class GrTexture;
/**
@@ -83,14 +83,14 @@ public:
/**
* Returns true if the filter can be expressed a single-pass
- * GrCustomStage, used to process this filter on the GPU, or false if
+ * GrEffect, used to process this filter on the GPU, or false if
* not.
*
- * If stage is non-NULL, a new GrCustomStage instance is stored
+ * If stage is non-NULL, a new GrEffect instance is stored
* in it. The caller assumes ownership of the stage, and it is up to the
* caller to unref it.
*/
- virtual bool asNewCustomStage(GrCustomStage** stage, GrTexture*) const;
+ virtual bool asNewCustomStage(GrEffect** stage, GrTexture*) const;
/**
* Returns true if the filter can be processed on the GPU. This is most
diff --git a/include/core/SkShader.h b/include/core/SkShader.h
index a0a1b056d4..23e095029b 100644
--- a/include/core/SkShader.h
+++ b/include/core/SkShader.h
@@ -18,7 +18,7 @@
class SkPath;
class GrContext;
-class GrCustomStage;
+class GrEffect;
class GrSamplerState;
/** \class SkShader
@@ -306,11 +306,11 @@ public:
virtual GradientType asAGradient(GradientInfo* info) const;
/**
- * If the shader subclass has a GrCustomStage implementation, this installs
+ * If the shader subclass has a GrEffect implementation, this installs
* a custom stage on the sampler. A GrContext pointer is required since custom
* stages may need to create textures. The sampler parameter is necessary to set a
* texture matrix. It will eventually be removed and this function will operate as a
- * GrCustomStage factory.
+ * GrEffect factory.
*/
virtual bool asNewCustomStage(GrContext* context, GrSamplerState* sampler) const;
diff --git a/include/effects/SkColorMatrixFilter.h b/include/effects/SkColorMatrixFilter.h
index 08eef5de88..3ab253ab2b 100644
--- a/include/effects/SkColorMatrixFilter.h
+++ b/include/effects/SkColorMatrixFilter.h
@@ -22,7 +22,7 @@ public:
virtual uint32_t getFlags() SK_OVERRIDE;
virtual bool asColorMatrix(SkScalar matrix[20]) SK_OVERRIDE;
#if SK_SUPPORT_GPU
- virtual GrCustomStage* asNewCustomStage(GrContext*) const SK_OVERRIDE;
+ virtual GrEffect* asNewCustomStage(GrContext*) const SK_OVERRIDE;
#endif
struct State {
diff --git a/include/effects/SkMagnifierImageFilter.h b/include/effects/SkMagnifierImageFilter.h
index 144fdb42ca..26cb1a88bb 100644
--- a/include/effects/SkMagnifierImageFilter.h
+++ b/include/effects/SkMagnifierImageFilter.h
@@ -16,7 +16,7 @@ class SK_API SkMagnifierImageFilter : public SkImageFilter {
public:
SkMagnifierImageFilter(SkRect srcRect, SkScalar inset);
- virtual bool asNewCustomStage(GrCustomStage** stage,
+ virtual bool asNewCustomStage(GrEffect** stage,
GrTexture* texture) const SK_OVERRIDE;
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMagnifierImageFilter)
diff --git a/include/effects/SkMatrixConvolutionImageFilter.h b/include/effects/SkMatrixConvolutionImageFilter.h
index f7440cd9ec..bdeaad3048 100644
--- a/include/effects/SkMatrixConvolutionImageFilter.h
+++ b/include/effects/SkMatrixConvolutionImageFilter.h
@@ -62,7 +62,7 @@ protected:
SkBitmap* result, SkIPoint* loc) SK_OVERRIDE;
#if SK_SUPPORT_GPU
- virtual bool asNewCustomStage(GrCustomStage** stage, GrTexture*) const SK_OVERRIDE;
+ virtual bool asNewCustomStage(GrEffect** stage, GrTexture*) const SK_OVERRIDE;
#endif
private:
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 4fd60266d2..9aad700eeb 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -23,9 +23,9 @@
class GrAutoScratchTexture;
class GrCacheKey;
-class GrCustomStage;
class GrDrawState;
class GrDrawTarget;
+class GrEffect;
class GrFontCache;
class GrGpu;
class GrIndexBuffer;
@@ -920,8 +920,8 @@ private:
// for use with textures released from an GrAutoScratchTexture.
void addExistingTextureToCache(GrTexture* texture);
- GrCustomStage* createPMToUPMEffect(GrTexture* texture, bool swapRAndB);
- GrCustomStage* createUPMToPMEffect(GrTexture* texture, bool swapRAndB);
+ GrEffect* createPMToUPMEffect(GrTexture* texture, bool swapRAndB);
+ GrEffect* createUPMToPMEffect(GrTexture* texture, bool swapRAndB);
typedef GrRefCnt INHERITED;
};
diff --git a/include/gpu/GrCustomStageUnitTest.h b/include/gpu/GrCustomStageUnitTest.h
index 0e12f2d229..427c1e6b63 100644
--- a/include/gpu/GrCustomStageUnitTest.h
+++ b/include/gpu/GrCustomStageUnitTest.h
@@ -22,56 +22,56 @@ enum {
#if SK_ALLOW_STATIC_GLOBAL_INITIALIZERS
-class GrCustomStage;
class GrContext;
+class GrEffect;
class GrTexture;
-class GrCustomStageTestFactory : GrNoncopyable {
+class GrEffectTestFactory : GrNoncopyable {
public:
- typedef GrCustomStage* (*CreateProc)(SkRandom*, GrContext*, GrTexture* dummyTextures[]);
+ typedef GrEffect* (*CreateProc)(SkRandom*, GrContext*, GrTexture* dummyTextures[]);
- GrCustomStageTestFactory(CreateProc createProc) {
+ GrEffectTestFactory(CreateProc createProc) {
fCreateProc = createProc;
GetFactories()->push_back(this);
}
- static GrCustomStage* CreateStage(SkRandom* random,
+ static GrEffect* CreateStage(SkRandom* random,
GrContext* context,
GrTexture* dummyTextures[]) {
uint32_t idx = random->nextRangeU(0, GetFactories()->count() - 1);
- GrCustomStageTestFactory* factory = (*GetFactories())[idx];
+ GrEffectTestFactory* factory = (*GetFactories())[idx];
return factory->fCreateProc(random, context, dummyTextures);
}
private:
CreateProc fCreateProc;
- static SkTArray<GrCustomStageTestFactory*, true>* GetFactories();
+ static SkTArray<GrEffectTestFactory*, true>* GetFactories();
};
-/** GrCustomStage subclasses should insert this macro in their declaration to be included in the
+/** GrEffect subclasses should insert this macro in their declaration to be included in the
* program generation unit test.
*/
#define GR_DECLARE_CUSTOM_STAGE_TEST \
- static GrCustomStageTestFactory gTestFactory; \
- static GrCustomStage* TestCreate(SkRandom*, GrContext*, GrTexture* dummyTextures[2])
+ static GrEffectTestFactory gTestFactory; \
+ static GrEffect* TestCreate(SkRandom*, GrContext*, GrTexture* dummyTextures[2])
-/** GrCustomStage subclasses should insert this macro in their implemenation file. They must then
+/** GrEffect subclasses should insert this macro in their implemenation file. They must then
* also implement this static function:
- * GrCustomStage* TestCreate(SkRandom*, GrContext*, GrTexture* dummyTextures[2]);
+ * 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.
*/
#define GR_DEFINE_CUSTOM_STAGE_TEST(CustomStage) \
- GrCustomStageTestFactory CustomStage :: gTestFactory(CustomStage :: TestCreate)
+ GrEffectTestFactory CustomStage :: gTestFactory(CustomStage :: TestCreate)
#else // !SK_ALLOW_STATIC_GLOBAL_INITIALIZERS
// The unit test relies on static initializers. Just declare the TestCreate function so that
// its definitions will compile.
#define GR_DECLARE_CUSTOM_STAGE_TEST \
- static GrCustomStage* TestCreate(SkRandom*, GrContext*, GrTexture* dummyTextures[2])
+ static GrEffect* TestCreate(SkRandom*, GrContext*, GrTexture* dummyTextures[2])
#define GR_DEFINE_CUSTOM_STAGE_TEST(X)
#endif // !SK_ALLOW_STATIC_GLOBAL_INITIALIZERS
diff --git a/include/gpu/GrCustomStage.h b/include/gpu/GrEffect.h
index d75675c6c1..7ea5cd5b6d 100644
--- a/include/gpu/GrCustomStage.h
+++ b/include/gpu/GrEffect.h
@@ -22,21 +22,21 @@ class SkString;
particular stage of the Ganesh shading pipeline.
Subclasses must have a function that produces a human-readable name:
static const char* Name();
- GrCustomStage objects *must* be immutable: after being constructed,
+ GrEffect objects *must* be immutable: after being constructed,
their fields may not change. (Immutability isn't actually required
until they've been used in a draw call, but supporting that would require
setters and getters that could fail, copy-on-write, or deep copying of these
objects when they're stored by a GrGLProgramStage.)
*/
-class GrCustomStage : public GrRefCnt {
+class GrEffect : public GrRefCnt {
public:
- SK_DECLARE_INST_COUNT(GrCustomStage)
+ SK_DECLARE_INST_COUNT(GrEffect)
typedef GrProgramStageFactory::StageKey StageKey;
- explicit GrCustomStage(int numTextures);
- virtual ~GrCustomStage();
+ explicit GrEffect(int numTextures);
+ virtual ~GrEffect();
/** If given an input texture that is/is not opaque, is this
stage guaranteed to produce an opaque output? */
@@ -45,12 +45,12 @@ public:
/** This object, besides creating back-end-specific helper
objects, is used for run-time-type-identification. The factory should be
an instance of templated class, GrTProgramStageFactory. It is templated
- on the subclass of GrCustomStage. The subclass must have a nested type
+ on the subclass of GrEffect. The subclass must have a nested type
(or typedef) named GLProgramStage which will be the subclass of
GrGLProgramStage created by the factory.
Example:
- class MyCustomStage : public GrCustomStage {
+ class MyCustomStage : public GrEffect {
...
virtual const GrProgramStageFactory& getFactory() const
SK_OVERRIDE {
@@ -75,7 +75,7 @@ public:
the two stages have the same return value for numTextures() and
for texture() over all valid indicse.
*/
- virtual bool isEqual(const GrCustomStage&) const;
+ virtual bool isEqual(const GrEffect&) const;
/** Human-meaningful string to identify this effect; may be embedded
in generated shader code. */
diff --git a/include/gpu/GrPaint.h b/include/gpu/GrPaint.h
index 06c16af578..b48195593c 100644
--- a/include/gpu/GrPaint.h
+++ b/include/gpu/GrPaint.h
@@ -20,7 +20,7 @@
* functions and the how color is blended with the destination pixel.
*
* The paint allows installation of custom color and coverage stages. New types of stages are
- * created by subclassing GrCustomStage.
+ * created by subclassing GrEffect.
*
* The primitive color computation starts with the color specified by setColor(). This color is the
* input to the first color stage. Each color stage feeds its output to the next color stage. The
@@ -39,7 +39,7 @@
* Note that the coverage is applied after the blend. This is why they are computed as distinct
* values.
*
- * TODO: Encapsulate setXfermodeColorFilter in a GrCustomStage and remove from GrPaint.
+ * TODO: Encapsulate setXfermodeColorFilter in a GrEffect and remove from GrPaint.
*/
class GrPaint {
public:
diff --git a/include/gpu/GrProgramStageFactory.h b/include/gpu/GrProgramStageFactory.h
index 90f6b32851..385ebfe43a 100644
--- a/include/gpu/GrProgramStageFactory.h
+++ b/include/gpu/GrProgramStageFactory.h
@@ -12,12 +12,12 @@
#include "SkTemplates.h"
#include "GrNoncopyable.h"
-/** Given a GrCustomStage of a particular type, creates the corresponding
+/** Given a GrEffect of a particular type, creates the corresponding
graphics-backend-specific GrProgramStage. Also tracks equivalence
of shaders generated via a key.
*/
-class GrCustomStage;
+class GrEffect;
class GrGLProgramStage;
class GrGLCaps;
@@ -29,10 +29,10 @@ public:
kTexturingStageKeyBits = 6
};
- virtual StageKey glStageKey(const GrCustomStage& stage,
+ virtual StageKey glStageKey(const GrEffect& stage,
const GrGLCaps& caps ) const = 0;
virtual GrGLProgramStage* createGLInstance(
- const GrCustomStage& stage) const = 0;
+ const GrEffect& stage) const = 0;
bool operator ==(const GrProgramStageFactory& b) const {
return fStageClassID == b.fStageClassID;
@@ -73,17 +73,17 @@ class GrTProgramStageFactory : public GrProgramStageFactory {
public:
typedef typename StageClass::GLProgramStage GLProgramStage;
- /** Returns a human-readable name that is accessible via GrCustomStage or
+ /** Returns a human-readable name that is accessible via GrEffect or
GrGLProgramStage and is consistent between the two of them.
*/
virtual const char* name() const SK_OVERRIDE { return StageClass::Name(); }
/** Returns a value that idenitifes the GLSL shader code generated by
- a GrCustomStage. This enables caching of generated shaders. Part of the
+ a GrEffect. This enables caching of generated shaders. Part of the
id identifies the GrCustomShader subclass. The remainder is based
- on the aspects of the GrCustomStage object's configuration that affect
+ on the aspects of the GrEffect object's configuration that affect
GLSL code generation. */
- virtual StageKey glStageKey(const GrCustomStage& stage,
+ virtual StageKey glStageKey(const GrEffect& stage,
const GrGLCaps& caps) const SK_OVERRIDE {
GrAssert(kIllegalStageClassID != fStageClassID);
StageKey stageID = GLProgramStage::GenKey(stage, caps);
@@ -101,10 +101,10 @@ public:
}
/** Returns a new instance of the appropriate *GL* implementation class
- for the given GrCustomStage; caller is responsible for deleting
+ for the given GrEffect; caller is responsible for deleting
the object. */
virtual GLProgramStage* createGLInstance(
- const GrCustomStage& stage) const SK_OVERRIDE {
+ const GrEffect& stage) const SK_OVERRIDE {
return SkNEW_ARGS(GLProgramStage, (*this, stage));
}
diff --git a/include/gpu/GrSamplerState.h b/include/gpu/GrSamplerState.h
index bb71e92560..98ca51de45 100644
--- a/include/gpu/GrSamplerState.h
+++ b/include/gpu/GrSamplerState.h
@@ -11,7 +11,7 @@
#ifndef GrSamplerState_DEFINED
#define GrSamplerState_DEFINED
-#include "GrCustomStage.h"
+#include "GrEffect.h"
#include "GrMatrix.h"
#include "GrTypes.h"
@@ -70,7 +70,7 @@ public:
class SavedCoordChange {
private:
GrMatrix fCoordChangeMatrix;
- GR_DEBUGCODE(mutable SkAutoTUnref<GrCustomStage> fCustomStage;)
+ GR_DEBUGCODE(mutable SkAutoTUnref<GrEffect> fCustomStage;)
friend class GrSamplerState;
};
@@ -100,7 +100,7 @@ public:
}
/**
- * Gets the texture matrix. This is will be removed soon and be managed by GrCustomStage.
+ * Gets the texture matrix. This is will be removed soon and be managed by GrEffect.
*/
const GrMatrix& getMatrix() const { return fMatrix; }
@@ -117,7 +117,7 @@ public:
GrSafeSetNull(fCustomStage);
}
- GrCustomStage* setCustomStage(GrCustomStage* stage) {
+ GrEffect* setCustomStage(GrEffect* stage) {
GrAssert(0 == fSavedCoordChangeCnt);
GrSafeAssign(fCustomStage, stage);
fMatrix.reset();
@@ -125,7 +125,7 @@ public:
return stage;
}
- GrCustomStage* setCustomStage(GrCustomStage* stage, const GrMatrix& matrix) {
+ GrEffect* setCustomStage(GrEffect* stage, const GrMatrix& matrix) {
GrAssert(0 == fSavedCoordChangeCnt);
GrSafeAssign(fCustomStage, stage);
fMatrix = matrix;
@@ -133,12 +133,12 @@ public:
return stage;
}
- const GrCustomStage* getCustomStage() const { return fCustomStage; }
+ const GrEffect* getCustomStage() const { return fCustomStage; }
private:
GrMatrix fCoordChangeMatrix;
- GrMatrix fMatrix; // TODO: remove this, store in GrCustomStage
- GrCustomStage* fCustomStage;
+ GrMatrix fMatrix; // TODO: remove this, store in GrEffect
+ GrEffect* fCustomStage;
GR_DEBUGCODE(mutable int fSavedCoordChangeCnt;)
};
diff --git a/include/gpu/GrTextureAccess.h b/include/gpu/GrTextureAccess.h
index 0d0860f2fe..b03e6e6dc9 100644
--- a/include/gpu/GrTextureAccess.h
+++ b/include/gpu/GrTextureAccess.h
@@ -103,14 +103,14 @@ private:
/** A class representing the swizzle access pattern for a texture. Note that if the texture is
* an alpha-only texture then the alpha channel is substituted for other components. Any mangling
* to handle the r,g,b->a conversions for alpha textures is automatically included in the stage
- * key. However, if a GrCustomStage uses different swizzles based on its input then it must
+ * key. However, if a GrEffect uses different swizzles based on its input then it must
* consider that variation in its key-generation.
*/
class GrTextureAccess : GrNoncopyable {
public:
/**
- * A default GrTextureAccess must have reset() called on it in a GrCustomStage subclass's
- * constructor if it will be accessible via GrCustomStage::textureAccess().
+ * A default GrTextureAccess must have reset() called on it in a GrEffect subclass's
+ * constructor if it will be accessible via GrEffect::textureAccess().
*/
GrTextureAccess();