aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrPipeline.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-05-15 14:56:51 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-05-17 12:17:03 +0000
commit87f7f1c3ce519115141b40f1d8faede437c8f357 (patch)
treee35d12c8ae40e0192e8af889ca848d3c5f60eed9 /src/gpu/GrPipeline.cpp
parent1314918f903f0a1b40c2695f2b27737e9a8b443a (diff)
Convert DstTexture to DstProxy
The last GrTexture-based TextureSampler::reset call must be removed before the TextureSamplers can become purely GrTextureProxy-backed Split out of: https://skia-review.googlesource.com/c/10484/ (Omnibus: Push instantiation of GrTextures later (post TextureSampler)) Change-Id: Ic1435177d8b5d9bd3fc38b4903c9baae8205cfb0 Reviewed-on: https://skia-review.googlesource.com/16908 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrPipeline.cpp')
-rw-r--r--src/gpu/GrPipeline.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/gpu/GrPipeline.cpp b/src/gpu/GrPipeline.cpp
index 7c0338c77c..73ae9c659a 100644
--- a/src/gpu/GrPipeline.cpp
+++ b/src/gpu/GrPipeline.cpp
@@ -44,9 +44,13 @@ void GrPipeline::init(const InitArgs& args) {
fXferProcessor = args.fProcessors->refXferProcessor();
- if (args.fDstTexture.texture()) {
- fDstTexture.reset(args.fDstTexture.texture());
- fDstTextureOffset = args.fDstTexture.offset();
+ if (args.fDstProxy.proxy()) {
+ if (!args.fDstProxy.proxy()->instantiate(args.fResourceProvider)) {
+ this->markAsBad();
+ }
+
+ fDstTextureProxy.reset(args.fDstProxy.proxy());
+ fDstTextureOffset = args.fDstProxy.offset();
}
// Copy GrFragmentProcessors from GrPipelineBuilder to Pipeline, possibly removing some of the
@@ -91,7 +95,7 @@ static void add_dependencies_for_processor(const GrFragmentProcessor* proc,
GrFragmentProcessor::TextureAccessIter iter(proc);
while (const GrResourceIOProcessor::TextureSampler* sampler = iter.next()) {
SkASSERT(rtp->getLastOpList());
- rtp->getLastOpList()->addDependency(sampler->texture());
+ rtp->getLastOpList()->addDependency(sampler->proxy());
}
}
#endif
@@ -104,8 +108,8 @@ void GrPipeline::addDependenciesTo(GrRenderTargetProxy* rtp) const {
}
#endif
- if (fDstTexture) {
- //SkASSERT(rtp->getLastOpList());
+ if (fDstTextureProxy) {
+ SkASSERT(rtp->getLastOpList());
// MDB TODO: re-enable when TextureSamplers store texture proxies
//rtp->getLastOpList()->addDependency(fDstTexture.get());
}