Skip to content
Snippets Groups Projects
  1. May 06, 2019
    • Lingfeng Yang's avatar
      Fix build on older APIs, take 2 · 09627c8a
      Lingfeng Yang authored
      There can be periods in the platform version, so it's not safe to use.
      Just run PLATFORM_SDK_VERSION instead.
      
      Bug: 131089111
      
      Change-Id: I72c0af3407f88753cf69b2ba2565b221345d3f3a
      09627c8a
    • Lingfeng Yang's avatar
      Fix build on older apis · d4fa2de8
      Lingfeng Yang authored
      some gralloc0 entry points not defined for older api levels
      
      bug: Bug: 131089111
      
      Change-Id: If3f1843ffb2c008052a5dec87b9063d2500298f1
      d4fa2de8
  2. Apr 25, 2019
    • Valerie Hau's avatar
      Modify gralloc0 implementation · e47122d9
      Valerie Hau authored
      Add validateBufferSize and getTransportSize
      
      Bug: 131089111
      Test: build, boot
      Change-Id: I9820197865e47832ae209cbf1cac3b544f45e60e
      e47122d9
  3. Apr 24, 2019
    • Roman Kiryanov's avatar
      Retire HAL_PIXEL_FORMAT_RGB_888 from gralloc · 6832185d
      Roman Kiryanov authored
      
      This is not a must and adds confusion between
      OpenGL (supported) and Vulkan (not supported)
      they are mixed (e.g. AHardwareBuffer_allocate
      which goes though OpenGL)
      
      Bug: 131184223
      Test: lunch sdk_gphone_x86-userdebug
      Test: emulator -wipe-data -no-snapshot -show-kernel -feature Vulkan,GLDirectMem
      Test: ./android-cts/tools/cts-tradefed -- run cts -m CtsGraphicsTestCases
      Test: emulator -wipe-data -no-snapshot -feature GLESDynamicVersion,PlayStoreImage,KernelDeviceTreeBlobSupport -gpu host
      Test: ./android-cts/tools/cts-tradefed -- run cts -m CtsNativeHardwareTestCases
      Test: ./android-cts/tools/cts-tradefed -- run cts -m CtsGraphicsTestCases
      Test: ./android-cts/tools/cts-tradefed -- run cts -m CtsCameraTestCases
      Change-Id: Idb5d5885efd18219c86cc1b76722d41f49d68d03
      Merged-In: Ie6f40c717a36ae4a9ef477cc420dc083b63ffbc3
      Signed-off-by: default avatarRoman Kiryanov <rkir@google.com>
      6832185d
  4. Apr 16, 2019
    • Roman Kiryanov's avatar
      Mark YUV camera buffers as interleaved · 76835be6
      Roman Kiryanov authored
      
      HAL_PIXEL_FORMAT_YCbCr_420_888 does not specify the exact
      buffer layout. EmulatedFakeCamera3.cpp uses interleaved
      UV planes, while other places place them separately.
      
      Bug: 130295800
      Bug: 129974968
      Test: run cts -m CtsCameraTestCases \
            -t android.hardware.camera2.cts.ImageReaderTest#teutYUVResolutions
      Merged-In: If3a495aa794d9ab09288b7b92be7258a07cc077d
      Signed-off-by: default avatarRoman Kiryanov <rkir@google.com>
      Change-Id: I33f6777b5cca6f4fa0c61ac3db994230d6b6efb0
      76835be6
  5. Apr 12, 2019
    • Roman Kiryanov's avatar
      Fix build break · 3624615b
      Roman Kiryanov authored
      
      error: 'class std::vector<char>' has no member named 'data'
      
      Bug: 130246090
      Test: make
      Change-Id: I1c7146a6eada5be4aa0678c7a3ddb762d080c981
      Merged-In: I39eec3b4d6621067387e48e1481de3cd614b79a1
      Signed-off-by: default avatarRoman Kiryanov <rkir@google.com>
      3624615b
  6. Apr 11, 2019
  7. Apr 01, 2019
  8. Mar 27, 2019
  9. Mar 25, 2019
  10. Mar 23, 2019
  11. Mar 21, 2019
  12. Mar 13, 2019
    • Roman Kiryanov's avatar
      Route gralloc_lock_ycbcr through gralloc_lock · 1d270ed1
      Roman Kiryanov authored
      
      This change adds rcReadColorBuffer to
      gralloc_lock_ycbcr from gralloc_lock, fixes the memory
      layout for HAL_PIXEL_FORMAT_YCbCr_420_888 and reduces
      copy-paste.
      
      Bug: 128451131
      Bug: 127995433
      Test: CtsNativeHardwareTestCases \
            android.hardware.nativehardware.cts.AHardwareBufferNativeTests
            #SingleLayer_ColorTest_GpuColorOutputAndSampledImage_Y8Cb8Cr8_420
      Signed-off-by: default avatarRoman Kiryanov <rkir@google.com>
      
      Change-Id: Ib961cfe6c662173e95fd00e055c3c7bdfb5d027d
      1d270ed1
  13. Mar 08, 2019
    • Lingfeng Yang's avatar
      Fix build on older APIs · 3dc7c2f2
      Lingfeng Yang authored
      Now we moved up the host connection define,
      but it's not included in any non GOLDFISH_VULKAN build. Oops
      
      Change-Id: I3053a13436775450489d3a42a1740403ac707b95
      3dc7c2f2
  14. Mar 07, 2019
    • Luca Stefani's avatar
      Switch to liblog logging on API >= 26 · 1cb647a0
      Luca Stefani authored
      * libcutils log is deprecated
      * Also fix a typo in a debug format string
      
      Test: m hwcomposer.ranchu
      Change-Id: I0a8e6434c5e1081ccf7663e20279774632e015d7
      1cb647a0
    • Lingfeng Yang's avatar
      [vulkan] If Vulkan enabled, make ColorBuffers from blob · e00bff95
      Lingfeng Yang authored
      bug: 122080810
      
      It can be possible to create AHardwareBuffers
      with a Vulkan external buffer.
      Currently, we rely on there being one ColorBuffer
      for each such AHardwareBuffer, except
      when blob format is involved.
      
      This CL causes a ColorBuffer to be created
      even if the format is blob format.
      
      Then, we get a ColorBuffer ID with which to correlate
      Vulkan external buffers.
      
      Change-Id: I8109b15d1e750b72d262c9d7aa33c4726244796f
      e00bff95
  15. Feb 13, 2019
  16. Feb 06, 2019
  17. Oct 03, 2018
    • Weilun Du's avatar
      [GL] Gralloc Refcount Pipe · 8b38e8b0
      Weilun Du authored
      
      RefCount Pipe is a different approach to simplify the Color Buffer
      management on host. In guest, the handle returned by gralloc
      allocator can be passed around between processes through Binder.
      Android system ensures that the handle on both calling and receiving
      end willl be properly closed. Thus, when gralloc allocates buffer for
      the first time, we establish a Refcount pipe between guest and host,
      and assign its fd to the handle. when cloned handle is closed, the
      duplicated fd will also be closed. Guest kernel will decide when to
      really close the fd and to trigger the pipe's closing on host.
      On the host side, we only need to destroy the color buffer immediately
      and not execute any reference counting code path.
      
      This approach will not only simplify the logic between guest and host
      but also reduce memory leaks.
      
      BUG: 116349069
      
      Signed-off-by: default avatarWeilun Du <wdu@google.com>
      Change-Id: Iab9fe76f5947b914b11fcdccdb61018957e20e50
      8b38e8b0
  18. Oct 01, 2018
    • Lingfeng Yang's avatar
      gralloc: fix nullptr dereference · ce8ff997
      Lingfeng Yang authored
      This happens only for host side tests where we free and unregister
      in the same process. Post-Treble Android usually expects not to do this.
      
      However, this CL should not affect behavior of guests either pre or post
      Treble.
      
      Change-Id: I4fac91c6d4c7031ac19e7c75233451663e3d31c4
      ce8ff997
  19. Sep 30, 2018
    • Lingfeng Yang's avatar
      asan: Fix malloc/free mismatch for fb device · 789c0934
      Lingfeng Yang authored
      bug: 116981035
      
      fb device was previously allocated with malloc
      and freed with delete, not free.
      
      Uncovered from running goldfish-opengl host side test
      wih ASAN enabled.
      
      Change-Id: I46b97d212e0baf47cd3d181f1b75ce27cb955fad
      789c0934
  20. Sep 27, 2018
    • Lingfeng Yang's avatar
      Fix build warning · d0769a59
      Lingfeng Yang authored
      Change-Id: Ib130765d39178f0a4f4a482e5555d26c076e33ff
      d0769a59
    • Lingfeng Yang's avatar
      Enable host build for gralloc · 2ed17d4b
      Lingfeng Yang authored
      bug: 116712605
      
      - No libdl needed on host
      - Define PAGE_SIZE
      - Include gralloc in build
      
      + Consolidate a few build script conditionals
        in egl Android.mk
      + Remove unused Callstack.h
      
      Change-Id: I2e5f8050971d41e7ae26910ce6bd43dad114e5c5
      2ed17d4b
    • Lingfeng Yang's avatar
      Fix gralloc.cpp wrong include · e4b842d5
      Lingfeng Yang authored
      Change-Id: I1f6a14b7bef2dc390f4ddf905b9ebb728adfc968
      e4b842d5
  21. Sep 26, 2018
    • Lingfeng Yang's avatar
      [host-build] libOpenglSystemCommon build for host · e38d15c1
      Lingfeng Yang authored
      - Make the thread id getting platform agnostic
      - Make QemuPipeStream run either with a real pipe device or
      a host-side one
      - Split out host versions of stuff, like goldfish_dma_host.cpp
      
      bug: 116524589
      
      Change-Id: Iac8c3161d68e9e71f0e14adecf42ca982d48628e
      e38d15c1
  22. Sep 21, 2018
    • Weilun Du's avatar
      Exit HostConnection for thread which only uses gralloc · 1b4bcf1e
      Weilun Du authored
      
      For certain guest process which maintains a thread pool and only calls gralloc
      library, we should exit the host connection to avoid spawning too many
      render threads on host emulator.
      
      Test: run empty test activity for 3000 times and the number of render
      thread on host should stay roughly the same.
      BUG: 80050618
      
      Change-Id: Idb282aa67138572519edee761f8bc6cb50c1653d
      Signed-off-by: default avatarWeilun Du <wdu@google.com>
      (cherry picked from commit 904b90eb097609762c7c35c321f82b2cc5245190)
      1b4bcf1e
    • huans's avatar
      Using fixed value to count gralloc buffer offset · d31aba13
      huans authored
      Gralloc module may be used by CameraHal(32bit) and Apk(64bit).
      Counting offset with int_ptr results in different values.
      
      Bug: 73485161
      
      Test: run cts -m CtsCameraTestCases
      Change-Id: I7d8d3f20652107df1fd7812d30c01e4546ac4a22
      d31aba13
    • Roman Kiryanov's avatar
      emulator: A minor cleanup in goldfish_dma · 96a068ff
      Roman Kiryanov authored
      
      This change makes fields of fixed length to make safe to pass
      goldfish_dma_context between 32 and 64 bit environments.
      
      Test: ~/repo-emu-master/external/qemu/objs/emulator \
      Test:     -verbose -show-kernel \
      Test:     -kernel /tmp/qemu-kernel-x86_64-ranchu/kernel-qemu \
      Test:     -feature GLDMA -wipe-data -no-snapshot
      Bug: 110152998
      Signed-off-by: default avatarRoman Kiryanov <rkir@google.com>
      Change-Id: I8e2aaf2d6896f189251099dabdc49d86053b64c6
      96a068ff
    • Logan Chien's avatar
      Revert "Deprecate <cutils/log.h> and <utils/Log.h>" · d7bf00d7
      Logan Chien authored
      This reverts commit 20ccec25.
      
      Reason for revert: Break sdk_addon build
      
      Change-Id: I3b0ea58ab44324014c34bf30157843415ffc456e
      d7bf00d7
  23. Sep 20, 2018
    • Logan Chien's avatar
      Deprecate <cutils/log.h> and <utils/Log.h> · 20ccec25
      Logan Chien authored
      This commit replaces <cutils/log.h> and <utils/Log.h> with <log/log.h>.
      
      Background:
      <cutils/log.h> has been moved to <log/log.h> for a while.  Both
      <cutils/log.h> and <utils/Log.h> simply includes <log/log.h> for
      backward compatibility.  This commit is a part of the effort to remove
      <cutils/log.h> and <utils/Log.h> from the source tree eventually.
      
      Bug: 78370064
      Test: lunch aosp_arm-userdebug && make && \
            cd device/generic/goldfish-opengl && mma
      
      Change-Id: Ia80adc525617d7099e9f354cef035386ec510262
      20ccec25
  24. Sep 04, 2018
    • Weilun Du's avatar
      Exit HostConnection for thread which only uses gralloc · 7907b77e
      Weilun Du authored
      
      For certain guest process which maintains a thread pool and only calls gralloc
      library, we should exit the host connection to avoid spawning too many
      render threads on host emulator.
      
      Test: run empty test activity for 3000 times and the number of render
      thread on host should stay roughly the same.
      BUG: 80050618
      
      Change-Id: Idb282aa67138572519edee761f8bc6cb50c1653d
      Signed-off-by: default avatarWeilun Du <wdu@google.com>
      (cherry picked from commit 904b90eb097609762c7c35c321f82b2cc5245190)
      7907b77e
  25. Jul 27, 2018
    • huans's avatar
      Using fixed value to count gralloc buffer offset · ff9e2665
      huans authored
      Gralloc module may be used by CameraHal(32bit) and Apk(64bit).
      Counting offset with int_ptr results in different values.
      
      Bug: 73485161
      
      Test: run cts -m CtsCameraTestCases
      Change-Id: I7d8d3f20652107df1fd7812d30c01e4546ac4a22
      ff9e2665
  26. Jun 15, 2018
    • Roman Kiryanov's avatar
      emulator: A minor cleanup in goldfish_dma · 76b1e7a9
      Roman Kiryanov authored
      
      This change makes fields of fixed length to make safe to pass
      goldfish_dma_context between 32 and 64 bit environments.
      
      Test: ~/repo-emu-master/external/qemu/objs/emulator \
      Test:     -verbose -show-kernel \
      Test:     -kernel /tmp/qemu-kernel-x86_64-ranchu/kernel-qemu \
      Test:     -feature GLDMA -wipe-data -no-snapshot
      Bug: 110152998
      Signed-off-by: default avatarRoman Kiryanov <rkir@google.com>
      Change-Id: I8e2aaf2d6896f189251099dabdc49d86053b64c6
      76b1e7a9
  27. Apr 27, 2018
    • Yahan Zhou's avatar
      Proper fix for HAL_PIXEL_FORMAT_RGBX_8888 · c02e65d1
      Yahan Zhou authored
      This is an appropriate fix for HAL_PIXEL_FORMAT_RGBX_8888.
      
      The handling of RGBX_8888 is very subtle. Most of time we want it to
      be treated as RGBA_8888, with the exception that alpha is always
      ignored and treated as 1. The solution is to create 3 channel RGB
      texture on the host while telling the guest to use 4 channel RGBA for
      read/write. The host GL will handle the Alpha channel approriately.
      
      BUG: 78602661
      
      This cl does not impact real devices.
      
      Test: atest CtsNativeHardwareTestCases
      Change-Id: Ife299bfc55ce327d0213616b9902ba537cfb0d82
      c02e65d1
Loading