OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #include "GrFragmentProcessor.h" | 9 #include "GrFragmentProcessor.h" |
10 #include "GrCoordTransform.h" | 10 #include "GrCoordTransform.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 child->fCoordTransforms.begin()); | 89 child->fCoordTransforms.begin()); |
90 } | 90 } |
91 if (!child->fTextureAccesses.empty()) { | 91 if (!child->fTextureAccesses.empty()) { |
92 fTextureAccesses.push_back_n(child->fTextureAccesses.count(), | 92 fTextureAccesses.push_back_n(child->fTextureAccesses.count(), |
93 child->fTextureAccesses.begin()); | 93 child->fTextureAccesses.begin()); |
94 } | 94 } |
95 | 95 |
96 int index = fChildProcessors.count(); | 96 int index = fChildProcessors.count(); |
97 fChildProcessors.push_back(SkRef(child)); | 97 fChildProcessors.push_back(SkRef(child)); |
98 | 98 |
99 if (child->willReadFragmentPosition()) { | 99 this->combineRequiredFeatures(*child); |
100 this->setWillReadFragmentPosition(); | |
101 } | |
102 | 100 |
103 if (child->usesLocalCoords()) { | 101 if (child->usesLocalCoords()) { |
104 fUsesLocalCoords = true; | 102 fUsesLocalCoords = true; |
105 } | 103 } |
106 | 104 |
107 return index; | 105 return index; |
108 } | 106 } |
109 | 107 |
110 void GrFragmentProcessor::notifyRefCntIsZero() const { | 108 void GrFragmentProcessor::notifyRefCntIsZero() const { |
111 // See comment above GrProgramElement for a detailed explanation of why we d
o this. | 109 // See comment above GrProgramElement for a detailed explanation of why we d
o this. |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 } | 367 } |
370 } | 368 } |
371 | 369 |
372 if (1 == cnt) { | 370 if (1 == cnt) { |
373 return SkRef(series[0]); | 371 return SkRef(series[0]); |
374 } else { | 372 } else { |
375 return new SeriesFragmentProcessor(series, cnt); | 373 return new SeriesFragmentProcessor(series, cnt); |
376 } | 374 } |
377 } | 375 } |
378 | 376 |
OLD | NEW |