summaryrefslogtreecommitdiff
path: root/native
AgeCommit message (Collapse)Author
2022-03-15Merge SP2A.220305.013Haamed Gheibi
Bug: 220074017 Change-Id: Idfdd94e902f656ac65a2a75dfdd199f6f85ba472
2021-07-26ADPF: Handle preferred interval on unsupported deviceBo Liu
The original java implementation just passed along whatever the server returns which is -1 on unsupported devices. So do that here as well. Test: PerformanceHintManagerTest passes on unsupported device Bug: 194691581 Change-Id: I8ac07737e6ce52debf55478880d71f038f258056
2021-07-22Implement native PerformanceHint APIBo Liu
Test: atest PerformanceHintNativeTestCases Bug: 194204196 Change-Id: Ie26e25e9ecf87046df92346dff54174934a8c73e
2021-07-19Null check color_space_ptr in draw functor v2Bo Liu
Missed toXYZD50 usage last time. Still assume sRGB if null. Bug: 187798471 Test: Manually tested setting color_space_ptr to null in GL/VKFunctorDrawable Change-Id: Idee2660d368dd55e45f5d07d52839105ba951ff3
2021-07-15Null check color_space_ptr in draw functorBo Liu
Assume sRGB if null. Bug: 187798471 Test: Checked webview still starts up and draws. Change-Id: Idf8c8291bde0ce0624085afd143096c357246672
2021-07-12Remove isDataspaceValidJohn Reck
isDataspaceValid is problematic in that it prevents applications from being able to pass-through dataspaces they receive from other APIs, and it also assumes that the display's capabilities are the only things that are supported. Although it's recommended that applications stick to dataspaces that the display can handle, it's not strictly required. RenderEngine can handle more dataspaces than the display can, applying appropriate color conversion. Similarly this could be going to a virtual display instead, in which case the physical display's capabilities are not necessarily relevant. Bug: 149931223 Test: make Change-Id: I475f4e4dcbcdb4765670f6a8eb4cc047a9babb43
2021-05-13Have HWUI validate the WebViewFunctors at registrationJohn Reck
Also tweak how webview's plat_support creates the functor sruct to be thread-safe, avoids any potential race conditions even though WebView itself is stated to be thread-hostile in general. It's too easy to have this just be defined-safe instead. Bug: 186814981 Test: build & boot, no crashes in real-webview apps Change-Id: I06f02a279e248fee375ce133c5ce9a2250665ad9
2021-05-12Merge "Remove rotation based scaling" into sc-devVishnu Nair
2021-05-11Remove rotation based scalingVishnu Nair
In order to simplify some of the geometry logic in BufferStateLayer, and unify with the rest of the layer in SurfaceFlinger we translate the concept of source and dest frame into crop, scale and position. This is currently done on the client side. But if there is buffer rotation transform, we will generate an additional scale, to scale the buffer size to the new orientation. This causes issues with rounded corners because the additional scale stretches the rounded corner incorrectly. And translating the buffer rotation into a rotation matrix affects child layers. This solution only adjusts the buffer size based on the rotation matrix and the scale is generated based on the rotated buffer. This cannot be done in the client side because we do not have the current display orientation to unflip the buffer if the client sets the transformToDisplayInverse flag. In the future the plan is to drive the transform hint and the display orientation down from WM so this calculation can go back to the client. Also fixes incorrect additional scaling from source frame to dest frame in ASurfaceTransaction_setGeometry. Test: atest SurfaceControlTest ASurfaceControlTest libgui_test SurfaceFlinger_test Test: go/wm-smoke Bug: 185597146 Change-Id: I38adbc72c7567510c953cfd362a94b2b38d7fda7
2021-05-10Update usage of FontCollection interfaces.Seigo Nonaka
Bug: 187358499 Test: m Change-Id: I2b1f001b3ebf7c297dae422c730d7052894e4394
2021-05-06Merge "ANativeWindow_fromSurface: Use acquire not incStrong" into sc-devRob Carr
2021-05-06Merge "AImageDecoder: return BAD_PARAMETER on null info" into sc-devLeon Scroggins
2021-05-05ANativeWindow_fromSurface: Use acquire not incStrongRobert Carr
When we call incStrong like this, it won't work if the caller of ANativeWindow_fromSurface later calls ANativeWindow_release and so we leak the reference indefinitely. We change to call acquire so that the caller can call release. Bug: 186190571 Test: Existing tests pass Change-Id: I647a856923c891da2d305471f5ff84103d1f9ed5
2021-05-03AImageDecoder: return BAD_PARAMETER on null infoLeon Scroggins III
Bug: 186656488 Test: I4dc406e85709dda14af8b414e2da3d39bb07643b Change-Id: Ibd7c1c3d1319818e86ac29bdc231e0e05cec2132
2021-04-29Restore old behavior in pulic API setGeometrychaviw
When setFrame was removed, it required some changes to setGeometry. However, this created some behavior changes between R and S. Modified setGeometry to restore old behavior. 1. Destination can't have negative left and top. If negative values are set, it will revert to (0,0,w,h) 2. If invalid source is set, an invalid rect for crop will be sent to SF which would normally mean crop is ignored. Test: ASurfaceControlTest Bug: 185533162 Change-Id: I5c86da7327f97e82c63ae1f1c985829b8a4dbaef
2021-04-27Added setBufferCrop to setGeometrychaviw
The crop being sent to SF is in layer space where the setGeometry API is getting buffer space crop. This breaks the API behavior so call setBufferCrop instead of setCrop Test: ASurfaceControlTest Fixes: 186266903 Change-Id: I8f2567aa41b9525c3c3dc08855d14d8a9b11c7e2
2021-04-27Merge "AImageDecoder: only support animation for F16 and 8888 (impl)" into ↵Leon Scroggins
sc-dev
2021-04-27Merge "Replace llndk_library with llndk clause in cc_library" am: 9e9d7bd0bc ↵Colin Cross
am: f9abc183b4 am: 5bc3c6ad47 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1684529 Change-Id: I78a0a42bdcec3338ec8f204c1a6a08158529995f
2021-04-26AImageDecoder: only support animation for F16 and 8888 (impl)Leon Scroggins III
Bug: 180594747 Test: I51dedd94aa8ff5d6846cada96861ffca30d509d7 See I03818703dc79942be4e574db31c6e2927ab571ed Change-Id: Ibce55e4af38713d2e40fcb8846d9d7a939367fd6
2021-04-23Replace llndk_library with llndk clause in cc_libraryColin Cross
Remove the vestigial llndk_library and replace it with properties in the llndk clause of the implementation cc_library. Bug: 170784825 Test: m checkbuild Test: compare out/soong/build.ninja Change-Id: I960d7592fc71482e547f3617d0e55503c36cb63a
2021-04-23bpfmt native/android/Android.bpColin Cross
Fix formatting errors in with bpfmt -w native/android/Android.bp. Test: builds Change-Id: I444579e5672b3bc421f7e73f27bb0d12d92a9a03 Merged-In: I444579e5672b3bc421f7e73f27bb0d12d92a9a03
2021-04-23Merge "bpfmt native/android/Android.bp" into sc-devTreeHugger Robot
2021-04-23bpfmt native/android/Android.bpColin Cross
Fix formatting errors in with bpfmt -w native/android/Android.bp. Bug: 170784825 Test: builds Change-Id: I444579e5672b3bc421f7e73f27bb0d12d92a9a03
2021-04-21Introduce ASurfaceTransaction_setOnCommit apiVishnu Nair
Introduce a new callback for SurfaceControl transactions that fire after we commit a transaction in SurfaceFlinger. This will help some clients pace when they should apply the next transaction so it get applied on the next vsync. If they wait for the existing transaction complete callback, there may not be enough time between when the client applies the transaction and surface flinger waking up and apply it on the new vsync. This would mean the update would arrive a frame late. Bug: 185843251 Test: atest ASurfaceControlTest Change-Id: If0d5d01a1d5c2029eb81667356e666d7297376d4
2021-04-20Merge "Updated native SurfaceControl APIs to reflect their behavior." into ↵Chavi Weingarten
sc-dev
2021-04-15Update native font API to read updated font files.Seigo Nonaka
Bug: 184974821 Test: atest NativeSystemFontTest Change-Id: Ia7fdf6155e07445d7f16edb88fd2a7293e63080c
2021-04-14Updated native SurfaceControl APIs to reflect their behavior.chaviw
Updated setPosition, setCrop, setBufferTransform, and added setScale to native SurfaceControl API. The new functions should be pass through calls to SurfaceComposerClient that sends it to SurfaceFlinger. Test: ASurfaceControlTest Bug: 170765639 Change-Id: I214c5ae998d8f896200f3010cf2de6754d1e8510
2021-04-12Merge "Revert^2 "Remove setFrame from surface_control setGeometry"" into sc-devChavi Weingarten
2021-04-09Revert^2 "Remove setFrame from surface_control setGeometry"Chavi Weingarten
98aa7d4c88834987d5102f0137d206e921583ace Change-Id: I9172fac77048f548e1adacdc0041dc52a25eac0d
2021-04-09Merge "Revert "Remove setFrame from surface_control setGeometry"" into sc-devOrion Hodson
2021-04-08reflect libbinder/am splitSteven Moreland
(manual cherry-pick from AOSP to fix merge conflict) Minimizing cost for using libbinder. Bug: 183654927 Test: boot Change-Id: I1a4785a58afcaf2d312ef52a07f41fe3dd3a8fa6
2021-04-08Merge "reflect libbinder/am split"Steven Moreland
2021-04-08Revert "Remove setFrame from surface_control setGeometry"Orion Hodson
Revert "Remove setFrame from BufferStateLayer" Revert "Update tests to reflect the new behavior for setGeometry" Revert submission 13843937-sc_remove_set_frame Reason for revert: Candidate CL for b/184807094 Reverted Changes: Iffbd955a3:Remove setFrame I27f17bc61:Update tests to reflect the new behavior for setGe... I5720276c1:Remove setFrame from surface_control setGeometry I32ee0e3e4:Remove setFrame from BufferStateLayer Bug: 184807094 Change-Id: I7f6f0d7799e6e2858af2ce2e8acb5c67db8714f8
2021-04-07Merge "Remove setFrame from surface_control setGeometry" into sc-devChavi Weingarten
2021-04-06Merge "Add more OWNERS to more places" am: 0901b326ad am: 5aa92f6e27 am: ↵Treehugger Robot
95a41d1fbb Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1661241 Change-Id: I79bf2deddd07930f51cc2222c90826234b540979
2021-04-05reflect libbinder/am splitSteven Moreland
Minimizing cost for using libbinder. Bug: 183654927 Test: boot Change-Id: I1a4785a58afcaf2d312ef52a07f41fe3dd3a8fa6
2021-04-02Merge "ASurfaceTransaction: Add setEnableBackpressure" into sc-devRob Carr
2021-04-02Add more OWNERS to more placesJohn Reck
Test: this Change-Id: Icd6e7fcd723ef2fdf0139344f2499c4ef5942a3c
2021-04-02Merge "Add OWNERS for some native files" am: 20f4b99166 am: a1f2daa160 am: ↵Treehugger Robot
6a1ac7167f Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1653187 Change-Id: I15960b12c734488f071bf460ba8e0da12464c061
2021-04-01ASurfaceTransaction: Add setEnableBackpressureRobert Carr
Expose the backpressure flag to NDK. See comment in header file for extensive discussion. Bug: 177458703 Test: Need new CTS Change-Id: I97cdaef5d499f57a270972f001517b8a520aa2fe
2021-03-31Merge "setFrameRate: Make shouldBeSeamless an enum" into sc-devMarin Shalamanov
2021-03-30Remove setFrame from surface_control setGeometrychaviw
Use setMatrix and setPosition instead Test: SurfaceFlinger_tests Test: ASurfaceControlTest Bug: 170765639 Change-Id: I5720276c12f085d564c19849c356ab304326979e
2021-03-24setFrameRate: Make shouldBeSeamless an enumMarin Shalamanov
Change the shouldBeSeamless parameter to an enum in order to make the API easier to understand. This changes - SurfaceControl.setFrameRate - Surface.setFrameRate - ANativeWindow_setFrameRateWithChangeStrategy - ASurfaceTransaction_setFrameRateWithChangeStrategy Bug: 179116474 Test: atest SetFrameRateTest Change-Id: I55265399238e2c95fbb90fd33a4c2513d1fc5cec
2021-03-24Add OWNERS for some native fileschaviw
Test: N/A Change-Id: I1cf995813f9ea11b31d13ac52132315f62f086ec
2021-03-24Merge "Split ASurfaceTransaction_setGeometry api" into sc-devVasiliy Telezhnikov
2021-03-23Add NDK API for getprocdns,setprocdnsRemi NGUYEN VAN
The API allows callers to control the default network that is used for DNS hostname resolution. Test: atest CtsNetTestCases Tests in change I00143cafcd3eb1d71e8d5c7ea9c839a99dc6f4ce Bug: 171540887 Change-Id: I42f0d9b17b3058f6e10fd2e651278b290f26667f
2021-03-23Add NDK API for getprocnetworkRemi NGUYEN VAN
The API is the getter couterpart for setprocnetwork. Use it in NetworkUtils so that the NDK API can be the source of truth for the process network. Bug: 171540887 Test: atest CtsNetTestCases Tests in change I311b58585033c2ca50ce5477ea9cd94b6f127507 Change-Id: Ie8f68cf1fa57deddb63324c1abf3d6fd5b0ef500
2021-03-17Split ASurfaceTransaction_setGeometry apiVasiliy Telezhnikov
This CL adds three new methods: setSourceRect, setPosition and setTransform. Test: ASurfaceControlTest Bug: 173671170 Change-Id: I00f05a45bfa2b6e53735d95977d32bdecbce3df1
2021-02-23[LSC] Add LOCAL_LICENSE_KINDS to frameworks/baseBob Badour
Added SPDX-license-identifier-Apache-2.0 to: apct-tests/perftests/contentcapture/Android.bp apct-tests/perftests/inputmethod/Android.bp apex/appsearch/Android.bp apex/appsearch/framework/Android.bp apex/appsearch/service/Android.bp apex/appsearch/testing/Android.bp apex/jobscheduler/service/jni/Android.bp apex/media/service/Android.bp cmds/abx/Android.bp cmds/uinput/Android.bp cmds/uinput/jni/Android.bp core/tests/GameManagerTests/Android.bp core/tests/batterystatstests/BatteryStatsLoadTests/Android.bp core/tests/batterystatstests/BatteryStatsViewer/Android.bp core/tests/devicestatetests/Android.bp libs/WindowManager/Shell/tests/flicker/Android.bp libs/WindowManager/Shell/tests/flicker/test-apps/flickerapp/Android.bp libs/androidfw/fuzz/cursorwindow_fuzzer/Android.bp native/android/tests/activitymanager/UidImportanceHelperApps/Android.bp native/android/tests/activitymanager/nativeTests/Android.bp packages/SettingsLib/BannerMessagePreference/Android.bp packages/SettingsLib/CollapsingToolbarBaseActivity/Android.bp packages/SettingsLib/EmergencyNumber/Android.bp packages/SettingsLib/FooterPreference/Android.bp packages/SettingsLib/MainSwitchPreference/Android.bp packages/SettingsLib/TopIntroPreference/Android.bp packages/SettingsLib/UsageProgressBarPreference/Android.bp packages/overlays/AccentColorAmethystOverlay/Android.bp packages/overlays/AccentColorAquamarineOverlay/Android.bp packages/overlays/AccentColorBlackOverlay/Android.bp packages/overlays/AccentColorCarbonOverlay/Android.bp packages/overlays/AccentColorCinnamonOverlay/Android.bp packages/overlays/AccentColorGreenOverlay/Android.bp packages/overlays/AccentColorOceanOverlay/Android.bp packages/overlays/AccentColorOrchidOverlay/Android.bp packages/overlays/AccentColorPaletteOverlay/Android.bp packages/overlays/AccentColorPurpleOverlay/Android.bp packages/overlays/AccentColorSandOverlay/Android.bp packages/overlays/AccentColorSpaceOverlay/Android.bp packages/overlays/AccentColorTangerineOverlay/Android.bp packages/overlays/DisplayCutoutEmulationCornerOverlay/Android.bp packages/overlays/DisplayCutoutEmulationDoubleOverlay/Android.bp packages/overlays/DisplayCutoutEmulationHoleOverlay/Android.bp packages/overlays/DisplayCutoutEmulationNarrowOverlay/Android.bp packages/overlays/DisplayCutoutEmulationTallOverlay/Android.bp packages/overlays/DisplayCutoutEmulationWaterfallOverlay/Android.bp packages/overlays/DisplayCutoutEmulationWideOverlay/Android.bp packages/overlays/FontNotoSerifSourceOverlay/Android.bp packages/overlays/IconPackCircularAndroidOverlay/Android.bp packages/overlays/IconPackCircularLauncherOverlay/Android.bp packages/overlays/IconPackCircularSettingsOverlay/Android.bp packages/overlays/IconPackCircularSystemUIOverlay/Android.bp packages/overlays/IconPackCircularThemePickerOverlay/Android.bp packages/overlays/IconPackFilledAndroidOverlay/Android.bp packages/overlays/IconPackFilledLauncherOverlay/Android.bp packages/overlays/IconPackFilledSettingsOverlay/Android.bp packages/overlays/IconPackFilledSystemUIOverlay/Android.bp packages/overlays/IconPackFilledThemePickerOverlay/Android.bp packages/overlays/IconPackKaiAndroidOverlay/Android.bp packages/overlays/IconPackKaiLauncherOverlay/Android.bp packages/overlays/IconPackKaiSettingsOverlay/Android.bp packages/overlays/IconPackKaiSystemUIOverlay/Android.bp packages/overlays/IconPackKaiThemePickerOverlay/Android.bp packages/overlays/IconPackRoundedAndroidOverlay/Android.bp packages/overlays/IconPackRoundedLauncherOverlay/Android.bp packages/overlays/IconPackRoundedSettingsOverlay/Android.bp packages/overlays/IconPackRoundedSystemUIOverlay/Android.bp packages/overlays/IconPackRoundedThemePickerOverlay/Android.bp packages/overlays/IconPackSamAndroidOverlay/Android.bp packages/overlays/IconPackSamLauncherOverlay/Android.bp packages/overlays/IconPackSamSettingsOverlay/Android.bp packages/overlays/IconPackSamSystemUIOverlay/Android.bp packages/overlays/IconPackSamThemePickerOverlay/Android.bp packages/overlays/IconPackVictorAndroidOverlay/Android.bp packages/overlays/IconPackVictorLauncherOverlay/Android.bp packages/overlays/IconPackVictorSettingsOverlay/Android.bp packages/overlays/IconPackVictorSystemUIOverlay/Android.bp packages/overlays/IconPackVictorThemePickerOverlay/Android.bp packages/overlays/IconShapeHeartOverlay/Android.bp packages/overlays/IconShapePebbleOverlay/Android.bp packages/overlays/IconShapeRoundedRectOverlay/Android.bp packages/overlays/IconShapeSquareOverlay/Android.bp packages/overlays/IconShapeSquircleOverlay/Android.bp packages/overlays/IconShapeTaperedRectOverlay/Android.bp packages/overlays/IconShapeTeardropOverlay/Android.bp packages/overlays/IconShapeVesselOverlay/Android.bp packages/overlays/NavigationBarMode2ButtonOverlay/Android.bp packages/overlays/NavigationBarMode3ButtonOverlay/Android.bp packages/overlays/NavigationBarModeGesturalOverlay/Android.bp packages/overlays/NavigationBarModeGesturalOverlayExtraWideBack/Android.bp packages/overlays/NavigationBarModeGesturalOverlayNarrowBack/Android.bp packages/overlays/NavigationBarModeGesturalOverlayWideBack/Android.bp packages/overlays/OneHandedModeGesturalOverlay/Android.bp packages/services/CameraExtensionsProxy/Android.bp services/core/java/com/android/server/speech/Android.bp services/musicrecognition/Android.bp services/searchui/Android.bp services/smartspace/Android.bp services/tests/PackageManagerServiceTests/host/libs/IntentVerifyUtils/Android.bp services/tests/PackageManagerServiceTests/host/test-apps/DeviceSide/Android.bp services/tests/PackageManagerServiceTests/host/test-apps/IntentVerifier/Android.bp services/tests/PackageManagerServiceTests/host/test-apps/IntentVerifierTarget/Android.bp services/tests/PackageManagerServiceTests/host/test-apps/UsesStaticLibrary/Android.bp services/tests/PackageManagerServiceTests/unit/Android.bp services/tests/inprocesstests/Android.bp services/tests/mockingservicestests/jni/Android.bp services/tests/servicestests/test-apps/PackageParsingTestManifests/Android.bp services/texttospeech/Android.bp services/translation/Android.bp tests/BatteryStatsPerfTest/Android.bp tests/FlickerTests/test-apps/Android.bp tests/Input/Android.bp tests/SilkFX/Android.bp tests/SurfaceViewBufferTests/Android.bp tests/UpdatableSystemFontTest/Android.bp tests/UpdatableSystemFontTest/testdata/Android.bp tests/benchmarks/internal/Android.bp tools/powerstats/Android.bp tools/processors/intdef_mappings/Android.bp tools/xmlpersistence/Android.bp Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: I1b8d155a26a1a589a38abedea5f7f366e00346c6
2021-02-22Merge "Introduce DynamicDisplayInfo" into sc-devMarin Shalamanov