3166 Commits

Author SHA1 Message Date
Arun
b0a9477c8e Reduce hwui CPU time by using glDrawRangeElements
The CPU overhead of glDrawElements in the GPU driver is significant
with client-side vertex data (unique per draw call) as the driver has
to calculate the mininimum and maximum indices from the index buffer
in order to evaluate the range of vertex data required. This can be
avoided by keeping track of the min-max in hwui and passing it with
glDrawRangeElements. This requires OpenGL ES3.0 support (which is
already checked for elsewhere in hwui).

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

Change-Id: I57bb1ddd239a1032f74f1cd2683bbe0970e84bd9
2017-05-05 15:11:27 +00:00
Yi Kong
06a2d2bf23 Remove no-op std::max call
This was calling std::max on an unsigned integer and 0, which is
essentially no-op. Remove this code.

Test: Build
Bug: 37752547
Change-Id: I74ce45b95960621dff11f574fbe1af60ad147cf0
2017-04-30 23:54:08 -07:00
Tom Cherry
c2dcebe6e6 Merge "Check for spurious wake ups"
am: 3a3cd0a27f

Change-Id: Ia445070278f5a80c85b48e06ddf614d462db45af
2017-03-06 19:57:18 +00:00
Tom Cherry
298a146754 Check for spurious wake ups
Condition::wait() can spuriously wake up, so we must guard it with
another check to ensure that a given wake was truly due to having
been signaled.

Bug: 34592766
Test: Boot bullhead
Change-Id: Iaa5a0ca6186aea50c51e2c402ef95d7ba861be92
2017-02-28 14:19:44 -08:00
Miao Wang
ffa46b2053 Merge "Remove uncessary dependency of libhwui" am: df36be5f17 am: eebd7d7970
am: 558e5dac4d

Change-Id: I99b2fded709c63c71fd9d9f02020a986e3025fa6
2017-02-07 00:12:49 +00:00
Miao Wang
558e5dac4d Merge "Remove uncessary dependency of libhwui" am: df36be5f17
am: eebd7d7970

Change-Id: I3e7b282340259eaad71569e8a15f5028852852ee
2017-02-07 00:08:05 +00:00
Miao Wang
eebd7d7970 Merge "Remove uncessary dependency of libhwui"
am: df36be5f17

Change-Id: I5ccce1f195a43ff00b9bd7fc350d7ae915c566d7
2017-02-06 22:56:58 +00:00
Miao Wang
6addd61ff8 Remove uncessary dependency of libhwui
- libRS.so is not directly used. It is accessed by libRScpp.so.

Test: mm, and boot-up test on sailfish
Change-Id: I5742d2ee3b34ef09bcb997524408affce1ace8fd
(cherry picked from commit 629fd3d48ba1dbedc6e84e91a26f72fb1fba0e22)
2017-02-06 11:57:31 -08:00
Chris Craik
f772c047fa Add ShadowShaderAnimation benchmark DO NOT MERGE
Bug: 34809371
Test: manual

New benchmark uses several levels of overdraw from just shadows to benchmark
shadow shader performance.

Tessellation workload is minimal, due to simple rect caster shape.

Change-Id: I572476bd54e04566851f39027ada7254597b37f8
2017-02-03 11:45:47 -08:00
Mark Salyzyn
ec7e2a164c Merge "Replace cutils/log.h and log/logger.h with android/log.h or log/log.h (part deux)" am: 2225a0640b am: d1740f0f5b
am: 6dacea63d9

Change-Id: Ife229cc450dbbb5f43941fcd1b08b86f0e41a779
2017-01-12 15:59:48 +00:00
Mark Salyzyn
6dacea63d9 Merge "Replace cutils/log.h and log/logger.h with android/log.h or log/log.h (part deux)" am: 2225a0640b
am: d1740f0f5b

