Commit Graph

8965 Commits

Author SHA1 Message Date
Brian Osman
da6ad83507 Change how distance field paths are disabled
The path renderer bitfield will soon be private (for Skia testing
only), so switch to using the public flag.

Test: Simple refactoring change, still builds
Change-Id: I6715ba8addd0e104a46842f2398320d1904bb187
2017-08-30 09:33:44 -04:00
TreeHugger Robot
9c884633ea Merge "Release VectorDrawable cache surface on render thread" 2017-08-25 18:51:23 +00:00
Stan Iliev
6b894d7746 Release VectorDrawable cache surface on render thread
Release VectorDrawable cache surface on render thread.
This is fixing an assert in skia GrSingleOwner.h:33.

Test: Ran gmail before and after the change.
Bug: 64842607
Change-Id: I46e0c2557ac5b2fc3be2cc2d35abf96f6d6c9399
2017-08-25 10:25:11 -04:00
John Reck
1d4be040e0 Merge "Avoid setting high contrast in every view draw" 2017-08-25 04:33:31 +00:00
John Reck
938e884a1f Avoid setting high contrast in every view draw
Test: high contrast text still works
Change-Id: I6674d1aca8dddf7eb9725a5346aed12ef1dbc195
2017-08-24 16:15:58 -07:00
Yi Jin
ebec2b8639 Merge "Implement PII stripper in incidentd, part 1" 2017-08-24 18:24:36 +00:00
Yi Jin
0ed9b68a3f Implement PII stripper in incidentd, part 1
1. automatically parse privacy options and generate lookup table
2. create FdBuffer iterator API in order to remove dependency on Reporter.h

Bug: 64687253
Test: Unit test for iterator API, and manually tested lookup table
Change-Id: I1ea376a4481fc4afc7bdf447936f767b63690fd3
2017-08-23 18:13:01 -07:00
Chris Craik
994d26709b Merge "Disable hwui blending for first draw to main FBO" into oc-mr1-dev am: cf1b82c376
am: 7f41846d02

Change-Id: I6172efce4721dca34d5b6e1862f9bee2ce459bf0
2017-08-22 14:08:29 +00:00
Chris Craik
7f41846d02 Merge "Disable hwui blending for first draw to main FBO" into oc-mr1-dev
am: cf1b82c376

Change-Id: Ia42589effb03aef4ded0d5515c75c3b67bb9bf23
2017-08-21 20:14:59 +00:00
TreeHugger Robot
64059f2eec Merge "Support extra linespacing based on fallback fonts" 2017-08-19 01:15:37 +00:00
Arun
530a2b44d9 Disable hwui blending for first draw to main FBO
bug:34809371

In some applications, the first draw is not opaque - either because the
application is misbehaved, or because hwui is not able to reliably tell
whether the layer is opaque or translucent. This is undefined behaviour
in OpenGL ES and has a significant performance and bandwidth impact on
some tiler GPUs as it requires loading the previous frame's color data.
This change disables blending in that case and also for effectively
opaque blend modes (SRC=GL_ONE, DST=GL_ZERO). It increases performance
by ~10% for Leanback CTS on some low-end GPUs (gradient layer that hwui
incorrectly believes to be translucent).

Test: manual - visual inspection on fugu (nexus player)

Change-Id: I2cbf1c76678acae1a36923e72fd18ed55cd89dc2
2017-08-18 16:52:55 -07:00
Yi Jin
822885d2cc Merge "Automatically generate section_list.cpp file from incident.proto with the SectionFlags field annotations" 2017-08-18 00:55:53 +00:00
Yi Jin
f860184599 Automatically generate section_list.cpp file from incident.proto
with the SectionFlags field annotations

Bug: 64728679
Test: tested manually on device
Change-Id: I5b067b09cd6ccc3528f0845d7290cc9e2bc63a07
2017-08-17 15:04:21 -07:00
Roozbeh Pournader
737dfead64 Support extra linespacing based on fallback fonts
* Increase the ascent and descent of individual lines in StaticLayout
  as needed, if any fallback fonts that end up getting used call for
  it. For backward compatibility, this is hidden behind a builder
  flag.
