326 Commits

Author SHA1 Message Date
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
John Reck
825fa4d5ae Merge "Revert "Make stopped state a first-class thing"" into nyc-dev 2016-04-11 20:54:36 +00:00
John Reck
eab3f2658a Revert "Make stopped state a first-class thing"
This reverts commit 945961f78a78eced823d5ba78505c781b079703d.

Change-Id: Iebc1d49fac33380233f8785fc39bec6c30a5e714
2016-04-11 20:49:28 +00:00
John Reck
c724dcf23c Merge "Make stopped state a first-class thing" into nyc-dev 2016-04-08 15:09:42 +00:00
John Reck
4a735441e8 Merge "Fix a derp" into nyc-dev 2016-04-08 15:09:26 +00:00
John Reck
a41f244515 Fix a derp
Fixes: 28074465

I knew I added that flag for a reason...

Change-Id: I6e28237dcd50191769a828bf2646c3a00c14387c
2016-04-07 16:36:57 -07:00
John Reck
945961f78a Make stopped state a first-class thing
Bug: 27286867

WindowManager has committed to stopped state
controlling the lifecycle of the Surface, so
make that a first-class thing in HWUI as well.

This makes it more resistent to things like
a rogue updateSurface() happening while mStopped=true,
leading to bad things down the line. Instead let
the surface be changed/updated as often as desired,
and just block any attempt to draw on that surface.

Also removes some unnecessary makeCurrent()s, as
EglManager ensures that we *always* have a valid
GL context now (using a pbuffer surface if there is
no window surface set)

Change-Id: Iead78ddebc7997e8fdb0c9534836352f5e54b9bd
2016-04-07 16:02:33 -07:00
John Reck
51f2d606dc Fix some edge cases
Bug: 27709981

This desperately needs a refactor, but to keep
the current (really needed & nice) behavior of
dispatching after sync finishes would be difficult
to handle cleanly without lots of ripping so... #yolo

Change-Id: I831a06c6ae7412a062720d68ecbe3085190f0258
2016-04-07 14:10:43 -07:00
John Reck
bbb4c2eb2e Merge "Add a callback for rendernode parentcount=0" into nyc-dev 2016-03-31 18:24:49 +00:00
John Reck
660108075e Expand JankTracker
Bug: 27922347

* Dump the full histogram
* Expand the histogram to have a slow-frame section with
  large 50ms buckets to raise the cap to 5s to give more
  insight into system-health
* Stop excluding first-frame metrics as we want to include
  those in our global tracking. Automated tests already filter
  these out by doing resets before running anyway.

Change-Id: Idaba8aad591f59d10a6477b11efc0767ff715083
2016-03-31 08:40:23 -07:00
John Reck
44b49f070a Add a callback for rendernode parentcount=0
Bug: 27709981
Fixes: 22565656

Change-Id: I1cb4461baf9069dc4e7ca6de10d5862578c107f4
2016-03-31 08:36:50 -07:00
Chris Craik
6246d27813 Support buildLayer in new pipeline
bug:26561995
bug:27620686

Change-Id: I6c39f9a077e7e6002d3c01b8888238fd17b0f02a
2016-03-29 16:50:32 -07:00
Chris Craik
3a5811b501 Precache/early kick off of op work for non-shadow ops.
bug:26562703
bug:27052145

Change-Id: Ic452bfe75da849ffdd47fecdd6eb1472fd0c806e
2016-03-23 12:55:12 -07:00
sergeyv
dccca44ffd Reland: Move text logic from jni to hwui level
Initial CL: https://googleplex-android-review.git.corp.google.com/#/c/886854/

Change-Id: I9dfd85fe1d2a2c44f4360c8a29fd58d80e6f31c8
2016-03-21 15:55:46 -07:00
Sergei Vasilinetc
6847953955 Merge "Revert "Move text logic from jni to hwui level"" into nyc-dev 2016-03-21 21:06:47 +00:00
Sergei Vasilinetc
afbd0f1fef Revert "Move text logic from jni to hwui level"
This reverts commit a7f6bba1a3565c19715e878dfe7f0e01022944ff.

Change-Id: If4f36f87a85411b6128fd92d391313803ccaf9dd
2016-03-21 21:03:40 +00:00
Sergei Vasilinetc
49658d4380 Merge "Move text logic from jni to hwui level" into nyc-dev 2016-03-21 20:11:27 +00:00
John Reck
38f6c034d1 Move updating window position off RT
Bug: 27385141
Change-Id: I6c75b5f1d9ef55ef64dde050f71d0e28fb8714bf
2016-03-17 10:32:07 -07:00
sergeyv
a7f6bba1a3 Move text logic from jni to hwui level
bug:25865834
Change-Id: I2d8c9c9544afcb5ce1784f732aed3e54e0eda372
2016-03-17 09:48:57 -07:00