Remove unused 'offset' parameter from peekDstTexture.

The dest-texture uniforms are being set directly inside GrPipeline now;
our callers don't have any other reason to inspect the offset.

Change-Id: I319287cc26767a4ea294da6615e83168500b318f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/415876
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
This commit is contained in:
John Stiles 2021-06-04 15:30:50 -04:00 committed by Skia Commit-Bot
parent 8cb7c3be75
commit 3e77d6eff2
3 changed files with 4 additions and 12 deletions

View File

@ -137,8 +137,7 @@ void GrPipeline::visitProxies(const GrOp::VisitProxyFunc& func) const {
void GrPipeline::setDstTextureUniforms(const GrGLSLProgramDataManager& pdm,
GrGLSLBuiltinUniformHandles* fBuiltinUniformHandles) const {
SkIPoint offset;
GrTexture* dstTexture = this->peekDstTexture(&offset);
GrTexture* dstTexture = this->peekDstTexture();
if (dstTexture) {
if (fBuiltinUniformHandles->fDstTextureCoordsUni.isValid()) {

View File

@ -142,17 +142,11 @@ public:
*/
const GrSurfaceProxyView& dstProxyView() const { return fDstProxyView; }
/**
* If the GrXferProcessor uses a texture to access the dst color, then this returns that
* texture and the offset to the dst contents within that texture.
*/
GrTexture* peekDstTexture(SkIPoint* offset = nullptr) const {
/** If this GrXferProcessor uses a texture to access the dst color, returns that texture. */
GrTexture* peekDstTexture() const {
if (!this->usesDstTexture()) {
return nullptr;
}
if (offset) {
*offset = fDstTextureOffset;
}
if (GrTextureProxy* dstProxy = fDstProxyView.asTextureProxy()) {
return dstProxy->peekTexture();

View File

@ -533,8 +533,7 @@ wgpu::BindGroup GrDawnProgram::setTextures(GrDawnGpu* gpu,
}
}
SkIPoint offset;
if (GrTexture* dstTexture = pipeline.peekDstTexture(&offset)) {
if (GrTexture* dstTexture = pipeline.peekDstTexture()) {
set_texture(gpu, GrSamplerState::Filter::kNearest, dstTexture, &bindings, &binding);
}