2925 Commits

Author SHA1 Message Date
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
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
5bb5626599 Turn off additional logging in text rendering
Change-Id: If5f11489c05e320e4436fb57680857b29228a755
b:30427106
2016-10-10 12:25:06 -07:00
Doris Liu
679fe6ab6f Support calling start() in onAnimationFinished(...) in AVD
This CL fixed an issue where calling start() from onAnimationFinished()
caused AnimationListenerBridge::onAnimationFinished(...) to be unsafely
re-entered and the new start listener was (incorrectly) reset to null.

BUG: 31971397
Test: test apk in the bug linked above
Change-Id: Ica809ef2dab884950b93b54f2d0cb4b81e9830f1
2016-10-08 21:00:14 +00:00
Teng-Hui Zhu
9c555566bf Make umbra lighter when the blocker is too high and has no real umbra area.
b/31939390
Test: CTS testShadowLayout && Manual FrameworkShadow test

Change-Id: Ib0b6c4239ac8a521a827be246e912daf2ad3b885
2016-10-04 17:26:09 -07:00
Yuqian Li
83427ff222 Ignore HasAlphaLayer flag to fix b/30929229
BUG:30929229
Change-Id: Iebadc6b3d224efa0554cbbb99ea43f871c28722b
2016-09-14 11:44:10 -04:00
sergeyv
af102bee51 HWUI: track upload & recent usage in font cache
FontCacheHistoryTracker should be turned off before shipping: b/31438876

bug:30427106
Change-Id: Ic26b25e790d4ee69e484ca0cb23dc9cc522b2ed3
2016-09-12 15:45:26 -07:00
sergeyv
baf29e7cf4 HWUI: calculate used memory in FontCache for gfxinfo
bug:30427106
Change-Id: I653571d6a4e974e975fb0dc03fc2364eecbf2f84
2016-09-08 14:50:50 -07:00
John Reck
02913603bd Merge "Fix EGLImage memory leak" into nyc-mr1-dev 2016-09-02 15:07:25 +00:00
John Reck
f8b0360298 Fix EGLImage memory leak
Bug: 31247709
Change-Id: I9e36206b0d7bdb75b84cd53b70f7746ca34a3469
2016-09-01 14:10:20 -07:00
Chris Craik
06e2e9cf4c Wait on frame work fences when frames are dropped
bug:30895941

Prevents a race where frame work could interleave between frames,
causing SurfaceView position updates to be delivered out of order.

Change-Id: I01e4cc557b69dcf33e877a0e16c0d115ec95e4cc
2016-08-31 17:32:47 -07:00
John Reck
cd68212f08 Make updateSurface non-blocking
Bug: 30442298

We already do this for initialize(), fix
it so that update() is parallel with the
UI thread as well.

Shaves ~7ms off of the 99th percentile on
NotificationShade open & close

Change-Id: I1791df495453fb9e1e12362c68e3d20e837e62be
2016-08-09 12:11:13 -07:00
Chris Craik
a9bef43149 Merge "Prevent EndLayerOps when Begin was rejected" into nyc-mr1-dev 2016-08-08 23:44:08 +00:00
Chris Craik
3c53ec51ef Prevent EndLayerOps when Begin was rejected
bug:30537130

BeginLayerOps were being rejected in a way that allowed the associated
EndLayerOps to still be recorded. This was a violation of DisplayList
content expectations, and caused crashes in FrameBuilder when trying to
play these DisplayLists back.

Change-Id: I531b840aa5c4ffb1ee458da3f4b366978eaeafbe
2016-08-08 15:15:58 -07:00
Doris Liu
18e08a0170 Fix infinite AVD not running
This CL fixed an integer overflow error caused by using integer literal
when it should be a float literal that defines a double.

BUG:30739855
Change-Id: If2bdb0eb7a2e93d28434bfe72ec11e8f1f2a1eda
2016-08-08 19:57:34 +00:00
John Reck
295d81c360 Merge "Ensure Dequeue/Queue duration is always set" into nyc-mr1-dev 2016-08-08 14:52:05 +00:00
Doris Liu
7ae119ebff Merge "Remove animation value change from push staging" into nyc-mr1-dev 2016-08-06 01:07:15 +00:00
John Reck
70e89c9c37 Ensure Dequeue/Queue duration is always set
Bug: 30662749
Change-Id: I35a4c26ce78536fc7a506ec2f92a8b9eecb12ec2
2016-08-05 10:50:36 -07:00
Doris Liu
f7167e8f28 Support repeatMode = reverse in AVD
BUG: 30641232
Change-Id: I34c823a0a45c8441873a9b467275174c5529994b
2016-08-05 01:44:20 +00:00
Doris Liu
6725d581eb Remove animation value change from push staging
This CL ensures that animation values are only updated during
animation pulses.

