1. 20 Nov, 2015 4 commits
    • Hixie's avatar
      Convert Persistent Bottom Sheets to a Scaffold API · 03e094aa
      Hixie authored
      - `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().
      03e094aa
    • Adam Barth's avatar
      Make stocks list scrolling 2x faster on the main thread · efbea05e
      Adam Barth authored
      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.
      efbea05e
    • Adam Barth's avatar
      Callback identity is too fragile for CustomPaint · 72329cf4
      Adam Barth authored
      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.
      72329cf4
    • Tony Gentilcore's avatar
  2. 19 Nov, 2015 10 commits
    • Adam Barth's avatar
      Add a repaint rainbow to help debug repaint issues · 8fa223ff
      Adam Barth authored
      The repaint raindbow tints each recording with a rotating set of colors so you
      can see which pixels are repainting each frame.
      8fa223ff
    • Adam Barth's avatar
      Add debugDumpLayerTree to dump the layer tree · dfbd8c6a
      Adam Barth authored
      To help debugging issues with the layer tree.
      dfbd8c6a
    • Adam Barth's avatar
      Re-enable support for debugPaintLayerBordersEnabled · 2232ee56
      Adam Barth authored
      We lost this feature at some point. This patch brings it back.
      2232ee56
    • Misha Dynin's avatar
      Introduced ImageProvider for asynchronously loading images. · 7436dfd1
      Misha Dynin authored
      Updated image cache to use any ImageProvider instance.
      Renamed RawImage to AsyncImage and updated the interface
      to use any ImageProvider instance.
      7436dfd1
    • Adam Barth's avatar
      Some paint functions were using canvas.save/restore around children · d689362d
      Adam Barth authored
      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
      d689362d
    • Adam Barth's avatar
      Refactor PaintingContext · fc576814
      Adam Barth authored
      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.
      fc576814
    • Adam Barth's avatar
      Popup menu in Stocks throws exception · 2d824894
      Adam Barth authored
      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
      2d824894
    • Adam Barth's avatar
      Add `alignment` to image widgets · d234c65d
      Adam Barth authored
      We already had the code to implement this feature. We just needed to plumb it
      out to the widget API.
      d234c65d
    • Hixie's avatar
      Snackbar Refactor · 954713ab
      Hixie authored
      "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.
      954713ab
    • Adam Barth's avatar
      Reduce paint time for Stocks drawer animation by 88% · 95eb6685
      Adam Barth authored
      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.
      95eb6685
  3. 18 Nov, 2015 7 commits
  4. 17 Nov, 2015 10 commits
  5. 16 Nov, 2015 3 commits
    • Hixie's avatar
      Fix some examples. · 5e221334
      Hixie authored
      - drag and drop was using the wrong draggables (long press vs short
        press).
      
      - navigation.dart wasn't using material correctly and so was ending up
        with some red text.
      
      - piano wasn't followig our style guide even a little.
      
      - date picker was not scrollable.
      5e221334
    • Collin Jackson's avatar
      e3b9094f
    • Hixie's avatar
      Move Material page animations to Material layer. · 309d25d4
      Hixie authored
      PageRoute is now MaterialPageRoute.
      
      This also changes the following:
      
      - Now the HeroController is a Navigator observer, rather than a feature
        of HeroPageRoutes, which are gone. This means heroes can work between
        any kind of ModalRoute now.
      
      - ModalPageRoute is moved from modal_barrier.dart to routes.dart.
      
      - It allows routes to opt-out of their modal barrier being a shortcut to
        popping the route.
      
      - Features of PageRoute that aren't Material-specific get promoted to
        ModalRoute features: storage, the subtree key, offstageness...
      
      The AnimatedModalBarrier is still a ModalRoute feature.
      309d25d4
  6. 14 Nov, 2015 1 commit
  7. 13 Nov, 2015 5 commits