<?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>42300</bug_id>
          
          <creation_ts>2010-07-14 16:05:04 -0700</creation_ts>
          <short_desc>Canvas: Don&apos;t add shadow rect to dirty region when shadow alpha is 0</short_desc>
          <delta_ts>2010-07-14 16:28:16 -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>WebCore Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Performance</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Andreas Kling">kling</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>oliver</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>251491</commentid>
    <comment_count>0</comment_count>
    <who name="Andreas Kling">kling</who>
    <bug_when>2010-07-14 16:05:04 -0700</bug_when>
    <thetext>CanvasRenderingContext2D::willDraw() will always add the current shadow rect to the dirty region.
We can skip this if the current shadow color has a zero alpha value.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>251494</commentid>
    <comment_count>1</comment_count>
      <attachid>61578</attachid>
    <who name="Andreas Kling">kling</who>
    <bug_when>2010-07-14 16:06:14 -0700</bug_when>
    <thetext>Created attachment 61578
Proposed patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>251500</commentid>
    <comment_count>2</comment_count>
      <attachid>61578</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2010-07-14 16:14:27 -0700</bug_when>
    <thetext>Comment on attachment 61578
Proposed patch

It’s unfortunate we have to construct a Color just to check the alpha channel. That’s going to cost some actual instructions and CPU time. Maybe we should have more functions that operate directly on RGBA32 values.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>251503</commentid>
    <comment_count>3</comment_count>
    <who name="Andreas Kling">kling</who>
    <bug_when>2010-07-14 16:25:22 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 61578 [details])
&gt; It’s unfortunate we have to construct a Color just to check the alpha channel. That’s going to cost some actual instructions and CPU time. Maybe we should have more functions that operate directly on RGBA32 values.

Agreed. Coming soon in a separate patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>251505</commentid>
    <comment_count>4</comment_count>
      <attachid>61578</attachid>
    <who name="Andreas Kling">kling</who>
    <bug_when>2010-07-14 16:28:06 -0700</bug_when>
    <thetext>Comment on attachment 61578
Proposed patch

Clearing flags on attachment: 61578

Committed r63370: &lt;http://trac.webkit.org/changeset/63370&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>251506</commentid>
    <comment_count>5</comment_count>
    <who name="Andreas Kling">kling</who>
    <bug_when>2010-07-14 16:28:16 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>61578</attachid>
            <date>2010-07-14 16:06:14 -0700</date>
            <delta_ts>2010-07-14 16:28:06 -0700</delta_ts>
            <desc>Proposed patch</desc>
            <filename>bug-42300.diff</filename>
            <type>text/plain</type>
            <size>1254</size>
            <attacher name="Andreas Kling">kling</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1dlYkNvcmUvQ2hhbmdlTG9nIGIvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXgg
YzlmNmMz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