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

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

Issue 255283003: Don't assume that a transform node is consistently deferred or not. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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.phase_input; 5 library barback.phase_input;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'asset_forwarder.dart'; 9 import 'asset_forwarder.dart';
10 import 'asset_node.dart'; 10 import 'asset_node.dart';
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 StreamSubscription _inputSubscription; 43 StreamSubscription _inputSubscription;
44 44
45 /// The streams exposed by this input. 45 /// The streams exposed by this input.
46 final _streams = new NodeStreams(); 46 final _streams = new NodeStreams();
47 Stream get onStatusChange => _streams.onStatusChange; 47 Stream get onStatusChange => _streams.onStatusChange;
48 Stream<AssetNode> get onAsset => _streams.onAsset; 48 Stream<AssetNode> get onAsset => _streams.onAsset;
49 Stream<LogEntry> get onLog => _streams.onLog; 49 Stream<LogEntry> get onLog => _streams.onLog;
50 50
51 /// How far along [this] is in processing its assets. 51 /// How far along [this] is in processing its assets.
52 NodeStatus get status { 52 NodeStatus get status {
53 var status = input.state.isDirty && !input.deferred ? 53 var status = input.state.isDirty && !input.isLazy ?
54 NodeStatus.MATERIALIZING : NodeStatus.IDLE; 54 NodeStatus.MATERIALIZING : NodeStatus.IDLE;
55 return status.dirtier(NodeStatus.dirtiest( 55 return status.dirtier(NodeStatus.dirtiest(
56 _transforms.map((transform) => transform.status))); 56 _transforms.map((transform) => transform.status)));
57 } 57 }
58 58
59 PhaseInput(this._phase, AssetNode input, this._location) 59 PhaseInput(this._phase, AssetNode input, this._location)
60 : _inputForwarder = new AssetForwarder(input) { 60 : _inputForwarder = new AssetForwarder(input) {
61 _inputSubscription = input.onStateChange.listen((state) { 61 _inputSubscription = input.onStateChange.listen((state) {
62 if (state.isRemoved) { 62 if (state.isRemoved) {
63 remove(); 63 remove();
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 /// Force all [LazyTransformer]s' transforms in this input to begin producing 103 /// Force all [LazyTransformer]s' transforms in this input to begin producing
104 /// concrete assets. 104 /// concrete assets.
105 void forceAllTransforms() { 105 void forceAllTransforms() {
106 for (var transform in _transforms) { 106 for (var transform in _transforms) {
107 transform.force(); 107 transform.force();
108 } 108 }
109 } 109 }
110 110
111 String toString() => "phase input in $_location for $input"; 111 String toString() => "phase input in $_location for $input";
112 } 112 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698