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