AHardwareBuffer-based GpuMemoryBuffer implementation [chromium/src : master]

368 views
Skip to first unread message

Klaus Weidner (Gerrit)

unread,
Oct 20, 2017, 7:36:02 PM10/20/17
to Klaus Weidner, dari...@chromium.org, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, blundell+serv...@chromium.org, David Reveman, Mark Mentovai, Kenneth Russell, Daniel Cheng, John Abd-El-Malek, Commit Bot, Aaron Boodman, Darin Fisher, Kalyan Kondapally, Robert Kroeger, chromium...@chromium.org

For context, this is primarily intended to be used for WebVR to reduce the pixel copies needed when transferring images from the GPU process to the native GVR device context.

After discussions with reveman@ and rsesek@, I've attempted to follow the MacOS example of extending SharedMemoryHandle to support an additional native subtype, with an added NO_HANDLE type for invalid handles such as those from the default constructor. A minor wrinkle is that Android does appear to actively transport POSIX SharedMemoryHandles via IPC, so it needs to distinguish both. (Apparently iOS mostly stopped using POSIX shared memory.)

See also billorr@'s https://chromium-review.googlesource.com/c/chromium/src/+/674135 which does something similar for Windows, using its pre-existing SharedMemoryHandle support.

View Change

    To view, visit change 680100. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: master
    Gerrit-MessageType: comment
    Gerrit-Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
    Gerrit-Change-Number: 680100
    Gerrit-PatchSet: 11
    Gerrit-Owner: Klaus Weidner <kla...@chromium.org>
    Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
    Gerrit-Reviewer: David Reveman <rev...@chromium.org>
    Gerrit-Reviewer: Kenneth Russell <k...@chromium.org>
    Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
    Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
    Gerrit-CC: Aaron Boodman <a...@chromium.org>
    Gerrit-CC: Commit Bot <commi...@chromium.org>
    Gerrit-CC: Darin Fisher <da...@chromium.org>
    Gerrit-CC: John Abd-El-Malek <j...@chromium.org>
    Gerrit-CC: Kalyan Kondapally <kalyan.k...@intel.com>
    Gerrit-CC: Robert Kroeger <rjkr...@chromium.org>
    Gerrit-Comment-Date: Fri, 20 Oct 2017 23:35:53 +0000
    Gerrit-HasComments: No
    Gerrit-HasLabels: No

    Klaus Weidner (Gerrit)

    unread,
    Oct 20, 2017, 7:41:53 PM10/20/17
    to Ken Rockot, dari...@chromium.org, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, blundell+serv...@chromium.org, Klaus Weidner, David Reveman, Mark Mentovai, Kenneth Russell, Daniel Cheng

    Klaus Weidner would like Ken Rockot to review this change.

    View Change

    AHardwareBuffer-based GpuMemoryBuffer implementation

    AHardwareBuffer support is included on Android O and up. The NDK
    functions are included as of platform level 26, but Chromium currently
    doesn't use this as the target level, so we have to use dynamic
    loading to get the symbols at runtime.

    This is encapsulated in gfx::AndroidHardwareBufferCompat which makes
    it a bit easier to work with them across Android versions.

    The implementation adds a new ANDROID_HARDWARE_BUFFER subtype to the
    SharedMemoryHandle Android implementation in addition to the pre-existing
    ashmem support, including IPC transport via a SocketPair. It uses one end
    to write the native object using a NDK call, and the other end is a file
    descriptor sendable via usual IPC methods from which the receiver can fetch
    the object.

    BUG=761432

    Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
    Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
    ---
    M base/BUILD.gn
    A base/android/android_hardware_buffer_abi.h
    A base/android/android_hardware_buffer_compat.cc
    A base/android/android_hardware_buffer_compat.h
    M base/memory/shared_memory_handle.h
    A base/memory/shared_memory_handle_android.cc
    M gpu/BUILD.gn
    M gpu/ipc/client/BUILD.gn
    M gpu/ipc/client/gpu_memory_buffer_impl.cc
    A gpu/ipc/client/gpu_memory_buffer_impl_android_hardware_buffer.cc
    A gpu/ipc/client/gpu_memory_buffer_impl_android_hardware_buffer.h
    A gpu/ipc/client/gpu_memory_buffer_impl_android_hardware_buffer_unittest.cc
    M gpu/ipc/common/gpu_memory_buffer_support.cc
    M gpu/ipc/host/gpu_memory_buffer_support.cc
    M gpu/ipc/service/BUILD.gn
    M gpu/ipc/service/gpu_memory_buffer_factory.cc
    A gpu/ipc/service/gpu_memory_buffer_factory_android_hardware_buffer.cc
    A gpu/ipc/service/gpu_memory_buffer_factory_android_hardware_buffer.h
    M ipc/ipc_message_utils.cc
    M ui/gfx/gpu_memory_buffer.cc
    M ui/gfx/gpu_memory_buffer.h
    M ui/gfx/mojo/buffer_types.mojom
    M ui/gfx/mojo/buffer_types_struct_traits.cc
    M ui/gfx/mojo/buffer_types_struct_traits.h
    M ui/gl/gl_image_egl.cc
    M ui/gl/gl_image_egl.h
    26 files changed, 1,036 insertions(+), 38 deletions(-)


    To view, visit change 680100. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: master
    Gerrit-MessageType: newchange
    Gerrit-Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
    Gerrit-Change-Number: 680100
    Gerrit-PatchSet: 11
    Gerrit-Owner: Klaus Weidner <kla...@chromium.org>
    Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
    Gerrit-Reviewer: David Reveman <rev...@chromium.org>
    Gerrit-Reviewer: Ken Rockot <roc...@chromium.org>

    Klaus Weidner (Gerrit)

    unread,
    Oct 20, 2017, 7:41:53 PM10/20/17
    to Klaus Weidner, dari...@chromium.org, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, blundell+serv...@chromium.org, Ken Rockot, David Reveman, Mark Mentovai, Kenneth Russell, Daniel Cheng, John Abd-El-Malek, Commit Bot, Aaron Boodman, Darin Fisher, Kalyan Kondapally, Robert Kroeger, chromium...@chromium.org

    +rockot for ipc/ipc_message_utils

    View Change

      To view, visit change 680100. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-MessageType: comment
      Gerrit-Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
      Gerrit-Change-Number: 680100
      Gerrit-PatchSet: 11
      Gerrit-Owner: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: David Reveman <rev...@chromium.org>
      Gerrit-Reviewer: Ken Rockot <roc...@chromium.org>
      Gerrit-Reviewer: Kenneth Russell <k...@chromium.org>
      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
      Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Commit Bot <commi...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-CC: John Abd-El-Malek <j...@chromium.org>
      Gerrit-CC: Kalyan Kondapally <kalyan.k...@intel.com>
      Gerrit-CC: Robert Kroeger <rjkr...@chromium.org>
      Gerrit-Comment-Date: Fri, 20 Oct 2017 23:41:45 +0000
      Gerrit-HasComments: No
      Gerrit-HasLabels: No

      Klaus Weidner (Gerrit)

      unread,
      Oct 20, 2017, 7:51:25 PM10/20/17
      to Klaus Weidner, dari...@chromium.org, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, blundell+serv...@chromium.org, Ken Rockot, David Reveman, Mark Mentovai, Kenneth Russell, Daniel Cheng, John Abd-El-Malek, Commit Bot, Aaron Boodman, Darin Fisher, Kalyan Kondapally, Robert Kroeger, chromium...@chromium.org

      FYI, I'm still looking into adding more tests for this, though it's a bit tricky since AFAIK none of the bots are running Android O yet. Since this change touches a fair amount of code including additions to //base, I wanted to make sure that it's on the right track overall to avoid adding tests for code that may turn out to be doing the wrong thing ;-)

      View Change

        To view, visit change 680100. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromium/src
        Gerrit-Branch: master
        Gerrit-MessageType: comment
        Gerrit-Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
        Gerrit-Change-Number: 680100
        Gerrit-PatchSet: 11
        Gerrit-Owner: Klaus Weidner <kla...@chromium.org>
        Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
        Gerrit-Reviewer: David Reveman <rev...@chromium.org>
        Gerrit-Reviewer: Ken Rockot <roc...@chromium.org>
        Gerrit-Reviewer: Kenneth Russell <k...@chromium.org>
        Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
        Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
        Gerrit-CC: Aaron Boodman <a...@chromium.org>
        Gerrit-CC: Commit Bot <commi...@chromium.org>
        Gerrit-CC: Darin Fisher <da...@chromium.org>
        Gerrit-CC: John Abd-El-Malek <j...@chromium.org>
        Gerrit-CC: Kalyan Kondapally <kalyan.k...@intel.com>
        Gerrit-CC: Robert Kroeger <rjkr...@chromium.org>
        Gerrit-Comment-Date: Fri, 20 Oct 2017 23:51:19 +0000
        Gerrit-HasComments: No
        Gerrit-HasLabels: No

        Kenneth Russell (Gerrit)

        unread,
        Oct 20, 2017, 8:26:05 PM10/20/17
        to Klaus Weidner, dari...@chromium.org, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, blundell+serv...@chromium.org, Ken Rockot, David Reveman, Mark Mentovai, Daniel Cheng, John Abd-El-Malek, Commit Bot, Aaron Boodman, Darin Fisher, Kalyan Kondapally, Robert Kroeger, chromium...@chromium.org

        View Change

        1 comment:

        To view, visit change 680100. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromium/src
        Gerrit-Branch: master
        Gerrit-MessageType: comment
        Gerrit-Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
        Gerrit-Change-Number: 680100
        Gerrit-PatchSet: 12
        Gerrit-Owner: Klaus Weidner <kla...@chromium.org>
        Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
        Gerrit-Reviewer: David Reveman <rev...@chromium.org>
        Gerrit-Reviewer: Ken Rockot <roc...@chromium.org>
        Gerrit-Reviewer: Kenneth Russell <k...@chromium.org>
        Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
        Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
        Gerrit-CC: Aaron Boodman <a...@chromium.org>
        Gerrit-CC: Commit Bot <commi...@chromium.org>
        Gerrit-CC: Darin Fisher <da...@chromium.org>
        Gerrit-CC: John Abd-El-Malek <j...@chromium.org>
        Gerrit-CC: Kalyan Kondapally <kalyan.k...@intel.com>
        Gerrit-CC: Robert Kroeger <rjkr...@chromium.org>
        Gerrit-Comment-Date: Sat, 21 Oct 2017 00:26:01 +0000
        Gerrit-HasComments: Yes
        Gerrit-HasLabels: No

        Klaus Weidner (Gerrit)

        unread,
        Oct 20, 2017, 9:20:38 PM10/20/17
        to Klaus Weidner, dari...@chromium.org, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, blundell+serv...@chromium.org, Kenneth Russell, Ken Rockot, David Reveman, Mark Mentovai, Daniel Cheng, John Abd-El-Malek, Commit Bot, Aaron Boodman, Darin Fisher, Kalyan Kondapally, Robert Kroeger, chromium...@chromium.org

        View Change

        1 comment:

          • I'm not an expert on Chrome's IPC or Mojo, but rather than creating a new socket pair just to send t […]

            I was thinking about this also, but got lost in IPC internals while looking for a way to do this, and I got the impression it might end up too invasive. dcheng@ or others, please let me know if you think that would be the right way to do it.

        To view, visit change 680100. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromium/src
        Gerrit-Branch: master
        Gerrit-MessageType: comment
        Gerrit-Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
        Gerrit-Change-Number: 680100
        Gerrit-PatchSet: 13
        Gerrit-Owner: Klaus Weidner <kla...@chromium.org>
        Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
        Gerrit-Reviewer: David Reveman <rev...@chromium.org>
        Gerrit-Reviewer: Ken Rockot <roc...@chromium.org>
        Gerrit-Reviewer: Kenneth Russell <k...@chromium.org>
        Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
        Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
        Gerrit-CC: Aaron Boodman <a...@chromium.org>
        Gerrit-CC: Commit Bot <commi...@chromium.org>
        Gerrit-CC: Darin Fisher <da...@chromium.org>
        Gerrit-CC: John Abd-El-Malek <j...@chromium.org>
        Gerrit-CC: Kalyan Kondapally <kalyan.k...@intel.com>
        Gerrit-CC: Robert Kroeger <rjkr...@chromium.org>
        Gerrit-Comment-Date: Sat, 21 Oct 2017 01:20:34 +0000
        Gerrit-HasComments: Yes
        Gerrit-HasLabels: No

        David Reveman (Gerrit)

        unread,
        Oct 20, 2017, 11:53:55 PM10/20/17
        to Klaus Weidner, dari...@chromium.org, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, blundell+serv...@chromium.org, Kenneth Russell, Ken Rockot, Mark Mentovai, Daniel Cheng, John Abd-El-Malek, Commit Bot, Aaron Boodman, Darin Fisher, Kalyan Kondapally, Robert Kroeger, chromium...@chromium.org

        View Change

        9 comments:

          • AHardwareBuffer support is included on Android O and up. The NDK
            functions are included as of platform level 26, but Chromium currently
            doesn't use this as the target level, so we have to use dynamic
            loading to get the symbols at runtime.

        To view, visit change 680100. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromium/src
        Gerrit-Branch: master
        Gerrit-MessageType: comment
        Gerrit-Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
        Gerrit-Change-Number: 680100
        Gerrit-PatchSet: 13
        Gerrit-Owner: Klaus Weidner <kla...@chromium.org>
        Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
        Gerrit-Reviewer: David Reveman <rev...@chromium.org>
        Gerrit-Reviewer: Ken Rockot <roc...@chromium.org>
        Gerrit-Reviewer: Kenneth Russell <k...@chromium.org>
        Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
        Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
        Gerrit-CC: Aaron Boodman <a...@chromium.org>
        Gerrit-CC: Commit Bot <commi...@chromium.org>
        Gerrit-CC: Darin Fisher <da...@chromium.org>
        Gerrit-CC: John Abd-El-Malek <j...@chromium.org>
        Gerrit-CC: Kalyan Kondapally <kalyan.k...@intel.com>
        Gerrit-CC: Robert Kroeger <rjkr...@chromium.org>
        Gerrit-Comment-Date: Sat, 21 Oct 2017 03:53:49 +0000
        Gerrit-HasComments: Yes
        Gerrit-HasLabels: No

        Klaus Weidner (Gerrit)

        unread,
        Oct 21, 2017, 2:47:18 AM10/21/17
        to Klaus Weidner, dari...@chromium.org, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, blundell+serv...@chromium.org, David Reveman, Kenneth Russell, Ken Rockot, Mark Mentovai, Daniel Cheng, John Abd-El-Malek, Commit Bot, Aaron Boodman, Darin Fisher, Kalyan Kondapally, Robert Kroeger, chromium...@chromium.org

        View Change

        9 comments:

          • AHardwareBuffer support is included on Android O and up. The NDK


          • functions are included as of platform level 26, but Chromium currently
            doesn't use this as the target level, so we have to use dynamic
            loading to get the symbols at runtime.

          • can we just change the target level for chrome? why is dynamic loading not needed just because targe […]

            The functions used here were added to the NDK libraries as required Android features at platform level 26, so they would be usable as plain functions without manual dynamic loading if that were used as the NDK platform build level. However, in practice this would require raising the sdkMin version for the entire application to API level 26, and this would make Chrome only show in the Play Store for devices running Android O and newer. That's obviously a nonstarter.

            There's a fairly long (though somewhat opinionated) description here: https://stackoverflow.com/a/41079462

            There may be ways to do tricky things such as offering multiple APKs on Play Store or shipping multiple .so files in an APK for runtime switching, but that seems unreasonable.

            The Java SDK supports separately setting minimum, target, and compile SDK levels, but the NDK does not support this. Using compatible declarations together with manual dynamic loading appears to be the usual approach here. Any changes to the NDK platform level need to be done very carefully due to risk of incompatibility.

        • File gpu/ipc/client/gpu_memory_buffer_impl_android_hardware_buffer.cc:

          • Please cleanup all this type of debug logging before asking for review.

          • Sorry about that, done. I've left a small amount of error logging, let me know if this seems appropriate now.

          • Patch Set #13, Line 44: default:

          • move this into a separate helper function like other GMB impls

          • This is a bit different from the other GMB implementations since it needs to convert the Chrome types to AHArdwareBufferDesc equivalents for the supported types. I've moved it to a no-fail "GetBufferConfig" method that's called after checking the already-existing IsConfigurationSupported() logic, with some DCHECK/NOTREACHED as sanity check in case the code gets updated inconsistently.

          • Patch Set #13, Line 57: return desc;

          • move this into a separate helper function like other GMB impls

          • See previous.

          • what is this used for?

            Removed. I was following the SharedMemory implementation here, it seems to be a sanity check on the size calculation to avoid integer overflow or similar based on safe_math and ValueOrDie, but I'm not sure if it adds much benefit since I'm not using the resulting buffer_size for the allocation.

            This does trust the AHardwareBuffer allocation now though to do the right thing, please let me know if you want me to add additional size sanity checks.

          • I think it would be a bit more consistent to have an AHardwareBufferDesc(size, format, usage) functi […]

            Done

          • can you remove this and have the caller use eglGetNativeClientBufferANDROID?

          • Done. I was assuming that direct GL commands would largely be expected to stay in ui/gl/, but it looks as if direct_composition_surface_win and related code in gpu/ipc/service/ use them fairly extensively already.

          • why add this as part of this patch?

            I'm actually confused about this myself. OnMemoryDump is a pure abstract method in GlImage that didn't get defined or overridden for GlImageEGL (as far as I can tell), so the compiler complained to me that the "new gl: GLImageEGL(size)" call in the factory code was an invalid attempt to construct an abstract class instance. I agree with the compiler, but it's unclear to me how come this never caused issues previously. My guess is that these were only being instantiated via GLImageNativePixmap which does override OnMemoryDump.

        To view, visit change 680100. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromium/src
        Gerrit-Branch: master
        Gerrit-MessageType: comment
        Gerrit-Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
        Gerrit-Change-Number: 680100
        Gerrit-PatchSet: 14
        Gerrit-Owner: Klaus Weidner <kla...@chromium.org>
        Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
        Gerrit-Reviewer: David Reveman <rev...@chromium.org>
        Gerrit-Reviewer: Ken Rockot <roc...@chromium.org>
        Gerrit-Reviewer: Kenneth Russell <k...@chromium.org>
        Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
        Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
        Gerrit-CC: Aaron Boodman <a...@chromium.org>
        Gerrit-CC: Commit Bot <commi...@chromium.org>
        Gerrit-CC: Darin Fisher <da...@chromium.org>
        Gerrit-CC: John Abd-El-Malek <j...@chromium.org>
        Gerrit-CC: Kalyan Kondapally <kalyan.k...@intel.com>
        Gerrit-CC: Robert Kroeger <rjkr...@chromium.org>
        Gerrit-Comment-Date: Sat, 21 Oct 2017 06:47:13 +0000
        Gerrit-HasComments: Yes
        Gerrit-HasLabels: No

        David Reveman (Gerrit)

        unread,
        Oct 22, 2017, 6:57:14 PM10/22/17
        to Klaus Weidner, dari...@chromium.org, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, blundell+serv...@chromium.org, Kenneth Russell, Ken Rockot, Mark Mentovai, Daniel Cheng, John Abd-El-Malek, Commit Bot, Aaron Boodman, Darin Fisher, Kalyan Kondapally, Robert Kroeger, chromium...@chromium.org

        View Change

        21 comments:

          • AHardwareBuffer support is included on Android O and up. The NDK


          • functions are included as of platform level 26, but Chromium currently
            doesn't use this as the target level, so we have to use dynamic
            loading to get the symbols at runtime.

        To view, visit change 680100. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromium/src
        Gerrit-Branch: master
        Gerrit-MessageType: comment
        Gerrit-Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
        Gerrit-Change-Number: 680100
        Gerrit-PatchSet: 14
        Gerrit-Owner: Klaus Weidner <kla...@chromium.org>
        Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
        Gerrit-Reviewer: David Reveman <rev...@chromium.org>
        Gerrit-Reviewer: Ken Rockot <roc...@chromium.org>
        Gerrit-Reviewer: Kenneth Russell <k...@chromium.org>
        Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
        Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
        Gerrit-CC: Aaron Boodman <a...@chromium.org>
        Gerrit-CC: Commit Bot <commi...@chromium.org>
        Gerrit-CC: Darin Fisher <da...@chromium.org>
        Gerrit-CC: John Abd-El-Malek <j...@chromium.org>
        Gerrit-CC: Kalyan Kondapally <kalyan.k...@intel.com>
        Gerrit-CC: Robert Kroeger <rjkr...@chromium.org>
        Gerrit-Comment-Date: Sun, 22 Oct 2017 22:57:08 +0000
        Gerrit-HasComments: Yes
        Gerrit-HasLabels: No

        Klaus Weidner (Gerrit)

        unread,
        Oct 23, 2017, 4:55:11 PM10/23/17
        to Klaus Weidner, asvitki...@chromium.org, dari...@chromium.org, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, blundell+serv...@chromium.org, David Reveman, Kenneth Russell, Ken Rockot, Mark Mentovai, Daniel Cheng, John Abd-El-Malek, Commit Bot, Aaron Boodman, Darin Fisher, Kalyan Kondapally, Robert Kroeger, chromium...@chromium.org

        There's still a few unresolved comments, main one is that I haven't added gl_image_ahardwarebuffer tests yet.

        Apart from the listed comments, I've also made a minor change to a field_trial unittest. My SharedMemoryHandle class has a sanity check that GetHandle requires a valid file descriptor, and the test used -1 for this. I'd prefer to keep the sanity check in place. Let me know if I should pull this out into a separate CL or ditch the sanity check instead.

        View Change

        21 comments:

          • AHardwareBuffer support is included on Android O and up. The NDK


          • functions are included as of platform level 26, but Chromium currently
            doesn't use this as the target level, so we have to use dynamic
            loading to get the symbols at runtime.

          • Ok, then it seems like the right thing to do is always use dynamic loading for now and protect the c […]

            I'm adding this check as a requirement, but I don't think it's safe to treat this as a sufficient test for support being available. I think it's safer to continue handling the case where symbol loading may fail even on a >= Oreo system, to avoid potential crashes if this runs on a weird device that may not entirely follow CDD requirements.

            The code already uses this for advertising support, gpu/ipc/common/gpu_memory_buffer_support.cc's IsNativeGpuMemoryBufferConfigurationSupported will return false if base::AndroidHardwareBufferCompat::IsSupportAvailable() is false.

        • File base/android/android_hardware_buffer_abi.h:

          • should we add hardware_buffer. […]

            Good question. I'm not sure if it makes sense to separately add it to third_party since it's included in current NDKs, the current copy is just out of date. Should I file a bug for third_party/android_tools/ndk/ to be refreshed so that this can be removed? This could potentially work even without updating the NDK platform level thanks to the new SDK's unified headers where the file would be available as sysroot/usr/include/android/hardware_buffer.h

            As far as I know updating the SDK is a somewhat tricky operation due to compatibility concerns even without changing the build level, so I'd prefer to tackle this separately.

        • File base/android/android_hardware_buffer_compat.cc:

          • Patch Set #14, Line 41: // We want to try loading symbols one time only, since retries aren't going to

            g_did_check_ahardware_buffer_support, if you keep this but I feel like this is better handled using […]

            Renamed, using g_ahardwarebuffer_support since ahardware_buffer looked strange.

            As far as I know I need both - I don't trust SDK version >= OREO to be a sufficient condition, so I still would prefer to be prepared for the case that symbol loading fails.

            I've replaced the pair of booleans with a tristate enum to make this a bit clearer, and to help avoid potential memory inconsistencies due to separate storage.

          • Patch Set #14, Line 62: if (!name) { \

            This seems racy. […]

            You're right, I added a lazy initialized lock to protect the state updates.

        • File gpu/ipc/client/gpu_memory_buffer_impl_android_hardware_buffer.h:

          • GetBufferDescription?

            Done

          • // "reserved for future use" (rfu) fields to zero.
            desc.width = size.width();

          • maybe "desc = {}" above instead of setting rfu fields below

          • Done

          • Patch Set #14, Line 36: case gfx::BufferFormat::RGBX_8888:

            is it RGB_565 you want instead? I'd remove this TODO unless it's something you know we need to add i […]

            Removed, it's something I'd like to support at some point but this would need spec changes so that a WebGL drawing context can request a low-bit-depth canvas.

          • Patch Set #14, Line 85: return nullptr;

          • DCHECK? I'd like us to fail much earlier if this is not supported.

          • Done

          • Patch Set #14, Line 88: return base::WrapUnique(new GpuMemoryBufferImplAndroidHardwareBuffer(

            remove this as we shouldn't reach this if not supported and you already have DCHECKs in GetBufferCon […]

            Done

          • LOG(ERROR) << "Failed to allocate AHardwareBuffer";

          • why would this fail? can we DCHECK instead?

            Replaced with DCHECKs.

        • File ui/gl/gl_image_egl.h:

          • Patch Set #14, Line 37: const gfx::RectF& crop_rect) override;

            Instead of this, please add a minimal GLImageAndroidHardwareBuffer class and appropriate GLImage uni […]

            I've created the new subclass, but I'm still looking into setting up the unit test. For example, the test template needs a CreateSolidColorImage method which is easy for true shared memory, but a bit tricky here for a GPU-only image.

            (Leaving unresolved for now.)

        • File ui/gl/gl_image_egl.h:

          • Patch Set #13, Line 40: protected:

            GLImageEGL is not meant to be a full implementation. […]

            Done, and I added a comment that this class is intentionally abstract.

        To view, visit change 680100. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromium/src
        Gerrit-Branch: master
        Gerrit-MessageType: comment
        Gerrit-Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
        Gerrit-Change-Number: 680100
        Gerrit-PatchSet: 15
        Gerrit-Owner: Klaus Weidner <kla...@chromium.org>
        Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
        Gerrit-Reviewer: David Reveman <rev...@chromium.org>
        Gerrit-Reviewer: Ken Rockot <roc...@chromium.org>
        Gerrit-Reviewer: Kenneth Russell <k...@chromium.org>
        Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
        Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
        Gerrit-CC: Aaron Boodman <a...@chromium.org>
        Gerrit-CC: Commit Bot <commi...@chromium.org>
        Gerrit-CC: Darin Fisher <da...@chromium.org>
        Gerrit-CC: John Abd-El-Malek <j...@chromium.org>
        Gerrit-CC: Kalyan Kondapally <kalyan.k...@intel.com>
        Gerrit-CC: Robert Kroeger <rjkr...@chromium.org>
        Gerrit-Comment-Date: Mon, 23 Oct 2017 20:55:05 +0000
        Gerrit-HasComments: Yes
        Gerrit-HasLabels: No

        David Reveman (Gerrit)

        unread,
        Oct 24, 2017, 11:52:35 AM10/24/17
        to Klaus Weidner, asvitki...@chromium.org, dari...@chromium.org, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, blundell+serv...@chromium.org, Kenneth Russell, Ken Rockot, Mark Mentovai, Daniel Cheng, John Abd-El-Malek, Commit Bot, Aaron Boodman, Darin Fisher, Kalyan Kondapally, Robert Kroeger, chromium...@chromium.org

        View Change

        20 comments:

          • AHardwareBuffer support is included on Android O and up. The NDK


          • functions are included as of platform level 26, but Chromium currently
            doesn't use this as the target level, so we have to use dynamic
            loading to get the symbols at runtime.

          • I'm adding this check as a requirement, but I don't think it's safe to treat this as a sufficient te […]

            Devices that doesn't follow CDD requirements doesn't seem like something we should worry about. At least not until we know it exists and we need to support AHardwareBuffer on these devices.

        • File base/android/android_hardware_buffer_abi.h:

          • Good question. […]

            Updating third_party/android_tools/ndk/ sounds like something we need to do eventually anyhow so it seems like we should just take care of that now instead of unnecessary temporary copy and paste that will add confusion. I'll leave it up to base/ and third_party/android_tools/ndk/ maintainers to decide this though. Please make sure they are aware of the option.

        • File base/android/android_hardware_buffer_compat.cc:

          • Patch Set #14, Line 8:

            #include "gpu/command_buffer/service/image_factory.h"
            #include "gpu/gpu_export.h"
            #include "gpu/ipc/service/gpu_memory_buffer_factory.h"

            namespace gl {
            class GLImage;
            }

            namespace gpu {

          • I've created the new subclass, but I'm still looking into setting up the unit test. […]

            Can't we use AHardwareBuffer_lock/unlock for this? No need to expose lock/unlock in the GMB API but using it for tests so we can at least run this on a device where we know it's supposed to work to verify the logic would be nice.

        To view, visit change 680100. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromium/src
        Gerrit-Branch: master
        Gerrit-MessageType: comment
        Gerrit-Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
        Gerrit-Change-Number: 680100
        Gerrit-PatchSet: 16
        Gerrit-Owner: Klaus Weidner <kla...@chromium.org>
        Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
        Gerrit-Reviewer: David Reveman <rev...@chromium.org>
        Gerrit-Reviewer: Ken Rockot <roc...@chromium.org>
        Gerrit-Reviewer: Kenneth Russell <k...@chromium.org>
        Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
        Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
        Gerrit-CC: Aaron Boodman <a...@chromium.org>
        Gerrit-CC: Commit Bot <commi...@chromium.org>
        Gerrit-CC: Darin Fisher <da...@chromium.org>
        Gerrit-CC: John Abd-El-Malek <j...@chromium.org>
        Gerrit-CC: Kalyan Kondapally <kalyan.k...@intel.com>
        Gerrit-CC: Robert Kroeger <rjkr...@chromium.org>
        Gerrit-Comment-Date: Tue, 24 Oct 2017 15:52:31 +0000
        Gerrit-HasComments: Yes
        Gerrit-HasLabels: No

        Klaus Weidner (Gerrit)

        unread,
        Oct 31, 2017, 5:07:08 PM10/31/17
        to Klaus Weidner, dari...@chromium.org, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, asvitki...@chromium.org, blundell+serv...@chromium.org, David Reveman, Kenneth Russell, Ken Rockot, Mark Mentovai, Daniel Cheng, John Abd-El-Malek, Commit Bot, Aaron Boodman, Darin Fisher, Kalyan Kondapally, Robert Kroeger, chromium...@chromium.org

        I'm still working on the GLImageAHardwareBuffer test, but wanted to upload a patch that addresses most of the outstanding comments and to keep in sync with the split-out patches. I'll follow up once the image test is done.

        View Change

        20 comments:

          • AHardwareBuffer support is included on Android O and up. The NDK


          • functions are included as of platform level 26, but Chromium currently
            doesn't use this as the target level, so we have to use dynamic
            loading to get the symbols at runtime.

          • Devices that doesn't follow CDD requirements doesn't seem like something we should worry about. […]

            I agree, the one concern I still have is that the AHardwareBuffer GMB code gets activated even in cases when it's not really needed due to being part of the generic GMB handle struct, and I'd want to avoid potential crashes as part of unrelated code doing checks as a side effect. This should be doable as part of the lazy initialization.

            For example, I had a mistake in earlier versions of the code that didn't correctly handle null AHardwareBuffer GMB handles, and this unexpectedly broke the Google Search and Docs web pages.

        • File base/android/android_hardware_buffer_abi.h:

          • Updating third_party/android_tools/ndk/ sounds like something we need to do eventually anyhow so it […]

            After discussing options with agrieve@ and jbudorick@, I added a "me too" to the existing http://crbug.com/771171 that requests an NDK update, and added a reference to that in a TODO to delete this file once the NDK is updated.

        • File base/android/android_hardware_buffer_compat.cc:

          • Patch Set #14, Line 41: dlsym(main_dl_handle, "AHardwareBuffer_acquire");

            Why is SDK version >= OREO not sufficient? That seems to be sufficient everywhere else in Chrome. […]

            You've convinced me that it's overly paranoid, removing this extra level of checking.

        • File base/android/android_hardware_buffer_compat.cc:

          • Patch Set #16, Line 45: lsym(main_dl_handl

            if you're adding a lazy instance then why not put all function loading logic in the ctor of the inst […]

            Done, with a few differences. I'm keeping IsSupportAvailable as a static method to ensure that the instance only gets constructed if it's actually needed, and using a GetInstance class method instead of exposing the lazy instance directly as a global. How does this look?

          • Patch Set #16, Line 50: DCHECK(send_handle_);

            I'm not a fan of overriding these global symbols as that allows for incorrect usage by trying to use […]

            Done.

          • A helper function is preferred over a macro. […]

            I've removed the macro and inlined the dlsym calls. A helper method isn't really useful here, I've added DCHECKs for loading symbols.

          • allocate_(desc, out_buffer);
            }

            why is this needed? wouldn't "void* main_dl_handle = dlopen(nullptr, RTLD_NOW)" be the same in this […]

            Done. It's equivalent when this only gets called once, especially with the new constructor which makes it clearer.

        • File base/memory/shared_memory_handle.h:

          • INVALID or EMPTY? SharedMemoryHandle::NO_HANDLE is a bit weird..

          • base/memory/shared_memory.h? as I see usage of that below but not handle..

          • LEt's add usage argument to shared memory impl instead.

          • please don't add a new template file for this. […]

            Done

          • nit: please keep a BufferDestroyed function as before and maintain blank lines below so it's clear t […]

            I'm not sure if there's a good way to keep it as a function. A plain function fails due to multiple definitions as this gets included multiple times as a header file. I think a static function would fail with "unused function" compiler errors for platforms that don't instantiate the Create test case. (This would be possible if I would keep it in a separate test template file.) I also tried a static member function for the class, but that ended up making even more changes to the test than the lambda did even before trying to get a function pointer to the templated static class member.

            I've moved this into the separate change http://crrev.com/c/747604 to keep things cleaner. Since that now only contains this one change, I hope it's now clear enough that it's basically just a code move. Marking as resolved here, let's follow up in that CL?

        • File gpu/ipc/service/gpu_memory_buffer_factory_android_hardware_buffer.h:

          • Patch Set #14, Line 8:

            #include "gpu/command_buffer/service/image_factory.h"
            #include "gpu/gpu_export.h"
            #include "gpu/ipc/service/gpu_memory_buffer_factory.h"

            namespace gl {
            class GLImage;
            }

            namespace gpu {

          • is this used? please remove if not


          • unsigned GLImageAHardwareBuffer::GetInternalFormat() {
            return GL_RGBA;
            }

            bool GLImageAHardwareBuffer::CopyTexImage(unsigned target) {
            return false;
            }

          • this should be done by GLImageEGL dtor and not here.

          • nit: please move this comment above l.16.

            Done

        • File ui/gl/gl_image_egl.h:

          • Patch Set #14, Line 37: };

            Can't we use AHardwareBuffer_lock/unlock for this? No need to expose lock/unlock in the GMB API but […]

            Yes, that's what I'm working on for the test. It's not done yet, leaving this item unresolved for now.

        To view, visit change 680100. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromium/src
        Gerrit-Branch: master
        Gerrit-MessageType: comment
        Gerrit-Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
        Gerrit-Change-Number: 680100
        Gerrit-PatchSet: 17
        Gerrit-Owner: Klaus Weidner <kla...@chromium.org>
        Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
        Gerrit-Reviewer: David Reveman <rev...@chromium.org>
        Gerrit-Reviewer: Ken Rockot <roc...@chromium.org>
        Gerrit-Reviewer: Kenneth Russell <k...@chromium.org>
        Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
        Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
        Gerrit-CC: Aaron Boodman <a...@chromium.org>
        Gerrit-CC: Commit Bot <commi...@chromium.org>
        Gerrit-CC: Darin Fisher <da...@chromium.org>
        Gerrit-CC: John Abd-El-Malek <j...@chromium.org>
        Gerrit-CC: Kalyan Kondapally <kalyan.k...@intel.com>
        Gerrit-CC: Robert Kroeger <rjkr...@chromium.org>
        Gerrit-Comment-Date: Tue, 31 Oct 2017 21:07:04 +0000
        Gerrit-HasComments: Yes
        Gerrit-HasLabels: No

        Klaus Weidner (Gerrit)

        unread,
        Oct 31, 2017, 8:54:58 PM10/31/17
        to Klaus Weidner, dari...@chromium.org, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, asvitki...@chromium.org, blundell+serv...@chromium.org, David Reveman, Kenneth Russell, Ken Rockot, Mark Mentovai, Daniel Cheng, John Abd-El-Malek, Commit Bot, Aaron Boodman, Darin Fisher, Kalyan Kondapally, Robert Kroeger, chromium...@chromium.org

        I've added gl_image_ahardwarebuffer_unittest, though the current implementation would fail on pre-O test systems. What's the best way to make this runtime conditional? billorr's https://chromium-review.googlesource.com/c/chromium/src/+/674135/24/gpu/ipc/service/gpu_memory_buffer_factory_dxgi_unittest.cc used a DISABLED_ prefix, but I couldn't figure out in which circumstances this would get enabled.

        View Change

        1 comment:

          • Yes, that's what I'm working on for the test. […]

            Unit test added, though I'm not sure how to make this conditional on runtime support short of annoying conditionals in the template.

        To view, visit change 680100. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromium/src
        Gerrit-Branch: master
        Gerrit-MessageType: comment
        Gerrit-Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
        Gerrit-Change-Number: 680100
        Gerrit-PatchSet: 18
        Gerrit-Owner: Klaus Weidner <kla...@chromium.org>
        Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
        Gerrit-Reviewer: David Reveman <rev...@chromium.org>
        Gerrit-Reviewer: Ken Rockot <roc...@chromium.org>
        Gerrit-Reviewer: Kenneth Russell <k...@chromium.org>
        Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
        Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
        Gerrit-CC: Aaron Boodman <a...@chromium.org>
        Gerrit-CC: Commit Bot <commi...@chromium.org>
        Gerrit-CC: Darin Fisher <da...@chromium.org>
        Gerrit-CC: John Abd-El-Malek <j...@chromium.org>
        Gerrit-CC: Kalyan Kondapally <kalyan.k...@intel.com>
        Gerrit-CC: Robert Kroeger <rjkr...@chromium.org>
        Gerrit-Comment-Date: Wed, 01 Nov 2017 00:54:52 +0000
        Gerrit-HasComments: Yes
        Gerrit-HasLabels: No

        Kenneth Russell (Gerrit)

        unread,
        Oct 31, 2017, 10:51:43 PM10/31/17
        to Klaus Weidner, dari...@chromium.org, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, asvitki...@chromium.org, blundell+serv...@chromium.org, David Reveman, Ken Rockot, Mark Mentovai, Daniel Cheng, John Abd-El-Malek, Commit Bot, Aaron Boodman, Darin Fisher, Kalyan Kondapally, Robert Kroeger, chromium...@chromium.org

        I defer review to reveman@; I barely know any of the affected code. Please tell me if you need my review.

        View Change

          To view, visit change 680100. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: chromium/src
          Gerrit-Branch: master
          Gerrit-MessageType: comment
          Gerrit-Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
          Gerrit-Change-Number: 680100
          Gerrit-PatchSet: 18
          Gerrit-Owner: Klaus Weidner <kla...@chromium.org>
          Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
          Gerrit-Reviewer: David Reveman <rev...@chromium.org>
          Gerrit-Reviewer: Ken Rockot <roc...@chromium.org>
          Gerrit-Reviewer: Kenneth Russell <k...@chromium.org>
          Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
          Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
          Gerrit-CC: Aaron Boodman <a...@chromium.org>
          Gerrit-CC: Commit Bot <commi...@chromium.org>
          Gerrit-CC: Darin Fisher <da...@chromium.org>
          Gerrit-CC: John Abd-El-Malek <j...@chromium.org>
          Gerrit-CC: Kalyan Kondapally <kalyan.k...@intel.com>
          Gerrit-CC: Robert Kroeger <rjkr...@chromium.org>
          Gerrit-Comment-Date: Wed, 01 Nov 2017 02:51:40 +0000
          Gerrit-HasComments: No
          Gerrit-HasLabels: No

          Klaus Weidner (Gerrit)

          unread,
          Oct 31, 2017, 11:19:58 PM10/31/17
          to Klaus Weidner, dari...@chromium.org, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, asvitki...@chromium.org, blundell+serv...@chromium.org, Kenneth Russell, David Reveman, Ken Rockot, Mark Mentovai, Daniel Cheng, John Abd-El-Malek, Commit Bot, Aaron Boodman, Darin Fisher, Kalyan Kondapally, Robert Kroeger, chromium...@chromium.org

          Patch Set 18:

          (1 comment)

          I've added gl_image_ahardwarebuffer_unittest, though the current implementation would fail on pre-O test systems. What's the best way to make this runtime conditional? billorr's https://chromium-review.googlesource.com/c/chromium/src/+/674135/24/gpu/ipc/service/gpu_memory_buffer_factory_dxgi_unittest.cc used a DISABLED_ prefix, but I couldn't figure out in which circumstances this would get enabled.

          I found the right documentation, I default-disabled the tests and added a comment pointing to the --gtest-also-run-disabled-tests flag as a reminder for future me.

          View Change

            To view, visit change 680100. To unsubscribe, or for help writing mail filters, visit settings.

            Gerrit-Project: chromium/src
            Gerrit-Branch: master
            Gerrit-MessageType: comment
            Gerrit-Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
            Gerrit-Change-Number: 680100
            Gerrit-PatchSet: 19
            Gerrit-Owner: Klaus Weidner <kla...@chromium.org>
            Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
            Gerrit-Reviewer: David Reveman <rev...@chromium.org>
            Gerrit-Reviewer: Ken Rockot <roc...@chromium.org>
            Gerrit-Reviewer: Kenneth Russell <k...@chromium.org>
            Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
            Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
            Gerrit-CC: Aaron Boodman <a...@chromium.org>
            Gerrit-CC: Commit Bot <commi...@chromium.org>
            Gerrit-CC: Darin Fisher <da...@chromium.org>
            Gerrit-CC: John Abd-El-Malek <j...@chromium.org>
            Gerrit-CC: Kalyan Kondapally <kalyan.k...@intel.com>
            Gerrit-CC: Robert Kroeger <rjkr...@chromium.org>
            Gerrit-Comment-Date: Wed, 01 Nov 2017 03:19:55 +0000
            Gerrit-HasComments: No
            Gerrit-HasLabels: No

            David Reveman (Gerrit)

            unread,
            Nov 1, 2017, 10:58:28 AM11/1/17
            to Klaus Weidner, dari...@chromium.org, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, asvitki...@chromium.org, blundell+serv...@chromium.org, Kenneth Russell, Ken Rockot, Mark Mentovai, Daniel Cheng, John Abd-El-Malek, Commit Bot, Aaron Boodman, Darin Fisher, Kalyan Kondapally, Robert Kroeger, chromium...@chromium.org

            LGTM with nits. Please have base::SharedMemory changes reviewed by base owner that is more familiar with that code before you land this.

            Patch set 19:Code-Review +1

            View Change

            13 comments:

            To view, visit change 680100. To unsubscribe, or for help writing mail filters, visit settings.

            Gerrit-Project: chromium/src
            Gerrit-Branch: master
            Gerrit-MessageType: comment
            Gerrit-Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
            Gerrit-Change-Number: 680100
            Gerrit-PatchSet: 19
            Gerrit-Owner: Klaus Weidner <kla...@chromium.org>
            Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
            Gerrit-Reviewer: David Reveman <rev...@chromium.org>
            Gerrit-Reviewer: Ken Rockot <roc...@chromium.org>
            Gerrit-Reviewer: Kenneth Russell <k...@chromium.org>
            Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
            Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
            Gerrit-CC: Aaron Boodman <a...@chromium.org>
            Gerrit-CC: Commit Bot <commi...@chromium.org>
            Gerrit-CC: Darin Fisher <da...@chromium.org>
            Gerrit-CC: John Abd-El-Malek <j...@chromium.org>
            Gerrit-CC: Kalyan Kondapally <kalyan.k...@intel.com>
            Gerrit-CC: Robert Kroeger <rjkr...@chromium.org>
            Gerrit-Comment-Date: Wed, 01 Nov 2017 14:58:24 +0000
            Gerrit-HasComments: Yes
            Gerrit-HasLabels: Yes

            Klaus Weidner (Gerrit)

            unread,
            Nov 1, 2017, 1:24:34 PM11/1/17
            to Klaus Weidner, dari...@chromium.org, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, asvitki...@chromium.org, blundell+serv...@chromium.org, David Reveman, Kenneth Russell, Ken Rockot, Mark Mentovai, Daniel Cheng, John Abd-El-Malek, Commit Bot, Aaron Boodman, Darin Fisher, Kalyan Kondapally, Robert Kroeger, chromium...@chromium.org

            Patch Set 19: Code-Review+1

            (13 comments)

            LGTM with nits. Please have base::SharedMemory changes reviewed by base owner that is more familiar with that code before you land this.

            View Change

            13 comments:

              • nit: I assume this is only for testing? please remove this before you land the change

              • nit: not needed in new files

              • nit: not needed in new files

              • Done

              • nit: int result = base::AndroidH...

                Done, using lock_result and unlock_result (below) instead of reusing the same name.

              • Patch Set #19, Line 54: dwareBuffer* bu

              • nit: static_cast<void**>(&data)? or reinterpret_cast if needed..

              • Done (needs reinterpret_cast)

              • nit: kColor or maybe kTransparentBlack

                Done

            To view, visit change 680100. To unsubscribe, or for help writing mail filters, visit settings.

            Gerrit-Project: chromium/src
            Gerrit-Branch: master
            Gerrit-MessageType: comment
            Gerrit-Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
            Gerrit-Change-Number: 680100
            Gerrit-PatchSet: 20
            Gerrit-Owner: Klaus Weidner <kla...@chromium.org>
            Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
            Gerrit-Reviewer: David Reveman <rev...@chromium.org>
            Gerrit-Reviewer: Ken Rockot <roc...@chromium.org>
            Gerrit-Reviewer: Kenneth Russell <k...@chromium.org>
            Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
            Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
            Gerrit-CC: Aaron Boodman <a...@chromium.org>
            Gerrit-CC: Commit Bot <commi...@chromium.org>
            Gerrit-CC: Darin Fisher <da...@chromium.org>
            Gerrit-CC: John Abd-El-Malek <j...@chromium.org>
            Gerrit-CC: Kalyan Kondapally <kalyan.k...@intel.com>
            Gerrit-CC: Robert Kroeger <rjkr...@chromium.org>
            Gerrit-Comment-Date: Wed, 01 Nov 2017 17:24:30 +0000
            Gerrit-HasComments: Yes
            Gerrit-HasLabels: No

            Klaus Weidner (Gerrit)

            unread,
            Nov 1, 2017, 2:02:53 PM11/1/17
            to Klaus Weidner, dari...@chromium.org, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, asvitki...@chromium.org, blundell+serv...@chromium.org, David Reveman, Kenneth Russell, Ken Rockot, Mark Mentovai, Daniel Cheng, John Abd-El-Malek, Commit Bot, Aaron Boodman, Darin Fisher, Kalyan Kondapally, Robert Kroeger, chromium...@chromium.org

            rockot@: please review ipc/ipc_message_utils.cc

            kbr@: please review gpu/*/BUILD.gn and ui/gl/BUILD.gn

            mark@chromium: please review the base/ changes including shared_memory

            dcheng@: please review the IPC changes including ui/gfx/mojo/ (or shared memory also if you prefer? This overlaps with mark@chromium)

            Thanks in advance, and sorry about the noisy review so far.

            View Change

              To view, visit change 680100. To unsubscribe, or for help writing mail filters, visit settings.

              Gerrit-Project: chromium/src
              Gerrit-Branch: master
              Gerrit-MessageType: comment
              Gerrit-Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
              Gerrit-Change-Number: 680100
              Gerrit-PatchSet: 21
              Gerrit-Owner: Klaus Weidner <kla...@chromium.org>
              Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
              Gerrit-Reviewer: David Reveman <rev...@chromium.org>
              Gerrit-Reviewer: Ken Rockot <roc...@chromium.org>
              Gerrit-Reviewer: Kenneth Russell <k...@chromium.org>
              Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
              Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
              Gerrit-CC: Aaron Boodman <a...@chromium.org>
              Gerrit-CC: Commit Bot <commi...@chromium.org>
              Gerrit-CC: Darin Fisher <da...@chromium.org>
              Gerrit-CC: John Abd-El-Malek <j...@chromium.org>
              Gerrit-CC: Kalyan Kondapally <kalyan.k...@intel.com>
              Gerrit-CC: Robert Kroeger <rjkr...@chromium.org>
              Gerrit-Comment-Date: Wed, 01 Nov 2017 18:02:47 +0000
              Gerrit-HasComments: No
              Gerrit-HasLabels: No

              Ken Rockot (Gerrit)

              unread,
              Nov 1, 2017, 2:08:46 PM11/1/17
              to Klaus Weidner, dari...@chromium.org, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, asvitki...@chromium.org, blundell+serv...@chromium.org, Ken Rockot, David Reveman, Kenneth Russell, Mark Mentovai, Daniel Cheng, John Abd-El-Malek, Commit Bot, Aaron Boodman, Darin Fisher, Kalyan Kondapally, Robert Kroeger, chromium...@chromium.org

              ipc LGTM

              Patch set 21:Code-Review +1

              View Change

                To view, visit change 680100. To unsubscribe, or for help writing mail filters, visit settings.

                Gerrit-Project: chromium/src
                Gerrit-Branch: master
                Gerrit-MessageType: comment
                Gerrit-Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
                Gerrit-Change-Number: 680100
                Gerrit-PatchSet: 21
                Gerrit-Owner: Klaus Weidner <kla...@chromium.org>
                Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
                Gerrit-Reviewer: David Reveman <rev...@chromium.org>
                Gerrit-Reviewer: Ken Rockot <roc...@chromium.org>
                Gerrit-Reviewer: Kenneth Russell <k...@chromium.org>
                Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
                Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
                Gerrit-CC: Aaron Boodman <a...@chromium.org>
                Gerrit-CC: Commit Bot <commi...@chromium.org>
                Gerrit-CC: Darin Fisher <da...@chromium.org>
                Gerrit-CC: John Abd-El-Malek <j...@chromium.org>
                Gerrit-CC: Kalyan Kondapally <kalyan.k...@intel.com>
                Gerrit-CC: Robert Kroeger <rjkr...@chromium.org>
                Gerrit-Comment-Date: Wed, 01 Nov 2017 18:08:42 +0000
                Gerrit-HasComments: No
                Gerrit-HasLabels: Yes

                Kenneth Russell (Gerrit)

                unread,
                Nov 1, 2017, 3:08:47 PM11/1/17
                to Klaus Weidner, dari...@chromium.org, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, asvitki...@chromium.org, blundell+serv...@chromium.org, Ken Rockot, David Reveman, Mark Mentovai, Daniel Cheng, John Abd-El-Malek, Commit Bot, Aaron Boodman, Darin Fisher, Kalyan Kondapally, Robert Kroeger, chromium...@chromium.org

                various BUILD.gn files LGTM

                Patch set 21:Code-Review +1

                View Change

                  To view, visit change 680100. To unsubscribe, or for help writing mail filters, visit settings.

                  Gerrit-Project: chromium/src
                  Gerrit-Branch: master
                  Gerrit-MessageType: comment
                  Gerrit-Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
                  Gerrit-Change-Number: 680100
                  Gerrit-PatchSet: 21
                  Gerrit-Owner: Klaus Weidner <kla...@chromium.org>
                  Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
                  Gerrit-Reviewer: David Reveman <rev...@chromium.org>
                  Gerrit-Reviewer: Ken Rockot <roc...@chromium.org>
                  Gerrit-Reviewer: Kenneth Russell <k...@chromium.org>
                  Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
                  Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
                  Gerrit-CC: Aaron Boodman <a...@chromium.org>
                  Gerrit-CC: Commit Bot <commi...@chromium.org>
                  Gerrit-CC: Darin Fisher <da...@chromium.org>
                  Gerrit-CC: John Abd-El-Malek <j...@chromium.org>
                  Gerrit-CC: Kalyan Kondapally <kalyan.k...@intel.com>
                  Gerrit-CC: Robert Kroeger <rjkr...@chromium.org>
                  Gerrit-Comment-Date: Wed, 01 Nov 2017 19:08:43 +0000
                  Gerrit-HasComments: No
                  Gerrit-HasLabels: Yes

                  Mark Mentovai (Gerrit)

                  unread,
                  Nov 1, 2017, 6:24:32 PM11/1/17
                  to Klaus Weidner, dari...@chromium.org, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, asvitki...@chromium.org, blundell+serv...@chromium.org, Kenneth Russell, Ken Rockot, David Reveman, Daniel Cheng, John Abd-El-Malek, Commit Bot, Aaron Boodman, Darin Fisher, Kalyan Kondapally, Robert Kroeger, chromium...@chromium.org

                  View Change

                  5 comments:

                  • File base/memory/shared_memory_handle.h:

                    • Patch Set #22, Line 177: !defined(OS_WIN)

                      !defined(OS_WIN) is redundant, since OS_WIN is never OS_POSIX.

                    • Patch Set #22, Line 178: components

                      “components” sounds funny. Can’t you just call this a SharedMemoryHandle backed by a FileDescriptor?

                    • Patch Set #22, Line 181: Unfortunately

                      Is this advocating for or against a particular usage pattern? I can’t tell why this comment is here. This comment should tell me how to use the interface. Unless it’s very relevant, it shouldn’t opine on abuses of an interface, although it could say something like “this common pattern is bad, do that other thing instead.”

                    • Patch Set #22, Line 191: has no immediate consequence

                      This isn’t an interface contract. The caller is supposed to pass the correct size, period. If they don’t, all bets are off. I don’t think you need to say anything about “wrong |size|” at all.

                    • Patch Set #22, Line 224: union {

                      I’m a little fearful of this union. Some innocent person might want to make FileDescriptor non-POD.

                  To view, visit change 680100. To unsubscribe, or for help writing mail filters, visit settings.

                  Gerrit-Project: chromium/src
                  Gerrit-Branch: master
                  Gerrit-MessageType: comment
                  Gerrit-Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
                  Gerrit-Change-Number: 680100
                  Gerrit-PatchSet: 22
                  Gerrit-Owner: Klaus Weidner <kla...@chromium.org>
                  Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
                  Gerrit-Reviewer: David Reveman <rev...@chromium.org>
                  Gerrit-Reviewer: Ken Rockot <roc...@chromium.org>
                  Gerrit-Reviewer: Kenneth Russell <k...@chromium.org>
                  Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
                  Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
                  Gerrit-CC: Aaron Boodman <a...@chromium.org>
                  Gerrit-CC: Commit Bot <commi...@chromium.org>
                  Gerrit-CC: Darin Fisher <da...@chromium.org>
                  Gerrit-CC: John Abd-El-Malek <j...@chromium.org>
                  Gerrit-CC: Kalyan Kondapally <kalyan.k...@intel.com>
                  Gerrit-CC: Robert Kroeger <rjkr...@chromium.org>
                  Gerrit-Comment-Date: Wed, 01 Nov 2017 22:24:29 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-HasLabels: No

                  Klaus Weidner (Gerrit)

                  unread,
                  Nov 1, 2017, 6:46:58 PM11/1/17
                  to Klaus Weidner, dari...@chromium.org, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, asvitki...@chromium.org, blundell+serv...@chromium.org, Mark Mentovai, Kenneth Russell, Ken Rockot, David Reveman, Daniel Cheng, John Abd-El-Malek, Commit Bot, Aaron Boodman, Darin Fisher, Kalyan Kondapally, Robert Kroeger, chromium...@chromium.org

                  Please let me know if you want me to do more editing on the moved comment.

                  View Change

                  5 comments:

                    • Removed.

                    • Patch Set #22, Line 178: leDescript

                      “components” sounds funny. […]

                      Done. I didn't write this comment, it's just moved (from line 85 left side) as part of an attempt to unify the conditional sections.

                    • Patch Set #22, Line 181: mon for exist

                      Is this advocating for or against a particular usage pattern? I can’t tell why this comment is here. […]

                      See previous, I didn't write this comment. I'm interpreting it as a warning to not expect shared memory handles to work right when not following the usual "ok to copy, but only consume from it once" pattern, but I'm not entirely sure.

                    • Patch Set #22, Line 191: aredMemoryHandle at a later

                      This isn’t an interface contract. The caller is supposed to pass the correct size, period. […]

                      See previous - should I remove it?

                    • Patch Set #22, Line 224: struct AHardwareBuffer* memory_object_ = nullptr;

                    • I’m a little fearful of this union. Some innocent person might want to make FileDescriptor non-POD.

                    • Flattened into plain members. I was following the MacOS example, but I'm not sure I like it myself, and I doubt they are common enough for the memory savings to be worthwhile.

                  To view, visit change 680100. To unsubscribe, or for help writing mail filters, visit settings.

                  Gerrit-Project: chromium/src
                  Gerrit-Branch: master
                  Gerrit-MessageType: comment
                  Gerrit-Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
                  Gerrit-Change-Number: 680100
                  Gerrit-PatchSet: 23
                  Gerrit-Owner: Klaus Weidner <kla...@chromium.org>
                  Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
                  Gerrit-Reviewer: David Reveman <rev...@chromium.org>
                  Gerrit-Reviewer: Ken Rockot <roc...@chromium.org>
                  Gerrit-Reviewer: Kenneth Russell <k...@chromium.org>
                  Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
                  Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
                  Gerrit-CC: Aaron Boodman <a...@chromium.org>
                  Gerrit-CC: Commit Bot <commi...@chromium.org>
                  Gerrit-CC: Darin Fisher <da...@chromium.org>
                  Gerrit-CC: John Abd-El-Malek <j...@chromium.org>
                  Gerrit-CC: Kalyan Kondapally <kalyan.k...@intel.com>
                  Gerrit-CC: Robert Kroeger <rjkr...@chromium.org>
                  Gerrit-Comment-Date: Wed, 01 Nov 2017 22:46:52 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-HasLabels: No

                  Mark Mentovai (Gerrit)

                  unread,
                  Nov 1, 2017, 11:45:35 PM11/1/17
                  to Klaus Weidner, dari...@chromium.org, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, asvitki...@chromium.org, blundell+serv...@chromium.org, Kenneth Russell, Ken Rockot, David Reveman, Daniel Cheng, John Abd-El-Malek, Commit Bot, Aaron Boodman, Darin Fisher, Kalyan Kondapally, Robert Kroeger, chromium...@chromium.org

                  I’d prefer to see the comments improved as long as you’re in here moving them around, but LGTM either way.

                  Patch set 23:Code-Review +1

                  View Change

                  2 comments:

                  To view, visit change 680100. To unsubscribe, or for help writing mail filters, visit settings.

                  Gerrit-Project: chromium/src
                  Gerrit-Branch: master
                  Gerrit-MessageType: comment
                  Gerrit-Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
                  Gerrit-Change-Number: 680100
                  Gerrit-PatchSet: 23
                  Gerrit-Owner: Klaus Weidner <kla...@chromium.org>
                  Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
                  Gerrit-Reviewer: David Reveman <rev...@chromium.org>
                  Gerrit-Reviewer: Ken Rockot <roc...@chromium.org>
                  Gerrit-Reviewer: Kenneth Russell <k...@chromium.org>
                  Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
                  Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
                  Gerrit-CC: Aaron Boodman <a...@chromium.org>
                  Gerrit-CC: Commit Bot <commi...@chromium.org>
                  Gerrit-CC: Darin Fisher <da...@chromium.org>
                  Gerrit-CC: John Abd-El-Malek <j...@chromium.org>
                  Gerrit-CC: Kalyan Kondapally <kalyan.k...@intel.com>
                  Gerrit-CC: Robert Kroeger <rjkr...@chromium.org>
                  Gerrit-Comment-Date: Thu, 02 Nov 2017 03:45:32 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-HasLabels: Yes

                  Klaus Weidner (Gerrit)

                  unread,
                  Nov 2, 2017, 1:01:44 PM11/2/17
                  to Klaus Weidner, dari...@chromium.org, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, asvitki...@chromium.org, blundell+serv...@chromium.org, Mark Mentovai, Kenneth Russell, Ken Rockot, David Reveman, Daniel Cheng, John Abd-El-Malek, Commit Bot, Aaron Boodman, Darin Fisher, Kalyan Kondapally, Robert Kroeger, chromium...@chromium.org

                  dcheng@, PTAL?

                  View Change

                  2 comments:

                    • It doesn’t look like this affects anything here (but it’s also not actively harmful).

                    • I've added a comment. Removing it works also, but then it looks a bit strange without a C++ namespace, and using a namespace would be incompatible with the original header file which we're planning to switch to once the third_party NDK is updated. Currently, forward declarations elsewhere use "extern "C" typedef struct AHardwareBuffer AHardwareBuffer" which works with the original android/hardware_buffer.h.

                      (This file used to contain function declarations such as AHardwareBuffer_allocate where the "C" linkage would be important, but I switched to using member functions instead.)

                  • File base/memory/shared_memory_handle.h:

                    • In C++, you can just write AHardwareBuffer*, no extra struct needed.

                    • Removed the "struct" here and elsewhere.

                  To view, visit change 680100. To unsubscribe, or for help writing mail filters, visit settings.

                  Gerrit-Project: chromium/src
                  Gerrit-Branch: master
                  Gerrit-MessageType: comment
                  Gerrit-Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
                  Gerrit-Change-Number: 680100
                  Gerrit-PatchSet: 24
                  Gerrit-Owner: Klaus Weidner <kla...@chromium.org>
                  Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
                  Gerrit-Reviewer: David Reveman <rev...@chromium.org>
                  Gerrit-Reviewer: Ken Rockot <roc...@chromium.org>
                  Gerrit-Reviewer: Kenneth Russell <k...@chromium.org>
                  Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
                  Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
                  Gerrit-CC: Aaron Boodman <a...@chromium.org>
                  Gerrit-CC: Commit Bot <commi...@chromium.org>
                  Gerrit-CC: Darin Fisher <da...@chromium.org>
                  Gerrit-CC: John Abd-El-Malek <j...@chromium.org>
                  Gerrit-CC: Kalyan Kondapally <kalyan.k...@intel.com>
                  Gerrit-CC: Robert Kroeger <rjkr...@chromium.org>
                  Gerrit-Comment-Date: Thu, 02 Nov 2017 17:01:41 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-HasLabels: No

                  Daniel Cheng (Gerrit)

                  unread,
                  Nov 2, 2017, 1:46:05 PM11/2/17
                  to Klaus Weidner, dari...@chromium.org, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, asvitki...@chromium.org, blundell+serv...@chromium.org, Mark Mentovai, Kenneth Russell, Ken Rockot, David Reveman, John Abd-El-Malek, Commit Bot, Aaron Boodman, Darin Fisher, Kalyan Kondapally, Robert Kroeger, chromium...@chromium.org

                  Sorry for the review delay. Looks pretty good overall, just a few small nits.

                  View Change

                  10 comments:

                  To view, visit change 680100. To unsubscribe, or for help writing mail filters, visit settings.

                  Gerrit-Project: chromium/src
                  Gerrit-Branch: master
                  Gerrit-MessageType: comment
                  Gerrit-Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
                  Gerrit-Change-Number: 680100
                  Gerrit-PatchSet: 24
                  Gerrit-Owner: Klaus Weidner <kla...@chromium.org>
                  Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
                  Gerrit-Reviewer: David Reveman <rev...@chromium.org>
                  Gerrit-Reviewer: Ken Rockot <roc...@chromium.org>
                  Gerrit-Reviewer: Kenneth Russell <k...@chromium.org>
                  Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
                  Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
                  Gerrit-CC: Aaron Boodman <a...@chromium.org>
                  Gerrit-CC: Commit Bot <commi...@chromium.org>
                  Gerrit-CC: Darin Fisher <da...@chromium.org>
                  Gerrit-CC: John Abd-El-Malek <j...@chromium.org>
                  Gerrit-CC: Kalyan Kondapally <kalyan.k...@intel.com>
                  Gerrit-CC: Robert Kroeger <rjkr...@chromium.org>
                  Gerrit-Comment-Date: Thu, 02 Nov 2017 17:46:01 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-HasLabels: No

                  Klaus Weidner (Gerrit)

                  unread,
                  Nov 2, 2017, 4:24:16 PM11/2/17
                  to Klaus Weidner, dari...@chromium.org, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, asvitki...@chromium.org, blundell+serv...@chromium.org, Daniel Cheng, Mark Mentovai, Kenneth Russell, Ken Rockot, David Reveman, John Abd-El-Malek, Commit Bot, Aaron Boodman, Darin Fisher, Kalyan Kondapally, Robert Kroeger, chromium...@chromium.org

                  View Change

                  10 comments:

                    • Nit: I would personally find this condition clearer if is_posix was first.

                    • Nit: I would put the Type first (since it disambiguates the FileDescriptor argument)

                    • I'd prefer to keep this error visible in production builds since buffer allocation is something that could sometimes fail at runtime, i.e. due to lack of memory, and this message would be helpful in figuring out what's going on, especially since error handling in consumers of this may no longer refer to AHardwareBuffer specifically.

                      Is there documentation about logging best practices? My interpretation is that "shouldn't happen" logic errors should be DLOG while rare-but-possible runtime errors would be a candidate for keeping, but existing usage seems to vary.

                  • File gpu/ipc/service/gpu_memory_buffer_factory_android_hardware_buffer.cc:

                    • Any reason for LOG instead of DLOG?

                    • Please add an IPC_ENUM_TRAITS_MAX_VALUE() for this rather than casting to/from integer types.

                    • Nit: by ref, though the syntax looks kind of funny: const uint8_t (&color)[4]

                    • That's incompatible with existing usage in the template:

                      ../../ui/gl/test/gl_image_test_template.h:314:57: error: reference to type 'const uint8_t [4]' could not bind to an lvalue of type 'const uint8_t *' (aka 'const unsigned char *')
                      this->delegate_.CreateSolidColorImage(image_size, image_color);

                      Let me know if you feel strongly about changing it, this would require modifying the template and other tests.

                    • Nit: consider writing: […]

                      Done

                  To view, visit change 680100. To unsubscribe, or for help writing mail filters, visit settings.

                  Gerrit-Project: chromium/src
                  Gerrit-Branch: master
                  Gerrit-MessageType: comment
                  Gerrit-Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
                  Gerrit-Change-Number: 680100
                  Gerrit-PatchSet: 26
                  Gerrit-Owner: Klaus Weidner <kla...@chromium.org>
                  Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
                  Gerrit-Reviewer: David Reveman <rev...@chromium.org>
                  Gerrit-Reviewer: Ken Rockot <roc...@chromium.org>
                  Gerrit-Reviewer: Kenneth Russell <k...@chromium.org>
                  Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
                  Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
                  Gerrit-CC: Aaron Boodman <a...@chromium.org>
                  Gerrit-CC: Commit Bot <commi...@chromium.org>
                  Gerrit-CC: Darin Fisher <da...@chromium.org>
                  Gerrit-CC: John Abd-El-Malek <j...@chromium.org>
                  Gerrit-CC: Kalyan Kondapally <kalyan.k...@intel.com>
                  Gerrit-CC: Robert Kroeger <rjkr...@chromium.org>
                  Gerrit-Comment-Date: Thu, 02 Nov 2017 20:24:12 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-HasLabels: No

                  Klaus Weidner

                  unread,
                  Nov 2, 2017, 4:33:09 PM11/2/17
                  to change...@chromium-review.googlesource.com, Darin Fisher, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, asvitki...@chromium.org, blundell+serv...@chromium.org, Daniel Cheng, Mark Mentovai, Kenneth Russell, Ken Rockot, David Reveman, John Abd-El-Malek, Commit Bot, Aaron Boodman, Darin Fisher, Kalyan Kondapally, Robert Kroeger, chromium...@chromium.org
                  I still need to update the Read usage side for the new specialization, I'll do that next.

                  Klaus Weidner (Gerrit)

                  unread,
                  Nov 2, 2017, 4:33:27 PM11/2/17
                  to Klaus Weidner, dari...@chromium.org, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, asvitki...@chromium.org, blundell+serv...@chromium.org, Daniel Cheng, Mark Mentovai, Kenneth Russell, Ken Rockot, David Reveman, John Abd-El-Malek, Commit Bot, Aaron Boodman, Darin Fisher, Kalyan Kondapally, Robert Kroeger, chromium...@chromium.org

                  I still need to update the Read usage side for the new specialization, I'll do that next.

                  View Change

                    To view, visit change 680100. To unsubscribe, or for help writing mail filters, visit settings.

                    Gerrit-Project: chromium/src
                    Gerrit-Branch: master
                    Gerrit-MessageType: comment
                    Gerrit-Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
                    Gerrit-Change-Number: 680100
                    Gerrit-PatchSet: 26
                    Gerrit-Owner: Klaus Weidner <kla...@chromium.org>
                    Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
                    Gerrit-Reviewer: David Reveman <rev...@chromium.org>
                    Gerrit-Reviewer: Ken Rockot <roc...@chromium.org>
                    Gerrit-Reviewer: Kenneth Russell <k...@chromium.org>
                    Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
                    Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
                    Gerrit-CC: Aaron Boodman <a...@chromium.org>
                    Gerrit-CC: Commit Bot <commi...@chromium.org>
                    Gerrit-CC: Darin Fisher <da...@chromium.org>
                    Gerrit-CC: John Abd-El-Malek <j...@chromium.org>
                    Gerrit-CC: Kalyan Kondapally <kalyan.k...@intel.com>
                    Gerrit-CC: Robert Kroeger <rjkr...@chromium.org>
                    Gerrit-Comment-Date: Thu, 02 Nov 2017 20:33:20 +0000
                    Gerrit-HasComments: No
                    Gerrit-HasLabels: No

                    Daniel Cheng (Gerrit)

                    unread,
                    Nov 2, 2017, 4:50:24 PM11/2/17
                    to Klaus Weidner, dari...@chromium.org, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, asvitki...@chromium.org, blundell+serv...@chromium.org, Mark Mentovai, Kenneth Russell, Ken Rockot, David Reveman, John Abd-El-Malek, Commit Bot, Aaron Boodman, Darin Fisher, Kalyan Kondapally, Robert Kroeger, chromium...@chromium.org

                    Patch set 26:Code-Review +1

                    View Change

                    1 comment:

                    To view, visit change 680100. To unsubscribe, or for help writing mail filters, visit settings.

                    Gerrit-Project: chromium/src
                    Gerrit-Branch: master
                    Gerrit-MessageType: comment
                    Gerrit-Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
                    Gerrit-Change-Number: 680100
                    Gerrit-PatchSet: 26
                    Gerrit-Owner: Klaus Weidner <kla...@chromium.org>
                    Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
                    Gerrit-Reviewer: David Reveman <rev...@chromium.org>
                    Gerrit-Reviewer: Ken Rockot <roc...@chromium.org>
                    Gerrit-Reviewer: Kenneth Russell <k...@chromium.org>
                    Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
                    Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
                    Gerrit-CC: Aaron Boodman <a...@chromium.org>
                    Gerrit-CC: Commit Bot <commi...@chromium.org>
                    Gerrit-CC: Darin Fisher <da...@chromium.org>
                    Gerrit-CC: John Abd-El-Malek <j...@chromium.org>
                    Gerrit-CC: Kalyan Kondapally <kalyan.k...@intel.com>
                    Gerrit-CC: Robert Kroeger <rjkr...@chromium.org>
                    Gerrit-Comment-Date: Thu, 02 Nov 2017 20:50:20 +0000
                    Gerrit-HasComments: Yes
                    Gerrit-HasLabels: Yes

                    Klaus Weidner (Gerrit)

                    unread,
                    Nov 2, 2017, 5:10:07 PM11/2/17
                    to Klaus Weidner, dari...@chromium.org, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, asvitki...@chromium.org, blundell+serv...@chromium.org, Daniel Cheng, Mark Mentovai, Kenneth Russell, Ken Rockot, David Reveman, John Abd-El-Malek, Commit Bot, Aaron Boodman, Darin Fisher, Kalyan Kondapally, Robert Kroeger, chromium...@chromium.org

                    Patch set 27:Commit-Queue +2

                    View Change

                      To view, visit change 680100. To unsubscribe, or for help writing mail filters, visit settings.

                      Gerrit-Project: chromium/src
                      Gerrit-Branch: master
                      Gerrit-MessageType: comment
                      Gerrit-Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
                      Gerrit-Change-Number: 680100
                      Gerrit-PatchSet: 27
                      Gerrit-Owner: Klaus Weidner <kla...@chromium.org>
                      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
                      Gerrit-Reviewer: David Reveman <rev...@chromium.org>
                      Gerrit-Reviewer: Ken Rockot <roc...@chromium.org>
                      Gerrit-Reviewer: Kenneth Russell <k...@chromium.org>
                      Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
                      Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
                      Gerrit-CC: Aaron Boodman <a...@chromium.org>
                      Gerrit-CC: Commit Bot <commi...@chromium.org>
                      Gerrit-CC: Darin Fisher <da...@chromium.org>
                      Gerrit-CC: John Abd-El-Malek <j...@chromium.org>
                      Gerrit-CC: Kalyan Kondapally <kalyan.k...@intel.com>
                      Gerrit-CC: Robert Kroeger <rjkr...@chromium.org>
                      Gerrit-Comment-Date: Thu, 02 Nov 2017 21:10:01 +0000
                      Gerrit-HasComments: No
                      Gerrit-HasLabels: Yes

                      Commit Bot (Gerrit)

                      unread,
                      Nov 2, 2017, 5:11:09 PM11/2/17
                      to Klaus Weidner, dari...@chromium.org, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, asvitki...@chromium.org, blundell+serv...@chromium.org, Daniel Cheng, Mark Mentovai, Kenneth Russell, Ken Rockot, David Reveman, John Abd-El-Malek, Aaron Boodman, Darin Fisher, Kalyan Kondapally, Robert Kroeger, chromium...@chromium.org

                      CQ is trying the patch.

                      Note: The patchset sent to CQ was uploaded after this CL was approved.
                      "Fix android subtype read" https://chromium-review.googlesource.com/c/680100/27

                      Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/chromium-review.googlesource.com/680100/27

                      Bot data: {"action": "start", "triggered_at": "2017-11-02T21:10:01.0Z", "cq_cfg_revision": "31ea7a9a715f873162e3599a52d1ba915e17d54a", "revision": "fe2fcb4efc3224c38783478dd4a0e0f780596744"}

                      Gerrit-Comment-Date: Thu, 02 Nov 2017 21:11:06 +0000
                      Gerrit-HasComments: No
                      Gerrit-HasLabels: No

                      Commit Bot (Gerrit)

                      unread,
                      Nov 2, 2017, 11:22:55 PM11/2/17
                      to Klaus Weidner, dari...@chromium.org, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, asvitki...@chromium.org, blundell+serv...@chromium.org, Daniel Cheng, Mark Mentovai, Kenneth Russell, Ken Rockot, David Reveman, John Abd-El-Malek, Aaron Boodman, Darin Fisher, Kalyan Kondapally, Robert Kroeger, chromium...@chromium.org
                      Try jobs failed on following builders:
                      win7_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win7_chromium_rel_ng/builds/33907)

                      View Change

                        To view, visit change 680100. To unsubscribe, or for help writing mail filters, visit settings.

                        Gerrit-Project: chromium/src
                        Gerrit-Branch: master
                        Gerrit-MessageType: comment
                        Gerrit-Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
                        Gerrit-Change-Number: 680100
                        Gerrit-PatchSet: 27
                        Gerrit-Owner: Klaus Weidner <kla...@chromium.org>
                        Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
                        Gerrit-Reviewer: David Reveman <rev...@chromium.org>
                        Gerrit-Reviewer: Ken Rockot <roc...@chromium.org>
                        Gerrit-Reviewer: Kenneth Russell <k...@chromium.org>
                        Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
                        Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
                        Gerrit-CC: Aaron Boodman <a...@chromium.org>
                        Gerrit-CC: Commit Bot <commi...@chromium.org>
                        Gerrit-CC: Darin Fisher <da...@chromium.org>
                        Gerrit-CC: John Abd-El-Malek <j...@chromium.org>
                        Gerrit-CC: Kalyan Kondapally <kalyan.k...@intel.com>
                        Gerrit-CC: Robert Kroeger <rjkr...@chromium.org>
                        Gerrit-Comment-Date: Fri, 03 Nov 2017 03:22:53 +0000
                        Gerrit-HasComments: No
                        Gerrit-HasLabels: No

                        Klaus Weidner (Gerrit)

                        unread,
                        Nov 2, 2017, 11:46:58 PM11/2/17
                        to Klaus Weidner, dari...@chromium.org, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, asvitki...@chromium.org, blundell+serv...@chromium.org, Daniel Cheng, Mark Mentovai, Kenneth Russell, Ken Rockot, David Reveman, John Abd-El-Malek, Commit Bot, Aaron Boodman, Darin Fisher, Kalyan Kondapally, Robert Kroeger, chromium...@chromium.org

                        Patch set 27:Commit-Queue +2

                        View Change

                          To view, visit change 680100. To unsubscribe, or for help writing mail filters, visit settings.

                          Gerrit-Project: chromium/src
                          Gerrit-Branch: master
                          Gerrit-MessageType: comment
                          Gerrit-Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
                          Gerrit-Change-Number: 680100
                          Gerrit-PatchSet: 27
                          Gerrit-Owner: Klaus Weidner <kla...@chromium.org>
                          Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
                          Gerrit-Reviewer: David Reveman <rev...@chromium.org>
                          Gerrit-Reviewer: Ken Rockot <roc...@chromium.org>
                          Gerrit-Reviewer: Kenneth Russell <k...@chromium.org>
                          Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
                          Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
                          Gerrit-CC: Aaron Boodman <a...@chromium.org>
                          Gerrit-CC: Commit Bot <commi...@chromium.org>
                          Gerrit-CC: Darin Fisher <da...@chromium.org>
                          Gerrit-CC: John Abd-El-Malek <j...@chromium.org>
                          Gerrit-CC: Kalyan Kondapally <kalyan.k...@intel.com>
                          Gerrit-CC: Robert Kroeger <rjkr...@chromium.org>
                          Gerrit-Comment-Date: Fri, 03 Nov 2017 03:46:55 +0000
                          Gerrit-HasComments: No
                          Gerrit-HasLabels: Yes

                          Commit Bot (Gerrit)

                          unread,
                          Nov 2, 2017, 11:47:04 PM11/2/17
                          to Klaus Weidner, dari...@chromium.org, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, asvitki...@chromium.org, blundell+serv...@chromium.org, Daniel Cheng, Mark Mentovai, Kenneth Russell, Ken Rockot, David Reveman, John Abd-El-Malek, Aaron Boodman, Darin Fisher, Kalyan Kondapally, Robert Kroeger, chromium...@chromium.org

                          CQ is trying the patch.

                          Note: The patchset sent to CQ was uploaded after this CL was approved.
                          "Fix android subtype read" https://chromium-review.googlesource.com/c/680100/27

                          Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/chromium-review.googlesource.com/680100/27

                          Bot data: {"action": "start", "triggered_at": "2017-11-03T03:46:55.0Z", "cq_cfg_revision": "31ea7a9a715f873162e3599a52d1ba915e17d54a", "revision": "fe2fcb4efc3224c38783478dd4a0e0f780596744"}

                          Gerrit-Comment-Date: Fri, 03 Nov 2017 03:47:01 +0000
                          Gerrit-HasComments: No
                          Gerrit-HasLabels: No

                          Commit Bot (Gerrit)

                          unread,
                          Nov 3, 2017, 2:25:03 AM11/3/17
                          to Klaus Weidner, dari...@chromium.org, gavinp...@chromium.org, ozone-...@chromium.org, piman...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, vmpstr...@chromium.org, asvitki...@chromium.org, blundell+serv...@chromium.org, Daniel Cheng, Mark Mentovai, Kenneth Russell, Ken Rockot, David Reveman, John Abd-El-Malek, Aaron Boodman, Darin Fisher, Kalyan Kondapally, Robert Kroeger, chromium...@chromium.org

                          Commit Bot merged this change.

                          View Change

                          Approvals: David Reveman: Looks good to me Daniel Cheng: Looks good to me Ken Rockot: Looks good to me Kenneth Russell: Looks good to me Mark Mentovai: Looks good to me Klaus Weidner: Commit
                          AHardwareBuffer-based GpuMemoryBuffer implementation


                          AHardwareBuffer support is included on Android O and up. The NDK
                          functions are included as of platform level 26, but Chromium currently
                          doesn't use this as the target level, so we have to use dynamic
                          loading to get the symbols at runtime.

                          This is encapsulated in gfx::AndroidHardwareBufferCompat which makes
                          it a bit easier to work with them across Android versions.

                          The implementation adds a new ANDROID_HARDWARE_BUFFER subtype to the
                          SharedMemoryHandle Android implementation in addition to the pre-existing
                          ashmem support, including IPC transport via a SocketPair. It uses one end
                          to write the native object using a NDK call, and the other end is a file
                          descriptor sendable via usual IPC methods from which the receiver can fetch
                          the object.

                          BUG=761432

                          Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
                          Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
                          Reviewed-on: https://chromium-review.googlesource.com/680100
                          Commit-Queue: Klaus Weidner <kla...@chromium.org>
                          Reviewed-by: Daniel Cheng <dch...@chromium.org>
                          Reviewed-by: Mark Mentovai <ma...@chromium.org>
                          Reviewed-by: Ken Rockot <roc...@chromium.org>
                          Reviewed-by: Kenneth Russell <k...@chromium.org>
                          Reviewed-by: David Reveman <rev...@chromium.org>
                          Cr-Commit-Position: refs/heads/master@{#513710}
                          ---
                          M base/BUILD.gn
                          A base/android/android_hardware_buffer_abi.h
                          A base/android/android_hardware_buffer_compat.cc
                          A base/android/android_hardware_buffer_compat.h
                          M base/android/build_info.h
                          M base/memory/shared_memory_handle.h
                          A base/memory/shared_memory_handle_android.cc
                          M gpu/BUILD.gn
                          M gpu/ipc/client/BUILD.gn
                          M gpu/ipc/client/gpu_memory_buffer_impl.cc
                          A gpu/ipc/client/gpu_memory_buffer_impl_android_hardware_buffer.cc
                          A gpu/ipc/client/gpu_memory_buffer_impl_android_hardware_buffer.h
                          A gpu/ipc/client/gpu_memory_buffer_impl_android_hardware_buffer_unittest.cc
                          M gpu/ipc/common/gpu_memory_buffer_support.cc
                          M gpu/ipc/host/gpu_memory_buffer_support.cc
                          M gpu/ipc/service/BUILD.gn
                          M gpu/ipc/service/gpu_memory_buffer_factory.cc
                          A gpu/ipc/service/gpu_memory_buffer_factory_android_hardware_buffer.cc
                          A gpu/ipc/service/gpu_memory_buffer_factory_android_hardware_buffer.h
                          M ipc/ipc_message_utils.cc
                          M ipc/ipc_message_utils.h
                          M ui/gfx/gpu_memory_buffer.cc
                          M ui/gfx/gpu_memory_buffer.h
                          M ui/gfx/mojo/buffer_types.mojom
                          M ui/gfx/mojo/buffer_types_struct_traits.cc
                          M ui/gfx/mojo/buffer_types_struct_traits.h
                          M ui/gl/BUILD.gn
                          A ui/gl/gl_image_ahardwarebuffer.cc
                          A ui/gl/gl_image_ahardwarebuffer.h
                          A ui/gl/gl_image_ahardwarebuffer_unittest.cc
                          M ui/gl/gl_image_egl.h
                          31 files changed, 1,272 insertions(+), 42 deletions(-)


                          To view, visit change 680100. To unsubscribe, or for help writing mail filters, visit settings.

                          Gerrit-Project: chromium/src
                          Gerrit-Branch: master
                          Gerrit-MessageType: merged
                          Gerrit-Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
                          Gerrit-Change-Number: 680100
                          Gerrit-PatchSet: 28
                          Gerrit-Owner: Klaus Weidner <kla...@chromium.org>
                          Gerrit-Reviewer: Commit Bot <commi...@chromium.org>
                          Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
                          Gerrit-Reviewer: David Reveman <rev...@chromium.org>
                          Gerrit-Reviewer: Ken Rockot <roc...@chromium.org>
                          Gerrit-Reviewer: Kenneth Russell <k...@chromium.org>
                          Gerrit-Reviewer: Klaus Weidner <kla...@chromium.org>
                          Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
                          Gerrit-CC: Aaron Boodman <a...@chromium.org>
                          Reply all
                          Reply to author
                          Forward
                          0 new messages