444 Commits

Author SHA1 Message Date
Tim Murray
619682b960 Merge changes I15da2563,I7845542d into nyc-mr1-dev
am: 7b8b1aab93

Change-Id: I66d92cd3c08a67598cefdc6256825b1c6c1736f5
2016-07-19 00:25:52 +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
Stan Iliev
b4c51cf024 Merge "Move isSkiaEnabled to the Properties class" 2016-07-14 17:10:25 +00:00
Stan Iliev
768e39335b Refactor CanvasContext: move OpenGL specific code
Move OpenGL specific code from CanvasContext into a new class
OpenGLPipeline.

Change-Id: I4363053f890701a4235927b59ec588861488ea8f
2016-07-13 14:14:12 -04:00
Stan Iliev
8a33e40199 Move isSkiaEnabled to the Properties class
Move CanvasContext::isSkiaEnabled to Properties:isSkiaEnabled.

Change-Id: I0a62f43825cf59ba338a24a056e8c2a56d1c5315
2016-07-11 12:01:51 -04:00
Chris Craik
5e00c7ce06 Delete old rendering pipeline
fixes: 30002246

Change-Id: I45df0e924708526cee045b14c291bd23aa1a92db
2016-07-07 15:53:50 -07:00
Tim Murray
aa1735370b Merge changes from topic \\'fifo\\' into nyc-mr1-dev am: a96d445aef
am: 03b34e402c

Change-Id: If3104889f659aef9a6d7035e18ab839544c9ecb3
2016-07-07 20:59:09 +00:00
Tim Murray
03b34e402c Merge changes from topic \'fifo\' into nyc-mr1-dev
am: a96d445aef

Change-Id: If4a5c3f65cb611aecf82ad49ad6d992f098cbfb1
2016-07-07 20:48:27 +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
TreeHugger Robot
a1a529eec0 Merge "Implement runtime switch to select default renderer mode" 2016-07-07 20:09:46 +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
TreeHugger Robot
6f98aa2ff8 Merge "Unify readback Surface/TextureView copy mechanism" 2016-07-07 18:49:39 +00:00
Stan Iliev
03de074d05 Implement runtime switch to select default renderer mode
Add a system property debug.hwui.default_renderer, which allows
to set rendering mode to OpenGL (default), Skia OpenGL or Vulkan.

Change-Id: I8bca5bacc5108f77437e340ac61f2d8db8cc4c39
2016-07-07 14:27:20 -04:00
Chris Craik
764045da2c Unify readback Surface/TextureView copy mechanism
Removes last usage of old rendering pipeline.

Change-Id: Ia920dec9cd726ca221e11e888562c7df39a9761e
2016-07-07 10:02:12 -07:00
John Reck
e7f27fbf93 Merge \\"Consider queue & dequeue times for should draw\\" into nyc-mr1-dev am: 3a465e7a12
am: 6354336493

Change-Id: Idbe85f08c27cc6f9433badd886a1fe7d9ba73c4f
2016-07-07 16:40:20 +00:00
John Reck
6354336493 Merge \"Consider queue & dequeue times for should draw\" into nyc-mr1-dev
am: 3a465e7a12

Change-Id: I2ea38a087056e2f75aeb27c5bce03fe52690cd6e
2016-07-07 16:18:06 +00:00
John Reck
0def73aac5 Consider queue & dequeue times for should draw
Bug: 29413700

Change-Id: I4b27b077af569e3c60c57b0e11501e9f3af70579
2016-07-06 17:00:43 -07:00
John Reck
f1480761c1 Benchmark-mode for macrobench
Adds googlebench output format support
Adds offscreen rendering for >60fps benchmarking
Adds 'all' alias to run all registered TestScenes

Change-Id: I2579e40f2f4c941bfbd90c75efbee384c08a116b
2016-07-06 10:50:21 -07:00
Derek Sollenberger
05357641d3 Remove unused method from RenderProxy and CanvasContext.
Change-Id: I324bbfa40a2155d0212fa20c6bd39df5bb21d27a
2016-06-29 11:12:04 -04:00
John Reck
a1a0bbddba Merge \\"Fix SurfaceViewPositionListener race bugs\\" into nyc-mr1-dev am: 8701bff9ba
am: 892f8e7d4f

Change-Id: I1e66186dce36e52cafe6c0d027aeae7c9345703c
2016-06-28 01:36:19 +00:00
John Reck
892f8e7d4f Merge \"Fix SurfaceViewPositionListener race bugs\" into nyc-mr1-dev
am: 8701bff9ba

Change-Id: I17b1cf4e81321edb04ae9ac99449160a705ba824
2016-06-28 01:31:02 +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
John Reck
d2be84ff7c Merge "Delete unused args" 2016-06-22 19:36:50 +00:00
John Reck
ab1080c4d0 Delete unused args
Bug: 21170575
Change-Id: Icc832f70f206342557f44667ad3498405d04db78
2016-06-21 16:24:20 -07:00
John Reck
cb96c826f3 Merge \\\"Avoid re-calculating vsync mid-frame\\\" into nyc-dev am: fc275d244e am: cb0649f72b
am: a32df88d7d

Change-Id: Ica67f2cf6e78bdde5170e47ef6fb150f234a47cf
2016-06-18 02:29:19 +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
John Reck
a32df88d7d Merge \\"Avoid re-calculating vsync mid-frame\\" into nyc-dev am: fc275d244e
am: cb0649f72b

