aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrPipeline.h
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.h
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.h')
-rw-r--r--src/gpu/GrPipeline.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/gpu/GrPipeline.h b/src/gpu/GrPipeline.h
index 67e137c82a..fa78f34629 100644
--- a/src/gpu/GrPipeline.h
+++ b/src/gpu/GrPipeline.h
@@ -75,7 +75,8 @@ public:
const GrAppliedClip* fAppliedClip = nullptr;
GrRenderTarget* fRenderTarget = nullptr;
const GrCaps* fCaps = nullptr;
- GrXferProcessor::DstTexture fDstTexture;
+ GrResourceProvider* fResourceProvider = nullptr;
+ GrXferProcessor::DstProxy fDstProxy;
};
/**
@@ -157,11 +158,11 @@ public:
* 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* dstTexture(SkIPoint* offset = nullptr) const {
+ GrTextureProxy* dstTextureProxy(SkIPoint* offset = nullptr) const {
if (offset) {
*offset = fDstTextureOffset;
}
- return fDstTexture.get();
+ return fDstTextureProxy.get();
}
const GrFragmentProcessor& getColorFragmentProcessor(int idx) const {
@@ -215,7 +216,8 @@ public:
bool isBad() const { return SkToBool(fFlags & kIsBad_Flag); }
GrXferBarrierType xferBarrierType(const GrCaps& caps) const {
- if (fDstTexture.get() && fDstTexture.get() == fRenderTarget.get()->asTexture()) {
+ if (fDstTextureProxy.get() &&
+ fDstTextureProxy.get()->priv().peekTexture() == fRenderTarget.get()->asTexture()) {
return kTexture_GrXferBarrierType;
}
return this->getXferProcessor().xferBarrierType(caps);
@@ -233,11 +235,11 @@ private:
};
using RenderTarget = GrPendingIOResource<GrRenderTarget, kWrite_GrIOType>;
- using DstTexture = GrPendingIOResource<GrTexture, kRead_GrIOType>;
+ using DstTextureProxy = GrPendingIOResource<GrTextureProxy, kRead_GrIOType>;
using PendingFragmentProcessor = GrPendingProgramElement<const GrFragmentProcessor>;
using FragmentProcessorArray = SkAutoSTArray<8, PendingFragmentProcessor>;
- DstTexture fDstTexture;
+ DstTextureProxy fDstTextureProxy;
SkIPoint fDstTextureOffset;
RenderTarget fRenderTarget;
GrScissorState fScissorState;