<?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>94246</bug_id>
          
          <creation_ts>2012-08-16 13:30:52 -0700</creation_ts>
          <short_desc>[Chromium] Uint8ClampedArray fast path rounds incorrectly</short_desc>
          <delta_ts>2012-09-19 00:10:50 -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>WebGL</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="Dominik Röttsches (drott)">d-r</reporter>
          <assigned_to name="Ulan Degenbaev">ulan</assigned_to>
          <cc>abarth</cc>
    
    <cc>code.vineet</cc>
    
    <cc>danno</cc>
    
    <cc>dpranke</cc>
    
    <cc>kbr</cc>
    
    <cc>ulan</cc>
    
    <cc>zmo</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>697442</commentid>
    <comment_count>0</comment_count>
    <who name="Dominik Röttsches (drott)">d-r</who>
    <bug_when>2012-08-16 13:30:52 -0700</bug_when>
    <thetext>When analysing two philip canvas tests I found that the ArrayBuffer bindings in Chromium have a fast path (ExternalArray) using ArrayBuffer&apos;s baseAddress to set indexed properties directly. This fast path does not use the same rounding (round to nearest, even in halfway case, equivalent to lrint()) that was put in place now for Uint8ClampedArray::set in order to adhere to the spec. For 2d.imageData.object.round.html to pass on Chromium, this needs to be fixed. More info in bug 40272.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>697657</commentid>
    <comment_count>1</comment_count>
    <who name="Kenneth Russell">kbr</who>
    <bug_when>2012-08-16 16:31:56 -0700</bug_when>
    <thetext>Could you please provide a test case which demonstrates the problem?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>697714</commentid>
    <comment_count>2</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-08-16 17:20:29 -0700</bug_when>
    <thetext>There&apos;s a test case in bug 40272 that Chromium fails.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>697726</commentid>
    <comment_count>3</comment_count>
    <who name="Kenneth Russell">kbr</who>
    <bug_when>2012-08-16 17:31:26 -0700</bug_when>
    <thetext>Filed V8 bug https://code.google.com/p/v8/issues/detail?id=2294 to track this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>701965</commentid>
    <comment_count>4</comment_count>
    <who name="Ulan Degenbaev">ulan</who>
    <bug_when>2012-08-22 08:44:18 -0700</bug_when>
    <thetext>The V8 bug is fixed. I will adjust canvas test expectations after V8 rolls in Chromium.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>702269</commentid>
    <comment_count>5</comment_count>
    <who name="Kenneth Russell">kbr</who>
    <bug_when>2012-08-22 13:26:13 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; The V8 bug is fixed. I will adjust canvas test expectations after V8 rolls in Chromium.

Ulan, thanks for fixing this. Note that array-unit-tests.html was just updated in the Khronos WebGL github repo, so do you think you could pull in a revised version of this test and its expectations too?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>703852</commentid>
    <comment_count>6</comment_count>
    <who name="Ulan Degenbaev">ulan</who>
    <bug_when>2012-08-24 00:37:22 -0700</bug_when>
    <thetext>&gt; Note that array-unit-tests.html was just updated in the Khronos WebGL github repo, so do you think you could pull in a revised version of this test and its expectations too?

Yep, I can update the tests. But it looks like zmo@ is already taking care of this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>704273</commentid>
    <comment_count>7</comment_count>
    <who name="Kenneth Russell">kbr</who>
    <bug_when>2012-08-24 11:28:46 -0700</bug_when>
    <thetext>zmo@ updated the tests in the Khronos repo, but it would be great to pull the revised tests from the Khronos repo back into the WebKit repo as a layout test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>705317</commentid>
    <comment_count>8</comment_count>
    <who name="Dominik Röttsches (drott)">d-r</who>
    <bug_when>2012-08-27 09:17:01 -0700</bug_when>
    <thetext>In Bug 40272 Benjamin requested a better fallback implementation for MSVC &amp; !X86 - you might want to take a look and do something similar in V8.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>723136</commentid>
    <comment_count>9</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2012-09-18 17:11:56 -0700</bug_when>
    <thetext>it looks like the following layout tests that were listed as relevant to this bug are no longer failing.

        BUGWK94246 : canvas/philip/tests/2d.imageData.object.round.html = TEXT  
        BUGWK94246 : platform/chromium/virtual/gpu/canvas/philip/tests/2d.imageData.object.round.html = TEXT
        BUGWK94246 : fast/canvas/canvas-ImageData-behaviour.html = TEXT         
        BUGWK94246 : platform/chromium/virtual/gpu/fast/canvas/canvas-ImageData-behaviour.html = TEXT

So I&apos;ve removed the suppressions in http://trac.webkit.org/changeset/128945 .

Can we now close this? It looks that way from what I can glean from the comments.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>723336</commentid>
    <comment_count>10</comment_count>
    <who name="Ulan Degenbaev">ulan</who>
    <bug_when>2012-09-19 00:10:50 -0700</bug_when>
    <thetext>&gt; Can we now close this? It looks that way from what I can glean from the comments.
Yes, V8 with the fix rolled in Chrome.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>