summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/qt/StillImageQt.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-10-17 16:21:14 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-10-17 16:21:14 +0200
commit8995b83bcbfbb68245f779b64e5517627c6cc6ea (patch)
tree17985605dab9263cc2444bd4d45f189e142cca7c /Source/WebCore/platform/graphics/qt/StillImageQt.cpp
parentb9c9652036d5e9f1e29c574f40bc73a35c81ace6 (diff)
Imported WebKit commit cf4f8fc6f19b0629f51860cb2d4b25e139d07e00 (http://svn.webkit.org/repository/webkit/trunk@131592)
New snapshot that includes the build fixes for Mac OS X 10.6 and earlier as well as the previously cherry-picked changes
Diffstat (limited to 'Source/WebCore/platform/graphics/qt/StillImageQt.cpp')
-rw-r--r--Source/WebCore/platform/graphics/qt/StillImageQt.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/Source/WebCore/platform/graphics/qt/StillImageQt.cpp b/Source/WebCore/platform/graphics/qt/StillImageQt.cpp
index 041252019..80666ba46 100644
--- a/Source/WebCore/platform/graphics/qt/StillImageQt.cpp
+++ b/Source/WebCore/platform/graphics/qt/StillImageQt.cpp
@@ -36,41 +36,41 @@
namespace WebCore {
-StillImage::StillImage(const QImage& image)
- : m_image(new QImage(image))
- , m_ownsImage(true)
+StillImage::StillImage(const QPixmap& pixmap)
+ : m_pixmap(new QPixmap(pixmap))
+ , m_ownsPixmap(true)
{}
-StillImage::StillImage(const QImage* image)
- : m_image(image)
- , m_ownsImage(false)
+StillImage::StillImage(const QPixmap* pixmap)
+ : m_pixmap(pixmap)
+ , m_ownsPixmap(false)
{}
StillImage::~StillImage()
{
- if (m_ownsImage)
- delete m_image;
+ if (m_ownsPixmap)
+ delete m_pixmap;
}
bool StillImage::currentFrameHasAlpha()
{
- return m_image->hasAlphaChannel();
+ return m_pixmap->hasAlpha();
}
IntSize StillImage::size() const
{
- return IntSize(m_image->width(), m_image->height());
+ return IntSize(m_pixmap->width(), m_pixmap->height());
}
NativeImagePtr StillImage::nativeImageForCurrentFrame()
{
- return const_cast<NativeImagePtr>(m_image);
+ return const_cast<NativeImagePtr>(m_pixmap);
}
void StillImage::draw(GraphicsContext* ctxt, const FloatRect& dst,
const FloatRect& src, ColorSpace, CompositeOperator op)
{
- if (m_image->isNull())
+ if (m_pixmap->isNull())
return;
FloatRect normalizedSrc = src.normalized();
@@ -84,12 +84,12 @@ void StillImage::draw(GraphicsContext* ctxt, const FloatRect& dst,
GraphicsContext* shadowContext = shadow->beginShadowLayer(ctxt, normalizedDst);
if (shadowContext) {
QPainter* shadowPainter = shadowContext->platformContext();
- shadowPainter->drawImage(normalizedDst, *m_image, normalizedSrc);
+ shadowPainter->drawPixmap(normalizedDst, *m_pixmap, normalizedSrc);
shadow->endShadowLayer(ctxt);
}
}
- ctxt->platformContext()->drawImage(normalizedDst, *m_image, normalizedSrc);
+ ctxt->platformContext()->drawPixmap(normalizedDst, *m_pixmap, normalizedSrc);
ctxt->setCompositeOperation(previousOperator);
}