summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorA-Team <ateam@pad.test.qt.nokia.com>2010-09-13 22:00:15 (GMT)
committerA-Team <ateam@pad.test.qt.nokia.com>2010-09-13 22:00:15 (GMT)
commit8399cce50eb11db885e67a52055505951309cae8 (patch)
tree56518186c2835fadec353feef725328f85ba4e25 /src
parent0e4083ba5bf1bbc581d072b016fb977fb1f846c1 (diff)
parent870ecb5b44a56b29d16a4819c2d92298801cf98f (diff)
downloadQt-8399cce50eb11db885e67a52055505951309cae8.zip
Qt-8399cce50eb11db885e67a52055505951309cae8.tar.gz
Qt-8399cce50eb11db885e67a52055505951309cae8.tar.bz2
Merge branch '4.7-upstream' into 4.7-doc
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/webkit/.tag2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/ChangeLog57
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp97
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h5
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h2
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog102
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.pro11
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/npapi.h31
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/PluginPackage.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/PluginView.cpp10
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/PluginView.h10
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp109
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebkitglobal.h4
-rw-r--r--src/3rdparty/webkit/WebKit/qt/ChangeLog77
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp17
-rw-r--r--src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri4
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable.cpp6
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable_p_p.h1
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea.cpp17
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea_p_p.h6
-rw-r--r--src/gui/egl/qegl.cpp2
-rw-r--r--src/gui/egl/qegl_p.h4
-rw-r--r--src/gui/egl/qeglproperties.cpp2
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp2
-rw-r--r--src/gui/kernel/qapplication.cpp1
-rw-r--r--src/gui/painting/qdrawhelper_sse2.cpp8
-rw-r--r--src/gui/painting/qdrawhelper_ssse3.cpp75
-rw-r--r--src/gui/text/qfontengine.cpp4
-rw-r--r--src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp4
-rw-r--r--src/imports/folderlistmodel/qdeclarativefolderlistmodel.h2
-rw-r--r--src/openvg/qpaintengine_vg.cpp158
35 files changed, 610 insertions, 230 deletions
diff --git a/src/3rdparty/webkit/.tag b/src/3rdparty/webkit/.tag
index 1148320..ae33228 100644
--- a/src/3rdparty/webkit/.tag
+++ b/src/3rdparty/webkit/.tag
@@ -1 +1 @@
-460b651cbe4f6994b492ff08614e57b0e31a24c8
+715b53069911a31a559aa0b3d94ffc6a5ac20988
diff --git a/src/3rdparty/webkit/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/JavaScriptCore/ChangeLog
index 2be6f5a..9922da6 100644
--- a/src/3rdparty/webkit/JavaScriptCore/ChangeLog
+++ b/src/3rdparty/webkit/JavaScriptCore/ChangeLog
@@ -1,3 +1,60 @@
+2010-06-16 Thiago Macieira <thiago.macieira@nokia.com>
+
+ Reviewed by NOBODY (OOPS!).
+
+ Reindent the asm code I've moved to inside the function
+ (previous commit)
+
+ * jit/JITStubs.cpp:
+
+2010-06-16 Thiago Macieira <thiago.macieira@nokia.com>
+
+ Reviewed by NOBODY (OOPS!).
+
+ Fix the JIT compilation with the Intel 32-bit C++ compiler.
+
+ ICC doesn't understand the use of "asm" statements outside of
+ function bodies, so move the assembly code inside a dummy
+ function (and mark it so that the compiler doesn't remove it
+ altogether).
+
+ Also removed the ".text" entry that I had added because now
+ the assembly code is properly inside a code section (fixes
+ compilation with -ffunction-sections).
+
+ * jit/JITStubs.cpp:
+
+2010-06-16 Thiago Macieira <thiago.macieira@nokia.com>
+
+ Reviewed by NOBODY (OOPS!).
+
+ Don't use __attribute__((may_alias)) with the Intel compiler,
+ as it doesn't understand it.
+
+ * wtf/Vector.h:
+
+2010-06-16 Thiago Macieira <thiago.macieira@nokia.com>
+
+ Reviewed by NOBODY (OOPS!).
+
+ Fix compilation with the Intel C++ compiler (11.1.072).
+
+ Like RVCT, label pointers must be void*, not const void*.
+
+ * bytecode/Opcode.h:
+
+2010-06-16 Thiago Macieira <thiago.macieira@nokia.com>
+
+ Reviewed by NOBODY (OOPS!).
+
+ Add the WTF_COMPILER_INTEL for when the Intel compiler is used
+ for building. Usually, the Intel compiler masquerades as
+ another compiler in the system and gets away with it, but some
+ times specific fixes are required (such as when using language
+ extensions).
+
+ * wtf/Platform.h:
+
2010-07-08 Andreas Kling <andreas.kling@nokia.com>
Reviewed by Oliver Hunt.
diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h b/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h
index 509daeb..f7f53fd 100644
--- a/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h
+++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h
@@ -206,7 +206,7 @@ namespace JSC {
#undef VERIFY_OPCODE_ID
#if HAVE(COMPUTED_GOTO)
-#if COMPILER(RVCT)
+#if COMPILER(RVCT) || COMPILER(INTEL)
typedef void* Opcode;
#else
typedef const void* Opcode;
diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp
index e5fcdc4..23fcb96 100644
--- a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp
@@ -113,56 +113,59 @@ COMPILE_ASSERT(offsetof(struct JITStackFrame, savedEBX) == 0x3c, JITStackFrame_s
COMPILE_ASSERT(offsetof(struct JITStackFrame, callFrame) == 0x58, JITStackFrame_callFrame_offset_matches_ctiTrampoline);
COMPILE_ASSERT(offsetof(struct JITStackFrame, code) == 0x50, JITStackFrame_code_offset_matches_ctiTrampoline);
-asm volatile (
-".text\n"
-".globl " SYMBOL_STRING(ctiTrampoline) "\n"
-HIDE_SYMBOL(ctiTrampoline) "\n"
-SYMBOL_STRING(ctiTrampoline) ":" "\n"
- "pushl %ebp" "\n"
- "movl %esp, %ebp" "\n"
- "pushl %esi" "\n"
- "pushl %edi" "\n"
- "pushl %ebx" "\n"
- "subl $0x3c, %esp" "\n"
- "movl $512, %esi" "\n"
- "movl 0x58(%esp), %edi" "\n"
- "call *0x50(%esp)" "\n"
- "addl $0x3c, %esp" "\n"
- "popl %ebx" "\n"
- "popl %edi" "\n"
- "popl %esi" "\n"
- "popl %ebp" "\n"
- "ret" "\n"
-);
-
-asm volatile (
-".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n"
-HIDE_SYMBOL(ctiVMThrowTrampoline) "\n"
-SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
+static void __attribute__((used)) asm_wrapper()
+{
+ asm volatile (
+ ".text\n"
+ ".globl " SYMBOL_STRING(ctiTrampoline) "\n"
+ HIDE_SYMBOL(ctiTrampoline) "\n"
+ SYMBOL_STRING(ctiTrampoline) ":" "\n"
+ "pushl %ebp" "\n"
+ "movl %esp, %ebp" "\n"
+ "pushl %esi" "\n"
+ "pushl %edi" "\n"
+ "pushl %ebx" "\n"
+ "subl $0x3c, %esp" "\n"
+ "movl $512, %esi" "\n"
+ "movl 0x58(%esp), %edi" "\n"
+ "call *0x50(%esp)" "\n"
+ "addl $0x3c, %esp" "\n"
+ "popl %ebx" "\n"
+ "popl %edi" "\n"
+ "popl %esi" "\n"
+ "popl %ebp" "\n"
+ "ret" "\n"
+ );
+
+ asm volatile (
+ ".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n"
+ HIDE_SYMBOL(ctiVMThrowTrampoline) "\n"
+ SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
#if !USE(JIT_STUB_ARGUMENT_VA_LIST)
- "movl %esp, %ecx" "\n"
+ "movl %esp, %ecx" "\n"
#endif
- "call " SYMBOL_STRING_RELOCATION(cti_vm_throw) "\n"
- "addl $0x3c, %esp" "\n"
- "popl %ebx" "\n"
- "popl %edi" "\n"
- "popl %esi" "\n"
- "popl %ebp" "\n"
- "ret" "\n"
-);
-
-asm volatile (
-".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n"
-HIDE_SYMBOL(ctiOpThrowNotCaught) "\n"
-SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
- "addl $0x3c, %esp" "\n"
- "popl %ebx" "\n"
- "popl %edi" "\n"
- "popl %esi" "\n"
- "popl %ebp" "\n"
- "ret" "\n"
-);
+ "call " SYMBOL_STRING_RELOCATION(cti_vm_throw) "\n"
+ "addl $0x3c, %esp" "\n"
+ "popl %ebx" "\n"
+ "popl %edi" "\n"
+ "popl %esi" "\n"
+ "popl %ebp" "\n"
+ "ret" "\n"
+ );
+ asm volatile (
+ ".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n"
+ HIDE_SYMBOL(ctiOpThrowNotCaught) "\n"
+ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
+ "addl $0x3c, %esp" "\n"
+ "popl %ebx" "\n"
+ "popl %edi" "\n"
+ "popl %esi" "\n"
+ "popl %ebp" "\n"
+ "ret" "\n"
+ );
+}
+
#elif COMPILER(GCC) && CPU(X86_64)
#if USE(JIT_STUB_ARGUMENT_VA_LIST)
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h
index 84b6153..15f0ffc 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h
@@ -99,7 +99,10 @@
#undef _WIN32
#endif
-
+/* COMPILER(INTEL) - Intel C++ Compiler */
+#if defined(__INTEL_COMPILER)
+#define WTF_COMPILER_INTEL 1
+#endif
/* ==== CPU() - the target CPU architecture ==== */
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h
index 4d9ea61..c267050 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h
@@ -49,7 +49,7 @@ namespace WTF {
#error WTF_ALIGN macros need alignment control.
#endif
- #if COMPILER(GCC) && (((__GNUC__ * 100) + __GNUC_MINOR__) >= 303)
+ #if COMPILER(GCC) && !COMPILER(INTEL) && (((__GNUC__ * 100) + __GNUC_MINOR__) >= 303)
typedef char __attribute__((__may_alias__)) AlignedBufferChar;
#else
typedef char AlignedBufferChar;
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index aff3f2a..f919bdf 100644
--- a/src/3rdparty/webkit/VERSION
+++ b/src/3rdparty/webkit/VERSION
@@ -4,4 +4,4 @@ This is a snapshot of the Qt port of WebKit from
and has the sha1 checksum
- 460b651cbe4f6994b492ff08614e57b0e31a24c8
+ 715b53069911a31a559aa0b3d94ffc6a5ac20988
diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog
index 98d4d51..2d20cbd 100644
--- a/src/3rdparty/webkit/WebCore/ChangeLog
+++ b/src/3rdparty/webkit/WebCore/ChangeLog
@@ -1,3 +1,105 @@
+2010-09-09 Kristian Amlie <kristian.amlie@nokia.com>
+
+ Reviewed by Andreas Kling.
+
+ [Qt] Fixed incorrect Symbian scoping.
+
+ The missing install functionality is only true for mmp based systems.
+
+ https://bugs.webkit.org/show_bug.cgi?id=45268
+
+ * WebCore.pro:
+
+2010-09-12 Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] fix qt_webkit_version.pri install for in-Qt builds
+
+ Always add the target, even if building inside Qt - as opposed to the
+ headers and libraries, there are no rules for that coming from
+ qbase.pri.
+
+ Task-number: QTBUG-13306
+
+ * WebCore.pro:
+
+2010-09-12 Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Let QtWebKit inject itself into the qt configuration
+
+ i.e., don't explicitly deal with qt_webkit_version.pri outside of the
+ webkit source directory.
+
+ Task-number: QTBUG-12379
+
+ * WebCore.pro:
+
+2010-08-20 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Ariya Hidayat.
+
+ [Qt] When using the raster graphics system on Maemo5, allow
+ Flash to render directly into the raster window surface.
+ wmode=transparent is now supported as a result of this change.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44043
+
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::paintUsingImageSurfaceExtension):
+
+2010-08-18 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Implement Maemo5 local rendering NPAPI extension. See
+ https://wiki.mozilla.org/Plugins:NokiaMaemoImageSurface for details.
+
+ With the local rendering extension, Flash will paint into a 16-bit surface.
+ For wmode=transparent, Flash expects the surface to contain the contents
+ beneath it. As it is tricky to implement the content propagation across all
+ graphics systems, transparent Flash is not supported. We just fill the surface
+ with white and wmode=transparent behaves the same as wmode=opaque with a white
+ background.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44043
+
+ * WebCore.pro:
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::setValue):
+ (WebCore::PluginView::PluginView):
+ * plugins/PluginView.h:
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::updatePluginWidget):
+ (WebCore::PluginView::paintUsingImageSurfaceExtension):
+ (WebCore::PluginView::paint):
+ (WebCore::PluginView::platformGetValueStatic):
+
+2010-08-17 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Antonio Gomes.
+
+ [Qt] On Maemo5, there is no libgdk-x11-2.0.so symlink. Look for
+ libgdk-x11-2.0.so.0 instead on X11 and Maemo5.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44043
+
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::getPluginDisplay):
+
+2010-08-17 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Kenneth Rohde Christiansen.
+ Set PluginQuirkRequiresDefaultScreenDepth for all Flash versions and not
+ just Flash 10.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44043
+
+ * plugins/PluginPackage.cpp:
+ (WebCore::PluginPackage::determineQuirks):
+
2010-08-10 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Reviewed by Simon Hausmann.
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro
index 5ea1e77..87638a0 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.pro
+++ b/src/3rdparty/webkit/WebCore/WebCore.pro
@@ -2192,6 +2192,9 @@ contains(DEFINES, ENABLE_NETSCAPE_PLUGIN_API=1) {
CONFIG += x11
LIBS += -lXrender
}
+ maemo5 {
+ DEFINES += MOZ_PLATFORM_MAEMO=5
+ }
SOURCES += \
plugins/qt/PluginContainerQt.cpp \
plugins/qt/PluginPackageQt.cpp \
@@ -2857,13 +2860,13 @@ contains(DEFINES, ENABLE_SYMBIAN_DIALOG_PROVIDERS) {
}
}
-!symbian-abld:!symbian-sbsv2 {
+!symbian {
modfile.files = $$moduleFile
modfile.path = $$[QMAKE_MKSPECS]/modules
INSTALLS += modfile
} else {
- # INSTALLS is not implemented in qmake's mmp generators, copy headers manually
+ # INSTALLS is not implemented in qmake's s60 generators, copy headers manually
inst_modfile.commands = $$QMAKE_COPY ${QMAKE_FILE_NAME} ${QMAKE_FILE_OUT}
inst_modfile.input = moduleFile
@@ -2883,7 +2886,7 @@ HEADERS += $$WEBKIT_API_HEADERS
exists($$OUTPUT_DIR/include/QtWebKit/classheaders.pri): include($$OUTPUT_DIR/include/QtWebKit/classheaders.pri)
WEBKIT_INSTALL_HEADERS = $$WEBKIT_API_HEADERS $$WEBKIT_CLASS_HEADERS
- !symbian {
+ !symbian-abld:!symbian-sbsv2 {
headers.files = $$WEBKIT_INSTALL_HEADERS
!isEmpty(INSTALL_HEADERS): headers.path = $$INSTALL_HEADERS/QtWebKit
@@ -2894,7 +2897,7 @@ HEADERS += $$WEBKIT_API_HEADERS
INSTALLS += target headers
} else {
- # INSTALLS is not implemented in qmake's s60 generators, copy headers manually
+ # INSTALLS is not implemented in qmake's mmp generators, copy headers manually
inst_headers.commands = $$QMAKE_COPY ${QMAKE_FILE_NAME} ${QMAKE_FILE_OUT}
inst_headers.input = WEBKIT_INSTALL_HEADERS
inst_headers.CONFIG = no_clean
diff --git a/src/3rdparty/webkit/WebCore/bridge/npapi.h b/src/3rdparty/webkit/WebCore/bridge/npapi.h
index 533fcba..daa3a36 100644
--- a/src/3rdparty/webkit/WebCore/bridge/npapi.h
+++ b/src/3rdparty/webkit/WebCore/bridge/npapi.h
@@ -247,6 +247,12 @@ typedef struct _NPRect
} NPRect;
+typedef struct _NPSize
+{
+ int32 width;
+ int32 height;
+} NPSize;
+
#ifdef XP_UNIX
/*
* Unix specific structures and definitions
@@ -373,6 +379,11 @@ typedef enum {
/* In the NPDrawingModelCoreAnimation drawing model, the browser asks the plug-in for a Core Animation layer. */
NPPVpluginCoreAnimationLayer = 1003
#endif
+
+
+#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5)
+ NPPVpluginWindowlessLocalBool = 2002
+#endif
} NPPVariable;
/*
@@ -419,6 +430,9 @@ typedef enum {
, NPNVsupportsCocoaBool = 3001 /* TRUE if the browser supports the Cocoa event model */
#endif /* XP_MACOSX */
+#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5)
+ , NPNVSupportsWindowlessLocal = 2002
+#endif
} NPNVariable;
typedef enum {
@@ -539,6 +553,23 @@ typedef struct _NPWindow
} NPWindow;
+typedef struct _NPImageExpose
+{
+ char* data; /* image pointer */
+ int32 stride; /* Stride of data image pointer */
+ int32 depth; /* Depth of image pointer */
+ int32 x; /* Expose x */
+ int32 y; /* Expose y */
+ uint32 width; /* Expose width */
+ uint32 height; /* Expose height */
+ NPSize dataSize; /* Data buffer size */
+ float translateX; /* translate X matrix value */
+ float translateY; /* translate Y matrix value */
+ float scaleX; /* scale X matrix value */
+ float scaleY; /* scale Y matrix value */
+} NPImageExpose;
+
+
typedef struct _NPFullPrint
{
NPBool pluginPrinted; /* Set TRUE if plugin handled fullscreen */
diff --git a/src/3rdparty/webkit/WebCore/plugins/PluginPackage.cpp b/src/3rdparty/webkit/WebCore/plugins/PluginPackage.cpp
index ad03ecd..3881f54 100644
--- a/src/3rdparty/webkit/WebCore/plugins/PluginPackage.cpp
+++ b/src/3rdparty/webkit/WebCore/plugins/PluginPackage.cpp
@@ -185,12 +185,12 @@ void PluginPackage::determineQuirks(const String& mimeType)
#if PLATFORM(QT)
m_quirks.add(PluginQuirkRequiresGtkToolKit);
#endif
- m_quirks.add(PluginQuirkRequiresDefaultScreenDepth);
} else {
// Flash 9 and older requests windowless plugins if we return a mozilla user agent
m_quirks.add(PluginQuirkWantsMozillaUserAgent);
}
+ m_quirks.add(PluginQuirkRequiresDefaultScreenDepth);
m_quirks.add(PluginQuirkThrottleInvalidate);
m_quirks.add(PluginQuirkThrottleWMUserPlusOneMessages);
m_quirks.add(PluginQuirkFlashURLNotifyBug);
diff --git a/src/3rdparty/webkit/WebCore/plugins/PluginView.cpp b/src/3rdparty/webkit/WebCore/plugins/PluginView.cpp
index df9a29b..b8b2f2f 100644
--- a/src/3rdparty/webkit/WebCore/plugins/PluginView.cpp
+++ b/src/3rdparty/webkit/WebCore/plugins/PluginView.cpp
@@ -1,6 +1,7 @@
/*
* Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
* Copyright (C) 2008 Collabora Ltd. All rights reserved.
+ * Copyright (C) 2010 Girish Ramakrishnan <girish@forwardbias.in>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -679,6 +680,12 @@ NPError PluginView::setValue(NPPVariable variable, void* value)
}
#endif // defined(XP_MACOSX)
+#if PLATFORM(QT) && defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5)
+ case NPPVpluginWindowlessLocalBool:
+ m_renderToImage = true;
+ return NPERR_NO_ERROR;
+#endif
+
default:
notImplemented();
return NPERR_GENERIC_ERROR;
@@ -852,6 +859,9 @@ PluginView::PluginView(Frame* parentFrame, const IntSize& size, PluginPackage* p
, m_colormap(0)
, m_pluginDisplay(0)
#endif
+#if PLATFORM(QT) && defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5)
+ , m_renderToImage(false)
+#endif
, m_loadManually(loadManually)
, m_manualStream(0)
, m_isJavaScriptPaused(false)
diff --git a/src/3rdparty/webkit/WebCore/plugins/PluginView.h b/src/3rdparty/webkit/WebCore/plugins/PluginView.h
index 51b2127..f346134 100644
--- a/src/3rdparty/webkit/WebCore/plugins/PluginView.h
+++ b/src/3rdparty/webkit/WebCore/plugins/PluginView.h
@@ -54,6 +54,10 @@ typedef PlatformWidget PlatformPluginWidget;
#include <QPixmap>
#endif
#endif
+#if PLATFORM(QT) && defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5)
+#include <QImage>
+class QPainter;
+#endif
namespace JSC {
namespace Bindings {
@@ -371,6 +375,12 @@ private:
void initXEvent(XEvent* event);
#endif
+#if PLATFORM(QT) && defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5)
+ QImage m_image;
+ bool m_renderToImage;
+ void paintUsingImageSurfaceExtension(QPainter* painter, const IntRect& exposedRect);
+#endif
+
IntRect m_clipRect; // The clip rect to apply to a windowed plug-in
IntRect m_windowRect; // Our window rect.
diff --git a/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp b/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp
index fb88b87..8dadc11 100644
--- a/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp
+++ b/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp
@@ -110,12 +110,20 @@ void PluginView::updatePluginWidget()
return;
if (!m_isWindowed && m_windowRect.size() != oldWindowRect.size()) {
- if (m_drawable)
- XFreePixmap(QX11Info::display(), m_drawable);
+#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5)
+ // On Maemo5, Flash always renders to 16-bit buffer
+ if (m_renderToImage)
+ m_image = QImage(m_windowRect.width(), m_windowRect.height(), QImage::Format_RGB16);
+ else
+#endif
+ {
+ if (m_drawable)
+ XFreePixmap(QX11Info::display(), m_drawable);
- m_drawable = XCreatePixmap(QX11Info::display(), QX11Info::appRootWindow(), m_windowRect.width(), m_windowRect.height(),
- ((NPSetWindowCallbackStruct*)m_npWindow.ws_info)->depth);
- QApplication::syncX(); // make sure that the server knows about the Drawable
+ m_drawable = XCreatePixmap(QX11Info::display(), QX11Info::appRootWindow(), m_windowRect.width(), m_windowRect.height(),
+ ((NPSetWindowCallbackStruct*)m_npWindow.ws_info)->depth);
+ QApplication::syncX(); // make sure that the server knows about the Drawable
+ }
}
// do not call setNPWindowIfNeeded immediately, will be called on paint()
@@ -154,6 +162,71 @@ void PluginView::hide()
Widget::hide();
}
+#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5)
+void PluginView::paintUsingImageSurfaceExtension(QPainter* painter, const IntRect& exposedRect)
+{
+ NPImageExpose imageExpose;
+ QPoint offset;
+ QWebPageClient* client = m_parentFrame->view()->hostWindow()->platformPageClient();
+ const bool surfaceHasUntransformedContents = client && qobject_cast<QWidget*>(client->pluginParent());
+
+ QPaintDevice* surface = QPainter::redirected(painter->device(), &offset);
+
+ // If the surface is a QImage, we can render directly into it
+ if (surfaceHasUntransformedContents && surface && surface->devType() == QInternal::Image) {
+ QImage* image = static_cast<QImage*>(surface);
+ offset = -offset; // negating the offset gives us the offset of the view within the surface
+ imageExpose.data = reinterpret_cast<char*>(image->bits());
+ imageExpose.dataSize.width = image->width();
+ imageExpose.dataSize.height = image->height();
+ imageExpose.stride = image->bytesPerLine();
+ imageExpose.depth = image->depth(); // this is guaranteed to be 16 on Maemo5
+ imageExpose.translateX = offset.x() + m_windowRect.x();
+ imageExpose.translateY = offset.y() + m_windowRect.y();
+ imageExpose.scaleX = 1;
+ imageExpose.scaleY = 1;
+ } else {
+ if (m_isTransparent) {
+ // On Maemo5, Flash expects the buffer to contain the contents that are below it.
+ // We don't support transparency for non-raster graphicssystem, so clean the image
+ // before giving to Flash.
+ QPainter imagePainter(&m_image);
+ imagePainter.fillRect(exposedRect, Qt::white);
+ }
+
+ imageExpose.data = reinterpret_cast<char*>(m_image.bits());
+ imageExpose.dataSize.width = m_image.width();
+ imageExpose.dataSize.height = m_image.height();
+ imageExpose.stride = m_image.bytesPerLine();
+ imageExpose.depth = m_image.depth();
+ imageExpose.translateX = 0;
+ imageExpose.translateY = 0;
+ imageExpose.scaleX = 1;
+ imageExpose.scaleY = 1;
+ }
+ imageExpose.x = exposedRect.x();
+ imageExpose.y = exposedRect.y();
+ imageExpose.width = exposedRect.width();
+ imageExpose.height = exposedRect.height();
+
+ XEvent xevent;
+ memset(&xevent, 0, sizeof(XEvent));
+ XGraphicsExposeEvent& exposeEvent = xevent.xgraphicsexpose;
+ exposeEvent.type = GraphicsExpose;
+ exposeEvent.display = 0;
+ exposeEvent.drawable = reinterpret_cast<XID>(&imageExpose);
+ exposeEvent.x = exposedRect.x();
+ exposeEvent.y = exposedRect.y();
+ exposeEvent.width = exposedRect.width();
+ exposeEvent.height = exposedRect.height();
+
+ dispatchNPEvent(xevent);
+
+ if (!surfaceHasUntransformedContents || !surface || surface->devType() != QInternal::Image)
+ painter->drawImage(QPoint(frameRect().x() + exposedRect.x(), frameRect().y() + exposedRect.y()), m_image, exposedRect);
+}
+#endif
+
void PluginView::paint(GraphicsContext* context, const IntRect& rect)
{
if (!m_isStarted) {
@@ -166,19 +239,32 @@ void PluginView::paint(GraphicsContext* context, const IntRect& rect)
setNPWindowIfNeeded();
- if (m_isWindowed || !m_drawable)
+ if (m_isWindowed)
return;
- const bool syncX = m_pluginDisplay && m_pluginDisplay != QX11Info::display();
+ if (!m_drawable
+#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5)
+ && m_image.isNull()
+#endif
+ )
+ return;
QPainter* painter = context->platformContext();
IntRect exposedRect(rect);
exposedRect.intersect(frameRect());
exposedRect.move(-frameRect().x(), -frameRect().y());
+#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5)
+ if (!m_image.isNull()) {
+ paintUsingImageSurfaceExtension(painter, exposedRect);
+ return;
+ }
+#endif
+
QPixmap qtDrawable = QPixmap::fromX11Pixmap(m_drawable, QPixmap::ExplicitlyShared);
const int drawableDepth = ((NPSetWindowCallbackStruct*)m_npWindow.ws_info)->depth;
ASSERT(drawableDepth == qtDrawable.depth());
+ const bool syncX = m_pluginDisplay && m_pluginDisplay != QX11Info::display();
// When printing, Qt uses a QPicture to capture the output in preview mode. The
// QPicture holds a reference to the X Pixmap. As a result, the print preview would
@@ -576,6 +662,13 @@ bool PluginView::platformGetValueStatic(NPNVariable variable, void* value, NPErr
*result = NPERR_NO_ERROR;
return true;
+#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5)
+ case NPNVSupportsWindowlessLocal:
+ *static_cast<NPBool*>(value) = true;
+ *result = NPERR_NO_ERROR;
+ return true;
+#endif
+
default:
return false;
}
@@ -651,7 +744,7 @@ static Display *getPluginDisplay()
// support gdk based plugins (like flash) that use a different X connection.
// The code below has the same effect as this one:
// Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default());
- QLibrary library("libgdk-x11-2.0");
+ QLibrary library("libgdk-x11-2.0.so.0");
if (!library.load())
return 0;
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebkitglobal.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebkitglobal.h
index 665bf1b..63d9e55 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebkitglobal.h
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebkitglobal.h
@@ -22,9 +22,9 @@
#include <QtCore/qglobal.h>
-#define QTWEBKIT_VERSION_STR "2.0.0"
+#define QTWEBKIT_VERSION_STR "2.0.1"
// QTWEBKIT_VERSION is (major << 16) + (minor << 8) + patch. Similar to Qt.
-#define QTWEBKIT_VERSION 0x020000
+#define QTWEBKIT_VERSION 0x020001
// Use: #if (QTWEBKIT_VERSION >= QTWEBKIT_VERSION_CHECK(2, 0, 0)). Similar to Qt.
#define QTWEBKIT_VERSION_CHECK(major, minor, patch) ((major<<16)|(minor<<8)|(patch))
diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog
index 5083ba5..c6c3d72 100644
--- a/src/3rdparty/webkit/WebKit/qt/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog
@@ -1,3 +1,80 @@
+2010-09-12 Martin Smith <martin.smith@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ doc: Changed the title so lists of contents sort better.
+
+ * docs/qtwebkit.qdoc:
+
+2010-09-12 David Boddie <david.boddie@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Doc: More work on the QML documentation.
+
+ * declarative/qdeclarativewebview.cpp:
+
+2010-09-12 Martin Jones <martin.jones@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qml] Ensure WebView gets focus when an editable node is clicked on.
+
+ Task-number: QTBUG-13342
+
+ * declarative/qdeclarativewebview.cpp:
+ (GraphicsWebView::mousePressEvent):
+
+2010-09-12 David Boddie <david.boddie@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Doc: qdoc fixes.
+
+ * declarative/qdeclarativewebview.cpp:
+
+2010-09-12 Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] let WebKit inject itself into the qt configuration
+
+ Task-number: QTBUG-12379
+
+ * qt_webkit_version.pri: Use the faster + instead of *
+ operator to add webkit to the config.
+
+2010-09-12 Martin Smith <martin.smith@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix group of declarative web view in QML docs.
+
+ * declarative/qdeclarativewebview.cpp:
+
+2010-08-20 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Ariya Hidayat.
+
+ [Qt] Allow wmode=transparent in QWebView on Maemo5 after r65775.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44043
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::createPlugin):
+
+2010-08-19 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Kenneth Christiansen.
+
+ [Qt] Inject wmode=opaque for both QWebView and QGraphicsWebView on Maemo5
+ as Flash XEmbed support is flaky.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44043
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::createPlugin):
+
2010-08-05 David Leong <david.leong@nokia.com>
Reviewed by Simon Hausmann.
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index 713fa39..dcbf614 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -4,7 +4,7 @@
* Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
* Copyright (C) 2008 Collabora Ltd. All rights reserved.
* Coypright (C) 2008 Holger Hans Peter Freyther
- * Coypright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in>
+ * Coypright (C) 2009, 2010 Girish Ramakrishnan <girish@forwardbias.in>
*
* All rights reserved.
*
@@ -1349,7 +1349,19 @@ PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize,
Vector<String> values = paramValues;
if (mimeType == "application/x-shockwave-flash") {
QWebPageClient* client = m_webFrame->page()->d->client;
- if (!client || !qobject_cast<QWidget*>(client->pluginParent())) {
+ const bool isQWebView = client && qobject_cast<QWidget*>(client->pluginParent());
+#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5)
+ size_t wmodeIndex = params.find("wmode");
+ if (wmodeIndex == -1) {
+ // Disable XEmbed mode and force it to opaque mode
+ params.append("wmode");
+ values.append("opaque");
+ } else if (!isQWebView) {
+ // Disable transparency if client is not a QWebView
+ values[wmodeIndex] = "opaque";
+ }
+#else
+ if (!isQWebView) {
// inject wmode=opaque when there is no client or the client is not a QWebView
size_t wmodeIndex = params.find("wmode");
if (wmodeIndex == -1) {
@@ -1358,6 +1370,7 @@ PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize,
} else
values[wmodeIndex] = "opaque";
}
+#endif
}
RefPtr<PluginView> pluginView = PluginView::create(m_frame, pluginSize, element, url,
diff --git a/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri b/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri
index 4594d1e..f2282f8 100644
--- a/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri
+++ b/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri
@@ -1,5 +1,5 @@
-QT_WEBKIT_VERSION = 4.7.0
+QT_WEBKIT_VERSION = 4.7.1
QT_WEBKIT_MAJOR_VERSION = 4
QT_WEBKIT_MINOR_VERSION = 7
-QT_WEBKIT_PATCH_VERSION = 0
+QT_WEBKIT_PATCH_VERSION = 1
QT_CONFIG += webkit
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
index 062bbfb..c0b664f 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
@@ -128,8 +128,8 @@ QDeclarativeFlickablePrivate::QDeclarativeFlickablePrivate()
, flickingHorizontally(false), flickingVertically(false)
, hMoved(false), vMoved(false)
, movingHorizontally(false), movingVertically(false)
- , stealMouse(false), pressed(false)
- , interactive(true), deceleration(500), maxVelocity(2000), reportedVelocitySmoothing(100)
+ , stealMouse(false), pressed(false), interactive(true), calcVelocity(false)
+ , deceleration(500), maxVelocity(2000), reportedVelocitySmoothing(100)
, delayedPressEvent(0), delayedPressTarget(0), pressDelay(0), fixupDuration(600)
, vTime(0), visibleArea(0)
, flickableDirection(QDeclarativeFlickable::AutoFlickDirection)
@@ -981,7 +981,7 @@ void QDeclarativeFlickable::viewportMoved()
qreal prevY = d->lastFlickablePosition.x();
qreal prevX = d->lastFlickablePosition.y();
d->velocityTimeline.clear();
- if (d->pressed) {
+ if (d->pressed || d->calcVelocity) {
int elapsed = QDeclarativeItemPrivate::restart(d->velocityTime);
if (elapsed > 0) {
qreal horizontalVelocity = (prevX - d->hData.move.value()) * 1000 / elapsed;
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h b/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h
index c398faa..2da034c 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h
@@ -141,6 +141,7 @@ public:
bool stealMouse : 1;
bool pressed : 1;
bool interactive : 1;
+ bool calcVelocity : 1;
QElapsedTimer lastPosTime;
QPointF lastPos;
QPointF pressPos;
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index a0faf14..6a99733 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -2241,7 +2241,9 @@ void QDeclarativeGridView::trackedPositionChanged()
}
if (viewPos != pos) {
cancelFlick();
+ d->calcVelocity = true;
d->setPosition(pos);
+ d->calcVelocity = false;
}
}
}
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index 177c5b3..ae504aa 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -2732,7 +2732,9 @@ void QDeclarativeListView::trackedPositionChanged()
}
if (viewPos != pos) {
cancelFlick();
+ d->calcVelocity = true;
d->setPosition(pos);
+ d->calcVelocity = false;
}
}
}
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
index 5516611..4685e65 100644
--- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp
+++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
@@ -303,7 +303,9 @@ QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate()
The \l {MouseEvent}{mouse} parameter provides information about the click, including the x and y
position of the release of the click, and whether the click was held.
- The \e accepted property of the MouseEvent parameter is ignored in this handler.
+ If the \e accepted property of the \l {MouseEvent}{mouse} parameter is set to false
+ in the handler, the onPressed/onReleased/onClicked handlers will be called for the second
+ click; otherwise they are supressed. The accepted property defaults to true.
*/
/*!
@@ -525,12 +527,13 @@ void QDeclarativeMouseArea::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *even
if (!d->absorb) {
QDeclarativeItem::mouseDoubleClickEvent(event);
} else {
- QDeclarativeItem::mouseDoubleClickEvent(event);
- if (event->isAccepted()) {
- // Only deliver the event if we have accepted the press.
- d->saveEvent(event);
- QDeclarativeMouseEvent me(d->lastPos.x(), d->lastPos.y(), d->lastButton, d->lastButtons, d->lastModifiers, true, false);
- emit this->doubleClicked(&me);
+ d->saveEvent(event);
+ QDeclarativeMouseEvent me(d->lastPos.x(), d->lastPos.y(), d->lastButton, d->lastButtons, d->lastModifiers, true, false);
+ me.setAccepted(d->isDoubleClickConnected());
+ emit this->doubleClicked(&me);
+ if (!me.isAccepted()) {
+ // Only deliver the press event if we haven't accepted the double click.
+ QDeclarativeItem::mouseDoubleClickEvent(event);
}
}
}
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h b/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h
index cf9dc18..48a56d9 100644
--- a/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h
@@ -95,6 +95,12 @@ public:
return QObjectPrivate::get(q)->isSignalConnected(idx);
}
+ bool isDoubleClickConnected() {
+ Q_Q(QDeclarativeMouseArea);
+ static int idx = QObjectPrivate::get(q)->signalIndex("doubleClicked(QDeclarativeMouseEvent*)");
+ return QObjectPrivate::get(q)->isSignalConnected(idx);
+ }
+
bool absorb : 1;
bool hovered : 1;
bool pressed : 1;
diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp
index 605b1e6..af3b79a 100644
--- a/src/gui/egl/qegl.cpp
+++ b/src/gui/egl/qegl.cpp
@@ -259,7 +259,7 @@ EGLConfig QEgl::defaultConfig(int devType, API api, ConfigOptions options)
// Add paint engine requirements
if (api == OpenVG) {
-#ifndef QVG_SCISSOR_CLIP
+#if !defined(QVG_SCISSOR_CLIP) && defined(EGL_ALPHA_MASK_SIZE)
configAttribs.setValue(EGL_ALPHA_MASK_SIZE, 1);
#endif
} else {
diff --git a/src/gui/egl/qegl_p.h b/src/gui/egl/qegl_p.h
index c214e88..aa08934 100644
--- a/src/gui/egl/qegl_p.h
+++ b/src/gui/egl/qegl_p.h
@@ -65,6 +65,10 @@ QT_BEGIN_INCLUDE_NAMESPACE
#else
# include <EGL/egl.h>
#endif
+#if !defined(EGL_VERSION_1_2)
+typedef unsigned int EGLenum;
+typedef void *EGLClientBuffer;
+#endif
#else
//types from egltypes.h for compiling stub without EGL headers
diff --git a/src/gui/egl/qeglproperties.cpp b/src/gui/egl/qeglproperties.cpp
index 65b4d85..4b8ca9a 100644
--- a/src/gui/egl/qeglproperties.cpp
+++ b/src/gui/egl/qeglproperties.cpp
@@ -241,8 +241,10 @@ void QEglProperties::setRenderableType(QEgl::API api)
// reductions in complexity are possible.
bool QEglProperties::reduceConfiguration()
{
+#ifdef EGL_SWAP_BEHAVIOR
if (value(EGL_SWAP_BEHAVIOR) != EGL_DONT_CARE)
removeValue(EGL_SWAP_BEHAVIOR);
+#endif
#ifdef EGL_VG_ALPHA_FORMAT_PRE_BIT
// For OpenVG, we sometimes try to create a surface using a pre-multiplied format. If we can't
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 89c9e4d..81ec414 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -5270,7 +5270,6 @@ void QGraphicsScene::drawItems(QPainter *painter,
if (!d->unpolishedItems.isEmpty())
d->_q_polishItems();
- d->updateAll = false;
QTransform viewTransform = painter->worldTransform();
Q_UNUSED(options);
@@ -5279,6 +5278,7 @@ void QGraphicsScene::drawItems(QPainter *painter,
QRegion *expose = 0;
const quint32 oldRectAdjust = d->rectAdjust;
if (view) {
+ d->updateAll = false;
expose = &view->d_func()->exposedRegion;
if (view->d_func()->optimizationFlags & QGraphicsView::DontAdjustForAntialiasing)
d->rectAdjust = 1;
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index d6fb630..caeeeb9 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -65,6 +65,7 @@
#include "qcolormap.h"
#include "qdebug.h"
#include "private/qgraphicssystemfactory_p.h"
+#include "private/qgraphicssystem_p.h"
#include "private/qstylesheetstyle_p.h"
#include "private/qstyle_p.h"
#include "qmessagebox.h"
diff --git a/src/gui/painting/qdrawhelper_sse2.cpp b/src/gui/painting/qdrawhelper_sse2.cpp
index ba2ba32..ac73958 100644
--- a/src/gui/painting/qdrawhelper_sse2.cpp
+++ b/src/gui/painting/qdrawhelper_sse2.cpp
@@ -266,10 +266,10 @@ void qt_memfill32_sse2(quint32 *dest, quint32 value, int count)
int n = (count128 + 3) / 4;
switch (count128 & 0x3) {
- case 0: do { _mm_store_si128(dst128++, value128);
- case 3: _mm_store_si128(dst128++, value128);
- case 2: _mm_store_si128(dst128++, value128);
- case 1: _mm_store_si128(dst128++, value128);
+ case 0: do { _mm_stream_si128(dst128++, value128);
+ case 3: _mm_stream_si128(dst128++, value128);
+ case 2: _mm_stream_si128(dst128++, value128);
+ case 1: _mm_stream_si128(dst128++, value128);
} while (--n > 0);
}
diff --git a/src/gui/painting/qdrawhelper_ssse3.cpp b/src/gui/painting/qdrawhelper_ssse3.cpp
index 4cb4089..fb5602e 100644
--- a/src/gui/painting/qdrawhelper_ssse3.cpp
+++ b/src/gui/painting/qdrawhelper_ssse3.cpp
@@ -79,69 +79,6 @@ inline static void blend_pixel(quint32 &dst, const quint32 src)
}
-#define BLEND_SOURCE_OVER_ARGB32_FIRST_ROW_SSSE3(dst, src, length, nullVector, half, one, colorMask, alphaMask) { \
- int x = 0; \
-\
- /* First, get dst aligned. */ \
- const int offsetToAlignOn16Bytes = (4 - ((reinterpret_cast<quintptr>(dst) >> 2) & 0x3)) & 0x3;\
- const int prologLength = qMin(length, offsetToAlignOn16Bytes);\
-\
- for (; x < prologLength; ++x) {\
- blend_pixel(dst[x], src[x]); \
- } \
-\
- const int minusOffsetToAlignSrcOn16Bytes = (reinterpret_cast<quintptr>(&(src[x])) >> 2) & 0x3;\
-\
- if (!minusOffsetToAlignSrcOn16Bytes) {\
- /* src is aligned, usual algorithm but with aligned operations.\
- See the SSE2 version for more documentation on the algorithm itself. */\
- const __m128i alphaShuffleMask = _mm_set_epi8(0xff,15,0xff,15,0xff,11,0xff,11,0xff,7,0xff,7,0xff,3,0xff,3);\
- for (; x < length-3; x += 4) { \
- const __m128i srcVector = _mm_load_si128((__m128i *)&src[x]); \
- const __m128i srcVectorAlpha = _mm_and_si128(srcVector, alphaMask); \
- if (_mm_movemask_epi8(_mm_cmpeq_epi32(srcVectorAlpha, alphaMask)) == 0xffff) { \
- _mm_store_si128((__m128i *)&dst[x], srcVector); \
- } else if (_mm_movemask_epi8(_mm_cmpeq_epi32(srcVectorAlpha, nullVector)) != 0xffff) { \
- __m128i alphaChannel = _mm_shuffle_epi8(srcVector, alphaShuffleMask); \
- alphaChannel = _mm_sub_epi16(one, alphaChannel); \
- const __m128i dstVector = _mm_load_si128((__m128i *)&dst[x]); \
- __m128i destMultipliedByOneMinusAlpha; \
- BYTE_MUL_SSE2(destMultipliedByOneMinusAlpha, dstVector, alphaChannel, colorMask, half); \
- const __m128i result = _mm_add_epi8(srcVector, destMultipliedByOneMinusAlpha); \
- _mm_store_si128((__m128i *)&dst[x], result); \
- } \
- } /* end for() */\
- } else if ((length - x) >= 8) {\
- /* We are at the first line, so "x - minusOffsetToAlignSrcOn16Bytes" could go before src, and\
- generate an invalid access. */\
-\
- /* We use two vectors to extract the src: prevLoaded for the first pixels, lastLoaded for the current pixels. */\
- __m128i srcVectorPrevLoaded;\
- if (minusOffsetToAlignSrcOn16Bytes > prologLength) {\
- /* We go forward 4 pixels to avoid reading before src. */\
- for (; x < prologLength + 4; ++x)\
- blend_pixel(dst[x], src[x]); \
- }\
- srcVectorPrevLoaded = _mm_load_si128((__m128i *)&src[x - minusOffsetToAlignSrcOn16Bytes]);\
- const int palignrOffset = minusOffsetToAlignSrcOn16Bytes << 2;\
-\
- const __m128i alphaShuffleMask = _mm_set_epi8(0xff,15,0xff,15,0xff,11,0xff,11,0xff,7,0xff,7,0xff,3,0xff,3);\
- switch (palignrOffset) {\
- case 4:\
- BLENDING_LOOP(4, length)\
- break;\
- case 8:\
- BLENDING_LOOP(8, length)\
- break;\
- case 12:\
- BLENDING_LOOP(12, length)\
- break;\
- }\
- }\
- for (; x < length; ++x) \
- blend_pixel(dst[x], src[x]); \
-}
-
// Basically blend src over dst with the const alpha defined as constAlphaVector.
// nullVector, half, one, colorMask are constant accross the whole image/texture, and should be defined as:
//const __m128i nullVector = _mm_set1_epi32(0);
@@ -153,7 +90,7 @@ inline static void blend_pixel(quint32 &dst, const quint32 src)
// The computation being done is:
// result = s + d * (1-alpha)
// with shortcuts if fully opaque or fully transparent.
-#define BLEND_SOURCE_OVER_ARGB32_MAIN_SSSE3(dst, src, length, nullVector, half, one, colorMask, alphaMask) { \
+#define BLEND_SOURCE_OVER_ARGB32_SSSE3(dst, src, length, nullVector, half, one, colorMask, alphaMask) { \
int x = 0; \
\
/* First, get dst aligned. */ \
@@ -218,14 +155,8 @@ void qt_blend_argb32_on_argb32_ssse3(uchar *destPixels, int dbpl,
const __m128i one = _mm_set1_epi16(0xff);
const __m128i colorMask = _mm_set1_epi32(0x00ff00ff);
- // We have to unrol the first row in order to deal with the load on unaligned data
- // prior to the src pointer.
- BLEND_SOURCE_OVER_ARGB32_FIRST_ROW_SSSE3(dst, src, w, nullVector, half, one, colorMask, alphaMask);
- dst = (quint32 *)(((uchar *) dst) + dbpl);
- src = (const quint32 *)(((const uchar *) src) + sbpl);
-
- for (int y = 1; y < h; ++y) {
- BLEND_SOURCE_OVER_ARGB32_MAIN_SSSE3(dst, src, w, nullVector, half, one, colorMask, alphaMask);
+ for (int y = 0; y < h; ++y) {
+ BLEND_SOURCE_OVER_ARGB32_SSSE3(dst, src, w, nullVector, half, one, colorMask, alphaMask);
dst = (quint32 *)(((uchar *) dst) + dbpl);
src = (const quint32 *)(((const uchar *) src) + sbpl);
}
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index 569853c..0dfd295 100644
--- a/src/gui/text/qfontengine.cpp
+++ b/src/gui/text/qfontengine.cpp
@@ -631,10 +631,10 @@ QImage QFontEngine::alphaMapForGlyph(glyph_t glyph)
if (glyph_width <= 0 || glyph_height <= 0)
return QImage();
QFixedPoint pt;
- pt.x = 0;
+ pt.x = -glyph_x;
pt.y = -glyph_y; // the baseline
QPainterPath path;
- QImage im(glyph_width + qAbs(glyph_x) + 4, glyph_height, QImage::Format_ARGB32_Premultiplied);
+ QImage im(glyph_width + 4, glyph_height, QImage::Format_ARGB32_Premultiplied);
im.fill(Qt::transparent);
QPainter p(&im);
p.setRenderHint(QPainter::Antialiasing);
diff --git a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp
index 4983840..abab33c 100644
--- a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp
+++ b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp
@@ -167,7 +167,7 @@ QDeclarativeFolderListModel::QDeclarativeFolderListModel(QObject *parent)
connect(&d->model, SIGNAL(rowsRemoved(const QModelIndex&,int,int))
, this, SLOT(removed(const QModelIndex&,int,int)));
connect(&d->model, SIGNAL(dataChanged(const QModelIndex&,const QModelIndex&))
- , this, SLOT(dataChanged(const QModelIndex&,const QModelIndex&)));
+ , this, SLOT(handleDataChanged(const QModelIndex&,const QModelIndex&)));
connect(&d->model, SIGNAL(modelReset()), this, SLOT(refresh()));
connect(&d->model, SIGNAL(layoutChanged()), this, SLOT(refresh()));
}
@@ -363,7 +363,7 @@ void QDeclarativeFolderListModel::removed(const QModelIndex &index, int start, i
}
}
-void QDeclarativeFolderListModel::dataChanged(const QModelIndex &start, const QModelIndex &end)
+void QDeclarativeFolderListModel::handleDataChanged(const QModelIndex &start, const QModelIndex &end)
{
if (start.parent() == d->folderIndex)
emit dataChanged(index(start.row(),0), index(end.row(),0));
diff --git a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.h b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.h
index 1bab5f84..24edecd 100644
--- a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.h
+++ b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.h
@@ -138,7 +138,7 @@ private Q_SLOTS:
void refresh();
void inserted(const QModelIndex &index, int start, int end);
void removed(const QModelIndex &index, int start, int end);
- void dataChanged(const QModelIndex &start, const QModelIndex &end);
+ void handleDataChanged(const QModelIndex &start, const QModelIndex &end);
private:
Q_DISABLE_COPY(QDeclarativeFolderListModel)
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp
index 75e5a60..1b0c5e8 100644
--- a/src/openvg/qpaintengine_vg.cpp
+++ b/src/openvg/qpaintengine_vg.cpp
@@ -196,7 +196,9 @@ public:
#endif
QTransform transform; // Currently active transform.
- bool simpleTransform; // True if the transform is simple (non-projective).
+ bool affineTransform; // True if the transform is non-projective.
+ bool simpleTransform; // True if the transform is simple translate
+ // or 0, 90, 180, and 270 degree rotation
qreal penScale; // Pen scaling factor from "transform".
QTransform pathTransform; // Calculated VG path transformation.
@@ -372,6 +374,7 @@ void QVGPaintEnginePrivate::init()
roundRectPath = 0;
#endif
+ affineTransform = true;
simpleTransform = true;
pathTransformSet = false;
penScale = 1.0;
@@ -524,12 +527,59 @@ void QVGPaintEnginePrivate::setTransform
vgLoadMatrix(mat);
}
+// Determine if a co-ordinate transform is simple enough to allow
+// rectangle-based clipping with vgMask() and rounding translation
+// to integers. Simple transforms most often result from origin translations.
+static inline bool transformIsSimple(const QTransform& transform)
+{
+ QTransform::TransformationType type = transform.type();
+ if (type == QTransform::TxNone || type == QTransform::TxTranslate) {
+ return true;
+ } else if (type == QTransform::TxScale) {
+ // Check for 0 and 180 degree rotations.
+ // (0 might happen after 4 rotations of 90 degrees).
+ qreal m11 = transform.m11();
+ qreal m12 = transform.m12();
+ qreal m21 = transform.m21();
+ qreal m22 = transform.m22();
+ if (m12 == 0.0f && m21 == 0.0f) {
+ if (m11 == 1.0f && m22 == 1.0f)
+ return true; // 0 degrees
+ else if (m11 == -1.0f && m22 == -1.0f)
+ return true; // 180 degrees.
+ if(m11 == 1.0f && m22 == -1.0f)
+ return true; // 0 degrees inverted y.
+ else if(m11 == -1.0f && m22 == 1.0f)
+ return true; // 180 degrees inverted y.
+ }
+ } else if (type == QTransform::TxRotate) {
+ // Check for 90, and 270 degree rotations.
+ qreal m11 = transform.m11();
+ qreal m12 = transform.m12();
+ qreal m21 = transform.m21();
+ qreal m22 = transform.m22();
+ if (m11 == 0.0f && m22 == 0.0f) {
+ if (m12 == 1.0f && m21 == -1.0f)
+ return true; // 90 degrees.
+ else if (m12 == -1.0f && m21 == 1.0f)
+ return true; // 270 degrees.
+ else if (m12 == -1.0f && m21 == -1.0f)
+ return true; // 90 degrees inverted y.
+ else if (m12 == 1.0f && m21 == 1.0f)
+ return true; // 270 degrees inverted y.
+ }
+ }
+ return false;
+}
+
Q_DECL_IMPORT extern bool qt_scaleForTransform(const QTransform &transform, qreal *scale);
void QVGPaintEnginePrivate::updateTransform(QPaintDevice *pdev)
{
VGfloat devh = pdev->height();
+ simpleTransform = transformIsSimple(transform);
+
// Construct the VG transform by combining the Qt transform with
// the following viewport transformation:
// | 1 0 0 |
@@ -552,9 +602,9 @@ void QVGPaintEnginePrivate::updateTransform(QPaintDevice *pdev)
// so we will have to convert the co-ordinates ourselves.
// Change the matrix to just the viewport transformation.
pathTransform = viewport;
- simpleTransform = false;
+ affineTransform = false;
} else {
- simpleTransform = true;
+ affineTransform = true;
}
pathTransformSet = false;
@@ -583,7 +633,7 @@ VGPath QVGPaintEnginePrivate::vectorPathToVGPath(const QVectorPath& path)
// Size is sufficient segments for drawRoundedRect() paths.
QVarLengthArray<VGubyte, 20> segments;
- if (sizeof(qreal) == sizeof(VGfloat) && elements && simpleTransform) {
+ if (sizeof(qreal) == sizeof(VGfloat) && elements && affineTransform) {
// If Qt was compiled with qreal the same size as VGfloat,
// then convert the segment types and use the incoming
// points array directly.
@@ -618,7 +668,7 @@ VGPath QVGPaintEnginePrivate::vectorPathToVGPath(const QVectorPath& path)
int curvePos = 0;
QPointF temp;
- if (elements && simpleTransform) {
+ if (elements && affineTransform) {
// Convert the members of the element array.
for (int i = 0; i < count; ++i) {
switch (elements[i]) {
@@ -662,7 +712,7 @@ VGPath QVGPaintEnginePrivate::vectorPathToVGPath(const QVectorPath& path)
}
points += 2;
}
- } else if (elements && !simpleTransform) {
+ } else if (elements && !affineTransform) {
// Convert the members of the element array after applying the
// current transform to the path locally.
for (int i = 0; i < count; ++i) {
@@ -711,7 +761,7 @@ VGPath QVGPaintEnginePrivate::vectorPathToVGPath(const QVectorPath& path)
}
points += 2;
}
- } else if (count > 0 && simpleTransform) {
+ } else if (count > 0 && affineTransform) {
// If there is no element array, then the path is assumed
// to be a MoveTo followed by several LineTo's.
coords.append(points[0]);
@@ -724,7 +774,7 @@ VGPath QVGPaintEnginePrivate::vectorPathToVGPath(const QVectorPath& path)
segments.append(VG_LINE_TO_ABS);
--count;
}
- } else if (count > 0 && !simpleTransform) {
+ } else if (count > 0 && !affineTransform) {
// Convert a simple path, and apply the transform locally.
temp = transform.map(QPointF(points[0], points[1]));
coords.append(temp.x());
@@ -785,7 +835,7 @@ VGPath QVGPaintEnginePrivate::painterPathToVGPath(const QPainterPath& path)
bool haveStart = false;
bool haveEnd = false;
- if (simpleTransform) {
+ if (affineTransform) {
// Convert the members of the element array.
for (int i = 0; i < count; ++i) {
switch (elements[i].type) {
@@ -1560,36 +1610,6 @@ void QVGPaintEngine::stroke(const QVectorPath &path, const QPen &pen)
vgDestroyPath(vgpath);
}
-// Determine if a co-ordinate transform is simple enough to allow
-// rectangle-based clipping with vgMask(). Simple transforms most
-// often result from origin translations.
-static inline bool clipTransformIsSimple(const QTransform& transform)
-{
- QTransform::TransformationType type = transform.type();
- if (type == QTransform::TxNone || type == QTransform::TxTranslate)
- return true;
- if (type == QTransform::TxRotate) {
- // Check for 0, 90, 180, and 270 degree rotations.
- // (0 might happen after 4 rotations of 90 degrees).
- qreal m11 = transform.m11();
- qreal m12 = transform.m12();
- qreal m21 = transform.m21();
- qreal m22 = transform.m22();
- if (m11 == 0.0f && m22 == 0.0f) {
- if (m12 == 1.0f && m21 == -1.0f)
- return true; // 90 degrees.
- else if (m12 == -1.0f && m21 == 1.0f)
- return true; // 270 degrees.
- } else if (m12 == 0.0f && m21 == 0.0f) {
- if (m11 == -1.0f && m22 == -1.0f)
- return true; // 180 degrees.
- else if (m11 == 1.0f && m22 == 1.0f)
- return true; // 0 degrees.
- }
- }
- return false;
-}
-
#if defined(QVG_SCISSOR_CLIP)
void QVGPaintEngine::clip(const QVectorPath &path, Qt::ClipOperation op)
@@ -1607,7 +1627,7 @@ void QVGPaintEngine::clip(const QVectorPath &path, Qt::ClipOperation op)
// We aren't using masking, so handle simple QRectF's only.
if (path.shape() == QVectorPath::RectangleHint &&
- path.elementCount() == 4 && clipTransformIsSimple(d->transform)) {
+ path.elementCount() == 4 && d->simpleTransform) {
// Clipping region that resulted from QPainter::setClipRect(QRectF).
// Convert it into a QRect and apply.
const qreal *points = path.points();
@@ -1757,7 +1777,7 @@ void QVGPaintEngine::clip(const QVectorPath &path, Qt::ClipOperation op)
// We don't have vgRenderToMask(), so handle simple QRectF's only.
if (path.shape() == QVectorPath::RectangleHint &&
- path.elementCount() == 4 && clipTransformIsSimple(d->transform)) {
+ path.elementCount() == 4 && d->simpleTransform) {
// Clipping region that resulted from QPainter::setClipRect(QRectF).
// Convert it into a QRect and apply.
const qreal *points = path.points();
@@ -1809,7 +1829,7 @@ void QVGPaintEngine::clip(const QRect &rect, Qt::ClipOperation op)
d->dirty |= QPaintEngine::DirtyClipRegion;
// If we have a non-simple transform, then use path-based clipping.
- if (op != Qt::NoClip && !clipTransformIsSimple(d->transform)) {
+ if (op != Qt::NoClip && !d->simpleTransform) {
QPaintEngineEx::clip(rect, op);
return;
}
@@ -1928,7 +1948,7 @@ void QVGPaintEngine::clip(const QRegion &region, Qt::ClipOperation op)
d->dirty |= QPaintEngine::DirtyClipRegion;
// If we have a non-simple transform, then use path-based clipping.
- if (op != Qt::NoClip && !clipTransformIsSimple(d->transform)) {
+ if (op != Qt::NoClip && !d->simpleTransform) {
QPaintEngineEx::clip(region, op);
return;
}
@@ -2505,14 +2525,14 @@ void QVGPaintEngine::fillRect(const QRectF &rect, const QBrush &brush)
// Check to see if we can use vgClear() for faster filling.
if (brush.style() == Qt::SolidPattern && brush.isOpaque() &&
- clipTransformIsSimple(d->transform) && d->opacity == 1.0f &&
+ d->simpleTransform && d->opacity == 1.0f &&
clearRect(rect, brush.color())) {
return;
}
#if !defined(QVG_NO_MODIFY_PATH)
VGfloat coords[8];
- if (d->simpleTransform) {
+ if (d->affineTransform) {
coords[0] = rect.x();
coords[1] = rect.y();
coords[2] = rect.x() + rect.width();
@@ -2547,14 +2567,14 @@ void QVGPaintEngine::fillRect(const QRectF &rect, const QColor &color)
Q_D(QVGPaintEngine);
// Check to see if we can use vgClear() for faster filling.
- if (clipTransformIsSimple(d->transform) && d->opacity == 1.0f && color.alpha() == 255 &&
+ if (d->simpleTransform && d->opacity == 1.0f && color.alpha() == 255 &&
clearRect(rect, color)) {
return;
}
#if !defined(QVG_NO_MODIFY_PATH)
VGfloat coords[8];
- if (d->simpleTransform) {
+ if (d->affineTransform) {
coords[0] = rect.x();
coords[1] = rect.y();
coords[2] = rect.x() + rect.width();
@@ -2587,7 +2607,7 @@ void QVGPaintEngine::fillRect(const QRectF &rect, const QColor &color)
void QVGPaintEngine::drawRoundedRect(const QRectF &rect, qreal xrad, qreal yrad, Qt::SizeMode mode)
{
Q_D(QVGPaintEngine);
- if (d->simpleTransform) {
+ if (d->affineTransform) {
QVGPainterState *s = state();
VGPath vgpath = d->roundedRectPath(rect, xrad, yrad, mode);
d->draw(vgpath, s->pen, s->brush);
@@ -2606,7 +2626,7 @@ void QVGPaintEngine::drawRects(const QRect *rects, int rectCount)
QVGPainterState *s = state();
for (int i = 0; i < rectCount; ++i, ++rects) {
VGfloat coords[8];
- if (d->simpleTransform) {
+ if (d->affineTransform) {
coords[0] = rects->x();
coords[1] = rects->y();
coords[2] = rects->x() + rects->width();
@@ -2647,7 +2667,7 @@ void QVGPaintEngine::drawRects(const QRectF *rects, int rectCount)
QVGPainterState *s = state();
for (int i = 0; i < rectCount; ++i, ++rects) {
VGfloat coords[8];
- if (d->simpleTransform) {
+ if (d->affineTransform) {
coords[0] = rects->x();
coords[1] = rects->y();
coords[2] = rects->x() + rects->width();
@@ -2685,7 +2705,7 @@ void QVGPaintEngine::drawLines(const QLine *lines, int lineCount)
QVGPainterState *s = state();
for (int i = 0; i < lineCount; ++i, ++lines) {
VGfloat coords[4];
- if (d->simpleTransform) {
+ if (d->affineTransform) {
coords[0] = lines->x1();
coords[1] = lines->y1();
coords[2] = lines->x2();
@@ -2713,7 +2733,7 @@ void QVGPaintEngine::drawLines(const QLineF *lines, int lineCount)
QVGPainterState *s = state();
for (int i = 0; i < lineCount; ++i, ++lines) {
VGfloat coords[4];
- if (d->simpleTransform) {
+ if (d->affineTransform) {
coords[0] = lines->x1();
coords[1] = lines->y1();
coords[2] = lines->x2();
@@ -2739,7 +2759,7 @@ void QVGPaintEngine::drawEllipse(const QRectF &r)
// Based on the description of vguEllipse() in the OpenVG specification.
// We don't use vguEllipse(), to avoid unnecessary library dependencies.
Q_D(QVGPaintEngine);
- if (d->simpleTransform) {
+ if (d->affineTransform) {
QVGPainterState *s = state();
VGPath path = vgCreatePath(VG_PATH_FORMAT_STANDARD,
VG_PATH_DATATYPE_F,
@@ -2812,7 +2832,7 @@ void QVGPaintEngine::drawPoints(const QPointF *points, int pointCount)
for (int i = 0; i < pointCount; ++i, ++points) {
VGfloat coords[4];
- if (d->simpleTransform) {
+ if (d->affineTransform) {
coords[0] = points->x();
coords[1] = points->y();
coords[2] = coords[0];
@@ -2846,7 +2866,7 @@ void QVGPaintEngine::drawPoints(const QPoint *points, int pointCount)
for (int i = 0; i < pointCount; ++i, ++points) {
VGfloat coords[4];
- if (d->simpleTransform) {
+ if (d->affineTransform) {
coords[0] = points->x();
coords[1] = points->y();
coords[2] = coords[0];
@@ -2880,7 +2900,7 @@ void QVGPaintEngine::drawPolygon(const QPointF *points, int pointCount, PolygonD
QVarLengthArray<VGfloat, 16> coords;
QVarLengthArray<VGubyte, 10> segments;
for (int i = 0; i < pointCount; ++i, ++points) {
- if (d->simpleTransform) {
+ if (d->affineTransform) {
coords.append(points->x());
coords.append(points->y());
} else {
@@ -2927,7 +2947,7 @@ void QVGPaintEngine::drawPolygon(const QPoint *points, int pointCount, PolygonDr
QVarLengthArray<VGfloat, 16> coords;
QVarLengthArray<VGubyte, 10> segments;
for (int i = 0; i < pointCount; ++i, ++points) {
- if (d->simpleTransform) {
+ if (d->affineTransform) {
coords.append(points->x());
coords.append(points->y());
} else {
@@ -2962,7 +2982,7 @@ void QVGPaintEngine::drawPolygon(const QPoint *points, int pointCount, PolygonDr
void QVGPaintEnginePrivate::setImageOptions()
{
- if (opacity != 1.0f && simpleTransform) {
+ if (opacity != 1.0f && affineTransform) {
if (opacity != paintOpacity) {
VGfloat values[4];
values[0] = 1.0f;
@@ -3009,7 +3029,10 @@ static void drawVGImage(QVGPaintEnginePrivate *d,
QTransform transform(d->imageTransform);
VGfloat scaleX = sr.width() == 0.0f ? 0.0f : r.width() / sr.width();
VGfloat scaleY = sr.height() == 0.0f ? 0.0f : r.height() / sr.height();
- transform.translate(r.x(), r.y());
+ if (d->simpleTransform)
+ transform.translate(qRound(r.x()), qRound(r.y()));
+ else
+ transform.translate(r.x(), r.y());
transform.scale(scaleX, scaleY);
d->setTransform(VG_MATRIX_IMAGE_USER_TO_SURFACE, transform);
@@ -3027,7 +3050,10 @@ static void drawVGImage(QVGPaintEnginePrivate *d,
return;
QTransform transform(d->imageTransform);
- transform.translate(pos.x(), pos.y());
+ if(d->simpleTransform)
+ transform.translate(qRound(pos.x()), qRound(pos.y()));
+ else
+ transform.translate(pos.x(), pos.y());
d->setTransform(VG_MATRIX_IMAGE_USER_TO_SURFACE, transform);
d->setImageOptions();
@@ -3070,7 +3096,7 @@ void QVGPaintEngine::drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF
QVGPixmapData *vgpd = static_cast<QVGPixmapData *>(pd);
if (!vgpd->isValid())
return;
- if (d->simpleTransform)
+ if (d->affineTransform)
drawVGImage(d, r, vgpd->toVGImage(), vgpd->size(), sr);
else
drawVGImage(d, r, vgpd->toVGImage(d->opacity), vgpd->size(), sr);
@@ -3089,7 +3115,7 @@ void QVGPaintEngine::drawPixmap(const QPointF &pos, const QPixmap &pm)
QVGPixmapData *vgpd = static_cast<QVGPixmapData *>(pd);
if (!vgpd->isValid())
return;
- if (d->simpleTransform)
+ if (d->affineTransform)
drawVGImage(d, pos, vgpd->toVGImage());
else
drawVGImage(d, pos, vgpd->toVGImage(d->opacity));
@@ -3104,7 +3130,7 @@ void QVGPaintEngine::drawImage
{
Q_D(QVGPaintEngine);
VGImage vgImg;
- if (d->simpleTransform || d->opacity == 1.0f)
+ if (d->affineTransform || d->opacity == 1.0f)
vgImg = toVGImageSubRect(image, sr.toRect(), flags);
else
vgImg = toVGImageWithOpacitySubRect(image, d->opacity, sr.toRect());
@@ -3127,7 +3153,7 @@ void QVGPaintEngine::drawImage(const QPointF &pos, const QImage &image)
{
Q_D(QVGPaintEngine);
VGImage vgImg;
- if (d->simpleTransform || d->opacity == 1.0f)
+ if (d->affineTransform || d->opacity == 1.0f)
vgImg = toVGImage(image);
else
vgImg = toVGImageWithOpacity(image, d->opacity);
@@ -3160,7 +3186,7 @@ void QVGPaintEngine::drawPixmapFragments(const QPainter::PixmapFragment *drawing
QPixmapData *pd = pixmap.pixmapData();
if (!pd)
return; // null QPixmap
- if (pd->classId() != QPixmapData::OpenVGClass || !d->simpleTransform) {
+ if (pd->classId() != QPixmapData::OpenVGClass || !d->affineTransform) {
QPaintEngineEx::drawPixmapFragments(drawingData, dataCount, pixmap, hints);
return;
}
@@ -3385,7 +3411,7 @@ void QVGPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textItem)
// If we are not using a simple transform, then fall back
// to the default Qt path stroking algorithm.
- if (!d->simpleTransform) {
+ if (!d->affineTransform) {
QPaintEngineEx::drawTextItem(p, textItem);
return;
}