Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Side by Side Diff: pkg/barback/lib/src/group_runner.dart

Issue 200983002: Re-run a transform when a secondary input starts existing. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/barback/lib/src/asset_cascade.dart ('k') | pkg/barback/lib/src/phase.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.group_runner; 5 library barback.group_runner;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'asset_cascade.dart'; 9 import 'asset_cascade.dart';
10 import 'asset_node.dart'; 10 import 'asset_node.dart';
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 /// propagated as soon as they occur. 46 /// propagated as soon as they occur.
47 Stream<AssetNode> get onAsset => _onAsset; 47 Stream<AssetNode> get onAsset => _onAsset;
48 Stream<AssetNode> _onAsset; 48 Stream<AssetNode> _onAsset;
49 49
50 /// A stream that emits an event whenever any transforms in this group logs 50 /// A stream that emits an event whenever any transforms in this group logs
51 /// an entry. 51 /// an entry.
52 Stream<LogEntry> get onLog => _onLogPool.stream; 52 Stream<LogEntry> get onLog => _onLogPool.stream;
53 final _onLogPool = new StreamPool<LogEntry>.broadcast(); 53 final _onLogPool = new StreamPool<LogEntry>.broadcast();
54 54
55 GroupRunner(AssetCascade cascade, this._group, this._location) { 55 GroupRunner(AssetCascade cascade, this._group, this._location) {
56 _addPhase(new Phase(cascade, _location), _group.phases.first); 56 _addPhase(new Phase(cascade, _location), []);
57 for (var phase in _group.phases.skip(1)) { 57 for (var phase in _group.phases) {
58 _addPhase(_phases.last.addPhase(), phase); 58 _addPhase(_phases.last.addPhase(), phase);
59 } 59 }
60 60
61 _onAsset = _phases.last.onAsset; 61 _onAsset = _phases.last.onAsset;
62 _onDone = _phases.last.onDone; 62 _onDone = _phases.last.onDone;
63 } 63 }
64 64
65 /// Add a phase with [contents] to [this]'s list of phases. 65 /// Add a phase with [contents] to [this]'s list of phases.
66 /// 66 ///
67 /// [contents] should be an inner [Iterable] from a [TransformGroup.phases] 67 /// [contents] should be an inner [Iterable] from a [TransformGroup.phases]
(...skipping 19 matching lines...) Expand all
87 87
88 /// Removes this group and all sub-phases within it. 88 /// Removes this group and all sub-phases within it.
89 void remove() { 89 void remove() {
90 for (var phase in _phases) { 90 for (var phase in _phases) {
91 phase.remove(); 91 phase.remove();
92 } 92 }
93 } 93 }
94 94
95 String toString() => "group in phase $_location for $_group"; 95 String toString() => "group in phase $_location for $_group";
96 } 96 }
OLDNEW
« no previous file with comments | « pkg/barback/lib/src/asset_cascade.dart ('k') | pkg/barback/lib/src/phase.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698