summaryrefslogtreecommitdiffstats
path: root/src/opengl/qpixmapdata_gl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Put all the declarations of qt_defaultDpi{,X,Y}() in one placeJiang Jiang2011-04-051-3/+1
| | | | Reviewed-by: Samuel Rødal
* Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-03-011-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/gui/text/qfontengine_mac.mm src/opengl/qpixmapdata_gl.cpp src/opengl/qwindowsurface_gl.cpp src/s60installs/bwins/QtOpenGLu.def src/s60installs/eabi/QtOpenGLu.def tests/auto/qtextlayout/tst_qtextlayout.cpp
| * Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2011-02-261-57/+102
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Update QtOpenGL def files Fix extern usage in qpixmapdata_gl.cpp Fix for loading QPixmaps from file in GL graphics system Fix code style in qgl_symbian.cpp QPixmap::to/fromSymbianCFbsBitmap() in OpenGL graphics system. Use the 'convertInPlace' versions of QImage in QGLPixmapData load. Recreate GL surface when native window is resized on Symbian
| | * Fix extern usage in qpixmapdata_gl.cppJani Hautakangas2011-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | | 'extern' is insufficient for linking on DLL-based platforms that use ELF binaries. Reviewed-by: TRUSTME
| | * Fix for loading QPixmaps from file in GL graphics systemJani Hautakangas2011-02-251-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | QPixmap::load fails if extension (.png) is left out from given filename when loading a pixmap. QPixmap should try loading with all supported formats. Task-number: QTBUG-17328 Reviewed-by: Samuel Rødal
| | * Use the 'convertInPlace' versions of QImage in QGLPixmapData load.Jani Hautakangas2011-02-251-34/+79
| | | | | | | | | | | | | | | | | | | | | | | | Change QGLPixmapData load functions to use 'convertInPlace' versions of QImage to save memory. Task-number: QTBUG-17256 Reviewed-by: Samuel Rødal
* | | Merge branch 'qt-master-from-4.7' of ↵Qt Continuous Integration System2011-02-101-0/+6
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | scm.dev.nokia.troll.no:qt/qt-integration into master-integration * 'qt-master-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration: (299 commits) PathView items were not correctly updated when rootIndex changed. Allow text to selected in a TextEdit or TextInput inside a Flickable. Update modules-related tests and docs CLeanup registers after AddString 4.7.2 changes Change paging attributes for Symbian binaries Fix build failure Fix regression in creating mkspecs/default Stop focus propagation of touch events when flag is set. Fixed tst_qpixmap::toImageDeepCopy autotest for GL graphicssystem. Changes for 4.7.2 Recreate Symbian raster backing store when WA_TranslucentBackground set Fix auto test failure. PathView regression: dragging the path didn't update currentIndex Fix docs for variant and list basic types Add test for importing plugins that contain QML files Call onAdd() for first items added to ListView and GridView Use same values for Text.lineHeightMode and QTextBlock::lineHeightMode from master. Don't clear pre-edit text when a graphics items loses focus. Fix compilation of QMutableSetIterator::value() with QT_STRICT_ITERATORS ...
| * \ \ Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-02-101-0/+6
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/development/qmake-manual.qdoc mkspecs/symbian-gcce/qmake.conf qmake/project.cpp src/corelib/global/qnamespace.qdoc src/declarative/graphicsitems/qdeclarativetext.cpp src/gui/text/qtextdocumentlayout.cpp src/gui/text/qtextdocumentlayout_p.h tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp tests/auto/networkselftest/networkselftest.pro tests/auto/qscriptengine/tst_qscriptengine.cpp tools/designer/src/components/signalsloteditor/signalslot_utils.cpp tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt-html-templates.qdocconf tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf tools/qdoc3/test/qt.qdocconf tools/qdoc3/test/qt_ja_JP.qdocconf tools/qdoc3/test/qt_zh_CN.qdocconf
| | * | Fixed tst_qpixmap::toImageDeepCopy autotest for GL graphicssystem.Samuel Rødal2011-02-091-0/+6
| | |/ | | | | | | | | | | | | | | | We need to copy the image if painting is active. Reviewed-by: Jani Hautakangas
* | | Fix for loading QPixmaps from file in GL graphics systemJani Hautakangas2011-02-091-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | QPixmap::load fails if extension (.png) is left out from given filename when loading a pixmap. QPixmap should try loading with all supported formats. Task-number: QTBUG-17328 Reviewed-by: Samuel Rødal
* | | Use the 'convertInPlace' versions of QImage in QGLPixmapData load.Jani Hautakangas2011-02-081-34/+79
|/ / | | | | | | | | | | | | | | Change QGLPixmapData load functions to use 'convertInPlace' versions of QImage to save memory. Task-number: QTBUG-17256 Reviewed-by: Samuel Rødal
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-251-2/+2
|\ \ | |/ | | | | | | | | Conflicts: configure src/network/bearer/bearer.pri
| * Fix static build on Windows with MinGW.Mark Brand2011-01-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Q_DECL_IMPORT is still __declspec(dllimport), which is unsuitable for static code. Commit edbc656b changed Q_DECL_IMPORT_IMPORT to Q_CORE_EXPORT when declaring QtCore functions in svg. Now we change Q_DECL_IMPORT to Q_GUI_EXPORT when declaring QtGui functions into opengl and openvg. Also removed the redundant keyword "extern" from the function declarations. Merge-request: 2540 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: mariusSO
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-171-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webkit/imageanalyzer/imageanalyzer.h examples/webkit/imageanalyzer/mainwindow.h mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h src/corelib/io/qfsfileengine_iterator_unix.cpp src/corelib/io/qfsfileengine_iterator_win.cpp src/corelib/kernel/qcoreapplication.cpp src/network/access/qnetworkaccessdatabackend.cpp src/plugins/bearer/connman/qconnmanservice_linux.cpp src/plugins/platforms/openvglite/qwindowsurface_vglite.h src/s60installs/bwins/QtCoreu.def src/s60installs/eabi/QtCoreu.def src/s60installs/s60installs.pro tools/assistant/tools/assistant/helpviewer_qwv.h tools/qdoc3/test/qt-html-templates.qdocconf
| * Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Make QtOpenGL use shared contextexts on LighthouseJørgen Lind2010-11-261-15/+15
|/
* Functions that are externally defined to QtOpenGL needs to be imported.Jani Hautakangas2010-10-211-2/+2
| | | | | | This is needed for RVCT4 Reviewed-by: Jason Barron
* Some optimizations to the GL pixmap data.Samuel Rødal2010-09-091-5/+35
| | | | | | | - Don't use toImage() / fromImage() to copy when a render FBO is active. - Use raster for rendering to small (< 32x32) pixmaps. Reviewed-by: Trond
* Made GL pixmap backend respect Qt::NoOpaqueDetection flag..Samuel Rødal2010-08-191-2/+4
| | | | | | | We don't want to do the opaque image scan when the Qt::NoOpaqueDetection flag is set. Reviewed-by: Trond
* Moved 'hasAlpha' property from GL2 engine to GL paint device.Kim Motoyoshi Kalland2010-02-121-0/+5
| | | | | | Got rid of an ugly switch statement. Reviewed-by: Tom
* Fix y-inverted pixmaps properly.Gunnar Sletta2010-01-221-9/+5
| | | | | | | | | | | | There is a lot of code depending on that pixmaps are flipped upside down in the gl graphicssystem, so toggling this requires extensive testing. Since we're anyway questioning the relevance of this feature (compared to raster + GL viewport) its simply not worth the effort to fix it properly right now. Revert "Fixed y-inverted pixmaps on N900." This reverts commit 57473d5d2a7bd6ae3117f61ff29264a1b790bb01.
* Fixed y-inverted pixmaps on N900.Gunnar Sletta2010-01-191-4/+8
| | | | | | | | | | | The QGLPixmapData used default bind options, which means that the pixmap is always flipped up-side-down and rendered with flipping. The opaque pixmaps were uploaded unflipped which caused the bug. Ideally we do not want pixmap flipping so change the default in gl pixmaps and tag it accordingly. Reviewed-by: Samuel
* Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | Reviewed-by: Trust Me
* Align GL_RGB lines on a 4-byte boundary when uploading pixmap texturesRhys Weatherley2009-12-181-13/+2
| | | | | | | Previous code was aligning lines on a 3-byte boundary. Task-number: QTBUG-6902 Reviewed-by: Julian de Bhal
* Make sure a context is current when loading compressed textures.Rhys Weatherley2009-12-081-0/+2
| | | | Reviewed-by: trustme
* Compressed texture binding for QtOpenGL: ETC1 and PVRTCRhys Weatherley2009-12-061-0/+57
| | | | | | | | | | | | | | | | The QGLContext::bindTexture(QString) function has been augmented with support for ETC1, PVRTC2, and PVRTC4 compressed textures, in addition to the existing DDS support. The QGLPixmapData class has also been modified to recognize compressed texture formats in fromFile() and fromData(). This change also fixes a bug in bindTexture() that prevented the same compressed texture file from being bound in multiple contexts. There is now a separate file cache for each context group. Task-number: QT-2547 Reviewed-by: Trond
* Fixed OpenGL graphicssystem issues for OpenGL ES 2.0 platforms.Samuel Rødal2009-12-041-8/+30
| | | | | | | The format and internal_format parameters to glTexImage2D need to always match on OpenGL ES 2.0. Reviewed-by: Tom Cooksey
* API review: Rename functions numColors(), setNumColors() and numBytes()Marius Storm-Olsen2009-11-061-1/+1
| | | | | | | | | | QPaintDevice and QImage used the functions numColors(), setNumColors(), and numBytes(). However, this is not consistent with the rest of the Qt API which uses *Count() and set*Count(). Removed all usage of these functions inside Qt and test-cases. Reviewed-by: Andreas Aardal Hanssen
* Added strict size parameter to QGLFramebufferObject pool.Samuel Rødal2009-11-021-3/+16
| | | | | | | The strict size parameter can be used when it's critical that we get the exact size we ask for. Reviewed-by: Gunnar Sletta
* Made internal FBOs snap to power-of-two when not wasting too much space.Samuel Rødal2009-10-291-2/+15
| | | | | | This improves performance on certain OpenGL ES 2.0 platforms. Reviewed-by: Gunnar Sletta
* Optimized QPixmap::fill for GL backend when pixmap is used as is.Samuel Rødal2009-10-151-6/+16
| | | | | | | | | When QGLPixmapData is bound after a fill(), without being painted on in the mean-time, it's cheaper to directly generate a source image than to go through convertToGLFormat(), since all the pixels in the image will have the same value. Reviewed-by: Trond
* Fixed tst_QPixmap test failures with GL pixmap backend.Samuel Rødal2009-10-151-0/+4
| | | | | | Fixes test failures in fill() and setGetMask(). Reviewed-by: Trond
* Added QPixmapData::createCompatiblePixmapData() used by QPixmap::copy().Samuel Rødal2009-10-141-0/+5
| | | | | | QPixmap::copy() now returns a pixmap with the same pixmap backend. Reviewed-by: Gunnar Sletta
* Fixing some GCC warningsJoão Abecasis2009-10-071-1/+1
| | | | Reviewed-by: Markus Goetz
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-10-021-1/+1
|\
| * QGLContext::areSharing() to check for GL share relationshipsRhys Weatherley2009-10-011-1/+1
| | | | | | | | Reviewed-by: Samuel
* | Explicitely check for alpha pixels before creating an alpha GL pixnmapGunnar Sletta2009-10-021-6/+15
|/ | | | Reviewed-by: Samuel
* Fixed crash with QPixmap::fill() when pixmap is painted to using opengl1Gunnar Sletta2009-09-251-9/+17
| | | | Reviewed-by: Samuel
* Fixed bug in GL pixmap backend (causing missing rendering in lance).Samuel Rødal2009-09-181-1/+5
| | | | | | | Since copyBackFromRenderFbo() manually changes the framebuffer object binding, we also need to update the context's current_fbo member. Reviewed-by: Kim
* Fix glMatrixMode() arguments for desktop OpenGLRhys Weatherley2009-09-151-2/+2
| | | | | | | The defines are GL_MODELVIEW/GL_PROJECTION, not GL_MODELVIEW_MATRIX/etc. The _MATRIX defines are for fetching the matrix, not setting it. Reviewed-by: trustme
* Compilation fix for OpenGL/ES 2.0Rhys Weatherley2009-09-151-0/+2
| | | | | | Matrix functions do not exist under OpenGL/ES 2.0. Reviewed-by: trustme
* Increased performance of blurpicker example with GL 2 engine.Samuel Rødal2009-09-151-8/+8
| | | | | | | Slightly increase threshold for when to shrink an FBO, and reduce the number of calls to glBindFramebuffer. Reviewed-by: Tom
* Fixed rendering errors in blurpicker with -graphicssystem openglSamuel Rødal2009-09-151-1/+15
| | | | | | | | | | | | | | | | 1) Need to transfer to brush drawing mode when switching active engine, to make sure we reset the vertex / texture coordinate pointers for image drawing. 2) QGLPixmapGLPaintDevice::beginPaint() was changed to use QGLContext::drawTexture() for blitting the old texture contents to the render FBO, which means that we also need to set up viewport, modelview, and projection matrices, and ensure that clipping / stencil testing is disabled. 3) Make sure stencil testing is disabled when clearing the FBO. Reviewed-by: Tom
* Re-order begin() so everything needing a current context has oneTom Cooksey2009-09-101-6/+2
| | | | | | | | | | | | It should be up to QGLPaintDevice::beginPaint() to make the correct context current, so everything needing a current context needs to be moved after that call. This patch also modifies QGLPixmapData to use QGLContext::drawTexture rather than the GL2 PE's drawTexture, which shouldn't be called inside beginPaint as the paint engine hasn't been fully initialised yet. Reviewed-by: Eskil
* Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | Reviewed-by: Trust Me
* Make QGLPixmapData work with the new QGLPaintDevice APITom Cooksey2009-09-081-36/+80
| | | | | | | | | | This patch changes the ordering of QGL2PaintEngine::begin a bit because QGLPixmapData needs to use the paint engine's drawTexture method within beginPaint(). Also, this initialises needsSync to true and removes the setState call. So now all the state initialisation is done in ensureActive rather than begin.
* Add operator== and != to QGLFramebufferObjectFormatRhys Weatherley2009-09-081-6/+1
| | | | Reviewed-by: Sarah Smith
* Slightly improved QGLFramebufferObjectFormat API.Samuel Rødal2009-09-041-2/+2
| | | | | | | Renaming setInternalFormat() to setInternalTextureFormat() (and similarly for the accessor) makes the API a bit more explicit. Reviewed-by: Trond
* Fixed issues with using GLenum in public API on mac.Samuel Rødal2009-09-031-1/+1
| | | | | | | | | | The type of GLenum was changed between 10.4 and 10.5, so to support compiling on one and deploying on the other we need this hack. Also get rid of the complex QGLFramebufferObjectFormat constructor in favor of a simple default constructor and setters, which is more Qt-ish anyway, and avoids ambiguities on mac. Reviewed-by: Trond
* Merge branch '4.5' into 4.6Thiago Macieira2009-08-311-13/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/boxes/glshaders.cpp demos/boxes/vector.h demos/embedded/fluidlauncher/pictureflow.cpp demos/embedded/fluidlauncher/pictureflow.h doc/src/desktop-integration.qdoc doc/src/distributingqt.qdoc doc/src/examples-overview.qdoc doc/src/examples.qdoc doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/geometry.qdoc doc/src/groups.qdoc doc/src/objecttrees.qdoc doc/src/platform-notes.qdoc doc/src/plugins-howto.qdoc doc/src/qt3support.qdoc doc/src/qtdbus.qdoc doc/src/qtdesigner.qdoc doc/src/qtgui.qdoc doc/src/qtmain.qdoc doc/src/qtopengl.qdoc doc/src/qtsvg.qdoc doc/src/qtuiloader.qdoc doc/src/qundo.qdoc doc/src/richtext.qdoc doc/src/topics.qdoc src/corelib/tools/qdumper.cpp src/gui/embedded/qkbdpc101_qws.cpp src/gui/embedded/qkbdsl5000_qws.cpp src/gui/embedded/qkbdusb_qws.cpp src/gui/embedded/qkbdvr41xx_qws.cpp src/gui/embedded/qkbdyopy_qws.cpp src/gui/embedded/qmousebus_qws.cpp src/gui/embedded/qmousevr41xx_qws.cpp src/gui/embedded/qmouseyopy_qws.cpp src/gui/painting/qpaintengine_d3d.cpp src/gui/painting/qwindowsurface_d3d.cpp src/opengl/gl2paintengineex/glgc_shader_source.h src/opengl/gl2paintengineex/qglpexshadermanager.cpp src/opengl/gl2paintengineex/qglpexshadermanager_p.h src/opengl/gl2paintengineex/qglshader.cpp src/opengl/gl2paintengineex/qglshader_p.h src/opengl/util/fragmentprograms_p.h src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp src/script/parser/qscript.g src/script/qscriptarray_p.h src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptclassdata_p.h src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext.cpp src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmacore.cpp src/script/qscriptecmadate.cpp src/script/qscriptecmadate_p.h src/script/qscriptecmaerror.cpp src/script/qscriptecmaerror_p.h src/script/qscriptecmafunction.cpp src/script/qscriptecmafunction_p.h src/script/qscriptecmaglobal.cpp src/script/qscriptecmaglobal_p.h src/script/qscriptecmamath.cpp src/script/qscriptecmamath_p.h src/script/qscriptecmanumber.cpp src/script/qscriptecmanumber_p.h src/script/qscriptecmaobject.cpp src/script/qscriptecmaobject_p.h src/script/qscriptecmaregexp.cpp src/script/qscriptecmaregexp_p.h src/script/qscriptecmastring.cpp src/script/qscriptecmastring_p.h src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptengine_p.h src/script/qscriptenginefwd_p.h src/script/qscriptextenumeration.cpp src/script/qscriptextenumeration_p.h src/script/qscriptextqobject.cpp src/script/qscriptextqobject_p.h src/script/qscriptextvariant.cpp src/script/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptmember_p.h src/script/qscriptobject_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptvalue.cpp src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptxmlgenerator.cpp src/script/qscriptxmlgenerator_p.h tests/auto/linguist/lupdate/testdata/recursivescan/project.ui tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp tools/linguist/shared/cpp.cpp