Lift TextureSampler's proxy to SurfaceProxy
Now that the UniformHandlers can accept SurfaceProxies directly, there's
no need to have the restricted type on TextureSampler anymore. This will
make them one step closer to compatibility with GrSurfaceProxyView.
While making these changes, several effects performed their own source
coord normalization by peeking the texture. I updated these to just
use the proxy's backing store dimensions.
Bug: skia:9556
Change-Id: I97183e8453b7a3db86cd90d614c8c959b3707abb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255978
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/effects/GrAlphaThresholdFragmentProcessor.fp b/src/gpu/effects/GrAlphaThresholdFragmentProcessor.fp
index cab332b..d9d1933 100644
--- a/src/gpu/effects/GrAlphaThresholdFragmentProcessor.fp
+++ b/src/gpu/effects/GrAlphaThresholdFragmentProcessor.fp
@@ -18,7 +18,7 @@
}
@make {
- static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> mask,
+ static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrSurfaceProxy> mask,
float innerThreshold,
float outerThreshold,
const SkIRect& bounds) {
diff --git a/src/gpu/effects/GrBicubicEffect.cpp b/src/gpu/effects/GrBicubicEffect.cpp
index d78cb74..973ef45 100644
--- a/src/gpu/effects/GrBicubicEffect.cpp
+++ b/src/gpu/effects/GrBicubicEffect.cpp
@@ -145,24 +145,24 @@
void GrGLBicubicEffect::onSetData(const GrGLSLProgramDataManager& pdman,
const GrFragmentProcessor& processor) {
const GrBicubicEffect& bicubicEffect = processor.cast<GrBicubicEffect>();
- GrTextureProxy* proxy = processor.textureSampler(0).proxy();
- GrTexture* texture = proxy->peekTexture();
+ GrSurfaceProxy* proxy = processor.textureSampler(0).proxy();
+ SkISize textureDims = proxy->backingStoreDimensions();
float dims[4] = {0, 0, 0, 0};
if (bicubicEffect.direction() != GrBicubicEffect::Direction::kY) {
- dims[0] = 1.0f / texture->width();
- dims[2] = texture->width();
+ dims[0] = 1.0f / textureDims.width();
+ dims[2] = textureDims.width();
}
if (bicubicEffect.direction() != GrBicubicEffect::Direction::kX) {
- dims[1] = 1.0f / texture->height();
- dims[3] = texture->height();
+ dims[1] = 1.0f / textureDims.height();
+ dims[3] = textureDims.height();
}
pdman.set4fv(fDimensions, 1, dims);
fDomain.setData(pdman, bicubicEffect.domain(), proxy,
processor.textureSampler(0).samplerState());
}
-GrBicubicEffect::GrBicubicEffect(sk_sp<GrTextureProxy> proxy, const SkMatrix& matrix,
+GrBicubicEffect::GrBicubicEffect(sk_sp<GrSurfaceProxy> proxy, const SkMatrix& matrix,
const SkRect& domain, const GrSamplerState::WrapMode wrapModes[2],
GrTextureDomain::Mode modeX, GrTextureDomain::Mode modeY,
Direction direction, SkAlphaType alphaType)
diff --git a/src/gpu/effects/GrBicubicEffect.h b/src/gpu/effects/GrBicubicEffect.h
index 71e8fcf..319f1d9 100644
--- a/src/gpu/effects/GrBicubicEffect.h
+++ b/src/gpu/effects/GrBicubicEffect.h
@@ -44,7 +44,7 @@
/**
* Create a Mitchell filter effect with specified texture matrix with clamp wrap mode.
*/
- static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
+ static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrSurfaceProxy> proxy,
const SkMatrix& matrix,
Direction direction,
SkAlphaType alphaType) {
@@ -57,7 +57,7 @@
/**
* Create a Mitchell filter effect with specified texture matrix and x/y tile modes.
*/
- static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
+ static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrSurfaceProxy> proxy,
const SkMatrix& matrix,
const GrSamplerState::WrapMode wrapModes[2],
Direction direction,
@@ -73,7 +73,7 @@
* supports providing modes for the texture domain explicitly, in the event that it should
* override the behavior of the sampler's tile mode (e.g. clamp to border unsupported).
*/
- static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
+ static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrSurfaceProxy> proxy,
const SkMatrix& matrix,
const GrSamplerState::WrapMode wrapModes[2],
GrTextureDomain::Mode modeX,
@@ -96,7 +96,7 @@
/**
* Create a Mitchell filter effect with a texture matrix and a domain.
*/
- static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
+ static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrSurfaceProxy> proxy,
const SkMatrix& matrix,
const SkRect& domain,
Direction direction,
@@ -118,7 +118,7 @@
GrSamplerState::Filter* filterMode);
private:
- GrBicubicEffect(sk_sp<GrTextureProxy>, const SkMatrix& matrix, const SkRect& domain,
+ GrBicubicEffect(sk_sp<GrSurfaceProxy>, const SkMatrix& matrix, const SkRect& domain,
const GrSamplerState::WrapMode wrapModes[2], GrTextureDomain::Mode modeX,
GrTextureDomain::Mode modeY, Direction direction, SkAlphaType);
explicit GrBicubicEffect(const GrBicubicEffect&);
diff --git a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
index dd6e7c5..231c1b6 100644
--- a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
+++ b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
@@ -211,7 +211,7 @@
}
GrGaussianConvolutionFragmentProcessor::GrGaussianConvolutionFragmentProcessor(
- sk_sp<GrTextureProxy> proxy,
+ sk_sp<GrSurfaceProxy> proxy,
SkAlphaType alphaType,
Direction direction,
int radius,
diff --git a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h
index b329b1d..205b981 100644
--- a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h
+++ b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h
@@ -22,7 +22,7 @@
enum class Direction { kX, kY };
/// Convolve with a Gaussian kernel
- static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
+ static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrSurfaceProxy> proxy,
SkAlphaType alphaType,
Direction dir,
int halfWidth,
@@ -72,7 +72,7 @@
private:
/// Convolve with a Gaussian kernel
- GrGaussianConvolutionFragmentProcessor(sk_sp<GrTextureProxy>, SkAlphaType alphaType, Direction,
+ GrGaussianConvolutionFragmentProcessor(sk_sp<GrSurfaceProxy>, SkAlphaType alphaType, Direction,
int halfWidth, float gaussianSigma,
GrTextureDomain::Mode mode, int bounds[2]);
diff --git a/src/gpu/effects/GrMatrixConvolutionEffect.cpp b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
index 86df7a0..1f70a53 100644
--- a/src/gpu/effects/GrMatrixConvolutionEffect.cpp
+++ b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
@@ -125,13 +125,13 @@
void GrGLMatrixConvolutionEffect::onSetData(const GrGLSLProgramDataManager& pdman,
const GrFragmentProcessor& processor) {
const GrMatrixConvolutionEffect& conv = processor.cast<GrMatrixConvolutionEffect>();
- GrTextureProxy* proxy = conv.textureSampler(0).proxy();
- GrTexture* texture = proxy->peekTexture();
+ GrSurfaceProxy* proxy = conv.textureSampler(0).proxy();
+ SkISize textureDims = proxy->backingStoreDimensions();
float imageIncrement[2];
float ySign = proxy->origin() == kTopLeft_GrSurfaceOrigin ? 1.0f : -1.0f;
- imageIncrement[0] = 1.0f / texture->width();
- imageIncrement[1] = ySign / texture->height();
+ imageIncrement[0] = 1.0f / textureDims.width();
+ imageIncrement[1] = ySign / textureDims.height();
pdman.set2fv(fImageIncrementUni, 1, imageIncrement);
pdman.set2fv(fKernelOffsetUni, 1, conv.kernelOffset());
int kernelCount = conv.kernelSize().width() * conv.kernelSize().height();
@@ -143,7 +143,7 @@
fDomain.setData(pdman, conv.domain(), proxy, conv.textureSampler(0).samplerState());
}
-GrMatrixConvolutionEffect::GrMatrixConvolutionEffect(sk_sp<GrTextureProxy> srcProxy,
+GrMatrixConvolutionEffect::GrMatrixConvolutionEffect(sk_sp<GrSurfaceProxy> srcProxy,
const SkIRect& srcBounds,
const SkISize& kernelSize,
const SkScalar* kernel,
diff --git a/src/gpu/effects/GrMatrixConvolutionEffect.h b/src/gpu/effects/GrMatrixConvolutionEffect.h
index 212d5c0..ac36de2 100644
--- a/src/gpu/effects/GrMatrixConvolutionEffect.h
+++ b/src/gpu/effects/GrMatrixConvolutionEffect.h
@@ -16,7 +16,7 @@
class GrMatrixConvolutionEffect : public GrFragmentProcessor {
public:
- static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> srcProxy,
+ static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrSurfaceProxy> srcProxy,
const SkIRect& srcBounds,
const SkISize& kernelSize,
const SkScalar* kernel,
@@ -57,7 +57,7 @@
private:
// srcProxy is the texture that is going to be convolved
// srcBounds is the subset of 'srcProxy' that will be used (e.g., for clamp mode)
- GrMatrixConvolutionEffect(sk_sp<GrTextureProxy> srcProxy,
+ GrMatrixConvolutionEffect(sk_sp<GrSurfaceProxy> srcProxy,
const SkIRect& srcBounds,
const SkISize& kernelSize,
const SkScalar* kernel,
diff --git a/src/gpu/effects/GrSimpleTextureEffect.fp b/src/gpu/effects/GrSimpleTextureEffect.fp
index c86af4b..cf4dd31 100644
--- a/src/gpu/effects/GrSimpleTextureEffect.fp
+++ b/src/gpu/effects/GrSimpleTextureEffect.fp
@@ -22,7 +22,7 @@
}
@make {
- static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
+ static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrSurfaceProxy> proxy,
SkAlphaType alphaType,
const SkMatrix& matrix) {
return std::unique_ptr<GrFragmentProcessor>(
@@ -31,7 +31,7 @@
}
/* clamp mode */
- static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
+ static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrSurfaceProxy> proxy,
SkAlphaType alphaType,
const SkMatrix& matrix,
GrSamplerState::Filter filter) {
@@ -40,7 +40,7 @@
GrSamplerState(GrSamplerState::WrapMode::kClamp, filter)));
}
- static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
+ static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrSurfaceProxy> proxy,
SkAlphaType alphaType,
const SkMatrix& matrix,
const GrSamplerState& p) {
diff --git a/src/gpu/effects/GrTextureDomain.cpp b/src/gpu/effects/GrTextureDomain.cpp
index 10fa17f..80907fe 100644
--- a/src/gpu/effects/GrTextureDomain.cpp
+++ b/src/gpu/effects/GrTextureDomain.cpp
@@ -21,7 +21,7 @@
#include <utility>
-GrTextureDomain::GrTextureDomain(GrTextureProxy* proxy, const SkRect& domain, Mode modeX,
+GrTextureDomain::GrTextureDomain(GrSurfaceProxy* proxy, const SkRect& domain, Mode modeX,
Mode modeY, int index)
: fModeX(modeX)
, fModeY(modeY)
@@ -179,7 +179,7 @@
void GrTextureDomain::GLDomain::setData(const GrGLSLProgramDataManager& pdman,
const GrTextureDomain& textureDomain,
- GrTextureProxy* proxy,
+ GrSurfaceProxy* proxy,
const GrSamplerState& sampler) {
GrTexture* tex = proxy->peekTexture();
SkASSERT(fHasMode && textureDomain.modeX() == fModeX && textureDomain.modeY() == fModeY);
@@ -194,7 +194,7 @@
SkScalar decalFilterWeight = sampler.filter() == GrSamplerState::Filter::kNearest ?
SK_ScalarHalf : 1.0f;
SkScalar wInv, hInv, h;
- if (proxy->textureType() == GrTextureType::kRectangle) {
+ if (proxy->backendFormat().textureType() == GrTextureType::kRectangle) {
wInv = hInv = 1.f;
h = tex->height();
@@ -219,7 +219,7 @@
SkScalarToFloat(textureDomain.domain().fBottom * hInv)
};
- if (proxy->textureType() == GrTextureType::kRectangle) {
+ if (proxy->backendFormat().textureType() == GrTextureType::kRectangle) {
SkASSERT(values[0] >= 0.0f && values[0] <= proxy->width());
SkASSERT(values[1] >= 0.0f && values[1] <= proxy->height());
SkASSERT(values[2] >= 0.0f && values[2] <= proxy->width());
@@ -251,7 +251,7 @@
///////////////////////////////////////////////////////////////////////////////
std::unique_ptr<GrFragmentProcessor> GrTextureDomainEffect::Make(
- sk_sp<GrTextureProxy> proxy,
+ sk_sp<GrSurfaceProxy> proxy,
SkAlphaType srcAlphaType,
const SkMatrix& matrix,
const SkRect& domain,
@@ -261,7 +261,7 @@
GrSamplerState(GrSamplerState::WrapMode::kClamp, filterMode));
}
-std::unique_ptr<GrFragmentProcessor> GrTextureDomainEffect::Make(sk_sp<GrTextureProxy> proxy,
+std::unique_ptr<GrFragmentProcessor> GrTextureDomainEffect::Make(sk_sp<GrSurfaceProxy> proxy,
SkAlphaType srcAlphaType,
const SkMatrix& matrix,
const SkRect& domain,
@@ -276,7 +276,7 @@
std::move(proxy), srcAlphaType, matrix, domain, modeX, modeY, sampler));
}
-GrTextureDomainEffect::GrTextureDomainEffect(sk_sp<GrTextureProxy> proxy,
+GrTextureDomainEffect::GrTextureDomainEffect(sk_sp<GrSurfaceProxy> proxy,
SkAlphaType srcAlphaType,
const SkMatrix& matrix,
const SkRect& domain,
@@ -335,7 +335,7 @@
const GrFragmentProcessor& fp) override {
const GrTextureDomainEffect& tde = fp.cast<GrTextureDomainEffect>();
const GrTextureDomain& domain = tde.fTextureDomain;
- GrTextureProxy* proxy = tde.textureSampler(0).proxy();
+ GrSurfaceProxy* proxy = tde.textureSampler(0).proxy();
fGLDomain.setData(pdman, domain, proxy, tde.textureSampler(0).samplerState());
}
@@ -389,13 +389,13 @@
///////////////////////////////////////////////////////////////////////////////
std::unique_ptr<GrFragmentProcessor> GrDeviceSpaceTextureDecalFragmentProcessor::Make(
- sk_sp<GrTextureProxy> proxy, const SkIRect& subset, const SkIPoint& deviceSpaceOffset) {
+ sk_sp<GrSurfaceProxy> proxy, const SkIRect& subset, const SkIPoint& deviceSpaceOffset) {
return std::unique_ptr<GrFragmentProcessor>(new GrDeviceSpaceTextureDecalFragmentProcessor(
std::move(proxy), subset, deviceSpaceOffset));
}
GrDeviceSpaceTextureDecalFragmentProcessor::GrDeviceSpaceTextureDecalFragmentProcessor(
- sk_sp<GrTextureProxy> proxy, const SkIRect& subset, const SkIPoint& deviceSpaceOffset)
+ sk_sp<GrSurfaceProxy> proxy, const SkIRect& subset, const SkIPoint& deviceSpaceOffset)
: INHERITED(kGrDeviceSpaceTextureDecalFragmentProcessor_ClassID,
kCompatibleWithCoverageAsAlpha_OptimizationFlag)
, fTextureSampler(proxy, GrSamplerState::ClampNearest())
@@ -450,13 +450,13 @@
const GrFragmentProcessor& fp) override {
const GrDeviceSpaceTextureDecalFragmentProcessor& dstdfp =
fp.cast<GrDeviceSpaceTextureDecalFragmentProcessor>();
- GrTextureProxy* proxy = dstdfp.textureSampler(0).proxy();
- GrTexture* texture = proxy->peekTexture();
+ GrSurfaceProxy* proxy = dstdfp.textureSampler(0).proxy();
+ SkISize textureDims = proxy->backingStoreDimensions();
fGLDomain.setData(pdman, dstdfp.fTextureDomain, proxy,
dstdfp.textureSampler(0).samplerState());
- float iw = 1.f / texture->width();
- float ih = 1.f / texture->height();
+ float iw = 1.f / textureDims.width();
+ float ih = 1.f / textureDims.height();
float scaleAndTransData[4] = {
iw, ih,
-dstdfp.fDeviceSpaceOffset.fX * iw, -dstdfp.fDeviceSpaceOffset.fY * ih
diff --git a/src/gpu/effects/GrTextureDomain.h b/src/gpu/effects/GrTextureDomain.h
index ff13619..1361c4d 100644
--- a/src/gpu/effects/GrTextureDomain.h
+++ b/src/gpu/effects/GrTextureDomain.h
@@ -53,7 +53,7 @@
* @param index Pass a value >= 0 if using multiple texture domains in the same effect.
* It is used to keep inserted variables from causing name collisions.
*/
- GrTextureDomain(GrTextureProxy*, const SkRect& domain, Mode modeX, Mode modeY, int index = -1);
+ GrTextureDomain(GrSurfaceProxy*, const SkRect& domain, Mode modeX, Mode modeY, int index = -1);
GrTextureDomain(const GrTextureDomain&) = default;
@@ -143,7 +143,7 @@
* texture domain. The rectangle is automatically adjusted to account for the texture's
* origin.
*/
- void setData(const GrGLSLProgramDataManager&, const GrTextureDomain&, GrTextureProxy*,
+ void setData(const GrGLSLProgramDataManager&, const GrTextureDomain&, GrSurfaceProxy*,
const GrSamplerState& sampler);
enum {
@@ -187,14 +187,14 @@
*/
class GrTextureDomainEffect : public GrFragmentProcessor {
public:
- static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy>,
+ static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrSurfaceProxy>,
SkAlphaType srcAlphaType,
const SkMatrix&,
const SkRect& domain,
GrTextureDomain::Mode mode,
GrSamplerState::Filter filterMode);
- static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy>,
+ static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrSurfaceProxy>,
SkAlphaType srcAlphaType,
const SkMatrix&,
const SkRect& domain,
@@ -224,7 +224,7 @@
GrTextureDomain fTextureDomain;
TextureSampler fTextureSampler;
- GrTextureDomainEffect(sk_sp<GrTextureProxy>,
+ GrTextureDomainEffect(sk_sp<GrSurfaceProxy>,
SkAlphaType srcAlphaType,
const SkMatrix&,
const SkRect& domain,
@@ -249,7 +249,7 @@
class GrDeviceSpaceTextureDecalFragmentProcessor : public GrFragmentProcessor {
public:
- static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy>,
+ static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrSurfaceProxy>,
const SkIRect& subset,
const SkIPoint& deviceSpaceOffset);
@@ -274,7 +274,7 @@
GrTextureDomain fTextureDomain;
SkIPoint fDeviceSpaceOffset;
- GrDeviceSpaceTextureDecalFragmentProcessor(sk_sp<GrTextureProxy>,
+ GrDeviceSpaceTextureDecalFragmentProcessor(sk_sp<GrSurfaceProxy>,
const SkIRect&, const SkIPoint&);
GrDeviceSpaceTextureDecalFragmentProcessor(const GrDeviceSpaceTextureDecalFragmentProcessor&);
diff --git a/src/gpu/effects/generated/GrAlphaThresholdFragmentProcessor.h b/src/gpu/effects/generated/GrAlphaThresholdFragmentProcessor.h
index 730054b..112e72a 100644
--- a/src/gpu/effects/generated/GrAlphaThresholdFragmentProcessor.h
+++ b/src/gpu/effects/generated/GrAlphaThresholdFragmentProcessor.h
@@ -18,7 +18,7 @@
public:
inline OptimizationFlags optFlags(float outerThreshold);
- static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> mask,
+ static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrSurfaceProxy> mask,
float innerThreshold,
float outerThreshold,
const SkIRect& bounds) {
@@ -34,7 +34,7 @@
float outerThreshold;
private:
- GrAlphaThresholdFragmentProcessor(sk_sp<GrTextureProxy> mask, float innerThreshold,
+ GrAlphaThresholdFragmentProcessor(sk_sp<GrSurfaceProxy> mask, float innerThreshold,
float outerThreshold, const SkIRect& bounds)
: INHERITED(kGrAlphaThresholdFragmentProcessor_ClassID, kNone_OptimizationFlags)
, maskCoordTransform(
diff --git a/src/gpu/effects/generated/GrCircleBlurFragmentProcessor.h b/src/gpu/effects/generated/GrCircleBlurFragmentProcessor.h
index 93d2403..a3221ec 100644
--- a/src/gpu/effects/generated/GrCircleBlurFragmentProcessor.h
+++ b/src/gpu/effects/generated/GrCircleBlurFragmentProcessor.h
@@ -28,7 +28,7 @@
private:
GrCircleBlurFragmentProcessor(SkRect circleRect, float textureRadius, float solidRadius,
- sk_sp<GrTextureProxy> blurProfileSampler)
+ sk_sp<GrSurfaceProxy> blurProfileSampler)
: INHERITED(kGrCircleBlurFragmentProcessor_ClassID,
(OptimizationFlags)kCompatibleWithCoverageAsAlpha_OptimizationFlag)
, circleRect(circleRect)
diff --git a/src/gpu/effects/generated/GrMagnifierEffect.h b/src/gpu/effects/generated/GrMagnifierEffect.h
index cb0d005..c7e3013 100644
--- a/src/gpu/effects/generated/GrMagnifierEffect.h
+++ b/src/gpu/effects/generated/GrMagnifierEffect.h
@@ -16,7 +16,7 @@
#include "src/gpu/GrFragmentProcessor.h"
class GrMagnifierEffect : public GrFragmentProcessor {
public:
- static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> src, SkIRect bounds,
+ static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrSurfaceProxy> src, SkIRect bounds,
SkRect srcRect, float xInvZoom, float yInvZoom,
float xInvInset, float yInvInset) {
return std::unique_ptr<GrFragmentProcessor>(new GrMagnifierEffect(
@@ -35,7 +35,7 @@
float yInvInset;
private:
- GrMagnifierEffect(sk_sp<GrTextureProxy> src, SkIRect bounds, SkRect srcRect, float xInvZoom,
+ GrMagnifierEffect(sk_sp<GrSurfaceProxy> src, SkIRect bounds, SkRect srcRect, float xInvZoom,
float yInvZoom, float xInvInset, float yInvInset)
: INHERITED(kGrMagnifierEffect_ClassID, kNone_OptimizationFlags)
, srcCoordTransform(SkMatrix::I(), src.get())
diff --git a/src/gpu/effects/generated/GrRRectBlurEffect.h b/src/gpu/effects/generated/GrRRectBlurEffect.h
index 9a3ff66..9aad281 100644
--- a/src/gpu/effects/generated/GrRRectBlurEffect.h
+++ b/src/gpu/effects/generated/GrRRectBlurEffect.h
@@ -117,7 +117,7 @@
private:
GrRRectBlurEffect(float sigma, SkRect rect, float cornerRadius,
- sk_sp<GrTextureProxy> ninePatchSampler)
+ sk_sp<GrSurfaceProxy> ninePatchSampler)
: INHERITED(kGrRRectBlurEffect_ClassID,
(OptimizationFlags)kCompatibleWithCoverageAsAlpha_OptimizationFlag)
, sigma(sigma)
diff --git a/src/gpu/effects/generated/GrRectBlurEffect.h b/src/gpu/effects/generated/GrRectBlurEffect.h
index b0c86bd..9b81d5f 100644
--- a/src/gpu/effects/generated/GrRectBlurEffect.h
+++ b/src/gpu/effects/generated/GrRectBlurEffect.h
@@ -116,7 +116,7 @@
bool isFast;
private:
- GrRectBlurEffect(SkRect rect, sk_sp<GrTextureProxy> integral, float invSixSigma, bool isFast,
+ GrRectBlurEffect(SkRect rect, sk_sp<GrSurfaceProxy> integral, float invSixSigma, bool isFast,
GrSamplerState samplerParams)
: INHERITED(kGrRectBlurEffect_ClassID,
(OptimizationFlags)kCompatibleWithCoverageAsAlpha_OptimizationFlag)
diff --git a/src/gpu/effects/generated/GrSimpleTextureEffect.h b/src/gpu/effects/generated/GrSimpleTextureEffect.h
index db087eb..bdc11da 100644
--- a/src/gpu/effects/generated/GrSimpleTextureEffect.h
+++ b/src/gpu/effects/generated/GrSimpleTextureEffect.h
@@ -16,7 +16,7 @@
#include "src/gpu/GrFragmentProcessor.h"
class GrSimpleTextureEffect : public GrFragmentProcessor {
public:
- static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
+ static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrSurfaceProxy> proxy,
SkAlphaType alphaType,
const SkMatrix& matrix) {
return std::unique_ptr<GrFragmentProcessor>(
@@ -26,7 +26,7 @@
}
/* clamp mode */
- static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
+ static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrSurfaceProxy> proxy,
SkAlphaType alphaType,
const SkMatrix& matrix,
GrSamplerState::Filter filter) {
@@ -35,7 +35,7 @@
GrSamplerState(GrSamplerState::WrapMode::kClamp, filter)));
}
- static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
+ static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrSurfaceProxy> proxy,
SkAlphaType alphaType,
const SkMatrix& matrix,
const GrSamplerState& p) {
@@ -50,7 +50,7 @@
SkMatrix44 matrix;
private:
- GrSimpleTextureEffect(sk_sp<GrTextureProxy> image, SkMatrix44 matrix, SkAlphaType alphaType,
+ GrSimpleTextureEffect(sk_sp<GrSurfaceProxy> image, SkMatrix44 matrix, SkAlphaType alphaType,
GrSamplerState samplerParams)
: INHERITED(kGrSimpleTextureEffect_ClassID,
(OptimizationFlags)ModulateForSamplerOptFlags(