<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>294317</bug_id>
          
          <creation_ts>2025-06-11 04:28:45 -0700</creation_ts>
          <short_desc>[WPEPlatform] Introduce support for Android&apos;s AHardwareBuffer</short_desc>
          <delta_ts>2025-08-13 01:22:51 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WPE WebKit</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>294318</blocked>
    
    <blocked>294322</blocked>
    
    <blocked>297316</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Adrian Perez">aperez</reporter>
          <assigned_to name="Adrian Perez">aperez</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>cgarcia</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2122974</commentid>
    <comment_count>0</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2025-06-11 04:28:45 -0700</bug_when>
    <thetext>The same way we have a WPEBufferDMABuf, we would want to have a WPEBuffer subclass to wrap Android&apos;s AHardwareBuffer. 

One question is what to do when building for non-Android systems. One option is to have the implementation contain stubs that error out, the other to avoid building the Android-specific code at all.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2122975</commentid>
    <comment_count>1</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2025-06-11 04:43:14 -0700</bug_when>
    <thetext>What we do for the builtin platforms, that are optional and have public API, is that and ifdef is needed to use them, see WPEConfig.h.in where we define (or not) WPE_PLATFORM_WAYLAND, WPE_PLATFORM_DRM and WPE_PLATFORM_HEADLESS. So, to use for example wpe_screen_drm_get_crtc_index() in DisplayVBlankMonitorDRM.cpp we need to add #ifdef WPE_PLATFORM_DRM. This could be something similar.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2122976</commentid>
    <comment_count>2</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2025-06-11 04:48:11 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/46598</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2122977</commentid>
    <comment_count>3</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2025-06-11 04:49:29 -0700</bug_when>
    <thetext>(In reply to Carlos Garcia Campos from comment #1)
&gt; What we do for the builtin platforms, that are optional and have public API,
&gt; is that and ifdef is needed to use them, see WPEConfig.h.in where we define
&gt; (or not) WPE_PLATFORM_WAYLAND, WPE_PLATFORM_DRM and WPE_PLATFORM_HEADLESS.
&gt; So, to use for example wpe_screen_drm_get_crtc_index() in
&gt; DisplayVBlankMonitorDRM.cpp we need to add #ifdef WPE_PLATFORM_DRM. This
&gt; could be something similar.

Thanks for the pointer, I&apos;ll take a look. For now I have posted the PR as a draft and will update it when I have the needed changes applied.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2136149</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-08-13 01:22:47 -0700</bug_when>
    <thetext>Committed 298619@main (fd72faeef06a): &lt;https://commits.webkit.org/298619@main&gt;

Reviewed commits have been landed. Closing PR #46598 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>