Changeset 63656 in webkit
- Timestamp:
- Jul 19, 2010 7:24:36 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r63655 r63656 1 2010-07-19 Andreas Kling <andreas.kling@nokia.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 [Qt] Render shadow when drawing one canvas onto another 6 https://bugs.webkit.org/show_bug.cgi?id=42508 7 8 Unskip: 9 - canvas/philip/tests/2d.shadow.canvas.basic.html 10 11 Reskip (bug now exposed): 12 - canvas/philip/tests/2d.shadow.canvas.transparent.1.html 13 14 * platform/qt/Skipped: 15 1 16 2010-07-19 Csaba Osztrogonác <ossy@webkit.org> 2 17 -
trunk/LayoutTests/platform/qt/Skipped
r63654 r63656 5289 5289 canvas/philip/tests/2d.pattern.image.undefined.html 5290 5290 canvas/philip/tests/2d.shadow.canvas.alpha.html 5291 canvas/philip/tests/2d.shadow.canvas. basic.html5291 canvas/philip/tests/2d.shadow.canvas.transparent.1.html 5292 5292 canvas/philip/tests/2d.shadow.canvas.transparent.2.html 5293 5293 canvas/philip/tests/2d.shadow.image.alpha.html -
trunk/WebCore/ChangeLog
r63654 r63656 1 2010-07-19 Andreas Kling <andreas.kling@nokia.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 [Qt] Render shadow when drawing one canvas onto another 6 https://bugs.webkit.org/show_bug.cgi?id=42508 7 8 * platform/graphics/qt/StillImageQt.cpp: 9 (WebCore::StillImage::draw): 10 1 11 2010-07-19 Andreas Kling <andreas.kling@nokia.com> 2 12 -
trunk/WebCore/platform/graphics/qt/StillImageQt.cpp
r63606 r63656 68 68 return; 69 69 70 ctxt->save(); 70 71 FloatRect normalizedSrc = src.normalized(); 72 FloatRect normalizedDst = dst.normalized(); 73 74 QPainter* painter = ctxt->platformContext(); 75 QPainter::CompositionMode oldCompositionMode = painter->compositionMode(); 76 71 77 ctxt->setCompositeOperation(op); 72 78 73 // To support width or height is negative 74 float sx = src.x(); 75 float sy = src.y(); 76 float sw = src.width(); 77 float sh = src.height(); 79 FloatSize shadowSize; 80 float shadowBlur; 81 Color shadowColor; 82 if (ctxt->getShadow(shadowSize, shadowBlur, shadowColor)) { 83 FloatRect shadowImageRect(normalizedDst); 84 shadowImageRect.move(shadowSize.width(), shadowSize.height()); 78 85 79 if (sw < 0) { 80 sx = sx + sw; 81 sw = -sw; 86 QImage shadowImage(QSize(static_cast<int>(normalizedSrc.width()), static_cast<int>(normalizedSrc.height())), QImage::Format_ARGB32_Premultiplied); 87 QPainter p(&shadowImage); 88 p.setCompositionMode(QPainter::CompositionMode_Source); 89 p.fillRect(shadowImage.rect(), shadowColor); 90 p.setCompositionMode(QPainter::CompositionMode_DestinationIn); 91 p.drawPixmap(normalizedDst, *m_pixmap, normalizedSrc); 92 p.end(); 93 painter->drawImage(shadowImageRect, shadowImage, normalizedSrc); 82 94 } 83 95 84 if (sh < 0) { 85 sy = sy + sh; 86 sh = -sh; 87 } 88 89 float dx = dst.x(); 90 float dy = dst.y(); 91 float dw = dst.width(); 92 float dh = dst.height(); 93 94 if (dw < 0) { 95 dx = dx + dw; 96 dw = -dw; 97 } 98 99 if (dh < 0) { 100 dy = dy + dh; 101 dh = -dh; 102 } 103 104 FloatRect srcM(sx, sy, sw, sh); 105 FloatRect dstM(dx, dy, dw, dh); 106 QPainter* painter(ctxt->platformContext()); 107 108 painter->drawPixmap(dstM, *m_pixmap, srcM); 109 ctxt->restore(); 96 painter->drawPixmap(normalizedDst, *m_pixmap, normalizedSrc); 97 painter->setCompositionMode(oldCompositionMode); 110 98 } 111 99
Note: See TracChangeset
for help on using the changeset viewer.