48 Commits

Author SHA1 Message Date
Chinmay Garde
4eeaa07477 flow::Semaphore for simple platform specific unnamed semaphores. (#2937) 2016-08-17 14:28:23 -07:00
Adam Barth
0a439f3f88 Add //flutter/content_handler (#2923)
We're now producing a flutter_content_handler binary for Fuchsia that
builds and links.
2016-08-12 22:41:54 -07:00
Chinmay Garde
e8fb428a4f Guard against sysmacros.h pulling in defines for major and minor on some platforms. (#2900) 2016-08-10 14:13:01 -07:00
Adam Barth
18e43c93ed Get //flutter/flow building on Fuchsia (#2899) 2016-08-10 14:03:19 -07:00
Chinmay Garde
a413ef0bb0 If GrGLContext setup fails, log OpenGL platform specific information. (#2897) 2016-08-10 11:26:26 -07:00
Adam Barth
9c09565712 Update paths to account for buildroot 2016-08-09 13:52:15 -07:00
Adam Barth
c65c32f602 Enable gn --check for more directories (#2884)
This required us to fix a backwards dependency from flutter/lib/ui to
sky/shell.
2016-08-07 13:52:24 -07:00
Chinmay Garde
65a4c99740 Remove unused checkerboard.cc (#2865) 2016-08-05 16:23:12 -07:00
Jason Simmons
adbf037186 Flush image textures before they are bound by the UI thread (#2873) 2016-08-05 15:24:29 -07:00
Adam Barth
410bc4c313 Remove skia::RefPtr (#2851)
Also, remove the hacks that integrate Skia ref counting with WTF. Now we
just use sk_sp everywhere for managing Skia ref counts.
2016-08-01 22:21:37 -07:00
Chinmay Garde
37a1d87317 Fallback to creating Skia managed images on platforms that dont provide a GL context on the resource loader. (#2849) 2016-08-01 16:39:02 -07:00
Adam Barth
a415e0e748 Fix Linux build 2016-08-01 16:35:08 -07:00
Adam Barth
fcc642e42b Finish removing //base dependency from //flow (#2848)
This patch introduces a //glue library that isolates our dependency on //base.
This will let us clean up our //base dependencies ahead of actually being able
to fully remove them.
2016-08-01 16:27:48 -07:00
Chinmay Garde
ace8307aab Asynchronous texture upload. (#2837) 2016-08-01 16:05:45 -07:00
Adam Barth
d6476a65c3 Port //flow to //lib/ftl (#2847)
This patch removes almost all //base dependency of //flow. The only dependency
left is on tracing.
2016-08-01 15:11:56 -07:00
Jason Simmons
d72c9e0f06 Fix the Linux engine build (#2833) 2016-07-27 10:38:45 -07:00
Chinmay Garde
2b18a40f0b Utilities for creating texture backed SkImages. (#2829) 2016-07-26 16:26:04 -07:00
Adam Barth
9eb5df4146 Add a way to hint the compositor (#2816)
The code that draws the picture knows more about the picture (and the future)
than we do. This patch gives them a way to hint us about what's going to
happen with the picture in the future.
2016-07-22 11:07:14 -07:00
Ian Hickson
f8b2cca611 clang -Wextra (more all that -Wall) (#2766)
I noticed this while doing the libjpeg_turbo roll.
2016-06-17 12:38:10 -07:00
Chinmay Garde
7b612b0f2f iOS: Discard the depth and stencil attachments of the framebuffer before presenting the color renderbuffer. (#2737) 2016-06-15 11:02:17 -07:00
Eric Seidel
9e34c6ff3b Remove ContainerLayer::paintChildren trace per @abarth (#2709) 2016-05-25 14:20:51 -07:00
Adam Barth
a126207c6e Update Skia (#2704) 2016-05-23 13:48:18 -07:00
mmclenna
43c108dae8 Additional instrumentation for tracing engine performance (#2682)
* Added instrumentation for timings.

* A few more traces for better granularity.
2016-05-12 13:34:57 -07:00
Adam Barth
6e3228cf81 Revert "Record layer tree to an SkPicture before rasterization (#2628)"
This reverts commit 5bc5c7b5246d62af70780ec7ba0203ac3f318226.

This commit appears to have caused
https://github.com/flutter/flutter/issues/3658
2016-05-01 14:23:13 -07:00
Adam Barth
5bc5c7b524 Record layer tree to an SkPicture before rasterization (#2628)
This lets Skia run an optimization pass over the SkPicture before actually
issuing GL commands.
2016-04-28 10:15:38 -07:00
Adam Barth
625e937442 Update Skia (#2626) 2016-04-27 14:59:06 -07:00
Adam Barth
b9ff394182 Break dependency from Layer to PaintContext (#2609)
Instead, make Layer::Paint take a new PaintContext that has just exactly
the state that it needs, mirroring PrerollContext. Also, rename
PaintContext to CompositorContext because it holds the context for the
whole compositor.
2016-04-21 23:05:41 -07:00
Adam Barth
dda79d0312 Fix style in //flow/instrumentation (#2608)
This patch makes these files better match Google C++ style.

Also, add the engine lap time when running on Mojo.
2016-04-21 22:36:46 -07:00
Adam Barth
ff021d7b42 Improve paint bounds computation in flow (#2607)
We now compute the bounds for all container layers, including clips, and
use those bounds to tighten down our clips and save layers.
2016-04-21 21:50:44 -07:00
Adam Barth
7fc65fd19f Make OpacityLayer hit SkRecordNoopSaveLayerDrawRestores (#2604)
Previously we were applying opacity in a different way than Skia
expects. Now we use the exact pattern that Skia expects so that we hit
more optimizations inside SkRecordOptimize.

After this patch, we don't actually get the optimization because we
don't yet run SkRecordOptimize over the composited tree. A later patch
will actually cause us to run SkRecordOptimize.
2016-04-21 07:55:37 -07:00
Jason Simmons
94a4b96b40 Fix a typo ("threshold") (#2583) 2016-04-07 10:37:33 -07:00
Adam Barth
13f67343d0 Add support for backdrop filters in the compositor
Particularly, add support for blur filters to implement backdrop blur effects.
2016-04-01 17:15:36 -07:00
Adam Barth
3f7d5ef6f8 Update code to account for Mozart changes
The layout protocol in Mozart changed. Now we need to pipe a scene version
through the system to the compositor.
2016-03-30 15:13:58 -07:00
Adam Barth
e301cef648 Update Skia
This required a bunch of changes because of the new sk_sp type Skia has
introduced into their API.
2016-03-21 14:59:49 -07:00
Hixie
493a0b7d4b Move the "current frame" marker in the perf graph 2016-03-18 13:38:30 -07:00
Hixie
389bc4b456 Performance Overlay fixes
- fix dartdocs for addPerformanceOverlay
- make PerformanceOverlayLayer honour its x, y, and height.
- fix the y axis of PerformanceOverlayLayer to only show 3x16ms, since
  if it's more than 16ms it really doesn't matter what it is.
- make the label on the PerformanceOverlayLayer show the worst time on
  record not the instantaneous time.
- pin the fps to a maximum of 60Hz
2016-03-17 17:14:04 -07:00
Adam Barth
9aceef9a44 Fix device pixel ratios in Mozart for reals
We need to adjust the transform matrix to undo the device scale.
2016-03-11 17:01:06 -08:00
Adam Barth
2653005461 Flutter embedded in Flutter via Mozart is double scaled
We weren't correctly dividing by the device pixel ratio when asking Mozart to
present our child scene.
2016-03-11 13:36:59 -08:00
Jeff Brown
fd204d4d76 Specify a clip rect for ChildSceneLayers.
When linking in a scene, it's a good idea to specify its clip rectangle
to ensure that its content does not draw or capture input from its
surrounding space.

A future version of the Mozart view manager may automatically wrap a
view's scene with a clip rectangle to avoid composition gotchas like this
but it currently doesn't.  So the net effect is that if you embed a view
without specifying a clip, it can draw or capture input from anywhere
within its container.
2016-03-10 18:33:08 -08:00
Adam Barth
4b921cbb5e Make Mozart draw child views
Previously we weren't factoring in the layer's offset properly and we were
drawing the child views below the background layer.
2016-02-08 14:36:38 -08:00
Adam Barth
e3bf0fa3c1 Include child scenes when uploading to Mozart
Previously we just dropped child scenes on the floor. Now we upload them
to Mozart. However, we just draw them on top of all the other content
and don't apply any clips or blends.
2016-02-03 14:16:09 -08:00
Jason Simmons
052d65cc14 Clear the Flow raster cache when a GrContext is destroyed
After an application is suspended and the GrContext associated with the
Flutter view is destroyed, the raster cache still contains images tied
to the defunct context.  The SkyShell process will crash if these images
are used after the application resumes.
2016-02-01 10:36:09 -08:00
Adam Barth
c3c5af1fbe Move Flow layers to //flow/layers 2016-01-30 23:35:22 -08:00
Adam Barth
215b19e3fc Add the ability to create child scenes
This patch contains Dart bindings for adding a child scene when running in
Mozart. The child scene is currently ignored, but a later patch will actually
incoporate it into the tree.
2016-01-28 16:08:42 -08:00
Adam Barth
ac83043173 Fix order of matrix operations
When rasterzing with a non-zero left and top offset, we need to apply the scale
first so that we're translating in the correct coordinate system.

Fixes https://github.com/flutter/flutter/issues/1292
2016-01-19 09:57:26 -08:00
Adam Barth
97e13a5763 Fix typo in image raster offset
We shouldn't plumb the "right" value into the y coordinate.
2016-01-14 09:29:34 -08:00
Adam Barth
17ed699397 Stocks FAB "+" sometimes teleports to near the top left
The matrix argument to drawPicture doesn't seem to do what we want exactly.
Instead, use the normal matrix in the canvas. Also, handle cull rects with
non-zero left and top coordinates.

Fixes #1229
2016-01-13 12:31:03 -08:00
Adam Barth
0b629d419f Move //sky/compositor to //flow
Now that the compositor doesn't have any tricky deps, we can make it a
top-level project, which saves a bunch of typing.
2016-01-12 22:39:51 -08:00