summaryrefslogtreecommitdiffstats
path: root/tests/auto
ModeNameSize
d---------atwrapper551logstatsplain
-rw-r--r--auto.pro16003logstatsplain
d---------bic247logstatsplain
d---------checkxmlfiles132logstatsplain
d---------collections128logstatsplain
d---------compiler288logstatsplain
d---------compilerwarnings222logstatsplain
d---------exceptionsafety136logstatsplain
d---------exceptionsafety_objects191logstatsplain
d---------gestures84logstatsplain
d---------guiapplauncher292logstatsplain
d---------headers120logstatsplain
d---------languagechange134logstatsplain
d---------linguist144logstatsplain
d---------macgui194logstatsplain
d---------macplist145logstatsplain
d---------maketestselftest100logstatsplain
d---------mediaobject276logstatsplain
d---------mediaobject_wince_ds990logstatsplain
d---------moc1776logstatsplain
d---------modeltest260logstatsplain
-rw-r--r--network-settings.h12524logstatsplain
d---------networkselftest137logstatsplain
d---------patternistexamplefiletree156logstatsplain
d---------patternistexamples142logstatsplain
d---------patternistheaders140logstatsplain
d---------q3accel120logstatsplain
d---------q3action122logstatsplain
d---------q3actiongroup132logstatsplain
d---------q3buttongroup217logstatsplain
d---------q3canvas168logstatsplain
d---------q3checklistitem136logstatsplain
d---------q3combobox126logstatsplain
d---------q3cstring124logstatsplain
d---------q3databrowser132logstatsplain
d---------q3dateedit126logstatsplain
d---------q3datetimeedit134logstatsplain
d---------q3deepcopy126logstatsplain
d---------q3dict118logstatsplain
d---------q3dns116logstatsplain
d---------q3dockwindow130logstatsplain
d---------q3filedialog130logstatsplain
d---------q3frame120logstatsplain
d---------q3groupbox126logstatsplain
d---------q3hbox118logstatsplain
d---------q3header122logstatsplain
d---------q3iconview126logstatsplain
d---------q3listbox85logstatsplain
d---------q3listview126logstatsplain
d---------q3listviewitemiterator150logstatsplain
d---------q3mainwindow130logstatsplain
d---------q3popupmenu128logstatsplain
d---------q3process215logstatsplain
d---------q3progressbar132logstatsplain
d---------q3progressdialog138logstatsplain
d---------q3ptrlist124logstatsplain
d---------q3richtext126logstatsplain
d---------q3scrollview126logstatsplain
d---------q3semaphore128logstatsplain
d---------q3serversocket134logstatsplain
d---------q3socket121logstatsplain
d---------q3socketdevice134logstatsplain
d---------q3sqlcursor128logstatsplain
d---------q3sqlselectcursor102logstatsplain
d---------q3stylesheet130logstatsplain
d---------q3tabdialog128logstatsplain
d---------q3table120logstatsplain
d---------q3textbrowser171logstatsplain
d---------q3textedit126logstatsplain
d---------q3textstream130logstatsplain
d---------q3timeedit126logstatsplain
d---------q3toolbar124logstatsplain
d---------q3uridrag86logstatsplain
d---------q3urloperator275logstatsplain
d---------q3valuelist128logstatsplain
d---------q3valuevector132logstatsplain
d---------q3widgetstack94logstatsplain
d---------q_func_info128logstatsplain
d---------qabstractbutton136logstatsplain
d---------qabstractitemmodel142logstatsplain
d---------qabstractitemview140logstatsplain
d---------qabstractmessagehandler152logstatsplain
d---------qabstractnetworkcache180logstatsplain
d---------qabstractprintdialog146logstatsplain
d---------qabstractproxymodel144logstatsplain
d---------qabstractscrollarea144logstatsplain
d---------qabstractslider136logstatsplain
d---------qabstractsocket136logstatsplain
d---------qabstractspinbox138logstatsplain
d---------qabstracttextdocumentlayout160logstatsplain
d---------qabstracturiresolver191logstatsplain
d---------qabstractvideobuffer108logstatsplain
d---------qabstractvideosurface110logstatsplain
d---------qabstractxmlforwarditerator160logstatsplain
d---------qabstractxmlnodemodel313logstatsplain
d---------qabstractxmlreceiver199logstatsplain
d---------qaccessibility134logstatsplain
d---------qaccessibility_mac694logstatsplain
d---------qaction120logstatsplain
d---------qactiongroup130logstatsplain
d---------qalgorithms128logstatsplain
d---------qanimationgroup98logstatsplain
d---------qapplication312logstatsplain
d---------qapplicationargumentparser158logstatsplain
d---------qatomicint126logstatsplain
d---------qatomicpointer134logstatsplain
d---------qaudiodeviceinfo100logstatsplain
d---------qaudioformat92logstatsplain
d---------qaudioinput90logstatsplain
d---------qaudiooutput125logstatsplain
d---------qautoptr122logstatsplain
d---------qbitarray124logstatsplain
d---------qboxlayout126logstatsplain
d---------qbrush118logstatsplain
d---------qbuffer120logstatsplain
d---------qbuttongroup130logstatsplain
d---------qbytearray207logstatsplain
d---------qbytearraymatcher102logstatsplain
d---------qcache118logstatsplain
d---------qcalendarwidget136logstatsplain
d---------qchar165logstatsplain
d---------qcheckbox124logstatsplain
d---------qclipboard223logstatsplain
d---------qcolor118logstatsplain
d---------qcolordialog130logstatsplain
d---------qcolumnview128logstatsplain
d---------qcombobox124logstatsplain
d---------qcommandlinkbutton142logstatsplain
d---------qcompleter126logstatsplain
d---------qcomplextext177logstatsplain
d---------qcontiguouscache100logstatsplain
d---------qcopchannel194logstatsplain
d---------qcoreapplication138logstatsplain
d---------qcryptographichash142logstatsplain
d---------qcssparser161logstatsplain
d---------qdatastream251logstatsplain
d---------qdatawidgetmapper140logstatsplain
d---------qdate116logstatsplain
d---------qdatetime124logstatsplain
d---------qdatetimeedit132logstatsplain
d---------qdbusabstractadaptor146logstatsplain
d---------qdbusabstractinterface325logstatsplain
d---------qdbusconnection136logstatsplain
d---------qdbuscontext130logstatsplain
d---------qdbusinterface134logstatsplain
d---------qdbuslocalcalls136logstatsplain
d---------qdbusmarshall268logstatsplain
d---------qdbusmetaobject136logstatsplain
d---------qdbusmetatype132logstatsplain
d---------qdbuspendingcall138logstatsplain
d---------qdbuspendingreply140logstatsplain
d---------qdbusperformance244logstatsplain
d---------qdbusreply126logstatsplain
d---------qdbusserver166logstatsplain
d---------qdbusservicewatcher106logstatsplain
d---------qdbusthreading134logstatsplain
d---------qdbusxmlparser134logstatsplain
d---------qdebug118logstatsplain
d---------qdesktopservices138logstatsplain
d---------qdesktopwidget134logstatsplain
d---------qdial116logstatsplain
d---------qdialog120logstatsplain
d---------qdialogbuttonbox138logstatsplain
d---------qdir359logstatsplain
d---------qdirectpainter208logstatsplain
d---------qdiriterator280logstatsplain
d---------qdirmodel189logstatsplain
d---------qdockwidget128logstatsplain
d---------qdom277logstatsplain
d---------qdoublespinbox134logstatsplain
d---------qdoublevalidator138logstatsplain
d---------qdrag116logstatsplain
d---------qeasingcurve92logstatsplain
d---------qerrormessage132logstatsplain
d---------qevent118logstatsplain
d---------qeventloop126logstatsplain
d---------qexplicitlyshareddatapointer162logstatsplain
d---------qfile716logstatsplain
d---------qfiledialog128logstatsplain
d---------qfiledialog292logstatsplain
d---------qfileiconprovider140logstatsplain
d---------qfileinfo201logstatsplain
d---------qfilesystemmodel138logstatsplain
d---------qfilesystemwatcher142logstatsplain
d---------qflags118logstatsplain
d---------qfocusevent128logstatsplain
d---------qfocusframe128logstatsplain
d---------qfont116logstatsplain
d---------qfontcombobox132logstatsplain
d---------qfontdatabase172logstatsplain
d---------qfontdialog186logstatsplain
d---------qfontmetrics130logstatsplain
d---------qformlayout128logstatsplain
d---------qftp195logstatsplain
d---------qfuture162logstatsplain
d---------qfuturewatcher134logstatsplain
d---------qgetputenv126logstatsplain
d---------qgl147logstatsplain
d---------qglobal120logstatsplain
d---------qgraphicsanchorlayout110logstatsplain
d---------qgraphicsanchorlayout1112logstatsplain
d---------qgraphicseffect98logstatsplain
d---------qgraphicseffectsource110logstatsplain
d---------qgraphicsgridlayout144logstatsplain
d---------qgraphicsitem188logstatsplain
d---------qgraphicsitemanimation150logstatsplain
d---------qgraphicslayout136logstatsplain
d---------qgraphicslayoutitem144logstatsplain
d---------qgraphicslinearlayout148logstatsplain
d---------qgraphicsobject98logstatsplain
d---------qgraphicspixmapitem144logstatsplain
d---------qgraphicspolygonitem146logstatsplain
d---------qgraphicsproxywidget146logstatsplain
d---------qgraphicsscene307logstatsplain
d---------qgraphicssceneindex106logstatsplain
d---------qgraphicstransform104logstatsplain
d---------qgraphicsview183logstatsplain
d---------qgraphicswidget136logstatsplain
d---------qgridlayout169logstatsplain
d---------qgroupbox124logstatsplain
d---------qguard80logstatsplain
d---------qguivariant128logstatsplain
d---------qhash116logstatsplain
d---------qheaderview128logstatsplain
d---------qhelpcontentmodel224logstatsplain
d---------qhelpenginecore218logstatsplain
d---------qhelpgenerator215logstatsplain
d---------qhelpindexmodel218logstatsplain
d---------qhelpprojectdata221logstatsplain
d---------qhostaddress130logstatsplain
d---------qhostinfo124logstatsplain
d---------qhttp311logstatsplain
d---------qhttpnetworkconnection150logstatsplain
d---------qhttpnetworkreply140logstatsplain
d---------qhttpsocketengine140logstatsplain
d---------qicoimageformat168logstatsplain
d---------qicon410logstatsplain
d---------qimage151logstatsplain
d---------qimageiohandler136logstatsplain
d---------qimagereader242logstatsplain
d---------qimagewriter163logstatsplain
d---------qinputcontext94logstatsplain
d---------qinputdialog130logstatsplain
d---------qintvalidator132logstatsplain
d---------qiodevice124logstatsplain
d---------qitemdelegate132logstatsplain
d---------qitemeditorfactory142logstatsplain
d---------qitemmodel204logstatsplain
d---------qitemselectionmodel144logstatsplain
d---------qitemview167logstatsplain
d---------qkeysequence286logstatsplain
d---------qlabel225logstatsplain
d---------qlayout155logstatsplain
d---------qlcdnumber126logstatsplain
d---------qlibrary252logstatsplain
d---------qline116logstatsplain
d---------qlineedit159logstatsplain
d---------qlist116logstatsplain
d---------qlistview124logstatsplain
d---------qlistwidget128logstatsplain
d---------qlocale190logstatsplain
d---------qlocalsocket228logstatsplain
d---------qmacstyle124logstatsplain
d---------qmainwindow128logstatsplain
d---------qmake237logstatsplain
d---------qmap114logstatsplain
d---------qmargins84logstatsplain
d---------qmath78logstatsplain
d---------qmatrixnxn88logstatsplain
d---------qmdiarea122logstatsplain
d---------qmdisubwindow132logstatsplain
d---------qmenu116logstatsplain
d---------qmenubar122logstatsplain
d---------qmessagebox128logstatsplain
d---------qmetaobject128logstatsplain
d---------qmetatype124logstatsplain
d---------qmouseevent128logstatsplain
d---------qmouseevent_modal140logstatsplain
d---------qmovie155logstatsplain
d---------qmultiscreen130logstatsplain
d---------qmutex118logstatsplain
d---------qmutexlocker130logstatsplain
d---------qnativesocketengine189logstatsplain
d---------qnetworkaccessmanager_and_qprogressdialog150logstatsplain
d---------qnetworkaddressentry146logstatsplain
d---------qnetworkcachemetadata148logstatsplain
d---------qnetworkcookie134logstatsplain
d---------qnetworkcookiejar140logstatsplain
d---------qnetworkdiskcache140logstatsplain
d---------qnetworkinterface140logstatsplain
d---------qnetworkproxy132logstatsplain
d---------qnetworkreply456logstatsplain
d---------qnetworkrequest136logstatsplain
d---------qnumeric122logstatsplain
d---------qobject284logstatsplain
d---------qobjectperformance142logstatsplain
d---------qobjectrace128logstatsplain
d---------qpaintengine130logstatsplain
d---------qpainter369logstatsplain
d---------qpainterpath130logstatsplain
d---------qpainterpathstroker144logstatsplain
d---------qpalette122logstatsplain
d---------qparallelanimationgroup114logstatsplain
d---------qpathclipper202logstatsplain
d---------qpauseanimation98logstatsplain
d---------qpen114logstatsplain
d---------qpicture122logstatsplain
d---------qpixmap280logstatsplain
d---------qpixmapcache130logstatsplain
d---------qpixmapfilter131logstatsplain
d---------qplaintextedit134logstatsplain
d---------qplugin241logstatsplain
d---------qpluginloader267logstatsplain
d---------qpoint118logstatsplain
d---------qpointer122logstatsplain
d---------qpolygon122logstatsplain
d---------qprinter122logstatsplain
d---------qprinterinfo130logstatsplain
d---------qprocess1029logstatsplain
d---------qprocessenvironment106logstatsplain
d---------qprogressbar130logstatsplain
d---------qprogressdialog136logstatsplain
d---------qpropertyanimation104logstatsplain
d---------qpushbutton163logstatsplain
d---------qquaternion90logstatsplain
d---------qqueue118logstatsplain
d---------qradiobutton130logstatsplain
d---------qrand116logstatsplain
d---------qreadlocker128logstatsplain
d---------qreadwritelock134logstatsplain
d---------qrect116logstatsplain
d---------qregexp120logstatsplain
d---------qregexpvalidator138logstatsplain
d---------qregion120logstatsplain
d---------qresourceengine253logstatsplain
d---------qringbuffer90logstatsplain
d---------qs60mainapplication106logstatsplain
d---------qscopedpointer134logstatsplain
d---------qscriptable128logstatsplain
d---------qscriptclass130logstatsplain
d---------qscriptcontext134logstatsplain
d---------qscriptcontextinfo142logstatsplain
d---------qscriptengine165logstatsplain
d---------qscriptengineagent142logstatsplain
d---------qscriptenginedebugger148logstatsplain
d---------qscriptextqobject140logstatsplain
d---------qscriptjstestsuite174logstatsplain
d---------qscriptstring132logstatsplain
d---------qscriptv8testsuite136logstatsplain
d---------qscriptvalue268logstatsplain
d---------qscriptvalueiterator146logstatsplain
d---------qscrollarea128logstatsplain
d---------qscrollbar126logstatsplain
d---------qsemaphore126logstatsplain
d---------qsequentialanimationgroup118logstatsplain
d---------qset114logstatsplain
d---------qsettings431logstatsplain
d---------qsharedmemory264logstatsplain
d---------qsharedpointer485logstatsplain
d---------qsharedpointer_and_qwidget120logstatsplain
d---------qshortcut124logstatsplain
d---------qsidebar122logstatsplain
d---------qsignalmapper132logstatsplain
d---------qsignalspy126logstatsplain
d---------qsimplexmlnodemodel193logstatsplain
d---------qsize116logstatsplain
d---------qsizef118logstatsplain
d---------qsizegrip124logstatsplain
d---------qslider120logstatsplain
d---------qsocketnotifier136logstatsplain
d---------qsocks5socketengine144logstatsplain
d---------qsoftkeymanager98logstatsplain
d---------qsortfilterproxymodel148logstatsplain
d---------qsound151logstatsplain
d---------qsourcelocation136logstatsplain
d---------qspinbox122logstatsplain
d---------qsplitter206logstatsplain
d---------qsql114logstatsplain
d---------qsqldatabase208logstatsplain
d---------qsqldriver88logstatsplain
d---------qsqlerror124logstatsplain
d---------qsqlfield124logstatsplain
d---------qsqlquery124logstatsplain
d---------qsqlquerymodel134logstatsplain
d---------qsqlrecord126logstatsplain
d---------qsqlrelationaltablemodel154logstatsplain
d---------qsqltablemodel134logstatsplain
d---------qsqlthread126logstatsplain
d---------qsslcertificate219logstatsplain
d---------qsslcipher126logstatsplain
d---------qsslerror124logstatsplain
d---------qsslkey151logstatsplain
d---------qsslsocket196logstatsplain
d---------qstackedlayout134logstatsplain
d---------qstackedwidget134logstatsplain
d---------qstandarditem132logstatsplain
d---------qstandarditemmodel142logstatsplain
d---------qstate80logstatsplain
d---------qstatemachine94logstatsplain
d---------qstatusbar126logstatsplain
d---------qstl114logstatsplain
d---------qstring161logstatsplain
d---------qstringbuilder1143logstatsplain
d---------qstringbuilder298logstatsplain
d---------qstringbuilder398logstatsplain
d---------qstringbuilder498logstatsplain
d---------qstringlist128logstatsplain
d---------qstringlistmodel182logstatsplain
d---------qstringmatcher134logstatsplain
d---------qstyle193logstatsplain
d---------qstyleoption130logstatsplain
d---------qstylesheetstyle212logstatsplain
d---------qsvgdevice126logstatsplain
d---------qsvggenerator172logstatsplain
d---------qsvgrenderer326logstatsplain
d---------qsyntaxhighlighter142logstatsplain
d---------qsystemsemaphore206logstatsplain
d---------qsystemtrayicon168logstatsplain
d---------qtabbar120logstatsplain
d---------qtableview126logstatsplain
d---------qtablewidget130logstatsplain
d---------qtabwidget126logstatsplain
d---------qtconcurrentfilter142logstatsplain
d---------qtconcurrentiteratekernel156logstatsplain
d---------qtconcurrentmap175logstatsplain
d---------qtconcurrentrun136logstatsplain
d---------qtconcurrentthreadengine154logstatsplain
d---------qtcpserver198logstatsplain
d---------qtcpsocket194logstatsplain
d---------qtemporaryfile134logstatsplain
d---------qtessellator839logstatsplain
d---------qtextblock126logstatsplain
d---------qtextboundaryfinder175logstatsplain
-rw-r--r--qtextbrowser.html35logstatsplain
d---------qtextbrowser504logstatsplain
d---------qtextcodec349logstatsplain
d---------qtextcursor128logstatsplain
d---------qtextdocument168logstatsplain
d---------qtextdocumentfragment148logstatsplain
d---------qtextdocumentlayout144logstatsplain
d---------qtextedit169logstatsplain
d---------qtextformat128logstatsplain
d---------qtextlayout128logstatsplain
d---------qtextlist124logstatsplain
d---------qtextobject128logstatsplain
d---------qtextodfwriter134logstatsplain
d---------qtextpiecetable136logstatsplain
d---------qtextscriptengine175logstatsplain
d---------qtextstream534logstatsplain
d---------qtexttable126logstatsplain
d---------qthread120logstatsplain
d---------qthreadonce212logstatsplain
d---------qthreadpool128logstatsplain
d---------qthreadstorage134logstatsplain
d---------qtime116logstatsplain
d---------qtimeline124logstatsplain
d---------qtimer118logstatsplain
d---------qtmd5116logstatsplain
d---------qtokenautomaton222logstatsplain
d---------qtoolbar122logstatsplain
d---------qtoolbox122logstatsplain
d---------qtoolbutton128logstatsplain
d---------qtooltip122logstatsplain
d---------qtouchevent90logstatsplain
d---------qtransform126logstatsplain
d---------qtransformedscreen142logstatsplain
d---------qtranslator255logstatsplain
d---------qtreeview124logstatsplain
d---------qtreewidget128logstatsplain
d---------qtreewidgetitemiterator152logstatsplain
d---------qtwidgets393logstatsplain
d---------qudpsocket232logstatsplain
d---------qundogroup126logstatsplain
d---------qundostack126logstatsplain
d---------qurl153logstatsplain
d---------quuid116logstatsplain
d---------qvariant122logstatsplain
d---------qvarlengtharray136logstatsplain
d---------qvector120logstatsplain
d---------qvectornd86logstatsplain
d---------qvideoframe90logstatsplain
d---------qvideosurfaceformat106logstatsplain
d---------qwaitcondition134logstatsplain
d---------qwebelement118logstatsplain
d---------qwebframe116logstatsplain
d---------qwebhistory118logstatsplain
d---------qwebhistoryinterface127logstatsplain
d---------qwebpage115logstatsplain
d---------qwidget442logstatsplain
d---------qwidget_window134logstatsplain
d---------qwidgetaction132logstatsplain
d---------qwindowsurface134logstatsplain
d---------qwineventnotifier140logstatsplain
d---------qwizard192logstatsplain
d---------qwmatrix122logstatsplain
d---------qworkspace126logstatsplain
d---------qwritelocker130logstatsplain
d---------qwsembedwidget134logstatsplain
d---------qwsinputmethod134logstatsplain
d---------qwswindowsystem136logstatsplain
d---------qx11info122logstatsplain
d---------qxml152logstatsplain
d---------qxmlformatter200logstatsplain
d---------qxmlinputsource136logstatsplain
d---------qxmlitem122logstatsplain
d---------qxmlname122logstatsplain
d---------qxmlnamepool130logstatsplain
d---------qxmlnodemodelindex142logstatsplain
d---------qxmlquery585logstatsplain
d---------qxmlresultitems136logstatsplain
d---------qxmlschema126logstatsplain
d---------qxmlschemavalidator144logstatsplain
d---------qxmlserializer134logstatsplain
d---------qxmlsimplereader332logstatsplain
d---------qxmlstream370logstatsplain
d---------qzip149logstatsplain
d---------rcc143logstatsplain
d---------selftests3433logstatsplain
-rw-r--r--solutions.pri480logstatsplain
d---------symbian131logstatsplain
d---------symbols120logstatsplain
-rwxr-xr-xtest.pl6598logstatsplain
d---------uic186logstatsplain
d---------uic3227logstatsplain
d---------uiloader704logstatsplain
d---------utf876logstatsplain
d---------windowsmobile115logstatsplain
-rw-r--r--xmlpatterns.pri1364logstatsplain
d---------xmlpatterns356logstatsplain
d---------xmlpatternsdiagnosticsts243logstatsplain
d---------xmlpatternsschema140logstatsplain
d---------xmlpatternsschemats220logstatsplain
d---------xmlpatternsvalidator140logstatsplain
d---------xmlpatternsview147logstatsplain
d---------xmlpatternsxqts357logstatsplain
d---------xmlpatternsxslts210logstatsplain
"hl opt">::SmoothPixmapTransform, texture->id); // Setup for texture drawing currentBrush = noBrush; shaderManager->setSrcPixelType(isBitmap ? QGLEngineShaderManager::PatternSrc : QGLEngineShaderManager::ImageSrc); if (prepareForDraw(isOpaque)) shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::ImageTexture), QT_IMAGE_TEXTURE_UNIT); if (isBitmap) { QColor col = qt_premultiplyColor(q->state()->pen.color(), (GLfloat)q->state()->opacity); shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::PatternColor), col); } glDrawArrays(GL_TRIANGLES, 0, 6 * fragmentCount); } bool QGL2PaintEngineEx::begin(QPaintDevice *pdev) { Q_D(QGL2PaintEngineEx); // qDebug("QGL2PaintEngineEx::begin()"); if (pdev->devType() == QInternal::OpenGL) d->device = static_cast<QGLPaintDevice*>(pdev); else d->device = QGLPaintDevice::getDevice(pdev); if (!d->device) return false; d->ctx = d->device->context(); d->ctx->d_ptr->active_engine = this; const QSize sz = d->device->size(); d->width = sz.width(); d->height = sz.height(); d->mode = BrushDrawingMode; d->brushTextureDirty = true; d->brushUniformsDirty = true; d->matrixUniformDirty = true; d->matrixDirty = true; d->compositionModeDirty = true; d->opacityUniformDirty = true; d->needsSync = true; d->useSystemClip = !systemClip().isEmpty(); d->currentBrush = QBrush(); d->dirtyStencilRegion = QRect(0, 0, d->width, d->height); d->stencilClean = true; // Calling begin paint should make the correct context current. So, any // code which calls into GL or otherwise needs a current context *must* // go after beginPaint: d->device->beginPaint(); #if !defined(QT_OPENGL_ES_2) bool success = qt_resolve_version_2_0_functions(d->ctx) && qt_resolve_buffer_extensions(d->ctx); Q_ASSERT(success); Q_UNUSED(success); #endif d->shaderManager = new QGLEngineShaderManager(d->ctx); glDisable(GL_STENCIL_TEST); glDisable(GL_DEPTH_TEST); glDisable(GL_SCISSOR_TEST); #if !defined(QT_OPENGL_ES_2) glDisable(GL_MULTISAMPLE); #endif d->glyphCacheType = QFontEngineGlyphCache::Raster_A8; #if !defined(QT_OPENGL_ES_2) #if defined(Q_WS_WIN) if (qt_cleartype_enabled) #endif d->glyphCacheType = QFontEngineGlyphCache::Raster_RGBMask; #endif #if defined(QT_OPENGL_ES_2) // OpenGL ES can't switch MSAA off, so if the gl paint device is // multisampled, it's always multisampled. d->multisamplingAlwaysEnabled = d->device->format().sampleBuffers(); #else d->multisamplingAlwaysEnabled = false; #endif return true; } bool QGL2PaintEngineEx::end() { Q_D(QGL2PaintEngineEx); QGLContext *ctx = d->ctx; glUseProgram(0); d->transferMode(BrushDrawingMode); d->device->endPaint(); #if defined(Q_WS_X11) // On some (probably all) drivers, deleting an X pixmap which has been bound to a texture // before calling glFinish/swapBuffers renders garbage. Presumably this is because X deletes // the pixmap behind the driver's back before it's had a chance to use it. To fix this, we // reference all QPixmaps which have been bound to stop them being deleted and only deref // them here, after swapBuffers, where they can be safely deleted. ctx->d_func()->boundPixmaps.clear(); #endif d->ctx->d_ptr->active_engine = 0; d->resetGLState(); delete d->shaderManager; d->shaderManager = 0; d->currentBrush = QBrush(); #ifdef QT_OPENGL_CACHE_AS_VBOS if (!d->unusedVBOSToClean.isEmpty()) { glDeleteBuffers(d->unusedVBOSToClean.size(), d->unusedVBOSToClean.constData()); d->unusedVBOSToClean.clear(); } if (!d->unusedIBOSToClean.isEmpty()) { glDeleteBuffers(d->unusedIBOSToClean.size(), d->unusedIBOSToClean.constData()); d->unusedIBOSToClean.clear(); } #endif return false; } void QGL2PaintEngineEx::ensureActive() { Q_D(QGL2PaintEngineEx); QGLContext *ctx = d->ctx; if (isActive() && ctx->d_ptr->active_engine != this) { ctx->d_ptr->active_engine = this; d->needsSync = true; } d->device->ensureActiveTarget(); if (d->needsSync) { d->transferMode(BrushDrawingMode); glViewport(0, 0, d->width, d->height); d->needsSync = false; d->lastMaskTextureUsed = 0; d->shaderManager->setDirty(); d->ctx->d_func()->syncGlState(); for (int i = 0; i < 3; ++i) d->vertexAttribPointers[i] = (GLfloat*)-1; // Assume the pointers are clobbered setState(state()); } } void QGL2PaintEngineExPrivate::updateClipScissorTest() { Q_Q(QGL2PaintEngineEx); if (q->state()->clipTestEnabled) { glEnable(GL_STENCIL_TEST); glStencilFunc(GL_LEQUAL, q->state()->currentClip, ~GL_STENCIL_HIGH_BIT); } else { glDisable(GL_STENCIL_TEST); glStencilFunc(GL_ALWAYS, 0, 0xff); } #ifdef QT_GL_NO_SCISSOR_TEST currentScissorBounds = QRect(0, 0, width, height); #else QRect bounds = q->state()->rectangleClip; if (!q->state()->clipEnabled) { if (useSystemClip) bounds = systemClip.boundingRect(); else bounds = QRect(0, 0, width, height); } else { if (useSystemClip) bounds = bounds.intersected(systemClip.boundingRect()); else bounds = bounds.intersected(QRect(0, 0, width, height)); } currentScissorBounds = bounds; if (bounds == QRect(0, 0, width, height)) { glDisable(GL_SCISSOR_TEST); } else { glEnable(GL_SCISSOR_TEST); setScissor(bounds); } #endif } void QGL2PaintEngineExPrivate::setScissor(const QRect &rect) { const int left = rect.left(); const int width = rect.width(); const int bottom = height - (rect.top() + rect.height()); const int height = rect.height(); glScissor(left, bottom, width, height); } void QGL2PaintEngineEx::clipEnabledChanged() { Q_D(QGL2PaintEngineEx); state()->clipChanged = true; if (painter()->hasClipping()) d->regenerateClip(); else d->systemStateChanged(); } void QGL2PaintEngineExPrivate::clearClip(uint value) { dirtyStencilRegion -= currentScissorBounds; glStencilMask(0xff); glClearStencil(value); glClear(GL_STENCIL_BUFFER_BIT); glStencilMask(0x0); q->state()->needsClipBufferClear = false; } void QGL2PaintEngineExPrivate::writeClip(const QVectorPath &path, uint value) { transferMode(BrushDrawingMode); if (addOffset) { addOffset = false; matrixDirty = true; } if (snapToPixelGrid) { snapToPixelGrid = false; matrixDirty = true; } if (matrixDirty) updateMatrix(); stencilClean = false; const bool singlePass = !path.hasWindingFill() && (((q->state()->currentClip == maxClip - 1) && q->state()->clipTestEnabled) || q->state()->needsClipBufferClear); const uint referenceClipValue = q->state()->needsClipBufferClear ? 1 : q->state()->currentClip; if (q->state()->needsClipBufferClear) clearClip(1); if (path.isEmpty()) { glEnable(GL_STENCIL_TEST); glStencilFunc(GL_LEQUAL, value, ~GL_STENCIL_HIGH_BIT); return; } if (q->state()->clipTestEnabled) glStencilFunc(GL_LEQUAL, q->state()->currentClip, ~GL_STENCIL_HIGH_BIT); else glStencilFunc(GL_ALWAYS, 0, 0xff); vertexCoordinateArray.clear(); vertexCoordinateArray.addPath(path, inverseScale, false); if (!singlePass) fillStencilWithVertexArray(vertexCoordinateArray, path.hasWindingFill()); glColorMask(false, false, false, false); glEnable(GL_STENCIL_TEST); useSimpleShader(); if (singlePass) { // Under these conditions we can set the new stencil value in a single // pass, by using the current value and the "new value" as the toggles glStencilFunc(GL_LEQUAL, referenceClipValue, ~GL_STENCIL_HIGH_BIT); glStencilOp(GL_KEEP, GL_INVERT, GL_INVERT); glStencilMask(value ^ referenceClipValue); drawVertexArrays(vertexCoordinateArray, GL_TRIANGLE_FAN); } else { glStencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE); glStencilMask(0xff); if (!q->state()->clipTestEnabled && path.hasWindingFill()) { // Pass when any clip bit is set, set high bit glStencilFunc(GL_NOTEQUAL, GL_STENCIL_HIGH_BIT, ~GL_STENCIL_HIGH_BIT); composite(vertexCoordinateArray.boundingRect()); } // Pass when high bit is set, replace stencil value with new clip value glStencilFunc(GL_NOTEQUAL, value, GL_STENCIL_HIGH_BIT); composite(vertexCoordinateArray.boundingRect()); } glStencilFunc(GL_LEQUAL, value, ~GL_STENCIL_HIGH_BIT); glStencilMask(0); glColorMask(true, true, true, true); } void QGL2PaintEngineEx::clip(const QVectorPath &path, Qt::ClipOperation op) { // qDebug("QGL2PaintEngineEx::clip()"); Q_D(QGL2PaintEngineEx); state()->clipChanged = true; ensureActive(); if (op == Qt::ReplaceClip) { op = Qt::IntersectClip; if (d->hasClipOperations()) { d->systemStateChanged(); state()->canRestoreClip = false; } } #ifndef QT_GL_NO_SCISSOR_TEST if (!path.isEmpty() && op == Qt::IntersectClip && (path.shape() == QVectorPath::RectangleHint)) { const QPointF* const points = reinterpret_cast<const QPointF*>(path.points()); QRectF rect(points[0], points[2]); if (state()->matrix.type() <= QTransform::TxScale) { state()->rectangleClip = state()->rectangleClip.intersected(state()->matrix.mapRect(rect).toRect()); d->updateClipScissorTest(); return; } } #endif const QRect pathRect = state()->matrix.mapRect(path.controlPointRect()).toAlignedRect(); switch (op) { case Qt::NoClip: if (d->useSystemClip) { state()->clipTestEnabled = true; state()->currentClip = 1; } else { state()->clipTestEnabled = false; } state()->rectangleClip = QRect(0, 0, d->width, d->height); state()->canRestoreClip = false; d->updateClipScissorTest(); break; case Qt::IntersectClip: state()->rectangleClip = state()->rectangleClip.intersected(pathRect); d->updateClipScissorTest(); d->resetClipIfNeeded(); ++d->maxClip; d->writeClip(path, d->maxClip); state()->currentClip = d->maxClip; state()->clipTestEnabled = true; break; case Qt::UniteClip: { d->resetClipIfNeeded(); ++d->maxClip; if (state()->rectangleClip.isValid()) { QPainterPath path; path.addRect(state()->rectangleClip); // flush the existing clip rectangle to the depth buffer d->writeClip(qtVectorPathForPath(state()->matrix.inverted().map(path)), d->maxClip); } state()->clipTestEnabled = false; #ifndef QT_GL_NO_SCISSOR_TEST QRect oldRectangleClip = state()->rectangleClip; state()->rectangleClip = state()->rectangleClip.united(pathRect); d->updateClipScissorTest(); QRegion extendRegion = QRegion(state()->rectangleClip) - oldRectangleClip; if (!extendRegion.isEmpty()) { QPainterPath extendPath; extendPath.addRegion(extendRegion); // first clear the depth buffer in the extended region d->writeClip(qtVectorPathForPath(state()->matrix.inverted().map(extendPath)), 0); } #endif // now write the clip path d->writeClip(path, d->maxClip); state()->canRestoreClip = false; state()->currentClip = d->maxClip; state()->clipTestEnabled = true; break; } default: break; } } void QGL2PaintEngineExPrivate::regenerateClip() { systemStateChanged(); replayClipOperations(); } void QGL2PaintEngineExPrivate::systemStateChanged() { Q_Q(QGL2PaintEngineEx); q->state()->clipChanged = true; if (systemClip.isEmpty()) { useSystemClip = false; } else { if (q->paintDevice()->devType() == QInternal::Widget && currentClipWidget) { QWidgetPrivate *widgetPrivate = qt_widget_private(currentClipWidget->window()); useSystemClip = widgetPrivate->extra && widgetPrivate->extra->inRenderWithPainter; } else { useSystemClip = true; } } q->state()->clipTestEnabled = false; q->state()->needsClipBufferClear = true; q->state()->currentClip = 1; maxClip = 1; q->state()->rectangleClip = useSystemClip ? systemClip.boundingRect() : QRect(0, 0, width, height); updateClipScissorTest(); if (systemClip.rectCount() == 1) { if (systemClip.boundingRect() == QRect(0, 0, width, height)) useSystemClip = false; #ifndef QT_GL_NO_SCISSOR_TEST // scissoring takes care of the system clip return; #endif } if (useSystemClip) { clearClip(0); QPainterPath path; path.addRegion(systemClip); q->state()->currentClip = 0; writeClip(qtVectorPathForPath(q->state()->matrix.inverted().map(path)), 1); q->state()->currentClip = 1; q->state()->clipTestEnabled = true; } } void QGL2PaintEngineEx::setState(QPainterState *new_state) { // qDebug("QGL2PaintEngineEx::setState()"); Q_D(QGL2PaintEngineEx); QOpenGL2PaintEngineState *s = static_cast<QOpenGL2PaintEngineState *>(new_state); QOpenGL2PaintEngineState *old_state = state(); QPaintEngineEx::setState(s); if (s->isNew) { // Newly created state object. The call to setState() // will either be followed by a call to begin(), or we are // setting the state as part of a save(). s->isNew = false; return; } // Setting the state as part of a restore(). if (old_state == s || old_state->renderHintsChanged) renderHintsChanged(); if (old_state == s || old_state->matrixChanged) d->matrixDirty = true; if (old_state == s || old_state->compositionModeChanged) d->compositionModeDirty = true; if (old_state == s || old_state->opacityChanged) d->opacityUniformDirty = true; if (old_state == s || old_state->clipChanged) { if (old_state && old_state != s && old_state->canRestoreClip) { d->updateClipScissorTest(); glDepthFunc(GL_LEQUAL); } else { d->regenerateClip(); } } } QPainterState *QGL2PaintEngineEx::createState(QPainterState *orig) const { if (orig) const_cast<QGL2PaintEngineEx *>(this)->ensureActive(); QOpenGL2PaintEngineState *s; if (!orig) s = new QOpenGL2PaintEngineState(); else s = new QOpenGL2PaintEngineState(*static_cast<QOpenGL2PaintEngineState *>(orig)); s->matrixChanged = false; s->compositionModeChanged = false; s->opacityChanged = false; s->renderHintsChanged = false; s->clipChanged = false; return s; } QOpenGL2PaintEngineState::QOpenGL2PaintEngineState(QOpenGL2PaintEngineState &other) : QPainterState(other) { isNew = true; needsClipBufferClear = other.needsClipBufferClear; clipTestEnabled = other.clipTestEnabled; currentClip = other.currentClip; canRestoreClip = other.canRestoreClip; rectangleClip = other.rectangleClip; } QOpenGL2PaintEngineState::QOpenGL2PaintEngineState() { isNew = true; needsClipBufferClear = true; clipTestEnabled = false; canRestoreClip = true; } QOpenGL2PaintEngineState::~QOpenGL2PaintEngineState() { } QT_END_NAMESPACE