Rename onFilterImageGPU to filterImageGPU(), to match skia convention. No change in functionality.

(Note that this does mean that clients must override onFilterImage() to implement the raster path, but filterImageGPU() to implement the GPU path.)

Review URL: https://codereview.appspot.com/7058078

git-svn-id: http://skia.googlecode.com/svn/trunk@7123 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
senorblanco@chromium.org 2013-01-10 19:55:18 +00:00
parent 091f51b794
commit 171f5c76b9
10 changed files with 17 additions and 17 deletions

View File

@ -110,7 +110,7 @@ public:
* size, and return it to the caller. The default implementation returns
* NULL.
*/
virtual GrTexture* onFilterImageGPU(Proxy*, GrTexture* texture, const SkRect& rect);
virtual GrTexture* filterImageGPU(Proxy*, GrTexture* texture, const SkRect& rect);
/**
* Returns this image filter as a color filter if possible,

View File

@ -33,7 +33,7 @@ public:
SkIPoint* offset) SK_OVERRIDE;
#if SK_SUPPORT_GPU
virtual bool canFilterImageGPU() const SK_OVERRIDE { return true; }
virtual GrTexture* onFilterImageGPU(Proxy* proxy, GrTexture* src, const SkRect& rect) SK_OVERRIDE;
virtual GrTexture* filterImageGPU(Proxy* proxy, GrTexture* src, const SkRect& rect) SK_OVERRIDE;
#endif
protected:

View File

@ -25,7 +25,7 @@ protected:
SkBitmap* result, SkIPoint* offset) SK_OVERRIDE;
bool canFilterImageGPU() const SK_OVERRIDE { return true; }
virtual GrTexture* onFilterImageGPU(Proxy* proxy, GrTexture* src, const SkRect& rect) SK_OVERRIDE;
virtual GrTexture* filterImageGPU(Proxy* proxy, GrTexture* src, const SkRect& rect) SK_OVERRIDE;
private:
SkSize fSigma;

View File

@ -38,8 +38,8 @@ public:
virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&,
SkBitmap* result, SkIPoint* offset) SK_OVERRIDE;
#if SK_SUPPORT_GPU
virtual GrTexture* onFilterImageGPU(Proxy* proxy, GrTexture* src,
const SkRect& rect) SK_OVERRIDE;
virtual GrTexture* filterImageGPU(Proxy* proxy, GrTexture* src,
const SkRect& rect) SK_OVERRIDE;
#endif
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDilateImageFilter)
@ -59,8 +59,8 @@ public:
virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&,
SkBitmap* result, SkIPoint* offset) SK_OVERRIDE;
#if SK_SUPPORT_GPU
virtual GrTexture* onFilterImageGPU(Proxy* proxy, GrTexture* src,
const SkRect& rect) SK_OVERRIDE;
virtual GrTexture* filterImageGPU(Proxy* proxy, GrTexture* src,
const SkRect& rect) SK_OVERRIDE;
#endif
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkErodeImageFilter)

View File

@ -107,7 +107,7 @@ bool SkImageFilter::canFilterImageGPU() const {
return false;
}
GrTexture* SkImageFilter::onFilterImageGPU(Proxy* proxy, GrTexture* texture, const SkRect& rect) {
GrTexture* SkImageFilter::filterImageGPU(Proxy* proxy, GrTexture* texture, const SkRect& rect) {
return NULL;
}

View File

@ -172,8 +172,8 @@ static GrTexture* getInputResultAsTexture(SkImageFilter::Proxy* proxy,
if (!input) {
resultTex = src;
} else if (input->canFilterImageGPU()) {
// onFilterImageGPU() already refs the result, so just return it here.
return input->onFilterImageGPU(proxy, src, rect);
// filterImageGPU() already refs the result, so just return it here.
return input->filterImageGPU(proxy, src, rect);
} else {
SkBitmap srcBitmap, result;
srcBitmap.setConfig(SkBitmap::kARGB_8888_Config, src->width(), src->height());
@ -196,7 +196,7 @@ static GrTexture* getInputResultAsTexture(SkImageFilter::Proxy* proxy,
return resultTex;
}
GrTexture* SkBlendImageFilter::onFilterImageGPU(Proxy* proxy, GrTexture* src, const SkRect& rect) {
GrTexture* SkBlendImageFilter::filterImageGPU(Proxy* proxy, GrTexture* src, const SkRect& rect) {
SkAutoTUnref<GrTexture> background(getInputResultAsTexture(proxy, getBackgroundInput(), src, rect));
SkAutoTUnref<GrTexture> foreground(getInputResultAsTexture(proxy, getForegroundInput(), src, rect));
GrContext* context = src->getContext();

View File

@ -187,7 +187,7 @@ bool SkBlurImageFilter::onFilterImage(Proxy* proxy,
return true;
}
GrTexture* SkBlurImageFilter::onFilterImageGPU(Proxy* proxy, GrTexture* src, const SkRect& rect) {
GrTexture* SkBlurImageFilter::filterImageGPU(Proxy* proxy, GrTexture* src, const SkRect& rect) {
#if SK_SUPPORT_GPU
SkAutoTUnref<GrTexture> input(this->getInputResultAsTexture(proxy, src, rect));
return src->getContext()->gaussianBlur(input.get(), false, rect,

View File

@ -482,12 +482,12 @@ GrTexture* apply_morphology(GrTexture* srcTexture,
};
GrTexture* SkDilateImageFilter::onFilterImageGPU(Proxy* proxy, GrTexture* src, const SkRect& rect) {
GrTexture* SkDilateImageFilter::filterImageGPU(Proxy* proxy, GrTexture* src, const SkRect& rect) {
SkAutoTUnref<GrTexture> input(this->getInputResultAsTexture(proxy, src, rect));
return apply_morphology(input, rect, GrMorphologyEffect::kDilate_MorphologyType, radius());
}
GrTexture* SkErodeImageFilter::onFilterImageGPU(Proxy* proxy, GrTexture* src, const SkRect& rect) {
GrTexture* SkErodeImageFilter::filterImageGPU(Proxy* proxy, GrTexture* src, const SkRect& rect) {
SkAutoTUnref<GrTexture> input(this->getInputResultAsTexture(proxy, src, rect));
return apply_morphology(input, rect, GrMorphologyEffect::kErode_MorphologyType, radius());
}

View File

@ -46,8 +46,8 @@ GrTexture* SkSingleInputImageFilter::getInputResultAsTexture(Proxy* proxy,
if (!input) {
resultTex = src;
} else if (input->canFilterImageGPU()) {
// onFilterImageGPU() already refs the result, so just return it here.
return input->onFilterImageGPU(proxy, src, rect);
// filterImageGPU() already refs the result, so just return it here.
return input->filterImageGPU(proxy, src, rect);
} else {
SkBitmap srcBitmap, result;
srcBitmap.setConfig(SkBitmap::kARGB_8888_Config, src->width(), src->height());

View File

@ -1448,7 +1448,7 @@ static GrTexture* filter_texture(SkDevice* device, GrContext* context,
// Save the render target and set it to NULL, so we don't accidentally draw to it in the
// filter. Also set the clip wide open and the matrix to identity.
GrContext::AutoWideOpenIdentityDraw awo(context, NULL);
texture = filter->onFilterImageGPU(&proxy, texture, rect);
texture = filter->filterImageGPU(&proxy, texture, rect);
} else if (filter->asNewEffect(&effect, texture)) {
GrAutoScratchTexture dst(context, desc);
apply_effect(context, texture, dst.texture(), rect, effect);