blob: 532ce04217bebda26dbc5384389b3fc7536340b3 [file] [log] [blame]
tomhudson@google.comd0c1a062012-07-12 17:23:52 +00001/*
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"
tomhudson@google.comaa72eab2012-07-19 18:01:07 +00009
bsalomon@google.comc7818882013-03-20 19:19:53 +000010GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture,
11 const SkMatrix& m,
12 CoordsType coordsType)
bsalomon@google.com50db75c2013-01-11 13:54:30 +000013 : fTextureAccess(texture)
bsalomon@google.comc7818882013-03-20 19:19:53 +000014 , fMatrix(m)
15 , fCoordsType(coordsType) {
bsalomon@google.comae81d5c2013-03-20 17:32:27 +000016 this->addTextureAccess(&fTextureAccess);
17}
18
19GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture,
20 const SkMatrix& m,
humper@google.comb86add12013-07-25 18:49:07 +000021 GrTextureParams::FilterMode filterMode,
bsalomon@google.comc7818882013-03-20 19:19:53 +000022 CoordsType coordsType)
humper@google.comb86add12013-07-25 18:49:07 +000023 : fTextureAccess(texture, filterMode)
bsalomon@google.comc7818882013-03-20 19:19:53 +000024 , 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)
bsalomon@google.com50db75c2013-01-11 13:54:30 +000033 : fTextureAccess(texture, params)
bsalomon@google.comc7818882013-03-20 19:19:53 +000034 , fMatrix(m)
35 , fCoordsType(coordsType) {
bsalomon@google.com50db75c2013-01-11 13:54:30 +000036 this->addTextureAccess(&fTextureAccess);
bsalomon@google.com1ce49fc2012-09-18 14:14:49 +000037}
38
tomhudson@google.comd0c1a062012-07-12 17:23:52 +000039GrSingleTextureEffect::~GrSingleTextureEffect() {
tomhudson@google.comd0c1a062012-07-12 17:23:52 +000040}