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

Unified Diff: sky/sdk/lib/painting/box_painter.dart

Issue 1216303005: Convert image_cache to using Futures rather than callbacks (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix _loadComplete Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/sdk/lib/mojo/net/image_cache.dart ('k') | sky/sdk/lib/rendering/box.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/painting/box_painter.dart
diff --git a/sky/sdk/lib/painting/box_painter.dart b/sky/sdk/lib/painting/box_painter.dart
index 6f3a9d6e4995a4720473d53c84ac01c96d20af4e..6044b64484437383cae68bbed241e9350d649574 100644
--- a/sky/sdk/lib/painting/box_painter.dart
+++ b/sky/sdk/lib/painting/box_painter.dart
@@ -140,7 +140,7 @@ class BackgroundImage {
this.fit: BackgroundFit.scaleDown,
this.repeat: BackgroundRepeat.noRepeat
}) {
- image_cache.load(src, (image) {
+ image_cache.load(src).then((image) {
if (image == null)
return;
_image = image;
« no previous file with comments | « sky/sdk/lib/mojo/net/image_cache.dart ('k') | sky/sdk/lib/rendering/box.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698