summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
Commit message (Collapse)AuthorAgeFilesLines
* Avoid showing warnings from drawPixmap when using a QGLWidgetLaszlo Agocs2014-05-051-6/+12
| | | | | | | | | | | | | | | QGLWidget has a paint device type of Widget, yet drawing on it from outside the gui thread is fine as long as ThreadedOpenGL is supported. It has probably been overlooked that the device type OpenGL applies to QGLFramebufferObject and such but not QGLWidget. This will fix the problem of flooding the output with warnings in the tst_qglthreads autotest and potentially elsewhere too. Task-number: QTBUG-38771 Change-Id: Ie014a2610a0db41b31c30c404e286d4997aecdc3 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Vectorize bilinear rotating transformsAllan Sandfeld Jensen2014-05-051-0/+157
| | | | | | | | | | | | This patch reuses the code and pattern used to vectorize scaling, to also vectorize rotating transforms in fetchTransformedBilinearARGB32PM. This provides significant improvements in QtWebKit on benchmarks using rotating transforms. Change-Id: If250e0f5dae1ff0f954301f96cc8970a99ae3e9d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2014-05-011-1/+1
|\ | | | | | | | | | | This merge adds the opengl rename. Change-Id: I84ea0b6abee9780ebb2cf3f64ab9e3fdf2acab3e
| * Rename new QOpenGLContext APIsLaszlo Agocs2014-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | isES() becomes isOpenGLES(). The library type enums are changed DesktopGL -> LibGL and GLES2 -> LibGLES. This removes the now unnecessary version number, the confusing "desktop" term and provides better readability. The old function/values are kept until the related qtdeclarative changes are integrated. Task-number: QTBUG-38564 Change-Id: Ibb0a1209985f1ce4bb9451f9b7b093c2b68a6505 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Direct2D QPA: Optimize ClippingLouai Al-Khanji2014-04-252-29/+32
| | | | | | | | | | | | | | | | | | | | Use axis aligned clips when possible instead of layer-clipping. This can be much faster when a lot of clipping operations take place. Change-Id: I6865d69fc917a7da858033b4c362b307724d9006 Reviewed-by: Risto Avila <risto.avila@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* | Remove unneeded ;Albert Astals Cid2014-04-242-2/+2
|/ | | | | | | Warnings returned by pedantic Change-Id: I501621df6e9f39b18576625b321714a862dc971a Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* QPageSize: remove QPageSize:: overqualificationsMarc Mutz2014-04-092-167/+167
| | | | | | | | This is not Qt style, not needed, and clutters the code, so remove QPageSize:: qualifications where they're not needed. Change-Id: Ia93ac9523ef43a40cf4dab3bcb383a54af666c96 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QPageSize: clean up operator==Marc Mutz2014-04-081-3/+1
| | | | | | | | | | | | Recognize that the d-pointer can never be nullptr and drop the nullptr checks. The d-pointer can never be nullptr as there's no move ctor and all other ctors create a QPageSizePrivate. Change-Id: I6c4e165949ed55510aefbc2d933f20fc8e624333 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QPageLayout: clean up operator==Marc Mutz2014-04-081-3/+1
| | | | | | | | | | | | | The old code always compared the Private classes, unless one of them was nullptr (which it never was, as there is no move ctor and all other ctors create a QPageLayoutPrivate. The new code compares the dpointers, and only if they differ, the Private classes. It also drops the nullptr checks, as they cannot trigger. Change-Id: I523c3503e2edb520f98f9b4e2e3bdaf28a9a355d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QPageLayout: provide op!=Marc Mutz2014-04-082-0/+16
| | | | | | | | For consistency. Change-Id: I20fb70999785e2c1947f033d63367a2f6746990a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: John Layt <jlayt@kde.org>
* QPageLayout: make op== non-memberMarc Mutz2014-04-082-7/+11
| | | | | | | | | Better style, since it treats the left-hand and right-hand size symmetrically, e.g. for implicit conversions. Change-Id: Ib5d39b1ebffffcb664ee2f72c756702469e32d3b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QPageLayout: use QExplicitlySharedDataPointerMarc Mutz2014-04-082-1/+12
| | | | | | | | | | Many setters check for an actual change before making changes to data members, but because of QSharedDataPointer, the detach had already happened by the time the comparison returned false. Change-Id: I320806e74de4a64fa3a340831621c1f5120ebb0f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: John Layt <jlayt@kde.org>
* QPageLayout: remove QPageLayout:: overqualificationsMarc Mutz2014-04-082-27/+27
| | | | | | | | | This is not Qt style, not needed, and clutters the code, so remove QPageLayout:: qualifications where they're not needed. Change-Id: I62f90c29bcb9f3c137d319051ac79e081fe5fb69 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: John Layt <jlayt@kde.org>
* QPageSize: provide op!=Marc Mutz2014-04-082-0/+10
| | | | | | | | For consistency. Change-Id: I4375a6f8c2514479a7479c735d397bf8a9876db1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: John Layt <jlayt@kde.org>
* QPageSize: make op== non-memberMarc Mutz2014-04-082-6/+11
| | | | | | | | | Better style, since it treats the left-hand and right-hand size symmetrically, e.g. for implicit conversions. Change-Id: If1ffa9dc2a018e402c884f60bfbc82e799daeb92 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QPageSize: mark ctors explicitMarc Mutz2014-04-081-6/+6
| | | | | | | | | A QSize or QSizeF is not an accurate representation of a QPageSize, so the corresponding constructor should be explicit. Change-Id: I6b1808e5f93e3caef948c0e5300bd3c20e3c4210 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: John Layt <jlayt@kde.org>
* QPageLayout: use existing qBound()Marc Mutz2014-04-071-9/+4
| | | | | | | instead of rolling our own qt_clamp(). Change-Id: I2729ae3ff98e8c29c66f0f5c792b1bc7bf586f06 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QPagedPaintDevice - Move QPageLayout methodsJohn Layt2014-04-055-61/+273
| | | | | | | | | | | | | | | | The new QPageLayout methods weren't originally added to QPagePaintDevice as no new virtuals can be added, instead static polymorphism was used to add the methods directly in the derived classes QPdfWriter and QPrinter. This however means that classes like QTextDocument with print() methods that take a QPagedPaintDevice are unable to access the QPageLayout methods. To fix this, instead make the QPagedPaintDevicePrivate a virtual class and have QPdfWriter and QPrinter implement derived private classes that are called by the non-virtual QPagedPaintDevice base methods. Change-Id: Ieb6e513b1fa05f5ae76ea1f9156b0b1a053089eb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Use Q_STATIC_ASSERT to check that the array has the right sizeThiago Macieira2014-04-051-12/+1
| | | | | | | | | | | | No need to sprinkle the code with Q_ASSERT. We don't want this to fail to the user anyway. By using a Q_STATIC_ASSERT, a failure will be immediately reported to the developer. This also solves a warning found by Clang 3.4: error: unused variable 'pageSizesCount' [-Werror,-Wunused-const-variable] Change-Id: I79cf72c64242ad395276ce4360c59ad81112d9eb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix neon image scaling function declarationsSamuli Piippo2014-04-041-2/+2
| | | | | | | | | | Change on the image scaling functions did not update the neon function declarations. Task-number: QTBUG-35927 Change-Id: Ia1e7428953aa140cad36e1cf26a18bfefc2267e7 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix UI squishing when using QWidget::setRenderToTextureJocelyn Turcotte2014-04-032-5/+7
| | | | | | | | | | When resizing a window, a window might not be resized synchronously with its backing store. We need to use the actual texture size as the transform to avoid stretching the rendered texture. Change-Id: I945f6d190577ccdcb54483a267a1e42df1ca3156 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Fix drawing paths with constant opacity onto PDFAllan Sandfeld Jensen2014-03-291-1/+1
| | | | | | | | | | | | | The native PDF strokes can not be used with constant opacity as any overlapping parts of the path will end up being drawn multiple times getting the wrong final opacity. A constant opacity should therefore be treated the same as opacity on the pen color, and trigger the fallback drawing. Task-number: QTBUG-37101 Change-Id: I44f70a8b494567ee89804a5fa6333304a5abe91e Reviewed-by: Michael Bruning <michael.bruning@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Avoid out of bounds memory reads when scaling imagesLars Knoll2014-03-287-26/+54
| | | | | | | | | | | | | | | | The calculation of the width/height required for the scaling algorithm was prone to floating point rounding issues, where the lower value got rounded down, the higher one rounded up. This could lead to a situation where we iterated over one more line/pixel in the line than we have in the source image. Correct this by passing the dimension of the source image into the function and bounds checking the values before iterating. Task-number: QTBUG-35927 Change-Id: If44b2235a479224660d508a0504fec40d724763a Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Avoid QImage copy in toTexture()Morten Johan Sørvig2014-03-201-0/+8
| | | | | | | | | | | | | | Desktop OpenGL has GL_UNPACK_ROW_LENGTH which we can use use to specify the image row stride. This removes the need to call QImage::copy(). On a retina MacbBok pro this reduces toTexture's share of the total run time by 1-4%. (on tests/manual/ qopenglwidget/openglwidget) Change-Id: Ia7f49d5c4ffcc347a495701bbaca6aecc2dc3433 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Correct QPainter::setPen() documentation.Mitch Curtis2014-03-201-1/+1
| | | | | | | | | The default pen width is 1 as of Qt 5. Task-number: QTBUG-37277 Change-Id: I5b7b9c2019bd0e812384e67812b7bcfde37d0b53 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* QOpenGLWidget retina support.Morten Johan Sørvig2014-03-201-4/+28
| | | | | | | Use device pixels where appropriate. Change-Id: Ia953e6da4034eecbfccf798701ec1b850eea9d5b Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Fix translation of QtPrintSupport and QPageSize.Friedemann Kleint2014-03-171-10/+16
| | | | | | | | | | Add translator comments, fix spelling, reduce repetitive messages. Change-Id: Id4cbbc3de8fa261cf8f125c5faf735dc608e2b15 Reviewed-by: Robert Loehning <robert.loehning@digia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: John Layt <jlayt@kde.org>
* Merge "Merge remote-tracking branch 'origin/release' into stable" into ↵Jani Heikkinen2014-03-173-34/+59
|\ | | | | | | refs/staging/stable
| * Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2014-03-173-34/+59
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/qdrawhelper.cpp src/gui/painting/qdrawhelper_avx.cpp src/gui/painting/qdrawhelper_x86_p.h Change-Id: I09352d05119f6fd000319074a2705b38361b2c90
| | * Fix drawCachedGlyphs on RGBA8888Allan Sandfeld Jensen2014-02-264-37/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drawCachedGlyphs draws with the wrong color on RGBA8888. The issue is that the draw routines bitmapblit_quint32 and alphamapblit_quint32 while safe to use on rgba formats, needs to have the input color converted. This patch adds small wrapper functions for bitmapblit and alphamapblit that converts the formats. Two tests are extended to ensure we have test coverage. Change-Id: I5f99f3795eba46a69d4df5b167e6099024e9a060 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | | QPrintEngine - Switch Cups to QPlaformPrintDeviceJohn Layt2014-03-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | Use QPlatformPrintDevice in the Cups print engine for all device specific code. Change-Id: Ic1f5f8b4010a9958c320f3c0c727cf1bd1a70c65 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | QPdfWriter - Use QPageSize and QPageLayoutJohn Layt2014-03-172-19/+222
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support to QPdfWriter for QPageSize, QPageLayout, and resolution. [ChangeLog][QtGui][QPdfWriter] The QPdfWriter now supports setting the PDF orientation, layout and resolution by using QPageSize and QPageLayout. Change-Id: I9c269f997ec540dac1989f355c6a2e7488947966 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | QPdfPaintEngine - Use QPageLayout and QPageSizeJohn Layt2014-03-174-82/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch internals of QPdfPageEngine and derived classes to use QPageLayout and QPageSize to make handling of page layout and size more consistent by removing multiple implementations. In particular remove all use of the QPdf namespace version of page size. Change-Id: Ie820340015e8812c8162bd1a257dd0f51f4f0b85 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | QPagedPaintDevice - Use QPageSize and QPageLayoutJohn Layt2014-03-173-99/+343
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use new QPageLayout and QPageSize class to store and convert page sizes and layouts consistently. Extend the PageSize enum to match QPage::PageSize. Note that public setters/getters cannot be added as virtuals would break BIC, but without virtuals the derived classes would break. Instead an internal api is provided and the derived classes will need to implement identical api to manipulate it. [ChangeLog][QtGui][QPagedPaintDevice] Paged paint devices such as QPrinter and QPdfWriter now support all Postscript standard page sizes. Task-number: QTBUG-27685 Task-number: QTBUG-25744 Change-Id: I62e96ab94194ab4ac8bed8fa804e0ce1c3233313 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | QPlatformPrintDevice - New QPA base classJohn Layt2014-03-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new QPA class to abstract Print Devices. Each platform instance will encapsulate all required details about a print device instead of the code being distributed throughout the print engine and print plugin. Change-Id: I7f6a537ad55a6e7f599d83f461b1e2ee62b15094 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | QPageLayout - Add new QPageLayout classJohn Layt2014-03-173-0/+1128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New QPageLayout to encapsulate page layout details including page size, orientation and margins. Scale may be added later. Subsequent changes will use this class in the paged paint devices, paint engines, print engines, and print plugins to replace multiple inconsistent local implementations. [ChangeLog][QtGui] Added class QPageLayout to support handling page layouts including the page size, orientation and margins. Change-Id: Ife1ddd6c2a8d1516542be2eb37425111f41cd5c7 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* | | QPageSize - Add new QPageSize classJohn Layt2014-03-174-0/+2189
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New QPageSize class to encapsulate paper sizes and names to ensure all sizes and conversions are consistent and match the Postscript standard sizes. Subsequent changes will use this class in the paged paint devices, paint engines, print engines, and print plugins to replace multiple inconsistent local implementations. [ChangeLog][QtGui][QPageSize] Added new QPageSize class to implement Adobe Postscript PPD standard page sizes. This class supports the standard page sizes, names and keys from the PPD standard, and provides convenient size and rect conversion methods. Change-Id: Ie2c8be0c3df0d29ac5da4cd9877ad41d0982633c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Fix casting and overallocation in qregion.cppAllan Sandfeld Jensen2014-03-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The POINTBLOCK struct in qregion.cpp is badly defined. By using ints as the base storage of the internal array it forces not only bad casting from int to QPoint, but also allocates an array four times too big. This patch changes to char, since a char pointer may alias anything and this gives the right size of the array. Change-Id: I608eaf39ac7306c71314a139bed6e2352249c0ab Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Fix a crash of accessing deleted paintengineMichal Klocek2014-03-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | When painting to QPixmap with QBlitterPaintEngine and dfb PaintEngine have PaintDevice (pdev) as QImage. Painter code uses PaintDevice::paintEngine() to refer to paintEngine. This will became dangling pointer since QDirectFbBlitter::doLock() will delete QImage. Instead return QPixmap as PaintDevice. Change-Id: Idfac919b6438a82b412020e441e0a102e4a2a052 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* | Avoid using direct OpenGL calls in gui and widgetsLaszlo Agocs2014-03-101-21/+24
| | | | | | | | | | Change-Id: I5d88a2e204ca23e178a4e3044b9cb13392c3e763 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* | Add optimize_full qmake config optionAllan Sandfeld Jensen2014-03-062-26/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new config option to qmake to enable full optimization where it makes sense. This currently is supported on all gcc like compilers by exchanging -O2 for -O3. In qtbase it is used to enable full optimizations on qtcore and qtgui and in a later patch can be used to replace similar existing logic in QtWebKit's WTF and JavaScriptCore modules. This fixes a performance regression from gcc 4.7 to 4.8 in the software renderer. An aliasing error in qregion.cpp which was exposed by more aggresive optimization has been solved as well. Change-Id: Ic2c6c41b79cb3846212b40e7bcc11ff492beb27f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | Dynamic GL: remove exporting symbolsLaszlo Agocs2014-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the opengl proxy for now. Later it will either be moved into a separate library or replaced by a QOpenGLFunctions-based approach. This means that the -opengl dynamic configuration is not usable for the time being. The rest of the enablers remain in place. The convenience function QOpenGLFunctions::isES() is now moved to QOpenGLContext and is changed to check the renderable type. This is extremely useful since besides supporting dynamic GL it solves also the problem of GL_ARB_ES2_compatibility (i.e. it triggers the real ES path when creating an ES-compatible context with a desktop OpenGL implementation). Task-number: QTBUG-36483 Task-number: QTBUG-37172 Change-Id: I045be3fc16e9043e1528cf48e6bf0903da4fa7ca Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* | Fix some typosSergio Ahumada2014-03-031-1/+1
| | | | | | | | | | | | Change-Id: I7dbe938bff5ac3ab50a0197f94bdb2f6c22fbd16 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | QPainterPathStroker: make QPen constructor explicitMarc Mutz2014-02-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A QPainterPathStroker is not an equivalent representation of a QPen, so the constructor that takes a QPen should be explicit. Arguably, the named constructor idiom would be even better here: static QPainterPathStroker QPainterPathStroker::fromPen(const QPen &pen); But QPainterPathStroker is non-copyable. Change-Id: I3148dc0ee336026781d8bc1baf21c113c7b41ce8 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Fix rounding error when creating QT_FT_VectorJorgen Lind2014-02-211-1/+1
| | | | | | | | | | | | | | | | | | This fixes a problem that QScanConverter::mergeLine didn't recognize lins as being the same (when they where), causing aliasing effects Task-number: QTBUG-36354 Change-Id: I29d92ddb4e867025541bdc6b294cfaca55c0d3e1 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Ensure we switch back to the real paint engine when not emulatingAndy Shaw2014-02-201-3/+3
| | | | | | | | | | | | | | | | | | | | When the emulation paint engine was no longer needed then it would still end up using it because the flags would prevent it from being switched back. This ensures that it has the right engine when something triggers it to be switched. Change-Id: I7571923d16cbebd9fdd34560631b561c07a724f7 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Unify glyph format between QFontEngine and QFontEngineGlyphCacheTor Arne Vestbø2014-02-195-39/+36
| | | | | | | | | | | | | | | | | | | | | | | | Instead of the glyph cache having its own cache type that always mapped one to one to a font engine glyph format, causing confusion and needless conversions, the glyph caches now use QFontEngine's glyph format enum. This also removes the iffy use of an int for the glyphFormat in the font engines. Change-Id: I529bad5c179e004f63e152f7dcc311d298c3db98 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Optimize generic bilinear interpolation using SSE2Allan Sandfeld Jensen2014-02-171-33/+45
| | | | | | | | | | | | | | | | | | | | | | The drawing code currently only optimizes the bilinear interpolation under specific conditions that allows the optimizations used there. The patch adds a SSE2 version of the fallback 4 pixel interpolation. Change-Id: I4e8a2ba6cb44647105a9b24e38b3ab755a435050 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | QOpenGLTextureBlitter: Remove Origin location for the Target rectJørgen Lind2014-02-161-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Origin for Target rect was deemed a confusing concept. The current implementation would translate the target rect to the coordinate system specified. However, the order and "direction" of the vertices would always be the same. So drawing a texture in for one target rect defined in one coordinate system would paint the texture the same way as it would when a texture was drawn for a target rect drawn in the "opposite" coordinate system. The point with this was that if you wanted to "flip" the texture you would specify that with the source coordinate system. However, this approach breaks on different levels, such as QRect has functions which expects a top left coordinate system (ie. top() and bottom()). In the end Qt uses a top left coordinate system, hence QWindow specifies a top left coordinate system, and hence the api becomes easier if it is not possible to define the coordinate system of the target viewport. Change-Id: I7dd59b3718380876e87a4bff88381d7a1c7d58c1 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Migrate a recent QT_OPENGL_ES ifdef to dynamic GLLaszlo Agocs2014-02-141-2/+4
| | | | | | | | | | Change-Id: I51581cf174d11db86030da8fe288d640ef81cb58 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>