592 Commits

Author SHA1 Message Date
Haibo Huang
9fada2364f Merge "Remove CSV support"
am: 0faecf7b89

Change-Id: I02e8b74299afda2642567e3fcf9a41653cb7b888
2018-07-09 14:41:03 -07:00
Haibo Huang
783d76ec31 Remove CSV support
CSV is deprecated upstream. See:
7b8d0249d8

Test: m checkbuild
Change-Id: I4b85535d4296c6f0d1f0eec95b40c065b3143134
2018-07-06 16:55:27 -07:00
android-build-team Robot
f28901f6c5 Merge "Invoke create_recording_canvas correctly in macro bench tests" into pi-dev 2018-05-02 19:38:43 +00:00
Derek Sollenberger
551d08e2d5 Respect a Layer's (e.g. SurfaceTexture) colorSpace when compositing
This CL extracts the android_dataspace from the GLConsumer and converts
it to a SkColorSpace.  HWUI always expects to composite into an sRGB
destination so when we draw the layer we run the draw through a
colorFilter that converts the input colorSpace into that of the
destination.

Test: CtsViewTestCases
Bug: 78016220
Merged-In: Ic0446a0d861e86a5a9d0382346b57fcc45c8a61b
Change-Id: Ic0446a0d861e86a5a9d0382346b57fcc45c8a61b
2018-05-01 02:45:43 +00:00
Stan Iliev
4f901c8cec Invoke create_recording_canvas correctly in macro bench tests
create_recording_canvas expects as a last parameter a render node,
which is used to reuse deallocated display lists. Passing the
render node improved performance in several tests and it is
matching how HWUI is using that API too.

bug: 69131471
Test: tvappGlTex DrawFrame is 1ms faster
Change-Id: I93d8da694c178d3fb8d1aa52afa76dd8271e93cb
2018-04-30 20:22:19 +00:00
Kweku Adams
1856a4cfcc Adding privacy tags to graphicsstats proto.
Creating a copy of the graphicsstats proto so that one can be tagged
with privacy annotations and the other can be used internally while
still using the protobuf-cpp-lite library.

Bug: 72570104
Test: flash device and check incident output
Merged-In: I2d72e7bd17689c1401a16d5a13956e6528ddb525
Change-Id: I0a46ee6cc463b133925be1cf8dee8cf3d107930c
2018-04-12 14:23:15 -07:00
Derek Sollenberger
b1f27aae89 Free up all scratch resources when the app's UI is hidden
Bug: 73808481
Test: hwui_unit_tests
Change-Id: I9f191c776a936c1be40702ff0924c7ad054526d5
2018-04-03 11:53:43 -04:00
Doris Liu
4ad0e1425b More path validation for better error message
BUG: 73759524
Test: Unit test updated
Change-Id: I2774450174ad6490a1d5e6c81766a2982c2aa6f1
2018-03-26 18:12:31 +00:00
John Reck
0e4864725a Revert "Revert "Break down jank between frame drops vs. triple buffered""
This reverts commit a6d8fbf4ea634f5f605b2b7db3ca98975f8625b5.

Fixes an out-of-bounds read in COMPARISONS by switching up
how comparisons works. Instead of requiring all jank types
to have an associated COMPARISON's entry, which kHighInputLatency
and kMissedDeadline don't, instead have each
COMPARISON indicate which JankType it applies to so it can
be independently sized from JankTypes.

Bug: 70220906
Bug: 75566601
Test: launching & using maps works
Change-Id: I7fd90daeb320b4627e42c3418c89726d860998c1
2018-03-19 16:36:32 -07:00
TreeHugger Robot
fbb4b82156 Merge "Revert "Break down jank between frame drops vs. triple buffered"" into pi-dev 2018-03-19 19:44:14 +00:00
Aaron Whyte
a6d8fbf4ea Revert "Break down jank between frame drops vs. triple buffered"
This reverts commit 09979fbee7201b46158c2c033194529e4284ea13.

Reason for revert: Based on stacktraces and change history, I think this is causing a cluster of P crashes.
https://b.corp.google.com/issues?q=(%22android%22%20%22:uirenderer::JankTracker::finishFrame%22)
Bug: 75566601
Bug: 75811585
Bug: 75407175
Bug: 75736222
Bug: 75391447
Bug: 75659839

Change-Id: I59a8c2d8906d347210c77fb3628f5801bc299bfb
2018-03-19 17:53:48 +00:00
John Reck
564284759f Don't use IPC in isolateProcess
Fixes: 74395652
Test: hwuiunit passes in 'shell stop' state (pseudo-isolated process),
      manually checked non-isolated processes still have working vsync
      via systrace of RT animations demo

