8571 Commits

Author SHA1 Message Date
Robert Carr
cd4aeef880 Modify SurfaceView to use SurfaceFlinger child surfaces.
Here we have SurfaceView bypass the WindowManager and speak
directly to SurfaceFlinger using child surfaces. We also
implement some logic in the WM to handle child surfaces
in various Surface replacement scenarios.

For those following along in the revert Saga, this
also includes the follow up CLs to the original CL.
- Surface inset calculation
- Animation fixes.

The error causing revert was a deferTransactionUntil(-1)...-1
cast to uint, defer transaction until MAX_UINT.

Bug: 28858420
Bug: 31518219
Bug: 34888808
Bug: 35588318
Bug: 35396882
Test: Existing tests still pass (except for the ones that don't and will be deleted).
Change-Id: Ib37236950a1dd3c4f9f4b58fd41ef9003c0557ef
2017-03-03 13:06:59 -08:00
Rob Carr
115d2dbf93 Merge "Revert "SurfaceView: Include surfaceInsets in position calculation"" 2017-03-03 01:16:28 +00:00
Rob Carr
8009012644 Revert "SurfaceView: Include surfaceInsets in position calculation"
This reverts commit 8c31e1db2a2cea4278503d6b9b27bca87946ef36.

Change-Id: Id25f493ca272878c2105f9cd302db1e05284998d
2017-03-03 01:15:36 +00:00
TreeHugger Robot
4f357c0812 Merge "Fix potential use-after-free in LayerUpdateQueue" 2017-03-02 23:16:27 +00:00
TreeHugger Robot
e1c54d53f1 Merge "Update SkiaDisplayList to use the modified SkLiteDL" 2017-03-02 22:45:35 +00:00
John Reck
fc29f7acd1 Fix potential use-after-free in LayerUpdateQueue
Change-Id: I090af2191576175b165a9db574a80123c16f0778
Fixes: 26548204
Test: Builds & hwui unit tests pass
2017-03-02 13:30:15 -08:00
Derek Sollenberger
ea1fe9b9d6 Update SkiaDisplayList to use the modified SkLiteDL
SkLiteDL is no longer refcounted or a subclass of SkDrawable.

Test: on device testing in SkiaGL mode
Change-Id: I9ad53d764a26ab382d80d54908325962f2075802
2017-03-02 15:28:19 -05:00
Robert Carr
8c31e1db2a SurfaceView: Include surfaceInsets in position calculation
Previously the WM was taking care of this.

Fixes: 35588318
Fixes: 34888808
Test: Manual
Change-Id: I8b48d89f830bbef43b0132d191b29552e9c35702
2017-03-02 10:38:40 -08:00
Chris Craik
894b5b9998 Merge "Revert "deprecate replayClips"" 2017-02-28 19:01:11 +00:00
Derek Sollenberger
95c1a069f2 Revert "deprecate replayClips"
This reverts commit 82d3b17f6dff9372ec531d90b5d9180671e0ee2c.

Bug: 35831173
Change-Id: I467e7204a5e4bcbab1c12d3fcf52e52188830ed5
2017-02-28 17:49:07 +00:00
TreeHugger Robot
c33b943f25 Merge "deprecate replayClips" 2017-02-27 22:22:16 +00:00
Seigo Nonaka
194f375979 Merge "Follow Minikin's signature changes." 2017-02-27 04:30:31 +00:00
Seigo Nonaka
c7064146f9 Follow Minikin's signature changes.
Minikin now uses shared_ptr instead of MinikinRefCounted.

Bug: 28119474
Test: manually tested
Test: hwui_unit_tests passed.
Change-Id: Ie0564851a8a798af112679e15f7a07db000a977e
2017-02-27 11:15:19 +09:00
Mike Reed
82d3b17f6d deprecate replayClips
replayClips is deprecated, just get the rgn instead for setBitmap

Test: ran Canvas CTS
Change-Id: Id0f0da6602d1488bb4071885704fa6e3b449ab85
2017-02-24 18:23:05 -05:00
TreeHugger Robot
eda4756502 Merge "fallout of libandroid.so split" 2017-02-24 03:16:12 +00:00
TreeHugger Robot
0c6d24f736 Merge "Log rendering pipeline when initializing" 2017-02-24 01:28:17 +00:00
TreeHugger Robot
bd9e74cae0 Merge "OMS: integrate OverlayManagerService into framework" 2017-02-24 00:07:42 +00:00
Chris Craik
6e66b39e4a Log rendering pipeline when initializing
Test: manual, boots

Change-Id: I6e544510053ecf2b397ac998bcc7be9c00295a7d
2017-02-23 15:51:59 -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
Mårten Kongstad
2e0d0f3111 OMS: integrate OverlayManagerService into framework
Hand over ownership of overlays to OverlayManagerService.

Changes to a package's overlays are propagated using the activity life
cycle. Affected activities will be recreated as needed. This provides a
well-defined point to modify an application's assets while the
application is paused.

Consolidate how overlays targeting the system and overlays targeting
regular applications are handled. Previously, system overlays were
handled as a special case. Now, everything is handled identically. As a
side effect, the call to idmap --scan during Zygote boot has become
obsolete and is removed.

Information on what overlays to use is recorded in
ApplicationInfo.resourceDirs. The PackageManagerService is responsible
for the creation of ApplicationInfo objects. The OverlayManagerService
is responsible for informing the PackageManagerService in advance about
what resourceDirs to use.

When launching an application, the ApplicationInfo is already populated
with up-to-date information about overlays.

When enabling or disabling an overlay for a running application, the
OverlayManagerService first notifies the PackageManagerService about the
updated resourceDirs. It then tells the ActivityManagerService to push
the new ApplicationInfo object to the application's ActivityThread.
Finally the application requests its ResourcesManager to create new
ResourcesImpl objects based on the updated paths.

Change-Id: Ib8afa05ccab4e2db558f89ce4423983c086bb61a
Co-authored-by: Martin Wallgren <martin.wallgren@sonymobile.com>
Signed-off-by: Zoran Jovanovic <zoran.jovanovic@sonymobile.com>
Bug: 31052947
Test: run tests from 'OMS: tests for OverlayManagerService'
2017-02-23 14:01:38 -08:00
Derek Sollenberger
dfe0647f6c Fix unit test that failed due to incorrect refactor.
Test: hwui unit tests
Change-Id: I88b962718086ff1ca3df1999b2040fb1007b6f33
2017-02-23 14:30:18 -05:00
Derek Sollenberger
f77ca08721 Fix HWUI tests to use android-only SkPaint flags
Test: compile only
Change-Id: Ia3a5710d4ae13d68e5b2655a8b135dae8ffeb513
2017-02-23 10:03:04 -05: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
Guang Zhu
df0824ad4c Merge "Revert "OMS: integrate OverlayManagerService into framework"" 2017-02-23 07:36:16 +00:00
Guang Zhu
9545980692 Revert "OMS: integrate OverlayManagerService into framework"
Bug: 31052947
Bug: 35697944

This reverts commit 21a3d1ad686dee97b9cf0ed80389ee2ab0d48013.

Change-Id: I2d86931020301524c26cf8c8e80d557c97fdd6c3
2017-02-23 07:35:39 +00:00
TreeHugger Robot
0f09817859 Merge "OMS: integrate OverlayManagerService into framework" 2017-02-23 03:59:01 +00:00
Mike Reed
b216c21acd underline is now only tracked by android
Change-Id: I189c57dd47ad413b8964d7e5805dfd6d4af11982
2017-02-22 10:49:51 -05:00
TreeHugger Robot
a231eb1410 Merge "Implement getAxes() method." 2017-02-22 09:35:13 +00:00
Mårten Kongstad
21a3d1ad68 OMS: integrate OverlayManagerService into framework
Hand over ownership of overlays to OverlayManagerService.

Changes to a package's overlays are propagated using the activity life
cycle. Affected activities will be recreated as needed. This provides a
well-defined point to modify an application's assets while the
application is paused.

Consolidate how overlays targeting the system and overlays targeting
regular applications are handled. Previously, system overlays were
handled as a special case. Now, everything is handled identically. As a
side effect, the call to idmap --scan during Zygote boot has become
obsolete and is removed.

Information on what overlays to use is recorded in
ApplicationInfo.resourceDirs. The PackageManagerService is responsible
for the creation of ApplicationInfo objects. The OverlayManagerService
is responsible for informing the PackageManagerService in advance about
what resourceDirs to use.

When launching an application, the ApplicationInfo is already populated
with up-to-date information about overlays.

When enabling or disabling an overlay for a running application, the
OverlayManagerService first notifies the PackageManagerService about the
updated resourceDirs. It then tells the ActivityManagerService to push
the new ApplicationInfo object to the application's ActivityThread.
Finally the application requests its ResourcesManager to create new
ResourcesImpl objects based on the updated paths.

Co-authored-by: Martin Wallgren <martin.wallgren@sonymobile.com>
Signed-off-by: Zoran Jovanovic <zoran.jovanovic@sonymobile.com>
Bug: 31052947
Test: run tests from 'OMS: tests for OverlayManagerService'
Change-Id: Idc96dae6fc075d5373aa055bbf50e919136d7353
2017-02-21 14:29:43 -08:00
Fyodor Kupolov
21edf1976c Merge "Check bounds in offsetToPtr" 2017-02-21 22:29:35 +00: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
d7df6748f2 Merge "Add developer setting to set the default GPU renderer." 2017-02-21 17:37:38 +00:00
Derek Sollenberger
7c196d4a85 Merge "Disable buffer age swap behavior for SkiaGL on Adreno gpus" 2017-02-21 17:37:38 +00:00
TreeHugger Robot
28f99293f7 Merge "Fix Rgba16fTests@testTransferFunctionsShader test" 2017-02-18 02:59:33 +00:00
Romain Guy
dd6f1a7084 Fix Rgba16fTests@testTransferFunctionsShader test
RGBA16F bitmaps used as an SkBitmapShader would not set the hasLinearTexture
flag in the program description, causing a shader to be generated without
the proper opto-electronic transfer function.

Bug: 35482305
Test: bit -t CtsUiRenderingTestCases:android.uirendering.cts.testclasses.Rgba16fTests
Change-Id: I23354f8189a6b27b677eac9df82677e91282a31d
2017-02-17 17:09:21 -08:00
Adam Lesinski
edb88a2b94 Merge "Add ResTable_sparseTypeEntry support" 2017-02-18 00:39:18 +00:00
TreeHugger Robot
a5e8f6cb8f Merge "AssetManager2: Various fixes" 2017-02-17 23:27:58 +00:00
Fyodor Kupolov
45e2e95c2f Check bounds in offsetToPtr
Check whether specified offset belongs to mData.
Also added a default argument bufferSize to check the end offset.

Size of the ashmem descriptor can be modified between
ashmem_get_size_region call and mmap. createFromParcel method was updated
to check ashmem size again immediately after memory is mapped.

Test: manual - using the test app from the bug
Bug: 34128677
Change-Id: I3ecd1616a870ce20941ce9b20a1843d2b4295750
2017-02-16 09:50:00 -08:00
Adam Lesinski
c8f71aa67e Add ResTable_sparseTypeEntry support
Benchmarks on bullhead-userdebug show that there is a negligent
performance impact when using sparse entries on a 30% loaded
sparse type of 1000 resources.

Benchmark                                             Time           CPU Iterations
-----------------------------------------------------------------------------------
BM_SparseEntryGetResourceSparseLarge                255 ns        254 ns    2751408
BM_SparseEntryGetResourceNotSparseLarge             254 ns        254 ns    2756534

Bug: 27381711
Test: make libandroidfw_tests aapt2_tests
Change-Id: I051ea22f2f6b2bc3696e446adc9e2a34be18009f
2017-02-15 12:40:02 -08:00
Chris Craik
9138948df9 Merge "Always flush renderstate in DeferredLayerUpdater::apply" 2017-02-15 19:10:08 +00:00
Adam Lesinski
d1ecd7af68 AssetManager2: Various fixes
- Use FileMaps to open Assets (prevents closing of ApkAssets underlying
zip)
- Implement OpenDir and List methods
- Fix issue where DynamicRefTable wasn't properly constructed

Test: make libandroidfw_tests
Change-Id: Ib21a84e1114d028120744aa3bc1c6eb9d9399fa8
2017-02-15 10:50:23 -08: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
Chris Craik
09df887c90 Always flush renderstate in DeferredLayerUpdater::apply
Bug: 34206215
Test: hwui unit tests passing, manual test of TextureView video playback

Always flush renderstate to the GlLayer's texture, regardless of
whether updateTexImage has ever been called.

Change-Id: I3974dce9d90633a0299e6bc4259b76c622717c90
2017-02-15 17:22:22 +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
Derek Sollenberger
4badfe6d3b Add developer setting to set the default GPU renderer.
Test: manual on-device testing
Bug: 35345959
Change-Id: I1d846f922a048dd215caf053b10aaa909bdbc74d
2017-02-14 12:03:02 -05:00
TreeHugger Robot
ab582b762a Merge "Replace bitmap shaders with image shaders in test code" 2017-02-14 14:21:38 +00:00
Derek Sollenberger
7183b6908b Merge "Deprecate Canvas save/saveLayer flags." 2017-02-14 13:31:21 +00:00
Sergey Vasilinets
2eaae562fe Merge "DeferredLayerUpdater: clean up Layer lifecycle" 2017-02-14 01:28:26 +00:00
sergeyv
00eb43dbc0 DeferredLayerUpdater: clean up Layer lifecycle
Test: refactoring CL, all existent tests should pass
bug:34919311
Change-Id: Ib2889667a5ab8a2aaba443458782bc163467f0ea
2017-02-13 14:41:20 -08:00