aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrDrawState.h
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2014-07-07 15:11:31 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-07-07 15:11:31 -0700
commit2011fe9cdfa63b83489a146cea6a724cede352c8 (patch)
tree200081e467bb69640fc811733b35d6559403b938 /src/gpu/GrDrawState.h
parent24dcac2140a7cca111c7f1bd44b44541644887a3 (diff)
Make GrDrawState and GrPaint take GrEffect* instead of GrEffectRef*.
Make Sk-effect virtuals produce GrEffect* rather than GrEffectRef* Make GrEffectRef a typedef for GrEffect. R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/377503004
Diffstat (limited to 'src/gpu/GrDrawState.h')
-rw-r--r--src/gpu/GrDrawState.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/gpu/GrDrawState.h b/src/gpu/GrDrawState.h
index d2c60ea072..de14763a05 100644
--- a/src/gpu/GrDrawState.h
+++ b/src/gpu/GrDrawState.h
@@ -340,13 +340,13 @@ public:
/// the color / coverage distinction.
////
- const GrEffectRef* addColorEffect(const GrEffectRef* effect, int attr0 = -1, int attr1 = -1) {
+ const GrEffect* addColorEffect(const GrEffect* effect, int attr0 = -1, int attr1 = -1) {
SkASSERT(NULL != effect);
SkNEW_APPEND_TO_TARRAY(&fColorStages, GrEffectStage, (effect, attr0, attr1));
return effect;
}
- const GrEffectRef* addCoverageEffect(const GrEffectRef* effect, int attr0 = -1, int attr1 = -1) {
+ const GrEffect* addCoverageEffect(const GrEffect* effect, int attr0 = -1, int attr1 = -1) {
SkASSERT(NULL != effect);
SkNEW_APPEND_TO_TARRAY(&fCoverageStages, GrEffectStage, (effect, attr0, attr1));
return effect;
@@ -356,27 +356,23 @@ public:
* Creates a GrSimpleTextureEffect that uses local coords as texture coordinates.
*/
void addColorTextureEffect(GrTexture* texture, const SkMatrix& matrix) {
- GrEffectRef* effect = GrSimpleTextureEffect::Create(texture, matrix);
- this->addColorEffect(effect)->unref();
+ this->addColorEffect(GrSimpleTextureEffect::Create(texture, matrix))->unref();
}
void addCoverageTextureEffect(GrTexture* texture, const SkMatrix& matrix) {
- GrEffectRef* effect = GrSimpleTextureEffect::Create(texture, matrix);
- this->addCoverageEffect(effect)->unref();
+ this->addCoverageEffect(GrSimpleTextureEffect::Create(texture, matrix))->unref();
}
void addColorTextureEffect(GrTexture* texture,
const SkMatrix& matrix,
const GrTextureParams& params) {
- GrEffectRef* effect = GrSimpleTextureEffect::Create(texture, matrix, params);
- this->addColorEffect(effect)->unref();
+ this->addColorEffect(GrSimpleTextureEffect::Create(texture, matrix, params))->unref();
}
void addCoverageTextureEffect(GrTexture* texture,
const SkMatrix& matrix,
const GrTextureParams& params) {
- GrEffectRef* effect = GrSimpleTextureEffect::Create(texture, matrix, params);
- this->addCoverageEffect(effect)->unref();
+ this->addCoverageEffect(GrSimpleTextureEffect::Create(texture, matrix, params))->unref();
}
/**