Change-Id: I78430cd21cf1186ccc2b48ee4ee8a9b07decde5e
2017-01-12 15:46:20 +00:00
Mark Salyzyn
96bf5985d5 Replace cutils/log.h and log/logger.h with android/log.h or log/log.h
(part deux)

Test: compile
Bug: 26552300
Bug: 31289077
Change-Id: I7417936c4d3666608fccfe51a312c90ecefba2fb
2017-01-11 15:30:30 -08:00
Mark Salyzyn
082a1721b5 Merge "Replace cutils/log.h and log/logger.h with log/log.h" am: e7fcbcb991 am: 6143cbf1e5
am: ef8ccc8510

Change-Id: If6673f44c7d08960f3a0a86703cebf577bd21f1b
2017-01-11 15:45:46 +00:00
Mark Salyzyn
ef8ccc8510 Merge "Replace cutils/log.h and log/logger.h with log/log.h" am: e7fcbcb991
am: 6143cbf1e5

Change-Id: Id192d8dd973fe9e70acab72bae9856bc8a62ac75
2017-01-11 15:40:24 +00:00
Mark Salyzyn
e7fcbcb991 Merge "Replace cutils/log.h and log/logger.h with log/log.h" 2017-01-11 15:24:11 +00:00
John Reck
68dce922af Merge "Fix a use-of-uninitialized-value warning." am: 95ef9ec5b1 am: 44e14d0d2b
am: 5f3ed9b7de

Change-Id: I6e35191f4ddda2590eae4cfac9af5c781d0e493b
2017-01-11 01:30:59 +00:00
John Reck
5f3ed9b7de Merge "Fix a use-of-uninitialized-value warning." am: 95ef9ec5b1
am: 44e14d0d2b

Change-Id: I5e5243c75f446d46bb81252583cfa46e47d60309
2017-01-11 01:21:30 +00:00
John Reck
95ef9ec5b1 Merge "Fix a use-of-uninitialized-value warning." 2017-01-11 00:57:35 +00:00
George Burgess IV
a483173c78 Fix a use-of-uninitialized-value warning.
This warning was generated by the static analyzer:
warning: The left expression of the compound assignment is an
uninitialized value. The computed value will also be garbage
        *mDirtyMask |= animator->dirtyMask();

This can be fixed by initializing dirtyMask before using it in
AnimateFunctor.

Bug: None
Test: Static analyzer no longer complains about this.
Change-Id: I892749079cf93a012f1bed059a3f0c8bbaed9d7e
2017-01-10 15:33:57 -08:00
John Reck
cfc07d4b2b Merge "Support EGL_KHR_partial_update without EGL_EXT_buffer_age" am: f66126c828 am: 620d4c24de
am: 43818c45a4

Change-Id: Ia093688d4c9fc2e923daf5da6d5b6d67c6b56975
2017-01-10 00:49:35 +00:00
John Reck
43818c45a4 Merge "Support EGL_KHR_partial_update without EGL_EXT_buffer_age" am: f66126c828
am: 620d4c24de

Change-Id: I4fdb8ecba5a08f712871d3b99e0286c61f6d0806
2017-01-10 00:44:29 +00:00
John Reck
1deac99c55 Support EGL_KHR_partial_update without EGL_EXT_buffer_age
Bug: 31334677
Test: manual && hwuimacro --onscreen partialdamage

Change-Id: I9b346b4053ec12c8a78a143a4dc0e708c44888a2
2017-01-09 14:35:37 -08:00
Mark Salyzyn
52eb4e01a4 Replace cutils/log.h and log/logger.h with log/log.h
Test: compile
Bug: 26552300
Bug: 31289077
Change-Id: I578b15b48f0fc2807a92abbc69a377c3d2191496
2017-01-09 14:31:34 -08:00
Colin Cross
904b4077ca Move hwui private headers to frameworks/base/libs/hwui/private am: 19def9943a am: 174d150673
am: 6b629b7f38

