OLD | NEW |
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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 bool GrPipeline::AreEqual(const GrPipeline& a, const GrPipeline& b, | 221 bool GrPipeline::AreEqual(const GrPipeline& a, const GrPipeline& b, |
222 bool ignoreCoordTransforms) { | 222 bool ignoreCoordTransforms) { |
223 SkASSERT(&a != &b); | 223 SkASSERT(&a != &b); |
224 | 224 |
225 if (a.getRenderTarget() != b.getRenderTarget() || | 225 if (a.getRenderTarget() != b.getRenderTarget() || |
226 a.fFragmentProcessors.count() != b.fFragmentProcessors.count() || | 226 a.fFragmentProcessors.count() != b.fFragmentProcessors.count() || |
227 a.fNumColorProcessors != b.fNumColorProcessors || | 227 a.fNumColorProcessors != b.fNumColorProcessors || |
228 a.fScissorState != b.fScissorState || | 228 a.fScissorState != b.fScissorState || |
229 a.fFlags != b.fFlags || | 229 a.fFlags != b.fFlags || |
230 a.fStencilSettings != b.fStencilSettings || | 230 a.fStencilSettings != b.fStencilSettings || |
231 a.fDrawFace != b.fDrawFace) { | 231 a.fDrawFace != b.fDrawFace || |
| 232 a.fIgnoresCoverage != b.fIgnoresCoverage) { |
232 return false; | 233 return false; |
233 } | 234 } |
234 | 235 |
235 // Most of the time both are nullptr | 236 // Most of the time both are nullptr |
236 if (a.fXferProcessor.get() || b.fXferProcessor.get()) { | 237 if (a.fXferProcessor.get() || b.fXferProcessor.get()) { |
237 if (!a.getXferProcessor().isEqual(b.getXferProcessor())) { | 238 if (!a.getXferProcessor().isEqual(b.getXferProcessor())) { |
238 return false; | 239 return false; |
239 } | 240 } |
240 } | 241 } |
241 | 242 |
242 for (int i = 0; i < a.numFragmentProcessors(); i++) { | 243 for (int i = 0; i < a.numFragmentProcessors(); i++) { |
243 if (!a.getFragmentProcessor(i).isEqual(b.getFragmentProcessor(i), ignore
CoordTransforms)) { | 244 if (!a.getFragmentProcessor(i).isEqual(b.getFragmentProcessor(i), ignore
CoordTransforms)) { |
244 return false; | 245 return false; |
245 } | 246 } |
246 } | 247 } |
247 return true; | 248 return true; |
248 } | 249 } |
OLD | NEW |