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

Unified Diff: src/gpu/GrPipeline.cpp

Issue 901663007: Revert of Move DstCopy on gpu into the GrXferProcessor. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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/GrPipeline.h ('k') | src/gpu/GrPipelineBuilder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrPipeline.cpp
diff --git a/src/gpu/GrPipeline.cpp b/src/gpu/GrPipeline.cpp
index bd508e9dc1a737dd7aa6299b16e5ddc8e0d747b9..911169e3368f6a2c30203d73a226813357d8c509 100644
--- a/src/gpu/GrPipeline.cpp
+++ b/src/gpu/GrPipeline.cpp
@@ -48,7 +48,7 @@
const GrDeviceCoordTexture* dstCopy) {
// Create XferProcessor from DS's XPFactory
SkAutoTUnref<GrXferProcessor> xferProcessor(
- pipelineBuilder.getXPFactory()->createXferProcessor(colorPOI, coveragePOI, dstCopy, caps));
+ pipelineBuilder.getXPFactory()->createXferProcessor(colorPOI, coveragePOI));
GrColor overrideColor = GrColor_ILLEGAL;
if (colorPOI.firstEffectiveStageIndex() != 0) {
@@ -82,6 +82,10 @@
fScissorState = scissorState;
fStencilSettings = pipelineBuilder.getStencil();
fDrawFace = pipelineBuilder.getDrawFace();
+ // TODO move this out of GrPipeline
+ if (dstCopy) {
+ fDstCopy = *dstCopy;
+ }
fFlags = 0;
if (pipelineBuilder.isHWAntialias()) {
@@ -102,6 +106,8 @@
this->adjustProgramFromOptimizations(pipelineBuilder, optFlags, colorPOI, coveragePOI,
&firstColorStageIdx, &firstCoverageStageIdx);
+
+ fDescInfo.fReadsDst = fXferProcessor->willReadDstColor();
bool usesLocalCoords = false;
@@ -136,20 +142,20 @@
const GrProcOptInfo& coveragePOI,
int* firstColorStageIdx,
int* firstCoverageStageIdx) {
- fReadsFragPosition = false;
+ fDescInfo.fReadsFragPosition = false;
if ((flags & GrXferProcessor::kIgnoreColor_OptFlag) ||
(flags & GrXferProcessor::kOverrideColor_OptFlag)) {
*firstColorStageIdx = pipelineBuilder.numColorStages();
} else {
- fReadsFragPosition = colorPOI.readsFragPosition();
+ fDescInfo.fReadsFragPosition = colorPOI.readsFragPosition();
}
if (flags & GrXferProcessor::kIgnoreCoverage_OptFlag) {
*firstCoverageStageIdx = pipelineBuilder.numCoverageStages();
} else {
if (coveragePOI.readsFragPosition()) {
- fReadsFragPosition = true;
+ fDescInfo.fReadsFragPosition = true;
}
}
}
@@ -163,7 +169,8 @@
this->fScissorState != that.fScissorState ||
this->fFlags != that.fFlags ||
this->fStencilSettings != that.fStencilSettings ||
- this->fDrawFace != that.fDrawFace) {
+ this->fDrawFace != that.fDrawFace ||
+ this->fDstCopy.texture() != that.fDstCopy.texture()) {
return false;
}
« no previous file with comments | « src/gpu/GrPipeline.h ('k') | src/gpu/GrPipelineBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698