* Document in Paint.java that the returned parameters are only for
  the default font, and a layout may need more space based on
  fallbacks used.

Also update for changes in minikin API:

* MinikinFont now requires a method for getting vertical extents
  (ascent, descent, and line gap).
* minikin API now allows asking for vertical extents of laid out
  text.
* minikin API's LineBreaker now returns ascents and descents for each
  line.

Finally, added performances test for creating a StaticLayout.
Follwing are the numbers on a marlin with a stable clock before and
after this CL.

For fixed text almost always hitting the cache:
Before: mean=260684 median=260188 min=258532 standardDeviation=1897
After:  mean=262432 median=261509 min=260429 standardDeviation=2185

For random text almost never hitting the cache:
Before: mean=5971827 median=5991126 min=5886871 standardDeviation=83724
After:  mean=6337093 median=6317010 min=6311222 standardDeviation=40213

Bug: 28963299
Bug: 29063863
Bug: 32057121
Bug: 37756858
Test: bit FrameworksCoreTests:android.text.
Test: bit CtsTextTestCases:*
Change-Id: I482a98ff8f472e8bab4f0ba9d1d7b368858038ff
2017-08-17 12:10:31 -07:00
Ben Wagner
e3d4a14380 Merge "Replace SkFAIL with SK_ABORT." 2017-08-16 19:03:38 +00:00
TreeHugger Robot
9482963b80 Merge "Filter empty paths at record time" 2017-08-16 17:59:52 +00:00
Ben Wagner
eeb1199d6d Replace SkFAIL with SK_ABORT.
Test: refactoring CL. Existing unit tests still pass.
Change-Id: I3744b0a27bfc8a2ee6e06d6925ae360d4a2447c5
2017-08-16 11:55:06 -04:00
Stan Iliev
6dcfdecc3a Filter empty paths at record time
Filter empty paths at record time. Quick settings pull test has
about 18% empty paths.

Test: Ran quick settings pull jank test
Bug: 64487466
Change-Id: I5b1650060ae4d157d313efb435ecda26c03d4b72
2017-08-16 10:22:15 -04:00
TreeHugger Robot
d2151347a6 Merge "Use the faster path when calling drawImageRect." 2017-08-16 12:47:57 +00:00
Seigo Nonaka
1916240a47 Merge "Adjust font texture cache based on device density." into oc-mr1-dev am: 0990042116
am: 31b3091576

Change-Id: I500779fb39fa1758cc688c49272cd14b4d3b4f52
2017-08-15 21:01:48 +00:00
Seigo Nonaka
31b3091576 Merge "Adjust font texture cache based on device density." into oc-mr1-dev
am: 0990042116

Change-Id: I47fd84dc9832bd5a35dcccdec8344ffb29dbf30c
2017-08-15 20:41:33 +00:00
Derek Sollenberger
6c2a9e2bc1 Use the faster path when calling drawImageRect.
Bug: 64487466
Test: CtsGraphicsTestCases, CtsUiRenderingTestCases
Change-Id: Ib2312598b50d402b1749d62a10c6ec343eff5b89
2017-08-15 16:23:01 -04:00
Seigo Nonaka
7cc3ee7091 Adjust font texture cache based on device density.
The main purpose of this CL is reducing font cache size of
low-density device.

The memory usage for the small RGBA texture will be
Nexus 6P: 7,928,856 bytes (1408x1408)
Nexus 5X: 4,734,976 bytes (1088x1088)
These used to be 4,194,304 bytes

Test: manually checked
Bug: 64400885
Change-Id: Ied064a6d59909ad7fbeff74332973206436fbd34
2017-08-15 10:53:20 -07:00
Derek Sollenberger
60d7841e39 Revert "Switch default renderer to Skia's OpenGL pipeline."
This reverts commit 4bc27b6e64.