Change-Id: I7cc9443c1ab3e876daa3aeecbcb9a41085f359af
2016-06-18 02:08:56 +00:00
John Reck
cb0649f72b Merge \"Avoid re-calculating vsync mid-frame\" into nyc-dev
am: fc275d244e

Change-Id: Ic46d2d9627c4dcbd345b49f01af0bf3b8247259c
2016-06-18 02:05:17 +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
21a7b6e8e3 Merge \\\"Redraw if dirty during stopped when resumed\\\" into nyc-dev am: 5b4ff21a74 am: fc4c59a10c
am: 6c3281a7c7

Change-Id: I67192e2450293a6520a30ed78c8381b89558841b
2016-06-14 15:04:35 +00:00
John Reck
6c3281a7c7 Merge \\"Redraw if dirty during stopped when resumed\\" into nyc-dev am: 5b4ff21a74
am: fc4c59a10c

Change-Id: Id572ab8137655b8f64e563d78897d2461442dd39
2016-06-14 14:58:56 +00:00
John Reck
f22f6cf0f3 Merge \"Redraw if dirty during stopped when resumed\" into nyc-dev
am: 5b4ff21a74

Change-Id: I75235a18c29939b4f221c8af664d5f7218660aed
2016-06-14 14:54:21 +00: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
306f331f91 Redraw if dirty during stopped when resumed
Change-Id: I0034d1da7704de53c4ba3da3e8ef3109445f9e6a
Fixes: 28283031
2016-06-10 16:28:59 -07:00
Doris Liu
09087eaac9 Merge \"Handle hidden RT VectorDrawable animators\" into nyc-mr1-dev
am: 3f6a95283a

Change-Id: I909f3c33690fcb932f1b751def1837d82adb28f4
2016-06-09 21:44:01 +00: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
Doris Liu
67ce99b66e 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: Id4b3b37f28274c917cb9beb9dcd3d1e6991b5c5d
2016-05-26 11:13:19 -07:00
Chih-Hung Hsieh
d53e3bed1c Fix google-explicit-constructor warnings.
Bug: 28341362
Change-Id: I080090d50f1a368a4e7c1a0732297bb6a295e34f
2016-05-03 10:02:51 -07:00
Chih-Hung Hsieh
85e0c89ba5 resolve merge conflicts of 1599b981 to nyc-dev-plus-aosp
Change-Id: I90807581e10b6a0024515ff634ac8b29eaa5fc9f
2016-04-28 12:08:15 -07:00
Chih-Hung Hsieh
c6baf563ba Fix google-explicit-constructor warnings.
Bug: 28341362
Change-Id: Ibdd6a210bb7ff228e3624cc319169f77aca3b51e
2016-04-27 11:38:12 -07:00
John Reck
e94cbc76d5 API tweaks to PixelCopy and make it public
Bug: 27708453
Change-Id: I81667ce42f9ca1c1a13e1e61299927900845fc84
2016-04-26 15:41:43 -07:00
John Reck
9110429f0d Merge "Don't reuse LOST_SURFACE for stopped" into nyc-dev 2016-04-19 14:45:16 +00:00
John Reck
8cddce3f8f Merge "Make getFrameNumber lazy" into nyc-dev 2016-04-18 23:20:39 +00:00
John Reck
28912a5084 Make getFrameNumber lazy
Change-Id: I783de544ad9a3636ea90f1c8c4034738997bfbc8
Fixes: 28246085
2016-04-18 14:34:18 -07:00
Chris Craik
c79c3246c9 Merge "Improve multi-window render clipping logic" into nyc-dev 2016-04-18 19:40:50 +00:00
John Reck
9a17da8125 Don't reuse LOST_SURFACE for stopped
Fixes: 28218991

If a draw() happens while we are stopped, don't report
that the surface is lost because this will prompt
a tear-down of the surface which isn't desired. It can
result in ViewRootImpl ending up in an internally-bad state
in this case.

Change-Id: If3eb8c6bc8702299e5330bc0917952624dce3b7e
2016-04-18 11:29:35 -07:00
Chris Craik
9cd1bbe5c9 Improve multi-window render clipping logic
Fixes: 28125010

Restructures 'scene defer', to implement window backdrop overdraw
avoidance in new render pipeline, and disable clipping to content draw
bounds.

Also restructures FrameBuilder's constructors, to separate out into
multiple defer methods.

Change-Id: I53facb904c1a4a4acc493d8a489921a79a50494e
2016-04-18 10:39:02 -07:00
John Reck
8afcc76920 Revert "Revert "Make stopped state a first-class thing""
This reverts commit eab3f2658aa41d37c3b05d49a2ce4e3f4ed85399.

Fixes first-frame issue, mReportNextDraw needs to override
mStopped

Fixes: 28118961
Fixes: 27286867

Change-Id: I5c811759637d08ba9f3b342016d1b3006986d5a2
2016-04-14 10:39:03 -07:00
John Reck
d2eec0efb2 Merge "Framework-side of SurfaceView#getBitmap" into nyc-dev 2016-04-12 14:36:11 +00:00
John Reck
10dd0585c1 Framework-side of SurfaceView#getBitmap
Bug: 27708453

Change-Id: Ie6fd7eca522d3e6549d8af587c975fd7e6053649
2016-04-11 16:00:22 -07:00