<?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>287265</bug_id>
          
          <creation_ts>2025-02-07 10:31:48 -0800</creation_ts>
          <short_desc>[HDR] Separate &quot;is showing HDR&quot; from screenContentsFormat()</short_desc>
          <delta_ts>2025-02-19 17:51:01 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Images</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>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>282299</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Said Abou-Hallawa">sabouhallawa</reporter>
          <assigned_to name="Said Abou-Hallawa">sabouhallawa</assigned_to>
          <cc>sabouhallawa</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2092874</commentid>
    <comment_count>0</comment_count>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2025-02-07 10:31:48 -0800</bug_when>
    <thetext>This function is a little confusing. It returns the best screen ContentsFormat for a given optional layer. I think the right design for this is

1. screenContentsFormat() should renamed screenContentsFormats() and it should return OptionSet&lt;ContentsFormat&gt;. The screen is capable of supporting multiple ContentsFormat. The layer should picks whatever suits it.

2. A new static function is added called PlatformCALayer::contentsFormatForLayer(). It will return the best screen ContentsFormat for a given optional layer. This function will call screenContentsFormats() and it will checks whether the PlatformCALayerClient wants to show HDR or not. If it does and the screen support RGBA16F, it will return RGBA16F.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2092875</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2025-02-07 10:32:06 -0800</bug_when>
    <thetext>&lt;rdar://problem/144396500&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2092881</commentid>
    <comment_count>2</comment_count>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2025-02-07 10:38:26 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/40225</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2093082</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-02-07 19:04:53 -0800</bug_when>
    <thetext>Committed 290069@main (01e5e2df42c3): &lt;https://commits.webkit.org/290069@main&gt;

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

    </bug>

</bugzilla>