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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « src/gpu/GrPipeline.h ('k') | src/gpu/GrReorderCommandBuilder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrPipeline.h" 8 #include "GrPipeline.h"
9 9
10 #include "GrCaps.h" 10 #include "GrCaps.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 *firstCoverageStageIdx = pipelineBuilder.numCoverageFragmentStages(); 143 *firstCoverageStageIdx = pipelineBuilder.numCoverageFragmentStages();
144 } else { 144 } else {
145 if (coveragePOI.readsFragPosition()) { 145 if (coveragePOI.readsFragPosition()) {
146 fReadsFragPosition = true; 146 fReadsFragPosition = true;
147 } 147 }
148 } 148 }
149 } 149 }
150 150
151 //////////////////////////////////////////////////////////////////////////////// 151 ////////////////////////////////////////////////////////////////////////////////
152 152
153 bool GrPipeline::isEqual(const GrPipeline& that, bool ignoreCoordTransforms) con st { 153 bool GrPipeline::AreEqual(const GrPipeline& a, const GrPipeline& b,
154 // If we point to the same pipeline, then we are necessarily equal 154 bool ignoreCoordTransforms) {
155 if (this == &that) { 155 SkASSERT(&a != &b);
156 return true;
157 }
158 156
159 if (this->getRenderTarget() != that.getRenderTarget() || 157 if (a.getRenderTarget() != b.getRenderTarget() ||
160 this->fFragmentStages.count() != that.fFragmentStages.count() || 158 a.fFragmentStages.count() != b.fFragmentStages.count() ||
161 this->fNumColorStages != that.fNumColorStages || 159 a.fNumColorStages != b.fNumColorStages ||
162 this->fScissorState != that.fScissorState || 160 a.fScissorState != b.fScissorState ||
163 this->fFlags != that.fFlags || 161 a.fFlags != b.fFlags ||
164 this->fStencilSettings != that.fStencilSettings || 162 a.fStencilSettings != b.fStencilSettings ||
165 this->fDrawFace != that.fDrawFace) { 163 a.fDrawFace != b.fDrawFace) {
166 return false; 164 return false;
167 } 165 }
168 166
169 if (!this->getXferProcessor()->isEqual(*that.getXferProcessor())) { 167 if (!a.getXferProcessor()->isEqual(*b.getXferProcessor())) {
170 return false; 168 return false;
171 } 169 }
172 170
173 for (int i = 0; i < this->numFragmentStages(); i++) { 171 for (int i = 0; i < a.numFragmentStages(); i++) {
174 if (!this->getFragmentStage(i).processor()->isEqual(*that.getFragmentSta ge(i).processor(), 172 if (!a.getFragmentStage(i).processor()->isEqual(*b.getFragmentStage(i).p rocessor(),
175 ignoreCoordTransform s)) { 173 ignoreCoordTransform s)) {
176 return false; 174 return false;
177 } 175 }
178 } 176 }
179 return true; 177 return true;
180 } 178 }
181 179
OLDNEW
« 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