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

Unified Diff: src/gpu/gl/builders/GrGLProgramBuilder.cpp

Issue 1541903002: added support for PLS path rendering (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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
Index: src/gpu/gl/builders/GrGLProgramBuilder.cpp
diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.cpp b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
index 4360f7858d2129171fb19382dfb02bb0e1e64d34..8928dfef4a4bd0e31f8789099f0f0adf5cf3107f 100644
--- a/src/gpu/gl/builders/GrGLProgramBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
@@ -94,9 +94,12 @@ bool GrGLProgramBuilder::emitAndInstallProcs(GrGLSLExpr4* inputColor, GrGLSLExpr
this->emitAndInstallFragProcs(0, this->pipeline().numColorFragmentProcessors(), inputColor);
this->emitAndInstallFragProcs(this->pipeline().numColorFragmentProcessors(), numProcs,
inputCoverage);
- this->emitAndInstallXferProc(this->pipeline().getXferProcessor(), *inputColor, *inputCoverage,
- this->pipeline().ignoresCoverage());
- this->emitFSOutputSwizzle(this->pipeline().getXferProcessor().hasSecondaryOutput());
+ if (primProc.getPixelLocalStorageState() != GrPixelLocalStorageState::kDraw_State) {
+ this->emitAndInstallXferProc(this->pipeline().getXferProcessor(), *inputColor,
+ *inputCoverage, this->pipeline().ignoresCoverage(),
+ primProc.getPixelLocalStorageState());
+ this->emitFSOutputSwizzle(this->pipeline().getXferProcessor().hasSecondaryOutput());
+ }
return true;
}
@@ -223,7 +226,8 @@ void GrGLProgramBuilder::emitAndInstallProc(const GrPrimitiveProcessor& gp,
void GrGLProgramBuilder::emitAndInstallXferProc(const GrXferProcessor& xp,
const GrGLSLExpr4& colorIn,
const GrGLSLExpr4& coverageIn,
- bool ignoresCoverage) {
+ bool ignoresCoverage,
+ GrPixelLocalStorageState plsState) {
// Program builders have a bit of state we need to clear with each effect
AutoStageAdvance adv(this);
@@ -255,7 +259,8 @@ void GrGLProgramBuilder::emitAndInstallXferProc(const GrXferProcessor& xp,
ignoresCoverage ? nullptr : coverageIn.c_str(),
fFS.getPrimaryColorOutputName(),
fFS.getSecondaryColorOutputName(),
- samplers);
+ samplers,
+ plsState == GrPixelLocalStorageState::kFinish_State);
fXferProcessor->fGLProc->emitCode(args);
// We have to check that effects and the code they emit are consistent, ie if an effect

Powered by Google App Engine
This is Rietveld 408576698