Skip to content
Snippets Groups Projects
  1. Oct 31, 2023
  2. Oct 21, 2023
  3. Oct 14, 2023
  4. Oct 13, 2023
  5. Oct 12, 2023
    • daniml3's avatar
      CompositionEngine: Request device composition for the Udfps touched layer · 7d361c7e
      daniml3 authored and Simão Gomes Viana's avatar Simão Gomes Viana committed
      
      The FOD layers should be always composed by the device to set the
      custom zpos bits to the kernel. By default all layers are set to
      device composition and the proprietary libsdmextension.so moves
      some to client composition. Unfortunately that also affects the
      Udfps touched layer. After this commit the layer below the Udfps
      touched layer is forced to be client composition. For unknown
      reasons libsdmextension will not change the Udfps touched layer
      to client composition anymore.
      
      tests:
      - Run 'adb shell dumpsys SurfaceFlinger' and ensure that the Udfps
        touched layer is composed by the device
      - Ensure that the Udfps touched layer correctly sets the zpos bits
        on the kernel while / after using WFD
      
      Signed-off-by: default avatardaniml3 <danimoral1001@gmail.com>
      Signed-off-by: default avatarArian <arian.kulmer@web.de>
      Change-Id: I8aeb98d18557ad4e971eaba74700ceb3058273ab
      7d361c7e
    • Pierre-Hugues Husson's avatar
      surfaceflinger: Add support for Udfps extension lib · 575dfa75
      Pierre-Hugues Husson authored and Simão Gomes Viana's avatar Simão Gomes Viana committed
      
       * Supports changed z Udfps order
       * Supports changed Udfps usage bits
      
      TheScarastic: Adapt to extension lib and support 12 BiometricPrompt
      ArianK16a: Adapt layer name to UdfpsControllerOverlay for Android 13
          and only compare the prefix. Drop the BufferQueueLayer change
          because it seems unnecessary.
      
      Co-authored-by: default avatarTheScarastic <warabhishek@gmail.com>
      Change-Id: Id95aa73e06b4223a6b4f05c69fa2fc494f9a97b1
      575dfa75
  6. Aug 30, 2023
    • Patrick Williams's avatar
      Improve updateInputFlinger performance · 56cd9b79
      Patrick Williams authored
      This change improves the performance of the WindowInfosListenerInvoker work done on SurfaceFlinger's background executor thread. The primary optimization made is not sending a WindowInfosReportedListener with every call to WindowInfosListener.onWindowInfosChanged. Instead, we send a new interface, WindowInfosPublisher, and a unique listener id to listeners when they're added.  Listeners call WindowInfosPublisher.ackWindowInfosReceived with their id after processing each update.
      
      From traces taken during development, the new code is a major improvement, taking about 15% of the time spent previously on SurfaceFlinger's background thread for sending window infos. Performance with this change seems roughly in line with the performance in T.
      
      Bug: 290377931
      Test: atest WindowInfosListenerTest
      Test: atest WindowInfosListenerInvokerTest
      Test: manually killing system server and checking valid state on restart
      (cherry picked from commit acd2258a)
      (cherry picked from commit e8a7ab25)
      (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:82f3463d449eb13e28c5dbffeee16e10721c71d2)
      Merged-In: Ib39ba935727df0bc1ab4030bcfe8301de7e64805
      Change-Id: Ib39ba935727df0bc1ab4030bcfe8301de7e64805
      56cd9b79
  7. Aug 22, 2023
    • sergiuferentz's avatar
      Fix for heap-use-after-free in GPUService.cpp · e562203a
      sergiuferentz authored
      This adds a unit test and fix for the bug reported by libfuzzer.
      Changes made:
       * Expose GPUService as testable code.
       * Update main_gpuservice.cpp to use the new GpuService now located at
         gpuservice/GpuService.h
       * Make initializer threads members of GpuService
       * Join the threads in destructor to prevent heap-use-after-free.
       * Add unit test that waits 3 seconds after deallocation to ensure no
         wrong access is made.
      
      Bug: 282919145
      Test: Added unit test and ran on device with ASAN
      (cherry picked from commit 3c00cbc0)
      (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:a8186037a730699b53e49de7241280c7532e5fc4)
      Merged-In: I4d1d2d4658b575bf2c8f425f91f68f03114ad029
      Change-Id: I4d1d2d4658b575bf2c8f425f91f68f03114ad029
      e562203a
  8. Aug 05, 2023
    • Daniel Norman's avatar
      Lower severity for invalid accessibility hover event stream to ERROR. · 5fe59da3
      Daniel Norman authored
      LOG(FATAL) crashes the device, which is very severe for the user.
      
      The accessibility hover event stream has consistency issues that we
      are actively fixing, but these fixes have not yet had time to soak.
      Instead of cherrypicking the fix, instead we can demote the severity
      of the log so that errors do not crash the device.
      
      Bug: 286037469
      Test: atest InputDispatcherTest#InvalidA11yHoverStreamDoesNotCrash
      Test: Use talkback, repeatedly enter touch exploration while also
            tapping with another finger. Eventually observe the failure
            message which is now an ERROR instead of crashing the device
            with a FATAL.
      (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:2f99cdb9150461c6b77c29b31cbf5792a9303c95)
      Merged-In: Iceea086345691cdad8ca5e092629de094d666de1
      Change-Id: Iceea086345691cdad8ca5e092629de094d666de1
      5fe59da3
  9. Jun 24, 2023
  10. Jun 19, 2023
    • Harry Cutts's avatar
      TouchInputMapper: don't check touchpad touches by screen bounds · 1db43995
      Harry Cutts authored
      Uncaptured touchpads (with DeviceMode::POINTER) still on the old stack
      (i.e. the Sony DualShock 4 touchpad) were having touches ignored if they
      started at coordinates that would be outside of the bounds of the
      touchscreen. Since touchpads use relative motions and don't directly
      relate raw touch locations to screen locations, this was incorrect, and
      caused touches to be ignored with certain screen/touchpad dimension and
      orientation combinations.
      
      Bug: 280396539
      Test: connect Sony DualShock 4 by USB, rotate screen to portrait, check
            touches starting in all areas of the pad are turned into pointer
            movements
      Test: atest inputflinger_tests
      Change-Id: I9a92ba79246ee8fc25418c2e248ae2c3839a0d58
      1db43995
  11. Jun 15, 2023
    • John Reck's avatar
      Adjust screenshot behavior of HDR content · 5b02fc47
      John Reck authored
      Cap the max amount of HDR headroom beyond which the
      layer is clipped. This avoids over-dimming the SDR content
      range in the resulting SDR screenshot
      
      Test: screenshot of silkfx
      Bug: 286942637
      Change-Id: I67df32d9c192da18df516972ed92e9bd64063186
      5b02fc47
  12. Jun 12, 2023
  13. May 31, 2023
    • Matt Buckley's avatar
      Reduce number of binders from SurfaceFlinger for ADPF · 676e4390
      Matt Buckley authored
      Currently, SF is using the wrong vsync value when calculating the
      target for ADPF, causing it to send a binder every frame instead of
      every vsync change. This patch fixes that to reduce the binder
      frequency from SF, and also adds a debug option to disable reportActual
      to reduce the amount of binders even more in certain cases.
      
      Bug: 284357218
      Test: manual
      Change-Id: I8435b170016c5af8219d8ed8cc9ed65a0a2cb0e7
      676e4390
  14. May 25, 2023
  15. May 24, 2023
    • Patrick Williams's avatar
      Skip window infos updates if no listeners · d1d846c5
      Patrick Williams authored
      This change fixes a bug where WindowInfosListenerInvoker's active
      message count is incremented for messages when there are no listeners.
      In this case, onWindowInfosReported is never called, leading to
      out-of-sync window infos once listeners are added back. This scenario
      may occur if system server dies.
      
      Bug: 279792237
      Test: WindowInfosListenerInvokerTest, manual tested by killing system server
      Merged-In: If62f7cc56b48570f633e8e640006f020b053ea6f
      Change-Id: I521dad46a763d0380807ba20b9a4ec9dcecf6bfc
      d1d846c5
    • Siarhei Vishniakou's avatar
      Add a unit test for TouchpadInputMapper · 979f2d8a
      Siarhei Vishniakou authored
      This test will provide RawEvent's to TouchpadInputMapper and will look
      at the returned events.
      
      The main purpose of this CL is to document the existing behaviour of
      CursorInputMapper and TouchpadInputMapper. The tests highlights that
      today, dispatcher must handle the case where the touch starts without
      HOVER_EXIT. That means that the dispatcher logs of "conflicting pointer
      actions" can be mostly ignored.
      
      The goal was to make the tests for the two mappers as similar to each
      other as possible.
      
      A slightly different testing infra is introduced here compared to the
      one used in InputReader_test.
      
      Changes:
      * Use mocks for interfaces instead of constructed objects
      This helps figure out which parts are important to mock for a specific
      test vs which ones are not. When a function is called with a parameters
      that the mocks aren't expecting, a warning is printed during test run.
      This helps identify the complete state needed in order for the test to
      execute.
      
      * No longer require InstrumentedInputReader
      
      * No longer require a listener. We only check the events that are coming
        from the 'process' call, which is what the interface for the mapper
        does.
      
      Limitations:
      * Still require an InputDevice object to be constructed in order to test
        InputMappers. Ideally, a mapper would only depend on the EventHub
        state (to read the current value of keys / axes after a reset).
      
      Bug: 263319225
      Test: m inputflinger_tests && $ANDROID_HOST_OUT/nativetest64/inputflinger_tests/inputflinger_tests --gtest_filter="*HoverAndLeftButtonPress*"
      Change-Id: I7de0dee7abcf6bcb9d3283e29d9a85de2f331a44
      979f2d8a
    • chaviw's avatar
      Set windowInfo.displayId to be the layerStack · 65c005a6
      chaviw authored
      Instead of using the displayId sent from WMS, it's better to use the
      layerStack since it more accurately represents where the layer is
      presented. Previously, the only case where WMS needed to set a displayId
      different from layerStack was when using portal displays, which is no
      longer supported.
      
      This also fixes the case with cloned layers. If a cloned layer was
      placed on a different display than the main layer, the WindowInfo for
      the clone would end up having the same display as the main window since
      the properties were directly copied over. With this fix, the cloned
      layer's WindowInfo will get the correct layerStack that represents where
      it's actually rendered.
      
      Test: MediaProjection capture with mirror
      Bug: 195280234
      Bug: 194480991
      Change-Id: Id1794798a543260c9868ccdc1be3cdb574b73dd5
      Merged-In: Id1794798a543260c9868ccdc1be3cdb574b73dd5
      (cherry picked from commit 6eada62e)
      65c005a6
    • Arpit Singh's avatar
      InputMapper refactor: Revert "fix touch issue on portrait reference" · 2aae677f
      Arpit Singh authored
      This reverts commit 0987fd88.
      
      Test: m checkinput && atest libinput_tests inputflinger_tests
      Bug: 256009910
      Change-Id: I452b8292a5a797f21707f56ee01765650db99b94
      2aae677f
    • Arpit Singh's avatar
      InputMapper refactor: Configure empty InputDevice · 7f4dd512
      Arpit Singh authored
      Configure the Device prior to populating mappers for mappers to
      receive correct property map
      
      Test: m checkinput && atest libinput_tests inputflinger_tests
      Bug: 256009910
      
      Change-Id: I2a348029afa6c566506f1d79b655173bb8e7a8af
      7f4dd512
  16. May 23, 2023
  17. May 22, 2023
    • Vishnu Nair's avatar
      [sf] Update snapshots after screenshots · fa9e2ef3
      Vishnu Nair authored
      Screenshots can be taken for a partial hierarchy and may require
      some of the layers to be temporarily reparented and their geometry
      to be updated. Sceenshots use a copy of the layer snapshots and another
      instance of the composition engine to render the contents to a
      buffer.
      
      There was an issue where the snapshots were updated before they were
      copied and if the screenshot was taken during a period where there
      were no visible region changes (and no reason to rebuild the snapshots)
      we would pass invalid snapshot data when compositing to the display.
      
      With legacy frontend, its harder to split the screenshot path and the
      display composition path, so as a fix, update the snapshots after
      screenshots are taken.
      
      Bug: 282884552
      Test: instrumented load to verify snapshots are updated correctly
      Test: repro steps in bug
      
      Change-Id: Ie778b02b57c5b1ddf0f09afe82675e04c5535ee5
      fa9e2ef3
  18. May 20, 2023
    • Alec Mouri's avatar
      Fix SurfaceFlinger_test on WCG devices · c44a1ffe
      Alec Mouri authored
      Some tests force sRGB screenshots for consistent test output. Make sure
      that output colorspace is still respected.
      
      Bug: 283305205
      Test: SurfaceFlinger_test
      Change-Id: I42ffe36022fa65568bcd75df28a33389340a7d7f
      c44a1ffe
  19. May 19, 2023
    • Dominik Laskowski's avatar
      SF: Fix ADPF regression due to wrong present fence · 61dfca4b
      Dominik Laskowski authored
      Partially revert Ib114ffc1866aa32e6d493e06dcf5a27652d19a39.
      
      PowerAdvisor needs the present fence of the previous frame, as the query
      happens after presenting the current frame so should not be adjusted for
      targeting 2 VSYNCs ahead.
      
      Fixes: 283189729
      Test: Perfetto
      Change-Id: Ifbd6aa961bc92fe1d2f4de1247413fcd49330645
      61dfca4b
    • Patrick Williams's avatar
      Update BackgroundExecutor to use LocklessQueue · 13310b86
      Patrick Williams authored
      This change allows BackgroundExecutor to receive callbacks from multiple
      producers.
      
      Bug: 283133164
      Test: BackgroundExecutorTest
      Change-Id: I63f3266184a2ae90b15d7d1b7d9502847e268763
      13310b86
  20. May 18, 2023
Loading