Commit Graph

220 Commits

Author SHA1 Message Date
Jagadeesh Pakaravoor
b624af3dca Revert^2 "hwui: remove FatVector"
Revert submission 10449863-revert-fatvector

Reason for revert: b/149254345

Original change (of introducing FatVector) was reverted as a stop-gap solution to fix the aforementioned bug.

The bug was caused by an ABI lock between Surface's definition (that changed with Region) and lib-imsvt prebuilt.

Enabling this change now as we have re-compiled the prebuilt with the change enabled. Doing that via a revert of the revert.

Reverted Changes:
I8ac66acb8:Revert "hwui: remove FatVector"
Ib60dbf3ef:Revert "libui: rewrite Region with FatVector"

Original changes:
I09dc2fddd:hwui: remove FatVector
I265c6c831:libui: rewrite Region with FatVector

bug: 149254345

Change-Id: I9fb5e8908434abb9a763992e922445a2dc37e865
2020-05-01 15:57:15 +00:00
Tim Murray
894f132ba0 Revert "hwui: remove FatVector"
Revert "libui: rewrite Region with FatVector"

Revert submission 10248126-fatvector-region

Reason for revert: b/149254345
Reverted Changes:
I09dc2fddd:hwui: remove FatVector
I265c6c831:libui: rewrite Region with FatVector

also fix wrong license in FatVector.h

Test: boots
Bug: 149254345

Change-Id: I8ac66acb8b635324051edd41c5d4092c223157ff
2020-03-05 12:15:40 -08:00
Tim Murray
0865f2e7b2 hwui: remove FatVector
FatVector now lives in fw/native/libs/ui.

Test: builds, boots, works
Bug: 149096186
Change-Id: I09dc2fddd2a238ef47d7853b64b0bfbf74d3f71f
2020-02-07 17:57:44 +00:00
John Reck
183e1380ce Improve dumping of display list memory usage
The first step of improving is measuring. So measure better.

Bug: 138856108
Test: dump
Change-Id: I076b904a1f0dfb209622c76bcb8778a10cd2b7db
2019-10-09 13:42:43 -07:00
Derek Sollenberger
5d0ca63d9c Isolate the graphics classes into their own static lib
Update additional headers to include-what-you-use to resolve
compiler errors related to moving include paths.

Test: CtsUiRenderingTestCases
Change-Id: I230408a53610ad1926f9e46d5aff66f52fec4a3a
2019-07-29 14:57:14 -04:00
Fedor Kudasov
86bd214059 Enable RenderNode and RecordingCanvas for layoutlib
Bug: 117921091
Test: all tests should pass
Change-Id: I574b12a5f7a6a54cbbcb17c35a3884368fd404e6
2019-06-26 19:24:15 +00:00
Fedor Kudasov
b7c2eb98fb Remove redundant header
Bug: 117921091
Test: all tests should pass
Change-Id: I6a3ddd9b5f24bc3ed4d7862493c0c72e79b4410d
2019-06-24 14:26:28 +00:00
John Reck
097e1d3330 Fix setPositionListener race condition
Fixes: 131625115
Test: atest android.view.cts.SystemGestureExclusionRectsTest android.view.cts.SurfaceViewSyncTest android.uirendering.cts.testclasses.SurfaceViewTests

Change-Id: Ia357ff6fa5d5fe1e152abc23bbd6d8051cfd7aa7
2019-06-12 15:41:50 -07:00
John Reck
f1aa7909e6 Fix damage tracking for RenderNode drawn twice
Bug: 127866048
Test: CustomRenderer demo
Change-Id: I431a7284b1d0a026e06500a78f41830a268235a5
2019-03-07 17:03:48 -08:00
John Reck
283bb46846 New WebViewFunctor API
Should function alongside existing functor API.

Bug: 120997728
Test: hwuiunit passes
Change-Id: I8f6143d0be1111431b55016f34de319f6b8c8910
2018-12-14 14:07:18 -08:00
John Reck
7af5b2c653 Fix skp on 32-bit
%d strikes again...

Test: dumped skp on 32bit app
Change-Id: Ica4d9e3939d0e726beb80fbf45a938b004b5eb5d
2018-12-05 13:38:18 -08:00
John Reck
f96b284dec Add a unique ID to rendernode
Bug: 120089776
Test: dump'd skp, verified ID present
Change-Id: I97a03804ebc53925e1b79db3dd616a728eff0bfa
2018-11-29 10:34:32 -08:00
John Reck
3b4510cd77 Auto-dark NinePatches & launcher
Support palette for ninepatches (fixes popupwindow)

