summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Use NAmE spelling of grey (gray)Marc Mutz2014-08-092-2/+2
| | | | | | | These occurrences are only in docs or code comments. Change-Id: Ia114466a85c01e2b978396c329153044921fb20b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QPixelFormat: don't inherit itMarc Mutz2014-08-092-282/+155
| | | | | | | | | | | | | | | | | | | | | Instead of abusing inheritance to provide convenience constructors, use simple inline constructor functions. The name got a lower-case q to indicate a free function. The usual fromXYZ() static methods were deemed not fitting in this case in the initial round of review, since they implied some kind of conversion while these functions are simply constructors of formsts, which contain no data. This also solves the problem that some of these ctors could have been called with just one argument and were therefore candidates for hidden QPixelFormat temporary injection. QPixelFormatRgb was renamed to qPixelFormatRgba to explain the third argument at the call site better. There seem to be no users of this class in qt5.git at this time. Change-Id: Ib4fe8ceb2d30744127b116a748724a3406400eb8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QPixelFormat is better taken by-valueMarc Mutz2014-08-093-4/+4
| | | | | | | Being a better quint64, it can be passed in registers, so take them as value args. Change-Id: I8eb96a2594d910b538b651fb3ca567c0c124dd3a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* QPixelFormat: implement some oneliners in the class bodyMarc Mutz2014-08-091-15/+6
| | | | | | | | There's little point in duplicating the complex declaration (thanks to C++11), just define the relational operators and the default ctor where they're declared. Change-Id: Ie91545b2581c89edd434c911eb05705e2d16debe Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* QPixelFormat: don't use bit fieldsMarc Mutz2014-08-091-101/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC at least is generating horrible code for them, so do the bit twiddling ourselves. This is not premature optimization, because it might be the seed for a QBitField class, as suggested by Andrei Alexandrescu on GN2013. The assembler code of default and copy ctors is unchanged between the old and new versions. Accessors such as redSize() are virtually identical (with an and and a mov exchanging place). The interesting thing is what happend in operator== and the set-all-fields ctor. These are the disassemblies of functions wrapping op== and the ctor, resp.: bool pf_comparison(QPixelFormat, QPixelFormat): .cfi_startproc | .cfi_startproc movl %esi, %edx | cmpq %rsi, %rdi xorl %eax, %eax | sete %al xorl %edi, %edx | ret andl $15, %edx | .cfi_endproc jne .L53 | movl %esi, %edx | xorl %edi, %edx | testw $1008, %dx | jne .L53 | movl %esi, %edx | pushq %rbx | .cfi_def_cfa_offset 16 | .cfi_offset 3, -16 | movl %edi, %ebx | movzbl %dh, %ecx | movzbl %bh, %edx | xorl %ecx, %edx | andl $252, %edx | jne .L40 | movq %rdi, %rcx | movq %rsi, %rdx | shrq $16, %rcx | shrq $16, %rdx | movl %ecx, %ebx | xorl %edx, %ebx | movl %ebx, %r8d | andl $63, %r8d | jne .L40 | xorl %ecx, %edx | testw $4032, %dx | jne .L40 | movq %rsi, %rcx | movabsq $16911433728, %rdx | xorq %rdi, %rcx | testq %rdx, %rcx | jne .L40 | movq %rdi, %rdx | movq %rsi, %rcx | shrq $32, %rdx | shrq $32, %rcx | movl %edx, %ebx | xorl %ecx, %ebx | movl %ebx, %r8d | andl $252, %r8d | jne .L40 | movq %rsi, %r9 | movq %rdi, %r8 | shrq $40, %r9 | shrq $40, %r8 | xorl %r9d, %r8d | andl $127, %r8d | jne .L40 | xorl %ecx, %edx | andl $98304, %edx | jne .L40 | movq %rsi, %rcx | movq %rdi, %rdx | shrq $48, %rcx | shrq $48, %rdx | xorl %ecx, %edx | andl $126, %edx | jne .L40 | shrq $48, %rdi | movq %rcx, %rax | xorl %edi, %eax | testw $-128, %ax | sete %al | .p2align 4,,10 | .p2align 3 | .L40: | popq %rbx | .cfi_restore 3 | .cfi_def_cfa_offset 8 | .L53: | rep | ret | .cfi_endproc | That one is pretty obvious. Hint: the right one is the new version. QPixelFormat pf_unwieldy_ctor(QPixelFormat::ColorModel, ...) .cfi_startproc | .cfi_startproc movq %rbp, -32(%rsp) | movq %rbx, -40(%rsp) movq %r12, -24(%rsp) | .cfi_offset 3, -48 andl $15, %edi | movzbl 8(%rsp), %ebx movq %r13, -16(%rsp) | andl $63, %esi movq %r14, -8(%rsp) | movq %rbp, -32(%rsp) andl $63, %esi | movq %r12, -24(%rsp) movl 48(%rsp), %r11d | andl $63, %edx movzbl 8(%rsp), %r10d | .cfi_offset 6, -40 andl $63, %edx | .cfi_offset 12, -32 .cfi_offset 6, -40 | movl 16(%rsp), %ebp .cfi_offset 12, -32 | movl 32(%rsp), %r11d .cfi_offset 13, -24 | andl $63, %ecx .cfi_offset 14, -16 | movl 40(%rsp), %r10d movzbl 16(%rsp), %r14d | movq %r13, -16(%rsp) movzbl 24(%rsp), %r13d | andl $63, %r8d andl $63, %ecx | andl $63, %ebx movzbl 32(%rsp), %r12d | .cfi_offset 13, -24 movzbl 40(%rsp), %ebp | movl 48(%rsp), %r13d andl $63, %r8d | andl $63, %r9d movl %r11d, %eax | movq %rbx, %r12 movq %rbx, -40(%rsp) | movl 24(%rsp), %ebx .cfi_offset 3, -48 | andl $1, %ebp andl $63, %r9d | andl $1, %r11d andl $3, %eax | andl $15, %r10d andl $63, %r10d | movq %rdi, %rax xorl %ebx, %ebx | andl $15, %eax andl $1, %r14d | salq $4, %rsi andl $1, %r13d | salq $10, %rdx andl $1, %r12d | andl $1, %ebx andl $15, %ebp | salq $16, %rcx cmpl $2, %r11d | salq $22, %r8 cmovne %eax, %ebx | salq $28, %r9 andl $63, %esi | salq $34, %r12 movq %rdi, %rax | salq $40, %rbp salq $4, %rsi | salq $41, %rbx andl $15, %eax | salq $42, %r11 andl $63, %edx | salq $43, %r10 salq $10, %rdx | cmpl $2, %r13d orq %rsi, %rax | movq %r14, -8(%rsp) andl $63, %ecx | .cfi_offset 14, -16 salq $16, %rcx | movzbl 56(%rsp), %r14d orq %rdx, %rax | je .L45 andl $63, %r8d | andl $3, %r13d orq %rcx, %rax | salq $47, %r13 salq $22, %r8 |.L44: andl $63, %r9d | orq %rsi, %rax salq $28, %r9 | orq %rdx, %rax orq %r8, %rax | movq %r14, %rdx andl $63, %r10d | movq -8(%rsp), %r14 movq %r14, %rcx | orq %rcx, %rax salq $34, %r10 | andl $63, %edx orq %r9, %rax | orq %r8, %rax andl $1, %ecx | salq $49, %rdx movq %r13, %rdx | orq %r9, %rax orq %r10, %rax | orq %r12, %rax salq $40, %rcx | movq -24(%rsp), %r12 andl $1, %edx | orq %rbp, %rax movq -16(%rsp), %r13 | movq -32(%rsp), %rbp salq $41, %rdx | orq %rbx, %rax orq %rcx, %rax | movq -40(%rsp), %rbx movq %r12, %rcx | orq %r11, %rax orq %rdx, %rax | orq %r10, %rax andl $1, %ecx | orq %rdx, %rax movq %rbp, %rdx | orq %r13, %rax salq $42, %rcx | movq -16(%rsp), %r13 andl $15, %edx | ret movq -32(%rsp), %rbp | .p2align 4,,10 salq $43, %rdx | .p2align 3 orq %rcx, %rax |.L45: movq %rbx, %rcx | xorl %r13d, %r13d orq %rdx, %rax | jmp .L44 movzbl 56(%rsp), %edx | .cfi_endproc andl $3, %ecx | salq $47, %rcx | movq -40(%rsp), %rbx | movq -24(%rsp), %r12 | movq -8(%rsp), %r14 | andl $63, %edx | orq %rcx, %rax | salq $49, %rdx | orq %rdx, %rax | ret | .cfi_endproc | Without bothering to understand the details, they look pretty similar, with the new version being slightly shorter. But that may not mean anything. Change-Id: I31e84c9109ccd0c7282351b2e2802407a9b360b4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* OS X: Remove mnemonics in parenthesesTakumi Asaki2014-08-081-1/+13
| | | | | | | | | | | | In some language, mnemonics put after label text within parentheses. e.g. "&Open" is translated to "開く(&O)" in Japanese. OS X doesn't use mnemonics and '&' in label text is removed. Mnemonics in parentheses (and spaces before them) also should be removed. Change-Id: I88c0a1f60af7e148b3cf24a4e215ce807d62bce3 Reviewed-by: Tasuku Suzuki <stasuku@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Add support for glMapBufferRange in the wrappers and resolversLaszlo Agocs2014-08-084-8/+122
| | | | | | | | | | | | | | QOpenGLBuffer::map() and related helpers are becoming useless in OpenGL ES 3.0 and up: instead of the old GL_OES_map_buffer, glMapBufferRange, but not glMapBuffer, is now part of the standard. On desktop GL_ARB_map_buffer_range is present by default in OpenGL 3.0 and newer. [ChangeLog][QtGui] Added QOpenGLBuffer::mapBufferRange(). Task-number: QTBUG-38168 Change-Id: I4e9bbe8ced9ee4d535ac32849a8c08c26d79cb49 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Add default format to QSurfaceFormatLaszlo Agocs2014-08-085-1/+59
| | | | | | | | | | | | | | | | | | | | | | Add defaultFormat() and setDefaultFormat() statics to QSurfaceFormat. These define the default values for the requestedFormat members of QOpenGLContext, QWindow and QOpenGLWidget (and implicitly QOpenGLWindow, QQuickWindow, etc.) This replaces QQuickWindow::setDefaultFormat() which can now be removed. The main inspiration here is not the convenience (avoiding setFormat() calls for all windows/widgets), but robustness: by setting the format once at the start of the application, all windows and contexts, including the internal share context used by QOpenGLWidget and QQuickWidget, will use the same format, eliminating the possibility of failing due to trying to share between incompatible contexts. Furthermore, since such a functionality is anyway mandatory for QQuickWindow (due to the possibility of creating windows from QML code), extending it to QSurfaceFormat and QOpenGLContext/QWindow is the next logical step. Change-Id: Ie94486adc489d17fecfcebb7050fecedffd2688b Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Fix the docs for resizeGL in QOpenGLWindowLaszlo Agocs2014-08-081-3/+9
| | | | | | | | Some of it was blindly copied from QOpenGLWidget and it does not apply. Change-Id: I73f358f74d286d3757a3a77a9bfe06887d57514a Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Add missing #include <qdatastream.h> or <qiodevice.h>Thiago Macieira2014-08-072-0/+2
| | | | | | | Lots of code depended on an indirect includes from qstringlist.h. Change-Id: I33d0dce33d64302d6c0e49180cc1249b90ab27c5 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Avoid repaints and swapbuffers when the platform window is already goneLaszlo Agocs2014-08-071-1/+2
| | | | | | | | | | On Linux at least the qopenglwindow example sometimes shows "QOpenGLContext::swapBuffers() called with non-exposed window, behavior is undefined" when closing the window and exiting the application. This patch avoids this by not triggering repaints anymore when the platform window is destroyed. Change-Id: I54bd41e5c1471f7cdfec89f8ec3be48d1438be39 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Do not use GLES3 functions in a GLES2 contextLaszlo Agocs2014-08-071-6/+8
| | | | | | | | | | Just like the recent fix for VAOs on iOS, where we might deploy a GLES3-enabled binary on a GLES2-only system, the same issue is potentially present for blitFramebuffer and renderbufferStorageMultisample. Handle this properly. Change-Id: I87268478f1de479dc2c106b46d6e9b84e866fcd5 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Enable devicePixelRatio for non-Apple platformsPaul Olav Tvete2014-08-061-5/+0
| | | | | | | | | Remove #ifdef Q_OS_MAC around devicePixelRatio code. We are planning to make it available on other platforms. Task-number: QTBUG-38858 Change-Id: I25230cb53ea1291095335ef5883b15087e44f6b8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QPlatformMenu: add overloaded function 'showPopup' that takes a target rectRichard Moe Gustavsen2014-08-061-1/+6
| | | | | | | | | | | | | | | When showing an edit menu on touch platforms, you need to specify a target rect for where to place the menu. The target rect is normally a rectangle that encompasses the whole text selection. Using this information the OS will place the menu so that is doesn't obscure the selection itself, or fall outside the screen (or overlaps e.g the keyboard). Since we don't know the size of the menu, or if the OS will end up placing the menu above or below the pos we give it, we need to do it the correct way and forward the whole target rect instead. Change-Id: I638586e9d0dd14c430a22c403c6dce099192a075 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Add debug operator for QTouchEvent::TouchPointShawn Rutledge2014-08-062-23/+33
| | | | | | | | | | dfde72e4361d82a782cb4da08ddcd0d8e8c40b07 added debug support for QWindowSystemInterface::TouchPoint, which is useful only near the QPA interface; but in qtdeclarative it's useful to be able to log individual touch points too. Change-Id: I237d354d7018e6326e586ae3355c8aa6f781eff8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Be consistent in GrayScale vs Grayscale namingAllan Sandfeld Jensen2014-08-062-8/+8
| | | | | | | | | The enum GrayScale was renamed Grayscale without similarly changing the helper class for the same enum. Change-Id: Ie1b34a68654f22a843ce4cfc2ddc1bf06af8dea1 Reviewed-by: Axel Rasmussen <axel.rasmussen1@gmail.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Document the destroy/create behavior of QOpenGLContext::create()Laszlo Agocs2014-08-061-0/+3
| | | | | | | | | This is not obvious since in some other classes with similar design subsequent create() calls are ignored. In some others it results in a warning. In case of QOpenGLContext it leads to recreating. Therefore it must be documented. Change-Id: I16efa73ebae15b3ffc26832d8d5cc2cd5d0ed469 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* QPalette: add move constructorMarc Mutz2014-08-062-2/+15
| | | | | | | | | | As with many other implicitly shared classes, efficient move semantics requires setting the d-pointer to nullptr, which then needs to be checked for in the dtor and the copy assignment operator. Change-Id: I654d181a1dfdd9a16e2f9fb96b57475cdd0b4561 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Make sure that QPixelFormat is constexprThiago Macieira2014-08-061-1/+1
| | | | | | | by declaring the array of formats constexpr too. Change-Id: I5c8e23ef9dc0fcac9c246f48dbee24c390d4583c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Remove the last remnants of iWMMXt in QtThiago Macieira2014-08-054-174/+0
| | | | | | | | This code hasn't been tested for at least 4 years. It's not maintained and probably doesn't work. Change-Id: I4b9a5179e34111b400914f91caa6b741b69771bb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* QPixelFormat: have field 'unused' have the correct number of bitsMarc Mutz2014-08-051-1/+2
| | | | | | | 4+6*6+3*1+4+2+6+8 = 63, not 64, so make 'unused' have 9 bits width. Change-Id: I06e66074a09e93538fac01182c5a0d009d9b6583 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* QPixelFormat: make data fields private instead of protectedMarc Mutz2014-08-051-1/+1
| | | | | | | The convenience subclasses use the QPixelFormat ctor, not the data fields directly. Change-Id: I011299837cfb3b7006bc8425848989e5739b6082 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Add SubType setters/getters and SupportedSubTypes option.Ivan Komissarov2014-08-057-1/+94
| | | | | | | | SubType can be used to determine an internal format of an image such as pixel format and/or compression algorithms. Change-Id: Icf296d54bb509e4e2bdb70544df678fc53f57c79 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* QPlatformMenu: add MenuType enumRichard Moe Gustavsen2014-08-051-0/+3
| | | | | | | | | | | | | On mobile platforms several different popup menu types exist. E.g on iOS, you have a special popup just for selecting text. This patch will add a new enum that lets UI controls select/hint which one to use for a particular QPlatformMenu. It's likely that the enum needs to be extended later (DropdownMenu, PopoverMenu etc), but being able to specify the edit menu at least will do for now. Change-Id: I2aefa5eedb9429921560ac2b778a88721f153459 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Improve qDebug output for QTabletEventShawn Rutledge2014-08-052-3/+27
| | | | | Change-Id: Ic2819eaa5ed0e3666062f00994b72dee0b2cba66 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Introduce QRasterWindowLaszlo Agocs2014-08-053-2/+209
| | | | | | | | | | | | | | | | | A simple convenience class providing a QWindow that has a paintEvent and supports opening a painter on itself. It behaves exactly like QOpenGLWindow in this respect, which is not surprising since they share the same base class (QPaintDeviceWindow). QRasterWindow does not however have any OpenGL dependencies and will be present in -no-opengl builds too. [ChangeLog] Added QRasterWindow, a thin convenience wrapper for a QWindow on which a QPainter can be opened. Done-with: Jorgen Lind <jorgen.lind@digia.com> Change-Id: I37e82720492945d7b85d5f713eea8d5f7556e511 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* Introduce QOpenGLWindowLaszlo Agocs2014-08-056-4/+1153
| | | | | | | | | | | [ChangeLog] Added QOpenGLWindow. This serves as a convenience class for creating windows showing OpenGL content via an API similar to QGLWidget and without any widget dependencies. Done-with: Jorgen Lind <jorgen.lind@digia.com> Task-number: QTBUG-36899 Change-Id: I52e9bc61acb129dbfd3841b3adeffab2dbcf7f05 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Merge "Merge remote-tracking branch 'origin/5.3' into dev" into refs/staging/devFrederik Gladhorn2014-08-052-3/+26
|\
| * Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-08-042-3/+26
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/arch/arch.cpp src/opengl/qgl_qpa.cpp src/widgets/kernel/qapplication.cpp Change-Id: I80b442a4c2c9632743a5b5c7319ff201ec5bc4fd
| | * Merge "Merge remote-tracking branch 'origin/stable' into 5.3" into ↵Oswald Buddenhagen2014-07-311-0/+23
| | |\ | | | | | | | | | | | | refs/staging/5.3
| | | * Merge remote-tracking branch 'origin/stable' into 5.3Oswald Buddenhagen2014-07-301-0/+23
| | | |\ | | | | | | | | | | | | | | | Change-Id: I2a044d44ca991ba20ddd710053b85afb51e362d3
| | | | * move loading of testability driver from QApplication to QGuiApplicationMichael Zanetti2014-07-031-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is useful without QWidget too. Change-Id: Ic7857e52e4a8f57c1205615a1f30323b486814af Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| | * | | Fix double clicks in eglfsLaszlo Agocs2014-07-311-1/+1
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The window can be null in the qpa event. This is indicated by the nullWindow field to be able to differentiate between a dead window and a genuinely null input. [ChangeLog] Double click events are now sent correctly on eglfs. Task-number: QTBUG-40146 Change-Id: I63c8d08e0dec217b929161d2e827e0c273b4dd3e Reviewed-by: Will Wagner <willw@carallon.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| | * | Don't convert signed to unsigned when we need all 32bitAllan Sandfeld Jensen2014-07-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fast scale methods qt_scale_image_16bit and qt_scale_image_32bit were incorrectly assigning an unsigned value to a signed variable, which broke their support of images with dimensions from 32384 to 65535. Images with dimensions higher than that are already using another code- path. Task-number: QTBUG-40297 Change-Id: I8c971889e069381224cea2befbb5c66cd93ea5c2 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | | | Rewrite debug output of event classes.Friedemann Kleint2014-08-051-287/+295
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Introduce functions to return class name and type name by type. - Move QDebugStateSaver up. - Add verbose output for DnD, tablet, native gestures, context menu, enter and expose events. Task-number: QTBUG-38858 [ChangeLog][QtGui][QEvent] The debug output for events has been significantly improved. Change-Id: I3f11e34c3c9d6a3c6db596be4051b801f00e6153 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | | | Rename globalShareContext to qt_gl_global_share_contextJocelyn Turcotte2014-08-042-11/+26
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it easier to forward-declare the exported symbol from other Qt modules without having to include the private headers. This keeps the old API until dependent submodules are updated. Change-Id: I08310a684b79f2f612f2ce897a601ff74178bee6 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | | Add QFont strategy to disable subpixel antialiasingAllan Sandfeld Jensen2014-08-032-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the option to disable subpixel antialiasing on QFont basis. This can be useful when painting to offscreen surfaces. On OS X this option disables the aggressive LCD font smoothing, which can be necessary for certain fonts it may otherwise ruin. Task-number: QTBUG-40396 Change-Id: I1664b636520ae63ee1503b5df7436748106b9f5c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | | Support multimedia keys on WindowsAllan Sandfeld Jensen2014-08-021-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently do not receive events from most multimedia keys on Windows because they are sent using appcommand events instead of the normal key events. This patchs adds support for parsing appcommand events. Change-Id: I19f568b6fa0d3d136e3a22318df1499a1fab6edb Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* | | Update QOpenGLFunctions docsLaszlo Agocs2014-08-011-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mention QOpenGLContext::functions() which is used quite commonly in Qt itself and also some examples. Also, make it clear that new instances do not degrade performance since function resolving is done only once. Change-Id: I74ac194a0b3956a70e5078dd5a1bcdd277b5cc28 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | | Make QOpenGLWidget publicLaszlo Agocs2014-08-014-22/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QOpenGLWidget is now public. In addition Qt::WA_AlwaysStackOnTop is introduced to support the special case of semi-transparent QOpenGLWidget or QQuickWidget on top of regular widgets. hellogl_es2 becomes the qopenglwidget example. This example performs painting both via QPainter and native GL commands and has the OpenGL widget combined with other, normal widgets. The widget stack receives some changes when it comes to renderToTexture widgets like QQuickWidget and QOpenGLWidget. Calling update() will now result in a paint event, which is essential for QOpenGLWidget since we want it to behave like a regular widget. The dirty region handling is extended specially for such widgets due to performance reasons. (an OpenGL content update must not result in any backingstore painting, and is thus handled as a different kind of dirtiness) [ChangeLog] Added QOpenGLWidget. This widget serves as a replacement for QGLWidget. Task-number: QTBUG-36899 Task-number: QTBUG-40086 Change-Id: Ibf7f82fea99b39edfffd2fc088e7e0eadbca25cf Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | | Ensure valid data after QImage::invertPixelsAllan Sandfeld Jensen2014-07-311-3/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QImage::invertPixels may produce invalid data after inversions of images with premultiplied alpha, because the inverted colors will be larger than the alpha. This patch converts any image with a premultiplied alpha channel to ARGB32 before inverting the pixels, and then back to the original format after the inversion. Support is added for correct inversion of RGBA8888 and RGB30 formats. Task-number: QTBUG-39901 Change-Id: Ief24c55f495e67ef2ad6429b5b418d02963a64dd Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | | Merge "Merge remote-tracking branch 'origin/5.3' into dev" into refs/staging/devFrederik Gladhorn2014-07-301-0/+1
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-291-0/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/ssl/qsslsocket_openssl_symbols.cpp Change-Id: Ic62419fa1fee5f4de6c372459d72e6e16f9a810b
| | * | QPixmap::fromImage() should detach when changing QImage formatAllan Sandfeld Jensen2014-07-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When QPixmap::fromImage() detects an ARGB32 image with only opaque pixels it will do a conversion where it only changes the advertised format of the image. This conversion was lacking a check to see if it the QImage was shared before doing so, which this patch adds. Task-number: QTBUG-40282 Change-Id: I3acf221b76735637cef04c2104a33f87e5f09d54 Reviewed-by: Andreas Löw <andreas@code-and-web.de> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | | Support RGB30 formats in OpenGL framebuffers and paint engineAllan Sandfeld Jensen2014-07-302-3/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for binding RGB30 images as textures, and as internal format of framebuffer objects. Together with the QOpenGLPaintDevice this provides support for rendering to and from RGB30 in full precision. [ChangeLog][QtGui][QOpenGLFramebufferObject] Support 10-bit per color channels formats as the internal framebuffer format, making it possible to render in that precision. Change-Id: I06de2d12dfe1c1adc466d574fdffbc77f88f4f16 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | | | Use runtime check instead of ifdef to detect ES3 in QVertexArrayObjectHelperTor Arne Vestbø2014-07-301-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code path in QOpenGLVertexArrayObjectPrivate::create() that triggers the creation of a QVertexArrayObjectHelper is guarded by runtime checks for ES3 or the GL_OES_vertex_array_object extension, but the actual function lookup was ifdef'ed, which broke on iOS where the SDK may support ES3, but an older (supported) runtime target might not. Change-Id: Id578667c1f5aebf53e197f3a79eb2f9273fea487 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | | | QOpenGLVAO: refactor the helper class and export itGiuseppe D'Angelo2014-07-303-55/+153
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | It is useful in other places, for instance in QtQuick, to avoid duplicating the same resolver logic. Change-Id: I9748a420a0abeb07cc84f948965b1e0321a95ca2 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | | Add debug output for input method related events.Friedemann Kleint2014-07-281-0/+67
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-40402 Change-Id: Ide96588488eb6d95f4c39f3da749d301d9ec858e Reviewed-by: Liang Qi <liang.qi@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | | QTabletEvent documentation improvementsShawn Rutledge2014-07-281-35/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | Recent patches have added new functionality, and other aspects of the documentation have been outdated for some time. Task-number: QTBUG-39458 Change-Id: Ib7013eee091ff443971485133a58785d9284bc3d Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | | add buttons to QTabletEventShawn Rutledge2014-07-288-27/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now, it has been necessary for tablet-oriented applications which care about multi-button styli to reject each tablet event and wait for the mouse event in order to know which buttons are pressed. This patch adds the new API and also the X11/xcb implementation. [ChangeLog][QtCore][Tablet support] Added buttons to QTabletEvent Task-number: QTBUG-39458 Change-Id: If2c9ec1ceacc1700a82686c5fc6f568f9111055a Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>