450 Commits

Author SHA1 Message Date
John Reck
a896306c38 Add a workaround for simulate secondary display
To workaround a deadlock caused by bufferqueue locks
we force RenderThread over to use async mode which
we enable via eglSwapInterval(0)

Bug: 38372997
Test: steps in the bug
Change-Id: Ia305f73abbdd64ab0c25d1f7d32792cc6295a0ce
2017-06-14 10:50:14 -07:00
John Reck
a67b62e15e Fix ANR & Crash on Ryu
Fixes impossible dequeue crash as the wrong
start point of the frame was used. We need
to use the start point for RT, not the start
point for the frame.

Workaround for sysui ANR caused by what appears
to be a driver bug. Drivers with the bug
will have transiently higher memory usage.
Drivers without the bug will be unaffected.

Bug: 62213889
Bug: 62250550
Test: Manual

Change-Id: I9992b224f84bc1c40834bafff7e0013b38270ae0
2017-06-01 13:00:34 -07:00
John Reck
32414eea3e Fix dequeus outside of frame drawing
Bug: 62213889
Test: Repro steps in bug
Change-Id: I8fc407b280ba82c669fc2bb03750cab139adb965
2017-05-31 14:02:50 -07:00
John Reck
9a814875c4 Improve time to texture destruction
Eliminate textureCache.mGarbage which is only cleared
in a trimMemory. Instead when we hit ~Bitmap post a
message to RenderThread to release the texture immediately

Bug: 38258699
Test: manual
Change-Id: I962ba275e89afb628ba02f74769287edbab9fed4
2017-05-22 17:17:05 -07:00
John Reck
576b6a8a79 Revert "Fix recent apps in system UI for Skia pipeline"
This reverts commit 625dd56a45bfe95c5f1baa1891529503ff3374a9.

Reason for revert: Caused a memory leak, b/38330767
Bug: 38136140
Bug: 38330767
Test: manual, verified memory isn't leaking doing the steps in b/38330767

Change-Id: I998bea04788d58ba6bad71c1691d5a3b33190c1b
Merged-In: I98b2dfd750be57a15785808e2d5723616e2ce20a
2017-05-17 00:32:09 +00:00
Stan Iliev
625dd56a45 Fix recent apps in system UI for Skia pipeline
Enable HW Bitmaps for Skia pipeline just enough to make
recent apps list working by adding support for BitmapShader.
Drawing HW bitmaps in a canvas is also supported.

Test: recent apps work, HWUI unit tests pass, CTS tests pass.
bug: 38136140
Change-Id: Ibd06c859c86dc213310d5ce5272497e1882d0cc6
Merged-In: Ibd06c859c86dc213310d5ce5272497e1882d0cc6
2017-05-12 19:42:33 -04:00
John Reck
2f944482ec Add missing assert that task isn't queued
Probably won't fix anything but this assert is in queue()
but not queueAtFront() and inserting a task twice is Really Bad.

Bug: 36139852
Test:  ¯\_(ツ)_/¯
Change-Id: Ida0f829eecfdd46c17c36b816528c49d12b7cf29
2017-03-27 21:38:09 +00:00
Tom Cherry
4d7094dc99 Merge "Check for spurious wake ups" am: 3a3cd0a27f am: c2dcebe6e6
am: 1344c034c5

Change-Id: I8ffc749ab6fbd825ce238fff4ba1d12609585c04
2017-03-06 20:14:37 +00:00
Tom Cherry
298a146754 Check for spurious wake ups
Condition::wait() can spuriously wake up, so we must guard it with
another check to ensure that a given wake was truly due to having
been signaled.

