Skip to content
Snippets Groups Projects
  1. Feb 09, 2024
    • Christopher Ferris's avatar
      Use a file descriptor in decodeFile. · 39d091bc
      Christopher Ferris authored
      When trying to decode a file, using a stream can lead to a
      pathological case where the entire file is read into memory.
      If a large file is encountered, the entire file will be read
      into memory and result in different types of crashes.
      
      So instead of using a stream, use a file descriptor to prevent
      this case.
      
      Bug: 309868782
      
      Test: Put a large file on the system. Start the files app and
      Test: observe no crashes.
      Change-Id: I59cbab80af68eb3da4b46df81a5c26bf041778d8
      39d091bc
    • Ryan Tao's avatar
      Fix "the the" typo in one file, this is for completing the AEP Cider G exercise · 521488ac
      Ryan Tao authored
      Change-Id: I121d8cee49829f120440e9628aa319a5c664aee3
      521488ac
  2. Nov 20, 2023
    • Paul Duffin's avatar
      Add missing @NonNull to BaseRecordingCanvas · 97488d72
      Paul Duffin authored
      Some improvements in Metalava's revealed an issue with missing
      `@NonNull` annotations on 2 parameters of the `BaseRecordingCanvas`'s
      `drawDoubleRoundRect()` method. They are present on the overridden
      method but not on the overriding method. This change adds the
      missing annotations.
      
      Bug: 307926200
      Test: m out/soong/.intermediates/frameworks/base/api/api-stubs-docs-non-updatable/android_common/metalava/api-stubs-docs-non-updatable-stubs.srcjar
      Change-Id: I090c3f749e6ac2321d59189f5ec1a4f27179dd82
      97488d72
  3. Nov 07, 2023
  4. Oct 13, 2023
    • John Stiles's avatar
      Avoid accidental shadowing in AGSL code. · ed5fe204
      John Stiles authored
      We were shadowing the `turbulence` function with a variable of the
      same name. This isn't illegal, but it is not a good idea to do this.
      Renamed the variable to `turb`.
      
      Change-Id: Ic2046d2ffe507f03e53a947a884114dd660b143e
      ed5fe204
  5. Jul 25, 2023
    • Seigo Nonaka's avatar
      Deprecate fonts.xml and add hidden font_fallback.xml · e3510a82
      Seigo Nonaka authored
      Not to break the apps that reads fonts.xml and add new features to
      the system font customization at the same time, this CL introduces
      new hidden XML file font_fallback.xml which is currently a copy of
      the fonts.xml.
      
      The fonts.xml still exists but may not contain the latest system font
      settings due to compatibility problems. Application should use the
      public API for accessing system installed fonts which is available
      from API29.
      
      Bug: 281769620
      Test: atest CtsGraphicsTestCases
      Test: atest CtsTextTestCases
      Change-Id: I556b5fffb0c78f0c6150b472fd240b9a546de93f
      Merged-In: I556b5fffb0c78f0c6150b472fd240b9a546de93f
      e3510a82
  6. Jun 29, 2023
    • Allen Su's avatar
      Remove TextWrapping automation · efea66e3
      Allen Su authored
      Revert ag/17152649
      Enabling text wrapping by default will be done in material theme.
      The automation here can be removed.
      
      Bug: 286957995
      Test: atest StaticLayoutTest
      Change-Id: I35bdfee6cf69b1b519b5f3d06d3cd6d41c324684
      Merged-In: I35bdfee6cf69b1b519b5f3d06d3cd6d41c324684
      efea66e3
  7. Jun 08, 2023
    • John Reck's avatar
      Transform & preserve gainmaps · b1c20eea
      John Reck authored
      Have Bitmap.createBitmap(sourceBitmap, ...) preserve any gainmaps if
      present, transforming the gainmaps in the same way.
      
      This addresses 2 common usages:
      
      1) Rotating bitmaps to handle EXIF orientations
      2) Bitmap.createScaledBitmap() to do "static" scaling
      
      Bug: 286131154
      Test: SilkFX GainmapTransformsTest
      Change-Id: I5a62dccbb2c70bc38cca581b161eef792c8b2a78
      b1c20eea
  8. May 22, 2023
    • Kwangkyu Park's avatar
      Camera: Address an issue that the invalid memory is accessed · 06aaf05f
      Kwangkyu Park authored
      If the ImagePlanes is initiailized the HardwareBuffer and is close()'ed
      by finalizer then the invalid memory access to the GraphicBufferWrapper
      and GraphicBuffer could be happen.
      
      This patch addressed the issue by properly clearing fields after
      being destoyed.
      
      Bug: 283038375
      Test: Test extensions proxy service with advanced extender
      implementation while maintaining a reference counter so that the
      ExtensionImage is finalized without invoking close.
      
      Change-Id: Iab49da708daf0099d029cda6873cb2e811377fbc
      06aaf05f
  9. May 18, 2023
    • John Reck's avatar
      Fix RippleDrawable alpha · f0c528ab
      John Reck authored
      Alpha was being double-applied by being
      both handled in the shader and applied
      by the Paint. So change the Paint to not
      apply the alpha since the shader does it.
      
      Fixes: 272375156
      Test: looked at ripples in dark & light theme, verified no visual change
      Change-Id: I6ca4d32a7a5735ce8ec418014d0318c29dd3c8bf
      f0c528ab
    • Jernej Virag's avatar
      Allow triming of font caches through WindowManager · 44db040f
      Jernej Virag authored
      This allows triming of Skia font caches when an app created a lot of
      transient font allocations and it knows that it won't need it anymore.
      This is primarily meant for persistent processes like SystemUI to avoid
      font caches taking up memory after they're not needed anymore.
      
      Bug: 275486055
      Test: Tested as part of a follow-up commit, ran
           LockscreenWithSwipeMicrobenchmark which showed a noticable
           reduction of RSS+anon memory use after unlock.
      Change-Id: I6d80003d8baab35cb2ca858d4e4d4696b32f3adf
      44db040f
  10. May 09, 2023
    • Ady Abraham's avatar
      hwui: send TextureView hint to SF · cab4afeb
      Ady Abraham authored
      So that SF could use this hint when choosing the refresh rate.
      SF would only try to heuristically calculate the frame rate of a layer
      when TextureView is updating. This fixes a bug where SF tries to
      heuristically calculate the frame rate for UI animations but fails
      due to long frames.
      
      Bug: 280249265
      Test: Playing a video on Facebook and observe refresh rate
      Test: go/cb-pcmark
      
      Change-Id: I0d54d62b97ff48583fbe3cc0da188fe85810fd5e
      cab4afeb
    • Jernej Virag's avatar
      Add ability to decode only image information with ImageDecoder · 65327c05
      Jernej Virag authored
      This creates a @hide API which only retrieves ImageInfo object without
      continuing the decode of full image. It mirrors
      BitmapOptions.inJustDecodeBounds behaviour and allows checking
      dimensions and color space configuration of images without proceeding to
      full decode (if able).
      
      Bug: 280572656
      Test: atest android.graphics.ImageDecoderTest
             android.graphics.cts.ImageDecoderTest
      Change-Id: I704ec6c41d76f655222da7ee322e3b0e4954533d
      65327c05
  11. May 08, 2023
  12. May 01, 2023
    • Nader Jawad's avatar
      Improve MeshSpecification docs · 4423b52a
      Nader Jawad authored
      Added more docs and code snippets
      to varying and attribute classes within
      MeshSpecification.
      
      Fixes: 279785743
      Test: re-ran CTS tests
      Change-Id: Ic370fb1547c7b2f83a221d614c35ffdd9f4e0b8b
      4423b52a
  13. Apr 27, 2023
    • Xiao Huang's avatar
      Use REGULAR_CODECS instead of ALL_CODECS · 5f8b51b8
      Xiao Huang authored
      Checking if P010 or HEVC is supported does not need ALL_CODECS,
      which includes codecs supporting special features like secure or
      tunnel. REGULAR_CODECS is enough to use here.
      
      Bug: 278664575
      Test: atest BitmapFactoryTest ImageDecoderTest
      Change-Id: Id7f27ec204d85e1c177bc3101b4be81f21affeae
      5f8b51b8
    • Xiao Huang's avatar
      Determine HEIF support by checking HEVC · 1fcf501b
      Xiao Huang authored
      ImageDecoder.isMimeTypeSupported always returns true for
      HEIF and HEIC, however, according to CDD, this support is
      optional, and they are only supported when the HEVC is
      supported by the device.
      
      This change is to fix inconsistency with CDD 5.1.5, and won't
      impact handhelds or TV, as HEVC is a must for them. For auto
      and watch, HEVC is not supported at all. So this change is safe.
      
      Bug: 278664575
      Test: atest BitmapFactoryTest ImageDecoderTest
      
      Change-Id: Iecceb6f2a498fddc045ccce331f6fcef5debd2f5
      1fcf501b
  14. Apr 21, 2023
    • Xiao Huang's avatar
      Fallback to RGBA_8888 when P010 is not supported · fff1a293
      Xiao Huang authored
      It's possible that a TV does not support P010, which means
      the TV is not able to decode 10-bit HEIF to RGBA_1010102.
      In this case, falling back to output RGBA_8888 is necessary.
      
      Bug: 276879147
      Test: atest BitmapFactory#testDecode10BitHEIF10BitBitmap
            atest ImageDecoderTest#testDecode10BitHeif
      Change-Id: I33f7f30cbee0080dc81764c73428dcac3c75ce88
      fff1a293
  15. Apr 18, 2023
  16. Apr 12, 2023
    • Chavi Weingarten's avatar
      Add explicit clearSyncTransaction instead of passing null · d29ecd2f
      Chavi Weingarten authored
      It's unclear what passing null to syncNextTransaction means so instead
      add an explicit clearSyncTransaction that is meant to remove a
      syncTransaction that was added via syncNextTransaction.
      
      Test: presubmit
      Bug: 272189296
      Change-Id: Id315e1e9c679837af5ea9eaf2f619856b718d7c8
      d29ecd2f
  17. Apr 11, 2023
  18. Apr 10, 2023
    • John Reck's avatar
      Native crash -> ISE · 69c66253
      John Reck authored
      Do some basic validation of the Bitmap given to
      BitmapShader to avoid a subsequent native crash
      in favor of a proper IllegalStateException
      
      Fixes: 274860420
      Test: BitmapShaderTest#testRecycledBitmapThrowsISE
      Change-Id: I9ee64df5fc34909e5c91e979b1d21a4f94ca5e57
      69c66253
  19. Apr 06, 2023
    • John Reck's avatar
      Null out gainmaps on inBitmap re-use · 9985065a
      John Reck authored
      Bug: 277230526
      Test: android.graphics.cts.GainmapTest#testDecodeGainmapBitmapFactoryReuse
      Change-Id: I437f2599f023d83bdd70f1bf123357318c79b4e3
      9985065a
  20. Mar 30, 2023
    • Nader Jawad's avatar
      Fix for HardwareBufferRenderer pre-rotation · 24617223
      Nader Jawad authored
      Updated transform matrix to match the implementation
      within VulkanSurface.cpp
      
      Updated getFrame logic to return the logical dimensions
      of a HardwareBuffer target instead of the width/height
      of a HardwareBuffer in case pre-rotation transforms
      are applied
      
      Fixes: 276362013
      Test: Updated HardwareBufferRendererTests
      
      Change-Id: I9877af52a81804facc8b89b65cce3433b96655dc
      24617223
  21. Mar 29, 2023
  22. Mar 28, 2023
  23. Mar 24, 2023
    • John Reck's avatar
      Revert "ImageDecoder: add "image/avif" to support list" · 2938f79b
      John Reck authored
      Revert submission 22114263-cherrypick-avif_cts-6vuisjq0md
      
      Reason for revert: b/275081444
      
      Reverted changes: /q/submissionid:22114263-cherrypick-avif_cts-6vuisjq0md
      
      Change-Id: I2cfedc608ae8803f811ae1d99b2f4e057ae3db81
      2938f79b
  24. Mar 21, 2023
  25. Mar 20, 2023
    • John Reck's avatar
      Update ColorSpace _HLG & _PQ to use 203 nit whitepoints · e4a3d635
      John Reck authored
      Also cleans up identifying PQ & HLG transfer functions
      using the same hack skia does of using negative G values
      as an enum
      
      Fixes: 272555335
      Test: mapped out the curves
      
      Change-Id: I2bd6cd0a234fdea701b85737a1378058f6c40a1b
      e4a3d635
  26. Mar 15, 2023
    • Valentin Iftime's avatar
      [DO NOT MERGE] Limit Icon Drawables to MAX_BITMAP_SIZE · 640966b4
      Valentin Iftime authored
        Fixes canvas drawing exceptions caused by unsuported image sizes.
        Prevent RemoteActions crashing SystemUi.
      
      Test: Add a RemoteAction for PiP with a very large icon (5k x 5k image)
      Test: atest IconTest
      
      Bug: 271544782
      Change-Id: Ifa36c2c721dd2fee336423060b600aee8f2ad1ee
      (cherry picked from commit 28c379e4)
      640966b4
  27. Mar 06, 2023
    • John Reck's avatar
      Address API feedback · 2d95e8c7
      John Reck authored
      Fixes: 271426288
      Test: make offline-sdk-docs & inspect
      Change-Id: I3bcc189e7df35274978f5125fc141a646b85d39a
      2d95e8c7
  28. Mar 04, 2023
    • Haoyu Zhang's avatar
      Optimize GraphemeClusterSegmentFinder performance · 043d23a8
      Haoyu Zhang authored
      This CL utilized minikin:isGraphemeBreak to compute all grapheme break indices when creating GraphemeClusterSegmentFinder. This makes all methods (such as #nextStartBoundary) of GraphemeClusterSegmentFinder O(1) instead of O(n).
      
      Bug: 271004887
      Test: atest TextViewHandwritingGestureTest
      Change-Id: I61c1f2c45123a584456b4860b72cd4fdc84c5f1c
      043d23a8
  29. Mar 03, 2023
  30. Mar 02, 2023
    • Christopher Cameron's avatar
      Update gainmap documentation. · 7b7ea42a
      Christopher Cameron authored
      Fix formula for W.
      
      Update names in the comments to match Android names.
      
      Remove references to HDR base images (didn't make the cut).
      
      Bug: 266628247
      Change-Id: Ice5250dd18ed8255503f1b4c9b6d933d2472990e
      7b7ea42a
  31. Feb 28, 2023
  32. Feb 25, 2023
    • Nader Jawad's avatar
      Defer Meshed creation · 5f0a800a
      Nader Jawad authored
      Refactored Mesh API to defer creation of
      SkMesh instances until a GrDirectContext
      can be obtained on the RenderThread.
      This creates an SkMesh during the prepare
      tree step when the UI thread is blocked
      to ensure no concurrency issues.
      
      Bug: b/265044322
      Test: atest CtsUiRenderingTestCases:MeshTest
      Change-Id: Ica8c364b99952e0ee71f7b95b312cf29c51ebc2a
      5f0a800a
  33. Feb 21, 2023
Loading