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

Side by Side Diff: packages/barback/lib/src/graph/phase_output.dart

Issue 3014633002: Roll to pickup pool changes (Closed)
Patch Set: Created 3 years, 2 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
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.graph.phase_output; 5 library barback.graph.phase_output;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import '../asset/asset_forwarder.dart'; 10 import '../asset/asset_forwarder.dart';
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 /// 43 ///
44 /// If there's no collision, this will only have one element. Otherwise, it 44 /// If there's no collision, this will only have one element. Otherwise, it
45 /// will be ordered by which asset was added first. 45 /// will be ordered by which asset was added first.
46 final _assets = new Queue<AssetNode>(); 46 final _assets = new Queue<AssetNode>();
47 47
48 /// The [AssetCollisionException] for this output, or null if there is no 48 /// The [AssetCollisionException] for this output, or null if there is no
49 /// collision currently. 49 /// collision currently.
50 AssetCollisionException get collisionException { 50 AssetCollisionException get collisionException {
51 if (_assets.length == 1) return null; 51 if (_assets.length == 1) return null;
52 return new AssetCollisionException( 52 return new AssetCollisionException(
53 _assets.where((asset) => asset.transform != null) 53 _assets
54 .where((asset) => asset.transform != null)
54 .map((asset) => asset.transform.info), 55 .map((asset) => asset.transform.info),
55 output.id); 56 output.id);
56 } 57 }
57 58
58 PhaseOutput(this._phase, AssetNode output, this._location) 59 PhaseOutput(this._phase, AssetNode output, this._location)
59 : _outputForwarder = new AssetForwarder(output) { 60 : _outputForwarder = new AssetForwarder(output) {
60 assert(!output.state.isRemoved); 61 assert(!output.state.isRemoved);
61 add(output); 62 add(output);
62 } 63 }
63 64
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 // they've successfully resolved the collision or not. 106 // they've successfully resolved the collision or not.
106 if (_assets.length > 1) { 107 if (_assets.length > 1) {
107 // TODO(nweiz): report this through the output asset. 108 // TODO(nweiz): report this through the output asset.
108 _phase.cascade.reportError(collisionException); 109 _phase.cascade.reportError(collisionException);
109 } 110 }
110 }); 111 });
111 } 112 }
112 113
113 String toString() => "phase output in $_location for $output"; 114 String toString() => "phase output in $_location for $output";
114 } 115 }
OLDNEW
« no previous file with comments | « packages/barback/lib/src/graph/phase.dart ('k') | packages/barback/lib/src/graph/static_asset_cascade.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698