85 Commits

Author SHA1 Message Date
mikejurka
0e8331aa1a
Fix low-res rasterized images on Fuchsia. (#4325)
Plumb through Scenic display metrics to use during
Preroll.
2017-11-08 14:59:54 -08:00
Chinmay Garde
9a960f82f5 Add texture support (eg video, camera) (#4159) 2017-11-02 10:57:29 +01:00
Chinmay Garde
a55aa23078 Make flow::Layer::Paint const. (#4200) 2017-10-11 16:48:31 -07:00
Chinmay Garde
0b8efb62a6 Make flow::LayerBuilder virtual and plug in the default layer builder. (#4199) 2017-10-11 16:26:18 -07:00
Chinmay Garde
1793f494a3 Move layer tree construction into flow::LayerBuilder so alternate builders can be plugged in. (#4197) 2017-10-11 12:25:55 -07:00
Jason Simmons
191a2fab39 Set a higher filter quality for drawing raster cache images (#4116)
According to Skia, kLow offers a quality improvement with little cost over
the default kNone

Fixes https://github.com/flutter/flutter/issues/12091
2017-09-18 12:28:52 -07:00
Michael Goderbauer
08961f8ec5 Format all c-like sources with clang-format (#4088)
* format

* license script adaptions

* updated licenses

* review comments
2017-09-12 15:36:20 -07:00
George Kulakowski
3aa7522c11 Rename ftl to fxl in Fuchsia specific code (#4090) 2017-09-11 15:58:48 -07:00
Adam Barth
457f92ba48 Update paths for Mozart move (#4081) 2017-09-08 15:24:16 -07:00
Josh Gargus
321e68e8bf Rename Mozart SceneManager to "Scenic". (#4056) 2017-09-01 17:40:27 -07:00
mikejurka
3e245ae812 Fix crash when removing stories. (#4003)
Ensure that a Mozart EntityNode (that corresponds
to an ExportNode) is always released on the
Rasterizer thread.

MZ-259
2017-08-23 17:32:19 -07:00
Jeff Brown
8ee1910ca9 Use metrics provided by scene events. (#3922)
Compute the necessary texture resolution using more accurate scaling
information provided by Mozart scene node metrics events instead of the
device pixel ratio provided by the Mozart view properties (which we
might remove in the future).

This allows us to allocate smaller textures when a Flutter view is
being scaled down.
2017-07-24 19:17:55 -07:00
Jason Simmons
e687626a65 Incorporate the device pixel ratio when drawing shadows (#3919) 2017-07-24 12:01:43 -07:00
Chinmay Garde
925298d947 Update the content handler to use the Mozart session API. (#3887) 2017-07-18 15:40:18 -07:00
Brian Osman
de00757ddb Revert "Revert "Reland "Run Flutter on iOS and Android with color correct Skia (#3826)" (#3878)" (#3895)
This reverts commit 1db18a40da855b102e391cb11189e73f9c2ec40d.
2017-07-18 15:58:35 -04:00
Collin Jackson
1db18a40da Revert "Reland "Run Flutter on iOS and Android with color correct Skia (#3826)" (#3878)
This reverts commit 2d9155e174d83e9646c951dbbc85fe1eda8b20e9.

Fixes a regression with semitransparent images (flutter/flutter#11169)
2017-07-13 14:22:25 -07:00
Brian Osman
2d9155e174 Reland "Run Flutter on iOS and Android with color correct Skia (#3826)
* Revert "Revert "Reland "Run Flutter on iOS and Android with color correct Skia" (#3818)" (#3823)"

This reverts commit db8d8a9979901d05b011368226ad5bf61b1da13f.

* Fix test code to match internal API change
2017-06-27 13:30:10 -04:00
Brian Osman
db8d8a9979 Revert "Reland "Run Flutter on iOS and Android with color correct Skia" (#3818)" (#3823)
This reverts commit 2650f529a138de9cc9116bb9194dbe22f8e0df25.
2017-06-23 20:28:24 -04:00
Brian Osman
2650f529a1 Reland "Run Flutter on iOS and Android with color correct Skia" (#3818)
* Revert "Revert "Run Flutter on iOS and Android with color correct Skia (#3743)" (#3775)"

This reverts commit cfe70e07d386d6052267fe3772bbd641c8413a54.

* Enable sRGB on IO thread, too

* Add 4444 as a fallback rendering mode

* Use bare ptr to SkColorSpace (not sk_sp) in PrerollContext
2017-06-23 20:21:29 -04:00
P.Y. Laligand
f61869eba0 Prevent GN from choking on conditional imports. (#3805) 2017-06-20 23:39:18 -07:00
Michael Goderbauer
cfe70e07d3 Revert "Run Flutter on iOS and Android with color correct Skia (#3743)" (#3775)
This reverts commit ffe8181ffe7432b61a67323c80fd8025704e4695.
2017-06-14 16:26:20 -07:00
mattsarett
ffe8181ffe Run Flutter on iOS and Android with color correct Skia (#3743)
* Run Flutter on iOS and Android with color correct Skia (#3716)

***Turns on color correct rendering for Android and iOS
***Communicates dst color space to raster cache
***Turns on color space aware image decoding

Test:
***color_testing_demo on Pixel XL
***flutter_gallery on iPad Mini and iPad Pro (haven't figured out how to run manual_tests on iOS)

TODO:
I needed to split up this CL somewhere. These are follow-up tasks.
***Make desktop backends color correct
***Make debugging tools (ex: encoding frames to png) preserve color space
***Investigate using UIKit API to allow iOS to fine tune color space of rendered content
2017-06-09 08:39:21 -04:00
Chinmay Garde
1c6a531e89 Rework raster cache to fix numerous issues. (#3717)
* Fix pixel rounding error in the picture layer by first ensuring that
  the texture for the image is at least as big as the next integer size
  along each dimension and using kStrict_SrcRectConstraint while
  drawing the same image. We already select the source subset by
  looking at the cull rect of the picture.
* Decompose the transformation matrix into a series of operations that
  generated the same to calculate the scale at which to rasterize the
  picture. This make the rasterization scale resilient to
  transformations that introduce a perspective component to the
  resultant matrix.
* The scale in the decomposed matrix is now part of the key in the
  cache.
* Raster cache images that could never be rasterized were still taking
  part in the cache. Now, those entries are rejected early on. This
  leads to the sweep after the frame iterating over fewer items.
* Added a unit test target.
2017-06-05 15:57:05 -07:00
Chinmay Garde
70b71a49ea Revert "Run Flutter on iOS and Android with color correct Skia" (#3738) 2017-06-05 14:08:22 -07:00
mattsarett
fe82757603 Run Flutter on iOS and Android with color correct Skia (#3716)
***Turns on color correct rendering for Android and iOS
***Communicates dst color space to raster cache
***Turns on color space aware image decoding

Test:
***color_testing_demo on Pixel XL
***flutter_gallery on iPad Mini and iPad Pro (haven't figured out how to run manual_tests on iOS)

TODO:
I needed to split up this CL somewhere. These are follow-up tasks.
***Make desktop backends color correct
***Make debugging tools (ex: encoding frames to png) preserve color space
***Investigate using UIKit API to allow iOS to fine tune color space of rendered content
2017-06-05 14:59:04 -04:00
Jason Simmons
df5f62f236 Add a flag that checkerboards offscreen render targets created by SkCanvas.saveLayer (#3685)
Fixes https://github.com/flutter/flutter/issues/9473
2017-05-11 15:00:16 -07:00
Jason Simmons
c0f1e3b47b Change the shadow elevation parameter to floating point (#3637) 2017-04-27 10:52:13 -07:00
Jason Simmons
40718a59c3 Improved parameters for Skia shadows (#3635) 2017-04-27 10:13:28 -07:00
Jason Simmons
98063f9d41 Improve the shadow drawing parameters (#3499)
See https://github.com/flutter/flutter/issues/8929
2017-03-22 14:47:57 -07:00
Jason Simmons
6b9eda4a40 Canvas.drawShadow API based on SkShadowUtils::drawShadow (#3486) 2017-03-20 14:17:47 -07:00
Jason Simmons
12c41bdcbb Update the PhysicalModelLayer child paint bounds to account for the shadow (#3478)
See https://github.com/flutter/flutter/issues/8635
2017-03-15 14:14:15 -07:00
Jason Simmons
0edcbb7db4 Allow translucent background colors in PhysicalModel (#3452)
Set the TransparentOccluder shadow flag if the color is not opaque
2017-02-27 16:27:44 -08:00
Jason Simmons
e01d1b39ef Adapt the physical model layer for Fuchsia (#3441) 2017-02-23 16:27:33 -08:00
Jason Simmons
a44647afac Physical model layer that can draw shadows for a Material widget (#3424) 2017-02-16 17:30:57 -08:00
Chinmay Garde
d58696936f Revert ShadowMaskFilter use and roll Skia to 246a3c269d8dc91a47ff27f7b71508bf9e74edf5. (#3409) 2017-02-10 16:01:36 -08:00
Chinmay Garde
8ae2d455be Display resident memory statistics on the performance overlay. (#3314) 2017-01-03 12:27:30 -08:00
Chinmay Garde
37231e749c Dont override the explicitly set paint bounds in Layer::Preroll. (#3313) 2016-12-13 17:14:25 -08:00
Jason Simmons
0c985f8f61 Null check before queueing deletion of Skia objects (#3298)
Fixes https://github.com/flutter/flutter/issues/7182
2016-12-08 12:43:50 -08:00
Adam Barth
596bc3e9e7 Use initialized memory for composited bounds (#3291)
SkRect objects need to be manually initialized. Previously, we were using
unintialized memory in our bounds calculations.
2016-12-02 14:18:11 -08:00
Adam Barth
33af5a5644 Rename hittable to hitTestable (#3275)
Apparently hittable is not politically correct.
2016-11-28 16:09:56 -08:00
Adam Barth
f6547c1df5 Add prune to child scene layers (#3272)
Also, change the hit testing geometry so that we get our hits at the root.
2016-11-28 12:28:18 -08:00
Adam Barth
8dcac738d8 Fix Mozart blends of child views (#3248)
We need to compute the paint bounds of ChildViewLayers during Preroll.
Also, we need to allocate a BlendPtr before writing into it.
2016-11-18 23:49:30 -08:00
Adam Barth
21f6aa5270 Composite child views in proper paint order (#3243)
We push a bit up the tree during preroll to learn whether there system
composited layers below each layer. During update scene, we squash down
to paint tasks, which we execute after publishing the new scene.
2016-11-18 12:54:54 -08:00
Adam Barth
2a13567a7e Fix Mozart child views (#3232)
When we pipelined the drawing commands we caused UpdateScene to be called
before Preroll, which isn't allowed. Now we call Preroll, UpdateScene, and
Paint separately.
2016-11-16 15:30:57 -08:00
Jason Simmons
ac479c4f9f Move destruction of PictureLayer's SkPicture to the IO thread (#3219)
The picture may hold references to images backed by GPU textures that must
be deleted on the IO thread.
2016-11-11 13:43:23 -08:00
Adam Barth
ced9a91c3a Switch Flutter to //lib/fidl (#3206) 2016-11-07 15:51:42 -08:00
Chinmay Garde
84a060820a Tell the raster cache when checkerboarding preferences have been updated. (#3205) 2016-11-07 15:29:03 -08:00
Chinmay Garde
3164a97645 Allow checkerboarding raster cache entries for debugging purposes (can be toggled from Dart). (#3200) 2016-11-03 13:59:57 -07:00
Adam Barth
123e9c8da8 Update Skia (#3157) 2016-10-20 13:23:09 -07:00
Adam Barth
8b911be098 Use antialiased clips (#3124)
The Skia team tells us that these go faster.
2016-10-12 18:28:10 -07:00