Bug: 34592766
Test: Boot bullhead
Change-Id: Iaa5a0ca6186aea50c51e2c402ef95d7ba861be92
2017-02-28 14:19:44 -08:00
Mathias Agopian
fee4a985fd fallout of libandroid.so split
Test: compiled & booted
Bug: 35164655
Change-Id: I786167a21453e17493969cdacfc9d31bdb781d98
2017-02-23 23:28:20 +00:00
Derek Sollenberger
ab61fb8b5f Update framework to use new method for disabling DF path rendering.
Test: compile only
Change-Id: Ifa690a0af01cb6b07c4fd303302cb6a557e8dfde
2017-02-23 08:29:59 -05:00
TreeHugger Robot
f9bd294469 Merge "Overhaul GraphicsStatsService" 2017-02-21 19:23:46 +00:00
John Reck
df1742ed47 Overhaul GraphicsStatsService
* LRU cache of recently-used is dead, replaced
  disk storage
* ASHMEM size is read from native by the system service,
  no longer requires keeping a sizeof() in sync with a
  constant in Java
* Supports dumping in proto format by passing --proto
* Rotates logs on a daily basis
* Keeps a history of the most recent 3 days

Bug: 33705836
Test: Manual. Verified log rotating works by setting it up to
rotate every minute instead of day. Confirmed /data/system/graphicsstats
only has the most recent 3 entries after several minutes

Change-Id: Ib84bafb26c58701cc86f123236de4fff01aaa4aa
2017-02-21 09:49:10 -08:00
Derek Sollenberger
7c196d4a85 Merge "Disable buffer age swap behavior for SkiaGL on Adreno gpus" 2017-02-21 17:37:38 +00:00
Chris Craik
2f1aaf7e24 updateTexImage before bitmap readback of DeferredLayerUpdaters
Bug: 34206215
Test: hwui unit tests passing

Change-Id: I4360c0d94a831b4d2ebfd4020e4241658bfa190a
2017-02-15 17:22:26 +00:00
Matt Sarett
b77c94a96a Disable buffer age swap behavior for SkiaGL on Adreno gpus
Test: Verified that this fixes rendering bugs.

BUG:31957043
Change-Id: I3e5bca73eae2d917906658f76d8c432dbb248d89
2017-02-14 14:39:00 -05:00
Stan Iliev
6983bc40d7 Fix deadlock in render thread when Bitmap.prepareToDraw is invoked
Fix a deadlock with Skia pipelines, caused by calling
Bitmap::getSkBitmap from render thread.

Test: built and booted an image. Ran recent apps activity.
bug: 35060578
bug: 34926691
Change-Id: Iaf7957b955d938b722b153d72ad832ae5d50e86f
2017-02-07 09:18:17 -05:00
sergeyv
c3f1316961 Clean up deferredLayers only onGpuContextDestroyed.
Test: manual
bug:34919311
Change-Id: I5488b0845ec3922424f5893943e4f42675dfc9fd
2017-02-06 11:45:14 -08:00
Greg Daniel
bccd58cde3 Merge "Have Skia Vulkan backend support wait-for-gpu flag on tests" 2017-02-06 16:21:59 +00:00
Greg Daniel
4f70887d34 Have Skia Vulkan backend support wait-for-gpu flag on tests
So trying to mimic what the EglManager does in the fence call.
Technically there are two logical queues I could wait on for the device,
the graphics queue and the present queue. Waiting on the device waits
for both these queues to finish. It wasn't obvious to me if the EGL was
waiting for just graphics work or both queues, so I went for both (by
waiting on device). However, so far every device we've seen in Vulkan
has the present and graphics queue combined on the physical device so
waiting for one or both should really be different.

Test: Manual ran macrobench in skiavk and more realistic values compared
to not waiting for gpu.