Bug: 64487466
Bug: 63910712
Bug: 64683344
Change-Id: Icd4ab774788d72252c4dce0925f0bef20a60511f
2017-08-14 18:06:46 +00:00
Derek Sollenberger
4bc27b6e64 Switch default renderer to Skia's OpenGL pipeline.
This is the second attempt now that we have addressed many of the
correctness and performance concerns.

Bug: 63910712
Change-Id: I3df4ba52c2bc59930f577ffc8d889cb23a16a439
Test: CtsGraphicsTestCases, CtsUiRenderingTestCases, CtsViewTestCases
2017-08-11 19:21:20 +00:00
John Reck
27140b03bf Merge "Delete all ro.hwui.* props" into oc-mr1-dev
am: eb43cdbc2e

Change-Id: I4e3680df1f475bc6f15ff8c3ab0bdc8b887607a3
2017-08-10 22:09:13 +00:00
John Reck
642ebea6e1 Delete all ro.hwui.* props
Remove all ro.hwui.* tuning props and instead
calculate them from the screen resolution.

Or just hardcode them to what all devices
were hardcoding them to anyway.

Bug: 63741221
Test: Check cache size results on sailfish

Change-Id: I8b0d210572a246f4fefb076935cf5156a70c274c
Merged-In: I8b0d210572a246f4fefb076935cf5156a70c274c
(cherry picked from commit 8dc02f99d0)
2017-08-10 17:22:43 +00:00
TreeHugger Robot
a977a9f90f Merge "Fix CtsViewTestCases when running on swiftshader emulators." 2017-08-09 20:13:04 +00:00
TreeHugger Robot
c9be035010 Merge "Disable VD shared atlas surface" 2017-08-09 18:59:50 +00:00
Stan Iliev
dd098e8d78 Disable VD shared atlas surface
Using a shared atlas surface is causing a variance in AA pixels
when drawing the same content. This is causing some CTS tests in
CtsPreference2TestCases to fail because of up to RGB(1,1,1)
difference in AA pixels in screenshots of a recreated activity.
Another effect is reducing memory usage ("GL mtrack" down by
10MB for clock app).

Test: Ran CtsPreference2TestCases tests.
Bug: 64487466
Change-Id: I1e5a547285c885136b6885d129d566d5b0c2ed76
2017-08-09 14:55:36 -04:00
Derek Sollenberger
4170db32c0 Fix CtsViewTestCases when running on swiftshader emulators.
Test: CtsViewTestCases
Bug: 64478761
Change-Id: Ie85d25054c2f426cc88cf512c166c175b894a8fe
2017-08-09 13:58:38 -04:00
TreeHugger Robot
891f481ef8 Merge "Refactoring: Deprecate Paint.mNativeTypeface." 2017-08-08 19:48:05 +00:00
TreeHugger Robot
544918b30f Merge "Revert "Switch default renderer to Skia's OpenGL pipeline."" 2017-08-08 18:44:46 +00:00
Seigo Nonaka
318ca04079 Refactoring: Deprecate Paint.mNativeTypeface.
Bug: 64269689
Test: m checkbuild
Test: bit CtsGraphicsTestCases:*
Test: bit CtsViewTestCases:*
Test: bit CtsTextTestCases:*
Change-Id: Idc9f2b4612741be949204cd06efc41e1738d6587
2017-08-08 18:07:28 +00:00
Derek Sollenberger
27e9329d04 Revert "Switch default renderer to Skia's OpenGL pipeline."
This reverts commit 312a3a0c28.
Fixes: 64478761

