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

Unified Diff: src/gpu/effects/GrCustomXfermode.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/batches/GrTestBatch.h ('k') | src/gpu/effects/GrDashingEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrCustomXfermode.cpp
diff --git a/src/gpu/effects/GrCustomXfermode.cpp b/src/gpu/effects/GrCustomXfermode.cpp
index 08a1e46552126258ef9e121f0bd2c92d831fb84a..e7023ca25d4f6e0ca7eca0d94359d8a411ecfd7a 100644
--- a/src/gpu/effects/GrCustomXfermode.cpp
+++ b/src/gpu/effects/GrCustomXfermode.cpp
@@ -552,9 +552,7 @@ private:
void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
- bool onWillNeedXferBarrier(const GrRenderTarget* rt,
- const GrCaps& caps,
- GrXferBarrierType* outBarrierType) const override;
+ GrXferBarrierType onXferBarrier(const GrRenderTarget*, const GrCaps&) const override;
void onGetBlendInfo(BlendInfo*) const override;
@@ -757,14 +755,11 @@ GrXferProcessor::OptFlags CustomXP::onGetOptimizations(const GrProcOptInfo& colo
return flags;
}
-bool CustomXP::onWillNeedXferBarrier(const GrRenderTarget* rt,
- const GrCaps& caps,
- GrXferBarrierType* outBarrierType) const {
+GrXferBarrierType CustomXP::onXferBarrier(const GrRenderTarget* rt, const GrCaps& caps) const {
if (this->hasHWBlendEquation() && !caps.advancedCoherentBlendEquationSupport()) {
- *outBarrierType = kBlend_GrXferBarrierType;
- return true;
+ return kBlend_GrXferBarrierType;
}
- return false;
+ return kNone_GrXferBarrierType;
}
void CustomXP::onGetBlendInfo(BlendInfo* blendInfo) const {
« no previous file with comments | « src/gpu/batches/GrTestBatch.h ('k') | src/gpu/effects/GrDashingEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698