#include "effects/GrSimpleTextureEffect.h"
void GrPaint::addColorTextureEffect(GrTexture* texture, const SkMatrix& matrix) {
- GrEffectRef* effect = GrSimpleTextureEffect::Create(texture, matrix);
- this->addColorEffect(effect)->unref();
+ this->addColorEffect(GrSimpleTextureEffect::Create(texture, matrix))->unref();
}
void GrPaint::addCoverageTextureEffect(GrTexture* texture, const SkMatrix& matrix) {
- GrEffectRef* effect = GrSimpleTextureEffect::Create(texture, matrix);
- this->addCoverageEffect(effect)->unref();
+ this->addCoverageEffect(GrSimpleTextureEffect::Create(texture, matrix))->unref();
}
void GrPaint::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 GrPaint::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();
}
bool GrPaint::isOpaque() const {
uint32_t coverageComps = kRGBA_GrColorComponentFlags;
int count = fCoverageStages.count();
for (int i = 0; i < count; ++i) {
- (*fCoverageStages[i].getEffect())->getConstantColorComponents(&coverage, &coverageComps);
+ fCoverageStages[i].getEffect()->getConstantColorComponents(&coverage, &coverageComps);
}
if (kRGBA_GrColorComponentFlags != coverageComps || 0xffffffff != coverage) {
return false;
uint32_t colorComps = kRGBA_GrColorComponentFlags;
count = fColorStages.count();
for (int i = 0; i < count; ++i) {
- (*fColorStages[i].getEffect())->getConstantColorComponents(&color, &colorComps);
+ fColorStages[i].getEffect()->getConstantColorComponents(&color, &colorComps);
}
SkASSERT((NULL == solidColor) == (NULL == solidColorKnownComponents));
case kDA_GrBlendCoeff:
case kIDA_GrBlendCoeff:
default:
- GrCrash("srcCoeff should not refer to src or dst.");
+ SkFAIL("srcCoeff should not refer to src or dst.");
break;
// TODO: update this once GrPaint actually has a const color.