Change-Id: I17cde70c677a9ad1b6bf9bc9ca4fd5f8f3b807e3
2017-02-03 10:28:52 -05:00
sergeyv
3e9999bd86 Explicitly destroy Layer in DeferredLayerUpdater on destroyHardwareResources()
Change-Id: I0987104eabda9a2a302b9e765213aad48f93aea4
Test: refactoring CL. Existing tests still pass
bug:33753499
2017-01-30 16:42:41 -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
Ben Wagner
610fbb3afd Merge "Use FatVector instead of SkAutoMalloc in VulkanManager." 2017-01-12 18:41:51 +00:00
Ben Wagner
eec27d51d2 Use FatVector instead of SkAutoMalloc in VulkanManager.
Skia is looking to make SkAutoMalloc private and will be moving it.
Using FatVector instead will make this code both less dependent on Skia
internals and more performant.

Test: refactoring CL. Existing unit tests still pass.

Change-Id: If9de10059775b75e1ab89078eacede2e20e91299
2017-01-12 11:52:31 -05:00
Mark Salyzyn
173215d1b2 resolve merge conflicts of ec7e2a164c37 to master
Test: compile
Bug: 26552300
Bug: 31289077
Change-Id: I49c6e41b79061e2b3c0352e3ac8fa5ebb152b6f5
2017-01-12 08:28:30 -08:00
Mark Salyzyn
96bf5985d5 Replace cutils/log.h and log/logger.h with android/log.h or log/log.h
(part deux)

Test: compile
Bug: 26552300
Bug: 31289077
Change-Id: I7417936c4d3666608fccfe51a312c90ecefba2fb
2017-01-11 15:30:30 -08:00
Greg Daniel
45ec62ba72 Add support for dummy draws for Vulkan webview and texture views.
Test: manual testing
Change-Id: Iaec8c3a34367673c281665ff6c6e97d1ce532265
2017-01-10 15:54:14 -05:00
Greg Daniel
8cd3edfa15 Break Layer class into Gl and Vulkan subclasses
Test: manual testing
Change-Id: Ibd2beed39de3ac6da7448e96496253cfe427dfbb
2017-01-10 15:05:07 -05:00
John Reck
1deac99c55 Support EGL_KHR_partial_update without EGL_EXT_buffer_age
Bug: 31334677
Test: manual && hwuimacro --onscreen partialdamage

Change-Id: I9b346b4053ec12c8a78a143a4dc0e708c44888a2
2017-01-09 14:35:37 -08:00
Greg Daniel
cd55852fcd Make buffer age work in Vulkan
Test: manual testing in skiavk mode

Change-Id: I5b9d8af7d9cecf2f022ef104ec33a5b7477e9e0c
2016-12-09 15:45:15 +00:00
Daichi Hirono
116c376c73 Fix hwui compile error only seen with debug switch.
Bug: None
Test: Build succeeded
Change-Id: I26e3f4fdc10f27d7eb7f3987d0f3e5dfa1bc9f45
2016-11-29 16:09:59 +09:00
sergeyv
59eecb526a Support readback from hardware bitmaps
Test: hwuimacro readbackFromHBitmap --onscreen.
bug:30999911
Change-Id: I369c069c40cb0f9adae5a94501815f29c2d7df0f
2016-11-18 10:49:27 -08:00
John Reck
7269372d5f Merge "Avoid starving RT anims"
am: f77c220aa9

Change-Id: I3d4ba24ae0e6de4683d47163fd8f3bf65b98bd17
2016-11-18 00:14:05 +00:00
John Reck
a5b7b89166 Avoid starving RT anims
Test: Manual, usleep(16000) in DrawFrameTask and tap
on recents

Merged-In: I88bb30a2503bc908ec45650c7d36b6fb3cc750d0

Change-Id: I88bb30a2503bc908ec45650c7d36b6fb3cc750d0
2016-11-17 22:05:22 +00:00
John Reck
769ccdbc1e Merge "Avoid starving RT anims" 2016-11-17 22:03:18 +00:00
Derek Sollenberger
189e87498f Update pinImages to report when GPU resource limits are exceeded.
Bug: 32691999
Test: proposed CTS test (ag/1500396) and existing UiRendering tests
Change-Id: I190f888ae5499ac048569af8256fdd31d19d1285
2016-11-17 09:56:53 -05:00
Derek Sollenberger
c4fbada76a Support Surface and Layer Readback in the SkiaPipelines.
Test: CTS TextureViewTests and UIRendering
Change-Id: I2969c8f5a975bfd9aebcbb585c64d1fcbb2487c2
2016-11-16 13:30:00 -05:00
John Reck
12efa55094 Avoid starving RT anims
Test: Manual, usleep(16000) in DrawFrameTask and tap
on recents

