summaryrefslogtreecommitdiff
path: root/Source/WebCore/platform/graphics/texmap
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-07-23 09:28:44 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-07-23 09:28:44 +0200
commit815f1ed417bd26fbe2abbdf20ac5d3423b30796c (patch)
tree923c9a9e2834ccab60f5caecfb8f0ac410c1dd9e /Source/WebCore/platform/graphics/texmap
parentb4ad5d9d2b96baacd0180ead50de5195ca78af2d (diff)
downloadqtwebkit-815f1ed417bd26fbe2abbdf20ac5d3423b30796c.tar.gz
Imported WebKit commit e65cbc5b6ac32627c797e7fc7f46eb7794410c92 (http://svn.webkit.org/repository/webkit/trunk@123308)
New snapshot with better configure tests
Diffstat (limited to 'Source/WebCore/platform/graphics/texmap')
-rw-r--r--Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp3
-rw-r--r--Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp6
-rw-r--r--Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp4
3 files changed, 10 insertions, 3 deletions
diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp b/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp
index cca2e27ec..688e26f4e 100644
--- a/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp
+++ b/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp
@@ -38,6 +38,7 @@
#endif
#if PLATFORM(QT)
+#include "NativeImageQt.h"
#if HAVE(QT5)
#include <QOpenGLContext>
#else
@@ -377,7 +378,7 @@ void TextureMapperGL::drawRepaintCounter(int value, int pointSize, const FloatPo
IntRect sourceRect(IntPoint::zero(), size);
IntRect targetRect(roundedIntPoint(targetPoint), size);
- QImage image(size, QImage::Format_ARGB32_Premultiplied);
+ QImage image(size, NativeImageQt::defaultFormatForAlphaEnabledImages());
QPainter painter(&image);
painter.fillRect(sourceRect, Qt::blue); // Since we won't swap R+B for speed, this will paint red.
painter.setFont(font);
diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp b/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp
index d5019e6a6..9b0c9a56f 100644
--- a/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp
+++ b/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp
@@ -21,6 +21,10 @@
#include "TextureMapperImageBuffer.h"
#include "FilterEffectRenderer.h"
+#if PLATFORM(QT)
+#include "NativeImageQt.h"
+#endif
+
#if USE(TEXTURE_MAPPER)
namespace WebCore {
@@ -28,7 +32,7 @@ namespace WebCore {
void BitmapTextureImageBuffer::updateContents(const void* data, const IntRect& targetRect, const IntPoint& sourceOffset, int bytesPerLine)
{
#if PLATFORM(QT)
- QImage image(reinterpret_cast<const uchar*>(data), targetRect.width(), targetRect.height(), bytesPerLine, QImage::Format_ARGB32_Premultiplied);
+ QImage image(reinterpret_cast<const uchar*>(data), targetRect.width(), targetRect.height(), bytesPerLine, NativeImageQt::defaultFormatForAlphaEnabledImages());
QPainter* painter = m_image->context()->platformContext();
painter->save();
diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp b/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp
index cdd495201..cf88009be 100644
--- a/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp
+++ b/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp
@@ -108,7 +108,9 @@ void TextureMapperLayer::updateBackingStore(TextureMapper* textureMapper, Graphi
return;
}
- IntRect dirtyRect = enclosingIntRect(m_state.needsDisplay ? layerRect() : m_state.needsDisplayRect);
+ IntRect dirtyRect = enclosingIntRect(layerRect());
+ if (!m_state.needsDisplay)
+ dirtyRect.intersect(enclosingIntRect(m_state.needsDisplayRect));
if (dirtyRect.isEmpty())
return;