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" |
robertphillips | 498d7ac | 2015-10-30 10:11:30 -0700 | [diff] [blame] | 11 | #include "GrDrawTarget.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" |
egdaniel | 9513143 | 2014-12-09 11:15:43 -0800 | [diff] [blame] | 15 | #include "GrXferProcessor.h" |
egdaniel | 3658f38 | 2014-09-15 07:01:59 -0700 | [diff] [blame] | 16 | |
joshualitt | 7441782 | 2015-08-07 11:42:16 -0700 | [diff] [blame] | 17 | #include "batches/GrBatch.h" |
| 18 | |
bsalomon | a387a11 | 2015-08-11 14:47:42 -0700 | [diff] [blame] | 19 | GrPipeline* GrPipeline::CreateAt(void* memory, const CreateArgs& args, |
ethannicholas | ff21032 | 2015-11-24 12:10:10 -0800 | [diff] [blame] | 20 | GrXPOverridesForBatch* overrides) { |
bsalomon | a387a11 | 2015-08-11 14:47:42 -0700 | [diff] [blame] | 21 | const GrPipelineBuilder& builder = *args.fPipelineBuilder; |
bsalomon | c699873 | 2015-08-10 12:01:15 -0700 | [diff] [blame] | 22 | |
egdaniel | 9513143 | 2014-12-09 11:15:43 -0800 | [diff] [blame] | 23 | // Create XferProcessor from DS's XPFactory |
egdaniel | c4b7272 | 2015-11-23 13:20:41 -0800 | [diff] [blame] | 24 | const GrXPFactory* xpFactory = builder.getXPFactory(); |
| 25 | SkAutoTUnref<GrXferProcessor> xferProcessor; |
| 26 | if (xpFactory) { |
ethannicholas | de4166a | 2015-11-30 08:57:38 -0800 | [diff] [blame] | 27 | xferProcessor.reset(xpFactory->createXferProcessor(args.fOpts, |
egdaniel | c4b7272 | 2015-11-23 13:20:41 -0800 | [diff] [blame] | 28 | builder.hasMixedSamples(), |
| 29 | &args.fDstTexture, |
| 30 | *args.fCaps)); |
bsalomon | 2047b78 | 2015-12-21 13:12:54 -0800 | [diff] [blame^] | 31 | if (!xferProcessor) { |
| 32 | return nullptr; |
| 33 | } |
egdaniel | c4b7272 | 2015-11-23 13:20:41 -0800 | [diff] [blame] | 34 | } else { |
bsalomon | 2047b78 | 2015-12-21 13:12:54 -0800 | [diff] [blame^] | 35 | // 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] | 36 | xferProcessor.reset(GrPorterDuffXPFactory::CreateSrcOverXferProcessor( |
| 37 | *args.fCaps, |
ethannicholas | de4166a | 2015-11-30 08:57:38 -0800 | [diff] [blame] | 38 | args.fOpts, |
egdaniel | c4b7272 | 2015-11-23 13:20:41 -0800 | [diff] [blame] | 39 | builder.hasMixedSamples(), |
| 40 | &args.fDstTexture)); |
| 41 | } |
bsalomon | 2047b78 | 2015-12-21 13:12:54 -0800 | [diff] [blame^] | 42 | GrColor overrideColor = GrColor_ILLEGAL; |
ethannicholas | ff21032 | 2015-11-24 12:10:10 -0800 | [diff] [blame] | 43 | if (args.fOpts.fColorPOI.firstEffectiveProcessorIndex() != 0) { |
| 44 | overrideColor = args.fOpts.fColorPOI.inputColorToFirstEffectiveProccesor(); |
joshualitt | 9b98932 | 2014-12-15 14:16:27 -0800 | [diff] [blame] | 45 | } |
| 46 | |
bsalomon | 7765a47 | 2015-07-08 11:26:37 -0700 | [diff] [blame] | 47 | GrXferProcessor::OptFlags optFlags = GrXferProcessor::kNone_OptFlags; |
egdaniel | 9513143 | 2014-12-09 11:15:43 -0800 | [diff] [blame] | 48 | |
bsalomon | 2047b78 | 2015-12-21 13:12:54 -0800 | [diff] [blame^] | 49 | const GrXferProcessor* xpForOpts = xferProcessor ? xferProcessor.get() : |
| 50 | &GrPorterDuffXPFactory::SimpleSrcOverXP(); |
| 51 | optFlags = xpForOpts->getOptimizations(args.fOpts, |
| 52 | builder.getStencil().doesWrite(), |
| 53 | &overrideColor, |
| 54 | *args.fCaps); |
bsalomon | c8d3f57 | 2015-08-13 06:44:04 -0700 | [diff] [blame] | 55 | |
| 56 | // When path rendering the stencil settings are not always set on the GrPipelineBuilder |
| 57 | // so we must check the draw type. In cases where we will skip drawing we simply return a |
| 58 | // null GrPipeline. |
| 59 | if (GrXferProcessor::kSkipDraw_OptFlag & optFlags) { |
| 60 | return nullptr; |
egdaniel | 9513143 | 2014-12-09 11:15:43 -0800 | [diff] [blame] | 61 | } |
bsalomon | b03c4a3 | 2014-11-20 09:56:11 -0800 | [diff] [blame] | 62 | |
bsalomon | 7765a47 | 2015-07-08 11:26:37 -0700 | [diff] [blame] | 63 | // No need to have an override color if it isn't even going to be used. |
| 64 | if (SkToBool(GrXferProcessor::kIgnoreColor_OptFlag & optFlags)) { |
| 65 | overrideColor = GrColor_ILLEGAL; |
| 66 | } |
| 67 | |
halcanary | 385fe4d | 2015-08-26 13:07:48 -0700 | [diff] [blame] | 68 | GrPipeline* pipeline = new (memory) GrPipeline; |
egdaniel | c4b7272 | 2015-11-23 13:20:41 -0800 | [diff] [blame] | 69 | pipeline->fXferProcessor.reset(xferProcessor); |
bsalomon | b03c4a3 | 2014-11-20 09:56:11 -0800 | [diff] [blame] | 70 | |
bsalomon | c699873 | 2015-08-10 12:01:15 -0700 | [diff] [blame] | 71 | pipeline->fRenderTarget.reset(builder.fRenderTarget.get()); |
| 72 | SkASSERT(pipeline->fRenderTarget); |
cdalton | d472792 | 2015-11-10 12:49:06 -0800 | [diff] [blame] | 73 | pipeline->fScissorState = *args.fScissor; |
bsalomon | c699873 | 2015-08-10 12:01:15 -0700 | [diff] [blame] | 74 | pipeline->fStencilSettings = builder.getStencil(); |
| 75 | pipeline->fDrawFace = builder.getDrawFace(); |
joshualitt | 9176e2c | 2014-11-20 07:28:52 -0800 | [diff] [blame] | 76 | |
bsalomon | c699873 | 2015-08-10 12:01:15 -0700 | [diff] [blame] | 77 | pipeline->fFlags = 0; |
cdalton | d472792 | 2015-11-10 12:49:06 -0800 | [diff] [blame] | 78 | if (builder.isHWAntialias()) { |
bsalomon | c699873 | 2015-08-10 12:01:15 -0700 | [diff] [blame] | 79 | pipeline->fFlags |= kHWAA_Flag; |
bsalomon | 04ddf89 | 2014-11-19 12:36:22 -0800 | [diff] [blame] | 80 | } |
bsalomon | c699873 | 2015-08-10 12:01:15 -0700 | [diff] [blame] | 81 | if (builder.snapVerticesToPixelCenters()) { |
| 82 | pipeline->fFlags |= kSnapVertices_Flag; |
bsalomon | d79c549 | 2015-04-27 10:07:04 -0700 | [diff] [blame] | 83 | } |
bsalomon | 04ddf89 | 2014-11-19 12:36:22 -0800 | [diff] [blame] | 84 | |
ethannicholas | ff21032 | 2015-11-24 12:10:10 -0800 | [diff] [blame] | 85 | int firstColorProcessorIdx = args.fOpts.fColorPOI.firstEffectiveProcessorIndex(); |
egdaniel | 912b3d2 | 2014-11-17 07:45:53 -0800 | [diff] [blame] | 86 | |
bsalomon | ac856c9 | 2015-08-27 06:30:17 -0700 | [diff] [blame] | 87 | // TODO: Once we can handle single or four channel input into coverage GrFragmentProcessors |
| 88 | // then we can use GrPipelineBuilder's coverageProcInfo (like color above) to set this initial |
| 89 | // information. |
| 90 | int firstCoverageProcessorIdx = 0; |
egdaniel | 912b3d2 | 2014-11-17 07:45:53 -0800 | [diff] [blame] | 91 | |
ethannicholas | ff21032 | 2015-11-24 12:10:10 -0800 | [diff] [blame] | 92 | pipeline->adjustProgramFromOptimizations(builder, optFlags, args.fOpts.fColorPOI, |
| 93 | args.fOpts.fCoveragePOI, &firstColorProcessorIdx, |
| 94 | &firstCoverageProcessorIdx); |
egdaniel | 9513143 | 2014-12-09 11:15:43 -0800 | [diff] [blame] | 95 | |
joshualitt | 290c09b | 2014-12-19 13:45:20 -0800 | [diff] [blame] | 96 | bool usesLocalCoords = false; |
| 97 | |
bsalomon | ac856c9 | 2015-08-27 06:30:17 -0700 | [diff] [blame] | 98 | // Copy GrFragmentProcessors from GrPipelineBuilder to Pipeline |
| 99 | pipeline->fNumColorProcessors = builder.numColorFragmentProcessors() - firstColorProcessorIdx; |
| 100 | int numTotalProcessors = pipeline->fNumColorProcessors + |
| 101 | builder.numCoverageFragmentProcessors() - firstCoverageProcessorIdx; |
| 102 | pipeline->fFragmentProcessors.reset(numTotalProcessors); |
| 103 | int currFPIdx = 0; |
| 104 | for (int i = firstColorProcessorIdx; i < builder.numColorFragmentProcessors(); |
| 105 | ++i, ++currFPIdx) { |
| 106 | const GrFragmentProcessor* fp = builder.getColorFragmentProcessor(i); |
| 107 | pipeline->fFragmentProcessors[currFPIdx].reset(fp); |
joshualitt | 2fe7923 | 2015-08-05 12:02:27 -0700 | [diff] [blame] | 108 | usesLocalCoords = usesLocalCoords || fp->usesLocalCoords(); |
bsalomon | ae59b77 | 2014-11-19 08:23:49 -0800 | [diff] [blame] | 109 | } |
egdaniel | 9513143 | 2014-12-09 11:15:43 -0800 | [diff] [blame] | 110 | |
bsalomon | ac856c9 | 2015-08-27 06:30:17 -0700 | [diff] [blame] | 111 | for (int i = firstCoverageProcessorIdx; i < builder.numCoverageFragmentProcessors(); |
| 112 | ++i, ++currFPIdx) { |
| 113 | const GrFragmentProcessor* fp = builder.getCoverageFragmentProcessor(i); |
| 114 | pipeline->fFragmentProcessors[currFPIdx].reset(fp); |
joshualitt | 2fe7923 | 2015-08-05 12:02:27 -0700 | [diff] [blame] | 115 | usesLocalCoords = usesLocalCoords || fp->usesLocalCoords(); |
egdaniel | 9cf45bf | 2014-10-08 06:49:10 -0700 | [diff] [blame] | 116 | } |
joshualitt | 79f8fae | 2014-10-28 17:59:26 -0700 | [diff] [blame] | 117 | |
bsalomon | 7765a47 | 2015-07-08 11:26:37 -0700 | [diff] [blame] | 118 | // Setup info we need to pass to GrPrimitiveProcessors that are used with this GrPipeline. |
ethannicholas | ff21032 | 2015-11-24 12:10:10 -0800 | [diff] [blame] | 119 | overrides->fFlags = 0; |
bsalomon | 7765a47 | 2015-07-08 11:26:37 -0700 | [diff] [blame] | 120 | if (!SkToBool(optFlags & GrXferProcessor::kIgnoreColor_OptFlag)) { |
ethannicholas | ff21032 | 2015-11-24 12:10:10 -0800 | [diff] [blame] | 121 | overrides->fFlags |= GrXPOverridesForBatch::kReadsColor_Flag; |
bsalomon | 7765a47 | 2015-07-08 11:26:37 -0700 | [diff] [blame] | 122 | } |
| 123 | if (GrColor_ILLEGAL != overrideColor) { |
ethannicholas | ff21032 | 2015-11-24 12:10:10 -0800 | [diff] [blame] | 124 | overrides->fFlags |= GrXPOverridesForBatch::kUseOverrideColor_Flag; |
| 125 | overrides->fOverrideColor = overrideColor; |
bsalomon | 7765a47 | 2015-07-08 11:26:37 -0700 | [diff] [blame] | 126 | } |
| 127 | if (!SkToBool(optFlags & GrXferProcessor::kIgnoreCoverage_OptFlag)) { |
ethannicholas | ff21032 | 2015-11-24 12:10:10 -0800 | [diff] [blame] | 128 | overrides->fFlags |= GrXPOverridesForBatch::kReadsCoverage_Flag; |
bsalomon | 7765a47 | 2015-07-08 11:26:37 -0700 | [diff] [blame] | 129 | } |
| 130 | if (usesLocalCoords) { |
ethannicholas | ff21032 | 2015-11-24 12:10:10 -0800 | [diff] [blame] | 131 | overrides->fFlags |= GrXPOverridesForBatch::kReadsLocalCoords_Flag; |
bsalomon | 7765a47 | 2015-07-08 11:26:37 -0700 | [diff] [blame] | 132 | } |
| 133 | if (SkToBool(optFlags & GrXferProcessor::kCanTweakAlphaForCoverage_OptFlag)) { |
ethannicholas | ff21032 | 2015-11-24 12:10:10 -0800 | [diff] [blame] | 134 | overrides->fFlags |= GrXPOverridesForBatch::kCanTweakAlphaForCoverage_Flag; |
bsalomon | 7765a47 | 2015-07-08 11:26:37 -0700 | [diff] [blame] | 135 | } |
bsalomon | 2d56303 | 2015-08-13 07:08:31 -0700 | [diff] [blame] | 136 | |
| 137 | GrXPFactory::InvariantBlendedColor blendedColor; |
egdaniel | c4b7272 | 2015-11-23 13:20:41 -0800 | [diff] [blame] | 138 | if (xpFactory) { |
ethannicholas | ff21032 | 2015-11-24 12:10:10 -0800 | [diff] [blame] | 139 | xpFactory->getInvariantBlendedColor(args.fOpts.fColorPOI, &blendedColor); |
egdaniel | c4b7272 | 2015-11-23 13:20:41 -0800 | [diff] [blame] | 140 | } else { |
ethannicholas | ff21032 | 2015-11-24 12:10:10 -0800 | [diff] [blame] | 141 | GrPorterDuffXPFactory::SrcOverInvariantBlendedColor(args.fOpts.fColorPOI.color(), |
| 142 | args.fOpts.fColorPOI.validFlags(), |
| 143 | args.fOpts.fColorPOI.isOpaque(), |
egdaniel | c4b7272 | 2015-11-23 13:20:41 -0800 | [diff] [blame] | 144 | &blendedColor); |
| 145 | } |
bsalomon | 2d56303 | 2015-08-13 07:08:31 -0700 | [diff] [blame] | 146 | if (blendedColor.fWillBlendWithDst) { |
ethannicholas | ff21032 | 2015-11-24 12:10:10 -0800 | [diff] [blame] | 147 | overrides->fFlags |= GrXPOverridesForBatch::kWillColorBlendWithDst_Flag; |
bsalomon | 2d56303 | 2015-08-13 07:08:31 -0700 | [diff] [blame] | 148 | } |
| 149 | |
bsalomon | c699873 | 2015-08-10 12:01:15 -0700 | [diff] [blame] | 150 | return pipeline; |
egdaniel | c064824 | 2014-09-22 13:17:02 -0700 | [diff] [blame] | 151 | } |
| 152 | |
robertphillips | 498d7ac | 2015-10-30 10:11:30 -0700 | [diff] [blame] | 153 | static void add_dependencies_for_processor(const GrFragmentProcessor* proc, GrRenderTarget* rt) { |
| 154 | for (int i = 0; i < proc->numChildProcessors(); ++i) { |
| 155 | // need to recurse |
| 156 | add_dependencies_for_processor(&proc->childProcessor(i), rt); |
| 157 | } |
| 158 | |
| 159 | for (int i = 0; i < proc->numTextures(); ++i) { |
| 160 | GrTexture* texture = proc->textureAccess(i).getTexture(); |
| 161 | SkASSERT(rt->getLastDrawTarget()); |
| 162 | rt->getLastDrawTarget()->addDependency(texture); |
| 163 | } |
| 164 | } |
| 165 | |
| 166 | void GrPipeline::addDependenciesTo(GrRenderTarget* rt) const { |
| 167 | for (int i = 0; i < fFragmentProcessors.count(); ++i) { |
| 168 | add_dependencies_for_processor(fFragmentProcessors[i].get(), rt); |
| 169 | } |
| 170 | |
bsalomon | 2047b78 | 2015-12-21 13:12:54 -0800 | [diff] [blame^] | 171 | const GrXferProcessor& xfer = this->getXferProcessor(); |
robertphillips | 498d7ac | 2015-10-30 10:11:30 -0700 | [diff] [blame] | 172 | |
bsalomon | 2047b78 | 2015-12-21 13:12:54 -0800 | [diff] [blame^] | 173 | for (int i = 0; i < xfer.numTextures(); ++i) { |
| 174 | GrTexture* texture = xfer.textureAccess(i).getTexture(); |
| 175 | SkASSERT(rt->getLastDrawTarget()); |
| 176 | rt->getLastDrawTarget()->addDependency(texture); |
robertphillips | 498d7ac | 2015-10-30 10:11:30 -0700 | [diff] [blame] | 177 | } |
| 178 | } |
| 179 | |
egdaniel | 8dd688b | 2015-01-22 10:16:09 -0800 | [diff] [blame] | 180 | void GrPipeline::adjustProgramFromOptimizations(const GrPipelineBuilder& pipelineBuilder, |
| 181 | GrXferProcessor::OptFlags flags, |
| 182 | const GrProcOptInfo& colorPOI, |
| 183 | const GrProcOptInfo& coveragePOI, |
bsalomon | ac856c9 | 2015-08-27 06:30:17 -0700 | [diff] [blame] | 184 | int* firstColorProcessorIdx, |
| 185 | int* firstCoverageProcessorIdx) { |
egdaniel | 56cf6dc | 2015-11-30 10:15:58 -0800 | [diff] [blame] | 186 | fIgnoresCoverage = SkToBool(flags & GrXferProcessor::kIgnoreCoverage_OptFlag); |
bsalomon | 2047b78 | 2015-12-21 13:12:54 -0800 | [diff] [blame^] | 187 | fReadsFragPosition = this->getXferProcessor().willReadFragmentPosition(); |
egdaniel | a7dc0a8 | 2014-09-17 08:25:05 -0700 | [diff] [blame] | 188 | |
joshualitt | 9b98932 | 2014-12-15 14:16:27 -0800 | [diff] [blame] | 189 | if ((flags & GrXferProcessor::kIgnoreColor_OptFlag) || |
| 190 | (flags & GrXferProcessor::kOverrideColor_OptFlag)) { |
bsalomon | ac856c9 | 2015-08-27 06:30:17 -0700 | [diff] [blame] | 191 | *firstColorProcessorIdx = pipelineBuilder.numColorFragmentProcessors(); |
egdaniel | 9513143 | 2014-12-09 11:15:43 -0800 | [diff] [blame] | 192 | } else { |
egdaniel | 0d81b29 | 2015-11-30 09:37:46 -0800 | [diff] [blame] | 193 | if (colorPOI.readsFragPosition()) { |
egdaniel | 060a52c | 2015-04-07 07:31:11 -0700 | [diff] [blame] | 194 | fReadsFragPosition = true; |
| 195 | } |
egdaniel | a7dc0a8 | 2014-09-17 08:25:05 -0700 | [diff] [blame] | 196 | } |
egdaniel | 9513143 | 2014-12-09 11:15:43 -0800 | [diff] [blame] | 197 | |
joshualitt | 9b98932 | 2014-12-15 14:16:27 -0800 | [diff] [blame] | 198 | if (flags & GrXferProcessor::kIgnoreCoverage_OptFlag) { |
bsalomon | ac856c9 | 2015-08-27 06:30:17 -0700 | [diff] [blame] | 199 | *firstCoverageProcessorIdx = pipelineBuilder.numCoverageFragmentProcessors(); |
egdaniel | 9513143 | 2014-12-09 11:15:43 -0800 | [diff] [blame] | 200 | } else { |
egdaniel | 9513143 | 2014-12-09 11:15:43 -0800 | [diff] [blame] | 201 | if (coveragePOI.readsFragPosition()) { |
bsalomon | 50785a3 | 2015-02-06 07:02:37 -0800 | [diff] [blame] | 202 | fReadsFragPosition = true; |
egdaniel | 9513143 | 2014-12-09 11:15:43 -0800 | [diff] [blame] | 203 | } |
egdaniel | a7dc0a8 | 2014-09-17 08:25:05 -0700 | [diff] [blame] | 204 | } |
| 205 | } |
| 206 | |
egdaniel | 89af44a | 2014-09-26 06:15:04 -0700 | [diff] [blame] | 207 | //////////////////////////////////////////////////////////////////////////////// |
| 208 | |
bsalomon | cb02b38 | 2015-08-12 11:14:50 -0700 | [diff] [blame] | 209 | bool GrPipeline::AreEqual(const GrPipeline& a, const GrPipeline& b, |
| 210 | bool ignoreCoordTransforms) { |
| 211 | SkASSERT(&a != &b); |
joshualitt | 8cab9a7 | 2015-07-16 09:13:50 -0700 | [diff] [blame] | 212 | |
bsalomon | cb02b38 | 2015-08-12 11:14:50 -0700 | [diff] [blame] | 213 | if (a.getRenderTarget() != b.getRenderTarget() || |
bsalomon | ac856c9 | 2015-08-27 06:30:17 -0700 | [diff] [blame] | 214 | a.fFragmentProcessors.count() != b.fFragmentProcessors.count() || |
| 215 | a.fNumColorProcessors != b.fNumColorProcessors || |
bsalomon | cb02b38 | 2015-08-12 11:14:50 -0700 | [diff] [blame] | 216 | a.fScissorState != b.fScissorState || |
| 217 | a.fFlags != b.fFlags || |
| 218 | a.fStencilSettings != b.fStencilSettings || |
| 219 | a.fDrawFace != b.fDrawFace) { |
egdaniel | 89af44a | 2014-09-26 06:15:04 -0700 | [diff] [blame] | 220 | return false; |
| 221 | } |
| 222 | |
bsalomon | 2047b78 | 2015-12-21 13:12:54 -0800 | [diff] [blame^] | 223 | // Most of the time both are nullptr |
| 224 | if (a.fXferProcessor.get() || b.fXferProcessor.get()) { |
| 225 | if (!a.getXferProcessor().isEqual(b.getXferProcessor())) { |
| 226 | return false; |
| 227 | } |
egdaniel | c230414 | 2014-12-11 13:15:13 -0800 | [diff] [blame] | 228 | } |
| 229 | |
bsalomon | ac856c9 | 2015-08-27 06:30:17 -0700 | [diff] [blame] | 230 | for (int i = 0; i < a.numFragmentProcessors(); i++) { |
| 231 | if (!a.getFragmentProcessor(i).isEqual(b.getFragmentProcessor(i), ignoreCoordTransforms)) { |
egdaniel | 89af44a | 2014-09-26 06:15:04 -0700 | [diff] [blame] | 232 | return false; |
| 233 | } |
| 234 | } |
egdaniel | 89af44a | 2014-09-26 06:15:04 -0700 | [diff] [blame] | 235 | return true; |
| 236 | } |
| 237 | |