| commit-bot@chromium.org | 42dacab | 2013-07-13 17:24:24 +0000 | [diff] [blame^] | 1 | |
| 2 | /* |
| 3 | * Copyright 2013 Google Inc. |
| 4 | * |
| 5 | * Use of this source code is governed by a BSD-style license that can be |
| 6 | * found in the LICENSE file. |
| 7 | */ |
| 8 | |
| 9 | #include "GrPaint.h" |
| 10 | |
| 11 | #include "effects/GrSimpleTextureEffect.h" |
| 12 | |
| 13 | void GrPaint::addColorTextureEffect(GrTexture* texture, const SkMatrix& matrix) { |
| 14 | GrEffectRef* effect = GrSimpleTextureEffect::Create(texture, matrix); |
| 15 | this->addColorEffect(effect)->unref(); |
| 16 | } |
| 17 | |
| 18 | void GrPaint::addCoverageTextureEffect(GrTexture* texture, const SkMatrix& matrix) { |
| 19 | GrEffectRef* effect = GrSimpleTextureEffect::Create(texture, matrix); |
| 20 | this->addCoverageEffect(effect)->unref(); |
| 21 | } |
| 22 | |
| 23 | void GrPaint::addColorTextureEffect(GrTexture* texture, |
| 24 | const SkMatrix& matrix, |
| 25 | const GrTextureParams& params) { |
| 26 | GrEffectRef* effect = GrSimpleTextureEffect::Create(texture, matrix, params); |
| 27 | this->addColorEffect(effect)->unref(); |
| 28 | } |
| 29 | |
| 30 | void GrPaint::addCoverageTextureEffect(GrTexture* texture, |
| 31 | const SkMatrix& matrix, |
| 32 | const GrTextureParams& params) { |
| 33 | GrEffectRef* effect = GrSimpleTextureEffect::Create(texture, matrix, params); |
| 34 | this->addCoverageEffect(effect)->unref(); |
| 35 | } |
| 36 | |