33 Commits

Author SHA1 Message Date
Ferhat
b080bdf56f
Prevent recycling of canvas multiple times (#23089) 2020-12-15 16:42:40 -08:00
David Iglesias
50d830a1ac
[web] Do not reset 'cursor' in PersistedPlatformView. (#22977) 2020-12-10 16:03:02 -08:00
Ferhat
91ec9451dd
[web] Optimize BitmapCanvas. Fixes overallocation of canvas elements (#22856) 2020-12-10 09:08:29 -08:00
Ferhat
23324c10dd
[web] Fix test failure on high dpi device (#22618) 2020-11-19 14:56:30 -08:00
Ferhat
c81a2ecb58
[web]Update @dart annotation. Change shaders to allocate smaller canvas (#22481) 2020-11-13 13:55:32 -08:00
Konstantin Scheglov
cf376142ed
Ignore several import_of_legacy_library_into_null_safe (#22326) 2020-11-06 09:55:29 -08:00
Ferhat
1ad676529a
[web] Fixes canvas pixelation and overallocation due to transforms. (#22160) 2020-10-30 09:02:49 -07:00
Ferhat
6999c4d4e2
When picture is updated and bitmapcanvas reused, clear element cache (#22072) 2020-10-23 12:31:48 -07:00
Greg Spencer
6bc70e4a11
Reland: Migration to PlatformDispatcher and multi-window (#21932)
This re-lands #20496 and #21780 after fixing the semantics-enabling code that was causing the post-submit web_smoke_test to fail.

Below is the description from the original PR:

This is a PR for converting the dart:ui code in the engine to use a multi-window API. The goal here is to convert from the window singleton to an API that has the concept of multiple windows. Also, I'm matching up the new PlatformDispatcher class to talk directly to the PlatformConfiguration class in the engine. I'm not attempting to actually enable creating multiple windows here, just migrate to an API that has a concept of multiple windows. The multi-window API in this PR currently only ever creates one window.

The design doc for this change is here.

The major changes in this PR:

Move the platfom-specific attributes out of Window, and into the new PlatformDispatcher class that holds all of the platform state, so that the platform code need only update the configuration on this class.
Create FlutterView, FlutterWindow, and SingletonFlutterWindow classes to separate out the concepts of a view (of which there may be multiple in a window), a window (of which there may be multiple on a screen, and they host views), and a window where there is only ever expected to be one (this hosts the entire API of the former Window class, and will eventually be the type of the window singleton).
Next step after this PR lands:

Remove the Window class entirely (it is replaced by SingletonFlutterWindow). Some minor changes in the Framework are needed to switch to using SingletonFlutterWindow directly first.

The Window class still exists in this PR, but will be removed as soon as the framework is converted to point to the SingletonFlutterWindow class instead. They share the same API, just have different names (Window is currently a subclass of SingletonFlutterWindow). The intention is that the Window name will be freed up to use as a widget class name in the framework for managing windows. The singleton called window will remain, and keep the same API it has now.
2020-10-22 14:54:25 -07:00
Ferhat
149ef70830
[web] Implement sweep gradient (#21873) 2020-10-19 22:14:42 -07:00
Ferhat
0747f2f4b1
[web] Fix 3d transforms for html backend (#21499)
* Workaround for canvas element lacking support for 3d setTransform

* update golden test

* Add webkit workaround

* Implement DOM rendering for perspective

* cleanup

* update goldens lock

* Add check for shader and filtermask for dom use

* Fix svg viewBox. Move zIndex check to bitmap canvas

* Fix null check warning

* Fix scene_builder zIndex=-1 test to force canvas usage

* Add blendmode handling for DOM mode

* Update maxdiff and golden locks

* Remove unused import

* Add drawcolor/drawpaint test. Fix bounds for drawColor/drawPaint

* update golden locks

* adjust drawColor for dpr

* Update test to use canvas

* Fix toDataUrl NNBD

* Update Picture.toImage to use canvas to obstain image data

* Remove write:true from golden calls

* Add fill-rule for _pathToSvgElement

* Update golden locks

* Fix sceneBuilder pushClip / add missing clipBehaviour

* Fix test now that clipping works correctly

* move overflow handling for tests into DOMClip.addOverflow

* Add clipRect to test to keep render inside bitmap canvas area

* Update compositing test, fix drawColor coordinates

* update golden locks

* Skip test for matchGolden infra fail

* update golden lock

* merge

* update maxdiff for text over canvas

* update golden diff

* update paint spread bounds maxdiff

* update paint spread maxDiff
2020-10-19 17:27:27 -07:00
Yuqian Li
c2938d06b1
Revert "Migration to PlatformDispatcher and multi-window #20496" (#21792)
* Revert "Fix documentation build for window changes. (#21780)"

This reverts commit 931a04683d6eb49fc92059b2384ac5b1618d5422.

* Revert "Migration to PlatformDispatcher and multi-window (#20496)"

This reverts commit 85b0031f73544e448354047dc6a236c0b0808252.
2020-10-12 19:26:41 -07:00
Greg Spencer
85b0031f73
Migration to PlatformDispatcher and multi-window (#20496)
This is a PR for converting the dart:ui code in the engine to use a multi-window API. The goal here is to convert from the window singleton to an API that has the concept of multiple windows. Also, I'm matching up the new PlatformDispatcher class to talk directly to the PlatformConfiguration class in the engine. I'm not attempting to actually enable creating multiple windows here, just migrate to an API that has a concept of multiple windows. The multi-window API in this PR currently only ever creates one window.

The design doc for this change is here.

The major changes in this PR:

Move the platfom-specific attributes out of Window, and into the new PlatformDispatcher class that holds all of the platform state, so that the platform code need only update the configuration on this class.
Create FlutterView, FlutterWindow, and SingletonFlutterWindow classes to separate out the concepts of a view (of which there may be multiple in a window), a window (of which there may be multiple on a screen, and they host views), and a window where there is only ever expected to be one (this hosts the entire API of the former Window class, and will eventually be the type of the window singleton).
Next step after this PR lands:

Remove the Window class entirely (it is replaced by SingletonFlutterWindow). Some minor changes in the Framework are needed to switch to using SingletonFlutterWindow directly first.

The Window class still exists in this PR, but will be removed as soon as the framework is converted to point to the SingletonFlutterWindow class instead. They share the same API, just have different names (Window is currently a subclass of SingletonFlutterWindow). The intention is that the Window name will be freed up to use as a widget class name in the framework for managing windows. The singleton called window will remain, and keep the same API it has now.
2020-10-09 16:29:16 -07:00
Ferhat
ec1d111171
[web] Add ShaderBuilder, change drawVertices to use builder. (#21716)
* Move shader.dart into shaders directory
* Add Shader builder basic structure and decls
* rewrite drawVertices with ShaderBuilder
* Fix in parameters in fragment shader to use varying for webgl1
2020-10-09 15:52:29 -07:00
Yegor
94af181af6
web: implement frame timings (#21552)
* web: implement frame timings
2020-10-02 22:05:07 -07:00
Ferhat
f37a0b12e8
Fix mono quad winding (#21530) 2020-10-01 13:51:38 -07:00
David Iglesias
3d0f12974d
[web] Add canUpdateAsMatch to PersistedPlatformView. (#21313) 2020-09-23 21:47:02 -07:00
Ferhat
bada9fc5f3
[web] Fix path clip crash when reused (#20846) 2020-08-30 19:35:39 -07:00
nturgut
bb24b4938f
[web] Build unit tests with dart2js instead of build_runner (#20390)
* change from build_runner to dart2js

* add internalBootstrapBrowserTest to some of the tests

* add internalBootstrapBrowserTest to all remaining tests

* make tests build in paralel. Total time dropped from 586 to 177 seconds for 8 core MacBook

* change isolates with pool

* fixing analysis errors

* skipping canvaskit tests for ios-safari

* copy image files to the build directory

* adding internalBootstrapBrowserTest to newly added tests

* add internalBootstrapBrowserTest to faling path iterator test

* necessary changes to make chrome windows work

* in windows test in chrome instead of edge. our edge code was for legacy edge

* do not run golden unit tests on Windows LUCI bots for now

* addressing reviewer comments. Adding a method for deciding when to run integration tests.

* remove lines that I forgot to remove

* fixing analysis error. add issue for todo

* add bootstap to a test file

* adding bootstrap to another test

* add internalBootstrapBrowserTest to a golden test

* return test result in bat file. use archieve package to unzip

* fixing logs for chrome_installer

* use archieve and archieve entity instead of dynamic

* adding comments for windows platform archieve part

* addressing reviewer comments

* change readme file
2020-08-17 16:19:27 -07:00
Jason Simmons
9993228251
Fix web_ui warnings flagged by the next Dart analyzer update (#20524) 2020-08-14 13:29:50 -07:00
Ferhat
6988f01779
Add Path iterator tests, sync verbs with skia enums, fix PathIterator.peek. (#20381)
* Sync verb enum to skia. Fix PathIterator.peek, add tests
* Add constant for iterator buffer size
2020-08-10 17:24:28 -07:00
nturgut
3fcf5463b9
Run IOS unit tests on LUCI (#19141)
* change the version of simulator. luci bots only has 13.0

* skip failing pointer binding tests

* skip path_metrics (canvaskit) and a method from surface_test

* fix analyzer errors

* remove extra added touch event context test

* removing left overs for screenshot debugging

* apply reviewers suggestion for skipping tests
2020-06-23 15:22:01 -07:00
nturgut
03b7bad6d1
remove failing tests on safari (#18944) 2020-06-09 17:19:47 -07:00
Yegor
d30024829e
Minimize child DOM node moves in many-to-many update (#18648)
* minimize child DOM node moves in many-to-many update
2020-06-04 10:53:38 -07:00
Yegor
cd4b83d3db
auto-pop pushed layers (#18451) 2020-05-18 10:01:37 -07:00
Yegor
609519ec14
release previous canvas when picture is not painted (#18404) 2020-05-14 18:25:13 -07:00
Yegor
68bf137634
skip painting clipped out pictures (#18204) 2020-05-08 11:14:30 -07:00
Yegor
deaf14ec7d
Use Float32List as Matrix storage inside the Web engine (#17856)
This change converts all Float64List matrices to Float32List at the dart:ui interface boundary. Internally, it only uses Float32List. Float32List requires less memory and is orders of magnitude faster to allocate, and it has sufficient precision as Flutter mobile engine and Skia use 32-bit floats anyway.

This change speeds up frame preroll by 50% on the bench_card_infinite_scroll benchmark.

For more details on Float64Array allocation in JS (which backs Float64List in Dart) see the following:

https://bugs.chromium.org/p/v8/issues/detail?id=9199
https://bugs.chromium.org/p/v8/issues/detail?id=2022
2020-04-22 11:08:23 -07:00
Yegor
cb3237e255
Add more child lifecycle tests (#16689) 2020-03-09 16:26:06 -07:00
vsmenon
0ef67b5e74
opt out dart:ui from nnbd (#16473)
* opt out dart:ui from nnbd

* Annotate tests as well
2020-02-20 11:04:00 -08:00
Yegor
8b0b6490ee
improve surface state assert error messages (#16595) 2020-02-14 08:04:31 -08:00
Yegor
5fe6083d34
Move surface-based SceneBuilder implementation under surface/ (#13159)
Move surface-based SceneBuilder implementation under surface/
2019-10-15 20:07:28 -07:00
Yegor
fad38e252f
sync web engine; run web engine tests (#11031)
sync web engine; run web engine tests
2019-08-22 16:38:03 -07:00