This CL also includes the revert of
https://googleplex-android-review.git.corp.google.com/#/c/1285913/

BUG: 30659748

Change-Id: Iadc84462dc61157efd3c18a23767bba9faf00f6e
2016-08-04 22:43:07 +00:00
John Reck
d58230c7f7 Fix RNA crash
Bug: 30632377
Change-Id: I5d53fba0f469553ae90bebad1482ef28965dd853
2016-08-03 10:28:10 -07:00
Doris Liu
a3c35852a1 Merge "Ensure layer update include the dirty rect from AVD" into nyc-mr1-dev 2016-08-02 20:36:20 +00:00
Doris Liu
0cf4d47a40 Merge "Put VD animators on paused list when RT stops drawing" into nyc-mr1-dev 2016-08-02 18:08:05 +00:00
John Reck
65ddb154c7 Fix FrameMetricsObserver crash
Bug: 30587465

Someday maybe the technology will exist to
allow sharing a simple constant between
Java and C++, but today is not that day.

Change-Id: I17694746cb8712058133cd5ea10c47b9909f740b
2016-08-02 09:38:26 -07:00
Doris Liu
b51b2864e8 Ensure layer update include the dirty rect from AVD
BUG: 30166063
Change-Id: Ia14a2fe3c653e0172a28b4ef22f5171ccf7390c1
2016-08-02 03:01:48 +00:00
TreeHugger Robot
e733f862f0 Merge "Eliminate recents upload jank" into nyc-mr1-dev 2016-08-02 01:07:19 +00:00
John Reck
4387190d8e Eliminate recents upload jank
Bug: 30342017

Upload recents thumbnails in the
dead gaps between frames instead of
at the start of a frame. This eliminates
jank caused by the large texture
upload.

Change-Id: I507cd286d199109c7a9a1511d68ba5ab5d28069f
2016-08-01 16:36:14 -07:00
John Reck
882d515cd5 Fix null deref crash
Bug: 30560152
Change-Id: Ic4bae380e27de5bea80cec484e83d205e078ec43
2016-08-01 14:52:25 -07:00
Doris Liu
c82e879e56 Put VD animators on paused list when RT stops drawing
When we stop scheduling for new frames on RenderThread, we should
put the running animations on pause, rather than purge the list
of the running animations, such that in the next full
sync, the animations that were paused will continue to run.

BUG: 30226711
Change-Id: I36ff6f5d26ffa7999f60ca0ff676a35157577dc2
2016-08-01 21:42:15 +00:00
TreeHugger Robot
34921ac110 Merge "Teach JankTracker about new swap behaviors" into nyc-mr1-dev 2016-07-29 16:25:51 +00:00
John Reck
2d5b8d7392 Teach JankTracker about new swap behaviors
Bug: 30440166

If we are using HWC2, there's a change in timing
when in triple buffering with the pipelined offsets.
This changes JankTracker to recognize that and silently
erase that from the total duration

Change-Id: Ib1fd4209070f17dbd2baed707c8cf73fb11c3cf2
2016-07-29 07:56:02 -07:00
John Reck
abf66de147 Merge "Drop less aggressively" into nyc-mr1-dev 2016-07-28 19:59:13 +00:00
John Reck
a3d795a34a Drop less aggressively
Bug: 30342762

Frame dropping was too frequent and would trigger
during normal triple buffering steady state. Bump
the threshold to drop from 3ms stall to 6ms stall.

Change-Id: I5c1faeaabf0d02323a28e697a4af4105fbcf1c53
2016-07-27 19:28:05 -07:00
Doris Liu
aa54b4e0da Merge "Run animation *after* property sync" into nyc-mr1-dev 2016-07-27 21:14:12 +00:00
Chris Craik
004d140042 Merge "Reject fully transparent paint-fill ops at record time" into nyc-mr1-dev 2016-07-27 16:37:37 +00:00
Chris Craik
814ee6a921 Reject fully transparent paint-fill ops at record time
bug:30342762

Avoids unnecessary work for each transparent operation.

