| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library barback.phase_forwarder; | 5 library barback.phase_forwarder; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'asset_node.dart'; | 9 import 'asset_node.dart'; |
| 10 import 'asset_forwarder.dart'; | |
| 11 import 'phase_output.dart'; | |
| 12 | 10 |
| 13 /// A class that takes care of forwarding assets within a phase. | 11 /// A class that takes care of forwarding assets within a phase. |
| 14 /// | 12 /// |
| 15 /// Each phase contains one or more channels that process its input assets. The | 13 /// Each phase contains one or more channels that process its input assets. The |
| 16 /// non-grouped transformers for that phase are one such channel, and each | 14 /// non-grouped transformers for that phase are one such channel, and each |
| 17 /// [TransformerGroup] in that phase is another. For each input asset, each | 15 /// [TransformerGroup] in that phase is another. For each input asset, each |
| 18 /// channel individually decides whether to forward that asset based on whether | 16 /// channel individually decides whether to forward that asset based on whether |
| 19 /// that channel uses it. If a channel does decide to forward an asset, we call | 17 /// that channel uses it. If a channel does decide to forward an asset, we call |
| 20 /// that forwarded asset an "intermediate forwarded asset" to distinguish it | 18 /// that forwarded asset an "intermediate forwarded asset" to distinguish it |
| 21 /// from the output of a [PhaseForwarder]. | 19 /// from the output of a [PhaseForwarder]. |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 // intermediate assets are dirty. | 120 // intermediate assets are dirty. |
| 123 if (_intermediateAssets.any((asset) => asset.state.isDirty)) { | 121 if (_intermediateAssets.any((asset) => asset.state.isDirty)) { |
| 124 if (!_outputController.node.state.isDirty) _outputController.setDirty(); | 122 if (!_outputController.node.state.isDirty) _outputController.setDirty(); |
| 125 } else { | 123 } else { |
| 126 if (!_outputController.node.state.isAvailable) { | 124 if (!_outputController.node.state.isAvailable) { |
| 127 _outputController.setAvailable(_intermediateAssets.first.asset); | 125 _outputController.setAvailable(_intermediateAssets.first.asset); |
| 128 } | 126 } |
| 129 } | 127 } |
| 130 } | 128 } |
| 131 } | 129 } |
| OLD | NEW |