2017 Commits

Author SHA1 Message Date
Adam Barth
0d3c2d9336 flutter build --engine-src-dir=<garbage> produces poor error message
This patch improves the error message.

Fixes #468
2015-11-20 15:09:04 -08:00
Ian Hickson
de77264749 Merge pull request #525 from Hixie/yak3-routes-typed
Give type arguments to routes.
2015-11-20 14:23:10 -08:00
Adam Barth
1fbec91fa0 Merge pull request #524 from abarth/debug_label
Rename LabeledGlobalKey's argument to debugLabel
2015-11-20 14:14:48 -08:00
Adam Barth
19fe92e35d Merge pull request #521 from abarth/fix_analyzer
Fix analyzer warnings in updater package
2015-11-20 14:14:39 -08:00
Hixie
13f3a9be17 Give type arguments to routes.
These end up not actually being used, currently, because we don't have
generic methods, which you'd need for showDialog() and friends, and we
don't have any way to parameterise a class type at runtime, which you'd
need for MaterialApp routes, but it's a step in the right direction.
2015-11-20 13:21:31 -08:00
Adam Barth
6db39fe95b Rename LabeledGlobalKey's argument to debugLabel
The old name was confusing.

Fixes #462
2015-11-20 13:15:32 -08:00
Adam Barth
4cd1fb177a Fix analyzer warnings in updater package
This class was renamed to MojoEventSubscription.
2015-11-20 13:12:27 -08:00
Adam Barth
dc23af9ff1 Merge pull request #513 from abarth/improve_build_help
Be more specific about what `flutter build` does
2015-11-20 12:57:36 -08:00
Seth Ladd
840b3cb09c Merge pull request #516 from sethladd/embedder_yaml
first addition of _embedder.yaml
2015-11-20 12:55:17 -08:00
Hixie
2e0e6aa466 OverlayRoute.finished()
Rather than have delayed calls to super.didPop(), which raises my
eyebrow every time I see it, this provides a separate finished()
function to call, and uses the convention that if you want to call it
yourself, you just don't call super.didPop().
2015-11-20 12:27:31 -08:00
Adam Barth
c1b076308d Elaborate HSVColor interface
Fixes #507
2015-11-20 12:14:58 -08:00
Hixie
ee8c0ad30d Expose the close()/closed API for snack bars
This lets you close them manually.
2015-11-20 11:29:35 -08:00
Hixie
03e094aa1b Convert Persistent Bottom Sheets to a Scaffold API
- `Scaffold.of(context).showBottomSheet(widget);`
- Returns an object with .closed Future and .close() method.
- Uses a StateRoute to handle back button.
- Take the Navigator logic out of the BottomSheet widget.
- Support showing a sheet while an old one is going away.
- Add Navigator.remove().
2015-11-20 10:49:10 -08:00
Seth Ladd
ed7442e058 first addition of _embedder.yaml 2015-11-20 10:37:18 -08:00
Jason Simmons
6a2bd421a1 Merge pull request #494 from jason-simmons/apk_download_all_artifacts
Download build artifacts from a zip file
2015-11-20 10:36:01 -08:00
Jason Simmons
1f83018f86 Download build artifacts from a zip file
This updates the Flutter tools to match the proposed new packaging of artifacts
in the engine release script.
* The GCS URL for artifacts is now gs://mojo/flutter/$revision/$platform
* Categories have been removed from the Artifact class
* All artifacts for a given platform now live in a zip file.  If an artifact
  is not present in the local cache, then the zip will be downloaded and
  extracted.

Note that darwin-x64 artifacts go through a different process that (for now)
continues to use the old format.
2015-11-20 10:27:18 -08:00
Adam Barth
efbea05eb6 Make stocks list scrolling 2x faster on the main thread
This patch improves the repaint strategy for HomogeneousViewport so that the
list itself and every entry in the list has a repaint boundary. That means that
we only record list items as they enter the view.
2015-11-20 10:25:34 -08:00
Adam Barth
18763e5609 Be more specific about what flutter build does
Fixes #512
2015-11-20 09:14:48 -08:00
Adam Barth
72329cf422 Callback identity is too fragile for CustomPaint
Many of the widgets that use CustomPaint were spamming repaints because
CustomPaint repaints when the identity of the onPaint callback changes, which
it does every build for StatelessComponents.

