Changeset 86085 in webkit


Ignore:
Timestamp:
May 9, 2011 1:22:56 PM (13 years ago)
Author:
mdelaney@apple.com
Message:

2011-05-05 Matthew Delaney <mdelaney@apple.com>

Reviewed by Simon Fraser.

Remove canvas usage of roundToDevicePixels
https://bugs.webkit.org/show_bug.cgi?id=60331

No new tests. This could only affect canvases at non-integral scale factors. Our tests only run in 1.0x.

  • html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::drawImage):
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r86083 r86085  
     12011-05-05  Matthew Delaney  <mdelaney@apple.com>
     2
     3        Reviewed by Simon Fraser.
     4
     5        Remove canvas usage of roundToDevicePixels
     6        https://bugs.webkit.org/show_bug.cgi?id=60331
     7
     8        No new tests. This could only affect canvases at non-integral scale factors. Our tests only run in 1.0x.
     9
     10        * html/canvas/CanvasRenderingContext2D.cpp:
     11        (WebCore::CanvasRenderingContext2D::drawImage):
     12
    1132011-05-09  Alexis Menard  <alexis.menard@openbossa.org>
    214
  • trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp

    r85760 r86085  
    13141314    checkOrigin(image);
    13151315
    1316     FloatRect sourceRect = c->roundToDevicePixels(normalizedSrcRect);
    1317     FloatRect destRect = c->roundToDevicePixels(normalizedDstRect);
    1318     c->drawImage(cachedImage->image(), ColorSpaceDeviceRGB, destRect, sourceRect, op);
    1319     didDraw(destRect);
     1316    c->drawImage(cachedImage->image(), ColorSpaceDeviceRGB, normalizedDstRect, normalizedSrcRect, op);
     1317    didDraw(normalizedDstRect);
    13201318}
    13211319
     
    13761374    if (!state().m_invertibleCTM)
    13771375        return;
    1378 
    1379     FloatRect sourceRect = c->roundToDevicePixels(srcRect);
    1380     FloatRect destRect = c->roundToDevicePixels(dstRect);
    13811376
    13821377    // FIXME: Do this through platform-independent GraphicsContext API.
     
    13981393#endif
    13991394
    1400     c->drawImageBuffer(buffer, ColorSpaceDeviceRGB, destRect, sourceRect, state().m_globalComposite);
    1401     didDraw(destRect);
     1395    c->drawImageBuffer(buffer, ColorSpaceDeviceRGB, dstRect, srcRect, state().m_globalComposite);
     1396    didDraw(dstRect);
    14021397}
    14031398
     
    14611456    checkOrigin(video);
    14621457
    1463     FloatRect sourceRect = c->roundToDevicePixels(srcRect);
    1464     FloatRect destRect = c->roundToDevicePixels(dstRect);
    1465 
    14661458    GraphicsContextStateSaver stateSaver(*c);
    1467     c->clip(destRect);
    1468     c->translate(destRect.x(), destRect.y());
    1469     c->scale(FloatSize(destRect.width() / sourceRect.width(), destRect.height() / sourceRect.height()));
    1470     c->translate(-sourceRect.x(), -sourceRect.y());
     1459    c->clip(dstRect);
     1460    c->translate(dstRect.x(), dstRect.y());
     1461    c->scale(FloatSize(dstRect.width() / srcRect.width(), dstRect.height() / srcRect.height()));
     1462    c->translate(-srcRect.x(), -srcRect.y());
    14711463    video->paintCurrentFrameInContext(c, IntRect(IntPoint(), size(video)));
    14721464    stateSaver.restore();
    1473     didDraw(destRect);
     1465    didDraw(dstRect);
    14741466}
    14751467#endif
Note: See TracChangeset for help on using the changeset viewer.