4030 Commits

Author SHA1 Message Date
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
Treehugger Robot
b0efcc1f68 Merge "Include what we use." 2017-12-13 19:38:38 +00:00
Rob Herring
4ee4d20908 renderthread: relax error handling for wide gamut EGL configs
It is valid to advertise EGL_EXT_pixel_format_float, but not have a
the requested EGL config. Instead of aborting, fallback to the default
behavior.

Change-Id: I6c602233b627dc2070364434fece57d3d0aab435
Cc: Romain Guy <romainguy@google.com>
Signed-off-by: Rob Herring <robh@kernel.org>
2017-12-13 14:30:21 +00:00
Dan Albert
9b6a62f94c Include what we use.
Test: mma
Bug: None
Change-Id: I9458aedad9a84f1660d3a2b08717b111dc8e3b74
Exempt-From-Owner-Approval: trivial cleanup
2017-12-12 16:08:11 -08:00
Dan Albert
caebafaf94 Merge "Add missing includes." am: 4be4bb3db7 am: 41c08f49b4
am: e9aaf3c546

Change-Id: I41e4375d053ad5aa64bd4ca3a78b23644b2c725b
2017-10-11 22:22:04 +00:00
Dan Albert
41c08f49b4 Merge "Add missing includes."
am: 4be4bb3db7

Change-Id: Icdae2b63df8e5d61e6acabb6fb85efa28026d535
2017-10-11 21:52:41 +00:00
Dan Albert
110e007fb8 Add missing includes.
Test: mma
Bug: None
Change-Id: Iec8b0a7854091946a4bb6e804c5f4cce39a52b47
2017-10-11 12:41:33 -07:00
John Reck
a54a5f6512 Merge "Quick fix: Make incorrect animator usage a warning" into oc-mr1-dev
am: 2d362d7159

Change-Id: I7e2895fdb802c25389a689f87e60fe408c955405
2017-09-26 16:34:45 +00:00
John Reck
d2080d52b3 Quick fix: Make incorrect animator usage a warning
Change-Id: I6d59033433a63d02be746bb8523b312d7c8fe9fa
Bug: 65160121
Test: Repro from bug doesn't repro anymore
2017-09-25 23:27:38 +00:00
Chris Craik
e188aa84ef Merge "Speculative fix for missing target crash" into oc-mr1-dev
am: a6aafa33ec

Change-Id: I30c5f2f7b27fb4f35991082bcff5c8995fbcdd75
2017-09-22 22:58:43 +00:00
TreeHugger Robot
a6aafa33ec Merge "Speculative fix for missing target crash" into oc-mr1-dev 2017-09-22 22:41:59 +00:00
Tenghui Zhu
c0c225a837 Merge "Add systrace for VectorDrawable inflation and draw" into oc-mr1-dev
am: dbe5afd90d

Change-Id: I906a1762d0f768fdb1cac2147a29ae9e0ab8ffe2
2017-09-22 19:49:58 +00:00
Tenghui Zhu
dbe5afd90d Merge "Add systrace for VectorDrawable inflation and draw" into oc-mr1-dev 2017-09-22 19:45:17 +00:00
ztenghui
3d30ca1d3c Add systrace for VectorDrawable inflation and draw
We didn't trace the draw from cache.
Here we add trace for draw into bitmap, which is normally heavy.

fix: 65060698
Bug: 65060698
Test: run test app and get systrace and check

Change-Id: Ia81127c4aa285b3277e9c9edbdf356d85cb28b5e
(cherry picked from commit cf0c41dbc221c2619212c7e25e6d90a9c4d05b05)
2017-09-22 19:44:24 +00:00
Dake Gu
9a98142be3 Merge "hwuitest: added hwui test for TV application" into oc-mr1-dev
am: 88dd458c9a

Change-Id: I8aa8b1c90f18aaac3342b0652979834fadccc167
2017-09-22 19:35:35 +00:00
Dake Gu
88dd458c9a Merge "hwuitest: added hwui test for TV application" into oc-mr1-dev 2017-09-22 19:26:42 +00:00
Chris Craik
89cd62c8f3 Speculative fix for missing target crash
Bug: 66451158
Test: manual app usage

Change-Id: I2db3aa73edcb80da25ead64205011705f0beef91
2017-09-22 10:00:14 -07:00
Dake Gu
bec4a06812 hwuitest: added hwui test for TV application
This is a test that simulates a standard TV application screen.