Change-Id: I80b1eeca34ae32249433fde55e9fe93d02c411db
2016-07-26 16:22:51 -07:00
Doris Liu
7c7052dd9b Run animation *after* property sync
VectorDrawable contains properties that can be mofidied from both
UI thread and RenderThread. The two sets of properties are synced
during prepareTree. Previously VD animations ran before prepareTree,
as a result, during prepareTree the property sync overwrote some
of the animatable properties. In other words, the first frame of
the animation wasn't correct. An example is in battery saver mode
when the animation only has one frame to animate (0-duration), the
end result looked wrong.

This CL moves the VD animation to after prepareTree to solve the
problem mentioned above. Meanwhile, in order to signal which
VD will be animated so as to have them properly damaged, all VDs
with running animators are marked dirty.

Bug: 30226711
Change-Id: I831dae9abb2908876c935b9be4c11dfd09452d5c
2016-07-26 00:42:56 +00:00
Chris Craik
433a19e8bf Merge "Change swap chain stuffed detection logic" into nyc-mr1-dev 2016-07-21 00:26:15 +00:00
Chris Craik
3163568806 Change swap chain stuffed detection logic
bug:29771461
bug:29413700
bug:30181577

Changes frame interval gap detection to look for wider gaps, as they
were incorrectly firing all the time.

Also adds a 500ms minimum gap between frames dropped because of stuffed
swap chain, to prevent dropping too often.

Change-Id: If16ed637d54bf37015704be102c5c2e3731a0824
2016-07-20 16:47:03 -07:00
TreeHugger Robot
f8bc27d968 Merge "Rename color transform to color mode and persist the value." into nyc-mr1-dev 2016-07-20 17:21:35 +00:00
Tim Murray
ffde6274f7 add tracepoint for when the display chain is stuffed
bug 30173296

Change-Id: I7845542d4e5c19ccb7c3ee6498cc2d70278b5397
2016-07-18 15:35:36 -07:00
Michael Wright
1c9977b762 Rename color transform to color mode and persist the value.
Also, standardize on a set of possible modes for the displays to
enter and separate the configuration of the color mode from the
configuration of the display mode.

Bug: 29044347

Change-Id: I6af0a7d1f11bc72d4cefc380f115c1fb00788864
2016-07-18 19:49:18 +01:00
Chris Craik
06f13cba5f Merge "Fix rotated clip regions" into nyc-mr1-dev 2016-07-15 00:02:26 +00:00
Chris Craik
0658435096 Fix rotated clip regions
bug: 26562461
fixes: 30109912

SeekBar clips out the area of the thumb when drawing its track. This
creates a clip region, since a rect has been subtracted.

This changes region transform support in computing final clip to
properly support any rect-to-rect transform (such as 90 degree rotation)
when applying a clip region.

Change-Id: Ib3bbc52637e59e00b3a7e7d5c4c40555e26c578b
2016-07-14 14:37:08 -07:00
Doris Liu
98980cdfff Fix use-after-free in vector drawable animation
Added a strong pointer to hold reference to VD in the animation,
so that VD will not be released before animation is finished/destroyed.

BUG: 29438210
Change-Id: I311cd83043f988640de44f637cb474baada9b5ca
2016-07-13 19:09:25 +00:00
Chris Craik
e3e481df76 Avoid throwing when 0 size layer requested
bug:30032790

Change-Id: I8553af0d0b0d59fea6535d03479c4e7134a9f4f9
2016-07-11 19:26:18 +00:00
Tim Murray
a96d445aef Merge changes from topic 'fifo' into nyc-mr1-dev
* changes:
  Add new mode for SCHED_FIFO on UI and RenderThreads.
  Add isThreadInProcess.
2016-07-07 20:29:24 +00:00
Tim Murray
33eb07f575 Add new mode for SCHED_FIFO on UI and RenderThreads.
Add a new mode, controlled by sys.use_fifo_ui property, that enables the
top app's UI and RenderThread to be SCHED_FIFO. This eliminates almost
all jank due to scheduling competition with non-UI critical
threads. This mode may not be suitable for all devices.

bug 24503801

Change-Id: I7b8a31830ad80f7efa00236928d5476998ed4e00
2016-07-07 12:55:31 -07:00
John Reck
0def73aac5 Consider queue & dequeue times for should draw
Bug: 29413700

Change-Id: I4b27b077af569e3c60c57b0e11501e9f3af70579
2016-07-06 17:00:43 -07:00
Chris Craik
82457c5117 Handle post-record-time clipPath scaling
bug:29547149

Change-Id: I268210b240d2d8e08638114715f9622840fc02f7
2016-06-29 16:22:28 -07:00