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

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

Issue 149243009: Add support for lazy transformers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 years, 10 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
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 lastPhase = lastPhase.addPhase(phase); 59 lastPhase = lastPhase.addPhase(phase);
60 _phases.add(lastPhase); 60 _phases.add(lastPhase);
61 } 61 }
62 62
63 for (var phase in _phases) { 63 for (var phase in _phases) {
64 _onDirtyPool.add(phase.onDirty); 64 _onDirtyPool.add(phase.onDirty);
65 _onLogPool.add(phase.onLog); 65 _onLogPool.add(phase.onLog);
66 } 66 }
67 } 67 }
68 68
69 /// Force all [LazyTransformer]s' transforms in this group to begin producing
70 /// concrete assets.
71 void forceAllTransforms() {
72 for (var phase in _phases) {
73 phase.forceAllTransforms();
74 }
75 }
76
69 /// Adds a new asset as an input for this group. 77 /// Adds a new asset as an input for this group.
70 void addInput(AssetNode node) { 78 void addInput(AssetNode node) {
71 _phases.first.addInput(node); 79 _phases.first.addInput(node);
72 } 80 }
73 81
74 /// Removes this group and all sub-phases within it. 82 /// Removes this group and all sub-phases within it.
75 void remove() { 83 void remove() {
76 _phases.first.remove(); 84 _phases.first.remove();
77 } 85 }
78 86
(...skipping 14 matching lines...) Expand all
93 for (var output in newOutputs) { 101 for (var output in newOutputs) {
94 output.whenRemoved(() => _alreadyEmittedOutputs.remove(output)); 102 output.whenRemoved(() => _alreadyEmittedOutputs.remove(output));
95 } 103 }
96 _alreadyEmittedOutputs.addAll(newOutputs); 104 _alreadyEmittedOutputs.addAll(newOutputs);
97 105
98 return new Future.value(newOutputs); 106 return new Future.value(newOutputs);
99 } 107 }
100 108
101 String toString() => "group in phase $_location for $_group"; 109 String toString() => "group in phase $_location for $_group";
102 } 110 }
OLDNEW
« no previous file with comments | « pkg/barback/lib/src/declaring_transformer.dart ('k') | pkg/barback/lib/src/lazy_transformer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698