The UI elements:
A full screen background bitmap.
Few rows of cards.
Each card has a bitmap and an info area.
Info area has two lines text.
Each card is dimmed, implemented in two modes:
1. adding translucent color RenderNode on top of card
2. applying ColorFilter to bitmap.
Firt card of each row is scaled up and has shadow.

The animations:
Cards are updating translation Y and updating display list
and overlay color alpha or colorfilter.

Test: there are four tests:
tvapp: baseline test, with rounded corner, use Color RenderNode to dim
tvapp_norc: no rounded corner
tvapp_cf: use colorfilter to dim
tvapp_norc_cf: no rounded corner, use colorfilter to dim

Bug: 64990221

Change-Id: I385e349386c41e32b7313180db8c81b8f3e39f88
2017-09-20 17:42:03 -07:00
John Reck
7d7022f73a Merge "Remove all FATAL_IFs from graphicsstats service" into oc-mr1-dev
am: 879a9677b9

Change-Id: I62eeec65e62e5f4d422b95847b7bbab93e1a4fbe
2017-09-19 20:48:24 +00:00
John Reck
5206a871dc Remove all FATAL_IFs from graphicsstats service
As graphicsstats can be subjected to data coming
from the disk and is in system_server we want
to bias towards best-effort instead of strict
no-errors that the rest of HWUI typically uses.

So treat any dump/merge of graphics stats as
best effort, ignoring any errors that occur.

Bug: 65652900
Test: verified 'dumpsys graphicsstats' still works

Change-Id: Ia9b91b745c2a9aedad2f22e3087e1d4bf37a1135
2017-09-18 12:55:17 -07:00
John Reck
a0c211120a Merge "Fix flicker from multiwindow resize" into oc-mr1-dev
am: facdce3ab2

Change-Id: I217c2db8adcb5b2b9ad2ffcd3226176c7e7c08c4
2017-09-11 21:36:05 +00:00
John Reck
f138b174fd Fix flicker from multiwindow resize
Move content bounds into DrawFrameTask. This ensures
that changes in bounds are synchronized with changes in
rendering commands, avoiding potential underdraw.

Bug: 64200212
Test: Repro steps in bug. Drag up/down on resize handle, verify
no flicker.

Change-Id: I3109acf262e23c2a7d8904f1dcbfc8273aaed65b
2017-09-08 11:00:42 -07:00
Chris Craik
391a7e694a Merge "Add test for first draw blend behavior in HWUI pipeline" into oc-mr1-dev
am: 8f50f52eb2

Change-Id: Iefa8ffe5b27c2499fe03575056ba5c6f6de0ebf6
2017-09-02 00:47:20 +00:00
Chris Craik
01ed792ade Add test for first draw blend behavior in HWUI pipeline
Bug: 65077146
Test: BakedOpRendererTests
Change-Id: Ia3139a01fe25344a19f2b947069bd686303b9fd5
2017-09-01 14:39:18 -07:00
Chris Craik
02f3efdeff Merge "Fix blending behavior with first draw op" into oc-mr1-dev
am: da910e805b

Change-Id: I167213959eac6ba72a1e8ca32fcd4e536e56aeee
2017-09-01 04:11:02 +00:00
Chris Craik
e47aadd9b8 Fix blending behavior with first draw op
Bug: 65077146
Test: Manual - uirendering tests don't allow test draw content
to be displayed first.

It's not always valid to disable blending on the first draw to the framebuffer,
since some blend modes affect the framebuffer in different ways. We now only
disable blending if the op is SRC_OVER to be safe.

For example:

    canvas.drawColor(0xfeff0000, PorterDuff.Mode.CLEAR);
    canvas.drawColor(Color.BLUE, PorterDuff.Mode.DST_OVER);

The BLUE should always be seen - the other draw should just clear the buffer.
Prior to this fix, the above code (put in a window background) would draw black.

In addition, this removes the disable behavior in drawRects(), since that should
never benefit from the optimization - that decoration is always drawn at the end
of a frame.

Change-Id: I34e8d9d62d6e1dfa00e9301f44c277475f2940a8
2017-08-31 17:45:39 -07: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
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
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
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
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 8dc02f99d09130ace2ee738c2e689db1b3f33181)
2017-08-10 17:22:43 +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
Romain Guy
572379dde1 Merge "Use EGL_EXT_gl_colorspace_scrgb instead of *_linear" into oc-dr1-dev
am: 8e8debbe21

