137 Commits

Author SHA1 Message Date
Jim Graham
f7e95e3490 fix typo in LayerInfo::has_compatible_op (flutter/engine#40209)
fix typo in LayerInfo::has_compatible_op
2023-03-10 05:32:13 +00:00
Jim Graham
bc162fe559 Revert "Reland "Sequester all Skia<->DL interactions into the skia sub-module" (#40114)" (flutter/engine#40161)
Revert "Reland "Sequester all Skia<->DL interactions into the skia sub-module""
2023-03-09 02:41:54 +00:00
Jim Graham
53a80bdedf Reland "Sequester all Skia<->DL interactions into the skia sub-module" (flutter/engine#40114)
Reland "Sequester all Skia<->DL interactions into the skia sub-module"
2023-03-07 19:03:17 +00:00
Jason Simmons
6927af678e Revert "Sequester all Skia<->DL interactions into the skia sub-module (#40083)" (flutter/engine#40103)
Revert "Sequester all Skia<->DL interactions into the skia sub-module (#40083)"
2023-03-07 02:58:49 +00:00
Jim Graham
acd130b2b2 Sequester all Skia<->DL interactions into the skia sub-module (flutter/engine#40083)
Sequester all Skia<->DL interactions into the skia sub-module
2023-03-06 19:55:32 +00:00
Jim Graham
cf7d6b6440 remove obsolete DlAttribute::From(SkObject) methods (flutter/engine#40005)
remove obsolete DlAttribute::From(SkObject) methods
2023-03-02 03:49:18 +00:00
Jim Graham
713de45bb4 switch DL rendertests to DlCanvas(SkCanvas) and DlCanvas(Builder) operations (flutter/engine#39944)
add DlCanvas(SkCanvas) vs DlCanvas(Builder) variants to DL rendertests
2023-03-01 21:33:24 +00:00
Jim Graham
7ac53d958d delete DL ops no longer needed after removing SkCanvasRecorder (flutter/engine#39863)
delete DL ops no longer needed after removing SkCanvasRecorder
2023-02-25 01:42:20 +00:00
Jim Graham
da247cee08 remove obsolete DisplayListCanvasRecorder and its tests (flutter/engine#39844)
remove obsolete DisplayListCanvasRecorder and its tests
2023-02-24 19:06:05 +00:00
Jim Graham
0fa8cbec8a Create DlCanvas interface and implement with DisplayListBuilder and SkCanvasAdapter (flutter/engine#39762)
* Create DlCanvas interface and implement with DisplayListBuilder and SkCanvasAdapter
2023-02-23 22:09:35 -08:00
Jim Graham
39c93ced57 Cached DisplayList opacity inheritance fix (flutter/engine#39690)
* only indicate opacity inheritance when DL is actually cached

* unit test

* use CacheInfo struct to simplify return values
2023-02-17 05:18:23 +00:00
Matej Knopp
066c6c6d8f Use DisplayListMatrixClipTracker in DiffContext (flutter/engine#38010) 2023-02-10 20:50:28 +00:00
Jim Graham
99de2ca94b add support to run dl_canvas_unittests on GPU surfaces (off by default) (flutter/engine#38993)
* add support to run dl_canvas_unittests on GPU surfaces (off by default)

* empty commit to trigger build

* conditionally include platform-specific surface provider headers

* ignore DL test files during license checks

* typo

* add dependencies to rendertests to hopefully build on Windows

* remove benchmarking deps from dl_rendertests

* more changes to get Windows rendertests to link

* add --enable-gl synonym and prevent non-SW surface provider dest on Windows

* fix gn formatting

* review feedback
2023-02-10 20:43:13 +00:00
Brandon DeRosier
841758cc6c Add SkSurface include to every file where it's used (flutter/engine#39304) 2023-02-01 00:50:58 +00:00
Kevin Lubick
0c0e36e37f Remove use of SkTAddOffset and sk_careful_memcpy (flutter/engine#38977) 2023-01-18 09:58:59 -08:00
Brandon DeRosier
1d830d58c1 [Impeller Scene] Add DisplayList OP and Dart bindings (flutter/engine#38676) 2023-01-09 20:25:59 -08:00
Kevin Lubick
2a971620d6 Inline usage of SkIsPow2 (flutter/engine#38722)
* Inline usage of SkIsPow2

* static
2023-01-09 17:22:33 -08:00
Kevin Lubick
ecd5ad9c7c SkBudgeted -> skgpu::Budgeted (flutter/engine#38660)
* SkBudgeted -> skgpu::Budgeted

* colon

* format

* fix GN rules

* undo includes
2023-01-05 21:42:34 +00:00
Jim Graham
3d89c32237 make DisplayListFlags constexpr throughout (flutter/engine#38649) 2023-01-04 23:35:22 +00:00
Jim Graham
92ac0d6d29 add virtual destructor to new virtual Culler class (flutter/engine#38494) 2022-12-24 20:17:21 +00:00
Jim Graham
c48bdca6da Display list R-Tree culling (flutter/engine#38429)
* collect DL indices in RTree for clip culling

* fix bounds in unit test and minor opt in Dispatch

* normalize inline matrix objects and minor fixes to unit test

* remove over-eager DCHECK and improve R-Tree comments

* formatting

* include vector for Windows

* method rename and distribute child nodes more evenly

* add R-Tree specific unit tests and debug checks

* add comments about geometry to R-Tree unit tests and adjust spacing

* licenses

* licenses attempt 2

* fix potential overflow with uint32_t

* aggressively const DisplayList fields and methods

* add implementation comments per review feedback
2022-12-22 10:16:25 +00:00
Jim Graham
7e9347ecf9 use min/max sandwich test on unit test bounds (flutter/engine#38435) 2022-12-21 04:36:48 +00:00
ColdPaleLight
f2007cfd2b Use DisplayListMatrixClipTracker in DisplayListBuilder (flutter/engine#38349)
* Use DisplayListMatrixClipTracker in DisplayListBuilder

* Ignore is_aa

* Revert "Ignore is_aa"

This reverts commit b201dadc773f8e726ec68ed88114df9be7b5a9b0.

* Tweak code

* Use content_culled

* getLocalClipBounds without device clip bounds roundsOut

* Tweak code and add more tests

* remove virtual
2022-12-20 10:05:40 +00:00
Kevin Lubick
6d3efb7529 Add more missing includes (flutter/engine#38398) 2022-12-19 19:14:30 +00:00
Jason Simmons
7012c66402 Add a missing include to display_list_matrix_clip_tracker.h (flutter/engine#38371) 2022-12-17 15:33:26 +00:00
Jason Simmons
46a94de351 Remove DisplayList's dependency on SkAutoTMalloc (flutter/engine#38359)
SkAutoTMalloc is not a public Skia API
2022-12-16 22:18:30 +00:00
Jim Graham
75c325f43b make sure CanvasRecorder updates clip bounds methods (flutter/engine#38325) 2022-12-15 21:40:18 +00:00
ColdPaleLight
2779c20e03 Collapse bounds calculations into DisplayListBuilder (flutter/engine#34365)
* Collapse bounds calculations into DisplayListBuilder

* Tweak code

* Remove bounds cull

* Remove obsolete comment
2022-12-15 11:52:52 +00:00
Jenn Magder
3085f214f9 Turn on clang tidy error for underscores in Google tests (flutter/engine#37700) 2022-11-17 21:13:11 +00:00
Jim Graham
2252b6f362 Reland layer state stack 2 (flutter/engine#37394)
* Revert "Revert "Reland layer state stack" (#37178)"

This reverts commit 21cc000359d8a4da097e8849e83dcbe8ac941e01.

* fix double-transform rendering issues in #114359

* adjust recently added unit test to state_stack APIs

* introduce LSS delegates to simplify some code and reduce overhead

* Fix ShellTest.OnServiceProtocolEstimateRasterCacheMemoryWorks

* add unit test for tracker.setTransform(4x4) and fix bug

* fix culling issue in LayerTree::Flatten
2022-11-17 19:34:19 +00:00
Jason Simmons
220c7b0618 Build display lists from SkParagraph output using the ParagraphPainter interface (flutter/engine#37087)
SkPaint does not provide APIs for extracting the definitions of some
attributes such as filters. The engine will instead use DlPaint
to describe how text foregrounds and backgrounds will be painted.
The DlPaint objects will be represented as PaintIDs in SkParagraph text
styles. The ParagraphPainter will then map the PaintIDs back to the
original DlPaint objects.
2022-11-11 16:39:23 +00:00
Jonah Williams
326f54412c [Impeller] null check samplers (flutter/engine#37489)
* [Impeller] null check sampler and assert in Paint

* ++

* ++

* ++

* ++

* Update fragment_shader_test.dart

* ++

* TESTING

* ++

* TESTING

* ++

* ++

* ++

* ++

* ++

* ++

* ++

* ++

* ++

* ++

* ++

* ++

* remove debugging code

* ++

* ++
2022-11-11 01:27:18 +00:00
Kaushik Iska
5b9e42523e [Reland] Add rects to accumulator rather than bounds (#37435) (flutter/engine#37451)
* [Reland] Add rects to accumulator rather than bounds (#37435)

When the accumulator is an `RTreeBoundsAccumulator` rather than a `RectBoundsAccumulator` just accumulating the bounds results in incorrect results as the `rtree` would need to be aware of the constituent non-overlapping rectangles. This would work fine for `RectBoundsAccumulator` as it would just adjust its bounds based on the passed rects.

Fixes: https://github.com/flutter/flutter/issues/113251

* Add a test for nested display list rtree
2022-11-09 10:57:29 +00:00
Kaushik Iska
2155c6ce00 Revert "Add rects to accumulator rather than bounds (#37435)" (flutter/engine#37444)
This reverts commit 10da0743a513f0ae3ae5afb5a6bd99350b881989.
2022-11-08 18:10:14 -05:00
Kaushik Iska
10da0743a5 Add rects to accumulator rather than bounds (flutter/engine#37435)
When the accumulator is an `RTreeBoundsAccumulator` rather than a `RectBoundsAccumulator` just accumulating the bounds results in incorrect results as the `rtree` would need to be aware of the constituent non-overlapping rectangles. This would work fine for `RectBoundsAccumulator` as it would just adjust its bounds based on the passed rects.

Fixes: https://github.com/flutter/flutter/issues/113251
2022-11-08 19:09:49 +00:00
Michael Ludwig
83e1fc90e2 Update display_list_image_filter_unittests to be permit Skia roll (flutter/engine#37327)
* Update display_list_image_filter_unittests to be permit Skia roll

https://skia-review.googlesource.com/c/skia/+/571798 had to be reverted because it causes DisplayListImageFilter.LocalImageFilterBounds to fail. With SkMatrixTransformImageFilter (returned by SkImageFilters::MatrixTransform) supporting complex matrices, makeWithLocalMatrix(rotation) will no longer return null.

This is at odds with the behavior of DlImageFilter's implementation which tries to mimic the existing behavior of image filters. This relaxes the test case so that Skia can improve its implementation without breaking Flutter's tests. Flutter can then update DlImageFilter to match out-of-band.

* Update comment to reference flutter issue.
2022-11-08 02:22:00 +00:00
Dan Field
21cc000359 Revert "Reland layer state stack" (flutter/engine#37178) 2022-10-31 18:56:18 +00:00
Jim Graham
df85a4f401 Reland layer state stack (flutter/engine#37135) 2022-10-30 18:30:22 +00:00
Jim Graham
8ed073eb54 Revert layer state stack (flutter/engine#37090)
* Revert "Fix a clang-tidy warning in display_list_canvas_unittests.cc (#37062)"

This reverts commit 709c6735fc7ed34df36cee23805bdaa7f6969774.

* Revert "Create a mechanism to manage layer state (#36458)"

This reverts commit 501916deb19a8303ca2a3a9bb37692a873d4679e.
2022-10-27 15:29:58 -07:00
Jason Simmons
709c6735fc Fix a clang-tidy warning in display_list_canvas_unittests.cc (flutter/engine#37062) 2022-10-26 17:31:03 -07:00
Jim Graham
501916deb1 Create a mechanism to manage layer state (flutter/engine#36458) 2022-10-26 21:43:10 +00:00
gaaclarke
cb4c9f4727 Clang-tidy: made verbose print out commands and fixed quoting problem for warnings as errors (flutter/engine#37015) 2022-10-26 08:19:12 +00:00
Jonah Williams
ffff2c1c37 Remove expensive trace events (flutter/engine#36989) 2022-10-25 21:13:14 +00:00
Brandon DeRosier
b280eb4777 [Impeller] Copy uniforms before appending them to the DisplayList (flutter/engine#36981) 2022-10-25 03:58:23 -07:00
Jason Simmons
993c84dfcb Remove use of SkFunctionWrapper from display_list (flutter/engine#36931) 2022-10-21 19:14:23 +00:00
Brandon DeRosier
05cdbafd70 [Impeller] Add DlRuntimeEffect, pipe RuntimeStage through the DL (flutter/engine#36708) 2022-10-14 14:46:28 -07:00
Jason Simmons
0faaa9756f Apply path effects from a DlPaint to a DisplayListBuilder (flutter/engine#36669) 2022-10-10 22:29:19 +00:00
Jason Simmons
f763f1b96f Convert a dart:ui Paint to a DisplayList DlPaint (flutter/engine#36629) 2022-10-07 17:29:49 +00:00
gaaclarke
e41c775200 Removed instances of unnecessary values (flutter/engine#36221) 2022-09-26 21:28:04 +00:00
Brandon DeRosier
3dda74eed7 Implement local matrix filter (flutter/engine#36309) 2022-09-21 13:12:19 -07:00