16 Commits

Author SHA1 Message Date
Adam Barth
72c103cefa Rename dart:sky to dart:ui 2015-10-09 19:27:13 -07:00
Adam Barth
8cf43b65d2 Moves from vector_math to vector_math_64
* Moves from vector_math to vector_math_64
* Adds support for Float64List in Dart bindings
2015-10-01 14:46:13 -07:00
Collin Jackson
3943fa1da4 Support for decoding images in lists 2015-10-01 11:06:11 -07:00
Adam Barth
77264d3e94 Teach sky.Paragraph how to actually compute layout
Previously layout was exiting early because the frame view
was null. Now we actually compute some layout and paint the
text. This patch makes paragraph_builder_test pass.
2015-09-17 09:37:30 -07:00
Viktor Lidholt
1d6cd4bc01 Adds bindings to Skia for VertexMode and drawVertices 2015-09-08 11:09:45 -07:00
Adam Barth
58d67facd8 Merge pull request #1011 from abarth/paragraph_builder
Sketch a DOM-free API for laying out and painting text
2015-09-03 20:29:15 -07:00
Hans Muller
06b420433f Fix minor problems in _ScrollGestureRecognizer, Dismissable
Alternating scroll gestures would sometimes be ignored because _ScrollGestureRecognizer didn't always reset its _state when the pointer[s] went up.

A Dismissable dismiss triggered by a drag and then a fling could cause the next attempt to drag-dimiss to fail.

Fixed the definition of lerpColor().
2015-09-03 13:40:35 -07:00
Adam Barth
68b06c8736 Sketch a DOM-free API for laying out and painting text
Rather than using the DOM to upload text and styling information into the
engine, this patch begins sketching a more direct API that bypasses the DOM and
CSS. Currently, this API doesn't do anything, but it's a first step.

The approach is to have a ParagraphBuilder object that can record a tree of
style interior nodes and text leaves. The build() function then applies
container-level styling information (such as TextAlign) and returns a Paragraph
object that can undergo layout and paint.

The inputs to the builder process are immutable style objects constructed from
primitive values. These primitives are currently carbon-copies of the primitive
we use in the framework today. After this patch lands, I'll convert the frame
to re-expose these values instead of re-defining them.
2015-09-02 01:28:54 -07:00
Adam Barth
96e203329c Move lerp for the engine types into dart:sky
This patch just adds them to dart:sky. A future patch will actually use them in
the framework once we've published an updated sky_engine package. Also, add
dartdoc to the classes touched in this patch.
2015-08-31 09:25:22 -07:00
Adam Barth
a1807a1b17 Remove weak handle from sky.Paint
This patch converts sky.Paint to be a pure Dart object, which means we don't
need to open a weak handle to sky.Paint. Avoiding the weak handle reduces the
amount of weak handle callbacks we need to process at the end of GC and
therefore reduces jank.
2015-08-11 09:37:20 -07:00
Eric Seidel
4e17ceefdb Add support for Canvas.setMatrix and getTotalMatrix
Part of fixing issue #138.

R=abarth@google.com
2015-07-23 11:21:33 -07:00
Eric Seidel
a09baca0dd Add C++ based support for drawAtlas
This is supposed to make Viktor's game faster, but it's not clear
to me that it actually does.  I've left the code
using the dart version of drawAtlas for now until Viktor can
verify that it looks correct.

I also added a wrapper for SkFilterQuality in the process of
debugging SkCanvas.drawAtlas since all drawAtlas examples
in Skia use FilterQuality.low.  The bug which blocked me for
so long turned out to be that SkCanvas.drawAtlas doesn't
draw anything if antialiasing is turned on.

Issue #138.

R=abarth@google.com
2015-07-23 09:25:10 -07:00
Hixie
6bcc09dbd0 Remove shadow trees and custom elements from sky/engine/.
Remove all code relating to shadow trees, insertion points, shadow
boundaries, traversing composed trees, distribution, template
documents, custom elements, registering elements, element registries,
element factories, shadow roots, etc.

Remove the following features from the IDLs and from the binding
generators: CustomElementCallbacks, Reflect*, EventHandler.

Remove the CSS custom pseudo-element concept, since we no longer have
a UA style sheet worth talking about, no longer have shadow trees or
custom elements, no longer use pseudo-elements, and generally
therefore don't use this code at all.
2015-07-20 13:31:12 -07:00
Hixie
2fbea232de Remove the vestiges of ActiveDOMObject and EventTargetNames, which I missed in my recent patch. 2015-07-16 15:42:56 -07:00
Hixie
87e83e552d Remove EventTarget, and subsequent fallout.
The primary goal of this change was to remove EventTarget from the
sky_engine C++ code. Since EventTarget is so core to the entire event
system that sky_engine was based on, this is a rather invasive change.
As such, it had some knock-on effects. I deleted some of the files
that were affected, and cauterised the remainder.

In many cases, a file would depend on another file that it didn't
include directly, but instead included indirectly via another file
that I deleted. When this happened, if the features that this broke
were obsolete, I sometimes just removed the features instead.

Specifically:
- removed EventTarget
- removed EventQueue, since without a target, what's a queue going to
  do?
- same with EventDispatch*
- removed ExecutionContext, since it had an EventQueue and nothing
  else it did was relevant to Sky anymore
- removed ActiveDOMObject, which was all about ExecutionContexts
- removed ContextLifecycleNotifier since it dependend on
  ExecutionContext and ActiveDOMObject
- removed the other Lifecycle classes for consistency, and replaced
  them with four booleans in the Document class
- removed some of the attributes that are no longer relevant from
  IDLExtendedAttributes (ConstructorCallWith and
  CallWith=ExecutionContext)
- removed the Document member on DOMDartState since we never set it to
  anything but null.
- removed BuiltinSky::InstallWindow since it relied on the Document
  member of DOMDartState
- removed EventHandler, EventListener, and mentions of those in
  various binding scripts
- removed NewEventHandler, since we're not using that either
- removed the following interfaces from the Sky Dart API:
  - EventTarget
  - EventListener (since without a target, there's no way to listen)
  - FocusEvent (since it's only member was an EventTarget)
  - HashChangeEvent (mostly by accident, but it's defunct anyway)
  - FontFace (it used ConstructorCallWith=ExecutionContext)
- changed the following interfaces of the Sky DART API:
  - MediaQueryList is no longer an EventTarget
  - Node is no longer an EventTarget
  - Document no longer has defaultView (depended on
    DOMDartState's document)
  - DocumentFragment, Element, Range, and Text no longer have a
    constructor (they all depended on DOMDartState's document, which
    is now gone)
  - Event lost its EventTarget members and path.
  - Window lost its WindowTimers partial interface (it used
    EventTarget and ExecutionContext a lot)
- removed numerous hacks in the bindings around features that are now
  gone, like addEventListener
- removed a bunch of console logging code, since that relied on
  ExecutionContext
- cauterised the wound in FontFace.cpp by removing constructors and
  methods that called now-removed features
- same with MediaQuery and friends
- same with some editor features and focus-related features
- same with Document
- removed DOMTimer classes since they use ExecutionContexts
2015-07-16 14:40:10 -07:00
Collin Jackson
a64559ab70 After running filter-branch, move root directory into sky/ 2015-07-16 11:54:25 -07:00