Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Unified Diff: src/gpu/GrXferProcessor.cpp

Issue 1287973003: Check for xfer barriers in GrBatch, auto-issue barriers in GrGpu (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comment Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrTest.cpp ('k') | src/gpu/batches/GrAAFillRectBatch.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrXferProcessor.cpp
diff --git a/src/gpu/GrXferProcessor.cpp b/src/gpu/GrXferProcessor.cpp
index 1ead010b6eace6df63dd2eaa27b81e9b05b8fff4..a95445e287825db5934a55f27f7c4cf88da104ee 100644
--- a/src/gpu/GrXferProcessor.cpp
+++ b/src/gpu/GrXferProcessor.cpp
@@ -93,17 +93,15 @@ void GrXferProcessor::getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBu
this->onGetGLProcessorKey(caps, b);
}
-bool GrXferProcessor::willNeedXferBarrier(const GrRenderTarget* rt,
- const GrCaps& caps,
- GrXferBarrierType* outBarrierType) const {
+GrXferBarrierType GrXferProcessor::xferBarrierType(const GrRenderTarget* rt,
+ const GrCaps& caps) const {
+ SkASSERT(rt);
if (static_cast<const GrSurface*>(rt) == this->getDstTexture()) {
// Texture barriers are required when a shader reads and renders to the same texture.
- SkASSERT(rt);
SkASSERT(caps.textureBarrierSupport());
- *outBarrierType = kTexture_GrXferBarrierType;
- return true;
+ return kTexture_GrXferBarrierType;
}
- return this->onWillNeedXferBarrier(rt, caps, outBarrierType);
+ return this->onXferBarrier(rt, caps);
}
#ifdef SK_DEBUG
« no previous file with comments | « src/gpu/GrTest.cpp ('k') | src/gpu/batches/GrAAFillRectBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698