926 Commits

Author SHA1 Message Date
Harry Terkelsen
77c3512ec8
Implement the rest of ui.Path methods for CanvasKit (#13851)
- the relative path methods
- Path.combine
2019-11-14 11:08:34 -08:00
Ferhat
562dd0394b
[web] Change canvas sibling transforms to 3d with z=0 to get around canvas rendering bug. (#13860)
* Change off canvas element transforms to 3d with z=0
* update matrix4 call to call 3d version
2019-11-14 11:03:05 -08:00
Mouad Debbar
3a89662ca1
[web] Fix selectable text rendering (#13802) 2019-11-14 00:12:56 -08:00
Jason Simmons
f5c002254b
Use Skia's matchStyleCSS3 to find bundled asset typefaces matching a font style (#13848)
This will improve font matching in SkParagraph for fonts that are bundled as
assets within the app.  Libtxt was using Minikin's FontFamily class to select
the closest matching font, but SkParagraph will rely on the matchStyle
implementation in the asset font manager.
2019-11-13 17:44:25 -08:00
Ferhat
b6a0fb77ed
[web] Fix blendmode for images (#13809)
* Fix blendmode for images
2019-11-13 13:09:16 -08:00
chunhtai
1f1e2ba58e
reland add lifecycle enum (#13767)
This reverts commit 8ebb318401344793daa10c3bec97c34891cf7cc8.
2019-11-13 11:26:25 -08:00
Gary Qian
b358dc58fb
Remove extra shadows from Web Engine EngineParagraphStyle (#13805) 2019-11-13 11:13:46 -08:00
Yegor
dee42b4ead
implement radial gradient in canvaskit backend (#13796) 2019-11-12 10:56:07 -08:00
Clement Skau
db23a6cabf Adds missing comma in EngineParagraphStyle.toString() (#13795) 2019-11-12 17:00:54 +01:00
Ferhat
679a4369b2
[web] Implement TextStyle.shadows (#13769)
* Add shadows to Engine classes
* add text shadow test
* update golden locks file, update ui.ParagraphStyle, fix issues
* Change maxDiffRate for mac clients
2019-11-12 00:05:00 -08:00
Ferhat
1a7bf8578d
Move Path and PathMetrics from canvas.dart into their own files. No delta (#13772)
* Move Path and PathMetrics into their own files. No delta
* update file list in licenses_flutter
2019-11-11 21:27:15 -08:00
Harry Terkelsen
e150bf3305
Take devicePixelRatio into account when drawing shadows (#13786)
* Take devicePixelRatio into account when drawing shadows

This fixes a bug where shadows were offset in CanvasKit

* Respond to review comments
2019-11-11 18:20:08 -08:00
Harry Terkelsen
63e8c6275e
Add ImageFilter and BackdropFilter to CanvasKit backend (#13768)
* Implement ImageFilter.blur and BackdropFilter

* update licenses file

* Respond to review comments
2019-11-11 17:20:45 -08:00
Harry Terkelsen
726e8f54db
Add Helvetica and sans-serif as fallback font families (#13784)
* Add Helvetica and sans-serif as fallback font families

This prevents us from using an ugly serif default font when the
requested font isn't available.

* Use Arial when not on iOS
2019-11-11 16:54:28 -08:00
Greg Spencer
f68de3f451
Add line boundary information to LineMetrics. (#13727)
This exposes the line boundary information a line by adding getLineBoundary to return the indices corresponding to a line around a TextPosition. The information is already calculated when calculating line metrics, so that we can enable moving the selection/cursor to the beginning/end of a line in a text field.
2019-11-11 16:42:40 -08:00
Ferhat
10d5ed19f8
[web] Fix path to svg for drrect (#13779) 2019-11-11 15:38:30 -08:00
Greg Spencer
e0b9a2bb23
Change wordBoundary to take dynamic temporarily (#13765)
Converting the argument to Paragraph.wordBoundary to dynamic temporarily until the framework code is converted to send a TextPosition instead of an int.

I'll submit this, then update the framework side to send a TextPosition, and expect a TextRange
or a List<int>, and then submit that, then I'll change this code to send a TextRange and take a TextPostion only, removing the dynamic here. Once that's done, I'll remove the code in the framework that expects a TextRange or a List<int>, and have it just expect a TextRange.

This is so that we can change the API without breaking the builds.

Landing on red to kick the engine builds.
2019-11-08 16:27:00 -08:00
Harry Terkelsen
2f69e38160
Implement Path.computeMetrics in the CanvasKit backend (#13760)
* Implement Path.computeMetrics in the CanvasKit backend

* Add license for path_metrics.dart
2019-11-08 15:53:42 -08:00
Ferhat
7413304c37
[web] Support gif/webp animations, Speed up image drawing in BitmapCanvas. (#13748)
* Add draw image test
* Optimize drawImageScaled
* optimize cloning in HtmlImage, implement drawImageRect using image tag
2019-11-08 12:52:01 -08:00
Greg Spencer
f7e73b6236
Move TextRange from the framework to dart:ui. (#13747)
This removes TextRange from the framework and moves it to the engine, in preparation for using it to return text ranges from the text extent APIs, like Paragraph.getWordBoundary instead of a List<int>.

Also added new tests for TextRange.
2019-11-08 12:21:46 -08:00
Ferhat
6ad57b0d57
Don't run engine tests under vm (causing warnings) (#13737) 2019-11-07 16:28:17 -08:00
liyuqian
629930e888
Prefer SchedulerBinding.addTimingsCallback (#13728)
This doc update solves our TODO in https://github.com/flutter/flutter/pull/43676/files#diff-6a35a9a692c9af7473ba1a0a74c979c8R223
2019-11-07 14:05:43 -08:00
Mouad Debbar
abaa85a394
[web] Proper support for text field's obscureText (#13722) 2019-11-06 13:20:23 -08:00
chunhtai
8ebb318401
Revert "Issues/39832 reland (#13642)" (#13720)
This reverts commit 1bfb928e071674a21779cee94908fbcae1c2e657.
2019-11-06 11:41:36 -08:00
Mouad Debbar
a9ef2410f6
[web] Don't send keyboard events from text fields to flutter (#13699) 2019-11-05 19:00:51 -08:00
chunhtai
1bfb928e07
Issues/39832 reland (#13642)
* Reland "Added new lifecycle enum (#11913)"
2019-11-05 14:52:16 -08:00
Mouad Debbar
f6e24a00cc
[web] Ignore changes in *.ttf files in felt build watch mode (#13634) 2019-11-05 13:31:51 -08:00
Mouad Debbar
5b87cd0773
Fix bug where Enter doesn't add new line in multi-line fields (#13630) 2019-11-05 13:31:40 -08:00
Gary Qian
0928c1af2f
Add 'Cough' test font and support multiple test fonts. (#13649) 2019-11-05 12:27:34 -08:00
chunhtai
fe0838e948
Revert "Added new lifecycle enum (#11913)" (#13632)
This reverts commit 02a479007420b05df8e075978ecdd15442ea520f.
2019-11-04 13:40:20 -08:00
chunhtai
02a4790074
Added new lifecycle enum (#11913) 2019-11-04 12:33:41 -08:00
Yegor
6e0e2274f1
fix getBoxesForRange for zero-length ranges (#13483) 2019-11-04 10:16:38 -08:00
gaaclarke
1eb15c12fb
Revert 78a8ca0f62b04fa49030ecdd2d91726c0639401f (#13467)
Put `Picture.toImage` back on the GPU thread.  Left the unit tests intact.
2019-10-31 16:57:52 -07:00
Nurhan Turgut
fb4366e52b
[web] Get the size from visualviewport instead of window.innerHeight/innerW… (#13462)
* get the size from visualviewport instead of window.innerHeight/innerWidth.

* merging 2 if statements to one.

* add more comments
2019-10-31 15:10:38 -07:00
Yegor
49971e2140
Implement basic Picture.toImage via BitmapCanvas (#13391)
Implement basic Picture.toImage via BitmapCanvas and update the dartdocs.
2019-10-28 12:50:43 -07:00
Harry Terkelsen
2ea18a5e76
Expand on CanvasKit backend more (#13361)
- add Path.addPath
- add Path.conicTo
- add Path.transform
- use Skia's computeTonalColors to compute shadow colors
2019-10-25 14:30:38 -07:00
Yegor
797e094f0c
Web: fix Color subclass handling (#13359) 2019-10-25 13:41:46 -07:00
David Iglesias
89731aefca
Intercept SystemSound.play platform message before it's sent. (#13342)
Fixes https://github.com/flutter/flutter/issues/43462
2019-10-25 12:24:36 -07:00
Nurhan Turgut
3b97d3a329
[web] [test] Adding firefox install functionality to the test platform (#13272)
* Add Firefox installing functionality to test platform. For Linux only. Refactor test platform code

* remove download.dart. Not complete for now

* uncomment firefox.dart. Adding new CL parameters.

* Licence headers added.

* adding more comments to firefox_installer

* adding test for firefox download

* address pr comments. change directory for test in .cirrus.yml

* change directory for test_web_engine_firefox_script

* removing the system test.
2019-10-23 14:41:49 -07:00
Ferhat
227e44d9e5
[web] Cupertino dynamic color fix. (#13296)
* Fix cupertino theme rendering issues due to Color subclassing
Fixes flutter/flutter#41257
2019-10-22 16:46:38 -07:00
Ferhat
d7ca3c7138
Fix decode feature detection in HtmlCodec (#13274) 2019-10-22 15:07:39 -07:00
Harry Terkelsen
2eaf62fdc8
Flesh out the CanvasKit backend some more (#13275)
* Flesh out the CanvasKit backend some more

- Implement `drawOval` and `addOval`
- Use the Canvas's own `getSaveCount`
- Implement `skew`
- Implement `saveLayerWithoutBounds`
- Document things which we don't plan to implement in the Skia backend

* Remove `rasterCache` fake support

* Remove saveCount setter
2019-10-22 13:15:35 -07:00
Mouad Debbar
4307a9b487
[web] Support input action (#13268) 2019-10-21 15:23:36 -07:00
Mouad Debbar
6a3baef78b
[web] Support -j to use goma in felt build (#13259) 2019-10-21 15:23:19 -07:00
Jason Simmons
4ecfa62735
Hold a reference to the Skia unref queue in UIDartState (#13239)
Obtaining the SkiaUnrefQueue through the IOManager is unsafe because
UIDartState has a weak pointer to the IOManager that can not be dereferenced
on the UI thread.
2019-10-21 14:15:03 -07:00
Gary Qian
8318d5f386
Update ui.instantiateImageCodec docs to reflect what it does. (#13233) 2019-10-21 12:29:19 -07:00
Harry Terkelsen
5cc7416990
Update CanvasKit to 0.7.0 and flesh out painting (#13240)
* Update CanvasKit to 0.7.0 and flesh out painting

This allows us to fix some bugs in the CanvasKit backend.

- Implement RRect where the radii are different
- Implement drawDRRect
- Implement ColorFilter
- Implement the correct `arcTo` for `arcToPoint`

* update licenses

* Respond to review comments

- Add TODO to avoid unnecessary conversions
- Don't set CanvasKit to default
- Fix licenses file

* Add ==, hashCode, and toString back to ColorFilter API
2019-10-21 11:28:55 -07:00
Jason Simmons
8882bf3c73
Avoid dereferencing IO manager weak pointers on the UI thread (#13232)
UI thread APIs that need to access the IO thread's resource context should
obtain a weak pointer to the IO manager and pass that to the IO thread.
2019-10-18 16:01:55 -07:00
Mouad Debbar
98e6d15663
Preserve stdout colors of subprocesses run by felt (#13209) 2019-10-18 10:41:44 -07:00
Ferhat
6d0f075709
[web] Fix canvas reuse metrics. Refactor drawVertices code. (#13190)
* Draw vertices to shared offscreen canvas on browsers that support OffscreenCanvas.
* Move gl rendering code to render_vertices.dart.
* Reuse shaders and program across calls.
2019-10-18 10:41:16 -07:00