Change-Id: I630ea011dc7eb2efa265b25673d3304b3b2510d3
2018-03-16 17:34:02 -07:00
John Reck
613783a909 Merge "Break down jank between frame drops vs. triple buffered" into pi-dev 2018-03-15 19:48:54 +00:00
Seigo Nonaka
83143d005b Remove mtOffset from drawTextRun
Bug: 72998298
Test: atest CtsWidgetTestCases:EditTextTest
    CtsWidgetTestCases:TextViewFadingEdgeTest
    FrameworksCoreTests:TextViewFallbackLineSpacingTest
    FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest
    CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest
    CtsTextTestCases FrameworksCoreTests:android.text
    CtsWidgetTestCases:TextViewPrecomputedTextTest

Change-Id: Ia886c1ce9f7387559d7fe00b34ce03378d56ecec
2018-03-15 04:09:19 +00:00
John Reck
09979fbee7 Break down jank between frame drops vs. triple buffered
Bug: 70220906
Test: JankyScene vs. systrace vs. jankstats
Change-Id: Ia012685020cc5bcabbd3f92f0bdeb84eaf50733d
2018-03-14 15:00:05 -07:00
Leon Scroggins III
71195ab5c8 Fix the Skia roll - implement onWritePixels
Test: None

https://skia-review.googlesource.com/c/skia/+/105623 added a new
abstract method to SkSurface_Base, so these subclasses needs to
implement it. Implementation is empty just to get the roll fixed.

Change-Id: Ib6029acf40feb47a572cd6e18678b08a6f38fe4b
2018-02-08 22:09:59 -05:00
TreeHugger Robot
5b5e00aca1 Merge "Cache VectorDrawable bounds at record time" 2018-02-08 20:43:20 +00:00
Stan Iliev
65e678fdb1 Cache VectorDrawable bounds at record time
Cache VectorDrawable bounds at record time, because the same
drawable object may be used several times with different bounds.

Bug: 71737362
Test: Wrote a new unit test, tried sample app attached to the bug
Change-Id: If7be934acf0c16b328cb0f95d849e463dcd3b88b
2018-02-08 19:01:08 +00:00
Seigo Nonaka
0606a8874d Use new minikin::Font constructor
This is 2nd attempt of I4d7af881ed1a6c

Bug: 37567215
Test: minikin_tests
Test: hwui_unit_tests
Test: atest CtsTextTestCases \
      CtsWidgetTestCases:EditTextTest \
      CtsWidgetTestCases:TextViewFadingEdgeTest \
      FrameworksCoreTests:TextViewFallbackLineSpacingTest \
      FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest \
      CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest
Test: bit  FrameworksCoreTests:android.text.

Change-Id: I596c67b9453688f998a88031b9724425e2305b20
2018-02-07 13:10:35 -08:00
Seigo Nonaka
36dadcfc7e Revert "Use new minikin::Font constructor"
This causes a regression for some characters

This reverts commit ab40df9e6979c955f89a06a358385ecec361c9d9.

Bug: 73054061
Change-Id: Icf1f9d2b89b75031aabb47507135e45a21bc5363
2018-02-07 18:38:58 +00:00
Seigo Nonaka
ab40df9e69 Use new minikin::Font constructor
Bug: 37567215
Test: minikin_tests
Test: hwui_unit_tests
Test: atest CtsTextTestCases \
      CtsWidgetTestCases:EditTextTest \
      CtsWidgetTestCases:TextViewFadingEdgeTest \
      FrameworksCoreTests:TextViewFallbackLineSpacingTest \
      FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest \
      CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest
Test: bit  FrameworksCoreTests:android.text.

Change-Id: I4d7af881ed1a6cceb79e827d88e050789da46d01
2018-02-02 22:11:55 -08:00
Seigo Nonaka
99d66f0613 Update Typeface test implementation not to copy minikin::Font
Test: hwui_unit_tests
Bug: 65024629
Change-Id: I974c11ed4d258934fb4f2bec95bede33b2261629
2018-01-30 15:01:26 -08:00
TreeHugger Robot
ab802003b9 Merge "Compute full text layout in MeasuredText and use it for drawing" 2018-01-24 22:07:13 +00:00
Seigo Nonaka
783f961d2f Compute full text layout in MeasuredText and use it for drawing
The full layout is required for drawing text on UI thread.
To save this work, store the full layout result in MeasuredText and
compose the final layout from stored full layout if possible.

Currently justification/hyphenation is not supported but works normally
as before. Nothing changes on existing non measured text.

