| 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 30 matching lines...) Expand all Loading... |
| 41 } | 41 } |
| 42 if (builder.snapVerticesToPixelCenters()) { | 42 if (builder.snapVerticesToPixelCenters()) { |
| 43 pipeline->fFlags |= kSnapVertices_Flag; | 43 pipeline->fFlags |= kSnapVertices_Flag; |
| 44 } | 44 } |
| 45 if (builder.getDisableOutputConversionToSRGB()) { | 45 if (builder.getDisableOutputConversionToSRGB()) { |
| 46 pipeline->fFlags |= kDisableOutputConversionToSRGB_Flag; | 46 pipeline->fFlags |= kDisableOutputConversionToSRGB_Flag; |
| 47 } | 47 } |
| 48 if (builder.getAllowSRGBInputs()) { | 48 if (builder.getAllowSRGBInputs()) { |
| 49 pipeline->fFlags |= kAllowSRGBInputs_Flag; | 49 pipeline->fFlags |= kAllowSRGBInputs_Flag; |
| 50 } | 50 } |
| 51 if (builder.getUsesDistanceVectorField()) { | |
| 52 pipeline->fFlags |= kUsesDistanceVectorField_Flag; | |
| 53 } | |
| 54 if (args.fHasStencilClip) { | 51 if (args.fHasStencilClip) { |
| 55 pipeline->fFlags |= kHasStencilClip_Flag; | 52 pipeline->fFlags |= kHasStencilClip_Flag; |
| 56 } | 53 } |
| 57 | 54 |
| 58 // Create XferProcessor from DS's XPFactory | 55 // Create XferProcessor from DS's XPFactory |
| 59 bool hasMixedSamples = args.fDrawContext->hasMixedSamples() && | 56 bool hasMixedSamples = args.fDrawContext->hasMixedSamples() && |
| 60 (builder.isHWAntialias() || !pipeline->fStencilSettin
gs.isDisabled()); | 57 (builder.isHWAntialias() || !pipeline->fStencilSettin
gs.isDisabled()); |
| 61 const GrXPFactory* xpFactory = builder.getXPFactory(); | 58 const GrXPFactory* xpFactory = builder.getXPFactory(); |
| 62 SkAutoTUnref<GrXferProcessor> xferProcessor; | 59 SkAutoTUnref<GrXferProcessor> xferProcessor; |
| 63 if (xpFactory) { | 60 if (xpFactory) { |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 } | 240 } |
| 244 } | 241 } |
| 245 | 242 |
| 246 for (int i = 0; i < a.numFragmentProcessors(); i++) { | 243 for (int i = 0; i < a.numFragmentProcessors(); i++) { |
| 247 if (!a.getFragmentProcessor(i).isEqual(b.getFragmentProcessor(i), ignore
CoordTransforms)) { | 244 if (!a.getFragmentProcessor(i).isEqual(b.getFragmentProcessor(i), ignore
CoordTransforms)) { |
| 248 return false; | 245 return false; |
| 249 } | 246 } |
| 250 } | 247 } |
| 251 return true; | 248 return true; |
| 252 } | 249 } |
| OLD | NEW |