30 Commits

Author SHA1 Message Date
Adam Barth
c9cf1f3b95 Remove integration between tonic and WTF::Vector
There's no reason to use WTF::Vector here over std::vector.
2016-01-18 20:47:47 -08:00
Adam Barth
d4506ee6a4 Remove deprecated Dart methods
All the clients have migrated to the new methods.

Fixes https://github.com/flutter/flutter/issues/1080
2016-01-12 10:32:13 -08:00
Adam Barth
d4a7fa8802 Merge pull request #2243 from abarth/faster_draw_image
Use a slightly faster path for drawImage
2016-01-11 19:49:25 -08:00
Adam Barth
47040aafbb Fix bindings for drawAtlas
In changing the binding systems, I broke the colors parameter to drawAtlas. It
was looking for an array of ints rather than an array of Colors. Now we use
CanvasImage, which has the proper converter.

Fixes #1137
2016-01-11 11:17:34 -08:00
Adam Barth
ca629db532 Use a slightly faster path for drawImage
We don't need the strict mode for legacy compatibility because we don't have
any legacy yet. At some point, we might want to expose the strict mode for
people who want to pack their sprite sheets very tightly, but the sprites
library uses drawAtlas instead already.
2016-01-11 11:11:38 -08:00
Jason Simmons
10ce8a1928 Move the JNI bridge out of dart:ui and into a separate dart:jni library
This also extends DartClassLibrary to support multiple DartClassProviders
for different libraries
2016-01-08 11:04:22 -08:00
Adam Barth
83351fa445 Introduce Canvas.transform
Canvas.transform is the same as Canvas.concat, just with a better name.

Fixes #1080
2016-01-07 10:53:46 -08:00
Adam Barth
b714feca62 Remove IDL from Canvas and related interfaces
After this patch, Path is the only interface using IDL.
2015-12-29 00:21:14 -08:00
Adam Barth
cd01826488 Remove Drawable interface
We didn't end up using this interface. Instead, we use trees of
Pictures.
2015-12-28 19:50:42 -08:00
Adam Barth
b0cb37d5a0 Don't anti-alias RRect and Path clips
We should probably expose this dial to clients eventually, but this patch just
makes our default match Skia's default of not anti-aliasing RRect and Path
clips.
2015-11-02 18:26:48 -08:00
Jason Simmons
488cff3e40 Marshal RRect using a DartConverter (as is done for Rect)
This improved running time of a Canvas.drawRRect benchmark by 40%
2015-11-02 16:17:25 -08:00
Adam Barth
a5768f2718 Remove the DOM and CSS
We don't use the DOM or CSS anymore. Instead, we work directly with the render
tree.
2015-10-24 00:26:24 -07:00
Adam Barth
7026c60b56 Expose Canvas.drawImageNine
This patch is the first step towards supporting nine-patch images. See #1309.
2015-10-13 11:15:54 -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
Viktor Lidholt
dc1b773ed1 Cleans up naming and adds documentation to drawVertices bindings 2015-09-08 12:04:03 -07:00
Viktor Lidholt
1d6cd4bc01 Adds bindings to Skia for VertexMode and drawVertices 2015-09-08 11:09:45 -07:00
Adam Barth
b379439e37 Remove some unused dart:sky IDLs
This CL deletes a bunch of unused IDL files and removes some dead code in the
engine.
2015-09-02 00:09:43 -07:00
Chinmay Garde
31f7fa8ddd Update skia to latest revision 2015-08-26 15:28:05 -07:00
Adam Barth
96df6c373c Use sky.SceneBuilder to upload Layer tree to C++
We still use SkPicture as our rasterization backend, but now we're uploading
our layer tree to C++. A future patch will push the layer tree deeper into the
system and we'll eventually switch backends.
2015-08-25 13:41:37 -07:00
Hixie
5ceb52a0e1 Port clipping to the new layer world.
- Add Canvas.getSaveCount()
- Make RenderClipRect call context.paintChildWithClip instead of doing the clipping itself
- Make ClipLayer take a Rect instead of a Size
- Make PaintingContext.canvas read-only
- Add PaintingContext.paintChildWithClip()
- Minor rearrangings of code and style tweaks
2015-08-18 08:34:42 -07:00
Collin Jackson
f705b3c5ae Roll back typeface changes (we’re going a different direction) 2015-08-13 10:08:47 -07:00
Collin Jackson
d4e68ab589 Add weight chart to fitness app 2015-08-12 14:50:50 -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
Adam Barth
69c435eacc Simplify SkPicture
This patch simplifies the SkPicture we generate for Skia. Instead of drawing
everything into a nested SkPicture, we now draw everything into the top-level
picture, which requires us to apply the device scale factor in Dart.
2015-08-10 15:12:13 -07:00
Adam Barth
c4fd79b512 Use SkImage instead of SkBitmap
Apparently SkImage is the new hotness.
2015-08-03 14:12:44 -07:00
Adam Barth
5f95865831 Support borders with borderRadius
Currently we support only borders with uniform color and width.
2015-07-31 16:03:09 -07:00
Eric Seidel
244cebd496 Roll Skia to the latest revision to pick up drawAtlas fix
R=chinmaygarde@google.com
2015-07-24 10:59: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
Collin Jackson
a64559ab70 After running filter-branch, move root directory into sky/ 2015-07-16 11:54:25 -07:00