Change-Id: I88bb30a2503bc908ec45650c7d36b6fb3cc750d0
2016-11-15 10:22:01 -08:00
Derek Sollenberger
0e3cba3146 Handle vulkan windowing directly in SkiaVulkanPipeline
Test: manual testing in skiavk mode
Change-Id: I2fab80bae2787bfdacbc70d0402e98450e59406d
2016-11-09 11:58:36 -05:00
Derek Sollenberger
3e62009709 Merge "Refactor pin/unpinImages to work across pipelines." 2016-11-07 20:59:48 +00:00
Derek Sollenberger
7e044fef62 Enable SkiaPipelines to interoperate with existing GlesDriver configs.
Test: hwui unit tests
Change-Id: Icd94d0e21130d86fb5514801f999d0018a69e151
2016-11-07 10:59:20 -05:00
Derek Sollenberger
b7d34b64dd Refactor pin/unpinImages to work across pipelines.
Test: existing CTS tests still pass
Change-Id: Ib2607e9853396bad42f298829b5c5da0d210af32
2016-11-07 10:05:56 -05:00
Stan Iliev
500a0c30d4 Implement Skia pipelines for OpenGL and Vulkan.
Implement Skia pipelines for OpenGL and Vulkan:
base SkiaPipeline, SkiaOpenGLPipeline and SkiaVulkanPipeline.
Write unit tests for SkiaPipeline.

Test: Built and run manually on angler-eng.
Change-Id: Ie02583426cb3547541ad9bf91700602a6163ff58
2016-11-03 13:28:49 -04:00
Sergei Vasilinetc
97cc85fd4b Merge "Routine to upload hardware bitmaps" 2016-11-01 19:32:19 +00:00
sergeyv
694d499662 Routine to upload hardware bitmaps
Change-Id: Id8283a0975325e6830d55fd1e33c5f292a1e9be0
Test: refactoring cl.
bug:30999911
2016-10-31 16:11:21 -07:00
Derek Sollenberger
050bb6a2b0 Minor cleanup of unused headers and overly described functions.
Test: local compile
Change-Id: I5b794c9473f6d3a9e1d4f9365c951c7ce9dade50
2016-10-28 11:08:27 -04:00
Derek Sollenberger
daf7229047 Move OpenGL specific details behind renderPipeline interface.
Test: new and existing unit tests still pass.
Change-Id: I6164f30f45ebe450788ed8d949eca5af9a44e585
2016-10-26 12:46:57 +00:00
Derek Sollenberger
be9a73063c Merge "Store GrContext on RenderThread for use by Skia-based renderers." 2016-10-26 12:46:30 +00:00
Matt Sarett
de97307362 Make FrameInfoVisualizer use an IRenderPipeline to draw
Removing the direct uses of the BakedOpRenderer should make
it easier for the SkiaGL pipeline to take advantage of these
debugging features.

Test: Verified that debug.hwui.show_dirty_regions and
debug.hwui.profile still behave as expected.

BUG:32370375

Change-Id: I2818bda4a18ec183c9c39ca080ad34a4dc89b5cd
2016-10-25 17:44:55 -04:00
Derek Sollenberger
98f75d53db Store GrContext on RenderThread for use by Skia-based renderers.
Test: built and booted on device
Change-Id: I4c1060ec72bc67e54e6b2d25b1f2c13aaa513f89
2016-10-25 19:43:00 +00:00