110 Commits

Author SHA1 Message Date
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
Ian McKellar
f08b08417d Update to new Dart FIDL bindings API. (#3988)
* Update to new Dart FIDL bindings API.
2017-08-22 13:32:46 -07:00
Jason Simmons
a7ae2abb59 Capture fractional pixel coordinates in the bounds of raster cache bitmaps (#3974)
The bitmap used to hold a prerolled image in the raster cache must have an
integer width/height in pixels.  However, the picture used to draw the image
may have a non-integer width/height in physical coordinates and thus not
completely fill the bitmap.  The compositor should only select the subset
of the bitmap that reflects the portion filled by the rendered picture.
2017-08-10 14:08:16 -07:00
Chinmay Garde
1de56a33d2 On emulators, render onscreen (with warnings) if any of the MakeS32 based SkSurface creation calls fail. (#3947) 2017-08-02 14:29:29 -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
Benjamin Lerman
ad7f258bfc Fix usage of std::labs (#3891) 2017-07-18 09:54:24 -04:00
Chinmay Garde
015e8cf521 Ensure that the source rect used for the the raster cache replacement is the same as the size of the N32Premul surface. (#3889)
Also adds debug printers for SkRect and SkPoint.
2017-07-17 23:42:40 -07:00
freiling
e758dc361a [flow] remove flush from SceneUpdateContext::ExecutePaintTasks (#3863)
Instead of flushing each canvas, flush once on the context from which each of the canvas is derived.
This gives us a significant performance increase on the fuchsia vulkan backend
2017-07-14 12:06:10 -07: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
freiling
2a4af6906e Back Vulkan Rasterizer with Mozart View (#3568)
This version does not recycle buffers. It is meant only as an initial solution,
and the proper buffer recycling logic has been broken out into a separate change
2017-04-07 17:22:53 -07:00
Chinmay Garde
1c07ea530f Remove uses of //base from all //flutter projects and replace them with //fml variants. (#3492) 2017-03-22 15:42:51 -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
Chinmay Garde
4562b835ca Roll Skia revision to 3f81f3703a68755c88f5cc4a87728b98f34c4cd4 (#3438) 2017-02-23 17:58:05 -08:00
Jason Simmons
e01d1b39ef Adapt the physical model layer for Fuchsia (#3441) 2017-02-23 16:27:33 -08:00
Chinmay Garde
2868251402 Remove rarely used GLConnection stuff in flow. (#3440)
I had added this initially as a means of making it easier to deal with OpenGL directly in Flow. However, we are moving away from dealing with the client rendering APIs directly. Instead, delegating everything to Skia. Besides, we only ever used this to log the GPU description in case of context setup failures. This has not proved to be useful so far. Also, having this in place is making it difficult to remove all dependencies on GL in Shell.
2017-02-23 16:02:53 -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
516b832dbb Remove texture image. (#3434) 2017-02-16 16:26:02 -08:00
Chinmay Garde
d58696936f Revert ShadowMaskFilter use and roll Skia to 246a3c269d8dc91a47ff27f7b71508bf9e74edf5. (#3409) 2017-02-10 16:01:36 -08:00
Adam Barth
847ee8d7a4 Fix Fuchsia build (#3318) 2017-01-03 13:25:38 -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
Chinmay Garde
036bc0d356 Update Skia and get using its BUILD.gn instead of maintaining own own copy. (#3233) 2016-11-17 12:36:16 -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
Chinmay Garde
e1ac3ca650 Randomize the color of the checkerboard pattern per raster cache entry. (#3218) 2016-11-10 18:21:12 -08:00
Adam Barth
ced9a91c3a Switch Flutter to //lib/fidl (#3206) 2016-11-07 15:51:42 -08:00