This patch changes CustomPaint to use a CustomPainter, similar to the new
custom layout widgets. The CustomPainter has a `shouldRepaint` function along
with its `paint` function. This function gives clients explicit control over
when the custom paint object repaints.
2015-11-20 08:20:59 -08:00
Tony Gentilcore
6562c14948 Add a FractionalOffset alignment parameter to BackgroundImage 2015-11-19 22:28:28 -08:00
Adam Barth
8fa223ff19 Add a repaint rainbow to help debug repaint issues
The repaint raindbow tints each recording with a rotating set of colors so you
can see which pixels are repainting each frame.
2015-11-19 15:40:25 -08:00
Adam Barth
6bfcf9bf17 Merge pull request #503 from abarth/dump_layer_tree
Add debugDumpLayerTree to dump the layer tree
2015-11-19 15:10:02 -08:00
Adam Barth
dfbd8c6a8a Add debugDumpLayerTree to dump the layer tree
To help debugging issues with the layer tree.
2015-11-19 14:45:40 -08:00
Adam Barth
361d6d807d Merge pull request #499 from abarth/layer_borders
Re-enable support for debugPaintLayerBordersEnabled
2015-11-19 14:33:02 -08:00
Adam Barth
2232ee568a Re-enable support for debugPaintLayerBordersEnabled
We lost this feature at some point. This patch brings it back.
2015-11-19 13:51:17 -08:00
Misha Dynin
04dfa0bf87 Merge pull request #483 from mishadynin/imagecache
Introduced ImageProvider for asynchronously loading images.
2015-11-19 13:04:08 -08:00
Misha Dynin
7436dfd177 Introduced ImageProvider for asynchronously loading images.
Updated image cache to use any ImageProvider instance.
Renamed RawImage to AsyncImage and updated the interface
to use any ImageProvider instance.
2015-11-19 12:47:04 -08:00
Adam Barth
d689362dc5 Some paint functions were using canvas.save/restore around children
This pattern breaks when using compositing because we need to lift those
operations into the compositing tree. This patch removes all the ones I could
find and adds an assert to help prevent more from getting introduced.

Fixes #191
2015-11-19 12:29:36 -08:00
Adam Barth
4fb5bcd863 Merge pull request #486 from abarth/painting_context
Refactor PaintingContext
2015-11-19 11:24:09 -08:00
Adam Barth
fc576814d5 Refactor PaintingContext
This patch simplifies PaintingContext with several goals:

1) We now call a callback instead of assuming the caller has a single child to
   paint. This change will let us handle render objects that wish to paint more
   than one child.
2) We now avoid creating lots of empty picture layers because we don't eagerly
   start recording pictures. Instead, we wait for the first caller to touch the
   canvas before creating the picture recorder.
3) We now are more consistent about which values have incorporated the painting
   offset.
2015-11-19 11:18:04 -08:00
Eric Seidel
847df52860 Point to Github issues instead of flutter.io
Fixes #489.

@sethladd
2015-11-19 10:29:29 -08:00
Adam Barth
f97a125eee Merge pull request #487 from abarth/fix_menu_crash
Popup menu in Stocks throws exception
2015-11-19 01:53:01 -08:00
Adam Barth
2d82489406 Popup menu in Stocks throws exception
Previously, we were putting a ForcedLayer just below the overlay, but that
causes trouble for routes like the popup menu that want to position themselves
inside the overlay. Instead, I've moved the ForcedLayer down into ModalRoute.

Also, rename ForcedLayer to RepaintBoundary, which is more descriptive of what
this widget does.

Fixes #485
2015-11-19 01:40:56 -08:00
Adam Barth
d234c65df5 Add alignment to image widgets
We already had the code to implement this feature. We just needed to plumb it
out to the widget API.
2015-11-18 20:50:37 -08:00
Hixie
954713ab23 Snackbar Refactor
"showSnackBar()" is now a feature of a Scaffold. To get to a Scaffold
you either use a global key (`scaffoldKey.currentState.showSnackBar(...)`),
or you use `Scaffold.of(context)`.

Snack bars no longer have a route. They are entirely managed by the
Scaffold. Fixes #432.

Snack bars now queue up when you have several of them. Fixes #374.

Snack bars now auto-size themselves around their contents. This is step
one towards implementing multiline snack bars.

Snack bars now self-dismiss after some per-snackbar configurable period.

