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

Unified Diff: src/gpu/GrPipeline.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/GrPipeline.h ('k') | src/gpu/GrReorderCommandBuilder.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 37618308f022afb1619bfdf978724e071e37e709..28ef7ba05dcfc0d3db80999c9f91bf5bf17ac336 100644
--- a/src/gpu/GrPipeline.cpp
+++ b/src/gpu/GrPipeline.cpp
@@ -150,28 +150,26 @@ void GrPipeline::adjustProgramFromOptimizations(const GrPipelineBuilder& pipelin
////////////////////////////////////////////////////////////////////////////////
-bool GrPipeline::isEqual(const GrPipeline& that, bool ignoreCoordTransforms) const {
- // If we point to the same pipeline, then we are necessarily equal
- if (this == &that) {
- return true;
- }
-
- if (this->getRenderTarget() != that.getRenderTarget() ||
- this->fFragmentStages.count() != that.fFragmentStages.count() ||
- this->fNumColorStages != that.fNumColorStages ||
- this->fScissorState != that.fScissorState ||
- this->fFlags != that.fFlags ||
- this->fStencilSettings != that.fStencilSettings ||
- this->fDrawFace != that.fDrawFace) {
+bool GrPipeline::AreEqual(const GrPipeline& a, const GrPipeline& b,
+ bool ignoreCoordTransforms) {
+ SkASSERT(&a != &b);
+
+ if (a.getRenderTarget() != b.getRenderTarget() ||
+ a.fFragmentStages.count() != b.fFragmentStages.count() ||
+ a.fNumColorStages != b.fNumColorStages ||
+ a.fScissorState != b.fScissorState ||
+ a.fFlags != b.fFlags ||
+ a.fStencilSettings != b.fStencilSettings ||
+ a.fDrawFace != b.fDrawFace) {
return false;
}
- if (!this->getXferProcessor()->isEqual(*that.getXferProcessor())) {
+ if (!a.getXferProcessor()->isEqual(*b.getXferProcessor())) {
return false;
}
- for (int i = 0; i < this->numFragmentStages(); i++) {
- if (!this->getFragmentStage(i).processor()->isEqual(*that.getFragmentStage(i).processor(),
+ for (int i = 0; i < a.numFragmentStages(); i++) {
+ if (!a.getFragmentStage(i).processor()->isEqual(*b.getFragmentStage(i).processor(),
ignoreCoordTransforms)) {
return false;
}
« no previous file with comments | « src/gpu/GrPipeline.h ('k') | src/gpu/GrReorderCommandBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698