2913 Commits

Author SHA1 Message Date
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
Chris Craik
754ea612ec Merge "Fix savelayer rounding" into nyc-mr1-dev 2016-06-28 17:33:27 +00:00
Chris Craik
e4f6d968f5 Fix savelayer rounding
bug:29456451

Change-Id: I8022163d2c004510da5db74efdca27582484224d
2016-06-28 09:53:04 -07:00
TreeHugger Robot
8701bff9ba Merge "Fix SurfaceViewPositionListener race bugs" into nyc-mr1-dev 2016-06-28 01:26:43 +00:00
John Reck
11858f170a Merge \"Add missing roundOut for layer damage\" into nyc-dev
am: 48cde353eb

Change-Id: I99532e6b7992452523c4fb0716a7161c06b92950
2016-06-27 22:28:41 +00:00
John Reck
48cde353eb Merge "Add missing roundOut for layer damage" into nyc-dev 2016-06-27 22:22:41 +00:00
John Reck
ac046387be Add missing roundOut for layer damage
fixes: 29771171

This is a regression from HWUI_NEW_OPS, a roundOut
was missing in the new path that was in the old one

Change-Id: Ibf223d550bb5525781864dd9b7f7cd6d73adb98b
2016-06-27 15:18:26 -07:00
Chris Craik
45e83338e5 Round unclipped saveLayers
fixes: 29456451

Change-Id: I2be8b47c46936e75071ad0819a718f72b96cbd2b
(cherry picked from commit d5a90114128f4d3d528f1a0e93651496c968f940)
2016-06-27 21:06:35 +00:00
John Reck
7b570deea6 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
2016-06-27 13:35:13 -07:00
Chris Craik
d5a9011412 Round unclipped saveLayers
fixes: 29456451

Change-Id: I2be8b47c46936e75071ad0819a718f72b96cbd2b
2016-06-24 14:14:45 -07:00
Doris Liu
c470466d7c Fix NPE for checking for whether animators should play together
BUG: 29586505
Change-Id: Ic2a67d51d2ac8d5bfb11ed7773c7c7e413cc28c7
2016-06-24 00:01:39 +00:00
John Reck
2d30d67249 Merge \"Avoid re-calculating vsync mid-frame\" into nyc-dev
am: fc275d244e

Change-Id: I295b6e60a7b2fdcdce3692e74fe54755845132e0
2016-06-18 02:22:54 +00:00
TreeHugger Robot
d11b5e6661 Merge "DO NOT MERGE Move SurfaceView offscreen if the app stops drawing it" into nyc-dev 2016-06-18 02:07:05 +00:00