gfx/skia/trunk/src/gpu/effects/GrSingleTextureEffect.cpp

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/skia/trunk/src/gpu/effects/GrSingleTextureEffect.cpp	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,40 @@
     1.4 +/*
     1.5 + * Copyright 2012 Google Inc.
     1.6 + *
     1.7 + * Use of this source code is governed by a BSD-style license that can be
     1.8 + * found in the LICENSE file.
     1.9 + */
    1.10 +
    1.11 +#include "effects/GrSingleTextureEffect.h"
    1.12 +
    1.13 +GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture,
    1.14 +                                             const SkMatrix& m,
    1.15 +                                             GrCoordSet coordSet)
    1.16 +    : fCoordTransform(coordSet, m, texture)
    1.17 +    , fTextureAccess(texture) {
    1.18 +    this->addCoordTransform(&fCoordTransform);
    1.19 +    this->addTextureAccess(&fTextureAccess);
    1.20 +}
    1.21 +
    1.22 +GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture,
    1.23 +                                             const SkMatrix& m,
    1.24 +                                             GrTextureParams::FilterMode filterMode,
    1.25 +                                             GrCoordSet coordSet)
    1.26 +    : fCoordTransform(coordSet, m, texture)
    1.27 +    , fTextureAccess(texture, filterMode) {
    1.28 +    this->addCoordTransform(&fCoordTransform);
    1.29 +    this->addTextureAccess(&fTextureAccess);
    1.30 +}
    1.31 +
    1.32 +GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture,
    1.33 +                                             const SkMatrix& m,
    1.34 +                                             const GrTextureParams& params,
    1.35 +                                             GrCoordSet coordSet)
    1.36 +    : fCoordTransform(coordSet, m, texture)
    1.37 +    , fTextureAccess(texture, params) {
    1.38 +    this->addCoordTransform(&fCoordTransform);
    1.39 +    this->addTextureAccess(&fTextureAccess);
    1.40 +}
    1.41 +
    1.42 +GrSingleTextureEffect::~GrSingleTextureEffect() {
    1.43 +}

mercurial