7496 Commits

Author SHA1 Message Date
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
John Reck
501ff9acfe Avoid re-calculating vsync mid-frame
Fixes: 29072773

By using computeFrameTime AnimationContext would
potentially end up modifying the latest vsync if
a very-slow frame was received from the UI thread.

This could potentially desync animations that were
RT & UI thread 'synchronized', but more significantly
it would confuse the swap chain which tries to only
draw one frame per vsync causing unneccessary frame
drops.

Change-Id: Ibd2ec3157ce32fee1eec8d56837c45a35e622895
2016-06-17 20:44:43 +00:00
John Reck
34bf49e4de DO NOT MERGE Move SurfaceView offscreen if the app stops drawing it
Bug: 29360411
Change-Id: Iefb9d7a9dafb34a2b4f79130a2a8b5a7cf7de906
(cherry picked from commit aa6e84f21ddf89ea649a3f00044bc23adfe86978)
2016-06-17 20:26:10 +00:00
John Reck
aa6e84f21d Move SurfaceView offscreen if the app stops drawing it
Bug: 29360411
Change-Id: Iefb9d7a9dafb34a2b4f79130a2a8b5a7cf7de906
2016-06-17 10:23:54 -07:00
Adam Lesinski
1dda5b39d4 Merge \"ResourcesManager: Allow managed addition of library asset paths\" into nyc-dev
am: 464bda8a2b

Change-Id: I0609c73c4f36b48970bba83b6ea5bd95e6c2d956
2016-06-15 22:47:58 +00:00
Adam Lesinski
464bda8a2b Merge "ResourcesManager: Allow managed addition of library asset paths" into nyc-dev 2016-06-15 22:35:26 +00:00
Adam Lesinski
25f48886b2 ResourcesManager: Allow managed addition of library asset paths
This allows WebView to add itself to the ResourcesManager and
remain their even after configuration changes and multi-window
changes.

Bug:29112218
Change-Id: I2cb131ae2c61fb58c48babafdd46c1882be96aa9
2016-06-15 12:00:18 -07:00
John Reck
fc4c59a10c Merge \"Redraw if dirty during stopped when resumed\" into nyc-dev
am: 5b4ff21a74

Change-Id: If4eedb4a4c1ff6d4e96f8b0db4ddd846a2967a9f
2016-06-14 14:54:18 +00:00
John Reck
5b4ff21a74 Merge "Redraw if dirty during stopped when resumed" into nyc-dev 2016-06-14 14:43:20 +00:00
Doris Liu
a7952b33f6 Test RenderNode's prepareTree when its DL is null and non-null
BUG: 29320878
Change-Id: I3325e957025d0039faf366144dcd2d95790ccfd1
2016-06-13 22:05:11 +00:00
Doris Liu
07c056d627 Chcek for valid render content before damaging RenderNode for dirty VD
BUG: 29320878
Change-Id: I847d76467bad92c956a4bb7617627983d64e90f9
2016-06-13 12:52:44 -07:00
John Reck
306f331f91 Redraw if dirty during stopped when resumed
Change-Id: I0034d1da7704de53c4ba3da3e8ef3109445f9e6a
Fixes: 28283031
2016-06-10 16:28:59 -07:00
Chris Craik
bc640cb016 Merge \"Fix framebuffer incomplete errors\" into nyc-dev
am: 4bcf66030d

Change-Id: If578de7d7ea10cceb0e19eb68e305432e4177d04
2016-06-10 16:08:44 +00:00
Chris Craik
d4fe4d3b30 Fix framebuffer incomplete errors
bug:29127615

Primarily fixes case where 0 dimensioned layers could be
created/updated. Additionally, adds more logging in incomplete
framebuffer cases, if they still occur.

Change-Id: Ib90dbbafd6905aca3c8f46e64064e13a308f713d
2016-06-09 17:05:27 -07:00
Doris Liu
c9493879d7 Support Keyframe definition for AVD on RT
BUG: 27441613
Change-Id: Iece386f65f3704d1b7caa2b3690a8d3048ccf6e2
2016-06-09 14:40:32 -07:00
Doris Liu
718cd3eb70 Handle hidden RT VectorDrawable animators
This CL changes the target of VD specific animators to VectorDrawable,
instead of RenderNode. The benefit of doing so is that animators can
now detect whether the animation is meaningful by checking whether
their VD target is in the display list. If not, that means the VD is
not drawing for the current frame, in which case we can be smarter
and more power efficient by removing the animator from the list and
posting a delayed onFinished listener callback.

By setting VD as the animation target, when an ImageView decides to
update its drawable from one AVD to something else, we'll be able
to detect that the previous AVD is no longer in the display list,
and stop providing animation pulse to the stale AVD, which is
something we couldn't do previously.  This change also
handles the case where one AVD instance could be drawn in two
different views.

Bug: 27441375
Change-Id: Iaad1ed09cfd526276b95db0dd695275c28e074e8
2016-06-09 10:27:59 -07:00
Sergei Vasilinetc
e4e240f13f Merge "HWUI: do not call glCopyTexSubImage2D on empty area." into nyc-dev 2016-06-02 01:36:35 +00:00
sergeyv
ab3f8c2e32 HWUI: do not call glCopyTexSubImage2D on empty area.
Previous check .isEmpty() is not sufficient, because getWidth() may have
value 0.5, so technically it is not empty, but when this size is passed
to texture calls it is converted to uint_32 and it becomes zero.

bug:28941093
Change-Id: Ia7c2bf0340466d5376f235fb5da54ad2ddfa0a03
2016-06-01 23:55:32 +00:00
Sergei Vasilinetc
21a608f27f Merge "HWUI: do nothing in case of empty layer" into nyc-dev 2016-06-01 00:15:32 +00:00
sergeyv
aebbbef565 HWUI: do nothing in case of empty layer
bug:28862058
Change-Id: I8e09a5c33d0eb00a829be4df706dab49cad48b1e
2016-05-31 14:18:02 -07:00
Doris Liu
028029730b Copy native tree's property when mutate vector drawable
When mutating vector drawables, we need to not only copy over
the VD tree structure, but also the properties of the VD tree,
such as alpha.

Bug: 28974071
Change-Id: I265e7e3cb92455b876cae248bcb9811230cb34f9
2016-05-27 10:54:55 -07:00
Michael Wright
c396f0f70e Merge "DO NOT MERGE Remove Pointer Capture API" into nyc-dev 2016-05-26 14:03:47 +00:00