Rename GrTextureAccess to GrProcessor::TextureSampler.
Renames vars and methods that used the work "access" to refer to this type.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4931
Change-Id: Ibcf488fbd445c5119fc13d190544cd98981bdbee
Reviewed-on: https://skia-review.googlesource.com/4931
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/effects/GrBicubicEffect.cpp b/src/gpu/effects/GrBicubicEffect.cpp
index 737625f..17a492f 100644
--- a/src/gpu/effects/GrBicubicEffect.cpp
+++ b/src/gpu/effects/GrBicubicEffect.cpp
@@ -126,13 +126,13 @@
void GrGLBicubicEffect::onSetData(const GrGLSLProgramDataManager& pdman,
const GrProcessor& processor) {
const GrBicubicEffect& bicubicEffect = processor.cast<GrBicubicEffect>();
- const GrTexture& texture = *processor.texture(0);
+ GrTexture* texture = processor.textureSampler(0).getTexture();
float imageIncrement[2];
- imageIncrement[0] = 1.0f / texture.width();
- imageIncrement[1] = 1.0f / texture.height();
+ imageIncrement[0] = 1.0f / texture->width();
+ imageIncrement[1] = 1.0f / texture->height();
pdman.set2fv(fImageIncrementUni, 1, imageIncrement);
pdman.setMatrix4f(fCoefficientsUni, bicubicEffect.coefficients());
- fDomain.setData(pdman, bicubicEffect.domain(), texture.origin());
+ fDomain.setData(pdman, bicubicEffect.domain(), texture->origin());
if (SkToBool(bicubicEffect.colorSpaceXform())) {
pdman.setSkMatrix44(fColorSpaceXformUni, bicubicEffect.colorSpaceXform()->srcToDst());
}
diff --git a/src/gpu/effects/GrBitmapTextGeoProc.cpp b/src/gpu/effects/GrBitmapTextGeoProc.cpp
index 197ac73..889a085 100644
--- a/src/gpu/effects/GrBitmapTextGeoProc.cpp
+++ b/src/gpu/effects/GrBitmapTextGeoProc.cpp
@@ -30,8 +30,8 @@
varyingHandler->emitAttributes(cte);
// compute numbers to be hardcoded to convert texture coordinates from int to float
- SkASSERT(cte.numTextures() == 1);
- SkDEBUGCODE(GrTexture* atlas = cte.textureAccess(0).getTexture());
+ SkASSERT(cte.numTextureSamplers() == 1);
+ SkDEBUGCODE(GrTexture* atlas = cte.textureSampler(0).getTexture());
SkASSERT(atlas && SkIsPow2(atlas->width()) && SkIsPow2(atlas->height()));
GrGLSLVertToFrag v(kVec2f_GrSLType);
@@ -108,8 +108,8 @@
b->add32(key);
// Currently we hardcode numbers to convert atlas coordinates to normalized floating point
- SkASSERT(gp.numTextures() == 1);
- GrTexture* atlas = gp.textureAccess(0).getTexture();
+ SkASSERT(gp.numTextureSamplers() == 1);
+ GrTexture* atlas = gp.textureSampler(0).getTexture();
SkASSERT(atlas);
b->add32(atlas->width());
b->add32(atlas->height());
@@ -130,7 +130,7 @@
: fColor(color)
, fLocalMatrix(localMatrix)
, fUsesLocalCoords(usesLocalCoords)
- , fTextureAccess(texture, params)
+ , fTextureSampler(texture, params)
, fInColor(nullptr)
, fMaskFormat(format) {
this->initClassID<GrBitmapTextGeoProc>();
@@ -143,7 +143,7 @@
}
fInTextureCoords = &this->addVertexAttrib("inTextureCoords", kVec2us_GrVertexAttribType,
kHigh_GrSLPrecision);
- this->addTextureAccess(&fTextureAccess);
+ this->addTextureSampler(&fTextureSampler);
}
void GrBitmapTextGeoProc::getGLSLProcessorKey(const GrGLSLCaps& caps,
diff --git a/src/gpu/effects/GrBitmapTextGeoProc.h b/src/gpu/effects/GrBitmapTextGeoProc.h
index 226ae77..7e2df0a 100644
--- a/src/gpu/effects/GrBitmapTextGeoProc.h
+++ b/src/gpu/effects/GrBitmapTextGeoProc.h
@@ -53,7 +53,7 @@
GrColor fColor;
SkMatrix fLocalMatrix;
bool fUsesLocalCoords;
- GrTextureAccess fTextureAccess;
+ TextureSampler fTextureSampler;
const Attribute* fInPosition;
const Attribute* fInColor;
const Attribute* fInTextureCoords;
diff --git a/src/gpu/effects/GrConvolutionEffect.cpp b/src/gpu/effects/GrConvolutionEffect.cpp
index 59f7ab1..d8a79d0 100644
--- a/src/gpu/effects/GrConvolutionEffect.cpp
+++ b/src/gpu/effects/GrConvolutionEffect.cpp
@@ -98,7 +98,7 @@
void GrGLConvolutionEffect::onSetData(const GrGLSLProgramDataManager& pdman,
const GrProcessor& processor) {
const GrConvolutionEffect& conv = processor.cast<GrConvolutionEffect>();
- GrTexture& texture = *conv.texture(0);
+ GrTexture& texture = *conv.textureSampler(0).getTexture();
float imageIncrement[2] = { 0 };
float ySign = texture.origin() != kTopLeft_GrSurfaceOrigin ? 1.0f : -1.0f;
diff --git a/src/gpu/effects/GrCustomXfermode.cpp b/src/gpu/effects/GrCustomXfermode.cpp
index 8a54d44..8d5c500 100644
--- a/src/gpu/effects/GrCustomXfermode.cpp
+++ b/src/gpu/effects/GrCustomXfermode.cpp
@@ -14,7 +14,6 @@
#include "GrPipeline.h"
#include "GrProcessor.h"
#include "GrTexture.h"
-#include "GrTextureAccess.h"
#include "SkXfermode.h"
#include "glsl/GrGLSLBlend.h"
#include "glsl/GrGLSLCaps.h"
diff --git a/src/gpu/effects/GrDistanceFieldGeoProc.cpp b/src/gpu/effects/GrDistanceFieldGeoProc.cpp
index 7f9fd85..a99e2af 100644
--- a/src/gpu/effects/GrDistanceFieldGeoProc.cpp
+++ b/src/gpu/effects/GrDistanceFieldGeoProc.cpp
@@ -85,8 +85,8 @@
vertBuilder->codeAppendf("%s = %s;", uv.vsOut(), dfTexEffect.inTextureCoords()->fName);
// compute numbers to be hardcoded to convert texture coordinates from float to int
- SkASSERT(dfTexEffect.numTextures() == 1);
- GrTexture* atlas = dfTexEffect.textureAccess(0).getTexture();
+ SkASSERT(dfTexEffect.numTextureSamplers() == 1);
+ GrTexture* atlas = dfTexEffect.textureSampler(0).getTexture();
SkASSERT(atlas && SkIsPow2(atlas->width()) && SkIsPow2(atlas->height()));
GrGLSLVertToFrag st(kVec2f_GrSLType);
@@ -207,8 +207,8 @@
b->add32(key);
// Currently we hardcode numbers to convert atlas coordinates to normalized floating point
- SkASSERT(gp.numTextures() == 1);
- GrTexture* atlas = gp.textureAccess(0).getTexture();
+ SkASSERT(gp.numTextureSamplers() == 1);
+ GrTexture* atlas = gp.textureSampler(0).getTexture();
SkASSERT(atlas);
b->add32(atlas->width());
b->add32(atlas->height());
@@ -238,7 +238,7 @@
bool usesLocalCoords)
: fColor(color)
, fViewMatrix(viewMatrix)
- , fTextureAccess(texture, params)
+ , fTextureSampler(texture, params)
#ifdef SK_GAMMA_APPLY_TO_A8
, fDistanceAdjust(distanceAdjust)
#endif
@@ -252,7 +252,7 @@
fInColor = &this->addVertexAttrib("inColor", kVec4ub_GrVertexAttribType);
fInTextureCoords = &this->addVertexAttrib("inTextureCoords", kVec2us_GrVertexAttribType,
kHigh_GrSLPrecision);
- this->addTextureAccess(&fTextureAccess);
+ this->addTextureSampler(&fTextureSampler);
}
void GrDistanceFieldA8TextGeoProc::getGLSLProcessorKey(const GrGLSLCaps& caps,
@@ -433,7 +433,7 @@
FPCoordTransformIter&& transformIter) override {
SkASSERT(fTextureSizeUni.isValid());
- GrTexture* texture = proc.texture(0);
+ GrTexture* texture = proc.textureSampler(0).getTexture();
if (texture->width() != fTextureSize.width() ||
texture->height() != fTextureSize.height()) {
fTextureSize = SkISize::Make(texture->width(), texture->height());
@@ -484,7 +484,7 @@
bool usesLocalCoords)
: fColor(color)
, fViewMatrix(viewMatrix)
- , fTextureAccess(texture, params)
+ , fTextureSampler(texture, params)
, fFlags(flags & kNonLCD_DistanceFieldEffectMask)
, fInColor(nullptr)
, fUsesLocalCoords(usesLocalCoords) {
@@ -494,7 +494,7 @@
kHigh_GrSLPrecision);
fInColor = &this->addVertexAttrib("inColor", kVec4ub_GrVertexAttribType);
fInTextureCoords = &this->addVertexAttrib("inTextureCoords", kVec2f_GrVertexAttribType);
- this->addTextureAccess(&fTextureAccess);
+ this->addTextureSampler(&fTextureSampler);
}
void GrDistanceFieldPathGeoProc::getGLSLProcessorKey(const GrGLSLCaps& caps,
@@ -594,8 +594,8 @@
vertBuilder->codeAppendf("%s = %s;", uv.vsOut(), dfTexEffect.inTextureCoords()->fName);
// compute numbers to be hardcoded to convert texture coordinates from float to int
- SkASSERT(dfTexEffect.numTextures() == 1);
- GrTexture* atlas = dfTexEffect.textureAccess(0).getTexture();
+ SkASSERT(dfTexEffect.numTextureSamplers() == 1);
+ GrTexture* atlas = dfTexEffect.textureSampler(0).getTexture();
SkASSERT(atlas && SkIsPow2(atlas->width()) && SkIsPow2(atlas->height()));
GrGLSLVertToFrag st(kVec2f_GrSLType);
@@ -760,8 +760,8 @@
b->add32(key);
// Currently we hardcode numbers to convert atlas coordinates to normalized floating point
- SkASSERT(gp.numTextures() == 1);
- GrTexture* atlas = gp.textureAccess(0).getTexture();
+ SkASSERT(gp.numTextureSamplers() == 1);
+ GrTexture* atlas = gp.textureSampler(0).getTexture();
SkASSERT(atlas);
b->add32(atlas->width());
b->add32(atlas->height());
@@ -786,7 +786,7 @@
uint32_t flags, bool usesLocalCoords)
: fColor(color)
, fViewMatrix(viewMatrix)
- , fTextureAccess(texture, params)
+ , fTextureSampler(texture, params)
, fDistanceAdjust(distanceAdjust)
, fFlags(flags & kLCD_DistanceFieldEffectMask)
, fUsesLocalCoords(usesLocalCoords) {
@@ -797,7 +797,7 @@
fInColor = &this->addVertexAttrib("inColor", kVec4ub_GrVertexAttribType);
fInTextureCoords = &this->addVertexAttrib("inTextureCoords", kVec2us_GrVertexAttribType,
kHigh_GrSLPrecision);
- this->addTextureAccess(&fTextureAccess);
+ this->addTextureSampler(&fTextureSampler);
}
void GrDistanceFieldLCDTextGeoProc::getGLSLProcessorKey(const GrGLSLCaps& caps,
diff --git a/src/gpu/effects/GrDistanceFieldGeoProc.h b/src/gpu/effects/GrDistanceFieldGeoProc.h
index 339c063..68e0a24 100644
--- a/src/gpu/effects/GrDistanceFieldGeoProc.h
+++ b/src/gpu/effects/GrDistanceFieldGeoProc.h
@@ -96,7 +96,7 @@
GrColor fColor;
SkMatrix fViewMatrix;
- GrTextureAccess fTextureAccess;
+ TextureSampler fTextureSampler;
#ifdef SK_GAMMA_APPLY_TO_A8
float fDistanceAdjust;
#endif
@@ -151,7 +151,7 @@
GrColor fColor;
SkMatrix fViewMatrix;
- GrTextureAccess fTextureAccess;
+ TextureSampler fTextureSampler;
uint32_t fFlags;
const Attribute* fInPosition;
const Attribute* fInColor;
@@ -221,7 +221,7 @@
GrColor fColor;
SkMatrix fViewMatrix;
- GrTextureAccess fTextureAccess;
+ TextureSampler fTextureSampler;
DistanceAdjust fDistanceAdjust;
uint32_t fFlags;
const Attribute* fInPosition;
diff --git a/src/gpu/effects/GrMatrixConvolutionEffect.cpp b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
index 5617497..8c67882 100644
--- a/src/gpu/effects/GrMatrixConvolutionEffect.cpp
+++ b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
@@ -129,12 +129,12 @@
void GrGLMatrixConvolutionEffect::onSetData(const GrGLSLProgramDataManager& pdman,
const GrProcessor& processor) {
const GrMatrixConvolutionEffect& conv = processor.cast<GrMatrixConvolutionEffect>();
- GrTexture& texture = *conv.texture(0);
+ GrTexture* texture = conv.textureSampler(0).getTexture();
float imageIncrement[2];
- float ySign = texture.origin() == kTopLeft_GrSurfaceOrigin ? 1.0f : -1.0f;
- imageIncrement[0] = 1.0f / texture.width();
- imageIncrement[1] = ySign / texture.height();
+ float ySign = texture->origin() == kTopLeft_GrSurfaceOrigin ? 1.0f : -1.0f;
+ imageIncrement[0] = 1.0f / texture->width();
+ imageIncrement[1] = ySign / texture->height();
pdman.set2fv(fImageIncrementUni, 1, imageIncrement);
pdman.set2fv(fKernelOffsetUni, 1, conv.kernelOffset());
int kernelCount = conv.kernelSize().width() * conv.kernelSize().height();
@@ -143,7 +143,7 @@
pdman.set4fv(fKernelUni, arrayCount, conv.kernel());
pdman.set1f(fGainUni, conv.gain());
pdman.set1f(fBiasUni, conv.bias());
- fDomain.setData(pdman, conv.domain(), texture.origin());
+ fDomain.setData(pdman, conv.domain(), texture->origin());
}
GrMatrixConvolutionEffect::GrMatrixConvolutionEffect(GrTexture* texture,
diff --git a/src/gpu/effects/GrSingleTextureEffect.cpp b/src/gpu/effects/GrSingleTextureEffect.cpp
index 2683789..929275e 100644
--- a/src/gpu/effects/GrSingleTextureEffect.cpp
+++ b/src/gpu/effects/GrSingleTextureEffect.cpp
@@ -11,10 +11,10 @@
sk_sp<GrColorSpaceXform> colorSpaceXform,
const SkMatrix& m)
: fCoordTransform(m, texture, GrTextureParams::kNone_FilterMode)
- , fTextureAccess(texture)
+ , fTextureSampler(texture)
, fColorSpaceXform(std::move(colorSpaceXform)) {
this->addCoordTransform(&fCoordTransform);
- this->addTextureAccess(&fTextureAccess);
+ this->addTextureSampler(&fTextureSampler);
}
GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture,
@@ -22,10 +22,10 @@
const SkMatrix& m,
GrTextureParams::FilterMode filterMode)
: fCoordTransform(m, texture, filterMode)
- , fTextureAccess(texture, filterMode)
+ , fTextureSampler(texture, filterMode)
, fColorSpaceXform(std::move(colorSpaceXform)) {
this->addCoordTransform(&fCoordTransform);
- this->addTextureAccess(&fTextureAccess);
+ this->addTextureSampler(&fTextureSampler);
}
GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture,
@@ -33,10 +33,10 @@
const SkMatrix& m,
const GrTextureParams& params)
: fCoordTransform(m, texture, params.filterMode())
- , fTextureAccess(texture, params)
+ , fTextureSampler(texture, params)
, fColorSpaceXform(std::move(colorSpaceXform)) {
this->addCoordTransform(&fCoordTransform);
- this->addTextureAccess(&fTextureAccess);
+ this->addTextureSampler(&fTextureSampler);
}
GrSingleTextureEffect::~GrSingleTextureEffect() {
diff --git a/src/gpu/effects/GrSingleTextureEffect.h b/src/gpu/effects/GrSingleTextureEffect.h
index 12b3a8f..1d34944 100644
--- a/src/gpu/effects/GrSingleTextureEffect.h
+++ b/src/gpu/effects/GrSingleTextureEffect.h
@@ -26,7 +26,7 @@
SkString dumpInfo() const override {
SkString str;
- str.appendf("Texture: %d", fTextureAccess.getTexture()->uniqueID().asUInt());
+ str.appendf("Texture: %d", fTextureSampler.getTexture()->uniqueID().asUInt());
return str;
}
@@ -49,9 +49,10 @@
* texture.
*/
void updateInvariantOutputForModulation(GrInvariantOutput* inout) const {
- if (GrPixelConfigIsAlphaOnly(this->texture(0)->config())) {
+ GrPixelConfig config = this->textureSampler(0).getTexture()->config();
+ if (GrPixelConfigIsAlphaOnly(config)) {
inout->mulByUnknownSingleComponent();
- } else if (GrPixelConfigIsOpaque(this->texture(0)->config())) {
+ } else if (GrPixelConfigIsOpaque(config)) {
inout->mulByUnknownOpaqueFourComponents();
} else {
inout->mulByUnknownFourComponents();
@@ -60,7 +61,7 @@
private:
GrCoordTransform fCoordTransform;
- GrTextureAccess fTextureAccess;
+ TextureSampler fTextureSampler;
sk_sp<GrColorSpaceXform> fColorSpaceXform;
typedef GrFragmentProcessor INHERITED;
diff --git a/src/gpu/effects/GrTextureDomain.cpp b/src/gpu/effects/GrTextureDomain.cpp
index 55d69bf..4418730 100644
--- a/src/gpu/effects/GrTextureDomain.cpp
+++ b/src/gpu/effects/GrTextureDomain.cpp
@@ -229,7 +229,7 @@
void onSetData(const GrGLSLProgramDataManager& pdman, const GrProcessor& fp) override {
const GrTextureDomainEffect& tde = fp.cast<GrTextureDomainEffect>();
const GrTextureDomain& domain = tde.fTextureDomain;
- fGLDomain.setData(pdman, domain, tde.texture(0)->origin());
+ fGLDomain.setData(pdman, domain, tde.textureSampler(0).getTexture()->origin());
}
private:
@@ -242,14 +242,13 @@
bool GrTextureDomainEffect::onIsEqual(const GrFragmentProcessor& sBase) const {
const GrTextureDomainEffect& s = sBase.cast<GrTextureDomainEffect>();
- return this->fTextureDomain == s.fTextureDomain && s.texture(0) == this->texture(0) &&
- s.textureAccess(0).getParams().filterMode() ==
- this->textureAccess(0).getParams().filterMode();
+ return this->fTextureDomain == s.fTextureDomain &&
+ s.textureSampler(0) == this->textureSampler(0);
}
void GrTextureDomainEffect::onComputeInvariantOutput(GrInvariantOutput* inout) const {
if (GrTextureDomain::kDecal_Mode == fTextureDomain.mode()) {
- if (GrPixelConfigIsAlphaOnly(this->texture(0)->config())) {
+ if (GrPixelConfigIsAlphaOnly(this->textureSampler(0).getTexture()->config())) {
inout->mulByUnknownSingleComponent();
} else {
inout->mulByUnknownFourComponents();
@@ -295,10 +294,10 @@
GrDeviceSpaceTextureDecalFragmentProcessor::GrDeviceSpaceTextureDecalFragmentProcessor(
GrTexture* texture, const SkIRect& subset, const SkIPoint& deviceSpaceOffset)
- : fTextureAccess(texture, GrTextureParams::ClampNoFilter())
+ : fTextureSampler(texture, GrTextureParams::ClampNoFilter())
, fTextureDomain(GrTextureDomain::MakeTexelDomain(texture, subset),
GrTextureDomain::kDecal_Mode) {
- this->addTextureAccess(&fTextureAccess);
+ this->addTextureSampler(&fTextureSampler);
fDeviceSpaceOffset.fX = deviceSpaceOffset.fX - subset.fLeft;
fDeviceSpaceOffset.fY = deviceSpaceOffset.fY - subset.fTop;
this->initClassID<GrDeviceSpaceTextureDecalFragmentProcessor>();
@@ -334,14 +333,15 @@
void onSetData(const GrGLSLProgramDataManager& pdman, const GrProcessor& fp) override {
const GrDeviceSpaceTextureDecalFragmentProcessor& dstdfp =
fp.cast<GrDeviceSpaceTextureDecalFragmentProcessor>();
- fGLDomain.setData(pdman, dstdfp.fTextureDomain, dstdfp.texture(0)->origin());
- float iw = 1.f / dstdfp.texture(0)->width();
- float ih = 1.f / dstdfp.texture(0)->height();
+ GrTexture* texture = dstdfp.textureSampler(0).getTexture();
+ fGLDomain.setData(pdman, dstdfp.fTextureDomain, texture->origin());
+ float iw = 1.f / texture->width();
+ float ih = 1.f / texture->height();
float scaleAndTransData[4] = {
iw, ih,
-dstdfp.fDeviceSpaceOffset.fX * iw, -dstdfp.fDeviceSpaceOffset.fY * ih
};
- if (dstdfp.texture(0)->origin() == kBottomLeft_GrSurfaceOrigin) {
+ if (texture->origin() == kBottomLeft_GrSurfaceOrigin) {
scaleAndTransData[1] = -scaleAndTransData[1];
scaleAndTransData[3] = 1 - scaleAndTransData[3];
}
@@ -359,14 +359,14 @@
bool GrDeviceSpaceTextureDecalFragmentProcessor::onIsEqual(const GrFragmentProcessor& fp) const {
const GrDeviceSpaceTextureDecalFragmentProcessor& dstdfp =
fp.cast<GrDeviceSpaceTextureDecalFragmentProcessor>();
- return dstdfp.fTextureAccess.getTexture() == fTextureAccess.getTexture() &&
+ return dstdfp.fTextureSampler.getTexture() == fTextureSampler.getTexture() &&
dstdfp.fDeviceSpaceOffset == fDeviceSpaceOffset &&
dstdfp.fTextureDomain == fTextureDomain;
}
void GrDeviceSpaceTextureDecalFragmentProcessor::onComputeInvariantOutput(
GrInvariantOutput* inout) const {
- if (GrPixelConfigIsAlphaOnly(this->texture(0)->config())) {
+ if (GrPixelConfigIsAlphaOnly(this->textureSampler(0).getTexture()->config())) {
inout->mulByUnknownSingleComponent();
} else {
inout->mulByUnknownFourComponents();
diff --git a/src/gpu/effects/GrTextureDomain.h b/src/gpu/effects/GrTextureDomain.h
index 82ff73c..d557d17 100644
--- a/src/gpu/effects/GrTextureDomain.h
+++ b/src/gpu/effects/GrTextureDomain.h
@@ -225,7 +225,7 @@
}
private:
- GrTextureAccess fTextureAccess;
+ TextureSampler fTextureSampler;
GrTextureDomain fTextureDomain;
SkIPoint fDeviceSpaceOffset;
diff --git a/src/gpu/effects/GrYUVEffect.cpp b/src/gpu/effects/GrYUVEffect.cpp
index cbe25e8..2fd3513 100644
--- a/src/gpu/effects/GrYUVEffect.cpp
+++ b/src/gpu/effects/GrYUVEffect.cpp
@@ -155,21 +155,21 @@
const SkMatrix yuvMatrix[3], GrTextureParams::FilterMode uvFilterMode,
SkYUVColorSpace colorSpace, bool nv12)
: fYTransform(yuvMatrix[0], yTexture, GrTextureParams::kNone_FilterMode)
- , fYAccess(yTexture)
+ , fYSampler(yTexture)
, fUTransform(yuvMatrix[1], uTexture, uvFilterMode)
- , fUAccess(uTexture, uvFilterMode)
- , fVAccess(vTexture, uvFilterMode)
+ , fUSampler(uTexture, uvFilterMode)
+ , fVSampler(vTexture, uvFilterMode)
, fColorSpace(colorSpace)
, fNV12(nv12) {
this->initClassID<YUVtoRGBEffect>();
this->addCoordTransform(&fYTransform);
- this->addTextureAccess(&fYAccess);
+ this->addTextureSampler(&fYSampler);
this->addCoordTransform(&fUTransform);
- this->addTextureAccess(&fUAccess);
+ this->addTextureSampler(&fUSampler);
if (!fNV12) {
fVTransform = GrCoordTransform(yuvMatrix[2], vTexture, uvFilterMode);
this->addCoordTransform(&fVTransform);
- this->addTextureAccess(&fVAccess);
+ this->addTextureSampler(&fVSampler);
}
}
@@ -193,11 +193,11 @@
}
GrCoordTransform fYTransform;
- GrTextureAccess fYAccess;
+ TextureSampler fYSampler;
GrCoordTransform fUTransform;
- GrTextureAccess fUAccess;
+ TextureSampler fUSampler;
GrCoordTransform fVTransform;
- GrTextureAccess fVAccess;
+ TextureSampler fVSampler;
SkYUVColorSpace fColorSpace;
bool fNV12;
@@ -353,7 +353,7 @@
}
GrCoordTransform fTransform;
- GrTextureAccess fAccess;
+ TextureSampler fTextureSampler;
SkYUVColorSpace fColorSpace;
OutputChannels fOutputChannels;