StaticLayout creation time for no style text (w/o patch -> w/ patch, N=30)
  MeasuredText Balanced Hyphenation  :    721,297 ->    720,657: (-0.1%)
  MeasuredText Balanced NoHyphenation:    550,588 ->    546,069: (-0.8%)
  MeasuredText Greedy Hyphenation    :    503,582 ->    498,009: (-1.1%)
  MeasuredText Greedy NoHyphenation  :    502,344 ->    498,507: (-0.8%)
  RandomText Balanced Hyphenation    : 19,351,802 -> 19,176,024: (-0.9%)
  RandomText Balanced NoHyphenation  :  8,033,830 ->  7,973,336: (-0.8%)
  RandomText Greedy Hyphenation      :  7,957,335 ->  7,927,316: (-0.4%)
  RandomText Greedy NoHyphenation    :  7,988,884 ->  7,929,717: (-0.7%)

StaticLayout.draw time for no style text (w/o patch -> w/ patch, N=30)
  MeasuredText NoStyled              :    644,453 ->    660,684: (+2.5%)
  MeasuredText NoStyled WithoutCache :  9,251,919 ->    648,992: (-93.0%)
  MeasuredText Styled                :  3,092,353 ->    870,702: (-71.8%)
  MeasuredText Styled WithoutCache   : 12,544,014 ->  1,114,557: (-91.1%)
  RandomText NoStyled                :    582,167 ->    572,092: (-1.7%)
  RandomText NoStyled WithoutCache   :  9,167,670 ->  9,056,447: (-1.2%)
  RandomText Styled                  :  3,064,490 ->  3,029,028: (-1.2%)
  RandomText Styled WithoutCache     : 12,314,863 -> 12,283,026: (-0.3%)

Test: minikin_test
Test: bit CtsTextTestCases:*
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit FrameworksCoreTests:android.text.MeasuredParagraphTest
Bug: 63897135

Change-Id: I7e6ec5c953d7d0f767aba4f61f94e62b6f3a3a2b
2018-01-23 17:45:55 -08:00
Stan Iliev
7e100e912c Improve layer rendering quality
Increase filter quality when rendering a layer into the frame
buffer from kNone_SkFilterQuality to kLow_SkFilterQuality.
This visibly improves the quality if the layer is scaled.
For example the circle shutter button in camera app looks
better in pressed state (there is no jagged edge).

Test: Ran camera app
Bug: 72144993
Change-Id: I138d930a25301a369876d76a2cd322df0324f0f2
2018-01-22 16:10:26 -05:00
Stan Iliev
ec08381261 Refactor TestUtils::drawUtf8ToCanvas usage in macrobench tests
Set text encoding inside TestUtils::drawUtf8ToCanvas and use
TestUtils::drawUtf8ToCanvas instead Canvas::drawText.
This CL is a follow-up of ag/3287411.

Test: Ran macrobench tests
Change-Id: I1b2f014d17f26ccc8fbdae9cfeea4ac25fd4c51f
2018-01-03 15:30:37 +00:00
Elliott Hughes
d2cafca090 Merge "Private API became public..." am: eb44ebbfcd am: 85fc4d6dd6
am: 746a738276

Change-Id: Ifb1fd8dc812d160cd998ba23371e0cfff0c43adb
2017-12-19 00:50:31 +00:00
Elliott Hughes
7c2107b1fa Private API became public...
...but is now automatically called by the Context constructor.

Bug: N/A
Test: builds
Change-Id: Ic78bc4561adfec5047ed45589b8b936c506bd2b2
2017-12-15 16:24:25 -08:00
Elliott Hughes
ceb1fa2284 Minimal reformat to match internal master.
Internal master SHA 1bcacfdcab0eaa0cee92bd7f5a1b5e271dd68e52 reformats
this entire project. To be able to update google-benchmark I need to
make a small change to this file. This is the minimal change that avoids
merge conflicts.

Bug: N/A
Test: builds
Change-Id: If3568a0f59a7c007858435953e127167f5862825
2017-12-15 10:37:01 -08:00
Derek Sollenberger
12f9b06642 Update VectorDrawables to use Skia's drawArc implementation.
Using Skia enables drawArc to issue conic draw calls as well as
fixes some of the issues around a scaled path containing a drawArc
being reported as concave.

Bug: 69622768
Test: hwui_unit_tests
Change-Id: I4faab5403ec4ee34e1ad6fae256ae9ad3c6bb05b
2017-12-05 15:39:30 -05:00
Derek Sollenberger
03e6cff7a6 Allocate textures in multiples of LAYER_SIZE.
This matches the behavior of the old HWUI renderer and avoids
jank when trying to release a series of small textures.

Test: UiBenchJankTests #testResizeHwLayer
Bug: 69566781
Change-Id: Idc01f8438e85d4810032fd30a141132a6cdd47a1
2017-12-05 10:41:07 -05:00
TreeHugger Robot
22b94c3f0f Merge "Fix text encoding in some macrobench tests" 2017-11-29 22:19:07 +00:00
Yuqian Li
70910fd061 Verify that b/68859852 won't happen again
Bug: 68859852

