egdaniel | 3658f38 | 2014-09-15 07:01:59 -0700 | [diff] [blame] | 1 | /* |
egdaniel | 8dd688b | 2015-01-22 10:16:09 -0800 | [diff] [blame] | 2 | * Copyright 2015 Google Inc. |
egdaniel | 3658f38 | 2014-09-15 07:01:59 -0700 | [diff] [blame] | 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
egdaniel | 8dd688b | 2015-01-22 10:16:09 -0800 | [diff] [blame] | 8 | #include "GrPipeline.h" |
egdaniel | 3658f38 | 2014-09-15 07:01:59 -0700 | [diff] [blame] | 9 | |
bsalomon | eb1cb5c | 2015-05-22 08:01:09 -0700 | [diff] [blame] | 10 | #include "GrCaps.h" |
Brian Osman | 1105224 | 2016-10-27 14:47:55 -0400 | [diff] [blame] | 11 | #include "GrRenderTargetContext.h" |
joshualitt | 4973d9d | 2014-11-08 09:24:25 -0800 | [diff] [blame] | 12 | #include "GrGpu.h" |
egdaniel | 8dd688b | 2015-01-22 10:16:09 -0800 | [diff] [blame] | 13 | #include "GrPipelineBuilder.h" |
egdaniel | b6cbc38 | 2014-11-13 11:00:34 -0800 | [diff] [blame] | 14 | #include "GrProcOptInfo.h" |
Robert Phillips | f2361d2 | 2016-10-25 14:20:06 -0400 | [diff] [blame] | 15 | #include "GrRenderTargetOpList.h" |
cdalton | 193d9cf | 2016-05-12 11:52:02 -0700 | [diff] [blame] | 16 | #include "GrRenderTargetPriv.h" |
egdaniel | 9513143 | 2014-12-09 11:15:43 -0800 | [diff] [blame] | 17 | #include "GrXferProcessor.h" |
egdaniel | 3658f38 | 2014-09-15 07:01:59 -0700 | [diff] [blame] | 18 | |
Brian Salomon | 8952743 | 2016-12-16 09:52:16 -0500 | [diff] [blame] | 19 | #include "ops/GrOp.h" |
joshualitt | 7441782 | 2015-08-07 11:42:16 -0700 | [diff] [blame] | 20 | |
bsalomon | a387a11 | 2015-08-11 14:47:42 -0700 | [diff] [blame] | 21 | GrPipeline* GrPipeline::CreateAt(void* memory, const CreateArgs& args, |
Brian Salomon | 92aee3d | 2016-12-21 09:20:25 -0500 | [diff] [blame] | 22 | GrPipelineOptimizations* optimizations) { |
bsalomon | a387a11 | 2015-08-11 14:47:42 -0700 | [diff] [blame] | 23 | const GrPipelineBuilder& builder = *args.fPipelineBuilder; |
csmartdalton | c633abb | 2016-11-01 08:55:55 -0700 | [diff] [blame] | 24 | const GrUserStencilSettings* userStencil = builder.getUserStencil(); |
| 25 | GrRenderTarget* rt = args.fRenderTargetContext->accessRenderTarget(); |
Robert Phillips | e60ad62 | 2016-11-17 10:22:48 -0500 | [diff] [blame] | 26 | if (!rt) { |
| 27 | return nullptr; |
| 28 | } |
Brian Salomon | 92aee3d | 2016-12-21 09:20:25 -0500 | [diff] [blame] | 29 | |
cdalton | 93a379b | 2016-05-11 13:58:08 -0700 | [diff] [blame] | 30 | GrPipeline* pipeline = new (memory) GrPipeline; |
robertphillips | 55fdccc | 2016-06-06 06:16:20 -0700 | [diff] [blame] | 31 | pipeline->fRenderTarget.reset(rt); |
cdalton | 93a379b | 2016-05-11 13:58:08 -0700 | [diff] [blame] | 32 | SkASSERT(pipeline->fRenderTarget); |
| 33 | pipeline->fScissorState = *args.fScissor; |
csmartdalton | bf4a8f9 | 2016-09-06 10:01:06 -0700 | [diff] [blame] | 34 | pipeline->fWindowRectsState = *args.fWindowRectsState; |
csmartdalton | c633abb | 2016-11-01 08:55:55 -0700 | [diff] [blame] | 35 | pipeline->fUserStencilSettings = userStencil; |
cdalton | 93a379b | 2016-05-11 13:58:08 -0700 | [diff] [blame] | 36 | pipeline->fDrawFace = builder.getDrawFace(); |
| 37 | |
| 38 | pipeline->fFlags = 0; |
| 39 | if (builder.isHWAntialias()) { |
| 40 | pipeline->fFlags |= kHWAA_Flag; |
| 41 | } |
| 42 | if (builder.snapVerticesToPixelCenters()) { |
| 43 | pipeline->fFlags |= kSnapVertices_Flag; |
| 44 | } |
| 45 | if (builder.getDisableOutputConversionToSRGB()) { |
| 46 | pipeline->fFlags |= kDisableOutputConversionToSRGB_Flag; |
| 47 | } |
| 48 | if (builder.getAllowSRGBInputs()) { |
| 49 | pipeline->fFlags |= kAllowSRGBInputs_Flag; |
| 50 | } |
dvonbeck | 9b03e7b | 2016-08-01 11:01:56 -0700 | [diff] [blame] | 51 | if (builder.getUsesDistanceVectorField()) { |
| 52 | pipeline->fFlags |= kUsesDistanceVectorField_Flag; |
| 53 | } |
cdalton | 193d9cf | 2016-05-12 11:52:02 -0700 | [diff] [blame] | 54 | if (args.fHasStencilClip) { |
| 55 | pipeline->fFlags |= kHasStencilClip_Flag; |
| 56 | } |
csmartdalton | c633abb | 2016-11-01 08:55:55 -0700 | [diff] [blame] | 57 | if (!userStencil->isDisabled(args.fHasStencilClip)) { |
| 58 | pipeline->fFlags |= kStencilEnabled_Flag; |
| 59 | } |
cdalton | 93a379b | 2016-05-11 13:58:08 -0700 | [diff] [blame] | 60 | |
egdaniel | 9513143 | 2014-12-09 11:15:43 -0800 | [diff] [blame] | 61 | // Create XferProcessor from DS's XPFactory |
Brian Osman | 1105224 | 2016-10-27 14:47:55 -0400 | [diff] [blame] | 62 | bool hasMixedSamples = args.fRenderTargetContext->hasMixedSamples() && |
csmartdalton | c633abb | 2016-11-01 08:55:55 -0700 | [diff] [blame] | 63 | (builder.isHWAntialias() || pipeline->isStencilEnabled()); |
egdaniel | c4b7272 | 2015-11-23 13:20:41 -0800 | [diff] [blame] | 64 | const GrXPFactory* xpFactory = builder.getXPFactory(); |
Hal Canary | 144caf5 | 2016-11-07 17:57:18 -0500 | [diff] [blame] | 65 | sk_sp<GrXferProcessor> xferProcessor; |
egdaniel | c4b7272 | 2015-11-23 13:20:41 -0800 | [diff] [blame] | 66 | if (xpFactory) { |
Brian Salomon | 92aee3d | 2016-12-21 09:20:25 -0500 | [diff] [blame] | 67 | xferProcessor.reset(xpFactory->createXferProcessor( |
| 68 | args.fAnalysis, hasMixedSamples, &args.fDstTexture, *args.fCaps)); |
bsalomon | 2047b78 | 2015-12-21 13:12:54 -0800 | [diff] [blame] | 69 | if (!xferProcessor) { |
cdalton | 93a379b | 2016-05-11 13:58:08 -0700 | [diff] [blame] | 70 | pipeline->~GrPipeline(); |
bsalomon | 2047b78 | 2015-12-21 13:12:54 -0800 | [diff] [blame] | 71 | return nullptr; |
| 72 | } |
egdaniel | c4b7272 | 2015-11-23 13:20:41 -0800 | [diff] [blame] | 73 | } else { |
bsalomon | 2047b78 | 2015-12-21 13:12:54 -0800 | [diff] [blame] | 74 | // This may return nullptr in the common case of src-over implemented using hw blending. |
egdaniel | c4b7272 | 2015-11-23 13:20:41 -0800 | [diff] [blame] | 75 | xferProcessor.reset(GrPorterDuffXPFactory::CreateSrcOverXferProcessor( |
Brian Salomon | 92aee3d | 2016-12-21 09:20:25 -0500 | [diff] [blame] | 76 | *args.fCaps, args.fAnalysis, hasMixedSamples, &args.fDstTexture)); |
egdaniel | c4b7272 | 2015-11-23 13:20:41 -0800 | [diff] [blame] | 77 | } |
cdalton | 3ccf2e7 | 2016-05-06 09:41:16 -0700 | [diff] [blame] | 78 | GrColor overrideColor = GrColor_ILLEGAL; |
Brian Salomon | 92aee3d | 2016-12-21 09:20:25 -0500 | [diff] [blame] | 79 | if (args.fAnalysis.fColorPOI.firstEffectiveProcessorIndex() != 0) { |
| 80 | overrideColor = args.fAnalysis.fColorPOI.inputColorToFirstEffectiveProccesor(); |
joshualitt | 9b98932 | 2014-12-15 14:16:27 -0800 | [diff] [blame] | 81 | } |
| 82 | |
bsalomon | 7765a47 | 2015-07-08 11:26:37 -0700 | [diff] [blame] | 83 | GrXferProcessor::OptFlags optFlags = GrXferProcessor::kNone_OptFlags; |
egdaniel | 9513143 | 2014-12-09 11:15:43 -0800 | [diff] [blame] | 84 | |
halcanary | 9d524f2 | 2016-03-29 09:03:52 -0700 | [diff] [blame] | 85 | const GrXferProcessor* xpForOpts = xferProcessor ? xferProcessor.get() : |
bsalomon | 2047b78 | 2015-12-21 13:12:54 -0800 | [diff] [blame] | 86 | &GrPorterDuffXPFactory::SimpleSrcOverXP(); |
Brian Salomon | 92aee3d | 2016-12-21 09:20:25 -0500 | [diff] [blame] | 87 | optFlags = xpForOpts->getOptimizations(args.fAnalysis, |
csmartdalton | c633abb | 2016-11-01 08:55:55 -0700 | [diff] [blame] | 88 | userStencil->doesWrite(args.fHasStencilClip), |
bsalomon | 2047b78 | 2015-12-21 13:12:54 -0800 | [diff] [blame] | 89 | &overrideColor, |
| 90 | *args.fCaps); |
bsalomon | c8d3f57 | 2015-08-13 06:44:04 -0700 | [diff] [blame] | 91 | |
| 92 | // When path rendering the stencil settings are not always set on the GrPipelineBuilder |
| 93 | // so we must check the draw type. In cases where we will skip drawing we simply return a |
| 94 | // null GrPipeline. |
| 95 | if (GrXferProcessor::kSkipDraw_OptFlag & optFlags) { |
cdalton | 93a379b | 2016-05-11 13:58:08 -0700 | [diff] [blame] | 96 | pipeline->~GrPipeline(); |
bsalomon | c8d3f57 | 2015-08-13 06:44:04 -0700 | [diff] [blame] | 97 | return nullptr; |
egdaniel | 9513143 | 2014-12-09 11:15:43 -0800 | [diff] [blame] | 98 | } |
bsalomon | b03c4a3 | 2014-11-20 09:56:11 -0800 | [diff] [blame] | 99 | |
bsalomon | 7765a47 | 2015-07-08 11:26:37 -0700 | [diff] [blame] | 100 | // No need to have an override color if it isn't even going to be used. |
| 101 | if (SkToBool(GrXferProcessor::kIgnoreColor_OptFlag & optFlags)) { |
| 102 | overrideColor = GrColor_ILLEGAL; |
| 103 | } |
| 104 | |
Hal Canary | 144caf5 | 2016-11-07 17:57:18 -0500 | [diff] [blame] | 105 | pipeline->fXferProcessor.reset(xferProcessor.get()); |
bsalomon | b03c4a3 | 2014-11-20 09:56:11 -0800 | [diff] [blame] | 106 | |
Brian Salomon | 92aee3d | 2016-12-21 09:20:25 -0500 | [diff] [blame] | 107 | int firstColorProcessorIdx = args.fAnalysis.fColorPOI.firstEffectiveProcessorIndex(); |
egdaniel | 912b3d2 | 2014-11-17 07:45:53 -0800 | [diff] [blame] | 108 | |
bsalomon | ac856c9 | 2015-08-27 06:30:17 -0700 | [diff] [blame] | 109 | // TODO: Once we can handle single or four channel input into coverage GrFragmentProcessors |
| 110 | // then we can use GrPipelineBuilder's coverageProcInfo (like color above) to set this initial |
| 111 | // information. |
| 112 | int firstCoverageProcessorIdx = 0; |
egdaniel | 912b3d2 | 2014-11-17 07:45:53 -0800 | [diff] [blame] | 113 | |
Brian Salomon | bfd5183 | 2017-01-04 13:22:08 -0500 | [diff] [blame] | 114 | if ((optFlags & GrXferProcessor::kIgnoreColor_OptFlag) || |
| 115 | (optFlags & GrXferProcessor::kOverrideColor_OptFlag)) { |
| 116 | firstColorProcessorIdx = builder.numColorFragmentProcessors(); |
| 117 | } |
egdaniel | 9513143 | 2014-12-09 11:15:43 -0800 | [diff] [blame] | 118 | |
joshualitt | 290c09b | 2014-12-19 13:45:20 -0800 | [diff] [blame] | 119 | bool usesLocalCoords = false; |
| 120 | |
bsalomon | ac856c9 | 2015-08-27 06:30:17 -0700 | [diff] [blame] | 121 | // Copy GrFragmentProcessors from GrPipelineBuilder to Pipeline |
| 122 | pipeline->fNumColorProcessors = builder.numColorFragmentProcessors() - firstColorProcessorIdx; |
| 123 | int numTotalProcessors = pipeline->fNumColorProcessors + |
| 124 | builder.numCoverageFragmentProcessors() - firstCoverageProcessorIdx; |
| 125 | pipeline->fFragmentProcessors.reset(numTotalProcessors); |
| 126 | int currFPIdx = 0; |
| 127 | for (int i = firstColorProcessorIdx; i < builder.numColorFragmentProcessors(); |
| 128 | ++i, ++currFPIdx) { |
| 129 | const GrFragmentProcessor* fp = builder.getColorFragmentProcessor(i); |
| 130 | pipeline->fFragmentProcessors[currFPIdx].reset(fp); |
joshualitt | 2fe7923 | 2015-08-05 12:02:27 -0700 | [diff] [blame] | 131 | usesLocalCoords = usesLocalCoords || fp->usesLocalCoords(); |
bsalomon | ae59b77 | 2014-11-19 08:23:49 -0800 | [diff] [blame] | 132 | } |
egdaniel | 9513143 | 2014-12-09 11:15:43 -0800 | [diff] [blame] | 133 | |
bsalomon | ac856c9 | 2015-08-27 06:30:17 -0700 | [diff] [blame] | 134 | for (int i = firstCoverageProcessorIdx; i < builder.numCoverageFragmentProcessors(); |
| 135 | ++i, ++currFPIdx) { |
| 136 | const GrFragmentProcessor* fp = builder.getCoverageFragmentProcessor(i); |
| 137 | pipeline->fFragmentProcessors[currFPIdx].reset(fp); |
joshualitt | 2fe7923 | 2015-08-05 12:02:27 -0700 | [diff] [blame] | 138 | usesLocalCoords = usesLocalCoords || fp->usesLocalCoords(); |
egdaniel | 9cf45bf | 2014-10-08 06:49:10 -0700 | [diff] [blame] | 139 | } |
joshualitt | 79f8fae | 2014-10-28 17:59:26 -0700 | [diff] [blame] | 140 | |
bsalomon | 7765a47 | 2015-07-08 11:26:37 -0700 | [diff] [blame] | 141 | // Setup info we need to pass to GrPrimitiveProcessors that are used with this GrPipeline. |
Brian Salomon | 92aee3d | 2016-12-21 09:20:25 -0500 | [diff] [blame] | 142 | optimizations->fFlags = 0; |
bsalomon | 7765a47 | 2015-07-08 11:26:37 -0700 | [diff] [blame] | 143 | if (GrColor_ILLEGAL != overrideColor) { |
Brian Salomon | 92aee3d | 2016-12-21 09:20:25 -0500 | [diff] [blame] | 144 | optimizations->fFlags |= GrPipelineOptimizations::kUseOverrideColor_Flag; |
| 145 | optimizations->fOverrideColor = overrideColor; |
bsalomon | 7765a47 | 2015-07-08 11:26:37 -0700 | [diff] [blame] | 146 | } |
bsalomon | 7765a47 | 2015-07-08 11:26:37 -0700 | [diff] [blame] | 147 | if (usesLocalCoords) { |
Brian Salomon | 92aee3d | 2016-12-21 09:20:25 -0500 | [diff] [blame] | 148 | optimizations->fFlags |= GrPipelineOptimizations::kReadsLocalCoords_Flag; |
bsalomon | 7765a47 | 2015-07-08 11:26:37 -0700 | [diff] [blame] | 149 | } |
| 150 | if (SkToBool(optFlags & GrXferProcessor::kCanTweakAlphaForCoverage_OptFlag)) { |
Brian Salomon | 92aee3d | 2016-12-21 09:20:25 -0500 | [diff] [blame] | 151 | optimizations->fFlags |= GrPipelineOptimizations::kCanTweakAlphaForCoverage_Flag; |
bsalomon | 7765a47 | 2015-07-08 11:26:37 -0700 | [diff] [blame] | 152 | } |
bsalomon | 2d56303 | 2015-08-13 07:08:31 -0700 | [diff] [blame] | 153 | |
| 154 | GrXPFactory::InvariantBlendedColor blendedColor; |
egdaniel | c4b7272 | 2015-11-23 13:20:41 -0800 | [diff] [blame] | 155 | if (xpFactory) { |
Brian Salomon | 92aee3d | 2016-12-21 09:20:25 -0500 | [diff] [blame] | 156 | xpFactory->getInvariantBlendedColor(args.fAnalysis.fColorPOI, &blendedColor); |
egdaniel | c4b7272 | 2015-11-23 13:20:41 -0800 | [diff] [blame] | 157 | } else { |
Brian Salomon | 92aee3d | 2016-12-21 09:20:25 -0500 | [diff] [blame] | 158 | GrPorterDuffXPFactory::SrcOverInvariantBlendedColor(args.fAnalysis.fColorPOI.color(), |
| 159 | args.fAnalysis.fColorPOI.validFlags(), |
| 160 | args.fAnalysis.fColorPOI.isOpaque(), |
halcanary | 9d524f2 | 2016-03-29 09:03:52 -0700 | [diff] [blame] | 161 | &blendedColor); |
egdaniel | c4b7272 | 2015-11-23 13:20:41 -0800 | [diff] [blame] | 162 | } |
bsalomon | 2d56303 | 2015-08-13 07:08:31 -0700 | [diff] [blame] | 163 | if (blendedColor.fWillBlendWithDst) { |
Brian Salomon | 92aee3d | 2016-12-21 09:20:25 -0500 | [diff] [blame] | 164 | optimizations->fFlags |= GrPipelineOptimizations::kWillColorBlendWithDst_Flag; |
bsalomon | 2d56303 | 2015-08-13 07:08:31 -0700 | [diff] [blame] | 165 | } |
| 166 | |
bsalomon | c699873 | 2015-08-10 12:01:15 -0700 | [diff] [blame] | 167 | return pipeline; |
egdaniel | c064824 | 2014-09-22 13:17:02 -0700 | [diff] [blame] | 168 | } |
| 169 | |
robertphillips | 498d7ac | 2015-10-30 10:11:30 -0700 | [diff] [blame] | 170 | static void add_dependencies_for_processor(const GrFragmentProcessor* proc, GrRenderTarget* rt) { |
bsalomon | b58a2b4 | 2016-09-26 06:55:02 -0700 | [diff] [blame] | 171 | GrFragmentProcessor::TextureAccessIter iter(proc); |
Brian Salomon | 0bbecb2 | 2016-11-17 11:38:22 -0500 | [diff] [blame] | 172 | while (const GrProcessor::TextureSampler* sampler = iter.next()) { |
Robert Phillips | f2361d2 | 2016-10-25 14:20:06 -0400 | [diff] [blame] | 173 | SkASSERT(rt->getLastOpList()); |
Brian Salomon | db4183d | 2016-11-17 12:48:40 -0500 | [diff] [blame] | 174 | rt->getLastOpList()->addDependency(sampler->texture()); |
robertphillips | 498d7ac | 2015-10-30 10:11:30 -0700 | [diff] [blame] | 175 | } |
| 176 | } |
| 177 | |
| 178 | void GrPipeline::addDependenciesTo(GrRenderTarget* rt) const { |
| 179 | for (int i = 0; i < fFragmentProcessors.count(); ++i) { |
| 180 | add_dependencies_for_processor(fFragmentProcessors[i].get(), rt); |
| 181 | } |
| 182 | |
bsalomon | 2047b78 | 2015-12-21 13:12:54 -0800 | [diff] [blame] | 183 | const GrXferProcessor& xfer = this->getXferProcessor(); |
robertphillips | 498d7ac | 2015-10-30 10:11:30 -0700 | [diff] [blame] | 184 | |
Brian Salomon | 0bbecb2 | 2016-11-17 11:38:22 -0500 | [diff] [blame] | 185 | for (int i = 0; i < xfer.numTextureSamplers(); ++i) { |
Brian Salomon | db4183d | 2016-11-17 12:48:40 -0500 | [diff] [blame] | 186 | GrTexture* texture = xfer.textureSampler(i).texture(); |
Robert Phillips | f2361d2 | 2016-10-25 14:20:06 -0400 | [diff] [blame] | 187 | SkASSERT(rt->getLastOpList()); |
| 188 | rt->getLastOpList()->addDependency(texture); |
robertphillips | 498d7ac | 2015-10-30 10:11:30 -0700 | [diff] [blame] | 189 | } |
| 190 | } |
| 191 | |
egdaniel | 89af44a | 2014-09-26 06:15:04 -0700 | [diff] [blame] | 192 | //////////////////////////////////////////////////////////////////////////////// |
| 193 | |
bsalomon | 7312ff8 | 2016-09-12 08:55:38 -0700 | [diff] [blame] | 194 | bool GrPipeline::AreEqual(const GrPipeline& a, const GrPipeline& b) { |
bsalomon | cb02b38 | 2015-08-12 11:14:50 -0700 | [diff] [blame] | 195 | SkASSERT(&a != &b); |
joshualitt | 8cab9a7 | 2015-07-16 09:13:50 -0700 | [diff] [blame] | 196 | |
bsalomon | cb02b38 | 2015-08-12 11:14:50 -0700 | [diff] [blame] | 197 | if (a.getRenderTarget() != b.getRenderTarget() || |
bsalomon | ac856c9 | 2015-08-27 06:30:17 -0700 | [diff] [blame] | 198 | a.fFragmentProcessors.count() != b.fFragmentProcessors.count() || |
| 199 | a.fNumColorProcessors != b.fNumColorProcessors || |
bsalomon | cb02b38 | 2015-08-12 11:14:50 -0700 | [diff] [blame] | 200 | a.fScissorState != b.fScissorState || |
csmartdalton | bf4a8f9 | 2016-09-06 10:01:06 -0700 | [diff] [blame] | 201 | !a.fWindowRectsState.cheapEqualTo(b.fWindowRectsState) || |
bsalomon | cb02b38 | 2015-08-12 11:14:50 -0700 | [diff] [blame] | 202 | a.fFlags != b.fFlags || |
csmartdalton | c633abb | 2016-11-01 08:55:55 -0700 | [diff] [blame] | 203 | a.fUserStencilSettings != b.fUserStencilSettings || |
Brian Salomon | 8c852be | 2017-01-04 10:44:42 -0500 | [diff] [blame] | 204 | a.fDrawFace != b.fDrawFace) { |
egdaniel | 89af44a | 2014-09-26 06:15:04 -0700 | [diff] [blame] | 205 | return false; |
| 206 | } |
| 207 | |
bsalomon | 2047b78 | 2015-12-21 13:12:54 -0800 | [diff] [blame] | 208 | // Most of the time both are nullptr |
| 209 | if (a.fXferProcessor.get() || b.fXferProcessor.get()) { |
| 210 | if (!a.getXferProcessor().isEqual(b.getXferProcessor())) { |
| 211 | return false; |
| 212 | } |
egdaniel | c230414 | 2014-12-11 13:15:13 -0800 | [diff] [blame] | 213 | } |
| 214 | |
bsalomon | ac856c9 | 2015-08-27 06:30:17 -0700 | [diff] [blame] | 215 | for (int i = 0; i < a.numFragmentProcessors(); i++) { |
bsalomon | 7312ff8 | 2016-09-12 08:55:38 -0700 | [diff] [blame] | 216 | if (!a.getFragmentProcessor(i).isEqual(b.getFragmentProcessor(i))) { |
egdaniel | 89af44a | 2014-09-26 06:15:04 -0700 | [diff] [blame] | 217 | return false; |
| 218 | } |
| 219 | } |
egdaniel | 89af44a | 2014-09-26 06:15:04 -0700 | [diff] [blame] | 220 | return true; |
| 221 | } |