| Index: third_party/WebKit/WebCore/platform/graphics/qt/ImageQt.cpp
 | 
| ===================================================================
 | 
| --- third_party/WebKit/WebCore/platform/graphics/qt/ImageQt.cpp	(revision 9391)
 | 
| +++ third_party/WebKit/WebCore/platform/graphics/qt/ImageQt.cpp	(working copy)
 | 
| @@ -96,7 +96,24 @@
 | 
|  void Image::drawPattern(GraphicsContext* ctxt, const FloatRect& tileRect, const TransformationMatrix& patternTransform,
 | 
|                          const FloatPoint& phase, CompositeOperator op, const FloatRect& destRect)
 | 
|  {
 | 
| -    notImplemented();
 | 
| +    QPixmap* framePixmap = nativeImageForCurrentFrame();
 | 
| +    if (!framePixmap) // If it's too early we won't have an image yet.
 | 
| +        return;
 | 
| +
 | 
| +    QPixmap pixmap = *framePixmap;
 | 
| +    QRect tr = QRectF(tileRect).toRect();
 | 
| +    if (tr.x() || tr.y() || tr.width() != pixmap.width() || tr.height() != pixmap.height()) {
 | 
| +        pixmap = pixmap.copy(tr);
 | 
| +    }
 | 
| +
 | 
| +    QBrush b(pixmap);
 | 
| +    b.setMatrix(patternTransform);
 | 
| +    ctxt->save();
 | 
| +    ctxt->setCompositeOperation(op);
 | 
| +    QPainter* p = ctxt->platformContext();
 | 
| +    p->setBrushOrigin(phase);
 | 
| +    p->fillRect(destRect, b);
 | 
| +    ctxt->restore();
 | 
|  }
 | 
|  
 | 
|  void BitmapImage::initPlatformData()
 | 
| @@ -138,29 +155,6 @@
 | 
|      ctxt->restore();
 | 
|  }
 | 
|  
 | 
| -void BitmapImage::drawPattern(GraphicsContext* ctxt, const FloatRect& tileRect, const TransformationMatrix& patternTransform,
 | 
| -                              const FloatPoint& phase, CompositeOperator op, const FloatRect& destRect)
 | 
| -{
 | 
| -    QPixmap* framePixmap = nativeImageForCurrentFrame();
 | 
| -    if (!framePixmap) // If it's too early we won't have an image yet.
 | 
| -        return;
 | 
| -
 | 
| -    QPixmap pixmap = *framePixmap;
 | 
| -    QRect tr = QRectF(tileRect).toRect();
 | 
| -    if (tr.x() || tr.y() || tr.width() != pixmap.width() || tr.height() != pixmap.height()) {
 | 
| -        pixmap = pixmap.copy(tr);
 | 
| -    }
 | 
| -
 | 
| -    QBrush b(pixmap);
 | 
| -    b.setMatrix(patternTransform);
 | 
| -    ctxt->save();
 | 
| -    ctxt->setCompositeOperation(op);
 | 
| -    QPainter* p = ctxt->platformContext();
 | 
| -    p->setBrushOrigin(phase);
 | 
| -    p->fillRect(destRect, b);
 | 
| -    ctxt->restore();
 | 
| -}
 | 
| -
 | 
|  void BitmapImage::checkForSolidColor()
 | 
|  {
 | 
|      // FIXME: It's easy to implement this optimization. Just need to check the RGBA32 buffer to see if it is 1x1.
 | 
| 
 |