blob: a373ebe4e1765ce3c3ae418b98104fea4e85f1bc [file] [log] [blame]
/*
* Copyright 2012 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "effects/GrSingleTextureEffect.h"
#include "GrTexture.h"
GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture)
: fTexture (texture) {
SkSafeRef(fTexture);
}
GrSingleTextureEffect::~GrSingleTextureEffect() {
SkSafeUnref(fTexture);
}
unsigned int GrSingleTextureEffect::numTextures() const {
return 1;
}
GrTexture* GrSingleTextureEffect::texture(unsigned int index) const {
GrAssert(0 == index);
return fTexture;
}