Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Unified Diff: src/gpu/GrDrawState.h

Issue 377503004: Make GrDrawState and GrPaint take GrEffect* instead of GrEffectRef*. (Closed) Base URL: https://skia.googlesource.com/skia.git@no_ref
Patch Set: Update YUV effect to reflect these changes. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/effects/gradients/SkTwoPointRadialGradient.cpp ('k') | src/gpu/GrEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawState.h
diff --git a/src/gpu/GrDrawState.h b/src/gpu/GrDrawState.h
index d2c60ea0724b1a57bddd30eacb02ceaa71b5df73..de14763a0508fd71ca17c8587aca41b7b0618549 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();
}
/**
« no previous file with comments | « src/effects/gradients/SkTwoPointRadialGradient.cpp ('k') | src/gpu/GrEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698