Crude heuristic tweak to treat any RenderNode that fully
contains other nodes as background nodes.

Test: all apps is now readable, and so is chrome's menu
Change-Id: I9926973c0be1dbf0088fa2d61e4ee2a414b19a97
2018-10-02 11:19:55 -07:00
TreeHugger Robot
e64d55010f Merge "Create plumbing for disabling force-dark" 2018-09-24 19:54:33 +00:00
John Reck
1423e1331f Create plumbing for disabling force-dark
Test: sysui's rounded corners are no longer white
Bug: 102591313

Change-Id: Id99ae38c354cef06b94a5fb79b5b1a9a216a514c
2018-09-24 09:34:18 -07:00
Derek Sollenberger
c49e5b78f6 Merge changes Ie9436715,Ib3054822
* changes:
  Refactor RenderState and remove unused functionality.
  Fix crash when EGLSurface is no longer valid.
2018-09-21 00:58:05 +00:00
John Reck
f3c724fd7c Make auto-dark a bit better
Handles transform of basic bitmaps
Tweak to always treat text as foreground

Test: builds, poked around with force_dark
Change-Id: I733d39e05067438335da5a7eac06111f66f1228d
2018-09-20 13:41:56 -07:00
Derek Sollenberger
28a4d9935c Refactor RenderState and remove unused functionality.
Test: hwui_unit_tests still pass
Change-Id: Ie943671535ab8c5da1bac05985e815e0cb842dc1
2018-09-20 14:47:08 -04:00
John Reck
8f45d4afd9 New DisplayList v2
First step of many

* Pulls SkLiteDL and SkLiteRecorder into HWUI

* forceDark shifted to be a sync-time transformation
instead of record time. No meaningful behavior change,
but much more flexible heuristics are possible this
way.

Test: build, poked around with forceDark on

Change-Id: I7b7cec5b7fd7c2b18823b4d92d821cf5898f9b88
2018-08-29 13:53:36 -07:00
Mike Reed
faaf6872b1 remove unneeded RecordedOps
Test: make

Change-Id: Ifcb0df64ad649623ae875462f55d9009a4e1ac03
2018-05-09 13:18:35 -04:00
Mike Reed
e7f688bd01 remove BakedOps and much of renderstate
Test: make

Change-Id: If070b7436b848c6840abfac5f051b0f5b6cb17ce
2018-05-04 15:21:49 -04:00
John Reck
d9d7f127b5 Delete a bunch of code
This removes the duality of DisplayList, removing a small amount of
overhead

Test: buids & hwuiunit passes

Change-Id: I8bb3a20e9ead1caec4b4a8a3e9f2c08f717a7096
2018-05-03 15:25:19 -07:00
John Reck
1072fffddb Remove Properties::isSkiaPipeline (3/!?)
Test: hwuiunit & CtsUiRenderingTestCases pass
Change-Id: Ie7b336eacdd1b8660e09653c64eb6ea0a7b4a258
2018-04-12 15:21:21 -07:00
John Reck
617673f83f Remove dead code
Remove an old protobuf serialization experiement, skp capture
does this better

Test: builds

Change-Id: Icd875eabee6b517729f901841e48e579d0e8de4d
2018-04-09 14:50:40 -07:00
Stan Iliev
216b1572b4 Better error reporting for createOrUpdateLayer
Pass error handler down to the pipeline object, which allows
skia pipelines to print cache memory usage.
In case of an error, print arguments that were used to invoke
SkSurface::MakeRenderTarget.

Test: Ran android build on a device
Bug: 76115654
Change-Id: I5baddfa66debd505eddc3117cf94aa6ae69bedaa
2018-03-28 13:49:21 -04:00
John Reck
1bcacfdcab Format the world (or just HWUI)
Test: No code changes, just ran through clang-format
Change-Id: Id23aa4ec7eebc0446fe3a30260f33e7fd455bb8c
2017-11-03 10:57:44 -07:00
Derek Sollenberger
579317d4eb Avoid performing the pathOp for clipped shadows if possible.
Bug: 64487466
Test: SystemUiJankTests#testRecentAppsFling
Change-Id: I2ca96bd6adba299cd31e12f005b2529c559740d2
2017-08-30 12:47:08 -04:00
John Reck
679e7f1dfc Add check that layer size <= maxTextureSize
Ensure that RenderNode fitsOnLayer() is true before assigning
it a layer.

Bug: 63814070
Test: repro steps in bug no longer crash
Change-Id: I28bb2cb173a5efde24e2384f2606fea85b394ac8
2017-08-02 16:15:24 -07:00
Stan Iliev
d217237045 Implement "dump displaylist" button for skia pipelines
Implement "dump displaylist" button in hierarchyviewer for skia
pipelines.

