Changeset 86085 in webkit
- Timestamp:
- May 9, 2011 1:22:56 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r86083 r86085 1 2011-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 1 13 2011-05-09 Alexis Menard <alexis.menard@openbossa.org> 2 14 -
trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
r85760 r86085 1314 1314 checkOrigin(image); 1315 1315 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); 1320 1318 } 1321 1319 … … 1376 1374 if (!state().m_invertibleCTM) 1377 1375 return; 1378 1379 FloatRect sourceRect = c->roundToDevicePixels(srcRect);1380 FloatRect destRect = c->roundToDevicePixels(dstRect);1381 1376 1382 1377 // FIXME: Do this through platform-independent GraphicsContext API. … … 1398 1393 #endif 1399 1394 1400 c->drawImageBuffer(buffer, ColorSpaceDeviceRGB, d estRect, sourceRect, state().m_globalComposite);1401 didDraw(d estRect);1395 c->drawImageBuffer(buffer, ColorSpaceDeviceRGB, dstRect, srcRect, state().m_globalComposite); 1396 didDraw(dstRect); 1402 1397 } 1403 1398 … … 1461 1456 checkOrigin(video); 1462 1457 1463 FloatRect sourceRect = c->roundToDevicePixels(srcRect);1464 FloatRect destRect = c->roundToDevicePixels(dstRect);1465 1466 1458 GraphicsContextStateSaver stateSaver(*c); 1467 c->clip(d estRect);1468 c->translate(d estRect.x(), destRect.y());1469 c->scale(FloatSize(d estRect.width() / sourceRect.width(), destRect.height() / sourceRect.height()));1470 c->translate(-s ourceRect.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()); 1471 1463 video->paintCurrentFrameInContext(c, IntRect(IntPoint(), size(video))); 1472 1464 stateSaver.restore(); 1473 didDraw(d estRect);1465 didDraw(dstRect); 1474 1466 } 1475 1467 #endif
Note: See TracChangeset
for help on using the changeset viewer.