From bb581ce30f55360fd3a12e7f5aa1fe324b16d085 Mon Sep 17 00:00:00 2001 From: Robert Phillips Date: Mon, 29 May 2017 15:05:15 -0400 Subject: Convert DstTexture to DstProxy (take 2) The last GrTexture-based TextureSampler::reset call must be removed before the TextureSamplers can become purely GrTextureProxy-backed Reland of: https://skia-review.googlesource.com/c/16908/ (Convert DstTexture to DstProxy) Split out of: https://skia-review.googlesource.com/c/10484/ (Omnibus: Push instantiation of GrTextures later (post TextureSampler)) Change-Id: I3a497b6a950fad899f23882c0a9552894ef640f8 Reviewed-on: https://skia-review.googlesource.com/17205 Commit-Queue: Robert Phillips Reviewed-by: Brian Salomon --- src/gpu/vk/GrVkPipelineState.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/gpu/vk/GrVkPipelineState.cpp') diff --git a/src/gpu/vk/GrVkPipelineState.cpp b/src/gpu/vk/GrVkPipelineState.cpp index b3f6c1bc3b..525d75f3da 100644 --- a/src/gpu/vk/GrVkPipelineState.cpp +++ b/src/gpu/vk/GrVkPipelineState.cpp @@ -258,13 +258,16 @@ void GrVkPipelineState::setData(GrVkGpu* gpu, } SkASSERT(!fp && !glslFP); - SkIPoint offset; - GrTexture* dstTexture = pipeline.dstTexture(&offset); - fXferProcessor->setData(fDataManager, pipeline.getXferProcessor(), dstTexture, offset); + { + SkIPoint offset; + GrTexture* dstTexture = pipeline.peekDstTexture(&offset); + + fXferProcessor->setData(fDataManager, pipeline.getXferProcessor(), dstTexture, offset); + } + GrResourceIOProcessor::TextureSampler dstTextureSampler; - if (dstTexture) { - // MDB TODO: this is the last usage of a GrTexture-based TextureSampler reset method - dstTextureSampler.reset(dstTexture); + if (GrTextureProxy* dstTextureProxy = pipeline.dstTextureProxy()) { + dstTextureSampler.reset(gpu->getContext()->resourceProvider(), sk_ref_sp(dstTextureProxy)); SkAssertResult(dstTextureSampler.instantiate(gpu->getContext()->resourceProvider())); textureBindings.push_back(&dstTextureSampler); } -- cgit v1.2.3