summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* optimise isFullyTransparent()Lars Knoll2009-06-091-7/+19
| | | | | This cuts down quite some intructions in some use cases, making esp. discardUpdateRequest() a bit cheaper.
* implement equality operator in a more sane wayLars Knoll2009-06-091-5/+9
| | | | | | | Using qFuzzyCompare for checking whether two transformations are equal doesn't give us too much and is inconsistent with our other matrix classes. Using simple floating point equality is a lot faster as well.
* Optimise effectiveOpacity and make it inlineable.Lars Knoll2009-06-093-18/+28
| | | | | | This cut's off some cycles in discardUpdateRequest() which is called from most places when something in the items changes.
* Remove crash, remove item from pending updates when deleted.Andreas Aardal Hanssen2009-06-091-0/+1
| | | | This caused a crash in the contacts demo.
* A faster item discovery function for rectangles (recursive).Andreas Aardal Hanssen2009-06-092-1/+113
| | | | | | | | | | This function works much faster than the last one, but still it can be much faster. The main expense right now it seems is the transform calculations, and the item->collidesWithPath call. There's still much to gain here. This function does not make use of the BSP tree's fast lookup so it makes lookups slower in (e.g.) the chip demo.
* Microoptimize: make this function inline.Andreas Aardal Hanssen2009-06-092-15/+7
| | | | | Also change the order of comparisons, as the transformable flags are most likely to fail first.
* Don't construct new style option objects in a tight loop.Andreas Aardal Hanssen2009-06-092-9/+11
| | | | | | | | The QStyleOption constructor is expensive, as it allocates a QFont, a QPalette and a QFontMetrics. By simply reusing a temporary style option object instead we carve away wasted cycles. Reviewed-by: Ariya
* Graphics View cleanup: Remove iterative processing of dirty items.Bjørn Erik Nilsen2009-06-093-105/+11
| | | | | The recursive approach is faster and fits better into the new scene transform cache we'll do later.
* Fix sorting bug and ensure render functions work. Make direct default.Andreas Aardal Hanssen2009-06-094-16/+15
| | | | | | | | | | Mark the children list for sorting when the Z value for items changes. Change the signature of the recursive draw function slightly so that the expose region is optional, and ensure we don't intersect with this region if it's not available. This change also flips the direct painting so that the default is to use the recursive approach.
* Refactor QTransform combining code, and mark all code that combines.Andreas Aardal Hanssen2009-06-094-69/+98
| | | | | | | | | This change introduces two helper functions in QGraphicsItemPrivate, that combine the item's transform into the current transform, effectively merging the code that calculates any item's combined to-parent transform. This makes the code more readable, and also makes it easier for us to reintroduce the componentized transform API in QGraphicsItem (which was previously reverted).
* Fix QGraphicsScene::drawItems() to use the recursive path as well.Andreas Aardal Hanssen2009-06-095-157/+34
| | | | | | This change also changes the direct painting path to be opt-in as a temporary testing measure to see what's broken when using the old code path.
* Only repaint in QGraphicsViewPrivate::processPendingUpdates()Andreas Aardal Hanssen2009-06-091-4/+4
| | | | | | | | Convert some repaint() calls back to updates(). This ensures that any updates triggered before this call are processed normally, while still keeping the synchronous repaint() call intact. Reviewed-by: bnilsen
* Avoid recursive repaint by calling update() when there's a full scene update.Andreas Aardal Hanssen2009-06-091-1/+1
|
* Experimental change: replace all updates with repaints.Andreas Aardal Hanssen2009-06-091-8/+8
| | | | | This seems to be the only way to get a high frame rate, regardless of the performance of painting and all.
* Experimental change - disable itemChange notifications for move and transform.Andreas Aardal Hanssen2009-06-091-0/+18
| | | | | This change is only to test how much of an impact the itemChange mechanism has on performance. It's easy to revert later on.
* Avoid calling QGraphicsItem::effectiveOpacity() when rendering - insteadAndreas Aardal Hanssen2009-06-092-7/+26
| | | | | | just calculate it top-down. Reviewed-by: bnilsen
* Remove siblingIndex and use stable sorting instead.Andreas Aardal Hanssen2009-06-094-28/+24
| | | | | | | To avoid sorting siblings in real-time, ensure we lazily sort the list in place when needed. Reviewed-by: bnilsen
* Simplify the QTransform calculations.Andreas Aardal Hanssen2009-06-091-35/+11
|
* Ooops. Compile :)Bjørn Erik Nilsen2009-06-091-1/+1
|
* Only call qgetenv("QGRAPHICSVIEW_DIRECT") once.Bjørn Erik Nilsen2009-06-091-3/+2
|
* More re-factoring of Graphics View's update mechanism.Bjørn Erik Nilsen2009-06-094-83/+185
| | | | | | | | | This time with a recursive approach of processing dirty items. I've kept the previous approach using a dirty list, but the recursive one is now the default. Use QT_GV_USE_DIRTY_LIST=1 to swap. I've also cached the item's device transform in both cases so that we can re-use it later when drawing the item.
* Introduce QGraphicsItem::ItemHasNoContents.Andreas Aardal Hanssen2009-06-091-2/+2
| | | | | | | | | | | This flag helps optimize the case where an item is used only as a transformation node in a scene graph, and where the item itself doesn't paint anything. This is the default for FxItem (the subclasses that do paint enable the HasContents flag). This lets Graphics View know whether there's any point in setting up the world transform, opacity and other things. Reviewed-by: Lars
* fix a small logic bug in childrenCombineOpacityLars Knoll2009-06-091-1/+3
| | | | Regression introduced during refactoring earlier today.
* remove now unused flagLars Knoll2009-06-091-2/+2
|
* smaller optimisation in setTransformLars Knoll2009-06-091-8/+2
|
* simplify opacity handling in QGraphicsItemLars Knoll2009-06-091-4/+2
| | | | | | | | | Greatly simplify how we handle opacity and store it as a member in QGraphicsItemPrivate. Remove the caching of effectiveOpacity. It's faster to calculate it on the fly, and the recursive painting algorithm will make even that need go away. Reviewed-by: Andreas
* get rid of the hasTransform flag in QGraphicsItemLars Knoll2009-06-092-235/+9
| | | | | | | | Since the transform is now a pointer in QGraphicsItemPrivate, we can use this pointer directly and there's no need for a separate bitflag anymore. Reviewed-by: Andreas
* Remove scene transform cache from QGraphicsItem.Andreas Aardal Hanssen2009-06-091-0/+232
| | | | | | | | | Now that we have a recursive painting algorithm these types of optimizations are no longer necessary. In fact they only cause more problems and clutter up the code unnecessarily. Removing this also removes extra overhead from moving and transforming items. Reviewed-by: Lars
* Introduce QGraphicsItem::ItemHasNoContents.Andreas Aardal Hanssen2009-06-094-13/+32
| | | | | | | | | | | This flag helps optimize the case where an item is used only as a transformation node in a scene graph, and where the item itself doesn't paint anything. This is the default for FxItem (the subclasses that do paint enable the HasContents flag). This lets Graphics View know whether there's any point in setting up the world transform, opacity and other things. Reviewed-by: Lars
* fix a small logic bug in childrenCombineOpacityLars Knoll2009-06-091-1/+3
| | | | Regression introduced during refactoring earlier today.
* greatly speed up QTransform::mapRect() for projective transformsLars Knoll2009-06-091-10/+2
| | | | | | | | | The code so far was converting the rect to a painterpath, mapping that one and then taking the bounding rect. It is actually sufficient to simply map the four corners of the rectangle and take the bounding rect of these four points even in the projective case. Reviewed-by: Andreas
* remove now unused flagLars Knoll2009-06-091-9/+1
|
* smaller optimisation in setTransformLars Knoll2009-06-091-22/+18
|
* simplify opacity handling in QGraphicsItemLars Knoll2009-06-092-111/+31
| | | | | | | | | Greatly simplify how we handle opacity and store it as a member in QGraphicsItemPrivate. Remove the caching of effectiveOpacity. It's faster to calculate it on the fly, and the recursive painting algorithm will make even that need go away. Reviewed-by: Andreas
* get rid of the hasTransform flag in QGraphicsItemLars Knoll2009-06-094-54/+48
| | | | | | | | Since the transform is now a pointer in QGraphicsItemPrivate, we can use this pointer directly and there's no need for a separate bitflag anymore. Reviewed-by: Andreas
* Remove scene transform cache from QGraphicsItem.Andreas Aardal Hanssen2009-06-094-78/+10
| | | | | | | | | Now that we have a recursive painting algorithm these types of optimizations are no longer necessary. In fact they only cause more problems and clutter up the code unnecessarily. Removing this also removes extra overhead from moving and transforming items. Reviewed-by: Lars
* simplify and cleanup handling of transformations in QGraphicsItemLars Knoll2009-06-094-464/+23
| | | | | | | | | | | Removed some experimental code to handle scaling and rotating around different axis. It cuased setTransform and transform not to behave symmetrically and caused some performance regressions. Additionally moved the QTransform out of the (relatively slow) extra list and made it a pointer in QGraphicsItemPrivate. Reviewed-by: Andreas
* Massive re-factoring of Graphics View's update mechanism.Bjørn Erik Nilsen2009-06-098-378/+250
| | | | | | | | | | | This is work-in-progress, so don't expect everything to work perfectly. Most of the auto-test pass and examples and demos seem to run fine. Unfortunately I'm too tired to write about the actual update mehanism now, but it's faster than the old approach (if that helps:)). There's more to optimize, but I'll come back to that later. I need some sleep now :) To be continued.
* Cache QGraphicsItem::childrenBoundingRect.Bjørn Erik Nilsen2009-06-092-1/+19
| | | | We'll need this later when making a smarter update mechanism.
* Further optimizations, from the simple canvas rendering logics.Andreas Aardal Hanssen2009-06-093-57/+63
|
* Minor optimizations.Andreas Aardal Hanssen2009-06-091-8/+7
|
* Fix optimization flags and opacity.Andreas Aardal Hanssen2009-06-093-15/+35
|
* Add recursive drawing method to QGraphicsScene. For now it's opt-in, butAndreas Aardal Hanssen2009-06-094-15/+107
| | | | | | the important thing is by effectively implementing Simple Canvas' approach to drawing, we're in theory (and in practise measured on the desktop) as fast as Simple Canvas when rendering.
* Fixed compile with MinGW 3.4.Rohan McGovern2009-06-091-2/+2
| | | | | | | This compiler doesn't seem to follow the same rule as others for implicit conversions to/from wchar_t. Add the necessary casts, keeping in mind that sizeof(wchar_t) == 2 on Windows.
* openUrl("mailto:") fails to open Thunderbird on windows.Prasanth Ullattil2009-06-081-36/+28
| | | | | | | | | | | Thunderbird sets only the user level shell association for mailto. This is now being read before the default mail application registry. The registry crawling could have been avoided by using the ShellExecute() but it supports only around 2KBytes of data as parameter, so we will continue using CreateProcess(). Task-number: 251554 Reviewed-by: Jens Bache-Wiig
* Clip region to screen coordinates before setting its component rectangles dirty.Alex Cucos2009-06-081-0/+1
| | | | | | | | | | | When using Qt/E with VNC screen driver on top of the Linux framebuffer (export QWS_DISPLAY="VNC:LinuxFb") the region to be exposed needs be clipped to the real screen to avoid possible negative coordinates which in turn cause access to invalid memory locations when comparing the content of the VNC buffer with the Linux framebuffer. Merge-request: 603 Reviewed-by: Tom Cooksey <thomas.cooksey@nokia.com>
* Small simplification on codeThierry Bastian2009-06-081-6/+4
|
* Fixed ListView so that it is able to move items in negative space andThierry Bastian2009-06-081-1/+1
| | | | | | | | | still paint them. The autotest is included. Task-number: 254449 Reviewed-by: ogoffart
* small code cleanupThierry Bastian2009-06-081-7/+1
|
* Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qtOswald Buddenhagen2009-06-081-1/+2
|\