Patch to create a distinct geometry processor. The vast majority of this patch
is just a rename. The meat is in GrGeometryProcessor, GrProcessor,
GrGL*Processor, GrProcessorStage, Gr*BackendProcessorFactory,
GrProcessUnitTestFactory, and the builders
BUG=skia:
R=bsalomon@google.com
Author: joshualitt@chromium.org
Review URL: https://codereview.chromium.org/582963002
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp
index e5be085..56c310d 100644
--- a/src/core/SkImageFilter.cpp
+++ b/src/core/SkImageFilter.cpp
@@ -227,7 +227,7 @@
}
bool SkImageFilter::canFilterImageGPU() const {
- return this->asNewEffect(NULL, NULL, SkMatrix::I(), SkIRect());
+ return this->asFragmentProcessor(NULL, NULL, SkMatrix::I(), SkIRect());
}
bool SkImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context& ctx,
@@ -263,16 +263,16 @@
am.setIdentity(context);
GrContext::AutoRenderTarget art(context, dst.texture()->asRenderTarget());
GrContext::AutoClip acs(context, dstRect);
- GrEffect* effect;
+ GrFragmentProcessor* fp;
offset->fX = bounds.left();
offset->fY = bounds.top();
bounds.offset(-srcOffset);
SkMatrix matrix(ctx.ctm());
matrix.postTranslate(SkIntToScalar(-bounds.left()), SkIntToScalar(-bounds.top()));
- this->asNewEffect(&effect, srcTexture, matrix, bounds);
- SkASSERT(effect);
+ this->asFragmentProcessor(&fp, srcTexture, matrix, bounds);
+ SkASSERT(fp);
GrPaint paint;
- paint.addColorEffect(effect)->unref();
+ paint.addColorProcessor(fp)->unref();
context->drawRectToRect(paint, dstRect, srcRect);
SkAutoTUnref<GrTexture> resultTex(dst.detach());
@@ -365,7 +365,8 @@
return true;
}
-bool SkImageFilter::asNewEffect(GrEffect**, GrTexture*, const SkMatrix&, const SkIRect&) const {
+bool SkImageFilter::asFragmentProcessor(GrFragmentProcessor**, GrTexture*, const SkMatrix&,
+ const SkIRect&) const {
return false;
}