462 Commits

Author SHA1 Message Date
Chris Bracken
08dabe9601
Clean up C++ includes (#21127)
Cleans up header order/grouping for consistency: associated header, C/C++ system/standard library headers, library headers, platform-specific #includes.

Adds <cstring> where strlen, memcpy are being used: there are a bunch of places we use them transitively.

Applies linter-required cleanups. Disables linter on one file due to included RapidJson header. See https://github.com/flutter/flutter/issues/65676

This patch does not cover flutter/shell/platform/darwin. There's a separate, slightly more intensive cleanup for those in progress.
2020-09-11 21:18:35 -07:00
Chris Bracken
16b900b63e
Prefer C++ standard headers to their C counterpart (#21091)
We currently use a mix of C standard includes (e.g. limits.h) and their
C++ variants (e.g. climits). This migrates to a consistent style for all
cases where the C++ variants are acceptable, but leaves the C
equivalents in place where they are required, such as in the embedder
API and other headers that may be used from C.
2020-09-11 17:10:00 -07:00
Emmanuel Garcia
85a7afa913
Add a new raster status kSkipAndRetry frame (#21059) 2020-09-11 16:29:11 -07:00
Chris Bracken
36f7f3ca82
Copyright header hygiene improvements (#21089)
Add copyright headers in a few files where they were missing.

Trim trailing blank comment line where present, for consistency with
other engine code.

Use the standard libtxt copyright header in one file where it differed
(extra (C) and comma compared to other files in libtxt).

This also amends tools/const_finder/test/const_finder_test.dart to look
for a const an additional four lines down to account for the copyright
header added to the test fixture.
2020-09-11 08:55:37 -07:00
Emmanuel Garcia
5e54c707e8
Reland: Enable hybrid composition by default on Android (#20722) (#20864)
This reverts commit 4de62c7c2659607acdc75ab8c1ccd305a3c6f9d1.
2020-08-31 12:17:11 -07:00
Dan Field
4a88d5e109
Revert hint_freed (#20746)
This caused over-aggressive GCs, which vastly increased CPU usage benchmarks.

* Revert "fix build (#20644)"

This reverts commit b59793ee20be29463fac7a79635bf20253f04107.

* Revert "Hint freed (#19842)"

This reverts commit 3930ac1b25820baee3c67d921a0b009606cb3dae.
2020-08-25 11:55:40 -07:00
Emmanuel Garcia
4de62c7c26
Revert "Enable hybrid composition by default on Android (#20722)" (#20745)
This reverts commit d16ba48e1d79cf0197e96c51c38300ee921baeb0.
2020-08-25 09:54:13 -07:00
Emmanuel Garcia
d16ba48e1d
Enable hybrid composition by default on Android (#20722) 2020-08-24 13:10:23 -07:00
Sanjay Chouksey
b6cb1f13dd
Update view attributes after creation (#20638) 2020-08-22 12:46:04 -07:00
David Worsham
bb57fb4740
fuchsia: Fix elevation issues (#20681) 2020-08-21 11:57:09 -07:00
David Worsham
4dc866283d
fuchsia: Convert legacy permutations to build flag (#20647) 2020-08-19 19:09:51 -07:00
Dan Field
3930ac1b25
Hint freed (#19842)
* Hint the VM when a layer or picture goes out of scope
2020-08-19 14:04:31 -07:00
Chris Yang
ac8175fee1
Only create raster_thread_merge when explicitly requested by the embedding platform (#20487) 2020-08-16 10:31:01 -07:00
David Worsham
5a2bf6aa4c
Reland: "fuchsia: Remove dead code / break dependencies" (#20532)
Reland #19396 with a fix for improper scale that was affecting internal tests

Tested: Ran all unittests, ran internal tests, and ran workstation on Fuchsia
BUG: 53062, 53063
2020-08-14 20:41:18 -07:00
Yuqian Li
f644d03500
Add a service protocol for raster cache memory (#20466)
Related issue: https://github.com/flutter/flutter/issues/56719
2020-08-13 20:11:47 -07:00
Ming Lyu (CareF)
409a5e5963
FrameTiming build start timestamp fix and add vsync start timestamp (#20229) 2020-08-07 19:41:01 -07:00
Zachary Anderson
47c1c61a92
Revert "fuchsia: Remove dead code / break dependencies (#19396)" (#20302)
This reverts commit 12a37478de2cc9aff7f8fc72bc3a47f5f02e083c.
2020-08-06 12:06:06 -07:00
Adlai Holler
3342bd05e4
Migrate a few last places to GrDirectContext (#20235)
* Migrate a few last places to GrDirectContext

This is a followup to #19962 to cover a few places where we
were still using GrContext. No functional impact.

* Formatting
2020-08-05 10:31:43 -07:00
David Worsham
12a37478de
fuchsia: Remove dead code / break dependencies (#19396)
The fuchsia code around metrics and sizing was just sending this
information through a side-channel, when the engine already had the
information available. So, delete all of it to make future CLs simpler.

Additionally, the SceneUpdateContext has many unneccesary dependencies
re: metrics and PaintTasks. Break those to make future CLs simpler.

Tested: Ran all unittests and ran workstation on Fuchsia
BUG: 53062, 53063
2020-08-03 22:09:26 -07:00
Zachary Anderson
d986b8d606
Enable linting in several files (#20134) 2020-07-31 21:28:36 -07:00
Siva
b955e15ee9
Manual roll of Dart from 24c7666def...40fd1c456e (#20092)
* Manual roll of Dart from 24c7666def...40fd1c456e

dart-lang/sdk@40fd1c456e Revert "[dart:io] Add Abort() on HttpClientRequest"
dart-lang/sdk@17d7296a42 [vm/nnbd/bytecode] Fix reuse of type arguments in bytecode
dart-lang/sdk@58b6f40c73 Issue 42797. Understand in legacy libraries that a function returning Never (in Null Safety library) never returns. (reland)
dart-lang/sdk@fc8a6d9f9b [VM/compiler] Dereference TypeRef literal when propagating constants.
dart-lang/sdk@0689ec527a Move "test.dart" (well, most of its contents) into pkg/test_runner.
dart-lang/sdk@1094b3c61d Prepare static error test updater tool to handle web tests.
dart-lang/sdk@b258585f2f [observatory] Migrate from deprecated isInstanceOf to isA.
dart-lang/sdk@dfe1d9b682 Disable OverrideContributor for Cider.
dart-lang/sdk@aea99b2f5c scope debug property assist to Diagnosticables
dart-lang/sdk@4b96f20a79 [dart:io] Add Abort() on HttpClientRequest
dart-lang/sdk@1b1a39708c [build] Use frameworks instead of libs
dart-lang/sdk@3fef522496 Revert "Reland "[vm] Replaces fuchsia.deprecatedtimezone""
dart-lang/sdk@8c664d4f3f Revert "Issue 42797. Understand in legacy libraries that a function returning Never (in Null Safety library) never returns."
dart-lang/sdk@2efb5bebc7 [ dart:_http ] Fix typo in HTTP response timeline event
dart-lang/sdk@0884dae36c Revert "Fix the #include path for ICU headers"
dart-lang/sdk@5171534e81 Scope tweaks. Report REFERENCED_BEFORE_DECLARATION in more places.
dart-lang/sdk@6bba75079a Issue 42797. Understand in legacy libraries that a function returning Never (in Null Safety library) never returns.
dart-lang/sdk@b4ebbb7f5c [build] Update gn to match Fuchsia
dart-lang/sdk@cb428a7a02 [dart2js] Remove old bug work around in collector.
dart-lang/sdk@08663c20ab Change flutter patch to match existing DEPS on master branch
dart-lang/sdk@146ad014d9 update js/meta for the 2.10 dev sdk
dart-lang/sdk@488c718793 [co19] Roll co19 to d79951e06e443213243e54c2c32694b79a221b65
dart-lang/sdk@ba20edd7be Add patch for flutter-engine when changing to version 2.10

* Rev buildroot to latest version.

* Update license.

* update.

* Update gn revision.

* Format BUILD.gn files as the gn revision has been updated.
2020-07-29 13:10:15 -07:00
Adlai Holler
c57aff1800
Use the GrDirectContext factories instead of deprecated GrContext ones (#19962)
This is part of a larger effort to expose the difference between GrDirectContext,
which runs on the GPU thread and can directly perform operations like uploading
textures, and GrRecordingContext, which can only queue up work to be delivered
to the GrDirectContext later.
2020-07-28 13:32:09 -07:00
Emmanuel Garcia
933c8b8441
bool SubmitFrame -> void SubmitFrame (#18984) 2020-07-23 16:16:02 -07:00
gaaclarke
21efd7325e
Made the linter print out more information in its output and fixed bugs (#19895) 2020-07-22 15:38:09 -07:00
David Worsham
9353692cdb
fuchsia: Enable most unittests (#19583)
Tweak the primary flutter build rule so that fuchsia is more similar to
other platforms in how tests and the shell are built.

Only embedder_unittests and GLFW tests are disabled on Fuchsia now.

TEST: Ran unittests on host/fuchsia; workstation on fuchsia
BUG: fxb/53847, fxb/54056
2020-07-13 17:36:19 -07:00
Guruji Panda
d329617485
Changes to fix build errors in google3. (#19616) 2020-07-10 09:50:36 -07:00
Sanjay Chouksey
3620f2c9b4
Switch view_holder flags (#19538)
The view_holder SetProperties and UpdateScene had incorrectly
specified flags for focusable and hit_testable. This change
fixes the order, similar to how child_scene_layer specifies it.

Co-authored-by: Sanjay Chouksey <sanjayc@google.com>
2020-07-06 14:36:11 -07:00
Brian Osman
47037778d5
Add missing GrContext.h include (#19528)
This is an IWYU change that unblocks some Skia API shuffling.
2020-07-06 16:53:23 -04:00
Chris Yang
cc9ccf98ae
Implement mutator stack on Android hybrid composition platform view (#19426) 2020-07-04 13:03:04 -07:00
Sanjay Chouksey
56682aab27
Set child_layer_exists_below flag for Fuchsia PlatformViewLayer (#19462)
This enables proper compositing of surfaces with elevation over
a PlatformViewLayer.

Co-authored-by: Sanjay Chouksey <sanjayc@google.com>
2020-07-02 10:27:36 -07:00
Mehmet Fidanboylu
cab78ebd03
Fix wrong licensing in engine (#19439) 2020-07-01 12:23:03 -07:00
David Worsham
220a831028
Move fuchsia/scenic integration behind #define (#19003)
Additionally create "_next" permutations for all of the test binaries
on Fuchsia, in order to test both code-paths.

Using the #define follow-up CLs can also create a flutter_runner_next
binary that does not contain any legacy integration code.

BUG: 53847
2020-06-26 14:03:18 -07:00
Jim Graham
3caa7e7359
Enhance image_filter_layer caching to filter a cached child (#17175) 2020-06-26 03:48:02 -07:00
Sanjay Chouksey
e9edf32d40
Add PlatformView support for Fuchsia (#19132)
* Add PlatformView support for Fuchsia

This change allows embedding views provided by fuchsia components into
a flutter app running on Fuchsia. This conforms to Flutters idiomatic
approach to composite PlatformView alongside other rendered layers.

This uses the `view embedder` infrastructure to allow
`PlatformViewLayer`
to hold fuchsia views. This is meant to eventually supplant the legacy
`SceneHost` and `ChildViewLayer` mechanism to embed fuchsia `ChildView`.

To see how this will get used check out:
https://fuchsia-review.googlesource.com/c/experiences/+/398536/6/examples/hello_experiences/lib/fuchsia_view.dart

Includes unittests for platform_view.cc.

Note: This change has no impact on the legacy code to embed fuchsia
views.

* Rename OnCreateViewMethodCall to OnCreateView

Same for OnDestroyViewMethodCall to OnDestroyView

Co-authored-by: Sanjay Chouksey <sanjayc@google.com>
2020-06-25 16:27:39 -07:00
Emmanuel Garcia
24d2143b98
EndFrame should be always called by rasterizer (#19257) 2020-06-24 14:02:48 -07:00
Chris Yang
5b1b59a34d
Reland "Add GetBoundingRectAfterMutations to EmbeddedViewParams to calculate the final bounding rect for platform view #19170" (#19212) 2020-06-22 15:10:02 -07:00
Brian Osman
9cecc5f115
Revert "Add GetBoundingRectAfterMutations to EmbeddedViewParams to calculate the final bounding rect for platform view (#19170)" (#19204)
This reverts commit f5c315fe56f5fa67503ffbc9282edc086921aaa3.
2020-06-22 07:30:59 -04:00
Chris Yang
f5c315fe56
Add GetBoundingRectAfterMutations to EmbeddedViewParams to calculate the final bounding rect for platform view (#19170) 2020-06-21 21:01:53 -07:00
Emmanuel Garcia
b990ad11bd
Implement external view embedder on Android (#19033)
The external view embedder allows to embed Android views in a Flutter app.
2020-06-20 12:51:55 -07:00
zljj0818
f9eeee310c
Poor video scaling quality #53080 (#18814)
Use bilinear instead of nearest filter to draw surface texture

Related Issues:
https://github.com/flutter/flutter/issues/53080

Tests:
- TextureLayerTest
2020-06-17 11:14:05 -07:00
David Worsham
66d85bceb7
Move Surface and friends to flow/ (#18938) 2020-06-09 16:03:01 -07:00
Brian Osman
925943b74d
SkMatrix::MakeFoo is deprecated, use SkMatrix::Foo instead (#18934) 2020-06-09 16:55:13 -04:00
Guruji Panda
6734ab3914
Fix include paths to help building flutter runner for Fuchsia in Google3. (#18840)
Include header file without absolute path if the header file belongs to
the same directory as source file.
2020-06-06 16:05:04 -07:00
Chris Yang
1482d9b05e
Rework GLContextSwitch, get rid of RendererContextManager (#18601) 2020-06-04 11:37:51 -07:00
Emmanuel Garcia
243bb59c71
Pass SurfaceFrame to SubmitFrame (#18709) 2020-06-02 21:59:44 -07:00
Jim Graham
efe3f4569a
Fix child caching in opacity_layer (#17914)
Choose a child more likely to remain stable from frame to frame as the target to cache in the OpacityLayer.
2020-05-28 18:45:43 -07:00
Kaushik Iska
7eb6ffea4f
[fuchsia] Disable failing physical shape layer tests (#18308)
See: fxb/52028
2020-05-12 12:34:21 -07:00
liyuqian
671865d310
Restore integer snapping on OpacityLayer (#18255)
This fixes https://github.com/flutter/flutter/issues/56722
2020-05-09 11:29:37 -07:00
liyuqian
28d99854a6
Reland again "Remove layer integral offset snapping #17112" (#18160)
This reverts commit a7a25d3b57f2066798ef8cd43600588e4697c9cd and relands our reland https://github.com/flutter/engine/pull/17915.

Additionally, we fixed the cull rect logic in `OpacityLayer::Preroll` which is  the root cause of https://github.com/flutter/flutter/issues/56298. We've always had that root problem before but it did not trigger performance issues because we were using the OpacityLayer's `paint_bounds`, instead of its child's `paint_bounds` for preparing the layer raster cache. A correct handling of the cull rect should allow us to cull at any level.

It also turns out that our ios32 (iPhone4s) performacne can regress a lot
without snapping. My theory is that although the picture has a
fractional top left corner, many drawing operations inside the picture
have integral coordinations. In older hardwares, keeping those
coordinates integral seems to be performance critical.

To avoid flutter/flutter#41654, the snapping
will still be disabled if the matrix has non-scale-translation
transformations.
2020-05-07 17:19:30 -07:00
Dragoș Tiselice
bcdf99121a
Fixed ChildSceneLayer elevation issue on Fuchsia. (#18144)
* Fixed ChildSceneLayer elevation issue on Fuchsia.

ChildSceneLayers would draw on top of stacked Flutter content on
Fuchsia if not wrapped up in a Material widget, i.e. a
PhysicalShapeLayer. This patch pushes the logic from there to all
types of Layers.
2020-05-07 12:03:53 -04:00