588 Commits

Author SHA1 Message Date
Matej Knopp
256574230d Fix PhysicalShapeLayer paint bounds with clipping disabled (flutter/engine#31656)
* Fix PhysicalShapeLayer paint bounds with clipping disabled

* Add missing SkRect initialization
2022-02-24 14:52:35 -05:00
Kevin Lubick
870831d279 Fix includes of Skia types (flutter/engine#31654) 2022-02-24 10:56:05 -08:00
George Wright
b531809f09 Add a complexity scoring class for Metal and OpenGL (flutter/engine#31417) 2022-02-17 20:01:40 -08:00
ColdPaleLight
d2640b977f Start consolidating the caches in RasterCache (flutter/engine#31492) 2022-02-17 13:54:11 -08:00
Zachary Anderson
eca60c0b90 Add clang-analyzer-* and clang-diagnostic-* to .clang-tidy (flutter/engine#31291) 2022-02-09 12:26:34 -08:00
George Wright
ae19d36ca7 Small cleanup to DisplayListComplexityScoreCalculator code (flutter/engine#31211) 2022-02-02 09:37:52 -08:00
George Wright
a25be9e8d9 Add a DisplayListComplexityCalculator class that calculates the current "complexity score" of a given DisplayList during the Build phase. (flutter/engine#31176) 2022-02-01 21:40:35 -08:00
eggfly
42cc820c92 Cleanup unused code in the UIDartState and other tests. (flutter/engine#31152) 2022-01-31 18:20:02 -08:00
Brandon DeRosier
925224a9ee Prefix remaining OS defines with FML_ namespace (flutter/engine#31172) 2022-01-31 14:31:44 -08:00
Brandon DeRosier
2d4f908b9d Add FML_ prefix to fml/build_config.h macros (flutter/engine#31141) 2022-01-31 11:53:51 -08:00
eggfly
3a83d125d9 Remove unused Counter and CounterValues class. (flutter/engine#31130) 2022-01-28 16:05:10 -08:00
eggfly
1d4b9857fc [Android] Get the right frame_budget when device frame_rate is not 60 (flutter/engine#30924) 2022-01-27 13:35:10 -08:00
Matej Knopp
59414a9cd2 Only provide frame damage to rasterizer if partial repaint is enabled (flutter/engine#30704) 2022-01-12 15:19:01 +01:00
Matej Knopp
d071a24b95 Fix crash in BackdropFilterLayer::Diff (flutter/engine#30460)
* Fix crash in BackdropFilterLayer::Diff

* Pass context transform to filterBounds instead of scaling the filter
2022-01-04 23:17:32 +01:00
Chinmay Garde
0b18437bc1 Move the major display list classes to their own translation units. (flutter/engine#30487)
No functional change. Makes the display list subsystem easier to navigate as the
major classes are in their own TUs. Also avoids importing unnecessary headers
when the previous kitchen sink header was imported. I've tried to remove all
display list related imports and start from scratch but I may have missed some
files. Minor structs and classes (like the ones in utils, ops, etc..) still
don't get their own TUs though.

There were [two](https://github.com/flutter/engine/pull/29562) [related](https://github.com/flutter/engine/pull/30484) changes being made to this subsystem that have since
landed. So I don't think I am stepping on anyones toes with the reorganization.
Happy to incorporate any work-in-progress changes being made to the this
subsystem before submitting.
2021-12-28 15:19:35 -08:00
Chinmay Garde
942f2a979f Move display list to its own library. (flutter/engine#30398) 2021-12-20 17:14:01 -08:00
Jim Graham
46a8def326 Opacity peephole optimization (flutter/engine#29775) 2021-12-14 16:19:09 -08:00
Dan Field
b38b90c039 Revert "Fix eglPresentationTimeANDROID is no effective" (flutter/engine#30310)
* Revert "Fix eglPresentationTimeANDROID is no effective (#30182)"

This reverts commit 0d7ba05d3456807e7e24353fe911738952a02888.

* Revert "Use eglPresentationTimeANDROID to avoid bogging down the GPU (#29727)"

This reverts commit edb87942de0404a2802351c050a4f1b6de239bd7.
2021-12-13 20:02:20 -08:00
Jenn Magder
f134ae9ac4 Remove implicit copy assignment operator for 'EmbeddedViewParams' (flutter/engine#30094) 2021-12-06 09:34:01 -08:00
Dan Field
edb87942de Use eglPresentationTimeANDROID to avoid bogging down the GPU (flutter/engine#29727)
Fixes flutter/flutter#93352

Improves Android benchmarks on both Pixel 4 and a lower end Android Go device for 99th percentile and average raster times.

This works by telling the system compositor what timestamp we intended to show this frame for. This way, if we end up with a frame that gets submitted right at the beginning of a vsync and then a second frame submitted on the same vsync, the compositor will only try to show the second frame on the screen and save the GPU some work.

Without this, a situation like that results in an "avalanche" of calls where the GPU is behind the CPU and keeps delaying CPU work until we finally stop submitting frames. This can be observed as a lengthy dequeuBuffer in a systrace enabled trace, as shown in the linked issue. This avalanche is often triggered by a frame that does a shader compile through a couple vsyncs and then is followed by a bunch of very fast frames that take less than a vsync to render - the first of those fast frames gets delivered before the end of the vsync that the slow frame ended in.

We cannot implement this ourselves because we don't know how long the swap buffers call will take on the system side, and if we try to guess we can very well get it wrong.

I've filed issues to look into adding this for Vulkan and Metal, although we should also first take traces there to make sure it's warranted.

See also: https://android-developers.googleblog.com/2020/04/high-refresh-rate-rendering-on-android.html
2021-11-19 09:29:51 -08:00
Jenn Magder
b39436f7e5 Fix darwin namespace-comments and brace lint issues (flutter/engine#29828) 2021-11-18 21:06:56 -08:00
Zachary Anderson
78d9e276e2 Fix some clang-tidy lints for Linux host_debug (flutter/engine#29734) 2021-11-18 13:08:01 -08:00
Zachary Anderson
03c0f7e453 Add 'explicit' to header files (flutter/engine#29741) 2021-11-17 12:49:16 -08:00
Matej Knopp
0134f93710 PhysicalShapeLayer: Only push cull rect during diff if clipping (flutter/engine#29783) 2021-11-17 14:46:52 +01:00
Jim Graham
6c74b3f717 Call DisplayList builder methods directly from dart canvas (flutter/engine#29714) 2021-11-16 14:18:04 -08:00
Jenn Magder
dbe42683b9 Fix 'google-readability-braces-around-statements' analyzer warning in macOS and iOS (flutter/engine#29723) 2021-11-12 18:42:29 -08:00
Jim Graham
8b0923d4a5 Revert "Build DisplayList directly from flutter::Canvas" (flutter/engine#29693) 2021-11-12 00:01:02 -08:00
Jim Graham
e79b6bb25d add trace events to cache sweeps (flutter/engine#29686) 2021-11-11 12:19:32 -08:00
Jim Graham
f10782e757 Build DisplayList directly from flutter::Canvas (flutter/engine#29470) 2021-11-10 15:16:31 -08:00
Jim Graham
948d1538c3 separate saveLayer events into record and execute variants and trace more of the execution calls (flutter/engine#29598) 2021-11-09 16:13:01 -08:00
Dan Field
19885035d0 Trace calls to Canvas::saveLayer (flutter/engine#29444) 2021-11-05 14:29:04 -07:00
Jim Graham
d8bbd282b3 use SkMatrix.invert() instead of MatrixDecomposition to validate cache matrices (flutter/engine#29530) 2021-11-04 15:38:01 -07:00
Kaushik Iska
6ac761ec26 [raster_cache] Increment access_count on Touch (flutter/engine#29529) 2021-11-04 14:44:06 -07:00
Matej Knopp
7e8fc6005e Fix partial repaint when TextureLayer is inside retained layer (flutter/engine#29482) 2021-11-02 15:40:48 -07:00
Matej Knopp
66a708c874 Enable partial repaint for iOS/Metal (flutter/engine#28801) 2021-11-02 07:20:01 -07:00
Jim Graham
2e3ff9cc72 only report cache entries with images for RasterCache metrics (flutter/engine#29369) 2021-10-28 21:03:01 -07:00
Jim Graham
5465b56b29 use nested op counts to determine picture complexity for raster cache (flutter/engine#29265) 2021-10-28 14:28:02 -07:00
Matej Knopp
9fcd8ab06f ImageFilterLayer should adjust child layer bounds during diffing (flutter/engine#29317) 2021-10-27 09:07:08 -07:00
Jim Graham
7d144cb994 add flow events to the timeline to track the lifecycle of cache images (flutter/engine#29298) 2021-10-25 13:03:01 -07:00
Matej Knopp
ee25910702 Take SUPPORT_FRACTIONAL_TRANSLATION into account when diffing layers (flutter/engine#29001)
* Take SUPPORT_FRACTIONAL_TRANSLATION into account when diffing layers

* Store cull_rect in device coordinates

This removes the need to update cull rect coordinates when overriding transform
and is also consistent with how Layer::needs_painting() works.

* Use original transform for culling, but overriden transform to get paint coordinates.

This is to replicate the paint process during diffing, where layers are culled first and only then after paint the matrix is overriden.

* Rewrite AddLayerBounds based on @flar's suggestions
2021-10-12 18:44:50 +02:00
Jim Graham
600bc84915 include nested Picture stats in DisplayList byte and op counts (flutter/engine#28968) 2021-09-30 15:03:01 -07:00
Emmanuel Garcia
03fc3660f6 Destroy overlay surfaces when the rasterizer is torn down (flutter/engine#28894) 2021-09-28 14:38:02 -07:00
Jim Graham
05fd262e61 use all 16 matrix entries in Canvas.transform() to enable 3D matrix concatenation (flutter/engine#28856) 2021-09-27 17:58:01 -07:00
Chris Yang
c9f351741d backdrop_filter_layer only pushes to the leaf_nodes_canvas (flutter/engine#28500) 2021-09-27 11:33:01 -07:00
Jim Graham
9e3603308f adjust naming of methods to match style guide (flutter/engine#28753) 2021-09-23 17:13:02 -07:00
Jim Graham
df4ad31448 Improve DisplayList bounds calculations (flutter/engine#28656) 2021-09-17 13:23:02 -07:00
Jim Graham
a3c134e163 hold DisplayList objects in SkiaGPUObject wrappers (flutter/engine#28679) 2021-09-17 10:37:01 -07:00
David Worsham
657b63f499 fuchsia: Convert vulkanb headers to DEPS (flutter/engine#28676) 2021-09-16 22:39:06 -07:00
xxrl
df1529f94e Delay matrix call in Preroll of picture layer (flutter/engine#28380) 2021-09-14 23:22:03 -07:00
Jim Graham
24924f69a0 prepare drawPoints MaskFilter test for Skia bug fix (flutter/engine#28596) 2021-09-13 17:37:02 -07:00