Change-Id: I0f66cafd5eee8081f7af72bfb8cebdb93a619662
2017-08-02 18:44:40 +00: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
Romain Guy
0018b47847 Use EGL_EXT_gl_colorspace_scrgb instead of *_linear
Since hwui output non-linear scRGB data in wide-gamut, use
the scRGB-nl extension instead of scRGB.

Bug: 62951776
Test: Manual, CtsGraphicsTestCases
Change-Id: Ifdb288e777d12b790b93624ccea9b4f1f6966e52
(cherry picked from commit 26b6a64953f29bbe6b10a5e948d11f47bd0611d6)
2017-08-01 10:10:59 -06:00
Seigo Nonaka
065c59beaf Revert "Implement family fallback." DO NOT MERGE
This reverts commit 0d253e46aa0b4cb2ea56e220812aeab92de64ae1.

The original CL changed Typeface internal methods and broke
TypefaceCompatApi26Impl in support library which uses reflections.
Ideally, TypefaceCompatApi26Impl must fall back to public API
implementation but due to lack of method availability check, it ended up
crashing the application.

The original patch didn't change any behaviors in MR1, so reverting
that change is the best solution for MR1.

Bug: 64033594
Change-Id: Ie86afeb1b809e57915d62c1db5a70c8d210d2354
Test: N/A
2017-07-26 22:21:14 +00:00
George Burgess IV
dde7dd3386 Merge "Silence a memory leak warning from the static analyzer" am: f44ebf5fcb am: 20674ac1eb am: b759691046
am: 89c254612e

Change-Id: I6ee0208f290e46e1053907e853149dd5b506e2d5
2017-07-26 01:03:50 +00:00
George Burgess IV
89c254612e Merge "Silence a memory leak warning from the static analyzer" am: f44ebf5fcb am: 20674ac1eb
am: b759691046

Change-Id: I6cc8b3e3e610e12e0df592b615556c5b8b1e45ea
2017-07-26 00:50:07 +00:00
George Burgess IV
b759691046 Merge "Silence a memory leak warning from the static analyzer" am: f44ebf5fcb
am: 20674ac1eb

Change-Id: I0f0efff718ae96adcc30ef6554aaccc96da66b0a
2017-07-26 00:37:03 +00:00
George Burgess IV
20674ac1eb Merge "Silence a memory leak warning from the static analyzer"
am: f44ebf5fcb

Change-Id: Ic0b97fb0689b4d322aa6ed25fe55ec192bff07a5
2017-07-26 00:26:12 +00:00
George Burgess IV
13d7ddac23 Silence a memory leak warning from the static analyzer
The analyzer assumes that the given `put` operation may fail. This
shouldn't be the case, so mark it with a LOG_ALWAYS_FATAL_IF. Doing so
silences a warning about potential memory leaks originating from
TessellationCache::getRoundRect.

Bug: 27101951
Test: mma. Warning is gone.
Change-Id: I3adeacd6c2c9c03caecd989e2a1267c51e8ef905
2017-07-25 14:30:49 -07:00
TreeHugger Robot
25cefd1096 Merge "Fix use-after-free" 2017-07-19 21:56:47 +00:00
TreeHugger Robot
71b257b5f4 Merge "Fix Skia pipeline readback for non-portrait mode" 2017-07-19 13:37:19 +00:00
TreeHugger Robot
8709b82c4d Merge "Improve color correctness for drawing bitmaps with Skia pipeline" 2017-07-19 13:25:27 +00:00
Stan Iliev
0a3ff952a6 Improve color correctness for drawing bitmaps with Skia pipeline
Fix drawing of bitmaps with color profiles. This CL is making
ColorSpaceTests and Rgba16fTests CTS tests to pass with Skia
pipeline. Drawing bitmaps withs pixels outside SRGB range
may need more work (ColorSpaceTests#testDrawDisplayP3 test use a
a wider gamut, but the actual pixels fall into the SRGB range).

Test: Ran CtsUiRenderingTestCases with HWUI and Skia pipeline.
Bug: 62347704
Change-Id: I8d318076bb38f7d32bfde7e5492ae7a61f4731a5
2017-07-19 09:22:39 -04:00
TreeHugger Robot
5c936fcfd3 Merge "Fix incorrect asserts" 2017-07-19 12:44:52 +00:00
TreeHugger Robot
ebb1121573 Merge "Appease the static analyzer" 2017-07-19 02:36:04 +00:00