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

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

Issue 16854005: First pass at build dependency graph for barback. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise. Created 7 years, 6 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
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 library barback.asset_node;
6
7 import 'dart:async';
8
9 import '../barback.dart';
10 import 'asset_graph.dart';
11 import 'phase.dart';
12 import 'transform_node.dart';
13
14 /// Describes an asset and its relationship to the build dependency graph.
15 /// Keeps a cache of the last built asset and tracks which transforms depend
nweiz 2013/06/18 23:14:46 I don't understand what "last built asset" means.
Bob Nystrom 2013/06/20 00:23:59 Clarified.
16 /// on it.
17 class AssetNode {
18 final AssetId id;
19 Asset asset;
20
21 /// The [_TransformNode]s that consume this node's asset as an input.
nweiz 2013/06/18 23:14:46 Remove "_"
Bob Nystrom 2013/06/20 00:23:59 Done.
22 final consumers = new Set<TransformNode>();
23
24 AssetNode(this.id);
25
26 /// Updates this node's generated asset value and marks all transforms that
27 /// use this as dirty.
28 void updateAsset(Asset asset) {
29 this.asset = asset;
30 consumers.forEach((consumer) => consumer.isDirty = true);
31 }
32 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698