591 Commits

Author SHA1 Message Date
Jason Simmons
88b9d42400
Remove the global engine entry timestamp (#18182)
The engine was using a global to store a timestamp representing the
launch of the engine.  This timestamp is initialized with a JNI call
on Android and during shell setup on other platforms.  Later the
timestamp is added to a FlutterEngineMainEnter timeline event used to
measure engine startup time in benchmarks.

This PR removes the global and the JNI call and moves the timestamp
into the settings object.
2020-05-07 11:29:28 -07:00
Kaushik Iska
ede658e2d1
[profiling] CPU Profiling support for iOS (#18087)
See flutter.dev/go/engine-cpu-profiling for details
2020-05-07 08:11:07 -07:00
Chris Yang
2622cb9c33
Introduce TaskRunnerChecker, TaskRunnerAffineWeakPtr (#17649) 2020-05-01 11:28:20 -07:00
Chris Yang
4fa6bc77aa
RendererContextManager (#17941) 2020-04-30 09:39:33 -07:00
liyuqian
50ae2b997d
Set SkSL asset manager in RunConfiguration ctor (#17948) 2020-04-27 17:49:04 -07:00
liyuqian
5f5f50d4c6
Revert "[tracing] SceneDisplayLag is a synchronous event (#17878)" (#17916)
This reverts commit a544b45f26cce15fe4ad70f99a52f4e21aff7726.

Reverts flutter/engine#17878

This breaks our devicelab tests.

TBR: @flar
2020-04-23 18:04:39 -07:00
Kaushik Iska
a544b45f26
[tracing] SceneDisplayLag is a synchronous event (#17878)
This change converts it from an events that spans a time interval
to an event that occurs at an instant.

We also emit this trace event when there is no lag as opposed to
only when there was a lag to make it monotonous.

Co-authored-by: Kaushik Iska <kaushikiska@google.com>
2020-04-23 10:53:45 -07:00
liyuqian
31ecf878aa
Read SkSL from json asset (#17861)
Fixes https://github.com/flutter/flutter/issues/55219
2020-04-22 14:10:17 -07:00
Gary Qian
8dc91229b4
PlatformResolvedLocale localization message channel (#17755) 2020-04-21 15:34:44 -07:00
Brian Osman
68800a2700
Remove legacy version of SkCanvas::didConcat44 (#17828)
Builds flags have been switched, so the old versions aren't needed any
longer.
2020-04-21 08:46:57 -04:00
George Wright
9f31d81dcd
Enable Vulkan validation layers for shell_test (#17684) 2020-04-17 13:00:02 -07:00
Chris Yang
efd8adfbb3
Pipeline: complete method returns a bool to indicate if complete is successful (#17687) 2020-04-17 10:39:16 -07:00
Brian Osman
1cf1a5882d
Guard canvas virtuals so we can remove legacy didConcat44 (#17756)
* Guard canvas virtuals so we can remove legacy didConcat44

SkMatrix44 is also deprecated, so start transitioning to SkM44.

* Fix formatting
2020-04-16 13:40:22 -04:00
George Wright
b241ec1d46 Enable required extension 2020-04-13 12:14:06 -07:00
Mehmet Fidanboylu
47a88e8ea3
Add support for setting allow http flag in Dart VM (#17653) 2020-04-11 11:55:05 -07:00
Chris Yang
68fd833488
Reland "Improve iOS PlatformViews to better handle thread merging. #16935" (#17609) 2020-04-10 13:25:02 -07:00
liyuqian
a8af96da66
Read SkSLs from asset (#17601)
Fixes https://github.com/flutter/flutter/issues/53117

Test added:
- ShellTest.CanLoadSkSLsFromAsset
2020-04-10 00:16:33 -07:00
Chris Yang
caebc93e0c
Revert "Improve iOS PlatformViews to better handle thread merging. (#16935)" (#17600)
This reverts commit f6b8eda714680e308a801d15829a5f71abee75d1.
2020-04-08 21:15:38 -07:00
Chris Yang
f6b8eda714
Improve iOS PlatformViews to better handle thread merging. (#16935) 2020-04-08 17:33:33 -07:00
Kaushik Iska
f6ca48943d
[perf] Add a SceneDisplayLag event when we miss vsyncs (#17575)
This event goes from now -> current vsync target time
to avoid the limitations as seen in https://github.com/flutter/flutter/issues/54095#issuecomment-610636237

This event also tags additional metadata to capture
`vsync_transitions_missed` considering the refresh rate of the display.
2020-04-08 09:14:11 -07:00
Kaushik Iska
1b6b609d9d
Remove SceneDisplayLag trace event temporarily (#17571)
Working theory is that adding async events with begin times
in the past causes the timeline to skip some events.

See: https://github.com/flutter/flutter/issues/54095
2020-04-07 16:33:52 -07:00
Jason Simmons
983d1e1703
Fix include paths of fml/time headers in the shell and rasterizer (#17502) 2020-04-03 12:33:54 -07:00
Kaushik Iska
abc72933e7
[pipeline] Add trace event for lag between target and display times (#17384)
This change also adds TimeRecorder which records time at the start
of each frame to capture the latest vsync target display time and
wires it in to the rasterizer to add trace events when there is a lag.
2020-04-02 17:15:45 -07:00
Dan Field
ff62dec5c9
Roll to clang11, mark 4 (#17483)
* "Reland Clang 11, roll buildroot to 1bc40a5f916adb93d87e2a2230a0ec43db876c1c, take 4 (#17467)" (#17482)"

This reverts commit 8166a91bca11b83c16fba8f8fd407e937a2ac89c.

* format code

* Roll buildroot to 3a27de1c5bb0f50be7d3efe3e00de4f6068c9f30
2020-04-02 13:04:49 -07:00
Jonah Williams
e35bb4594a
fix typos in switch descriptions (#17475) 2020-04-02 11:21:04 -07:00
liyuqian
a82343befa
Add build_and_test_linux_release presubmit test (#17073) 2020-04-01 18:46:04 -07:00
Brian Osman
c9506cb8e9
Finish removing deprecated SkCanvas virtuals (#17445)
API staging is complete - these defines have been removed.
2020-04-01 10:27:50 -04:00
liyuqian
f003d9b41a
GPU to raster rename, patch 2 (#17428) 2020-03-31 15:16:11 -07:00
liyuqian
70b12fa181
Strengthen json string comparisons (#17425)
Make the test robust even if the json map reorders its keys.
2020-03-31 15:02:26 -07:00
liyuqian
807ca8543c
More rename from GPU thread to raster thread (#17408)
This PR touches variable names, class names, and file names so it's significantly more risky than its predecessor https://github.com/flutter/engine/pull/17329

Due to file name changes, this PR is expected to change the license files.

We haven't rename `shell/gpu` to `shell/raster` yet. It should be optional but I think it's better to have `raster_surface_software.cc` than `gpu_surface_software.cc`.
2020-03-31 14:05:28 -07:00
liyuqian
193bb355d9
Disable OnServiceProtocolGetSkSLsWorks in Fuchsia (#17361) 2020-03-30 14:31:03 -07:00
Emmanuel Garcia
b716cbba71
Reland unobstructed platform views (#17336) 2020-03-27 16:39:29 -07:00
Brian Osman
662e7804f4
Guard SkCanvas bitmap virtuals for deprecation and removal (#17371) 2020-03-27 13:28:03 -04:00
Chinmay Garde
67e66f7c81
Disable ShellTest.OnServiceProtocolGetSkSLsWorks. (#17367)
Re-enabling tracked in https://github.com/flutter/flutter/issues/53399.
2020-03-27 01:10:15 -07:00
liyuqian
b3075b3091
Rename GPU thread to raster thread in code comments (#17329)
1. Simple "GPU thread" to "raster thread" replacement.

2. Regex replace "GPU([\n\r\s]+//+ thread)" with "raster$1".

3. Regex replace "// gpu$" with "// raster".

4. Simple test change.

5. Run ci/format.sh
2020-03-25 22:49:59 -07:00
Emmanuel Garcia
b235233e9d
Revert unobstructed platform views (#17326) 2020-03-25 14:36:10 -07:00
Kaushik Iska
f1d8026637
[metrics] Record the frame target time on the layer tree (#17281)
This lets us measure stats on when the frame was
scheduled to be rendered vs when it finished rasterizing.

Note: This isn't propagated to the FrameTimings struct yet,
that is to be followed.
2020-03-24 22:00:21 -07:00
liyuqian
bb35963050
Add service protocol to get SkSLs (#17300)
Fixes https://github.com/flutter/flutter/issues/53114
2020-03-24 21:42:12 -07:00
Chinmay Garde
518c9e09cc
Remove checks for the always true using_fuchsia_sdk flag in all GN files. (#17261) 2020-03-23 18:31:02 -07:00
Emmanuel Garcia
f5d25da83c
Reland: Implement unobstructed Platform Views on iOS (#17237) 2020-03-20 18:58:55 -07:00
Emmanuel Garcia
70f6d18bfa
Revert "Implement unobstructed Platform Views on iOS (#17049)" (#17233)
This reverts commit 2627634be807a28f4d56c5d7cd878c3ff6ce07ac.
2020-03-20 14:46:09 -07:00
Emmanuel Garcia
2627634be8
Implement unobstructed Platform Views on iOS (#17049) 2020-03-20 12:38:58 -07:00
Chris Yang
2d42c74a34
Replace Pipeline's ProduceToFront with ProduceIfEmpty to handle thread merging. (#17122) 2020-03-20 11:04:47 -07:00
Jonah Williams
857859f801
Remove unused PackagesUri rpc param in OnServiceProtocolRunInView (#17195)
This is not actually used by hot reload since we've switched to compilation from kernel.
2020-03-18 13:41:41 -07:00
gaaclarke
fddb0c272e
Made it so you can whitelist what events you want to listen to (#17108) 2020-03-16 11:00:03 -07:00
Brian Osman
cf2424bbd2
Canvas: Remove some unused virtuals, and prepare for signature change (#17135)
* Canvas: Remove some unused virtuals, and prepare for signature change

* Better vertices fix

* Add empty placeholders for old signature
2020-03-13 15:25:01 -04:00
Nathan Rogers
29b455d850
[fuchsia] Change vsync trace name back to "vsync callback" on Fuchsia (#17118)
Fuchsia benchmarks depend the name being precisely "vsync callback".
Since this is causing immediate build issues, change it back to "vsync
callback" on Fuchsia.  Stronger testing for this in the long run is
currently under discussion.

b/150902962
2020-03-12 14:57:50 -07:00
Chinmay Garde
a37560a074
Use the standard [[nodiscard]] attribute instead of an FML macro. (#17100) 2020-03-11 13:36:01 -07:00
Chinmay Garde
17e07c537e
Implement asynchronous texture uploads when using the Metal backend on iOS. (#17046)
This moves the Metal `GrContext` creation utilities from `GPUSurfaceMetal` into
a separate `IOSContext` object subclass. An analogue of this object was used in
the GL regime for the management of onscreen and offscreen contexts that were
not tied to the lifecycle of the `GPUSurface`. This pattern has now been
generalized for use with all backends that need a resource context
(`IOSContextGL` and `IOContextMetal`).

The platform views controller management in the `ExternalViewEmbedder` interface
implementation was repeated three times for [Metal][metal], [OpenGL](opengl) and
[Software](software) rendering. This repetition has been removed and a single
implementation present in the base `IOSSurface` and used on all platforms.
Addition of new client rendering APIs should not affect how the engine renders
into the platform view interleaving levels.

All rendering API selection logic has been moved into a single set of utilities
in `rendering_api_selection.h`. This enables the removal of a lot of code blocks
guarded by `FLUTTER_SHELL_ENABLE_METAL`. The remaining uses of this will be
removed when unified builds are enabled.

The Metal backend now also adds traces similar to the GL backend.

The `IOGLContext` has been renamed to `IOContextGL` to be more in line with the
convention used in this library.

Fixes https://github.com/flutter/flutter/issues/41827
Adds https://github.com/flutter/flutter/issues/52150

[metal]: 1194ba2b21/shell/platform/darwin/ios/ios_surface_metal.mm (L55)
[opengl]: 1194ba2b21/shell/platform/darwin/ios/ios_surface_gl.mm (L95)
[software]: 1194ba2b21/shell/platform/darwin/ios/ios_surface_software.mm (L146)
2020-03-10 16:01:53 -07:00
Chinmay Garde
bcefcdb880
Use the ELF loader to setup AOT symbols in benchmark runner. (#17051)
We no longer package AOT artifacts as discrete blobs. The portable ELF loader
from the testing library may be used instead.

Fixes https://github.com/flutter/flutter/issues/52263
2020-03-10 12:28:24 -07:00