Change-Id: I8caf95ead1b339447768b5e360a6d0b9705477de
2017-08-08 16:56:26 +00:00
Derek Sollenberger
cc31665419 Merge "Switch default renderer to Skia's OpenGL pipeline." 2017-08-08 12:37:42 +00:00
Derek Sollenberger
312a3a0c28 Switch default renderer to Skia's OpenGL pipeline.
Bug: 63910712
Test: CtsGraphicsTestCases, CtsUiRenderingTestCases
Change-Id: I901c236cfb5bfadcb59c449a76699479625944f9
2017-08-07 15:38:51 +00:00
TreeHugger Robot
886ae9fd26 Merge "Use colorFilters when rendering to an sRGB bitmap." 2017-08-07 14:43:06 +00:00
Derek Sollenberger
fa3e340431 Use colorFilters when rendering to an sRGB bitmap.
Bug: 62347704
Test: CtsUiRenderingTestCases, CtsGraphicsTestCases, hwui_unit_tests
Change-Id: I3e237b64cd92217b02d4995bdd695a28d3f393ee
2017-08-07 08:43:23 -04:00
TreeHugger Robot
8d864f98cc Merge "Implement efficiently non-rectangular clips in GLFunctorDrawable" 2017-08-04 12:57:25 +00:00
John Reck
e417eb0868 Merge "Add check that layer size <= maxTextureSize" into oc-mr1-dev am: 4c25f3dd43
am: 0f03652ba8

Change-Id: I589106c8d80a66b152c2978e1d3db84badef9ed5
2017-08-03 03:30:39 +00:00
John Reck
0f03652ba8 Merge "Add check that layer size <= maxTextureSize" into oc-mr1-dev
am: 4c25f3dd43

Change-Id: I2e239c4c1e5d28952b95f1299daf8ac793cc7e0c
2017-08-03 03:18:23 +00:00
John Reck
679e7f1dfc Add check that layer size <= maxTextureSize
Ensure that RenderNode fitsOnLayer() is true before assigning
it a layer.

Bug: 63814070
Test: repro steps in bug no longer crash
Change-Id: I28bb2cb173a5efde24e2384f2606fea85b394ac8
2017-08-02 16:15:24 -07:00
Derek Sollenberger
07945ed207 Merge "Revert "Use colorFilters when rendering to an sRGB bitmap."" 2017-08-02 21:59:28 +00:00
Derek Sollenberger
a7f6af2c51 Revert "Use colorFilters when rendering to an sRGB bitmap."
This reverts commit b851b19749.

Change-Id: I5bb8fe9bf9f5d411674e289c467b3f569f7bb068
2017-08-02 21:57:42 +00:00
Stan Iliev
6a3b0553d9 Implement efficiently non-rectangular clips in GLFunctorDrawable
Implement non-rectangular clips by writing into the stencil
buffer using new Skia API. This CL is fixing
PathClippingTests#testWebViewClipWithCircle test, which was
failing on some devices.

Bug: 34454070
Bug: 31489986
Test: CtsUiRenderingTestCases tests passed for Skia pipeline.
Change-Id: I29d7af02e2af53943540a91393f5d7a8c4e44049
2017-08-02 16:05:11 -04:00
Derek Sollenberger
acb42c0100 Merge "Use colorFilters when rendering to an sRGB bitmap." 2017-08-02 18:23:47 +00:00
Derek Sollenberger
b851b19749 Use colorFilters when rendering to an sRGB bitmap.
Bug: 62347704
Test: CtsUiRenderingTestCases, CtsGraphicsTestCases
Change-Id: I55a574ffd9305588b82345a598da7818952a131d
2017-08-02 11:37:46 -04:00
Seigo Nonaka
4b1655dce8 Remove obsolete comment
Bug: 11750374
Test: N/A
Change-Id: I50a264f01ff04c87a4b86f80fb38ec69d30d3241
2017-08-01 14:24:28 -07:00
Seigo Nonaka
ae0b9ee687 Merge "Revert "Implement family fallback." DO NOT MERGE" into oc-mr1-dev
am: 1c34ba15b5

Change-Id: I6082a49060d322c068b9af4e5b6e169cff6a86bb
2017-08-01 17:35:14 +00:00