The self-dismissing pauses while a dialog is up above the snackbar (or
anything that uses ModalRoute). To enable this, there's now a
`ModalRoute.of(context)` API that returns the current ModalRoute, and
you will be rebuilt if you asked for this and the route's "current"
status changes. To implement this, the Navigator now rebuilds
unconditionally any time it pushes or pops a route.

Snack bars now use the curves that Android uses for snack bars.

Snack bar contents now fade in.
2015-11-18 17:01:21 -08:00
Adam Barth
95eb66856e Reduce paint time for Stocks drawer animation by 88%
Now we use a forced layer around the reprojected content of the drawer, which
means we don't have to re-record it during the slide animation. This saves 2ms
per frame.

The total main-thread time for the drawer animation is now 2.0ms.
2015-11-18 16:14:54 -08:00
Adam Barth
ec5b1c1a96 Merge pull request #476 from abarth/forced_layer
Reduce record time in Stocks drawer animation by 55%
2015-11-18 15:44:35 -08:00
Adam Barth
298f4a6eca Reduce record time in Stocks drawer animation by 55%
Now we use a ForcedLayer in the navigator overlay to cache the recording for
each entry in the overlay. This mechanism just caches the display list, not the
underlying pixels.

Also, remove the "dispose" notification in the Layer tree because it was
disposing layer too eagerly. We don't actually need this notification for
anything other than eagerly freeing some C++ memory.
2015-11-18 15:31:13 -08:00
Hans Muller
0dc652bd66 Corrected Card resting elevation, tabs example toolbar 2015-11-18 14:33:08 -08:00
Adam Barth
c964a1f1f8 Switch from ui.tracing to dart:Developer Timeline
This change will let us remove the tracing interface from dart:ui and also
makes these timeline events show up in Observatory.
2015-11-18 12:57:58 -08:00
Hans Muller
e1b721f068 Merge pull request #451 from HansMuller/shadows
Update Material shadow rendering

Shadows now render as three seprate MaskFilter.blur components per the most recent Material spec.

The shadows Map was replaced by a similar Map called elevationToShadow with entries that match the 10 elevations specifed by http://www.google.com/design/spec/what-is-material/elevation-shadows.html.

The "level" property (many classes) is now called "elevation", to match the Material spec.

BoxShadow now includes a spreadRadius parameter - as in CSS box-shadow. Renamed the BoxShadow blur property to blurRadius to further align BoxShadow with CSS box-shadow.
2015-11-18 08:17:50 -08:00
Adam Barth
fd6bc856a7 Merge pull request #458 from abarth/adb_errors
Handle adb error cases more gracefully
2015-11-18 08:17:24 -08:00
Hans Muller
d9153a13c6 Update shadow rendering
Shadows now render as three seprate MaskFilter.blur components per the most recent Material spec.

The shadows Map was replaced by a similar Map called elevationToShadow with entries that match the 10 elevations specifed by http://www.google.com/design/spec/what-is-material/elevation-shadows.html.

The "level" property (many classes) is now called "elevation", to match the Material spec.

BoxShadow now includes a spreadRadius parameter - as in CSS box-shadow. Renamed the BoxShadow blur property to blurRadius to further align BoxShadow with CSS box-shadow.
2015-11-18 07:58:28 -08:00
Adam Barth
3027497f85 Handle adb error cases more gracefully
We now print a sensible message if we can't find `dart` or `adb`. Also, we
print a sensible message if the device isn't authorized.

Fixes #380
Fixes #358
2015-11-17 23:23:30 -08:00
Adam Barth
b20a1f4a15 Merge pull request #457 from abarth/asset_error
Improve error message for non-existent asset
2015-11-17 23:07:27 -08:00
Adam Barth
7b75d15d46 Improve error message for non-existent asset
Now we print the name of the asset and the base directory where we looked for
the error instead of throwing a null pointer exception.

Fixes #296
2015-11-17 22:56:00 -08:00
Adam Barth
cada8b3faa Import path.dart as path rather than p
Fixes #311
2015-11-17 22:44:54 -08:00
Adam Barth
b065036a0a Merge pull request #454 from abarth/repeating_performance
Add support for repeating performances
2015-11-17 22:19:08 -08:00
Ian Hickson
50cf609ed7 Merge pull request #453 from Hixie/yak4-of
Pave the Foo.of() cowpath.
2015-11-17 22:02:49 -08:00
Adam Barth
752e341d0f Merge pull request #449 from abarth/run_build
Make flutter run_mojo imply flutter build
2015-11-17 20:53:39 -08:00