570 Commits

Author SHA1 Message Date
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
Jim Graham
10d49ea696 Add RasterCache metrics to the FrameTimings (flutter/engine#28439) 2021-09-03 16:26:01 -07:00
ColdPaleLight
4a74166097 Started providing the GPU sync switch to Rasterizer.DrawToSurface() (flutter/engine#28383)
Co-authored-by: Aaron Clarke <gaaclarke>
2021-09-01 11:37:22 -07:00
Jim Graham
967d492667 merge accounting of the (mutually exclusive) picture and dl cache entries in reported statistics (flutter/engine#28392) 2021-08-31 17:21:02 -07:00
Jim Graham
c5ca2fdb88 ensure op counts match between DisplayList and SkPicture (flutter/engine#28287) 2021-08-31 14:16:01 -07:00
Jim Graham
d30732ef0b fix leak of DisplayList storage (flutter/engine#28158) 2021-08-18 13:02:01 -07:00
Jim Graham
4f7f65eb99 fix a number of conditions for computing bounds from saveLayers (flutter/engine#27683) 2021-08-03 00:10:02 -07:00
Jim Graham
69211de5c2 Frame timings clone fix (flutter/engine#27751) 2021-07-27 18:44:02 -07:00
Jim Graham
cb748a382a add test for scaled playback of DL and SkPicture (flutter/engine#27503) 2021-07-19 19:36:02 -07:00
untp
2091a9ee36 [flow] Switch to directional shadows (flutter/engine#27124) 2021-07-16 19:11:01 -07:00
Jason Simmons
6658128a41 Rename SkiaGPUObject::get() to skia_object() (flutter/engine#27126) 2021-07-15 18:31:15 -07:00
Jim Graham
d547fd7990 remove references to deprecated SkPaint::getBlendMode() (flutter/engine#27333) 2021-07-12 14:06:05 -07:00
Jim Graham
ab8a90ddeb encode DPR for shadows into DisplayList (flutter/engine#27289) 2021-07-10 00:46:02 -07:00
Jim Graham
eb06a3ad7c delete references to FilterQuality prior to its removal (flutter/engine#27257) 2021-07-08 14:21:01 -07:00
Jim Graham
8c25b1a2c3 Fix spelling Ingore->Ignore (flutter/engine#27225) 2021-07-07 16:31:01 -07:00
Jim Graham
bc967569ed add support for SkPathEffect to DisplayList (flutter/engine#27155) 2021-07-03 21:41:02 -07:00
Kaushik Iska
833796b779 FrameTimings captures raster finish time in wall-clock time (flutter/engine#27074) 2021-07-01 11:36:02 -07:00
Jim Graham
ce11db413a Implement a DisplayList mechanism similar to the Skia SkLiteDL mechanism (flutter/engine#26928) 2021-06-30 17:31:02 -07:00
David Worsham
5e5fe01dd2 Reland "fuchsia: Delete all the legacy code! (#26422)" (flutter/engine#27075)
This reverts commit bb3c49a9c3edf931a5601f0245faa85f5e077cb4.
2021-06-30 15:43:21 -07:00