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

Unified Diff: pkg/barback/lib/src/asset_cascade.dart

Issue 149243009: Add support for lazy transformers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: name changes 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 side-by-side diff with in-line comments
Download patch
Index: pkg/barback/lib/src/asset_cascade.dart
diff --git a/pkg/barback/lib/src/asset_cascade.dart b/pkg/barback/lib/src/asset_cascade.dart
index 3454899df307c0e467193d74aa165abd342400b6..679bf12ba10921bf15fe15917606bbf55e440955 100644
--- a/pkg/barback/lib/src/asset_cascade.dart
+++ b/pkg/barback/lib/src/asset_cascade.dart
@@ -151,9 +151,9 @@ class AssetCascade {
// If the requested asset is available, we can just return it.
if (node != null && node.state.isAvailable) return node;
- // If there's a build running, that build might generate the asset, so we
- // wait for it to complete and then try again.
if (_processDone != null) {
+ // If there's a build running, that build might generate the asset, so
+ // we wait for it to complete and then try again.
return _processDone.then((_) => getAssetNode(id));
}
@@ -233,6 +233,14 @@ class AssetCascade {
}
}
+ /// Force all [LazyTransformer]s' transforms in this cascade to begin
+ /// producing concrete assets.
+ void forceAllTransforms() {
+ for (var phase in _phases) {
+ phase.forceAllTransforms();
+ }
+ }
+
void reportError(BarbackException error) {
_accumulatedErrors.add(error);
_errorsController.add(error);

Powered by Google App Engine
This is Rietveld 408576698