1/*
2 * Copyright 2012 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#include "effects/GrSingleTextureEffect.h"
9
10GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture,
11                                             const SkMatrix& m,
12                                             CoordsType coordsType)
13    : fTextureAccess(texture)
14    , fMatrix(m)
15    , fCoordsType(coordsType) {
16    this->addTextureAccess(&fTextureAccess);
17}
18
19GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture,
20                                             const SkMatrix& m,
21                                             GrTextureParams::FilterMode filterMode,
22                                             CoordsType coordsType)
23    : fTextureAccess(texture, filterMode)
24    , fMatrix(m)
25    , fCoordsType(coordsType) {
26    this->addTextureAccess(&fTextureAccess);
27}
28
29GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture,
30                                             const SkMatrix& m,
31                                             const GrTextureParams& params,
32                                             CoordsType coordsType)
33    : fTextureAccess(texture, params)
34    , fMatrix(m)
35    , fCoordsType(coordsType) {
36    this->addTextureAccess(&fTextureAccess);
37}
38
39GrSingleTextureEffect::~GrSingleTextureEffect() {
40}
41