Remove GrContext from SkXfermode::[Aa]sNewEffectOrCoeff() and all subclasses,

since it's unused.

R=bsalomon@google.com

Review URL: https://codereview.chromium.org/31853003

git-svn-id: http://skia.googlecode.com/svn/trunk@11913 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
senorblanco@chromium.org 2013-10-23 14:03:22 +00:00
parent a34995e18b
commit fbcd415aa0
7 changed files with 10 additions and 16 deletions

View File

@ -14,6 +14,7 @@
#include "SkMask.h"
#include "SkPaint.h"
class GrContext;
class SkBitmap;
class SkBlitter;
class SkBounder;

View File

@ -13,7 +13,6 @@
#include "SkFlattenable.h"
#include "SkColor.h"
class GrContext;
class GrEffectRef;
class GrTexture;
class SkString;
@ -204,8 +203,7 @@ public:
access to destination color (setWillReadDstColor()), and use that in the fragment shader
(builder->dstColor()).
*/
virtual bool asNewEffectOrCoeff(GrContext*,
GrEffectRef** effect,
virtual bool asNewEffectOrCoeff(GrEffectRef** effect,
Coeff* src,
Coeff* dst,
GrTexture* background = NULL) const;
@ -215,7 +213,6 @@ public:
* is NULL, and if so, treats it as kSrcOver_Mode.
*/
static bool AsNewEffectOrCoeff(SkXfermode*,
GrContext*,
GrEffectRef** effect,
Coeff* src,
Coeff* dst,

View File

@ -673,12 +673,11 @@ bool SkXfermode::asMode(Mode* mode) const {
return false;
}
bool SkXfermode::asNewEffectOrCoeff(GrContext*, GrEffectRef**, Coeff* src, Coeff* dst, GrTexture*) const {
bool SkXfermode::asNewEffectOrCoeff(GrEffectRef**, Coeff* src, Coeff* dst, GrTexture*) const {
return this->asCoeff(src, dst);
}
bool SkXfermode::AsNewEffectOrCoeff(SkXfermode* xfermode,
GrContext* context,
GrEffectRef** effect,
Coeff* src,
Coeff* dst,
@ -686,7 +685,7 @@ bool SkXfermode::AsNewEffectOrCoeff(SkXfermode* xfermode,
if (NULL == xfermode) {
return ModeAsCoeff(kSrcOver_Mode, src, dst);
} else {
return xfermode->asNewEffectOrCoeff(context, effect, src, dst, background);
return xfermode->asNewEffectOrCoeff(effect, src, dst, background);
}
}
@ -1364,8 +1363,7 @@ bool SkProcCoeffXfermode::asCoeff(Coeff* sc, Coeff* dc) const {
}
#if SK_SUPPORT_GPU
bool SkProcCoeffXfermode::asNewEffectOrCoeff(GrContext*,
GrEffectRef** effect,
bool SkProcCoeffXfermode::asNewEffectOrCoeff(GrEffectRef** effect,
Coeff* src,
Coeff* dst,
GrTexture* background) const {

View File

@ -29,8 +29,7 @@ public:
virtual bool asCoeff(Coeff* sc, Coeff* dc) const SK_OVERRIDE;
#if SK_SUPPORT_GPU
virtual bool asNewEffectOrCoeff(GrContext*,
GrEffectRef** effect,
virtual bool asNewEffectOrCoeff(GrEffectRef** effect,
Coeff* src,
Coeff* dst,
GrTexture* background) const SK_OVERRIDE;

View File

@ -36,7 +36,7 @@ public:
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkArithmeticMode_scalar)
#if SK_SUPPORT_GPU
virtual bool asNewEffectOrCoeff(GrContext*, GrEffectRef** effect, Coeff*, Coeff*, GrTexture* background) const SK_OVERRIDE;
virtual bool asNewEffectOrCoeff(GrEffectRef** effect, Coeff*, Coeff*, GrTexture* background) const SK_OVERRIDE;
#endif
private:
@ -408,8 +408,7 @@ GrEffectRef* GrArithmeticEffect::TestCreate(SkRandom* rand,
GR_DEFINE_EFFECT_TEST(GrArithmeticEffect);
bool SkArithmeticMode_scalar::asNewEffectOrCoeff(GrContext*,
GrEffectRef** effect,
bool SkArithmeticMode_scalar::asNewEffectOrCoeff(GrEffectRef** effect,
Coeff*,
Coeff*,
GrTexture* background) const {

View File

@ -123,7 +123,7 @@ bool SkXfermodeImageFilter::filterImageGPU(Proxy* proxy,
GrContext::AutoRenderTarget art(context, dst->asRenderTarget());
SkXfermode::Coeff sm, dm;
if (!SkXfermode::AsNewEffectOrCoeff(fMode, context, &xferEffect, &sm, &dm, backgroundTex)) {
if (!SkXfermode::AsNewEffectOrCoeff(fMode, &xferEffect, &sm, &dm, backgroundTex)) {
return false;
}

View File

@ -436,7 +436,7 @@ inline bool skPaint2GrPaintNoShader(SkGpuDevice* dev,
SkXfermode* mode = skPaint.getXfermode();
GrEffectRef* xferEffect = NULL;
if (SkXfermode::AsNewEffectOrCoeff(mode, dev->context(), &xferEffect, &sm, &dm)) {
if (SkXfermode::AsNewEffectOrCoeff(mode, &xferEffect, &sm, &dm)) {
if (NULL != xferEffect) {
grPaint->addColorEffect(xferEffect)->unref();
sm = SkXfermode::kOne_Coeff;