30246 Commits

Author SHA1 Message Date
Seigo Nonaka
d1c5b172cb Use HarfBuzz metric implementation for emoji font.
To avoid lock contention in Skia, use HarfBuzz implementation
for retrieving boundary box and advance information from font.

Bug: 21705974
Test: Manually done

Change-Id: Ia88cb670ca9e0bb352bccef22c5ea3a789bcc1da
2017-01-11 17:21:40 +09:00
Chris Bracken
5952e3664d Fix exception message formatting (flutter/engine#3332)
Add a couple missing newlines.
2017-01-10 17:28:04 -08:00
Chris Bracken
cd79979fbf Extract common indent constant (flutter/engine#3331) 2017-01-10 13:52:40 -08:00
Chris Bracken
8eb3c38e09 Ignore VERSION_MACOSX_[SN]DK in licence aggregator (flutter/engine#3330)
Not shipped to clients.
2017-01-10 12:43:16 -08:00
Chris Bracken
36fb28ec98 Remove commented out Intel licence block (flutter/engine#3329) 2017-01-10 12:43:00 -08:00
Adam Barth
882919971d Add Size.flipped (flutter/engine#3328) 2017-01-10 10:45:38 -08:00
Mark Salyzyn
0043fb30d4 resolve merge conflicts of 9773115 to master
Test: compile
Bug: 30465923
Change-Id: I9bcbf910e90a9160ed2fd2f75c5d72dba6ad6fcf
2017-01-10 08:22:04 -08:00
Mark Salyzyn
707bbae8ff minikin: use log/log.h when utilizing ALOG macros
Use log/log.h to harden code against liblog changes.

Test: compile
Bug: 30465923
Change-Id: I3dea82e76d28d9ef52d7c0f11e038c4298863eb9
2017-01-09 13:33:48 -08:00
Seigo Nonaka
41ef8b376f Reduce memory usage of FontCollection.
Since switching to 64-bit devices, size_t is now a 64-bit integer.
FontCollection::Range uses two size_t integers but they just point to an index
in mFamilies. To reduce the memory usage, this CL changes the size_t integers to
uint8_t.

The maximum size of each integer in Range is the size of FontCollection::mFamilies.
The largest this can go is the system font list plus a user defined family, which
has 91 families. So an 8-bit integer should be enough.

With this change, about 84 KiB of memory will be saved per font collection. Since
eight font collections are created during bootstrap, about 670 KiB of memory will
be saved with this CL.

Bug: 33562608
Test: Ran FontCollection.collectionAllocationSizeTest on a 64-bit device.
      On my Nexus 5X, it changed from 327358 to 241342.

Change-Id: I9e01d237c9adcb05e200932401cb1a4780049f86
2017-01-06 17:27:14 +09:00
Adam Barth
8591ef59c8 Rename TransferMode to BlendMode (flutter/engine#3323)
Fixes https://github.com/flutter/flutter/issues/7200
2017-01-05 23:44:47 -08:00
amirh
05910fb84f Add a getter for flutterView in FlutterActivity. This allows fullscreen flutter apps to extend FlutterActivity and do custom stuff with the flutter view. (flutter/engine#3324) 2017-01-05 20:35:00 -08:00
Chinmay Garde
04d14ea433 Fix Linux builds by correctly initializing the GPURasterizer. (flutter/engine#3322)
The API was updated recently so platforms can report memory usage for the
rasterizer to display as an overlay.
2017-01-05 11:34:42 -08:00
Adam Barth
2ba424edb7 Remove Canvas.setMatrix and MaskFilter flags (flutter/engine#3321)
The Skia team says these APIs are outdated and should be removed. They
do not appear to have any clients.

Fixes https://github.com/flutter/flutter/issues/7202
Fixes https://github.com/flutter/flutter/issues/7204
2017-01-05 11:08:59 -08:00
Chinmay Garde
064a35c013 Make GN generate Xcode projects on Mac. (flutter/engine#3320) 2017-01-03 16:40:15 -08:00
Chinmay Garde
d14c8ac6f5 Re-format all GN files using gn format. (flutter/engine#3319) 2017-01-03 15:59:48 -08:00
Adam Barth
6ecdcd4612 Fix Fuchsia build (flutter/engine#3318) 2017-01-03 13:25:38 -08:00
Chinmay Garde
63fbe60fa6 Display resident memory statistics on the performance overlay. (flutter/engine#3314) 2017-01-03 12:27:30 -08:00
Seigo Nonaka
311d94f416 Tune line breaking for justification
Add an "mJustified" for justification, and tune the line breaking to
produce good results. Major differences for fully justified text include:
- Space can be shrunk in justified text.
- Hyphenation should be more aggressive in justified text.

Also adds a penalty for the last line being very short. This is tuned
to be more aggressive for ragged right than for justified text.

This is based on a patch by Raph Levien (raph@google.com).

Bug: 31707212
Test: Manually tested with Icbfab2faa11a6a0b52e6f0a77a9c9b5ef6e191da
Change-Id: If366f82800831ccc247ec07b7bc28ca4c6ae0ed6
2017-01-02 22:51:40 +09:00
Mark Salyzyn
280e28b99d resolve merge conflicts of fbec42b to master
Test: build
Bug: 26552300
Bug: 31289077
Change-Id: I6181ae7e84f9bdcbed50841c70d07f6906a10eb7
2016-12-28 13:51:49 -08:00
Mark Salyzyn
ff6cd90494 minikin: Replace cutils/log.h with android/log.h or log/log.h
- replace cutils/log.h with android/log.h (main buffer logging)
- replace cutils/log.h with log.log.h (+SafetyNet logging)
- define LOG_TAG before use.

Test: compile
Bug: 26552300
Bug: 31289077
Change-Id: I7a4803dd66f31b7103e09e5ff5b8fa523fa0fd60
2016-12-27 10:10:18 -08:00
Michael Thomsen
b194ed3b5e Update editor recommendation (flutter/engine#3317)
Fixes https://github.com/flutter/flutter/issues/7294
2016-12-22 21:41:15 +01:00
Jason Simmons
49424e1b4f Detach the EGL surface from the GPU thread and then destroy it during the FlutterView surfaceDestroyed callback (flutter/engine#3316)
Fixes https://github.com/flutter/flutter/issues/7147
2016-12-16 15:36:33 -08:00
Dan Willemsen
7e38090b57 Use LOCAL_TEST_DATA to install test data
This will handle installation for local builds as well as for the test
bundles.

Test: m -j minikin_tests; ls $OUT/data/nativetest*/minikin_tests
Test: m -j continous_native_tests dist; zipinfo -1 out/dist/*continuous_native_tests*.zip
Test: /data/nativetest{,64}/minikin_tests/minikin_tests
Change-Id: Iafd31fa119e7c4d92937ca8ae8346e268a6c1f38
Merged-In: Iafd31fa119e7c4d92937ca8ae8346e268a6c1f38
2016-12-15 18:47:17 +00:00
Dan Willemsen
7383094bf6 Merge "Use LOCAL_TEST_DATA to install test data" 2016-12-15 18:39:53 +00:00
Benjamin Lerman
a56d9c1666 Remove obsolete usage of the fuchsia tracing macros. (flutter/engine#3311) 2016-12-14 16:08:42 +01:00
Yirui Huang
a4a8c9cad6 Merge "Change language score calculation" 2016-12-14 05:45:23 +00:00
Chinmay Garde
327e5163cf Dont override the explicitly set paint bounds in Layer::Preroll. (flutter/engine#3313) 2016-12-13 17:14:25 -08:00
Dan Willemsen
6c5e3f1844 Use LOCAL_TEST_DATA to install test data
This will handle installation for local builds as well as for the test
bundles.

Test: m -j minikin_tests; ls $OUT/data/nativetest*/minikin_tests
Test: m -j continous_native_tests dist; zipinfo -1 out/dist/*continuous_native_tests*.zip
Test: /data/nativetest{,64}/minikin_tests/minikin_tests
Change-Id: Iafd31fa119e7c4d92937ca8ae8346e268a6c1f38
2016-12-13 17:12:32 -08:00
Collin Jackson
07b11ca18b Fix reference SkyWindow > FlutterWindow (flutter/engine#3309) 2016-12-13 08:46:16 -08:00
Ian Hickson
a326126b87 Color docs (flutter/engine#3310) 2016-12-12 23:40:04 -08:00
Jason Simmons
ba88e87175 Do not dispatch UI events if they arrive after the FlutterView has been destroyed (flutter/engine#3306)
Fixes https://github.com/flutter/flutter/issues/7234
2016-12-12 16:30:26 -08:00
Chinmay Garde
f1486c2ca0 Fix typo in README regarding --unopt builds on host. (flutter/engine#3308) 2016-12-12 16:04:57 -08:00
Collin Jackson
9a53005f50 Fix reference to nib file (flutter/engine#3307) 2016-12-12 15:57:33 -08:00
Chinmay Garde
6f3487f5f6 Add option to desktop test shells to use an embedded font for consistent unit tests. (flutter/engine#3301)
* This allows the tests to add their own FLX files but still use consistent fonts.
* The test fonts are only embedded on the desktop test shells. The option is not available on mobile platforms.
* Right now, all fonts will resolve to the test font. If we want tests to be able to use the fonts they embed in FLX files but use the test font for platform fallbacks, we will need to add font selector fallbacks. I can do this in an another patch. So far, there are no users of this functionality.
2016-12-09 14:47:49 -08:00
Zachary Anderson
51a86fd1fd Use dart instead of dart_no_observatoy (flutter/engine#3304)
Now that the observatory build works in Fuchsia, use dart instead of dart_no_observatory so that dart_no_observatory can be removed from the build.
2016-12-09 09:52:48 -08:00
Colin Cross
88e53947ad Merge "Move LOCAL_PICKUP_FILES out of $OUT/data" am: 8d6a018645 am: 77f96edc2f am: 03959097a9
am: 8dc83b4547

Change-Id: I0d13d864021b47eed3ee730fb09783044423ecd4
2016-12-09 02:20:54 +00:00
Colin Cross
8d6a018645 Merge "Move LOCAL_PICKUP_FILES out of $OUT/data" 2016-12-09 01:53:13 +00:00
Chinmay Garde
3e3e694bfb Decorate kDartWriteProtectCodeArgs with FTL_ALLOW_UNUSED_TYPE since it may not be used in all configurations. (flutter/engine#3302) 2016-12-08 16:26:39 -08:00
John McCutchan
c30259f646 Disable code page write protection in debug mode (flutter/engine#3299) 2016-12-08 15:06:13 -08:00
Jason Simmons
5045f38837 Null check before queueing deletion of Skia objects (flutter/engine#3298)
Fixes https://github.com/flutter/flutter/issues/7182
2016-12-08 12:43:50 -08:00
Jason Simmons
0774407d96 Catch and log exceptions thrown in message listeners provided by apps (flutter/engine#3297)
FlutterView's host message processing methods are invoked from native code,
and the JNI wrappers will abort the process if the Java side has an uncaught
exception.
2016-12-07 14:47:40 -08:00
Jason Simmons
6882e41a3d Fix invalid JSON in listViews RPC response when a view does not have an isolate (flutter/engine#3295)
Fixes https://github.com/flutter/flutter/issues/7174
2016-12-07 13:11:41 -08:00
Jason Simmons
016cc947c8 Unblock FlutterView.getBitmap if there is no available layer tree (flutter/engine#3294) 2016-12-06 15:12:03 -08:00
Collin Jackson
40f3877c23 rename sky -> flutter in shell (flutter/engine#3293) 2016-12-06 14:43:53 -08:00
Yirui Huang
f20a2ef271 Change language score calculation
Change language score calculation in the calculation of the font family.
Instead of language and script matching, a match in subtag is added.
In addition, a match in subtag has a higher priority than a match in
script. The score levels are divided into 5 score levels and the limit
of the number of font languages is changed to 12 from 17. Multiple
languages selection rule could to be added in the future.

Bug: 31608997
Test: Done by unittests.
Change-Id: I1e7177095f604fd1794bc99ca36c705dcb4c56e7
2016-12-06 18:17:54 +09:00
Chinmay Garde
7764bbac05 Convert the enable-dart-profiling to a shell argument in SkyActivity. (flutter/engine#3292) 2016-12-05 15:12:48 -08:00
Colin Cross
be7c33a74e Move LOCAL_PICKUP_FILES out of $OUT/data
minikin_tests was copying its test data to
$OUT/data/DATA/nativetest/minikin_test, and then packaging that with
LOCAL_PICKUP_FILES=$OUT/data/DATA, which would also pick up anything
any other module copyied to $OUT/data/DATA.  $OUT/data/DATA isn't
where the tests expect to find their data, they look in
/data/nativetest/minikin_test.  Copy the files to the intermediates
directory instead.

A future change will install LOCAL_PICKUP_FILES for local builds
to the correct place, so adb sync and
adb shell /data/nativetest/minikin_tests/minikin_tests will run the
tests.

Test: mma -j
Change-Id: I808ce743f51e5ccac711e22821e7e0d7cd94ffdf
2016-12-02 18:04:42 -08:00
Ian Hickson
ea4e307218 Update licenses, and test that licenses are valid (flutter/engine#3286)
* Test that licenses are valid.

* Move license script from flutter/buildroot to flutter/engine
2016-12-02 14:51:39 -08:00
Adam Barth
6312be1f15 Use initialized memory for composited bounds (flutter/engine#3291)
SkRect objects need to be manually initialized. Previously, we were using
unintialized memory in our bounds calculations.
2016-12-02 14:18:11 -08:00
Chinmay Garde
357892b8ef [iOS] Don’t perform a per frame platform to UI thread switch. (flutter/engine#3288) 2016-12-01 17:35:40 -08:00