28 Commits

Author SHA1 Message Date
Harry Terkelsen
7c8f57c07d
Report error when instantiating CanvasKit network image (#22159) 2020-11-02 14:58:49 -08:00
Dan Field
b9520248c4
Add debugDisposed to Image (#21547) 2020-10-23 10:27:02 -07:00
Angjie Li
cde1e3fca8
Auto detect mode to determine which rendering backend to use. (#21852) 2020-10-22 16:17:02 -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
Harry Terkelsen
ddf978b8b9
Add more TextStyle support to Paragraph in CanvasKit mode (#21629)
* WIP on Paragraph

* WIP skparagraph

* Add more Paragraph features in CanvasKit mode

* Fix addRoundRect test

* Respond to review comments

* Remove unused (and potentially harmful) getters from Sk classes
2020-10-15 16:33:51 -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
Yegor
33515242ed
test CkPath.reset() (#21567) 2020-10-05 12:44:33 -07:00
Yegor
94af181af6
web: implement frame timings (#21552)
* web: implement frame timings
2020-10-02 22:05:07 -07:00
Dan Field
89a46af119
Implement Image.clone for CanvasKit (#21555) 2020-10-02 12:57:01 -07:00
Yegor
93735c98ef
re-enable CanvasKit path ops test (#21520)
* re-enable CanvasKit path ops test

* also test Path.combine
2020-09-30 14:30:01 -07:00
Dan Field
6a6d6d7593
Implement toString for Images on web (#21304) 2020-09-21 17:22:02 -07:00
Gábor
d67bda725a
Image.toByteData and Picture.toImage implementations (#3) (#20750)
* `Image.toByteData()` was not implemented in either DomCanvas or CanvasKit. This PR covers **both.**
* `Picture.toImage()` was not implemented in either DomCanvas or CanvasKit. This PR covers **CanvasKit**
2020-09-01 17:01:18 -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
Yegor
e0d515369f
Make CkVertices a ManagedSkiaObject (#20421) 2020-08-12 09:32:08 -07:00
Yegor
be78eba183
CanvasKit: memory management for image and shader classes (#20349)
* memory-manage images and shaders
2020-08-11 11:16:42 -07:00
Yegor
e35fbbd90d
switch to non-overloaded arcTo methods (#20341) 2020-08-10 15:07:17 -07:00
Yegor
e020907bac
Use weak references instead of resurrection, if available (#20283)
* Use weak references instead of resurrection, if available
2020-08-06 21:42:12 -07:00
Yegor
e51642e450
JS-interop clean-up (#19850) 2020-07-17 13:15:15 -07:00
Yegor
94b23abaae
Move CkCanvas to new JS-interop (#19748)
* Move CkCanvas to new JS-interop
* Make SkiaObject compatible with JS-interop; text bindings
* fix drawVertices
2020-07-16 11:56:37 -07:00
Yegor
d0b8706936
Rebuild CkPath on top of @JS bindings with 3.28x speed-up on the path benchmark (#19694)
* SkPath bindings
* CkPath uses SkPath
2020-07-14 09:09:00 -07:00
Yegor
c99deb009a
CkPaint uses SkPaint (#19562) 2020-07-11 11:34:42 -07:00
Yegor
d0e06d93cb
First batch of CanvasKit bindings using @JS (#19450)
* first batch of @JS bindings
2020-07-01 18:30:58 -07:00
Yegor
712f619737
Rename Sk* classes to Ck* in preparation for @JS migration (#19423) 2020-06-30 18:01:44 -07:00
Harry Terkelsen
f6a95deb73
Cache CanvasKit objects and delete if not used. (#19341) 2020-06-29 16:40:57 -07:00
Yegor
de74f8a581
migrate web engine implementation to null-safe Dart (#19172)
Migrate dart:_engine to null safe dart
2020-06-26 14:13:01 -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
Yegor
f49bd05014
implement SkPath.computeMetrics (#18667)
* implement SkPath.computeMetrics
2020-06-01 09:43:15 -07:00