Change-Id: Ic62fcf3d48ad58c1dec0fc6ddf3eaacc8140cc18
2016-12-15 07:30:25 +00:00
Colin Cross
6b629b7f38 Move hwui private headers to frameworks/base/libs/hwui/private am: 19def9943a
am: 174d150673

Change-Id: I0d97c3bc96c0beebc5988e4dca22ba4d5d1f982c
2016-12-15 07:16:31 +00:00
Colin Cross
19def9943a Move hwui private headers to frameworks/base/libs/hwui/private
hwui already exports most of its headers, move its private headers
into its source directory.

Bug: 33630870
Test: m -j native
Change-Id: I4968d5aaaa68d9e92c826841d20f29cef349c9d8
2016-12-14 13:35:40 -08:00
Teng-Hui Zhu
4c6edb0a3c Recreate the bitmap cache when it is smaller than needed
am: 17f40b80f6

Change-Id: I057156b0f70c89ef1cd4b89237dc0c3b2146d0fa
2016-12-07 18:59:58 +00:00
Teng-Hui Zhu
17f40b80f6 Recreate the bitmap cache when it is smaller than needed
fix:32780212

Test: Existing CTS and attached repro apk.

Change-Id: Ib908319af6539b2438b850f7a50d5a539cef8368
2016-12-02 15:29:44 -08:00
Doris Liu
00d348ec26 Fix LUTInterpolator lookup table position calc
am: 0940834c8c

Change-Id: Ib80c00801473d7e60bae87b3b34a381c7f8e7e68
2016-12-01 01:33:52 +00:00
Doris Liu
0940834c8c Fix LUTInterpolator lookup table position calc
BUG: 32830741
Test: running progress bar at 5x duration scale, no flickering
Change-Id: Ie484bdbfdf18bacc4586e36c5142e4523d08bdaa
2016-11-30 23:20:19 +00:00
John Reck
91d1bbce59 Merge "Avoid starving RT anims" am: f77c220aa9
am: 7269372d5f

Change-Id: Ife1e7ea95055d8179b4a622dc4dabce382575b5b
2016-11-18 00:28:54 +00:00
John Reck
7269372d5f Merge "Avoid starving RT anims"
am: f77c220aa9

Change-Id: I3d4ba24ae0e6de4683d47163fd8f3bf65b98bd17
2016-11-18 00:14:05 +00:00
Treehugger Robot
f77c220aa9 Merge "Avoid starving RT anims" 2016-11-17 23:53:00 +00:00
John Reck
a5b7b89166 Avoid starving RT anims
Test: Manual, usleep(16000) in DrawFrameTask and tap
on recents

Merged-In: I88bb30a2503bc908ec45650c7d36b6fb3cc750d0

Change-Id: I88bb30a2503bc908ec45650c7d36b6fb3cc750d0
2016-11-17 22:05:22 +00:00
Martijn Coenen
6e2c276c78 Merge "Fix deprecated range_x calls." am: 87cafe8f33
am: d03b17c29a

Change-Id: I70280eb85b9430c23f6b2681375cbcfa9da2dd38
2016-11-16 10:07:54 +00:00
Martijn Coenen
d03b17c29a Merge "Fix deprecated range_x calls."
am: 87cafe8f33

Change-Id: Idfbc4e3475cea7e56b3ac72afd61e1e981ef4e5d
2016-11-16 10:00:23 +00:00
Martijn Coenen
90213f341d Fix deprecated range_x calls.
Test: builds
Change-Id: I98412e51a54ef9f9e26c72ecd810dcea77aefdbb
2016-11-15 09:07:12 +01:00
John Reck
b365b0db93 Merge "Re-unite sources with their headers" am: e43444a00b
am: 946d11d216

Change-Id: Ib9fac5fff2f2ce90eebc2c6eb5208de33ea28723
2016-11-04 21:52:43 +00:00
John Reck
946d11d216 Merge "Re-unite sources with their headers"
am: e43444a00b