Test: ran hierarchyviewer for all pipelines.
bug: 34819877
Change-Id: Ifeb578260f636cb67268f9f9259e7318bf7de453
2017-02-09 17:09:03 -05:00
John Reck
3afd63778e Switch how destroyHardwareResources works
destroyHardwareResources will now only force-destroy
the specific node it was called on, which are only
ever the root nodes. Rely on onRemovedFromTree()
to clean up resources for all other nodes.

Bug: 34736819

Test: RenderNode.multiTreeValidity passes, manually
verified fixes b/34736819

Change-Id: I1c275ad6a98b63bf50f265602f09bffe3e1f169b
2017-01-30 13:29:26 -08:00
John Reck
2de950d5a8 Overhaul RenderNode's DisplayList management
* Move mValid to native
* Have destroyHardwareResources destroy everything
* Remove flaky mParentCount checks in setStaging
* All tree updates have an internal observer to
  ensure onRemovedFromTree() is a reliable signal
* onRemovedFromTree() immediately releases resources
  to avoid displaylist "leaks"

Test: Unit tests for validity added & pass, manually
verified that b/34072929 doesn't repro

Bug: 34072929

Change-Id: I856534b4ed1b7f009fc4b7cd13209b97fa42a71c
2017-01-25 12:24:40 -08:00
Matt Sarett
f58cc92066 Add overdraw debugging feature to Skia pipelines
Test: Compared to OpenGL pipeline and sanity checked
with understanding of the drawing pipeline.  Also
wrote a unit test.

BUG:32370375

Change-Id: Iab397d21f0def725fa89551d48c764c67fd2bda8
2016-11-29 18:03:40 -05:00
Derek Sollenberger
0df6209a02 Initial refactoring to enable the addition of the SkiaOpenGLPipeline.
Test: existing and new HWUI unit tests all pass.
Change-Id: I4f5c1dc839a2ed15d8b0f6245fe030684501b083
2016-10-05 15:28:27 -04:00
Derek Sollenberger
6a21ca5a4c Move Layer creation/deletion into the RenderPipeline.
Test: refactoring. existing tests still pass.
Change-Id: I032c33896a0cb74c91e2a913a584373518466b88
2016-10-03 16:30:19 -04:00
sergeyv
c3849aa786 HWUI: reimplement rendernode ouput for single stream
bug: 26565102
Change-Id: I90b449b2dce52683c50b48091354104d76a5e44a
2016-08-09 16:29:44 -07:00
Doris Liu
eba351df16 Ensure layer update include the dirty rect from AVD am: b51b2864e8 am: c0dccb9597
am: 334d32137f

Change-Id: I20bf02209a269d6bef3085ae07caade7680b065d
2016-08-03 19:46:26 +00: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
Derek Sollenberger
56ad6ec42f Remove LayerRenderer.
There is only one caller each for the static functions here so this
CL moves the logic to the caller.  Also by moving some of the code
into the pipeline it makes it easier for future changes to configure
how a pipeline handles a layer.

Change-Id: Ib735b5154325cbb658fd151f7a19dbf434ab44b7
2016-07-26 13:05:13 -04:00
Chris Craik
52c4eba143 Merge \\"Avoid throwing when 0 size layer requested\\" into nyc-mr1-dev am: 272b827925
am: ec83bd15c8

Change-Id: If585ade667c888d2f5f8e90a76125971178a7ba5
2016-07-12 02:16:05 +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
Chris Craik
5e00c7ce06 Delete old rendering pipeline
fixes: 30002246

Change-Id: I45df0e924708526cee045b14c291bd23aa1a92db
2016-07-07 15:53:50 -07: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
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
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
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
John Reck
cd1c3eba69 Add a callback for when a gl functor is released
Bug: 27709981

Change-Id: Id5be3e8f88d6d84a9c59c7ed23e7e8862feefbe8
2016-04-15 10:56:53 -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
Doris Liu
1d8e194661 Make AVD thread safe
This CL introduces staging properties to VectorDrawable, which holds
properties coming from UI thread. When staging properties are changed,
they are marked dirty, and the staging properties then get pushed to
RenderThread at sync point. In cases where no staging property has
been changed, at sync point we sync the render thread properties back
to staging properties to reflect the latest render thread animation
value change.

Also, update Vector Drawable bitmap only when it's dirty

Bug: 27343970
Bug: 27385912
Bug: 27263667
Bug: 27927674
Bug: 27774383

Change-Id: Ia864f5400a53a08dbfb284fae581fb1aac4fff87
2016-04-04 14:40:17 -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