<?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>94400</bug_id>
          
          <creation_ts>2012-08-17 17:17:00 -0700</creation_ts>
          <short_desc>[chromium] Random noise around text in FPS HUD</short_desc>
          <delta_ts>2023-03-09 12:22:19 -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>WebCore Misc.</component>
          <version>528+ (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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Vangelis Kokkevis">vangelis</reporter>
          <assigned_to name="Vangelis Kokkevis">vangelis</assigned_to>
          <cc>cc-bugs</cc>
    
    <cc>jamesr</cc>
    
    <cc>kbr</cc>
    
    <cc>waleedsattar5</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>698818</commentid>
    <comment_count>0</comment_count>
    <who name="Vangelis Kokkevis">vangelis</who>
    <bug_when>2012-08-17 17:17:00 -0700</bug_when>
    <thetext>This is the result of an missing clear operation in the canvas used to store the text atlas.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>698834</commentid>
    <comment_count>1</comment_count>
      <attachid>159240</attachid>
    <who name="Vangelis Kokkevis">vangelis</who>
    <bug_when>2012-08-17 17:26:41 -0700</bug_when>
    <thetext>Created attachment 159240
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>698844</commentid>
    <comment_count>2</comment_count>
      <attachid>159240</attachid>
    <who name="James Robinson">jamesr</who>
    <bug_when>2012-08-17 17:38:12 -0700</bug_when>
    <thetext>Comment on attachment 159240
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=159240&amp;action=review

&gt; Source/WebCore/platform/graphics/chromium/CompositorHUDFontAtlas.cpp:68
&gt;      atlasContext.setFillColor(Color(0, 0, 0, 0), ColorSpaceDeviceRGB);
&gt; -    atlasContext.fillRect(FloatRect(0, 0, ATLAS_SIZE, ATLAS_SIZE));
&gt; +    atlasContext.clearRect(FloatRect(0, 0, ATLAS_SIZE, ATLAS_SIZE));

how is clearRect() different from fillRect() with color(0, 0, 0, 0) ?

do you still want to set the fill color when calling clearRect()?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>698866</commentid>
    <comment_count>3</comment_count>
    <who name="Vangelis Kokkevis">vangelis</who>
    <bug_when>2012-08-17 18:07:22 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 159240 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=159240&amp;action=review
&gt; 
&gt; &gt; Source/WebCore/platform/graphics/chromium/CompositorHUDFontAtlas.cpp:68
&gt; &gt;      atlasContext.setFillColor(Color(0, 0, 0, 0), ColorSpaceDeviceRGB);
&gt; &gt; -    atlasContext.fillRect(FloatRect(0, 0, ATLAS_SIZE, ATLAS_SIZE));
&gt; &gt; +    atlasContext.clearRect(FloatRect(0, 0, ATLAS_SIZE, ATLAS_SIZE));
&gt; 
&gt; how is clearRect() different from fillRect() with color(0, 0, 0, 0) ?

The default transfer mode for GC is &quot;source-over&quot; (essentially a blend with whatever was in the background) which means with fillRect we&apos;re drawing a transparent rect over whatever was already there, which has no effect. 

clearRect sets the transfer mode to clear which does the job.

&gt; 
&gt; do you still want to set the fill color when calling clearRect()?

It&apos;s used by the Skia code when setting the paint, so I assume that yes, it&apos;s needed. Presumably you could clear to any color.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>698891</commentid>
    <comment_count>4</comment_count>
      <attachid>159240</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-08-17 19:07:14 -0700</bug_when>
    <thetext>Comment on attachment 159240
Patch

Clearing flags on attachment: 159240

Committed r125961: &lt;http://trac.webkit.org/changeset/125961&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>698892</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-08-17 19:07:17 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>159240</attachid>
            <date>2012-08-17 17:26:41 -0700</date>
            <delta_ts>2012-08-17 19:07:14 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-94400-20120817172604.patch</filename>
            <type>text/plain</type>
            <size>1554</size>
            <attacher name="Vangelis Kokkevis">vangelis</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDEyNTk1MykKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE3IEBACisyMDEyLTA4LTE3ICBWYW5nZWxp
cyBLb2trZXZpcyAgPHZhbmdlbGlzQGNocm9taXVtLm9yZz4KKworICAgICAgICBbY2hyb21pdW1d
IEZpeCByYW5kb20gbm9pc2UgYXJvdW5kIHRleHQgaW4gRlBTIEhVRC4KKyAgICAgICAgaHR0cHM6
Ly9idWdzLndlYmtpdC5vcmcvc2hv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bGVhciB0aGUgZW50aXJlIHRl
eHR1cmUgYXRsYXMgdG8gdHJhbnNwYXJlbnQgYmVmb3JlIGRyYXdpbmcgZm9udHMuCiAgICAgYXRs
YXNDb250ZXh0LnNldEZpbGxDb2xvcihDb2xvcigwLCAwLCAwLCAwKSwgQ29sb3JTcGFjZURldmlj
ZVJHQik7Ci0gICAgYXRsYXNDb250ZXh0LmZpbGxSZWN0KEZsb2F0UmVjdCgwLCAwLCBBVExBU19T
SVpFLCBBVExBU19TSVpFKSk7CisgICAgYXRsYXNDb250ZXh0LmNsZWFyUmVjdChGbG9hdFJlY3Qo
MCwgMCwgQVRMQVNfU0laRSwgQVRMQVNfU0laRSkpOwogCiAgICAgLy8gRklYTUU6IG1vbm9zcGFj
ZSBmb250IGRvZXMgbm90IHdvcmsgYXMgZXhwZWN0ZWQuCiAgICAgRm9udERlc2NyaXB0aW9uIGZv
bnREZXNjcmlwdGlvbjsK
</data>

          </attachment>
      

    </bug>

</bugzilla>