Change-Id: I8f3ef6a1ddcf78d28f7444b6e83c552b8305fd8c
2016-11-04 21:47:34 +00:00
John Reck
03b5d506bc Re-unite sources with their headers
Move all the includes for androidfw under
a common base path for that library instead
of frameworks/base/includes.

Also fixes -Werror issues that resulted in
no longer being -isystem.

Test: builds
Change-Id: Ic4312eb61b197af114dded5691d5ae1ec82923f7
Merged-In: Ic4312eb61b197af114dded5691d5ae1ec82923f7
(cherry picked from commit f6113af2d6f6eebee68d3ac510fe96d38a7a39e9)
2016-11-04 13:27:37 -07:00
Mark Salyzyn
6e60ab12e7 Merge "missing includes" am: 78929f3ee0
am: 6a8f0d70b0

Change-Id: I40ff974f4333aaa714a63d5436b822491b9d78d6
2016-10-17 21:31:35 +00:00
Mark Salyzyn
6a8f0d70b0 Merge "missing includes"
am: 78929f3ee0

Change-Id: I3e7a25ded484d516fab453abe434c2e53cf0f27e
2016-10-17 21:25:59 +00:00
Chris Craik
dfe4a1b6ee Fix complex clipping on mergeable ops DO NOT MERGE am: d183e0b988
am: a6bfd8d12c

Change-Id: I5af8d0fac1e47e7bf831ca2f387fe550acf4165c
2016-10-17 19:59:32 +00:00
Mark Salyzyn
4d6c372eae missing includes
Assumptions are made about header side effects

Test: compile
Bug: 30465923
Change-Id: Icc9415aed5e54b2bc00b70aa0da6df4148f30654
2016-10-17 12:32:54 -07:00
Chris Craik
d183e0b988 Fix complex clipping on mergeable ops DO NOT MERGE
Fixes: 32106003

Change-Id: I519bc38a1fa8c25c9ae317ffdb7e59e5a0824f59
2016-10-17 10:51:11 -07:00
Doris Liu
1ef744a3b8 Fix SkShader leak for Gradient VectorDrawable and test am: fc9cf72339
am: c47199bb6a

Change-Id: I261f8f3708f526c15ae93c51d24bdaee054354f6
2016-10-12 21:03:14 +00:00
Doris Liu
fc9cf72339 Fix SkShader leak for Gradient VectorDrawable and test
This CL fixes a SkShader leak in VD when applying local matrix
to the shader. Specifically, the usage of newWithLocalMatrix(...)
increments the shader's ref count in every draw() call for
Gradient VectorDrawable, whereas there's no balancing call to
decrement the ref count in draw(). In this CL, we assume
the ownership of the shader returned from newWithLocalMatrix(...)
to ensure the correct ref count management.

Also, add test to verify that shader is no longer being leaked

BUG: 32067647
Test: this CL

Change-Id: Ic15fe46cde06a73d81b44e2d3c56b51907344cc0
2016-10-12 01:22:11 +00:00
sergeyv
e830f351e1 Turn off additional logging in text rendering am: 5bb5626599
am: 4778f6a43e

Change-Id: If031a1d480d8c2e75e9f6268d15c8ccc098a0268
2016-10-11 00:54:34 +00:00
John Reck
85ddb2df2f Fix SurfaceViewPositionListener race bugs
Bug: 29628138

1: Make windowPositionLost synchronous as that's
what the Java side was expecting

2: Make the listener ref counted as otherwise
there's a race condition with the GC, which could
end up with use-after-frees

3: Ensure that all position updates are invoked
prior to frame completion

Change-Id: Iedbc017f611ba2878a49b4586612f79249ca2fe3
(cherry picked from commit 7b570deea65bc7ac417a26ce3e4103bcef30e957)
2016-10-10 13:36:36 -07:00
sergeyv
5bb5626599 Turn off additional logging in text rendering
Change-Id: If5f11489c05e320e4436fb57680857b29228a755
b:30427106
2016-10-10 12:25:06 -07:00