aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-10-24 20:11:30 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-10-24 20:11:30 +0000
commit8ea78d83dc4e8243c16eedf8100a3987c54123fa (patch)
tree9ba446bd394cbd266cc01c099ee8725603069d6d /src/gpu
parentf271cc7183fe48ac64d2d9a454eb013c91b42d53 (diff)
GrCustomStage Renaming Part 4
Rename a bunch of things found by searching for "custom". Review URL: https://codereview.appspot.com/6765048 git-svn-id: http://skia.googlecode.com/svn/trunk@6085 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/GrEffect.cpp6
-rw-r--r--src/gpu/SkGpuDevice.cpp10
-rw-r--r--src/gpu/gl/GrGLProgramStage.h8
-rw-r--r--src/gpu/gl/GrGLShaderBuilder.cpp4
-rw-r--r--src/gpu/gl/GrGLUniformManager.cpp2
5 files changed, 15 insertions, 15 deletions
diff --git a/src/gpu/GrEffect.cpp b/src/gpu/GrEffect.cpp
index 7997fb05e0..352d43cb11 100644
--- a/src/gpu/GrEffect.cpp
+++ b/src/gpu/GrEffect.cpp
@@ -19,7 +19,7 @@ SkTArray<GrEffectTestFactory*, true>* GrEffectTestFactory::GetFactories() {
}
#endif
-class GrCustomStage_Globals {
+class GrEffect_Globals {
public:
static GrMemoryPool* GetTLS() {
return (GrMemoryPool*)SkTLS::Get(CreateTLS, DeleteTLS);
@@ -69,9 +69,9 @@ const GrTextureAccess& GrEffect::textureAccess(int index) const {
}
void * GrEffect::operator new(size_t size) {
- return GrCustomStage_Globals::GetTLS()->allocate(size);
+ return GrEffect_Globals::GetTLS()->allocate(size);
}
void GrEffect::operator delete(void* target) {
- GrCustomStage_Globals::GetTLS()->release(target);
+ GrEffect_Globals::GetTLS()->release(target);
}
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index eae8ce867c..5cdecdb553 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -512,11 +512,11 @@ inline bool skPaint2GrPaintNoShader(SkGpuDevice* dev,
SkColor filtered = colorFilter->filterColor(skPaint.getColor());
grPaint->setColor(SkColor2GrColor(filtered));
} else {
- SkAutoTUnref<GrEffect> stage(colorFilter->asNewCustomStage(dev->context()));
+ SkAutoTUnref<GrEffect> stage(colorFilter->asNewEffect(dev->context()));
if (NULL != stage.get()) {
grPaint->colorSampler(kColorFilterTextureIdx)->setEffect(stage);
} else {
- // TODO: rewrite this using asNewCustomStage()
+ // TODO: rewrite this using asNewEffect()
SkColor color;
SkXfermode::Mode filterMode;
if (colorFilter->asColorMode(&color, &filterMode)) {
@@ -552,7 +552,7 @@ inline bool skPaint2GrPaintShader(SkGpuDevice* dev,
}
GrSamplerState* sampler = grPaint->colorSampler(kShaderTextureIdx);
- if (shader->asNewCustomStage(dev->context(), sampler)) {
+ if (shader->asNewEffect(dev->context(), sampler)) {
return true;
}
@@ -1482,7 +1482,7 @@ static GrTexture* filter_texture(SkDevice* device, GrContext* context,
// filter. Also set the clip wide open and the matrix to identity.
GrContext::AutoWideOpenIdentityDraw awo(context, NULL);
texture = filter->onFilterImageGPU(&proxy, texture, rect);
- } else if (filter->asNewCustomStage(&stage, texture)) {
+ } else if (filter->asNewEffect(&stage, texture)) {
GrAutoScratchTexture dst(context, desc);
apply_effect(context, texture, dst.texture(), rect, stage);
texture = dst.detach();
@@ -1624,7 +1624,7 @@ void SkGpuDevice::drawDevice(const SkDraw& draw, SkDevice* device,
}
bool SkGpuDevice::canHandleImageFilter(SkImageFilter* filter) {
- if (!filter->asNewCustomStage(NULL, NULL) &&
+ if (!filter->asNewEffect(NULL, NULL) &&
!filter->canFilterImageGPU()) {
return false;
}
diff --git a/src/gpu/gl/GrGLProgramStage.h b/src/gpu/gl/GrGLProgramStage.h
index 37d0b039a7..300e6f1af6 100644
--- a/src/gpu/gl/GrGLProgramStage.h
+++ b/src/gpu/gl/GrGLProgramStage.h
@@ -5,8 +5,8 @@
* found in the LICENSE file.
*/
-#ifndef GrGLCustomStage_DEFINED
-#define GrGLCustomStage_DEFINED
+#ifndef GrGLProgramStage_DEFINED
+#define GrGLProgramStage_DEFINED
#include "GrAllocator.h"
#include "GrEffect.h"
@@ -24,8 +24,8 @@ class GrGLTexture;
GLSL code that implements a GrEffect and for uploading uniforms at draw time. They also
must have a function:
static inline StageKey GenKey(const GrEffect&, const GrGLCaps&)
- that is used to implement a program cache. When two GrCustomEffects produce the same key this
- means that their GrGLProgramStages would emit the same GLSL code.
+ that is used to implement a program cache. When two GrEffects produce the same key this means
+ that their GrGLProgramStages would emit the same GLSL code.
These objects are created by the factory object returned by the GrEffect::getFactory().
*/
diff --git a/src/gpu/gl/GrGLShaderBuilder.cpp b/src/gpu/gl/GrGLShaderBuilder.cpp
index 217b874769..394b42fa09 100644
--- a/src/gpu/gl/GrGLShaderBuilder.cpp
+++ b/src/gpu/gl/GrGLShaderBuilder.cpp
@@ -100,8 +100,8 @@ GrGLShaderBuilder::GrGLShaderBuilder(const GrGLContextInfo& ctx, GrGLUniformMana
void GrGLShaderBuilder::setupTextureAccess(const char* varyingFSName, GrSLType varyingType) {
// FIXME: We don't know how the effect will manipulate the coords. So we give up on using
- // projective texturing and always give the stage 2D coords. This will be fixed when custom
- // stages are responsible for setting up their own tex coords / tex matrices.
+ // projective texturing and always give the stage 2D coords. This will be fixed when effects
+ // are responsible for setting up their own tex coords / tex matrices.
switch (varyingType) {
case kVec2f_GrSLType:
fDefaultTexCoordsName = varyingFSName;
diff --git a/src/gpu/gl/GrGLUniformManager.cpp b/src/gpu/gl/GrGLUniformManager.cpp
index 06ce2db6ed..684ef8c37e 100644
--- a/src/gpu/gl/GrGLUniformManager.cpp
+++ b/src/gpu/gl/GrGLUniformManager.cpp
@@ -170,7 +170,7 @@ void GrGLUniformManager::setMatrix3f(UniformHandle u, const GrGLfloat matrix[])
const Uniform& uni = fUniforms[handle_to_index(u)];
GrAssert(uni.fType == kMat33f_GrSLType);
GrAssert(GrGLShaderVar::kNonArray == uni.fArrayCount);
- // TODO: Re-enable this assert once texture matrices aren't forced on all custom effects
+ // TODO: Re-enable this assert once texture matrices aren't forced on all effects
// GrAssert(kUnusedUniform != uni.fFSLocation || kUnusedUniform != uni.fVSLocation);
if (kUnusedUniform != uni.fFSLocation) {
GR_GL_CALL(fContext.interface(), UniformMatrix3fv(uni.fFSLocation, 1, false, matrix));