blob: b05c3c36280cf800c8387056ee7e09ba2b02fb80 [file] [log] [blame]
commit-bot@chromium.org42dacab2013-07-13 17:24:24 +00001
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
13void GrPaint::addColorTextureEffect(GrTexture* texture, const SkMatrix& matrix) {
14 GrEffectRef* effect = GrSimpleTextureEffect::Create(texture, matrix);
15 this->addColorEffect(effect)->unref();
16}
17
18void GrPaint::addCoverageTextureEffect(GrTexture* texture, const SkMatrix& matrix) {
19 GrEffectRef* effect = GrSimpleTextureEffect::Create(texture, matrix);
20 this->addCoverageEffect(effect)->unref();
21}
22
23void 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
30void 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