<?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>215300</bug_id>
          
          <creation_ts>2020-08-07 16:26:24 -0700</creation_ts>
          <short_desc>Address additional review feedback from r265360</short_desc>
          <delta_ts>2020-08-14 16:27:40 -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>Canvas</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>ASSIGNED</bug_status>
          <resolution></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>
          <dependson>183438</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Kenneth Russell">kbr</reporter>
          <assigned_to name="Kenneth Russell">kbr</assigned_to>
          <cc>dino</cc>
    
    <cc>jdarpinian</cc>
    
    <cc>sabouhallawa</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1678810</commentid>
    <comment_count>0</comment_count>
    <who name="Kenneth Russell">kbr</who>
    <bug_when>2020-08-07 16:26:24 -0700</bug_when>
    <thetext>From Bug 183438:

- Refactor copyPremultipliedToPremultiplied and copyUnpremultipliedToUnpremultiplied in Source/WebCore/platform/graphics/ImageBufferBackend.cpp .

- Remove comment which was added in place of the previous assert in copyImagePixelsAccelerated in Source/WebCore/platform/graphics/cg/ImageBufferCGBackend.cpp .</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1679246</commentid>
    <comment_count>1</comment_count>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2020-08-10 16:30:41 -0700</bug_when>
    <thetext>Also

- The members: m_originClean, m_premultiplyAlpha and m_forciblyPremultiplyAlpha of ImageBitmap can be replaced by ImageBuffer::SerializationState. This will eliminate the need to sync the members of ImageBitmap and ImageBuffer::SerializationState. Also the whole struct can be copied in many places from std::pair&lt;std::unique_ptr&lt;ImageBuffer&gt;, ImageBuffer::SerializationState&gt; to ImageBitmap and vice versa.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1679758</commentid>
    <comment_count>2</comment_count>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2020-08-12 10:19:13 -0700</bug_when>
    <thetext>Another approach is to make SerializationState enum class type and have an OptionSet&lt; SerializationState&gt; be stored in ImageBitmap:

enum class SerializationState {
    OriginClean = 1 &lt;&lt; 0,
    PremultiplyAlpha = 1 &lt;&lt; 1,
    ForciblyPremultiplyAlpha = 1 &lt;&lt; 2,
};


class ImageBitmap {
public:
    bool originClean() const { return m_serializationState.contains(SerializationState::OriginClean); }

private:
    OptionSet&lt;SerializationState&gt; m_serializationState;
};</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1680515</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2020-08-14 16:27:40 -0700</bug_when>
    <thetext>&lt;rdar://problem/67105644&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>