Test: unit tests with and without the fix on sailfish-eng

Change-Id: I9e2cdd622b7447ea3092fd66790431d94c40e13f
2017-11-29 14:51:12 -05:00
Stan Iliev
a39b77416c Fix text encoding in some macrobench tests
Fix crash in macrobench tests, caused by incorrect text encoding.

Test: Ran macrobench tests
Change-Id: I3522004f70c7037299fb92157ac8633ebb170131
2017-11-29 13:15:45 -05:00
Seigo Nonaka
c52075ee2b Update FontStyle location in minikin.
Bug: 65024629
Test: hwui_unit_tests
Change-Id: I54d701945dfb0792f08a4c26cc1f8b6a6ab9e67e
2017-11-17 16:05:22 -08:00
TreeHugger Robot
67e1f2e2c9 Merge "Create magnifier bench scene" 2017-11-11 01:22:55 +00:00
John Reck
ed024d2188 Create magnifier bench scene
Test: this
Change-Id: Iea1033fda55ff0946b5cd8d28ecba29453b937ca
2017-11-10 15:06:43 -08:00
John Reck
113ddd9ef5 Allow hwuimacro to choose a renderer
Test: this
Change-Id: I500b033257f317f8a3124e8072dc8d39d666b01b
2017-11-09 16:21:21 -08:00
Stan Iliev
d495f43992 Implement SkSL cache
Implement SkSL cache by reusing code and logic from egl_cache_t.

Test: Improves startup times for gmail by 15ms and 10ms for calc app.
Bug: 66740665
Change-Id: I9ba479c649ba97a2c29a48d40579ba001264c957
2017-11-08 18:55:41 +00:00
Seigo Nonaka
20866c1404 Use enum class for FontVariation and update MinikinUtils
This CL contains followins:
- Use enum class FontVariation instead of legacy enum.
- Store FontStyle in MinikinPaint.

Bug: 65024629
Test: minikin_tests
Change-Id: I86bf64fd5d9a8c08eff47db851fa4655da84b1e4
2017-11-07 14:13:41 -08:00
John Reck
1bcacfdcab Format the world (or just HWUI)
Test: No code changes, just ran through clang-format
Change-Id: Id23aa4ec7eebc0446fe3a30260f33e7fd455bb8c
2017-11-03 10:57:44 -07:00
John Reck
4fbbcb7ef7 Add prep_taieye
Test: ran script
Change-Id: I39a859e6eddea9d81241bbbbb931d1ddf4e14c53
2017-11-01 21:44:15 +00:00
John Reck
9e5f228a6f Merge "Switch to a fancy new queue" 2017-10-27 22:21:48 +00:00
John Reck
f8441e6552 Switch to a fancy new queue
Test: unit tests & benchmarks pass/faster

Change-Id: I9521432172d6dd6039c5280b1265479a36a86247
2017-10-27 13:39:55 -07:00
Seigo Nonaka
7c93e86882 Make casting to bidi flags explicit
Bug: 65024629
Test: checkbuild
Change-Id: I0771036359cc1ee5471e9fd4da304598a2f8bf98
2017-10-26 11:43:15 -07:00
TreeHugger Robot
30dfc68a9f Merge "Convert skpCaptureEnabled compile time flag into a property" 2017-10-20 23:57:03 +00:00
Stan Iliev
e9d0012bbf Convert skpCaptureEnabled compile time flag into a property
Convert SkiaPipeline::skpCaptureEnabled into a system property.
Add ability to capture drawing in layers. Add ability to capture
animations/sequence of frames. Fix crash when recording a
TextureView.

Test: Ran capture script.
Change-Id: I463eecf6ec90a601a6cc172ad1901bd4bcc86ac8
2017-10-20 17:49:12 -04:00
Stan Iliev
47fed6ba6a Fix crash in "Tree::updateBitmapCache"
Fix crash caused by updating vectordrawable cache for objects
from previous frames, which may have been deleted.

Bug: 67940327
Test: Ran CtsUiRenderingTestCases test
Change-Id: I4466235e78e9b7937a0d4428240574d9e3d0989f
2017-10-20 16:03:25 -04:00
Rob Carr
53966760d7 Merge "Use new SurfaceFlinger transaction API." 2017-10-12 22:08:03 +00:00
Robert Carr
e13b58e15b Use new SurfaceFlinger transaction API.
For now we reimplement global transactions in the Java side
JNI layer.

Bug: 64815723
Bug: 64816140
Bug: 64815766
Test: Existing tests pass. go/wm-smoke
Change-Id: I6c0a7b5e65b1b6cc844ac61f3269629af60a4244
2017-10-09 16:52:48 -07:00