<?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>224526</bug_id>
          
          <creation_ts>2021-04-13 20:55:17 -0700</creation_ts>
          <short_desc>Disable hardware JPEG decoding on x86 Mac for WK1</short_desc>
          <delta_ts>2021-05-05 12:36:27 -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>Images</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=216377</see_also>
          <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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Said Abou-Hallawa">sabouhallawa</reporter>
          <assigned_to name="Said Abou-Hallawa">sabouhallawa</assigned_to>
          <cc>sam</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1749988</commentid>
    <comment_count>0</comment_count>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2021-04-13 20:55:17 -0700</bug_when>
    <thetext>Similar to bug 216377, we need to disable hardware JPEG decoding on x86 Mac for WK1 also. Some of the pre-installed apps, which use WK1, have experienced perf regression because of hardware JPEG decoding. WebKit does not own the decision whether an image is worth hardware decoding or not. This decision depends on heuristics which are run by system underlying frameworks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1749993</commentid>
    <comment_count>1</comment_count>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2021-04-13 21:05:00 -0700</bug_when>
    <thetext>&lt;rdar://74939829&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1749994</commentid>
    <comment_count>2</comment_count>
      <attachid>425948</attachid>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2021-04-13 21:09:11 -0700</bug_when>
    <thetext>Created attachment 425948
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1750450</commentid>
    <comment_count>3</comment_count>
      <attachid>425948</attachid>
    <who name="Sam Weinig">sam</who>
    <bug_when>2021-04-14 19:40:04 -0700</bug_when>
    <thetext>Comment on attachment 425948
Patch

Will this disable it for the whole process? Or just WebKit’s uses?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1750880</commentid>
    <comment_count>4</comment_count>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2021-04-15 18:29:08 -0700</bug_when>
    <thetext>I think it will disable if for the whole process. The image decoding happens underneath WebKit. The only way to disable the HW decoding is do this globally. Do you think there will be a problem with doing this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1751445</commentid>
    <comment_count>5</comment_count>
      <attachid>425948</attachid>
    <who name="Sam Weinig">sam</who>
    <bug_when>2021-04-17 12:03:14 -0700</bug_when>
    <thetext>Comment on attachment 425948
Patch

You need to do this without effecting the whole process. Loading WebKit should not change the behavior of code / frameworks that happen to be running in the same app.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1751446</commentid>
    <comment_count>6</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2021-04-17 12:04:03 -0700</bug_when>
    <thetext>(In reply to Said Abou-Hallawa from comment #4)
&gt; I think it will disable if for the whole process. The image decoding happens
&gt; underneath WebKit. The only way to disable the HW decoding is do this
&gt; globally. Do you think there will be a problem with doing this?

Yep. We really can&apos;t do that. You will need to ask for API/SPI to disable it on a per-call basis.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1757036</commentid>
    <comment_count>7</comment_count>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2021-05-05 12:36:27 -0700</bug_when>
    <thetext>(In reply to Sam Weinig from comment #6)
&gt; (In reply to Said Abou-Hallawa from comment #4)
&gt; &gt; I think it will disable if for the whole process. The image decoding happens
&gt; &gt; underneath WebKit. The only way to disable the HW decoding is do this
&gt; &gt; globally. Do you think there will be a problem with doing this?
&gt; 
&gt; Yep. We really can&apos;t do that. You will need to ask for API/SPI to disable it
&gt; on a per-call basis.

I agree. I think the approach of this patch is incorrect.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>425948</attachid>
            <date>2021-04-13 21:09:11 -0700</date>
            <delta_ts>2021-04-17 12:03:14 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-224526-20210413210910.patch</filename>
            <type>text/plain</type>
            <size>2153</size>
            <attacher name="Said Abou-Hallawa">sabouhallawa</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjc1ODkzCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViS2l0TGVn
YWN5L21hYy9DaGFuZ2VMb2cgYi9Tb3VyY2UvV2ViS2l0TGVnYWN5L21hYy9DaGFuZ2VMb2cKaW5k
ZXggY2I3MThkZGQ0OWJlNTcwNDBiZjY2M2RlNGFkMGE1OGNlZGM1YmM2Mi4uMWZmNTk0NDMwYmE0
ZmQ2ZjlhZjA1ZTYzM2UzMzA2ODk5YmVjNThiYSAxMDA2NDQKLS0tIGEvU291cmNlL1dlYktpdExl
Z2FjeS9tYWMvQ2hhbmdlTG9nCisrKyBiL1NvdXJjZS9XZWJLaXRMZWdhY3kvbWFjL0NoYW5nZUxv
ZwpAQCAtMSwzICsxLDIwIEBACisyMDIxLTA0LTEzICBTYWlkIEFib3UtSGFsbGF3YSAgPHNhaWRA
YXBwbGU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FBB
TDo6c29mdExpbmtNZWRpYVRvb2xib3hGaWdQaG90b0RlY29tcHJlc3Npb25TZXRIYXJkd2FyZUN1
dG9mZihrUEFMRmlnUGhvdG9Db250YWluZXJGb3JtYXRfSkZJRiwgSU5UX01BWCk7CisjZW5kaWYK
IH0KIAogLSAoaWQpX2luaXRXaXRoRnJhbWU6KE5TUmVjdClmIGZyYW1lTmFtZTooTlNTdHJpbmcg
KilmcmFtZU5hbWUgZ3JvdXBOYW1lOihOU1N0cmluZyAqKWdyb3VwTmFtZQo=
</data>
<flag name="review"
          id="446065"
          type_id="1"
          status="-"
          setter="sam"
    />
    <flag name="commit-queue"
          id="446079"
          type_id="3"
          status="-"
          setter="ews-feeder"
    />
          </attachment>
      

    </bug>

</bugzilla>