summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--demos/browser/networkaccessmanager.cpp5
-rw-r--r--demos/deform/pathdeform.cpp12
-rw-r--r--dist/changes-4.6.011
-rw-r--r--doc/src/examples/overpainting.qdoc7
-rw-r--r--doc/src/frameworks-technologies/graphicsview.qdoc20
-rw-r--r--doc/src/images/graphicseffect-blur.pngbin0 -> 41433 bytes
-rw-r--r--doc/src/images/graphicseffect-colorize.pngbin0 -> 35062 bytes
-rw-r--r--doc/src/images/graphicseffect-drop-shadow.pngbin0 -> 38770 bytes
-rw-r--r--doc/src/images/graphicseffect-effects.pngbin0 -> 112462 bytes
-rw-r--r--doc/src/images/graphicseffect-grayscale.pngbin0 -> 35056 bytes
-rw-r--r--doc/src/images/graphicseffect-opacity.pngbin0 -> 33879 bytes
-rw-r--r--doc/src/images/graphicseffect-pixelize.pngbin0 -> 23577 bytes
-rw-r--r--doc/src/images/graphicseffect-widget.pngbin0 -> 16693 bytes
-rw-r--r--doc/src/platforms/emb-displaymanagement.qdoc2
-rw-r--r--doc/src/snippets/animation/sequential/tracer.h41
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qobject.cpp6
-rw-r--r--doc/src/snippets/signalmapper/filereader.h41
-rw-r--r--examples/effects/blurpicker/blureffect.cpp2
-rw-r--r--examples/effects/customshader/blureffect.cpp2
-rw-r--r--examples/effects/customshader/customshadereffect.cpp2
-rw-r--r--examples/gestures/imageviewer/imagewidget.cpp271
-rw-r--r--examples/gestures/imageviewer/imagewidget.h60
-rw-r--r--examples/gestures/imageviewer/tapandholdgesture.cpp2
-rw-r--r--examples/graphicsview/anchorlayout/main.cpp22
-rw-r--r--examples/opengl/framebufferobject/bubbles.svg28
-rw-r--r--examples/opengl/hellogl_es2/glwidget.cpp4
-rw-r--r--examples/opengl/overpainting/glwidget.cpp5
-rw-r--r--examples/opengl/pbuffers2/bubbles.svg28
-rw-r--r--examples/openvg/star/starwidget.cpp4
-rw-r--r--examples/painting/svgviewer/files/bubbles.svg2
-rw-r--r--mkspecs/qws/linux-armv6-g++/qplatformdefs.h41
-rw-r--r--mkspecs/qws/linux-avr32-g++/qplatformdefs.h41
-rw-r--r--mkspecs/qws/linux-sh-g++/qplatformdefs.h41
-rw-r--r--src/3rdparty/phonon/ds9/backend.h2
-rw-r--r--src/3rdparty/phonon/ds9/mediaobject.cpp2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jit/JITOpcodes.cpp1
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp8
-rw-r--r--src/corelib/animation/qpropertyanimation.cpp78
-rw-r--r--src/corelib/animation/qpropertyanimation.h1
-rw-r--r--src/corelib/animation/qpropertyanimation_p.h11
-rw-r--r--src/corelib/animation/qvariantanimation_p.h6
-rw-r--r--src/corelib/global/qglobal.h9
-rw-r--r--src/corelib/global/qt_windows.h7
-rw-r--r--src/corelib/io/qfsfileengine_unix.cpp129
-rw-r--r--src/corelib/io/qfsfileengine_win.cpp5
-rw-r--r--src/corelib/io/qprocess.cpp3
-rw-r--r--src/corelib/io/qtemporaryfile.cpp4
-rw-r--r--src/corelib/kernel/qabstractitemmodel.cpp361
-rw-r--r--src/corelib/kernel/qabstractitemmodel.h13
-rw-r--r--src/corelib/kernel/qabstractitemmodel_p.h7
-rw-r--r--src/corelib/kernel/qobject.cpp9
-rw-r--r--src/corelib/thread/qthread_win.cpp4
-rw-r--r--src/gui/effects/qgraphicseffect.cpp427
-rw-r--r--src/gui/effects/qgraphicseffect_p.h2
-rw-r--r--src/gui/embedded/qkbd_defaultmap_qws_p.h2
-rw-r--r--src/gui/embedded/qkbd_qws_p.h4
-rw-r--r--src/gui/embedded/qkbdqnx_qws.cpp5
-rw-r--r--src/gui/embedded/qlock.cpp11
-rw-r--r--src/gui/embedded/qmousetslib_qws.h2
-rw-r--r--src/gui/embedded/qscreen_qws.h4
-rw-r--r--src/gui/embedded/qscreenlinuxfb_qws.cpp6
-rw-r--r--src/gui/embedded/qscreenlinuxfb_qws.h8
-rw-r--r--src/gui/embedded/qscreenproxy_qws.cpp3
-rw-r--r--src/gui/embedded/qscreenqnx_qws.cpp3
-rw-r--r--src/gui/embedded/qsoundqss_qws.cpp4
-rw-r--r--src/gui/embedded/qwsutils_qws.h12
-rw-r--r--src/gui/graphicsview/qgraphicsanchorlayout.cpp45
-rw-r--r--src/gui/graphicsview/qgraphicsanchorlayout_p.cpp2
-rw-r--r--src/gui/graphicsview/qgraphicsitem_p.h4
-rw-r--r--src/gui/graphicsview/qgraphicslayout.cpp4
-rw-r--r--src/gui/graphicsview/qgraphicslayout_p.h4
-rw-r--r--src/gui/graphicsview/qgraphicslayoutitem_p.h4
-rw-r--r--src/gui/graphicsview/qgraphicslinearlayout.cpp3
-rw-r--r--src/gui/graphicsview/qgraphicsproxywidget_p.h4
-rw-r--r--src/gui/graphicsview/qgraphicsscene_p.h4
-rw-r--r--src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h4
-rw-r--r--src/gui/graphicsview/qgraphicssceneevent.cpp8
-rw-r--r--src/gui/graphicsview/qgraphicssceneindex_p.h4
-rw-r--r--src/gui/graphicsview/qgraphicstransform_p.h4
-rw-r--r--src/gui/graphicsview/qgraphicsview_p.h4
-rw-r--r--src/gui/graphicsview/qgraphicswidget_p.h4
-rw-r--r--src/gui/graphicsview/qgridlayoutengine.cpp22
-rw-r--r--src/gui/graphicsview/qgridlayoutengine_p.h4
-rw-r--r--src/gui/graphicsview/qsimplex_p.cpp2
-rw-r--r--src/gui/image/qpixmap_qws.cpp5
-rw-r--r--src/gui/inputmethod/qinputcontext.cpp22
-rw-r--r--src/gui/inputmethod/qwininputcontext_p.h1
-rw-r--r--src/gui/inputmethod/qwininputcontext_win.cpp49
-rw-r--r--src/gui/inputmethod/qwsinputcontext_qws.cpp16
-rw-r--r--src/gui/itemviews/qabstractitemview.cpp3
-rw-r--r--src/gui/itemviews/qtablewidget.cpp2
-rw-r--r--src/gui/kernel/qapplication_p.h5
-rw-r--r--src/gui/kernel/qapplication_qws.cpp9
-rw-r--r--src/gui/kernel/qapplication_win.cpp25
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm11
-rw-r--r--src/gui/kernel/qevent.cpp57
-rw-r--r--src/gui/kernel/qevent_p.h2
-rw-r--r--src/gui/kernel/qsound_qws.cpp4
-rw-r--r--src/gui/kernel/qstandardgestures.cpp231
-rw-r--r--src/gui/kernel/qstandardgestures.h48
-rw-r--r--src/gui/kernel/qstandardgestures_p.h39
-rw-r--r--src/gui/kernel/qwidget.cpp26
-rw-r--r--src/gui/kernel/qwidget_mac.mm11
-rw-r--r--src/gui/painting/qbackingstore.cpp3
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp2
-rw-r--r--src/gui/painting/qpaintengineex_p.h3
-rw-r--r--src/gui/painting/qpainter.cpp42
-rw-r--r--src/gui/painting/qpainter.h3
-rw-r--r--src/gui/styles/qcommonstyle.cpp167
-rw-r--r--src/gui/styles/qcommonstyle_p.h3
-rw-r--r--src/gui/styles/qmacstyle_mac.mm13
-rw-r--r--src/gui/text/qfontengine_qpf.cpp3
-rw-r--r--src/gui/text/qfontengine_win.cpp4
-rw-r--r--src/gui/util/qsystemtrayicon_win.cpp9
-rw-r--r--src/gui/widgets/qabstractscrollarea.cpp2
-rw-r--r--src/gui/widgets/qlinecontrol_p.h2
-rw-r--r--src/gui/widgets/qlineedit.cpp2
-rw-r--r--src/gui/widgets/qlineedit.h1
-rw-r--r--src/gui/widgets/qlineedit_p.cpp8
-rw-r--r--src/gui/widgets/qlineedit_p.h2
-rw-r--r--src/gui/widgets/qmenu.cpp2
-rw-r--r--src/gui/widgets/qmenu_mac.mm13
-rw-r--r--src/gui/widgets/qplaintextedit.cpp4
-rw-r--r--src/gui/widgets/qtabbar.cpp16
-rw-r--r--src/gui/widgets/qtoolbar.cpp2
-rw-r--r--src/gui/widgets/qtoolbarlayout.cpp4
-rw-r--r--src/gui/widgets/qtoolbarlayout_p.h4
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp4
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo_alsa_p.h4
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp3
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo_win32_p.h4
-rw-r--r--src/multimedia/audio/qaudioinput_alsa_p.cpp3
-rw-r--r--src/multimedia/audio/qaudioinput_alsa_p.h4
-rw-r--r--src/multimedia/audio/qaudioinput_win32_p.cpp3
-rw-r--r--src/multimedia/audio/qaudioinput_win32_p.h4
-rw-r--r--src/multimedia/audio/qaudiooutput_alsa_p.cpp4
-rw-r--r--src/multimedia/audio/qaudiooutput_alsa_p.h4
-rw-r--r--src/multimedia/audio/qaudiooutput_win32_p.cpp4
-rw-r--r--src/multimedia/audio/qaudiooutput_win32_p.h4
-rw-r--r--src/multimedia/video/qimagevideobuffer.cpp4
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp32
-rw-r--r--src/network/access/qhttpnetworkconnection_p.h4
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp32
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel_p.h5
-rw-r--r--src/network/access/qhttpnetworkreply.cpp13
-rw-r--r--src/network/access/qhttpnetworkreply_p.h3
-rw-r--r--src/network/ssl/qsslsocket.cpp6
-rw-r--r--src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp2
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadermanager_p.h2
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadersource_p.h51
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp39
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h5
-rw-r--r--src/opengl/qglpixmapfilter.cpp3
-rw-r--r--src/opengl/qglshaderprogram.cpp86
-rw-r--r--src/opengl/qglshaderprogram.h20
-rw-r--r--src/opengl/qgraphicsshadereffect.cpp16
-rw-r--r--src/opengl/qgraphicsshadereffect.h4
-rw-r--r--src/opengl/qpaintengine_opengl.cpp8
-rw-r--r--src/opengl/util/fragmentprograms_p.h6883
-rw-r--r--src/opengl/util/generator.pro2
-rw-r--r--src/opengl/util/texture_brush.glsl2
-rw-r--r--src/openvg/qpaintengine_vg.cpp63
-rw-r--r--src/openvg/qpaintengine_vg_p.h3
-rw-r--r--src/plugins/gfxdrivers/directfb/directfb.pro3
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp19
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h1
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp194
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h12
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp258
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.h32
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp77
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h4
-rw-r--r--src/plugins/imageformats/jpeg/qjpeghandler.cpp11
-rw-r--r--src/script/api/qscriptengine.cpp4
-rw-r--r--src/script/api/qscriptvalue.cpp115
-rw-r--r--src/script/api/qscriptvalue_p.h8
-rw-r--r--src/script/bridge/qscriptglobalobject.cpp9
-rw-r--r--src/script/bridge/qscriptglobalobject_p.h4
-rw-r--r--src/script/bridge/qscriptvariant.cpp2
-rw-r--r--src/script/script.pro3
-rw-r--r--src/sql/drivers/odbc/qsql_odbc.cpp54
-rw-r--r--src/svg/qsvgtinydocument.cpp4
-rw-r--r--src/xml/dom/qdom.cpp6
-rw-r--r--src/xmlpatterns/parser/qquerytransformparser_p.h51
-rw-r--r--tests/auto/gestures/customgesturerecognizer.h41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/backslashes/src/main.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecforsrc/main.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecforsrc/project.ts.result4
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecfortr/main.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecfortr/project.ts.result2
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecfortr1/main.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecfortr1/project.ts.result8
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecfortr2/main.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecfortr2/project.ts.result8
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/lacksqobject/main.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/lacksqobject/project.ts.result8
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/merge_ordering/foo.cpp40
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/merge_ordering/project.ts.before26
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/merge_ordering/project.ts.result2
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/merge_whitespace/main.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.before18
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.result20
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/mergecpp/finddialog.cpp42
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.before12
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.result12
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/finddialog.cpp108
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.before10
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/finddialog.cpp137
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.before8
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/multiple_locations/finddialog.cpp40
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/multiple_locations/main.cpp40
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/multiple_locations/project.ts.result6
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/namespaces/main.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result24
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parse_special_chars/main.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parse_special_chars/project.ts.result4
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecontexts/main.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecontexts/project.ts.result48
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result56
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsejava/main.java41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsejava/project.ts.result32
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/prefix/main.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/prefix/project.ts.result6
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/preprocess/main.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/preprocess/project.ts.result10
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing/main.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing/main_mac.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing/main_unix.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing/main_win.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing/project.ts.result18
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing/vpaths/dependpath/main_dependpath.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard/main1.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard/mainfile.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard1.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard99.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing2/a41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing2/a.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing2/b41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing2/b.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing2/e41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing2/f/g.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing2/project.ts.result22
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing2/spaces/z41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing2/variable_with_spaces41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing2/with41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing2/x/d41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing2/x/variable41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsingpaths/file1.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsingpaths/filter.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsingpaths/project.ts.result8
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/subfile1.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/subfilter.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsingpri/common/main.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsingpri/mac/main_mac.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsingpri/project.ts.result10
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsingpri/relativity/relativity.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsingpri/unix/main_unix.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsingpri/win/main_win.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsingsubdirs/project.ts.result2
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsingsubdirs/sub1/main.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsingsubs/common/main.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsingsubs/mac/main_mac.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsingsubs/project.ts.result8
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsingsubs/unix/main_unix.cpp41
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsingsubs/win/main_win.cpp41
-rw-r--r--tests/auto/mediaobject/dummy/audiooutput.h41
-rw-r--r--tests/auto/mediaobject/dummy/backend.h41
-rw-r--r--tests/auto/mediaobject/dummy/mediaobject.h41
-rw-r--r--tests/auto/mediaobject/dummy/videowidget.h41
-rw-r--r--tests/auto/qabstractitemmodel/dynamictreemodel.cpp245
-rw-r--r--tests/auto/qabstractitemmodel/dynamictreemodel.h141
-rw-r--r--tests/auto/qabstractitemmodel/qabstractitemmodel.pro5
-rw-r--r--tests/auto/qabstractitemmodel/tst_qabstractitemmodel.cpp841
-rw-r--r--tests/auto/qbytearray/tst_qbytearray.cpp54
-rw-r--r--tests/auto/qcombobox/tst_qcombobox.cpp50
-rw-r--r--tests/auto/qgl/tst_qgl.cpp114
-rw-r--r--tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp41
-rw-r--r--tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp25
-rw-r--r--tests/auto/qgraphicsview/tst_qgraphicsview.cpp60
-rw-r--r--tests/auto/qlineedit/tst_qlineedit.cpp27
-rw-r--r--tests/auto/qmainwindow/tst_qmainwindow.cpp26
-rw-r--r--tests/auto/qobject/tst_qobject.cpp94
-rw-r--r--tests/auto/qpixmapfilter/tst_qpixmapfilter.cpp43
-rw-r--r--tests/auto/qscriptclass/tst_qscriptclass.cpp1
-rw-r--r--tests/auto/qscriptengine/tst_qscriptengine.cpp25
-rw-r--r--tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp47
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue.cpp34
-rw-r--r--tests/auto/qsqldriver/tst_qsqldriver.cpp14
-rw-r--r--tests/auto/qtabbar/tst_qtabbar.cpp34
-rw-r--r--tests/auto/qtreeview/tst_qtreeview.cpp29
-rw-r--r--tests/auto/symbian/qsymbiantests.pro4
-rw-r--r--tests/auto/windowsmobile/test/ddhelper.h41
-rw-r--r--tests/auto/xmlpatternsview/view/FunctionSignaturesView.h41
-rw-r--r--tests/auto/xmlpatternsview/view/MainWindow.h41
-rw-r--r--tests/auto/xmlpatternsview/view/TestCaseView.h41
-rw-r--r--tests/auto/xmlpatternsview/view/TestResultView.h41
-rw-r--r--tests/auto/xmlpatternsview/view/TreeSortFilter.h41
-rw-r--r--tests/auto/xmlpatternsview/view/UserTestCase.h41
-rw-r--r--tests/auto/xmlpatternsview/view/XDTItemItem.h41
-rw-r--r--tests/auto/xmlpatternsxqts/lib/ErrorHandler.h41
-rw-r--r--tests/auto/xmlpatternsxqts/lib/ErrorItem.h41
-rw-r--r--tests/auto/xmlpatternsxqts/lib/ExitCode.h41
-rw-r--r--tests/auto/xmlpatternsxqts/lib/ExpressionInfo.h41
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TestContainer.h41
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TestGroup.h41
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TestItem.h41
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TestSuite.h41
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TestSuiteResult.h41
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TreeItem.h41
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TreeModel.h41
-rw-r--r--tests/auto/xmlpatternsxqts/lib/XSLTTestSuiteHandler.h41
-rw-r--r--tests/auto/xmlpatternsxqts/lib/tests/XMLWriterTest.h41
-rw-r--r--tests/benchmarks/qanimation/dummyanimation.h43
-rw-r--r--tests/benchmarks/qanimation/dummyobject.h43
-rw-r--r--tests/benchmarks/qanimation/rectanimation.h41
-rw-r--r--tests/benchmarks/qscriptvalue/tst_qscriptvalue.cpp12
-rw-r--r--tests/manual/qimagereader/Qt_logostrap_CMYK.jpgbin0 -> 252255 bytes
-rw-r--r--tests/manual/qimagereader/main.cpp99
-rw-r--r--tests/manual/qimagereader/qimagereader.pro8
-rw-r--r--tests/manual/qtabletevent/tabletwidget.h41
-rw-r--r--tests/manual/qtouchevent/touchwidget.h41
-rw-r--r--tools/linguist/tests/tst_linguist.h41
-rw-r--r--tools/xmlpatterns/main.h17
-rw-r--r--tools/xmlpatterns/qcoloringmessagehandler_p.h17
-rw-r--r--tools/xmlpatterns/qcoloroutput_p.h17
-rw-r--r--util/qlalr/examples/qparser/qparser.h41
327 files changed, 11275 insertions, 6040 deletions
diff --git a/demos/browser/networkaccessmanager.cpp b/demos/browser/networkaccessmanager.cpp
index 3ce9c08..1e6dffd 100644
--- a/demos/browser/networkaccessmanager.cpp
+++ b/demos/browser/networkaccessmanager.cpp
@@ -106,10 +106,13 @@ void NetworkAccessManager::requestFinished(QNetworkReply *reply)
if (reply->attribute(QNetworkRequest::ConnectionEncryptedAttribute).toBool() == true)
requestFinishedSecureCount++;
+ if (requestFinishedCount % 10)
+ return;
+
double pctCached = (double(requestFinishedFromCacheCount) * 100.0/ double(requestFinishedCount));
double pctPipelined = (double(requestFinishedPipelinedCount) * 100.0/ double(requestFinishedCount));
double pctSecure = (double(requestFinishedSecureCount) * 100.0/ double(requestFinishedCount));
- qDebug("%lli requests [%3.2f%% from cache] [%3.2f%% pipelined] [%3.2f%% SSL/TLS]", requestFinishedCount, pctCached, pctPipelined, pctSecure);
+ qDebug("STATS [%lli requests total] [%3.2f%% from cache] [%3.2f%% pipelined] [%3.2f%% SSL/TLS]", requestFinishedCount, pctCached, pctPipelined, pctSecure);
}
diff --git a/demos/deform/pathdeform.cpp b/demos/deform/pathdeform.cpp
index 5530010..07c7829 100644
--- a/demos/deform/pathdeform.cpp
+++ b/demos/deform/pathdeform.cpp
@@ -53,11 +53,6 @@
#include <QDesktopWidget>
#include <qmath.h>
-#if defined(Q_OS_SYMBIAN)
-// TODO: Remove all FONT_OUTLINE_TWEAK related code as soon as the S60FontEngine can deliver outlines
-#define FONT_OUTLINE_TWEAK
-#endif
-
PathDeformControls::PathDeformControls(QWidget *parent, PathDeformRenderer* renderer, bool smallScreen)
: QWidget(parent)
{
@@ -246,13 +241,6 @@ void PathDeformControls::layoutForSmallScreen()
QRect screen_size = QApplication::desktop()->screenGeometry();
radiusSlider->setValue(qMin(screen_size.width(), screen_size.height())/5);
-#ifdef FONT_OUTLINE_TWEAK
- radiusSlider->setValue(qMin(screen_size.width(), screen_size.height())/7);
- fontSizeLabel->setText("Qt Logo Size:");
- m_renderer->setText("A"); // Any Letter would be fine
- fontSizeSlider->setValue(100);
-#endif
-
m_renderer->setText(tr("Qt"));
}
diff --git a/dist/changes-4.6.0 b/dist/changes-4.6.0
index 8c2c2c8..194d670 100644
--- a/dist/changes-4.6.0
+++ b/dist/changes-4.6.0
@@ -49,10 +49,13 @@ information about a particular change.
this is that Nokia focuses on OpenGL for desktop hardware accelerated
rendering.
- - When mixing OpenGL and QPainter calls you need to first call syncState()
- on the paint engine, for example "painter->paintEngine()->syncState()".
- This is to ensure that the engine flushes any pending drawing and sets up
- the GL modelview/projection matrices properly.
+ - When mixing OpenGL and QPainter calls you need to surround your custom
+ OpenGL calls with QPainter::beginNativePainting() and
+ QPainter::endNativePainting().
+ This is to ensure that the paint engine flushes any pending drawing and sets
+ up the GL modelview/projection matrices properly before you can issue custom
+ OpenGL calls, and to let the paint engine synchronize to the painter state
+ before resuming regular QPainter based drawing.
- Graphics View has undergone heavy optimization work, and as a result of
this work, the following behavior changes were introduced.
diff --git a/doc/src/examples/overpainting.qdoc b/doc/src/examples/overpainting.qdoc
index 91100c0..b19b503 100644
--- a/doc/src/examples/overpainting.qdoc
+++ b/doc/src/examples/overpainting.qdoc
@@ -159,9 +159,10 @@
\snippet examples/opengl/overpainting/glwidget.cpp 7
- Once the list containing the object has been executed, the matrix stack
- needs to be restored to its original state at the start of this function
- before we can begin overpainting:
+ Once the list containing the object has been executed, the GL
+ states we changed and the matrix stack needs to be restored to its
+ original state at the start of this function before we can begin
+ overpainting:
\snippet examples/opengl/overpainting/glwidget.cpp 8
diff --git a/doc/src/frameworks-technologies/graphicsview.qdoc b/doc/src/frameworks-technologies/graphicsview.qdoc
index 8d7ea2c..397cb19 100644
--- a/doc/src/frameworks-technologies/graphicsview.qdoc
+++ b/doc/src/frameworks-technologies/graphicsview.qdoc
@@ -551,4 +551,24 @@
the widget is transformed resolution independently, allowing the
fonts and style to stay crisp when zoomed in. (Note that the effect
of resolution independence depends on the style.)
+
+ \section1 Performance
+
+ \section2 Floating Point Instructions
+
+ In order to accurately and quickly apply transformations and effects to
+ items, Graphics View is built with the assumption that the user's hardware
+ is able to provide reasonable performance for floating point instructions.
+
+ Many workstations and desktop computers are equipped with suitable hardware
+ to accelerate this kind of computation, but some embedded devices may only
+ provide libraries to handle mathematical operations or emulate floating
+ point instructions in software.
+
+ As a result, certain kinds of effects may be slower than expected on certain
+ devices. It may be possible to compensate for this performance hit by making
+ optimizations in other areas; for example, by using \l{#OpenGL Rendering}{OpenGL}
+ to render a scene. However, any such optimizations may themselves cause a
+ reduction in performance if they also rely on the presence of floating point
+ hardware.
*/
diff --git a/doc/src/images/graphicseffect-blur.png b/doc/src/images/graphicseffect-blur.png
new file mode 100644
index 0000000..3fa403b
--- /dev/null
+++ b/doc/src/images/graphicseffect-blur.png
Binary files differ
diff --git a/doc/src/images/graphicseffect-colorize.png b/doc/src/images/graphicseffect-colorize.png
new file mode 100644
index 0000000..96fbfe4
--- /dev/null
+++ b/doc/src/images/graphicseffect-colorize.png
Binary files differ
diff --git a/doc/src/images/graphicseffect-drop-shadow.png b/doc/src/images/graphicseffect-drop-shadow.png
new file mode 100644
index 0000000..c02415a
--- /dev/null
+++ b/doc/src/images/graphicseffect-drop-shadow.png
Binary files differ
diff --git a/doc/src/images/graphicseffect-effects.png b/doc/src/images/graphicseffect-effects.png
new file mode 100644
index 0000000..422ae19
--- /dev/null
+++ b/doc/src/images/graphicseffect-effects.png
Binary files differ
diff --git a/doc/src/images/graphicseffect-grayscale.png b/doc/src/images/graphicseffect-grayscale.png
new file mode 100644
index 0000000..2bd0c93
--- /dev/null
+++ b/doc/src/images/graphicseffect-grayscale.png
Binary files differ
diff --git a/doc/src/images/graphicseffect-opacity.png b/doc/src/images/graphicseffect-opacity.png
new file mode 100644
index 0000000..de15859
--- /dev/null
+++ b/doc/src/images/graphicseffect-opacity.png
Binary files differ
diff --git a/doc/src/images/graphicseffect-pixelize.png b/doc/src/images/graphicseffect-pixelize.png
new file mode 100644
index 0000000..047c452
--- /dev/null
+++ b/doc/src/images/graphicseffect-pixelize.png
Binary files differ
diff --git a/doc/src/images/graphicseffect-widget.png b/doc/src/images/graphicseffect-widget.png
new file mode 100644
index 0000000..27245d1
--- /dev/null
+++ b/doc/src/images/graphicseffect-widget.png
Binary files differ
diff --git a/doc/src/platforms/emb-displaymanagement.qdoc b/doc/src/platforms/emb-displaymanagement.qdoc
index 8a743b1..05267c1 100644
--- a/doc/src/platforms/emb-displaymanagement.qdoc
+++ b/doc/src/platforms/emb-displaymanagement.qdoc
@@ -152,7 +152,7 @@
\row
\o \c offset=<x,y>
\o Multi
- \o Specifies the coordinates of a subscreens top-left corner
+ \o Specifies the coordinates of a subscreen's top-left corner
(by default 0,0).
\endtable
diff --git a/doc/src/snippets/animation/sequential/tracer.h b/doc/src/snippets/animation/sequential/tracer.h
index 1adb018..ff3b089 100644
--- a/doc/src/snippets/animation/sequential/tracer.h
+++ b/doc/src/snippets/animation/sequential/tracer.h
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
#ifndef TRACER_H
#define TRACER_H
diff --git a/doc/src/snippets/code/src_corelib_kernel_qobject.cpp b/doc/src/snippets/code/src_corelib_kernel_qobject.cpp
index 5c0f80c..a02d4e9 100644
--- a/doc/src/snippets/code/src_corelib_kernel_qobject.cpp
+++ b/doc/src/snippets/code/src_corelib_kernel_qobject.cpp
@@ -39,10 +39,10 @@ timer->inherits("QTimer"); // returns true
timer->inherits("QObject"); // returns true
timer->inherits("QAbstractButton"); // returns false
-// QLayout inherits QObject and QLayoutItem
-QLayout *layout = new QLayout;
+// QVBoxLayout inherits QObject and QLayoutItem
+QVBoxLayout *layout = new QVBoxLayout;
layout->inherits("QObject"); // returns true
-layout->inherits("QLayoutItem"); // returns false
+layout->inherits("QLayoutItem"); // returns true (even though QLayoutItem is not a QObject)
//! [4]
diff --git a/doc/src/snippets/signalmapper/filereader.h b/doc/src/snippets/signalmapper/filereader.h
index a3be088..d8ceb2e 100644
--- a/doc/src/snippets/signalmapper/filereader.h
+++ b/doc/src/snippets/signalmapper/filereader.h
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
#ifndef FILEREADER_H
#define FILEREADER_H
diff --git a/examples/effects/blurpicker/blureffect.cpp b/examples/effects/blurpicker/blureffect.cpp
index f0fde49..0b806aa 100644
--- a/examples/effects/blurpicker/blureffect.cpp
+++ b/examples/effects/blurpicker/blureffect.cpp
@@ -52,7 +52,7 @@ BlurEffect::BlurEffect(QGraphicsItem *item)
void BlurEffect::adjustForItem()
{
qreal y = m_baseLine - item->pos().y();
- qreal radius = qBound(0.0, y / 32, 16.0);
+ qreal radius = qBound(qreal(0.0), y / 32, qreal(16.0));
setBlurRadius(radius);
}
diff --git a/examples/effects/customshader/blureffect.cpp b/examples/effects/customshader/blureffect.cpp
index 8e2a1fe..9923324 100644
--- a/examples/effects/customshader/blureffect.cpp
+++ b/examples/effects/customshader/blureffect.cpp
@@ -52,7 +52,7 @@ BlurEffect::BlurEffect(QGraphicsItem *item)
void BlurEffect::adjustForItem()
{
qreal y = m_baseLine - item->pos().y();
- qreal radius = qBound(0.0, y / 32, 16.0);
+ qreal radius = qBound(qreal(0.0), y / 32, qreal(16.0));
setBlurRadius(radius);
}
diff --git a/examples/effects/customshader/customshadereffect.cpp b/examples/effects/customshader/customshadereffect.cpp
index 08e4324..69fdb15 100644
--- a/examples/effects/customshader/customshadereffect.cpp
+++ b/examples/effects/customshader/customshadereffect.cpp
@@ -44,7 +44,7 @@
static char const colorizeShaderCode[] =
"uniform lowp vec4 effectColor;\n"
- "mediump vec4 customShader(sampler2D imageTexture, vec2 textureCoords) {\n"
+ "mediump vec4 customShader(lowp sampler2D imageTexture, highp vec2 textureCoords) {\n"
" vec4 src = texture2D(imageTexture, textureCoords);\n"
" float gray = dot(src.rgb, vec3(0.212671, 0.715160, 0.072169));\n"
" vec4 colorize = 1.0-((1.0-gray)*(1.0-effectColor));\n"
diff --git a/examples/gestures/imageviewer/imagewidget.cpp b/examples/gestures/imageviewer/imagewidget.cpp
index 1285e9a..6803d84 100644
--- a/examples/gestures/imageviewer/imagewidget.cpp
+++ b/examples/gestures/imageviewer/imagewidget.cpp
@@ -44,207 +44,106 @@
#include <QtGui>
ImageWidget::ImageWidget(QWidget *parent)
- : QWidget(parent)
-{
- setAttribute(Qt::WA_AcceptTouchEvents);
- setAttribute(Qt::WA_PaintOnScreen);
- setAttribute(Qt::WA_OpaquePaintEvent);
- setAttribute(Qt::WA_NoSystemBackground);
+ : QWidget(parent),
+ position(0),
+ horizontalOffset(0),
+ verticalOffset(0),
+ rotationAngle(0),
+ scaleFactor(1)
+{
setObjectName("ImageWidget");
-
setMinimumSize(QSize(100,100));
- position = 0;
- zoomed = rotated = false;
+ setAttribute(Qt::WA_PaintOnScreen);
+ setAttribute(Qt::WA_OpaquePaintEvent);
+ setAttribute(Qt::WA_NoSystemBackground);
- zoomedIn = false;
- horizontalOffset = 0;
- verticalOffset = 0;
+ QGesture *panGesture = new QPanGesture(this);
+ connect(panGesture, SIGNAL(started()), this, SLOT(panTriggered()));
+ connect(panGesture, SIGNAL(finished()), this, SLOT(panTriggered()));
+ connect(panGesture, SIGNAL(cancelled()), this, SLOT(panTriggered()));
+ connect(panGesture, SIGNAL(triggered()), this, SLOT(panTriggered()));
- panGesture = new QPanGesture(this);
- connect(panGesture, SIGNAL(triggered()), this, SLOT(gestureTriggered()));
+ QGesture *pinchGesture = new QPinchGesture(this);
+ connect(pinchGesture, SIGNAL(started()), this, SLOT(pinchTriggered()));
+ connect(pinchGesture, SIGNAL(finished()), this, SLOT(pinchTriggered()));
+ connect(pinchGesture, SIGNAL(cancelled()), this, SLOT(pinchTriggered()));
+ connect(pinchGesture, SIGNAL(triggered()), this, SLOT(pinchTriggered()));
- tapAndHoldGesture = new TapAndHoldGesture(this);
- connect(tapAndHoldGesture, SIGNAL(triggered()), this, SLOT(gestureTriggered()));
- connect(tapAndHoldGesture, SIGNAL(finished()), this, SLOT(gestureTriggered()));
+ QGesture *swipeGesture = new QSwipeGesture(this);
+ connect(swipeGesture, SIGNAL(triggered()), this, SLOT(swipeTriggered()));
}
void ImageWidget::paintEvent(QPaintEvent*)
{
QPainter p(this);
- if (currentImage.isNull()) {
- p.fillRect(geometry(), Qt::white);
- return;
- }
- int hoffset = 0;
- int voffset = 0;
- const int w = pixmap.width();
- const int h = pixmap.height();
- p.save();
- if (zoomedIn) {
- hoffset = horizontalOffset;
- voffset = verticalOffset;
- if (horizontalOffset > 0)
- p.fillRect(0, 0, horizontalOffset, height(), Qt::white);
- if (verticalOffset > 0)
- p.fillRect(0, 0, width(), verticalOffset, Qt::white);
- }
- p.drawPixmap(hoffset, voffset, pixmap);
- if (hoffset + w < width())
- p.fillRect(hoffset + w, 0, width() - w - hoffset, height(), Qt::white);
- if (voffset + h < height())
- p.fillRect(0, voffset + h, width(), height() - h - voffset, Qt::white);
-
- // paint touch feedback
- if (touchFeedback.tapped || touchFeedback.doubleTapped) {
- p.setPen(QPen(Qt::gray, 2));
- p.drawEllipse(touchFeedback.position, 5, 5);
- if (touchFeedback.doubleTapped) {
- p.setPen(QPen(Qt::darkGray, 2, Qt::DotLine));
- p.drawEllipse(touchFeedback.position, 15, 15);
- } else if (touchFeedback.tapAndHoldState != 0) {
- QPoint pts[8] = {
- touchFeedback.position + QPoint( 0, -15),
- touchFeedback.position + QPoint( 10, -10),
- touchFeedback.position + QPoint( 15, 0),
- touchFeedback.position + QPoint( 10, 10),
- touchFeedback.position + QPoint( 0, 15),
- touchFeedback.position + QPoint(-10, 10),
- touchFeedback.position + QPoint(-15, 0)
- };
- for (int i = 0; i < touchFeedback.tapAndHoldState/5; ++i)
- p.drawEllipse(pts[i], 3, 3);
- }
- } else if (touchFeedback.sliding) {
- p.setPen(QPen(Qt::red, 3));
- QPoint endPos = QPoint(touchFeedback.position.x(), touchFeedback.slidingStartPosition.y());
- p.drawLine(touchFeedback.slidingStartPosition, endPos);
- int dx = 10;
- if (touchFeedback.slidingStartPosition.x() < endPos.x())
- dx = -1*dx;
- p.drawLine(endPos, endPos + QPoint(dx, 5));
- p.drawLine(endPos, endPos + QPoint(dx, -5));
- }
+ p.fillRect(rect(), Qt::white);
- for (int i = 0; i < TouchFeedback::MaximumNumberOfTouches; ++i) {
- if (touchFeedback.touches[i].isNull())
- break;
- p.drawEllipse(touchFeedback.touches[i], 10, 10);
- }
- p.restore();
-}
+ float iw = currentImage.width();
+ float ih = currentImage.height();
+ float wh = height();
+ float ww = width();
-void ImageWidget::mousePressEvent(QMouseEvent *event)
-{
- touchFeedback.tapped = true;
- touchFeedback.position = event->pos();
+ p.translate(ww/2, wh/2);
+ p.translate(horizontalOffset, verticalOffset);
+ p.rotate(rotationAngle);
+ p.scale(scaleFactor, scaleFactor);
+ p.translate(-iw/2, -ih/2);
+ p.drawImage(0, 0, currentImage);
}
-void ImageWidget::mouseDoubleClickEvent(QMouseEvent *event)
+void ImageWidget::mouseDoubleClickEvent(QMouseEvent *)
{
- touchFeedback.doubleTapped = true;
- const QPoint p = event->pos();
- touchFeedback.position = p;
- horizontalOffset = p.x() - currentImage.width()*1.0*p.x()/width();
- verticalOffset = p.y() - currentImage.height()*1.0*p.y()/height();
- setZoomedIn(!zoomedIn);
- zoomed = rotated = false;
- updateImage();
-
- feedbackFadeOutTimer.start(500, this);
+ rotationAngle = 0;
+ scaleFactor = 1;
+ verticalOffset = 0;
+ horizontalOffset = 0;
+ update();
}
-void ImageWidget::gestureTriggered()
+void ImageWidget::panTriggered()
{
- if (sender() == panGesture) {
- touchFeedback.tapped = false;
- touchFeedback.doubleTapped = false;
- QPanGesture *pg = qobject_cast<QPanGesture*>(sender());
- if (zoomedIn) {
+ QPanGesture *pg = qobject_cast<QPanGesture*>(sender());
#ifndef QT_NO_CURSOR
- switch (pg->state()) {
- case Qt::GestureStarted:
- case Qt::GestureUpdated:
- setCursor(Qt::SizeAllCursor);
- break;
- default:
- setCursor(Qt::ArrowCursor);
- }
-#endif
- horizontalOffset += pg->lastOffset().width();
- verticalOffset += pg->lastOffset().height();
- } else {
- // only slide gesture should be accepted
- if (pg->state() == Qt::GestureFinished) {
- touchFeedback.sliding = false;
- zoomed = rotated = false;
- if (pg->totalOffset().width() > 0)
- goNextImage();
- else
- goPrevImage();
- updateImage();
- }
- }
- update();
- feedbackFadeOutTimer.start(500, this);
- } else if (sender() == tapAndHoldGesture) {
- if (tapAndHoldGesture->state() == Qt::GestureFinished) {
- qDebug() << "tap and hold detected";
- touchFeedback.reset();
- update();
-
- QMenu menu;
- menu.addAction("Action 1");
- menu.addAction("Action 2");
- menu.addAction("Action 3");
- menu.exec(mapToGlobal(tapAndHoldGesture->pos()));
- } else {
- ++touchFeedback.tapAndHoldState;
- update();
- }
- feedbackFadeOutTimer.start(500, this);
+ switch (pg->state()) {
+ case Qt::GestureStarted:
+ case Qt::GestureUpdated:
+ setCursor(Qt::SizeAllCursor);
+ break;
+ default:
+ setCursor(Qt::ArrowCursor);
}
+#endif
+ horizontalOffset += pg->lastOffset().width();
+ verticalOffset += pg->lastOffset().height();
+ update();
}
-void ImageWidget::gestureFinished()
+void ImageWidget::pinchTriggered()
{
- qDebug() << "gesture finished" << sender();
+ QPinchGesture *pg = qobject_cast<QPinchGesture*>(sender());
+ rotationAngle += pg->rotationAngle();
+ scaleFactor += pg->scaleFactor();
+ update();
}
-void ImageWidget::gestureCancelled()
+void ImageWidget::swipeTriggered()
{
- qDebug() << "gesture cancelled" << sender();
-}
+ QSwipeGesture *pg = qobject_cast<QSwipeGesture*>(sender());
+ qDebug() << (int) pg->horizontalDirection();
+ qDebug() << pg->swipeAngle();
-void ImageWidget::resizeEvent(QResizeEvent*)
-{
- updateImage();
+ if (pg->horizontalDirection() == QSwipeGesture::Left
+ || pg->verticalDirection() == QSwipeGesture::Up)
+ goPrevImage();
+ else
+ goNextImage();
+ update();
}
-void ImageWidget::updateImage()
+void ImageWidget::resizeEvent(QResizeEvent*)
{
- // should use qtconcurrent here?
- transformation = QTransform();
- if (zoomedIn) {
- } else {
- if (currentImage.isNull())
- return;
- if (zoomed) {
- transformation = transformation.scale(zoom, zoom);
- } else {
- double xscale = (double)width()/currentImage.width();
- double yscale = (double)height()/currentImage.height();
- if (xscale < yscale)
- yscale = xscale;
- else
- xscale = yscale;
- transformation = transformation.scale(xscale, yscale);
- }
- if (rotated)
- transformation = transformation.rotate(angle);
- }
- pixmap = QPixmap::fromImage(currentImage).transformed(transformation);
update();
}
@@ -258,7 +157,7 @@ void ImageWidget::openDirectory(const QString &path)
position = 0;
goToImage(0);
- updateImage();
+ update();
}
QImage ImageWidget::loadImage(const QString &fileName)
@@ -268,6 +167,7 @@ QImage ImageWidget::loadImage(const QString &fileName)
qDebug() << fileName << ": can't load image";
return QImage();
}
+
QImage image;
if (!reader.read(&image)) {
qDebug() << fileName << ": corrupted image";
@@ -276,15 +176,11 @@ QImage ImageWidget::loadImage(const QString &fileName)
return image;
}
-void ImageWidget::setZoomedIn(bool zoomed)
-{
- zoomedIn = zoomed;
-}
-
void ImageWidget::goNextImage()
{
if (files.isEmpty())
return;
+
if (position < files.size()-1) {
++position;
prevImage = currentImage;
@@ -294,14 +190,14 @@ void ImageWidget::goNextImage()
else
nextImage = QImage();
}
- setZoomedIn(false);
- updateImage();
+ update();
}
void ImageWidget::goPrevImage()
{
if (files.isEmpty())
return;
+
if (position > 0) {
--position;
nextImage = currentImage;
@@ -311,28 +207,31 @@ void ImageWidget::goPrevImage()
else
prevImage = QImage();
}
- setZoomedIn(false);
- updateImage();
+ update();
}
void ImageWidget::goToImage(int index)
{
if (files.isEmpty())
return;
+
if (index < 0 || index >= files.size()) {
qDebug() << "goToImage: invalid index: " << index;
return;
}
+
if (index == position+1) {
goNextImage();
return;
}
+
if (position > 0 && index == position-1) {
goPrevImage();
return;
}
+
position = index;
- pixmap = QPixmap();
+
if (index > 0)
prevImage = loadImage(path+QLatin1String("/")+files.at(position-1));
else
@@ -342,18 +241,6 @@ void ImageWidget::goToImage(int index)
nextImage = loadImage(path+QLatin1String("/")+files.at(position+1));
else
nextImage = QImage();
- setZoomedIn(false);
- updateImage();
-}
-
-void ImageWidget::timerEvent(QTimerEvent *event)
-{
- if (event->timerId() == touchFeedback.tapTimer.timerId()) {
- touchFeedback.tapTimer.stop();
- } else if (event->timerId() == feedbackFadeOutTimer.timerId()) {
- feedbackFadeOutTimer.stop();
- touchFeedback.reset();
- }
update();
}
diff --git a/examples/gestures/imageviewer/imagewidget.h b/examples/gestures/imageviewer/imagewidget.h
index 588e59b..b20d8ad 100644
--- a/examples/gestures/imageviewer/imagewidget.h
+++ b/examples/gestures/imageviewer/imagewidget.h
@@ -44,12 +44,8 @@
#include <QWidget>
#include <QImage>
-#include <QPixmap>
-
#include <QtGui>
-#include "tapandholdgesture.h"
-
class ImageWidget : public QWidget
{
Q_OBJECT
@@ -62,74 +58,32 @@ public:
protected:
void paintEvent(QPaintEvent*);
void resizeEvent(QResizeEvent*);
- void timerEvent(QTimerEvent*);
- void mousePressEvent(QMouseEvent*);
void mouseDoubleClickEvent(QMouseEvent*);
private slots:
- void gestureTriggered();
- void gestureFinished();
- void gestureCancelled();
+ void panTriggered();
+ void pinchTriggered();
+ void swipeTriggered();
private:
void updateImage();
QImage loadImage(const QString &fileName);
void loadImage();
- void setZoomedIn(bool zoomed);
void goNextImage();
void goPrevImage();
void goToImage(int index);
- QPanGesture *panGesture;
- TapAndHoldGesture *tapAndHoldGesture;
-
QString path;
QStringList files;
int position;
QImage prevImage, nextImage;
QImage currentImage;
- QPixmap pixmap;
- QTransform transformation;
-
- bool zoomedIn;
- int horizontalOffset;
- int verticalOffset;
-
- bool zoomed;
- qreal zoom;
- bool rotated;
- qreal angle;
-
- struct TouchFeedback
- {
- bool tapped;
- QPoint position;
- bool sliding;
- QPoint slidingStartPosition;
- QBasicTimer tapTimer;
- int tapState;
- bool doubleTapped;
- int tapAndHoldState;
-
- enum { MaximumNumberOfTouches = 5 };
- QPoint touches[MaximumNumberOfTouches];
- inline TouchFeedback() { reset(); }
- inline void reset()
- {
- tapped = false;
- sliding = false;
- tapTimer.stop();
- tapState = 0;
- doubleTapped = false;
- tapAndHoldState = 0;
- for (int i = 0; i < MaximumNumberOfTouches; ++i) {
- touches[i] = QPoint();
- }
- }
- } touchFeedback;
- QBasicTimer feedbackFadeOutTimer;
+ float horizontalOffset;
+ float verticalOffset;
+ float rotationAngle;
+ float scaleFactor;
};
#endif
diff --git a/examples/gestures/imageviewer/tapandholdgesture.cpp b/examples/gestures/imageviewer/tapandholdgesture.cpp
index 27458ce..fffe10f 100644
--- a/examples/gestures/imageviewer/tapandholdgesture.cpp
+++ b/examples/gestures/imageviewer/tapandholdgesture.cpp
@@ -72,8 +72,6 @@ TapAndHoldGesture::TapAndHoldGesture(QWidget *parent)
/*! \internal */
bool TapAndHoldGesture::filterEvent(QEvent *event)
{
- if (!event->spontaneous())
- return false;
const QTouchEvent *ev = static_cast<const QTouchEvent*>(event);
switch (event->type()) {
case QEvent::TouchBegin: {
diff --git a/examples/graphicsview/anchorlayout/main.cpp b/examples/graphicsview/anchorlayout/main.cpp
index 7fb04be..ce6e937 100644
--- a/examples/graphicsview/anchorlayout/main.cpp
+++ b/examples/graphicsview/anchorlayout/main.cpp
@@ -66,17 +66,17 @@ int main(int argc, char **argv)
QGraphicsScene scene;
scene.setSceneRect(0, 0, 800, 480);
- QSizeF min(30, 100);
- QSizeF pref(210, 100);
- QSizeF max(300, 100);
-
- QGraphicsProxyWidget *a = createItem(min, pref, max, "A");
- QGraphicsProxyWidget *b = createItem(min, pref, max, "B");
- QGraphicsProxyWidget *c = createItem(min, pref, max, "C");
- QGraphicsProxyWidget *d = createItem(min, pref, max, "D");
- QGraphicsProxyWidget *e = createItem(min, pref, max, "E");
- QGraphicsProxyWidget *f = createItem(QSizeF(30, 50), QSizeF(150, 50), max, "F");
- QGraphicsProxyWidget *g = createItem(QSizeF(30, 50), QSizeF(30, 100), max, "G");
+ QSizeF minSize(30, 100);
+ QSizeF prefSize(210, 100);
+ QSizeF maxSize(300, 100);
+
+ QGraphicsProxyWidget *a = createItem(minSize, prefSize, maxSize, "A");
+ QGraphicsProxyWidget *b = createItem(minSize, prefSize, maxSize, "B");
+ QGraphicsProxyWidget *c = createItem(minSize, prefSize, maxSize, "C");
+ QGraphicsProxyWidget *d = createItem(minSize, prefSize, maxSize, "D");
+ QGraphicsProxyWidget *e = createItem(minSize, prefSize, maxSize, "E");
+ QGraphicsProxyWidget *f = createItem(QSizeF(30, 50), QSizeF(150, 50), maxSize, "F");
+ QGraphicsProxyWidget *g = createItem(QSizeF(30, 50), QSizeF(30, 100), maxSize, "G");
QGraphicsAnchorLayout *l = new QGraphicsAnchorLayout;
diff --git a/examples/opengl/framebufferobject/bubbles.svg b/examples/opengl/framebufferobject/bubbles.svg
index 65867da..5173012 100644
--- a/examples/opengl/framebufferobject/bubbles.svg
+++ b/examples/opengl/framebufferobject/bubbles.svg
@@ -72,7 +72,7 @@
<radialGradient id="shadowGrad" gradientUnits="userSpaceOnUse"
cx="0" cy="0" r="100" fx="-50" fy="50">
<stop offset="0%" stop-color="black" stop-opacity="1.0" />
- <stop offset="100%" stop-color="white" stop-opacity="0.0" />
+ <stop offset="100%" stop-color="black" stop-opacity="0.0" />
</radialGradient>
<!-- Define a shadow for each sphere. -->
@@ -91,56 +91,56 @@
<g transform="translate(200,700)">
<use xlink:href="#bubble" fill="url(#blueBubble)" />
- <animateTransform attributeName="transform" type="translate"
+ <animateTransform attributeName="transform" type="translate" additive="sum"
values="0,0; 0,-800" begin="1s" dur="10s" fill="freeze" repeatCount="indefinite" />
</g>
<g transform="translate(315,700)">
<g transform="scale(0.5,0.5)">
<use xlink:href="#bubble" fill="url(#redBubble)" />
</g>
- <animateTransform attributeName="transform" type="translate"
+ <animateTransform attributeName="transform" type="translate" additive="sum"
values="0,0; 0,-800" begin="3s" dur="7s" fill="freeze" repeatCount="indefinite" />
</g>
<g transform="translate(80,700)">
<g transform="scale(0.65,0.65)">
<use xlink:href="#bubble" fill="url(#greenBubble)" />
</g>
- <animateTransform attributeName="transform" type="translate"
+ <animateTransform attributeName="transform" type="translate" additive="sum"
values="0,0; 0,-800" begin="5s" dur="9s" fill="freeze" repeatCount="indefinite" />
</g>
<g transform="translate(255,700)">
<g transform="scale(0.3,0.3)">
<use xlink:href="#bubble" fill="url(#yellowBubble)" />
</g>
- <animateTransform attributeName="transform" type="translate"
+ <animateTransform attributeName="transform" type="translate" additive="sum"
values="0,0; 0,-800" begin="2s" dur="6s" fill="freeze" repeatCount="indefinite" />
</g>
<g transform="translate(565,700)">
<g transform="scale(0.4,0.4)">
<use xlink:href="#bubble" fill="url(#blueBubble)" />
</g>
- <animateTransform attributeName="transform" type="translate"
+ <animateTransform attributeName="transform" type="translate" additive="sum"
values="0,0; 0,-800" begin="4s" dur="8s" fill="freeze" repeatCount="indefinite" />
</g>
<g transform="translate(715,700)">
<g transform="scale(0.6,0.6)">
<use xlink:href="#bubble" fill="url(#redBubble)" />
</g>
- <animateTransform attributeName="transform" type="translate"
+ <animateTransform attributeName="transform" type="translate" additive="sum"
values="0,0; 0,-800" begin="1s" dur="4s" fill="freeze" repeatCount="indefinite" />
</g>
<g transform="translate(645,700)">
<g transform="scale(0.375,0.375)">
<use xlink:href="#bubble" fill="url(#greenBubble)" />
</g>
- <animateTransform attributeName="transform" type="translate"
+ <animateTransform attributeName="transform" type="translate" additive="sum"
values="0,0; 0,-800" begin="0s" dur="11s" fill="freeze" repeatCount="indefinite" />
</g>
<g transform="translate(555,700)">
<g transform="scale(0.9,0.9)">
<use xlink:href="#bubble" fill="url(#yellowBubble)" />
</g>
- <animateTransform attributeName="transform" type="translate"
+ <animateTransform attributeName="transform" type="translate" additive="sum"
values="0,0; 0,-800" begin="3s" dur="7.5s" fill="freeze" repeatCount="indefinite" />
</g>
@@ -148,28 +148,28 @@
<g transform="scale(0.5,0.5)">
<use xlink:href="#bubble" fill="url(#blueBubble)" />
</g>
- <animateTransform attributeName="transform" type="translate"
+ <animateTransform attributeName="transform" type="translate" additive="sum"
values="0,0; 0,-800" begin="3s" dur="6s" fill="freeze" repeatCount="indefinite" />
</g>
<g transform="translate(215,700)">
<g transform="scale(0.45,0.45)">
<use xlink:href="#bubble" fill="url(#redBubble)" />
</g>
- <animateTransform attributeName="transform" type="translate"
+ <animateTransform attributeName="transform" type="translate" additive="sum"
values="0,0; 0,-800" begin="5.5s" dur="7s" fill="freeze" repeatCount="indefinite" />
</g>
<g transform="translate(420,700)">
<g transform="scale(0.75,0.75)">
<use xlink:href="#bubble" fill="url(#greenBubble)" />
</g>
- <animateTransform attributeName="transform" type="translate"
+ <animateTransform attributeName="transform" type="translate" additive="sum"
values="0,0; 0,-800" begin="1s" dur="9s" fill="freeze" repeatCount="indefinite" />
</g>
<g transform="translate(815,700)">
<g transform="scale(0.6,0.6)">
<use xlink:href="#bubble" fill="url(#yellowBubble)" />
</g>
- <animateTransform attributeName="transform" type="translate"
+ <animateTransform attributeName="transform" type="translate" additive="sum"
values="0,0; 0,-800" begin="2s" dur="9.5s" fill="freeze" repeatCount="indefinite" />
</g>
@@ -186,7 +186,7 @@
<circle fill="#a6ce39" cx="0" cy="0" r="33" />
<path fill="black" d="M 37,50 L 50,37 L 12,-1 L 22,-11 L 10,-24 L -24,10
L -11,22 L -1,12 Z" />
- <animateTransform attributeName="transform" type="rotate" values="0; 360"
+ <animateTransform attributeName="transform" type="rotate" additive="sum" values="0; 360"
begin="0s" dur="10s" fill="freeze" repeatCount="indefinite" />
</g>
<g transform="translate(200,375)">
diff --git a/examples/opengl/hellogl_es2/glwidget.cpp b/examples/opengl/hellogl_es2/glwidget.cpp
index 9a2a83e..50a7797 100644
--- a/examples/opengl/hellogl_es2/glwidget.cpp
+++ b/examples/opengl/hellogl_es2/glwidget.cpp
@@ -266,7 +266,7 @@ void GLWidget::paintGL()
QPainter painter;
painter.begin(this);
- painter.paintEngine()->syncState();
+ painter.beginNativePainting();
glClearColor(0.1f, 0.1f, 0.2f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@@ -302,6 +302,8 @@ void GLWidget::paintGL()
glDisable(GL_DEPTH_TEST);
glDisable(GL_CULL_FACE);
+ painter.endNativePainting();
+
if (m_showBubbles)
foreach (Bubble *bubble, bubbles) {
bubble->drawBubble(&painter);
diff --git a/examples/opengl/overpainting/glwidget.cpp b/examples/opengl/overpainting/glwidget.cpp
index a6e6195..cad591f 100644
--- a/examples/opengl/overpainting/glwidget.cpp
+++ b/examples/opengl/overpainting/glwidget.cpp
@@ -166,6 +166,11 @@ void GLWidget::paintEvent(QPaintEvent *event)
//! [7]
//! [8]
+ glShadeModel(GL_FLAT);
+ glDisable(GL_CULL_FACE);
+ glDisable(GL_DEPTH_TEST);
+ glDisable(GL_LIGHTING);
+
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
//! [8]
diff --git a/examples/opengl/pbuffers2/bubbles.svg b/examples/opengl/pbuffers2/bubbles.svg
index 65867da..5173012 100644
--- a/examples/opengl/pbuffers2/bubbles.svg
+++ b/examples/opengl/pbuffers2/bubbles.svg
@@ -72,7 +72,7 @@
<radialGradient id="shadowGrad" gradientUnits="userSpaceOnUse"
cx="0" cy="0" r="100" fx="-50" fy="50">
<stop offset="0%" stop-color="black" stop-opacity="1.0" />
- <stop offset="100%" stop-color="white" stop-opacity="0.0" />
+ <stop offset="100%" stop-color="black" stop-opacity="0.0" />
</radialGradient>
<!-- Define a shadow for each sphere. -->
@@ -91,56 +91,56 @@
<g transform="translate(200,700)">
<use xlink:href="#bubble" fill="url(#blueBubble)" />
- <animateTransform attributeName="transform" type="translate"
+ <animateTransform attributeName="transform" type="translate" additive="sum"
values="0,0; 0,-800" begin="1s" dur="10s" fill="freeze" repeatCount="indefinite" />
</g>
<g transform="translate(315,700)">
<g transform="scale(0.5,0.5)">
<use xlink:href="#bubble" fill="url(#redBubble)" />
</g>
- <animateTransform attributeName="transform" type="translate"
+ <animateTransform attributeName="transform" type="translate" additive="sum"
values="0,0; 0,-800" begin="3s" dur="7s" fill="freeze" repeatCount="indefinite" />
</g>
<g transform="translate(80,700)">
<g transform="scale(0.65,0.65)">
<use xlink:href="#bubble" fill="url(#greenBubble)" />
</g>
- <animateTransform attributeName="transform" type="translate"
+ <animateTransform attributeName="transform" type="translate" additive="sum"
values="0,0; 0,-800" begin="5s" dur="9s" fill="freeze" repeatCount="indefinite" />
</g>
<g transform="translate(255,700)">
<g transform="scale(0.3,0.3)">
<use xlink:href="#bubble" fill="url(#yellowBubble)" />
</g>
- <animateTransform attributeName="transform" type="translate"
+ <animateTransform attributeName="transform" type="translate" additive="sum"
values="0,0; 0,-800" begin="2s" dur="6s" fill="freeze" repeatCount="indefinite" />
</g>
<g transform="translate(565,700)">
<g transform="scale(0.4,0.4)">
<use xlink:href="#bubble" fill="url(#blueBubble)" />
</g>
- <animateTransform attributeName="transform" type="translate"
+ <animateTransform attributeName="transform" type="translate" additive="sum"
values="0,0; 0,-800" begin="4s" dur="8s" fill="freeze" repeatCount="indefinite" />
</g>
<g transform="translate(715,700)">
<g transform="scale(0.6,0.6)">
<use xlink:href="#bubble" fill="url(#redBubble)" />
</g>
- <animateTransform attributeName="transform" type="translate"
+ <animateTransform attributeName="transform" type="translate" additive="sum"
values="0,0; 0,-800" begin="1s" dur="4s" fill="freeze" repeatCount="indefinite" />
</g>
<g transform="translate(645,700)">
<g transform="scale(0.375,0.375)">
<use xlink:href="#bubble" fill="url(#greenBubble)" />
</g>
- <animateTransform attributeName="transform" type="translate"
+ <animateTransform attributeName="transform" type="translate" additive="sum"
values="0,0; 0,-800" begin="0s" dur="11s" fill="freeze" repeatCount="indefinite" />
</g>
<g transform="translate(555,700)">
<g transform="scale(0.9,0.9)">
<use xlink:href="#bubble" fill="url(#yellowBubble)" />
</g>
- <animateTransform attributeName="transform" type="translate"
+ <animateTransform attributeName="transform" type="translate" additive="sum"
values="0,0; 0,-800" begin="3s" dur="7.5s" fill="freeze" repeatCount="indefinite" />
</g>
@@ -148,28 +148,28 @@
<g transform="scale(0.5,0.5)">
<use xlink:href="#bubble" fill="url(#blueBubble)" />
</g>
- <animateTransform attributeName="transform" type="translate"
+ <animateTransform attributeName="transform" type="translate" additive="sum"
values="0,0; 0,-800" begin="3s" dur="6s" fill="freeze" repeatCount="indefinite" />
</g>
<g transform="translate(215,700)">
<g transform="scale(0.45,0.45)">
<use xlink:href="#bubble" fill="url(#redBubble)" />
</g>
- <animateTransform attributeName="transform" type="translate"
+ <animateTransform attributeName="transform" type="translate" additive="sum"
values="0,0; 0,-800" begin="5.5s" dur="7s" fill="freeze" repeatCount="indefinite" />
</g>
<g transform="translate(420,700)">
<g transform="scale(0.75,0.75)">
<use xlink:href="#bubble" fill="url(#greenBubble)" />
</g>
- <animateTransform attributeName="transform" type="translate"
+ <animateTransform attributeName="transform" type="translate" additive="sum"
values="0,0; 0,-800" begin="1s" dur="9s" fill="freeze" repeatCount="indefinite" />
</g>
<g transform="translate(815,700)">
<g transform="scale(0.6,0.6)">
<use xlink:href="#bubble" fill="url(#yellowBubble)" />
</g>
- <animateTransform attributeName="transform" type="translate"
+ <animateTransform attributeName="transform" type="translate" additive="sum"
values="0,0; 0,-800" begin="2s" dur="9.5s" fill="freeze" repeatCount="indefinite" />
</g>
@@ -186,7 +186,7 @@
<circle fill="#a6ce39" cx="0" cy="0" r="33" />
<path fill="black" d="M 37,50 L 50,37 L 12,-1 L 22,-11 L 10,-24 L -24,10
L -11,22 L -1,12 Z" />
- <animateTransform attributeName="transform" type="rotate" values="0; 360"
+ <animateTransform attributeName="transform" type="rotate" additive="sum" values="0; 360"
begin="0s" dur="10s" fill="freeze" repeatCount="indefinite" />
</g>
<g transform="translate(200,375)">
diff --git a/examples/openvg/star/starwidget.cpp b/examples/openvg/star/starwidget.cpp
index 1a64fc9..ab11bdb 100644
--- a/examples/openvg/star/starwidget.cpp
+++ b/examples/openvg/star/starwidget.cpp
@@ -91,7 +91,7 @@ void StarWidget::paintEvent(QPaintEvent *)
// Flush the state changes to the OpenVG implementation
// and prepare to perform raw OpenVG calls.
- painter.paintEngine()->syncState();
+ painter.beginNativePainting();
// Cache the path if we haven't already.
if (path == VG_INVALID_HANDLE) {
@@ -109,7 +109,7 @@ void StarWidget::paintEvent(QPaintEvent *)
vgDrawPath(path, VG_FILL_PATH | VG_STROKE_PATH);
// Restore normal QPainter operations.
- painter.paintEngine()->syncState();
+ painter.endNativePainting();
painter.end();
}
diff --git a/examples/painting/svgviewer/files/bubbles.svg b/examples/painting/svgviewer/files/bubbles.svg
index 9fae8cc..5173012 100644
--- a/examples/painting/svgviewer/files/bubbles.svg
+++ b/examples/painting/svgviewer/files/bubbles.svg
@@ -72,7 +72,7 @@
<radialGradient id="shadowGrad" gradientUnits="userSpaceOnUse"
cx="0" cy="0" r="100" fx="-50" fy="50">
<stop offset="0%" stop-color="black" stop-opacity="1.0" />
- <stop offset="100%" stop-color="white" stop-opacity="0.0" />
+ <stop offset="100%" stop-color="black" stop-opacity="0.0" />
</radialGradient>
<!-- Define a shadow for each sphere. -->
diff --git a/mkspecs/qws/linux-armv6-g++/qplatformdefs.h b/mkspecs/qws/linux-armv6-g++/qplatformdefs.h
index 99e9a27..f5ecc13 100644
--- a/mkspecs/qws/linux-armv6-g++/qplatformdefs.h
+++ b/mkspecs/qws/linux-armv6-g++/qplatformdefs.h
@@ -1 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/qws/linux-avr32-g++/qplatformdefs.h b/mkspecs/qws/linux-avr32-g++/qplatformdefs.h
index 99e9a27..f5ecc13 100644
--- a/mkspecs/qws/linux-avr32-g++/qplatformdefs.h
+++ b/mkspecs/qws/linux-avr32-g++/qplatformdefs.h
@@ -1 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/qws/linux-sh-g++/qplatformdefs.h b/mkspecs/qws/linux-sh-g++/qplatformdefs.h
index 99e9a27..f5ecc13 100644
--- a/mkspecs/qws/linux-sh-g++/qplatformdefs.h
+++ b/mkspecs/qws/linux-sh-g++/qplatformdefs.h
@@ -1 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
#include "../../linux-g++/qplatformdefs.h"
diff --git a/src/3rdparty/phonon/ds9/backend.h b/src/3rdparty/phonon/ds9/backend.h
index 9b2c2a2..8b020c2 100644
--- a/src/3rdparty/phonon/ds9/backend.h
+++ b/src/3rdparty/phonon/ds9/backend.h
@@ -64,7 +64,7 @@ namespace Phonon
Filter getAudioOutputFilter(int index) const;
- static QMutex *Backend::directShowMutex();
+ static QMutex *directShowMutex();
Q_SIGNALS:
void objectDescriptionChanged(ObjectDescriptionType);
diff --git a/src/3rdparty/phonon/ds9/mediaobject.cpp b/src/3rdparty/phonon/ds9/mediaobject.cpp
index 579517f..e42dff9 100644
--- a/src/3rdparty/phonon/ds9/mediaobject.cpp
+++ b/src/3rdparty/phonon/ds9/mediaobject.cpp
@@ -21,9 +21,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#include <QtCore/QTime>
#include <QtCore/QLibrary>
-#ifndef Q_CC_MSVC
#include <dshow.h>
-#endif //Q_CC_MSVC
#include <objbase.h>
#include <initguid.h>
#include <qnetwork.h>
diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITOpcodes.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JITOpcodes.cpp
index b669dfa..8371229 100644
--- a/src/3rdparty/webkit/JavaScriptCore/jit/JITOpcodes.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITOpcodes.cpp
@@ -763,6 +763,7 @@ void JIT::emit_op_debug(Instruction* currentInstruction)
stubCall.addArgument(Imm32(currentInstruction[1].u.operand));
stubCall.addArgument(Imm32(currentInstruction[2].u.operand));
stubCall.addArgument(Imm32(currentInstruction[3].u.operand));
+ stubCall.addArgument(Imm32(currentInstruction[4].u.operand));
stubCall.call();
}
diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp
index 40d2182..2563848 100644
--- a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp
@@ -58,6 +58,10 @@
#include "SamplingTool.h"
#include <stdio.h>
+#ifdef QT_BUILD_SCRIPT_LIB
+#include "bridge/qscriptobject_p.h"
+#endif
+
using namespace std;
namespace JSC {
@@ -1470,7 +1474,11 @@ DEFINE_STUB_FUNCTION(JSObject*, op_construct_JSConstruct)
structure = asObject(stackFrame.args[3].jsValue())->inheritorID();
else
structure = constructor->scope().node()->globalObject()->emptyObjectStructure();
+#ifdef QT_BUILD_SCRIPT_LIB
+ return new (stackFrame.globalData) QScriptObject(structure);
+#else
return new (stackFrame.globalData) JSObject(structure);
+#endif
}
DEFINE_STUB_FUNCTION(EncodedJSValue, op_construct_NotJSConstruct)
diff --git a/src/corelib/animation/qpropertyanimation.cpp b/src/corelib/animation/qpropertyanimation.cpp
index 35d65d0..49862d2 100644
--- a/src/corelib/animation/qpropertyanimation.cpp
+++ b/src/corelib/animation/qpropertyanimation.cpp
@@ -92,8 +92,6 @@
#include "qanimationgroup.h"
#include "qpropertyanimation_p.h"
-#include <QtCore/qmath.h>
-#include <QtCore/qmutex.h>
#include <private/qmutexpool_p.h>
#ifndef QT_NO_ANIMATION
@@ -102,50 +100,38 @@ QT_BEGIN_NAMESPACE
void QPropertyAnimationPrivate::updateMetaProperty()
{
- if (!target || propertyName.isEmpty())
+ if (!target || propertyName.isEmpty()) {
+ propertyType = QVariant::Invalid;
+ propertyIndex = -1;
return;
-
- if (!hasMetaProperty && !property.isValid()) {
- const QMetaObject *mo = target->metaObject();
- propertyIndex = mo->indexOfProperty(propertyName);
- if (propertyIndex != -1) {
- hasMetaProperty = true;
- property = mo->property(propertyIndex);
- propertyType = property.userType();
- } else {
- if (!target->dynamicPropertyNames().contains(propertyName))
- qWarning("QPropertyAnimation: you're trying to animate a non-existing property %s of your QObject", propertyName.constData());
- }
}
- if (property.isValid())
+ propertyType = targetValue->property(propertyName).userType();
+ propertyIndex = targetValue->metaObject()->indexOfProperty(propertyName);
+ if (propertyIndex == -1 && !targetValue->dynamicPropertyNames().contains(propertyName))
+ qWarning("QPropertyAnimation: you're trying to animate a non-existing property %s of your QObject", propertyName.constData());
+
+ if (propertyType != QVariant::Invalid)
convertValues(propertyType);
}
void QPropertyAnimationPrivate::updateProperty(const QVariant &newValue)
{
- if (!target || state == QAbstractAnimation::Stopped)
+ if (state == QAbstractAnimation::Stopped)
return;
- if (hasMetaProperty) {
- if (newValue.userType() == propertyType) {
- //no conversion is needed, we directly call the QObject::qt_metacall
- void *data = const_cast<void*>(newValue.constData());
- target->qt_metacall(QMetaObject::WriteProperty, propertyIndex, &data);
- } else {
- property.write(target, newValue);
- }
- } else {
- target->setProperty(propertyName.constData(), newValue);
+ if (!target) {
+ q_func()->stop(); //the target was destroyed we need to stop the animation
+ return;
}
-}
-void QPropertyAnimationPrivate::_q_targetDestroyed()
-{
- Q_Q(QPropertyAnimation);
- //we stop here so that this animation is removed from the global hash
- q->stop();
- target = 0;
+ if (propertyIndex != -1 && newValue.userType() == propertyType) {
+ //no conversion is needed, we directly call the QObject::qt_metacall
+ void *data = const_cast<void*>(newValue.constData());
+ targetValue->qt_metacall(QMetaObject::WriteProperty, propertyIndex, &data);
+ } else {
+ targetValue->setProperty(propertyName.constData(), newValue);
+ }
}
/*!
@@ -187,14 +173,13 @@ QPropertyAnimation::~QPropertyAnimation()
*/
QObject *QPropertyAnimation::targetObject() const
{
- Q_D(const QPropertyAnimation);
- return d->target;
+ return d_func()->target.data();
}
void QPropertyAnimation::setTargetObject(QObject *target)
{
Q_D(QPropertyAnimation);
- if (d->target == target)
+ if (d->targetValue == target)
return;
if (d->state != QAbstractAnimation::Stopped) {
@@ -202,15 +187,7 @@ void QPropertyAnimation::setTargetObject(QObject *target)
return;
}
- //we need to get notified when the target is destroyed
- if (d->target)
- disconnect(d->target, SIGNAL(destroyed()), this, SLOT(_q_targetDestroyed()));
-
- if (target)
- connect(target, SIGNAL(destroyed()), SLOT(_q_targetDestroyed()));
-
- d->target = target;
- d->hasMetaProperty = false;
+ d->target = d->targetValue = target;
d->updateMetaProperty();
}
@@ -236,7 +213,6 @@ void QPropertyAnimation::setPropertyName(const QByteArray &propertyName)
}
d->propertyName = propertyName;
- d->hasMetaProperty = false;
d->updateMetaProperty();
}
@@ -273,7 +249,7 @@ void QPropertyAnimation::updateState(QAbstractAnimation::State oldState,
{
Q_D(QPropertyAnimation);
- if (!d->target) {
+ if (!d->target && oldState == Stopped) {
qWarning("QPropertyAnimation::updateState: Changing state of an animation without target");
return;
}
@@ -286,14 +262,16 @@ void QPropertyAnimation::updateState(QAbstractAnimation::State oldState,
typedef QPair<QObject *, QByteArray> QPropertyAnimationPair;
typedef QHash<QPropertyAnimationPair, QPropertyAnimation*> QPropertyAnimationHash;
static QPropertyAnimationHash hash;
- QPropertyAnimationPair key(d->target, d->propertyName);
+ //here we need to use value because we need to know to which pointer
+ //the animation was referring in case stopped because the target was destroyed
+ QPropertyAnimationPair key(d->targetValue, d->propertyName);
if (newState == Running) {
d->updateMetaProperty();
animToStop = hash.value(key, 0);
hash.insert(key, this);
// update the default start value
if (oldState == Stopped) {
- d->setDefaultStartEndValue(d->target->property(d->propertyName.constData()));
+ d->setDefaultStartEndValue(d->targetValue->property(d->propertyName.constData()));
//let's check if we have a start value and an end value
if (d->direction == Forward && !startValue().isValid() && !d->defaultStartEndValue.isValid())
qWarning("QPropertyAnimation::updateState: starting an animation without start value");
diff --git a/src/corelib/animation/qpropertyanimation.h b/src/corelib/animation/qpropertyanimation.h
index e12508d..56fb4b1 100644
--- a/src/corelib/animation/qpropertyanimation.h
+++ b/src/corelib/animation/qpropertyanimation.h
@@ -76,7 +76,6 @@ protected:
void updateState(QAbstractAnimation::State oldState, QAbstractAnimation::State newState);
private:
- Q_PRIVATE_SLOT(d_func(), void _q_targetDestroyed())
Q_DISABLE_COPY(QPropertyAnimation)
Q_DECLARE_PRIVATE(QPropertyAnimation)
};
diff --git a/src/corelib/animation/qpropertyanimation_p.h b/src/corelib/animation/qpropertyanimation_p.h
index ffa6114..3777aa0 100644
--- a/src/corelib/animation/qpropertyanimation_p.h
+++ b/src/corelib/animation/qpropertyanimation_p.h
@@ -54,7 +54,6 @@
//
#include "qpropertyanimation.h"
-#include <QtCore/qmetaobject.h>
#include "private/qvariantanimation_p.h"
@@ -67,20 +66,18 @@ class QPropertyAnimationPrivate : public QVariantAnimationPrivate
Q_DECLARE_PUBLIC(QPropertyAnimation)
public:
QPropertyAnimationPrivate()
- : target(0), propertyType(0), propertyIndex(0), hasMetaProperty(false)
+ : targetValue(0), propertyType(0), propertyIndex(-1)
{
}
- void _q_targetDestroyed();
-
- QObject *target;
+ QWeakPointer<QObject> target;
+ //we use targetValue to be able to unregister the target from the global hash
+ QObject *targetValue;
//for the QProperty
- QMetaProperty property;
int propertyType;
int propertyIndex;
- bool hasMetaProperty;
QByteArray propertyName;
void updateProperty(const QVariant &);
void updateMetaProperty();
diff --git a/src/corelib/animation/qvariantanimation_p.h b/src/corelib/animation/qvariantanimation_p.h
index ce625f1..da120df 100644
--- a/src/corelib/animation/qvariantanimation_p.h
+++ b/src/corelib/animation/qvariantanimation_p.h
@@ -78,10 +78,7 @@ public:
void setDefaultStartEndValue(const QVariant &value);
- int duration;
- QEasingCurve easing;
- QVariantAnimation::KeyValues keyValues;
QVariant currentValue;
QVariant defaultStartEndValue;
@@ -91,6 +88,9 @@ public:
QVariantAnimation::KeyValue start, end;
} currentInterval;
+ QEasingCurve easing;
+ int duration;
+ QVariantAnimation::KeyValues keyValues;
QVariantAnimation::Interpolator interpolator;
void setCurrentValueForProgress(const qreal progress);
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index d22a863..93cc30f 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -265,15 +265,6 @@ namespace QT_NAMESPACE {}
# define Q_OS_WIN
#endif
-#if defined(Q_OS_WIN32)
-# ifndef WINVER
-# define WINVER 0x0500
-# endif
-# ifndef _WIN32_WINNT
-# define _WIN32_WINNT 0x0500
-# endif
-#endif
-
#if defined(Q_OS_DARWIN)
# define Q_OS_MAC /* Q_OS_MAC is mostly for compatibility, but also more clear */
# define Q_OS_MACX /* Q_OS_MACX is only for compatibility.*/
diff --git a/src/corelib/global/qt_windows.h b/src/corelib/global/qt_windows.h
index 6e3f242..dd722f9 100644
--- a/src/corelib/global/qt_windows.h
+++ b/src/corelib/global/qt_windows.h
@@ -53,6 +53,13 @@
#endif
#endif
+#if defined(Q_CC_MINGW)
+// mingw's windows.h does not set _WIN32_WINNT, resulting breaking compilation
+#ifndef WINVER
+#define WINVER 0x500
+#endif
+#endif
+
#include <windows.h>
#ifdef _WIN32_WCE
diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp
index a7919d3..ec20e4a 100644
--- a/src/corelib/io/qfsfileengine_unix.cpp
+++ b/src/corelib/io/qfsfileengine_unix.cpp
@@ -46,9 +46,6 @@
#ifndef QT_NO_FSFILEENGINE
-#ifndef QT_NO_REGEXP
-# include "qregexp.h"
-#endif
#include "qfile.h"
#include "qdir.h"
#include "qdatetime.h"
@@ -71,7 +68,7 @@
QT_BEGIN_NAMESPACE
-#ifdef Q_OS_SYMBIAN
+#if defined(Q_OS_SYMBIAN)
/*!
\internal
@@ -409,7 +406,7 @@ bool QFSFileEngine::copy(const QString &newName)
QString oldNative(QDir::toNativeSeparators(d->filePath));
TPtrC oldPtr(qt_QString2TPtrC(oldNative));
QFileInfo fi(newName);
- QString absoluteNewName = fi.absolutePath() + QDir::separator() + fi.fileName();
+ QString absoluteNewName = fi.absoluteFilePath();
QString newNative(QDir::toNativeSeparators(absoluteNewName));
TPtrC newPtr(qt_QString2TPtrC(newNative));
TRAPD (err,
@@ -422,8 +419,10 @@ bool QFSFileEngine::copy(const QString &newName)
}
) // End TRAP
delete fm;
+ // ### Add error reporting on failure
return (err == KErrNone);
#else
+ Q_UNUSED(newName);
// ### Add copy code for Unix here
setError(QFile::UnspecifiedError, QLatin1String("Not implemented!"));
return false;
@@ -457,10 +456,9 @@ bool QFSFileEngine::mkdir(const QString &name, bool createParentDirectories) con
{
QString dirName = name;
if (createParentDirectories) {
-#if defined(Q_OS_SYMBIAN)
- dirName = QDir::toNativeSeparators(QDir::cleanPath(dirName));
-#else
dirName = QDir::cleanPath(dirName);
+#if defined(Q_OS_SYMBIAN)
+ dirName = QDir::toNativeSeparators(dirName);
#endif
for(int oldslash = -1, slash=0; slash != -1; oldslash = slash) {
slash = dirName.indexOf(QDir::separator(), oldslash+1);
@@ -493,10 +491,9 @@ bool QFSFileEngine::rmdir(const QString &name, bool recurseParentDirectories) co
{
QString dirName = name;
if (recurseParentDirectories) {
-#if defined(Q_OS_SYMBIAN)
- dirName = QDir::toNativeSeparators(QDir::cleanPath(dirName));
-#else
dirName = QDir::cleanPath(dirName);
+#if defined(Q_OS_SYMBIAN)
+ dirName = QDir::toNativeSeparators(dirName);
#endif
for(int oldslash = 0, slash=dirName.length(); slash > 0; oldslash = slash) {
QByteArray chunk = QFile::encodeName(dirName.left(slash));
@@ -537,12 +534,12 @@ QString QFSFileEngine::currentPath(const QString &)
QString result;
QT_STATBUF st;
#if defined(Q_OS_SYMBIAN)
- char currentName[PATH_MAX+1];
- if (::getcwd(currentName, PATH_MAX))
- result = QDir::fromNativeSeparators(QFile::decodeName(QByteArray(currentName)));
+ char nativeCurrentName[PATH_MAX+1];
+ if (::getcwd(nativeCurrentName, PATH_MAX))
+ result = QDir::fromNativeSeparators(QFile::decodeName(QByteArray(nativeCurrentName)));
if (result.isEmpty()) {
# if defined(QT_DEBUG)
- qWarning("QDir::currentPath: getcwd() failed");
+ qWarning("QFSFileEngine::currentPath: getcwd() failed");
# endif
} else
#endif
@@ -559,7 +556,7 @@ QString QFSFileEngine::currentPath(const QString &)
result = QFile::decodeName(QByteArray(currentName));
# if defined(QT_DEBUG)
if (result.isNull())
- qWarning("QDir::currentPath: getcwd() failed");
+ qWarning("QFSFileEngine::currentPath: getcwd() failed");
# endif
#endif
} else {
@@ -568,10 +565,10 @@ QString QFSFileEngine::currentPath(const QString &)
// try to create it (can happen with application private dirs)
// Ignore mkdir failures; we want to be consistent with Open C
// current path regardless.
- ::mkdir(QFile::encodeName(currentName), 0777);
+ QT_MKDIR(QFile::encodeName(nativeCurrentName), 0777);
#else
# if defined(QT_DEBUG)
- qWarning("QDir::currentPath: stat(\".\") failed");
+ qWarning("QFSFileEngine::currentPath: stat(\".\") failed");
# endif
#endif
}
@@ -607,11 +604,14 @@ QString QFSFileEngine::rootPath()
QString QFSFileEngine::tempPath()
{
-#ifdef Q_OS_SYMBIAN
+#if defined(Q_OS_SYMBIAN)
# ifdef Q_WS_S60
TFileName symbianPath = PathInfo::PhoneMemoryRootPath();
QString temp = QDir::fromNativeSeparators(qt_TDesC2QString(symbianPath));
temp += QLatin1String( "temp/");
+
+ // Just to verify that folder really exist on hardware
+ QT_MKDIR(QFile::encodeName(temp), 0777);
# else
# warning No fallback implementation of QFSFileEngine::tempPath()
return QString();
@@ -632,14 +632,16 @@ QFileInfoList QFSFileEngine::drives()
RFs rfs = qt_s60GetRFs();
TInt err = rfs.DriveList(driveList);
if (err == KErrNone) {
+ char driveName[] = "A:/";
+
for (char i = 0; i < KMaxDrives; i++) {
if (driveList[i]) {
- ret.append(QString("%1:/").arg(QChar('A' + i)));
+ driveName[0] = 'A' + i;
+ ret.append(QFileInfo(QLatin1String(driveName)));
}
}
- }
- else {
- qWarning("QDir::drives: Getting drives failed");
+ } else {
+ qWarning("QFSFileEngine::drives: Getting drives failed");
}
#else
ret.append(QFileInfo(rootPath()));
@@ -680,22 +682,16 @@ bool QFSFileEnginePrivate::isSymlink() const
#if defined(Q_OS_SYMBIAN)
static bool _q_isSymbianHidden(const QString &path, bool isDir)
{
- bool retval = false;
RFs rfs = qt_s60GetRFs();
QFileInfo fi(path);
QString absPath = fi.absoluteFilePath();
- if (isDir && absPath.at(absPath.size()-1) != QChar('/')) {
- absPath += QChar('/');
- }
+ if (isDir && !absPath.endsWith(QLatin1Char('/')))
+ absPath.append(QLatin1Char('/'));
QString native(QDir::toNativeSeparators(absPath));
TPtrC ptr(qt_QString2TPtrC(native));
TUint attributes;
TInt err = rfs.Att(ptr, attributes);
- if (err == KErrNone && (attributes & KEntryAttHidden)) {
- retval = true;
- }
-
- return retval;
+ return (err == KErrNone && (attributes & KEntryAttHidden));
}
#endif
@@ -805,16 +801,16 @@ QAbstractFileEngine::FileFlags QFSFileEngine::fileFlags(FileFlags type) const
ret |= ExistsFlag;
#if defined(Q_OS_SYMBIAN)
if (d->filePath == QLatin1String("/")
- || (d->filePath.at(0).isLetter()
- && d->filePath.mid(1,d->filePath.length()) == QLatin1String(":/")))
+ || (d->filePath.length() == 3 && d->filePath.at(0).isLetter()
+ && d->filePath.at(1) == QLatin1Char(':') && d->filePath.at(2) == QLatin1Char('/'))) {
ret |= RootFlag;
-
- // In Symbian, all symlinks have hidden attribute for some reason;
- // lets make them visible for better compatibility with other platforms.
- // If somebody actually wants a hidden link, then they are out of luck.
- if (!(ret & RootFlag) && !d->isSymlink())
- if(_q_isSymbianHidden(d->filePath, ret & DirectoryType))
- ret |= HiddenFlag;
+ } else {
+ // In Symbian, all symlinks have hidden attribute for some reason;
+ // lets make them visible for better compatibility with other platforms.
+ // If somebody actually wants a hidden link, then they are out of luck.
+ if (!d->isSymlink() && _q_isSymbianHidden(d->filePath, ret & DirectoryType))
+ ret |= HiddenFlag;
+ }
#else
if (d->filePath == QLatin1String("/")) {
ret |= RootFlag;
@@ -825,7 +821,7 @@ QAbstractFileEngine::FileFlags QFSFileEngine::fileFlags(FileFlags type) const
# if !defined(QWS) && defined(Q_OS_MAC)
|| _q_isMacHidden(d->filePath)
# endif
- ) {
+ ) {
ret |= HiddenFlag;
}
}
@@ -834,12 +830,12 @@ QAbstractFileEngine::FileFlags QFSFileEngine::fileFlags(FileFlags type) const
return ret;
}
-#ifdef Q_OS_SYMBIAN
-static QString symbianFileName(QAbstractFileEngine::FileName file, const QFSFileEngine *engine,
- const QFSFileEnginePrivate * const d)
+#if defined(Q_OS_SYMBIAN)
+QString QFSFileEngine::fileName(FileName file) const
{
+ Q_D(const QFSFileEngine);
const QLatin1Char slashChar('/');
- if(file == QAbstractFileEngine::BaseName) {
+ if(file == BaseName) {
int slash = d->filePath.lastIndexOf(slashChar);
if(slash == -1) {
int colon = d->filePath.lastIndexOf(QLatin1Char(':'));
@@ -848,7 +844,7 @@ static QString symbianFileName(QAbstractFileEngine::FileName file, const QFSFile
return d->filePath;
}
return d->filePath.mid(slash + 1);
- } else if(file == QAbstractFileEngine::PathName) {
+ } else if(file == PathName) {
if(!d->filePath.size())
return d->filePath;
@@ -864,7 +860,7 @@ static QString symbianFileName(QAbstractFileEngine::FileName file, const QFSFile
slash++;
return d->filePath.left(slash);
}
- } else if(file == QAbstractFileEngine::AbsoluteName || file == QAbstractFileEngine::AbsolutePathName) {
+ } else if(file == AbsoluteName || file == AbsolutePathName) {
QString ret;
if (!isRelativePathSymbian(d->filePath)) {
if (d->filePath.size() > 2 && d->filePath.at(1) == QLatin1Char(':')
@@ -892,7 +888,7 @@ static QString symbianFileName(QAbstractFileEngine::FileName file, const QFSFile
ret[0] = ret.at(0).toUpper();
}
- if (file == QAbstractFileEngine::AbsolutePathName) {
+ if (file == AbsolutePathName) {
int slash = ret.lastIndexOf(slashChar);
if (slash < 0)
return ret;
@@ -902,12 +898,12 @@ static QString symbianFileName(QAbstractFileEngine::FileName file, const QFSFile
return ret.left(slash > 0 ? slash : 1);
}
return ret;
- } else if(file == QAbstractFileEngine::CanonicalName || file == QAbstractFileEngine::CanonicalPathName) {
- if (!(engine->fileFlags(QAbstractFileEngine::ExistsFlag) & QAbstractFileEngine::ExistsFlag))
+ } else if(file == CanonicalName || file == CanonicalPathName) {
+ if (!(fileFlags(ExistsFlag) & ExistsFlag))
return QString();
- QString ret = QFSFileEnginePrivate::canonicalized(symbianFileName(QAbstractFileEngine::AbsoluteName, engine, d));
- if (!ret.isEmpty() && file == QAbstractFileEngine::CanonicalPathName) {
+ QString ret = QFSFileEnginePrivate::canonicalized(fileName(AbsoluteName));
+ if (file == CanonicalPathName && !ret.isEmpty()) {
int slash = ret.lastIndexOf(slashChar);
if (slash == -1)
ret = QDir::fromNativeSeparators(QDir::currentPath());
@@ -916,7 +912,7 @@ static QString symbianFileName(QAbstractFileEngine::FileName file, const QFSFile
ret = ret.left(slash);
}
return ret;
- } else if(file == QAbstractFileEngine::LinkName) {
+ } else if(file == LinkName) {
if (d->isSymlink()) {
char s[PATH_MAX+1];
int len = readlink(d->nativeFilePath.constData(), s, PATH_MAX);
@@ -939,19 +935,17 @@ static QString symbianFileName(QAbstractFileEngine::FileName file, const QFSFile
}
}
return QString();
- } else if(file == QAbstractFileEngine::BundleName) {
+ } else if(file == BundleName) {
return QString();
}
return d->filePath;
}
-#endif
+
+#else
QString QFSFileEngine::fileName(FileName file) const
{
Q_D(const QFSFileEngine);
-#ifdef Q_OS_SYMBIAN
- return symbianFileName(file, this, d);
-#else
if (file == BundleName) {
#if !defined(QWS) && defined(Q_OS_MAC)
QCFType<CFURLRef> url = CFURLCreateWithFileSystemPath(0, QCFString(d->filePath),
@@ -1004,7 +998,7 @@ QString QFSFileEngine::fileName(FileName file) const
return QString();
QString ret = QFSFileEnginePrivate::canonicalized(fileName(AbsoluteName));
- if (!ret.isEmpty() && file == CanonicalPathName) {
+ if (file == CanonicalPathName && !ret.isEmpty()) {
int slash = ret.lastIndexOf(QLatin1Char('/'));
if (slash == -1)
ret = QDir::currentPath();
@@ -1085,19 +1079,16 @@ QString QFSFileEngine::fileName(FileName file) const
return QString();
}
return d->filePath;
-#endif // Q_OS_SYMBIAN
}
+#endif // Q_OS_SYMBIAN
bool QFSFileEngine::isRelativePath() const
{
Q_D(const QFSFileEngine);
-#ifdef Q_OS_SYMBIAN
+#if defined(Q_OS_SYMBIAN)
return isRelativePathSymbian(d->filePath);
#else
- int len = d->filePath.length();
- if (len == 0)
- return true;
- return d->filePath[0] != QLatin1Char('/');
+ return d->filePath.length() ? d->filePath[0] != QLatin1Char('/') : true;
#endif
}
@@ -1134,9 +1125,7 @@ QString QFSFileEngine::owner(FileOwner own) const
if (pw)
return QFile::decodeName(QByteArray(pw->pw_name));
} else if (own == OwnerGroup) {
-#ifdef Q_OS_SYMBIAN
- return QString();
-#endif
+#if !defined(Q_OS_SYMBIAN)
struct group *gr = 0;
#if !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_OPENBSD)
size_max = sysconf(_SC_GETGR_R_SIZE_MAX);
@@ -1154,12 +1143,12 @@ QString QFSFileEngine::owner(FileOwner own) const
|| errno != ERANGE)
break;
}
-
#else
gr = getgrgid(ownerId(own));
#endif
if (gr)
return QFile::decodeName(QByteArray(gr->gr_name));
+#endif
}
return QString();
}
diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp
index a8de17b..4e142a9 100644
--- a/src/corelib/io/qfsfileengine_win.cpp
+++ b/src/corelib/io/qfsfileengine_win.cpp
@@ -123,6 +123,9 @@ typedef struct _REPARSE_DATA_BUFFER {
# ifndef IO_REPARSE_TAG_SYMLINK
# define IO_REPARSE_TAG_SYMLINK (0xA000000CL)
# endif
+# ifndef FSCTL_GET_REPARSE_POINT
+# define FSCTL_GET_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 42, METHOD_BUFFERED, FILE_ANY_ACCESS)
+# endif
#endif
QT_BEGIN_NAMESPACE
@@ -1289,6 +1292,8 @@ static QString readSymLink(const QString &link)
qFree(rdb);
CloseHandle(handle);
}
+#else
+ Q_UNUSED(link);
#endif // Q_OS_WINCE
return result;
}
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp
index 764304d..f4bf5cc 100644
--- a/src/corelib/io/qprocess.cpp
+++ b/src/corelib/io/qprocess.cpp
@@ -1646,7 +1646,8 @@ bool QProcess::waitForBytesWritten(int msecs)
has been emitted, or until \a msecs milliseconds have passed.
Returns true if the process finished; otherwise returns false (if
- the operation timed out or if an error occurred).
+ the operation timed out, if an error occurred, or if this QProcess
+ is already finished).
This function can operate without an event loop. It is
useful when writing non-GUI applications and when performing
diff --git a/src/corelib/io/qtemporaryfile.cpp b/src/corelib/io/qtemporaryfile.cpp
index 3db0564..adfcf5e 100644
--- a/src/corelib/io/qtemporaryfile.cpp
+++ b/src/corelib/io/qtemporaryfile.cpp
@@ -514,10 +514,6 @@ QTemporaryFile::QTemporaryFile()
{
Q_D(QTemporaryFile);
d->templateName = QDir::tempPath() + QLatin1String("/qt_temp.XXXXXX");
-#ifdef Q_OS_SYMBIAN
- //Just to verify that folder really exist on hardware
- fileEngine()->mkdir(QDir::tempPath(), true);
-#endif
}
/*!
diff --git a/src/corelib/kernel/qabstractitemmodel.cpp b/src/corelib/kernel/qabstractitemmodel.cpp
index 3b7059b..1c9104a 100644
--- a/src/corelib/kernel/qabstractitemmodel.cpp
+++ b/src/corelib/kernel/qabstractitemmodel.cpp
@@ -599,6 +599,118 @@ void QAbstractItemModelPrivate::rowsInserted(const QModelIndex &parent,
}
}
+void QAbstractItemModelPrivate::itemsAboutToBeMoved(const QModelIndex &srcParent, int srcFirst, int srcLast, const QModelIndex &destinationParent, int destinationChild, Qt::Orientation orientation)
+{
+ Q_Q(QAbstractItemModel);
+ QVector<QPersistentModelIndexData *> persistent_moved_explicitly;
+ QVector<QPersistentModelIndexData *> persistent_moved_in_source;
+ QVector<QPersistentModelIndexData *> persistent_moved_in_destination;
+
+ QHash<QModelIndex, QPersistentModelIndexData *>::const_iterator it;
+ const QHash<QModelIndex, QPersistentModelIndexData *>::const_iterator begin = persistent.indexes.constBegin();
+ const QHash<QModelIndex, QPersistentModelIndexData *>::const_iterator end = persistent.indexes.constEnd();
+
+ const bool sameParent = (srcParent == destinationParent);
+ const bool movingUp = (srcFirst > destinationChild);
+
+ for ( it = begin; it != end; ++it) {
+ QPersistentModelIndexData *data = *it;
+ const QModelIndex &index = data->index;
+ const QModelIndex &parent = index.parent();
+ const bool isSourceIndex = (parent == srcParent);
+ const bool isDestinationIndex = (parent == destinationParent);
+
+ int childPosition;
+ if (orientation == Qt::Vertical)
+ childPosition = index.row();
+ else
+ childPosition = index.column();
+
+ if (!index.isValid() || !(isSourceIndex || isDestinationIndex ) )
+ continue;
+
+ if (!sameParent && isDestinationIndex) {
+ if (childPosition >= destinationChild)
+ persistent_moved_in_destination.append(data);
+ continue;
+ }
+
+ if (sameParent && movingUp && childPosition < destinationChild)
+ continue;
+
+ if (sameParent && !movingUp && childPosition < srcFirst )
+ continue;
+
+ if (!sameParent && childPosition < srcFirst)
+ continue;
+
+ if (sameParent && (childPosition > srcLast) && (childPosition >= destinationChild ))
+ continue;
+
+ if ((childPosition <= srcLast) && (childPosition >= srcFirst)) {
+ persistent_moved_explicitly.append(data);
+ } else {
+ persistent_moved_in_source.append(data);
+ }
+ }
+ persistent.moved.push(persistent_moved_explicitly);
+ persistent.moved.push(persistent_moved_in_source);
+ persistent.moved.push(persistent_moved_in_destination);
+}
+
+/*!
+ \internal
+
+ Moves persistent indexes \a indexes by amount \a change. The change will be either a change in row value or a change in
+ column value depending on the value of \a orientation. The indexes may also be moved to a different parent if \a parent
+ differs from the existing parent for the index.
+*/
+void QAbstractItemModelPrivate::movePersistentIndexes(QVector<QPersistentModelIndexData *> indexes, int change, const QModelIndex &parent, Qt::Orientation orientation)
+{
+ QVector<QPersistentModelIndexData *>::const_iterator it;
+ const QVector<QPersistentModelIndexData *>::const_iterator begin = indexes.constBegin();
+ const QVector<QPersistentModelIndexData *>::const_iterator end = indexes.constEnd();
+
+ for (it = begin; it != end; ++it)
+ {
+ QPersistentModelIndexData *data = *it;
+
+ int row = data->index.row();
+ int column = data->index.column();
+
+ if (Qt::Vertical == orientation)
+ row += change;
+ else
+ column += change;
+
+ persistent.indexes.erase(persistent.indexes.find(data->index));
+ data->index = q_func()->index(row, column, parent);
+ if (data->index.isValid()) {
+ persistent.insertMultiAtEnd(data->index, data);
+ } else {
+ qWarning() << "QAbstractItemModel::endMoveRows: Invalid index (" << row << "," << column << ") in model" << q_func();
+ }
+ }
+}
+
+void QAbstractItemModelPrivate::itemsMoved(const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationChild, Qt::Orientation orientation)
+{
+ QVector<QPersistentModelIndexData *> moved_in_destination = persistent.moved.pop();
+ QVector<QPersistentModelIndexData *> moved_in_source = persistent.moved.pop();
+ QVector<QPersistentModelIndexData *> moved_explicitly = persistent.moved.pop();
+
+ const bool sameParent = (sourceParent == destinationParent);
+ const bool movingUp = (sourceFirst > destinationChild);
+
+ const int explicit_change = (!sameParent || movingUp) ? destinationChild - sourceFirst : destinationChild - sourceLast - 1 ;
+ const int source_change = (!sameParent || !movingUp) ? -1*(sourceLast - sourceFirst + 1) : sourceLast - sourceFirst + 1 ;
+ const int destination_change = sourceLast - sourceFirst + 1;
+
+ movePersistentIndexes(moved_explicitly, explicit_change, destinationParent, orientation);
+ movePersistentIndexes(moved_in_source, source_change, sourceParent, orientation);
+ movePersistentIndexes(moved_in_destination, destination_change, destinationParent, orientation);
+}
+
void QAbstractItemModelPrivate::rowsAboutToBeRemoved(const QModelIndex &parent,
int first, int last)
{
@@ -1370,6 +1482,70 @@ QAbstractItemModel::~QAbstractItemModel()
*/
/*!
+ \fn void QAbstractItemModel::rowsMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationRow)
+ \since 4.6
+
+ This signal is emitted after rows have been moved within the
+ model. The items between \a sourceStart and \a sourceEnd
+ inclusive, under the given \a sourceParent item have been moved to \a destinationParent
+ starting at the row \a destinationRow.
+
+ \bold{Note:} Components connected to this signal use it to adapt to changes
+ in the model's dimensions. It can only be emitted by the QAbstractItemModel
+ implementation, and cannot be explicitly emitted in subclass code.
+
+ \sa beginMoveRows()
+*/
+
+/*!
+ \fn void QAbstractItemModel::rowsAboutToBeMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationRow)
+ \since 4.6
+
+ This signal is emitted just before rows are moved within the
+ model. The items that will be moved are those between \a sourceStart and \a sourceEnd
+ inclusive, under the given \a sourceParent item. They will be moved to \a destinationParent
+ starting at the row \a destinationRow.
+
+ \bold{Note:} Components connected to this signal use it to adapt to changes
+ in the model's dimensions. It can only be emitted by the QAbstractItemModel
+ implementation, and cannot be explicitly emitted in subclass code.
+
+ \sa beginMoveRows()
+*/
+
+/*!
+ \fn void QAbstractItemModel::columnsMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationColumn)
+ \since 4.6
+
+ This signal is emitted after columns have been moved within the
+ model. The items between \a sourceStart and \a sourceEnd
+ inclusive, under the given \a sourceParent item have been moved to \a destinationParent
+ starting at the column \a destinationColumn.
+
+ \bold{Note:} Components connected to this signal use it to adapt to changes
+ in the model's dimensions. It can only be emitted by the QAbstractItemModel
+ implementation, and cannot be explicitly emitted in subclass code.
+
+ \sa beginMoveRows()
+*/
+
+/*!
+ \fn void QAbstractItemModel::columnsAboutToBeMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationColumn)
+ \since 4.6
+
+ This signal is emitted just before columns are moved within the
+ model. The items that will be moved are those between \a sourceStart and \a sourceEnd
+ inclusive, under the given \a sourceParent item. They will be moved to \a destinationParent
+ starting at the column \a destinationColumn.
+
+ \bold{Note:} Components connected to this signal use it to adapt to changes
+ in the model's dimensions. It can only be emitted by the QAbstractItemModel
+ implementation, and cannot be explicitly emitted in subclass code.
+
+ \sa beginMoveRows()
+*/
+
+/*!
\fn void QAbstractItemModel::columnsInserted(const QModelIndex &parent, int start, int end)
This signal is emitted after columns have been inserted into the model. The
@@ -2284,6 +2460,116 @@ void QAbstractItemModel::endRemoveRows()
}
/*!
+ Returns whether a move operation is valid.
+
+ A move operation is not allowed if it moves a continuous range of rows to a destination within
+ itself, or if it attempts to move a row to one of its own descendants.
+
+ \internal
+*/
+bool QAbstractItemModelPrivate::allowMove(const QModelIndex &srcParent, int start, int end, const QModelIndex &destinationParent, int destinationStart, Qt::Orientation orientation)
+{
+ Q_Q(QAbstractItemModel);
+ // Don't move the range within itself.
+ if ( ( destinationParent == srcParent )
+ && ( destinationStart >= start )
+ && ( destinationStart <= end + 1) )
+ return false;
+
+ QModelIndex destinationAncestor = destinationParent;
+ int pos = (Qt::Vertical == orientation) ? destinationAncestor.row() : destinationAncestor.column();
+ forever {
+ if (destinationAncestor == srcParent) {
+ if (pos >= start && pos <= end)
+ return false;
+ break;
+ }
+
+ if (!destinationAncestor.isValid())
+ break;
+
+ pos = (Qt::Vertical == orientation) ? destinationAncestor.row() : destinationAncestor.column();
+ destinationAncestor = destinationAncestor.parent();
+ }
+
+ return true;
+}
+
+/*!
+ Begins a row move operation.
+
+ When reimplementing a subclass, this method simplifies moving entities
+ in your model. This method is responsible for moving persistent indexes
+ in the model, which you would otherwise be required to do yourself.
+
+ Using beginMoveRows and endMoveRows is an alternative to emitting
+ layoutAboutToBeChanged and layoutChanged directly along with changePersistentIndexes.
+ layoutAboutToBeChanged is emitted by this method for compatibility reasons.
+
+ The \a sourceParent index corresponds to the parent from which the
+ rows are moved; \a sourceFirst and \a sourceLast are the row numbers of the
+ rows to be moved. The \a destinationParent index corresponds to the parent into which
+ the rows are moved. The \a destinationRow is the row to which the rows will be moved.
+ That is, the index at row \a sourceFirst in \a sourceParent will become row \a destinationRow
+ in \a destinationParent. Its siblings will be moved correspondingly.
+
+ Note that \a sourceParent and \a destinationParent may be the same, in which case you must
+ ensure that the \a destinationRow is not within the range of \a sourceFirst and \a sourceLast.
+ You must also ensure that you do not attempt to move a row to one of its own chilren or ancestors.
+ This method returns false if either condition is true, in which case you should abort your move operation.
+
+ \sa endMoveRows()
+
+ \since 4.6
+*/
+bool QAbstractItemModel::beginMoveRows(const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationChild)
+{
+ Q_ASSERT(sourceFirst >= 0);
+ Q_ASSERT(sourceLast >= sourceFirst);
+ Q_ASSERT(destinationChild >= 0);
+ Q_D(QAbstractItemModel);
+
+ if (!d->allowMove(sourceParent, sourceFirst, sourceLast, destinationParent, destinationChild, Qt::Vertical)) {
+ return false;
+ }
+
+ d->changes.push(QAbstractItemModelPrivate::Change(sourceParent, sourceFirst, sourceLast));
+ int destinationLast = destinationChild + (sourceLast - sourceFirst);
+ d->changes.push(QAbstractItemModelPrivate::Change(destinationParent, destinationChild, destinationLast));
+
+ d->itemsAboutToBeMoved(sourceParent, sourceFirst, sourceLast, destinationParent, destinationChild, Qt::Vertical);
+ emit rowsAboutToBeMoved(sourceParent, sourceFirst, sourceLast, destinationParent, destinationChild);
+ emit layoutAboutToBeChanged();
+ return true;
+}
+
+/*!
+ Ends a row move operation.
+
+ When implementing a subclass, you must call this
+ function \e after moving data within the model's underlying data
+ store.
+
+ layoutChanged is emitted by this method for compatibility reasons.
+
+ \sa beginMoveRows()
+
+ \since 4.6
+*/
+void QAbstractItemModel::endMoveRows()
+{
+ Q_D(QAbstractItemModel);
+
+ QAbstractItemModelPrivate::Change insertChange = d->changes.pop();
+ QAbstractItemModelPrivate::Change removeChange = d->changes.pop();
+
+ d->itemsMoved(removeChange.parent, removeChange.first, removeChange.last, insertChange.parent, insertChange.first, Qt::Vertical);
+
+ emit rowsMoved(removeChange.parent, removeChange.first, removeChange.last, insertChange.parent, insertChange.first);
+ emit layoutChanged();
+}
+
+/*!
Begins a column insertion operation.
When reimplementing insertColumns() in a subclass, you must call this
@@ -2406,6 +2692,81 @@ void QAbstractItemModel::endRemoveColumns()
}
/*!
+ Begins a column move operation.
+
+ When reimplementing a subclass, this method simplifies moving entities
+ in your model. This method is responsible for moving persistent indexes
+ in the model, which you would otherwise be required to do yourself.
+
+ Using beginMoveColumns and endMoveColumns is an alternative to emitting
+ layoutAboutToBeChanged and layoutChanged directly along with changePersistentIndexes.
+ layoutAboutToBeChanged is emitted by this method for compatibility reasons.
+
+ The \a sourceParent index corresponds to the parent from which the
+ columns are moved; \a sourceFirst and \a sourceLast are the column numbers of the
+ columns to be moved. The \a destinationParent index corresponds to the parent into which
+ the columns are moved. The \a destinationColumn is the column to which the columns will be moved.
+ That is, the index at column \a sourceFirst in \a sourceParent will become column \a destinationColumn
+ in \a destinationParent. Its siblings will be moved correspondingly.
+
+ Note that \a sourceParent and \a destinationParent may be the same, in which case you must
+ ensure that the \a destinationColumn is not within the range of \a sourceFirst and \a sourceLast.
+ You must also ensure that you do not attempt to move a row to one of its own chilren or ancestors.
+ This method returns false if either condition is true, in which case you should abort your move operation.
+
+ \sa endMoveColumns()
+
+ \since 4.6
+*/
+bool QAbstractItemModel::beginMoveColumns(const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationChild)
+{
+ Q_ASSERT(sourceFirst >= 0);
+ Q_ASSERT(sourceLast >= sourceFirst);
+ Q_ASSERT(destinationChild >= 0);
+ Q_D(QAbstractItemModel);
+
+ if (!d->allowMove(sourceParent, sourceFirst, sourceLast, destinationParent, destinationChild, Qt::Horizontal)) {
+ return false;
+ }
+
+ d->changes.push(QAbstractItemModelPrivate::Change(sourceParent, sourceFirst, sourceLast));
+ int destinationLast = destinationChild + (sourceLast - sourceFirst);
+ d->changes.push(QAbstractItemModelPrivate::Change(destinationParent, destinationChild, destinationLast));
+
+ d->itemsAboutToBeMoved(sourceParent, sourceFirst, sourceLast, destinationParent, destinationChild, Qt::Horizontal);
+
+ emit columnsAboutToBeMoved(sourceParent, sourceFirst, sourceLast, destinationParent, destinationChild);
+ emit layoutAboutToBeChanged();
+ return true;
+}
+
+/*!
+ Ends a column move operation.
+
+ When implementing a subclass, you must call this
+ function \e after moving data within the model's underlying data
+ store.
+
+ layoutChanged is emitted by this method for compatibility reasons.
+
+ \sa beginMoveColumns()
+
+ \since 4.6
+*/
+void QAbstractItemModel::endMoveColumns()
+{
+ Q_D(QAbstractItemModel);
+
+ QAbstractItemModelPrivate::Change insertChange = d->changes.pop();
+ QAbstractItemModelPrivate::Change removeChange = d->changes.pop();
+
+ d->itemsMoved(removeChange.parent, removeChange.first, removeChange.last, insertChange.parent, insertChange.first, Qt::Horizontal);
+
+ emit columnsMoved(removeChange.parent, removeChange.first, removeChange.last, insertChange.parent, insertChange.first);
+ emit layoutChanged();
+}
+
+/*!
Resets the model to its original state in any attached views.
The view to which the model is attached to will be reset as well.
diff --git a/src/corelib/kernel/qabstractitemmodel.h b/src/corelib/kernel/qabstractitemmodel.h
index 00f6cb2..b47e4cb 100644
--- a/src/corelib/kernel/qabstractitemmodel.h
+++ b/src/corelib/kernel/qabstractitemmodel.h
@@ -252,6 +252,13 @@ private: // can only be emitted by QAbstractItemModel
void modelAboutToBeReset();
void modelReset();
+ void rowsAboutToBeMoved( const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationRow );
+ void rowsMoved( const QModelIndex &parent, int start, int end, const QModelIndex &destination, int row );
+
+ void columnsAboutToBeMoved( const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationColumn );
+ void columnsMoved( const QModelIndex &parent, int start, int end, const QModelIndex &destination, int column );
+
+
public Q_SLOTS:
virtual bool submit();
virtual void revert();
@@ -272,12 +279,18 @@ protected:
void beginRemoveRows(const QModelIndex &parent, int first, int last);
void endRemoveRows();
+ bool beginMoveRows(const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationRow);
+ void endMoveRows();
+
void beginInsertColumns(const QModelIndex &parent, int first, int last);
void endInsertColumns();
void beginRemoveColumns(const QModelIndex &parent, int first, int last);
void endRemoveColumns();
+ bool beginMoveColumns(const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationColumn);
+ void endMoveColumns();
+
void reset();
void changePersistentIndex(const QModelIndex &from, const QModelIndex &to);
diff --git a/src/corelib/kernel/qabstractitemmodel_p.h b/src/corelib/kernel/qabstractitemmodel_p.h
index e81e627..aae3cba 100644
--- a/src/corelib/kernel/qabstractitemmodel_p.h
+++ b/src/corelib/kernel/qabstractitemmodel_p.h
@@ -80,6 +80,7 @@ class Q_CORE_EXPORT QAbstractItemModelPrivate : public QObjectPrivate
public:
QAbstractItemModelPrivate() : QObjectPrivate(), supportedDragActions(-1), roleNames(defaultRoleNames()) {}
void removePersistentIndexData(QPersistentModelIndexData *data);
+ void movePersistentIndexes(QVector<QPersistentModelIndexData *> indexes, int change, const QModelIndex &parent, Qt::Orientation orientation);
void rowsAboutToBeInserted(const QModelIndex &parent, int first, int last);
void rowsInserted(const QModelIndex &parent, int first, int last);
void rowsAboutToBeRemoved(const QModelIndex &parent, int first, int last);
@@ -91,6 +92,10 @@ public:
static QAbstractItemModel *staticEmptyModel();
static bool variantLessThan(const QVariant &v1, const QVariant &v2);
+ void itemsAboutToBeMoved(const QModelIndex &srcParent, int srcFirst, int srcLast, const QModelIndex &destinationParent, int destinationChild, Qt::Orientation);
+ void itemsMoved(const QModelIndex &srcParent, int srcFirst, int srcLast, const QModelIndex &destinationParent, int destinationChild, Qt::Orientation orientation);
+ bool allowMove(const QModelIndex &srcParent, int srcFirst, int srcLast, const QModelIndex &destinationParent, int destinationChild, Qt::Orientation orientation);
+
inline QModelIndex createIndex(int row, int column, void *data = 0) const {
return q_func()->createIndex(row, column, data);
}
@@ -132,6 +137,8 @@ public:
Change(const QModelIndex &p, int f, int l) : parent(p), first(f), last(l) {}
QModelIndex parent;
int first, last;
+
+ bool isValid() { return first >= 0 && last >= 0; }
};
QStack<Change> changes;
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 2117a2d..1f35c73 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -1089,10 +1089,9 @@ QObjectPrivate::Connection::~Connection()
\snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 4
- (\l QLayoutItem is not a QObject.)
-
- Consider using qobject_cast<Type *>(object) instead. The method
- is both faster and safer.
+ If you need to determine whether an object is an instance of a particular
+ class for the purpose of casting it, consider using qobject_cast<Type *>(object)
+ instead.
\sa metaObject(), qobject_cast()
*/
@@ -2459,7 +2458,7 @@ QObject *QObject::sender() const
{
Q_D(const QObject);
- QMutexLocker(signalSlotLock(this));
+ QMutexLocker locker(signalSlotLock(this));
if (!d->currentSender)
return 0;
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp
index 82b462e..12ee413 100644
--- a/src/corelib/thread/qthread_win.cpp
+++ b/src/corelib/thread/qthread_win.cpp
@@ -39,6 +39,10 @@
**
****************************************************************************/
+//#define WINVER 0x0500
+#define _WIN32_WINNT 0x0400
+
+
#include "qthread.h"
#include "qthread_p.h"
#include "qthreadstorage.h"
diff --git a/src/gui/effects/qgraphicseffect.cpp b/src/gui/effects/qgraphicseffect.cpp
index fbd53b0..5f64698 100644
--- a/src/gui/effects/qgraphicseffect.cpp
+++ b/src/gui/effects/qgraphicseffect.cpp
@@ -41,56 +41,59 @@
/*!
\class QGraphicsEffect
- \brief The QGraphicsEffect class is the base class for all graphics effects.
+ \brief The QGraphicsEffect class is the base class for all graphics
+ effects.
\since 4.6
\ingroup multimedia
\ingroup graphicsview-api
Effects alter the appearance of elements by hooking into the rendering
- pipeline and operating between the source (e.g., a QGraphicsPixmapItem),
+ pipeline and operating between the source (e.g., a QGraphicsPixmapItem)
and the destination device (e.g., QGraphicsView's viewport). Effects can be
- disabled by calling setEnabled(); if the effect is disabled, the source is
- rendered directly.
+ disabled by calling setEnabled(false). If effects are disabled, the source
+ is rendered directly.
- If you want to add a visual effect to a e.g. a QGraphicsItem, you can either use
- one of the standard effects, or create your own effect by making a subclass
- of QGraphicsEffect. The effect can then be installed on the item by calling
- QGraphicsItem::setGraphicsEffect.
+ To add a visual effect to a QGraphicsItem, for example, you can use one of
+ the standard effects, or alternately, create your own effect by creating a
+ subclass of QGraphicsEffect. The effect can then be installed on the item
+ using QGraphicsItem::setGraphicsEffect().
- Qt provides several standard effects, including:
+ Qt provides the following standard effects:
\list
- \o QGraphicsGrayScaleEffect - renders the item in shades of gray
- \o QGraphicsColorizeEffect - renders the item in shades of any given color
- \o QGraphicsPixelizeEffect - pixelizes the item with any pixel size
\o QGraphicsBlurEffect - blurs the item by a given radius
\o QGraphicsDropShadowEffect - renders a dropshadow behind the item
+ \o QGraphicsColorizeEffect - renders the item in shades of any given color
\o QGraphicsOpacityEffect - renders the item with an opacity
- \o QGrahicsShaderEffect - renders the item with a pixel shader fragment
+ \o QGraphicsPixelizeEffect - pixelizes the item with any pixel size
+ \o QGraphicsGrayscaleEffect - renders the item in shades of gray
+ \o QGraphicsShaderEffect - renders the item with a pixel shader fragment
\endlist
- If all you want is to add an effect to an item, you should visit the
- documentation for the specific effect to learn more about how each effect
- can be used.
-
- If you want to create your own custom effect, you can start by creating a
- subclass of QGraphicsEffect (or any of the existing effects), and
- reimplement the virtual function draw(). This function is called whenever
- the effect needs to redraw. draw() has two arguments: the painter, and a
- pointer to the source (QGraphicsEffectSource). The source provides extra
- context information, such as a pointer to the item that is rendering the
- effect, any cached pixmap data, and the device rect bounds. See the draw()
- documentation for more details. You can also get a pointer to the current
- source by calling source().
-
- If your effect changes, you can call update() to request a redraw. If your
- custom effect changes the bounding rectangle of the source (e.g., a radial
- glow effect may need to apply an extra margin), you can reimplement the
+ \img graphicseffect-effects.png
+ \img graphicseffect-widget.png
+
+ For more information on how to use each effect, refer to the specific
+ effect's documentation.
+
+ To create your own custom effect, create a subclass of QGraphicsEffect (or
+ any other existing effects) and reimplement the virtual function draw().
+ This function is called whenever the effect needs to redraw. The draw()
+ function accepts two arguments: the painter and a pointer to the source
+ (QGraphicsEffectSource). The source provides extra context information,
+ such as a pointer to the item that is rendering the effect, any cached
+ pixmap data, or the device rectangle bounds. For more information, refer to
+ the documenation for draw(). To obtain a pointer to the current source,
+ simply call source().
+
+ If your effect changes, use update() to request for a redraw. If your
+ custom effect changes the bounding rectangle of the source, e.g., a radial
+ glow effect may need to apply an extra margin, you can reimplement the
virtual boundingRectFor() function, and call updateBoundingRect() to notify
the framework whenever this rectangle changes. The virtual
sourceBoundingRectChanged() function is called to notify the effects that
- the source's bounding rectangle has changed (e.g., if the source is a
- QGraphicsRectItem, then if the rectangle parameters have changed).
+ the source's bounding rectangle has changed - e.g., if the source is a
+ QGraphicsRectItem and its rectangle parameters have changed.
\sa QGraphicsItem::setGraphicsEffect(), QWidget::setGraphicsEffect(),
QGraphicsEffectSource
@@ -107,33 +110,41 @@ QT_BEGIN_NAMESPACE
/*!
\class QGraphicsEffectSource
- \brief The QGraphicsEffectSource represents the source of which a QGraphicsEffect
- is installed on.
+ \brief The QGraphicsEffectSource class represents the source on which a
+ QGraphicsEffect is installed on.
\since 4.6
- When a QGraphicsEffect is installed on e.g. a QGraphicsItem, this class will act as
- a wrapper around QGraphicsItem. E.g. calling update() is effectively the same as
- calling QGraphicsItem::update().
+ When a QGraphicsEffect is installed on a QGraphicsItem, for example, this
+ class will act as a wrapper around QGraphicsItem. Then, calling update() is
+ effectively the same as calling QGraphicsItem::update().
- It also provides a pixmap() function which creates a pixmap with the source
- painted into it.
+ QGraphicsEffectSource also provides a pixmap() function which creates a
+ pixmap with the source painted into it.
- \sa QGraphicsItem::setGraphicsEffect(), QWidget::setGraphicsEffect.
+ \sa QGraphicsItem::setGraphicsEffect(), QWidget::setGraphicsEffect().
+*/
+
+/*!
+ \internal
*/
QGraphicsEffectSource::QGraphicsEffectSource(QGraphicsEffectSourcePrivate &dd, QObject *parent)
: QObject(dd, parent)
{}
+/*!
+ Destroys the effect source.
+*/
QGraphicsEffectSource::~QGraphicsEffectSource()
{}
/*!
Returns the bounds of the current painter's device.
- This function is useful when you e.g. want to draw something in device coordinates
- and want to make sure the size of the pixmap is not bigger than the device's size.
+ This function is useful when you want to draw something in device
+ coordinates and ensure the size of the pixmap is not bigger than the size
+ of the device.
- Note that calling QGraphicsEffectSource::pixmap(Qt::DeviceCoordinates) always returns
+ Calling QGraphicsEffectSource::pixmap(Qt::DeviceCoordinates) always returns
a pixmap which is bound to the device's size.
\sa pixmap()
@@ -144,7 +155,7 @@ QRect QGraphicsEffectSource::deviceRect() const
}
/*!
- Returns the bounding rectangle of the source mapped to the \a system specified.
+ Returns the bounding rectangle of the source mapped to the given \a system.
\sa draw()
*/
@@ -154,8 +165,8 @@ QRectF QGraphicsEffectSource::boundingRect(Qt::CoordinateSystem system) const
}
/*!
- Returns a pointer to the item if this source is a QGraphicsItem;
- otherwise returns 0;
+ Returns a pointer to the item if this source is a QGraphicsItem; otherwise
+ returns 0.
\sa widget()
*/
@@ -165,8 +176,8 @@ const QGraphicsItem *QGraphicsEffectSource::graphicsItem() const
}
/*!
- Returns a pointer to the widget if this source is a QWidget;
- otherwise returns 0;
+ Returns a pointer to the widget if this source is a QWidget; otherwise
+ returns 0.
\sa graphicsItem()
*/
@@ -176,8 +187,8 @@ const QWidget *QGraphicsEffectSource::widget() const
}
/*!
- Returns a pointer to the style options (used when drawing the source)
- if available; otherwise returns 0.
+ Returns a pointer to the style options (used when drawing the source) if
+ available; otherwise returns 0.
\sa graphicsItem(), widget()
*/
@@ -187,26 +198,27 @@ const QStyleOption *QGraphicsEffectSource::styleOption() const
}
/*!
- Draws the source using the \a painter specified.
+ Draws the source using the given \a painter.
This function should only be called from QGraphicsEffect::draw().
+
For example:
\snippet doc/src/snippets/code/src_gui_effects_qgraphicseffect.cpp 0
\sa QGraphicsEffect::draw()
*/
-
void QGraphicsEffectSource::draw(QPainter *painter)
{
d_func()->draw(painter);
}
/*!
- Schedules a redraw of the source. You can call this function whenever the
- source needs to be redrawn.
+ Schedules a redraw of the source. Call this function whenever the source
+ needs to be redrawn.
- \sa QGraphicsEffect::updateBoundingRect(), QWidget::update(), QGraphicsItem::update(),
+ \sa QGraphicsEffect::updateBoundingRect(), QWidget::update(),
+ QGraphicsItem::update(),
*/
void QGraphicsEffectSource::update()
{
@@ -214,11 +226,12 @@ void QGraphicsEffectSource::update()
}
/*!
- Returns true if the source effectively is a pixmap, e.g. a QGraphicsPixmapItem.
+ Returns true if the source effectively is a pixmap, e.g., a
+ QGraphicsPixmapItem.
- This function is useful for optimization purposes, e.g. there's no point in
- drawing the source in device coordinates to avoid pixmap scaling if this function
- returns true; the source pixmap will be scaled anyways.
+ This function is useful for optimization purposes. For instance, there's no
+ point in drawing the source in device coordinates to avoid pixmap scaling
+ if this function returns true - the source pixmap will be scaled anyways.
*/
bool QGraphicsEffectSource::isPixmap() const
{
@@ -226,13 +239,14 @@ bool QGraphicsEffectSource::isPixmap() const
}
/*!
- Returns a pixmap with the source painted into it. The \a system specifies which
- coordinate system to be used for the source. The optional out parameter
- \a offset returns the offset of which the pixmap should be painted
- at using the current painter.
+ Returns a pixmap with the source painted into it.
+
+ The \a system specifies which coordinate system to be used for the source.
+ The optional \a offset parameter returns the offset where the pixmap should
+ be painted at using the current painter.
- Note that the returned pixmap is bound to the current painter's device
- rect when the specified \a system is Qt::DeviceCoordinates.
+ The returned pixmap is bound to the current painter's device rectangle when
+ \a system is Qt::DeviceCoordinates.
\sa QGraphicsEffect::draw(), boundingRect(), deviceRect()
*/
@@ -267,9 +281,9 @@ QGraphicsEffect::~QGraphicsEffect()
}
/*!
- Returns the bounding rectangle for this effect (i.e., the bounding
+ Returns the bounding rectangle for this effect, i.e., the bounding
rectangle of the source, adjusted by any margins applied by the effect
- itself).
+ itself.
\sa boundingRectFor(), updateBoundingRect()
*/
@@ -299,13 +313,13 @@ QRectF QGraphicsEffect::boundingRectFor(const QRectF &rect) const
\brief whether the effect is enabled or not.
If an effect is disabled, the source will be rendered with as normal, with
- no interference from the effect. If the effect is enabled (default), the
- source will be rendered with the effect applied.
+ no interference from the effect. If the effect is enabled, the source will
+ be rendered with the effect applied.
- This property is provided so that you can disable certain effects on slow
- platforms, in order to ensure that the user interface is responsive.
+ This property is enabled by default.
- \sa enabledChanged()
+ Using this property, you can disable certain effects on slow platforms, in
+ order to ensure that the user interface is responsive.
*/
bool QGraphicsEffect::isEnabled() const
{
@@ -329,6 +343,7 @@ void QGraphicsEffect::setEnabled(bool enable)
\fn void QGraphicsEffect::enabledChanged(bool enabled)
This signal is emitted whenever the effect is enabled or disabled.
+ The \a enabled parameter holds the effects's new enabled state.
\sa isEnabled()
*/
@@ -346,7 +361,7 @@ QGraphicsEffectSource *QGraphicsEffect::source() const
}
/*!
- This function notifies the effect framework that the effect's bounding
+ This function notifies the effect framework when the effect's bounding
rectangle has changed. As a custom effect author, you must call this
function whenever you change any parameters that will cause the virtual
boundingRectFor() function to return a different value.
@@ -364,17 +379,19 @@ void QGraphicsEffect::updateBoundingRect()
\fn virtual void QGraphicsEffect::draw(QPainter *painter,
QGraphicsEffectSource *source) = 0
- This pure virtual function draws the effect and is called whenever the source()
- needs to be drawn.
+ This pure virtual function draws the effect and is called whenever the
+ source() needs to be drawn.
- Reimplement this function in a QGraphicsEffect subclass to provide the effect's
- drawing implementation, using \a painter. The \a source parameter is provided
- for convenience; its value is the same as source(). Example:
+ Reimplement this function in a QGraphicsEffect subclass to provide the
+ effect's drawing implementation, using \a painter. The \a source parameter
+ is provided for convenience; its value is the same as source().
+
+ For example:
\snippet doc/src/snippets/code/src_gui_effects_qgraphicseffect.cpp 1
- Note that this function should not be called explicitly by the user, since it's
- meant for re-implementation purposes only.
+ This function should not be called explicitly by the user, since it is
+ meant for reimplementation purposes only.
\sa QGraphicsEffectSource
*/
@@ -386,7 +403,8 @@ void QGraphicsEffect::updateBoundingRect()
\value SourceAttached The effect is installed on a source.
\value SourceDetached The effect is uninstalled on a source.
- \value SourceBoundingRectChanged The bounding rect of the source has changed.
+ \value SourceBoundingRectChanged The bounding rect of the source has
+ changed.
\value SourceInvalidated The visual appearance of the source has changed.
*/
@@ -409,17 +427,31 @@ void QGraphicsEffect::sourceChanged(ChangeFlags flags)
A grayscale effect renders the source in shades of gray.
- \sa QGraphicsColorizeEffect
+ \img graphicseffect-grayscale.png
+
+ \sa QGraphicsDropShadowEffect, QGraphicsBlurEffect, QGraphicsPixelizeEffect,
+ QGraphicsColorizeEffect, QGraphicsOpacityEffect
+*/
+
+/*!
+ Constructs a new QGraphicsGrayscale instance.
+ The \a parent parameter is passed to QGraphicsEffect's constructor.
*/
QGraphicsGrayscaleEffect::QGraphicsGrayscaleEffect(QObject *parent)
: QGraphicsEffect(*new QGraphicsGrayscaleEffectPrivate, parent)
{
}
+/*!
+ Destroys the effect.
+*/
QGraphicsGrayscaleEffect::~QGraphicsGrayscaleEffect()
{
}
+/*!
+ \reimp
+*/
void QGraphicsGrayscaleEffect::draw(QPainter *painter, QGraphicsEffectSource *source)
{
Q_D(QGraphicsGrayscaleEffect);
@@ -442,41 +474,48 @@ void QGraphicsGrayscaleEffect::draw(QPainter *painter, QGraphicsEffectSource *so
/*!
\class QGraphicsColorizeEffect
- \brief The QGraphicsColorizeEffect provides a colorize effect.
+ \brief The QGraphicsColorizeEffect class provides a colorize effect.
\since 4.6
- A colorize effect renders the source with a tint of its color(). The
- color can be modified using the setColor() function.
+ A colorize effect renders the source with a tint of its color(). The color
+ can be modified using the setColor() function.
By default, the color is light blue (QColor(0, 0, 192)).
- \sa QGraphicsGrayscaleEffect
+ \img graphicseffect-colorize.png
+
+ \sa QGraphicsDropShadowEffect, QGraphicsBlurEffect, QGraphicsPixelizeEffect,
+ QGraphicsGrayscaleEffect, QGraphicsOpacityEffect
+*/
+
+/*!
+ Constructs a new QGraphicsColorizeEffect instance.
+ The \a parent parameter is passed to QGraphicsEffect's constructor.
*/
QGraphicsColorizeEffect::QGraphicsColorizeEffect(QObject *parent)
: QGraphicsEffect(*new QGraphicsColorizeEffectPrivate, parent)
{
}
+/*!
+ Destroys the effect.
+*/
QGraphicsColorizeEffect::~QGraphicsColorizeEffect()
{
}
/*!
- Returns the color.
+ \property QGraphicsColorizeEffect::color
+ \brief the color of the effect.
- \sa setColor(), colorChanged()
-*/
+ By default, the color is light blue (QColor(0, 0, 192)).
+*/;
QColor QGraphicsColorizeEffect::color() const
{
Q_D(const QGraphicsColorizeEffect);
return d->filter->color();
}
-/*!
- Sets the color to the \a color specified.
-
- \sa color(), colorChanged()
-*/
void QGraphicsColorizeEffect::setColor(const QColor &color)
{
Q_D(QGraphicsColorizeEffect);
@@ -491,8 +530,12 @@ void QGraphicsColorizeEffect::setColor(const QColor &color)
\fn void QGraphicsColorizeEffect::colorChanged(const QColor &color)
This signal is emitted whenever the effect's color changes.
+ The \a color parameter holds the effect's new color.
*/
+/*!
+ \reimp
+*/
void QGraphicsColorizeEffect::draw(QPainter *painter, QGraphicsEffectSource *source)
{
Q_D(QGraphicsColorizeEffect);
@@ -514,30 +557,45 @@ void QGraphicsColorizeEffect::draw(QPainter *painter, QGraphicsEffectSource *sou
/*!
\class QGraphicsPixelizeEffect
- \brief The QGraphicsPixelizeEffect provides a pixelize effect.
+ \brief The QGraphicsPixelizeEffect class provides a pixelize effect.
\since 4.6
- A pixelize effect renders the source in lower resolution. This effect
- is useful for reducing details, in e.g. a censorship. The resolution
- can be modified using the setPixelSize() function.
+ A pixelize effect renders the source in lower resolution. This effect is
+ useful for reducing details, like censorship. The resolution can be
+ modified using the setPixelSize() function.
By default, the pixel size is 3.
- \sa QGraphicsBlurEffect
+ \img graphicseffect-pixelize.png
+
+ \sa QGraphicsDropShadowEffect, QGraphicsBlurEffect, QGraphicsGrayscaleEffect,
+ QGraphicsColorizeEffect, QGraphicsOpacityEffect
+*/
+
+/*!
+ Constructs a new QGraphicsPixelizeEffect instance.
+ The \a parent parameter is passed to QGraphicsEffect's constructor.
*/
QGraphicsPixelizeEffect::QGraphicsPixelizeEffect(QObject *parent)
: QGraphicsEffect(*new QGraphicsPixelizeEffectPrivate, parent)
{
}
+/*!
+ Destroys the effect.
+*/
QGraphicsPixelizeEffect::~QGraphicsPixelizeEffect()
{
}
/*!
- Returns the size of a pixel.
+ \property QGraphicsPixelizeEffect::pixelSize
+ \brief the size of a pixel in the effect.
- \sa setPixelSize(), pixelSizeChanged()
+ Setting the pixel size to 2 means two pixels in the source will be used to
+ represent one pixel. Using a bigger size results in lower resolution.
+
+ By default, the pixel size is 3.
*/
int QGraphicsPixelizeEffect::pixelSize() const
{
@@ -545,15 +603,6 @@ int QGraphicsPixelizeEffect::pixelSize() const
return d->pixelSize;
}
-/*!
- Sets the size of a pixel to the \a size specified.
-
- Setting the \a size to e.g. 2 means two pixels in the source will
- be used to represent one pixel. Using a bigger size results in
- lower resolution.
-
- \sa pixelSize(), pixelSizeChanged()
-*/
void QGraphicsPixelizeEffect::setPixelSize(int size)
{
Q_D(QGraphicsPixelizeEffect);
@@ -568,6 +617,7 @@ void QGraphicsPixelizeEffect::setPixelSize(int size)
\fn void QGraphicsPixelizeEffect::pixelSizeChanged(int size)
This signal is emitted whenever the effect's pixel size changes.
+ The \a size parameter holds the effect's new pixel size.
*/
static inline void pixelize(QImage *image, int pixelSize)
@@ -591,6 +641,9 @@ static inline void pixelize(QImage *image, int pixelSize)
}
}
+/*!
+ \reimp
+*/
void QGraphicsPixelizeEffect::draw(QPainter *painter, QGraphicsEffectSource *source)
{
Q_D(QGraphicsPixelizeEffect);
@@ -623,31 +676,46 @@ void QGraphicsPixelizeEffect::draw(QPainter *painter, QGraphicsEffectSource *sou
/*!
\class QGraphicsBlurEffect
- \brief The QGraphicsBlurEffect provides a blur effect.
+ \brief The QGraphicsBlurEffect class provides a blur effect.
\since 4.6
A blur effect blurs the source. This effect is useful for reducing details,
- e.g. when the source loses focus and you want to draw attention to other
+ such as when the source loses focus and you want to draw attention to other
elements. The level of detail can be modified using the setBlurRadius()
function.
By default, the blur radius is 5 pixels.
- \sa QGraphicsPixelizeEffect
+ \img graphicseffect-blur.png
+
+ \sa QGraphicsDropShadowEffect, QGraphicsPixelizeEffect, QGraphicsGrayscaleEffect,
+ QGraphicsColorizeEffect, QGraphicsOpacityEffect
+*/
+
+/*!
+ Constructs a new QGraphicsBlurEffect instance.
+ The \a parent parameter is passed to QGraphicsEffect's constructor.
*/
QGraphicsBlurEffect::QGraphicsBlurEffect(QObject *parent)
: QGraphicsEffect(*new QGraphicsBlurEffectPrivate, parent)
{
}
+/*!
+ Destroys the effect.
+*/
QGraphicsBlurEffect::~QGraphicsBlurEffect()
{
}
/*!
- Returns the blur radius.
+ \property QGraphicsBlurEffect::blurRadius
+ \brief the blur radius of the effect.
+
+ Using a smaller radius results in a sharper appearance, whereas a bigger
+ radius results in a more blurred appearance.
- \sa setBlurRadius(), blurRadiusChanged()
+ By default, the blur radius is 5 pixels.
*/
int QGraphicsBlurEffect::blurRadius() const
{
@@ -655,14 +723,6 @@ int QGraphicsBlurEffect::blurRadius() const
return d->filter->radius();
}
-/*!
- Sets the blur radius to the \a radius specified.
-
- Using a smaller radius results in a sharper appearance, whereas a
- bigger radius results in a more blurry appearance.
-
- \sa blurRadius(), blurRadiusChanged()
-*/
void QGraphicsBlurEffect::setBlurRadius(int radius)
{
Q_D(QGraphicsBlurEffect);
@@ -678,14 +738,21 @@ void QGraphicsBlurEffect::setBlurRadius(int radius)
\fn void QGraphicsBlurEffect::blurRadiusChanged(int radius)
This signal is emitted whenever the effect's blur radius changes.
+ The \a radius parameter holds the effect's new blur radius.
*/
+/*!
+ \reimp
+*/
QRectF QGraphicsBlurEffect::boundingRectFor(const QRectF &rect) const
{
Q_D(const QGraphicsBlurEffect);
return d->filter->boundingRectFor(rect);
}
+/*!
+ \reimp
+*/
void QGraphicsBlurEffect::draw(QPainter *painter, QGraphicsEffectSource *source)
{
Q_D(QGraphicsBlurEffect);
@@ -716,28 +783,44 @@ void QGraphicsBlurEffect::draw(QPainter *painter, QGraphicsEffectSource *source)
\since 4.6
A drop shadow effect renders the source with a drop shadow. The color of
- the drop shadow can be modified using the setColor() function, the drop
- shadow offset can be modified using the setOffset function, and the blur
- radius of the drop shadow can be changed through the setBlurRadius()
+ the drop shadow can be modified using the setColor() function. The drop
+ shadow offset can be modified using the setOffset() function and the blur
+ radius of the drop shadow can be changed with the setBlurRadius()
function.
By default, the drop shadow is a semi-transparent dark gray
- (QColor(63, 63, 63, 180)) shadow, blurred with a radius of 1 at an
- offset of 8 pixels towards the lower right.
+ (QColor(63, 63, 63, 180)) shadow, blurred with a radius of 1 at an offset
+ of 8 pixels towards the lower right.
+
+ \img graphicseffect-drop-shadow.png
+
+ \sa QGraphicsBlurEffect, QGraphicsPixelizeEffect, QGraphicsGrayscaleEffect,
+ QGraphicsColorizeEffect, QGraphicsOpacityEffect
+*/
+
+/*!
+ Constructs a new QGraphicsDropShadowEffect instance.
+ The \a parent parameter is passed to QGraphicsEffect's constructor.
*/
QGraphicsDropShadowEffect::QGraphicsDropShadowEffect(QObject *parent)
: QGraphicsEffect(*new QGraphicsDropShadowEffectPrivate, parent)
{
}
+/*!
+ Destroys the effect.
+*/
QGraphicsDropShadowEffect::~QGraphicsDropShadowEffect()
{
}
/*!
- Returns the shadow offset in pixels.
+ \property QGraphicsDropShadowEffect::offset
+ \brief the shadow offset in pixels.
- \sa setOffset(), blurRadius(), color(), offsetChanged()
+ By default, the offset is 8 pixels towards the lower right.
+
+ \sa blurRadius(), color()
*/
QPointF QGraphicsDropShadowEffect::offset() const
{
@@ -745,11 +828,6 @@ QPointF QGraphicsDropShadowEffect::offset() const
return d->filter->offset();
}
-/*!
- Sets the shadow offset in pixels to the \a offset specified.
-
- \sa offset(), setBlurRadius(), setColor(), offsetChanged()
-*/
void QGraphicsDropShadowEffect::setOffset(const QPointF &offset)
{
Q_D(QGraphicsDropShadowEffect);
@@ -765,12 +843,19 @@ void QGraphicsDropShadowEffect::setOffset(const QPointF &offset)
\fn void QGraphicsDropShadowEffect::offsetChanged(const QPointF &offset)
This signal is emitted whenever the effect's shadow offset changes.
+ The \a offset parameter holds the effect's new shadow offset.
*/
/*!
- Returns the radius in pixels of the blur on the drop shadow.
+ \property QGraphicsDropShadowEffect::blurRadius
+ \brief the blur radius in pixels of the drop shadow.
+
+ Using a smaller radius results in a sharper shadow, whereas using a bigger
+ radius results in a more blurred shadow.
+
+ By default, the blur radius is 1 pixel.
- \sa setBlurRadius(), color(), offset(), blurRadiusChanged()
+ \sa color(), offset().
*/
int QGraphicsDropShadowEffect::blurRadius() const
{
@@ -778,15 +863,6 @@ int QGraphicsDropShadowEffect::blurRadius() const
return d->filter->blurRadius();
}
-/*!
- Sets the radius in pixels of the blur on the drop shadow to the
- \a blurRadius specified.
-
- Using a smaller radius results in a sharper shadow, whereas using
- a bigger radius results in a more blurry shadow.
-
- \sa blurRadius(), setColor(), setOffset(), blurRadiusChanged()
-*/
void QGraphicsDropShadowEffect::setBlurRadius(int blurRadius)
{
Q_D(QGraphicsDropShadowEffect);
@@ -802,12 +878,17 @@ void QGraphicsDropShadowEffect::setBlurRadius(int blurRadius)
\fn void QGraphicsDropShadowEffect::blurRadiusChanged(int blurRadius)
This signal is emitted whenever the effect's blur radius changes.
+ The \a blurRadius parameter holds the effect's new blur radius.
*/
/*!
- Returns the color of the drop shadow.
+ \property QGraphicsDropShadowEffect::color
+ \brief the color of the drop shadow.
- \sa setColor, offset(), blurRadius(), colorChanged()
+ By default, the drop color is a semi-transparent dark gray
+ (QColor(63, 63, 63, 180)).
+
+ \sa offset(), blurRadius()
*/
QColor QGraphicsDropShadowEffect::color() const
{
@@ -815,11 +896,6 @@ QColor QGraphicsDropShadowEffect::color() const
return d->filter->color();
}
-/*!
- Sets the color of the drop shadow to the \a color specified.
-
- \sa color(), setOffset(), setBlurRadius(), colorChanged()
-*/
void QGraphicsDropShadowEffect::setColor(const QColor &color)
{
Q_D(QGraphicsDropShadowEffect);
@@ -834,14 +910,21 @@ void QGraphicsDropShadowEffect::setColor(const QColor &color)
\fn void QGraphicsDropShadowEffect::colorChanged(const QColor &color)
This signal is emitted whenever the effect's color changes.
+ The \a color parameter holds the effect's new color.
*/
+/*!
+ \reimp
+*/
QRectF QGraphicsDropShadowEffect::boundingRectFor(const QRectF &rect) const
{
Q_D(const QGraphicsDropShadowEffect);
return d->filter->boundingRectFor(rect);
}
+/*!
+ \reimp
+*/
void QGraphicsDropShadowEffect::draw(QPainter *painter, QGraphicsEffectSource *source)
{
Q_D(QGraphicsDropShadowEffect);
@@ -871,25 +954,42 @@ void QGraphicsDropShadowEffect::draw(QPainter *painter, QGraphicsEffectSource *s
\brief The QGraphicsOpacityEffect class provides an opacity effect.
\since 4.6
- An opacity effects renders the source with an opacity. This effect is useful
- for making the source semi-transparent, in e.g. a fade-in/fade-out sequence.
- The opacity can be modified using the setOpacity() function.
+ An opacity effect renders the source with an opacity. This effect is useful
+ for making the source semi-transparent, similar to a fade-in/fade-out
+ sequence. The opacity can be modified using the setOpacity() function.
By default, the opacity is 0.7.
+
+ \img graphicseffect-opacity.png
+
+ \sa QGraphicsDropShadowEffect, QGraphicsBlurEffect, QGraphicsPixelizeEffect,
+ QGraphicsGrayscaleEffect, QGraphicsColorizeEffect
+*/
+
+/*!
+ Constructs a new QGraphicsOpacityEffect instance.
+ The \a parent parameter is passed to QGraphicsEffect's constructor.
*/
QGraphicsOpacityEffect::QGraphicsOpacityEffect(QObject *parent)
: QGraphicsEffect(*new QGraphicsOpacityEffectPrivate, parent)
{
}
+/*!
+ Destroys the effect.
+*/
QGraphicsOpacityEffect::~QGraphicsOpacityEffect()
{
}
/*!
- Returns the opacity.
+ \property QGraphicsOpacityEffect::opacity
+ \brief the opacity of the effect.
+
+ The value should be in the range of 0.0 to 1.0, where 0.0 is
+ fully transparent and 1.0 is fully opaque.
- \sa setOpacity(), opacityChanged()
+ By default, the opacity is 0.7.
*/
qreal QGraphicsOpacityEffect::opacity() const
{
@@ -897,13 +997,6 @@ qreal QGraphicsOpacityEffect::opacity() const
return d->opacity;
}
-/*!
- Sets the opacity to the \a opacity specified. The value should be in
- the range 0.0 to 1.0, where 0.0 is fully transparent and 1.0 is
- fully opaque.
-
- \sa opacity(), opacityChanged()
-*/
void QGraphicsOpacityEffect::setOpacity(qreal opacity)
{
Q_D(QGraphicsOpacityEffect);
@@ -920,8 +1013,12 @@ void QGraphicsOpacityEffect::setOpacity(qreal opacity)
\fn void QGraphicsOpacityEffect::opacityChanged(qreal opacity)
This signal is emitted whenever the effect's opacity changes.
+ The \a opacity parameter holds the effect's new opacity.
*/
+/*!
+ \reimp
+*/
void QGraphicsOpacityEffect::draw(QPainter *painter, QGraphicsEffectSource *source)
{
Q_D(QGraphicsOpacityEffect);
diff --git a/src/gui/effects/qgraphicseffect_p.h b/src/gui/effects/qgraphicseffect_p.h
index 175bd99..6ce5cda 100644
--- a/src/gui/effects/qgraphicseffect_p.h
+++ b/src/gui/effects/qgraphicseffect_p.h
@@ -164,7 +164,7 @@ class QGraphicsOpacityEffectPrivate : public QGraphicsEffectPrivate
{
Q_DECLARE_PUBLIC(QGraphicsOpacityEffect)
public:
- QGraphicsOpacityEffectPrivate() : opacity(0.7) {}
+ QGraphicsOpacityEffectPrivate() : opacity(qreal(0.7)) {}
~QGraphicsOpacityEffectPrivate() {}
qreal opacity;
diff --git a/src/gui/embedded/qkbd_defaultmap_qws_p.h b/src/gui/embedded/qkbd_defaultmap_qws_p.h
index 2903492..a6c2d25 100644
--- a/src/gui/embedded/qkbd_defaultmap_qws_p.h
+++ b/src/gui/embedded/qkbd_defaultmap_qws_p.h
@@ -53,6 +53,8 @@
// We mean it.
//
+// no QT_BEGIN_NAMESPACE, since we include it internally...
+
const QWSKeyboard::Mapping QWSKbPrivate::s_keymap_default[] = {
{ 1, 0xffff, 0x01000000, 0x00, 0x00, 0x0000 },
{ 2, 0x0031, 0x00000031, 0x00, 0x00, 0x0000 },
diff --git a/src/gui/embedded/qkbd_qws_p.h b/src/gui/embedded/qkbd_qws_p.h
index df7ce1b..5af8f7c 100644
--- a/src/gui/embedded/qkbd_qws_p.h
+++ b/src/gui/embedded/qkbd_qws_p.h
@@ -55,6 +55,8 @@
#include <QDataStream>
+QT_BEGIN_NAMESPACE
+
namespace QWSKeyboard {
const quint32 FileMagic = 0x514d4150; // 'QMAP'
@@ -127,4 +129,6 @@ inline QDataStream &operator<<(QDataStream &ds, const QWSKeyboard::Composing &c)
}
#endif // QT_NO_DATASTREAM
+QT_END_NAMESPACE
+
#endif // QWSKEYBOARD_H
diff --git a/src/gui/embedded/qkbdqnx_qws.cpp b/src/gui/embedded/qkbdqnx_qws.cpp
index 4f0b9de..6e147dd 100644
--- a/src/gui/embedded/qkbdqnx_qws.cpp
+++ b/src/gui/embedded/qkbdqnx_qws.cpp
@@ -49,6 +49,9 @@
#include "qplatformdefs.h"
#include <errno.h>
+
+QT_BEGIN_NAMESPACE
+
/*!
\class QWSQnxKeyboardHandler
\preliminary
@@ -229,3 +232,5 @@ void QWSQnxKeyboardHandler::socketActivated()
// (on QNX, isPress is not set when the key event is repeated).
processKeyEvent(unicode, key, modifiers, isPress || isRepeat, isRepeat);
}
+
+QT_END_NAMESPACE
diff --git a/src/gui/embedded/qlock.cpp b/src/gui/embedded/qlock.cpp
index c32e9b5..9f2d3b8 100644
--- a/src/gui/embedded/qlock.cpp
+++ b/src/gui/embedded/qlock.cpp
@@ -41,10 +41,11 @@
#include "qlock_p.h"
-QT_BEGIN_NAMESPACE
#ifdef QT_NO_QWS_MULTIPROCESS
+QT_BEGIN_NAMESPACE
+
/* no multiprocess - use a dummy */
QLock::QLock(const QString & /*filename*/, char /*id*/, bool /*create*/)
@@ -77,6 +78,8 @@ bool QLock::locked() const
return data;
}
+QT_END_NAMESPACE
+
#else // QT_NO_QWS_MULTIPROCESS
#include "qwssignalhandler_p.h"
@@ -110,6 +113,9 @@ union semun {
#include <private/qcore_unix_p.h> // overrides QT_OPEN
+
+QT_BEGIN_NAMESPACE
+
#define MAX_LOCKS 200 // maximum simultaneous read locks
class QLockData
@@ -324,6 +330,7 @@ bool QLock::locked() const
return (data->count > 0);
}
+QT_END_NAMESPACE
+
#endif // QT_NO_QWS_MULTIPROCESS
-QT_END_NAMESPACE
diff --git a/src/gui/embedded/qmousetslib_qws.h b/src/gui/embedded/qmousetslib_qws.h
index 4dd39b5..71672f0 100644
--- a/src/gui/embedded/qmousetslib_qws.h
+++ b/src/gui/embedded/qmousetslib_qws.h
@@ -73,8 +73,8 @@ protected:
};
-QT_END_NAMESPACE
#endif // QT_NO_QWS_MOUSE_TSLIB
+QT_END_NAMESPACE
QT_END_HEADER
#endif // QMOUSETSLIB_QWS_H
diff --git a/src/gui/embedded/qscreen_qws.h b/src/gui/embedded/qscreen_qws.h
index 275e83f..307c2fd 100644
--- a/src/gui/embedded/qscreen_qws.h
+++ b/src/gui/embedded/qscreen_qws.h
@@ -50,6 +50,8 @@
#include <QtGui/qimage.h>
#include <QtGui/qregion.h>
+struct fb_cmap;
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -169,8 +171,6 @@ private:
#endif // QT_NO_QWS_CURSOR
-struct fb_cmap;
-
// A (used) chunk of offscreen memory
class QPoolEntry
diff --git a/src/gui/embedded/qscreenlinuxfb_qws.cpp b/src/gui/embedded/qscreenlinuxfb_qws.cpp
index 69e5808..1679ef2 100644
--- a/src/gui/embedded/qscreenlinuxfb_qws.cpp
+++ b/src/gui/embedded/qscreenlinuxfb_qws.cpp
@@ -291,8 +291,8 @@ bool QLinuxFbScreen::connect(const QString &displaySpec)
d_ptr->fd = QT_OPEN(dev.toLatin1().constData(), O_RDONLY);
}
- fb_fix_screeninfo finfo;
- fb_var_screeninfo vinfo;
+ ::fb_fix_screeninfo finfo;
+ ::fb_var_screeninfo vinfo;
//#######################
// Shut up Valgrind
memset(&vinfo, 0, sizeof(vinfo));
@@ -429,7 +429,7 @@ bool QLinuxFbScreen::connect(const QString &displaySpec)
if((vinfo.bits_per_pixel==8) || (vinfo.bits_per_pixel==4)) {
screencols= (vinfo.bits_per_pixel==8) ? 256 : 16;
int loopc;
- fb_cmap startcmap;
+ ::fb_cmap startcmap;
startcmap.start=0;
startcmap.len=screencols;
startcmap.red=(unsigned short int *)
diff --git a/src/gui/embedded/qscreenlinuxfb_qws.h b/src/gui/embedded/qscreenlinuxfb_qws.h
index eb47848..e3c712a 100644
--- a/src/gui/embedded/qscreenlinuxfb_qws.h
+++ b/src/gui/embedded/qscreenlinuxfb_qws.h
@@ -44,6 +44,11 @@
#include <QtGui/qscreen_qws.h>
+struct fb_cmap;
+struct fb_var_screeninfo;
+struct fb_fix_screeninfo;
+
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -70,9 +75,6 @@ public:
};
-struct fb_cmap;
-struct fb_var_screeninfo;
-struct fb_fix_screeninfo;
class QLinuxFbScreenPrivate;
class Q_GUI_EXPORT QLinuxFbScreen : public QScreen
diff --git a/src/gui/embedded/qscreenproxy_qws.cpp b/src/gui/embedded/qscreenproxy_qws.cpp
index b566dc0..b87fdd1 100644
--- a/src/gui/embedded/qscreenproxy_qws.cpp
+++ b/src/gui/embedded/qscreenproxy_qws.cpp
@@ -45,6 +45,7 @@
#include <qregexp.h>
+QT_BEGIN_NAMESPACE
#ifndef QT_NO_QWS_CURSOR
/*!
@@ -629,4 +630,6 @@ QRegion QProxyScreen::region() const
return QScreen::region();
}
+QT_END_NAMESPACE
+
#endif // QT_NO_QWS_PROXYSCREEN
diff --git a/src/gui/embedded/qscreenqnx_qws.cpp b/src/gui/embedded/qscreenqnx_qws.cpp
index 70f6d6b..77fe13e 100644
--- a/src/gui/embedded/qscreenqnx_qws.cpp
+++ b/src/gui/embedded/qscreenqnx_qws.cpp
@@ -44,6 +44,8 @@
#include <gf/gf.h>
+QT_BEGIN_NAMESPACE
+
// This struct holds all the pointers to QNX's internals
struct QQnxScreenContext
{
@@ -445,3 +447,4 @@ void QQnxScreen::exposeRegion(QRegion r, int changing)
gf_draw_end(d->context);
}
+QT_END_NAMESPACE
diff --git a/src/gui/embedded/qsoundqss_qws.cpp b/src/gui/embedded/qsoundqss_qws.cpp
index 2f5f39a..811943a 100644
--- a/src/gui/embedded/qsoundqss_qws.cpp
+++ b/src/gui/embedded/qsoundqss_qws.cpp
@@ -67,10 +67,10 @@
#include <qdebug.h>
-QT_BEGIN_NAMESPACE
-
extern int errno;
+QT_BEGIN_NAMESPACE
+
#define QT_QWS_SOUND_16BIT 1 // or 0, or undefined for always 0
#define QT_QWS_SOUND_STEREO 1 // or 0, or undefined for always 0
diff --git a/src/gui/embedded/qwsutils_qws.h b/src/gui/embedded/qwsutils_qws.h
index 23e0104..fe959ef 100644
--- a/src/gui/embedded/qwsutils_qws.h
+++ b/src/gui/embedded/qwsutils_qws.h
@@ -44,6 +44,12 @@
#include <QtCore/QIODevice>
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Gui)
+
#ifndef QT_NO_SXE
#define QWS_SOCK_BASE QUnixSocket
#define QWS_SOCK_SERVER_BASE QUnixSocketServer
@@ -58,12 +64,6 @@ class QTcpServer;
class QWSSocket;
class QWSServerSocket;
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Gui)
-
/********************************************************************
*
* Convenient socket functions
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout.cpp b/src/gui/graphicsview/qgraphicsanchorlayout.cpp
index 2894c59..95561b7 100644
--- a/src/gui/graphicsview/qgraphicsanchorlayout.cpp
+++ b/src/gui/graphicsview/qgraphicsanchorlayout.cpp
@@ -65,8 +65,9 @@
automatically added to the layout, and if items are removed, all their anchors will be
automatically removed
- \section1 Size Hints and Size Policies in QGraphicsLinearLayout
- QGraphicsLinearLayout respects each item's size hints and size policies. However it does
+ \section1 Size Hints and Size Policies in QGraphicsAnchorLayout
+
+ QGraphicsAnchorLayout respects each item's size hints and size policies. However it does
not respect stretch factors currently. This might change in the future, so please refrain
from using stretch factors in anchor layout to avoid any future regressions.
@@ -83,6 +84,10 @@
QT_BEGIN_NAMESPACE
+/*!
+ Constructs a QGraphicsAnchorLayout instance. \a parent is passed to
+ QGraphicsLayout's constructor.
+ */
QGraphicsAnchorLayout::QGraphicsAnchorLayout(QGraphicsLayoutItem *parent)
: QGraphicsLayout(*new QGraphicsAnchorLayoutPrivate(), parent)
{
@@ -90,6 +95,9 @@ QGraphicsAnchorLayout::QGraphicsAnchorLayout(QGraphicsLayoutItem *parent)
d->createLayoutEdges();
}
+/*!
+ Destroys the QGraphicsAnchorLayout object.
+*/
QGraphicsAnchorLayout::~QGraphicsAnchorLayout()
{
Q_D(QGraphicsAnchorLayout);
@@ -187,32 +195,41 @@ void QGraphicsAnchorLayout::addCornerAnchors(QGraphicsLayoutItem *firstItem,
}
/*!
- \fn QGraphicsAnchorLayout::addLeftAndRightAnchors(QGraphicsLayoutItem *firstEdge, QGraphicsLayoutItem *secondEdge)
+ \fn QGraphicsAnchorLayout::addLeftAndRightAnchors(QGraphicsLayoutItem *firstItem, QGraphicsLayoutItem *secondItem)
+
+ Anchors the left and right edges of \a firstItem to the same edges of
+ \a secondItem.
This convenience function is equivalent to calling
\code
- l->addAnchor(firstEdge, Qt::AnchorLeft, secondEdge, Qt::AnchorLeft);
- l->addAnchor(firstEdge, Qt::AnchorRight, secondEdge, Qt::AnchorRight);
+ l->addAnchor(firstItem, Qt::AnchorLeft, secondItem, Qt::AnchorLeft);
+ l->addAnchor(firstItem, Qt::AnchorRight, secondItem, Qt::AnchorRight);
\endcode
*/
/*!
- \fn QGraphicsAnchorLayout::addTopAndBottomAnchors(QGraphicsLayoutItem *firstEdge, QGraphicsLayoutItem *secondEdge)
+ \fn QGraphicsAnchorLayout::addTopAndBottomAnchors(QGraphicsLayoutItem *firstItem, QGraphicsLayoutItem *secondItem)
+
+ Anchors the top and bottom edges of \a firstItem to the same edges of
+ \a secondItem.
This convenience function is equivalent to calling
\code
- l->addAnchor(firstEdge, Qt::AnchorTop, secondEdge, Qt::AnchorTop);
- l->addAnchor(firstEdge, Qt::AnchorBottom, secondEdge, Qt::AnchorBottom);
+ l->addAnchor(firstItem, Qt::AnchorTop, secondItem, Qt::AnchorTop);
+ l->addAnchor(firstItem, Qt::AnchorBottom, secondItem, Qt::AnchorBottom);
\endcode
*/
/*!
- \fn QGraphicsAnchorLayout::addAllAnchors(QGraphicsLayoutItem *firstEdge, QGraphicsLayoutItem *secondEdge)
+ \fn QGraphicsAnchorLayout::addAllAnchors(QGraphicsLayoutItem *firstItem, QGraphicsLayoutItem *secondItem)
+
+ Anchors all edges (left, right, top and bottom) of \a firstItem to the same edges of
+ \a secondItem.
This convenience function is equivalent to calling
\code
- l->addLeftAndRightAnchors(firstEdge, secondEdge);
- l->addTopAndBottomAnchors(firstEdge, secondEdge);
+ l->addLeftAndRightAnchors(firstItem, secondItem);
+ l->addTopAndBottomAnchors(firstItem, secondItem);
\endcode
*/
@@ -228,6 +245,7 @@ void QGraphicsAnchorLayout::setAnchorSpacing(const QGraphicsLayoutItem *firstIte
if (!d->setAnchorSize(firstItem, firstEdge, secondItem, secondEdge, &spacing)) {
qWarning("setAnchorSpacing: The anchor does not exist.");
+ return;
}
invalidate();
}
@@ -369,7 +387,12 @@ void QGraphicsAnchorLayout::setGeometry(const QRectF &geom)
}
/*!
+ Removes the layout item at \a index without destroying it. Ownership of
+ the item is transferred to the caller.
+
Removing an item will also remove any of the anchors associated with it.
+
+ \sa itemAt(), count()
*/
void QGraphicsAnchorLayout::removeAt(int index)
{
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp
index c965712..d4afa5b 100644
--- a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp
+++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp
@@ -554,7 +554,7 @@ bool QGraphicsAnchorLayoutPrivate::simplifyGraphIteration(QGraphicsAnchorLayoutP
qDebug("candidate list for sequential simplification:\n[%s]", qPrintable(strPath));
#endif
- bool forward;
+ bool forward = true;
AnchorVertex *prev = beforeSequence;
int intervalFrom = 0;
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h
index 1a085dd..2b897d1 100644
--- a/src/gui/graphicsview/qgraphicsitem_p.h
+++ b/src/gui/graphicsview/qgraphicsitem_p.h
@@ -47,8 +47,8 @@
// -------------
//
// This file is not part of the Qt API. It exists for the convenience
-// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header
-// file may change from version to version without notice, or even be removed.
+// of other Qt classes. This header file may change from version to
+// version without notice, or even be removed.
//
// We mean it.
//
diff --git a/src/gui/graphicsview/qgraphicslayout.cpp b/src/gui/graphicsview/qgraphicslayout.cpp
index 58c174c..df6be90 100644
--- a/src/gui/graphicsview/qgraphicslayout.cpp
+++ b/src/gui/graphicsview/qgraphicslayout.cpp
@@ -390,8 +390,10 @@ void QGraphicsLayout::widgetEvent(QEvent *e)
QGraphicsLayout to return a pointer to the item at index \a i. The
reimplementation can assume that \a i is valid (i.e., it respects the
value of count()).
+ Together with count(), it is provided as a means of iterating over all items in a layout.
- The subclass is free to decide how to store the items.
+ The subclass is free to decide how to store the items, and the visual arrangement
+ does not have to be reflected through this function.
\sa count(), removeAt()
*/
diff --git a/src/gui/graphicsview/qgraphicslayout_p.h b/src/gui/graphicsview/qgraphicslayout_p.h
index 2ad853b..0e43b55 100644
--- a/src/gui/graphicsview/qgraphicslayout_p.h
+++ b/src/gui/graphicsview/qgraphicslayout_p.h
@@ -47,8 +47,8 @@
// -------------
//
// This file is not part of the Qt API. It exists for the convenience
-// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header
-// file may change from version to version without notice, or even be removed.
+// of other Qt classes. This header file may change from version to
+// version without notice, or even be removed.
//
// We mean it.
//
diff --git a/src/gui/graphicsview/qgraphicslayoutitem_p.h b/src/gui/graphicsview/qgraphicslayoutitem_p.h
index 5bda3ca..4d9a8c9 100644
--- a/src/gui/graphicsview/qgraphicslayoutitem_p.h
+++ b/src/gui/graphicsview/qgraphicslayoutitem_p.h
@@ -47,8 +47,8 @@
// -------------
//
// This file is not part of the Qt API. It exists for the convenience
-// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header
-// file may change from version to version without notice, or even be removed.
+// of other Qt classes. This header file may change from version to
+// version without notice, or even be removed.
//
// We mean it.
//
diff --git a/src/gui/graphicsview/qgraphicslinearlayout.cpp b/src/gui/graphicsview/qgraphicslinearlayout.cpp
index 185780a..1b271e5 100644
--- a/src/gui/graphicsview/qgraphicslinearlayout.cpp
+++ b/src/gui/graphicsview/qgraphicslinearlayout.cpp
@@ -277,7 +277,7 @@ void QGraphicsLinearLayout::insertItem(int index, QGraphicsLayoutItem *item)
Q_ASSERT(item);
d->fixIndex(&index);
d->engine.insertRow(index, d->orientation);
- new QGridLayoutItem(&d->engine, item, d->gridRow(index), d->gridColumn(index));
+ new QGridLayoutItem(&d->engine, item, d->gridRow(index), d->gridColumn(index), 1, 1, 0, index);
invalidate();
}
@@ -471,6 +471,7 @@ int QGraphicsLinearLayout::count() const
/*!
\reimp
+ When iterating from 0 and up, it will return the items in the visual arranged order.
*/
QGraphicsLayoutItem *QGraphicsLinearLayout::itemAt(int index) const
{
diff --git a/src/gui/graphicsview/qgraphicsproxywidget_p.h b/src/gui/graphicsview/qgraphicsproxywidget_p.h
index e2be89c..04fe40a 100644
--- a/src/gui/graphicsview/qgraphicsproxywidget_p.h
+++ b/src/gui/graphicsview/qgraphicsproxywidget_p.h
@@ -47,8 +47,8 @@
// -------------
//
// This file is not part of the Qt API. It exists for the convenience
-// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header
-// file may change from version to version without notice, or even be removed.
+// of other Qt classes. This header file may change from version to
+// version without notice, or even be removed.
//
// We mean it.
//
diff --git a/src/gui/graphicsview/qgraphicsscene_p.h b/src/gui/graphicsview/qgraphicsscene_p.h
index e19e60e..c46c906 100644
--- a/src/gui/graphicsview/qgraphicsscene_p.h
+++ b/src/gui/graphicsview/qgraphicsscene_p.h
@@ -47,8 +47,8 @@
// -------------
//
// This file is not part of the Qt API. It exists for the convenience
-// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header
-// file may change from version to version without notice, or even be removed.
+// of other Qt classes. This header file may change from version to
+// version without notice, or even be removed.
//
// We mean it.
//
diff --git a/src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h b/src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h
index 27c499d..5cc8449 100644
--- a/src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h
+++ b/src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h
@@ -44,8 +44,8 @@
// -------------
//
// This file is not part of the Qt API. It exists for the convenience
-// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header
-// file may change from version to version without notice, or even be removed.
+// of other Qt classes. This header file may change from version to
+// version without notice, or even be removed.
//
// We mean it.
//
diff --git a/src/gui/graphicsview/qgraphicssceneevent.cpp b/src/gui/graphicsview/qgraphicssceneevent.cpp
index 3ec14c3..afcc4e1 100644
--- a/src/gui/graphicsview/qgraphicssceneevent.cpp
+++ b/src/gui/graphicsview/qgraphicssceneevent.cpp
@@ -87,9 +87,11 @@
\since 4.2
\ingroup graphicsview-api
- When a QGraphicsView receives a QMouseEvent, it translates it to
- a QGraphicsSceneMouseEvent. The event is then forwarded to the
- QGraphicsScene associated with the view.
+ When a QGraphicsView receives a QMouseEvent, it translates it to a
+ QGraphicsSceneMouseEvent. The event is then forwarded to the
+ QGraphicsScene associated with the view. If the event is not
+ handled by the scene, the view may use it, e.g., for the
+ \l{QGraphicsView::}{DragMode}.
In addition to containing the item, scene, and screen coordinates
of the event (as pos(), scenePos(), and screenPos()), mouse
diff --git a/src/gui/graphicsview/qgraphicssceneindex_p.h b/src/gui/graphicsview/qgraphicssceneindex_p.h
index d922036..00e5f89 100644
--- a/src/gui/graphicsview/qgraphicssceneindex_p.h
+++ b/src/gui/graphicsview/qgraphicssceneindex_p.h
@@ -47,8 +47,8 @@
// -------------
//
// This file is not part of the Qt API. It exists for the convenience
-// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header
-// file may change from version to version without notice, or even be removed.
+// of other Qt classes. This header file may change from version to
+// version without notice, or even be removed.
//
// We mean it.
//
diff --git a/src/gui/graphicsview/qgraphicstransform_p.h b/src/gui/graphicsview/qgraphicstransform_p.h
index 2c563e4..c9b95fd 100644
--- a/src/gui/graphicsview/qgraphicstransform_p.h
+++ b/src/gui/graphicsview/qgraphicstransform_p.h
@@ -47,8 +47,8 @@
// -------------
//
// This file is not part of the Qt API. It exists for the convenience
-// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header
-// file may change from version to version without notice, or even be removed.
+// of other Qt classes. This header file may change from version to
+// version without notice, or even be removed.
//
// We mean it.
//
diff --git a/src/gui/graphicsview/qgraphicsview_p.h b/src/gui/graphicsview/qgraphicsview_p.h
index bdf5ddd..a40dfdc 100644
--- a/src/gui/graphicsview/qgraphicsview_p.h
+++ b/src/gui/graphicsview/qgraphicsview_p.h
@@ -47,8 +47,8 @@
// -------------
//
// This file is not part of the Qt API. It exists for the convenience
-// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header
-// file may change from version to version without notice, or even be removed.
+// of other Qt classes. This header file may change from version to
+// version without notice, or even be removed.
//
// We mean it.
//
diff --git a/src/gui/graphicsview/qgraphicswidget_p.h b/src/gui/graphicsview/qgraphicswidget_p.h
index 0e1fe46..1ee79e1 100644
--- a/src/gui/graphicsview/qgraphicswidget_p.h
+++ b/src/gui/graphicsview/qgraphicswidget_p.h
@@ -47,8 +47,8 @@
// -------------
//
// This file is not part of the Qt API. It exists for the convenience
-// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header
-// file may change from version to version without notice, or even be removed.
+// of other Qt classes. This header file may change from version to
+// version without notice, or even be removed.
//
// We mean it.
//
diff --git a/src/gui/graphicsview/qgridlayoutengine.cpp b/src/gui/graphicsview/qgridlayoutengine.cpp
index 5ad6ac9..beb9cb0 100644
--- a/src/gui/graphicsview/qgridlayoutengine.cpp
+++ b/src/gui/graphicsview/qgridlayoutengine.cpp
@@ -461,7 +461,7 @@ void QGridLayoutRowData::dump(int indent) const
QGridLayoutItem::QGridLayoutItem(QGridLayoutEngine *engine, QGraphicsLayoutItem *layoutItem,
int row, int column, int rowSpan, int columnSpan,
- Qt::Alignment alignment)
+ Qt::Alignment alignment, int itemAtIndex)
: q_engine(engine), q_layoutItem(layoutItem), q_alignment(alignment)
{
q_firstRows[Hor] = column;
@@ -471,7 +471,7 @@ QGridLayoutItem::QGridLayoutItem(QGridLayoutEngine *engine, QGraphicsLayoutItem
q_stretches[Hor] = -1;
q_stretches[Ver] = -1;
- q_engine->addItem(this);
+ q_engine->insertItem(this, itemAtIndex);
}
int QGridLayoutItem::firstRow(Qt::Orientation orientation) const
@@ -937,11 +937,20 @@ Qt::Alignment QGridLayoutEngine::effectiveAlignment(const QGridLayoutItem *layou
return align;
}
-void QGridLayoutEngine::addItem(QGridLayoutItem *item)
+/*!
+ \internal
+ The \a index is only used by QGraphicsLinearLayout to ensure that itemAt() reflects the order
+ of visual arrangement. Strictly speaking it does not have to, but most people expect it to.
+ (And if it didn't we would have to add itemArrangedAt(int index) or something..)
+ */
+void QGridLayoutEngine::insertItem(QGridLayoutItem *item, int index)
{
maybeExpandGrid(item->lastRow(), item->lastColumn());
- q_items.append(item);
+ if (index == -1)
+ q_items.append(item);
+ else
+ q_items.insert(index, item);
for (int i = item->firstRow(); i <= item->lastRow(); ++i) {
for (int j = item->firstColumn(); j <= item->lastColumn(); ++j) {
@@ -952,6 +961,11 @@ void QGridLayoutEngine::addItem(QGridLayoutItem *item)
}
}
+void QGridLayoutEngine::addItem(QGridLayoutItem *item)
+{
+ insertItem(item, -1);
+}
+
void QGridLayoutEngine::removeItem(QGridLayoutItem *item)
{
Q_ASSERT(q_items.contains(item));
diff --git a/src/gui/graphicsview/qgridlayoutengine_p.h b/src/gui/graphicsview/qgridlayoutengine_p.h
index 8f3eb13..aab695a 100644
--- a/src/gui/graphicsview/qgridlayoutengine_p.h
+++ b/src/gui/graphicsview/qgridlayoutengine_p.h
@@ -267,7 +267,8 @@ class QGridLayoutItem
{
public:
QGridLayoutItem(QGridLayoutEngine *engine, QGraphicsLayoutItem *layoutItem, int row, int column,
- int rowSpan = 1, int columnSpan = 1, Qt::Alignment alignment = 0);
+ int rowSpan = 1, int columnSpan = 1, Qt::Alignment alignment = 0,
+ int itemAtIndex = -1);
inline int firstRow() const { return q_firstRows[Ver]; }
inline int firstColumn() const { return q_firstRows[Hor]; }
@@ -378,6 +379,7 @@ public:
Qt::Alignment effectiveAlignment(const QGridLayoutItem *layoutItem) const;
+ void insertItem(QGridLayoutItem *item, int index);
void addItem(QGridLayoutItem *item);
void removeItem(QGridLayoutItem *item);
QGridLayoutItem *findLayoutItem(QGraphicsLayoutItem *layoutItem) const;
diff --git a/src/gui/graphicsview/qsimplex_p.cpp b/src/gui/graphicsview/qsimplex_p.cpp
index dbd8d4f..30a7d5d 100644
--- a/src/gui/graphicsview/qsimplex_p.cpp
+++ b/src/gui/graphicsview/qsimplex_p.cpp
@@ -293,7 +293,7 @@ int QSimplex::findPivotColumn()
int QSimplex::pivotRowForColumn(int column)
{
- qreal min = 999999999999.0; // ###
+ qreal min = qreal(999999999999.0); // ###
int minIndex = -1;
for (int i = 1; i < rows; ++i) {
diff --git a/src/gui/image/qpixmap_qws.cpp b/src/gui/image/qpixmap_qws.cpp
index e549900..a6c70a7 100644
--- a/src/gui/image/qpixmap_qws.cpp
+++ b/src/gui/image/qpixmap_qws.cpp
@@ -48,6 +48,9 @@
#include <private/qdrawhelper_p.h>
#include <private/qpixmap_raster_p.h>
+
+QT_BEGIN_NAMESPACE
+
QPixmap QPixmap::grabWindow(WId window, int x, int y, int w, int h)
{
QWidget *widget = QWidget::find(window);
@@ -148,3 +151,5 @@ int QPixmap::qwsBytesPerLine() const
return 0;
}
+
+QT_END_NAMESPACE
diff --git a/src/gui/inputmethod/qinputcontext.cpp b/src/gui/inputmethod/qinputcontext.cpp
index 35f1b65..27888ac 100644
--- a/src/gui/inputmethod/qinputcontext.cpp
+++ b/src/gui/inputmethod/qinputcontext.cpp
@@ -105,25 +105,27 @@ QT_BEGIN_NAMESPACE
\header \o Context \o Functions
\row \o Receiving information \o
- x11FilterEvent(),
- filterEvent(),
- mouseHandler()
+ x11FilterEvent(),
+ filterEvent(),
+ mouseHandler()
\row \o Sending back composed text \o
- sendEvent()
+ sendEvent()
\row \o State change notification \o
- setFocusWidget(),
- reset()
+ setFocusWidget(),
+ reset()
\row \o Context information \o
- identifierName(),
- language(),
- font(),
- isComposing()
+ identifierName(),
+ language(),
+ font(),
+ isComposing()
\endtable
+ \section1 Licensing Information
+
\legalese
Copyright (C) 2003-2004 immodule for Qt Project. All rights reserved.
diff --git a/src/gui/inputmethod/qwininputcontext_p.h b/src/gui/inputmethod/qwininputcontext_p.h
index eff223b..767fc33 100644
--- a/src/gui/inputmethod/qwininputcontext_p.h
+++ b/src/gui/inputmethod/qwininputcontext_p.h
@@ -79,6 +79,7 @@ public:
bool startComposition();
bool endComposition();
bool composition(LPARAM lparam);
+ int reconvertString(RECONVERTSTRING *reconv);
static void TranslateMessage(const MSG *msg);
static LRESULT DefWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
diff --git a/src/gui/inputmethod/qwininputcontext_win.cpp b/src/gui/inputmethod/qwininputcontext_win.cpp
index 684f325..d917cb3 100644
--- a/src/gui/inputmethod/qwininputcontext_win.cpp
+++ b/src/gui/inputmethod/qwininputcontext_win.cpp
@@ -47,6 +47,7 @@
#include "qapplication.h"
#include "qevent.h"
#include "qtextformat.h"
+#include "qtextboundaryfinder.h"
//#define Q_IME_DEBUG
@@ -810,4 +811,52 @@ QString QWinInputContext::language()
return QString();
}
+int QWinInputContext::reconvertString(RECONVERTSTRING *reconv)
+{
+ QWidget *w = focusWidget();
+ if(!w)
+ return -1;
+
+ Q_ASSERT(w->testAttribute(Qt::WA_WState_Created));
+ QString surroundingText = qvariant_cast<QString>(w->inputMethodQuery(Qt::ImSurroundingText));
+ int memSize = sizeof(RECONVERTSTRING)+(surroundingText.length()+1)*sizeof(ushort);
+ // If memory is not allocated, return the required size.
+ if (!reconv) {
+ if (surroundingText.isEmpty())
+ return -1;
+ else
+ return memSize;
+ }
+ int pos = qvariant_cast<int>(w->inputMethodQuery(Qt::ImCursorPosition));
+ // find the word in the surrounding text.
+ QTextBoundaryFinder bounds(QTextBoundaryFinder::Word, surroundingText);
+ bounds.setPosition(pos);
+ if (bounds.isAtBoundary()) {
+ if (QTextBoundaryFinder::EndWord == bounds.boundaryReasons())
+ bounds.toPreviousBoundary();
+ } else {
+ bounds.toPreviousBoundary();
+ }
+ int startPos = bounds.position();
+ bounds.toNextBoundary();
+ int endPos = bounds.position();
+ // select the text, this will be overwritten by following ime events.
+ QList<QInputMethodEvent::Attribute> attrs;
+ attrs << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, startPos, endPos-startPos, QVariant());
+ QInputMethodEvent e(QString(), attrs);
+ qt_sendSpontaneousEvent(w, &e);
+
+ reconv->dwSize = memSize;
+ reconv->dwVersion = 0;
+
+ reconv->dwStrLen = surroundingText.length();
+ reconv->dwStrOffset = sizeof(RECONVERTSTRING);
+ reconv->dwCompStrLen = endPos-startPos;
+ reconv->dwCompStrOffset = startPos*sizeof(ushort);
+ reconv->dwTargetStrLen = reconv->dwCompStrLen;
+ reconv->dwTargetStrOffset = reconv->dwCompStrOffset;
+ memcpy((char*)(reconv+1), surroundingText.utf16(), surroundingText.length()*sizeof(ushort));
+ return memSize;
+}
+
QT_END_NAMESPACE
diff --git a/src/gui/inputmethod/qwsinputcontext_qws.cpp b/src/gui/inputmethod/qwsinputcontext_qws.cpp
index 5d92e1c..371ff1d 100644
--- a/src/gui/inputmethod/qwsinputcontext_qws.cpp
+++ b/src/gui/inputmethod/qwsinputcontext_qws.cpp
@@ -111,8 +111,8 @@ void QWSInputContext::setFocusWidget( QWidget *w )
void QWSInputContext::widgetDestroyed(QWidget *w)
{
- if (w == ::activeWidget)
- ::activeWidget = 0;
+ if (w == QT_PREPEND_NAMESPACE(activeWidget))
+ QT_PREPEND_NAMESPACE(activeWidget) = 0;
QInputContext::widgetDestroyed(w);
}
@@ -138,13 +138,13 @@ void QWSInputContext::mouseHandler( int x, QMouseEvent *event)
QWidget *QWSInputContext::activeWidget()
{
- return ::activeWidget;
+ return QT_PREPEND_NAMESPACE(activeWidget);
}
bool QWSInputContext::isComposing() const
{
- return ::activeWidget != 0;
+ return QT_PREPEND_NAMESPACE(activeWidget) != 0;
}
bool QWSInputContext::translateIMQueryEvent(QWidget *w, const QWSIMQueryEvent *e)
@@ -182,8 +182,8 @@ bool QWSInputContext::translateIMEvent(QWidget *w, const QWSIMEvent *e)
stream >> preedit;
stream >> commit;
- if (preedit.isEmpty() && ::activeWidget)
- w = ::activeWidget;
+ if (preedit.isEmpty() && QT_PREPEND_NAMESPACE(activeWidget))
+ w = QT_PREPEND_NAMESPACE(activeWidget);
QInputContext *qic = w->inputContext();
if (!qic)
@@ -213,9 +213,9 @@ bool QWSInputContext::translateIMEvent(QWidget *w, const QWSIMEvent *e)
#endif
if (preedit.isEmpty())
- ::activeWidget = 0;
+ QT_PREPEND_NAMESPACE(activeWidget) = 0;
else
- ::activeWidget = w;
+ QT_PREPEND_NAMESPACE(activeWidget) = w;
QInputMethodEvent ime(preedit, attrs);
diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp
index bca5df7..ccc57d7 100644
--- a/src/gui/itemviews/qabstractitemview.cpp
+++ b/src/gui/itemviews/qabstractitemview.cpp
@@ -1661,9 +1661,6 @@ void QAbstractItemView::mouseReleaseEvent(QMouseEvent *event)
EditTrigger trigger = (selectedClicked ? SelectedClicked : NoEditTriggers);
bool edited = edit(index, trigger, event);
- if (d->selectionModel)
- d->selectionModel->select(index, selectionCommand(index, event));
-
setState(NoState);
if (click) {
diff --git a/src/gui/itemviews/qtablewidget.cpp b/src/gui/itemviews/qtablewidget.cpp
index d44c11c..b7c9703 100644
--- a/src/gui/itemviews/qtablewidget.cpp
+++ b/src/gui/itemviews/qtablewidget.cpp
@@ -226,6 +226,8 @@ QTableWidgetItem *QTableModel::takeItem(int row, int column)
itm->view = 0;
itm->d->id = -1;
tableItems[i] = 0;
+ QModelIndex ind = index(itm);
+ emit dataChanged(ind, ind);
}
return itm;
}
diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h
index e839617..f7f8ce9 100644
--- a/src/gui/kernel/qapplication_p.h
+++ b/src/gui/kernel/qapplication_p.h
@@ -264,12 +264,15 @@ typedef struct tagGESTURECONFIG
class QPanGesture;
class QPinchGesture;
+class QSwipeGesture;
+
struct QStandardGestures
{
QPanGesture *pan;
QPinchGesture *pinch;
+ QSwipeGesture *swipe;
- QStandardGestures() : pan(0), pinch(0) { }
+ QStandardGestures() : pan(0), pinch(0), swipe(0) { }
};
diff --git a/src/gui/kernel/qapplication_qws.cpp b/src/gui/kernel/qapplication_qws.cpp
index f7a7ab0..5340ae9 100644
--- a/src/gui/kernel/qapplication_qws.cpp
+++ b/src/gui/kernel/qapplication_qws.cpp
@@ -72,6 +72,7 @@
//#include "qwsregionmanager_qws.h"
#include "qwindowsystem_qws.h"
#include "private/qwindowsystem_p.h"
+#include "qdecorationfactory_qws.h"
#include "qwsdisplay_qws.h"
#include "private/qwsdisplay_qws_p.h"
@@ -122,6 +123,8 @@
#endif
#endif
+QT_BEGIN_NAMESPACE
+
#ifndef QT_NO_DIRECTPAINTER
class QDirectPainter;
extern void qt_directpainter_region(QDirectPainter *dp, const QRegion &alloc, int type);
@@ -161,13 +164,9 @@ int qt_servershmid = -1;
bool qws_overrideCursor = false;
#ifndef QT_NO_QWS_MANAGER
-#include "qdecorationfactory_qws.h"
extern Q_GUI_EXPORT QWSServer *qwsServer;
-QT_BEGIN_NAMESPACE
-
-QT_USE_NAMESPACE
static QDecoration *qws_decoration = 0;
#endif
@@ -2371,7 +2370,7 @@ void qt_cleanup()
QString QApplicationPrivate::appName() const // get application name
{
- return ::appName;
+ return QT_PREPEND_NAMESPACE(appName);
}
/*****************************************************************************
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index 76a3b1e..b92bf03 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -171,6 +171,10 @@ typedef struct tagTOUCHINPUT
#include <mywinsock.h>
#endif
+#ifndef IMR_CONFIRMRECONVERTSTRING
+#define IMR_CONFIRMRECONVERTSTRING 0x0005
+#endif
+
QT_BEGIN_NAMESPACE
#ifdef Q_WS_WINCE
@@ -2263,7 +2267,26 @@ LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam
}
break;
}
-
+ case WM_IME_REQUEST: {
+ QWidget *fw = QApplication::focusWidget();
+ QWinInputContext *im = fw ? qobject_cast<QWinInputContext *>(fw->inputContext()) : 0;
+ if (fw && im) {
+ if(wParam == IMR_RECONVERTSTRING) {
+ int ret = im->reconvertString((RECONVERTSTRING *)lParam);
+ if (ret == -1) {
+ result = false;
+ } else {
+ return ret;
+ }
+ } else if (wParam == IMR_CONFIRMRECONVERTSTRING) {
+ RETURN(TRUE);
+ } else {
+ // in all other cases, call DefWindowProc()
+ result = false;
+ }
+ }
+ break;
+ }
#ifndef Q_WS_WINCE
case WM_CHANGECBCHAIN:
case WM_DRAWCLIPBOARD:
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
index 5ab7ed2..0a45ce9 100644
--- a/src/gui/kernel/qcocoaview_mac.mm
+++ b/src/gui/kernel/qcocoaview_mac.mm
@@ -892,7 +892,7 @@ extern "C" {
qNGEvent.gestureType = QNativeGestureEvent::Rotate;
NSPoint p = [[event window] convertBaseToScreen:[event locationInWindow]];
qNGEvent.position = flipPoint(p).toPoint();
- qNGEvent.percentage = [event rotation];
+ qNGEvent.percentage = -[event rotation];
qt_sendSpontaneousEvent(qwidget, &qNGEvent);
}
@@ -905,7 +905,14 @@ extern "C" {
qNGEvent.gestureType = QNativeGestureEvent::Swipe;
NSPoint p = [[event window] convertBaseToScreen:[event locationInWindow]];
qNGEvent.position = flipPoint(p).toPoint();
- qNGEvent.direction = QSize(-[event deltaX], -[event deltaY]);
+ if ([event deltaX] == 1)
+ qNGEvent.angle = 180.0f;
+ else if ([event deltaX] == -1)
+ qNGEvent.angle = 0.0f;
+ else if ([event deltaY] == 1)
+ qNGEvent.angle = 90.0f;
+ else if ([event deltaY] == -1)
+ qNGEvent.angle = 270.0f;
qt_sendSpontaneousEvent(qwidget, &qNGEvent);
}
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index 76d52c7..9626193 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -3544,7 +3544,8 @@ QMenubarUpdatedEvent::QMenubarUpdatedEvent(QMenuBar * const menuBar)
#endif
-/*! \class QTouchEvent
+/*!
+ \class QTouchEvent
\brief The QTouchEvent class contains parameters that describe a touch event.
\since 4.6
\ingroup events
@@ -3556,27 +3557,19 @@ QMenubarUpdatedEvent::QMenubarUpdatedEvent(QMenuBar * const menuBar)
Qt::WA_AcceptTouchEvents attribute set and graphics items need to have the
\l{QGraphicsItem::setAcceptTouchEvents()}{acceptTouchEvents} attribute set to true.
- Note: when using QAbstractScrollArea based widgets, you should enabled the
- Qt::WA_AcceptTouchEvents attribute on the scroll area's
- \l{QAbstractScrollArea::viewport()}{viewport}.
+ When using QAbstractScrollArea based widgets, you should enabled the Qt::WA_AcceptTouchEvents
+ attribute on the scroll area's \l{QAbstractScrollArea::viewport()}{viewport}.
- \section1 Event Delivery and Propagation
+ Similarly to QMouseEvent, Qt automatically grabs each touch point on the first press inside a
+ widget, and the widget will receive all updates for the touch point until it is released.
+ Note that it is possible for a widget to receive events for multiple touch points, and that
+ multiple widgets may be receiving touch events at the same time.
+
+ \section1 Event Handling
All touch events are of type QEvent::TouchBegin, QEvent::TouchUpdate, or QEvent::TouchEnd.
Reimplement QWidget::event() or QAbstractScrollArea::viewportEvent() for widgets and
- QGraphicsItem::sceneEvent() for items in a graphics view to receive touch events. By default,
- QWidget::event() translates the first non-primary touch point in a QTouchEvent into a
- QMouseEvent. This makes it possible to enable touch events on existing widgets that do not
- normally handle QTouchEvent. See below for information on some special considerations needed
- when doing this.
-
- QEvent::TouchBegin is the first touch event sent to a widget. The QEvent::TouchBegin event
- contains a special accept flag that indicates whether the receiver wants the event. By default,
- the event is accepted. You should call ignore() if the touch event is not handled by your
- widget. The QEvent::TouchBegin event is propagated up the parent widget chain until a widget
- accepts it with accept(), or an event filter consumes it. For QGraphicsItems, the
- QEvent::TouchBegin event is propagated to items under the mouse (similar to mouse event
- propagation for QGraphicsItems).
+ QGraphicsItem::sceneEvent() for items in a graphics view to receive touch events.
The QEvent::TouchUpdate and QEvent::TouchEnd events are sent to the widget or item that
accepted the QEvent::TouchBegin event. If the QEvent::TouchBegin event is not accepted and not
@@ -3587,10 +3580,20 @@ QMenubarUpdatedEvent::QMenubarUpdatedEvent(QMenuBar * const menuBar)
Information about each touch point can be retrieved using the QTouchEvent::TouchPoint class.
The Qt::TouchPointState enum describes the different states that a touch point may have.
- Similar to QMouseEvent, Qt automatically grabs each touch point on the first press inside a
- widget; the widget will receive all updates for the touch point until it is released. Note that
- it is possible for a widget to receive events for multiple touch points, and that multiple
- widgets may be receiving touch events at the same time.
+ \section1 Event Delivery and Propagation
+
+ By default, QWidget::event() translates the first non-primary touch point in a QTouchEvent into
+ a QMouseEvent. This makes it possible to enable touch events on existing widgets that do not
+ normally handle QTouchEvent. See below for information on some special considerations needed
+ when doing this.
+
+ QEvent::TouchBegin is the first touch event sent to a widget. The QEvent::TouchBegin event
+ contains a special accept flag that indicates whether the receiver wants the event. By default,
+ the event is accepted. You should call ignore() if the touch event is not handled by your
+ widget. The QEvent::TouchBegin event is propagated up the parent widget chain until a widget
+ accepts it with accept(), or an event filter consumes it. For QGraphicsItems, the
+ QEvent::TouchBegin event is propagated to items under the mouse (similar to mouse event
+ propagation for QGraphicsItems).
\section1 Touch Point Grouping
@@ -3604,7 +3607,7 @@ QMenubarUpdatedEvent::QMenubarUpdatedEvent(QMenuBar * const menuBar)
\list
\i When the first touch point is detected, the destination widget is determined firstly by the
- location on screen first and secondly by the propagation rules.
+ location on screen and secondly by the propagation rules.
\i When additional touch points are detected, Qt first looks to see if there are any active
touch points on any ancestor or descendent of the widget under the new touch point. If there
@@ -3637,17 +3640,17 @@ QMenubarUpdatedEvent::QMenubarUpdatedEvent(QMenuBar * const menuBar)
events simultaneously. Combined with the default QWidget::event() handling for QTouchEvents,
this gives you great flexibility in designing multi-touch user interfaces. Be aware of the
implications. For example, is is possible that the user is moving a QSlider with one finger and
- pressing a QPushButton with another. The signals are emitted from these widgets will be
+ pressing a QPushButton with another. The signals emitted by these widgets will be
interleaved.
- \i Recursion into the event loop using one of the exec() methods (e.g. QDialog::exec() or
+ \i Recursion into the event loop using one of the exec() methods (e.g., QDialog::exec() or
QMenu::exec()) in a QTouchEvent event handler is not supported. Since there are multiple event
recipients, unexpected recursion may cause problems, including but not limited to lost events
and unexpected infinite recursion.
\i QTouchEvents are not affected by a \l{QWidget::grabMouse()}{mouse grab} or an
- \l{QApplication::activePopupWidget()}{active popup widget}. The behavior of QTouchEvents is
- undefined when opening a popup or grabbing the mouse while there are multiple active touch
+ \l{QApplication::activePopupWidget()}{active pop-up widget}. The behavior of QTouchEvents is
+ undefined when opening a pop-up or grabbing the mouse while there are multiple active touch
points.
\endlist
diff --git a/src/gui/kernel/qevent_p.h b/src/gui/kernel/qevent_p.h
index a26f585..11d3138 100644
--- a/src/gui/kernel/qevent_p.h
+++ b/src/gui/kernel/qevent_p.h
@@ -143,7 +143,7 @@ public:
Type gestureType;
float percentage;
QPoint position;
- QSize direction;
+ float angle;
#ifdef Q_WS_WIN
ulong sequenceId;
quint64 argument;
diff --git a/src/gui/kernel/qsound_qws.cpp b/src/gui/kernel/qsound_qws.cpp
index fa32dcd..83e9c5e 100644
--- a/src/gui/kernel/qsound_qws.cpp
+++ b/src/gui/kernel/qsound_qws.cpp
@@ -53,16 +53,16 @@
#include "qhash.h"
#include "qfileinfo.h"
-#ifdef MEDIA_SERVER
#include "qbytearray.h"
#include "quuid.h"
#include "qdatastream.h"
#include "qcopchannel_qws.h"
#include "qbuffer.h"
+
QT_BEGIN_NAMESPACE
-QT_USE_NAMESPACE
+#ifdef MEDIA_SERVER
#define SERVER_CHANNEL "QPE/MediaServer"
diff --git a/src/gui/kernel/qstandardgestures.cpp b/src/gui/kernel/qstandardgestures.cpp
index d798d32..de6e7c7 100644
--- a/src/gui/kernel/qstandardgestures.cpp
+++ b/src/gui/kernel/qstandardgestures.cpp
@@ -72,6 +72,7 @@ QWidgetPrivate *qt_widget_private(QWidget *widget);
QPanGesture::QPanGesture(QWidget *gestureTarget, QObject *parent)
: QGesture(*new QPanGesturePrivate, gestureTarget, parent)
{
+ setObjectName(QLatin1String("QPanGesture"));
}
void QPanGesturePrivate::setupGestureTarget(QObject *newGestureTarget)
@@ -80,16 +81,22 @@ void QPanGesturePrivate::setupGestureTarget(QObject *newGestureTarget)
if (gestureTarget && gestureTarget->isWidgetType()) {
QWidget *w = static_cast<QWidget*>(gestureTarget.data());
QApplicationPrivate::instance()->widgetGestures[w].pan = 0;
-#ifdef Q_WS_WIN
+#if defined(Q_WS_WIN)
qt_widget_private(w)->winSetupGestures();
+#elif defined(Q_WS_MAC)
+ w->setAttribute(Qt::WA_AcceptTouchEvents, false);
+ w->setAttribute(Qt::WA_TouchPadAcceptSingleTouchEvents, false);
#endif
}
if (newGestureTarget && newGestureTarget->isWidgetType()) {
QWidget *w = static_cast<QWidget*>(newGestureTarget);
QApplicationPrivate::instance()->widgetGestures[w].pan = q;
-#ifdef Q_WS_WIN
+#if defined(Q_WS_WIN)
qt_widget_private(w)->winSetupGestures();
+#elif defined(Q_WS_MAC)
+ w->setAttribute(Qt::WA_AcceptTouchEvents);
+ w->setAttribute(Qt::WA_TouchPadAcceptSingleTouchEvents);
#endif
}
QGesturePrivate::setupGestureTarget(newGestureTarget);
@@ -98,15 +105,13 @@ void QPanGesturePrivate::setupGestureTarget(QObject *newGestureTarget)
/*! \internal */
bool QPanGesture::event(QEvent *event)
{
-#if defined(Q_OS_MAC) && !defined(QT_MAC_USE_COCOA)
+#if defined(QT_MAC_USE_COCOA)
Q_D(QPanGesture);
if (event->type() == QEvent::Timer) {
const QTimerEvent *te = static_cast<QTimerEvent *>(event);
- if (te->timerId() == d->panFinishedTimer) {
- killTimer(d->panFinishedTimer);
- d->panFinishedTimer = 0;
- d->lastOffset = QSize(0, 0);
- updateState(Qt::GestureFinished);
+ if (te->timerId() == d->singleTouchPanTimer.timerId()) {
+ d->singleTouchPanTimer.stop();
+ updateState(Qt::GestureStarted);
}
}
#endif
@@ -164,8 +169,10 @@ bool QPanGesture::eventFilter(QObject *receiver, QEvent *event)
/*! \internal */
bool QPanGesture::filterEvent(QEvent *event)
{
+#if defined(Q_WS_WIN)
Q_D(QPanGesture);
const QTouchEvent *ev = static_cast<const QTouchEvent*>(event);
+
if (event->type() == QEvent::TouchBegin) {
QTouchEvent::TouchPoint p = ev->touchPoints().at(0);
d->lastPosition = p.pos().toPoint();
@@ -197,33 +204,55 @@ bool QPanGesture::filterEvent(QEvent *event)
}
}
}
-#ifdef Q_OS_MAC
- else if (event->type() == QEvent::Wheel) {
- // On Mac, there is really no native panning gesture. Instead, a two
- // finger pan is delivered as mouse wheel events. Otoh, on Windows, you
- // either get mouse wheel events or pan events. We have decided to make this
- // the Qt behaviour as well, meaning that on Mac, wheel
- // events will be masked away when listening for pan events.
-#ifndef QT_MAC_USE_COCOA
- // In Carbon we receive neither touch-, nor pan gesture events.
- // So we create pan gestures by converting wheel events. After all, this
- // is how things are supposed to work on mac in the first place.
- const QWheelEvent *wev = static_cast<const QWheelEvent*>(event);
- int offset = wev->delta() / -120;
- d->lastOffset = wev->orientation() == Qt::Horizontal ? QSize(offset, 0) : QSize(0, offset);
+#elif defined(QT_MAC_USE_COCOA)
+ // The following implements single touch
+ // panning on Mac:
+ Q_D(QPanGesture);
+ const int panBeginDelay = 300;
+ const int panBeginRadius = 3;
+ const QTouchEvent *ev = static_cast<const QTouchEvent*>(event);
- if (state() == Qt::NoGesture) {
- d->totalOffset = d->lastOffset;
- } else {
- d->totalOffset += d->lastOffset;
+ switch (event->type()) {
+ case QEvent::TouchBegin: {
+ if (ev->touchPoints().size() == 1) {
+ d->lastPosition = QCursor::pos();
+ d->singleTouchPanTimer.start(panBeginDelay, this);
}
-
- killTimer(d->panFinishedTimer);
- d->panFinishedTimer = startTimer(200);
- updateState(Qt::GestureUpdated);
-#endif
- return true;
+ break;}
+ case QEvent::TouchEnd: {
+ if (state() != Qt::NoGesture)
+ updateState(Qt::GestureFinished);
+ reset();
+ break;}
+ case QEvent::TouchUpdate: {
+ if (ev->touchPoints().size() == 1) {
+ if (state() == Qt::NoGesture) {
+ // INVARIANT: The singleTouchTimer has still not fired.
+ // Lets check if the user moved his finger so much from
+ // the starting point that it makes sense to cancel:
+ const QPointF startPos = ev->touchPoints().at(0).startPos().toPoint();
+ const QPointF p = ev->touchPoints().at(0).pos().toPoint();
+ if ((startPos - p).manhattanLength() > panBeginRadius)
+ reset();
+ else
+ d->lastPosition = QCursor::pos();
+ } else {
+ QPointF mousePos = QCursor::pos();
+ QPointF dist = mousePos - d->lastPosition;
+ d->lastPosition = mousePos;
+ d->lastOffset = QSizeF(dist.x(), dist.y());
+ d->totalOffset += d->lastOffset;
+ updateState(Qt::GestureUpdated);
+ }
+ } else if (state() == Qt::NoGesture) {
+ reset();
+ }
+ break;}
+ default:
+ return false;
}
+#else
+ Q_UNUSED(event);
#endif
return false;
}
@@ -232,14 +261,14 @@ bool QPanGesture::filterEvent(QEvent *event)
void QPanGesture::reset()
{
Q_D(QPanGesture);
- d->lastOffset = d->totalOffset = QSize();
- d->lastPosition = QPoint();
-#if defined(Q_OS_MAC) && !defined(QT_MAC_USE_COCOA)
- if (d->panFinishedTimer) {
- killTimer(d->panFinishedTimer);
- d->panFinishedTimer = 0;
- }
+ d->lastOffset = d->totalOffset = QSize(0, 0);
+ d->lastPosition = QPoint(0, 0);
+
+#if defined(QT_MAC_USE_COCOA)
+ d->singleTouchPanTimer.stop();
+ d->prevMousePos = QPointF(0, 0);
#endif
+
QGesture::reset();
}
@@ -248,7 +277,7 @@ void QPanGesture::reset()
Specifies a total pan offset since the start of the gesture.
*/
-QSize QPanGesture::totalOffset() const
+QSizeF QPanGesture::totalOffset() const
{
Q_D(const QPanGesture);
return d->totalOffset;
@@ -260,12 +289,13 @@ QSize QPanGesture::totalOffset() const
Specifies a pan offset since the last time the gesture was
triggered.
*/
-QSize QPanGesture::lastOffset() const
+QSizeF QPanGesture::lastOffset() const
{
Q_D(const QPanGesture);
return d->lastOffset;
}
+//////////////////////////////////////////////////////////////////////////////
/*!
\class QPinchGesture
@@ -285,6 +315,7 @@ QSize QPanGesture::lastOffset() const
QPinchGesture::QPinchGesture(QWidget *gestureTarget, QObject *parent)
: QGesture(*new QPinchGesturePrivate, gestureTarget, parent)
{
+ setObjectName(QLatin1String("QPinchGesture"));
}
void QPinchGesturePrivate::setupGestureTarget(QObject *newGestureTarget)
@@ -338,12 +369,13 @@ bool QPinchGesture::eventFilter(QObject *receiver, QEvent *event)
d->state = Qt::NoGesture;
d->scaleFactor = d->lastScaleFactor = 1;
d->rotationAngle = d->lastRotationAngle = 0;
- d->startCenterPoint = d->centerPoint = d->lastCenterPoint = QPoint();
+ d->startCenterPoint = d->centerPoint = d->lastCenterPoint = QPointF();
#if defined(Q_WS_WIN)
d->initialDistance = 0;
#endif
return false;
case QNativeGestureEvent::Rotate:
+ d->scaleFactor = 0;
d->lastRotationAngle = d->rotationAngle;
#if defined(Q_WS_WIN)
d->rotationAngle = -1 * GID_ROTATE_ANGLE_FROM_ARGUMENT(ev->argument);
@@ -354,6 +386,7 @@ bool QPinchGesture::eventFilter(QObject *receiver, QEvent *event)
event->accept();
break;
case QNativeGestureEvent::Zoom:
+ d->rotationAngle = 0;
#if defined(Q_WS_WIN)
if (d->initialDistance != 0) {
d->lastScaleFactor = d->scaleFactor;
@@ -402,7 +435,7 @@ void QPinchGesture::reset()
Q_D(QPinchGesture);
d->scaleFactor = d->lastScaleFactor = 0;
d->rotationAngle = d->lastRotationAngle = 0;
- d->startCenterPoint = d->centerPoint = d->lastCenterPoint = QPoint();
+ d->startCenterPoint = d->centerPoint = d->lastCenterPoint = QPointF();
QGesture::reset();
}
@@ -452,7 +485,7 @@ qreal QPinchGesture::lastRotationAngle() const
Specifies a center point of the gesture. The point can be used as a center
point that the object is rotated around.
*/
-QPoint QPinchGesture::centerPoint() const
+QPointF QPinchGesture::centerPoint() const
{
return d_func()->centerPoint;
}
@@ -462,7 +495,7 @@ QPoint QPinchGesture::centerPoint() const
Specifies a previous center point of the gesture.
*/
-QPoint QPinchGesture::lastCenterPoint() const
+QPointF QPinchGesture::lastCenterPoint() const
{
return d_func()->lastCenterPoint;
}
@@ -474,11 +507,117 @@ QPoint QPinchGesture::lastCenterPoint() const
startCenterPoint and the centerPoint is the distance at which pinching
fingers has shifted.
*/
-QPoint QPinchGesture::startCenterPoint() const
+QPointF QPinchGesture::startCenterPoint() const
{
return d_func()->startCenterPoint;
}
+//////////////////////////////////////////////////////////////////////////////
+
+/*!
+ \class QSwipeGesture
+ \since 4.6
+
+ \brief The QSwipeGesture class represents a swipe gesture,
+ providing additional information related to swiping.
+*/
+
+/*!
+ Creates a new Swipe gesture handler object and marks it as a child of \a
+ parent.
+
+ On some platform like Windows it's necessary to provide a non-null widget
+ as \a parent to get native gesture support.
+*/
+QSwipeGesture::QSwipeGesture(QWidget *gestureTarget, QObject *parent)
+ : QGesture(*new QSwipeGesturePrivate, gestureTarget, parent)
+{
+ setObjectName(QLatin1String("QSwipeGesture"));
+}
+
+void QSwipeGesturePrivate::setupGestureTarget(QObject *newGestureTarget)
+{
+ Q_Q(QSwipeGesture);
+ if (gestureTarget && gestureTarget->isWidgetType()) {
+ QWidget *w = static_cast<QWidget*>(gestureTarget.data());
+ QApplicationPrivate::instance()->widgetGestures[w].swipe = 0;
+#if defined(Q_WS_WIN)
+ qt_widget_private(w)->winSetupGestures();
+#endif
+ }
+
+ if (newGestureTarget && newGestureTarget->isWidgetType()) {
+ QWidget *w = static_cast<QWidget*>(newGestureTarget);
+ QApplicationPrivate::instance()->widgetGestures[w].swipe = q;
+#if defined(Q_WS_WIN)
+ qt_widget_private(w)->winSetupGestures();
+#endif
+ }
+ QGesturePrivate::setupGestureTarget(newGestureTarget);
+}
+
+qreal QSwipeGesture::swipeAngle() const
+{
+ Q_D(const QSwipeGesture);
+ return d->swipeAngle;
+}
+
+QSwipeGesture::SwipeDirection QSwipeGesture::horizontalDirection() const
+{
+ Q_D(const QSwipeGesture);
+ if (d->swipeAngle < 0 || d->swipeAngle == 90 || d->swipeAngle == 270)
+ return QSwipeGesture::NoDirection;
+ else if (d->swipeAngle < 90 || d->swipeAngle > 270)
+ return QSwipeGesture::Right;
+ else
+ return QSwipeGesture::Left;
+}
+
+QSwipeGesture::SwipeDirection QSwipeGesture::verticalDirection() const
+{
+ Q_D(const QSwipeGesture);
+ if (d->swipeAngle <= 0 || d->swipeAngle == 180)
+ return QSwipeGesture::NoDirection;
+ else if (d->swipeAngle < 180)
+ return QSwipeGesture::Up;
+ else
+ return QSwipeGesture::Down;
+}
+
+bool QSwipeGesture::eventFilter(QObject *receiver, QEvent *event)
+{
+ Q_D(QSwipeGesture);
+ if (receiver->isWidgetType() && event->type() == QEvent::NativeGesture) {
+ QNativeGestureEvent *ev = static_cast<QNativeGestureEvent*>(event);
+ switch (ev->gestureType) {
+ case QNativeGestureEvent::Swipe:
+ d->swipeAngle = ev->angle;
+ updateState(Qt::GestureStarted);
+ updateState(Qt::GestureUpdated);
+ updateState(Qt::GestureFinished);
+ break;
+ default:
+ return false;
+ }
+ return true;
+ }
+ return QGesture::eventFilter(receiver, event);
+}
+
+/*! \internal */
+bool QSwipeGesture::filterEvent(QEvent *)
+{
+ return false;
+}
+
+/*! \internal */
+void QSwipeGesture::reset()
+{
+ Q_D(QSwipeGesture);
+ d->swipeAngle = -1;
+ QGesture::reset();
+}
+
QT_END_NAMESPACE
#include "moc_qstandardgestures.cpp"
diff --git a/src/gui/kernel/qstandardgestures.h b/src/gui/kernel/qstandardgestures.h
index 0eb9d92..029e6dc 100644
--- a/src/gui/kernel/qstandardgestures.h
+++ b/src/gui/kernel/qstandardgestures.h
@@ -59,16 +59,16 @@ class Q_GUI_EXPORT QPanGesture : public QGesture
Q_OBJECT
Q_DECLARE_PRIVATE(QPanGesture)
- Q_PROPERTY(QSize totalOffset READ totalOffset)
- Q_PROPERTY(QSize lastOffset READ lastOffset)
+ Q_PROPERTY(QSizeF totalOffset READ totalOffset)
+ Q_PROPERTY(QSizeF lastOffset READ lastOffset)
public:
QPanGesture(QWidget *gestureTarget, QObject *parent = 0);
bool filterEvent(QEvent *event);
- QSize totalOffset() const;
- QSize lastOffset() const;
+ QSizeF totalOffset() const;
+ QSizeF lastOffset() const;
protected:
void reset();
@@ -92,9 +92,9 @@ class Q_GUI_EXPORT QPinchGesture : public QGesture
Q_PROPERTY(qreal rotationAngle READ rotationAngle)
Q_PROPERTY(qreal lastRotationAngle READ lastRotationAngle)
- Q_PROPERTY(QPoint startCenterPoint READ startCenterPoint)
- Q_PROPERTY(QPoint lastCenterPoint READ lastCenterPoint)
- Q_PROPERTY(QPoint centerPoint READ centerPoint)
+ Q_PROPERTY(QPointF startCenterPoint READ startCenterPoint)
+ Q_PROPERTY(QPointF lastCenterPoint READ lastCenterPoint)
+ Q_PROPERTY(QPointF centerPoint READ centerPoint)
public:
QPinchGesture(QWidget *gestureTarget, QObject *parent = 0);
@@ -102,9 +102,9 @@ public:
bool filterEvent(QEvent *event);
void reset();
- QPoint startCenterPoint() const;
- QPoint lastCenterPoint() const;
- QPoint centerPoint() const;
+ QPointF startCenterPoint() const;
+ QPointF lastCenterPoint() const;
+ QPointF centerPoint() const;
qreal scaleFactor() const;
qreal lastScaleFactor() const;
@@ -119,6 +119,34 @@ private:
friend class QWidget;
};
+class QSwipeGesturePrivate;
+class Q_GUI_EXPORT QSwipeGesture : public QGesture
+{
+ Q_OBJECT
+ Q_ENUMS(SwipeDirection)
+
+ Q_PROPERTY(SwipeDirection horizontalDirection READ horizontalDirection)
+ Q_PROPERTY(SwipeDirection verticalDirection READ verticalDirection)
+ Q_PROPERTY(qreal swipeAngle READ swipeAngle)
+
+ Q_DECLARE_PRIVATE(QSwipeGesture)
+
+public:
+ enum SwipeDirection { NoDirection, Left, Right, Up, Down };
+ QSwipeGesture(QWidget *gestureTarget, QObject *parent = 0);
+
+ bool filterEvent(QEvent *event);
+ void reset();
+
+ SwipeDirection horizontalDirection() const;
+ SwipeDirection verticalDirection() const;
+ qreal swipeAngle() const;
+
+private:
+ bool eventFilter(QObject *receiver, QEvent *event);
+
+ friend class QWidget;
+};
QT_END_NAMESPACE
QT_END_HEADER
diff --git a/src/gui/kernel/qstandardgestures_p.h b/src/gui/kernel/qstandardgestures_p.h
index 5fbcc5d..9829cf0 100644
--- a/src/gui/kernel/qstandardgestures_p.h
+++ b/src/gui/kernel/qstandardgestures_p.h
@@ -61,6 +61,7 @@
#include "qgesture_p.h"
#include "qstandardgestures.h"
+#include "qbasictimer.h"
QT_BEGIN_NAMESPACE
@@ -69,21 +70,15 @@ class QPanGesturePrivate : public QGesturePrivate
Q_DECLARE_PUBLIC(QPanGesture)
public:
- QPanGesturePrivate()
- {
-#if defined(Q_OS_MAC) && !defined(QT_MAC_USE_COCOA)
- panFinishedTimer = 0;
-#endif
- }
-
void setupGestureTarget(QObject *o);
- QSize totalOffset;
- QSize lastOffset;
- QPoint lastPosition;
+ QSizeF totalOffset;
+ QSizeF lastOffset;
+ QPointF lastPosition;
-#if defined(Q_OS_MAC) && !defined(QT_MAC_USE_COCOA)
- int panFinishedTimer;
+#if defined(QT_MAC_USE_COCOA)
+ QBasicTimer singleTouchPanTimer;
+ QPointF prevMousePos;
#endif
};
@@ -107,14 +102,28 @@ public:
qreal lastScaleFactor;
qreal rotationAngle;
qreal lastRotationAngle;
- QPoint startCenterPoint;
- QPoint lastCenterPoint;
- QPoint centerPoint;
+ QPointF startCenterPoint;
+ QPointF lastCenterPoint;
+ QPointF centerPoint;
#ifdef Q_WS_WIN
int initialDistance;
#endif
};
+class QSwipeGesturePrivate : public QGesturePrivate
+{
+ Q_DECLARE_PUBLIC(QSwipeGesture)
+
+public:
+ QSwipeGesturePrivate()
+ : swipeAngle(-1)
+ {
+ }
+
+ void setupGestureTarget(QObject *o);
+ qreal swipeAngle;
+};
+
QT_END_NAMESPACE
#endif // QSTANDARDGESTURES_P_H
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 6ffac2c..fb5f934 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -187,6 +187,9 @@ QWidgetPrivate::QWidgetPrivate(int version)
, extraPaintEngine(0)
, polished(0)
, graphicsEffect(0)
+#if !defined(QT_NO_IM)
+ , imHints(Qt::ImhNone)
+#endif
, inheritedFontResolveMask(0)
, inheritedPaletteResolveMask(0)
, leftmargin(0)
@@ -217,7 +220,6 @@ QWidgetPrivate::QWidgetPrivate(int version)
, window_event(0)
, qd_hd(0)
#endif
- ,imHints(Qt::ImhNone)
{
if (!qApp) {
qFatal("QWidget: Must construct a QApplication before a QPaintDevice");
@@ -971,7 +973,10 @@ struct QWidgetExceptionCleaner
/* this cleans up when the constructor throws an exception */
static inline void cleanup(QWidget *that, QWidgetPrivate *d)
{
-#ifndef QT_NO_EXCEPTIONS
+#ifdef QT_NO_EXCEPTIONS
+ Q_UNUSED(that);
+ Q_UNUSED(d);
+#else
QWidgetPrivate::allWidgets->remove(that);
if (d->focus_next != that) {
if (d->focus_next)
@@ -4172,6 +4177,10 @@ QPalette::ColorRole QWidget::backgroundRole() const
If \a role is QPalette::NoRole, then the widget inherits its
parent's background role.
+ Note that styles are free to choose any color from the palette.
+ You can modify the palette or set a style sheet if you don't
+ achieve the result you want with setBackgroundRole().
+
\sa backgroundRole(), foregroundRole()
*/
@@ -4234,6 +4243,10 @@ QPalette::ColorRole QWidget::foregroundRole() const
If \a role is QPalette::NoRole, the widget uses a foreground role
that contrasts with the background role.
+ Note that styles are free to choose any color from the palette.
+ You can modify the palette or set a style sheet if you don't
+ achieve the result you want with setForegroundRole().
+
\sa foregroundRole(), backgroundRole()
*/
void QWidget::setForegroundRole(QPalette::ColorRole role)
@@ -4965,6 +4978,13 @@ void QWidgetPrivate::setSoftKeys_sys(const QList<QAction*> &softkeys)
}
#endif // !defined(Q_OS_SYMBIAN)
+/*!
+ Returns a pointer to this widget's effect if it has one; otherwise 0.
+
+ \since 4.6
+
+ \sa setGraphicsEffect()
+*/
QGraphicsEffect *QWidget::graphicsEffect() const
{
Q_D(const QWidget);
@@ -4982,6 +5002,8 @@ QGraphicsEffect *QWidget::graphicsEffect() const
\note This function will apply the effect on itself and all its children.
\since 4.6
+
+ \sa graphicsEffect()
*/
void QWidget::setGraphicsEffect(QGraphicsEffect *effect)
{
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index 53d1b6e..cdf0706 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -1064,7 +1064,7 @@ OSStatus QWidgetPrivate::qt_window_event(EventHandlerCallRef er, EventRef event,
break;
}
qNGEvent.gestureType = QNativeGestureEvent::Rotate;
- qNGEvent.percentage = float(amount);
+ qNGEvent.percentage = float(-amount);
break; }
case kEventGestureSwipe: {
HIPoint swipeDirection;
@@ -1074,7 +1074,14 @@ OSStatus QWidgetPrivate::qt_window_event(EventHandlerCallRef er, EventRef event,
break;
}
qNGEvent.gestureType = QNativeGestureEvent::Swipe;
- qNGEvent.direction = QSize(-swipeDirection.x, -swipeDirection.y);
+ if (swipeDirection.x == 1)
+ qNGEvent.angle = 180.0f;
+ else if (swipeDirection.x == -1)
+ qNGEvent.angle = 0.0f;
+ else if (swipeDirection.y == 1)
+ qNGEvent.angle = 90.0f;
+ else if (swipeDirection.y == -1)
+ qNGEvent.angle = 270.0f;
break; }
case kEventGestureMagnify: {
CGFloat amount;
diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp
index 0fffaef..4f45c3d 100644
--- a/src/gui/painting/qbackingstore.cpp
+++ b/src/gui/painting/qbackingstore.cpp
@@ -1544,7 +1544,8 @@ void QWidgetPrivate::repaint_sys(const QRegion &rgn)
// QGLWidget does not support partial updates if:
// 1) The context is double buffered
// 2) The context is single buffered and auto-fill background is enabled.
- const bool noPartialUpdateSupport = (engine && engine->type() == QPaintEngine::OpenGL)
+ const bool noPartialUpdateSupport = (engine && engine->type() == QPaintEngine::OpenGL
+ || engine->type() == QPaintEngine::OpenGL2)
&& (usesDoubleBufferedGLContext || q->autoFillBackground());
QRegion toBePainted(noPartialUpdateSupport ? q->rect() : rgn);
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 72bb164..5f6e1d6 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -791,7 +791,7 @@ void QRasterPaintEngine::updatePen(const QPen &pen)
if(pen_style == Qt::SolidLine) {
s->stroker = &d->basicStroker;
} else if (pen_style != Qt::NoPen) {
- if (!d->dashStroker.data())
+ if (!d->dashStroker)
d->dashStroker.reset(new QDashStroker(&d->basicStroker));
if (pen.isCosmetic()) {
d->dashStroker->setClipRect(d->deviceRect);
diff --git a/src/gui/painting/qpaintengineex_p.h b/src/gui/painting/qpaintengineex_p.h
index cf3aad7..1ba2153 100644
--- a/src/gui/painting/qpaintengineex_p.h
+++ b/src/gui/painting/qpaintengineex_p.h
@@ -204,6 +204,9 @@ public:
virtual void sync() {}
+ virtual void beginNativePainting() {}
+ virtual void endNativePainting() {}
+
virtual QPixmapFilter *createPixmapFilter(int /*type*/) const { return 0; }
protected:
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index e1a6e80..699de4d 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -1889,6 +1889,45 @@ QPaintEngine *QPainter::paintEngine() const
return d->engine;
}
+/*!
+ Flushes the painting pipeline and prepares for the user issuing
+ native painting commands. Must be followed by a call to
+ endNativePainting().
+
+ \sa endNativePainting()
+*/
+void QPainter::beginNativePainting()
+{
+ Q_D(QPainter);
+ if (!d->engine) {
+ qWarning("QPainter::beginNativePainting: Painter not active");
+ return;
+ }
+
+ if (d->extended)
+ d->extended->beginNativePainting();
+}
+
+/*!
+ Restores the painter after manually issuing native painting commands.
+ Lets the painter restore any native state that it relies on before
+ calling any other painter commands.
+
+ \sa beginNativePainting()
+*/
+void QPainter::endNativePainting()
+{
+ Q_D(const QPainter);
+ if (!d->engine) {
+ qWarning("QPainter::beginNativePainting: Painter not active");
+ return;
+ }
+
+ if (d->extended)
+ d->extended->endNativePainting();
+ else
+ d->engine->syncState();
+}
/*!
Returns the font metrics for the painter if the painter is
@@ -7169,7 +7208,8 @@ QPoint QPainter::xFormDev(const QPoint &p) const
QRect transformed = painter.xFormDev(rectangle);
\newcode
QPainter painter(this);
- QRect transformed = painter.combinedTransform().inverted(rectangle);
+ QRegion region = QRegion(rectangle) * painter.combinedTransform().inverted();
+ QRect transformed = region.boundingRect();
\endcode
*/
diff --git a/src/gui/painting/qpainter.h b/src/gui/painting/qpainter.h
index 14d1cf8..1bb97c6 100644
--- a/src/gui/painting/qpainter.h
+++ b/src/gui/painting/qpainter.h
@@ -423,6 +423,9 @@ public:
static QPaintDevice *redirected(const QPaintDevice *device, QPoint *offset = 0);
static void restoreRedirected(const QPaintDevice *device);
+ void beginNativePainting();
+ void endNativePainting();
+
#ifdef QT3_SUPPORT
inline QT3_SUPPORT void setBackgroundColor(const QColor &color) { setBackground(color); }
diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp
index 2dab9b3..ee9827e 100644
--- a/src/gui/styles/qcommonstyle.cpp
+++ b/src/gui/styles/qcommonstyle.cpp
@@ -870,7 +870,6 @@ int QCommonStylePrivate::lookupToolButtonStyle() const
#ifndef QT_NO_ITEMVIEWS
-
QSize QCommonStylePrivate::viewItemSize(const QStyleOptionViewItemV4 *option, int role) const
{
Q_Q(const QCommonStyle);
@@ -1158,6 +1157,75 @@ void QCommonStylePrivate::viewItemLayout(const QStyleOptionViewItemV4 *opt, QRe
}
#endif // QT_NO_ITEMVIEWS
+
+#ifndef QT_NO_TABBAR
+/*! \internal
+ Compute the textRect and the pixmapRect from the opt rect
+
+ Uses the same computation than in QTabBar::tabSizeHint
+ */
+void QCommonStylePrivate::tabLayout(const QStyleOptionTabV3 *opt, const QWidget *widget, QRect *textRect, QRect *iconRect) const
+{
+ Q_ASSERT(textRect);
+ Q_ASSERT(iconRect);
+ QRect tr = opt->rect;
+ bool verticalTabs = opt->shape == QTabBar::RoundedEast
+ || opt->shape == QTabBar::RoundedWest
+ || opt->shape == QTabBar::TriangularEast
+ || opt->shape == QTabBar::TriangularWest;
+ if (verticalTabs)
+ tr.setRect(0, 0, tr.height(), tr.width()); //0, 0 as we will have a translate transform
+
+ int verticalShift = proxyStyle->pixelMetric(QStyle::PM_TabBarTabShiftVertical, opt, widget);
+ int horizontalShift = proxyStyle->pixelMetric(QStyle::PM_TabBarTabShiftHorizontal, opt, widget);
+ int hpadding = proxyStyle->pixelMetric(QStyle::PM_TabBarTabHSpace, opt, widget) / 2;
+ int vpadding = proxyStyle->pixelMetric(QStyle::PM_TabBarTabVSpace, opt, widget) / 2;
+ if (opt->shape == QTabBar::RoundedSouth || opt->shape == QTabBar::TriangularSouth)
+ verticalShift = -verticalShift;
+ tr.adjust(hpadding, vpadding, horizontalShift - hpadding, verticalShift - vpadding);
+ bool selected = opt->state & QStyle::State_Selected;
+ if (selected) {
+ tr.setBottom(tr.bottom() - verticalShift);
+ tr.setRight(tr.right() - horizontalShift);
+ }
+
+ // left widget
+ if (!opt->leftButtonSize.isEmpty()) {
+ tr.setLeft(tr.left() + 4 +
+ (verticalTabs ? opt->leftButtonSize.height() : opt->leftButtonSize.width()));
+ }
+ // right widget
+ if (!opt->rightButtonSize.isEmpty()) {
+ tr.setRight(tr.right() - 4 -
+ (verticalTabs ? opt->rightButtonSize.height() : opt->rightButtonSize.width()));
+ }
+
+ // icon
+ if (!opt->icon.isNull()) {
+ QSize iconSize = opt->iconSize;
+ if (!iconSize.isValid()) {
+ int iconExtent = proxyStyle->pixelMetric(QStyle::PM_SmallIconSize);
+ iconSize = QSize(iconExtent, iconExtent);
+ }
+ QSize tabIconSize = opt->icon.actualSize(iconSize,
+ (opt->state & QStyle::State_Enabled) ? QIcon::Normal : QIcon::Disabled,
+ (opt->state & QStyle::State_Selected) ? QIcon::On : QIcon::Off );
+
+ *iconRect = QRect(tr.left(), tr.center().y() - tabIconSize.height() / 2,
+ tabIconSize.width(), tabIconSize .height());
+ if (!verticalTabs)
+ *iconRect = proxyStyle->visualRect(opt->direction, opt->rect, *iconRect);
+ tr.setLeft(tr.left() + tabIconSize.width() + 4);
+ }
+
+ if (!verticalTabs)
+ tr = proxyStyle->visualRect(opt->direction, opt->rect, tr);
+
+ *textRect = tr;
+}
+#endif //QT_NO_TABBAR
+
+
/*!
\reimp
*/
@@ -1840,38 +1908,20 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
newY = tr.y() + tr.height();
newRot = -90;
}
- tr.setRect(0, 0, tr.height(), tr.width());
QTransform m = QTransform::fromTranslate(newX, newY);
m.rotate(newRot);
p->setTransform(m, true);
}
- tr = subElementRect(SE_TabBarTabText, opt, widget);
+ QRect iconRect;
+ d->tabLayout(&tabV2, widget, &tr, &iconRect);
+ tr = proxy()->subElementRect(SE_TabBarTabText, opt, widget); //we compute tr twice because the style may override subElementRect
if (!tabV2.icon.isNull()) {
- QSize iconSize = tabV2.iconSize;
- if (!iconSize.isValid()) {
- int iconExtent = proxy()->pixelMetric(PM_SmallIconSize);
- iconSize = QSize(iconExtent, iconExtent);
- }
- QSize tabIconSize = tabV2.icon.actualSize(iconSize,
- (tabV2.state & State_Enabled) ? QIcon::Normal
- : QIcon::Disabled);
- QPixmap tabIcon = tabV2.icon.pixmap(iconSize,
+ QPixmap tabIcon = tabV2.icon.pixmap(tabV2.iconSize,
(tabV2.state & State_Enabled) ? QIcon::Normal
: QIcon::Disabled,
(tabV2.state & State_Selected) ? QIcon::On
: QIcon::Off);
-
- int offset = 4;
- int left = opt->rect.left();
- if (tabV2.leftButtonSize.isEmpty())
- offset += 2;
- else
- left += tabV2.leftButtonSize.width() + (6 + 2) + 2;
- QRect iconRect = QRect(left + offset, tr.center().y() - tabIcon.height() / 2,
- tabIconSize.width(), tabIconSize.height());
- if (!verticalTabs)
- iconRect = visualRect(opt->direction, opt->rect, iconRect);
p->drawPixmap(iconRect.x(), iconRect.y(), tabIcon);
}
@@ -2718,65 +2768,10 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt,
}
break;
case SE_TabBarTabText:
- // ### consider merging this with CE_TabBarTabLabel
if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)) {
- QStyleOptionTabV3 tabV2(*tab);
- QRect tr = tabV2.rect;
- bool verticalTabs = tabV2.shape == QTabBar::RoundedEast
- || tabV2.shape == QTabBar::RoundedWest
- || tabV2.shape == QTabBar::TriangularEast
- || tabV2.shape == QTabBar::TriangularWest;
- if (verticalTabs)
- tr.setRect(0, 0, tr.height(), tr.width());
- int verticalShift = pixelMetric(QStyle::PM_TabBarTabShiftVertical, tab, widget);
- int horizontalShift = pixelMetric(QStyle::PM_TabBarTabShiftHorizontal, tab, widget);
- int hpadding = proxy()->pixelMetric(QStyle::PM_TabBarTabHSpace, opt, widget) / 2;
- int vpadding = proxy()->pixelMetric(QStyle::PM_TabBarTabVSpace, opt, widget) / 2;
- if (tabV2.shape == QTabBar::RoundedSouth || tabV2.shape == QTabBar::TriangularSouth)
- verticalShift = -verticalShift;
- tr.adjust(hpadding, vpadding, horizontalShift - hpadding, verticalShift - vpadding);
- bool selected = tabV2.state & State_Selected;
- if (selected) {
- tr.setBottom(tr.bottom() - verticalShift);
- tr.setRight(tr.right() - horizontalShift);
- }
-
- // left widget
- if (!tabV2.leftButtonSize.isEmpty()) {
- tr.setLeft(tr.left() + 6 + 2 +
- (verticalTabs ? tabV2.leftButtonSize.height() : tabV2.leftButtonSize.width()));
- }
-
- // icon
- if (!tabV2.icon.isNull()) {
- QSize iconSize = tabV2.iconSize;
- if (!iconSize.isValid()) {
- int iconExtent = proxy()->pixelMetric(PM_SmallIconSize);
- iconSize = QSize(iconExtent, iconExtent);
- }
- QSize tabIconSize = tabV2.icon.actualSize(iconSize,
- (tabV2.state & State_Enabled) ? QIcon::Normal
- : QIcon::Disabled);
- int offset = 4;
- if (tabV2.leftButtonSize.isEmpty())
- offset += 2;
-
- QRect iconRect = QRect(tr.left() + offset, tr.center().y() - tabIconSize.height() / 2,
- tabIconSize.width(), tabIconSize .height());
- if (!verticalTabs)
- iconRect = visualRect(opt->direction, opt->rect, iconRect);
- tr.setLeft(tr.left() + tabIconSize.width() + offset + 2);
- }
-
- // right widget
- if (!tabV2.rightButtonSize.isEmpty()) {
- tr.setRight(tr.right() - 6 - 2 -
- (verticalTabs ? tabV2.rightButtonSize.height() : tabV2.rightButtonSize.width()));
- }
-
- if (!verticalTabs)
- tr = visualRect(opt->direction, opt->rect, tr);
- r = tr;
+ QStyleOptionTabV3 tabV3(*tab);
+ QRect dummyIconRect;
+ d->tabLayout(&tabV3, widget, &r, &dummyIconRect);
}
break;
case SE_TabBarTabLeftButton:
@@ -2785,6 +2780,8 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt,
bool selected = tab->state & State_Selected;
int verticalShift = proxy()->pixelMetric(QStyle::PM_TabBarTabShiftVertical, tab, widget);
int horizontalShift = proxy()->pixelMetric(QStyle::PM_TabBarTabShiftHorizontal, tab, widget);
+ int hpadding = proxy()->pixelMetric(QStyle::PM_TabBarTabHSpace, opt, widget) / 2;
+ hpadding = qMax(hpadding, 4); //workaround KStyle returning 0 because they workaround an old bug in Qt
bool verticalTabs = tab->shape == QTabBar::RoundedEast
|| tab->shape == QTabBar::RoundedWest
@@ -2827,16 +2824,16 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt,
break;
default:
if (sr == SE_TabBarTabLeftButton)
- r = QRect(6 + tab->rect.x(), midHeight, w, h);
+ r = QRect(tab->rect.x() + hpadding, midHeight, w, h);
else
- r = QRect(tab->rect.right() - 6 - w, midHeight, w, h);
+ r = QRect(tab->rect.right() - w - hpadding, midHeight, w, h);
r = visualRect(tab->direction, tab->rect, r);
}
if (verticalTabs) {
if (atTheTop)
- r = QRect(midWidth, tr.y() + tab->rect.height() - 6 - h, w, h);
+ r = QRect(midWidth, tr.y() + tab->rect.height() - hpadding - h, w, h);
else
- r = QRect(midWidth, tr.y() + 6, w, h);
+ r = QRect(midWidth, tr.y() + hpadding, w, h);
}
}
diff --git a/src/gui/styles/qcommonstyle_p.h b/src/gui/styles/qcommonstyle_p.h
index 7e58b37..14f5558 100644
--- a/src/gui/styles/qcommonstyle_p.h
+++ b/src/gui/styles/qcommonstyle_p.h
@@ -123,6 +123,9 @@ public:
#endif
mutable QIcon tabBarcloseButtonIcon;
int lookupToolButtonStyle() const;
+#ifndef QT_NO_TABBAR
+ void tabLayout(const QStyleOptionTabV3 *opt, const QWidget *widget, QRect *textRect, QRect *pixmapRect) const;
+#endif
};
QT_END_NAMESPACE
diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm
index 08b6ad8..905044c 100644
--- a/src/gui/styles/qmacstyle_mac.mm
+++ b/src/gui/styles/qmacstyle_mac.mm
@@ -5318,16 +5318,23 @@ QRect QMacStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex *op
case SC_ComboBoxArrow:{
ret = QMacStylePrivate::comboboxEditBounds(combo->rect, bdi);
ret.setX(ret.x() + ret.width());
- ret.setWidth(combo->rect.width() - ret.width() - ret.x());
+ ret.setWidth(combo->rect.right() - ret.right());
break; }
case SC_ComboBoxListBoxPopup:{
if (combo->editable) {
HIRect inner = QMacStylePrivate::comboboxInnerBounds(qt_hirectForQRect(combo->rect), bdi.kind);
QRect editRect = QMacStylePrivate::comboboxEditBounds(combo->rect, bdi);
- ret.adjust(qRound(inner.origin.x), 0, qRound(inner.origin.x + inner.size.width), editRect.y() + editRect.height() + 2);
+ const int comboTop = combo->rect.top();
+ ret = QRect(qRound(inner.origin.x),
+ comboTop,
+ qRound(inner.origin.x - combo->rect.left() + inner.size.width),
+ editRect.bottom() - comboTop + 2);
} else {
QRect editRect = QMacStylePrivate::comboboxEditBounds(combo->rect, bdi);
- ret.adjust(4 - 11, 1, editRect.width() + 10 + 11, 1);
+ ret = QRect(combo->rect.x() + 4 - 11,
+ combo->rect.y() + 1,
+ editRect.width() + 10 + 11,
+ 1);
}
break; }
default:
diff --git a/src/gui/text/qfontengine_qpf.cpp b/src/gui/text/qfontengine_qpf.cpp
index e05a502..05dea6e 100644
--- a/src/gui/text/qfontengine_qpf.cpp
+++ b/src/gui/text/qfontengine_qpf.cpp
@@ -66,9 +66,10 @@ QT_BEGIN_NAMESPACE
#ifndef QT_NO_QWS_QPF2
-QT_BEGIN_INCLUDE_NAMESPACE
#include "qpfutil.cpp"
+QT_BEGIN_INCLUDE_NAMESPACE
+
#if defined(Q_WS_QWS)
# include "private/qwscommand_qws_p.h"
# include "qwsdisplay_qws.h"
diff --git a/src/gui/text/qfontengine_win.cpp b/src/gui/text/qfontengine_win.cpp
index 173b822..7a9d958 100644
--- a/src/gui/text/qfontengine_win.cpp
+++ b/src/gui/text/qfontengine_win.cpp
@@ -327,8 +327,10 @@ QFontEngineWin::QFontEngineWin(const QString &name, HFONT _hfont, bool stockFont
BOOL res = GetTextMetrics(hdc, &tm);
fontDef.fixedPitch = !(tm.tmPitchAndFamily & TMPF_FIXED_PITCH);
- if (!res)
+ if (!res) {
qErrnoWarning("QFontEngineWin: GetTextMetrics failed");
+ ZeroMemory(&tm, sizeof(TEXTMETRIC));
+ }
cache_cost = tm.tmHeight * tm.tmAveCharWidth * 2000;
getCMap();
diff --git a/src/gui/util/qsystemtrayicon_win.cpp b/src/gui/util/qsystemtrayicon_win.cpp
index 465c1d8..ea7fbde 100644
--- a/src/gui/util/qsystemtrayicon_win.cpp
+++ b/src/gui/util/qsystemtrayicon_win.cpp
@@ -132,11 +132,12 @@ QSystemTrayIconSys::QSystemTrayIconSys(QSystemTrayIcon *object)
: hIcon(0), q(object), ignoreNextMouseRelease(false)
{
- notifyIconSize = sizeof(NOTIFYICONDATA);
-#ifdef Q_OS_WINCE
- maxTipLength = 64;
-#else
+#ifndef Q_OS_WINCE
+ notifyIconSize = FIELD_OFFSET(NOTIFYICONDATA, guidItem); // NOTIFYICONDATAW_V2_SIZE;
maxTipLength = 128;
+#else
+ notifyIconSize = FIELD_OFFSET(NOTIFYICONDATA, szTip[64]); // NOTIFYICONDATAW_V1_SIZE;
+ maxTipLength = 64;
#endif
// For restoring the tray icon after explorer crashes
diff --git a/src/gui/widgets/qabstractscrollarea.cpp b/src/gui/widgets/qabstractscrollarea.cpp
index 1b4d41b..d1adfee 100644
--- a/src/gui/widgets/qabstractscrollarea.cpp
+++ b/src/gui/widgets/qabstractscrollarea.cpp
@@ -1356,7 +1356,7 @@ void QAbstractScrollAreaPrivate::_q_gestureTriggered()
return;
QScrollBar *hBar = q->horizontalScrollBar();
QScrollBar *vBar = q->verticalScrollBar();
- QSize delta = g->lastOffset();
+ QSizeF delta = g->lastOffset();
if (!delta.isNull()) {
if (QApplication::isRightToLeft())
delta.rwidth() *= -1;
diff --git a/src/gui/widgets/qlinecontrol_p.h b/src/gui/widgets/qlinecontrol_p.h
index adea742..0db6279 100644
--- a/src/gui/widgets/qlinecontrol_p.h
+++ b/src/gui/widgets/qlinecontrol_p.h
@@ -349,7 +349,7 @@ Q_SIGNALS:
protected:
virtual void timerEvent(QTimerEvent *event);
-private slots:
+private Q_SLOTS:
void _q_clipboardChanged();
void _q_deleteSelected();
diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp
index f36a995..059aaf1 100644
--- a/src/gui/widgets/qlineedit.cpp
+++ b/src/gui/widgets/qlineedit.cpp
@@ -2002,7 +2002,7 @@ QMenu *QLineEdit::createStandardContextMenu()
action = popup->addAction(QLineEdit::tr("Delete"));
action->setEnabled(!d->control->isReadOnly() && !d->control->text().isEmpty() && d->control->hasSelectedText());
- connect(action, SIGNAL(triggered()), SLOT(_q_deleteSelected()));
+ connect(action, SIGNAL(triggered()), d->control, SLOT(_q_deleteSelected()));
popup->addSeparator();
diff --git a/src/gui/widgets/qlineedit.h b/src/gui/widgets/qlineedit.h
index 03d4376..cd37ad0 100644
--- a/src/gui/widgets/qlineedit.h
+++ b/src/gui/widgets/qlineedit.h
@@ -267,7 +267,6 @@ private:
Q_DISABLE_COPY(QLineEdit)
Q_DECLARE_PRIVATE(QLineEdit)
Q_PRIVATE_SLOT(d_func(), void _q_handleWindowActivate())
- Q_PRIVATE_SLOT(d_func(), void _q_deleteSelected())
Q_PRIVATE_SLOT(d_func(), void _q_textEdited(const QString &))
Q_PRIVATE_SLOT(d_func(), void _q_cursorPositionChanged(int, int))
#ifndef QT_NO_COMPLETER
diff --git a/src/gui/widgets/qlineedit_p.cpp b/src/gui/widgets/qlineedit_p.cpp
index cec34da..4218630 100644
--- a/src/gui/widgets/qlineedit_p.cpp
+++ b/src/gui/widgets/qlineedit_p.cpp
@@ -93,10 +93,6 @@ void QLineEditPrivate::_q_completionHighlighted(QString newText)
#endif // QT_NO_COMPLETER
-void QLineEditPrivate::_q_clipboardChanged()
-{
-}
-
void QLineEditPrivate::_q_handleWindowActivate()
{
Q_Q(QLineEdit);
@@ -104,10 +100,6 @@ void QLineEditPrivate::_q_handleWindowActivate()
control->deselect();
}
-void QLineEditPrivate::_q_deleteSelected()
-{
-}
-
void QLineEditPrivate::_q_textEdited(const QString &text)
{
Q_Q(QLineEdit);
diff --git a/src/gui/widgets/qlineedit_p.h b/src/gui/widgets/qlineedit_p.h
index 3521dcb..260bc19 100644
--- a/src/gui/widgets/qlineedit_p.h
+++ b/src/gui/widgets/qlineedit_p.h
@@ -122,9 +122,7 @@ public:
QRect adjustedContentsRect() const;
- void _q_clipboardChanged();
void _q_handleWindowActivate();
- void _q_deleteSelected();
void _q_textEdited(const QString &);
void _q_cursorPositionChanged(int, int);
#ifdef QT_KEYPAD_NAVIGATION
diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp
index f0f425f..4734d22 100644
--- a/src/gui/widgets/qmenu.cpp
+++ b/src/gui/widgets/qmenu.cpp
@@ -368,7 +368,9 @@ QRect QMenuPrivate::actionRect(QAction *act) const
return actionRects.at(index);
}
+#if defined(Q_WS_MAC)
static const qreal MenuFadeTimeInSec = 0.150;
+#endif
void QMenuPrivate::hideUpToMenuBar()
{
diff --git a/src/gui/widgets/qmenu_mac.mm b/src/gui/widgets/qmenu_mac.mm
index 47a8042..8e28abe 100644
--- a/src/gui/widgets/qmenu_mac.mm
+++ b/src/gui/widgets/qmenu_mac.mm
@@ -607,6 +607,13 @@ static inline void syncNSMenuItemVisiblity(NSMenuItem *menuItem, bool actionVisi
[menuItem setHidden:!actionVisibility];
}
+static inline void syncNSMenuItemEnabled(NSMenuItem *menuItem, bool enabled)
+{
+ [menuItem setEnabled:NO];
+ [menuItem setEnabled:YES];
+ [menuItem setEnabled:enabled];
+}
+
static inline void syncMenuBarItemsVisiblity(const QMenuBarPrivate::QMacMenuBarPrivate *mac_menubar)
{
const QList<QMacMenuAction *> &menubarActions = mac_menubar->actionItems;
@@ -659,12 +666,12 @@ void qt_mac_set_modal_state_helper_recursive(OSMenuRef menu, OSMenuRef merge, bo
// The item should follow what the QAction has.
if ([item tag]) {
QAction *action = reinterpret_cast<QAction *>([item tag]);
- [item setEnabled:action->isEnabled()];
+ syncNSMenuItemEnabled(item, action->isEnabled());
} else {
- [item setEnabled:YES];
+ syncNSMenuItemEnabled(item, YES);
}
} else {
- [item setEnabled:NO];
+ syncNSMenuItemEnabled(item, NO);
}
}
}
diff --git a/src/gui/widgets/qplaintextedit.cpp b/src/gui/widgets/qplaintextedit.cpp
index e025876..6ac521b 100644
--- a/src/gui/widgets/qplaintextedit.cpp
+++ b/src/gui/widgets/qplaintextedit.cpp
@@ -379,7 +379,7 @@ void QPlainTextDocumentLayout::layoutBlock(const QTextBlock &block)
tl->beginLayout();
qreal availableWidth = d->width;
if (availableWidth <= 0) {
- availableWidth = INT_MAX; // similar to text edit with pageSize.width == 0
+ availableWidth = qreal(INT_MAX); // similar to text edit with pageSize.width == 0
}
availableWidth -= 2*margin + extraMargin;
while (1) {
@@ -2934,7 +2934,7 @@ void QPlainTextEditPrivate::_q_gestureTriggered()
QScrollBar *vBar = q->verticalScrollBar();
if (g->state() == Qt::GestureStarted)
originalOffsetY = vBar->value();
- QSize totalOffset = g->totalOffset();
+ QSizeF totalOffset = g->totalOffset();
if (!totalOffset.isNull()) {
if (QApplication::isRightToLeft())
totalOffset.rwidth() *= -1;
diff --git a/src/gui/widgets/qtabbar.cpp b/src/gui/widgets/qtabbar.cpp
index 5166390..531c429 100644
--- a/src/gui/widgets/qtabbar.cpp
+++ b/src/gui/widgets/qtabbar.cpp
@@ -1293,6 +1293,7 @@ QSize QTabBarPrivate::minimumTabSizeHint(int index)
*/
QSize QTabBar::tabSizeHint(int index) const
{
+ //Note: this must match with the computations in QCommonStylePrivate::tabLayout
Q_D(const QTabBar);
if (const QTabBarPrivate::Tab *tab = d->at(index)) {
QStyleOptionTabV3 opt;
@@ -1309,18 +1310,18 @@ QSize QTabBar::tabSizeHint(int index) const
int widgetWidth = 0;
int widgetHeight = 0;
int padding = 0;
- if (opt.leftButtonSize.isValid()) {
- padding += 6 + 2;
+ if (!opt.leftButtonSize.isEmpty()) {
+ padding += 4;
widgetWidth += opt.leftButtonSize.width();
widgetHeight += opt.leftButtonSize.height();
}
- if (opt.rightButtonSize.isValid()) {
- padding += 6 + 2;
+ if (!opt.rightButtonSize.isEmpty()) {
+ padding += 4;
widgetWidth += opt.rightButtonSize.width();
widgetHeight += opt.rightButtonSize.height();
}
- if (opt.iconSize.isValid())
- padding += 2;
+ if (!opt.icon.isNull())
+ padding += 4;
QSize csz;
if (verticalTabs(d->shape)) {
@@ -1836,7 +1837,8 @@ void QTabBarPrivate::moveTabFinished(int index)
}
#endif //QT_NO_ANIMATION
if (allAnimationsFinished && cleanup) {
- movingTab->setVisible(false); // We might not get a mouse release
+ if(movingTab)
+ movingTab->setVisible(false); // We might not get a mouse release
for (int i = 0; i < tabList.count(); ++i) {
tabList[i].dragOffset = 0;
}
diff --git a/src/gui/widgets/qtoolbar.cpp b/src/gui/widgets/qtoolbar.cpp
index bf44ea1..89e6d7a 100644
--- a/src/gui/widgets/qtoolbar.cpp
+++ b/src/gui/widgets/qtoolbar.cpp
@@ -391,7 +391,7 @@ bool QToolBarPrivate::mouseMoveEvent(QMouseEvent *event)
void QToolBarPrivate::unplug(const QRect &_r)
{
Q_Q(QToolBar);
-
+ layout->setExpanded(false, false);
QRect r = _r;
r.moveTopLeft(q->mapToGlobal(QPoint(0, 0)));
setWindowState(true, true, r);
diff --git a/src/gui/widgets/qtoolbarlayout.cpp b/src/gui/widgets/qtoolbarlayout.cpp
index d3c5b4b..1f2ca60 100644
--- a/src/gui/widgets/qtoolbarlayout.cpp
+++ b/src/gui/widgets/qtoolbarlayout.cpp
@@ -642,7 +642,7 @@ QSize QToolBarLayout::expandedSize(const QSize &size) const
return result;
}
-void QToolBarLayout::setExpanded(bool exp)
+void QToolBarLayout::setExpanded(bool exp, bool animated)
{
if (exp == expanded)
return;
@@ -665,7 +665,7 @@ void QToolBarLayout::setExpanded(bool exp)
layoutActions(rect.size());
}
}
- layout->layoutState.toolBarAreaLayout.apply(true);
+ layout->layoutState.toolBarAreaLayout.apply(animated);
}
}
diff --git a/src/gui/widgets/qtoolbarlayout_p.h b/src/gui/widgets/qtoolbarlayout_p.h
index fe81d2f..bb40e215 100644
--- a/src/gui/widgets/qtoolbarlayout_p.h
+++ b/src/gui/widgets/qtoolbarlayout_p.h
@@ -111,8 +111,8 @@ public:
void updateMarginAndSpacing();
bool hasExpandFlag() const;
-public slots:
- void setExpanded(bool b);
+public Q_SLOTS:
+ void setExpanded(bool b, bool animated = true);
private:
QList<QToolBarItem*> items;
diff --git a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp
index f155770..d903f81 100644
--- a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp
+++ b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp
@@ -52,6 +52,8 @@
#include "qaudiodeviceinfo_alsa_p.h"
+QT_BEGIN_NAMESPACE
+
QAudioDeviceInfoPrivate::QAudioDeviceInfoPrivate(QByteArray dev, QAudio::Mode mode)
{
handle = 0;
@@ -391,4 +393,4 @@ QByteArray QAudioDeviceInfoPrivate::defaultOutputDevice()
return QByteArray("default");
}
-
+QT_END_NAMESPACE
diff --git a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.h b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.h
index ca8179f..5f17b71 100644
--- a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.h
+++ b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.h
@@ -65,6 +65,8 @@
#include <QtMultimedia/qaudiodeviceinfo.h>
#include <QtMultimedia/qaudioengine.h>
+QT_BEGIN_NAMESPACE
+
const unsigned int MAX_SAMPLE_RATES = 5;
const unsigned int SAMPLE_RATES[] =
{ 8000, 11025, 22050, 44100, 48000 };
@@ -109,5 +111,7 @@ private:
snd_pcm_hw_params_t *params;
};
+QT_END_NAMESPACE
+
#endif
diff --git a/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp
index 58e7f8b..21b0e9c 100644
--- a/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp
+++ b/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp
@@ -55,6 +55,8 @@
#include <mmsystem.h>
#include "qaudiodeviceinfo_win32_p.h"
+QT_BEGIN_NAMESPACE
+
// For mingw toolchain mmsystem.h only defines half the defines, so add if needed.
#ifndef WAVE_FORMAT_44M08
#define WAVE_FORMAT_44M08 0x00000100
@@ -376,3 +378,4 @@ QByteArray QAudioDeviceInfoPrivate::defaultInputDevice()
return QByteArray("default");
}
+QT_END_NAMESPACE
diff --git a/src/multimedia/audio/qaudiodeviceinfo_win32_p.h b/src/multimedia/audio/qaudiodeviceinfo_win32_p.h
index 9e0d1ea..f5f575b 100644
--- a/src/multimedia/audio/qaudiodeviceinfo_win32_p.h
+++ b/src/multimedia/audio/qaudiodeviceinfo_win32_p.h
@@ -63,6 +63,8 @@
#include <QtMultimedia/qaudioengine.h>
+QT_BEGIN_NAMESPACE
+
const unsigned int MAX_SAMPLE_RATES = 5;
const unsigned int SAMPLE_RATES[] = { 8000, 11025, 22050, 44100, 48000 };
@@ -105,4 +107,6 @@ private:
QList<QAudioFormat::SampleType> typez;
};
+QT_END_NAMESPACE
+
#endif
diff --git a/src/multimedia/audio/qaudioinput_alsa_p.cpp b/src/multimedia/audio/qaudioinput_alsa_p.cpp
index 595c9df..0b3d337 100644
--- a/src/multimedia/audio/qaudioinput_alsa_p.cpp
+++ b/src/multimedia/audio/qaudioinput_alsa_p.cpp
@@ -53,6 +53,8 @@
#include <QtCore/qcoreapplication.h>
#include "qaudioinput_alsa_p.h"
+QT_BEGIN_NAMESPACE
+
//#define DEBUG_AUDIO 1
QAudioInputPrivate::QAudioInputPrivate(const QByteArray &device, const QAudioFormat& audioFormat):
@@ -686,3 +688,4 @@ void InputPrivate::trigger()
emit readyRead();
}
+QT_END_NAMESPACE
diff --git a/src/multimedia/audio/qaudioinput_alsa_p.h b/src/multimedia/audio/qaudioinput_alsa_p.h
index 3f7c85e..400157e 100644
--- a/src/multimedia/audio/qaudioinput_alsa_p.h
+++ b/src/multimedia/audio/qaudioinput_alsa_p.h
@@ -67,6 +67,8 @@
#include <QtMultimedia/qaudiodeviceinfo.h>
#include <QtMultimedia/qaudioengine.h>
+QT_BEGIN_NAMESPACE
+
class InputPrivate;
class QAudioInputPrivate : public QAbstractAudioInput
@@ -148,4 +150,6 @@ private:
QAudioInputPrivate *audioDevice;
};
+QT_END_NAMESPACE
+
#endif
diff --git a/src/multimedia/audio/qaudioinput_win32_p.cpp b/src/multimedia/audio/qaudioinput_win32_p.cpp
index 6da80ee..fd6984f 100644
--- a/src/multimedia/audio/qaudioinput_win32_p.cpp
+++ b/src/multimedia/audio/qaudioinput_win32_p.cpp
@@ -53,6 +53,8 @@
#include "qaudioinput_win32_p.h"
+QT_BEGIN_NAMESPACE
+
//#define DEBUG_AUDIO 1
static CRITICAL_SECTION waveInCriticalSection;
@@ -539,3 +541,4 @@ void InputPrivate::trigger()
emit readyRead();
}
+QT_END_NAMESPACE
diff --git a/src/multimedia/audio/qaudioinput_win32_p.h b/src/multimedia/audio/qaudioinput_win32_p.h
index 7f7b823..f14ce96 100644
--- a/src/multimedia/audio/qaudioinput_win32_p.h
+++ b/src/multimedia/audio/qaudioinput_win32_p.h
@@ -68,6 +68,8 @@
#include <QtMultimedia/qaudioengine.h>
+QT_BEGIN_NAMESPACE
+
class QAudioInputPrivate : public QAbstractAudioInput
{
Q_OBJECT
@@ -149,4 +151,6 @@ private:
QAudioInputPrivate *audioDevice;
};
+QT_END_NAMESPACE
+
#endif
diff --git a/src/multimedia/audio/qaudiooutput_alsa_p.cpp b/src/multimedia/audio/qaudiooutput_alsa_p.cpp
index 5997d31..a5ac177 100644
--- a/src/multimedia/audio/qaudiooutput_alsa_p.cpp
+++ b/src/multimedia/audio/qaudiooutput_alsa_p.cpp
@@ -53,6 +53,8 @@
#include <QtCore/qcoreapplication.h>
#include "qaudiooutput_alsa_p.h"
+QT_BEGIN_NAMESPACE
+
//#define DEBUG_AUDIO 1
QAudioOutputPrivate::QAudioOutputPrivate(const QByteArray &device, const QAudioFormat& audioFormat):
@@ -704,3 +706,5 @@ qint64 OutputPrivate::writeData(const char* data, qint64 len)
return written;
}
+
+QT_END_NAMESPACE
diff --git a/src/multimedia/audio/qaudiooutput_alsa_p.h b/src/multimedia/audio/qaudiooutput_alsa_p.h
index 295927b..068428d 100644
--- a/src/multimedia/audio/qaudiooutput_alsa_p.h
+++ b/src/multimedia/audio/qaudiooutput_alsa_p.h
@@ -66,6 +66,8 @@
#include <QtMultimedia/qaudiodeviceinfo.h>
#include <QtMultimedia/qaudioengine.h>
+QT_BEGIN_NAMESPACE
+
class OutputPrivate;
class QAudioOutputPrivate : public QAbstractAudioOutput
@@ -156,4 +158,6 @@ private:
QAudioOutputPrivate *audioDevice;
};
+QT_END_NAMESPACE
+
#endif
diff --git a/src/multimedia/audio/qaudiooutput_win32_p.cpp b/src/multimedia/audio/qaudiooutput_win32_p.cpp
index bace4a6..99229df 100644
--- a/src/multimedia/audio/qaudiooutput_win32_p.cpp
+++ b/src/multimedia/audio/qaudiooutput_win32_p.cpp
@@ -54,6 +54,8 @@
//#define DEBUG_AUDIO 1
+QT_BEGIN_NAMESPACE
+
static CRITICAL_SECTION waveOutCriticalSection;
QAudioOutputPrivate::QAudioOutputPrivate(const QByteArray &device, const QAudioFormat& audioFormat):
@@ -502,3 +504,5 @@ qint64 OutputPrivate::writeData(const char* data, qint64 len)
}
return written;
}
+
+QT_END_NAMESPACE
diff --git a/src/multimedia/audio/qaudiooutput_win32_p.h b/src/multimedia/audio/qaudiooutput_win32_p.h
index c6c025f..3906d9d 100644
--- a/src/multimedia/audio/qaudiooutput_win32_p.h
+++ b/src/multimedia/audio/qaudiooutput_win32_p.h
@@ -67,6 +67,8 @@
#include <QtMultimedia/qaudioengine.h>
+QT_BEGIN_NAMESPACE
+
class QAudioOutputPrivate : public QAbstractAudioOutput
{
Q_OBJECT
@@ -149,4 +151,6 @@ private:
QAudioOutputPrivate *audioDevice;
};
+QT_END_NAMESPACE
+
#endif
diff --git a/src/multimedia/video/qimagevideobuffer.cpp b/src/multimedia/video/qimagevideobuffer.cpp
index d63f145..6af0c41 100644
--- a/src/multimedia/video/qimagevideobuffer.cpp
+++ b/src/multimedia/video/qimagevideobuffer.cpp
@@ -46,6 +46,8 @@
#include <qimage.h>
#include <qvariant.h>
+QT_BEGIN_NAMESPACE
+
class QImageVideoBufferPrivate : public QAbstractVideoBufferPrivate
{
public:
@@ -100,3 +102,5 @@ void QImageVideoBuffer::unmap()
d->mapMode = NotMapped;
}
+
+QT_END_NAMESPACE
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp
index 7b5a6e2..b111bec 100644
--- a/src/network/access/qhttpnetworkconnection.cpp
+++ b/src/network/access/qhttpnetworkconnection.cpp
@@ -65,7 +65,11 @@
QT_BEGIN_NAMESPACE
+#ifdef Q_OS_SYMBIAN
+const int QHttpNetworkConnectionPrivate::defaultChannelCount = 3;
+#else
const int QHttpNetworkConnectionPrivate::defaultChannelCount = 6;
+#endif
// the maximum amount of requests that might be pipelined into a socket
// from what was suggested, 3 seems to be OK
@@ -125,30 +129,6 @@ int QHttpNetworkConnectionPrivate::indexOf(QAbstractSocket *socket) const
return 0;
}
-bool QHttpNetworkConnectionPrivate::isSocketBusy(QAbstractSocket *socket) const
-{
- int i = indexOf(socket);
- return (channels[i].state & QHttpNetworkConnectionChannel::BusyState);
-}
-
-bool QHttpNetworkConnectionPrivate::isSocketWriting(QAbstractSocket *socket) const
-{
- int i = indexOf(socket);
- return (i != -1 && (channels[i].state & QHttpNetworkConnectionChannel::WritingState));
-}
-
-bool QHttpNetworkConnectionPrivate::isSocketWaiting(QAbstractSocket *socket) const
-{
- int i = indexOf(socket);
- return (i != -1 && (channels[i].state & QHttpNetworkConnectionChannel::WaitingState));
-}
-
-bool QHttpNetworkConnectionPrivate::isSocketReading(QAbstractSocket *socket) const
-{
- int i = indexOf(socket);
- return (i != -1 && (channels[i].state & QHttpNetworkConnectionChannel::ReadingState));
-}
-
qint64 QHttpNetworkConnectionPrivate::uncompressedBytesAvailable(const QHttpNetworkReply &reply) const
{
return reply.d_func()->responseData.byteAmount();
@@ -623,7 +603,7 @@ void QHttpNetworkConnectionPrivate::removeReply(QHttpNetworkReply *reply)
for (int i = 0; i < channelCount; ++i) {
if (channels[i].reply == reply) {
channels[i].reply = 0;
- if (reply->d_func()->connectionCloseEnabled())
+ if (reply->d_func()->isConnectionCloseEnabled())
channels[i].close();
QMetaObject::invokeMethod(q, "_q_startNextRequest", Qt::QueuedConnection);
return;
@@ -670,7 +650,7 @@ void QHttpNetworkConnectionPrivate::_q_startNextRequest()
for (int i = 0; i < channelCount; ++i) {
QAbstractSocket *chSocket = channels[i].socket;
// send the request using the idle socket
- if (!isSocketBusy(chSocket)) {
+ if (!channels[i].isSocketBusy()) {
socket = chSocket;
break;
}
diff --git a/src/network/access/qhttpnetworkconnection_p.h b/src/network/access/qhttpnetworkconnection_p.h
index 9d2c13f..92b758e 100644
--- a/src/network/access/qhttpnetworkconnection_p.h
+++ b/src/network/access/qhttpnetworkconnection_p.h
@@ -165,10 +165,6 @@ public:
enum { ChunkSize = 4096 };
int indexOf(QAbstractSocket *socket) const;
- bool isSocketBusy(QAbstractSocket *socket) const;
- bool isSocketWriting(QAbstractSocket *socket) const;
- bool isSocketWaiting(QAbstractSocket *socket) const;
- bool isSocketReading(QAbstractSocket *socket) const;
QHttpNetworkReply *queueRequest(const QHttpNetworkRequest &request);
void requeueRequest(const HttpMessagePair &pair); // e.g. after pipeline broke
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index 9d78c55..d880f60 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -524,7 +524,7 @@ void QHttpNetworkConnectionChannel::allDone()
handleStatus();
// ### at this point there should be no more data on the socket
// close if server requested
- if (reply->d_func()->connectionCloseEnabled())
+ if (reply->d_func()->isConnectionCloseEnabled())
close();
// queue the finished signal, this is required since we might send new requests from
// slot connected to it. The socket will not fire readyRead signal, if we are already
@@ -539,7 +539,7 @@ void QHttpNetworkConnectionChannel::allDone()
// move next from pipeline to current request
if (!alreadyPipelinedRequests.isEmpty()) {
- if (resendCurrent || reply->d_func()->connectionCloseEnabled() || socket->state() != QAbstractSocket::ConnectedState) {
+ if (resendCurrent || reply->d_func()->isConnectionCloseEnabled() || socket->state() != QAbstractSocket::ConnectedState) {
// move the pipelined ones back to the main queue
requeueCurrentlyPipelinedRequests();
} else {
@@ -584,7 +584,7 @@ void QHttpNetworkConnectionChannel::detectPipeliningSupport()
// check for HTTP/1.1
&& (reply->d_func()->majorVersion == 1 && reply->d_func()->minorVersion == 1)
// check for not having connection close
- && (!reply->d_func()->connectionCloseEnabled())
+ && (!reply->d_func()->isConnectionCloseEnabled())
// check if it is still connected
&& (socket->state() == QAbstractSocket::ConnectedState)
) {
@@ -705,10 +705,30 @@ void QHttpNetworkConnectionChannel::closeAndResendCurrentRequest()
QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);
}
+bool QHttpNetworkConnectionChannel::isSocketBusy() const
+{
+ return (state & QHttpNetworkConnectionChannel::BusyState);
+}
+
+bool QHttpNetworkConnectionChannel::isSocketWriting() const
+{
+ return (state & QHttpNetworkConnectionChannel::WritingState);
+}
+
+bool QHttpNetworkConnectionChannel::isSocketWaiting() const
+{
+ return (state & QHttpNetworkConnectionChannel::WaitingState);
+}
+
+bool QHttpNetworkConnectionChannel::isSocketReading() const
+{
+ return (state & QHttpNetworkConnectionChannel::ReadingState);
+}
+
//private slots
void QHttpNetworkConnectionChannel::_q_readyRead()
{
- if (connection->d_func()->isSocketWaiting(socket) || connection->d_func()->isSocketReading(socket)) {
+ if (isSocketWaiting() || isSocketReading()) {
state = QHttpNetworkConnectionChannel::ReadingState;
if (reply)
receiveReply();
@@ -719,7 +739,7 @@ void QHttpNetworkConnectionChannel::_q_bytesWritten(qint64 bytes)
{
Q_UNUSED(bytes);
// bytes have been written to the socket. write even more of them :)
- if (connection->d_func()->isSocketWriting(socket))
+ if (isSocketWriting())
sendRequest();
// otherwise we do nothing
}
@@ -727,7 +747,7 @@ void QHttpNetworkConnectionChannel::_q_bytesWritten(qint64 bytes)
void QHttpNetworkConnectionChannel::_q_disconnected()
{
// read the available data before closing
- if (connection->d_func()->isSocketWaiting(socket) || connection->d_func()->isSocketReading(socket)) {
+ if (isSocketWaiting() || isSocketReading()) {
state = QHttpNetworkConnectionChannel::ReadingState;
if (reply)
receiveReply();
diff --git a/src/network/access/qhttpnetworkconnectionchannel_p.h b/src/network/access/qhttpnetworkconnectionchannel_p.h
index 220b72c..687ba47 100644
--- a/src/network/access/qhttpnetworkconnectionchannel_p.h
+++ b/src/network/access/qhttpnetworkconnectionchannel_p.h
@@ -160,6 +160,11 @@ public:
void eatWhitespace();
+ bool isSocketBusy() const;
+ bool isSocketWriting() const;
+ bool isSocketWaiting() const;
+ bool isSocketReading() const;
+
protected slots:
void _q_bytesWritten(qint64 bytes); // proceed sending
void _q_readyRead(); // pending data to read
diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp
index ba429fd..d3d57d4 100644
--- a/src/network/access/qhttpnetworkreply.cpp
+++ b/src/network/access/qhttpnetworkreply.cpp
@@ -196,7 +196,8 @@ bool QHttpNetworkReply::isPipeliningUsed() const
QHttpNetworkReplyPrivate::QHttpNetworkReplyPrivate(const QUrl &newUrl)
: QHttpNetworkHeaderPrivate(newUrl), state(NothingDoneState), statusCode(100),
majorVersion(0), minorVersion(0), bodyLength(0), contentRead(0), totalProgress(0),
- chunkedTransferEncoding(0),
+ chunkedTransferEncoding(false),
+ connectionCloseEnabled(true),
currentChunkSize(0), currentChunkRead(0), connection(0), initInflate(false),
autoDecompress(false), responseData(), requestIsPrepared(false)
,pipeliningUsed(false)
@@ -216,6 +217,7 @@ void QHttpNetworkReplyPrivate::clear()
totalProgress = 0;
currentChunkSize = 0;
currentChunkRead = 0;
+ connectionCloseEnabled = true;
connection = 0;
#ifndef QT_NO_COMPRESS
if (initInflate)
@@ -510,6 +512,10 @@ qint64 QHttpNetworkReplyPrivate::readHeader(QAbstractSocket *socket)
// cache isChunked() since it is called often
chunkedTransferEncoding = headerField("transfer-encoding").toLower().contains("chunked");
+
+ // cache isConnectionCloseEnabled since it is called often
+ connectionCloseEnabled = (headerField("connection").toLower().contains("close") ||
+ headerField("proxy-connection").toLower().contains("close"));
}
return bytes;
}
@@ -553,10 +559,9 @@ bool QHttpNetworkReplyPrivate::isChunked()
return chunkedTransferEncoding;
}
-bool QHttpNetworkReplyPrivate::connectionCloseEnabled()
+bool QHttpNetworkReplyPrivate::isConnectionCloseEnabled()
{
- return (headerField("connection").toLower().contains("close") ||
- headerField("proxy-connection").toLower().contains("close"));
+ return connectionCloseEnabled;
}
// note this function can only be used for non-chunked, non-compressed with
diff --git a/src/network/access/qhttpnetworkreply_p.h b/src/network/access/qhttpnetworkreply_p.h
index 8d4d724..cfc1523 100644
--- a/src/network/access/qhttpnetworkreply_p.h
+++ b/src/network/access/qhttpnetworkreply_p.h
@@ -185,7 +185,7 @@ public:
qint64 bytesAvailable() const;
bool isChunked();
- bool connectionCloseEnabled();
+ bool isConnectionCloseEnabled();
bool isGzipped();
#ifndef QT_NO_COMPRESS
bool gzipCheckHeader(QByteArray &content, int &pos);
@@ -212,6 +212,7 @@ public:
qint64 totalProgress;
QByteArray fragment; // used for header, status, chunk header etc, not for reply data
bool chunkedTransferEncoding;
+ bool connectionCloseEnabled;
qint64 currentChunkSize;
qint64 currentChunkRead;
QPointer<QHttpNetworkConnection> connection;
diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
index e9f62b6..94f1006 100644
--- a/src/network/ssl/qsslsocket.cpp
+++ b/src/network/ssl/qsslsocket.cpp
@@ -1297,10 +1297,8 @@ QList<QSslCertificate> QSslSocket::defaultCaCertificates()
}
/*!
- Returns the system default CA certificate database for your
- system. This database is normally found in a standard place for
- your system. If it is not found there, Qt will provide its own
- default CA certificate database. The CA certificate database
+ This function provides a default CA certificate database
+ shipped together with Qt. The CA certificate database
returned by this function is used to initialize the database
returned by defaultCaCertificates(). You can replace that database
with your own with setDefaultCaCertificates().
diff --git a/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp b/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp
index 8f9a6a9..425b877 100644
--- a/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp
+++ b/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp
@@ -98,7 +98,7 @@ void QGL2PEXVertexArray::addPath(const QVectorPath &path, GLfloat curveInverseSc
case QPainterPath::MoveToElement:
// qDebug("element[%d] is a MoveToElement", i);
vertexArrayStops.append(vertexArray.size());
- vertexArray.add(points[i]); // Add the moveTo as a new vertex
+ lineToArray(points[i].x(), points[i].y()); // Add the moveTo as a new vertex
break;
case QPainterPath::LineToElement:
// qDebug("element[%d] is a LineToElement", i);
diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h
index d5241a8..ace6b63 100644
--- a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h
+++ b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h
@@ -209,7 +209,7 @@
(QGLCustomShaderStage). The shader will implement a pre-defined method name
which Qt's fragment pipeline will call:
- lowp vec4 customShader(sampler2d src, vec2 srcCoords)
+ lowp vec4 customShader(lowp sampler2d imageTexture, highp vec2 textureCoords)
The provided src and srcCoords parameters can be used to sample from the
source image.
diff --git a/src/opengl/gl2paintengineex/qglengineshadersource_p.h b/src/opengl/gl2paintengineex/qglengineshadersource_p.h
index cf930f3..c8e85ab 100644
--- a/src/opengl/gl2paintengineex/qglengineshadersource_p.h
+++ b/src/opengl/gl2paintengineex/qglengineshadersource_p.h
@@ -73,8 +73,8 @@ static const char* const qglslMainVertexShader = "\
}";
static const char* const qglslMainWithTexCoordsVertexShader = "\
- attribute mediump vec2 textureCoordArray; \
- varying mediump vec2 textureCoords; \
+ attribute highp vec2 textureCoordArray; \
+ varying highp vec2 textureCoords; \
uniform highp float depth;\
void setPosition();\
void main(void) \
@@ -105,9 +105,9 @@ static const char* const qglslPositionWithPatternBrushVertexShader = "\
attribute highp vec4 vertexCoordsArray; \
uniform highp mat4 pmvMatrix; \
uniform mediump vec2 halfViewportSize; \
- uniform mediump vec2 invertedTextureSize; \
- uniform mediump mat3 brushTransform; \
- varying mediump vec2 patternTexCoords; \
+ uniform highp vec2 invertedTextureSize; \
+ uniform highp mat3 brushTransform; \
+ varying highp vec2 patternTexCoords; \
void setPosition(void) { \
gl_Position = pmvMatrix * vertexCoordsArray;\
gl_Position.xy = gl_Position.xy / gl_Position.w; \
@@ -124,9 +124,9 @@ static const char* const qglslAffinePositionWithPatternBrushVertexShader
= qglslPositionWithPatternBrushVertexShader;
static const char* const qglslPatternBrushSrcFragmentShader = "\
- uniform sampler2D brushTexture;\
+ uniform lowp sampler2D brushTexture;\
uniform lowp vec4 patternColor; \
- varying mediump vec2 patternTexCoords;\
+ varying highp vec2 patternTexCoords;\
lowp vec4 srcPixel() { \
return patternColor * (1.0 - texture2D(brushTexture, patternTexCoords).r); \
}\n";
@@ -139,7 +139,7 @@ static const char* const qglslPositionWithLinearGradientBrushVertexShader = "\
uniform mediump vec2 halfViewportSize; \
uniform highp vec3 linearData; \
uniform highp mat3 brushTransform; \
- varying mediump float index ; \
+ varying mediump float index; \
void setPosition() { \
gl_Position = pmvMatrix * vertexCoordsArray;\
gl_Position.xy = gl_Position.xy / gl_Position.w; \
@@ -155,7 +155,7 @@ static const char* const qglslAffinePositionWithLinearGradientBrushVertexShader
= qglslPositionWithLinearGradientBrushVertexShader;
static const char* const qglslLinearGradientBrushSrcFragmentShader = "\
- uniform sampler2D brushTexture; \
+ uniform lowp sampler2D brushTexture; \
varying mediump float index; \
lowp vec4 srcPixel() { \
mediump vec2 val = vec2(index, 0.5); \
@@ -187,7 +187,7 @@ static const char* const qglslAffinePositionWithConicalGradientBrushVertexShader
static const char* const qglslConicalGradientBrushSrcFragmentShader = "\n\
#define INVERSE_2PI 0.1591549430918953358 \n\
- uniform sampler2D brushTexture; \n\
+ uniform lowp sampler2D brushTexture; \n\
uniform mediump float angle; \
varying highp vec2 A; \
lowp vec4 srcPixel() { \
@@ -226,7 +226,7 @@ static const char* const qglslAffinePositionWithRadialGradientBrushVertexShader
= qglslPositionWithRadialGradientBrushVertexShader;
static const char* const qglslRadialGradientBrushSrcFragmentShader = "\
- uniform sampler2D brushTexture; \
+ uniform lowp sampler2D brushTexture; \
uniform highp float fmp2_m_radius2; \
uniform highp float inverse_2_fmp2_m_radius2; \
varying highp float b; \
@@ -243,9 +243,9 @@ static const char* const qglslPositionWithTextureBrushVertexShader = "\
attribute highp vec4 vertexCoordsArray; \
uniform highp mat4 pmvMatrix; \
uniform mediump vec2 halfViewportSize; \
- uniform mediump vec2 invertedTextureSize; \
- uniform mediump mat3 brushTransform; \
- varying mediump vec2 brushTextureCoords; \
+ uniform highp vec2 invertedTextureSize; \
+ uniform highp mat3 brushTransform; \
+ varying highp vec2 brushTextureCoords; \
void setPosition(void) { \
gl_Position = pmvMatrix * vertexCoordsArray;\
gl_Position.xy = gl_Position.xy / gl_Position.w; \
@@ -255,23 +255,22 @@ static const char* const qglslPositionWithTextureBrushVertexShader = "\
gl_Position.xy = gl_Position.xy * invertedHTexCoordsZ; \
gl_Position.w = invertedHTexCoordsZ; \
brushTextureCoords.xy = (hTexCoords.xy * invertedTextureSize) * gl_Position.w; \
- brushTextureCoords.y = -brushTextureCoords.y; \
}";
static const char* const qglslAffinePositionWithTextureBrushVertexShader
= qglslPositionWithTextureBrushVertexShader;
static const char* const qglslTextureBrushSrcFragmentShader = "\
- varying mediump vec2 brushTextureCoords; \
- uniform sampler2D brushTexture; \
+ varying highp vec2 brushTextureCoords; \
+ uniform lowp sampler2D brushTexture; \
lowp vec4 srcPixel() { \
return texture2D(brushTexture, brushTextureCoords); \
}";
static const char* const qglslTextureBrushSrcWithPatternFragmentShader = "\
- varying mediump vec2 brushTextureCoords; \
+ varying highp vec2 brushTextureCoords; \
uniform lowp vec4 patternColor; \
- uniform sampler2D brushTexture; \
+ uniform lowp sampler2D brushTexture; \
lowp vec4 srcPixel() { \
return patternColor * (1.0 - texture2D(brushTexture, brushTextureCoords).r); \
}";
@@ -284,16 +283,16 @@ static const char* const qglslSolidBrushSrcFragmentShader = "\
}";
static const char* const qglslImageSrcFragmentShader = "\
- varying mediump vec2 textureCoords; \
- uniform sampler2D imageTexture; \
+ varying highp vec2 textureCoords; \
+ uniform lowp sampler2D imageTexture; \
lowp vec4 srcPixel() { \
return texture2D(imageTexture, textureCoords); \
}";
static const char* const qglslCustomSrcFragmentShader = "\
varying highp vec2 textureCoords; \
- uniform sampler2D imageTexture; \
- lowp vec4 customShader(sampler2D texture, vec2 coords); \
+ uniform lowp sampler2D imageTexture; \
+ lowp vec4 customShader(lowp sampler2D texture, highp vec2 coords); \
lowp vec4 srcPixel() { \
return customShader(imageTexture, textureCoords); \
}";
@@ -301,14 +300,14 @@ static const char* const qglslCustomSrcFragmentShader = "\
static const char* const qglslImageSrcWithPatternFragmentShader = "\
varying highp vec2 textureCoords; \
uniform lowp vec4 patternColor; \
- uniform sampler2D imageTexture; \
+ uniform lowp sampler2D imageTexture; \
lowp vec4 srcPixel() { \
return patternColor * (1.0 - texture2D(imageTexture, textureCoords).r); \
}\n";
static const char* const qglslNonPremultipliedImageSrcFragmentShader = "\
varying highp vec2 textureCoords; \
- uniform sampler2D imageTexture; \
+ uniform lowp sampler2D imageTexture; \
lowp vec4 srcPixel() { \
lowp vec4 sample = texture2D(imageTexture, textureCoords); \
sample.rgb = sample.rgb * sample.a; \
@@ -383,7 +382,7 @@ static const char* const qglslMainFragmentShader = "\
static const char* const qglslMaskFragmentShader = "\
varying highp vec2 textureCoords;\
- uniform sampler2D maskTexture;\
+ uniform lowp sampler2D maskTexture;\
lowp vec4 applyMask(lowp vec4 src) \
{\
lowp vec4 mask = texture2D(maskTexture, textureCoords); \
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index 31e2429..cc9b014 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -376,6 +376,7 @@ void QGL2PaintEngineExPrivate::useSimpleShader()
void QGL2PaintEngineExPrivate::updateBrushTexture()
{
+ Q_Q(QGL2PaintEngineEx);
// qDebug("QGL2PaintEngineExPrivate::updateBrushTexture()");
Qt::BrushStyle style = currentBrush->style();
@@ -385,7 +386,7 @@ void QGL2PaintEngineExPrivate::updateBrushTexture()
glActiveTexture(GL_TEXTURE0 + QT_BRUSH_TEXTURE_UNIT);
ctx->d_func()->bindTexture(texImage, GL_TEXTURE_2D, GL_RGBA, true, QGLContext::InternalBindOption);
- updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT, true);
+ updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT, q->state()->renderHints & QPainter::SmoothPixmapTransform);
}
else if (style >= Qt::LinearGradientPattern && style <= Qt::ConicalGradientPattern) {
// Gradiant brush: All the gradiants use the same texture
@@ -400,18 +401,18 @@ void QGL2PaintEngineExPrivate::updateBrushTexture()
glBindTexture(GL_TEXTURE_2D, texId);
if (g->spread() == QGradient::RepeatSpread || g->type() == QGradient::ConicalGradient)
- updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT, true);
+ updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT, q->state()->renderHints & QPainter::SmoothPixmapTransform);
else if (g->spread() == QGradient::ReflectSpread)
- updateTextureFilter(GL_TEXTURE_2D, GL_MIRRORED_REPEAT_IBM, true);
+ updateTextureFilter(GL_TEXTURE_2D, GL_MIRRORED_REPEAT_IBM, q->state()->renderHints & QPainter::SmoothPixmapTransform);
else
- updateTextureFilter(GL_TEXTURE_2D, GL_CLAMP_TO_EDGE, true);
+ updateTextureFilter(GL_TEXTURE_2D, GL_CLAMP_TO_EDGE, q->state()->renderHints & QPainter::SmoothPixmapTransform);
}
else if (style == Qt::TexturePattern) {
const QPixmap& texPixmap = currentBrush->texture();
glActiveTexture(GL_TEXTURE0 + QT_BRUSH_TEXTURE_UNIT);
ctx->d_func()->bindTexture(texPixmap, GL_TEXTURE_2D, GL_RGBA, QGLContext::InternalBindOption);
- updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT, true);
+ updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT, q->state()->renderHints & QPainter::SmoothPixmapTransform);
}
brushTextureDirty = false;
}
@@ -674,7 +675,7 @@ void QGL2PaintEngineExPrivate::drawTexture(const QGLRect& dest, const QGLRect& s
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
}
-void QGL2PaintEngineEx::sync()
+void QGL2PaintEngineEx::beginNativePainting()
{
Q_D(QGL2PaintEngineEx);
ensureActive();
@@ -708,15 +709,25 @@ void QGL2PaintEngineEx::sync()
#endif
d->lastTexture = GLuint(-1);
+ d->resetGLState();
+
+ d->needsSync = true;
+}
+void QGL2PaintEngineExPrivate::resetGLState()
+{
glDisable(GL_BLEND);
glActiveTexture(GL_TEXTURE0);
-
glDisable(GL_DEPTH_TEST);
+ glDisable(GL_SCISSOR_TEST);
glDepthFunc(GL_LESS);
glDepthMask(true);
glClearDepth(1);
+}
+void QGL2PaintEngineEx::endNativePainting()
+{
+ Q_D(QGL2PaintEngineEx);
d->needsSync = true;
}
@@ -1073,6 +1084,7 @@ void QGL2PaintEngineEx::renderHintsChanged()
Q_D(QGL2PaintEngineEx);
d->lastTexture = GLuint(-1);
+ d->brushTextureDirty = true;
// qDebug("QGL2PaintEngineEx::renderHintsChanged() not implemented!");
}
@@ -1101,7 +1113,7 @@ void QGL2PaintEngineEx::drawPixmap(const QRectF& dest, const QPixmap & pixmap, c
bool isBitmap = pixmap.isQBitmap();
bool isOpaque = !isBitmap && !pixmap.hasAlphaChannel();
- d->updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT,
+ d->updateTextureFilter(GL_TEXTURE_2D, GL_CLAMP_TO_EDGE,
state()->renderHints & QPainter::SmoothPixmapTransform, texture->id);
d->drawTexture(dest, srcRect, pixmap.size(), isOpaque, isBitmap);
}
@@ -1115,11 +1127,10 @@ void QGL2PaintEngineEx::drawImage(const QRectF& dest, const QImage& image, const
QGLContext *ctx = d->ctx;
glActiveTexture(GL_TEXTURE0 + QT_IMAGE_TEXTURE_UNIT);
- QGLTexture *texture = ctx->d_func()->bindTexture(image, GL_TEXTURE_2D, GL_RGBA, true,
- QGLContext::InternalBindOption);
+ QGLTexture *texture = ctx->d_func()->bindTexture(image, GL_TEXTURE_2D, GL_RGBA, QGLContext::InternalBindOption);
GLuint id = texture->id;
- d->updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT,
+ d->updateTextureFilter(GL_TEXTURE_2D, GL_CLAMP_TO_EDGE,
state()->renderHints & QPainter::SmoothPixmapTransform, id);
d->drawTexture(dest, src, image.size(), !image.hasAlphaChannel());
}
@@ -1134,7 +1145,7 @@ void QGL2PaintEngineEx::drawTexture(const QRectF &dest, GLuint textureId, const
glActiveTexture(GL_TEXTURE0 + QT_IMAGE_TEXTURE_UNIT);
glBindTexture(GL_TEXTURE_2D, textureId);
- d->updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT,
+ d->updateTextureFilter(GL_TEXTURE_2D, GL_CLAMP_TO_EDGE,
state()->renderHints & QPainter::SmoothPixmapTransform, textureId);
d->drawTexture(dest, src, size, false);
}
@@ -1357,6 +1368,8 @@ bool QGL2PaintEngineEx::end()
d->drawable.doneCurrent();
d->ctx->d_ptr->active_engine = 0;
+ d->resetGLState();
+
return false;
}
@@ -1500,7 +1513,7 @@ void QGL2PaintEngineEx::clip(const QVectorPath &path, Qt::ClipOperation op)
if (op == Qt::ReplaceClip && !d->hasClipOperations())
op = Qt::IntersectClip;
- if (!path.isEmpty() && op == Qt::IntersectClip && (path.hints() & QVectorPath::RectangleHint)) {
+ 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]);
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
index 7b734e3..66e7a51 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
@@ -133,7 +133,9 @@ public:
inline const QOpenGL2PaintEngineState *state() const {
return static_cast<const QOpenGL2PaintEngineState *>(QPaintEngineEx::state());
}
- virtual void sync();
+
+ void beginNativePainting();
+ void endNativePainting();
const QGLContext* context();
@@ -168,6 +170,7 @@ public:
void setBrush(const QBrush* brush);
void transferMode(EngineMode newMode);
+ void resetGLState();
// fill, drawOutline, drawTexture & drawCachedGlyphs are the rendering entry points:
void fill(const QVectorPath &path);
diff --git a/src/opengl/qglpixmapfilter.cpp b/src/opengl/qglpixmapfilter.cpp
index 9ea602d..0913606 100644
--- a/src/opengl/qglpixmapfilter.cpp
+++ b/src/opengl/qglpixmapfilter.cpp
@@ -338,7 +338,6 @@ bool QGLPixmapBlurFilter::processGL(QPainter *painter, const QPointF &pos, const
QGL2PaintEngineEx *engine = static_cast<QGL2PaintEngineEx *>(painter->paintEngine());
- engine->syncState();
painter->save();
// ensure GL_LINEAR filtering is used
@@ -418,7 +417,7 @@ QByteArray QGLPixmapBlurFilter::generateBlurShader(int radius, bool gaussianBlur
source.append("uniform highp vec4 clip;\n");
}
- source.append("lowp vec4 customShader(sampler2D src, vec2 srcCoords) {\n");
+ source.append("lowp vec4 customShader(lowp sampler2D src, highp vec2 srcCoords) {\n");
QVector<qreal> sampleOffsets;
QVector<qreal> weights;
diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp
index f8bffd3..8ce50cf 100644
--- a/src/opengl/qglshaderprogram.cpp
+++ b/src/opengl/qglshaderprogram.cpp
@@ -104,7 +104,7 @@ QT_BEGIN_NAMESPACE
on desktop systems. The programmer should restrict themselves
to just features that are present in GLSL/ES, and avoid
standard variable names that only work on the desktop.
-
+
\section1 Simple shader example
\code
@@ -199,8 +199,11 @@ QT_BEGIN_NAMESPACE
\value VertexShader Vertex shader written in the OpenGL Shading Language (GLSL).
\value FragmentShader Fragment shader written in the OpenGL Shading Language (GLSL).
+
\value PartialVertexShader Partial vertex shader that will be concatenated with all other partial vertex shaders at link time.
\value PartialFragmentShader Partial fragment shader that will be concatenated with all other partial fragment shaders at link time.
+
+ \omitvalue PartialShader
*/
#ifndef GL_FRAGMENT_SHADER
@@ -251,8 +254,7 @@ public:
, shader(0)
, shaderType(type)
, compiled(false)
- , isPartial(type == QGLShader::PartialVertexShader ||
- type == QGLShader::PartialFragmentShader)
+ , isPartial((type & QGLShader::PartialShader) != 0)
, hasPartialSource(false)
{
}
@@ -348,31 +350,6 @@ QGLShader::QGLShader(QGLShader::ShaderType type, QObject *parent)
}
/*!
- Constructs a new QGLShader object from the source code in \a fileName
- and attaches it to \a parent. If the filename ends in \c{.fsh},
- it is assumed to be a fragment shader, otherwise it is assumed to
- be a vertex shader (normally the extension is \c{.vsh} for vertex shaders).
- If the shader could not be loaded, then isCompiled() will return false.
-
- The shader will be associated with the current QGLContext.
-
- \sa isCompiled()
-*/
-QGLShader::QGLShader(const QString& fileName, QObject *parent)
- : QObject(parent)
-{
- if (fileName.endsWith(QLatin1String(".fsh"), Qt::CaseInsensitive))
- d = new QGLShaderPrivate(QGLShader::FragmentShader, QGLContext::currentContext());
- else
- d = new QGLShaderPrivate(QGLShader::VertexShader, QGLContext::currentContext());
- if (d->create() && !compileFile(fileName)) {
- if (d->shader)
- glDeleteShader(d->shader);
- d->shader = 0;
- }
-}
-
-/*!
Constructs a new QGLShader object of the specified \a type from the
source code in \a fileName and attaches it to \a parent.
If the shader could not be loaded, then isCompiled() will return false.
@@ -413,31 +390,6 @@ QGLShader::QGLShader(QGLShader::ShaderType type, const QGLContext *context, QObj
}
/*!
- Constructs a new QGLShader object from the source code in \a fileName
- and attaches it to \a parent. If the filename ends in \c{.fsh},
- it is assumed to be a fragment shader, otherwise it is assumed to
- be a vertex shader (normally the extension is \c{.vsh} for vertex shaders).
- If the shader could not be loaded, then isCompiled() will return false.
-
- The shader will be associated with \a context.
-
- \sa isCompiled()
-*/
-QGLShader::QGLShader(const QString& fileName, const QGLContext *context, QObject *parent)
- : QObject(parent)
-{
- if (fileName.endsWith(QLatin1String(".fsh"), Qt::CaseInsensitive))
- d = new QGLShaderPrivate(QGLShader::FragmentShader, context);
- else
- d = new QGLShaderPrivate(QGLShader::VertexShader, context);
- if (d->create() && !compileFile(fileName)) {
- if (d->shader)
- glDeleteShader(d->shader);
- d->shader = 0;
- }
-}
-
-/*!
Constructs a new QGLShader object of the specified \a type from the
source code in \a fileName and attaches it to \a parent.
If the shader could not be loaded, then isCompiled() will return false.
@@ -917,6 +869,33 @@ bool QGLShaderProgram::addShader(QGLShader::ShaderType type, const QString& sour
}
/*!
+ Compiles the contents of \a fileName as a shader of the specified
+ \a type and adds it to this shader program. Returns true if
+ compilation was successful, false otherwise. The compilation errors
+ and warnings will be made available via log().
+
+ This function is intended to be a short-cut for quickly
+ adding vertex and fragment shaders to a shader program without
+ creating an instance of QGLShader first.
+
+ \sa addShader()
+*/
+bool QGLShaderProgram::addShaderFromFile
+ (QGLShader::ShaderType type, const QString& fileName)
+{
+ if (!init())
+ return false;
+ QGLShader *shader = new QGLShader(type, this);
+ if (!shader->compileFile(fileName)) {
+ d->log = shader->log();
+ delete shader;
+ return false;
+ }
+ d->anonShaders.append(shader);
+ return addShader(shader);
+}
+
+/*!
Removes \a shader from this shader program. The object is not deleted.
\sa addShader(), link(), removeAllShaders()
@@ -2983,6 +2962,7 @@ bool QGLShaderProgram::hasShaderPrograms(const QGLContext *context)
#endif
}
+
#endif
QT_END_NAMESPACE
diff --git a/src/opengl/qglshaderprogram.h b/src/opengl/qglshaderprogram.h
index c5295eb..4f95ef3 100644
--- a/src/opengl/qglshaderprogram.h
+++ b/src/opengl/qglshaderprogram.h
@@ -63,19 +63,21 @@ class Q_OPENGL_EXPORT QGLShader : public QObject
{
Q_OBJECT
public:
- enum ShaderType
+ enum ShaderTypeBits
{
- VertexShader,
- FragmentShader,
- PartialVertexShader,
- PartialFragmentShader
+ VertexShader = 0x0001,
+ FragmentShader = 0x0002,
+
+ PartialShader = 0x1000,
+
+ PartialVertexShader = PartialShader | VertexShader,
+ PartialFragmentShader = PartialShader | FragmentShader
};
+ Q_DECLARE_FLAGS(ShaderType, ShaderTypeBits);
explicit QGLShader(QGLShader::ShaderType type, QObject *parent = 0);
- explicit QGLShader(const QString& fileName, QObject *parent = 0);
QGLShader(const QString& fileName, QGLShader::ShaderType type, QObject *parent = 0);
QGLShader(QGLShader::ShaderType type, const QGLContext *context, QObject *parent = 0);
- QGLShader(const QString& fileName, const QGLContext *context, QObject *parent = 0);
QGLShader(const QString& fileName, QGLShader::ShaderType type, const QGLContext *context, QObject *parent = 0);
virtual ~QGLShader();
@@ -106,6 +108,9 @@ private:
Q_DISABLE_COPY(QGLShader)
};
+Q_DECLARE_OPERATORS_FOR_FLAGS(QGLShader::ShaderType);
+
+
class QGLShaderProgramPrivate;
class Q_OPENGL_EXPORT QGLShaderProgram : public QObject
@@ -123,6 +128,7 @@ public:
bool addShader(QGLShader::ShaderType type, const char *source);
bool addShader(QGLShader::ShaderType type, const QByteArray& source);
bool addShader(QGLShader::ShaderType type, const QString& source);
+ bool addShaderFromFile(QGLShader::ShaderType type, const QString& fileName);
void removeAllShaders();
diff --git a/src/opengl/qgraphicsshadereffect.cpp b/src/opengl/qgraphicsshadereffect.cpp
index d3f52f6..293413c 100644
--- a/src/opengl/qgraphicsshadereffect.cpp
+++ b/src/opengl/qgraphicsshadereffect.cpp
@@ -51,8 +51,6 @@
QT_BEGIN_NAMESPACE
-#if !defined(QT_NO_GRAPHICSVIEW) || (QT_EDITION & QT_MODULE_GRAPHICSVIEW) != QT_MODULE_GRAPHICSVIEW
-
/*!
\class QGraphicsShaderEffect
\brief The QGraphicsShaderEffect class is the base class for creating
@@ -64,7 +62,7 @@ QT_BEGIN_NAMESPACE
The specific effect is defined by a fragment of GLSL source code
supplied to setPixelShaderFragment(). This source code must define a
function with the signature
- \c{lowp vec4 customShader(sampler2D imageTexture, vec2 textureCoords)}
+ \c{lowp vec4 customShader(lowp sampler2D imageTexture, highp vec2 textureCoords)}
that returns the source pixel value
to use in the paint engine's shader program. The shader fragment
is linked with the regular shader code used by the GL2 paint engine
@@ -77,7 +75,7 @@ QT_BEGIN_NAMESPACE
\code
static char const colorizeShaderCode[] =
"uniform lowp vec4 effectColor;\n"
- "lowp vec4 customShader(sampler2D imageTexture, vec2 textureCoords) {\n"
+ "lowp vec4 customShader(lowp sampler2D imageTexture, highp vec2 textureCoords) {\n"
" vec4 src = texture2D(imageTexture, textureCoords);\n"
" float gray = dot(src.rgb, vec3(0.212671, 0.715160, 0.072169));\n"
" vec4 colorize = 1.0-((1.0-gray)*(1.0-effectColor));\n"
@@ -126,11 +124,11 @@ QT_BEGIN_NAMESPACE
the drawItem() method will draw its item argument directly with
no effect applied.
- \sa QGrapicsEffect
+ \sa QGraphicsEffect
*/
static const char qglslDefaultImageFragmentShader[] = "\
- lowp vec4 customShader(sampler2D imageTexture, vec2 textureCoords) { \
+ lowp vec4 customShader(lowp sampler2D imageTexture, highp vec2 textureCoords) { \
return texture2D(imageTexture, textureCoords); \
}\n";
@@ -215,13 +213,13 @@ QByteArray QGraphicsShaderEffect::pixelShaderFragment() const
this shader effect to \a code.
The \a code must define a GLSL function with the signature
- \c{lowp vec4 customShader(sampler2D imageTexture, vec2 textureCoords)}
+ \c{lowp vec4 customShader(lowp sampler2D imageTexture, highp vec2 textureCoords)}
that returns the source pixel value to use in the paint engine's
shader program. The following is the default pixel shader fragment,
which draws a pixmap with no effect applied:
\code
- lowp vec4 customShader(sampler2D imageTexture, vec2 textureCoords) {
+ lowp vec4 customShader(lowp sampler2D imageTexture, highp vec2 textureCoords) {
return texture2D(imageTexture, textureCoords);
}
\endcode
@@ -313,6 +311,4 @@ void QGraphicsShaderEffect::setUniforms(QGLShaderProgram *program)
Q_UNUSED(program);
}
-#endif // QT_NO_GRAPHICSVIEW
-
QT_END_NAMESPACE
diff --git a/src/opengl/qgraphicsshadereffect.h b/src/opengl/qgraphicsshadereffect.h
index c4637d7..672973b 100644
--- a/src/opengl/qgraphicsshadereffect.h
+++ b/src/opengl/qgraphicsshadereffect.h
@@ -50,8 +50,6 @@ QT_BEGIN_NAMESPACE
QT_MODULE(OpenGL)
-#if !defined(QT_NO_GRAPHICSVIEW) || (QT_EDITION & QT_MODULE_GRAPHICSVIEW) != QT_MODULE_GRAPHICSVIEW
-
class QGLShaderProgram;
class QGLCustomShaderEffectStage;
class QGraphicsShaderEffectPrivate;
@@ -78,8 +76,6 @@ private:
friend class QGLCustomShaderEffectStage;
};
-#endif // QT_NO_GRAPHICSVIEW
-
QT_END_NAMESPACE
QT_END_HEADER
diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp
index ade67d3..ac41ab0 100644
--- a/src/opengl/qpaintengine_opengl.cpp
+++ b/src/opengl/qpaintengine_opengl.cpp
@@ -4351,13 +4351,6 @@ void QOpenGLPaintEngine::drawTiledPixmap(const QRectF &r, const QPixmap &pm, con
GLdouble tc_w = r.width()/pm.width();
GLdouble tc_h = r.height()/pm.height();
- // Rotate the texture so that it is aligned correctly and the
- // wrapping is done correctly
- glMatrixMode(GL_TEXTURE);
- glPushMatrix();
- glRotatef(180.0, 0.0, 1.0, 0.0);
- glRotatef(180.0, 0.0, 0.0, 1.0);
-
q_vertexType vertexArray[4*2];
q_vertexType texCoordArray[4*2];
@@ -4376,7 +4369,6 @@ void QOpenGLPaintEngine::drawTiledPixmap(const QRectF &r, const QPixmap &pm, con
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
glDisableClientState(GL_VERTEX_ARRAY);
- glPopMatrix();
glDisable(GL_TEXTURE_2D);
#ifndef QT_OPENGL_ES
diff --git a/src/opengl/util/fragmentprograms_p.h b/src/opengl/util/fragmentprograms_p.h
index 9451eda..6decaca 100644
--- a/src/opengl/util/fragmentprograms_p.h
+++ b/src/opengl/util/fragmentprograms_p.h
@@ -1,57 +1,6 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtOpenGL module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
#ifndef FRAGMENTPROGRAMS_H
#define FRAGMENTPROGRAMS_H
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
enum FragmentVariable {
VAR_BRUSH_TEXTURE,
VAR_LINEAR,
@@ -71,7 +20,7 @@ enum FragmentVariable {
VAR_FMP2_M_RADIUS2,
VAR_FMP,
VAR_INV_MATRIX_M0,
- VAR_ANGLE
+ VAR_ANGLE,
};
enum FragmentBrushType {
@@ -80,7 +29,7 @@ enum FragmentBrushType {
FRAGMENT_PROGRAM_BRUSH_CONICAL,
FRAGMENT_PROGRAM_BRUSH_LINEAR,
FRAGMENT_PROGRAM_BRUSH_TEXTURE,
- FRAGMENT_PROGRAM_BRUSH_PATTERN
+ FRAGMENT_PROGRAM_BRUSH_PATTERN,
};
enum FragmentCompositionModeType {
@@ -109,12 +58,12 @@ enum FragmentCompositionModeType {
COMPOSITION_MODES_DIFFERENCE_NOMASK,
COMPOSITION_MODES_EXCLUSION_NOMASK,
COMPOSITION_MODE_BLEND_MODE_MASK,
- COMPOSITION_MODE_BLEND_MODE_NOMASK
+ COMPOSITION_MODE_BLEND_MODE_NOMASK,
};
enum FragmentMaskType {
FRAGMENT_PROGRAM_MASK_TRAPEZOID_AA,
- FRAGMENT_PROGRAM_MASK_ELLIPSE_AA
+ FRAGMENT_PROGRAM_MASK_ELLIPSE_AA,
};
static const unsigned int num_fragment_variables = 19;
@@ -133,55 +82,55 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_MASK_TRAPEZOID_AA =
"TEMP R4;\n"
"ADD R4.x, fragment.position, c[0];\n"
"ADD R0.y, fragment.position, -c[0].x;\n"
- "MAX R2.x, R0.y, fragment.texcoord[0].y;\n"
+ "MAX R3.w, fragment.texcoord[0].y, R0.y;\n"
"ADD R0.x, fragment.position.y, c[0];\n"
- "MIN R2.y, R0.x, fragment.texcoord[0].x;\n"
- "ADD R3.x, fragment.position, -c[0];\n"
+ "MIN R3.z, R0.x, fragment.texcoord[0].x;\n"
+ "ADD R2.z, fragment.position.x, -c[0].x;\n"
+ "MOV R0.yw, R3.w;\n"
+ "MOV R0.xz, R3.z;\n"
+ "MAD R1, fragment.texcoord[1].xxzz, R0, fragment.texcoord[1].yyww;\n"
+ "MAD R1.zw, fragment.position.x, c[0].y, -R1;\n"
+ "MOV R0.z, R1.x;\n"
+ "MOV R0.w, R1.z;\n"
+ "MOV R0.y, R1.w;\n"
+ "MOV R0.x, R1.y;\n"
+ "MIN R2.xy, R0.zwzw, R0;\n"
+ "SGE R1.xy, R0, R0.zwzw;\n"
"ADD R1.zw, -fragment.texcoord[0], -fragment.texcoord[0];\n"
- "MOV R3.y, R4.x;\n"
- "MOV R0.yw, R2.x;\n"
- "MOV R0.xz, R2.y;\n"
- "MAD R0, fragment.texcoord[1].xxzz, R0, fragment.texcoord[1].yyww;\n"
- "MAD R1.xy, fragment.position.x, c[0].y, -R0.zwzw;\n"
- "MOV R0.w, R1.x;\n"
- "MOV R1.x, R0.y;\n"
- "MOV R0.z, R0.x;\n"
- "SGE R2.zw, R1.xyxy, R0;\n"
- "MAX R0.xy, R0.zwzw, R1;\n"
- "MIN R0.zw, R0, R1.xyxy;\n"
- "MAD R2.zw, R2, R1, fragment.texcoord[0];\n"
- "ADD R1, R3.xyxy, -R0.zzww;\n"
- "MAD R1, R1, R2.zzww, R2.x;\n"
- "ADD R3.zw, R0.xyxy, R0;\n"
- "ADD R3.y, R2, -R2.x;\n"
- "ADD R2.zw, R1.xyyw, -R2.x;\n"
- "ADD R4.zw, R4.x, -R0;\n"
- "MUL R2.zw, R4, R2;\n"
- "ADD R4.zw, R1.xyyw, R1.xyxz;\n"
- "ADD R1.xz, R2.y, -R1;\n"
- "MAD R2.zw, -R2, c[0].x, R3.y;\n"
- "MAD R3.zw, R3, c[0].x, -R3.x;\n"
- "MAD R3.zw, R3, R3.y, -R2;\n"
- "ADD R1.y, R4.x, -R3.x;\n"
- "MAD R4.zw, -R4, c[0].x, R2.y;\n"
- "MUL R4.zw, R4, R1.y;\n"
- "ADD R1.yw, R0.xxzy, -R3.x;\n"
- "MUL R1.xy, R1.xzzw, R1.ywzw;\n"
- "MAD R1.zw, R1.xyxy, c[0].x, -R4;\n"
- "SGE R1.xy, R4.x, R0;\n"
- "MUL R1.zw, R1.xyxy, R1;\n"
- "MAD R1.xy, R1, R3.zwzw, R2.zwzw;\n"
- "SGE R2.zw, R3.x, R0;\n"
- "ADD R1.zw, R4, R1;\n"
- "ADD R1.zw, R1, -R1.xyxy;\n"
- "MAD R1.xy, R2.zwzw, R1.zwzw, R1;\n"
- "ADD R1.xy, R1, -R3.y;\n"
- "SGE R0.zw, R4.x, R0;\n"
- "MAD R0.zw, R0, R1.xyxy, R3.y;\n"
- "SGE R0.xy, R0, R3.x;\n"
+ "MAX R0.xy, R0.zwzw, R0;\n"
+ "MAD R3.xy, R1, R1.zwzw, fragment.texcoord[0].zwzw;\n"
+ "MOV R2.w, R4.x;\n"
+ "ADD R1, -R2.xxyy, R2.zwzw;\n"
+ "MAD R1, R1, R3.xxyy, R3.w;\n"
+ "ADD R3.xy, R1.ywzw, R1.xzzw;\n"
+ "ADD R4.zw, R3.z, -R1.xyxz;\n"
+ "ADD R1.zw, -R3.w, R1.xyyw;\n"
+ "ADD R1.xy, R4.x, -R2;\n"
+ "MUL R1.xy, R1, R1.zwzw;\n"
+ "MAD R3.xy, -R3, c[0].x, R3.z;\n"
+ "ADD R2.w, R4.x, -R2.z;\n"
+ "MUL R0.zw, R3.xyxy, R2.w;\n"
+ "ADD R2.w, R3.z, -R3;\n"
+ "ADD R3.xy, -R2.z, R0;\n"
+ "MUL R3.xy, R4.zwzw, R3;\n"
+ "ADD R4.zw, R2.xyxy, R0.xyxy;\n"
+ "MAD R1.zw, R4, c[0].x, -R2.z;\n"
+ "MAD R1.xy, -R1, c[0].x, R2.w;\n"
+ "MAD R4.zw, R2.w, R1, -R1.xyxy;\n"
+ "SGE R1.zw, R4.x, R0.xyxy;\n"
+ "MAD R3.xy, R3, c[0].x, -R0.zwzw;\n"
+ "MAD R1.xy, R1.zwzw, R4.zwzw, R1;\n"
+ "MAD R0.zw, R1, R3.xyxy, R0;\n"
+ "ADD R1.zw, R0, -R1.xyxy;\n"
+ "SGE R0.zw, R2.z, R2.xyxy;\n"
+ "MAD R0.zw, R0, R1, R1.xyxy;\n"
+ "ADD R0.zw, -R2.w, R0;\n"
+ "SGE R1.xy, R4.x, R2;\n"
+ "MAD R0.zw, R1.xyxy, R0, R2.w;\n"
+ "SGE R0.xy, R0, R2.z;\n"
"MUL R0.xy, R0.zwzw, R0;\n"
- "ADD R0.x, R3.y, -R0;\n"
- "SGE R0.z, R2.y, R2.x;\n"
+ "ADD R0.x, R2.w, -R0;\n"
+ "SGE R0.z, R3, R3.w;\n"
"ADD R0.x, R0, -R0.y;\n"
"MUL result.color, R0.x, R0.z;\n"
"END\n"
@@ -195,20 +144,20 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_MASK_ELLIPSE_AA =
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R1.xyz, R0.y, c[2];\n"
- "MAD R0.xyz, R0.x, c[1], R1;\n"
- "ADD R0.xyz, R0, c[3];\n"
+ "ADD R0.xy, fragment.position, c[3];\n"
+ "MUL R1.xyz, R0.y, c[1];\n"
+ "MAD R0.xyz, R0.x, c[0], R1;\n"
+ "ADD R0.xyz, R0, c[2];\n"
"RCP R2.z, R0.z;\n"
- "MUL R0.zw, R0.xyxy, R2.z;\n"
- "MUL R2.xy, R0.zwzw, fragment.texcoord[0];\n"
- "MOV R1.xy, c[1];\n"
- "MOV R1.zw, c[2].xyxy;\n"
- "MOV R0.x, c[1].z;\n"
- "MOV R0.y, c[2].z;\n"
- "MAD R0, -R0.xyxy, R0.zzww, R1.xzyw;\n"
+ "MUL R1.zw, R0.xyxy, R2.z;\n"
+ "MUL R2.xy, R1.zwzw, fragment.texcoord[0];\n"
+ "MOV R1.x, c[0].z;\n"
+ "MOV R1.y, c[1].z;\n"
+ "MOV R0.xy, c[0];\n"
+ "MOV R0.zw, c[1].xyxy;\n"
+ "MAD R0, R1.zzww, -R1.xyxy, R0.xzyw;\n"
"MUL R1.xy, R2, fragment.texcoord[0];\n"
- "MUL R0, R0, R2.z;\n"
+ "MUL R0, R2.z, R0;\n"
"MUL R1.xy, R1, c[4].x;\n"
"MUL R1.zw, R1.xyxy, R0.xyxz;\n"
"MUL R0.xy, R1, R0.ywzw;\n"
@@ -230,36 +179,34 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_MASK_ELLIPSE_AA =
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODES_SIMPLE_PORTER_DUFF =
"!!ARBfp1.0\n"
- "PARAM c[7] = { program.local[0..3],\n"
- " { 1 },\n"
- " program.local[5..6] };\n"
+ "PARAM c[7] = { program.local[0..5],\n"
+ " { 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
"MUL R0.xy, fragment.position, c[3];\n"
- "TEX R1, R0, texture[0], 2D;\n"
- "MUL R0.xyz, R1, c[6].y;\n"
- "MUL R2.xyz, R0, fragment.color.primary.w;\n"
- "MUL R0.xyz, fragment.color.primary, c[6].x;\n"
- "MAD R2.xyz, R0, R1.w, R2;\n"
- "ADD R3.xy, fragment.position, c[0];\n"
- "ADD R0.w, -R1, c[4].x;\n"
- "MUL R0.xyz, fragment.color.primary, c[5].y;\n"
- "MAD R2.xyz, R0, R0.w, R2;\n"
- "MUL R0.xyz, R1, c[5].z;\n"
- "ADD R0.w, -fragment.color.primary, c[4].x;\n"
- "MAD R2.xyz, R0, R0.w, R2;\n"
- "ADD R0.y, -R1.w, c[4].x;\n"
- "MUL R0.x, fragment.color.primary.w, R1.w;\n"
- "MUL R0.y, fragment.color.primary.w, R0;\n"
- "MUL R0.z, R1.w, R0.w;\n"
- "DP3 R2.w, R0, c[5];\n"
- "MUL R3.xy, R3, c[1];\n"
- "TEX R0, R3, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "MUL R1.xyz, R0, c[0].y;\n"
+ "MUL R2.xyz, fragment.color.primary.w, R1;\n"
+ "MUL R1.xyz, fragment.color.primary, c[0].x;\n"
+ "MAD R2.xyz, R0.w, R1, R2;\n"
+ "ADD R3.xy, fragment.position, c[4];\n"
+ "ADD R1.w, -R0, c[6].x;\n"
+ "MUL R1.xyz, fragment.color.primary, c[1].y;\n"
+ "MAD R2.xyz, R1.w, R1, R2;\n"
+ "MUL R1.xyz, R0, c[1].z;\n"
+ "ADD R2.w, -fragment.color.primary, c[6].x;\n"
+ "MAD R2.xyz, R2.w, R1, R2;\n"
+ "MUL R1.z, R0.w, R2.w;\n"
+ "MUL R1.x, fragment.color.primary.w, R0.w;\n"
+ "MUL R1.y, fragment.color.primary.w, R1.w;\n"
+ "DP3 R2.w, R1, c[1];\n"
+ "MUL R3.xy, R3, c[2];\n"
+ "TEX R1, R3, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[5];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
@@ -270,21 +217,21 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
- "MUL R0.xy, fragment.position, c[3];\n"
- "TEX R1, R0, texture[0], 2D;\n"
- "ADD R0.x, -R1.w, c[4];\n"
- "MUL R0.xyz, fragment.color.primary, R0.x;\n"
- "MAD R0.xyz, fragment.color.primary, R1, R0;\n"
- "ADD R0.w, -fragment.color.primary, c[4].x;\n"
- "MAD R2.xyz, R1, R0.w, R0;\n"
- "ADD R0.z, fragment.color.primary.w, R1.w;\n"
- "MAD R2.w, -fragment.color.primary, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "MUL R0.xy, fragment.position, c[1];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "ADD R1.x, -R0.w, c[4];\n"
+ "MUL R1.xyz, fragment.color.primary, R1.x;\n"
+ "MAD R1.xyz, fragment.color.primary, R0, R1;\n"
+ "ADD R1.w, -fragment.color.primary, c[4].x;\n"
+ "MAD R2.xyz, R0, R1.w, R1;\n"
+ "ADD R1.z, fragment.color.primary.w, R0.w;\n"
+ "MAD R2.w, -fragment.color.primary, R0, R1.z;\n"
+ "ADD R1.xy, fragment.position, c[2];\n"
+ "MUL R1.xy, R1, c[0];\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[3];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
@@ -294,16 +241,16 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
- "MUL R0.xy, fragment.position, c[3];\n"
- "TEX R1, R0, texture[0], 2D;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "ADD R2, fragment.color.primary, R1;\n"
- "MUL R0.xy, R0, c[1];\n"
- "MAD R2, -fragment.color.primary, R1, R2;\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "MUL R0.xy, fragment.position, c[1];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "ADD R1.xy, fragment.position, c[2];\n"
+ "ADD R2, fragment.color.primary, R0;\n"
+ "MUL R1.xy, R1, c[0];\n"
+ "MAD R2, -fragment.color.primary, R0, R2;\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[3];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
@@ -315,7 +262,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xy, fragment.position, c[3];\n"
+ "MUL R0.xy, fragment.position, c[1];\n"
"TEX R1, R0, texture[0], 2D;\n"
"ADD R0.w, -R1, c[4].y;\n"
"MUL R3.xyz, fragment.color.primary, R0.w;\n"
@@ -336,11 +283,11 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
"MAD R2.xyz, R0, R3, R2;\n"
"ADD R0.z, fragment.color.primary.w, R1.w;\n"
"MAD R2.w, -fragment.color.primary, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
+ "ADD R0.xy, fragment.position, c[2];\n"
+ "MUL R0.xy, R0, c[0];\n"
"TEX R0, R0, texture[1], 2D;\n"
"ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
+ "DP4 R0.x, R0, c[3];\n"
"MAD result.color, R0.x, R2, R1;\n"
"END\n"
;
@@ -352,23 +299,23 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
- "MUL R0.xy, fragment.position, c[3];\n"
- "TEX R1, R0, texture[0], 2D;\n"
- "MUL R2.xyz, R1, fragment.color.primary.w;\n"
- "MUL R0.xyz, fragment.color.primary, R1.w;\n"
- "MIN R0.xyz, R0, R2;\n"
- "ADD R0.w, -R1, c[4].x;\n"
- "MAD R0.xyz, fragment.color.primary, R0.w, R0;\n"
- "ADD R0.w, -fragment.color.primary, c[4].x;\n"
- "MAD R2.xyz, R1, R0.w, R0;\n"
- "ADD R0.z, fragment.color.primary.w, R1.w;\n"
- "MAD R2.w, -fragment.color.primary, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "MUL R0.xy, fragment.position, c[1];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "MUL R2.xyz, fragment.color.primary.w, R0;\n"
+ "MUL R1.xyz, fragment.color.primary, R0.w;\n"
+ "MIN R1.xyz, R1, R2;\n"
+ "ADD R1.w, -R0, c[4].x;\n"
+ "MAD R1.xyz, fragment.color.primary, R1.w, R1;\n"
+ "ADD R1.w, -fragment.color.primary, c[4].x;\n"
+ "MAD R2.xyz, R0, R1.w, R1;\n"
+ "ADD R1.z, fragment.color.primary.w, R0.w;\n"
+ "MAD R2.w, -fragment.color.primary, R0, R1.z;\n"
+ "ADD R1.xy, fragment.position, c[2];\n"
+ "MUL R1.xy, R1, c[0];\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[3];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
@@ -379,35 +326,35 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
- "MUL R0.xy, fragment.position, c[3];\n"
- "TEX R1, R0, texture[0], 2D;\n"
- "MUL R2.xyz, R1, fragment.color.primary.w;\n"
- "MUL R0.xyz, fragment.color.primary, R1.w;\n"
- "MAX R0.xyz, R0, R2;\n"
- "ADD R0.w, -R1, c[4].x;\n"
- "MAD R0.xyz, fragment.color.primary, R0.w, R0;\n"
- "ADD R0.w, -fragment.color.primary, c[4].x;\n"
- "MAD R2.xyz, R1, R0.w, R0;\n"
- "ADD R0.z, fragment.color.primary.w, R1.w;\n"
- "MAD R2.w, -fragment.color.primary, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "MUL R0.xy, fragment.position, c[1];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "MUL R2.xyz, fragment.color.primary.w, R0;\n"
+ "MUL R1.xyz, fragment.color.primary, R0.w;\n"
+ "MAX R1.xyz, R1, R2;\n"
+ "ADD R1.w, -R0, c[4].x;\n"
+ "MAD R1.xyz, fragment.color.primary, R1.w, R1;\n"
+ "ADD R1.w, -fragment.color.primary, c[4].x;\n"
+ "MAD R2.xyz, R0, R1.w, R1;\n"
+ "ADD R1.z, fragment.color.primary.w, R0.w;\n"
+ "MAD R2.w, -fragment.color.primary, R0, R1.z;\n"
+ "ADD R1.xy, fragment.position, c[2];\n"
+ "MUL R1.xy, R1, c[0];\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[3];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODES_COLORDODGE =
"!!ARBfp1.0\n"
"PARAM c[5] = { program.local[0..3],\n"
- " { 1, 1e-06 } };\n"
+ " { 1, 1e-006 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xy, fragment.position, c[3];\n"
+ "MUL R0.xy, fragment.position, c[1];\n"
"TEX R0, R0, texture[0], 2D;\n"
"ADD R1.y, -fragment.color.primary.w, c[4].x;\n"
"MAX R1.x, fragment.color.primary.w, c[4].y;\n"
@@ -417,7 +364,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
"RCP R1.x, R1.x;\n"
"MAD R1.xyz, -fragment.color.primary, R1.x, c[4].x;\n"
"MAX R1.xyz, R1, c[4].y;\n"
- "MUL R2.xyz, R0, fragment.color.primary.w;\n"
+ "MUL R2.xyz, fragment.color.primary.w, R0;\n"
"MUL R1.w, fragment.color.primary, R0;\n"
"RCP R1.x, R1.x;\n"
"RCP R1.y, R1.y;\n"
@@ -430,11 +377,11 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
"MAD R2.xyz, R2, R3, R1;\n"
"ADD R1.z, fragment.color.primary.w, R0.w;\n"
"MAD R2.w, -fragment.color.primary, R0, R1.z;\n"
- "ADD R1.xy, fragment.position, c[0];\n"
- "MUL R1.xy, R1, c[1];\n"
+ "ADD R1.xy, fragment.position, c[2];\n"
+ "MUL R1.xy, R1, c[0];\n"
"TEX R1, R1, texture[1], 2D;\n"
"ADD R2, R2, -R0;\n"
- "DP4 R1.x, R1, c[2];\n"
+ "DP4 R1.x, R1, c[3];\n"
"MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
@@ -442,29 +389,28 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODES_COLORBURN =
"!!ARBfp1.0\n"
"PARAM c[5] = { program.local[0..3],\n"
- " { 1, 9.9999997e-06 } };\n"
+ " { 1, 9.9999997e-006 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
- "MUL R0.xy, fragment.position, c[3];\n"
+ "MUL R0.xy, fragment.position, c[1];\n"
"TEX R0, R0, texture[0], 2D;\n"
"ADD R1.w, -R0, c[4].x;\n"
- "MUL R1.xyz, R0, fragment.color.primary.w;\n"
+ "MUL R1.xyz, fragment.color.primary.w, R0;\n"
"MAD R2.xyz, fragment.color.primary, R0.w, R1;\n"
"MAD R1.xyz, -fragment.color.primary.w, R0.w, R2;\n"
"MUL R3.xyz, fragment.color.primary.w, R1;\n"
"MAX R1.xyz, fragment.color.primary, c[4].y;\n"
+ "ADD R2.w, -fragment.color.primary, c[4].x;\n"
"MUL R4.xyz, fragment.color.primary, R1.w;\n"
"RCP R1.x, R1.x;\n"
"RCP R1.y, R1.y;\n"
"RCP R1.z, R1.z;\n"
"MAD R3.xyz, R3, R1, R4;\n"
- "ADD R2.w, -fragment.color.primary, c[4].x;\n"
"MUL R1.xyz, R0, R2.w;\n"
"MAD R1.xyz, fragment.color.primary, R1.w, R1;\n"
- "ADD R2.w, -fragment.color.primary, c[4].x;\n"
"MAD R3.xyz, R0, R2.w, R3;\n"
"MUL R1.w, fragment.color.primary, R0;\n"
"ADD R3.xyz, R3, -R1;\n"
@@ -472,11 +418,11 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
"MAD R2.xyz, R2, R3, R1;\n"
"ADD R1.z, fragment.color.primary.w, R0.w;\n"
"MAD R2.w, -fragment.color.primary, R0, R1.z;\n"
- "ADD R1.xy, fragment.position, c[0];\n"
- "MUL R1.xy, R1, c[1];\n"
+ "ADD R1.xy, fragment.position, c[2];\n"
+ "MUL R1.xy, R1, c[0];\n"
"TEX R1, R1, texture[1], 2D;\n"
"ADD R2, R2, -R0;\n"
- "DP4 R1.x, R1, c[2];\n"
+ "DP4 R1.x, R1, c[3];\n"
"MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
@@ -489,7 +435,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xy, fragment.position, c[3];\n"
+ "MUL R0.xy, fragment.position, c[1];\n"
"TEX R1, R0, texture[0], 2D;\n"
"ADD R0.w, -R1, c[4].y;\n"
"MUL R3.xyz, fragment.color.primary, R0.w;\n"
@@ -510,11 +456,11 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
"MAD R2.xyz, R0, R3, R2;\n"
"ADD R0.z, fragment.color.primary.w, R1.w;\n"
"MAD R2.w, -fragment.color.primary, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
+ "ADD R0.xy, fragment.position, c[2];\n"
+ "MUL R0.xy, R0, c[0];\n"
"TEX R0, R0, texture[1], 2D;\n"
"ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
+ "DP4 R0.x, R0, c[3];\n"
"MAD result.color, R0.x, R2, R1;\n"
"END\n"
;
@@ -522,58 +468,56 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODES_SOFTLIGHT =
"!!ARBfp1.0\n"
"PARAM c[6] = { program.local[0..3],\n"
- " { 1, 9.9999997e-06, 2, 8 },\n"
- " { 3 } };\n"
+ " { 1, 9.9999997e-006, 2, 3 },\n"
+ " { 8 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
"TEMP R5;\n"
- "MUL R0.xy, fragment.position, c[3];\n"
+ "MUL R0.xy, fragment.position, c[1];\n"
"TEX R0, R0, texture[0], 2D;\n"
"MAX R1.x, R0.w, c[4].y;\n"
"RCP R1.w, R1.x;\n"
"MUL R2.xyz, R0, R1.w;\n"
- "MUL R1.xyz, -R2, c[4].w;\n"
+ "MUL R1.xyz, -R2, c[5].x;\n"
"RSQ R2.w, R2.x;\n"
- "ADD R4.xyz, R1, c[5].x;\n"
+ "ADD R4.xyz, R1, c[4].w;\n"
"MAD R1.xyz, -R0, R1.w, c[4].x;\n"
"RSQ R2.z, R2.z;\n"
"RSQ R2.y, R2.y;\n"
"RCP R2.x, R2.w;\n"
"RCP R2.z, R2.z;\n"
"RCP R2.y, R2.y;\n"
- "MAD R5.xyz, R2, R0.w, -R0;\n"
+ "MAD R5.xyz, R0.w, R2, -R0;\n"
"MAD R2.xyz, fragment.color.primary, c[4].z, -fragment.color.primary.w;\n"
"MUL R3.xyz, R1, R2;\n"
"MAD R3.xyz, -R3, R4, fragment.color.primary.w;\n"
"MUL R4.xyz, R5, R2;\n"
"MAD R1.xyz, -R1, R2, fragment.color.primary.w;\n"
- "MAD R5.xyz, R0, fragment.color.primary.w, R4;\n"
"MUL R3.xyz, R0, R3;\n"
- "MUL R4.xyz, R0, c[4].w;\n"
- "ADD R5.xyz, R5, -R3;\n"
- "SGE R4.xyz, R4, R0.w;\n"
- "MUL R4.xyz, R4, R5;\n"
- "ADD R2.xyz, R3, R4;\n"
+ "MAD R4.xyz, fragment.color.primary.w, R0, R4;\n"
+ "ADD R5.xyz, R4, -R3;\n"
+ "MUL R4.xyz, R0, c[5].x;\n"
+ "SGE R2.xyz, R4, R0.w;\n"
+ "MAD R2.xyz, R2, R5, R3;\n"
"MUL R1.xyz, R0, R1;\n"
"MUL R3.xyz, fragment.color.primary, c[4].z;\n"
"ADD R2.xyz, R2, -R1;\n"
"SGE R3.xyz, R3, fragment.color.primary.w;\n"
- "MUL R2.xyz, R3, R2;\n"
- "ADD R1.xyz, R1, R2;\n"
+ "MAD R1.xyz, R3, R2, R1;\n"
"ADD R1.w, -R0, c[4].x;\n"
"MAD R1.xyz, fragment.color.primary, R1.w, R1;\n"
"ADD R1.w, -fragment.color.primary, c[4].x;\n"
"MAD R2.xyz, R0, R1.w, R1;\n"
"ADD R1.z, fragment.color.primary.w, R0.w;\n"
"MAD R2.w, -fragment.color.primary, R0, R1.z;\n"
- "ADD R1.xy, fragment.position, c[0];\n"
- "MUL R1.xy, R1, c[1];\n"
+ "ADD R1.xy, fragment.position, c[2];\n"
+ "MUL R1.xy, R1, c[0];\n"
"TEX R1, R1, texture[1], 2D;\n"
"ADD R2, R2, -R0;\n"
- "DP4 R1.x, R1, c[2];\n"
+ "DP4 R1.x, R1, c[3];\n"
"MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
@@ -586,77 +530,75 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xy, fragment.position, c[3];\n"
- "TEX R1, R0, texture[0], 2D;\n"
- "MUL R2.xyz, R1, fragment.color.primary.w;\n"
- "MUL R0.xyz, fragment.color.primary, R1.w;\n"
- "MIN R0.xyz, R0, R2;\n"
- "ADD R3.xyz, fragment.color.primary, R1;\n"
- "MAD R2.xyz, -R0, c[4].x, R3;\n"
- "ADD R0.z, fragment.color.primary.w, R1.w;\n"
- "MAD R2.w, -fragment.color.primary, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "MUL R0.xy, fragment.position, c[1];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "ADD R1.xyz, fragment.color.primary, R0;\n"
+ "MUL R3.xyz, fragment.color.primary.w, R0;\n"
+ "MUL R2.xyz, fragment.color.primary, R0.w;\n"
+ "MIN R2.xyz, R2, R3;\n"
+ "MAD R2.xyz, -R2, c[4].x, R1;\n"
+ "ADD R1.z, fragment.color.primary.w, R0.w;\n"
+ "MAD R2.w, -fragment.color.primary, R0, R1.z;\n"
+ "ADD R1.xy, fragment.position, c[2];\n"
+ "MUL R1.xy, R1, c[0];\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[3];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODES_EXCLUSION =
"!!ARBfp1.0\n"
"PARAM c[5] = { program.local[0..3],\n"
- " { 1, 2 } };\n"
+ " { 2, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
- "MUL R0.xy, fragment.position, c[3];\n"
- "TEX R1, R0, texture[0], 2D;\n"
- "MUL R0.xyz, R1, fragment.color.primary.w;\n"
- "MAD R2.xyz, fragment.color.primary, R1.w, R0;\n"
- "MUL R0.xyz, fragment.color.primary, R1;\n"
- "MAD R0.xyz, -R0, c[4].y, R2;\n"
- "ADD R0.w, -R1, c[4].x;\n"
- "MAD R0.xyz, fragment.color.primary, R0.w, R0;\n"
- "ADD R0.w, -fragment.color.primary, c[4].x;\n"
- "MAD R2.xyz, R1, R0.w, R0;\n"
- "ADD R0.z, fragment.color.primary.w, R1.w;\n"
- "MAD R2.w, -fragment.color.primary, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "MUL R0.xy, fragment.position, c[1];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "MUL R1.xyz, fragment.color.primary.w, R0;\n"
+ "MAD R2.xyz, fragment.color.primary, R0.w, R1;\n"
+ "MUL R1.xyz, fragment.color.primary, R0;\n"
+ "MAD R1.xyz, -R1, c[4].x, R2;\n"
+ "ADD R1.w, -R0, c[4].y;\n"
+ "MAD R1.xyz, fragment.color.primary, R1.w, R1;\n"
+ "ADD R1.w, -fragment.color.primary, c[4].y;\n"
+ "MAD R2.xyz, R0, R1.w, R1;\n"
+ "ADD R1.z, fragment.color.primary.w, R0.w;\n"
+ "MAD R2.w, -fragment.color.primary, R0, R1.z;\n"
+ "ADD R1.xy, fragment.position, c[2];\n"
+ "MUL R1.xy, R1, c[0];\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[3];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODES_SIMPLE_PORTER_DUFF_NOMASK =
"!!ARBfp1.0\n"
- "PARAM c[4] = { program.local[0],\n"
- " { 1 },\n"
- " program.local[2..3] };\n"
+ "PARAM c[4] = { program.local[0..2],\n"
+ " { 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
- "MUL R0.xy, fragment.position, c[0];\n"
+ "MUL R0.xy, fragment.position, c[2];\n"
"TEX R0, R0, texture[0], 2D;\n"
- "MUL R1.xyz, R0, c[3].y;\n"
- "MUL R2.xyz, R1, fragment.color.primary.w;\n"
- "MUL R1.xyz, fragment.color.primary, c[3].x;\n"
- "MAD R2.xyz, R1, R0.w, R2;\n"
- "MUL R0.xyz, R0, c[2].z;\n"
- "ADD R1.w, -R0, c[1].x;\n"
- "MUL R1.xyz, fragment.color.primary, c[2].y;\n"
- "MAD R1.xyz, R1, R1.w, R2;\n"
- "ADD R1.w, -fragment.color.primary, c[1].x;\n"
- "MAD result.color.xyz, R0, R1.w, R1;\n"
- "ADD R0.y, -R0.w, c[1].x;\n"
+ "MUL R1.xyz, R0, c[0].y;\n"
+ "MUL R2.xyz, fragment.color.primary.w, R1;\n"
+ "MUL R1.xyz, fragment.color.primary, c[0].x;\n"
+ "MAD R2.xyz, R0.w, R1, R2;\n"
+ "MUL R0.xyz, R0, c[1].z;\n"
+ "ADD R1.w, -R0, c[3].x;\n"
+ "MUL R1.xyz, fragment.color.primary, c[1].y;\n"
+ "MAD R1.xyz, R1.w, R1, R2;\n"
+ "ADD R2.x, -fragment.color.primary.w, c[3];\n"
+ "MAD result.color.xyz, R2.x, R0, R1;\n"
"MUL R0.x, fragment.color.primary.w, R0.w;\n"
- "MUL R0.z, R0.w, R1.w;\n"
- "MUL R0.y, fragment.color.primary.w, R0;\n"
- "DP3 result.color.w, R0, c[2];\n"
+ "MUL R0.z, R0.w, R2.x;\n"
+ "MUL R0.y, fragment.color.primary.w, R1.w;\n"
+ "DP3 result.color.w, R0, c[1];\n"
"END\n"
;
@@ -732,7 +674,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
"TEMP R2;\n"
"MUL R0.xy, fragment.position, c[0];\n"
"TEX R0, R0, texture[0], 2D;\n"
- "MUL R2.xyz, R0, fragment.color.primary.w;\n"
+ "MUL R2.xyz, fragment.color.primary.w, R0;\n"
"MUL R1.xyz, fragment.color.primary, R0.w;\n"
"MIN R1.xyz, R1, R2;\n"
"ADD R1.w, -R0, c[1].x;\n"
@@ -753,7 +695,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
"TEMP R2;\n"
"MUL R0.xy, fragment.position, c[0];\n"
"TEX R0, R0, texture[0], 2D;\n"
- "MUL R2.xyz, R0, fragment.color.primary.w;\n"
+ "MUL R2.xyz, fragment.color.primary.w, R0;\n"
"MUL R1.xyz, fragment.color.primary, R0.w;\n"
"MAX R1.xyz, R1, R2;\n"
"ADD R1.w, -R0, c[1].x;\n"
@@ -768,7 +710,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODES_COLORDODGE_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[2] = { program.local[0],\n"
- " { 1, 1e-06 } };\n"
+ " { 1, 1e-006 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -782,7 +724,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
"MAD R1.xyz, fragment.color.primary, R1.w, R1;\n"
"MAD R2.xyz, -fragment.color.primary, R2.x, c[1].x;\n"
"MAX R2.xyz, R2, c[1].y;\n"
- "MUL R0.xyz, R0, fragment.color.primary.w;\n"
+ "MUL R0.xyz, fragment.color.primary.w, R0;\n"
"MUL R1.w, fragment.color.primary, R0;\n"
"RCP R2.x, R2.x;\n"
"RCP R2.y, R2.y;\n"
@@ -801,7 +743,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODES_COLORBURN_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[2] = { program.local[0],\n"
- " { 1, 9.9999997e-06 } };\n"
+ " { 1, 9.9999997e-006 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -809,7 +751,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
"TEMP R4;\n"
"MUL R0.xy, fragment.position, c[0];\n"
"TEX R0, R0, texture[0], 2D;\n"
- "MUL R1.xyz, R0, fragment.color.primary.w;\n"
+ "MUL R1.xyz, fragment.color.primary.w, R0;\n"
"MAD R2.xyz, fragment.color.primary, R0.w, R1;\n"
"MAD R1.xyz, -fragment.color.primary.w, R0.w, R2;\n"
"MUL R3.xyz, fragment.color.primary.w, R1;\n"
@@ -822,7 +764,6 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
"RCP R1.z, R1.z;\n"
"MAD R1.xyz, R3, R1, R4;\n"
"MUL R3.xyz, R0, R2.w;\n"
- "ADD R2.w, -fragment.color.primary, c[1].x;\n"
"MAD R0.xyz, R0, R2.w, R1;\n"
"MAD R1.xyz, fragment.color.primary, R1.w, R3;\n"
"MUL R1.w, fragment.color.primary, R0;\n"
@@ -869,8 +810,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODES_SOFTLIGHT_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[3] = { program.local[0],\n"
- " { 1, 9.9999997e-06, 2, 8 },\n"
- " { 3 } };\n"
+ " { 1, 9.9999997e-006, 2, 3 },\n"
+ " { 8 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -882,8 +823,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
"MAX R1.x, R0.w, c[1].y;\n"
"RCP R1.w, R1.x;\n"
"MUL R2.xyz, R0, R1.w;\n"
- "MUL R1.xyz, -R2, c[1].w;\n"
- "ADD R4.xyz, R1, c[2].x;\n"
+ "MUL R1.xyz, -R2, c[2].x;\n"
+ "ADD R4.xyz, R1, c[1].w;\n"
"MAD R1.xyz, -R0, R1.w, c[1].x;\n"
"RSQ R2.w, R2.x;\n"
"RSQ R2.z, R2.z;\n"
@@ -891,25 +832,23 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
"RCP R2.x, R2.w;\n"
"RCP R2.z, R2.z;\n"
"RCP R2.y, R2.y;\n"
- "MAD R5.xyz, R2, R0.w, -R0;\n"
+ "MAD R5.xyz, R0.w, R2, -R0;\n"
"MAD R2.xyz, fragment.color.primary, c[1].z, -fragment.color.primary.w;\n"
"MUL R3.xyz, R1, R2;\n"
"MAD R3.xyz, -R3, R4, fragment.color.primary.w;\n"
"MUL R4.xyz, R5, R2;\n"
"MAD R1.xyz, -R1, R2, fragment.color.primary.w;\n"
- "MAD R5.xyz, R0, fragment.color.primary.w, R4;\n"
"MUL R3.xyz, R0, R3;\n"
- "MUL R4.xyz, R0, c[1].w;\n"
- "ADD R5.xyz, R5, -R3;\n"
- "SGE R4.xyz, R4, R0.w;\n"
- "MUL R4.xyz, R4, R5;\n"
- "ADD R2.xyz, R3, R4;\n"
+ "MAD R4.xyz, fragment.color.primary.w, R0, R4;\n"
+ "ADD R5.xyz, R4, -R3;\n"
+ "MUL R4.xyz, R0, c[2].x;\n"
+ "SGE R2.xyz, R4, R0.w;\n"
+ "MAD R2.xyz, R2, R5, R3;\n"
"MUL R1.xyz, R0, R1;\n"
"MUL R3.xyz, fragment.color.primary, c[1].z;\n"
"ADD R2.xyz, R2, -R1;\n"
"SGE R3.xyz, R3, fragment.color.primary.w;\n"
- "MUL R2.xyz, R3, R2;\n"
- "ADD R1.xyz, R1, R2;\n"
+ "MAD R1.xyz, R3, R2, R1;\n"
"ADD R1.w, -R0, c[1].x;\n"
"MAD R1.xyz, fragment.color.primary, R1.w, R1;\n"
"ADD R1.w, fragment.color.primary, R0;\n"
@@ -928,7 +867,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
"TEMP R2;\n"
"MUL R0.xy, fragment.position, c[0];\n"
"TEX R0, R0, texture[0], 2D;\n"
- "MUL R2.xyz, R0, fragment.color.primary.w;\n"
+ "MUL R2.xyz, fragment.color.primary.w, R0;\n"
"MUL R1.xyz, fragment.color.primary, R0.w;\n"
"ADD R1.w, fragment.color.primary, R0;\n"
"MIN R1.xyz, R1, R2;\n"
@@ -941,20 +880,20 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODES_EXCLUSION_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[2] = { program.local[0],\n"
- " { 1, 2 } };\n"
+ " { 2, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"MUL R0.xy, fragment.position, c[0];\n"
"TEX R0, R0, texture[0], 2D;\n"
- "MUL R1.xyz, R0, fragment.color.primary.w;\n"
+ "MUL R1.xyz, fragment.color.primary.w, R0;\n"
"MAD R2.xyz, fragment.color.primary, R0.w, R1;\n"
"MUL R1.xyz, fragment.color.primary, R0;\n"
- "MAD R1.xyz, -R1, c[1].y, R2;\n"
- "ADD R1.w, -R0, c[1].x;\n"
+ "MAD R1.xyz, -R1, c[1].x, R2;\n"
+ "ADD R1.w, -R0, c[1].y;\n"
"MAD R1.xyz, fragment.color.primary, R1.w, R1;\n"
"ADD R1.w, fragment.color.primary, R0;\n"
- "ADD R2.x, -fragment.color.primary.w, c[1];\n"
+ "ADD R2.x, -fragment.color.primary.w, c[1].y;\n"
"MAD result.color.xyz, R0, R2.x, R1;\n"
"MAD result.color.w, -fragment.color.primary, R0, R1;\n"
"END\n"
@@ -964,8 +903,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
"!!ARBfp1.0\n"
"PARAM c[3] = { program.local[0..2] };\n"
"TEMP R0;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
+ "ADD R0.xy, fragment.position, c[1];\n"
+ "MUL R0.xy, R0, c[0];\n"
"TEX R0, R0, texture[0], 2D;\n"
"DP4 R0.x, R0, c[2];\n"
"MUL result.color, fragment.color.primary, R0.x;\n"
@@ -974,359 +913,351 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE_BLEND_MODE_NOMASK =
"!!ARBfp1.0\n"
- "PARAM c[1] = { program.local[0] };\n"
"MOV result.color, fragment.color.primary;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_SIMPLE_PORTER_DUFF =
"!!ARBfp1.0\n"
- "PARAM c[12] = { program.local[0..6],\n"
- " { 2, 4, 1 },\n"
- " program.local[8..11] };\n"
+ "PARAM c[12] = { program.local[0..10],\n"
+ " { 2, 4, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[3];\n"
+ "MAD R0.xyz, fragment.position.x, c[2], R0;\n"
+ "ADD R0.xyz, R0, c[4];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
"ADD R0.z, R0, R0.w;\n"
- "MUL R0.xy, R0, c[6];\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.z, c[8].x, -R0;\n"
- "MUL R0.y, R0.z, c[7];\n"
- "MUL R0.x, R0, c[7];\n"
- "MAD R0.y, R0.x, R0.x, -R0;\n"
- "RSQ R0.z, R0.y;\n"
- "RCP R0.z, R0.z;\n"
- "ADD R0.x, -R0, R0.z;\n"
- "MUL R0.zw, fragment.position.xyxy, c[9].xyxy;\n"
- "TEX R1, R0.zwzw, texture[0], 2D;\n"
- "MOV R0.y, c[7].x;\n"
- "MUL R0.y, c[8].x, R0;\n"
- "RCP R0.y, R0.y;\n"
- "MUL R0.x, R0, R0.y;\n"
- "TEX R0, R0, texture[2], 1D;\n"
- "MUL R2.xyz, R1, c[11].y;\n"
- "MUL R3.xyz, R2, R0.w;\n"
- "MUL R2.xyz, R0, c[11].x;\n"
- "MAD R2.xyz, R2, R1.w, R3;\n"
- "ADD R3.xy, fragment.position, c[0];\n"
- "ADD R2.w, -R1, c[7].z;\n"
- "MUL R0.xyz, R0, c[10].y;\n"
- "MAD R2.xyz, R0, R2.w, R2;\n"
- "MUL R0.xyz, R1, c[10].z;\n"
- "ADD R3.z, -R0.w, c[7];\n"
- "MAD R2.xyz, R0, R3.z, R2;\n"
- "MUL R0.y, R0.w, R2.w;\n"
- "MUL R0.x, R0.w, R1.w;\n"
- "MUL R0.z, R1.w, R3;\n"
- "DP3 R2.w, R0, c[10];\n"
- "MUL R3.xy, R3, c[1];\n"
- "TEX R0, R3, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "MUL R0.z, -R0, c[1].x;\n"
+ "MUL R0.y, R0.x, c[11].x;\n"
+ "MUL R0.z, R0, c[11].y;\n"
+ "MAD R0.x, R0.y, R0.y, -R0.z;\n"
+ "RSQ R0.x, R0.x;\n"
+ "RCP R0.z, R0.x;\n"
+ "ADD R1.x, -R0.y, R0.z;\n"
+ "MOV R0.x, c[11];\n"
+ "MUL R0.z, R0.x, c[1].x;\n"
+ "RCP R1.y, R0.z;\n"
+ "MUL R0.xy, fragment.position, c[8];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "MUL R1.x, R1, R1.y;\n"
+ "TEX R1, R1, texture[2], 1D;\n"
+ "MUL R2.xyz, R0, c[5].y;\n"
+ "MUL R3.xyz, R1.w, R2;\n"
+ "MUL R2.xyz, R1, c[5].x;\n"
+ "MAD R2.xyz, R0.w, R2, R3;\n"
+ "ADD R3.xy, fragment.position, c[9];\n"
+ "ADD R2.w, -R0, c[11].z;\n"
+ "MUL R1.xyz, R1, c[6].y;\n"
+ "MAD R2.xyz, R2.w, R1, R2;\n"
+ "MUL R1.xyz, R0, c[6].z;\n"
+ "ADD R3.z, -R1.w, c[11];\n"
+ "MAD R2.xyz, R3.z, R1, R2;\n"
+ "MUL R1.y, R1.w, R2.w;\n"
+ "MUL R1.x, R1.w, R0.w;\n"
+ "MUL R1.z, R0.w, R3;\n"
+ "DP3 R2.w, R1, c[6];\n"
+ "MUL R3.xy, R3, c[7];\n"
+ "TEX R1, R3, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[10];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_MULTIPLY =
"!!ARBfp1.0\n"
- "PARAM c[10] = { program.local[0..6],\n"
- " { 2, 4, 1 },\n"
- " program.local[8..9] };\n"
+ "PARAM c[10] = { program.local[0..8],\n"
+ " { 2, 4, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[3];\n"
+ "MAD R0.xyz, fragment.position.x, c[2], R0;\n"
+ "ADD R0.xyz, R0, c[4];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
- "MUL R0.xy, R0, c[6];\n"
"ADD R0.z, R0, R0.w;\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.z, c[8].x, -R0;\n"
- "MUL R0.y, R0.z, c[7];\n"
- "MUL R0.x, R0, c[7];\n"
- "MAD R0.y, R0.x, R0.x, -R0;\n"
- "RSQ R0.y, R0.y;\n"
- "RCP R0.z, R0.y;\n"
- "ADD R0.x, -R0, R0.z;\n"
- "MUL R0.zw, fragment.position.xyxy, c[9].xyxy;\n"
- "TEX R1, R0.zwzw, texture[0], 2D;\n"
- "MOV R0.y, c[7].x;\n"
- "MUL R0.y, c[8].x, R0;\n"
- "RCP R0.y, R0.y;\n"
- "MUL R0.x, R0, R0.y;\n"
- "TEX R0, R0, texture[2], 1D;\n"
- "ADD R2.x, -R1.w, c[7].z;\n"
- "MUL R2.xyz, R0, R2.x;\n"
- "MAD R0.xyz, R0, R1, R2;\n"
- "ADD R2.x, -R0.w, c[7].z;\n"
- "MAD R2.xyz, R1, R2.x, R0;\n"
- "ADD R0.z, R0.w, R1.w;\n"
- "MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "MUL R0.z, -R0, c[1].x;\n"
+ "MUL R0.y, R0.x, c[9].x;\n"
+ "MUL R0.z, R0, c[9].y;\n"
+ "MAD R0.x, R0.y, R0.y, -R0.z;\n"
+ "RSQ R0.x, R0.x;\n"
+ "RCP R0.z, R0.x;\n"
+ "ADD R1.x, -R0.y, R0.z;\n"
+ "MOV R0.x, c[9];\n"
+ "MUL R0.z, R0.x, c[1].x;\n"
+ "RCP R1.y, R0.z;\n"
+ "MUL R0.xy, fragment.position, c[6];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "MUL R1.x, R1, R1.y;\n"
+ "TEX R1, R1, texture[2], 1D;\n"
+ "ADD R2.x, -R0.w, c[9].z;\n"
+ "MUL R2.xyz, R1, R2.x;\n"
+ "MAD R1.xyz, R1, R0, R2;\n"
+ "ADD R2.x, -R1.w, c[9].z;\n"
+ "MAD R2.xyz, R0, R2.x, R1;\n"
+ "ADD R1.z, R1.w, R0.w;\n"
+ "MAD R2.w, -R1, R0, R1.z;\n"
+ "ADD R1.xy, fragment.position, c[7];\n"
+ "MUL R1.xy, R1, c[5];\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[8];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_SCREEN =
"!!ARBfp1.0\n"
- "PARAM c[10] = { program.local[0..6],\n"
- " { 2, 4 },\n"
- " program.local[8..9] };\n"
+ "PARAM c[10] = { program.local[0..8],\n"
+ " { 2, 4 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[3];\n"
+ "MAD R0.xyz, fragment.position.x, c[2], R0;\n"
+ "ADD R0.xyz, R0, c[4];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
- "MUL R0.xy, R0, c[6];\n"
"ADD R0.z, R0, R0.w;\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.z, c[8].x, -R0;\n"
- "MUL R0.y, R0.z, c[7];\n"
- "MUL R0.x, R0, c[7];\n"
- "MAD R0.y, R0.x, R0.x, -R0;\n"
- "MOV R0.z, c[7].x;\n"
- "RSQ R0.y, R0.y;\n"
- "RCP R0.y, R0.y;\n"
- "MUL R0.z, c[8].x, R0;\n"
- "MUL R1.xy, fragment.position, c[9];\n"
- "ADD R3.xy, fragment.position, c[0];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "ADD R0.x, -R0, R0.y;\n"
+ "MUL R0.z, -R0, c[1].x;\n"
+ "ADD R3.xy, fragment.position, c[7];\n"
+ "MUL R0.y, R0.z, c[9];\n"
+ "MUL R0.x, R0, c[9];\n"
+ "MAD R0.z, R0.x, R0.x, -R0.y;\n"
+ "MOV R0.y, c[9].x;\n"
+ "RSQ R0.z, R0.z;\n"
"RCP R0.z, R0.z;\n"
- "MUL R0.x, R0, R0.z;\n"
- "TEX R0, R0, texture[2], 1D;\n"
- "ADD R2, R0, R1;\n"
- "MAD R2, -R0, R1, R2;\n"
- "MUL R3.xy, R3, c[1];\n"
- "TEX R0, R3, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "MUL R0.y, R0, c[1].x;\n"
+ "ADD R0.x, -R0, R0.z;\n"
+ "RCP R0.y, R0.y;\n"
+ "MUL R0.z, R0.x, R0.y;\n"
+ "TEX R1, R0.z, texture[2], 1D;\n"
+ "MUL R0.xy, fragment.position, c[6];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "ADD R2, R1, R0;\n"
+ "MAD R2, -R1, R0, R2;\n"
+ "MUL R3.xy, R3, c[5];\n"
+ "TEX R1, R3, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[8];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_OVERLAY =
"!!ARBfp1.0\n"
- "PARAM c[10] = { program.local[0..6],\n"
- " { 2, 4, 1 },\n"
- " program.local[8..9] };\n"
+ "PARAM c[10] = { program.local[0..8],\n"
+ " { 2, 4, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[3];\n"
+ "MAD R0.xyz, fragment.position.x, c[2], R0;\n"
+ "ADD R0.xyz, R0, c[4];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
- "MUL R0.xy, R0, c[6];\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.z, R0, R0.w;\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.z, c[8].x, -R0;\n"
- "MUL R0.y, R0.z, c[7];\n"
- "MUL R0.x, R0, c[7];\n"
- "MAD R0.y, R0.x, R0.x, -R0;\n"
- "MOV R0.z, c[7].x;\n"
- "RSQ R0.y, R0.y;\n"
- "RCP R0.y, R0.y;\n"
- "MUL R0.z, c[8].x, R0;\n"
- "MUL R1.xy, fragment.position, c[9];\n"
+ "MUL R0.z, -R0, c[1].x;\n"
+ "MUL R1.xy, fragment.position, c[6];\n"
"TEX R1, R1, texture[0], 2D;\n"
- "ADD R0.x, -R0, R0.y;\n"
+ "MUL R0.y, R0.z, c[9];\n"
+ "MUL R0.x, R0, c[9];\n"
+ "MAD R0.z, R0.x, R0.x, -R0.y;\n"
+ "MOV R0.y, c[9].x;\n"
+ "RSQ R0.z, R0.z;\n"
"RCP R0.z, R0.z;\n"
- "MUL R0.x, R0, R0.z;\n"
+ "MUL R0.y, R0, c[1].x;\n"
+ "ADD R0.x, -R0, R0.z;\n"
+ "RCP R0.y, R0.y;\n"
+ "MUL R0.x, R0, R0.y;\n"
"TEX R0, R0, texture[2], 1D;\n"
- "ADD R2.w, -R1, c[7].z;\n"
+ "ADD R2.w, -R1, c[9].z;\n"
"ADD R3.xyz, R0.w, -R0;\n"
"ADD R2.xyz, R1.w, -R1;\n"
"MUL R2.xyz, R2, R3;\n"
- "MUL R2.xyz, R2, c[7].x;\n"
+ "MUL R2.xyz, R2, c[9].x;\n"
"MAD R2.xyz, R0.w, R1.w, -R2;\n"
"MUL R4.xyz, R0, R2.w;\n"
"MUL R3.xyz, R0, R1;\n"
"MAD R0.xyz, R0, R2.w, R2;\n"
- "ADD R2.x, -R0.w, c[7].z;\n"
- "MAD R3.xyz, R3, c[7].x, R4;\n"
+ "ADD R2.x, -R0.w, c[9].z;\n"
+ "MAD R3.xyz, R3, c[9].x, R4;\n"
"MAD R3.xyz, R1, R2.x, R3;\n"
"MAD R0.xyz, R1, R2.x, R0;\n"
- "MUL R2.xyz, R1, c[7].x;\n"
+ "MUL R2.xyz, R1, c[9].x;\n"
"ADD R0.xyz, R0, -R3;\n"
"SGE R2.xyz, R2, R1.w;\n"
"MAD R2.xyz, R2, R0, R3;\n"
"ADD R0.z, R0.w, R1.w;\n"
"MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
+ "ADD R0.xy, fragment.position, c[7];\n"
+ "MUL R0.xy, R0, c[5];\n"
"TEX R0, R0, texture[1], 2D;\n"
"ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
+ "DP4 R0.x, R0, c[8];\n"
"MAD result.color, R0.x, R2, R1;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_DARKEN =
"!!ARBfp1.0\n"
- "PARAM c[10] = { program.local[0..6],\n"
- " { 2, 4, 1 },\n"
- " program.local[8..9] };\n"
+ "PARAM c[10] = { program.local[0..8],\n"
+ " { 2, 4, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[3];\n"
+ "MAD R0.xyz, fragment.position.x, c[2], R0;\n"
+ "ADD R0.xyz, R0, c[4];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
- "MUL R0.xy, R0, c[6];\n"
"ADD R0.z, R0, R0.w;\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.z, c[8].x, -R0;\n"
- "MUL R0.y, R0.z, c[7];\n"
- "MUL R0.x, R0, c[7];\n"
- "MAD R0.y, R0.x, R0.x, -R0;\n"
- "MOV R0.z, c[7].x;\n"
- "RSQ R0.y, R0.y;\n"
- "RCP R0.y, R0.y;\n"
- "MUL R0.z, c[8].x, R0;\n"
- "MUL R1.xy, fragment.position, c[9];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "ADD R0.x, -R0, R0.y;\n"
- "RCP R0.z, R0.z;\n"
- "MUL R0.x, R0, R0.z;\n"
- "TEX R0, R0, texture[2], 1D;\n"
- "MUL R3.xyz, R1, R0.w;\n"
- "MUL R2.xyz, R0, R1.w;\n"
+ "MUL R0.z, -R0, c[1].x;\n"
+ "MUL R0.y, R0.x, c[9].x;\n"
+ "MUL R0.z, R0, c[9].y;\n"
+ "MAD R0.x, R0.y, R0.y, -R0.z;\n"
+ "RSQ R0.z, R0.x;\n"
+ "MOV R0.x, c[9];\n"
+ "MUL R0.x, R0, c[1];\n"
+ "RCP R0.z, R0.z;\n"
+ "ADD R0.z, -R0.y, R0;\n"
+ "RCP R0.w, R0.x;\n"
+ "MUL R1.x, R0.z, R0.w;\n"
+ "MUL R0.xy, fragment.position, c[6];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "TEX R1, R1, texture[2], 1D;\n"
+ "MUL R3.xyz, R1.w, R0;\n"
+ "MUL R2.xyz, R1, R0.w;\n"
"MIN R2.xyz, R2, R3;\n"
- "ADD R2.w, -R1, c[7].z;\n"
- "MAD R0.xyz, R0, R2.w, R2;\n"
- "ADD R2.x, -R0.w, c[7].z;\n"
- "MAD R2.xyz, R1, R2.x, R0;\n"
- "ADD R0.z, R0.w, R1.w;\n"
- "MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "ADD R2.w, -R0, c[9].z;\n"
+ "MAD R1.xyz, R1, R2.w, R2;\n"
+ "ADD R2.x, -R1.w, c[9].z;\n"
+ "MAD R2.xyz, R0, R2.x, R1;\n"
+ "ADD R1.z, R1.w, R0.w;\n"
+ "MAD R2.w, -R1, R0, R1.z;\n"
+ "ADD R1.xy, fragment.position, c[7];\n"
+ "MUL R1.xy, R1, c[5];\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[8];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_LIGHTEN =
"!!ARBfp1.0\n"
- "PARAM c[10] = { program.local[0..6],\n"
- " { 2, 4, 1 },\n"
- " program.local[8..9] };\n"
+ "PARAM c[10] = { program.local[0..8],\n"
+ " { 2, 4, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[3];\n"
+ "MAD R0.xyz, fragment.position.x, c[2], R0;\n"
+ "ADD R0.xyz, R0, c[4];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
- "MUL R0.xy, R0, c[6];\n"
"ADD R0.z, R0, R0.w;\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.z, c[8].x, -R0;\n"
- "MUL R0.y, R0.z, c[7];\n"
- "MUL R0.x, R0, c[7];\n"
- "MAD R0.y, R0.x, R0.x, -R0;\n"
- "MOV R0.z, c[7].x;\n"
- "RSQ R0.y, R0.y;\n"
- "RCP R0.y, R0.y;\n"
- "MUL R0.z, c[8].x, R0;\n"
- "MUL R1.xy, fragment.position, c[9];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "ADD R0.x, -R0, R0.y;\n"
- "RCP R0.z, R0.z;\n"
- "MUL R0.x, R0, R0.z;\n"
- "TEX R0, R0, texture[2], 1D;\n"
- "MUL R3.xyz, R1, R0.w;\n"
- "MUL R2.xyz, R0, R1.w;\n"
+ "MUL R0.z, -R0, c[1].x;\n"
+ "MUL R0.y, R0.x, c[9].x;\n"
+ "MUL R0.z, R0, c[9].y;\n"
+ "MAD R0.x, R0.y, R0.y, -R0.z;\n"
+ "RSQ R0.z, R0.x;\n"
+ "MOV R0.x, c[9];\n"
+ "MUL R0.x, R0, c[1];\n"
+ "RCP R0.z, R0.z;\n"
+ "ADD R0.z, -R0.y, R0;\n"
+ "RCP R0.w, R0.x;\n"
+ "MUL R1.x, R0.z, R0.w;\n"
+ "MUL R0.xy, fragment.position, c[6];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "TEX R1, R1, texture[2], 1D;\n"
+ "MUL R3.xyz, R1.w, R0;\n"
+ "MUL R2.xyz, R1, R0.w;\n"
"MAX R2.xyz, R2, R3;\n"
- "ADD R2.w, -R1, c[7].z;\n"
- "MAD R0.xyz, R0, R2.w, R2;\n"
- "ADD R2.x, -R0.w, c[7].z;\n"
- "MAD R2.xyz, R1, R2.x, R0;\n"
- "ADD R0.z, R0.w, R1.w;\n"
- "MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "ADD R2.w, -R0, c[9].z;\n"
+ "MAD R1.xyz, R1, R2.w, R2;\n"
+ "ADD R2.x, -R1.w, c[9].z;\n"
+ "MAD R2.xyz, R0, R2.x, R1;\n"
+ "ADD R1.z, R1.w, R0.w;\n"
+ "MAD R2.w, -R1, R0, R1.z;\n"
+ "ADD R1.xy, fragment.position, c[7];\n"
+ "MUL R1.xy, R1, c[5];\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[8];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_COLORDODGE =
"!!ARBfp1.0\n"
- "PARAM c[10] = { program.local[0..6],\n"
- " { 2, 4, 1, 1e-06 },\n"
- " program.local[8..9] };\n"
+ "PARAM c[10] = { program.local[0..8],\n"
+ " { 2, 4, 1, 1e-006 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[3];\n"
+ "MAD R0.xyz, fragment.position.x, c[2], R0;\n"
+ "ADD R0.xyz, R0, c[4];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
- "MUL R0.xy, R0, c[6];\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.z, R0, R0.w;\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.z, c[8].x, -R0;\n"
- "MUL R0.y, R0.z, c[7];\n"
- "MUL R0.x, R0, c[7];\n"
- "MAD R0.y, R0.x, R0.x, -R0;\n"
- "MOV R0.z, c[7].x;\n"
- "RSQ R0.y, R0.y;\n"
- "RCP R0.y, R0.y;\n"
- "MUL R0.z, c[8].x, R0;\n"
- "ADD R0.x, -R0, R0.y;\n"
+ "MUL R0.z, -R0, c[1].x;\n"
+ "MUL R0.y, R0.z, c[9];\n"
+ "MUL R0.x, R0, c[9];\n"
+ "MAD R0.z, R0.x, R0.x, -R0.y;\n"
+ "MOV R0.y, c[9].x;\n"
+ "RSQ R0.z, R0.z;\n"
"RCP R0.z, R0.z;\n"
- "MUL R0.x, R0, R0.z;\n"
+ "MUL R0.y, R0, c[1].x;\n"
+ "ADD R0.x, -R0, R0.z;\n"
+ "RCP R0.y, R0.y;\n"
+ "MUL R0.x, R0, R0.y;\n"
"TEX R0, R0, texture[2], 1D;\n"
- "MAX R1.x, R0.w, c[7].w;\n"
+ "MAX R1.x, R0.w, c[9].w;\n"
"RCP R1.x, R1.x;\n"
- "MAD R1.xyz, -R0, R1.x, c[7].z;\n"
- "MAX R2.xyz, R1, c[7].w;\n"
- "MUL R1.xy, fragment.position, c[9];\n"
+ "MAD R1.xyz, -R0, R1.x, c[9].z;\n"
+ "MAX R2.xyz, R1, c[9].w;\n"
+ "MUL R1.xy, fragment.position, c[6];\n"
"TEX R1, R1, texture[0], 2D;\n"
- "ADD R2.w, -R0, c[7].z;\n"
+ "ADD R2.w, -R0, c[9].z;\n"
"MUL R3.xyz, R1, R2.w;\n"
- "ADD R2.w, -R1, c[7].z;\n"
+ "ADD R2.w, -R1, c[9].z;\n"
"MAD R4.xyz, R0, R2.w, R3;\n"
- "MUL R3.xyz, R1, R0.w;\n"
+ "MUL R3.xyz, R0.w, R1;\n"
"MUL R2.w, R0, R1;\n"
"MAD R0.xyz, R0, R1.w, R3;\n"
"SGE R0.xyz, R0, R2.w;\n"
@@ -1339,57 +1270,56 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
"MAD R2.xyz, R0, R4, R2;\n"
"ADD R0.z, R0.w, R1.w;\n"
"MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
+ "ADD R0.xy, fragment.position, c[7];\n"
+ "MUL R0.xy, R0, c[5];\n"
"TEX R0, R0, texture[1], 2D;\n"
"ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
+ "DP4 R0.x, R0, c[8];\n"
"MAD result.color, R0.x, R2, R1;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_COLORBURN =
"!!ARBfp1.0\n"
- "PARAM c[10] = { program.local[0..6],\n"
- " { 2, 4, 1, 9.9999997e-06 },\n"
- " program.local[8..9] };\n"
+ "PARAM c[10] = { program.local[0..8],\n"
+ " { 2, 4, 1, 9.9999997e-006 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
"TEMP R5;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[3];\n"
+ "MAD R0.xyz, fragment.position.x, c[2], R0;\n"
+ "ADD R0.xyz, R0, c[4];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
- "MUL R0.xy, R0, c[6];\n"
"ADD R0.z, R0, R0.w;\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.z, c[8].x, -R0;\n"
- "MUL R0.y, R0.z, c[7];\n"
- "MUL R0.x, R0, c[7];\n"
+ "MUL R0.z, -R0, c[1].x;\n"
+ "MUL R0.y, R0.z, c[9];\n"
+ "MUL R0.x, R0, c[9];\n"
"MAD R0.y, R0.x, R0.x, -R0;\n"
- "MOV R0.z, c[7].x;\n"
- "RSQ R0.y, R0.y;\n"
- "RCP R0.y, R0.y;\n"
- "MUL R0.z, c[8].x, R0;\n"
- "MUL R1.xy, fragment.position, c[9];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "ADD R0.x, -R0, R0.y;\n"
+ "RSQ R0.z, R0.y;\n"
"RCP R0.z, R0.z;\n"
- "MUL R0.x, R0, R0.z;\n"
+ "ADD R0.x, -R0, R0.z;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[6].xyxy;\n"
+ "TEX R1, R0.zwzw, texture[0], 2D;\n"
+ "MOV R0.y, c[9].x;\n"
+ "MUL R0.y, R0, c[1].x;\n"
+ "RCP R0.y, R0.y;\n"
+ "MUL R0.x, R0, R0.y;\n"
"TEX R0, R0, texture[2], 1D;\n"
- "MUL R2.xyz, R1, R0.w;\n"
+ "MUL R2.xyz, R0.w, R1;\n"
"MAD R3.xyz, R0, R1.w, R2;\n"
"MAD R2.xyz, -R0.w, R1.w, R3;\n"
"MUL R4.xyz, R0.w, R2;\n"
- "MAX R2.xyz, R0, c[7].w;\n"
- "ADD R2.w, -R1, c[7].z;\n"
+ "MAX R2.xyz, R0, c[9].w;\n"
+ "ADD R2.w, -R1, c[9].z;\n"
"MUL R5.xyz, R0, R2.w;\n"
- "ADD R3.w, -R0, c[7].z;\n"
+ "ADD R3.w, -R0, c[9].z;\n"
"RCP R2.x, R2.x;\n"
"RCP R2.y, R2.y;\n"
"RCP R2.z, R2.z;\n"
@@ -1403,60 +1333,59 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
"MAD R2.xyz, R3, R2, R0;\n"
"ADD R0.z, R0.w, R1.w;\n"
"MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
+ "ADD R0.xy, fragment.position, c[7];\n"
+ "MUL R0.xy, R0, c[5];\n"
"TEX R0, R0, texture[1], 2D;\n"
"ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
+ "DP4 R0.x, R0, c[8];\n"
"MAD result.color, R0.x, R2, R1;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_HARDLIGHT =
"!!ARBfp1.0\n"
- "PARAM c[10] = { program.local[0..6],\n"
- " { 2, 4, 1 },\n"
- " program.local[8..9] };\n"
+ "PARAM c[10] = { program.local[0..8],\n"
+ " { 2, 4, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[3];\n"
+ "MAD R0.xyz, fragment.position.x, c[2], R0;\n"
+ "ADD R0.xyz, R0, c[4];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
- "MUL R0.xy, R0, c[6];\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.z, R0, R0.w;\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.z, c[8].x, -R0;\n"
- "MUL R0.y, R0.z, c[7];\n"
- "MUL R0.x, R0, c[7];\n"
- "MAD R0.y, R0.x, R0.x, -R0;\n"
- "MOV R0.z, c[7].x;\n"
- "RSQ R0.y, R0.y;\n"
- "RCP R0.y, R0.y;\n"
- "MUL R0.z, c[8].x, R0;\n"
- "MUL R1.xy, fragment.position, c[9];\n"
+ "MUL R0.z, -R0, c[1].x;\n"
+ "MUL R1.xy, fragment.position, c[6];\n"
"TEX R1, R1, texture[0], 2D;\n"
- "ADD R0.x, -R0, R0.y;\n"
+ "MUL R0.y, R0.z, c[9];\n"
+ "MUL R0.x, R0, c[9];\n"
+ "MAD R0.z, R0.x, R0.x, -R0.y;\n"
+ "MOV R0.y, c[9].x;\n"
+ "RSQ R0.z, R0.z;\n"
"RCP R0.z, R0.z;\n"
- "MUL R0.x, R0, R0.z;\n"
+ "MUL R0.y, R0, c[1].x;\n"
+ "ADD R0.x, -R0, R0.z;\n"
+ "RCP R0.y, R0.y;\n"
+ "MUL R0.x, R0, R0.y;\n"
"TEX R0, R0, texture[2], 1D;\n"
- "ADD R2.w, -R1, c[7].z;\n"
+ "ADD R2.w, -R1, c[9].z;\n"
"ADD R3.xyz, R0.w, -R0;\n"
"ADD R2.xyz, R1.w, -R1;\n"
"MUL R2.xyz, R2, R3;\n"
- "MUL R2.xyz, R2, c[7].x;\n"
+ "MUL R2.xyz, R2, c[9].x;\n"
"MAD R2.xyz, R0.w, R1.w, -R2;\n"
"MUL R4.xyz, R0, R2.w;\n"
"MAD R2.xyz, R0, R2.w, R2;\n"
"MUL R3.xyz, R0, R1;\n"
- "ADD R2.w, -R0, c[7].z;\n"
- "MAD R3.xyz, R3, c[7].x, R4;\n"
- "MUL R0.xyz, R0, c[7].x;\n"
+ "ADD R2.w, -R0, c[9].z;\n"
+ "MAD R3.xyz, R3, c[9].x, R4;\n"
+ "MUL R0.xyz, R0, c[9].x;\n"
"SGE R0.xyz, R0, R0.w;\n"
"MAD R3.xyz, R1, R2.w, R3;\n"
"MAD R2.xyz, R1, R2.w, R2;\n"
@@ -1464,21 +1393,20 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
"MAD R2.xyz, R0, R2, R3;\n"
"ADD R0.z, R0.w, R1.w;\n"
"MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
+ "ADD R0.xy, fragment.position, c[7];\n"
+ "MUL R0.xy, R0, c[5];\n"
"TEX R0, R0, texture[1], 2D;\n"
"ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
+ "DP4 R0.x, R0, c[8];\n"
"MAD result.color, R0.x, R2, R1;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_SOFTLIGHT =
"!!ARBfp1.0\n"
- "PARAM c[11] = { program.local[0..6],\n"
- " { 2, 4, 1, 9.9999997e-06 },\n"
- " program.local[8..9],\n"
- " { 8, 3 } };\n"
+ "PARAM c[11] = { program.local[0..8],\n"
+ " { 2, 4, 1, 9.9999997e-006 },\n"
+ " { 3, 8 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -1486,259 +1414,252 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
"TEMP R4;\n"
"TEMP R5;\n"
"TEMP R6;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[3];\n"
+ "MAD R0.xyz, fragment.position.x, c[2], R0;\n"
+ "ADD R0.xyz, R0, c[4];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
- "MUL R0.xy, R0, c[6];\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.z, R0, R0.w;\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.z, c[8].x, -R0;\n"
- "MUL R0.y, R0.z, c[7];\n"
- "MUL R0.zw, fragment.position.xyxy, c[9].xyxy;\n"
- "TEX R1, R0.zwzw, texture[0], 2D;\n"
- "MUL R0.x, R0, c[7];\n"
+ "MUL R0.z, -R0, c[1].x;\n"
+ "MUL R0.y, R0.z, c[9];\n"
+ "MUL R0.x, R0, c[9];\n"
"MAD R0.y, R0.x, R0.x, -R0;\n"
- "MAX R0.z, R1.w, c[7].w;\n"
- "RCP R2.w, R0.z;\n"
- "MUL R2.xyz, R1, R2.w;\n"
- "MUL R6.xyz, -R2, c[10].x;\n"
- "MAD R3.xyz, -R1, R2.w, c[7].z;\n"
+ "MOV R0.z, c[9].x;\n"
+ "MUL R1.y, R0.z, c[1].x;\n"
"RSQ R0.y, R0.y;\n"
"RCP R0.y, R0.y;\n"
- "ADD R0.x, -R0, R0.y;\n"
- "MOV R0.y, c[7].x;\n"
- "MUL R0.y, c[8].x, R0;\n"
- "RCP R0.y, R0.y;\n"
- "MUL R0.x, R0, R0.y;\n"
- "TEX R0, R0, texture[2], 1D;\n"
- "MAD R4.xyz, R0, c[7].x, -R0.w;\n"
+ "ADD R1.x, -R0, R0.y;\n"
+ "RCP R1.y, R1.y;\n"
+ "MUL R0.xy, fragment.position, c[6];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "MAX R1.z, R0.w, c[9].w;\n"
+ "RCP R2.w, R1.z;\n"
+ "MUL R2.xyz, R0, R2.w;\n"
+ "MAD R6.xyz, -R2, c[10].y, c[10].x;\n"
+ "MAD R3.xyz, -R0, R2.w, c[9].z;\n"
+ "RSQ R2.w, R2.x;\n"
+ "RCP R2.x, R2.w;\n"
+ "MUL R1.x, R1, R1.y;\n"
+ "TEX R1, R1, texture[2], 1D;\n"
+ "MAD R4.xyz, R1, c[9].x, -R1.w;\n"
"MUL R5.xyz, R3, R4;\n"
- "MAD R3.xyz, -R3, R4, R0.w;\n"
- "ADD R6.xyz, R6, c[10].y;\n"
- "RSQ R2.x, R2.x;\n"
+ "MAD R5.xyz, -R5, R6, R1.w;\n"
+ "MAD R3.xyz, -R3, R4, R1.w;\n"
"RSQ R2.z, R2.z;\n"
"RSQ R2.y, R2.y;\n"
- "MAD R5.xyz, -R5, R6, R0.w;\n"
- "MUL R3.xyz, R1, R3;\n"
- "ADD R2.w, -R1, c[7].z;\n"
- "RCP R2.x, R2.x;\n"
+ "MUL R5.xyz, R0, R5;\n"
+ "MUL R3.xyz, R0, R3;\n"
+ "ADD R2.w, -R0, c[9].z;\n"
"RCP R2.z, R2.z;\n"
"RCP R2.y, R2.y;\n"
- "MAD R2.xyz, R2, R1.w, -R1;\n"
- "MUL R6.xyz, R2, R4;\n"
- "MUL R2.xyz, R1, R5;\n"
- "MAD R6.xyz, R1, R0.w, R6;\n"
- "MUL R4.xyz, R0, c[7].x;\n"
- "MUL R5.xyz, R1, c[10].x;\n"
- "ADD R6.xyz, R6, -R2;\n"
- "SGE R5.xyz, R5, R1.w;\n"
- "MUL R5.xyz, R5, R6;\n"
- "ADD R2.xyz, R2, R5;\n"
- "SGE R4.xyz, R4, R0.w;\n"
+ "MAD R2.xyz, R0.w, R2, -R0;\n"
+ "MUL R2.xyz, R2, R4;\n"
+ "MAD R2.xyz, R1.w, R0, R2;\n"
+ "ADD R6.xyz, R2, -R5;\n"
+ "MUL R4.xyz, R1, c[9].x;\n"
+ "MUL R2.xyz, R0, c[10].y;\n"
+ "SGE R2.xyz, R2, R0.w;\n"
+ "MAD R2.xyz, R2, R6, R5;\n"
+ "SGE R4.xyz, R4, R1.w;\n"
"ADD R2.xyz, R2, -R3;\n"
- "MUL R2.xyz, R4, R2;\n"
- "ADD R2.xyz, R3, R2;\n"
- "MAD R0.xyz, R0, R2.w, R2;\n"
- "ADD R2.x, -R0.w, c[7].z;\n"
- "MAD R2.xyz, R1, R2.x, R0;\n"
- "ADD R0.z, R0.w, R1.w;\n"
- "MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "MAD R2.xyz, R4, R2, R3;\n"
+ "MAD R1.xyz, R1, R2.w, R2;\n"
+ "ADD R2.x, -R1.w, c[9].z;\n"
+ "MAD R2.xyz, R0, R2.x, R1;\n"
+ "ADD R1.z, R1.w, R0.w;\n"
+ "MAD R2.w, -R1, R0, R1.z;\n"
+ "ADD R1.xy, fragment.position, c[7];\n"
+ "MUL R1.xy, R1, c[5];\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[8];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_DIFFERENCE =
"!!ARBfp1.0\n"
- "PARAM c[10] = { program.local[0..6],\n"
- " { 2, 4 },\n"
- " program.local[8..9] };\n"
+ "PARAM c[10] = { program.local[0..8],\n"
+ " { 2, 4 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[3];\n"
+ "MAD R0.xyz, fragment.position.x, c[2], R0;\n"
+ "ADD R0.xyz, R0, c[4];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
"ADD R0.z, R0, R0.w;\n"
- "MUL R0.xy, R0, c[6];\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.z, c[8].x, -R0;\n"
- "MUL R0.y, R0.z, c[7];\n"
- "MUL R0.x, R0, c[7];\n"
- "MAD R0.y, R0.x, R0.x, -R0;\n"
- "RSQ R0.z, R0.y;\n"
- "RCP R0.z, R0.z;\n"
- "ADD R0.x, -R0, R0.z;\n"
- "MUL R0.zw, fragment.position.xyxy, c[9].xyxy;\n"
- "MOV R0.y, c[7].x;\n"
- "MUL R0.y, c[8].x, R0;\n"
- "RCP R0.y, R0.y;\n"
- "TEX R1, R0.zwzw, texture[0], 2D;\n"
- "MUL R0.x, R0, R0.y;\n"
- "TEX R0, R0, texture[2], 1D;\n"
- "ADD R3.xyz, R0, R1;\n"
- "MUL R2.xyz, R1, R0.w;\n"
- "MUL R0.xyz, R0, R1.w;\n"
- "MIN R0.xyz, R0, R2;\n"
- "MAD R2.xyz, -R0, c[7].x, R3;\n"
- "ADD R0.z, R0.w, R1.w;\n"
- "MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "MUL R0.z, -R0, c[1].x;\n"
+ "MUL R0.y, R0.x, c[9].x;\n"
+ "MUL R0.z, R0, c[9].y;\n"
+ "MAD R0.x, R0.y, R0.y, -R0.z;\n"
+ "RSQ R0.z, R0.x;\n"
+ "MOV R0.x, c[9];\n"
+ "MUL R0.x, R0, c[1];\n"
+ "RCP R0.z, R0.z;\n"
+ "ADD R0.z, -R0.y, R0;\n"
+ "RCP R0.w, R0.x;\n"
+ "MUL R1.x, R0.z, R0.w;\n"
+ "MUL R0.xy, fragment.position, c[6];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "TEX R1, R1, texture[2], 1D;\n"
+ "ADD R2.xyz, R1, R0;\n"
+ "MUL R3.xyz, R1.w, R0;\n"
+ "MUL R1.xyz, R1, R0.w;\n"
+ "MIN R1.xyz, R1, R3;\n"
+ "MAD R2.xyz, -R1, c[9].x, R2;\n"
+ "ADD R1.z, R1.w, R0.w;\n"
+ "MAD R2.w, -R1, R0, R1.z;\n"
+ "ADD R1.xy, fragment.position, c[7];\n"
+ "MUL R1.xy, R1, c[5];\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[8];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_EXCLUSION =
"!!ARBfp1.0\n"
- "PARAM c[10] = { program.local[0..6],\n"
- " { 2, 4, 1 },\n"
- " program.local[8..9] };\n"
+ "PARAM c[10] = { program.local[0..8],\n"
+ " { 2, 4, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[3];\n"
+ "MAD R0.xyz, fragment.position.x, c[2], R0;\n"
+ "ADD R0.xyz, R0, c[4];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
- "MUL R0.xy, R0, c[6];\n"
"ADD R0.z, R0, R0.w;\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.z, c[8].x, -R0;\n"
- "MUL R0.y, R0.z, c[7];\n"
- "MUL R0.x, R0, c[7];\n"
- "MAD R0.y, R0.x, R0.x, -R0;\n"
- "MOV R0.z, c[7].x;\n"
- "RSQ R0.y, R0.y;\n"
- "RCP R0.y, R0.y;\n"
- "MUL R0.z, c[8].x, R0;\n"
- "MUL R1.xy, fragment.position, c[9];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "ADD R0.x, -R0, R0.y;\n"
- "RCP R0.z, R0.z;\n"
- "MUL R0.x, R0, R0.z;\n"
- "TEX R0, R0, texture[2], 1D;\n"
- "MUL R2.xyz, R1, R0.w;\n"
- "MAD R3.xyz, R0, R1.w, R2;\n"
- "MUL R2.xyz, R0, R1;\n"
- "MAD R2.xyz, -R2, c[7].x, R3;\n"
- "ADD R2.w, -R1, c[7].z;\n"
- "MAD R0.xyz, R0, R2.w, R2;\n"
- "ADD R2.x, -R0.w, c[7].z;\n"
- "MAD R2.xyz, R1, R2.x, R0;\n"
- "ADD R0.z, R0.w, R1.w;\n"
- "MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "MUL R0.z, -R0, c[1].x;\n"
+ "MUL R0.y, R0.x, c[9].x;\n"
+ "MUL R0.z, R0, c[9].y;\n"
+ "MAD R0.x, R0.y, R0.y, -R0.z;\n"
+ "RSQ R0.z, R0.x;\n"
+ "MOV R0.x, c[9];\n"
+ "MUL R0.x, R0, c[1];\n"
+ "RCP R0.z, R0.z;\n"
+ "ADD R0.z, -R0.y, R0;\n"
+ "RCP R0.w, R0.x;\n"
+ "MUL R1.x, R0.z, R0.w;\n"
+ "MUL R0.xy, fragment.position, c[6];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "TEX R1, R1, texture[2], 1D;\n"
+ "MUL R2.xyz, R1.w, R0;\n"
+ "MAD R3.xyz, R1, R0.w, R2;\n"
+ "MUL R2.xyz, R1, R0;\n"
+ "MAD R2.xyz, -R2, c[9].x, R3;\n"
+ "ADD R2.w, -R0, c[9].z;\n"
+ "MAD R1.xyz, R1, R2.w, R2;\n"
+ "ADD R2.x, -R1.w, c[9].z;\n"
+ "MAD R2.xyz, R0, R2.x, R1;\n"
+ "ADD R1.z, R1.w, R0.w;\n"
+ "MAD R2.w, -R1, R0, R1.z;\n"
+ "ADD R1.xy, fragment.position, c[7];\n"
+ "MUL R1.xy, R1, c[5];\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[8];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_SIMPLE_PORTER_DUFF_NOMASK =
"!!ARBfp1.0\n"
- "PARAM c[9] = { program.local[0..3],\n"
- " { 2, 4, 1 },\n"
- " program.local[5..8] };\n"
+ "PARAM c[9] = { program.local[0..7],\n"
+ " { 2, 4, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[3];\n"
+ "MAD R0.xyz, fragment.position.x, c[2], R0;\n"
+ "ADD R0.xyz, R0, c[4];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.z, R0, R0.w;\n"
- "MUL R0.xy, R0, c[3];\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.z, c[5].x, -R0;\n"
- "MUL R0.y, R0.z, c[4];\n"
- "MUL R0.x, R0, c[4];\n"
+ "MUL R0.z, -R0, c[1].x;\n"
+ "MUL R0.y, R0.z, c[8];\n"
+ "MUL R0.x, R0, c[8];\n"
"MAD R0.y, R0.x, R0.x, -R0;\n"
- "RSQ R0.z, R0.y;\n"
- "RCP R0.z, R0.z;\n"
+ "RSQ R0.y, R0.y;\n"
+ "RCP R0.z, R0.y;\n"
"ADD R0.x, -R0, R0.z;\n"
- "MUL R0.zw, fragment.position.xyxy, c[6].xyxy;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[7].xyxy;\n"
"TEX R1, R0.zwzw, texture[0], 2D;\n"
- "MUL R2.xyz, R1, c[8].y;\n"
- "MOV R0.y, c[4].x;\n"
- "MUL R0.y, c[5].x, R0;\n"
+ "MUL R2.xyz, R1, c[5].y;\n"
+ "MOV R0.y, c[8].x;\n"
+ "MUL R0.y, R0, c[1].x;\n"
"RCP R0.y, R0.y;\n"
"MUL R0.x, R0, R0.y;\n"
"TEX R0, R0, texture[1], 1D;\n"
- "MUL R3.xyz, R2, R0.w;\n"
- "MUL R2.xyz, R0, c[8].x;\n"
- "MAD R2.xyz, R2, R1.w, R3;\n"
- "ADD R2.w, -R1, c[4].z;\n"
- "MUL R0.xyz, R0, c[7].y;\n"
- "MAD R0.xyz, R0, R2.w, R2;\n"
- "ADD R2.x, -R0.w, c[4].z;\n"
- "MUL R1.xyz, R1, c[7].z;\n"
- "MAD result.color.xyz, R1, R2.x, R0;\n"
+ "MUL R3.xyz, R0.w, R2;\n"
+ "MUL R2.xyz, R0, c[5].x;\n"
+ "MAD R2.xyz, R1.w, R2, R3;\n"
+ "ADD R2.w, -R1, c[8].z;\n"
+ "MUL R0.xyz, R0, c[6].y;\n"
+ "MAD R0.xyz, R2.w, R0, R2;\n"
+ "ADD R2.x, -R0.w, c[8].z;\n"
+ "MUL R1.xyz, R1, c[6].z;\n"
+ "MAD result.color.xyz, R2.x, R1, R0;\n"
"MUL R0.x, R0.w, R1.w;\n"
"MUL R0.z, R1.w, R2.x;\n"
"MUL R0.y, R0.w, R2.w;\n"
- "DP3 result.color.w, R0, c[7];\n"
+ "DP3 result.color.w, R0, c[6];\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_MULTIPLY_NOMASK =
"!!ARBfp1.0\n"
- "PARAM c[7] = { program.local[0..3],\n"
- " { 2, 4, 1 },\n"
- " program.local[5..6] };\n"
+ "PARAM c[7] = { program.local[0..5],\n"
+ " { 2, 4, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[3];\n"
+ "MAD R0.xyz, fragment.position.x, c[2], R0;\n"
+ "ADD R0.xyz, R0, c[4];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
- "MUL R0.xy, R0, c[3];\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.z, R0, R0.w;\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.z, c[5].x, -R0;\n"
- "MUL R0.y, R0.z, c[4];\n"
- "MUL R0.x, R0, c[4];\n"
+ "MUL R0.z, -R0, c[1].x;\n"
+ "MUL R0.y, R0.z, c[6];\n"
+ "MUL R0.x, R0, c[6];\n"
"MAD R0.y, R0.x, R0.x, -R0;\n"
"RSQ R0.y, R0.y;\n"
"RCP R0.z, R0.y;\n"
"ADD R0.x, -R0, R0.z;\n"
- "MUL R0.zw, fragment.position.xyxy, c[6].xyxy;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n"
"TEX R1, R0.zwzw, texture[0], 2D;\n"
- "MOV R0.y, c[4].x;\n"
- "MUL R0.y, c[5].x, R0;\n"
+ "MOV R0.y, c[6].x;\n"
+ "MUL R0.y, R0, c[1].x;\n"
"RCP R0.y, R0.y;\n"
"MUL R0.x, R0, R0.y;\n"
"TEX R0, R0, texture[1], 1D;\n"
- "ADD R2.x, -R1.w, c[4].z;\n"
+ "ADD R2.x, -R1.w, c[6].z;\n"
"MUL R2.xyz, R0, R2.x;\n"
"MAD R0.xyz, R0, R1, R2;\n"
"ADD R2.x, R0.w, R1.w;\n"
- "ADD R2.y, -R0.w, c[4].z;\n"
+ "ADD R2.y, -R0.w, c[6].z;\n"
"MAD result.color.xyz, R1, R2.y, R0;\n"
"MAD result.color.w, -R0, R1, R2.x;\n"
"END\n"
@@ -1746,31 +1667,30 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_SCREEN_NOMASK =
"!!ARBfp1.0\n"
- "PARAM c[7] = { program.local[0..3],\n"
- " { 2, 4 },\n"
- " program.local[5..6] };\n"
+ "PARAM c[7] = { program.local[0..5],\n"
+ " { 2, 4 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[3];\n"
+ "MAD R0.xyz, fragment.position.x, c[2], R0;\n"
+ "ADD R0.xyz, R0, c[4];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
"ADD R0.z, R0, R0.w;\n"
- "MUL R0.xy, R0, c[3];\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.z, c[5].x, -R0;\n"
- "MUL R0.y, R0.z, c[4];\n"
- "MUL R0.x, R0, c[4];\n"
+ "MUL R0.z, -R0, c[1].x;\n"
+ "MUL R0.y, R0.z, c[6];\n"
+ "MUL R0.x, R0, c[6];\n"
"MAD R0.y, R0.x, R0.x, -R0;\n"
"RSQ R0.z, R0.y;\n"
"RCP R0.z, R0.z;\n"
"ADD R0.x, -R0, R0.z;\n"
- "MUL R0.zw, fragment.position.xyxy, c[6].xyxy;\n"
- "MOV R0.y, c[4].x;\n"
- "MUL R0.y, c[5].x, R0;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n"
+ "MOV R0.y, c[6].x;\n"
+ "MUL R0.y, R0, c[1].x;\n"
"RCP R0.y, R0.y;\n"
"TEX R1, R0.zwzw, texture[0], 2D;\n"
"MUL R0.x, R0, R0.y;\n"
@@ -1782,50 +1702,49 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_OVERLAY_NOMASK =
"!!ARBfp1.0\n"
- "PARAM c[7] = { program.local[0..3],\n"
- " { 2, 4, 1 },\n"
- " program.local[5..6] };\n"
+ "PARAM c[7] = { program.local[0..5],\n"
+ " { 2, 4, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[3];\n"
+ "MAD R0.xyz, fragment.position.x, c[2], R0;\n"
+ "ADD R0.xyz, R0, c[4];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
- "MUL R0.xy, R0, c[3];\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.z, R0, R0.w;\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.z, c[5].x, -R0;\n"
- "MUL R0.y, R0.z, c[4];\n"
- "MUL R0.x, R0, c[4];\n"
- "MAD R0.y, R0.x, R0.x, -R0;\n"
- "MOV R0.z, c[4].x;\n"
- "RSQ R0.y, R0.y;\n"
- "RCP R0.y, R0.y;\n"
- "MUL R0.z, c[5].x, R0;\n"
- "MUL R1.xy, fragment.position, c[6];\n"
+ "MUL R0.z, -R0, c[1].x;\n"
+ "MUL R1.xy, fragment.position, c[5];\n"
"TEX R1, R1, texture[0], 2D;\n"
- "ADD R0.x, -R0, R0.y;\n"
+ "MUL R0.y, R0.z, c[6];\n"
+ "MUL R0.x, R0, c[6];\n"
+ "MAD R0.z, R0.x, R0.x, -R0.y;\n"
+ "MOV R0.y, c[6].x;\n"
+ "RSQ R0.z, R0.z;\n"
"RCP R0.z, R0.z;\n"
- "MUL R0.x, R0, R0.z;\n"
+ "MUL R0.y, R0, c[1].x;\n"
+ "ADD R0.x, -R0, R0.z;\n"
+ "RCP R0.y, R0.y;\n"
+ "MUL R0.x, R0, R0.y;\n"
"TEX R0, R0, texture[1], 1D;\n"
"ADD R3.xyz, R0.w, -R0;\n"
"ADD R2.xyz, R1.w, -R1;\n"
"MUL R2.xyz, R2, R3;\n"
- "ADD R2.w, -R1, c[4].z;\n"
- "MUL R2.xyz, R2, c[4].x;\n"
+ "ADD R2.w, -R1, c[6].z;\n"
+ "MUL R2.xyz, R2, c[6].x;\n"
"MAD R2.xyz, R0.w, R1.w, -R2;\n"
"MAD R2.xyz, R0, R2.w, R2;\n"
"MUL R3.xyz, R0, R2.w;\n"
"MUL R0.xyz, R0, R1;\n"
- "ADD R2.w, -R0, c[4].z;\n"
- "MAD R0.xyz, R0, c[4].x, R3;\n"
+ "ADD R2.w, -R0, c[6].z;\n"
+ "MAD R0.xyz, R0, c[6].x, R3;\n"
"MAD R0.xyz, R1, R2.w, R0;\n"
"MAD R2.xyz, R1, R2.w, R2;\n"
- "MUL R1.xyz, R1, c[4].x;\n"
+ "MUL R1.xyz, R1, c[6].x;\n"
"ADD R2.w, R0, R1;\n"
"ADD R2.xyz, R2, -R0;\n"
"SGE R1.xyz, R1, R1.w;\n"
@@ -1836,43 +1755,42 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_DARKEN_NOMASK =
"!!ARBfp1.0\n"
- "PARAM c[7] = { program.local[0..3],\n"
- " { 2, 4, 1 },\n"
- " program.local[5..6] };\n"
+ "PARAM c[7] = { program.local[0..5],\n"
+ " { 2, 4, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[3];\n"
+ "MAD R0.xyz, fragment.position.x, c[2], R0;\n"
+ "ADD R0.xyz, R0, c[4];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
- "MUL R0.xy, R0, c[3];\n"
"ADD R0.z, R0, R0.w;\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.z, c[5].x, -R0;\n"
- "MUL R0.y, R0.z, c[4];\n"
- "MUL R0.x, R0, c[4];\n"
+ "MUL R0.z, -R0, c[1].x;\n"
+ "MUL R0.y, R0.z, c[6];\n"
+ "MUL R0.x, R0, c[6];\n"
"MAD R0.y, R0.x, R0.x, -R0;\n"
- "MOV R0.z, c[4].x;\n"
- "RSQ R0.y, R0.y;\n"
- "RCP R0.y, R0.y;\n"
- "MUL R0.z, c[5].x, R0;\n"
- "MUL R1.xy, fragment.position, c[6];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "ADD R0.x, -R0, R0.y;\n"
+ "RSQ R0.z, R0.y;\n"
"RCP R0.z, R0.z;\n"
- "MUL R0.x, R0, R0.z;\n"
+ "ADD R0.x, -R0, R0.z;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n"
+ "TEX R1, R0.zwzw, texture[0], 2D;\n"
+ "MOV R0.y, c[6].x;\n"
+ "MUL R0.y, R0, c[1].x;\n"
+ "RCP R0.y, R0.y;\n"
+ "MUL R0.x, R0, R0.y;\n"
"TEX R0, R0, texture[1], 1D;\n"
"MUL R2.xyz, R0, R1.w;\n"
- "MUL R3.xyz, R1, R0.w;\n"
+ "MUL R3.xyz, R0.w, R1;\n"
"MIN R2.xyz, R2, R3;\n"
- "ADD R2.w, -R1, c[4].z;\n"
+ "ADD R2.w, -R1, c[6].z;\n"
"MAD R0.xyz, R0, R2.w, R2;\n"
"ADD R2.x, R0.w, R1.w;\n"
- "ADD R2.y, -R0.w, c[4].z;\n"
+ "ADD R2.y, -R0.w, c[6].z;\n"
"MAD result.color.xyz, R1, R2.y, R0;\n"
"MAD result.color.w, -R0, R1, R2.x;\n"
"END\n"
@@ -1880,43 +1798,42 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_LIGHTEN_NOMASK =
"!!ARBfp1.0\n"
- "PARAM c[7] = { program.local[0..3],\n"
- " { 2, 4, 1 },\n"
- " program.local[5..6] };\n"
+ "PARAM c[7] = { program.local[0..5],\n"
+ " { 2, 4, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[3];\n"
+ "MAD R0.xyz, fragment.position.x, c[2], R0;\n"
+ "ADD R0.xyz, R0, c[4];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
- "MUL R0.xy, R0, c[3];\n"
"ADD R0.z, R0, R0.w;\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.z, c[5].x, -R0;\n"
- "MUL R0.y, R0.z, c[4];\n"
- "MUL R0.x, R0, c[4];\n"
+ "MUL R0.z, -R0, c[1].x;\n"
+ "MUL R0.y, R0.z, c[6];\n"
+ "MUL R0.x, R0, c[6];\n"
"MAD R0.y, R0.x, R0.x, -R0;\n"
- "MOV R0.z, c[4].x;\n"
- "RSQ R0.y, R0.y;\n"
- "RCP R0.y, R0.y;\n"
- "MUL R0.z, c[5].x, R0;\n"
- "MUL R1.xy, fragment.position, c[6];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "ADD R0.x, -R0, R0.y;\n"
+ "RSQ R0.z, R0.y;\n"
"RCP R0.z, R0.z;\n"
- "MUL R0.x, R0, R0.z;\n"
+ "ADD R0.x, -R0, R0.z;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n"
+ "TEX R1, R0.zwzw, texture[0], 2D;\n"
+ "MOV R0.y, c[6].x;\n"
+ "MUL R0.y, R0, c[1].x;\n"
+ "RCP R0.y, R0.y;\n"
+ "MUL R0.x, R0, R0.y;\n"
"TEX R0, R0, texture[1], 1D;\n"
"MUL R2.xyz, R0, R1.w;\n"
- "MUL R3.xyz, R1, R0.w;\n"
+ "MUL R3.xyz, R0.w, R1;\n"
"MAX R2.xyz, R2, R3;\n"
- "ADD R2.w, -R1, c[4].z;\n"
+ "ADD R2.w, -R1, c[6].z;\n"
"MAD R0.xyz, R0, R2.w, R2;\n"
"ADD R2.x, R0.w, R1.w;\n"
- "ADD R2.y, -R0.w, c[4].z;\n"
+ "ADD R2.y, -R0.w, c[6].z;\n"
"MAD result.color.xyz, R1, R2.y, R0;\n"
"MAD result.color.w, -R0, R1, R2.x;\n"
"END\n"
@@ -1924,45 +1841,44 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_COLORDODGE_NOMASK =
"!!ARBfp1.0\n"
- "PARAM c[7] = { program.local[0..3],\n"
- " { 2, 4, 1, 1e-06 },\n"
- " program.local[5..6] };\n"
+ "PARAM c[7] = { program.local[0..5],\n"
+ " { 2, 4, 1, 1e-006 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[3];\n"
+ "MAD R0.xyz, fragment.position.x, c[2], R0;\n"
+ "ADD R0.xyz, R0, c[4];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
- "MUL R0.xy, R0, c[3];\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.z, R0, R0.w;\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.z, c[5].x, -R0;\n"
- "MUL R0.y, R0.z, c[4];\n"
- "MUL R0.x, R0, c[4];\n"
- "MAD R0.y, R0.x, R0.x, -R0;\n"
- "MOV R0.z, c[4].x;\n"
- "RSQ R0.y, R0.y;\n"
- "RCP R0.y, R0.y;\n"
- "MUL R0.z, c[5].x, R0;\n"
- "ADD R0.x, -R0, R0.y;\n"
+ "MUL R0.z, -R0, c[1].x;\n"
+ "MUL R0.y, R0.z, c[6];\n"
+ "MUL R0.x, R0, c[6];\n"
+ "MAD R0.z, R0.x, R0.x, -R0.y;\n"
+ "MOV R0.y, c[6].x;\n"
+ "RSQ R0.z, R0.z;\n"
"RCP R0.z, R0.z;\n"
- "MUL R0.x, R0, R0.z;\n"
+ "MUL R0.y, R0, c[1].x;\n"
+ "ADD R0.x, -R0, R0.z;\n"
+ "RCP R0.y, R0.y;\n"
+ "MUL R0.x, R0, R0.y;\n"
"TEX R0, R0, texture[1], 1D;\n"
- "MAX R1.x, R0.w, c[4].w;\n"
+ "MAX R1.x, R0.w, c[6].w;\n"
"RCP R1.x, R1.x;\n"
- "MAD R1.xyz, -R0, R1.x, c[4].z;\n"
- "MAX R2.xyz, R1, c[4].w;\n"
- "MUL R1.xy, fragment.position, c[6];\n"
+ "MAD R1.xyz, -R0, R1.x, c[6].z;\n"
+ "MAX R2.xyz, R1, c[6].w;\n"
+ "MUL R1.xy, fragment.position, c[5];\n"
"TEX R1, R1, texture[0], 2D;\n"
- "ADD R2.w, -R0, c[4].z;\n"
+ "ADD R2.w, -R0, c[6].z;\n"
"MUL R3.xyz, R1, R2.w;\n"
- "ADD R2.w, -R1, c[4].z;\n"
+ "ADD R2.w, -R1, c[6].z;\n"
"MAD R3.xyz, R0, R2.w, R3;\n"
- "MUL R1.xyz, R1, R0.w;\n"
+ "MUL R1.xyz, R0.w, R1;\n"
"MAD R0.xyz, R0, R1.w, R1;\n"
"MUL R2.w, R0, R1;\n"
"RCP R2.x, R2.x;\n"
@@ -1980,46 +1896,45 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_COLORBURN_NOMASK =
"!!ARBfp1.0\n"
- "PARAM c[7] = { program.local[0..3],\n"
- " { 2, 4, 1, 9.9999997e-06 },\n"
- " program.local[5..6] };\n"
+ "PARAM c[7] = { program.local[0..5],\n"
+ " { 2, 4, 1, 9.9999997e-006 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
"TEMP R5;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[3];\n"
+ "MAD R0.xyz, fragment.position.x, c[2], R0;\n"
+ "ADD R0.xyz, R0, c[4];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
- "MUL R0.xy, R0, c[3];\n"
"ADD R0.z, R0, R0.w;\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.z, c[5].x, -R0;\n"
- "MUL R0.y, R0.z, c[4];\n"
- "MUL R0.x, R0, c[4];\n"
+ "MUL R0.z, -R0, c[1].x;\n"
+ "MUL R0.y, R0.z, c[6];\n"
+ "MUL R0.x, R0, c[6];\n"
"MAD R0.y, R0.x, R0.x, -R0;\n"
- "MOV R0.z, c[4].x;\n"
- "RSQ R0.y, R0.y;\n"
- "RCP R0.y, R0.y;\n"
- "MUL R0.z, c[5].x, R0;\n"
- "MUL R1.xy, fragment.position, c[6];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "ADD R0.x, -R0, R0.y;\n"
+ "RSQ R0.z, R0.y;\n"
"RCP R0.z, R0.z;\n"
- "MUL R0.x, R0, R0.z;\n"
+ "ADD R0.x, -R0, R0.z;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n"
+ "TEX R1, R0.zwzw, texture[0], 2D;\n"
+ "MOV R0.y, c[6].x;\n"
+ "MUL R0.y, R0, c[1].x;\n"
+ "RCP R0.y, R0.y;\n"
+ "MUL R0.x, R0, R0.y;\n"
"TEX R0, R0, texture[1], 1D;\n"
- "MUL R2.xyz, R1, R0.w;\n"
+ "MUL R2.xyz, R0.w, R1;\n"
"MAD R3.xyz, R0, R1.w, R2;\n"
- "ADD R2.w, -R1, c[4].z;\n"
+ "ADD R2.w, -R1, c[6].z;\n"
"MAD R2.xyz, -R0.w, R1.w, R3;\n"
"MUL R4.xyz, R0.w, R2;\n"
- "MAX R2.xyz, R0, c[4].w;\n"
+ "MAX R2.xyz, R0, c[6].w;\n"
"MUL R5.xyz, R0, R2.w;\n"
- "ADD R3.w, -R0, c[4].z;\n"
+ "ADD R3.w, -R0, c[6].z;\n"
"RCP R2.x, R2.x;\n"
"RCP R2.y, R2.y;\n"
"RCP R2.z, R2.z;\n"
@@ -2038,50 +1953,49 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_HARDLIGHT_NOMASK =
"!!ARBfp1.0\n"
- "PARAM c[7] = { program.local[0..3],\n"
- " { 2, 4, 1 },\n"
- " program.local[5..6] };\n"
+ "PARAM c[7] = { program.local[0..5],\n"
+ " { 2, 4, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[3];\n"
+ "MAD R0.xyz, fragment.position.x, c[2], R0;\n"
+ "ADD R0.xyz, R0, c[4];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
- "MUL R0.xy, R0, c[3];\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.z, R0, R0.w;\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.z, c[5].x, -R0;\n"
- "MUL R0.y, R0.z, c[4];\n"
- "MUL R0.x, R0, c[4];\n"
- "MAD R0.y, R0.x, R0.x, -R0;\n"
- "MOV R0.z, c[4].x;\n"
- "RSQ R0.y, R0.y;\n"
- "RCP R0.y, R0.y;\n"
- "MUL R0.z, c[5].x, R0;\n"
- "MUL R1.xy, fragment.position, c[6];\n"
+ "MUL R0.z, -R0, c[1].x;\n"
+ "MUL R1.xy, fragment.position, c[5];\n"
"TEX R1, R1, texture[0], 2D;\n"
- "ADD R0.x, -R0, R0.y;\n"
+ "MUL R0.y, R0.z, c[6];\n"
+ "MUL R0.x, R0, c[6];\n"
+ "MAD R0.z, R0.x, R0.x, -R0.y;\n"
+ "MOV R0.y, c[6].x;\n"
+ "RSQ R0.z, R0.z;\n"
"RCP R0.z, R0.z;\n"
- "MUL R0.x, R0, R0.z;\n"
+ "MUL R0.y, R0, c[1].x;\n"
+ "ADD R0.x, -R0, R0.z;\n"
+ "RCP R0.y, R0.y;\n"
+ "MUL R0.x, R0, R0.y;\n"
"TEX R0, R0, texture[1], 1D;\n"
- "ADD R2.w, -R1, c[4].z;\n"
+ "ADD R2.w, -R1, c[6].z;\n"
"ADD R3.xyz, R0.w, -R0;\n"
"ADD R2.xyz, R1.w, -R1;\n"
"MUL R2.xyz, R2, R3;\n"
- "MUL R2.xyz, R2, c[4].x;\n"
+ "MUL R2.xyz, R2, c[6].x;\n"
"MAD R2.xyz, R0.w, R1.w, -R2;\n"
"MUL R4.xyz, R0, R2.w;\n"
"MUL R3.xyz, R0, R1;\n"
"MAD R2.xyz, R0, R2.w, R2;\n"
- "ADD R2.w, -R0, c[4].z;\n"
- "MUL R0.xyz, R0, c[4].x;\n"
+ "ADD R2.w, -R0, c[6].z;\n"
+ "MUL R0.xyz, R0, c[6].x;\n"
"MAD R2.xyz, R1, R2.w, R2;\n"
- "MAD R3.xyz, R3, c[4].x, R4;\n"
+ "MAD R3.xyz, R3, c[6].x, R4;\n"
"MAD R1.xyz, R1, R2.w, R3;\n"
"ADD R2.w, R0, R1;\n"
"ADD R2.xyz, R2, -R1;\n"
@@ -2093,10 +2007,9 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_SOFTLIGHT_NOMASK =
"!!ARBfp1.0\n"
- "PARAM c[8] = { program.local[0..3],\n"
- " { 2, 4, 1, 9.9999997e-06 },\n"
- " program.local[5..6],\n"
- " { 8, 3 } };\n"
+ "PARAM c[8] = { program.local[0..5],\n"
+ " { 2, 4, 1, 9.9999997e-006 },\n"
+ " { 3, 8 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -2104,64 +2017,61 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
"TEMP R4;\n"
"TEMP R5;\n"
"TEMP R6;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[3];\n"
+ "MAD R0.xyz, fragment.position.x, c[2], R0;\n"
+ "ADD R0.xyz, R0, c[4];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
- "MUL R0.xy, R0, c[3];\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.z, R0, R0.w;\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.z, c[5].x, -R0;\n"
- "MUL R0.y, R0.z, c[4];\n"
- "MUL R0.zw, fragment.position.xyxy, c[6].xyxy;\n"
+ "MUL R0.z, -R0, c[1].x;\n"
+ "MUL R0.y, R0.z, c[6];\n"
+ "MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n"
"TEX R1, R0.zwzw, texture[0], 2D;\n"
- "MUL R0.x, R0, c[4];\n"
+ "MUL R0.x, R0, c[6];\n"
"MAD R0.y, R0.x, R0.x, -R0;\n"
- "MAX R0.z, R1.w, c[4].w;\n"
+ "MAX R0.z, R1.w, c[6].w;\n"
"RCP R2.w, R0.z;\n"
"MUL R2.xyz, R1, R2.w;\n"
- "MUL R6.xyz, -R2, c[7].x;\n"
- "MAD R3.xyz, -R1, R2.w, c[4].z;\n"
+ "MAD R6.xyz, -R2, c[7].y, c[7].x;\n"
+ "MAD R3.xyz, -R1, R2.w, c[6].z;\n"
+ "RSQ R2.w, R2.x;\n"
+ "RCP R2.x, R2.w;\n"
"RSQ R0.y, R0.y;\n"
"RCP R0.y, R0.y;\n"
"ADD R0.x, -R0, R0.y;\n"
- "MOV R0.y, c[4].x;\n"
- "MUL R0.y, c[5].x, R0;\n"
+ "MOV R0.y, c[6].x;\n"
+ "MUL R0.y, R0, c[1].x;\n"
"RCP R0.y, R0.y;\n"
"MUL R0.x, R0, R0.y;\n"
"TEX R0, R0, texture[1], 1D;\n"
- "MAD R4.xyz, R0, c[4].x, -R0.w;\n"
+ "MAD R4.xyz, R0, c[6].x, -R0.w;\n"
"MUL R5.xyz, R3, R4;\n"
+ "MAD R5.xyz, -R5, R6, R0.w;\n"
"MAD R3.xyz, -R3, R4, R0.w;\n"
- "ADD R6.xyz, R6, c[7].y;\n"
- "RSQ R2.x, R2.x;\n"
"RSQ R2.z, R2.z;\n"
"RSQ R2.y, R2.y;\n"
- "MAD R5.xyz, -R5, R6, R0.w;\n"
+ "MUL R5.xyz, R1, R5;\n"
"MUL R3.xyz, R1, R3;\n"
- "RCP R2.x, R2.x;\n"
"RCP R2.z, R2.z;\n"
"RCP R2.y, R2.y;\n"
- "MAD R2.xyz, R2, R1.w, -R1;\n"
- "MUL R6.xyz, R2, R4;\n"
- "MUL R2.xyz, R1, R5;\n"
- "MUL R4.xyz, R0, c[4].x;\n"
- "MAD R6.xyz, R1, R0.w, R6;\n"
- "MUL R5.xyz, R1, c[7].x;\n"
- "ADD R6.xyz, R6, -R2;\n"
- "SGE R5.xyz, R5, R1.w;\n"
- "MUL R5.xyz, R5, R6;\n"
- "ADD R2.xyz, R2, R5;\n"
+ "MAD R2.xyz, R1.w, R2, -R1;\n"
+ "MUL R2.xyz, R2, R4;\n"
+ "MAD R2.xyz, R0.w, R1, R2;\n"
+ "ADD R6.xyz, R2, -R5;\n"
+ "MUL R4.xyz, R0, c[6].x;\n"
+ "MUL R2.xyz, R1, c[7].y;\n"
+ "SGE R2.xyz, R2, R1.w;\n"
+ "MAD R2.xyz, R2, R6, R5;\n"
"ADD R2.xyz, R2, -R3;\n"
"SGE R4.xyz, R4, R0.w;\n"
- "MUL R2.xyz, R4, R2;\n"
- "ADD R2.xyz, R3, R2;\n"
- "ADD R2.w, -R1, c[4].z;\n"
+ "MAD R2.xyz, R4, R2, R3;\n"
+ "ADD R2.w, -R1, c[6].z;\n"
"MAD R0.xyz, R0, R2.w, R2;\n"
"ADD R2.x, R0.w, R1.w;\n"
- "ADD R2.y, -R0.w, c[4].z;\n"
+ "ADD R2.y, -R0.w, c[6].z;\n"
"MAD result.color.xyz, R1, R2.y, R0;\n"
"MAD result.color.w, -R0, R1, R2.x;\n"
"END\n"
@@ -2169,86 +2079,84 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_DIFFERENCE_NOMASK =
"!!ARBfp1.0\n"
- "PARAM c[7] = { program.local[0..3],\n"
- " { 2, 4 },\n"
- " program.local[5..6] };\n"
+ "PARAM c[7] = { program.local[0..5],\n"
+ " { 2, 4 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[3];\n"
+ "MAD R0.xyz, fragment.position.x, c[2], R0;\n"
+ "ADD R0.xyz, R0, c[4];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
- "MUL R0.xy, R0, c[3];\n"
"ADD R0.z, R0, R0.w;\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.z, c[5].x, -R0;\n"
- "MUL R0.y, R0.z, c[4];\n"
- "MUL R0.x, R0, c[4];\n"
+ "MUL R0.z, -R0, c[1].x;\n"
+ "MUL R0.y, R0.z, c[6];\n"
+ "MUL R0.x, R0, c[6];\n"
"MAD R0.y, R0.x, R0.x, -R0;\n"
- "MOV R0.z, c[4].x;\n"
- "RSQ R0.y, R0.y;\n"
- "RCP R0.y, R0.y;\n"
- "MUL R0.z, c[5].x, R0;\n"
- "MUL R1.xy, fragment.position, c[6];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "ADD R0.x, -R0, R0.y;\n"
+ "RSQ R0.z, R0.y;\n"
"RCP R0.z, R0.z;\n"
- "MUL R0.x, R0, R0.z;\n"
+ "ADD R0.x, -R0, R0.z;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n"
+ "MOV R0.y, c[6].x;\n"
+ "MUL R0.y, R0, c[1].x;\n"
+ "RCP R0.y, R0.y;\n"
+ "TEX R1, R0.zwzw, texture[0], 2D;\n"
+ "MUL R0.x, R0, R0.y;\n"
"TEX R0, R0, texture[1], 1D;\n"
"MUL R2.xyz, R0, R1.w;\n"
- "MUL R3.xyz, R1, R0.w;\n"
+ "MUL R3.xyz, R0.w, R1;\n"
"ADD R0.xyz, R0, R1;\n"
"MIN R2.xyz, R2, R3;\n"
"ADD R1.x, R0.w, R1.w;\n"
- "MAD result.color.xyz, -R2, c[4].x, R0;\n"
+ "MAD result.color.xyz, -R2, c[6].x, R0;\n"
"MAD result.color.w, -R0, R1, R1.x;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_EXCLUSION_NOMASK =
"!!ARBfp1.0\n"
- "PARAM c[7] = { program.local[0..3],\n"
- " { 2, 4, 1 },\n"
- " program.local[5..6] };\n"
+ "PARAM c[7] = { program.local[0..5],\n"
+ " { 2, 4, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[3];\n"
+ "MAD R0.xyz, fragment.position.x, c[2], R0;\n"
+ "ADD R0.xyz, R0, c[4];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
- "MUL R0.xy, R0, c[3];\n"
"ADD R0.z, R0, R0.w;\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.z, c[5].x, -R0;\n"
- "MUL R0.y, R0.z, c[4];\n"
- "MUL R0.x, R0, c[4];\n"
+ "MUL R0.z, -R0, c[1].x;\n"
+ "MUL R0.y, R0.z, c[6];\n"
+ "MUL R0.x, R0, c[6];\n"
"MAD R0.y, R0.x, R0.x, -R0;\n"
- "MOV R0.z, c[4].x;\n"
- "RSQ R0.y, R0.y;\n"
- "RCP R0.y, R0.y;\n"
- "MUL R0.z, c[5].x, R0;\n"
- "MUL R1.xy, fragment.position, c[6];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "ADD R0.x, -R0, R0.y;\n"
+ "RSQ R0.z, R0.y;\n"
"RCP R0.z, R0.z;\n"
- "MUL R0.x, R0, R0.z;\n"
+ "ADD R0.x, -R0, R0.z;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n"
+ "TEX R1, R0.zwzw, texture[0], 2D;\n"
+ "MOV R0.y, c[6].x;\n"
+ "MUL R0.y, R0, c[1].x;\n"
+ "RCP R0.y, R0.y;\n"
+ "MUL R0.x, R0, R0.y;\n"
"TEX R0, R0, texture[1], 1D;\n"
- "MUL R2.xyz, R1, R0.w;\n"
+ "MUL R2.xyz, R0.w, R1;\n"
"MAD R3.xyz, R0, R1.w, R2;\n"
"MUL R2.xyz, R0, R1;\n"
- "MAD R2.xyz, -R2, c[4].x, R3;\n"
- "ADD R2.w, -R1, c[4].z;\n"
+ "MAD R2.xyz, -R2, c[6].x, R3;\n"
+ "ADD R2.w, -R1, c[6].z;\n"
"MAD R0.xyz, R0, R2.w, R2;\n"
"ADD R2.x, R0.w, R1.w;\n"
- "ADD R2.y, -R0.w, c[4].z;\n"
+ "ADD R2.y, -R0.w, c[6].z;\n"
"MAD result.color.xyz, R1, R2.y, R0;\n"
"MAD result.color.w, -R0, R1, R2.x;\n"
"END\n"
@@ -2256,35 +2164,34 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODE_BLEND_MODE_MASK =
"!!ARBfp1.0\n"
- "PARAM c[9] = { program.local[0..3],\n"
- " { 2, 4 },\n"
- " program.local[5..8] };\n"
+ "PARAM c[9] = { program.local[0..7],\n"
+ " { 2, 4 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[3];\n"
+ "MAD R0.xyz, fragment.position.x, c[2], R0;\n"
+ "ADD R0.xyz, R0, c[4];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
- "MUL R0.xy, R0, c[3];\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.z, R0, R0.w;\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.z, c[5].x, -R0;\n"
- "MUL R0.y, R0.z, c[4];\n"
- "MUL R0.x, R0, c[4];\n"
+ "MUL R0.z, -R0, c[1].x;\n"
+ "MUL R0.y, R0.z, c[8];\n"
+ "MUL R0.x, R0, c[8];\n"
"MAD R0.y, R0.x, R0.x, -R0;\n"
"RSQ R0.y, R0.y;\n"
"RCP R0.y, R0.y;\n"
"ADD R1.x, -R0, R0.y;\n"
- "MOV R0.z, c[4].x;\n"
- "MUL R0.z, c[5].x, R0;\n"
+ "MOV R0.z, c[8].x;\n"
+ "MUL R0.z, R0, c[1].x;\n"
"RCP R1.y, R0.z;\n"
"ADD R0.xy, fragment.position, c[6];\n"
- "MUL R0.xy, R0, c[7];\n"
+ "MUL R0.xy, R0, c[5];\n"
"TEX R0, R0, texture[0], 2D;\n"
"MUL R1.x, R1, R1.y;\n"
- "DP4 R1.y, R0, c[8];\n"
+ "DP4 R1.y, R0, c[7];\n"
"TEX R0, R1, texture[1], 1D;\n"
"MUL result.color, R0, R1.y;\n"
"END\n"
@@ -2292,480 +2199,479 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODE_BLEND_MODE_NOMASK =
"!!ARBfp1.0\n"
- "PARAM c[6] = { program.local[0..3],\n"
- " { 2, 4 },\n"
- " program.local[5] };\n"
+ "PARAM c[6] = { program.local[0..4],\n"
+ " { 2, 4 } };\n"
"TEMP R0;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[3];\n"
+ "MAD R0.xyz, fragment.position.x, c[2], R0;\n"
+ "ADD R0.xyz, R0, c[4];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
- "MUL R0.xy, R0, c[3];\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
"ADD R0.z, R0, R0.w;\n"
- "MUL R0.z, c[5].x, -R0;\n"
- "MUL R0.y, R0.z, c[4];\n"
- "MUL R0.x, R0, c[4];\n"
- "MAD R0.y, R0.x, R0.x, -R0;\n"
- "MOV R0.z, c[4].x;\n"
- "RSQ R0.y, R0.y;\n"
- "MUL R0.z, c[5].x, R0;\n"
- "RCP R0.y, R0.y;\n"
+ "MUL R0.z, -R0, c[1].x;\n"
+ "MUL R0.y, R0.z, c[5];\n"
+ "MUL R0.x, R0, c[5];\n"
+ "MAD R0.z, R0.x, R0.x, -R0.y;\n"
+ "MOV R0.y, c[5].x;\n"
+ "RSQ R0.z, R0.z;\n"
+ "MUL R0.y, R0, c[1].x;\n"
"RCP R0.z, R0.z;\n"
- "ADD R0.x, -R0, R0.y;\n"
- "MUL R0.x, R0, R0.z;\n"
+ "RCP R0.y, R0.y;\n"
+ "ADD R0.x, -R0, R0.z;\n"
+ "MUL R0.x, R0, R0.y;\n"
"TEX result.color, R0, texture[0], 1D;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_SIMPLE_PORTER_DUFF =
"!!ARBfp1.0\n"
- "PARAM c[13] = { program.local[0..5],\n"
- " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n"
- " { 2.3561945, 0.78539819, -1, 1 },\n"
- " program.local[8],\n"
- " { 0.15915494 },\n"
- " program.local[10..12] };\n"
+ "PARAM c[13] = { program.local[0..9],\n"
+ " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
+ " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
+ " { 0.33299461, 0.99999565, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "ABS R0.w, R0.x;\n"
- "ABS R0.z, R0.y;\n"
- "ADD R0.z, R0, -R0.w;\n"
- "ADD R0.w, R0.y, c[6].x;\n"
- "ABS R0.z, R0;\n"
- "CMP R0.y, -R0.z, R0, R0.w;\n"
- "ABS R0.z, -R0.y;\n"
- "ADD R0.z, R0, c[6].y;\n"
- "ADD R0.w, R0.x, R0.z;\n"
- "ADD R1.x, R0.z, -R0;\n"
- "RCP R1.y, R0.w;\n"
- "RCP R1.x, R1.x;\n"
- "MUL R0.w, R0, R1.x;\n"
- "ADD R0.z, R0.x, -R0;\n"
- "MUL R0.z, R0, R1.y;\n"
- "CMP R0.z, R0.x, R0.w, R0;\n"
- "MUL R0.w, R0.z, R0.z;\n"
- "MOV R1.x, c[7].y;\n"
- "CMP R0.x, R0, c[7], R1;\n"
- "MAD R0.w, R0, c[6].z, -c[6];\n"
- "MAD R0.x, R0.w, R0.z, R0;\n"
- "CMP R0.y, -R0, c[7].z, c[7].w;\n"
- "MAD R0.x, R0, R0.y, c[8];\n"
- "MUL R0.x, R0, c[9];\n"
- "FLR R0.y, R0.x;\n"
- "MUL R0.zw, fragment.position.xyxy, c[10].xyxy;\n"
- "TEX R1, R0.zwzw, texture[0], 2D;\n"
- "ADD R0.x, R0, -R0.y;\n"
- "TEX R0, R0, texture[2], 1D;\n"
- "MUL R2.xyz, R1, c[12].y;\n"
- "MUL R3.xyz, R2, R0.w;\n"
- "MUL R2.xyz, R0, c[12].x;\n"
- "MAD R2.xyz, R2, R1.w, R3;\n"
- "ADD R3.xy, fragment.position, c[0];\n"
- "ADD R2.w, -R1, c[7];\n"
- "MUL R0.xyz, R0, c[11].y;\n"
- "MAD R2.xyz, R0, R2.w, R2;\n"
- "MUL R0.xyz, R1, c[11].z;\n"
- "ADD R3.z, -R0.w, c[7].w;\n"
- "MAD R2.xyz, R0, R3.z, R2;\n"
- "MUL R0.y, R0.w, R2.w;\n"
- "MUL R0.x, R0.w, R1.w;\n"
- "MUL R0.z, R1.w, R3;\n"
- "DP3 R2.w, R0, c[11];\n"
- "MUL R3.xy, R3, c[1];\n"
- "TEX R0, R3, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "ABS R0.z, R0.x;\n"
+ "ABS R0.w, R0.y;\n"
+ "ADD R0.w, R0, -R0.z;\n"
+ "ADD R1.x, R0.y, c[10].y;\n"
+ "ABS R0.w, R0;\n"
+ "CMP R0.y, -R0.w, R0, R1.x;\n"
+ "ABS R0.w, -R0.y;\n"
+ "MAX R1.x, R0.z, R0.w;\n"
+ "RCP R1.y, R1.x;\n"
+ "MIN R1.x, R0.z, R0.w;\n"
+ "MUL R1.x, R1, R1.y;\n"
+ "MUL R1.y, R1.x, R1.x;\n"
+ "MAD R1.z, R1.y, c[11].x, c[11].y;\n"
+ "MAD R1.z, R1, R1.y, -c[11];\n"
+ "MAD R1.z, R1, R1.y, c[11].w;\n"
+ "MAD R1.z, R1, R1.y, -c[12].x;\n"
+ "MAD R1.y, R1.z, R1, c[12];\n"
+ "MUL R1.x, R1.y, R1;\n"
+ "ADD R1.y, -R1.x, c[10].w;\n"
+ "ADD R0.z, -R0, R0.w;\n"
+ "CMP R0.z, -R0, R1.y, R1.x;\n"
+ "ADD R0.w, -R0.z, c[10].z;\n"
+ "CMP R0.x, R0, R0.w, R0.z;\n"
+ "CMP R0.x, -R0.y, -R0, R0;\n"
+ "ADD R0.x, R0, c[0];\n"
+ "MUL R1.x, R0, c[10];\n"
+ "FLR R1.y, R1.x;\n"
+ "MUL R0.xy, fragment.position, c[7];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "ADD R1.x, R1, -R1.y;\n"
+ "TEX R1, R1, texture[2], 1D;\n"
+ "MUL R2.xyz, R0, c[4].y;\n"
+ "MUL R3.xyz, R1.w, R2;\n"
+ "MUL R2.xyz, R1, c[4].x;\n"
+ "MAD R2.xyz, R0.w, R2, R3;\n"
+ "ADD R3.xy, fragment.position, c[8];\n"
+ "ADD R2.w, -R0, c[12].z;\n"
+ "MUL R1.xyz, R1, c[5].y;\n"
+ "MAD R2.xyz, R2.w, R1, R2;\n"
+ "MUL R1.xyz, R0, c[5].z;\n"
+ "ADD R3.z, -R1.w, c[12];\n"
+ "MAD R2.xyz, R3.z, R1, R2;\n"
+ "MUL R1.y, R1.w, R2.w;\n"
+ "MUL R1.x, R1.w, R0.w;\n"
+ "MUL R1.z, R0.w, R3;\n"
+ "DP3 R2.w, R1, c[5];\n"
+ "MUL R3.xy, R3, c[6];\n"
+ "TEX R1, R3, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[9];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_MULTIPLY =
"!!ARBfp1.0\n"
- "PARAM c[11] = { program.local[0..5],\n"
- " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n"
- " { 2.3561945, 0.78539819, -1, 1 },\n"
- " program.local[8],\n"
- " { 0.15915494 },\n"
- " program.local[10] };\n"
+ "PARAM c[11] = { program.local[0..7],\n"
+ " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
+ " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
+ " { 0.33299461, 0.99999565, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "ABS R0.w, R0.x;\n"
- "ABS R0.z, R0.y;\n"
- "ADD R0.z, R0, -R0.w;\n"
- "ADD R0.w, R0.y, c[6].x;\n"
- "ABS R0.z, R0;\n"
- "CMP R0.y, -R0.z, R0, R0.w;\n"
- "ABS R0.z, -R0.y;\n"
- "ADD R0.z, R0, c[6].y;\n"
- "ADD R0.w, R0.x, R0.z;\n"
- "ADD R1.x, R0.z, -R0;\n"
- "RCP R1.y, R0.w;\n"
- "RCP R1.x, R1.x;\n"
- "MUL R0.w, R0, R1.x;\n"
- "ADD R0.z, R0.x, -R0;\n"
- "MUL R0.z, R0, R1.y;\n"
- "CMP R0.z, R0.x, R0.w, R0;\n"
- "MUL R0.w, R0.z, R0.z;\n"
- "MOV R1.x, c[7].y;\n"
- "CMP R0.x, R0, c[7], R1;\n"
- "MAD R0.w, R0, c[6].z, -c[6];\n"
- "MAD R0.x, R0.w, R0.z, R0;\n"
- "CMP R0.y, -R0, c[7].z, c[7].w;\n"
- "MAD R0.x, R0, R0.y, c[8];\n"
- "MUL R0.x, R0, c[9];\n"
- "FLR R0.y, R0.x;\n"
- "MUL R0.zw, fragment.position.xyxy, c[10].xyxy;\n"
- "TEX R1, R0.zwzw, texture[0], 2D;\n"
- "ADD R0.x, R0, -R0.y;\n"
- "TEX R0, R0, texture[2], 1D;\n"
- "ADD R2.x, -R1.w, c[7].w;\n"
- "MUL R2.xyz, R0, R2.x;\n"
- "MAD R0.xyz, R0, R1, R2;\n"
- "ADD R2.x, -R0.w, c[7].w;\n"
- "MAD R2.xyz, R1, R2.x, R0;\n"
- "ADD R0.z, R0.w, R1.w;\n"
- "MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "ABS R0.z, R0.x;\n"
+ "ABS R0.w, R0.y;\n"
+ "ADD R0.w, R0, -R0.z;\n"
+ "ADD R1.x, R0.y, c[8].y;\n"
+ "ABS R0.w, R0;\n"
+ "CMP R0.y, -R0.w, R0, R1.x;\n"
+ "ABS R0.w, -R0.y;\n"
+ "MAX R1.x, R0.z, R0.w;\n"
+ "RCP R1.y, R1.x;\n"
+ "MIN R1.x, R0.z, R0.w;\n"
+ "MUL R1.x, R1, R1.y;\n"
+ "MUL R1.y, R1.x, R1.x;\n"
+ "MAD R1.z, R1.y, c[9].x, c[9].y;\n"
+ "MAD R1.z, R1, R1.y, -c[9];\n"
+ "MAD R1.z, R1, R1.y, c[9].w;\n"
+ "MAD R1.z, R1, R1.y, -c[10].x;\n"
+ "MAD R1.y, R1.z, R1, c[10];\n"
+ "MUL R1.x, R1.y, R1;\n"
+ "ADD R1.y, -R1.x, c[8].w;\n"
+ "ADD R0.z, -R0, R0.w;\n"
+ "CMP R0.z, -R0, R1.y, R1.x;\n"
+ "ADD R0.w, -R0.z, c[8].z;\n"
+ "CMP R0.x, R0, R0.w, R0.z;\n"
+ "CMP R0.x, -R0.y, -R0, R0;\n"
+ "ADD R0.x, R0, c[0];\n"
+ "MUL R1.x, R0, c[8];\n"
+ "FLR R1.y, R1.x;\n"
+ "MUL R0.xy, fragment.position, c[5];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "ADD R1.x, R1, -R1.y;\n"
+ "TEX R1, R1, texture[2], 1D;\n"
+ "ADD R2.x, -R0.w, c[10].z;\n"
+ "MUL R2.xyz, R1, R2.x;\n"
+ "MAD R1.xyz, R1, R0, R2;\n"
+ "ADD R2.x, -R1.w, c[10].z;\n"
+ "MAD R2.xyz, R0, R2.x, R1;\n"
+ "ADD R1.z, R1.w, R0.w;\n"
+ "MAD R2.w, -R1, R0, R1.z;\n"
+ "ADD R1.xy, fragment.position, c[6];\n"
+ "MUL R1.xy, R1, c[4];\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[7];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_SCREEN =
"!!ARBfp1.0\n"
- "PARAM c[11] = { program.local[0..5],\n"
- " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n"
- " { 2.3561945, 0.78539819, -1, 1 },\n"
- " program.local[8],\n"
- " { 0.15915494 },\n"
- " program.local[10] };\n"
+ "PARAM c[11] = { program.local[0..7],\n"
+ " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
+ " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
+ " { 0.33299461, 0.99999565 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "ADD R3.xy, fragment.position, c[0];\n"
- "ABS R0.w, R0.x;\n"
- "ABS R0.z, R0.y;\n"
- "ADD R0.z, R0, -R0.w;\n"
- "ADD R0.w, R0.y, c[6].x;\n"
- "ABS R0.z, R0;\n"
- "CMP R0.y, -R0.z, R0, R0.w;\n"
- "ABS R0.z, -R0.y;\n"
- "ADD R0.z, R0, c[6].y;\n"
- "ADD R0.w, R0.x, R0.z;\n"
- "ADD R1.x, R0.z, -R0;\n"
- "RCP R1.y, R0.w;\n"
- "RCP R1.x, R1.x;\n"
- "MUL R0.w, R0, R1.x;\n"
- "ADD R0.z, R0.x, -R0;\n"
- "MUL R0.z, R0, R1.y;\n"
- "CMP R0.z, R0.x, R0.w, R0;\n"
- "MUL R0.w, R0.z, R0.z;\n"
- "MOV R1.x, c[7].y;\n"
- "CMP R0.x, R0, c[7], R1;\n"
- "MAD R0.w, R0, c[6].z, -c[6];\n"
- "MUL R1.xy, fragment.position, c[10];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "CMP R0.y, -R0, c[7].z, c[7].w;\n"
- "MAD R0.x, R0.w, R0.z, R0;\n"
- "MAD R0.x, R0, R0.y, c[8];\n"
- "MUL R0.x, R0, c[9];\n"
+ "ADD R3.xy, fragment.position, c[6];\n"
+ "ABS R0.z, R0.x;\n"
+ "ABS R0.w, R0.y;\n"
+ "ADD R0.w, R0, -R0.z;\n"
+ "ADD R1.x, R0.y, c[8].y;\n"
+ "ABS R0.w, R0;\n"
+ "CMP R0.y, -R0.w, R0, R1.x;\n"
+ "ABS R0.w, -R0.y;\n"
+ "MAX R1.x, R0.z, R0.w;\n"
+ "RCP R1.y, R1.x;\n"
+ "MIN R1.x, R0.z, R0.w;\n"
+ "MUL R1.x, R1, R1.y;\n"
+ "MUL R1.y, R1.x, R1.x;\n"
+ "MAD R1.z, R1.y, c[9].x, c[9].y;\n"
+ "MAD R1.z, R1, R1.y, -c[9];\n"
+ "MAD R1.z, R1, R1.y, c[9].w;\n"
+ "MAD R1.z, R1, R1.y, -c[10].x;\n"
+ "MAD R1.y, R1.z, R1, c[10];\n"
+ "MUL R1.x, R1.y, R1;\n"
+ "ADD R0.z, -R0, R0.w;\n"
+ "ADD R1.y, -R1.x, c[8].w;\n"
+ "CMP R0.z, -R0, R1.y, R1.x;\n"
+ "ADD R0.w, -R0.z, c[8].z;\n"
+ "CMP R0.x, R0, R0.w, R0.z;\n"
+ "CMP R0.x, -R0.y, -R0, R0;\n"
+ "ADD R0.x, R0, c[0];\n"
+ "MUL R0.x, R0, c[8];\n"
"FLR R0.y, R0.x;\n"
- "ADD R0.x, R0, -R0.y;\n"
- "TEX R0, R0, texture[2], 1D;\n"
- "ADD R2, R0, R1;\n"
- "MAD R2, -R0, R1, R2;\n"
- "MUL R3.xy, R3, c[1];\n"
- "TEX R0, R3, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "ADD R0.z, R0.x, -R0.y;\n"
+ "TEX R1, R0.z, texture[2], 1D;\n"
+ "MUL R0.xy, fragment.position, c[5];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "ADD R2, R1, R0;\n"
+ "MAD R2, -R1, R0, R2;\n"
+ "MUL R3.xy, R3, c[4];\n"
+ "TEX R1, R3, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[7];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_OVERLAY =
"!!ARBfp1.0\n"
- "PARAM c[11] = { program.local[0..5],\n"
- " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n"
- " { 2.3561945, 0.78539819, -1, 1 },\n"
- " program.local[8],\n"
- " { 0.15915494, 2 },\n"
- " program.local[10] };\n"
+ "PARAM c[11] = { program.local[0..7],\n"
+ " { 0.0020000001, -0.01348047, 0.057477314, 0.12123907 },\n"
+ " { 0.19563593, 0.33299461, 0.99999565, 1.5707964 },\n"
+ " { 3.1415927, 0.15915494, 2, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "ABS R0.w, R0.x;\n"
- "ABS R0.z, R0.y;\n"
- "ADD R0.z, R0, -R0.w;\n"
- "ADD R0.w, R0.y, c[6].x;\n"
- "ABS R0.z, R0;\n"
- "CMP R0.y, -R0.z, R0, R0.w;\n"
- "ABS R0.z, -R0.y;\n"
- "ADD R0.z, R0, c[6].y;\n"
- "ADD R0.w, R0.x, R0.z;\n"
- "ADD R1.x, R0.z, -R0;\n"
- "RCP R1.y, R0.w;\n"
- "RCP R1.x, R1.x;\n"
- "MUL R0.w, R0, R1.x;\n"
- "ADD R0.z, R0.x, -R0;\n"
- "MUL R0.z, R0, R1.y;\n"
- "CMP R0.z, R0.x, R0.w, R0;\n"
- "MUL R0.w, R0.z, R0.z;\n"
- "MOV R1.x, c[7].y;\n"
- "CMP R0.x, R0, c[7], R1;\n"
- "MAD R0.w, R0, c[6].z, -c[6];\n"
- "MUL R1.xy, fragment.position, c[10];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "ADD R2.w, -R1, c[7];\n"
- "CMP R0.y, -R0, c[7].z, c[7].w;\n"
- "MAD R0.x, R0.w, R0.z, R0;\n"
- "MAD R0.x, R0, R0.y, c[8];\n"
- "MUL R0.x, R0, c[9];\n"
+ "ABS R0.z, R0.x;\n"
+ "ABS R0.w, R0.y;\n"
+ "ADD R0.w, R0, -R0.z;\n"
+ "ADD R1.x, R0.y, c[8];\n"
+ "ABS R0.w, R0;\n"
+ "CMP R0.y, -R0.w, R0, R1.x;\n"
+ "ABS R0.w, -R0.y;\n"
+ "MAX R1.x, R0.z, R0.w;\n"
+ "RCP R1.y, R1.x;\n"
+ "MIN R1.x, R0.z, R0.w;\n"
+ "MUL R1.x, R1, R1.y;\n"
+ "MUL R1.y, R1.x, R1.x;\n"
+ "MAD R1.z, R1.y, c[8].y, c[8];\n"
+ "MAD R1.z, R1, R1.y, -c[8].w;\n"
+ "MAD R1.z, R1, R1.y, c[9].x;\n"
+ "MAD R1.z, R1, R1.y, -c[9].y;\n"
+ "MAD R1.y, R1.z, R1, c[9].z;\n"
+ "MUL R1.x, R1.y, R1;\n"
+ "ADD R0.z, -R0, R0.w;\n"
+ "ADD R1.y, -R1.x, c[9].w;\n"
+ "CMP R0.z, -R0, R1.y, R1.x;\n"
+ "ADD R0.w, -R0.z, c[10].x;\n"
+ "CMP R0.x, R0, R0.w, R0.z;\n"
+ "CMP R0.x, -R0.y, -R0, R0;\n"
+ "ADD R0.x, R0, c[0];\n"
+ "MUL R0.x, R0, c[10].y;\n"
"FLR R0.y, R0.x;\n"
"ADD R0.x, R0, -R0.y;\n"
"TEX R0, R0, texture[2], 1D;\n"
+ "MUL R1.xy, fragment.position, c[5];\n"
+ "TEX R1, R1, texture[0], 2D;\n"
+ "ADD R2.w, -R1, c[10];\n"
"ADD R3.xyz, R0.w, -R0;\n"
"ADD R2.xyz, R1.w, -R1;\n"
"MUL R2.xyz, R2, R3;\n"
- "MUL R2.xyz, R2, c[9].y;\n"
+ "MUL R2.xyz, R2, c[10].z;\n"
"MAD R2.xyz, R0.w, R1.w, -R2;\n"
"MUL R4.xyz, R0, R2.w;\n"
"MUL R3.xyz, R0, R1;\n"
"MAD R0.xyz, R0, R2.w, R2;\n"
- "ADD R2.x, -R0.w, c[7].w;\n"
- "MAD R3.xyz, R3, c[9].y, R4;\n"
+ "ADD R2.x, -R0.w, c[10].w;\n"
+ "MAD R3.xyz, R3, c[10].z, R4;\n"
"MAD R3.xyz, R1, R2.x, R3;\n"
"MAD R0.xyz, R1, R2.x, R0;\n"
- "MUL R2.xyz, R1, c[9].y;\n"
+ "MUL R2.xyz, R1, c[10].z;\n"
"ADD R0.xyz, R0, -R3;\n"
"SGE R2.xyz, R2, R1.w;\n"
"MAD R2.xyz, R2, R0, R3;\n"
"ADD R0.z, R0.w, R1.w;\n"
"MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
+ "ADD R0.xy, fragment.position, c[6];\n"
+ "MUL R0.xy, R0, c[4];\n"
"TEX R0, R0, texture[1], 2D;\n"
"ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
+ "DP4 R0.x, R0, c[7];\n"
"MAD result.color, R0.x, R2, R1;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_DARKEN =
"!!ARBfp1.0\n"
- "PARAM c[11] = { program.local[0..5],\n"
- " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n"
- " { 2.3561945, 0.78539819, -1, 1 },\n"
- " program.local[8],\n"
- " { 0.15915494 },\n"
- " program.local[10] };\n"
+ "PARAM c[11] = { program.local[0..7],\n"
+ " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
+ " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
+ " { 0.33299461, 0.99999565, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "ABS R0.w, R0.x;\n"
- "ABS R0.z, R0.y;\n"
- "ADD R0.z, R0, -R0.w;\n"
- "ADD R0.w, R0.y, c[6].x;\n"
- "ABS R0.z, R0;\n"
- "CMP R0.y, -R0.z, R0, R0.w;\n"
- "ABS R0.z, -R0.y;\n"
- "ADD R0.z, R0, c[6].y;\n"
- "ADD R0.w, R0.x, R0.z;\n"
- "ADD R1.x, R0.z, -R0;\n"
- "RCP R1.y, R0.w;\n"
- "RCP R1.x, R1.x;\n"
- "MUL R0.w, R0, R1.x;\n"
- "ADD R0.z, R0.x, -R0;\n"
- "MUL R0.z, R0, R1.y;\n"
- "CMP R0.z, R0.x, R0.w, R0;\n"
- "MUL R0.w, R0.z, R0.z;\n"
- "MOV R1.x, c[7].y;\n"
- "CMP R0.x, R0, c[7], R1;\n"
- "MAD R0.w, R0, c[6].z, -c[6];\n"
- "MUL R1.xy, fragment.position, c[10];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "CMP R0.y, -R0, c[7].z, c[7].w;\n"
- "MAD R0.x, R0.w, R0.z, R0;\n"
- "MAD R0.x, R0, R0.y, c[8];\n"
- "MUL R0.x, R0, c[9];\n"
- "FLR R0.y, R0.x;\n"
- "ADD R0.x, R0, -R0.y;\n"
- "TEX R0, R0, texture[2], 1D;\n"
- "MUL R3.xyz, R1, R0.w;\n"
- "MUL R2.xyz, R0, R1.w;\n"
+ "ABS R0.z, R0.x;\n"
+ "ABS R0.w, R0.y;\n"
+ "ADD R0.w, R0, -R0.z;\n"
+ "ADD R1.x, R0.y, c[8].y;\n"
+ "ABS R0.w, R0;\n"
+ "CMP R0.y, -R0.w, R0, R1.x;\n"
+ "ABS R0.w, -R0.y;\n"
+ "MAX R1.x, R0.z, R0.w;\n"
+ "RCP R1.y, R1.x;\n"
+ "MIN R1.x, R0.z, R0.w;\n"
+ "MUL R1.x, R1, R1.y;\n"
+ "MUL R1.y, R1.x, R1.x;\n"
+ "MAD R1.z, R1.y, c[9].x, c[9].y;\n"
+ "MAD R1.z, R1, R1.y, -c[9];\n"
+ "MAD R1.z, R1, R1.y, c[9].w;\n"
+ "MAD R1.z, R1, R1.y, -c[10].x;\n"
+ "MAD R1.y, R1.z, R1, c[10];\n"
+ "MUL R1.x, R1.y, R1;\n"
+ "ADD R1.y, -R1.x, c[8].w;\n"
+ "ADD R0.z, -R0, R0.w;\n"
+ "CMP R0.z, -R0, R1.y, R1.x;\n"
+ "ADD R0.w, -R0.z, c[8].z;\n"
+ "CMP R0.x, R0, R0.w, R0.z;\n"
+ "CMP R0.x, -R0.y, -R0, R0;\n"
+ "ADD R0.x, R0, c[0];\n"
+ "MUL R0.z, R0.x, c[8].x;\n"
+ "FLR R0.w, R0.z;\n"
+ "ADD R1.x, R0.z, -R0.w;\n"
+ "MUL R0.xy, fragment.position, c[5];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "TEX R1, R1, texture[2], 1D;\n"
+ "MUL R3.xyz, R1.w, R0;\n"
+ "MUL R2.xyz, R1, R0.w;\n"
"MIN R2.xyz, R2, R3;\n"
- "ADD R2.w, -R1, c[7];\n"
- "MAD R0.xyz, R0, R2.w, R2;\n"
- "ADD R2.x, -R0.w, c[7].w;\n"
- "MAD R2.xyz, R1, R2.x, R0;\n"
- "ADD R0.z, R0.w, R1.w;\n"
- "MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "ADD R2.w, -R0, c[10].z;\n"
+ "MAD R1.xyz, R1, R2.w, R2;\n"
+ "ADD R2.x, -R1.w, c[10].z;\n"
+ "MAD R2.xyz, R0, R2.x, R1;\n"
+ "ADD R1.z, R1.w, R0.w;\n"
+ "MAD R2.w, -R1, R0, R1.z;\n"
+ "ADD R1.xy, fragment.position, c[6];\n"
+ "MUL R1.xy, R1, c[4];\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[7];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_LIGHTEN =
"!!ARBfp1.0\n"
- "PARAM c[11] = { program.local[0..5],\n"
- " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n"
- " { 2.3561945, 0.78539819, -1, 1 },\n"
- " program.local[8],\n"
- " { 0.15915494 },\n"
- " program.local[10] };\n"
+ "PARAM c[11] = { program.local[0..7],\n"
+ " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
+ " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
+ " { 0.33299461, 0.99999565, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "ABS R0.w, R0.x;\n"
- "ABS R0.z, R0.y;\n"
- "ADD R0.z, R0, -R0.w;\n"
- "ADD R0.w, R0.y, c[6].x;\n"
- "ABS R0.z, R0;\n"
- "CMP R0.y, -R0.z, R0, R0.w;\n"
- "ABS R0.z, -R0.y;\n"
- "ADD R0.z, R0, c[6].y;\n"
- "ADD R0.w, R0.x, R0.z;\n"
- "ADD R1.x, R0.z, -R0;\n"
- "RCP R1.y, R0.w;\n"
- "RCP R1.x, R1.x;\n"
- "MUL R0.w, R0, R1.x;\n"
- "ADD R0.z, R0.x, -R0;\n"
- "MUL R0.z, R0, R1.y;\n"
- "CMP R0.z, R0.x, R0.w, R0;\n"
- "MUL R0.w, R0.z, R0.z;\n"
- "MOV R1.x, c[7].y;\n"
- "CMP R0.x, R0, c[7], R1;\n"
- "MAD R0.w, R0, c[6].z, -c[6];\n"
- "MUL R1.xy, fragment.position, c[10];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "CMP R0.y, -R0, c[7].z, c[7].w;\n"
- "MAD R0.x, R0.w, R0.z, R0;\n"
- "MAD R0.x, R0, R0.y, c[8];\n"
- "MUL R0.x, R0, c[9];\n"
- "FLR R0.y, R0.x;\n"
- "ADD R0.x, R0, -R0.y;\n"
- "TEX R0, R0, texture[2], 1D;\n"
- "MUL R3.xyz, R1, R0.w;\n"
- "MUL R2.xyz, R0, R1.w;\n"
+ "ABS R0.z, R0.x;\n"
+ "ABS R0.w, R0.y;\n"
+ "ADD R0.w, R0, -R0.z;\n"
+ "ADD R1.x, R0.y, c[8].y;\n"
+ "ABS R0.w, R0;\n"
+ "CMP R0.y, -R0.w, R0, R1.x;\n"
+ "ABS R0.w, -R0.y;\n"
+ "MAX R1.x, R0.z, R0.w;\n"
+ "RCP R1.y, R1.x;\n"
+ "MIN R1.x, R0.z, R0.w;\n"
+ "MUL R1.x, R1, R1.y;\n"
+ "MUL R1.y, R1.x, R1.x;\n"
+ "MAD R1.z, R1.y, c[9].x, c[9].y;\n"
+ "MAD R1.z, R1, R1.y, -c[9];\n"
+ "MAD R1.z, R1, R1.y, c[9].w;\n"
+ "MAD R1.z, R1, R1.y, -c[10].x;\n"
+ "MAD R1.y, R1.z, R1, c[10];\n"
+ "MUL R1.x, R1.y, R1;\n"
+ "ADD R1.y, -R1.x, c[8].w;\n"
+ "ADD R0.z, -R0, R0.w;\n"
+ "CMP R0.z, -R0, R1.y, R1.x;\n"
+ "ADD R0.w, -R0.z, c[8].z;\n"
+ "CMP R0.x, R0, R0.w, R0.z;\n"
+ "CMP R0.x, -R0.y, -R0, R0;\n"
+ "ADD R0.x, R0, c[0];\n"
+ "MUL R0.z, R0.x, c[8].x;\n"
+ "FLR R0.w, R0.z;\n"
+ "ADD R1.x, R0.z, -R0.w;\n"
+ "MUL R0.xy, fragment.position, c[5];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "TEX R1, R1, texture[2], 1D;\n"
+ "MUL R3.xyz, R1.w, R0;\n"
+ "MUL R2.xyz, R1, R0.w;\n"
"MAX R2.xyz, R2, R3;\n"
- "ADD R2.w, -R1, c[7];\n"
- "MAD R0.xyz, R0, R2.w, R2;\n"
- "ADD R2.x, -R0.w, c[7].w;\n"
- "MAD R2.xyz, R1, R2.x, R0;\n"
- "ADD R0.z, R0.w, R1.w;\n"
- "MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "ADD R2.w, -R0, c[10].z;\n"
+ "MAD R1.xyz, R1, R2.w, R2;\n"
+ "ADD R2.x, -R1.w, c[10].z;\n"
+ "MAD R2.xyz, R0, R2.x, R1;\n"
+ "ADD R1.z, R1.w, R0.w;\n"
+ "MAD R2.w, -R1, R0, R1.z;\n"
+ "ADD R1.xy, fragment.position, c[6];\n"
+ "MUL R1.xy, R1, c[4];\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[7];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_COLORDODGE =
"!!ARBfp1.0\n"
- "PARAM c[11] = { program.local[0..5],\n"
- " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n"
- " { 2.3561945, 0.78539819, -1, 1 },\n"
- " program.local[8],\n"
- " { 0.15915494, 1e-06 },\n"
- " program.local[10] };\n"
+ "PARAM c[11] = { program.local[0..7],\n"
+ " { 0.0020000001, -0.01348047, 0.057477314, 0.12123907 },\n"
+ " { 0.19563593, 0.33299461, 0.99999565, 1.5707964 },\n"
+ " { 3.1415927, 0.15915494, 1, 1e-006 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "ABS R0.w, R0.x;\n"
- "ABS R0.z, R0.y;\n"
- "ADD R0.z, R0, -R0.w;\n"
- "ADD R0.w, R0.y, c[6].x;\n"
- "ABS R0.z, R0;\n"
- "CMP R0.y, -R0.z, R0, R0.w;\n"
- "ABS R0.z, -R0.y;\n"
- "ADD R0.z, R0, c[6].y;\n"
- "ADD R0.w, R0.x, R0.z;\n"
- "ADD R1.x, R0.z, -R0;\n"
- "RCP R1.y, R0.w;\n"
- "RCP R1.x, R1.x;\n"
- "MUL R0.w, R0, R1.x;\n"
- "ADD R0.z, R0.x, -R0;\n"
- "MUL R0.z, R0, R1.y;\n"
- "CMP R0.z, R0.x, R0.w, R0;\n"
- "MUL R0.w, R0.z, R0.z;\n"
- "MOV R1.x, c[7].y;\n"
- "CMP R0.x, R0, c[7], R1;\n"
- "MAD R0.w, R0, c[6].z, -c[6];\n"
- "CMP R0.y, -R0, c[7].z, c[7].w;\n"
- "MAD R0.x, R0.w, R0.z, R0;\n"
- "MAD R0.x, R0, R0.y, c[8];\n"
- "MUL R0.x, R0, c[9];\n"
+ "ABS R0.z, R0.x;\n"
+ "ABS R0.w, R0.y;\n"
+ "ADD R0.w, R0, -R0.z;\n"
+ "ADD R1.x, R0.y, c[8];\n"
+ "ABS R0.w, R0;\n"
+ "CMP R0.y, -R0.w, R0, R1.x;\n"
+ "ABS R0.w, -R0.y;\n"
+ "MAX R1.x, R0.z, R0.w;\n"
+ "RCP R1.y, R1.x;\n"
+ "MIN R1.x, R0.z, R0.w;\n"
+ "MUL R1.x, R1, R1.y;\n"
+ "MUL R1.y, R1.x, R1.x;\n"
+ "MAD R1.z, R1.y, c[8].y, c[8];\n"
+ "MAD R1.z, R1, R1.y, -c[8].w;\n"
+ "MAD R1.z, R1, R1.y, c[9].x;\n"
+ "MAD R1.z, R1, R1.y, -c[9].y;\n"
+ "MAD R1.y, R1.z, R1, c[9].z;\n"
+ "MUL R1.x, R1.y, R1;\n"
+ "ADD R1.y, -R1.x, c[9].w;\n"
+ "ADD R0.z, -R0, R0.w;\n"
+ "CMP R0.z, -R0, R1.y, R1.x;\n"
+ "ADD R0.w, -R0.z, c[10].x;\n"
+ "CMP R0.x, R0, R0.w, R0.z;\n"
+ "CMP R0.x, -R0.y, -R0, R0;\n"
+ "ADD R0.x, R0, c[0];\n"
+ "MUL R0.x, R0, c[10].y;\n"
"FLR R0.y, R0.x;\n"
"ADD R0.x, R0, -R0.y;\n"
"TEX R0, R0, texture[2], 1D;\n"
- "MAX R1.x, R0.w, c[9].y;\n"
+ "MAX R1.x, R0.w, c[10].w;\n"
"RCP R1.x, R1.x;\n"
- "MAD R1.xyz, -R0, R1.x, c[7].w;\n"
- "MAX R2.xyz, R1, c[9].y;\n"
- "MUL R1.xy, fragment.position, c[10];\n"
+ "MAD R1.xyz, -R0, R1.x, c[10].z;\n"
+ "MAX R2.xyz, R1, c[10].w;\n"
+ "MUL R1.xy, fragment.position, c[5];\n"
"TEX R1, R1, texture[0], 2D;\n"
- "ADD R2.w, -R0, c[7];\n"
+ "ADD R2.w, -R0, c[10].z;\n"
"MUL R3.xyz, R1, R2.w;\n"
- "ADD R2.w, -R1, c[7];\n"
+ "ADD R2.w, -R1, c[10].z;\n"
"MAD R4.xyz, R0, R2.w, R3;\n"
- "MUL R3.xyz, R1, R0.w;\n"
+ "MUL R3.xyz, R0.w, R1;\n"
"MUL R2.w, R0, R1;\n"
"MAD R0.xyz, R0, R1.w, R3;\n"
"SGE R0.xyz, R0, R2.w;\n"
@@ -2778,70 +2684,70 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
"MAD R2.xyz, R0, R4, R2;\n"
"ADD R0.z, R0.w, R1.w;\n"
"MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
+ "ADD R0.xy, fragment.position, c[6];\n"
+ "MUL R0.xy, R0, c[4];\n"
"TEX R0, R0, texture[1], 2D;\n"
"ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
+ "DP4 R0.x, R0, c[7];\n"
"MAD result.color, R0.x, R2, R1;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_COLORBURN =
"!!ARBfp1.0\n"
- "PARAM c[11] = { program.local[0..5],\n"
- " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n"
- " { 2.3561945, 0.78539819, -1, 1 },\n"
- " program.local[8],\n"
- " { 0.15915494, 9.9999997e-06 },\n"
- " program.local[10] };\n"
+ "PARAM c[11] = { program.local[0..7],\n"
+ " { 0.0020000001, -0.01348047, 0.057477314, 0.12123907 },\n"
+ " { 0.19563593, 0.33299461, 0.99999565, 1.5707964 },\n"
+ " { 3.1415927, 0.15915494, 1, 9.9999997e-006 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
"TEMP R5;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "ABS R0.w, R0.x;\n"
- "ABS R0.z, R0.y;\n"
- "ADD R0.z, R0, -R0.w;\n"
- "ADD R0.w, R0.y, c[6].x;\n"
- "ABS R0.z, R0;\n"
- "CMP R0.y, -R0.z, R0, R0.w;\n"
- "ABS R0.z, -R0.y;\n"
- "ADD R0.z, R0, c[6].y;\n"
- "ADD R0.w, R0.x, R0.z;\n"
- "ADD R1.x, R0.z, -R0;\n"
- "RCP R1.y, R0.w;\n"
- "RCP R1.x, R1.x;\n"
- "MUL R0.w, R0, R1.x;\n"
- "ADD R0.z, R0.x, -R0;\n"
- "MUL R0.z, R0, R1.y;\n"
- "CMP R0.z, R0.x, R0.w, R0;\n"
- "MUL R0.w, R0.z, R0.z;\n"
- "MOV R1.x, c[7].y;\n"
- "CMP R0.x, R0, c[7], R1;\n"
- "MAD R0.w, R0, c[6].z, -c[6];\n"
- "MUL R1.xy, fragment.position, c[10];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "ADD R2.w, -R1, c[7];\n"
- "CMP R0.y, -R0, c[7].z, c[7].w;\n"
- "MAD R0.x, R0.w, R0.z, R0;\n"
- "MAD R0.x, R0, R0.y, c[8];\n"
- "MUL R0.x, R0, c[9];\n"
+ "ABS R0.z, R0.x;\n"
+ "ABS R0.w, R0.y;\n"
+ "ADD R0.w, R0, -R0.z;\n"
+ "ADD R1.x, R0.y, c[8];\n"
+ "ABS R0.w, R0;\n"
+ "CMP R0.y, -R0.w, R0, R1.x;\n"
+ "ABS R0.w, -R0.y;\n"
+ "MAX R1.x, R0.z, R0.w;\n"
+ "RCP R1.y, R1.x;\n"
+ "MIN R1.x, R0.z, R0.w;\n"
+ "MUL R1.x, R1, R1.y;\n"
+ "MUL R1.y, R1.x, R1.x;\n"
+ "MAD R1.z, R1.y, c[8].y, c[8];\n"
+ "MAD R1.z, R1, R1.y, -c[8].w;\n"
+ "MAD R1.z, R1, R1.y, c[9].x;\n"
+ "MAD R1.z, R1, R1.y, -c[9].y;\n"
+ "MAD R1.y, R1.z, R1, c[9].z;\n"
+ "MUL R1.x, R1.y, R1;\n"
+ "ADD R0.z, -R0, R0.w;\n"
+ "ADD R1.y, -R1.x, c[9].w;\n"
+ "CMP R0.z, -R0, R1.y, R1.x;\n"
+ "ADD R0.w, -R0.z, c[10].x;\n"
+ "CMP R0.x, R0, R0.w, R0.z;\n"
+ "CMP R0.x, -R0.y, -R0, R0;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n"
+ "TEX R1, R0.zwzw, texture[0], 2D;\n"
+ "ADD R0.x, R0, c[0];\n"
+ "MUL R0.x, R0, c[10].y;\n"
"FLR R0.y, R0.x;\n"
"ADD R0.x, R0, -R0.y;\n"
"TEX R0, R0, texture[2], 1D;\n"
- "MUL R2.xyz, R1, R0.w;\n"
+ "MUL R2.xyz, R0.w, R1;\n"
"MAD R3.xyz, R0, R1.w, R2;\n"
"MAD R2.xyz, -R0.w, R1.w, R3;\n"
"MUL R4.xyz, R0.w, R2;\n"
- "MAX R2.xyz, R0, c[9].y;\n"
- "ADD R3.w, -R0, c[7];\n"
+ "MAX R2.xyz, R0, c[10].w;\n"
+ "ADD R2.w, -R1, c[10].z;\n"
+ "ADD R3.w, -R0, c[10].z;\n"
"MUL R5.xyz, R0, R2.w;\n"
"RCP R2.x, R2.x;\n"
"RCP R2.y, R2.y;\n"
@@ -2856,74 +2762,74 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
"MAD R2.xyz, R3, R2, R0;\n"
"ADD R0.z, R0.w, R1.w;\n"
"MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
+ "ADD R0.xy, fragment.position, c[6];\n"
+ "MUL R0.xy, R0, c[4];\n"
"TEX R0, R0, texture[1], 2D;\n"
"ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
+ "DP4 R0.x, R0, c[7];\n"
"MAD result.color, R0.x, R2, R1;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_HARDLIGHT =
"!!ARBfp1.0\n"
- "PARAM c[11] = { program.local[0..5],\n"
- " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n"
- " { 2.3561945, 0.78539819, -1, 1 },\n"
- " program.local[8],\n"
- " { 0.15915494, 2 },\n"
- " program.local[10] };\n"
+ "PARAM c[11] = { program.local[0..7],\n"
+ " { 0.0020000001, -0.01348047, 0.057477314, 0.12123907 },\n"
+ " { 0.19563593, 0.33299461, 0.99999565, 1.5707964 },\n"
+ " { 3.1415927, 0.15915494, 2, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "ABS R0.w, R0.x;\n"
- "ABS R0.z, R0.y;\n"
- "ADD R0.z, R0, -R0.w;\n"
- "ADD R0.w, R0.y, c[6].x;\n"
- "ABS R0.z, R0;\n"
- "CMP R0.y, -R0.z, R0, R0.w;\n"
- "ABS R0.z, -R0.y;\n"
- "ADD R0.z, R0, c[6].y;\n"
- "ADD R0.w, R0.x, R0.z;\n"
- "ADD R1.x, R0.z, -R0;\n"
- "RCP R1.y, R0.w;\n"
- "RCP R1.x, R1.x;\n"
- "MUL R0.w, R0, R1.x;\n"
- "ADD R0.z, R0.x, -R0;\n"
- "MUL R0.z, R0, R1.y;\n"
- "CMP R0.z, R0.x, R0.w, R0;\n"
- "MUL R0.w, R0.z, R0.z;\n"
- "MOV R1.x, c[7].y;\n"
- "CMP R0.x, R0, c[7], R1;\n"
- "MAD R0.w, R0, c[6].z, -c[6];\n"
- "MUL R1.xy, fragment.position, c[10];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "ADD R2.w, -R1, c[7];\n"
- "CMP R0.y, -R0, c[7].z, c[7].w;\n"
- "MAD R0.x, R0.w, R0.z, R0;\n"
- "MAD R0.x, R0, R0.y, c[8];\n"
- "MUL R0.x, R0, c[9];\n"
+ "ABS R0.z, R0.x;\n"
+ "ABS R0.w, R0.y;\n"
+ "ADD R0.w, R0, -R0.z;\n"
+ "ADD R1.x, R0.y, c[8];\n"
+ "ABS R0.w, R0;\n"
+ "CMP R0.y, -R0.w, R0, R1.x;\n"
+ "ABS R0.w, -R0.y;\n"
+ "MAX R1.x, R0.z, R0.w;\n"
+ "RCP R1.y, R1.x;\n"
+ "MIN R1.x, R0.z, R0.w;\n"
+ "MUL R1.x, R1, R1.y;\n"
+ "MUL R1.y, R1.x, R1.x;\n"
+ "MAD R1.z, R1.y, c[8].y, c[8];\n"
+ "MAD R1.z, R1, R1.y, -c[8].w;\n"
+ "MAD R1.z, R1, R1.y, c[9].x;\n"
+ "MAD R1.z, R1, R1.y, -c[9].y;\n"
+ "MAD R1.y, R1.z, R1, c[9].z;\n"
+ "MUL R1.x, R1.y, R1;\n"
+ "ADD R0.z, -R0, R0.w;\n"
+ "ADD R1.y, -R1.x, c[9].w;\n"
+ "CMP R0.z, -R0, R1.y, R1.x;\n"
+ "ADD R0.w, -R0.z, c[10].x;\n"
+ "CMP R0.x, R0, R0.w, R0.z;\n"
+ "CMP R0.x, -R0.y, -R0, R0;\n"
+ "ADD R0.x, R0, c[0];\n"
+ "MUL R0.x, R0, c[10].y;\n"
"FLR R0.y, R0.x;\n"
"ADD R0.x, R0, -R0.y;\n"
"TEX R0, R0, texture[2], 1D;\n"
+ "MUL R1.xy, fragment.position, c[5];\n"
+ "TEX R1, R1, texture[0], 2D;\n"
+ "ADD R2.w, -R1, c[10];\n"
"ADD R3.xyz, R0.w, -R0;\n"
"ADD R2.xyz, R1.w, -R1;\n"
"MUL R2.xyz, R2, R3;\n"
- "MUL R2.xyz, R2, c[9].y;\n"
+ "MUL R2.xyz, R2, c[10].z;\n"
"MAD R2.xyz, R0.w, R1.w, -R2;\n"
"MUL R4.xyz, R0, R2.w;\n"
"MAD R2.xyz, R0, R2.w, R2;\n"
"MUL R3.xyz, R0, R1;\n"
- "ADD R2.w, -R0, c[7];\n"
- "MAD R3.xyz, R3, c[9].y, R4;\n"
- "MUL R0.xyz, R0, c[9].y;\n"
+ "ADD R2.w, -R0, c[10];\n"
+ "MAD R3.xyz, R3, c[10].z, R4;\n"
+ "MUL R0.xyz, R0, c[10].z;\n"
"SGE R0.xyz, R0, R0.w;\n"
"MAD R3.xyz, R1, R2.w, R3;\n"
"MAD R2.xyz, R1, R2.w, R2;\n"
@@ -2931,24 +2837,22 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
"MAD R2.xyz, R0, R2, R3;\n"
"ADD R0.z, R0.w, R1.w;\n"
"MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
+ "ADD R0.xy, fragment.position, c[6];\n"
+ "MUL R0.xy, R0, c[4];\n"
"TEX R0, R0, texture[1], 2D;\n"
"ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
+ "DP4 R0.x, R0, c[7];\n"
"MAD result.color, R0.x, R2, R1;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_SOFTLIGHT =
"!!ARBfp1.0\n"
- "PARAM c[12] = { program.local[0..5],\n"
- " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n"
- " { 2.3561945, 0.78539819, -1, 1 },\n"
- " program.local[8],\n"
- " { 0.15915494, 9.9999997e-06, 2, 8 },\n"
- " program.local[10],\n"
- " { 3 } };\n"
+ "PARAM c[12] = { program.local[0..7],\n"
+ " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
+ " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
+ " { 0.33299461, 0.99999565, 1, 9.9999997e-006 },\n"
+ " { 2, 3, 8 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -2956,326 +2860,325 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
"TEMP R4;\n"
"TEMP R5;\n"
"TEMP R6;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "ABS R0.w, R0.x;\n"
- "ABS R0.z, R0.y;\n"
- "ADD R0.z, R0, -R0.w;\n"
- "ADD R0.w, R0.y, c[6].x;\n"
- "ABS R0.z, R0;\n"
- "CMP R0.y, -R0.z, R0, R0.w;\n"
- "ABS R0.z, -R0.y;\n"
- "ADD R0.z, R0, c[6].y;\n"
- "ADD R0.w, R0.x, R0.z;\n"
- "ADD R1.x, R0.z, -R0;\n"
- "RCP R1.y, R0.w;\n"
- "RCP R1.x, R1.x;\n"
- "MUL R0.w, R0, R1.x;\n"
- "ADD R0.z, R0.x, -R0;\n"
- "MUL R0.z, R0, R1.y;\n"
- "CMP R0.z, R0.x, R0.w, R0;\n"
- "MOV R1.x, c[7].y;\n"
- "MUL R0.w, R0.z, R0.z;\n"
- "CMP R0.x, R0, c[7], R1;\n"
- "MAD R0.w, R0, c[6].z, -c[6];\n"
- "MAD R0.x, R0.w, R0.z, R0;\n"
- "MUL R0.zw, fragment.position.xyxy, c[10].xyxy;\n"
- "TEX R1, R0.zwzw, texture[0], 2D;\n"
- "CMP R0.y, -R0, c[7].z, c[7].w;\n"
- "MAD R0.x, R0, R0.y, c[8];\n"
- "MUL R0.x, R0, c[9];\n"
- "FLR R0.y, R0.x;\n"
- "MAX R0.z, R1.w, c[9].y;\n"
- "RCP R2.w, R0.z;\n"
- "MUL R2.xyz, R1, R2.w;\n"
- "RSQ R3.w, R2.x;\n"
- "RSQ R4.y, R2.z;\n"
- "RCP R4.x, R3.w;\n"
- "ADD R0.x, R0, -R0.y;\n"
- "TEX R0, R0, texture[2], 1D;\n"
- "MAD R3.xyz, R0, c[9].z, -R0.w;\n"
- "RSQ R3.w, R2.y;\n"
- "RCP R4.z, R4.y;\n"
- "RCP R4.y, R3.w;\n"
- "MAD R4.xyz, R4, R1.w, -R1;\n"
- "MUL R6.xyz, R4, R3;\n"
- "MUL R4.xyz, -R2, c[9].w;\n"
- "MAD R2.xyz, -R1, R2.w, c[7].w;\n"
- "ADD R5.xyz, R4, c[11].x;\n"
- "MUL R4.xyz, R2, R3;\n"
- "MAD R4.xyz, -R4, R5, R0.w;\n"
- "MAD R2.xyz, -R2, R3, R0.w;\n"
- "MAD R5.xyz, R1, R0.w, R6;\n"
- "MUL R4.xyz, R1, R4;\n"
- "MUL R6.xyz, R1, c[9].w;\n"
- "ADD R5.xyz, R5, -R4;\n"
- "SGE R6.xyz, R6, R1.w;\n"
- "MUL R5.xyz, R6, R5;\n"
- "ADD R3.xyz, R4, R5;\n"
- "MUL R2.xyz, R1, R2;\n"
- "MUL R4.xyz, R0, c[9].z;\n"
- "ADD R3.xyz, R3, -R2;\n"
- "SGE R4.xyz, R4, R0.w;\n"
- "MUL R3.xyz, R4, R3;\n"
- "ADD R2.xyz, R2, R3;\n"
- "ADD R2.w, -R1, c[7];\n"
- "MAD R0.xyz, R0, R2.w, R2;\n"
- "ADD R2.x, -R0.w, c[7].w;\n"
- "MAD R2.xyz, R1, R2.x, R0;\n"
- "ADD R0.z, R0.w, R1.w;\n"
- "MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "ABS R0.z, R0.x;\n"
+ "ABS R0.w, R0.y;\n"
+ "ADD R0.w, R0, -R0.z;\n"
+ "ADD R1.x, R0.y, c[8].y;\n"
+ "ABS R0.w, R0;\n"
+ "CMP R0.y, -R0.w, R0, R1.x;\n"
+ "ABS R0.w, -R0.y;\n"
+ "MAX R1.x, R0.z, R0.w;\n"
+ "RCP R1.y, R1.x;\n"
+ "MIN R1.x, R0.z, R0.w;\n"
+ "MUL R1.x, R1, R1.y;\n"
+ "MUL R1.y, R1.x, R1.x;\n"
+ "MAD R1.z, R1.y, c[9].x, c[9].y;\n"
+ "MAD R1.z, R1, R1.y, -c[9];\n"
+ "MAD R1.z, R1, R1.y, c[9].w;\n"
+ "MAD R1.z, R1, R1.y, -c[10].x;\n"
+ "MAD R1.y, R1.z, R1, c[10];\n"
+ "MUL R1.x, R1.y, R1;\n"
+ "ADD R1.y, -R1.x, c[8].w;\n"
+ "ADD R0.z, -R0, R0.w;\n"
+ "CMP R0.z, -R0, R1.y, R1.x;\n"
+ "ADD R0.w, -R0.z, c[8].z;\n"
+ "CMP R0.x, R0, R0.w, R0.z;\n"
+ "CMP R0.x, -R0.y, -R0, R0;\n"
+ "ADD R0.x, R0, c[0];\n"
+ "MUL R1.x, R0, c[8];\n"
+ "FLR R1.y, R1.x;\n"
+ "MUL R0.xy, fragment.position, c[5];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "MAX R2.x, R0.w, c[10].w;\n"
+ "RCP R2.w, R2.x;\n"
+ "MUL R2.xyz, R0, R2.w;\n"
+ "MAD R6.xyz, -R2, c[11].z, c[11].y;\n"
+ "MAD R3.xyz, -R0, R2.w, c[10].z;\n"
+ "RSQ R2.w, R2.x;\n"
+ "RCP R2.x, R2.w;\n"
+ "ADD R1.x, R1, -R1.y;\n"
+ "TEX R1, R1, texture[2], 1D;\n"
+ "MAD R4.xyz, R1, c[11].x, -R1.w;\n"
+ "MUL R5.xyz, R3, R4;\n"
+ "MAD R5.xyz, -R5, R6, R1.w;\n"
+ "MAD R3.xyz, -R3, R4, R1.w;\n"
+ "RSQ R2.z, R2.z;\n"
+ "RSQ R2.y, R2.y;\n"
+ "MUL R5.xyz, R0, R5;\n"
+ "MUL R3.xyz, R0, R3;\n"
+ "ADD R2.w, -R0, c[10].z;\n"
+ "RCP R2.z, R2.z;\n"
+ "RCP R2.y, R2.y;\n"
+ "MAD R2.xyz, R0.w, R2, -R0;\n"
+ "MUL R2.xyz, R2, R4;\n"
+ "MAD R2.xyz, R1.w, R0, R2;\n"
+ "ADD R6.xyz, R2, -R5;\n"
+ "MUL R4.xyz, R1, c[11].x;\n"
+ "MUL R2.xyz, R0, c[11].z;\n"
+ "SGE R2.xyz, R2, R0.w;\n"
+ "MAD R2.xyz, R2, R6, R5;\n"
+ "SGE R4.xyz, R4, R1.w;\n"
+ "ADD R2.xyz, R2, -R3;\n"
+ "MAD R2.xyz, R4, R2, R3;\n"
+ "MAD R1.xyz, R1, R2.w, R2;\n"
+ "ADD R2.x, -R1.w, c[10].z;\n"
+ "MAD R2.xyz, R0, R2.x, R1;\n"
+ "ADD R1.z, R1.w, R0.w;\n"
+ "MAD R2.w, -R1, R0, R1.z;\n"
+ "ADD R1.xy, fragment.position, c[6];\n"
+ "MUL R1.xy, R1, c[4];\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[7];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_DIFFERENCE =
"!!ARBfp1.0\n"
- "PARAM c[11] = { program.local[0..5],\n"
- " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n"
- " { 2.3561945, 0.78539819, -1, 1 },\n"
- " program.local[8],\n"
- " { 0.15915494, 2 },\n"
- " program.local[10] };\n"
+ "PARAM c[11] = { program.local[0..7],\n"
+ " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
+ " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
+ " { 0.33299461, 0.99999565, 2 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "ABS R0.w, R0.x;\n"
- "ABS R0.z, R0.y;\n"
- "ADD R0.z, R0, -R0.w;\n"
- "ADD R0.w, R0.y, c[6].x;\n"
- "ABS R0.z, R0;\n"
- "CMP R0.y, -R0.z, R0, R0.w;\n"
- "ABS R0.z, -R0.y;\n"
- "ADD R0.z, R0, c[6].y;\n"
- "ADD R0.w, R0.x, R0.z;\n"
- "ADD R1.x, R0.z, -R0;\n"
- "RCP R1.y, R0.w;\n"
- "RCP R1.x, R1.x;\n"
- "MUL R0.w, R0, R1.x;\n"
- "ADD R0.z, R0.x, -R0;\n"
- "MUL R0.z, R0, R1.y;\n"
- "CMP R0.z, R0.x, R0.w, R0;\n"
- "MUL R0.w, R0.z, R0.z;\n"
- "MOV R1.x, c[7].y;\n"
- "CMP R0.x, R0, c[7], R1;\n"
- "MAD R0.w, R0, c[6].z, -c[6];\n"
- "MAD R0.x, R0.w, R0.z, R0;\n"
- "CMP R0.y, -R0, c[7].z, c[7].w;\n"
- "MAD R0.x, R0, R0.y, c[8];\n"
- "MUL R0.x, R0, c[9];\n"
- "FLR R0.y, R0.x;\n"
- "MUL R0.zw, fragment.position.xyxy, c[10].xyxy;\n"
- "TEX R1, R0.zwzw, texture[0], 2D;\n"
- "ADD R0.x, R0, -R0.y;\n"
- "TEX R0, R0, texture[2], 1D;\n"
- "ADD R3.xyz, R0, R1;\n"
- "MUL R2.xyz, R1, R0.w;\n"
- "MUL R0.xyz, R0, R1.w;\n"
- "MIN R0.xyz, R0, R2;\n"
- "MAD R2.xyz, -R0, c[9].y, R3;\n"
- "ADD R0.z, R0.w, R1.w;\n"
- "MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "ABS R0.z, R0.x;\n"
+ "ABS R0.w, R0.y;\n"
+ "ADD R0.w, R0, -R0.z;\n"
+ "ADD R1.x, R0.y, c[8].y;\n"
+ "ABS R0.w, R0;\n"
+ "CMP R0.y, -R0.w, R0, R1.x;\n"
+ "ABS R0.w, -R0.y;\n"
+ "MAX R1.x, R0.z, R0.w;\n"
+ "RCP R1.y, R1.x;\n"
+ "MIN R1.x, R0.z, R0.w;\n"
+ "MUL R1.x, R1, R1.y;\n"
+ "MUL R1.y, R1.x, R1.x;\n"
+ "MAD R1.z, R1.y, c[9].x, c[9].y;\n"
+ "MAD R1.z, R1, R1.y, -c[9];\n"
+ "MAD R1.z, R1, R1.y, c[9].w;\n"
+ "MAD R1.z, R1, R1.y, -c[10].x;\n"
+ "MAD R1.y, R1.z, R1, c[10];\n"
+ "MUL R1.x, R1.y, R1;\n"
+ "ADD R1.y, -R1.x, c[8].w;\n"
+ "ADD R0.z, -R0, R0.w;\n"
+ "CMP R0.z, -R0, R1.y, R1.x;\n"
+ "ADD R0.w, -R0.z, c[8].z;\n"
+ "CMP R0.x, R0, R0.w, R0.z;\n"
+ "CMP R0.x, -R0.y, -R0, R0;\n"
+ "ADD R0.x, R0, c[0];\n"
+ "MUL R0.z, R0.x, c[8].x;\n"
+ "FLR R0.w, R0.z;\n"
+ "ADD R1.x, R0.z, -R0.w;\n"
+ "MUL R0.xy, fragment.position, c[5];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "TEX R1, R1, texture[2], 1D;\n"
+ "ADD R2.xyz, R1, R0;\n"
+ "MUL R3.xyz, R1.w, R0;\n"
+ "MUL R1.xyz, R1, R0.w;\n"
+ "MIN R1.xyz, R1, R3;\n"
+ "MAD R2.xyz, -R1, c[10].z, R2;\n"
+ "ADD R1.z, R1.w, R0.w;\n"
+ "MAD R2.w, -R1, R0, R1.z;\n"
+ "ADD R1.xy, fragment.position, c[6];\n"
+ "MUL R1.xy, R1, c[4];\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[7];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_EXCLUSION =
"!!ARBfp1.0\n"
- "PARAM c[11] = { program.local[0..5],\n"
- " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n"
- " { 2.3561945, 0.78539819, -1, 1 },\n"
- " program.local[8],\n"
- " { 0.15915494, 2 },\n"
- " program.local[10] };\n"
+ "PARAM c[11] = { program.local[0..7],\n"
+ " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
+ " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
+ " { 0.33299461, 0.99999565, 2, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "ABS R0.w, R0.x;\n"
- "ABS R0.z, R0.y;\n"
- "ADD R0.z, R0, -R0.w;\n"
- "ADD R0.w, R0.y, c[6].x;\n"
- "ABS R0.z, R0;\n"
- "CMP R0.y, -R0.z, R0, R0.w;\n"
- "ABS R0.z, -R0.y;\n"
- "ADD R0.z, R0, c[6].y;\n"
- "ADD R0.w, R0.x, R0.z;\n"
- "ADD R1.x, R0.z, -R0;\n"
- "RCP R1.y, R0.w;\n"
- "RCP R1.x, R1.x;\n"
- "MUL R0.w, R0, R1.x;\n"
- "ADD R0.z, R0.x, -R0;\n"
- "MUL R0.z, R0, R1.y;\n"
- "CMP R0.z, R0.x, R0.w, R0;\n"
- "MUL R0.w, R0.z, R0.z;\n"
- "MOV R1.x, c[7].y;\n"
- "CMP R0.x, R0, c[7], R1;\n"
- "MAD R0.w, R0, c[6].z, -c[6];\n"
- "MUL R1.xy, fragment.position, c[10];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "CMP R0.y, -R0, c[7].z, c[7].w;\n"
- "MAD R0.x, R0.w, R0.z, R0;\n"
- "MAD R0.x, R0, R0.y, c[8];\n"
- "MUL R0.x, R0, c[9];\n"
- "FLR R0.y, R0.x;\n"
- "ADD R0.x, R0, -R0.y;\n"
- "TEX R0, R0, texture[2], 1D;\n"
- "MUL R2.xyz, R1, R0.w;\n"
- "MAD R3.xyz, R0, R1.w, R2;\n"
- "MUL R2.xyz, R0, R1;\n"
- "MAD R2.xyz, -R2, c[9].y, R3;\n"
- "ADD R2.w, -R1, c[7];\n"
- "MAD R0.xyz, R0, R2.w, R2;\n"
- "ADD R2.x, -R0.w, c[7].w;\n"
- "MAD R2.xyz, R1, R2.x, R0;\n"
- "ADD R0.z, R0.w, R1.w;\n"
- "MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "ABS R0.z, R0.x;\n"
+ "ABS R0.w, R0.y;\n"
+ "ADD R0.w, R0, -R0.z;\n"
+ "ADD R1.x, R0.y, c[8].y;\n"
+ "ABS R0.w, R0;\n"
+ "CMP R0.y, -R0.w, R0, R1.x;\n"
+ "ABS R0.w, -R0.y;\n"
+ "MAX R1.x, R0.z, R0.w;\n"
+ "RCP R1.y, R1.x;\n"
+ "MIN R1.x, R0.z, R0.w;\n"
+ "MUL R1.x, R1, R1.y;\n"
+ "MUL R1.y, R1.x, R1.x;\n"
+ "MAD R1.z, R1.y, c[9].x, c[9].y;\n"
+ "MAD R1.z, R1, R1.y, -c[9];\n"
+ "MAD R1.z, R1, R1.y, c[9].w;\n"
+ "MAD R1.z, R1, R1.y, -c[10].x;\n"
+ "MAD R1.y, R1.z, R1, c[10];\n"
+ "MUL R1.x, R1.y, R1;\n"
+ "ADD R1.y, -R1.x, c[8].w;\n"
+ "ADD R0.z, -R0, R0.w;\n"
+ "CMP R0.z, -R0, R1.y, R1.x;\n"
+ "ADD R0.w, -R0.z, c[8].z;\n"
+ "CMP R0.x, R0, R0.w, R0.z;\n"
+ "CMP R0.x, -R0.y, -R0, R0;\n"
+ "ADD R0.x, R0, c[0];\n"
+ "MUL R0.z, R0.x, c[8].x;\n"
+ "FLR R0.w, R0.z;\n"
+ "ADD R1.x, R0.z, -R0.w;\n"
+ "MUL R0.xy, fragment.position, c[5];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "TEX R1, R1, texture[2], 1D;\n"
+ "MUL R2.xyz, R1.w, R0;\n"
+ "MAD R3.xyz, R1, R0.w, R2;\n"
+ "MUL R2.xyz, R1, R0;\n"
+ "MAD R2.xyz, -R2, c[10].z, R3;\n"
+ "ADD R2.w, -R0, c[10];\n"
+ "MAD R1.xyz, R1, R2.w, R2;\n"
+ "ADD R2.x, -R1.w, c[10].w;\n"
+ "MAD R2.xyz, R0, R2.x, R1;\n"
+ "ADD R1.z, R1.w, R0.w;\n"
+ "MAD R2.w, -R1, R0, R1.z;\n"
+ "ADD R1.xy, fragment.position, c[6];\n"
+ "MUL R1.xy, R1, c[4];\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[7];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_SIMPLE_PORTER_DUFF_NOMASK =
"!!ARBfp1.0\n"
- "PARAM c[10] = { program.local[0..2],\n"
- " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n"
- " { 2.3561945, 0.78539819, -1, 1 },\n"
- " program.local[5],\n"
- " { 0.15915494 },\n"
- " program.local[7..9] };\n"
+ "PARAM c[10] = { program.local[0..6],\n"
+ " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
+ " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
+ " { 0.33299461, 0.99999565, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "ABS R0.w, R0.x;\n"
- "ABS R0.z, R0.y;\n"
- "ADD R0.z, R0, -R0.w;\n"
- "ADD R0.w, R0.y, c[3].x;\n"
- "ABS R0.z, R0;\n"
- "CMP R0.y, -R0.z, R0, R0.w;\n"
- "ABS R0.z, -R0.y;\n"
- "ADD R0.z, R0, c[3].y;\n"
- "ADD R0.w, R0.x, R0.z;\n"
- "ADD R1.x, R0.z, -R0;\n"
- "RCP R1.y, R0.w;\n"
- "RCP R1.x, R1.x;\n"
- "MUL R0.w, R0, R1.x;\n"
- "ADD R0.z, R0.x, -R0;\n"
- "MUL R0.z, R0, R1.y;\n"
- "CMP R0.z, R0.x, R0.w, R0;\n"
- "MUL R0.w, R0.z, R0.z;\n"
- "MOV R1.x, c[4].y;\n"
- "CMP R0.x, R0, c[4], R1;\n"
- "MAD R0.w, R0, c[3].z, -c[3];\n"
- "MAD R0.x, R0.w, R0.z, R0;\n"
- "CMP R0.y, -R0, c[4].z, c[4].w;\n"
- "MAD R0.x, R0, R0.y, c[5];\n"
- "MUL R0.x, R0, c[6];\n"
- "FLR R0.y, R0.x;\n"
- "MUL R0.zw, fragment.position.xyxy, c[7].xyxy;\n"
+ "ABS R0.z, R0.x;\n"
+ "ABS R0.w, R0.y;\n"
+ "ADD R0.w, R0, -R0.z;\n"
+ "ADD R1.x, R0.y, c[7].y;\n"
+ "ABS R0.w, R0;\n"
+ "CMP R0.y, -R0.w, R0, R1.x;\n"
+ "ABS R0.w, -R0.y;\n"
+ "MAX R1.x, R0.z, R0.w;\n"
+ "RCP R1.y, R1.x;\n"
+ "MIN R1.x, R0.z, R0.w;\n"
+ "MUL R1.x, R1, R1.y;\n"
+ "MUL R1.y, R1.x, R1.x;\n"
+ "MAD R1.z, R1.y, c[8].x, c[8].y;\n"
+ "MAD R1.z, R1, R1.y, -c[8];\n"
+ "MAD R1.z, R1, R1.y, c[8].w;\n"
+ "MAD R1.z, R1, R1.y, -c[9].x;\n"
+ "MAD R1.y, R1.z, R1, c[9];\n"
+ "MUL R1.x, R1.y, R1;\n"
+ "ADD R0.z, -R0, R0.w;\n"
+ "ADD R1.y, -R1.x, c[7].w;\n"
+ "CMP R0.z, -R0, R1.y, R1.x;\n"
+ "ADD R0.w, -R0.z, c[7].z;\n"
+ "CMP R0.x, R0, R0.w, R0.z;\n"
+ "CMP R0.x, -R0.y, -R0, R0;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[6].xyxy;\n"
"TEX R1, R0.zwzw, texture[0], 2D;\n"
- "MUL R2.xyz, R1, c[9].y;\n"
+ "MUL R2.xyz, R1, c[4].y;\n"
+ "ADD R0.x, R0, c[0];\n"
+ "MUL R0.x, R0, c[7];\n"
+ "FLR R0.y, R0.x;\n"
"ADD R0.x, R0, -R0.y;\n"
"TEX R0, R0, texture[1], 1D;\n"
- "MUL R3.xyz, R2, R0.w;\n"
- "MUL R2.xyz, R0, c[9].x;\n"
- "MAD R2.xyz, R2, R1.w, R3;\n"
- "ADD R2.w, -R1, c[4];\n"
- "MUL R0.xyz, R0, c[8].y;\n"
- "MAD R0.xyz, R0, R2.w, R2;\n"
- "ADD R2.x, -R0.w, c[4].w;\n"
- "MUL R1.xyz, R1, c[8].z;\n"
- "MAD result.color.xyz, R1, R2.x, R0;\n"
+ "MUL R3.xyz, R0.w, R2;\n"
+ "MUL R2.xyz, R0, c[4].x;\n"
+ "MAD R2.xyz, R1.w, R2, R3;\n"
+ "ADD R2.w, -R1, c[9].z;\n"
+ "MUL R0.xyz, R0, c[5].y;\n"
+ "MAD R0.xyz, R2.w, R0, R2;\n"
+ "ADD R2.x, -R0.w, c[9].z;\n"
+ "MUL R1.xyz, R1, c[5].z;\n"
+ "MAD result.color.xyz, R2.x, R1, R0;\n"
"MUL R0.x, R0.w, R1.w;\n"
"MUL R0.z, R1.w, R2.x;\n"
"MUL R0.y, R0.w, R2.w;\n"
- "DP3 result.color.w, R0, c[8];\n"
+ "DP3 result.color.w, R0, c[5];\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_MULTIPLY_NOMASK =
"!!ARBfp1.0\n"
- "PARAM c[8] = { program.local[0..2],\n"
- " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n"
- " { 2.3561945, 0.78539819, -1, 1 },\n"
- " program.local[5],\n"
- " { 0.15915494 },\n"
- " program.local[7] };\n"
+ "PARAM c[8] = { program.local[0..4],\n"
+ " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
+ " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
+ " { 0.33299461, 0.99999565, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "ABS R0.w, R0.x;\n"
- "ABS R0.z, R0.y;\n"
- "ADD R0.z, R0, -R0.w;\n"
- "ADD R0.w, R0.y, c[3].x;\n"
- "ABS R0.z, R0;\n"
- "CMP R0.y, -R0.z, R0, R0.w;\n"
- "ABS R0.z, -R0.y;\n"
- "ADD R0.z, R0, c[3].y;\n"
- "ADD R0.w, R0.x, R0.z;\n"
- "ADD R1.x, R0.z, -R0;\n"
- "RCP R1.y, R0.w;\n"
- "RCP R1.x, R1.x;\n"
- "MUL R0.w, R0, R1.x;\n"
- "ADD R0.z, R0.x, -R0;\n"
- "MUL R0.z, R0, R1.y;\n"
- "CMP R0.z, R0.x, R0.w, R0;\n"
- "MUL R0.w, R0.z, R0.z;\n"
- "MOV R1.x, c[4].y;\n"
- "CMP R0.x, R0, c[4], R1;\n"
- "MAD R0.w, R0, c[3].z, -c[3];\n"
- "MAD R0.x, R0.w, R0.z, R0;\n"
- "CMP R0.y, -R0, c[4].z, c[4].w;\n"
- "MAD R0.x, R0, R0.y, c[5];\n"
- "MUL R0.x, R0, c[6];\n"
- "FLR R0.y, R0.x;\n"
- "MUL R0.zw, fragment.position.xyxy, c[7].xyxy;\n"
+ "ABS R0.z, R0.x;\n"
+ "ABS R0.w, R0.y;\n"
+ "ADD R0.w, R0, -R0.z;\n"
+ "ADD R1.x, R0.y, c[5].y;\n"
+ "ABS R0.w, R0;\n"
+ "CMP R0.y, -R0.w, R0, R1.x;\n"
+ "ABS R0.w, -R0.y;\n"
+ "MAX R1.x, R0.z, R0.w;\n"
+ "RCP R1.y, R1.x;\n"
+ "MIN R1.x, R0.z, R0.w;\n"
+ "MUL R1.x, R1, R1.y;\n"
+ "MUL R1.y, R1.x, R1.x;\n"
+ "MAD R1.z, R1.y, c[6].x, c[6].y;\n"
+ "MAD R1.z, R1, R1.y, -c[6];\n"
+ "MAD R1.z, R1, R1.y, c[6].w;\n"
+ "MAD R1.z, R1, R1.y, -c[7].x;\n"
+ "MAD R1.y, R1.z, R1, c[7];\n"
+ "MUL R1.x, R1.y, R1;\n"
+ "ADD R0.z, -R0, R0.w;\n"
+ "ADD R1.y, -R1.x, c[5].w;\n"
+ "CMP R0.z, -R0, R1.y, R1.x;\n"
+ "ADD R0.w, -R0.z, c[5].z;\n"
+ "CMP R0.x, R0, R0.w, R0.z;\n"
+ "CMP R0.x, -R0.y, -R0, R0;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
"TEX R1, R0.zwzw, texture[0], 2D;\n"
+ "ADD R0.x, R0, c[0];\n"
+ "MUL R0.x, R0, c[5];\n"
+ "FLR R0.y, R0.x;\n"
"ADD R0.x, R0, -R0.y;\n"
"TEX R0, R0, texture[1], 1D;\n"
- "ADD R2.x, -R1.w, c[4].w;\n"
+ "ADD R2.x, -R1.w, c[7].z;\n"
"MUL R2.xyz, R0, R2.x;\n"
"MAD R0.xyz, R0, R1, R2;\n"
"ADD R2.x, R0.w, R1.w;\n"
- "ADD R2.y, -R0.w, c[4].w;\n"
+ "ADD R2.y, -R0.w, c[7].z;\n"
"MAD result.color.xyz, R1, R2.y, R0;\n"
"MAD result.color.w, -R0, R1, R2.x;\n"
"END\n"
@@ -3283,46 +3186,46 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_SCREEN_NOMASK =
"!!ARBfp1.0\n"
- "PARAM c[8] = { program.local[0..2],\n"
- " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n"
- " { 2.3561945, 0.78539819, -1, 1 },\n"
- " program.local[5],\n"
- " { 0.15915494 },\n"
- " program.local[7] };\n"
+ "PARAM c[8] = { program.local[0..4],\n"
+ " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
+ " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
+ " { 0.33299461, 0.99999565 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "ABS R0.w, R0.x;\n"
- "ABS R0.z, R0.y;\n"
- "ADD R0.z, R0, -R0.w;\n"
- "ADD R0.w, R0.y, c[3].x;\n"
- "ABS R0.z, R0;\n"
- "CMP R0.y, -R0.z, R0, R0.w;\n"
- "ABS R0.z, -R0.y;\n"
- "ADD R0.z, R0, c[3].y;\n"
- "ADD R0.w, R0.x, R0.z;\n"
- "ADD R1.x, R0.z, -R0;\n"
- "RCP R1.y, R0.w;\n"
- "RCP R1.x, R1.x;\n"
- "MUL R0.w, R0, R1.x;\n"
- "ADD R0.z, R0.x, -R0;\n"
- "MUL R0.z, R0, R1.y;\n"
- "CMP R0.z, R0.x, R0.w, R0;\n"
- "MUL R0.w, R0.z, R0.z;\n"
- "MOV R1.x, c[4].y;\n"
- "CMP R0.x, R0, c[4], R1;\n"
- "MAD R0.w, R0, c[3].z, -c[3];\n"
- "MAD R0.x, R0.w, R0.z, R0;\n"
- "CMP R0.y, -R0, c[4].z, c[4].w;\n"
- "MAD R0.x, R0, R0.y, c[5];\n"
- "MUL R0.x, R0, c[6];\n"
+ "ABS R0.z, R0.x;\n"
+ "ABS R0.w, R0.y;\n"
+ "ADD R0.w, R0, -R0.z;\n"
+ "ADD R1.x, R0.y, c[5].y;\n"
+ "ABS R0.w, R0;\n"
+ "CMP R0.y, -R0.w, R0, R1.x;\n"
+ "ABS R0.w, -R0.y;\n"
+ "MAX R1.x, R0.z, R0.w;\n"
+ "RCP R1.y, R1.x;\n"
+ "MIN R1.x, R0.z, R0.w;\n"
+ "MUL R1.x, R1, R1.y;\n"
+ "MUL R1.y, R1.x, R1.x;\n"
+ "MAD R1.z, R1.y, c[6].x, c[6].y;\n"
+ "MAD R1.z, R1, R1.y, -c[6];\n"
+ "MAD R1.z, R1, R1.y, c[6].w;\n"
+ "MAD R1.z, R1, R1.y, -c[7].x;\n"
+ "MAD R1.y, R1.z, R1, c[7];\n"
+ "MUL R1.x, R1.y, R1;\n"
+ "ADD R0.z, -R0, R0.w;\n"
+ "ADD R1.y, -R1.x, c[5].w;\n"
+ "CMP R0.z, -R0, R1.y, R1.x;\n"
+ "ADD R0.w, -R0.z, c[5].z;\n"
+ "CMP R0.x, R0, R0.w, R0.z;\n"
+ "CMP R0.x, -R0.y, -R0, R0;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
+ "ADD R0.x, R0, c[0];\n"
+ "MUL R0.x, R0, c[5];\n"
"FLR R0.y, R0.x;\n"
- "MUL R0.zw, fragment.position.xyxy, c[7].xyxy;\n"
"TEX R1, R0.zwzw, texture[0], 2D;\n"
"ADD R0.x, R0, -R0.y;\n"
"TEX R0, R0, texture[1], 1D;\n"
@@ -3333,64 +3236,64 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_OVERLAY_NOMASK =
"!!ARBfp1.0\n"
- "PARAM c[8] = { program.local[0..2],\n"
- " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n"
- " { 2.3561945, 0.78539819, -1, 1 },\n"
- " program.local[5],\n"
- " { 0.15915494, 2 },\n"
- " program.local[7] };\n"
+ "PARAM c[8] = { program.local[0..4],\n"
+ " { 0.0020000001, -0.01348047, 0.057477314, 0.12123907 },\n"
+ " { 0.19563593, 0.33299461, 0.99999565, 1.5707964 },\n"
+ " { 3.1415927, 0.15915494, 2, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "ABS R0.w, R0.x;\n"
- "ABS R0.z, R0.y;\n"
- "ADD R0.z, R0, -R0.w;\n"
- "ADD R0.w, R0.y, c[3].x;\n"
- "ABS R0.z, R0;\n"
- "CMP R0.y, -R0.z, R0, R0.w;\n"
- "ABS R0.z, -R0.y;\n"
- "ADD R0.z, R0, c[3].y;\n"
- "ADD R0.w, R0.x, R0.z;\n"
- "ADD R1.x, R0.z, -R0;\n"
- "RCP R1.y, R0.w;\n"
- "RCP R1.x, R1.x;\n"
- "MUL R0.w, R0, R1.x;\n"
- "ADD R0.z, R0.x, -R0;\n"
- "MUL R0.z, R0, R1.y;\n"
- "CMP R0.z, R0.x, R0.w, R0;\n"
- "MUL R0.w, R0.z, R0.z;\n"
- "MOV R1.x, c[4].y;\n"
- "CMP R0.x, R0, c[4], R1;\n"
- "MAD R0.w, R0, c[3].z, -c[3];\n"
- "MUL R1.xy, fragment.position, c[7];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "ADD R2.w, -R1, c[4];\n"
- "CMP R0.y, -R0, c[4].z, c[4].w;\n"
- "MAD R0.x, R0.w, R0.z, R0;\n"
- "MAD R0.x, R0, R0.y, c[5];\n"
- "MUL R0.x, R0, c[6];\n"
+ "ABS R0.z, R0.x;\n"
+ "ABS R0.w, R0.y;\n"
+ "ADD R0.w, R0, -R0.z;\n"
+ "ADD R1.x, R0.y, c[5];\n"
+ "ABS R0.w, R0;\n"
+ "CMP R0.y, -R0.w, R0, R1.x;\n"
+ "ABS R0.w, -R0.y;\n"
+ "MAX R1.x, R0.z, R0.w;\n"
+ "RCP R1.y, R1.x;\n"
+ "MIN R1.x, R0.z, R0.w;\n"
+ "MUL R1.x, R1, R1.y;\n"
+ "MUL R1.y, R1.x, R1.x;\n"
+ "MAD R1.z, R1.y, c[5].y, c[5];\n"
+ "MAD R1.z, R1, R1.y, -c[5].w;\n"
+ "MAD R1.z, R1, R1.y, c[6].x;\n"
+ "MAD R1.z, R1, R1.y, -c[6].y;\n"
+ "MAD R1.y, R1.z, R1, c[6].z;\n"
+ "MUL R1.x, R1.y, R1;\n"
+ "ADD R0.z, -R0, R0.w;\n"
+ "ADD R1.y, -R1.x, c[6].w;\n"
+ "CMP R0.z, -R0, R1.y, R1.x;\n"
+ "ADD R0.w, -R0.z, c[7].x;\n"
+ "CMP R0.x, R0, R0.w, R0.z;\n"
+ "CMP R0.x, -R0.y, -R0, R0;\n"
+ "ADD R0.x, R0, c[0];\n"
+ "MUL R0.x, R0, c[7].y;\n"
"FLR R0.y, R0.x;\n"
"ADD R0.x, R0, -R0.y;\n"
"TEX R0, R0, texture[1], 1D;\n"
+ "MUL R1.xy, fragment.position, c[4];\n"
+ "TEX R1, R1, texture[0], 2D;\n"
"ADD R3.xyz, R0.w, -R0;\n"
"ADD R2.xyz, R1.w, -R1;\n"
"MUL R2.xyz, R2, R3;\n"
- "MUL R2.xyz, R2, c[6].y;\n"
+ "ADD R2.w, -R1, c[7];\n"
+ "MUL R2.xyz, R2, c[7].z;\n"
"MAD R2.xyz, R0.w, R1.w, -R2;\n"
"MAD R2.xyz, R0, R2.w, R2;\n"
"MUL R3.xyz, R0, R2.w;\n"
"MUL R0.xyz, R0, R1;\n"
- "ADD R2.w, -R0, c[4];\n"
- "MAD R0.xyz, R0, c[6].y, R3;\n"
+ "ADD R2.w, -R0, c[7];\n"
+ "MAD R0.xyz, R0, c[7].z, R3;\n"
"MAD R0.xyz, R1, R2.w, R0;\n"
"MAD R2.xyz, R1, R2.w, R2;\n"
- "MUL R1.xyz, R1, c[6].y;\n"
+ "MUL R1.xyz, R1, c[7].z;\n"
"ADD R2.w, R0, R1;\n"
"ADD R2.xyz, R2, -R0;\n"
"SGE R1.xyz, R1, R1.w;\n"
@@ -3401,57 +3304,57 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_DARKEN_NOMASK =
"!!ARBfp1.0\n"
- "PARAM c[8] = { program.local[0..2],\n"
- " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n"
- " { 2.3561945, 0.78539819, -1, 1 },\n"
- " program.local[5],\n"
- " { 0.15915494 },\n"
- " program.local[7] };\n"
+ "PARAM c[8] = { program.local[0..4],\n"
+ " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
+ " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
+ " { 0.33299461, 0.99999565, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "ABS R0.w, R0.x;\n"
- "ABS R0.z, R0.y;\n"
- "ADD R0.z, R0, -R0.w;\n"
- "ADD R0.w, R0.y, c[3].x;\n"
- "ABS R0.z, R0;\n"
- "CMP R0.y, -R0.z, R0, R0.w;\n"
- "ABS R0.z, -R0.y;\n"
- "ADD R0.z, R0, c[3].y;\n"
- "ADD R0.w, R0.x, R0.z;\n"
- "ADD R1.x, R0.z, -R0;\n"
- "RCP R1.y, R0.w;\n"
- "RCP R1.x, R1.x;\n"
- "MUL R0.w, R0, R1.x;\n"
- "ADD R0.z, R0.x, -R0;\n"
- "MUL R0.z, R0, R1.y;\n"
- "CMP R0.z, R0.x, R0.w, R0;\n"
- "MUL R0.w, R0.z, R0.z;\n"
- "MOV R1.x, c[4].y;\n"
- "CMP R0.x, R0, c[4], R1;\n"
- "MAD R0.w, R0, c[3].z, -c[3];\n"
- "MUL R1.xy, fragment.position, c[7];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "CMP R0.y, -R0, c[4].z, c[4].w;\n"
- "MAD R0.x, R0.w, R0.z, R0;\n"
- "MAD R0.x, R0, R0.y, c[5];\n"
- "MUL R0.x, R0, c[6];\n"
+ "ABS R0.z, R0.x;\n"
+ "ABS R0.w, R0.y;\n"
+ "ADD R0.w, R0, -R0.z;\n"
+ "ADD R1.x, R0.y, c[5].y;\n"
+ "ABS R0.w, R0;\n"
+ "CMP R0.y, -R0.w, R0, R1.x;\n"
+ "ABS R0.w, -R0.y;\n"
+ "MAX R1.x, R0.z, R0.w;\n"
+ "RCP R1.y, R1.x;\n"
+ "MIN R1.x, R0.z, R0.w;\n"
+ "MUL R1.x, R1, R1.y;\n"
+ "MUL R1.y, R1.x, R1.x;\n"
+ "MAD R1.z, R1.y, c[6].x, c[6].y;\n"
+ "MAD R1.z, R1, R1.y, -c[6];\n"
+ "MAD R1.z, R1, R1.y, c[6].w;\n"
+ "MAD R1.z, R1, R1.y, -c[7].x;\n"
+ "MAD R1.y, R1.z, R1, c[7];\n"
+ "MUL R1.x, R1.y, R1;\n"
+ "ADD R0.z, -R0, R0.w;\n"
+ "ADD R1.y, -R1.x, c[5].w;\n"
+ "CMP R0.z, -R0, R1.y, R1.x;\n"
+ "ADD R0.w, -R0.z, c[5].z;\n"
+ "CMP R0.x, R0, R0.w, R0.z;\n"
+ "CMP R0.x, -R0.y, -R0, R0;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
+ "TEX R1, R0.zwzw, texture[0], 2D;\n"
+ "ADD R0.x, R0, c[0];\n"
+ "MUL R0.x, R0, c[5];\n"
"FLR R0.y, R0.x;\n"
"ADD R0.x, R0, -R0.y;\n"
"TEX R0, R0, texture[1], 1D;\n"
"MUL R2.xyz, R0, R1.w;\n"
- "MUL R3.xyz, R1, R0.w;\n"
+ "MUL R3.xyz, R0.w, R1;\n"
"MIN R2.xyz, R2, R3;\n"
- "ADD R2.w, -R1, c[4];\n"
+ "ADD R2.w, -R1, c[7].z;\n"
"MAD R0.xyz, R0, R2.w, R2;\n"
"ADD R2.x, R0.w, R1.w;\n"
- "ADD R2.y, -R0.w, c[4].w;\n"
+ "ADD R2.y, -R0.w, c[7].z;\n"
"MAD result.color.xyz, R1, R2.y, R0;\n"
"MAD result.color.w, -R0, R1, R2.x;\n"
"END\n"
@@ -3459,57 +3362,57 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_LIGHTEN_NOMASK =
"!!ARBfp1.0\n"
- "PARAM c[8] = { program.local[0..2],\n"
- " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n"
- " { 2.3561945, 0.78539819, -1, 1 },\n"
- " program.local[5],\n"
- " { 0.15915494 },\n"
- " program.local[7] };\n"
+ "PARAM c[8] = { program.local[0..4],\n"
+ " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
+ " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
+ " { 0.33299461, 0.99999565, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "ABS R0.w, R0.x;\n"
- "ABS R0.z, R0.y;\n"
- "ADD R0.z, R0, -R0.w;\n"
- "ADD R0.w, R0.y, c[3].x;\n"
- "ABS R0.z, R0;\n"
- "CMP R0.y, -R0.z, R0, R0.w;\n"
- "ABS R0.z, -R0.y;\n"
- "ADD R0.z, R0, c[3].y;\n"
- "ADD R0.w, R0.x, R0.z;\n"
- "ADD R1.x, R0.z, -R0;\n"
- "RCP R1.y, R0.w;\n"
- "RCP R1.x, R1.x;\n"
- "MUL R0.w, R0, R1.x;\n"
- "ADD R0.z, R0.x, -R0;\n"
- "MUL R0.z, R0, R1.y;\n"
- "CMP R0.z, R0.x, R0.w, R0;\n"
- "MUL R0.w, R0.z, R0.z;\n"
- "MOV R1.x, c[4].y;\n"
- "CMP R0.x, R0, c[4], R1;\n"
- "MAD R0.w, R0, c[3].z, -c[3];\n"
- "MUL R1.xy, fragment.position, c[7];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "CMP R0.y, -R0, c[4].z, c[4].w;\n"
- "MAD R0.x, R0.w, R0.z, R0;\n"
- "MAD R0.x, R0, R0.y, c[5];\n"
- "MUL R0.x, R0, c[6];\n"
+ "ABS R0.z, R0.x;\n"
+ "ABS R0.w, R0.y;\n"
+ "ADD R0.w, R0, -R0.z;\n"
+ "ADD R1.x, R0.y, c[5].y;\n"
+ "ABS R0.w, R0;\n"
+ "CMP R0.y, -R0.w, R0, R1.x;\n"
+ "ABS R0.w, -R0.y;\n"
+ "MAX R1.x, R0.z, R0.w;\n"
+ "RCP R1.y, R1.x;\n"
+ "MIN R1.x, R0.z, R0.w;\n"
+ "MUL R1.x, R1, R1.y;\n"
+ "MUL R1.y, R1.x, R1.x;\n"
+ "MAD R1.z, R1.y, c[6].x, c[6].y;\n"
+ "MAD R1.z, R1, R1.y, -c[6];\n"
+ "MAD R1.z, R1, R1.y, c[6].w;\n"
+ "MAD R1.z, R1, R1.y, -c[7].x;\n"
+ "MAD R1.y, R1.z, R1, c[7];\n"
+ "MUL R1.x, R1.y, R1;\n"
+ "ADD R0.z, -R0, R0.w;\n"
+ "ADD R1.y, -R1.x, c[5].w;\n"
+ "CMP R0.z, -R0, R1.y, R1.x;\n"
+ "ADD R0.w, -R0.z, c[5].z;\n"
+ "CMP R0.x, R0, R0.w, R0.z;\n"
+ "CMP R0.x, -R0.y, -R0, R0;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
+ "TEX R1, R0.zwzw, texture[0], 2D;\n"
+ "ADD R0.x, R0, c[0];\n"
+ "MUL R0.x, R0, c[5];\n"
"FLR R0.y, R0.x;\n"
"ADD R0.x, R0, -R0.y;\n"
"TEX R0, R0, texture[1], 1D;\n"
"MUL R2.xyz, R0, R1.w;\n"
- "MUL R3.xyz, R1, R0.w;\n"
+ "MUL R3.xyz, R0.w, R1;\n"
"MAX R2.xyz, R2, R3;\n"
- "ADD R2.w, -R1, c[4];\n"
+ "ADD R2.w, -R1, c[7].z;\n"
"MAD R0.xyz, R0, R2.w, R2;\n"
"ADD R2.x, R0.w, R1.w;\n"
- "ADD R2.y, -R0.w, c[4].w;\n"
+ "ADD R2.y, -R0.w, c[7].z;\n"
"MAD result.color.xyz, R1, R2.y, R0;\n"
"MAD result.color.w, -R0, R1, R2.x;\n"
"END\n"
@@ -3517,59 +3420,59 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_COLORDODGE_NOMASK =
"!!ARBfp1.0\n"
- "PARAM c[8] = { program.local[0..2],\n"
- " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n"
- " { 2.3561945, 0.78539819, -1, 1 },\n"
- " program.local[5],\n"
- " { 0.15915494, 1e-06 },\n"
- " program.local[7] };\n"
+ "PARAM c[8] = { program.local[0..4],\n"
+ " { 0.0020000001, -0.01348047, 0.057477314, 0.12123907 },\n"
+ " { 0.19563593, 0.33299461, 0.99999565, 1.5707964 },\n"
+ " { 3.1415927, 0.15915494, 1, 1e-006 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "ABS R0.w, R0.x;\n"
- "ABS R0.z, R0.y;\n"
- "ADD R0.z, R0, -R0.w;\n"
- "ADD R0.w, R0.y, c[3].x;\n"
- "ABS R0.z, R0;\n"
- "CMP R0.y, -R0.z, R0, R0.w;\n"
- "ABS R0.z, -R0.y;\n"
- "ADD R0.z, R0, c[3].y;\n"
- "ADD R0.w, R0.x, R0.z;\n"
- "ADD R1.x, R0.z, -R0;\n"
- "RCP R1.y, R0.w;\n"
- "RCP R1.x, R1.x;\n"
- "MUL R0.w, R0, R1.x;\n"
- "ADD R0.z, R0.x, -R0;\n"
- "MUL R0.z, R0, R1.y;\n"
- "CMP R0.z, R0.x, R0.w, R0;\n"
- "MUL R0.w, R0.z, R0.z;\n"
- "MOV R1.x, c[4].y;\n"
- "CMP R0.x, R0, c[4], R1;\n"
- "MAD R0.w, R0, c[3].z, -c[3];\n"
- "CMP R0.y, -R0, c[4].z, c[4].w;\n"
- "MAD R0.x, R0.w, R0.z, R0;\n"
- "MAD R0.x, R0, R0.y, c[5];\n"
- "MUL R0.x, R0, c[6];\n"
+ "ABS R0.z, R0.x;\n"
+ "ABS R0.w, R0.y;\n"
+ "ADD R0.w, R0, -R0.z;\n"
+ "ADD R1.x, R0.y, c[5];\n"
+ "ABS R0.w, R0;\n"
+ "CMP R0.y, -R0.w, R0, R1.x;\n"
+ "ABS R0.w, -R0.y;\n"
+ "MAX R1.x, R0.z, R0.w;\n"
+ "RCP R1.y, R1.x;\n"
+ "MIN R1.x, R0.z, R0.w;\n"
+ "MUL R1.x, R1, R1.y;\n"
+ "MUL R1.y, R1.x, R1.x;\n"
+ "MAD R1.z, R1.y, c[5].y, c[5];\n"
+ "MAD R1.z, R1, R1.y, -c[5].w;\n"
+ "MAD R1.z, R1, R1.y, c[6].x;\n"
+ "MAD R1.z, R1, R1.y, -c[6].y;\n"
+ "MAD R1.y, R1.z, R1, c[6].z;\n"
+ "MUL R1.x, R1.y, R1;\n"
+ "ADD R1.y, -R1.x, c[6].w;\n"
+ "ADD R0.z, -R0, R0.w;\n"
+ "CMP R0.z, -R0, R1.y, R1.x;\n"
+ "ADD R0.w, -R0.z, c[7].x;\n"
+ "CMP R0.x, R0, R0.w, R0.z;\n"
+ "CMP R0.x, -R0.y, -R0, R0;\n"
+ "ADD R0.x, R0, c[0];\n"
+ "MUL R0.x, R0, c[7].y;\n"
"FLR R0.y, R0.x;\n"
"ADD R0.x, R0, -R0.y;\n"
"TEX R0, R0, texture[1], 1D;\n"
- "MAX R1.x, R0.w, c[6].y;\n"
+ "MAX R1.x, R0.w, c[7].w;\n"
"RCP R1.x, R1.x;\n"
- "MAD R1.xyz, -R0, R1.x, c[4].w;\n"
- "MAX R2.xyz, R1, c[6].y;\n"
- "MUL R1.xy, fragment.position, c[7];\n"
+ "MAD R1.xyz, -R0, R1.x, c[7].z;\n"
+ "MAX R2.xyz, R1, c[7].w;\n"
+ "MUL R1.xy, fragment.position, c[4];\n"
"TEX R1, R1, texture[0], 2D;\n"
- "ADD R2.w, -R0, c[4];\n"
+ "ADD R2.w, -R0, c[7].z;\n"
"MUL R3.xyz, R1, R2.w;\n"
- "ADD R2.w, -R1, c[4];\n"
+ "ADD R2.w, -R1, c[7].z;\n"
"MAD R3.xyz, R0, R2.w, R3;\n"
- "MUL R1.xyz, R1, R0.w;\n"
+ "MUL R1.xyz, R0.w, R1;\n"
"MAD R0.xyz, R0, R1.w, R1;\n"
"MUL R2.w, R0, R1;\n"
"RCP R2.x, R2.x;\n"
@@ -3587,60 +3490,60 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_COLORBURN_NOMASK =
"!!ARBfp1.0\n"
- "PARAM c[8] = { program.local[0..2],\n"
- " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n"
- " { 2.3561945, 0.78539819, -1, 1 },\n"
- " program.local[5],\n"
- " { 0.15915494, 9.9999997e-06 },\n"
- " program.local[7] };\n"
+ "PARAM c[8] = { program.local[0..4],\n"
+ " { 0.0020000001, -0.01348047, 0.057477314, 0.12123907 },\n"
+ " { 0.19563593, 0.33299461, 0.99999565, 1.5707964 },\n"
+ " { 3.1415927, 0.15915494, 1, 9.9999997e-006 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
"TEMP R5;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "ABS R0.w, R0.x;\n"
- "ABS R0.z, R0.y;\n"
- "ADD R0.z, R0, -R0.w;\n"
- "ADD R0.w, R0.y, c[3].x;\n"
- "ABS R0.z, R0;\n"
- "CMP R0.y, -R0.z, R0, R0.w;\n"
- "ABS R0.z, -R0.y;\n"
- "ADD R0.z, R0, c[3].y;\n"
- "ADD R0.w, R0.x, R0.z;\n"
- "ADD R1.x, R0.z, -R0;\n"
- "RCP R1.y, R0.w;\n"
- "RCP R1.x, R1.x;\n"
- "MUL R0.w, R0, R1.x;\n"
- "ADD R0.z, R0.x, -R0;\n"
- "MUL R0.z, R0, R1.y;\n"
- "CMP R0.z, R0.x, R0.w, R0;\n"
- "MUL R0.w, R0.z, R0.z;\n"
- "MOV R1.x, c[4].y;\n"
- "CMP R0.x, R0, c[4], R1;\n"
- "MAD R0.w, R0, c[3].z, -c[3];\n"
- "MUL R1.xy, fragment.position, c[7];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "ADD R2.w, -R1, c[4];\n"
- "CMP R0.y, -R0, c[4].z, c[4].w;\n"
- "MAD R0.x, R0.w, R0.z, R0;\n"
- "MAD R0.x, R0, R0.y, c[5];\n"
- "MUL R0.x, R0, c[6];\n"
+ "ABS R0.z, R0.x;\n"
+ "ABS R0.w, R0.y;\n"
+ "ADD R0.w, R0, -R0.z;\n"
+ "ADD R1.x, R0.y, c[5];\n"
+ "ABS R0.w, R0;\n"
+ "CMP R0.y, -R0.w, R0, R1.x;\n"
+ "ABS R0.w, -R0.y;\n"
+ "MAX R1.x, R0.z, R0.w;\n"
+ "RCP R1.y, R1.x;\n"
+ "MIN R1.x, R0.z, R0.w;\n"
+ "MUL R1.x, R1, R1.y;\n"
+ "MUL R1.y, R1.x, R1.x;\n"
+ "MAD R1.z, R1.y, c[5].y, c[5];\n"
+ "MAD R1.z, R1, R1.y, -c[5].w;\n"
+ "MAD R1.z, R1, R1.y, c[6].x;\n"
+ "MAD R1.z, R1, R1.y, -c[6].y;\n"
+ "MAD R1.y, R1.z, R1, c[6].z;\n"
+ "MUL R1.x, R1.y, R1;\n"
+ "ADD R0.z, -R0, R0.w;\n"
+ "ADD R1.y, -R1.x, c[6].w;\n"
+ "CMP R0.z, -R0, R1.y, R1.x;\n"
+ "ADD R0.w, -R0.z, c[7].x;\n"
+ "CMP R0.x, R0, R0.w, R0.z;\n"
+ "CMP R0.x, -R0.y, -R0, R0;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
+ "TEX R1, R0.zwzw, texture[0], 2D;\n"
+ "ADD R0.x, R0, c[0];\n"
+ "MUL R0.x, R0, c[7].y;\n"
"FLR R0.y, R0.x;\n"
"ADD R0.x, R0, -R0.y;\n"
"TEX R0, R0, texture[1], 1D;\n"
- "MUL R2.xyz, R1, R0.w;\n"
+ "MUL R2.xyz, R0.w, R1;\n"
"MAD R3.xyz, R0, R1.w, R2;\n"
+ "ADD R2.w, -R1, c[7].z;\n"
"MAD R2.xyz, -R0.w, R1.w, R3;\n"
"MUL R4.xyz, R0.w, R2;\n"
- "MAX R2.xyz, R0, c[6].y;\n"
+ "MAX R2.xyz, R0, c[7].w;\n"
"MUL R5.xyz, R0, R2.w;\n"
- "ADD R3.w, -R0, c[4];\n"
+ "ADD R3.w, -R0, c[7].z;\n"
"RCP R2.x, R2.x;\n"
"RCP R2.y, R2.y;\n"
"RCP R2.z, R2.z;\n"
@@ -3659,64 +3562,64 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_HARDLIGHT_NOMASK =
"!!ARBfp1.0\n"
- "PARAM c[8] = { program.local[0..2],\n"
- " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n"
- " { 2.3561945, 0.78539819, -1, 1 },\n"
- " program.local[5],\n"
- " { 0.15915494, 2 },\n"
- " program.local[7] };\n"
+ "PARAM c[8] = { program.local[0..4],\n"
+ " { 0.0020000001, -0.01348047, 0.057477314, 0.12123907 },\n"
+ " { 0.19563593, 0.33299461, 0.99999565, 1.5707964 },\n"
+ " { 3.1415927, 0.15915494, 2, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "ABS R0.w, R0.x;\n"
- "ABS R0.z, R0.y;\n"
- "ADD R0.z, R0, -R0.w;\n"
- "ADD R0.w, R0.y, c[3].x;\n"
- "ABS R0.z, R0;\n"
- "CMP R0.y, -R0.z, R0, R0.w;\n"
- "ABS R0.z, -R0.y;\n"
- "ADD R0.z, R0, c[3].y;\n"
- "ADD R0.w, R0.x, R0.z;\n"
- "ADD R1.x, R0.z, -R0;\n"
- "RCP R1.y, R0.w;\n"
- "RCP R1.x, R1.x;\n"
- "MUL R0.w, R0, R1.x;\n"
- "ADD R0.z, R0.x, -R0;\n"
- "MUL R0.z, R0, R1.y;\n"
- "CMP R0.z, R0.x, R0.w, R0;\n"
- "MUL R0.w, R0.z, R0.z;\n"
- "MOV R1.x, c[4].y;\n"
- "CMP R0.x, R0, c[4], R1;\n"
- "MAD R0.w, R0, c[3].z, -c[3];\n"
- "MUL R1.xy, fragment.position, c[7];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "ADD R2.w, -R1, c[4];\n"
- "CMP R0.y, -R0, c[4].z, c[4].w;\n"
- "MAD R0.x, R0.w, R0.z, R0;\n"
- "MAD R0.x, R0, R0.y, c[5];\n"
- "MUL R0.x, R0, c[6];\n"
+ "ABS R0.z, R0.x;\n"
+ "ABS R0.w, R0.y;\n"
+ "ADD R0.w, R0, -R0.z;\n"
+ "ADD R1.x, R0.y, c[5];\n"
+ "ABS R0.w, R0;\n"
+ "CMP R0.y, -R0.w, R0, R1.x;\n"
+ "ABS R0.w, -R0.y;\n"
+ "MAX R1.x, R0.z, R0.w;\n"
+ "RCP R1.y, R1.x;\n"
+ "MIN R1.x, R0.z, R0.w;\n"
+ "MUL R1.x, R1, R1.y;\n"
+ "MUL R1.y, R1.x, R1.x;\n"
+ "MAD R1.z, R1.y, c[5].y, c[5];\n"
+ "MAD R1.z, R1, R1.y, -c[5].w;\n"
+ "MAD R1.z, R1, R1.y, c[6].x;\n"
+ "MAD R1.z, R1, R1.y, -c[6].y;\n"
+ "MAD R1.y, R1.z, R1, c[6].z;\n"
+ "MUL R1.x, R1.y, R1;\n"
+ "ADD R0.z, -R0, R0.w;\n"
+ "ADD R1.y, -R1.x, c[6].w;\n"
+ "CMP R0.z, -R0, R1.y, R1.x;\n"
+ "ADD R0.w, -R0.z, c[7].x;\n"
+ "CMP R0.x, R0, R0.w, R0.z;\n"
+ "CMP R0.x, -R0.y, -R0, R0;\n"
+ "ADD R0.x, R0, c[0];\n"
+ "MUL R0.x, R0, c[7].y;\n"
"FLR R0.y, R0.x;\n"
"ADD R0.x, R0, -R0.y;\n"
"TEX R0, R0, texture[1], 1D;\n"
+ "MUL R1.xy, fragment.position, c[4];\n"
+ "TEX R1, R1, texture[0], 2D;\n"
+ "ADD R2.w, -R1, c[7];\n"
"ADD R3.xyz, R0.w, -R0;\n"
"ADD R2.xyz, R1.w, -R1;\n"
"MUL R2.xyz, R2, R3;\n"
- "MUL R2.xyz, R2, c[6].y;\n"
+ "MUL R2.xyz, R2, c[7].z;\n"
"MAD R2.xyz, R0.w, R1.w, -R2;\n"
"MUL R4.xyz, R0, R2.w;\n"
"MUL R3.xyz, R0, R1;\n"
"MAD R2.xyz, R0, R2.w, R2;\n"
- "ADD R2.w, -R0, c[4];\n"
- "MUL R0.xyz, R0, c[6].y;\n"
+ "ADD R2.w, -R0, c[7];\n"
+ "MUL R0.xyz, R0, c[7].z;\n"
"MAD R2.xyz, R1, R2.w, R2;\n"
- "MAD R3.xyz, R3, c[6].y, R4;\n"
+ "MAD R3.xyz, R3, c[7].z, R4;\n"
"MAD R1.xyz, R1, R2.w, R3;\n"
"ADD R2.w, R0, R1;\n"
"ADD R2.xyz, R2, -R1;\n"
@@ -3728,13 +3631,11 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_SOFTLIGHT_NOMASK =
"!!ARBfp1.0\n"
- "PARAM c[9] = { program.local[0..2],\n"
- " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n"
- " { 2.3561945, 0.78539819, -1, 1 },\n"
- " program.local[5],\n"
- " { 0.15915494, 9.9999997e-06, 2, 8 },\n"
- " program.local[7],\n"
- " { 3 } };\n"
+ "PARAM c[9] = { program.local[0..4],\n"
+ " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
+ " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
+ " { 0.33299461, 0.99999565, 1, 9.9999997e-006 },\n"
+ " { 2, 3, 8 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -3742,75 +3643,74 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
"TEMP R4;\n"
"TEMP R5;\n"
"TEMP R6;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "ABS R0.w, R0.x;\n"
- "ABS R0.z, R0.y;\n"
- "ADD R0.z, R0, -R0.w;\n"
- "ADD R0.w, R0.y, c[3].x;\n"
- "ABS R0.z, R0;\n"
- "CMP R0.y, -R0.z, R0, R0.w;\n"
- "ABS R0.z, -R0.y;\n"
- "ADD R0.z, R0, c[3].y;\n"
- "ADD R0.w, R0.x, R0.z;\n"
- "ADD R1.x, R0.z, -R0;\n"
- "RCP R1.y, R0.w;\n"
- "RCP R1.x, R1.x;\n"
- "MUL R0.w, R0, R1.x;\n"
- "ADD R0.z, R0.x, -R0;\n"
- "MUL R0.z, R0, R1.y;\n"
- "CMP R0.z, R0.x, R0.w, R0;\n"
- "MOV R1.x, c[4].y;\n"
- "MUL R0.w, R0.z, R0.z;\n"
- "CMP R0.x, R0, c[4], R1;\n"
- "MAD R0.w, R0, c[3].z, -c[3];\n"
- "MAD R0.x, R0.w, R0.z, R0;\n"
- "MUL R0.zw, fragment.position.xyxy, c[7].xyxy;\n"
+ "ABS R0.z, R0.x;\n"
+ "ABS R0.w, R0.y;\n"
+ "ADD R0.w, R0, -R0.z;\n"
+ "ADD R1.x, R0.y, c[5].y;\n"
+ "ABS R0.w, R0;\n"
+ "CMP R0.y, -R0.w, R0, R1.x;\n"
+ "ABS R0.w, -R0.y;\n"
+ "MAX R1.x, R0.z, R0.w;\n"
+ "RCP R1.y, R1.x;\n"
+ "MIN R1.x, R0.z, R0.w;\n"
+ "MUL R1.x, R1, R1.y;\n"
+ "MUL R1.y, R1.x, R1.x;\n"
+ "MAD R1.z, R1.y, c[6].x, c[6].y;\n"
+ "MAD R1.z, R1, R1.y, -c[6];\n"
+ "MAD R1.z, R1, R1.y, c[6].w;\n"
+ "MAD R1.z, R1, R1.y, -c[7].x;\n"
+ "MAD R1.y, R1.z, R1, c[7];\n"
+ "MUL R1.x, R1.y, R1;\n"
+ "ADD R0.z, -R0, R0.w;\n"
+ "ADD R1.y, -R1.x, c[5].w;\n"
+ "CMP R0.z, -R0, R1.y, R1.x;\n"
+ "ADD R0.w, -R0.z, c[5].z;\n"
+ "CMP R0.x, R0, R0.w, R0.z;\n"
+ "CMP R0.x, -R0.y, -R0, R0;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
"TEX R1, R0.zwzw, texture[0], 2D;\n"
- "CMP R0.y, -R0, c[4].z, c[4].w;\n"
- "MAD R0.x, R0, R0.y, c[5];\n"
- "MUL R0.x, R0, c[6];\n"
- "FLR R0.y, R0.x;\n"
- "MAX R0.z, R1.w, c[6].y;\n"
- "RCP R2.w, R0.z;\n"
+ "MAX R2.x, R1.w, c[7].w;\n"
+ "RCP R2.w, R2.x;\n"
"MUL R2.xyz, R1, R2.w;\n"
- "RSQ R3.w, R2.x;\n"
- "RSQ R4.y, R2.z;\n"
- "RCP R4.x, R3.w;\n"
+ "MAD R6.xyz, -R2, c[8].z, c[8].y;\n"
+ "MAD R3.xyz, -R1, R2.w, c[7].z;\n"
+ "RSQ R2.w, R2.x;\n"
+ "RCP R2.x, R2.w;\n"
+ "ADD R0.x, R0, c[0];\n"
+ "MUL R0.x, R0, c[5];\n"
+ "FLR R0.y, R0.x;\n"
"ADD R0.x, R0, -R0.y;\n"
"TEX R0, R0, texture[1], 1D;\n"
- "MAD R3.xyz, R0, c[6].z, -R0.w;\n"
- "RSQ R3.w, R2.y;\n"
- "RCP R4.z, R4.y;\n"
- "RCP R4.y, R3.w;\n"
- "MAD R4.xyz, R4, R1.w, -R1;\n"
- "MUL R6.xyz, R4, R3;\n"
- "MUL R4.xyz, -R2, c[6].w;\n"
- "MAD R2.xyz, -R1, R2.w, c[4].w;\n"
- "ADD R5.xyz, R4, c[8].x;\n"
- "MUL R4.xyz, R2, R3;\n"
- "MAD R4.xyz, -R4, R5, R0.w;\n"
- "MAD R2.xyz, -R2, R3, R0.w;\n"
- "MAD R5.xyz, R1, R0.w, R6;\n"
- "MUL R4.xyz, R1, R4;\n"
- "MUL R6.xyz, R1, c[6].w;\n"
- "ADD R5.xyz, R5, -R4;\n"
- "SGE R6.xyz, R6, R1.w;\n"
- "MUL R5.xyz, R6, R5;\n"
- "ADD R3.xyz, R4, R5;\n"
- "MUL R2.xyz, R1, R2;\n"
- "MUL R4.xyz, R0, c[6].z;\n"
- "ADD R3.xyz, R3, -R2;\n"
+ "MAD R4.xyz, R0, c[8].x, -R0.w;\n"
+ "MUL R5.xyz, R3, R4;\n"
+ "MAD R5.xyz, -R5, R6, R0.w;\n"
+ "MAD R3.xyz, -R3, R4, R0.w;\n"
+ "RSQ R2.z, R2.z;\n"
+ "RSQ R2.y, R2.y;\n"
+ "MUL R5.xyz, R1, R5;\n"
+ "MUL R3.xyz, R1, R3;\n"
+ "RCP R2.z, R2.z;\n"
+ "RCP R2.y, R2.y;\n"
+ "MAD R2.xyz, R1.w, R2, -R1;\n"
+ "MUL R2.xyz, R2, R4;\n"
+ "MAD R2.xyz, R0.w, R1, R2;\n"
+ "ADD R6.xyz, R2, -R5;\n"
+ "MUL R4.xyz, R0, c[8].x;\n"
+ "MUL R2.xyz, R1, c[8].z;\n"
+ "SGE R2.xyz, R2, R1.w;\n"
+ "MAD R2.xyz, R2, R6, R5;\n"
+ "ADD R2.xyz, R2, -R3;\n"
"SGE R4.xyz, R4, R0.w;\n"
- "MUL R3.xyz, R4, R3;\n"
- "ADD R2.xyz, R2, R3;\n"
- "ADD R2.w, -R1, c[4];\n"
+ "MAD R2.xyz, R4, R2, R3;\n"
+ "ADD R2.w, -R1, c[7].z;\n"
"MAD R0.xyz, R0, R2.w, R2;\n"
"ADD R2.x, R0.w, R1.w;\n"
- "ADD R2.y, -R0.w, c[4].w;\n"
+ "ADD R2.y, -R0.w, c[7].z;\n"
"MAD result.color.xyz, R1, R2.y, R0;\n"
"MAD result.color.w, -R0, R1, R2.x;\n"
"END\n"
@@ -3818,114 +3718,114 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_DIFFERENCE_NOMASK =
"!!ARBfp1.0\n"
- "PARAM c[8] = { program.local[0..2],\n"
- " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n"
- " { 2.3561945, 0.78539819, -1, 1 },\n"
- " program.local[5],\n"
- " { 0.15915494, 2 },\n"
- " program.local[7] };\n"
+ "PARAM c[8] = { program.local[0..4],\n"
+ " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
+ " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
+ " { 0.33299461, 0.99999565, 2 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "ABS R0.w, R0.x;\n"
- "ABS R0.z, R0.y;\n"
- "ADD R0.z, R0, -R0.w;\n"
- "ADD R0.w, R0.y, c[3].x;\n"
- "ABS R0.z, R0;\n"
- "CMP R0.y, -R0.z, R0, R0.w;\n"
- "ABS R0.z, -R0.y;\n"
- "ADD R0.z, R0, c[3].y;\n"
- "ADD R0.w, R0.x, R0.z;\n"
- "ADD R1.x, R0.z, -R0;\n"
- "RCP R1.y, R0.w;\n"
- "RCP R1.x, R1.x;\n"
- "MUL R0.w, R0, R1.x;\n"
- "ADD R0.z, R0.x, -R0;\n"
- "MUL R0.z, R0, R1.y;\n"
- "CMP R0.z, R0.x, R0.w, R0;\n"
- "MUL R0.w, R0.z, R0.z;\n"
- "MOV R1.x, c[4].y;\n"
- "CMP R0.x, R0, c[4], R1;\n"
- "MAD R0.w, R0, c[3].z, -c[3];\n"
- "MUL R1.xy, fragment.position, c[7];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "CMP R0.y, -R0, c[4].z, c[4].w;\n"
- "MAD R0.x, R0.w, R0.z, R0;\n"
- "MAD R0.x, R0, R0.y, c[5];\n"
- "MUL R0.x, R0, c[6];\n"
+ "ABS R0.z, R0.x;\n"
+ "ABS R0.w, R0.y;\n"
+ "ADD R0.w, R0, -R0.z;\n"
+ "ADD R1.x, R0.y, c[5].y;\n"
+ "ABS R0.w, R0;\n"
+ "CMP R0.y, -R0.w, R0, R1.x;\n"
+ "ABS R0.w, -R0.y;\n"
+ "MAX R1.x, R0.z, R0.w;\n"
+ "RCP R1.y, R1.x;\n"
+ "MIN R1.x, R0.z, R0.w;\n"
+ "MUL R1.x, R1, R1.y;\n"
+ "MUL R1.y, R1.x, R1.x;\n"
+ "MAD R1.z, R1.y, c[6].x, c[6].y;\n"
+ "MAD R1.z, R1, R1.y, -c[6];\n"
+ "MAD R1.z, R1, R1.y, c[6].w;\n"
+ "MAD R1.z, R1, R1.y, -c[7].x;\n"
+ "MAD R1.y, R1.z, R1, c[7];\n"
+ "MUL R1.x, R1.y, R1;\n"
+ "ADD R0.z, -R0, R0.w;\n"
+ "ADD R1.y, -R1.x, c[5].w;\n"
+ "CMP R0.z, -R0, R1.y, R1.x;\n"
+ "ADD R0.w, -R0.z, c[5].z;\n"
+ "CMP R0.x, R0, R0.w, R0.z;\n"
+ "CMP R0.x, -R0.y, -R0, R0;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
+ "ADD R0.x, R0, c[0];\n"
+ "MUL R0.x, R0, c[5];\n"
"FLR R0.y, R0.x;\n"
+ "TEX R1, R0.zwzw, texture[0], 2D;\n"
"ADD R0.x, R0, -R0.y;\n"
"TEX R0, R0, texture[1], 1D;\n"
"MUL R2.xyz, R0, R1.w;\n"
- "MUL R3.xyz, R1, R0.w;\n"
+ "MUL R3.xyz, R0.w, R1;\n"
"ADD R0.xyz, R0, R1;\n"
"MIN R2.xyz, R2, R3;\n"
"ADD R1.x, R0.w, R1.w;\n"
- "MAD result.color.xyz, -R2, c[6].y, R0;\n"
+ "MAD result.color.xyz, -R2, c[7].z, R0;\n"
"MAD result.color.w, -R0, R1, R1.x;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_EXCLUSION_NOMASK =
"!!ARBfp1.0\n"
- "PARAM c[8] = { program.local[0..2],\n"
- " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n"
- " { 2.3561945, 0.78539819, -1, 1 },\n"
- " program.local[5],\n"
- " { 0.15915494, 2 },\n"
- " program.local[7] };\n"
+ "PARAM c[8] = { program.local[0..4],\n"
+ " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
+ " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
+ " { 0.33299461, 0.99999565, 2, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "ABS R0.w, R0.x;\n"
- "ABS R0.z, R0.y;\n"
- "ADD R0.z, R0, -R0.w;\n"
- "ADD R0.w, R0.y, c[3].x;\n"
- "ABS R0.z, R0;\n"
- "CMP R0.y, -R0.z, R0, R0.w;\n"
- "ABS R0.z, -R0.y;\n"
- "ADD R0.z, R0, c[3].y;\n"
- "ADD R0.w, R0.x, R0.z;\n"
- "ADD R1.x, R0.z, -R0;\n"
- "RCP R1.y, R0.w;\n"
- "RCP R1.x, R1.x;\n"
- "MUL R0.w, R0, R1.x;\n"
- "ADD R0.z, R0.x, -R0;\n"
- "MUL R0.z, R0, R1.y;\n"
- "CMP R0.z, R0.x, R0.w, R0;\n"
- "MUL R0.w, R0.z, R0.z;\n"
- "MOV R1.x, c[4].y;\n"
- "CMP R0.x, R0, c[4], R1;\n"
- "MAD R0.w, R0, c[3].z, -c[3];\n"
- "MUL R1.xy, fragment.position, c[7];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "CMP R0.y, -R0, c[4].z, c[4].w;\n"
- "MAD R0.x, R0.w, R0.z, R0;\n"
- "MAD R0.x, R0, R0.y, c[5];\n"
- "MUL R0.x, R0, c[6];\n"
+ "ABS R0.z, R0.x;\n"
+ "ABS R0.w, R0.y;\n"
+ "ADD R0.w, R0, -R0.z;\n"
+ "ADD R1.x, R0.y, c[5].y;\n"
+ "ABS R0.w, R0;\n"
+ "CMP R0.y, -R0.w, R0, R1.x;\n"
+ "ABS R0.w, -R0.y;\n"
+ "MAX R1.x, R0.z, R0.w;\n"
+ "RCP R1.y, R1.x;\n"
+ "MIN R1.x, R0.z, R0.w;\n"
+ "MUL R1.x, R1, R1.y;\n"
+ "MUL R1.y, R1.x, R1.x;\n"
+ "MAD R1.z, R1.y, c[6].x, c[6].y;\n"
+ "MAD R1.z, R1, R1.y, -c[6];\n"
+ "MAD R1.z, R1, R1.y, c[6].w;\n"
+ "MAD R1.z, R1, R1.y, -c[7].x;\n"
+ "MAD R1.y, R1.z, R1, c[7];\n"
+ "MUL R1.x, R1.y, R1;\n"
+ "ADD R0.z, -R0, R0.w;\n"
+ "ADD R1.y, -R1.x, c[5].w;\n"
+ "CMP R0.z, -R0, R1.y, R1.x;\n"
+ "ADD R0.w, -R0.z, c[5].z;\n"
+ "CMP R0.x, R0, R0.w, R0.z;\n"
+ "CMP R0.x, -R0.y, -R0, R0;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
+ "TEX R1, R0.zwzw, texture[0], 2D;\n"
+ "ADD R0.x, R0, c[0];\n"
+ "MUL R0.x, R0, c[5];\n"
"FLR R0.y, R0.x;\n"
"ADD R0.x, R0, -R0.y;\n"
"TEX R0, R0, texture[1], 1D;\n"
- "MUL R2.xyz, R1, R0.w;\n"
+ "MUL R2.xyz, R0.w, R1;\n"
"MAD R3.xyz, R0, R1.w, R2;\n"
"MUL R2.xyz, R0, R1;\n"
- "MAD R2.xyz, -R2, c[6].y, R3;\n"
- "ADD R2.w, -R1, c[4];\n"
+ "MAD R2.xyz, -R2, c[7].z, R3;\n"
+ "ADD R2.w, -R1, c[7];\n"
"MAD R0.xyz, R0, R2.w, R2;\n"
"ADD R2.x, R0.w, R1.w;\n"
- "ADD R2.y, -R0.w, c[4].w;\n"
+ "ADD R2.y, -R0.w, c[7].w;\n"
"MAD result.color.xyz, R1, R2.y, R0;\n"
"MAD result.color.w, -R0, R1, R2.x;\n"
"END\n"
@@ -3933,49 +3833,49 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODE_BLEND_MODE_MASK =
"!!ARBfp1.0\n"
- "PARAM c[10] = { program.local[0..2],\n"
- " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n"
- " { 2.3561945, 0.78539819, -1, 1 },\n"
- " program.local[5],\n"
- " { 0.15915494 },\n"
- " program.local[7..9] };\n"
+ "PARAM c[10] = { program.local[0..6],\n"
+ " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
+ " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
+ " { 0.33299461, 0.99999565 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "ABS R0.w, R0.x;\n"
- "ABS R0.z, R0.y;\n"
- "ADD R0.z, R0, -R0.w;\n"
- "ADD R0.w, R0.y, c[3].x;\n"
- "ABS R0.z, R0;\n"
- "CMP R0.y, -R0.z, R0, R0.w;\n"
- "ABS R0.z, -R0.y;\n"
- "ADD R0.z, R0, c[3].y;\n"
- "ADD R0.w, R0.x, R0.z;\n"
- "ADD R1.x, R0.z, -R0;\n"
- "RCP R1.y, R0.w;\n"
- "RCP R1.x, R1.x;\n"
- "MUL R0.w, R0, R1.x;\n"
- "ADD R0.z, R0.x, -R0;\n"
- "MUL R0.z, R0, R1.y;\n"
- "CMP R0.z, R0.x, R0.w, R0;\n"
- "MUL R0.w, R0.z, R0.z;\n"
- "MOV R1.x, c[4].y;\n"
- "CMP R0.x, R0, c[4], R1;\n"
- "MAD R0.w, R0, c[3].z, -c[3];\n"
- "MAD R0.x, R0.w, R0.z, R0;\n"
- "CMP R0.y, -R0, c[4].z, c[4].w;\n"
- "MAD R0.z, R0.x, R0.y, c[5].x;\n"
- "MUL R1.x, R0.z, c[6];\n"
+ "ABS R0.z, R0.x;\n"
+ "ABS R0.w, R0.y;\n"
+ "ADD R0.w, R0, -R0.z;\n"
+ "ADD R1.x, R0.y, c[7].y;\n"
+ "ABS R0.w, R0;\n"
+ "CMP R0.y, -R0.w, R0, R1.x;\n"
+ "ABS R0.w, -R0.y;\n"
+ "MAX R1.x, R0.z, R0.w;\n"
+ "RCP R1.y, R1.x;\n"
+ "MIN R1.x, R0.z, R0.w;\n"
+ "MUL R1.x, R1, R1.y;\n"
+ "MUL R1.y, R1.x, R1.x;\n"
+ "MAD R1.z, R1.y, c[8].x, c[8].y;\n"
+ "MAD R1.z, R1, R1.y, -c[8];\n"
+ "MAD R1.z, R1, R1.y, c[8].w;\n"
+ "MAD R1.z, R1, R1.y, -c[9].x;\n"
+ "MAD R1.y, R1.z, R1, c[9];\n"
+ "MUL R1.x, R1.y, R1;\n"
+ "ADD R1.y, -R1.x, c[7].w;\n"
+ "ADD R0.z, -R0, R0.w;\n"
+ "CMP R0.z, -R0, R1.y, R1.x;\n"
+ "ADD R0.w, -R0.z, c[7].z;\n"
+ "CMP R0.x, R0, R0.w, R0.z;\n"
+ "CMP R0.x, -R0.y, -R0, R0;\n"
+ "ADD R0.z, R0.x, c[0].x;\n"
+ "MUL R1.x, R0.z, c[7];\n"
"FLR R1.y, R1.x;\n"
- "ADD R0.xy, fragment.position, c[7];\n"
- "MUL R0.xy, R0, c[8];\n"
+ "ADD R0.xy, fragment.position, c[5];\n"
+ "MUL R0.xy, R0, c[4];\n"
"TEX R0, R0, texture[0], 2D;\n"
"ADD R1.x, R1, -R1.y;\n"
- "DP4 R1.y, R0, c[9];\n"
+ "DP4 R1.y, R0, c[6];\n"
"TEX R0, R1, texture[1], 1D;\n"
"MUL result.color, R0, R1.y;\n"
"END\n"
@@ -3983,42 +3883,43 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODE_BLEND_MODE_NOMASK =
"!!ARBfp1.0\n"
- "PARAM c[7] = { program.local[0..2],\n"
- " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n"
- " { 2.3561945, 0.78539819, -1, 1 },\n"
- " program.local[5],\n"
- " { 0.15915494 } };\n"
+ "PARAM c[7] = { program.local[0..3],\n"
+ " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
+ " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
+ " { 0.33299461, 0.99999565 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "ABS R0.w, R0.x;\n"
- "ABS R0.z, R0.y;\n"
- "ADD R0.z, R0, -R0.w;\n"
- "ADD R0.w, R0.y, c[3].x;\n"
- "ABS R0.z, R0;\n"
- "CMP R0.y, -R0.z, R0, R0.w;\n"
- "ABS R0.z, -R0.y;\n"
- "ADD R0.z, R0, c[3].y;\n"
- "ADD R0.w, R0.x, R0.z;\n"
- "ADD R1.x, R0.z, -R0;\n"
- "RCP R1.x, R1.x;\n"
- "RCP R1.y, R0.w;\n"
- "MUL R0.w, R0, R1.x;\n"
- "ADD R0.z, R0.x, -R0;\n"
- "MUL R0.z, R0, R1.y;\n"
- "CMP R0.z, R0.x, R0.w, R0;\n"
- "MUL R0.w, R0.z, R0.z;\n"
- "MOV R1.x, c[4].y;\n"
- "CMP R0.y, -R0, c[4].z, c[4].w;\n"
- "MAD R0.w, R0, c[3].z, -c[3];\n"
- "CMP R0.x, R0, c[4], R1;\n"
- "MAD R0.x, R0.w, R0.z, R0;\n"
- "MAD R0.x, R0, R0.y, c[5];\n"
- "MUL R0.x, R0, c[6];\n"
+ "ABS R0.z, R0.x;\n"
+ "ABS R0.w, R0.y;\n"
+ "ADD R0.w, R0, -R0.z;\n"
+ "ADD R1.x, R0.y, c[4].y;\n"
+ "ABS R0.w, R0;\n"
+ "CMP R0.y, -R0.w, R0, R1.x;\n"
+ "ABS R0.w, -R0.y;\n"
+ "MAX R1.x, R0.z, R0.w;\n"
+ "RCP R1.y, R1.x;\n"
+ "MIN R1.x, R0.z, R0.w;\n"
+ "MUL R1.x, R1, R1.y;\n"
+ "MUL R1.y, R1.x, R1.x;\n"
+ "MAD R1.z, R1.y, c[5].x, c[5].y;\n"
+ "MAD R1.z, R1, R1.y, -c[5];\n"
+ "MAD R1.z, R1, R1.y, c[5].w;\n"
+ "MAD R1.z, R1, R1.y, -c[6].x;\n"
+ "MAD R1.y, R1.z, R1, c[6];\n"
+ "MUL R1.x, R1.y, R1;\n"
+ "ADD R0.z, -R0, R0.w;\n"
+ "ADD R1.y, -R1.x, c[4].w;\n"
+ "CMP R0.z, -R0, R1.y, R1.x;\n"
+ "ADD R0.w, -R0.z, c[4].z;\n"
+ "CMP R0.x, R0, R0.w, R0.z;\n"
+ "CMP R0.x, -R0.y, -R0, R0;\n"
+ "ADD R0.x, R0, c[0];\n"
+ "MUL R0.x, R0, c[4];\n"
"FLR R0.y, R0.x;\n"
"ADD R0.x, R0, -R0.y;\n"
"TEX result.color, R0, texture[0], 1D;\n"
@@ -4027,45 +3928,43 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MODES_SIMPLE_PORTER_DUFF =
"!!ARBfp1.0\n"
- "PARAM c[11] = { program.local[0..7],\n"
- " { 1 },\n"
- " program.local[9..10] };\n"
+ "PARAM c[11] = { program.local[0..9],\n"
+ " { 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[6];\n"
- "ADD R0.x, R0, R0.y;\n"
- "MUL R0.zw, fragment.position.xyxy, c[7].xyxy;\n"
- "TEX R1, R0.zwzw, texture[0], 2D;\n"
- "MUL R0.x, R0, c[6].z;\n"
- "TEX R0, R0, texture[2], 1D;\n"
- "MUL R2.xyz, R1, c[10].y;\n"
- "MUL R3.xyz, R2, R0.w;\n"
- "MUL R2.xyz, R0, c[10].x;\n"
- "MAD R2.xyz, R2, R1.w, R3;\n"
- "ADD R3.xy, fragment.position, c[0];\n"
- "MUL R0.xyz, R0, c[9].y;\n"
- "ADD R2.w, -R1, c[8].x;\n"
- "MAD R2.xyz, R0, R2.w, R2;\n"
- "MUL R0.xyz, R1, c[9].z;\n"
- "ADD R2.w, -R0, c[8].x;\n"
- "MAD R2.xyz, R0, R2.w, R2;\n"
- "ADD R0.y, -R1.w, c[8].x;\n"
- "MUL R0.z, R1.w, R2.w;\n"
- "MUL R0.x, R0.w, R1.w;\n"
- "MUL R0.y, R0.w, R0;\n"
- "DP3 R2.w, R0, c[9];\n"
- "MUL R3.xy, R3, c[1];\n"
- "TEX R0, R3, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "MUL R0.zw, R0.xyxy, c[0].xyxy;\n"
+ "ADD R1.x, R0.z, R0.w;\n"
+ "MUL R0.xy, fragment.position, c[7];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "MUL R1.x, R1, c[0].z;\n"
+ "TEX R1, R1, texture[2], 1D;\n"
+ "MUL R2.xyz, R0, c[4].y;\n"
+ "MUL R3.xyz, R1.w, R2;\n"
+ "MUL R2.xyz, R1, c[4].x;\n"
+ "MAD R2.xyz, R0.w, R2, R3;\n"
+ "ADD R3.xy, fragment.position, c[8];\n"
+ "ADD R2.w, -R0, c[10].x;\n"
+ "MUL R1.xyz, R1, c[5].y;\n"
+ "MAD R2.xyz, R2.w, R1, R2;\n"
+ "MUL R1.xyz, R0, c[5].z;\n"
+ "ADD R3.z, -R1.w, c[10].x;\n"
+ "MAD R2.xyz, R3.z, R1, R2;\n"
+ "MUL R1.y, R1.w, R2.w;\n"
+ "MUL R1.x, R1.w, R0.w;\n"
+ "MUL R1.z, R0.w, R3;\n"
+ "DP3 R2.w, R1, c[5];\n"
+ "MUL R3.xy, R3, c[6];\n"
+ "TEX R1, R3, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[9];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
@@ -4076,30 +3975,30 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[6];\n"
- "ADD R0.x, R0, R0.y;\n"
- "MUL R0.zw, fragment.position.xyxy, c[7].xyxy;\n"
- "TEX R1, R0.zwzw, texture[0], 2D;\n"
- "MUL R0.x, R0, c[6].z;\n"
- "TEX R0, R0, texture[2], 1D;\n"
- "ADD R2.x, -R1.w, c[8];\n"
- "MUL R2.xyz, R0, R2.x;\n"
- "MAD R0.xyz, R0, R1, R2;\n"
+ "MUL R0.zw, R0.xyxy, c[0].xyxy;\n"
+ "ADD R1.x, R0.z, R0.w;\n"
+ "MUL R0.xy, fragment.position, c[5];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "MUL R1.x, R1, c[0].z;\n"
+ "TEX R1, R1, texture[2], 1D;\n"
"ADD R2.x, -R0.w, c[8];\n"
- "MAD R2.xyz, R1, R2.x, R0;\n"
- "ADD R0.z, R0.w, R1.w;\n"
- "MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "MUL R2.xyz, R1, R2.x;\n"
+ "MAD R1.xyz, R1, R0, R2;\n"
+ "ADD R2.x, -R1.w, c[8];\n"
+ "MAD R2.xyz, R0, R2.x, R1;\n"
+ "ADD R1.z, R1.w, R0.w;\n"
+ "MAD R2.w, -R1, R0, R1.z;\n"
+ "ADD R1.xy, fragment.position, c[6];\n"
+ "MUL R1.xy, R1, c[4];\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[7];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
@@ -4110,25 +4009,25 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[6];\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.x, R0, c[6].z;\n"
- "MUL R1.xy, fragment.position, c[7];\n"
- "ADD R3.xy, fragment.position, c[0];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "TEX R0, R0, texture[2], 1D;\n"
- "ADD R2, R0, R1;\n"
- "MAD R2, -R0, R1, R2;\n"
- "MUL R3.xy, R3, c[1];\n"
- "TEX R0, R3, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "MUL R0.z, R0.x, c[0];\n"
+ "ADD R3.xy, fragment.position, c[6];\n"
+ "TEX R1, R0.z, texture[2], 1D;\n"
+ "MUL R0.xy, fragment.position, c[5];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "ADD R2, R1, R0;\n"
+ "MAD R2, -R1, R0, R2;\n"
+ "MUL R3.xy, R3, c[4];\n"
+ "TEX R1, R3, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[7];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
@@ -4141,16 +4040,16 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[6];\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.x, R0, c[6].z;\n"
+ "MUL R0.x, R0, c[0].z;\n"
"TEX R0, R0, texture[2], 1D;\n"
- "MUL R1.xy, fragment.position, c[7];\n"
+ "MUL R1.xy, fragment.position, c[5];\n"
"TEX R1, R1, texture[0], 2D;\n"
"ADD R2.w, -R1, c[8].y;\n"
"ADD R3.xyz, R0.w, -R0;\n"
@@ -4171,11 +4070,11 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
"MAD R2.xyz, R2, R0, R3;\n"
"ADD R0.z, R0.w, R1.w;\n"
"MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
+ "ADD R0.xy, fragment.position, c[6];\n"
+ "MUL R0.xy, R0, c[4];\n"
"TEX R0, R0, texture[1], 2D;\n"
"ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
+ "DP4 R0.x, R0, c[7];\n"
"MAD result.color, R0.x, R2, R1;\n"
"END\n"
;
@@ -4188,32 +4087,32 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[6];\n"
- "ADD R0.x, R0, R0.y;\n"
- "MUL R0.x, R0, c[6].z;\n"
- "MUL R1.xy, fragment.position, c[7];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "TEX R0, R0, texture[2], 1D;\n"
- "MUL R3.xyz, R1, R0.w;\n"
- "MUL R2.xyz, R0, R1.w;\n"
+ "MUL R0.xy, R0, c[0];\n"
+ "ADD R0.z, R0.x, R0.y;\n"
+ "MUL R1.x, R0.z, c[0].z;\n"
+ "MUL R0.xy, fragment.position, c[5];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "TEX R1, R1, texture[2], 1D;\n"
+ "MUL R3.xyz, R1.w, R0;\n"
+ "MUL R2.xyz, R1, R0.w;\n"
"MIN R2.xyz, R2, R3;\n"
- "ADD R2.w, -R1, c[8].x;\n"
- "MAD R0.xyz, R0, R2.w, R2;\n"
- "ADD R2.x, -R0.w, c[8];\n"
- "MAD R2.xyz, R1, R2.x, R0;\n"
- "ADD R0.z, R0.w, R1.w;\n"
- "MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "ADD R2.w, -R0, c[8].x;\n"
+ "MAD R1.xyz, R1, R2.w, R2;\n"
+ "ADD R2.x, -R1.w, c[8];\n"
+ "MAD R2.xyz, R0, R2.x, R1;\n"
+ "ADD R1.z, R1.w, R0.w;\n"
+ "MAD R2.w, -R1, R0, R1.z;\n"
+ "ADD R1.xy, fragment.position, c[6];\n"
+ "MUL R1.xy, R1, c[4];\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[7];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
@@ -4225,64 +4124,64 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[6];\n"
- "ADD R0.x, R0, R0.y;\n"
- "MUL R0.x, R0, c[6].z;\n"
- "MUL R1.xy, fragment.position, c[7];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "TEX R0, R0, texture[2], 1D;\n"
- "MUL R3.xyz, R1, R0.w;\n"
- "MUL R2.xyz, R0, R1.w;\n"
+ "MUL R0.xy, R0, c[0];\n"
+ "ADD R0.z, R0.x, R0.y;\n"
+ "MUL R1.x, R0.z, c[0].z;\n"
+ "MUL R0.xy, fragment.position, c[5];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "TEX R1, R1, texture[2], 1D;\n"
+ "MUL R3.xyz, R1.w, R0;\n"
+ "MUL R2.xyz, R1, R0.w;\n"
"MAX R2.xyz, R2, R3;\n"
- "ADD R2.w, -R1, c[8].x;\n"
- "MAD R0.xyz, R0, R2.w, R2;\n"
- "ADD R2.x, -R0.w, c[8];\n"
- "MAD R2.xyz, R1, R2.x, R0;\n"
- "ADD R0.z, R0.w, R1.w;\n"
- "MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "ADD R2.w, -R0, c[8].x;\n"
+ "MAD R1.xyz, R1, R2.w, R2;\n"
+ "ADD R2.x, -R1.w, c[8];\n"
+ "MAD R2.xyz, R0, R2.x, R1;\n"
+ "ADD R1.z, R1.w, R0.w;\n"
+ "MAD R2.w, -R1, R0, R1.z;\n"
+ "ADD R1.xy, fragment.position, c[6];\n"
+ "MUL R1.xy, R1, c[4];\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[7];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MODES_COLORDODGE =
"!!ARBfp1.0\n"
"PARAM c[9] = { program.local[0..7],\n"
- " { 1, 1e-06 } };\n"
+ " { 1, 1e-006 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[6];\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.x, R0, c[6].z;\n"
+ "MUL R0.x, R0, c[0].z;\n"
"TEX R0, R0, texture[2], 1D;\n"
"MAX R1.x, R0.w, c[8].y;\n"
"RCP R1.x, R1.x;\n"
"MAD R2.xyz, -R0, R1.x, c[8].x;\n"
"MAX R2.xyz, R2, c[8].y;\n"
- "MUL R1.xy, fragment.position, c[7];\n"
+ "MUL R1.xy, fragment.position, c[5];\n"
"TEX R1, R1, texture[0], 2D;\n"
"ADD R2.w, -R0, c[8].x;\n"
"MUL R3.xyz, R1, R2.w;\n"
"ADD R2.w, -R1, c[8].x;\n"
"MAD R4.xyz, R0, R2.w, R3;\n"
- "MUL R3.xyz, R1, R0.w;\n"
+ "MUL R3.xyz, R0.w, R1;\n"
"MUL R2.w, R0, R1;\n"
"MAD R0.xyz, R0, R1.w, R3;\n"
"SGE R0.xyz, R0, R2.w;\n"
@@ -4295,11 +4194,11 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
"MAD R2.xyz, R0, R4, R2;\n"
"ADD R0.z, R0.w, R1.w;\n"
"MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
+ "ADD R0.xy, fragment.position, c[6];\n"
+ "MUL R0.xy, R0, c[4];\n"
"TEX R0, R0, texture[1], 2D;\n"
"ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
+ "DP4 R0.x, R0, c[7];\n"
"MAD result.color, R0.x, R2, R1;\n"
"END\n"
;
@@ -4307,25 +4206,25 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MODES_COLORBURN =
"!!ARBfp1.0\n"
"PARAM c[9] = { program.local[0..7],\n"
- " { 1, 9.9999997e-06 } };\n"
+ " { 1, 9.9999997e-006 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
"TEMP R5;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[6];\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.x, R0, c[6].z;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n"
+ "TEX R1, R0.zwzw, texture[0], 2D;\n"
+ "MUL R0.x, R0, c[0].z;\n"
"TEX R0, R0, texture[2], 1D;\n"
- "MUL R1.xy, fragment.position, c[7];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "MUL R2.xyz, R1, R0.w;\n"
+ "MUL R2.xyz, R0.w, R1;\n"
"MAD R3.xyz, R0, R1.w, R2;\n"
"MAD R2.xyz, -R0.w, R1.w, R3;\n"
"MUL R4.xyz, R0.w, R2;\n"
@@ -4340,18 +4239,17 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
"MUL R4.xyz, R1, R3.w;\n"
"MAD R0.xyz, R0, R2.w, R4;\n"
"MUL R2.w, R0, R1;\n"
- "ADD R3.w, -R0, c[8].x;\n"
"MAD R2.xyz, R1, R3.w, R2;\n"
"ADD R2.xyz, R2, -R0;\n"
"SGE R3.xyz, R3, R2.w;\n"
"MAD R2.xyz, R3, R2, R0;\n"
"ADD R0.z, R0.w, R1.w;\n"
"MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
+ "ADD R0.xy, fragment.position, c[6];\n"
+ "MUL R0.xy, R0, c[4];\n"
"TEX R0, R0, texture[1], 2D;\n"
"ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
+ "DP4 R0.x, R0, c[7];\n"
"MAD result.color, R0.x, R2, R1;\n"
"END\n"
;
@@ -4365,16 +4263,16 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[6];\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.x, R0, c[6].z;\n"
+ "MUL R0.x, R0, c[0].z;\n"
"TEX R0, R0, texture[2], 1D;\n"
- "MUL R1.xy, fragment.position, c[7];\n"
+ "MUL R1.xy, fragment.position, c[5];\n"
"TEX R1, R1, texture[0], 2D;\n"
"ADD R2.w, -R1, c[8].y;\n"
"ADD R3.xyz, R0.w, -R0;\n"
@@ -4395,11 +4293,11 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
"MAD R2.xyz, R0, R2, R3;\n"
"ADD R0.z, R0.w, R1.w;\n"
"MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
+ "ADD R0.xy, fragment.position, c[6];\n"
+ "MUL R0.xy, R0, c[4];\n"
"TEX R0, R0, texture[1], 2D;\n"
"ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
+ "DP4 R0.x, R0, c[7];\n"
"MAD result.color, R0.x, R2, R1;\n"
"END\n"
;
@@ -4407,8 +4305,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MODES_SOFTLIGHT =
"!!ARBfp1.0\n"
"PARAM c[10] = { program.local[0..7],\n"
- " { 1, 9.9999997e-06, 2, 8 },\n"
- " { 3 } };\n"
+ " { 1, 9.9999997e-006, 2, 3 },\n"
+ " { 8 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -4416,60 +4314,58 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
"TEMP R4;\n"
"TEMP R5;\n"
"TEMP R6;\n"
- "MUL R2.xyz, fragment.position.y, c[4];\n"
- "MAD R3.xyz, fragment.position.x, c[3], R2;\n"
- "MUL R0.xy, fragment.position, c[7];\n"
- "TEX R1, R0, texture[0], 2D;\n"
- "MAX R0.x, R1.w, c[8].y;\n"
- "RCP R2.w, R0.x;\n"
- "MUL R0.xyz, R1, R2.w;\n"
- "RSQ R0.w, R0.x;\n"
- "RSQ R2.y, R0.y;\n"
- "ADD R3.xyz, R3, c[5];\n"
- "RCP R2.x, R0.w;\n"
- "RCP R0.w, R3.z;\n"
- "MUL R3.xy, R3, R0.w;\n"
- "RSQ R0.w, R0.z;\n"
- "RCP R2.z, R0.w;\n"
+ "MUL R2.xyz, fragment.position.y, c[2];\n"
+ "MAD R3.xyz, fragment.position.x, c[1], R2;\n"
+ "MUL R0.xy, fragment.position, c[5];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "MAX R1.x, R0.w, c[8].y;\n"
+ "RCP R2.w, R1.x;\n"
+ "MUL R1.xyz, R0, R2.w;\n"
+ "RSQ R1.w, R1.x;\n"
+ "RSQ R2.y, R1.y;\n"
+ "ADD R3.xyz, R3, c[3];\n"
+ "RCP R2.x, R1.w;\n"
+ "RCP R1.w, R3.z;\n"
+ "MUL R3.xy, R3, R1.w;\n"
+ "RSQ R1.w, R1.z;\n"
+ "RCP R2.z, R1.w;\n"
"RCP R2.y, R2.y;\n"
- "MAD R6.xyz, R2, R1.w, -R1;\n"
- "MUL R2.xyz, -R0, c[8].w;\n"
- "ADD R5.xyz, R2, c[9].x;\n"
- "MAD R2.xyz, -R1, R2.w, c[8].x;\n"
- "MUL R3.xy, R3, c[6];\n"
- "ADD R0.w, R3.x, R3.y;\n"
- "MUL R0.w, R0, c[6].z;\n"
- "TEX R0, R0.w, texture[2], 1D;\n"
- "MAD R3.xyz, R0, c[8].z, -R0.w;\n"
+ "MAD R6.xyz, R0.w, R2, -R0;\n"
+ "MUL R2.xyz, -R1, c[9].x;\n"
+ "ADD R5.xyz, R2, c[8].w;\n"
+ "MAD R2.xyz, -R0, R2.w, c[8].x;\n"
+ "MUL R3.xy, R3, c[0];\n"
+ "ADD R1.w, R3.x, R3.y;\n"
+ "MUL R1.w, R1, c[0].z;\n"
+ "TEX R1, R1.w, texture[2], 1D;\n"
+ "MAD R3.xyz, R1, c[8].z, -R1.w;\n"
"MUL R4.xyz, R2, R3;\n"
- "MAD R4.xyz, -R4, R5, R0.w;\n"
+ "MAD R4.xyz, -R4, R5, R1.w;\n"
+ "MAD R2.xyz, -R2, R3, R1.w;\n"
"MUL R5.xyz, R6, R3;\n"
- "MAD R2.xyz, -R2, R3, R0.w;\n"
- "MAD R6.xyz, R1, R0.w, R5;\n"
- "MUL R4.xyz, R1, R4;\n"
- "MUL R5.xyz, R1, c[8].w;\n"
- "ADD R6.xyz, R6, -R4;\n"
- "SGE R5.xyz, R5, R1.w;\n"
- "MUL R5.xyz, R5, R6;\n"
- "ADD R3.xyz, R4, R5;\n"
- "MUL R2.xyz, R1, R2;\n"
- "MUL R4.xyz, R0, c[8].z;\n"
+ "MUL R4.xyz, R0, R4;\n"
+ "MAD R5.xyz, R1.w, R0, R5;\n"
+ "ADD R6.xyz, R5, -R4;\n"
+ "MUL R5.xyz, R0, c[9].x;\n"
+ "SGE R3.xyz, R5, R0.w;\n"
+ "MAD R3.xyz, R3, R6, R4;\n"
+ "MUL R2.xyz, R0, R2;\n"
+ "MUL R4.xyz, R1, c[8].z;\n"
+ "SGE R4.xyz, R4, R1.w;\n"
"ADD R3.xyz, R3, -R2;\n"
- "SGE R4.xyz, R4, R0.w;\n"
- "MUL R3.xyz, R4, R3;\n"
- "ADD R2.xyz, R2, R3;\n"
- "ADD R2.w, -R1, c[8].x;\n"
- "MAD R0.xyz, R0, R2.w, R2;\n"
- "ADD R2.x, -R0.w, c[8];\n"
- "MAD R2.xyz, R1, R2.x, R0;\n"
- "ADD R0.z, R0.w, R1.w;\n"
- "MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "MAD R2.xyz, R4, R3, R2;\n"
+ "ADD R2.w, -R0, c[8].x;\n"
+ "MAD R1.xyz, R1, R2.w, R2;\n"
+ "ADD R2.x, -R1.w, c[8];\n"
+ "MAD R2.xyz, R0, R2.x, R1;\n"
+ "ADD R1.z, R1.w, R0.w;\n"
+ "MAD R2.w, -R1, R0, R1.z;\n"
+ "ADD R1.xy, fragment.position, c[6];\n"
+ "MUL R1.xy, R1, c[4];\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[7];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
@@ -4481,106 +4377,104 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[6];\n"
- "ADD R0.x, R0, R0.y;\n"
- "MUL R0.zw, fragment.position.xyxy, c[7].xyxy;\n"
- "TEX R1, R0.zwzw, texture[0], 2D;\n"
- "MUL R0.x, R0, c[6].z;\n"
- "TEX R0, R0, texture[2], 1D;\n"
- "ADD R3.xyz, R0, R1;\n"
- "MUL R2.xyz, R1, R0.w;\n"
- "MUL R0.xyz, R0, R1.w;\n"
- "MIN R0.xyz, R0, R2;\n"
- "MAD R2.xyz, -R0, c[8].x, R3;\n"
- "ADD R0.z, R0.w, R1.w;\n"
- "MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "MUL R0.xy, R0, c[0];\n"
+ "ADD R0.z, R0.x, R0.y;\n"
+ "MUL R1.x, R0.z, c[0].z;\n"
+ "MUL R0.xy, fragment.position, c[5];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "TEX R1, R1, texture[2], 1D;\n"
+ "ADD R2.xyz, R1, R0;\n"
+ "MUL R3.xyz, R1.w, R0;\n"
+ "MUL R1.xyz, R1, R0.w;\n"
+ "MIN R1.xyz, R1, R3;\n"
+ "MAD R2.xyz, -R1, c[8].x, R2;\n"
+ "ADD R1.z, R1.w, R0.w;\n"
+ "MAD R2.w, -R1, R0, R1.z;\n"
+ "ADD R1.xy, fragment.position, c[6];\n"
+ "MUL R1.xy, R1, c[4];\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[7];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MODES_EXCLUSION =
"!!ARBfp1.0\n"
"PARAM c[9] = { program.local[0..7],\n"
- " { 1, 2 } };\n"
+ " { 2, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[6];\n"
- "ADD R0.x, R0, R0.y;\n"
- "MUL R0.x, R0, c[6].z;\n"
- "MUL R1.xy, fragment.position, c[7];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "TEX R0, R0, texture[2], 1D;\n"
- "MUL R2.xyz, R1, R0.w;\n"
- "MAD R3.xyz, R0, R1.w, R2;\n"
- "MUL R2.xyz, R0, R1;\n"
- "MAD R2.xyz, -R2, c[8].y, R3;\n"
- "ADD R2.w, -R1, c[8].x;\n"
- "MAD R0.xyz, R0, R2.w, R2;\n"
- "ADD R2.x, -R0.w, c[8];\n"
- "MAD R2.xyz, R1, R2.x, R0;\n"
- "ADD R0.z, R0.w, R1.w;\n"
- "MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "MUL R0.xy, R0, c[0];\n"
+ "ADD R0.z, R0.x, R0.y;\n"
+ "MUL R1.x, R0.z, c[0].z;\n"
+ "MUL R0.xy, fragment.position, c[5];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "TEX R1, R1, texture[2], 1D;\n"
+ "MUL R2.xyz, R1.w, R0;\n"
+ "MAD R3.xyz, R1, R0.w, R2;\n"
+ "MUL R2.xyz, R1, R0;\n"
+ "MAD R2.xyz, -R2, c[8].x, R3;\n"
+ "ADD R2.w, -R0, c[8].y;\n"
+ "MAD R1.xyz, R1, R2.w, R2;\n"
+ "ADD R2.x, -R1.w, c[8].y;\n"
+ "MAD R2.xyz, R0, R2.x, R1;\n"
+ "ADD R1.z, R1.w, R0.w;\n"
+ "MAD R2.w, -R1, R0, R1.z;\n"
+ "ADD R1.xy, fragment.position, c[6];\n"
+ "MUL R1.xy, R1, c[4];\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[7];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MODES_SIMPLE_PORTER_DUFF_NOMASK =
"!!ARBfp1.0\n"
- "PARAM c[8] = { program.local[0..4],\n"
- " { 1 },\n"
- " program.local[6..7] };\n"
+ "PARAM c[8] = { program.local[0..6],\n"
+ " { 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[6].xyxy;\n"
"TEX R1, R0.zwzw, texture[0], 2D;\n"
- "MUL R2.xyz, R1, c[7].y;\n"
- "MUL R0.x, R0, c[3].z;\n"
+ "MUL R2.xyz, R1, c[4].y;\n"
+ "MUL R0.x, R0, c[0].z;\n"
"TEX R0, R0, texture[1], 1D;\n"
- "MUL R3.xyz, R2, R0.w;\n"
- "MUL R2.xyz, R0, c[7].x;\n"
- "MAD R2.xyz, R2, R1.w, R3;\n"
- "MUL R0.xyz, R0, c[6].y;\n"
- "ADD R2.w, -R1, c[5].x;\n"
- "MAD R0.xyz, R0, R2.w, R2;\n"
- "ADD R2.x, -R0.w, c[5];\n"
- "MUL R1.xyz, R1, c[6].z;\n"
- "MAD result.color.xyz, R1, R2.x, R0;\n"
- "ADD R0.y, -R1.w, c[5].x;\n"
+ "MUL R3.xyz, R0.w, R2;\n"
+ "MUL R2.xyz, R0, c[4].x;\n"
+ "MAD R2.xyz, R1.w, R2, R3;\n"
+ "ADD R2.w, -R1, c[7].x;\n"
+ "MUL R0.xyz, R0, c[5].y;\n"
+ "MAD R0.xyz, R2.w, R0, R2;\n"
+ "ADD R2.x, -R0.w, c[7];\n"
+ "MUL R1.xyz, R1, c[5].z;\n"
+ "MAD result.color.xyz, R2.x, R1, R0;\n"
"MUL R0.x, R0.w, R1.w;\n"
"MUL R0.z, R1.w, R2.x;\n"
- "MUL R0.y, R0.w, R0;\n"
- "DP3 result.color.w, R0, c[6];\n"
+ "MUL R0.y, R0.w, R2.w;\n"
+ "DP3 result.color.w, R0, c[5];\n"
"END\n"
;
@@ -4591,16 +4485,16 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
"MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
"TEX R1, R0.zwzw, texture[0], 2D;\n"
- "MUL R0.x, R0, c[3].z;\n"
+ "MUL R0.x, R0, c[0].z;\n"
"TEX R0, R0, texture[1], 1D;\n"
"ADD R2.x, -R1.w, c[5];\n"
"MUL R2.xyz, R0, R2.x;\n"
@@ -4618,16 +4512,16 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
"MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
"TEX R1, R0.zwzw, texture[0], 2D;\n"
- "MUL R0.x, R0, c[3].z;\n"
+ "MUL R0.x, R0, c[0].z;\n"
"TEX R0, R0, texture[1], 1D;\n"
"ADD R2, R0, R1;\n"
"MAD result.color, -R0, R1, R2;\n"
@@ -4642,14 +4536,14 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.x, R0, c[3].z;\n"
+ "MUL R0.x, R0, c[0].z;\n"
"TEX R0, R0, texture[1], 1D;\n"
"MUL R1.xy, fragment.position, c[4];\n"
"TEX R1, R1, texture[0], 2D;\n"
@@ -4683,19 +4577,19 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.x, R0, c[3].z;\n"
- "MUL R1.xy, fragment.position, c[4];\n"
- "TEX R1, R1, texture[0], 2D;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
+ "TEX R1, R0.zwzw, texture[0], 2D;\n"
+ "MUL R0.x, R0, c[0].z;\n"
"TEX R0, R0, texture[1], 1D;\n"
"MUL R2.xyz, R0, R1.w;\n"
- "MUL R3.xyz, R1, R0.w;\n"
+ "MUL R3.xyz, R0.w, R1;\n"
"MIN R2.xyz, R2, R3;\n"
"ADD R2.w, -R1, c[5].x;\n"
"MAD R0.xyz, R0, R2.w, R2;\n"
@@ -4714,19 +4608,19 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.x, R0, c[3].z;\n"
- "MUL R1.xy, fragment.position, c[4];\n"
- "TEX R1, R1, texture[0], 2D;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
+ "TEX R1, R0.zwzw, texture[0], 2D;\n"
+ "MUL R0.x, R0, c[0].z;\n"
"TEX R0, R0, texture[1], 1D;\n"
"MUL R2.xyz, R0, R1.w;\n"
- "MUL R3.xyz, R1, R0.w;\n"
+ "MUL R3.xyz, R0.w, R1;\n"
"MAX R2.xyz, R2, R3;\n"
"ADD R2.w, -R1, c[5].x;\n"
"MAD R0.xyz, R0, R2.w, R2;\n"
@@ -4740,19 +4634,19 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MODES_COLORDODGE_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[6] = { program.local[0..4],\n"
- " { 1, 1e-06 } };\n"
+ " { 1, 1e-006 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.x, R0, c[3].z;\n"
+ "MUL R0.x, R0, c[0].z;\n"
"TEX R0, R0, texture[1], 1D;\n"
"MAX R1.x, R0.w, c[5].y;\n"
"RCP R1.x, R1.x;\n"
@@ -4764,7 +4658,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
"MUL R2.xyz, R1, R2.x;\n"
"ADD R2.w, -R1, c[5].x;\n"
"MAD R2.xyz, R0, R2.w, R2;\n"
- "MUL R1.xyz, R1, R0.w;\n"
+ "MUL R1.xyz, R0.w, R1;\n"
"MAD R0.xyz, R0, R1.w, R1;\n"
"MUL R2.w, R0, R1;\n"
"RCP R3.x, R3.x;\n"
@@ -4783,25 +4677,25 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MODES_COLORBURN_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[6] = { program.local[0..4],\n"
- " { 1, 9.9999997e-06 } };\n"
+ " { 1, 9.9999997e-006 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
"TEMP R5;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.x, R0, c[3].z;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
+ "TEX R1, R0.zwzw, texture[0], 2D;\n"
+ "MUL R0.x, R0, c[0].z;\n"
"TEX R0, R0, texture[1], 1D;\n"
- "MUL R1.xy, fragment.position, c[4];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "MUL R2.xyz, R1, R0.w;\n"
+ "MUL R2.xyz, R0.w, R1;\n"
"MAD R3.xyz, R0, R1.w, R2;\n"
"ADD R2.w, -R1, c[5].x;\n"
"MAD R2.xyz, -R0.w, R1.w, R3;\n"
@@ -4814,9 +4708,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
"RCP R2.z, R2.z;\n"
"MAD R2.xyz, R4, R2, R5;\n"
"MUL R4.xyz, R1, R3.w;\n"
- "MAD R0.xyz, R0, R2.w, R4;\n"
- "ADD R3.w, -R0, c[5].x;\n"
"MAD R1.xyz, R1, R3.w, R2;\n"
+ "MAD R0.xyz, R0, R2.w, R4;\n"
"MUL R2.x, R0.w, R1.w;\n"
"ADD R2.w, R0, R1;\n"
"ADD R1.xyz, R1, -R0;\n"
@@ -4835,14 +4728,14 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.x, R0, c[3].z;\n"
+ "MUL R0.x, R0, c[0].z;\n"
"TEX R0, R0, texture[1], 1D;\n"
"MUL R1.xy, fragment.position, c[4];\n"
"TEX R1, R1, texture[0], 2D;\n"
@@ -4871,8 +4764,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MODES_SOFTLIGHT_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[7] = { program.local[0..4],\n"
- " { 1, 9.9999997e-06, 2, 8 },\n"
- " { 3 } };\n"
+ " { 1, 9.9999997e-006, 2, 3 },\n"
+ " { 8 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -4880,8 +4773,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
"TEMP R4;\n"
"TEMP R5;\n"
"TEMP R6;\n"
- "MUL R2.xyz, fragment.position.y, c[1];\n"
- "MAD R3.xyz, fragment.position.x, c[0], R2;\n"
+ "MUL R2.xyz, fragment.position.y, c[2];\n"
+ "MAD R3.xyz, fragment.position.x, c[1], R2;\n"
"MUL R0.xy, fragment.position, c[4];\n"
"TEX R1, R0, texture[0], 2D;\n"
"MAX R0.x, R1.w, c[5].y;\n"
@@ -4889,39 +4782,37 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
"MUL R0.xyz, R1, R2.w;\n"
"RSQ R0.w, R0.x;\n"
"RSQ R2.y, R0.y;\n"
- "ADD R3.xyz, R3, c[2];\n"
+ "ADD R3.xyz, R3, c[3];\n"
"RCP R2.x, R0.w;\n"
"RCP R0.w, R3.z;\n"
"MUL R3.xy, R3, R0.w;\n"
"RSQ R0.w, R0.z;\n"
"RCP R2.z, R0.w;\n"
"RCP R2.y, R2.y;\n"
- "MAD R6.xyz, R2, R1.w, -R1;\n"
- "MUL R2.xyz, -R0, c[5].w;\n"
- "ADD R5.xyz, R2, c[6].x;\n"
+ "MAD R6.xyz, R1.w, R2, -R1;\n"
+ "MUL R2.xyz, -R0, c[6].x;\n"
+ "ADD R5.xyz, R2, c[5].w;\n"
"MAD R2.xyz, -R1, R2.w, c[5].x;\n"
- "MUL R3.xy, R3, c[3];\n"
+ "MUL R3.xy, R3, c[0];\n"
"ADD R0.w, R3.x, R3.y;\n"
- "MUL R0.w, R0, c[3].z;\n"
+ "MUL R0.w, R0, c[0].z;\n"
"TEX R0, R0.w, texture[1], 1D;\n"
"MAD R3.xyz, R0, c[5].z, -R0.w;\n"
"MUL R4.xyz, R2, R3;\n"
"MAD R4.xyz, -R4, R5, R0.w;\n"
"MUL R5.xyz, R6, R3;\n"
"MAD R2.xyz, -R2, R3, R0.w;\n"
- "MAD R6.xyz, R1, R0.w, R5;\n"
"MUL R4.xyz, R1, R4;\n"
- "MUL R5.xyz, R1, c[5].w;\n"
- "ADD R6.xyz, R6, -R4;\n"
- "SGE R5.xyz, R5, R1.w;\n"
- "MUL R5.xyz, R5, R6;\n"
- "ADD R3.xyz, R4, R5;\n"
+ "MAD R5.xyz, R0.w, R1, R5;\n"
+ "ADD R6.xyz, R5, -R4;\n"
+ "MUL R5.xyz, R1, c[6].x;\n"
+ "SGE R3.xyz, R5, R1.w;\n"
+ "MAD R3.xyz, R3, R6, R4;\n"
"MUL R2.xyz, R1, R2;\n"
"MUL R4.xyz, R0, c[5].z;\n"
"ADD R3.xyz, R3, -R2;\n"
"SGE R4.xyz, R4, R0.w;\n"
- "MUL R3.xyz, R4, R3;\n"
- "ADD R2.xyz, R2, R3;\n"
+ "MAD R2.xyz, R4, R3, R2;\n"
"ADD R2.w, -R1, c[5].x;\n"
"MAD R0.xyz, R0, R2.w, R2;\n"
"ADD R2.x, R0.w, R1.w;\n"
@@ -4939,19 +4830,19 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.x, R0, c[3].z;\n"
- "MUL R1.xy, fragment.position, c[4];\n"
+ "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
+ "TEX R1, R0.zwzw, texture[0], 2D;\n"
+ "MUL R0.x, R0, c[0].z;\n"
"TEX R0, R0, texture[1], 1D;\n"
- "TEX R1, R1, texture[0], 2D;\n"
"MUL R2.xyz, R0, R1.w;\n"
- "MUL R3.xyz, R1, R0.w;\n"
+ "MUL R3.xyz, R0.w, R1;\n"
"ADD R0.xyz, R0, R1;\n"
"MIN R2.xyz, R2, R3;\n"
"ADD R1.x, R0.w, R1.w;\n"
@@ -4963,30 +4854,30 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MODES_EXCLUSION_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[6] = { program.local[0..4],\n"
- " { 1, 2 } };\n"
+ " { 2, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.x, R0, c[3].z;\n"
- "MUL R1.xy, fragment.position, c[4];\n"
- "TEX R1, R1, texture[0], 2D;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
+ "TEX R1, R0.zwzw, texture[0], 2D;\n"
+ "MUL R0.x, R0, c[0].z;\n"
"TEX R0, R0, texture[1], 1D;\n"
- "MUL R2.xyz, R1, R0.w;\n"
+ "MUL R2.xyz, R0.w, R1;\n"
"MAD R3.xyz, R0, R1.w, R2;\n"
"MUL R2.xyz, R0, R1;\n"
- "MAD R2.xyz, -R2, c[5].y, R3;\n"
- "ADD R2.w, -R1, c[5].x;\n"
+ "MAD R2.xyz, -R2, c[5].x, R3;\n"
+ "ADD R2.w, -R1, c[5].y;\n"
"MAD R0.xyz, R0, R2.w, R2;\n"
"ADD R2.x, R0.w, R1.w;\n"
- "ADD R2.y, -R0.w, c[5].x;\n"
+ "ADD R2.y, -R0.w, c[5];\n"
"MAD result.color.xyz, R1, R2.y, R0;\n"
"MAD result.color.w, -R0, R1, R2.x;\n"
"END\n"
@@ -4997,18 +4888,18 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
"PARAM c[7] = { program.local[0..6] };\n"
"TEMP R0;\n"
"TEMP R1;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.z;\n"
- "MUL R0.zw, R0, c[3].xyxy;\n"
+ "MUL R0.zw, R0, c[0].xyxy;\n"
"ADD R1.x, R0.z, R0.w;\n"
- "ADD R0.xy, fragment.position, c[4];\n"
- "MUL R0.xy, R0, c[5];\n"
+ "ADD R0.xy, fragment.position, c[5];\n"
+ "MUL R0.xy, R0, c[4];\n"
"TEX R0, R0, texture[0], 2D;\n"
"DP4 R1.y, R0, c[6];\n"
- "MUL R1.x, R1, c[3].z;\n"
+ "MUL R1.x, R1, c[0].z;\n"
"TEX R0, R1, texture[1], 1D;\n"
"MUL result.color, R0, R1.y;\n"
"END\n"
@@ -5018,58 +4909,55 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
"!!ARBfp1.0\n"
"PARAM c[4] = { program.local[0..3] };\n"
"TEMP R0;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
- "MUL R0.x, R0, c[3].z;\n"
+ "MUL R0.x, R0, c[0].z;\n"
"TEX result.color, R0, texture[0], 1D;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MODES_SIMPLE_PORTER_DUFF =
"!!ARBfp1.0\n"
- "PARAM c[11] = { program.local[0..7],\n"
- " { 1 },\n"
- " program.local[9..10] };\n"
+ "PARAM c[11] = { program.local[0..9],\n"
+ " { 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
- "RCP R0.z, R0.z;\n"
- "MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[6];\n"
- "MUL R0.zw, fragment.position.xyxy, c[7].xyxy;\n"
- "TEX R1, R0.zwzw, texture[0], 2D;\n"
- "MOV R0.y, -R0;\n"
- "TEX R0, R0, texture[2], 2D;\n"
- "MUL R2.xyz, R1, c[10].y;\n"
- "MUL R3.xyz, R2, R0.w;\n"
- "MUL R2.xyz, R0, c[10].x;\n"
- "MAD R2.xyz, R2, R1.w, R3;\n"
- "ADD R3.xy, fragment.position, c[0];\n"
- "MUL R0.xyz, R0, c[9].y;\n"
- "ADD R2.w, -R1, c[8].x;\n"
- "MAD R2.xyz, R0, R2.w, R2;\n"
- "ADD R2.w, -R0, c[8].x;\n"
- "MUL R0.xyz, R1, c[9].z;\n"
- "MAD R2.xyz, R0, R2.w, R2;\n"
- "ADD R0.y, -R1.w, c[8].x;\n"
- "MUL R0.z, R1.w, R2.w;\n"
- "MUL R0.x, R0.w, R1.w;\n"
- "MUL R0.y, R0.w, R0;\n"
- "DP3 R2.w, R0, c[9];\n"
- "MUL R3.xy, R3, c[1];\n"
- "TEX R0, R3, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R1.xyz, R0, c[3];\n"
+ "RCP R0.z, R1.z;\n"
+ "MUL R1.xy, R1, R0.z;\n"
+ "MUL R0.xy, fragment.position, c[7];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "MUL R1.xy, R1, c[0];\n"
+ "TEX R1, R1, texture[2], 2D;\n"
+ "MUL R2.xyz, R0, c[4].y;\n"
+ "MUL R3.xyz, R1.w, R2;\n"
+ "MUL R2.xyz, R1, c[4].x;\n"
+ "MAD R2.xyz, R0.w, R2, R3;\n"
+ "ADD R3.xy, fragment.position, c[8];\n"
+ "ADD R2.w, -R0, c[10].x;\n"
+ "MUL R1.xyz, R1, c[5].y;\n"
+ "MAD R2.xyz, R2.w, R1, R2;\n"
+ "MUL R1.xyz, R0, c[5].z;\n"
+ "ADD R3.z, -R1.w, c[10].x;\n"
+ "MAD R2.xyz, R3.z, R1, R2;\n"
+ "MUL R1.y, R1.w, R2.w;\n"
+ "MUL R1.x, R1.w, R0.w;\n"
+ "MUL R1.z, R0.w, R3;\n"
+ "DP3 R2.w, R1, c[5];\n"
+ "MUL R3.xy, R3, c[6];\n"
+ "TEX R1, R3, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[9];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
@@ -5080,29 +4968,28 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
- "RCP R1.x, R0.z;\n"
- "MUL R0.xy, R0, R1.x;\n"
- "MUL R0.xy, R0, c[6];\n"
- "MUL R0.zw, fragment.position.xyxy, c[7].xyxy;\n"
- "TEX R1, R0.zwzw, texture[0], 2D;\n"
- "MOV R0.y, -R0;\n"
- "TEX R0, R0, texture[2], 2D;\n"
- "ADD R2.x, -R1.w, c[8];\n"
- "MUL R2.xyz, R0, R2.x;\n"
- "MAD R0.xyz, R0, R1, R2;\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R1.xyz, R0, c[3];\n"
+ "RCP R0.z, R1.z;\n"
+ "MUL R1.xy, R1, R0.z;\n"
+ "MUL R0.xy, fragment.position, c[5];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "MUL R1.xy, R1, c[0];\n"
+ "TEX R1, R1, texture[2], 2D;\n"
"ADD R2.x, -R0.w, c[8];\n"
- "MAD R2.xyz, R1, R2.x, R0;\n"
- "ADD R0.z, R0.w, R1.w;\n"
- "MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "MUL R2.xyz, R1, R2.x;\n"
+ "MAD R1.xyz, R1, R0, R2;\n"
+ "ADD R2.x, -R1.w, c[8];\n"
+ "MAD R2.xyz, R0, R2.x, R1;\n"
+ "ADD R1.z, R1.w, R0.w;\n"
+ "MAD R2.w, -R1, R0, R1.z;\n"
+ "ADD R1.xy, fragment.position, c[6];\n"
+ "MUL R1.xy, R1, c[4];\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[7];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
@@ -5113,24 +5000,23 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[6];\n"
- "MOV R0.y, -R0;\n"
- "MUL R1.xy, fragment.position, c[7];\n"
- "ADD R3.xy, fragment.position, c[0];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "TEX R0, R0, texture[2], 2D;\n"
- "ADD R2, R0, R1;\n"
- "MAD R2, -R0, R1, R2;\n"
- "MUL R3.xy, R3, c[1];\n"
- "TEX R0, R3, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "MUL R0.zw, R0.xyxy, c[0].xyxy;\n"
+ "ADD R3.xy, fragment.position, c[6];\n"
+ "TEX R1, R0.zwzw, texture[2], 2D;\n"
+ "MUL R0.xy, fragment.position, c[5];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "ADD R2, R1, R0;\n"
+ "MAD R2, -R1, R0, R2;\n"
+ "MUL R3.xy, R3, c[4];\n"
+ "TEX R1, R3, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[7];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
@@ -5143,15 +5029,14 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[6];\n"
- "MOV R0.y, -R0;\n"
+ "MUL R0.xy, R0, c[0];\n"
"TEX R0, R0, texture[2], 2D;\n"
- "MUL R1.xy, fragment.position, c[7];\n"
+ "MUL R1.xy, fragment.position, c[5];\n"
"TEX R1, R1, texture[0], 2D;\n"
"ADD R2.w, -R1, c[8].y;\n"
"ADD R3.xyz, R0.w, -R0;\n"
@@ -5172,11 +5057,11 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
"MAD R2.xyz, R2, R0, R3;\n"
"ADD R0.z, R0.w, R1.w;\n"
"MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
+ "ADD R0.xy, fragment.position, c[6];\n"
+ "MUL R0.xy, R0, c[4];\n"
"TEX R0, R0, texture[1], 2D;\n"
"ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
+ "DP4 R0.x, R0, c[7];\n"
"MAD result.color, R0.x, R2, R1;\n"
"END\n"
;
@@ -5189,31 +5074,30 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
- "MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[6];\n"
- "MOV R0.y, -R0;\n"
- "MUL R1.xy, fragment.position, c[7];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "TEX R0, R0, texture[2], 2D;\n"
- "MUL R3.xyz, R1, R0.w;\n"
- "MUL R2.xyz, R0, R1.w;\n"
+ "MUL R0.zw, R0.xyxy, R0.z;\n"
+ "MUL R1.xy, R0.zwzw, c[0];\n"
+ "MUL R0.xy, fragment.position, c[5];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "TEX R1, R1, texture[2], 2D;\n"
+ "MUL R3.xyz, R1.w, R0;\n"
+ "MUL R2.xyz, R1, R0.w;\n"
"MIN R2.xyz, R2, R3;\n"
- "ADD R2.w, -R1, c[8].x;\n"
- "MAD R0.xyz, R0, R2.w, R2;\n"
- "ADD R2.x, -R0.w, c[8];\n"
- "MAD R2.xyz, R1, R2.x, R0;\n"
- "ADD R0.z, R0.w, R1.w;\n"
- "MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "ADD R2.w, -R0, c[8].x;\n"
+ "MAD R1.xyz, R1, R2.w, R2;\n"
+ "ADD R2.x, -R1.w, c[8];\n"
+ "MAD R2.xyz, R0, R2.x, R1;\n"
+ "ADD R1.z, R1.w, R0.w;\n"
+ "MAD R2.w, -R1, R0, R1.z;\n"
+ "ADD R1.xy, fragment.position, c[6];\n"
+ "MUL R1.xy, R1, c[4];\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[7];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
@@ -5225,62 +5109,60 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
- "MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[6];\n"
- "MOV R0.y, -R0;\n"
- "MUL R1.xy, fragment.position, c[7];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "TEX R0, R0, texture[2], 2D;\n"
- "MUL R3.xyz, R1, R0.w;\n"
- "MUL R2.xyz, R0, R1.w;\n"
+ "MUL R0.zw, R0.xyxy, R0.z;\n"
+ "MUL R1.xy, R0.zwzw, c[0];\n"
+ "MUL R0.xy, fragment.position, c[5];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "TEX R1, R1, texture[2], 2D;\n"
+ "MUL R3.xyz, R1.w, R0;\n"
+ "MUL R2.xyz, R1, R0.w;\n"
"MAX R2.xyz, R2, R3;\n"
- "ADD R2.w, -R1, c[8].x;\n"
- "MAD R0.xyz, R0, R2.w, R2;\n"
- "ADD R2.x, -R0.w, c[8];\n"
- "MAD R2.xyz, R1, R2.x, R0;\n"
- "ADD R0.z, R0.w, R1.w;\n"
- "MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "ADD R2.w, -R0, c[8].x;\n"
+ "MAD R1.xyz, R1, R2.w, R2;\n"
+ "ADD R2.x, -R1.w, c[8];\n"
+ "MAD R2.xyz, R0, R2.x, R1;\n"
+ "ADD R1.z, R1.w, R0.w;\n"
+ "MAD R2.w, -R1, R0, R1.z;\n"
+ "ADD R1.xy, fragment.position, c[6];\n"
+ "MUL R1.xy, R1, c[4];\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[7];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MODES_COLORDODGE =
"!!ARBfp1.0\n"
"PARAM c[9] = { program.local[0..7],\n"
- " { 1, 1e-06 } };\n"
+ " { 1, 1e-006 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[6];\n"
- "MOV R0.y, -R0;\n"
+ "MUL R0.xy, R0, c[0];\n"
"TEX R0, R0, texture[2], 2D;\n"
"MAX R1.x, R0.w, c[8].y;\n"
"RCP R1.x, R1.x;\n"
- "MAD R1.xyz, -R0, R1.x, c[8].x;\n"
- "MAX R2.xyz, R1, c[8].y;\n"
- "MUL R1.xy, fragment.position, c[7];\n"
+ "MAD R2.xyz, -R0, R1.x, c[8].x;\n"
+ "MAX R2.xyz, R2, c[8].y;\n"
+ "MUL R1.xy, fragment.position, c[5];\n"
"TEX R1, R1, texture[0], 2D;\n"
"ADD R2.w, -R0, c[8].x;\n"
"MUL R3.xyz, R1, R2.w;\n"
"ADD R2.w, -R1, c[8].x;\n"
"MAD R4.xyz, R0, R2.w, R3;\n"
- "MUL R3.xyz, R1, R0.w;\n"
+ "MUL R3.xyz, R0.w, R1;\n"
"MUL R2.w, R0, R1;\n"
"MAD R0.xyz, R0, R1.w, R3;\n"
"SGE R0.xyz, R0, R2.w;\n"
@@ -5293,11 +5175,11 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
"MAD R2.xyz, R0, R4, R2;\n"
"ADD R0.z, R0.w, R1.w;\n"
"MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
+ "ADD R0.xy, fragment.position, c[6];\n"
+ "MUL R0.xy, R0, c[4];\n"
"TEX R0, R0, texture[1], 2D;\n"
"ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
+ "DP4 R0.x, R0, c[7];\n"
"MAD result.color, R0.x, R2, R1;\n"
"END\n"
;
@@ -5305,24 +5187,23 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MODES_COLORBURN =
"!!ARBfp1.0\n"
"PARAM c[9] = { program.local[0..7],\n"
- " { 1, 9.9999997e-06 } };\n"
+ " { 1, 9.9999997e-006 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
"TEMP R5;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[6];\n"
- "MOV R0.y, -R0;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n"
+ "TEX R1, R0.zwzw, texture[0], 2D;\n"
+ "MUL R0.xy, R0, c[0];\n"
"TEX R0, R0, texture[2], 2D;\n"
- "MUL R1.xy, fragment.position, c[7];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "MUL R2.xyz, R1, R0.w;\n"
+ "MUL R2.xyz, R0.w, R1;\n"
"MAD R3.xyz, R0, R1.w, R2;\n"
"MAD R2.xyz, -R0.w, R1.w, R3;\n"
"MUL R4.xyz, R0.w, R2;\n"
@@ -5337,18 +5218,17 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
"MUL R4.xyz, R1, R3.w;\n"
"MAD R0.xyz, R0, R2.w, R4;\n"
"MUL R2.w, R0, R1;\n"
- "ADD R3.w, -R0, c[8].x;\n"
"MAD R2.xyz, R1, R3.w, R2;\n"
"ADD R2.xyz, R2, -R0;\n"
"SGE R3.xyz, R3, R2.w;\n"
"MAD R2.xyz, R3, R2, R0;\n"
"ADD R0.z, R0.w, R1.w;\n"
"MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
+ "ADD R0.xy, fragment.position, c[6];\n"
+ "MUL R0.xy, R0, c[4];\n"
"TEX R0, R0, texture[1], 2D;\n"
"ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
+ "DP4 R0.x, R0, c[7];\n"
"MAD result.color, R0.x, R2, R1;\n"
"END\n"
;
@@ -5362,15 +5242,14 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[6];\n"
- "MOV R0.y, -R0;\n"
+ "MUL R0.xy, R0, c[0];\n"
"TEX R0, R0, texture[2], 2D;\n"
- "MUL R1.xy, fragment.position, c[7];\n"
+ "MUL R1.xy, fragment.position, c[5];\n"
"TEX R1, R1, texture[0], 2D;\n"
"ADD R2.w, -R1, c[8].y;\n"
"ADD R3.xyz, R0.w, -R0;\n"
@@ -5391,11 +5270,11 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
"MAD R2.xyz, R0, R2, R3;\n"
"ADD R0.z, R0.w, R1.w;\n"
"MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
+ "ADD R0.xy, fragment.position, c[6];\n"
+ "MUL R0.xy, R0, c[4];\n"
"TEX R0, R0, texture[1], 2D;\n"
"ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
+ "DP4 R0.x, R0, c[7];\n"
"MAD result.color, R0.x, R2, R1;\n"
"END\n"
;
@@ -5403,8 +5282,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MODES_SOFTLIGHT =
"!!ARBfp1.0\n"
"PARAM c[10] = { program.local[0..7],\n"
- " { 1, 9.9999997e-06, 2, 8 },\n"
- " { 3 } };\n"
+ " { 1, 9.9999997e-006, 2, 3 },\n"
+ " { 8 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -5412,59 +5291,56 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
"TEMP R4;\n"
"TEMP R5;\n"
"TEMP R6;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
- "RCP R0.z, R0.z;\n"
- "MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[6];\n"
- "MUL R1.xy, fragment.position, c[7];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "MAX R0.z, R1.w, c[8].y;\n"
- "RCP R2.w, R0.z;\n"
- "MUL R2.xyz, R1, R2.w;\n"
- "MUL R6.xyz, -R2, c[8].w;\n"
- "MAD R3.xyz, -R1, R2.w, c[8].x;\n"
- "MOV R0.y, -R0;\n"
- "TEX R0, R0, texture[2], 2D;\n"
- "MAD R4.xyz, R0, c[8].z, -R0.w;\n"
- "MUL R5.xyz, R3, R4;\n"
- "MAD R3.xyz, -R3, R4, R0.w;\n"
- "ADD R6.xyz, R6, c[9].x;\n"
- "RSQ R2.x, R2.x;\n"
- "RSQ R2.z, R2.z;\n"
- "RSQ R2.y, R2.y;\n"
- "MAD R5.xyz, -R5, R6, R0.w;\n"
- "MUL R3.xyz, R1, R3;\n"
- "ADD R2.w, -R1, c[8].x;\n"
- "RCP R2.x, R2.x;\n"
+ "MUL R0.xy, fragment.position, c[5];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "MAX R1.x, R0.w, c[8].y;\n"
+ "RCP R2.w, R1.x;\n"
+ "MUL R1.xyz, R0, R2.w;\n"
+ "RSQ R1.w, R1.x;\n"
+ "RCP R2.x, R1.w;\n"
+ "RSQ R1.w, R1.y;\n"
+ "RSQ R2.z, R1.z;\n"
+ "MUL R3.xyz, fragment.position.y, c[2];\n"
+ "MAD R3.xyz, fragment.position.x, c[1], R3;\n"
+ "ADD R3.xyz, R3, c[3];\n"
+ "RCP R2.y, R1.w;\n"
+ "RCP R1.w, R3.z;\n"
+ "MUL R3.xy, R3, R1.w;\n"
"RCP R2.z, R2.z;\n"
- "RCP R2.y, R2.y;\n"
- "MAD R2.xyz, R2, R1.w, -R1;\n"
- "MUL R6.xyz, R2, R4;\n"
- "MUL R2.xyz, R1, R5;\n"
- "MAD R6.xyz, R1, R0.w, R6;\n"
- "MUL R4.xyz, R0, c[8].z;\n"
- "MUL R5.xyz, R1, c[8].w;\n"
- "ADD R6.xyz, R6, -R2;\n"
- "SGE R5.xyz, R5, R1.w;\n"
- "MUL R5.xyz, R5, R6;\n"
- "ADD R2.xyz, R2, R5;\n"
- "SGE R4.xyz, R4, R0.w;\n"
- "ADD R2.xyz, R2, -R3;\n"
- "MUL R2.xyz, R4, R2;\n"
- "ADD R2.xyz, R3, R2;\n"
- "MAD R0.xyz, R0, R2.w, R2;\n"
- "ADD R2.x, -R0.w, c[8];\n"
- "MAD R2.xyz, R1, R2.x, R0;\n"
- "ADD R0.z, R0.w, R1.w;\n"
- "MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "MAD R6.xyz, R0.w, R2, -R0;\n"
+ "MUL R2.xyz, -R1, c[9].x;\n"
+ "ADD R5.xyz, R2, c[8].w;\n"
+ "MAD R2.xyz, -R0, R2.w, c[8].x;\n"
+ "MUL R3.xy, R3, c[0];\n"
+ "TEX R1, R3, texture[2], 2D;\n"
+ "MAD R3.xyz, R1, c[8].z, -R1.w;\n"
+ "MUL R4.xyz, R2, R3;\n"
+ "MAD R4.xyz, -R4, R5, R1.w;\n"
+ "MAD R2.xyz, -R2, R3, R1.w;\n"
+ "MUL R5.xyz, R6, R3;\n"
+ "MUL R4.xyz, R0, R4;\n"
+ "MAD R5.xyz, R1.w, R0, R5;\n"
+ "ADD R6.xyz, R5, -R4;\n"
+ "MUL R5.xyz, R0, c[9].x;\n"
+ "SGE R3.xyz, R5, R0.w;\n"
+ "MAD R3.xyz, R3, R6, R4;\n"
+ "MUL R2.xyz, R0, R2;\n"
+ "MUL R4.xyz, R1, c[8].z;\n"
+ "SGE R4.xyz, R4, R1.w;\n"
+ "ADD R3.xyz, R3, -R2;\n"
+ "MAD R2.xyz, R4, R3, R2;\n"
+ "ADD R2.w, -R0, c[8].x;\n"
+ "MAD R1.xyz, R1, R2.w, R2;\n"
+ "ADD R2.x, -R1.w, c[8];\n"
+ "MAD R2.xyz, R0, R2.x, R1;\n"
+ "ADD R1.z, R1.w, R0.w;\n"
+ "MAD R2.w, -R1, R0, R1.z;\n"
+ "ADD R1.xy, fragment.position, c[6];\n"
+ "MUL R1.xy, R1, c[4];\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[7];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
@@ -5476,103 +5352,98 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
- "MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[6];\n"
- "MUL R0.zw, fragment.position.xyxy, c[7].xyxy;\n"
- "TEX R1, R0.zwzw, texture[0], 2D;\n"
- "MOV R0.y, -R0;\n"
- "TEX R0, R0, texture[2], 2D;\n"
- "ADD R3.xyz, R0, R1;\n"
- "MUL R2.xyz, R1, R0.w;\n"
- "MUL R0.xyz, R0, R1.w;\n"
- "MIN R0.xyz, R0, R2;\n"
- "MAD R2.xyz, -R0, c[8].x, R3;\n"
- "ADD R0.z, R0.w, R1.w;\n"
- "MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "MUL R0.zw, R0.xyxy, R0.z;\n"
+ "MUL R1.xy, R0.zwzw, c[0];\n"
+ "MUL R0.xy, fragment.position, c[5];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "TEX R1, R1, texture[2], 2D;\n"
+ "ADD R2.xyz, R1, R0;\n"
+ "MUL R3.xyz, R1.w, R0;\n"
+ "MUL R1.xyz, R1, R0.w;\n"
+ "MIN R1.xyz, R1, R3;\n"
+ "MAD R2.xyz, -R1, c[8].x, R2;\n"
+ "ADD R1.z, R1.w, R0.w;\n"
+ "MAD R2.w, -R1, R0, R1.z;\n"
+ "ADD R1.xy, fragment.position, c[6];\n"
+ "MUL R1.xy, R1, c[4];\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[7];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MODES_EXCLUSION =
"!!ARBfp1.0\n"
"PARAM c[9] = { program.local[0..7],\n"
- " { 1, 2 } };\n"
+ " { 2, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
- "MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[6];\n"
- "MOV R0.y, -R0;\n"
- "MUL R1.xy, fragment.position, c[7];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "TEX R0, R0, texture[2], 2D;\n"
- "MUL R2.xyz, R1, R0.w;\n"
- "MAD R3.xyz, R0, R1.w, R2;\n"
- "MUL R2.xyz, R0, R1;\n"
- "MAD R2.xyz, -R2, c[8].y, R3;\n"
- "ADD R2.w, -R1, c[8].x;\n"
- "MAD R0.xyz, R0, R2.w, R2;\n"
- "ADD R2.x, -R0.w, c[8];\n"
- "MAD R2.xyz, R1, R2.x, R0;\n"
- "ADD R0.z, R0.w, R1.w;\n"
- "MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "MUL R0.zw, R0.xyxy, R0.z;\n"
+ "MUL R1.xy, R0.zwzw, c[0];\n"
+ "MUL R0.xy, fragment.position, c[5];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "TEX R1, R1, texture[2], 2D;\n"
+ "MUL R2.xyz, R1.w, R0;\n"
+ "MAD R3.xyz, R1, R0.w, R2;\n"
+ "MUL R2.xyz, R1, R0;\n"
+ "MAD R2.xyz, -R2, c[8].x, R3;\n"
+ "ADD R2.w, -R0, c[8].y;\n"
+ "MAD R1.xyz, R1, R2.w, R2;\n"
+ "ADD R2.x, -R1.w, c[8].y;\n"
+ "MAD R2.xyz, R0, R2.x, R1;\n"
+ "ADD R1.z, R1.w, R0.w;\n"
+ "MAD R2.w, -R1, R0, R1.z;\n"
+ "ADD R1.xy, fragment.position, c[6];\n"
+ "MUL R1.xy, R1, c[4];\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[7];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MODES_SIMPLE_PORTER_DUFF_NOMASK =
"!!ARBfp1.0\n"
- "PARAM c[8] = { program.local[0..4],\n"
- " { 1 },\n"
- " program.local[6..7] };\n"
+ "PARAM c[8] = { program.local[0..6],\n"
+ " { 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
- "RCP R0.z, R0.z;\n"
- "MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
- "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
+ "RCP R1.x, R0.z;\n"
+ "MUL R0.xy, R0, R1.x;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[6].xyxy;\n"
"TEX R1, R0.zwzw, texture[0], 2D;\n"
- "MUL R2.xyz, R1, c[7].y;\n"
- "MOV R0.y, -R0;\n"
+ "MUL R2.xyz, R1, c[4].y;\n"
+ "MUL R0.xy, R0, c[0];\n"
"TEX R0, R0, texture[1], 2D;\n"
- "MUL R3.xyz, R2, R0.w;\n"
- "MUL R2.xyz, R0, c[7].x;\n"
- "MAD R2.xyz, R2, R1.w, R3;\n"
- "MUL R0.xyz, R0, c[6].y;\n"
- "ADD R2.w, -R1, c[5].x;\n"
- "MAD R0.xyz, R0, R2.w, R2;\n"
- "ADD R2.x, -R0.w, c[5];\n"
- "MUL R1.xyz, R1, c[6].z;\n"
- "MAD result.color.xyz, R1, R2.x, R0;\n"
- "ADD R0.y, -R1.w, c[5].x;\n"
+ "MUL R3.xyz, R0.w, R2;\n"
+ "MUL R2.xyz, R0, c[4].x;\n"
+ "MAD R2.xyz, R1.w, R2, R3;\n"
+ "ADD R2.w, -R1, c[7].x;\n"
+ "MUL R0.xyz, R0, c[5].y;\n"
+ "MAD R0.xyz, R2.w, R0, R2;\n"
+ "ADD R2.x, -R0.w, c[7];\n"
+ "MUL R1.xyz, R1, c[5].z;\n"
+ "MAD result.color.xyz, R2.x, R1, R0;\n"
"MUL R0.x, R0.w, R1.w;\n"
"MUL R0.z, R1.w, R2.x;\n"
- "MUL R0.y, R0.w, R0;\n"
- "DP3 result.color.w, R0, c[6];\n"
+ "MUL R0.y, R0.w, R2.w;\n"
+ "DP3 result.color.w, R0, c[5];\n"
"END\n"
;
@@ -5583,15 +5454,14 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R1.x, R0.z;\n"
"MUL R0.xy, R0, R1.x;\n"
- "MUL R0.xy, R0, c[3];\n"
"MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
"TEX R1, R0.zwzw, texture[0], 2D;\n"
- "MOV R0.y, -R0;\n"
+ "MUL R0.xy, R0, c[0];\n"
"TEX R0, R0, texture[1], 2D;\n"
"ADD R2.x, -R1.w, c[5];\n"
"MUL R2.xyz, R0, R2.x;\n"
@@ -5609,15 +5479,14 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
"MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
"TEX R1, R0.zwzw, texture[0], 2D;\n"
- "MOV R0.y, -R0;\n"
+ "MUL R0.xy, R0, c[0];\n"
"TEX R0, R0, texture[1], 2D;\n"
"ADD R2, R0, R1;\n"
"MAD result.color, -R0, R1, R2;\n"
@@ -5632,13 +5501,12 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
- "MOV R0.y, -R0;\n"
+ "MUL R0.xy, R0, c[0];\n"
"TEX R0, R0, texture[1], 2D;\n"
"MUL R1.xy, fragment.position, c[4];\n"
"TEX R1, R1, texture[0], 2D;\n"
@@ -5672,18 +5540,17 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
- "MOV R0.y, -R0;\n"
- "MUL R1.xy, fragment.position, c[4];\n"
- "TEX R1, R1, texture[0], 2D;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
+ "TEX R1, R0.zwzw, texture[0], 2D;\n"
+ "MUL R0.xy, R0, c[0];\n"
"TEX R0, R0, texture[1], 2D;\n"
"MUL R2.xyz, R0, R1.w;\n"
- "MUL R3.xyz, R1, R0.w;\n"
+ "MUL R3.xyz, R0.w, R1;\n"
"MIN R2.xyz, R2, R3;\n"
"ADD R2.w, -R1, c[5].x;\n"
"MAD R0.xyz, R0, R2.w, R2;\n"
@@ -5702,18 +5569,17 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
- "MOV R0.y, -R0;\n"
- "MUL R1.xy, fragment.position, c[4];\n"
- "TEX R1, R1, texture[0], 2D;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
+ "TEX R1, R0.zwzw, texture[0], 2D;\n"
+ "MUL R0.xy, R0, c[0];\n"
"TEX R0, R0, texture[1], 2D;\n"
"MUL R2.xyz, R0, R1.w;\n"
- "MUL R3.xyz, R1, R0.w;\n"
+ "MUL R3.xyz, R0.w, R1;\n"
"MAX R2.xyz, R2, R3;\n"
"ADD R2.w, -R1, c[5].x;\n"
"MAD R0.xyz, R0, R2.w, R2;\n"
@@ -5727,41 +5593,40 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MODES_COLORDODGE_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[6] = { program.local[0..4],\n"
- " { 1, 1e-06 } };\n"
+ " { 1, 1e-006 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
- "MOV R0.y, -R0;\n"
+ "MUL R0.xy, R0, c[0];\n"
"TEX R0, R0, texture[1], 2D;\n"
"MAX R1.x, R0.w, c[5].y;\n"
"RCP R1.x, R1.x;\n"
- "MAD R1.xyz, -R0, R1.x, c[5].x;\n"
- "MAX R2.xyz, R1, c[5].y;\n"
+ "MAD R3.xyz, -R0, R1.x, c[5].x;\n"
+ "MAX R3.xyz, R3, c[5].y;\n"
"MUL R1.xy, fragment.position, c[4];\n"
"TEX R1, R1, texture[0], 2D;\n"
- "ADD R2.w, -R0, c[5].x;\n"
- "MUL R3.xyz, R1, R2.w;\n"
+ "ADD R2.x, -R0.w, c[5];\n"
+ "MUL R2.xyz, R1, R2.x;\n"
"ADD R2.w, -R1, c[5].x;\n"
- "MAD R3.xyz, R0, R2.w, R3;\n"
- "MUL R1.xyz, R1, R0.w;\n"
+ "MAD R2.xyz, R0, R2.w, R2;\n"
+ "MUL R1.xyz, R0.w, R1;\n"
"MAD R0.xyz, R0, R1.w, R1;\n"
"MUL R2.w, R0, R1;\n"
- "RCP R2.x, R2.x;\n"
- "RCP R2.y, R2.y;\n"
- "RCP R2.z, R2.z;\n"
- "MAD R2.xyz, R1, R2, R3;\n"
- "MAD R3.xyz, R0.w, R1.w, R3;\n"
+ "RCP R3.x, R3.x;\n"
+ "RCP R3.y, R3.y;\n"
+ "RCP R3.z, R3.z;\n"
+ "MAD R3.xyz, R1, R3, R2;\n"
+ "MAD R2.xyz, R0.w, R1.w, R2;\n"
"ADD R1.x, R0.w, R1.w;\n"
- "ADD R3.xyz, R3, -R2;\n"
+ "ADD R2.xyz, R2, -R3;\n"
"SGE R0.xyz, R0, R2.w;\n"
- "MAD result.color.xyz, R0, R3, R2;\n"
+ "MAD result.color.xyz, R0, R2, R3;\n"
"MAD result.color.w, -R0, R1, R1.x;\n"
"END\n"
;
@@ -5769,24 +5634,23 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MODES_COLORBURN_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[6] = { program.local[0..4],\n"
- " { 1, 9.9999997e-06 } };\n"
+ " { 1, 9.9999997e-006 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
"TEMP R5;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
- "MOV R0.y, -R0;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
+ "TEX R1, R0.zwzw, texture[0], 2D;\n"
+ "MUL R0.xy, R0, c[0];\n"
"TEX R0, R0, texture[1], 2D;\n"
- "MUL R1.xy, fragment.position, c[4];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "MUL R2.xyz, R1, R0.w;\n"
+ "MUL R2.xyz, R0.w, R1;\n"
"MAD R3.xyz, R0, R1.w, R2;\n"
"ADD R2.w, -R1, c[5].x;\n"
"MAD R2.xyz, -R0.w, R1.w, R3;\n"
@@ -5799,9 +5663,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
"RCP R2.z, R2.z;\n"
"MAD R2.xyz, R4, R2, R5;\n"
"MUL R4.xyz, R1, R3.w;\n"
- "MAD R0.xyz, R0, R2.w, R4;\n"
- "ADD R3.w, -R0, c[5].x;\n"
"MAD R1.xyz, R1, R3.w, R2;\n"
+ "MAD R0.xyz, R0, R2.w, R4;\n"
"MUL R2.x, R0.w, R1.w;\n"
"ADD R2.w, R0, R1;\n"
"ADD R1.xyz, R1, -R0;\n"
@@ -5820,13 +5683,12 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
- "MOV R0.y, -R0;\n"
+ "MUL R0.xy, R0, c[0];\n"
"TEX R0, R0, texture[1], 2D;\n"
"MUL R1.xy, fragment.position, c[4];\n"
"TEX R1, R1, texture[0], 2D;\n"
@@ -5836,27 +5698,27 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
"MUL R2.xyz, R2, R3;\n"
"MUL R2.xyz, R2, c[5].x;\n"
"MAD R2.xyz, R0.w, R1.w, -R2;\n"
+ "MAD R2.xyz, R0, R2.w, R2;\n"
"MUL R4.xyz, R0, R2.w;\n"
"MUL R3.xyz, R0, R1;\n"
- "MAD R2.xyz, R0, R2.w, R2;\n"
- "ADD R2.w, -R0, c[5].y;\n"
"MUL R0.xyz, R0, c[5].x;\n"
- "MAD R2.xyz, R1, R2.w, R2;\n"
+ "ADD R2.w, -R0, c[5].y;\n"
"MAD R3.xyz, R3, c[5].x, R4;\n"
- "MAD R1.xyz, R1, R2.w, R3;\n"
- "ADD R2.w, R0, R1;\n"
- "ADD R2.xyz, R2, -R1;\n"
+ "MAD R3.xyz, R1, R2.w, R3;\n"
+ "MAD R1.xyz, R1, R2.w, R2;\n"
+ "ADD R2.x, R0.w, R1.w;\n"
+ "ADD R1.xyz, R1, -R3;\n"
"SGE R0.xyz, R0, R0.w;\n"
- "MAD result.color.xyz, R0, R2, R1;\n"
- "MAD result.color.w, -R0, R1, R2;\n"
+ "MAD result.color.xyz, R0, R1, R3;\n"
+ "MAD result.color.w, -R0, R1, R2.x;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MODES_SOFTLIGHT_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[7] = { program.local[0..4],\n"
- " { 1, 9.9999997e-06, 2, 8 },\n"
- " { 3 } };\n"
+ " { 1, 9.9999997e-006, 2, 3 },\n"
+ " { 8 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -5864,47 +5726,44 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
"TEMP R4;\n"
"TEMP R5;\n"
"TEMP R6;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
- "RCP R0.z, R0.z;\n"
- "MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
- "MUL R1.xy, fragment.position, c[4];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "MAX R0.z, R1.w, c[5].y;\n"
- "RCP R2.w, R0.z;\n"
- "MUL R2.xyz, R1, R2.w;\n"
- "MUL R6.xyz, -R2, c[5].w;\n"
- "MAD R3.xyz, -R1, R2.w, c[5].x;\n"
- "MOV R0.y, -R0;\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "MAD R4.xyz, R0, c[5].z, -R0.w;\n"
- "MUL R5.xyz, R3, R4;\n"
- "MAD R3.xyz, -R3, R4, R0.w;\n"
- "ADD R6.xyz, R6, c[6].x;\n"
- "RSQ R2.x, R2.x;\n"
- "RSQ R2.z, R2.z;\n"
- "RSQ R2.y, R2.y;\n"
- "MAD R5.xyz, -R5, R6, R0.w;\n"
- "MUL R3.xyz, R1, R3;\n"
- "RCP R2.x, R2.x;\n"
+ "MUL R0.xy, fragment.position, c[4];\n"
+ "TEX R1, R0, texture[0], 2D;\n"
+ "MAX R0.x, R1.w, c[5].y;\n"
+ "RCP R2.w, R0.x;\n"
+ "MUL R0.xyz, R1, R2.w;\n"
+ "RSQ R0.w, R0.x;\n"
+ "RCP R2.x, R0.w;\n"
+ "RSQ R0.w, R0.y;\n"
+ "RSQ R2.z, R0.z;\n"
+ "MUL R3.xyz, fragment.position.y, c[2];\n"
+ "MAD R3.xyz, fragment.position.x, c[1], R3;\n"
+ "ADD R3.xyz, R3, c[3];\n"
+ "RCP R2.y, R0.w;\n"
+ "RCP R0.w, R3.z;\n"
+ "MUL R3.xy, R3, R0.w;\n"
"RCP R2.z, R2.z;\n"
- "RCP R2.y, R2.y;\n"
- "MAD R2.xyz, R2, R1.w, -R1;\n"
- "MUL R6.xyz, R2, R4;\n"
- "MUL R2.xyz, R1, R5;\n"
+ "MAD R6.xyz, R1.w, R2, -R1;\n"
+ "MUL R2.xyz, -R0, c[6].x;\n"
+ "ADD R5.xyz, R2, c[5].w;\n"
+ "MAD R2.xyz, -R1, R2.w, c[5].x;\n"
+ "MUL R3.xy, R3, c[0];\n"
+ "TEX R0, R3, texture[1], 2D;\n"
+ "MAD R3.xyz, R0, c[5].z, -R0.w;\n"
+ "MUL R4.xyz, R2, R3;\n"
+ "MAD R4.xyz, -R4, R5, R0.w;\n"
+ "MUL R5.xyz, R6, R3;\n"
+ "MAD R2.xyz, -R2, R3, R0.w;\n"
+ "MUL R4.xyz, R1, R4;\n"
+ "MAD R5.xyz, R0.w, R1, R5;\n"
+ "ADD R6.xyz, R5, -R4;\n"
+ "MUL R5.xyz, R1, c[6].x;\n"
+ "SGE R3.xyz, R5, R1.w;\n"
+ "MAD R3.xyz, R3, R6, R4;\n"
+ "MUL R2.xyz, R1, R2;\n"
"MUL R4.xyz, R0, c[5].z;\n"
- "MAD R6.xyz, R1, R0.w, R6;\n"
- "MUL R5.xyz, R1, c[5].w;\n"
- "ADD R6.xyz, R6, -R2;\n"
- "SGE R5.xyz, R5, R1.w;\n"
- "MUL R5.xyz, R5, R6;\n"
- "ADD R2.xyz, R2, R5;\n"
- "ADD R2.xyz, R2, -R3;\n"
+ "ADD R3.xyz, R3, -R2;\n"
"SGE R4.xyz, R4, R0.w;\n"
- "MUL R2.xyz, R4, R2;\n"
- "ADD R2.xyz, R3, R2;\n"
+ "MAD R2.xyz, R4, R3, R2;\n"
"ADD R2.w, -R1, c[5].x;\n"
"MAD R0.xyz, R0, R2.w, R2;\n"
"ADD R2.x, R0.w, R1.w;\n"
@@ -5922,18 +5781,17 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
- "MOV R0.y, -R0;\n"
- "MUL R1.xy, fragment.position, c[4];\n"
+ "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
+ "TEX R1, R0.zwzw, texture[0], 2D;\n"
+ "MUL R0.xy, R0, c[0];\n"
"TEX R0, R0, texture[1], 2D;\n"
- "TEX R1, R1, texture[0], 2D;\n"
"MUL R2.xyz, R0, R1.w;\n"
- "MUL R3.xyz, R1, R0.w;\n"
+ "MUL R3.xyz, R0.w, R1;\n"
"ADD R0.xyz, R0, R1;\n"
"MIN R2.xyz, R2, R3;\n"
"ADD R1.x, R0.w, R1.w;\n"
@@ -5945,29 +5803,28 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MODES_EXCLUSION_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[6] = { program.local[0..4],\n"
- " { 1, 2 } };\n"
+ " { 2, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
- "MOV R0.y, -R0;\n"
- "MUL R1.xy, fragment.position, c[4];\n"
- "TEX R1, R1, texture[0], 2D;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
+ "TEX R1, R0.zwzw, texture[0], 2D;\n"
+ "MUL R0.xy, R0, c[0];\n"
"TEX R0, R0, texture[1], 2D;\n"
- "MUL R2.xyz, R1, R0.w;\n"
+ "MUL R2.xyz, R0.w, R1;\n"
"MAD R3.xyz, R0, R1.w, R2;\n"
"MUL R2.xyz, R0, R1;\n"
- "MAD R2.xyz, -R2, c[5].y, R3;\n"
- "ADD R2.w, -R1, c[5].x;\n"
+ "MAD R2.xyz, -R2, c[5].x, R3;\n"
+ "ADD R2.w, -R1, c[5].y;\n"
"MAD R0.xyz, R0, R2.w, R2;\n"
"ADD R2.x, R0.w, R1.w;\n"
- "ADD R2.y, -R0.w, c[5].x;\n"
+ "ADD R2.y, -R0.w, c[5];\n"
"MAD result.color.xyz, R1, R2.y, R0;\n"
"MAD result.color.w, -R0, R1, R2.x;\n"
"END\n"
@@ -5978,19 +5835,17 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
"PARAM c[7] = { program.local[0..6] };\n"
"TEMP R0;\n"
"TEMP R1;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R1.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R1.xyz, R0, c[3];\n"
"RCP R0.z, R1.z;\n"
"MUL R1.xy, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[4];\n"
- "MUL R0.xy, R0, c[5];\n"
+ "ADD R0.xy, fragment.position, c[5];\n"
+ "MUL R0.xy, R0, c[4];\n"
"TEX R0, R0, texture[0], 2D;\n"
"DP4 R1.z, R0, c[6];\n"
- "MUL R1.xy, R1, c[3];\n"
- "MOV R0.x, R1;\n"
- "MOV R0.y, -R1;\n"
- "TEX R0, R0, texture[1], 2D;\n"
+ "MUL R1.xy, R1, c[0];\n"
+ "TEX R0, R1, texture[1], 2D;\n"
"MUL result.color, R0, R1.z;\n"
"END\n"
;
@@ -5999,58 +5854,55 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
"!!ARBfp1.0\n"
"PARAM c[4] = { program.local[0..3] };\n"
"TEMP R0;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
- "MOV R0.y, -R0;\n"
+ "MUL R0.xy, R0, c[0];\n"
"TEX result.color, R0, texture[0], 2D;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODES_SIMPLE_PORTER_DUFF =
"!!ARBfp1.0\n"
- "PARAM c[11] = { program.local[0..7],\n"
- " { 1 },\n"
- " program.local[9..10] };\n"
+ "PARAM c[11] = { program.local[0..9],\n"
+ " { 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
- "MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[6];\n"
- "MOV R0.y, -R0;\n"
- "MUL R0.zw, fragment.position.xyxy, c[7].xyxy;\n"
- "TEX R1, R0.zwzw, texture[0], 2D;\n"
- "TEX R0.x, R0, texture[2], 2D;\n"
- "MUL R0, fragment.color.primary, R0.x;\n"
- "MUL R2.xyz, R1, c[10].y;\n"
- "MUL R3.xyz, R2, R0.w;\n"
- "MUL R2.xyz, R0, c[10].x;\n"
- "MAD R2.xyz, R2, R1.w, R3;\n"
- "ADD R3.xy, fragment.position, c[0];\n"
- "MUL R0.xyz, R0, c[9].y;\n"
- "ADD R2.w, -R1, c[8].x;\n"
- "MAD R2.xyz, R0, R2.w, R2;\n"
- "ADD R2.w, -R0, c[8].x;\n"
- "MUL R0.xyz, R1, c[9].z;\n"
- "MAD R2.xyz, R0, R2.w, R2;\n"
- "ADD R0.y, -R1.w, c[8].x;\n"
- "MUL R0.z, R1.w, R2.w;\n"
- "MUL R0.x, R0.w, R1.w;\n"
- "MUL R0.y, R0.w, R0;\n"
- "DP3 R2.w, R0, c[9];\n"
- "MUL R3.xy, R3, c[1];\n"
- "TEX R0, R3, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "MUL R0.zw, R0.xyxy, R0.z;\n"
+ "MUL R1.xy, R0.zwzw, c[0];\n"
+ "MOV R1.y, -R1;\n"
+ "MUL R0.xy, fragment.position, c[7];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "TEX R1.x, R1, texture[2], 2D;\n"
+ "MUL R1, fragment.color.primary, R1.x;\n"
+ "MUL R2.xyz, R0, c[4].y;\n"
+ "MUL R3.xyz, R1.w, R2;\n"
+ "MUL R2.xyz, R1, c[4].x;\n"
+ "MAD R2.xyz, R0.w, R2, R3;\n"
+ "ADD R3.xy, fragment.position, c[8];\n"
+ "ADD R2.w, -R0, c[10].x;\n"
+ "MUL R1.xyz, R1, c[5].y;\n"
+ "MAD R2.xyz, R2.w, R1, R2;\n"
+ "MUL R1.xyz, R0, c[5].z;\n"
+ "ADD R3.z, -R1.w, c[10].x;\n"
+ "MAD R2.xyz, R3.z, R1, R2;\n"
+ "MUL R1.y, R1.w, R2.w;\n"
+ "MUL R1.x, R1.w, R0.w;\n"
+ "MUL R1.z, R0.w, R3;\n"
+ "DP3 R2.w, R1, c[5];\n"
+ "MUL R3.xy, R3, c[6];\n"
+ "TEX R1, R3, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[9];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
@@ -6061,30 +5913,30 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
- "MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[6];\n"
- "MUL R0.zw, fragment.position.xyxy, c[7].xyxy;\n"
- "TEX R1, R0.zwzw, texture[0], 2D;\n"
- "MOV R0.y, -R0;\n"
- "TEX R0.x, R0, texture[2], 2D;\n"
- "MUL R0, fragment.color.primary, R0.x;\n"
- "ADD R2.x, -R1.w, c[8];\n"
- "MUL R2.xyz, R0, R2.x;\n"
- "MAD R0.xyz, R0, R1, R2;\n"
+ "MUL R0.zw, R0.xyxy, R0.z;\n"
+ "MUL R1.xy, R0.zwzw, c[0];\n"
+ "MOV R1.y, -R1;\n"
+ "MUL R0.xy, fragment.position, c[5];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "TEX R1.x, R1, texture[2], 2D;\n"
+ "MUL R1, fragment.color.primary, R1.x;\n"
"ADD R2.x, -R0.w, c[8];\n"
- "MAD R2.xyz, R1, R2.x, R0;\n"
- "ADD R0.z, R0.w, R1.w;\n"
- "MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "MUL R2.xyz, R1, R2.x;\n"
+ "MAD R1.xyz, R1, R0, R2;\n"
+ "ADD R2.x, -R1.w, c[8];\n"
+ "MAD R2.xyz, R0, R2.x, R1;\n"
+ "ADD R1.z, R1.w, R0.w;\n"
+ "MAD R2.w, -R1, R0, R1.z;\n"
+ "ADD R1.xy, fragment.position, c[6];\n"
+ "MUL R1.xy, R1, c[4];\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[7];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
@@ -6095,24 +5947,24 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[6];\n"
+ "MUL R0.xy, R0, c[0];\n"
"MOV R0.y, -R0;\n"
"TEX R1.x, R0, texture[2], 2D;\n"
- "MUL R0.xy, fragment.position, c[7];\n"
- "ADD R3.xy, fragment.position, c[0];\n"
+ "MUL R0.xy, fragment.position, c[5];\n"
+ "ADD R3.xy, fragment.position, c[6];\n"
"TEX R0, R0, texture[0], 2D;\n"
"MUL R1, fragment.color.primary, R1.x;\n"
"ADD R2, R1, R0;\n"
"MAD R2, -R1, R0, R2;\n"
- "MUL R3.xy, R3, c[1];\n"
+ "MUL R3.xy, R3, c[4];\n"
"TEX R1, R3, texture[1], 2D;\n"
"ADD R2, R2, -R0;\n"
- "DP4 R1.x, R1, c[2];\n"
+ "DP4 R1.x, R1, c[7];\n"
"MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
@@ -6126,16 +5978,16 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[6];\n"
+ "MUL R0.xy, R0, c[0];\n"
"MOV R0.y, -R0;\n"
"TEX R1.x, R0, texture[2], 2D;\n"
"MUL R1, fragment.color.primary, R1.x;\n"
- "MUL R0.xy, fragment.position, c[7];\n"
+ "MUL R0.xy, fragment.position, c[5];\n"
"TEX R0, R0, texture[0], 2D;\n"
"ADD R2.w, -R0, c[8].y;\n"
"ADD R3.xyz, R1.w, -R1;\n"
@@ -6156,11 +6008,11 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"MAD R2.xyz, R2, R1, R3;\n"
"ADD R1.z, R1.w, R0.w;\n"
"MAD R2.w, -R1, R0, R1.z;\n"
- "ADD R1.xy, fragment.position, c[0];\n"
- "MUL R1.xy, R1, c[1];\n"
+ "ADD R1.xy, fragment.position, c[6];\n"
+ "MUL R1.xy, R1, c[4];\n"
"TEX R1, R1, texture[1], 2D;\n"
"ADD R2, R2, -R0;\n"
- "DP4 R1.x, R1, c[2];\n"
+ "DP4 R1.x, R1, c[7];\n"
"MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
@@ -6173,32 +6025,33 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[6];\n"
- "MOV R0.y, -R0;\n"
- "TEX R0.x, R0, texture[2], 2D;\n"
- "MUL R1.xy, fragment.position, c[7];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "MUL R0, fragment.color.primary, R0.x;\n"
- "MUL R3.xyz, R1, R0.w;\n"
- "MUL R2.xyz, R0, R1.w;\n"
+ "MUL R0.xy, R0, c[0];\n"
+ "MOV R0.w, -R0.y;\n"
+ "MOV R0.z, R0.x;\n"
+ "TEX R1.x, R0.zwzw, texture[2], 2D;\n"
+ "MUL R0.xy, fragment.position, c[5];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "MUL R1, fragment.color.primary, R1.x;\n"
+ "MUL R3.xyz, R1.w, R0;\n"
+ "MUL R2.xyz, R1, R0.w;\n"
"MIN R2.xyz, R2, R3;\n"
- "ADD R2.w, -R1, c[8].x;\n"
- "MAD R0.xyz, R0, R2.w, R2;\n"
- "ADD R2.x, -R0.w, c[8];\n"
- "MAD R2.xyz, R1, R2.x, R0;\n"
- "ADD R0.z, R0.w, R1.w;\n"
- "MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "ADD R2.w, -R0, c[8].x;\n"
+ "MAD R1.xyz, R1, R2.w, R2;\n"
+ "ADD R2.x, -R1.w, c[8];\n"
+ "MAD R2.xyz, R0, R2.x, R1;\n"
+ "ADD R1.z, R1.w, R0.w;\n"
+ "MAD R2.w, -R1, R0, R1.z;\n"
+ "ADD R1.xy, fragment.position, c[6];\n"
+ "MUL R1.xy, R1, c[4];\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[7];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
@@ -6210,50 +6063,51 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[6];\n"
- "MOV R0.y, -R0;\n"
- "TEX R0.x, R0, texture[2], 2D;\n"
- "MUL R1.xy, fragment.position, c[7];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "MUL R0, fragment.color.primary, R0.x;\n"
- "MUL R3.xyz, R1, R0.w;\n"
- "MUL R2.xyz, R0, R1.w;\n"
+ "MUL R0.xy, R0, c[0];\n"
+ "MOV R0.w, -R0.y;\n"
+ "MOV R0.z, R0.x;\n"
+ "TEX R1.x, R0.zwzw, texture[2], 2D;\n"
+ "MUL R0.xy, fragment.position, c[5];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "MUL R1, fragment.color.primary, R1.x;\n"
+ "MUL R3.xyz, R1.w, R0;\n"
+ "MUL R2.xyz, R1, R0.w;\n"
"MAX R2.xyz, R2, R3;\n"
- "ADD R2.w, -R1, c[8].x;\n"
- "MAD R0.xyz, R0, R2.w, R2;\n"
- "ADD R2.x, -R0.w, c[8];\n"
- "MAD R2.xyz, R1, R2.x, R0;\n"
- "ADD R0.z, R0.w, R1.w;\n"
- "MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "ADD R2.w, -R0, c[8].x;\n"
+ "MAD R1.xyz, R1, R2.w, R2;\n"
+ "ADD R2.x, -R1.w, c[8];\n"
+ "MAD R2.xyz, R0, R2.x, R1;\n"
+ "ADD R1.z, R1.w, R0.w;\n"
+ "MAD R2.w, -R1, R0, R1.z;\n"
+ "ADD R1.xy, fragment.position, c[6];\n"
+ "MUL R1.xy, R1, c[4];\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[7];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODES_COLORDODGE =
"!!ARBfp1.0\n"
"PARAM c[9] = { program.local[0..7],\n"
- " { 1, 1e-06 } };\n"
+ " { 1, 1e-006 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[6];\n"
+ "MUL R0.xy, R0, c[0];\n"
"MOV R0.y, -R0;\n"
"TEX R0.x, R0, texture[2], 2D;\n"
"MUL R1, fragment.color.primary, R0.x;\n"
@@ -6261,13 +6115,13 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"RCP R0.x, R0.x;\n"
"MAD R0.xyz, -R1, R0.x, c[8].x;\n"
"MAX R2.xyz, R0, c[8].y;\n"
- "MUL R0.xy, fragment.position, c[7];\n"
+ "MUL R0.xy, fragment.position, c[5];\n"
"TEX R0, R0, texture[0], 2D;\n"
"ADD R2.w, -R1, c[8].x;\n"
"MUL R3.xyz, R0, R2.w;\n"
"ADD R2.w, -R0, c[8].x;\n"
"MAD R4.xyz, R1, R2.w, R3;\n"
- "MUL R3.xyz, R0, R1.w;\n"
+ "MUL R3.xyz, R1.w, R0;\n"
"MUL R2.w, R1, R0;\n"
"MAD R1.xyz, R1, R0.w, R3;\n"
"SGE R1.xyz, R1, R2.w;\n"
@@ -6280,11 +6134,11 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"MAD R2.xyz, R1, R4, R2;\n"
"ADD R1.z, R1.w, R0.w;\n"
"MAD R2.w, -R1, R0, R1.z;\n"
- "ADD R1.xy, fragment.position, c[0];\n"
- "MUL R1.xy, R1, c[1];\n"
+ "ADD R1.xy, fragment.position, c[6];\n"
+ "MUL R1.xy, R1, c[4];\n"
"TEX R1, R1, texture[1], 2D;\n"
"ADD R2, R2, -R0;\n"
- "DP4 R1.x, R1, c[2];\n"
+ "DP4 R1.x, R1, c[7];\n"
"MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
@@ -6292,25 +6146,26 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODES_COLORBURN =
"!!ARBfp1.0\n"
"PARAM c[9] = { program.local[0..7],\n"
- " { 1, 9.9999997e-06 } };\n"
+ " { 1, 9.9999997e-006 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
"TEMP R5;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[6];\n"
- "MOV R0.y, -R0;\n"
- "TEX R1.x, R0, texture[2], 2D;\n"
+ "MUL R0.xy, R0, c[0];\n"
+ "MOV R0.w, -R0.y;\n"
+ "MOV R0.z, R0.x;\n"
+ "TEX R1.x, R0.zwzw, texture[2], 2D;\n"
"MUL R1, fragment.color.primary, R1.x;\n"
- "MUL R0.xy, fragment.position, c[7];\n"
+ "MUL R0.xy, fragment.position, c[5];\n"
"TEX R0, R0, texture[0], 2D;\n"
- "MUL R2.xyz, R0, R1.w;\n"
+ "MUL R2.xyz, R1.w, R0;\n"
"MAD R3.xyz, R1, R0.w, R2;\n"
"MAD R2.xyz, -R1.w, R0.w, R3;\n"
"MUL R4.xyz, R1.w, R2;\n"
@@ -6325,18 +6180,17 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"MUL R4.xyz, R0, R3.w;\n"
"MAD R1.xyz, R1, R2.w, R4;\n"
"MUL R2.w, R1, R0;\n"
- "ADD R3.w, -R1, c[8].x;\n"
"MAD R2.xyz, R0, R3.w, R2;\n"
"ADD R2.xyz, R2, -R1;\n"
"SGE R3.xyz, R3, R2.w;\n"
"MAD R2.xyz, R3, R2, R1;\n"
"ADD R1.z, R1.w, R0.w;\n"
"MAD R2.w, -R1, R0, R1.z;\n"
- "ADD R1.xy, fragment.position, c[0];\n"
- "MUL R1.xy, R1, c[1];\n"
+ "ADD R1.xy, fragment.position, c[6];\n"
+ "MUL R1.xy, R1, c[4];\n"
"TEX R1, R1, texture[1], 2D;\n"
"ADD R2, R2, -R0;\n"
- "DP4 R1.x, R1, c[2];\n"
+ "DP4 R1.x, R1, c[7];\n"
"MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
@@ -6350,16 +6204,16 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[6];\n"
+ "MUL R0.xy, R0, c[0];\n"
"MOV R0.y, -R0;\n"
"TEX R1.x, R0, texture[2], 2D;\n"
"MUL R1, fragment.color.primary, R1.x;\n"
- "MUL R0.xy, fragment.position, c[7];\n"
+ "MUL R0.xy, fragment.position, c[5];\n"
"TEX R0, R0, texture[0], 2D;\n"
"ADD R2.w, -R0, c[8].y;\n"
"ADD R3.xyz, R1.w, -R1;\n"
@@ -6380,11 +6234,11 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"MAD R2.xyz, R1, R2, R3;\n"
"ADD R1.z, R1.w, R0.w;\n"
"MAD R2.w, -R1, R0, R1.z;\n"
- "ADD R1.xy, fragment.position, c[0];\n"
- "MUL R1.xy, R1, c[1];\n"
+ "ADD R1.xy, fragment.position, c[6];\n"
+ "MUL R1.xy, R1, c[4];\n"
"TEX R1, R1, texture[1], 2D;\n"
"ADD R2, R2, -R0;\n"
- "DP4 R1.x, R1, c[2];\n"
+ "DP4 R1.x, R1, c[7];\n"
"MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
@@ -6392,68 +6246,66 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODES_SOFTLIGHT =
"!!ARBfp1.0\n"
"PARAM c[10] = { program.local[0..7],\n"
- " { 1, 9.9999997e-06, 2, 8 },\n"
- " { 3 } };\n"
+ " { 1, 9.9999997e-006, 2, 3 },\n"
+ " { 8 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
"TEMP R5;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R1.xyz, R0, c[5];\n"
+ "TEMP R6;\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R1.xyz, R0, c[3];\n"
"RCP R0.z, R1.z;\n"
"MUL R1.xy, R1, R0.z;\n"
- "MUL R1.xy, R1, c[6];\n"
+ "MUL R1.xy, R1, c[0];\n"
"MOV R1.y, -R1;\n"
- "MUL R0.xy, fragment.position, c[7];\n"
+ "MUL R0.xy, fragment.position, c[5];\n"
"TEX R0, R0, texture[0], 2D;\n"
"MAX R1.z, R0.w, c[8].y;\n"
"RCP R2.w, R1.z;\n"
"MUL R2.xyz, R0, R2.w;\n"
- "MUL R5.xyz, -R2, c[8].w;\n"
- "MAD R4.xyz, -R0, R2.w, c[8].x;\n"
+ "MUL R6.xyz, -R2, c[9].x;\n"
+ "MAD R3.xyz, -R0, R2.w, c[8].x;\n"
"TEX R1.x, R1, texture[2], 2D;\n"
"MUL R1, fragment.color.primary, R1.x;\n"
- "MAD R3.xyz, R1, c[8].z, -R1.w;\n"
+ "MAD R4.xyz, R1, c[8].z, -R1.w;\n"
+ "MUL R5.xyz, R3, R4;\n"
+ "MAD R3.xyz, -R3, R4, R1.w;\n"
+ "ADD R6.xyz, R6, c[8].w;\n"
+ "MAD R5.xyz, -R5, R6, R1.w;\n"
"RSQ R2.x, R2.x;\n"
"RSQ R2.z, R2.z;\n"
"RSQ R2.y, R2.y;\n"
- "MUL R4.xyz, R4, R3;\n"
- "ADD R5.xyz, R5, c[9].x;\n"
- "MUL R5.xyz, R4, R5;\n"
- "ADD R4.xyz, R1.w, -R4;\n"
+ "MUL R5.xyz, R0, R5;\n"
+ "MUL R3.xyz, R0, R3;\n"
"ADD R2.w, -R0, c[8].x;\n"
"RCP R2.x, R2.x;\n"
"RCP R2.z, R2.z;\n"
"RCP R2.y, R2.y;\n"
- "MAD R2.xyz, R2, R0.w, -R0;\n"
- "MUL R3.xyz, R2, R3;\n"
- "ADD R2.xyz, R1.w, -R5;\n"
- "MAD R5.xyz, R0, R1.w, R3;\n"
- "MUL R2.xyz, R0, R2;\n"
- "MUL R3.xyz, R0, c[8].w;\n"
- "ADD R5.xyz, R5, -R2;\n"
- "SGE R3.xyz, R3, R0.w;\n"
- "MUL R3.xyz, R3, R5;\n"
- "ADD R2.xyz, R2, R3;\n"
- "MUL R3.xyz, R0, R4;\n"
+ "MAD R2.xyz, R0.w, R2, -R0;\n"
+ "MUL R2.xyz, R2, R4;\n"
+ "MAD R2.xyz, R1.w, R0, R2;\n"
+ "ADD R6.xyz, R2, -R5;\n"
"MUL R4.xyz, R1, c[8].z;\n"
+ "MUL R2.xyz, R0, c[9].x;\n"
+ "SGE R2.xyz, R2, R0.w;\n"
+ "MAD R2.xyz, R2, R6, R5;\n"
"SGE R4.xyz, R4, R1.w;\n"
"ADD R2.xyz, R2, -R3;\n"
- "MUL R2.xyz, R4, R2;\n"
- "ADD R2.xyz, R3, R2;\n"
+ "MAD R2.xyz, R4, R2, R3;\n"
"MAD R1.xyz, R1, R2.w, R2;\n"
"ADD R2.x, -R1.w, c[8];\n"
"MAD R2.xyz, R0, R2.x, R1;\n"
"ADD R1.z, R1.w, R0.w;\n"
"MAD R2.w, -R1, R0, R1.z;\n"
- "ADD R1.xy, fragment.position, c[0];\n"
- "MUL R1.xy, R1, c[1];\n"
+ "ADD R1.xy, fragment.position, c[6];\n"
+ "MUL R1.xy, R1, c[4];\n"
"TEX R1, R1, texture[1], 2D;\n"
"ADD R2, R2, -R0;\n"
- "DP4 R1.x, R1, c[2];\n"
+ "DP4 R1.x, R1, c[7];\n"
"MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
@@ -6466,107 +6318,106 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[6];\n"
- "MOV R0.y, -R0;\n"
- "MUL R0.zw, fragment.position.xyxy, c[7].xyxy;\n"
- "TEX R1, R0.zwzw, texture[0], 2D;\n"
- "TEX R0.x, R0, texture[2], 2D;\n"
- "MUL R0, fragment.color.primary, R0.x;\n"
- "ADD R3.xyz, R0, R1;\n"
- "MUL R2.xyz, R1, R0.w;\n"
- "MUL R0.xyz, R0, R1.w;\n"
- "MIN R0.xyz, R0, R2;\n"
- "MAD R2.xyz, -R0, c[8].x, R3;\n"
- "ADD R0.z, R0.w, R1.w;\n"
- "MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "MUL R0.xy, R0, c[0];\n"
+ "MOV R0.w, -R0.y;\n"
+ "MOV R0.z, R0.x;\n"
+ "TEX R1.x, R0.zwzw, texture[2], 2D;\n"
+ "MUL R0.xy, fragment.position, c[5];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "MUL R1, fragment.color.primary, R1.x;\n"
+ "ADD R2.xyz, R1, R0;\n"
+ "MUL R3.xyz, R1.w, R0;\n"
+ "MUL R1.xyz, R1, R0.w;\n"
+ "MIN R1.xyz, R1, R3;\n"
+ "MAD R2.xyz, -R1, c[8].x, R2;\n"
+ "ADD R1.z, R1.w, R0.w;\n"
+ "MAD R2.w, -R1, R0, R1.z;\n"
+ "ADD R1.xy, fragment.position, c[6];\n"
+ "MUL R1.xy, R1, c[4];\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[7];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODES_EXCLUSION =
"!!ARBfp1.0\n"
"PARAM c[9] = { program.local[0..7],\n"
- " { 1, 2 } };\n"
+ " { 2, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[4];\n"
- "MAD R0.xyz, fragment.position.x, c[3], R0;\n"
- "ADD R0.xyz, R0, c[5];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[6];\n"
- "MOV R0.y, -R0;\n"
- "TEX R0.x, R0, texture[2], 2D;\n"
- "MUL R1.xy, fragment.position, c[7];\n"
- "TEX R1, R1, texture[0], 2D;\n"
- "MUL R0, fragment.color.primary, R0.x;\n"
- "MUL R2.xyz, R1, R0.w;\n"
- "MAD R3.xyz, R0, R1.w, R2;\n"
- "MUL R2.xyz, R0, R1;\n"
- "MAD R2.xyz, -R2, c[8].y, R3;\n"
- "ADD R2.w, -R1, c[8].x;\n"
- "MAD R0.xyz, R0, R2.w, R2;\n"
- "ADD R2.x, -R0.w, c[8];\n"
- "MAD R2.xyz, R1, R2.x, R0;\n"
- "ADD R0.z, R0.w, R1.w;\n"
- "MAD R2.w, -R0, R1, R0.z;\n"
- "ADD R0.xy, fragment.position, c[0];\n"
- "MUL R0.xy, R0, c[1];\n"
- "TEX R0, R0, texture[1], 2D;\n"
- "ADD R2, R2, -R1;\n"
- "DP4 R0.x, R0, c[2];\n"
- "MAD result.color, R0.x, R2, R1;\n"
+ "MUL R0.xy, R0, c[0];\n"
+ "MOV R0.w, -R0.y;\n"
+ "MOV R0.z, R0.x;\n"
+ "TEX R1.x, R0.zwzw, texture[2], 2D;\n"
+ "MUL R0.xy, fragment.position, c[5];\n"
+ "TEX R0, R0, texture[0], 2D;\n"
+ "MUL R1, fragment.color.primary, R1.x;\n"
+ "MUL R2.xyz, R1.w, R0;\n"
+ "MAD R3.xyz, R1, R0.w, R2;\n"
+ "MUL R2.xyz, R1, R0;\n"
+ "MAD R2.xyz, -R2, c[8].x, R3;\n"
+ "ADD R2.w, -R0, c[8].y;\n"
+ "MAD R1.xyz, R1, R2.w, R2;\n"
+ "ADD R2.x, -R1.w, c[8].y;\n"
+ "MAD R2.xyz, R0, R2.x, R1;\n"
+ "ADD R1.z, R1.w, R0.w;\n"
+ "MAD R2.w, -R1, R0, R1.z;\n"
+ "ADD R1.xy, fragment.position, c[6];\n"
+ "MUL R1.xy, R1, c[4];\n"
+ "TEX R1, R1, texture[1], 2D;\n"
+ "ADD R2, R2, -R0;\n"
+ "DP4 R1.x, R1, c[7];\n"
+ "MAD result.color, R1.x, R2, R0;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODES_SIMPLE_PORTER_DUFF_NOMASK =
"!!ARBfp1.0\n"
- "PARAM c[8] = { program.local[0..4],\n"
- " { 1 },\n"
- " program.local[6..7] };\n"
+ "PARAM c[8] = { program.local[0..6],\n"
+ " { 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
- "MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
- "MOV R0.w, -R0.y;\n"
- "MOV R0.z, R0.x;\n"
- "TEX R1.x, R0.zwzw, texture[1], 2D;\n"
- "MUL R0.xy, fragment.position, c[4];\n"
+ "MUL R0.zw, R0.xyxy, R0.z;\n"
+ "MUL R1.xy, R0.zwzw, c[0];\n"
+ "MOV R1.y, -R1;\n"
+ "MUL R0.xy, fragment.position, c[6];\n"
"TEX R0, R0, texture[0], 2D;\n"
- "MUL R2.xyz, R0, c[7].y;\n"
+ "MUL R2.xyz, R0, c[4].y;\n"
+ "TEX R1.x, R1, texture[1], 2D;\n"
"MUL R1, fragment.color.primary, R1.x;\n"
- "MUL R3.xyz, R2, R1.w;\n"
- "MUL R2.xyz, R1, c[7].x;\n"
- "MUL R0.xyz, R0, c[6].z;\n"
- "MAD R2.xyz, R2, R0.w, R3;\n"
- "MUL R1.xyz, R1, c[6].y;\n"
- "ADD R2.w, -R0, c[5].x;\n"
- "MAD R1.xyz, R1, R2.w, R2;\n"
- "ADD R2.x, -R1.w, c[5];\n"
- "MAD result.color.xyz, R0, R2.x, R1;\n"
- "ADD R0.y, -R0.w, c[5].x;\n"
+ "MUL R3.xyz, R1.w, R2;\n"
+ "MUL R2.xyz, R1, c[4].x;\n"
+ "MUL R0.xyz, R0, c[5].z;\n"
+ "MAD R2.xyz, R0.w, R2, R3;\n"
+ "ADD R2.w, -R0, c[7].x;\n"
+ "MUL R1.xyz, R1, c[5].y;\n"
+ "MAD R1.xyz, R2.w, R1, R2;\n"
+ "ADD R2.x, -R1.w, c[7];\n"
+ "MAD result.color.xyz, R2.x, R0, R1;\n"
"MUL R0.x, R1.w, R0.w;\n"
"MUL R0.z, R0.w, R2.x;\n"
- "MUL R0.y, R1.w, R0;\n"
- "DP3 result.color.w, R0, c[6];\n"
+ "MUL R0.y, R1.w, R2.w;\n"
+ "DP3 result.color.w, R0, c[5];\n"
"END\n"
;
@@ -6577,12 +6428,12 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.z;\n"
- "MUL R1.xy, R0.zwzw, c[3];\n"
+ "MUL R1.xy, R0.zwzw, c[0];\n"
"MOV R1.y, -R1;\n"
"MUL R0.xy, fragment.position, c[4];\n"
"TEX R0, R0, texture[0], 2D;\n"
@@ -6604,12 +6455,12 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
+ "MUL R0.xy, R0, c[0];\n"
"MOV R0.w, -R0.y;\n"
"MOV R0.z, R0.x;\n"
"TEX R1.x, R0.zwzw, texture[1], 2D;\n"
@@ -6629,12 +6480,12 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
+ "MUL R0.xy, R0, c[0];\n"
"MOV R0.y, -R0;\n"
"TEX R1.x, R0, texture[1], 2D;\n"
"MUL R1, fragment.color.primary, R1.x;\n"
@@ -6670,19 +6521,20 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
- "MOV R0.y, -R0;\n"
- "TEX R1.x, R0, texture[1], 2D;\n"
+ "MUL R0.xy, R0, c[0];\n"
+ "MOV R0.w, -R0.y;\n"
+ "MOV R0.z, R0.x;\n"
+ "TEX R1.x, R0.zwzw, texture[1], 2D;\n"
"MUL R0.xy, fragment.position, c[4];\n"
"TEX R0, R0, texture[0], 2D;\n"
"MUL R1, fragment.color.primary, R1.x;\n"
"MUL R2.xyz, R1, R0.w;\n"
- "MUL R3.xyz, R0, R1.w;\n"
+ "MUL R3.xyz, R1.w, R0;\n"
"MIN R2.xyz, R2, R3;\n"
"ADD R2.w, -R0, c[5].x;\n"
"MAD R1.xyz, R1, R2.w, R2;\n"
@@ -6701,19 +6553,20 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
- "MOV R0.y, -R0;\n"
- "TEX R1.x, R0, texture[1], 2D;\n"
+ "MUL R0.xy, R0, c[0];\n"
+ "MOV R0.w, -R0.y;\n"
+ "MOV R0.z, R0.x;\n"
+ "TEX R1.x, R0.zwzw, texture[1], 2D;\n"
"MUL R0.xy, fragment.position, c[4];\n"
"TEX R0, R0, texture[0], 2D;\n"
"MUL R1, fragment.color.primary, R1.x;\n"
"MUL R2.xyz, R1, R0.w;\n"
- "MUL R3.xyz, R0, R1.w;\n"
+ "MUL R3.xyz, R1.w, R0;\n"
"MAX R2.xyz, R2, R3;\n"
"ADD R2.w, -R0, c[5].x;\n"
"MAD R1.xyz, R1, R2.w, R2;\n"
@@ -6727,17 +6580,17 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODES_COLORDODGE_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[6] = { program.local[0..4],\n"
- " { 1, 1e-06 } };\n"
+ " { 1, 1e-006 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
+ "MUL R0.xy, R0, c[0];\n"
"MOV R0.y, -R0;\n"
"TEX R0.x, R0, texture[1], 2D;\n"
"MUL R1, fragment.color.primary, R0.x;\n"
@@ -6751,7 +6604,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"MUL R3.xyz, R0, R2.w;\n"
"ADD R2.w, -R0, c[5].x;\n"
"MAD R3.xyz, R1, R2.w, R3;\n"
- "MUL R0.xyz, R0, R1.w;\n"
+ "MUL R0.xyz, R1.w, R0;\n"
"RCP R2.x, R2.x;\n"
"RCP R2.y, R2.y;\n"
"RCP R2.z, R2.z;\n"
@@ -6770,25 +6623,26 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODES_COLORBURN_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[6] = { program.local[0..4],\n"
- " { 1, 9.9999997e-06 } };\n"
+ " { 1, 9.9999997e-006 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
"TEMP R5;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
- "MOV R0.y, -R0;\n"
- "TEX R1.x, R0, texture[1], 2D;\n"
+ "MUL R0.xy, R0, c[0];\n"
+ "MOV R0.w, -R0.y;\n"
+ "MOV R0.z, R0.x;\n"
+ "TEX R1.x, R0.zwzw, texture[1], 2D;\n"
"MUL R1, fragment.color.primary, R1.x;\n"
"MUL R0.xy, fragment.position, c[4];\n"
"TEX R0, R0, texture[0], 2D;\n"
- "MUL R2.xyz, R0, R1.w;\n"
+ "MUL R2.xyz, R1.w, R0;\n"
"MAD R3.xyz, R1, R0.w, R2;\n"
"ADD R2.w, -R0, c[5].x;\n"
"MAD R2.xyz, -R1.w, R0.w, R3;\n"
@@ -6801,9 +6655,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"RCP R2.z, R2.z;\n"
"MAD R2.xyz, R4, R2, R5;\n"
"MUL R4.xyz, R0, R3.w;\n"
- "MAD R1.xyz, R1, R2.w, R4;\n"
- "ADD R3.w, -R1, c[5].x;\n"
"MAD R0.xyz, R0, R3.w, R2;\n"
+ "MAD R1.xyz, R1, R2.w, R4;\n"
"MUL R2.x, R1.w, R0.w;\n"
"ADD R2.w, R1, R0;\n"
"ADD R0.xyz, R0, -R1;\n"
@@ -6822,12 +6675,12 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
+ "MUL R0.xy, R0, c[0];\n"
"MOV R0.y, -R0;\n"
"TEX R1.x, R0, texture[1], 2D;\n"
"MUL R1, fragment.color.primary, R1.x;\n"
@@ -6858,57 +6711,55 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODES_SOFTLIGHT_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[7] = { program.local[0..4],\n"
- " { 1, 9.9999997e-06, 2, 8 },\n"
- " { 3 } };\n"
+ " { 1, 9.9999997e-006, 2, 3 },\n"
+ " { 8 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
"TEMP R5;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R1.xyz, R0, c[2];\n"
+ "TEMP R6;\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R1.xyz, R0, c[3];\n"
"RCP R0.z, R1.z;\n"
"MUL R1.xy, R1, R0.z;\n"
- "MUL R1.xy, R1, c[3];\n"
+ "MUL R1.xy, R1, c[0];\n"
"MOV R1.y, -R1;\n"
"MUL R0.xy, fragment.position, c[4];\n"
"TEX R0, R0, texture[0], 2D;\n"
"MAX R1.z, R0.w, c[5].y;\n"
"RCP R2.w, R1.z;\n"
"MUL R2.xyz, R0, R2.w;\n"
- "MUL R5.xyz, -R2, c[5].w;\n"
- "MAD R4.xyz, -R0, R2.w, c[5].x;\n"
+ "MUL R6.xyz, -R2, c[6].x;\n"
+ "MAD R3.xyz, -R0, R2.w, c[5].x;\n"
"TEX R1.x, R1, texture[1], 2D;\n"
"MUL R1, fragment.color.primary, R1.x;\n"
- "MAD R3.xyz, R1, c[5].z, -R1.w;\n"
+ "MAD R4.xyz, R1, c[5].z, -R1.w;\n"
+ "MUL R5.xyz, R3, R4;\n"
+ "MAD R3.xyz, -R3, R4, R1.w;\n"
+ "ADD R6.xyz, R6, c[5].w;\n"
+ "MAD R5.xyz, -R5, R6, R1.w;\n"
"RSQ R2.x, R2.x;\n"
"RSQ R2.z, R2.z;\n"
"RSQ R2.y, R2.y;\n"
- "MUL R4.xyz, R4, R3;\n"
- "ADD R5.xyz, R5, c[6].x;\n"
- "MUL R5.xyz, R4, R5;\n"
- "ADD R4.xyz, R1.w, -R4;\n"
+ "MUL R5.xyz, R0, R5;\n"
+ "MUL R3.xyz, R0, R3;\n"
"RCP R2.x, R2.x;\n"
"RCP R2.z, R2.z;\n"
"RCP R2.y, R2.y;\n"
- "MAD R2.xyz, R2, R0.w, -R0;\n"
- "MUL R3.xyz, R2, R3;\n"
- "ADD R2.xyz, R1.w, -R5;\n"
- "MAD R5.xyz, R0, R1.w, R3;\n"
- "MUL R2.xyz, R0, R2;\n"
- "MUL R3.xyz, R0, c[5].w;\n"
- "ADD R5.xyz, R5, -R2;\n"
- "SGE R3.xyz, R3, R0.w;\n"
- "MUL R3.xyz, R3, R5;\n"
- "ADD R2.xyz, R2, R3;\n"
- "MUL R3.xyz, R0, R4;\n"
+ "MAD R2.xyz, R0.w, R2, -R0;\n"
+ "MUL R2.xyz, R2, R4;\n"
+ "MAD R2.xyz, R1.w, R0, R2;\n"
+ "ADD R6.xyz, R2, -R5;\n"
"MUL R4.xyz, R1, c[5].z;\n"
+ "MUL R2.xyz, R0, c[6].x;\n"
+ "SGE R2.xyz, R2, R0.w;\n"
+ "MAD R2.xyz, R2, R6, R5;\n"
"ADD R2.xyz, R2, -R3;\n"
"SGE R4.xyz, R4, R1.w;\n"
- "MUL R2.xyz, R4, R2;\n"
- "ADD R2.xyz, R3, R2;\n"
+ "MAD R2.xyz, R4, R2, R3;\n"
"ADD R2.w, -R0, c[5].x;\n"
"MAD R1.xyz, R1, R2.w, R2;\n"
"ADD R2.x, R1.w, R0.w;\n"
@@ -6926,18 +6777,19 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
- "MOV R0.y, -R0;\n"
- "TEX R1.x, R0, texture[1], 2D;\n"
+ "MUL R0.xy, R0, c[0];\n"
+ "MOV R0.w, -R0.y;\n"
+ "MOV R0.z, R0.x;\n"
+ "TEX R1.x, R0.zwzw, texture[1], 2D;\n"
"MUL R0.xy, fragment.position, c[4];\n"
- "MUL R1, fragment.color.primary, R1.x;\n"
"TEX R0, R0, texture[0], 2D;\n"
- "MUL R3.xyz, R0, R1.w;\n"
+ "MUL R1, fragment.color.primary, R1.x;\n"
+ "MUL R3.xyz, R1.w, R0;\n"
"MUL R2.xyz, R1, R0.w;\n"
"ADD R0.xyz, R1, R0;\n"
"MIN R2.xyz, R2, R3;\n"
@@ -6950,30 +6802,31 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODES_EXCLUSION_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[6] = { program.local[0..4],\n"
- " { 1, 2 } };\n"
+ " { 2, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
"TEMP R3;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
- "MOV R0.y, -R0;\n"
- "TEX R1.x, R0, texture[1], 2D;\n"
+ "MUL R0.xy, R0, c[0];\n"
+ "MOV R0.w, -R0.y;\n"
+ "MOV R0.z, R0.x;\n"
+ "TEX R1.x, R0.zwzw, texture[1], 2D;\n"
"MUL R0.xy, fragment.position, c[4];\n"
"TEX R0, R0, texture[0], 2D;\n"
"MUL R1, fragment.color.primary, R1.x;\n"
- "MUL R2.xyz, R0, R1.w;\n"
+ "MUL R2.xyz, R1.w, R0;\n"
"MAD R3.xyz, R1, R0.w, R2;\n"
"MUL R2.xyz, R1, R0;\n"
- "MAD R2.xyz, -R2, c[5].y, R3;\n"
- "ADD R2.w, -R0, c[5].x;\n"
+ "MAD R2.xyz, -R2, c[5].x, R3;\n"
+ "ADD R2.w, -R0, c[5].y;\n"
"MAD R1.xyz, R1, R2.w, R2;\n"
"ADD R2.x, R1.w, R0.w;\n"
- "ADD R2.y, -R1.w, c[5].x;\n"
+ "ADD R2.y, -R1.w, c[5];\n"
"MAD result.color.xyz, R0, R2.y, R1;\n"
"MAD result.color.w, -R1, R0, R2.x;\n"
"END\n"
@@ -6984,15 +6837,15 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"PARAM c[7] = { program.local[0..6] };\n"
"TEMP R0;\n"
"TEMP R1;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R1.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R1.xyz, R0, c[3];\n"
"RCP R0.z, R1.z;\n"
"MUL R0.zw, R1.xyxy, R0.z;\n"
- "MUL R1.xy, R0.zwzw, c[3];\n"
+ "MUL R1.xy, R0.zwzw, c[0];\n"
"MOV R1.y, -R1;\n"
- "ADD R0.xy, fragment.position, c[4];\n"
- "MUL R0.xy, R0, c[5];\n"
+ "ADD R0.xy, fragment.position, c[5];\n"
+ "MUL R0.xy, R0, c[4];\n"
"TEX R0, R0, texture[0], 2D;\n"
"TEX R1.x, R1, texture[1], 2D;\n"
"DP4 R0.x, R0, c[6];\n"
@@ -7005,12 +6858,12 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"!!ARBfp1.0\n"
"PARAM c[4] = { program.local[0..3] };\n"
"TEMP R0;\n"
- "MUL R0.xyz, fragment.position.y, c[1];\n"
- "MAD R0.xyz, fragment.position.x, c[0], R0;\n"
- "ADD R0.xyz, R0, c[2];\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "MUL R0.xy, R0, c[3];\n"
+ "MUL R0.xy, R0, c[0];\n"
"MOV R0.y, -R0;\n"
"TEX R0.x, R0, texture[0], 2D;\n"
"MUL result.color, fragment.color.primary, R0.x;\n"
@@ -7195,19 +7048,19 @@ static const char *painter_fragment_program_sources[num_fragment_brushes][num_fr
static int painter_variable_locations[num_fragment_brushes][num_fragment_composition_modes][num_fragment_variables] = {
{
- { -1, -1, -1, 1, -1, 6, 2, -1, 5, 3, 1, 0, -1, 0, -1, -1, -1, -1, -1, },
- { -1, -1, -1, 1, -1, -1, 2, -1, -1, 3, 1, 0, -1, 0, -1, -1, -1, -1, -1, },
- { -1, -1, -1, 1, -1, -1, 2, -1, -1, 3, 1, 0, -1, 0, -1, -1, -1, -1, -1, },
- { -1, -1, -1, 1, -1, -1, 2, -1, -1, 3, 1, 0, -1, 0, -1, -1, -1, -1, -1, },
- { -1, -1, -1, 1, -1, -1, 2, -1, -1, 3, 1, 0, -1, 0, -1, -1, -1, -1, -1, },
- { -1, -1, -1, 1, -1, -1, 2, -1, -1, 3, 1, 0, -1, 0, -1, -1, -1, -1, -1, },
- { -1, -1, -1, 1, -1, -1, 2, -1, -1, 3, 1, 0, -1, 0, -1, -1, -1, -1, -1, },
- { -1, -1, -1, 1, -1, -1, 2, -1, -1, 3, 1, 0, -1, 0, -1, -1, -1, -1, -1, },
- { -1, -1, -1, 1, -1, -1, 2, -1, -1, 3, 1, 0, -1, 0, -1, -1, -1, -1, -1, },
- { -1, -1, -1, 1, -1, -1, 2, -1, -1, 3, 1, 0, -1, 0, -1, -1, -1, -1, -1, },
- { -1, -1, -1, 1, -1, -1, 2, -1, -1, 3, 1, 0, -1, 0, -1, -1, -1, -1, -1, },
- { -1, -1, -1, 1, -1, -1, 2, -1, -1, 3, 1, 0, -1, 0, -1, -1, -1, -1, -1, },
- { -1, -1, -1, -1, -1, 3, -1, -1, 2, 0, -1, 0, -1, -1, -1, -1, -1, -1, -1, },
+ { -1, -1, -1, 2, -1, 0, 5, -1, 1, 3, 1, 0, -1, 4, -1, -1, -1, -1, -1, },
+ { -1, -1, -1, 0, -1, -1, 3, -1, -1, 1, 1, 0, -1, 2, -1, -1, -1, -1, -1, },
+ { -1, -1, -1, 0, -1, -1, 3, -1, -1, 1, 1, 0, -1, 2, -1, -1, -1, -1, -1, },
+ { -1, -1, -1, 0, -1, -1, 3, -1, -1, 1, 1, 0, -1, 2, -1, -1, -1, -1, -1, },
+ { -1, -1, -1, 0, -1, -1, 3, -1, -1, 1, 1, 0, -1, 2, -1, -1, -1, -1, -1, },
+ { -1, -1, -1, 0, -1, -1, 3, -1, -1, 1, 1, 0, -1, 2, -1, -1, -1, -1, -1, },
+ { -1, -1, -1, 0, -1, -1, 3, -1, -1, 1, 1, 0, -1, 2, -1, -1, -1, -1, -1, },
+ { -1, -1, -1, 0, -1, -1, 3, -1, -1, 1, 1, 0, -1, 2, -1, -1, -1, -1, -1, },
+ { -1, -1, -1, 0, -1, -1, 3, -1, -1, 1, 1, 0, -1, 2, -1, -1, -1, -1, -1, },
+ { -1, -1, -1, 0, -1, -1, 3, -1, -1, 1, 1, 0, -1, 2, -1, -1, -1, -1, -1, },
+ { -1, -1, -1, 0, -1, -1, 3, -1, -1, 1, 1, 0, -1, 2, -1, -1, -1, -1, -1, },
+ { -1, -1, -1, 0, -1, -1, 3, -1, -1, 1, 1, 0, -1, 2, -1, -1, -1, -1, -1, },
+ { -1, -1, -1, -1, -1, 0, -1, -1, 1, 2, -1, 0, -1, -1, -1, -1, -1, -1, -1, },
{ -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, 0, -1, -1, -1, -1, -1, -1, -1, },
{ -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, 0, -1, -1, -1, -1, -1, -1, -1, },
{ -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, 0, -1, -1, -1, -1, -1, -1, -1, },
@@ -7219,154 +7072,154 @@ static int painter_variable_locations[num_fragment_brushes][num_fragment_composi
{ -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, 0, -1, -1, -1, -1, -1, -1, -1, },
{ -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, 0, -1, -1, -1, -1, -1, -1, -1, },
{ -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, 0, -1, -1, -1, -1, -1, -1, -1, },
- { -1, -1, -1, 1, -1, -1, 2, -1, -1, -1, 0, -1, -1, 0, -1, -1, -1, -1, -1, },
+ { -1, -1, -1, 0, -1, -1, 2, -1, -1, -1, 0, -1, -1, 1, -1, -1, -1, -1, -1, },
{ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, },
},
{
- { -1, -1, 4, 1, 5, 11, 2, -1, 10, 9, 1, 0, 2, 0, -1, 8, 6, 3, -1, },
- { -1, -1, 4, 1, 5, -1, 2, -1, -1, 9, 1, 0, 2, 0, -1, 8, 6, 3, -1, },
- { -1, -1, 4, 1, 5, -1, 2, -1, -1, 9, 1, 0, 2, 0, -1, 8, 6, 3, -1, },
- { -1, -1, 4, 1, 5, -1, 2, -1, -1, 9, 1, 0, 2, 0, -1, 8, 6, 3, -1, },
- { -1, -1, 4, 1, 5, -1, 2, -1, -1, 9, 1, 0, 2, 0, -1, 8, 6, 3, -1, },
- { -1, -1, 4, 1, 5, -1, 2, -1, -1, 9, 1, 0, 2, 0, -1, 8, 6, 3, -1, },
- { -1, -1, 4, 1, 5, -1, 2, -1, -1, 9, 1, 0, 2, 0, -1, 8, 6, 3, -1, },
- { -1, -1, 4, 1, 5, -1, 2, -1, -1, 9, 1, 0, 2, 0, -1, 8, 6, 3, -1, },
- { -1, -1, 4, 1, 5, -1, 2, -1, -1, 9, 1, 0, 2, 0, -1, 8, 6, 3, -1, },
- { -1, -1, 4, 1, 5, -1, 2, -1, -1, 9, 1, 0, 2, 0, -1, 8, 6, 3, -1, },
- { -1, -1, 4, 1, 5, -1, 2, -1, -1, 9, 1, 0, 2, 0, -1, 8, 6, 3, -1, },
- { -1, -1, 4, 1, 5, -1, 2, -1, -1, 9, 1, 0, 2, 0, -1, 8, 6, 3, -1, },
- { -1, -1, 1, -1, 2, 8, -1, -1, 7, 6, -1, 0, 1, -1, -1, 5, 3, 0, -1, },
- { -1, -1, 1, -1, 2, -1, -1, -1, -1, 6, -1, 0, 1, -1, -1, 5, 3, 0, -1, },
- { -1, -1, 1, -1, 2, -1, -1, -1, -1, 6, -1, 0, 1, -1, -1, 5, 3, 0, -1, },
- { -1, -1, 1, -1, 2, -1, -1, -1, -1, 6, -1, 0, 1, -1, -1, 5, 3, 0, -1, },
- { -1, -1, 1, -1, 2, -1, -1, -1, -1, 6, -1, 0, 1, -1, -1, 5, 3, 0, -1, },
- { -1, -1, 1, -1, 2, -1, -1, -1, -1, 6, -1, 0, 1, -1, -1, 5, 3, 0, -1, },
- { -1, -1, 1, -1, 2, -1, -1, -1, -1, 6, -1, 0, 1, -1, -1, 5, 3, 0, -1, },
- { -1, -1, 1, -1, 2, -1, -1, -1, -1, 6, -1, 0, 1, -1, -1, 5, 3, 0, -1, },
- { -1, -1, 1, -1, 2, -1, -1, -1, -1, 6, -1, 0, 1, -1, -1, 5, 3, 0, -1, },
- { -1, -1, 1, -1, 2, -1, -1, -1, -1, 6, -1, 0, 1, -1, -1, 5, 3, 0, -1, },
- { -1, -1, 1, -1, 2, -1, -1, -1, -1, 6, -1, 0, 1, -1, -1, 5, 3, 0, -1, },
- { -1, -1, 1, -1, 2, -1, -1, -1, -1, 6, -1, 0, 1, -1, -1, 5, 3, 0, -1, },
- { -1, -1, 1, 7, 2, -1, 8, -1, -1, -1, 0, -1, 1, 6, -1, 5, 3, 0, -1, },
- { -1, -1, 1, -1, 2, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, 5, 3, 0, -1, },
+ { -1, -1, 3, 7, 4, 5, 10, -1, 6, 8, 1, 0, 2, 9, -1, 1, 0, 2, -1, },
+ { -1, -1, 3, 5, 4, -1, 8, -1, -1, 6, 1, 0, 2, 7, -1, 1, 0, 2, -1, },
+ { -1, -1, 3, 5, 4, -1, 8, -1, -1, 6, 1, 0, 2, 7, -1, 1, 0, 2, -1, },
+ { -1, -1, 3, 5, 4, -1, 8, -1, -1, 6, 1, 0, 2, 7, -1, 1, 0, 2, -1, },
+ { -1, -1, 3, 5, 4, -1, 8, -1, -1, 6, 1, 0, 2, 7, -1, 1, 0, 2, -1, },
+ { -1, -1, 3, 5, 4, -1, 8, -1, -1, 6, 1, 0, 2, 7, -1, 1, 0, 2, -1, },
+ { -1, -1, 3, 5, 4, -1, 8, -1, -1, 6, 1, 0, 2, 7, -1, 1, 0, 2, -1, },
+ { -1, -1, 3, 5, 4, -1, 8, -1, -1, 6, 1, 0, 2, 7, -1, 1, 0, 2, -1, },
+ { -1, -1, 3, 5, 4, -1, 8, -1, -1, 6, 1, 0, 2, 7, -1, 1, 0, 2, -1, },
+ { -1, -1, 3, 5, 4, -1, 8, -1, -1, 6, 1, 0, 2, 7, -1, 1, 0, 2, -1, },
+ { -1, -1, 3, 5, 4, -1, 8, -1, -1, 6, 1, 0, 2, 7, -1, 1, 0, 2, -1, },
+ { -1, -1, 3, 5, 4, -1, 8, -1, -1, 6, 1, 0, 2, 7, -1, 1, 0, 2, -1, },
+ { -1, -1, 3, -1, 4, 5, -1, -1, 6, 7, -1, 0, 1, -1, -1, 1, 0, 2, -1, },
+ { -1, -1, 3, -1, 4, -1, -1, -1, -1, 5, -1, 0, 1, -1, -1, 1, 0, 2, -1, },
+ { -1, -1, 3, -1, 4, -1, -1, -1, -1, 5, -1, 0, 1, -1, -1, 1, 0, 2, -1, },
+ { -1, -1, 3, -1, 4, -1, -1, -1, -1, 5, -1, 0, 1, -1, -1, 1, 0, 2, -1, },
+ { -1, -1, 3, -1, 4, -1, -1, -1, -1, 5, -1, 0, 1, -1, -1, 1, 0, 2, -1, },
+ { -1, -1, 3, -1, 4, -1, -1, -1, -1, 5, -1, 0, 1, -1, -1, 1, 0, 2, -1, },
+ { -1, -1, 3, -1, 4, -1, -1, -1, -1, 5, -1, 0, 1, -1, -1, 1, 0, 2, -1, },
+ { -1, -1, 3, -1, 4, -1, -1, -1, -1, 5, -1, 0, 1, -1, -1, 1, 0, 2, -1, },
+ { -1, -1, 3, -1, 4, -1, -1, -1, -1, 5, -1, 0, 1, -1, -1, 1, 0, 2, -1, },
+ { -1, -1, 3, -1, 4, -1, -1, -1, -1, 5, -1, 0, 1, -1, -1, 1, 0, 2, -1, },
+ { -1, -1, 3, -1, 4, -1, -1, -1, -1, 5, -1, 0, 1, -1, -1, 1, 0, 2, -1, },
+ { -1, -1, 3, -1, 4, -1, -1, -1, -1, 5, -1, 0, 1, -1, -1, 1, 0, 2, -1, },
+ { -1, -1, 3, 5, 4, -1, 7, -1, -1, -1, 0, -1, 1, 6, -1, 1, 0, 2, -1, },
+ { -1, -1, 3, -1, 4, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, 1, 0, 2, -1, },
},
{
- { -1, -1, 4, 1, 5, 12, 2, -1, 11, 10, 1, 0, 2, 0, -1, -1, -1, 3, 8, },
- { -1, -1, 4, 1, 5, -1, 2, -1, -1, 10, 1, 0, 2, 0, -1, -1, -1, 3, 8, },
- { -1, -1, 4, 1, 5, -1, 2, -1, -1, 10, 1, 0, 2, 0, -1, -1, -1, 3, 8, },
- { -1, -1, 4, 1, 5, -1, 2, -1, -1, 10, 1, 0, 2, 0, -1, -1, -1, 3, 8, },
- { -1, -1, 4, 1, 5, -1, 2, -1, -1, 10, 1, 0, 2, 0, -1, -1, -1, 3, 8, },
- { -1, -1, 4, 1, 5, -1, 2, -1, -1, 10, 1, 0, 2, 0, -1, -1, -1, 3, 8, },
- { -1, -1, 4, 1, 5, -1, 2, -1, -1, 10, 1, 0, 2, 0, -1, -1, -1, 3, 8, },
- { -1, -1, 4, 1, 5, -1, 2, -1, -1, 10, 1, 0, 2, 0, -1, -1, -1, 3, 8, },
- { -1, -1, 4, 1, 5, -1, 2, -1, -1, 10, 1, 0, 2, 0, -1, -1, -1, 3, 8, },
- { -1, -1, 4, 1, 5, -1, 2, -1, -1, 10, 1, 0, 2, 0, -1, -1, -1, 3, 8, },
- { -1, -1, 4, 1, 5, -1, 2, -1, -1, 10, 1, 0, 2, 0, -1, -1, -1, 3, 8, },
- { -1, -1, 4, 1, 5, -1, 2, -1, -1, 10, 1, 0, 2, 0, -1, -1, -1, 3, 8, },
- { -1, -1, 1, -1, 2, 9, -1, -1, 8, 7, -1, 0, 1, -1, -1, -1, -1, 0, 5, },
- { -1, -1, 1, -1, 2, -1, -1, -1, -1, 7, -1, 0, 1, -1, -1, -1, -1, 0, 5, },
- { -1, -1, 1, -1, 2, -1, -1, -1, -1, 7, -1, 0, 1, -1, -1, -1, -1, 0, 5, },
- { -1, -1, 1, -1, 2, -1, -1, -1, -1, 7, -1, 0, 1, -1, -1, -1, -1, 0, 5, },
- { -1, -1, 1, -1, 2, -1, -1, -1, -1, 7, -1, 0, 1, -1, -1, -1, -1, 0, 5, },
- { -1, -1, 1, -1, 2, -1, -1, -1, -1, 7, -1, 0, 1, -1, -1, -1, -1, 0, 5, },
- { -1, -1, 1, -1, 2, -1, -1, -1, -1, 7, -1, 0, 1, -1, -1, -1, -1, 0, 5, },
- { -1, -1, 1, -1, 2, -1, -1, -1, -1, 7, -1, 0, 1, -1, -1, -1, -1, 0, 5, },
- { -1, -1, 1, -1, 2, -1, -1, -1, -1, 7, -1, 0, 1, -1, -1, -1, -1, 0, 5, },
- { -1, -1, 1, -1, 2, -1, -1, -1, -1, 7, -1, 0, 1, -1, -1, -1, -1, 0, 5, },
- { -1, -1, 1, -1, 2, -1, -1, -1, -1, 7, -1, 0, 1, -1, -1, -1, -1, 0, 5, },
- { -1, -1, 1, -1, 2, -1, -1, -1, -1, 7, -1, 0, 1, -1, -1, -1, -1, 0, 5, },
- { -1, -1, 1, 8, 2, -1, 9, -1, -1, -1, 0, -1, 1, 7, -1, -1, -1, 0, 5, },
- { -1, -1, 1, -1, 2, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, 0, 5, },
+ { -1, -1, 2, 6, 3, 4, 9, -1, 5, 7, 1, 0, 2, 8, -1, -1, -1, 1, 0, },
+ { -1, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, 0, },
+ { -1, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, 0, },
+ { -1, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, 0, },
+ { -1, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, 0, },
+ { -1, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, 0, },
+ { -1, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, 0, },
+ { -1, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, 0, },
+ { -1, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, 0, },
+ { -1, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, 0, },
+ { -1, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, 0, },
+ { -1, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, 0, },
+ { -1, -1, 2, -1, 3, 4, -1, -1, 5, 6, -1, 0, 1, -1, -1, -1, -1, 1, 0, },
+ { -1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, 0, },
+ { -1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, 0, },
+ { -1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, 0, },
+ { -1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, 0, },
+ { -1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, 0, },
+ { -1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, 0, },
+ { -1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, 0, },
+ { -1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, 0, },
+ { -1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, 0, },
+ { -1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, 0, },
+ { -1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, 0, },
+ { -1, -1, 2, 4, 3, -1, 6, -1, -1, -1, 0, -1, 1, 5, -1, -1, -1, 1, 0, },
+ { -1, -1, 2, -1, 3, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, 1, 0, },
},
{
- { -1, 6, 4, 1, 5, 10, 2, -1, 9, 7, 1, 0, 2, 0, -1, -1, -1, 3, -1, },
- { -1, 6, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, 2, 0, -1, -1, -1, 3, -1, },
- { -1, 6, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, 2, 0, -1, -1, -1, 3, -1, },
- { -1, 6, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, 2, 0, -1, -1, -1, 3, -1, },
- { -1, 6, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, 2, 0, -1, -1, -1, 3, -1, },
- { -1, 6, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, 2, 0, -1, -1, -1, 3, -1, },
- { -1, 6, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, 2, 0, -1, -1, -1, 3, -1, },
- { -1, 6, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, 2, 0, -1, -1, -1, 3, -1, },
- { -1, 6, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, 2, 0, -1, -1, -1, 3, -1, },
- { -1, 6, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, 2, 0, -1, -1, -1, 3, -1, },
- { -1, 6, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, 2, 0, -1, -1, -1, 3, -1, },
- { -1, 6, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, 2, 0, -1, -1, -1, 3, -1, },
- { -1, 3, 1, -1, 2, 7, -1, -1, 6, 4, -1, 0, 1, -1, -1, -1, -1, 0, -1, },
- { -1, 3, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 0, -1, },
- { -1, 3, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 0, -1, },
- { -1, 3, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 0, -1, },
- { -1, 3, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 0, -1, },
- { -1, 3, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 0, -1, },
- { -1, 3, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 0, -1, },
- { -1, 3, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 0, -1, },
- { -1, 3, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 0, -1, },
- { -1, 3, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 0, -1, },
- { -1, 3, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 0, -1, },
- { -1, 3, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 0, -1, },
- { -1, 3, 1, 5, 2, -1, 6, -1, -1, -1, 0, -1, 1, 4, -1, -1, -1, 0, -1, },
- { -1, 3, 1, -1, 2, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, 0, -1, },
+ { -1, 0, 2, 6, 3, 4, 9, -1, 5, 7, 1, 0, 2, 8, -1, -1, -1, 1, -1, },
+ { -1, 0, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, -1, },
+ { -1, 0, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, -1, },
+ { -1, 0, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, -1, },
+ { -1, 0, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, -1, },
+ { -1, 0, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, -1, },
+ { -1, 0, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, -1, },
+ { -1, 0, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, -1, },
+ { -1, 0, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, -1, },
+ { -1, 0, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, -1, },
+ { -1, 0, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, -1, },
+ { -1, 0, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, -1, },
+ { -1, 0, 2, -1, 3, 4, -1, -1, 5, 6, -1, 0, 1, -1, -1, -1, -1, 1, -1, },
+ { -1, 0, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, -1, },
+ { -1, 0, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, -1, },
+ { -1, 0, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, -1, },
+ { -1, 0, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, -1, },
+ { -1, 0, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, -1, },
+ { -1, 0, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, -1, },
+ { -1, 0, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, -1, },
+ { -1, 0, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, -1, },
+ { -1, 0, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, -1, },
+ { -1, 0, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, -1, },
+ { -1, 0, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, -1, },
+ { -1, 0, 2, 4, 3, -1, 6, -1, -1, -1, 0, -1, 1, 5, -1, -1, -1, 1, -1, },
+ { -1, 0, 2, -1, 3, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, 1, -1, },
},
{
- { 2, -1, 4, 1, 5, 10, 2, -1, 9, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, },
- { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, },
- { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, },
- { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, },
- { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, },
- { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, },
- { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, },
- { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, },
- { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, },
- { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, },
- { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, },
- { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, },
- { 1, -1, 1, -1, 2, 7, -1, -1, 6, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, },
- { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, },
- { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, },
- { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, },
- { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, },
- { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, },
- { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, },
- { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, },
- { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, },
- { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, },
- { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, },
- { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, },
- { 1, -1, 1, 5, 2, -1, 6, -1, -1, -1, 0, -1, -1, 4, 3, -1, -1, 0, -1, },
- { 0, -1, 1, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, -1, -1, 0, -1, },
+ { 2, -1, 2, 6, 3, 4, 9, -1, 5, 7, 1, 0, -1, 8, 0, -1, -1, 1, -1, },
+ { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, },
+ { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, },
+ { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, },
+ { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, },
+ { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, },
+ { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, },
+ { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, },
+ { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, },
+ { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, },
+ { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, },
+ { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, },
+ { 1, -1, 2, -1, 3, 4, -1, -1, 5, 6, -1, 0, -1, -1, 0, -1, -1, 1, -1, },
+ { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, },
+ { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, },
+ { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, },
+ { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, },
+ { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, },
+ { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, },
+ { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, },
+ { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, },
+ { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, },
+ { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, },
+ { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, },
+ { 1, -1, 2, 4, 3, -1, 6, -1, -1, -1, 0, -1, -1, 5, 0, -1, -1, 1, -1, },
+ { 0, -1, 2, -1, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, 1, -1, },
},
{
- { 2, -1, 4, 1, 5, 10, 2, -1, 9, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, },
- { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, },
- { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, },
- { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, },
- { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, },
- { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, },
- { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, },
- { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, },
- { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, },
- { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, },
- { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, },
- { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, },
- { 1, -1, 1, -1, 2, 7, -1, -1, 6, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, },
- { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, },
- { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, },
- { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, },
- { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, },
- { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, },
- { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, },
- { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, },
- { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, },
- { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, },
- { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, },
- { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, },
- { 1, -1, 1, 5, 2, -1, 6, -1, -1, -1, 0, -1, -1, 4, 3, -1, -1, 0, -1, },
- { 0, -1, 1, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, -1, -1, 0, -1, },
+ { 2, -1, 2, 6, 3, 4, 9, -1, 5, 7, 1, 0, -1, 8, 0, -1, -1, 1, -1, },
+ { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, },
+ { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, },
+ { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, },
+ { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, },
+ { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, },
+ { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, },
+ { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, },
+ { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, },
+ { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, },
+ { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, },
+ { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, },
+ { 1, -1, 2, -1, 3, 4, -1, -1, 5, 6, -1, 0, -1, -1, 0, -1, -1, 1, -1, },
+ { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, },
+ { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, },
+ { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, },
+ { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, },
+ { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, },
+ { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, },
+ { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, },
+ { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, },
+ { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, },
+ { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, },
+ { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, },
+ { 1, -1, 2, 4, 3, -1, 6, -1, -1, -1, 0, -1, -1, 5, 0, -1, -1, 1, -1, },
+ { 0, -1, 2, -1, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, 1, -1, },
},
};
static int mask_variable_locations[num_fragment_masks][num_fragment_variables] = {
{ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, },
- { -1, -1, 2, -1, 3, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, },
+ { -1, -1, 1, -1, 2, -1, -1, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, },
};
#endif
diff --git a/src/opengl/util/generator.pro b/src/opengl/util/generator.pro
index 9425dbe..ac71934 100644
--- a/src/opengl/util/generator.pro
+++ b/src/opengl/util/generator.pro
@@ -9,3 +9,5 @@ INCLUDEPATH += .
# Input
SOURCES += generator.cpp
+
+CONFIG += console
diff --git a/src/opengl/util/texture_brush.glsl b/src/opengl/util/texture_brush.glsl
index 93865b8..9498255 100644
--- a/src/opengl/util/texture_brush.glsl
+++ b/src/opengl/util/texture_brush.glsl
@@ -17,7 +17,5 @@ vec4 brush()
coords *= inv_brush_texture_size;
- coords.y = -coords.y;
-
return texture2D(brush_texture, coords);
}
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp
index d2c7b8b..09eb646 100644
--- a/src/openvg/qpaintengine_vg.cpp
+++ b/src/openvg/qpaintengine_vg.cpp
@@ -3072,43 +3072,42 @@ void QVGPaintEngine::setState(QPainterState *s)
}
}
-// Called from QPaintEngine::syncState() to force a state flush.
-// This should be called before and after raw VG operations.
-void QVGPaintEngine::updateState(const QPaintEngineState &state)
+void QVGPaintEngine::beginNativePainting()
{
- Q_UNUSED(state);
Q_D(QVGPaintEngine);
- if (!(d->rawVG)) {
- // About to enter raw VG mode: flush pending changes and make
- // sure that all matrices are set to the current transformation.
- QVGPainterState *s = this->state();
- d->ensurePen(s->pen);
- d->ensureBrush(s->brush);
- d->ensurePathTransform();
- d->setTransform(VG_MATRIX_IMAGE_USER_TO_SURFACE, d->imageTransform);
+ // About to enter raw VG mode: flush pending changes and make
+ // sure that all matrices are set to the current transformation.
+ QVGPainterState *s = this->state();
+ d->ensurePen(s->pen);
+ d->ensureBrush(s->brush);
+ d->ensurePathTransform();
+ d->setTransform(VG_MATRIX_IMAGE_USER_TO_SURFACE, d->imageTransform);
#if !defined(QVG_NO_DRAW_GLYPHS)
- d->setTransform(VG_MATRIX_GLYPH_USER_TO_SURFACE, d->pathTransform);
+ d->setTransform(VG_MATRIX_GLYPH_USER_TO_SURFACE, d->pathTransform);
#endif
- d->rawVG = true;
- } else {
- // Exiting raw VG mode: force all state values to be
- // explicitly set on the VG engine to undo any changes
- // that were made by the raw VG function calls.
- QPaintEngine::DirtyFlags dirty = d->dirty;
- d->clearModes();
- d->forcePenChange = true;
- d->forceBrushChange = true;
- d->penType = (VGPaintType)0;
- d->brushType = (VGPaintType)0;
- d->clearColor = QColor();
- d->fillPaint = d->brushPaint;
- restoreState(QPaintEngine::AllDirty);
- d->dirty = dirty;
- d->rawVG = false;
- vgSetPaint(d->penPaint, VG_STROKE_PATH);
- vgSetPaint(d->brushPaint, VG_FILL_PATH);
- }
+ d->rawVG = true;
+}
+
+void QVGPaintEngine::endNativePainting()
+{
+ Q_D(QVGPaintEngine);
+ // Exiting raw VG mode: force all state values to be
+ // explicitly set on the VG engine to undo any changes
+ // that were made by the raw VG function calls.
+ QPaintEngine::DirtyFlags dirty = d->dirty;
+ d->clearModes();
+ d->forcePenChange = true;
+ d->forceBrushChange = true;
+ d->penType = (VGPaintType)0;
+ d->brushType = (VGPaintType)0;
+ d->clearColor = QColor();
+ d->fillPaint = d->brushPaint;
+ restoreState(QPaintEngine::AllDirty);
+ d->dirty = dirty;
+ d->rawVG = false;
+ vgSetPaint(d->penPaint, VG_STROKE_PATH);
+ vgSetPaint(d->brushPaint, VG_FILL_PATH);
}
QPixmapFilter *QVGPaintEngine::createPixmapFilter(int type) const
diff --git a/src/openvg/qpaintengine_vg_p.h b/src/openvg/qpaintengine_vg_p.h
index 469ec9e..f0a7838 100644
--- a/src/openvg/qpaintengine_vg_p.h
+++ b/src/openvg/qpaintengine_vg_p.h
@@ -140,7 +140,8 @@ public:
QVGPainterState *state() { return static_cast<QVGPainterState *>(QPaintEngineEx::state()); }
const QVGPainterState *state() const { return static_cast<const QVGPainterState *>(QPaintEngineEx::state()); }
- void updateState(const QPaintEngineState &state);
+ void beginNativePainting();
+ void endNativePainting();
QPixmapFilter *createPixmapFilter(int type) const;
diff --git a/src/plugins/gfxdrivers/directfb/directfb.pro b/src/plugins/gfxdrivers/directfb/directfb.pro
index 5c60b2f..c5da3df 100644
--- a/src/plugins/gfxdrivers/directfb/directfb.pro
+++ b/src/plugins/gfxdrivers/directfb/directfb.pro
@@ -6,6 +6,9 @@ QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/gfxdrivers
# These defines might be necessary if your DirectFB driver doesn't
# support all of the DirectFB API.
#
+#DEFINES += QT_DIRECTFB_WINDOW_AS_CURSOR
+#DEFINES += QT_NO_DIRECTFB_IMAGEPROVIDER
+#DEFINES += QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE
#DEFINES += QT_DIRECTFB_IMAGECACHE
#DEFINES += QT_NO_DIRECTFB_WM
#DEFINES += QT_NO_DIRECTFB_LAYER
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp
index 3979a8c..6abf0ff 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp
@@ -47,7 +47,8 @@
QDirectFBPaintDevice::QDirectFBPaintDevice(QDirectFBScreen *scr)
: QCustomRasterPaintDevice(0), dfbSurface(0), lockedImage(0), screen(scr),
- bpl(-1), lockFlgs(DFBSurfaceLockFlags(0)), mem(0), engine(0)
+ bpl(-1), lockFlgs(DFBSurfaceLockFlags(0)), mem(0), engine(0),
+ imageFormat(QImage::Format_Invalid)
{}
QDirectFBPaintDevice::~QDirectFBPaintDevice()
@@ -56,13 +57,11 @@ QDirectFBPaintDevice::~QDirectFBPaintDevice()
delete engine;
}
-
IDirectFBSurface *QDirectFBPaintDevice::directFBSurface() const
{
return dfbSurface;
}
-
void QDirectFBPaintDevice::lockDirectFB(DFBSurfaceLockFlags flags)
{
if (!(lockFlgs & flags)) {
@@ -77,7 +76,6 @@ void QDirectFBPaintDevice::lockDirectFB(DFBSurfaceLockFlags flags)
}
}
-
void QDirectFBPaintDevice::unlockDirectFB()
{
if (!lockedImage || !QDirectFBScreen::instance())
@@ -90,26 +88,23 @@ void QDirectFBPaintDevice::unlockDirectFB()
lockFlgs = DFBSurfaceLockFlags(0);
}
-
void *QDirectFBPaintDevice::memory() const
{
return mem;
}
-
QImage::Format QDirectFBPaintDevice::format() const
{
- return QDirectFBScreen::getImageFormat(dfbSurface);
+ return imageFormat;
}
-
int QDirectFBPaintDevice::bytesPerLine() const
{
if (bpl == -1) {
// Can only get the stride when we lock the surface
Q_ASSERT(!lockedImage);
QDirectFBPaintDevice* that = const_cast<QDirectFBPaintDevice*>(this);
- that->lockDirectFB(DSLF_READ);
+ that->lockDirectFB(DSLF_READ|DSLF_WRITE);
Q_ASSERT(bpl != -1);
}
return bpl;
@@ -143,11 +138,9 @@ int QDirectFBPaintDevice::metric(QPaintDevice::PaintDeviceMetric metric) const
case QPaintDevice::PdmDpiY:
return (dotsPerMeterY() * 254) / 10000; // 0.0254 meters-per-inch
case QPaintDevice::PdmDepth:
- DFBSurfacePixelFormat format;
- dfbSurface->GetPixelFormat(dfbSurface, &format);
- return QDirectFBScreen::depth(format);
+ return QDirectFBScreen::depth(imageFormat);
case QPaintDevice::PdmNumColors: {
- if (lockedImage)
+ if (lockedImage)
return lockedImage->numColors();
DFBResult result;
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h
index 688fd7b..48761b2 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h
@@ -89,6 +89,7 @@ protected:
DFBSurfaceLockFlags lockFlgs;
uchar *mem;
QDirectFBPaintEngine *engine;
+ QImage::Format imageFormat;
private:
Q_DISABLE_COPY(QDirectFBPaintDevice);
};
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
index 7cacdd9..146a920 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
@@ -45,13 +45,14 @@
#include "qdirectfbpaintengine.h"
#include <QtGui/qbitmap.h>
+#include <QtCore/qfile.h>
#include <directfb.h>
static int global_ser_no = 0;
QDirectFBPixmapData::QDirectFBPixmapData(QDirectFBScreen *screen, PixelType pixelType)
: QPixmapData(pixelType, DirectFBClass), QDirectFBPaintDevice(screen),
- format(QImage::Format_Invalid), alpha(false)
+ alpha(false)
{
setSerialNumber(0);
}
@@ -70,11 +71,11 @@ void QDirectFBPixmapData::resize(int width, int height)
return;
}
- format = screen->pixelFormat();
+ imageFormat = screen->pixelFormat();
dfbSurface = screen->createDFBSurface(QSize(width, height),
- format,
+ imageFormat,
QDirectFBScreen::TrackSurface);
- d = screen->depth();
+ d = QDirectFBScreen::depth(imageFormat);
alpha = false;
if (!dfbSurface) {
invalidate();
@@ -85,7 +86,6 @@ void QDirectFBPixmapData::resize(int width, int height)
w = width;
h = height;
is_null = (w <= 0 || h <= 0);
- d = metric(QPaintDevice::PdmDepth);
setSerialNumber(++global_ser_no);
}
@@ -168,6 +168,165 @@ bool QDirectFBPixmapData::hasAlphaChannel(const QImage &img)
#endif
}
+#ifdef QT_DIRECTFB_IMAGEPROVIDER
+bool QDirectFBPixmapData::fromFile(const QString &filename, const char *format,
+ Qt::ImageConversionFlags flags)
+{
+ if (flags == Qt::AutoColor) {
+ if (filename.startsWith(QLatin1Char(':'))) { // resource
+ QFile file(filename);
+ if (!file.open(QIODevice::ReadOnly))
+ return false;
+ const QByteArray data = file.readAll();
+ file.close();
+ return fromData(reinterpret_cast<const uchar*>(data.constData()), data.size(), format, flags);
+ } else {
+ DFBDataBufferDescription description;
+ description.flags = DBDESC_FILE;
+ const QByteArray fileNameData = filename.toLocal8Bit();
+ description.file = fileNameData.constData();
+ if (fromDataBufferDescription(description)) {
+ return true;
+ }
+ // fall back to Qt
+ }
+ }
+ return QPixmapData::fromFile(filename, format, flags);
+}
+
+bool QDirectFBPixmapData::fromData(const uchar *buffer, uint len, const char *format,
+ Qt::ImageConversionFlags flags)
+{
+ if (flags == Qt::AutoColor) {
+ DFBDataBufferDescription description;
+ description.flags = DBDESC_MEMORY;
+ description.memory.data = buffer;
+ description.memory.length = len;
+ if (fromDataBufferDescription(description))
+ return true;
+ // fall back to Qt
+ }
+ return QPixmapData::fromData(buffer, len, format, flags);
+}
+
+template <typename T> struct QDirectFBInterfaceCleanupHandler
+{
+ static void cleanup(T *t) { if (t) t->Release(t); }
+};
+
+template <typename T>
+class QDirectFBPointer : public QScopedPointer<T, QDirectFBInterfaceCleanupHandler<T> >
+{
+public:
+ QDirectFBPointer(T *t = 0)
+ : QScopedPointer<T, QDirectFBInterfaceCleanupHandler<T> >(t)
+ {}
+};
+
+bool QDirectFBPixmapData::fromDataBufferDescription(const DFBDataBufferDescription &dataBufferDescription)
+{
+ IDirectFB *dfb = screen->dfb();
+ Q_ASSERT(dfb);
+ DFBResult result = DFB_OK;
+ IDirectFBDataBuffer *dataBufferPtr;
+ if ((result = dfb->CreateDataBuffer(dfb, &dataBufferDescription, &dataBufferPtr)) != DFB_OK) {
+ DirectFBError("QDirectFBPixmapData::fromDataBufferDescription()", result);
+ return false;
+ }
+ QDirectFBPointer<IDirectFBDataBuffer> dataBuffer(dataBufferPtr);
+
+ IDirectFBImageProvider *providerPtr;
+ if ((result = dataBuffer->CreateImageProvider(dataBuffer.data(), &providerPtr)) != DFB_OK) {
+ DirectFBError("QDirectFBPixmapData::fromDataBufferDescription(): Can't create image provider", result);
+ return false;
+ }
+ QDirectFBPointer<IDirectFBImageProvider> provider(providerPtr);
+
+ DFBSurfaceDescription surfaceDescription;
+ if ((result = provider->GetSurfaceDescription(provider.data(), &surfaceDescription)) != DFB_OK) {
+ DirectFBError("QDirectFBPixmapData::fromDataBufferDescription(): Can't get surface description", result);
+ return false;
+ }
+
+ QDirectFBPointer<IDirectFBSurface> surfaceFromDescription;
+ surfaceFromDescription.reset(screen->createDFBSurface(surfaceDescription, QDirectFBScreen::DontTrackSurface, &result));
+ if (!surfaceFromDescription) {
+ DirectFBError("QDirectFBPixmapData::fromSurfaceDescription(): Can't create surface", result);
+ return false;
+ }
+
+ result = provider->RenderTo(provider.data(), surfaceFromDescription.data(), 0);
+ if (result != DFB_OK) {
+ DirectFBError("QDirectFBPixmapData::fromSurfaceDescription(): Can't render to surface", result);
+ return false;
+ }
+
+ DFBImageDescription imageDescription;
+ result = provider->GetImageDescription(provider.data(), &imageDescription);
+ if (result != DFB_OK) {
+ DirectFBError("QDirectFBPixmapData::fromSurfaceDescription(): Can't get image description", result);
+ return false;
+ }
+
+ alpha = imageDescription.caps & (DICAPS_ALPHACHANNEL|DICAPS_COLORKEY);
+ imageFormat = alpha ? screen->alphaPixmapFormat() : screen->pixelFormat();
+
+ dfbSurface = screen->createDFBSurface(QSize(surfaceDescription.width, surfaceDescription.height),
+ imageFormat, QDirectFBScreen::TrackSurface);
+ if (alpha)
+ dfbSurface->Clear(dfbSurface, 0, 0, 0, 0);
+
+ DFBSurfaceBlittingFlags blittingFlags = DSBLIT_NOFX;
+ if (imageDescription.caps & DICAPS_COLORKEY) {
+ blittingFlags |= DSBLIT_SRC_COLORKEY;
+ result = surfaceFromDescription->SetSrcColorKey(surfaceFromDescription.data(),
+ imageDescription.colorkey_r,
+ imageDescription.colorkey_g,
+ imageDescription.colorkey_b);
+ if (result != DFB_OK) {
+ DirectFBError("QDirectFBPixmapData::fromSurfaceDescription: Can't set src color key", result);
+ invalidate(); // release dfbSurface
+ return false;
+ }
+ }
+ if (imageDescription.caps & DICAPS_ALPHACHANNEL) {
+ blittingFlags |= DSBLIT_BLEND_ALPHACHANNEL;
+ }
+ result = dfbSurface->SetBlittingFlags(dfbSurface, blittingFlags);
+ if (result != DFB_OK) {
+ DirectFBError("QDirectFBPixmapData::fromSurfaceDescription: Can't set blitting flags", result);
+ invalidate(); // release dfbSurface
+ return false;
+ }
+
+ result = dfbSurface->Blit(dfbSurface, surfaceFromDescription.data(), 0, 0, 0);
+ if (result != DFB_OK) {
+ DirectFBError("QDirectFBPixmapData::fromSurfaceDescription: Can't blit to surface", result);
+ invalidate(); // release dfbSurface
+ return false;
+ }
+ if (blittingFlags != DSBLIT_NOFX) {
+ dfbSurface->SetBlittingFlags(dfbSurface, DSBLIT_NOFX);
+ }
+
+
+ w = surfaceDescription.width;
+ h = surfaceDescription.height;
+ is_null = (w <= 0 || h <= 0);
+ d = QDirectFBScreen::depth(imageFormat);
+ setSerialNumber(++global_ser_no);
+#if (Q_DIRECTFB_VERSION >= 0x010000)
+ dfbSurface->ReleaseSource(dfbSurface);
+#endif
+#if defined QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE
+ screen->setDirectFBImageProvider(providerPtr);
+ provider.take();
+#endif
+
+ return true;
+}
+
+#endif
void QDirectFBPixmapData::fromImage(const QImage &image,
Qt::ImageConversionFlags flags)
@@ -183,13 +342,13 @@ void QDirectFBPixmapData::fromImage(const QImage &image,
#endif
) {
alpha = true;
- format = screen->alphaPixmapFormat();
+ imageFormat = screen->alphaPixmapFormat();
} else {
alpha = false;
- format = screen->pixelFormat();
+ imageFormat = screen->pixelFormat();
}
- dfbSurface = screen->createDFBSurface(image, format, QDirectFBScreen::TrackSurface|QDirectFBScreen::NoPreallocated);
+ dfbSurface = screen->createDFBSurface(image, imageFormat, QDirectFBScreen::TrackSurface|QDirectFBScreen::NoPreallocated);
if (!dfbSurface) {
qWarning("QDirectFBPixmapData::fromImage()");
invalidate();
@@ -198,7 +357,7 @@ void QDirectFBPixmapData::fromImage(const QImage &image,
w = image.width();
h = image.height();
is_null = (w <= 0 || h <= 0);
- d = metric(QPaintDevice::PdmDepth);
+ d = QDirectFBScreen::depth(imageFormat);
setSerialNumber(++global_ser_no);
#ifdef QT_NO_DIRECTFB_OPAQUE_DETECTION
Q_UNUSED(flags);
@@ -216,12 +375,12 @@ void QDirectFBPixmapData::copy(const QPixmapData *data, const QRect &rect)
const QDirectFBPixmapData *otherData = static_cast<const QDirectFBPixmapData*>(data);
IDirectFBSurface *src = otherData->directFBSurface();
alpha = data->hasAlphaChannel();
- format = (alpha
- ? QDirectFBScreen::instance()->alphaPixmapFormat()
- : QDirectFBScreen::instance()->pixelFormat());
+ imageFormat = (alpha
+ ? QDirectFBScreen::instance()->alphaPixmapFormat()
+ : QDirectFBScreen::instance()->pixelFormat());
- dfbSurface = screen->createDFBSurface(rect.size(), format,
+ dfbSurface = screen->createDFBSurface(rect.size(), imageFormat,
QDirectFBScreen::TrackSurface);
if (!dfbSurface) {
qWarning("QDirectFBPixmapData::copy()");
@@ -279,11 +438,12 @@ void QDirectFBPixmapData::fill(const QColor &color)
alpha = (color.alpha() < 255);
- if (alpha && ::isOpaqueFormat(format)) {
+ if (alpha && ::isOpaqueFormat(imageFormat)) {
QSize size;
dfbSurface->GetSize(dfbSurface, &size.rwidth(), &size.rheight());
screen->releaseDFBSurface(dfbSurface);
- format = screen->alphaPixmapFormat();
+ imageFormat = screen->alphaPixmapFormat();
+ d = QDirectFBScreen::depth(imageFormat);
dfbSurface = screen->createDFBSurface(size, screen->alphaPixmapFormat(), QDirectFBScreen::TrackSurface);
setSerialNumber(++global_ser_no);
if (!dfbSurface) {
@@ -324,7 +484,7 @@ QPixmap QDirectFBPixmapData::transformed(const QTransform &transform,
flags = DSBLIT_BLEND_ALPHACHANNEL;
}
data->dfbSurface = screen->createDFBSurface(size,
- format,
+ imageFormat,
QDirectFBScreen::TrackSurface);
if (flags & DSBLIT_BLEND_ALPHACHANNEL) {
data->dfbSurface->Clear(data->dfbSurface, 0, 0, 0, 0);
@@ -411,6 +571,6 @@ void QDirectFBPixmapData::invalidate()
alpha = false;
d = w = h = 0;
is_null = true;
- format = QImage::Format_Invalid;
+ imageFormat = QImage::Format_Invalid;
}
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h
index 2300174..f0ae2f8 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h
@@ -62,6 +62,12 @@ public:
// Re-implemented from QPixmapData:
virtual void resize(int width, int height);
virtual void fromImage(const QImage &image, Qt::ImageConversionFlags flags);
+#ifdef QT_DIRECTFB_IMAGEPROVIDER
+ virtual bool fromFile(const QString &filename, const char *format,
+ Qt::ImageConversionFlags flags);
+ virtual bool fromData(const uchar *buffer, uint len, const char *format,
+ Qt::ImageConversionFlags flags);
+#endif
virtual void copy(const QPixmapData *data, const QRect &rect);
virtual void fill(const QColor &color);
virtual QPixmap transformed(const QTransform &matrix,
@@ -74,12 +80,14 @@ public:
QImage *buffer(DFBSurfaceLockFlags lockFlags);
// Pure virtual in QPixmapData, so re-implement here and delegate to QDirectFBPaintDevice
- inline QImage::Format pixelFormat() const { return format; }
+ inline QImage::Format pixelFormat() const { return imageFormat; }
static bool hasAlphaChannel(const QImage &img);
inline bool hasAlphaChannel() const { return alpha; }
private:
+#ifdef QT_DIRECTFB_IMAGEPROVIDER
+ bool fromDataBufferDescription(const DFBDataBufferDescription &dataBuffer);
+#endif
void invalidate();
- QImage::Format format;
bool alpha;
};
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
index bb614a2..1bf74d4 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
@@ -87,6 +87,9 @@ public:
#ifndef QT_NO_DIRECTFB_KEYBOARD
QDirectFBKeyboardHandler *keyboard;
#endif
+#if defined QT_DIRECTFB_IMAGEPROVIDER && defined QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE
+ IDirectFBImageProvider *imageProvider;
+#endif
QColor backgroundColor;
QDirectFBScreen *q;
};
@@ -109,6 +112,9 @@ QDirectFBScreenPrivate::QDirectFBScreenPrivate(QDirectFBScreen *qptr)
#ifndef QT_NO_DIRECTFB_KEYBOARD
, keyboard(0)
#endif
+#if defined QT_DIRECTFB_IMAGEPROVIDER && defined QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE
+ , imageProvider(0)
+#endif
, q(qptr)
{
#ifndef QT_NO_QWS_SIGNALHANDLER
@@ -128,6 +134,10 @@ QDirectFBScreenPrivate::~QDirectFBScreenPrivate()
#ifndef QT_NO_DIRECTFB_KEYBOARD
delete keyboard;
#endif
+#if defined QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE
+ if (imageProvider)
+ imageProvider->Release(imageProvider);
+#endif
for (QSet<IDirectFBSurface*>::const_iterator it = allocatedSurfaces.begin(); it != allocatedSurfaces.end(); ++it) {
(*it)->Release(*it);
@@ -484,7 +494,15 @@ void QDirectFBScreen::setSurfaceColorTable(IDirectFBSurface *surface,
#endif // QT_NO_DIRECTFB_PALETTE
-#if !defined(QT_NO_DIRECTFB_LAYER) && !defined(QT_NO_QWS_CURSOR)
+#ifndef QT_NO_QWS_CURSOR
+#if defined QT_DIRECTFB_WM && defined QT_DIRECTFB_WINDOW_AS_CURSOR
+#define QT_DIRECTFB_CURSOR
+#elif defined QT_DIRECTFB_LAYER
+#define QT_DIRECTFB_CURSOR
+#endif
+#endif
+
+#if defined QT_DIRECTFB_CURSOR
class Q_GUI_EXPORT QDirectFBScreenCursor : public QScreenCursor
{
public:
@@ -494,6 +512,11 @@ public:
virtual void show();
virtual void hide();
private:
+#ifdef QT_DIRECTFB_WINDOW_AS_CURSOR
+ ~QDirectFBScreenCursor();
+ bool createWindow();
+ IDirectFBWindow *window;
+#endif
IDirectFBDisplayLayer *layer;
};
@@ -509,12 +532,95 @@ QDirectFBScreenCursor::QDirectFBScreenCursor()
enable = false;
hwaccel = true;
supportsAlpha = true;
+#ifdef QT_DIRECTFB_WINDOW_AS_CURSOR
+ window = 0;
+ DFBResult result = layer->SetCooperativeLevel(layer, DLSCL_ADMINISTRATIVE);
+ if (result != DFB_OK) {
+ DirectFBError("QDirectFBScreenCursor::hide: "
+ "Unable to set cooperative level", result);
+ }
+ result = layer->SetCursorOpacity(layer, 0);
+ if (result != DFB_OK) {
+ DirectFBError("QDirectFBScreenCursor::hide: "
+ "Unable to set cursor opacity", result);
+ }
+
+ result = layer->SetCooperativeLevel(layer, DLSCL_SHARED);
+ if (result != DFB_OK) {
+ DirectFBError("QDirectFBScreenCursor::hide: "
+ "Unable to set cooperative level", result);
+ }
+#endif
+}
+
+#ifdef QT_DIRECTFB_WINDOW_AS_CURSOR
+QDirectFBScreenCursor::~QDirectFBScreenCursor()
+{
+ if (window) {
+ window->Release(window);
+ window = 0;
+ }
+}
+
+bool QDirectFBScreenCursor::createWindow()
+{
+ Q_ASSERT(!window);
+ Q_ASSERT(!cursor.isNull());
+ DFBWindowDescription description;
+ memset(&description, 0, sizeof(DFBWindowDescription));
+ description.flags = DWDESC_POSX|DWDESC_POSY|DWDESC_WIDTH|DWDESC_HEIGHT|DWDESC_CAPS|DWDESC_OPTIONS|DWDESC_PIXELFORMAT|DWDESC_SURFACE_CAPS;
+ description.width = cursor.width();
+ description.height = cursor.height();
+ description.posx = pos.x() - hotspot.x();
+ description.posy = pos.y() - hotspot.y();
+ description.options = DWOP_GHOST|DWOP_ALPHACHANNEL;
+ description.caps = DWCAPS_NODECORATION|DWCAPS_DOUBLEBUFFER;
+ const QImage::Format format = QDirectFBScreen::instance()->alphaPixmapFormat();
+ description.pixelformat = QDirectFBScreen::getSurfacePixelFormat(format);
+ if (QDirectFBScreen::isPremultiplied(format))
+ description.surface_caps = DSCAPS_PREMULTIPLIED;
+
+ DFBResult result = layer->CreateWindow(layer, &description, &window);
+ if (result != DFB_OK) {
+ DirectFBError("QDirectFBScreenCursor::createWindow: Unable to create window", result);
+ return false;
+ }
+ result = window->SetOpacity(window, 255);
+ if (result != DFB_OK) {
+ DirectFBError("QDirectFBScreenCursor::createWindow: Unable to set opacity ", result);
+ return false;
+ }
+
+ result = window->SetStackingClass(window, DWSC_UPPER);
+ if (result != DFB_OK) {
+ DirectFBError("QDirectFBScreenCursor::createWindow: Unable to set stacking class ", result);
+ return false;
+ }
+
+ result = window->RaiseToTop(window);
+ if (result != DFB_OK) {
+ DirectFBError("QDirectFBScreenCursor::createWindow: Unable to raise window ", result);
+ return false;
+ }
+
+ return true;
}
+#endif
void QDirectFBScreenCursor::move(int x, int y)
{
pos = QPoint(x, y);
+#ifdef QT_DIRECTFB_WINDOW_AS_CURSOR
+ if (window) {
+ const QPoint p = pos - hotspot;
+ DFBResult result = window->MoveTo(window, p.x(), p.y());
+ if (result != DFB_OK) {
+ DirectFBError("QDirectFBScreenCursor::move: Unable to move window", result);
+ }
+ }
+#else
layer->WarpCursor(layer, x, y);
+#endif
}
void QDirectFBScreenCursor::hide()
@@ -522,6 +628,7 @@ void QDirectFBScreenCursor::hide()
if (enable) {
enable = false;
DFBResult result;
+#ifndef QT_DIRECTFB_WINDOW_AS_CURSOR
result = layer->SetCooperativeLevel(layer, DLSCL_ADMINISTRATIVE);
if (result != DFB_OK) {
DirectFBError("QDirectFBScreenCursor::hide: "
@@ -537,6 +644,15 @@ void QDirectFBScreenCursor::hide()
DirectFBError("QDirectFBScreenCursor::hide: "
"Unable to set cooperative level", result);
}
+#else
+ if (window) {
+ result = window->SetOpacity(window, 0);
+ if (result != DFB_OK) {
+ DirectFBError("QDirectFBScreenCursor::hide: "
+ "Unable to set window opacity", result);
+ }
+ }
+#endif
}
}
@@ -550,7 +666,13 @@ void QDirectFBScreenCursor::show()
DirectFBError("QDirectFBScreenCursor::show: "
"Unable to set cooperative level", result);
}
- result = layer->SetCursorOpacity(layer, 255);
+ result = layer->SetCursorOpacity(layer,
+#ifdef QT_DIRECTFB_WINDOW_AS_CURSOR
+ 0
+#else
+ 255
+#endif
+ );
if (result != DFB_OK) {
DirectFBError("QDirectFBScreenCursor::show: "
"Unable to set cursor shape", result);
@@ -560,6 +682,15 @@ void QDirectFBScreenCursor::show()
DirectFBError("QDirectFBScreenCursor::show: "
"Unable to set cooperative level", result);
}
+#ifdef QT_DIRECTFB_WINDOW_AS_CURSOR
+ if (window) {
+ DFBResult result = window->SetOpacity(window, 255);
+ if (result != DFB_OK) {
+ DirectFBError("QDirectFBScreenCursor::show: "
+ "Unable to set window opacity", result);
+ }
+ }
+#endif
}
}
@@ -583,6 +714,7 @@ void QDirectFBScreenCursor::set(const QImage &image, int hotx, int hoty)
DirectFBError("QDirectFBScreenCursor::set: Unable to create surface", result);
return;
}
+#ifndef QT_DIRECTFB_WINDOW_AS_CURSOR
result = layer->SetCooperativeLevel(layer, DLSCL_ADMINISTRATIVE);
if (result != DFB_OK) {
DirectFBError("QDirectFBScreenCursor::show: "
@@ -593,17 +725,53 @@ void QDirectFBScreenCursor::set(const QImage &image, int hotx, int hoty)
DirectFBError("QDirectFBScreenCursor::show: "
"Unable to set cursor shape", result);
}
- surface->Release(surface);
result = layer->SetCooperativeLevel(layer, DLSCL_SHARED);
if (result != DFB_OK) {
DirectFBError("QDirectFBScreenCursor::show: "
"Unable to set cooperative level", result);
}
+#else
+ if (window || createWindow()) {
+ QSize windowSize;
+ result = window->GetSize(window, &windowSize.rwidth(), &windowSize.rheight());
+ if (result != DFB_OK) {
+ DirectFBError("QDirectFBScreenCursor::set: "
+ "Unable to get window size", result);
+ }
+ result = window->Resize(window, size.width(), size.height());
+ if (result != DFB_OK) {
+ DirectFBError("QDirectFBScreenCursor::set: Unable to resize window", result);
+ }
+
+ IDirectFBSurface *windowSurface;
+ result = window->GetSurface(window, &windowSurface);
+ if (result != DFB_OK) {
+ DirectFBError("QDirectFBScreenCursor::set: Unable to get window surface", result);
+ } else {
+ result = windowSurface->Clear(windowSurface, 0, 0, 0, 0);
+ if (result != DFB_OK) {
+ DirectFBError("QDirectFBScreenCursor::set: Unable to clear surface", result);
+ }
+
+ result = windowSurface->Blit(windowSurface, surface, 0, 0, 0);
+ if (result != DFB_OK) {
+ DirectFBError("QDirectFBScreenCursor::set: Unable to blit to surface", result);
+ }
+ }
+ result = windowSurface->Flip(windowSurface, 0, DSFLIP_NONE);
+ if (result != DFB_OK) {
+ DirectFBError("QDirectFBScreenCursor::set: Unable to flip window", result);
+ }
+
+ windowSurface->Release(windowSurface);
+ }
+#endif
+ surface->Release(surface);
show();
}
}
-#endif // QT_NO_DIRECTFB_LAYER
+#endif // QT_DIRECTFB_CURSOR
QDirectFBScreen::QDirectFBScreen(int display_id)
: QScreen(display_id, DirectFBClass), d_ptr(new QDirectFBScreenPrivate(this))
@@ -658,6 +826,42 @@ int QDirectFBScreen::depth(DFBSurfacePixelFormat format)
return 0;
}
+int QDirectFBScreen::depth(QImage::Format format)
+{
+ int depth = 0;
+ switch(format) {
+ case QImage::Format_Invalid:
+ case QImage::NImageFormats:
+ Q_ASSERT(false);
+ case QImage::Format_Mono:
+ case QImage::Format_MonoLSB:
+ depth = 1;
+ break;
+ case QImage::Format_Indexed8:
+ depth = 8;
+ break;
+ case QImage::Format_RGB32:
+ case QImage::Format_ARGB32:
+ case QImage::Format_ARGB32_Premultiplied:
+ depth = 32;
+ break;
+ case QImage::Format_RGB555:
+ case QImage::Format_RGB16:
+ case QImage::Format_RGB444:
+ case QImage::Format_ARGB4444_Premultiplied:
+ depth = 16;
+ break;
+ case QImage::Format_RGB666:
+ case QImage::Format_ARGB6666_Premultiplied:
+ case QImage::Format_ARGB8565_Premultiplied:
+ case QImage::Format_ARGB8555_Premultiplied:
+ case QImage::Format_RGB888:
+ depth = 24;
+ break;
+ }
+ return depth;
+}
+
void QDirectFBScreenPrivate::setFlipFlags(const QStringList &args)
{
QRegExp flipRegexp(QLatin1String("^flip=([\\w,]*)$"));
@@ -1061,6 +1265,10 @@ bool QDirectFBScreen::connect(const QString &displaySpec)
void QDirectFBScreen::disconnect()
{
+#if defined QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE
+ if (d_ptr->imageProvider)
+ d_ptr->imageProvider->Release(d_ptr->imageProvider);
+#endif
#ifdef QT_NO_DIRECTFB_WM
d_ptr->primarySurface->Release(d_ptr->primarySurface);
d_ptr->primarySurface = 0;
@@ -1339,4 +1547,46 @@ void QDirectFBScreen::flipSurface(IDirectFBSurface *surface, DFBSurfaceFlipFlags
}
}
+#if defined QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE
+void QDirectFBScreen::setDirectFBImageProvider(IDirectFBImageProvider *provider)
+{
+ Q_ASSERT(provider);
+ if (d_ptr->imageProvider)
+ d_ptr->imageProvider->Release(d_ptr->imageProvider);
+ d_ptr->imageProvider = provider;
+}
+#endif
+
+IDirectFBSurface * QDirectFBScreen::surfaceForWidget(const QWidget *widget, QRect *rect) const
+{
+ Q_ASSERT(widget);
+ if (!widget->isVisible() || widget->size().isNull())
+ return 0;
+
+ const QWSWindowSurface *surface = static_cast<const QWSWindowSurface*>(widget->windowSurface());
+ if (surface && surface->key() == QLatin1String("directfb")) {
+ return static_cast<const QDirectFBWindowSurface*>(surface)->surfaceForWidget(widget, rect);
+ }
+ return 0;
+}
+
+IDirectFBSurface *QDirectFBScreen::subSurfaceForWidget(const QWidget *widget, const QRect &area) const
+{
+ Q_ASSERT(widget);
+ QRect rect;
+ IDirectFBSurface *surface = surfaceForWidget(widget, &rect);
+ IDirectFBSurface *subSurface = 0;
+ if (surface) {
+ if (!area.isNull())
+ rect &= area.translated(widget->mapTo(widget->window(), QPoint(0, 0)));
+ if (!rect.isNull()) {
+ const DFBRectangle subRect = {rect.x(), rect.y(), rect.width(), rect.height() };
+ const DFBResult result = surface->GetSubSurface(surface, &subRect, &subSurface);
+ if (result != DFB_OK) {
+ DirectFBError("QDirectFBScreen::subSurface(): Can't get sub surface", result);
+ }
+ }
+ }
+ return subSurface;
+}
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h
index 4cae076..8af4e0f 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h
@@ -59,6 +59,15 @@ QT_MODULE(Gui)
#if !defined QT_DIRECTFB_IMAGECACHE && !defined QT_NO_DIRECTFB_IMAGECACHE
#define QT_NO_DIRECTFB_IMAGECACHE
#endif
+#if !defined QT_DIRECTFB_NO_IMAGEPROVIDER && !defined QT_DIRECTFB_IMAGEPROVIDER
+#define QT_DIRECTFB_IMAGEPROVIDER
+#endif
+#if !defined QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE && !defined QT_NO_DIRECTFB_IMAGEPROVIDER_KEEPALIVE
+#define QT_NO_DIRECTFB_IMAGEPROVIDER_KEEPALIVE
+#endif
+#if !defined QT_DIRECTFB_WINDOW_AS_CURSOR && !defined QT_NO_DIRECTFB_WINDOW_AS_CURSOR
+#define QT_NO_DIRECTFB_WINDOW_AS_CURSOR
+#endif
#if !defined QT_NO_DIRECTFB_PALETTE && !defined QT_DIRECTFB_PALETTE
#define QT_DIRECTFB_PALETTE
#endif
@@ -77,6 +86,12 @@ QT_MODULE(Gui)
#if defined QT_NO_DIRECTFB_LAYER && defined QT_DIRECTFB_WM
#error QT_NO_DIRECTFB_LAYER requires QT_NO_DIRECTFB_WM
#endif
+#if defined QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE && defined QT_NO_DIRECTFB_IMAGEPROVIDER
+#error QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE requires QT_DIRECTFB_IMAGEPROVIDER to be defined
+#endif
+#if defined QT_DIRECTFB_WINDOW_AS_CURSOR && defined QT_NO_DIRECTFB_WM
+#error QT_DIRECTFB_WINDOW_AS_CURSOR requires QT_DIRECTFB_WM to be defined
+#endif
#define Q_DIRECTFB_VERSION ((DIRECTFB_MAJOR_VERSION << 16) | (DIRECTFB_MINOR_VERION << 8) | DIRECTFB_MICRO_VERSION)
@@ -89,6 +104,8 @@ QT_MODULE(Gui)
DIRECTFB_DECLARE_OPERATORS_FOR_FLAGS(DFBInputDeviceCapabilities);
DIRECTFB_DECLARE_OPERATORS_FOR_FLAGS(DFBWindowDescriptionFlags);
+DIRECTFB_DECLARE_OPERATORS_FOR_FLAGS(DFBWindowCapabilities);
+DIRECTFB_DECLARE_OPERATORS_FOR_FLAGS(DFBWindowOptions);
DIRECTFB_DECLARE_OPERATORS_FOR_FLAGS(DFBSurfaceDescriptionFlags);
DIRECTFB_DECLARE_OPERATORS_FOR_FLAGS(DFBSurfaceCapabilities);
DIRECTFB_DECLARE_OPERATORS_FOR_FLAGS(DFBSurfaceLockFlags);
@@ -135,6 +152,9 @@ public:
return static_cast<QDirectFBScreen*>(inst);
}
+ IDirectFBSurface *surfaceForWidget(const QWidget *widget, QRect *rect) const;
+ IDirectFBSurface *subSurfaceForWidget(const QWidget *widget, const QRect &area = QRect()) const;
+
IDirectFB *dfb();
#ifdef QT_NO_DIRECTFB_WM
IDirectFBSurface *primarySurface();
@@ -162,6 +182,10 @@ public:
QImage::Format format,
SurfaceCreationOptions options,
DFBResult *result = 0);
+ IDirectFBSurface *createDFBSurface(DFBSurfaceDescription desc,
+ SurfaceCreationOptions options,
+ DFBResult *result);
+
void flipSurface(IDirectFBSurface *surface, DFBSurfaceFlipFlags flipFlags,
const QRegion &region, const QPoint &offset);
void releaseDFBSurface(IDirectFBSurface *surface);
@@ -169,6 +193,7 @@ public:
using QScreen::depth;
static int depth(DFBSurfacePixelFormat format);
+ static int depth(QImage::Format format);
static DFBSurfacePixelFormat getSurfacePixelFormat(QImage::Format format);
static DFBSurfaceDescription getSurfaceDescription(const uint *buffer,
@@ -186,12 +211,11 @@ public:
#endif
static uchar *lockSurface(IDirectFBSurface *surface, uint flags, int *bpl = 0);
+#if defined QT_DIRECTFB_IMAGEPROVIDER && defined QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE
+ void setDirectFBImageProvider(IDirectFBImageProvider *provider);
+#endif
private:
- IDirectFBSurface *createDFBSurface(DFBSurfaceDescription desc,
- SurfaceCreationOptions options,
- DFBResult *result);
QDirectFBScreenPrivate *d_ptr;
- friend class SurfaceCache;
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QDirectFBScreen::SurfaceCreationOptions);
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
index 7569a18..9de1ca5 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
@@ -48,8 +48,6 @@
#include <qpaintdevice.h>
#include <qvarlengtharray.h>
-//#define QT_DIRECTFB_DEBUG_SURFACES 1
-
QDirectFBWindowSurface::QDirectFBWindowSurface(DFBSurfaceFlipFlags flip, QDirectFBScreen *scr)
: QDirectFBPaintDevice(scr)
#ifndef QT_NO_DIRECTFB_WM
@@ -124,7 +122,7 @@ void QDirectFBWindowSurface::createWindow()
qFatal("QDirectFBWindowSurface: Unable to get primary display layer!");
DFBWindowDescription description;
- description.caps = DWCAPS_NODECORATION;
+ description.caps = DWCAPS_NODECORATION|DWCAPS_DOUBLEBUFFER;
description.flags = DWDESC_CAPS|DWDESC_SURFACE_CAPS|DWDESC_PIXELFORMAT;
description.surface_caps = DSCAPS_NONE;
@@ -144,6 +142,7 @@ void QDirectFBWindowSurface::createWindow()
dfbSurface->Release(dfbSurface);
dfbWindow->GetSurface(dfbWindow, &dfbSurface);
+ updateFormat();
}
#endif // QT_NO_DIRECTFB_WM
@@ -179,6 +178,7 @@ static DFBResult setGeometry(IDirectFBWindow *dfbWindow, const QRect &old, const
void QDirectFBWindowSurface::setGeometry(const QRect &rect)
{
+ IDirectFBSurface *oldSurface = dfbSurface;
#ifdef QT_NO_DIRECTFB_WM
IDirectFBSurface *primarySurface = screen->primarySurface();
Q_ASSERT(primarySurface);
@@ -236,27 +236,26 @@ void QDirectFBWindowSurface::setGeometry(const QRect &rect)
if (result != DFB_OK)
DirectFBErrorFatal("QDirectFBWindowSurface::setGeometry()", result);
}
+ if (oldSurface != dfbSurface)
+ updateFormat();
QWSWindowSurface::setGeometry(rect);
}
QByteArray QDirectFBWindowSurface::permanentState() const
{
- QByteArray state;
#ifdef QT_DIRECTFB_WM
- QDataStream ds(&state, QIODevice::WriteOnly);
- ds << reinterpret_cast<quintptr>(this);
-#endif
+ QByteArray state(sizeof(this), 0);
+ *reinterpret_cast<const QDirectFBWindowSurface**>(state.data()) = this;
return state;
+#endif
+ return QByteArray();
}
void QDirectFBWindowSurface::setPermanentState(const QByteArray &state)
{
#ifdef QT_DIRECTFB_WM
- if (state.size() == sizeof(quintptr)) {
- QDataStream ds(state);
- quintptr ptr;
- ds >> ptr;
- sibling = reinterpret_cast<QDirectFBWindowSurface*>(ptr);
+ if (state.size() == sizeof(this)) {
+ sibling = *reinterpret_cast<QDirectFBWindowSurface *const*>(state.constData());
}
#else
Q_UNUSED(state);
@@ -414,7 +413,6 @@ void QDirectFBWindowSurface::flush(QWidget *, const QRegion &region,
#endif
}
-
void QDirectFBWindowSurface::beginPaint(const QRegion &)
{
if (!engine)
@@ -423,42 +421,31 @@ void QDirectFBWindowSurface::beginPaint(const QRegion &)
void QDirectFBWindowSurface::endPaint(const QRegion &)
{
-#ifdef QT_DIRECTFB_DEBUG_SURFACES
- if (bufferImages.count()) {
- qDebug("QDirectFBWindowSurface::endPaint() this=%p", this);
-
- foreach(QImage* bufferImg, bufferImages)
- qDebug(" Deleting buffer image %p", bufferImg);
- }
-#endif
-
- qDeleteAll(bufferImages);
- bufferImages.clear();
unlockDirectFB();
}
-
-QImage *QDirectFBWindowSurface::buffer(const QWidget *widget)
+IDirectFBSurface *QDirectFBWindowSurface::surfaceForWidget(const QWidget *widget, QRect *rect) const
{
- if (!lockedImage)
- return 0;
-
- const QRect rect = QRect(offset(widget), widget->size())
- & lockedImage->rect();
- if (rect.isEmpty())
+ Q_ASSERT(widget);
+ if (!dfbSurface) {
+ if (sibling && (!sibling->sibling || sibling->dfbSurface))
+ return sibling->surfaceForWidget(widget, rect);
return 0;
-
- QImage *img = new QImage(lockedImage->scanLine(rect.y())
- + rect.x() * (lockedImage->depth() / 8),
- rect.width(), rect.height(),
- lockedImage->bytesPerLine(),
- lockedImage->format());
- bufferImages.append(img);
-
-#ifdef QT_DIRECTFB_DEBUG_SURFACES
- qDebug("QDirectFBWindowSurface::buffer() Created & returned %p", img);
-#endif
-
- return img;
+ }
+ QWidget *win = window();
+ Q_ASSERT(win);
+ if (rect) {
+ if (win == widget) {
+ *rect = widget->rect();
+ } else {
+ *rect = QRect(widget->mapTo(win, QPoint(0, 0)), widget->size());
+ }
+ }
+ Q_ASSERT(win == widget || widget->isAncestorOf(win));
+ return dfbSurface;
}
+void QDirectFBWindowSurface::updateFormat()
+{
+ imageFormat = dfbSurface ? QDirectFBScreen::getImageFormat(dfbSurface) : QImage::Format_Invalid;
+}
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h
index 2c4bcdf..dafc478 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h
@@ -88,8 +88,9 @@ public:
void beginPaint(const QRegion &);
void endPaint(const QRegion &);
- QImage *buffer(const QWidget *widget);
+ IDirectFBSurface *surfaceForWidget(const QWidget *widget, QRect *rect) const;
private:
+ void updateFormat();
#ifdef QT_DIRECTFB_WM
void createWindow();
IDirectFBWindow *dfbWindow;
@@ -103,7 +104,6 @@ private:
} mode;
#endif
- QList<QImage*> bufferImages;
DFBSurfaceFlipFlags flipFlags;
bool boundingRectFlip;
#ifdef QT_DIRECTFB_TIMING
diff --git a/src/plugins/imageformats/jpeg/qjpeghandler.cpp b/src/plugins/imageformats/jpeg/qjpeghandler.cpp
index 395adca..910366c 100644
--- a/src/plugins/imageformats/jpeg/qjpeghandler.cpp
+++ b/src/plugins/imageformats/jpeg/qjpeghandler.cpp
@@ -493,7 +493,16 @@ private:
in--;
out[i] = qRgb(*in, *in, *in);
}
- } else {
+ } else if (cinfo->out_color_space == JCS_CMYK) {
+ int cols32Bit = scaledWidth() * 4;
+ in = (uchar*)out + cols32Bit;
+ for (uint i = scaledWidth(); i--; ) {
+ in -= 4;
+ int k = in[3];
+ out[i] = qRgb(k * in[0] / 255, k * in[1] / 255, k * in[2] / 255);
+ //out[i] = qRgb(in[0], in[1], in[2]);
+ }
+ } else {
in = (uchar*)out + cols24Bit;
for (uint i = scaledWidth(); i--; ) {
in -= 3;
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index c14e38a..596fd8f 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -468,7 +468,7 @@ bool isFunction(JSC::JSValue value)
static JSC::JSValue JSC_HOST_CALL functionConnect(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
static JSC::JSValue JSC_HOST_CALL functionDisconnect(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
-JSC::JSValue JSC_HOST_CALL functionDisconnect(JSC::ExecState *exec, JSC::JSObject */*callee*/, JSC::JSValue thisObject, const JSC::ArgList &args)
+JSC::JSValue JSC_HOST_CALL functionDisconnect(JSC::ExecState *exec, JSC::JSObject * /*callee*/, JSC::JSValue thisObject, const JSC::ArgList &args)
{
#ifndef QT_NO_QOBJECT
if (args.size() == 0) {
@@ -533,7 +533,7 @@ JSC::JSValue JSC_HOST_CALL functionDisconnect(JSC::ExecState *exec, JSC::JSObjec
#endif // QT_NO_QOBJECT
}
-JSC::JSValue JSC_HOST_CALL functionConnect(JSC::ExecState *exec, JSC::JSObject */*callee*/, JSC::JSValue thisObject, const JSC::ArgList &args)
+JSC::JSValue JSC_HOST_CALL functionConnect(JSC::ExecState *exec, JSC::JSObject * /*callee*/, JSC::JSValue thisObject, const JSC::ArgList &args)
{
#ifndef QT_NO_QOBJECT
if (args.size() == 0) {
diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp
index 1d08676..d5aaed7 100644
--- a/src/script/api/qscriptvalue.cpp
+++ b/src/script/api/qscriptvalue.cpp
@@ -278,7 +278,7 @@ qsreal ToInteger(qsreal n)
QScriptValue QScriptValuePrivate::property(const JSC::Identifier &id, int resolveMode) const
{
- Q_ASSERT(isJSC());
+ Q_ASSERT(isObject());
JSC::ExecState *exec = engine->currentFrame;
JSC::JSObject *object = jscValue.getObject();
JSC::PropertySlot slot(const_cast<JSC::JSObject*>(object));
@@ -301,7 +301,7 @@ QScriptValue QScriptValuePrivate::property(const JSC::Identifier &id, int resolv
QScriptValue QScriptValuePrivate::property(quint32 index, int resolveMode) const
{
- Q_ASSERT(isJSC());
+ Q_ASSERT(isObject());
JSC::ExecState *exec = engine->currentFrame;
JSC::JSObject *object = jscValue.getObject();
JSC::PropertySlot slot(const_cast<JSC::JSObject*>(object));
@@ -393,6 +393,37 @@ void QScriptValuePrivate::setProperty(const JSC::Identifier &id, const QScriptVa
}
}
+QScriptValue::PropertyFlags QScriptValuePrivate::propertyFlags(const JSC::Identifier &id,
+ const QScriptValue::ResolveFlags &mode) const
+{
+ JSC::ExecState *exec = engine->currentFrame;
+ JSC::JSObject *object = JSC::asObject(jscValue);
+ unsigned attribs = 0;
+ if (!object->getPropertyAttributes(exec, id, attribs)) {
+ if ((mode & QScriptValue::ResolvePrototype) && object->prototype() && object->prototype().isObject()) {
+ QScriptValue proto = engine->scriptValueFromJSCValue(object->prototype());
+ return QScriptValuePrivate::get(proto)->propertyFlags(id, mode);
+ }
+ return 0;
+ }
+ QScriptValue::PropertyFlags result = 0;
+ if (attribs & JSC::ReadOnly)
+ result |= QScriptValue::ReadOnly;
+ if (attribs & JSC::DontEnum)
+ result |= QScriptValue::SkipInEnumeration;
+ if (attribs & JSC::DontDelete)
+ result |= QScriptValue::Undeletable;
+ //We cannot rely on attribs JSC::Setter/Getter because they are not necesserly set by JSC (bug?)
+ if (attribs & JSC::Getter || !object->lookupGetter(exec, id).isUndefinedOrNull())
+ result |= QScriptValue::PropertyGetter;
+ if (attribs & JSC::Setter || !object->lookupSetter(exec, id).isUndefinedOrNull())
+ result |= QScriptValue::PropertySetter;
+ if (attribs & QScript::QObjectMemberAttribute)
+ result |= QScriptValue::QObjectMember;
+ result |= QScriptValue::PropertyFlag(attribs & QScriptValue::UserRange);
+ return result;
+}
+
QVariant &QScriptValuePrivate::variantValue() const
{
Q_ASSERT(jscValue.isObject(&QScriptObject::info));
@@ -753,7 +784,7 @@ QScriptValue &QScriptValue::operator=(const QScriptValue &other)
bool QScriptValue::isError() const
{
Q_D(const QScriptValue);
- if (!d || !d->isJSC() || !d->jscValue.isObject())
+ if (!d || !d->isObject())
return false;
return d->jscValue.isObject(&JSC::ErrorInstance::info);
}
@@ -767,7 +798,7 @@ bool QScriptValue::isError() const
bool QScriptValue::isArray() const
{
Q_D(const QScriptValue);
- if (!d || !d->isJSC() || !d->jscValue.isObject())
+ if (!d || !d->isObject())
return false;
return d->jscValue.isObject(&JSC::JSArray::info);
}
@@ -781,7 +812,7 @@ bool QScriptValue::isArray() const
bool QScriptValue::isDate() const
{
Q_D(const QScriptValue);
- if (!d || !d->isJSC() || !d->jscValue.isObject())
+ if (!d || !d->isObject())
return false;
return d->jscValue.isObject(&JSC::DateInstance::info);
}
@@ -795,7 +826,7 @@ bool QScriptValue::isDate() const
bool QScriptValue::isRegExp() const
{
Q_D(const QScriptValue);
- if (!d || !d->isJSC() || !d->jscValue.isObject())
+ if (!d || !d->isObject())
return false;
return d->jscValue.isObject(&JSC::RegExpObject::info);
}
@@ -810,7 +841,7 @@ bool QScriptValue::isRegExp() const
QScriptValue QScriptValue::prototype() const
{
Q_D(const QScriptValue);
- if (!d || !d->isJSC() || !d->jscValue.isObject())
+ if (!d || !d->isObject())
return QScriptValue();
return d->engine->scriptValueFromJSCValue(JSC::asObject(d->jscValue)->prototype());
}
@@ -829,7 +860,7 @@ QScriptValue QScriptValue::prototype() const
void QScriptValue::setPrototype(const QScriptValue &prototype)
{
Q_D(QScriptValue);
- if (!d || !d->isJSC() || !d->jscValue.isObject())
+ if (!d || !d->isObject())
return;
if (prototype.isValid() && prototype.engine()
&& (prototype.engine() != engine())) {
@@ -859,7 +890,7 @@ void QScriptValue::setPrototype(const QScriptValue &prototype)
QScriptValue QScriptValue::scope() const
{
Q_D(const QScriptValue);
- if (!d || !d->isJSC() || !d->jscValue.isObject())
+ if (!d || !d->isObject())
return QScriptValue();
// ### make hidden property
return d->property(QLatin1String("__qt_scope__"), QScriptValue::ResolveLocal);
@@ -871,7 +902,7 @@ QScriptValue QScriptValue::scope() const
void QScriptValue::setScope(const QScriptValue &scope)
{
Q_D(QScriptValue);
- if (!d || !d->isJSC() || !d->jscValue.isObject())
+ if (!d || !d->isObject())
return;
if (scope.isValid() && scope.engine()
&& (scope.engine() != engine())) {
@@ -903,7 +934,7 @@ void QScriptValue::setScope(const QScriptValue &scope)
bool QScriptValue::instanceOf(const QScriptValue &other) const
{
Q_D(const QScriptValue);
- if (!d || !d->isJSC() || !d->jscValue.isObject() || !other.isObject())
+ if (!d || !d->isObject() || !other.isObject())
return false;
if (other.engine() != engine()) {
qWarning("QScriptValue::instanceof: "
@@ -1662,7 +1693,7 @@ void QScriptValue::setProperty(const QString &name, const QScriptValue &value,
const PropertyFlags &flags)
{
Q_D(QScriptValue);
- if (!d || !d->isJSC() || !d->jscValue.isObject())
+ if (!d || !d->isObject())
return;
JSC::ExecState *exec = d->engine->currentFrame;
d->setProperty(JSC::Identifier(exec, name), value, flags);
@@ -1687,7 +1718,7 @@ QScriptValue QScriptValue::property(const QString &name,
const ResolveFlags &mode) const
{
Q_D(const QScriptValue);
- if (!d || !d->isJSC() || !d->jscValue.isObject())
+ if (!d || !d->isObject())
return QScriptValue();
return d->property(name, mode);
}
@@ -1709,7 +1740,7 @@ QScriptValue QScriptValue::property(quint32 arrayIndex,
const ResolveFlags &mode) const
{
Q_D(const QScriptValue);
- if (!d || !d->isJSC() || !d->jscValue.isObject())
+ if (!d || !d->isObject())
return QScriptValue();
return d->property(arrayIndex, mode);
}
@@ -1730,7 +1761,7 @@ void QScriptValue::setProperty(quint32 arrayIndex, const QScriptValue &value,
const PropertyFlags &flags)
{
Q_D(const QScriptValue);
- if (!d || !d->isJSC() || !d->jscValue.isObject())
+ if (!d || !d->isObject())
return;
if (value.engine() && (value.engine() != engine())) {
qWarning("QScriptValue::setProperty() failed: "
@@ -1780,7 +1811,7 @@ QScriptValue QScriptValue::property(const QScriptString &name,
const ResolveFlags &mode) const
{
Q_D(const QScriptValue);
- if (!d || !d->isJSC() || !d->jscValue.isObject() || !name.isValid())
+ if (!d || !d->isObject() || !name.isValid())
return QScriptValue();
return d->property(name.d_ptr->identifier, mode);
}
@@ -1803,7 +1834,7 @@ void QScriptValue::setProperty(const QScriptString &name,
const PropertyFlags &flags)
{
Q_D(QScriptValue);
- if (!d || !d->isJSC() || !d->jscValue.isObject() || !name.isValid())
+ if (!d || !d->isObject() || !name.isValid())
return;
d->setProperty(name.d_ptr->identifier, value, flags);
}
@@ -1817,9 +1848,11 @@ void QScriptValue::setProperty(const QScriptString &name,
QScriptValue::PropertyFlags QScriptValue::propertyFlags(const QString &name,
const ResolveFlags &mode) const
{
- if (!isObject())
+ Q_D(const QScriptValue);
+ if (!d || !d->isObject())
return 0;
- return propertyFlags(engine()->toStringHandle(name), mode);
+ JSC::ExecState *exec = d->engine->currentFrame;
+ return d->propertyFlags(JSC::Identifier(exec, name), mode);
}
@@ -1835,33 +1868,9 @@ QScriptValue::PropertyFlags QScriptValue::propertyFlags(const QScriptString &nam
const ResolveFlags &mode) const
{
Q_D(const QScriptValue);
- if (!isObject())
+ if (!d || !d->isObject() || !name.isValid())
return 0;
- JSC::ExecState *exec = d->engine->currentFrame;
- JSC::JSObject *object = JSC::asObject(d->jscValue);
- JSC::Identifier id = name.d_ptr->identifier;
- unsigned attribs = 0;
- if (!object->getPropertyAttributes(exec, id, attribs)) {
- if ((mode & QScriptValue::ResolvePrototype) && object->prototype())
- return d->engine->scriptValueFromJSCValue(object->prototype()).propertyFlags(name, mode);
- return 0;
- }
- QScriptValue::PropertyFlags result = 0;
- if (attribs & JSC::ReadOnly)
- result |= QScriptValue::ReadOnly;
- if (attribs & JSC::DontEnum)
- result |= QScriptValue::SkipInEnumeration;
- if (attribs & JSC::DontDelete)
- result |= QScriptValue::Undeletable;
- //We cannot rely on attribs JSC::Setter/Getter because they are not necesserly set by JSC (bug?)
- if (attribs & JSC::Getter || !object->lookupGetter(exec, id).isUndefinedOrNull())
- result |= QScriptValue::PropertyGetter;
- if (attribs & JSC::Setter || !object->lookupSetter(exec, id).isUndefinedOrNull())
- result |= QScriptValue::PropertySetter;
- if (attribs & QScript::QObjectMemberAttribute)
- result |= QScriptValue::QObjectMember;
- result |= QScriptValue::PropertyFlag(attribs & QScriptValue::UserRange);
- return result;
+ return d->propertyFlags(name.d_ptr->identifier, mode);
}
/*!
@@ -2263,7 +2272,7 @@ bool QScriptValue::isUndefined() const
bool QScriptValue::isObject() const
{
Q_D(const QScriptValue);
- return d && d->isJSC() && d->jscValue.isObject();
+ return d && d->isObject();
}
/*!
@@ -2310,10 +2319,9 @@ bool QScriptValue::isQObject() const
bool QScriptValue::isQMetaObject() const
{
Q_D(const QScriptValue);
- if (!d || !d->isJSC() || !d->jscValue.isObject())
+ if (!d || !d->isObject())
return false;
return JSC::asObject(d->jscValue)->isObject(&QScript::QMetaObjectWrapperObject::info);
- return false;
}
/*!
@@ -2337,7 +2345,7 @@ bool QScriptValue::isValid() const
QScriptValue QScriptValue::data() const
{
Q_D(const QScriptValue);
- if (!d || !d->isJSC() || !d->jscValue.isObject())
+ if (!d || !d->isObject())
return QScriptValue();
if (d->jscValue.isObject(&QScriptObject::info)) {
QScriptObject *scriptObject = static_cast<QScriptObject*>(JSC::asObject(d->jscValue));
@@ -2359,7 +2367,7 @@ QScriptValue QScriptValue::data() const
void QScriptValue::setData(const QScriptValue &data)
{
Q_D(QScriptValue);
- if (!d || !d->isJSC() || !d->jscValue.isObject())
+ if (!d || !d->isObject())
return;
JSC::JSValue other = d->engine->scriptValueToJSCValue(data);
if (d->jscValue.isObject(&QScriptObject::info)) {
@@ -2413,8 +2421,13 @@ QScriptClass *QScriptValue::scriptClass() const
void QScriptValue::setScriptClass(QScriptClass *scriptClass)
{
Q_D(QScriptValue);
- if (!d || !d->isJSC() || !d->jscValue.isObject(&QScriptObject::info))
+ if (!d || !d->isObject())
+ return;
+ if (!d->jscValue.isObject(&QScriptObject::info)) {
+ qWarning("QScriptValue::setScriptClass() failed: "
+ "cannot change class of non-QScriptObject");
return;
+ }
QScriptObject *scriptObject = static_cast<QScriptObject*>(JSC::asObject(d->jscValue));
QScriptObjectDelegate *delegate = scriptObject->delegate();
if (!delegate || (delegate->type() != QScriptObjectDelegate::ClassObject)) {
diff --git a/src/script/api/qscriptvalue_p.h b/src/script/api/qscriptvalue_p.h
index 3e952af..6d57d32 100644
--- a/src/script/api/qscriptvalue_p.h
+++ b/src/script/api/qscriptvalue_p.h
@@ -85,6 +85,7 @@ public:
inline void initFrom(const QString &value);
inline bool isJSC() const;
+ inline bool isObject() const;
QVariant &variantValue() const;
void setVariantValue(const QVariant &value);
@@ -104,6 +105,8 @@ public:
inline QScriptValue property(const QString &, int resolveMode) const;
void setProperty(const JSC::Identifier &id, const QScriptValue &value,
const QScriptValue::PropertyFlags &flags);
+ QScriptValue::PropertyFlags propertyFlags(
+ const JSC::Identifier &id, const QScriptValue::ResolveFlags &mode) const;
void detachFromEngine();
@@ -142,6 +145,11 @@ inline bool QScriptValuePrivate::isJSC() const
return (type == JSC);
}
+inline bool QScriptValuePrivate::isObject() const
+{
+ return isJSC() && jscValue && jscValue.isObject();
+}
+
// Rest of inline functions implemented in qscriptengine_p.h
QT_END_NAMESPACE
diff --git a/src/script/bridge/qscriptglobalobject.cpp b/src/script/bridge/qscriptglobalobject.cpp
index c929e12..3fa5879 100644
--- a/src/script/bridge/qscriptglobalobject.cpp
+++ b/src/script/bridge/qscriptglobalobject.cpp
@@ -100,6 +100,15 @@ void GlobalObject::put(JSC::ExecState* exec, const JSC::Identifier& propertyName
JSC::JSGlobalObject::put(exec, propertyName, value, slot);
}
+void GlobalObject::putWithAttributes(JSC::ExecState* exec, const JSC::Identifier& propertyName,
+ JSC::JSValue value, unsigned attributes)
+{
+ if (customGlobalObject)
+ customGlobalObject->putWithAttributes(exec, propertyName, value, attributes);
+ else
+ JSC::JSGlobalObject::putWithAttributes(exec, propertyName, value, attributes);
+}
+
bool GlobalObject::deleteProperty(JSC::ExecState* exec,
const JSC::Identifier& propertyName, bool checkDontDelete)
{
diff --git a/src/script/bridge/qscriptglobalobject_p.h b/src/script/bridge/qscriptglobalobject_p.h
index eff24a2..11b1482 100644
--- a/src/script/bridge/qscriptglobalobject_p.h
+++ b/src/script/bridge/qscriptglobalobject_p.h
@@ -74,6 +74,8 @@ public:
JSC::PropertySlot&);
virtual void put(JSC::ExecState* exec, const JSC::Identifier& propertyName,
JSC::JSValue, JSC::PutPropertySlot&);
+ virtual void putWithAttributes(JSC::ExecState* exec, const JSC::Identifier& propertyName,
+ JSC::JSValue value, unsigned attributes);
virtual bool deleteProperty(JSC::ExecState*,
const JSC::Identifier& propertyName,
bool checkDontDelete = true);
@@ -115,6 +117,8 @@ public:
virtual void put(JSC::ExecState* exec, const JSC::Identifier& propertyName,
JSC::JSValue value, JSC::PutPropertySlot& slot)
{ originalGlobalObject->JSC::JSGlobalObject::put(exec, propertyName, value, slot); }
+ virtual void putWithAttributes(JSC::ExecState* exec, const JSC::Identifier& propertyName, JSC::JSValue value, unsigned attributes)
+ { originalGlobalObject->JSC::JSGlobalObject::putWithAttributes(exec, propertyName, value, attributes); }
virtual bool deleteProperty(JSC::ExecState* exec,
const JSC::Identifier& propertyName, bool checkDontDelete = true)
{ return originalGlobalObject->JSC::JSGlobalObject::deleteProperty(exec, propertyName, checkDontDelete); }
diff --git a/src/script/bridge/qscriptvariant.cpp b/src/script/bridge/qscriptvariant.cpp
index c4a152a..ab75a02 100644
--- a/src/script/bridge/qscriptvariant.cpp
+++ b/src/script/bridge/qscriptvariant.cpp
@@ -137,7 +137,7 @@ static JSC::JSValue JSC_HOST_CALL variantProtoFuncToString(JSC::ExecState *exec,
JSC::JSValue value = variantProtoFuncValueOf(exec, callee, thisValue, args);
if (value.isObject()) {
result = v.toString();
- if (result.isEmpty()) {
+ if (result.isEmpty() && !v.canConvert(QVariant::String)) {
result = "QVariant(";
result += v.typeName();
result += ")";
diff --git a/src/script/script.pro b/src/script/script.pro
index 5844620..301386d 100644
--- a/src/script/script.pro
+++ b/src/script/script.pro
@@ -10,6 +10,9 @@ unix:QMAKE_PKGCONFIG_REQUIRES = QtCore
include(../qbase.pri)
+# Disable a few warnings on Windows.
+win32-msvc*: QMAKE_CXXFLAGS += -wd4291 -wd4344 -wd4503 -wd4800 -wd4819 -wd4996 -wd4396 -wd4099
+
# disable JIT for now
DEFINES += ENABLE_JIT=0
# FIXME: shared the statically built JavaScriptCore
diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp
index 6a8609e..06ee3e1 100644
--- a/src/sql/drivers/odbc/qsql_odbc.cpp
+++ b/src/sql/drivers/odbc/qsql_odbc.cpp
@@ -743,37 +743,31 @@ void QODBCDriverPrivate::splitTableQualifier(const QString & qualifier, QString
QODBCDriverPrivate::DefaultCase QODBCDriverPrivate::defaultCase() const
{
- static bool isInitialized = false;
- static DefaultCase ret;
-
- if (!isInitialized) {
- SQLUSMALLINT casing;
- int r = SQLGetInfo(hDbc,
- SQL_IDENTIFIER_CASE,
- &casing,
- sizeof(casing),
- NULL);
- if ( r != SQL_SUCCESS)
- ret = Lower;//arbitrary case if driver cannot be queried
- else {
- switch (casing) {
- case (SQL_IC_UPPER):
- ret = Upper;
- break;
- case (SQL_IC_LOWER):
- ret = Lower;
- break;
- case (SQL_IC_SENSITIVE):
- ret = Sensitive;
- break;
- case (SQL_IC_MIXED):
- ret = Mixed;
- break;
- default:
- ret = Upper;
- }
+ DefaultCase ret;
+ SQLUSMALLINT casing;
+ int r = SQLGetInfo(hDbc,
+ SQL_IDENTIFIER_CASE,
+ &casing,
+ sizeof(casing),
+ NULL);
+ if ( r != SQL_SUCCESS)
+ ret = Mixed;//arbitrary case if driver cannot be queried
+ else {
+ switch (casing) {
+ case (SQL_IC_UPPER):
+ ret = Upper;
+ break;
+ case (SQL_IC_LOWER):
+ ret = Lower;
+ break;
+ case (SQL_IC_SENSITIVE):
+ ret = Sensitive;
+ break;
+ case (SQL_IC_MIXED):
+ default:
+ ret = Mixed;
+ break;
}
- isInitialized = true;
}
return ret;
}
diff --git a/src/svg/qsvgtinydocument.cpp b/src/svg/qsvgtinydocument.cpp
index d7cbcb2..e6b0e8e 100644
--- a/src/svg/qsvgtinydocument.cpp
+++ b/src/svg/qsvgtinydocument.cpp
@@ -240,7 +240,7 @@ void QSvgTinyDocument::draw(QPainter *p, const QRectF &bounds)
//sets default style on the painter
//### not the most optimal way
mapSourceToTarget(p, bounds);
- QPen pen(QBrush(Qt::NoBrush), 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+ QPen pen(Qt::NoBrush, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
pen.setMiterLimit(4);
p->setPen(pen);
p->setBrush(Qt::black);
@@ -283,7 +283,7 @@ void QSvgTinyDocument::draw(QPainter *p, const QString &id,
QTransform originalTransform = p->worldTransform();
//XXX set default style on the painter
- QPen pen(QBrush(Qt::NoBrush), 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+ QPen pen(Qt::NoBrush, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
pen.setMiterLimit(4);
p->setPen(pen);
p->setBrush(Qt::black);
diff --git a/src/xml/dom/qdom.cpp b/src/xml/dom/qdom.cpp
index 7709c28..ac6ba37 100644
--- a/src/xml/dom/qdom.cpp
+++ b/src/xml/dom/qdom.cpp
@@ -7406,7 +7406,9 @@ bool QDomHandler::startElement(const QString& nsURI, const QString&, const QStri
} else {
n = doc->createElement(qName);
}
- n->setLocation(locator->lineNumber(), locator->columnNumber());
+
+ if (n)
+ n->setLocation(locator->lineNumber(), locator->columnNumber());
node->appendChild(n);
node = n;
@@ -7426,7 +7428,7 @@ bool QDomHandler::startElement(const QString& nsURI, const QString&, const QStri
bool QDomHandler::endElement(const QString&, const QString&, const QString&)
{
- if (node == doc)
+ if (!node || node == doc)
return false;
node = node->parent();
diff --git a/src/xmlpatterns/parser/qquerytransformparser_p.h b/src/xmlpatterns/parser/qquerytransformparser_p.h
index 195e597..7f68d92 100644
--- a/src/xmlpatterns/parser/qquerytransformparser_p.h
+++ b/src/xmlpatterns/parser/qquerytransformparser_p.h
@@ -49,57 +49,6 @@
//
// We mean it.
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtXmlPatterns of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-
/* A Bison parser, made by GNU Bison 2.3a. */
/* Skeleton interface for Bison's Yacc-like parsers in C
diff --git a/tests/auto/gestures/customgesturerecognizer.h b/tests/auto/gestures/customgesturerecognizer.h
index 519aba8..83e85b1 100644
--- a/tests/auto/gestures/customgesturerecognizer.h
+++ b/tests/auto/gestures/customgesturerecognizer.h
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
#ifndef CUSTOMGESTURERECOGNIZER_H
#define CUSTOMGESTURERECOGNIZER_H
diff --git a/tests/auto/linguist/lupdate/testdata/good/backslashes/src/main.cpp b/tests/auto/linguist/lupdate/testdata/good/backslashes/src/main.cpp
index 348a6be..805e87a 100644
--- a/tests/auto/linguist/lupdate/testdata/good/backslashes/src/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/backslashes/src/main.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
// IMPORTANT!!!! If you want to add testdata to this file,
// always add it to the end in order to not change the linenumbers of translations!!!
//
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecforsrc/main.cpp b/tests/auto/linguist/lupdate/testdata/good/codecforsrc/main.cpp
index 2573fbb..c6275ca 100644
--- a/tests/auto/linguist/lupdate/testdata/good/codecforsrc/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/codecforsrc/main.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
#include <QApplication>
#include <QtGui>
#include <QtCore>
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecforsrc/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/codecforsrc/project.ts.result
index e746c7e..bc0d9bb 100644
--- a/tests/auto/linguist/lupdate/testdata/good/codecforsrc/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/codecforsrc/project.ts.result
@@ -5,13 +5,13 @@
<context>
<name>QObject</name>
<message>
- <location filename="main.cpp" line="10"/>
+ <location filename="main.cpp" line="51"/>
<source>abc</source>
<comment>ascii</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.cpp" line="11"/>
+ <location filename="main.cpp" line="52"/>
<source>æøå</source>
<comment>utf-8</comment>
<translation type="unfinished"></translation>
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr/main.cpp b/tests/auto/linguist/lupdate/testdata/good/codecfortr/main.cpp
index 79b0503..91b3678 100644
--- a/tests/auto/linguist/lupdate/testdata/good/codecfortr/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr/main.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
#include <QApplication>
#include <QtGui>
#include <QtCore>
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/codecfortr/project.ts.result
index 9a082ef..91da744 100644
--- a/tests/auto/linguist/lupdate/testdata/good/codecfortr/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr/project.ts.result
@@ -5,7 +5,7 @@
<context>
<name>QObject</name>
<message>
- <location filename="main.cpp" line="20"/>
+ <location filename="main.cpp" line="61"/>
<source>Á</source>
<translation type="unfinished"></translation>
</message>
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr1/main.cpp b/tests/auto/linguist/lupdate/testdata/good/codecfortr1/main.cpp
index 91af165..daabfe1 100644
--- a/tests/auto/linguist/lupdate/testdata/good/codecfortr1/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr1/main.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
#include <QtCore>
class FooBar : QObject
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr1/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/codecfortr1/project.ts.result
index 5ffa2f3..26eb245 100644
--- a/tests/auto/linguist/lupdate/testdata/good/codecfortr1/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr1/project.ts.result
@@ -5,22 +5,22 @@
<context>
<name>FooBar</name>
<message>
- <location filename="main.cpp" line="10"/>
+ <location filename="main.cpp" line="51"/>
<source>random ascii only</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.cpp" line="11"/>
+ <location filename="main.cpp" line="52"/>
<source>this contains an umlaut ü &amp;uuml;</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.cpp" line="12"/>
+ <location filename="main.cpp" line="53"/>
<source>random ascii only in utf8</source>
<translation type="unfinished"></translation>
</message>
<message utf8="true">
- <location filename="main.cpp" line="13"/>
+ <location filename="main.cpp" line="54"/>
<source>umlaut ü &amp;uuml; in utf8</source>
<translation type="unfinished"></translation>
</message>
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr2/main.cpp b/tests/auto/linguist/lupdate/testdata/good/codecfortr2/main.cpp
index 91af165..daabfe1 100644
--- a/tests/auto/linguist/lupdate/testdata/good/codecfortr2/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr2/main.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
#include <QtCore>
class FooBar : QObject
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr2/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/codecfortr2/project.ts.result
index 0ebdbfd..e27c157 100644
--- a/tests/auto/linguist/lupdate/testdata/good/codecfortr2/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr2/project.ts.result
@@ -5,22 +5,22 @@
<context>
<name>FooBar</name>
<message>
- <location filename="main.cpp" line="10"/>
+ <location filename="main.cpp" line="51"/>
<source>random ascii only</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.cpp" line="11"/>
+ <location filename="main.cpp" line="52"/>
<source>this contains an umlaut ü &amp;uuml;</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.cpp" line="12"/>
+ <location filename="main.cpp" line="53"/>
<source>random ascii only in utf8</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.cpp" line="13"/>
+ <location filename="main.cpp" line="54"/>
<source>umlaut ü &amp;uuml; in utf8</source>
<translation type="unfinished"></translation>
</message>
diff --git a/tests/auto/linguist/lupdate/testdata/good/lacksqobject/main.cpp b/tests/auto/linguist/lupdate/testdata/good/lacksqobject/main.cpp
index 0e42d52..d30a10e 100644
--- a/tests/auto/linguist/lupdate/testdata/good/lacksqobject/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/lacksqobject/main.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
// IMPORTANT!!!! If you want to add testdata to this file,
// always add it to the end in order to not change the linenumbers of translations!!!
diff --git a/tests/auto/linguist/lupdate/testdata/good/lacksqobject/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/lacksqobject/project.ts.result
index bab0881..bc876cd 100644
--- a/tests/auto/linguist/lupdate/testdata/good/lacksqobject/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/lacksqobject/project.ts.result
@@ -4,7 +4,7 @@
<context>
<name>B</name>
<message>
- <location filename="main.cpp" line="17"/>
+ <location filename="main.cpp" line="58"/>
<source>Bla</source>
<comment>::B</comment>
<translation type="unfinished"></translation>
@@ -13,7 +13,7 @@
<context>
<name>C</name>
<message>
- <location filename="main.cpp" line="24"/>
+ <location filename="main.cpp" line="65"/>
<source>Bla</source>
<comment>::C</comment>
<translation type="unfinished"></translation>
@@ -22,7 +22,7 @@
<context>
<name>nsB::B</name>
<message>
- <location filename="main.cpp" line="37"/>
+ <location filename="main.cpp" line="78"/>
<source>Bla</source>
<comment>nsB::B</comment>
<translation type="unfinished"></translation>
@@ -31,7 +31,7 @@
<context>
<name>nsB::C</name>
<message>
- <location filename="main.cpp" line="43"/>
+ <location filename="main.cpp" line="84"/>
<source>Bla</source>
<comment>nsB::C</comment>
<translation type="unfinished"></translation>
diff --git a/tests/auto/linguist/lupdate/testdata/good/merge_ordering/foo.cpp b/tests/auto/linguist/lupdate/testdata/good/merge_ordering/foo.cpp
index af8534d..91484bf 100644
--- a/tests/auto/linguist/lupdate/testdata/good/merge_ordering/foo.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/merge_ordering/foo.cpp
@@ -1,3 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
// The first line in this file should always be empty, its part of the test!!
class Foo : public QObject
diff --git a/tests/auto/linguist/lupdate/testdata/good/merge_ordering/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/merge_ordering/project.ts.before
index d70193f..1762cc7 100644
--- a/tests/auto/linguist/lupdate/testdata/good/merge_ordering/project.ts.before
+++ b/tests/auto/linguist/lupdate/testdata/good/merge_ordering/project.ts.before
@@ -3,22 +3,22 @@
<context>
<name>Bar</name>
<message>
- <location filename="bar1.cpp" line="13"/>
+ <location filename="bar1.cpp" line="54"/>
<source>Another alien.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="bar1.cpp" line="14"/>
+ <location filename="bar1.cpp" line="55"/>
<source>They are coming!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="bar1.cpp" line="16"/>
+ <location filename="bar1.cpp" line="57"/>
<source>They are everywhere!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="bar1.cpp" line="18"/>
+ <location filename="bar1.cpp" line="59"/>
<source>This one moved in from another file.</source>
<translation type="unfinished"></translation>
</message>
@@ -26,47 +26,47 @@
<context>
<name>Foo</name>
<message>
- <location filename="foo1.cpp" line="13"/>
+ <location filename="foo1.cpp" line="54"/>
<source>This is the first entry.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="foo1.cpp" line="14"/>
+ <location filename="foo1.cpp" line="55"/>
<source>A second message.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="foo1.cpp" line="15"/>
+ <location filename="foo1.cpp" line="56"/>
<source>Now again one which is just where it was.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="foo1.cpp" line="16"/>
+ <location filename="foo1.cpp" line="57"/>
<source>Just as this one.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="foo1.cpp" line="17"/>
+ <location filename="foo1.cpp" line="58"/>
<source>An earthling again.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="foo1.cpp" line="18"/>
+ <location filename="foo1.cpp" line="59"/>
<source>This is from the bottom, too.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="foo1.cpp" line="19"/>
+ <location filename="foo1.cpp" line="60"/>
<source>Third string from the bottom.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="foo1.cpp" line="20"/>
+ <location filename="foo1.cpp" line="61"/>
<source>Fourth one!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="foo1.cpp" line="21"/>
+ <location filename="foo1.cpp" line="62"/>
<source>This string did move from the bottom.</source>
<translation type="unfinished"></translation>
</message>
diff --git a/tests/auto/linguist/lupdate/testdata/good/merge_ordering/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/merge_ordering/project.ts.result
index 2027efd..5104860 100644
--- a/tests/auto/linguist/lupdate/testdata/good/merge_ordering/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/merge_ordering/project.ts.result
@@ -4,7 +4,7 @@
<context>
<name>Foo</name>
<message>
- <location filename="foo.cpp" line="+13"/>
+ <location filename="foo.cpp" line="+54"/>
<source>This is the first entry.</source>
<translation type="unfinished"></translation>
</message>
diff --git a/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/main.cpp b/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/main.cpp
index e058da0..4dddace 100644
--- a/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/main.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
#include <QApplication>
#include <QDebug>
diff --git a/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.before
index 3acae3e..0f84fed 100644
--- a/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.before
+++ b/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.before
@@ -10,57 +10,57 @@ newline at the start</source>
NEWLINE AT THE START</translation>
</message>
<message>
- <location filename="main.cpp" line="8"/>
+ <location filename="main.cpp" line="49"/>
<source>newline at the end
</source>
<translation>NEWLINE AT THE END
</translation>
</message>
<message>
- <location filename="main.cpp" line="9"/>
+ <location filename="main.cpp" line="50"/>
<source>newline and space at the end
</source>
<translation>NEWLINE AND SPACE AT THE END
</translation>
</message>
<message>
- <location filename="main.cpp" line="10"/>
+ <location filename="main.cpp" line="51"/>
<source>space and newline at the end
</source>
<translation>SPACE AND NEWLINE AT THE END
</translation>
</message>
<message>
- <location filename="main.cpp" line="11"/>
+ <location filename="main.cpp" line="52"/>
<source><byte value="x9"/>Tab at the start and newline at the end
</source>
<translation><byte value="x9"/>TAB AT THE START AND NEWLINE AT THE END
</translation>
</message>
<message>
- <location filename="main.cpp" line="12"/>
+ <location filename="main.cpp" line="53"/>
<source>
<byte value="x9"/>newline and tab at the start</source>
<translation>
<byte value="x9"/>NEWLINE AND TAB AT THE START</translation>
</message>
<message>
- <location filename="main.cpp" line="13"/>
+ <location filename="main.cpp" line="54"/>
<source> <byte value="x9"/>space and tab at the start</source>
<translation> <byte value="x9"/>SPACE AND TAB AT THE START</translation>
</message>
<message>
- <location filename="main.cpp" line="14"/>
+ <location filename="main.cpp" line="55"/>
<source> space_first</source>
<translation> SPACE_FIRST</translation>
</message>
<message>
- <location filename="main.cpp" line="15"/>
+ <location filename="main.cpp" line="56"/>
<source>space_last </source>
<translation>SPACE_LAST </translation>
</message>
<message>
- <location filename="main.cpp" line="21"/>
+ <location filename="main.cpp" line="62"/>
<source>carriage return and line feed last<byte value="xd"/>
</source>
<translation type="unfinished">CARRIAGE RETURN AND LINE FEED LAST<byte value="xd"/>
diff --git a/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.result
index 6d6b469..776238d 100644
--- a/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.result
@@ -4,64 +4,64 @@
<context>
<name>QObject</name>
<message>
- <location filename="main.cpp" line="12"/>
+ <location filename="main.cpp" line="53"/>
<source>
newline at the start</source>
<translation>
NEWLINE AT THE START</translation>
</message>
<message>
- <location filename="main.cpp" line="13"/>
+ <location filename="main.cpp" line="54"/>
<source>newline at the end
</source>
<translation>NEWLINE AT THE END
</translation>
</message>
<message>
- <location filename="main.cpp" line="14"/>
+ <location filename="main.cpp" line="55"/>
<source>newline and space at the end
</source>
<translation>NEWLINE AND SPACE AT THE END
</translation>
</message>
<message>
- <location filename="main.cpp" line="15"/>
+ <location filename="main.cpp" line="56"/>
<source>space and newline at the end
</source>
<translation>SPACE AND NEWLINE AT THE END
</translation>
</message>
<message>
- <location filename="main.cpp" line="16"/>
+ <location filename="main.cpp" line="57"/>
<source> Tab at the start and newline at the end
</source>
<translation> TAB AT THE START AND NEWLINE AT THE END
</translation>
</message>
<message>
- <location filename="main.cpp" line="17"/>
+ <location filename="main.cpp" line="58"/>
<source>
newline and tab at the start</source>
<translation>
NEWLINE AND TAB AT THE START</translation>
</message>
<message>
- <location filename="main.cpp" line="18"/>
+ <location filename="main.cpp" line="59"/>
<source> space and tab at the start</source>
<translation> SPACE AND TAB AT THE START</translation>
</message>
<message>
- <location filename="main.cpp" line="19"/>
+ <location filename="main.cpp" line="60"/>
<source> space_first</source>
<translation> SPACE_FIRST</translation>
</message>
<message>
- <location filename="main.cpp" line="20"/>
+ <location filename="main.cpp" line="61"/>
<source>space_last </source>
<translation>SPACE_LAST </translation>
</message>
<message>
- <location filename="main.cpp" line="21"/>
+ <location filename="main.cpp" line="62"/>
<source>carriage return and line feed last
</source>
<translation type="unfinished">CARRIAGE RETURN AND LINE FEED LAST
diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp/finddialog.cpp b/tests/auto/linguist/lupdate/testdata/good/mergecpp/finddialog.cpp
index 7edb923..ce35e5b 100644
--- a/tests/auto/linguist/lupdate/testdata/good/mergecpp/finddialog.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp/finddialog.cpp
@@ -1,5 +1,47 @@
// The first line in this file should always be empty, its part of the test!!
+
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
class FindDialog : public QDialog
{
Q_OBJECT
diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.before
index 474444f..d06252c 100644
--- a/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.before
+++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.before
@@ -9,27 +9,27 @@
<translation></translation>
</message>
<message>
- <location filename="finddialog.cpp" line="14"/>
+ <location filename="finddialog.cpp" line="56"/>
<source>Enter the text you want to find.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="finddialog.cpp" line="15"/>
+ <location filename="finddialog.cpp" line="57"/>
<source>Search reached end of the document</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="finddialog.cpp" line="16"/>
+ <location filename="finddialog.cpp" line="58"/>
<source>Search reached start of the document</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="finddialog.cpp" line="17"/>
+ <location filename="finddialog.cpp" line="59"/>
<source>Text not found</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
- <location filename="finddialog.cpp" line="22"/>
+ <location filename="finddialog.cpp" line="64"/>
<source>%n item(s)</source>
<comment>merge from singular to plural form</comment>
<translation type="unfinished">
@@ -37,7 +37,7 @@
</translation>
</message>
<message numerus="yes">
- <location filename="finddialog.cpp" line="23"/>
+ <location filename="finddialog.cpp" line="65"/>
<source>%n item(s)</source>
<comment>merge from a finished singular form to an unfinished plural form</comment>
<translation type="unfinished">
diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.result
index 152b568..be4e02e 100644
--- a/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.result
@@ -10,27 +10,27 @@
<translation></translation>
</message>
<message>
- <location filename="finddialog.cpp" line="14"/>
+ <location filename="finddialog.cpp" line="56"/>
<source>Enter the text you want to find.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="finddialog.cpp" line="15"/>
+ <location filename="finddialog.cpp" line="57"/>
<source>Search reached end of the document</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="finddialog.cpp" line="16"/>
+ <location filename="finddialog.cpp" line="58"/>
<source>Search reached start of the document</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="finddialog.cpp" line="17"/>
+ <location filename="finddialog.cpp" line="59"/>
<source>Text not found</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
- <location filename="finddialog.cpp" line="22"/>
+ <location filename="finddialog.cpp" line="64"/>
<source>%n item(s)</source>
<comment>merge from singular to plural form</comment>
<translation type="unfinished">
@@ -38,7 +38,7 @@
</translation>
</message>
<message numerus="yes">
- <location filename="finddialog.cpp" line="23"/>
+ <location filename="finddialog.cpp" line="65"/>
<source>%n item(s)</source>
<comment>merge from a finished singular form to an unfinished plural form</comment>
<translation type="unfinished">
diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/finddialog.cpp b/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/finddialog.cpp
index 7215ebe..528e795 100644
--- a/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/finddialog.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/finddialog.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
#include "finddialog.h"
#include "mainwindow.h"
#include "tabbedbrowser.h"
@@ -10,18 +51,83 @@
#include <QDateTime>
#include <QGridLayout>
+CaseSensitiveModel::CaseSensitiveModel(int rows, int columns, QObject *parent)
+ : QStandardItemModel(rows, columns, parent)
+{}
+QModelIndexList CaseSensitiveModel::match(const QModelIndex &start, int role, const QVariant &value,
+ int hits, Qt::MatchFlags flags) const
+{
+ if (flags == Qt::MatchFlags(Qt::MatchStartsWith|Qt::MatchWrap))
+ flags |= Qt::MatchCaseSensitive;
+
+ return QStandardItemModel::match(start, role, value, hits, flags);
+}
+
FindDialog::FindDialog(MainWindow *parent)
: QDialog(parent)
{
+ contentsWidget = new QWidget(this);
+ ui.setupUi(contentsWidget);
+ ui.comboFind->setModel(new CaseSensitiveModel(0, 1, ui.comboFind));
+
+ QVBoxLayout *l = new QVBoxLayout(this);
+ l->setMargin(0);
+ l->setSpacing(0);
+ l->addWidget(contentsWidget);
+
+ lastBrowser = 0;
+ onceFound = false;
+ findExpr.clear();
+
sb = new QStatusBar(this);
l->addWidget(sb);
sb->showMessage(tr("Enter the text you want to find."));
+ connect(ui.findButton, SIGNAL(clicked()), this, SLOT(findButtonClicked()));
+ connect(ui.closeButton, SIGNAL(clicked()), this, SLOT(reject()));
+}
+
+FindDialog::~FindDialog()
+{
+}
+
+void FindDialog::findButtonClicked()
+{
+ doFind(ui.radioForward->isChecked());
}
void FindDialog::doFind(bool forward)
{
+ QTextBrowser *browser = static_cast<QTextBrowser*>(mainWindow()->browsers()->currentBrowser());
+ sb->clearMessage();
+
+ if (ui.comboFind->currentText() != findExpr || lastBrowser != browser)
+ onceFound = false;
+ findExpr = ui.comboFind->currentText();
+
+ QTextDocument::FindFlags flags = 0;
+
+ if (ui.checkCase->isChecked())
+ flags |= QTextDocument::FindCaseSensitively;
+
+ if (ui.checkWords->isChecked())
+ flags |= QTextDocument::FindWholeWords;
+
+ QTextCursor c = browser->textCursor();
+ if (!c.hasSelection()) {
+ if (forward)
+ c.movePosition(QTextCursor::Start);
+ else
+ c.movePosition(QTextCursor::End);
+
+ browser->setTextCursor(c);
+ }
+
+ QTextDocument::FindFlags options;
+ if (forward == false)
+ flags |= QTextDocument::FindBackward;
+
QTextCursor found = browser->document()->find(findExpr, c, flags);
if (found.isNull()) {
if (onceFound) {
@@ -35,6 +141,8 @@ void FindDialog::doFind(bool forward)
} else {
browser->setTextCursor(found);
}
+ onceFound |= !found.isNull();
+ lastBrowser = browser;
}
bool FindDialog::hasFindExpression() const
diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.before
index 12e30b5..834f512 100644
--- a/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.before
+++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.before
@@ -3,27 +3,27 @@
<context>
<name>FindDialog</name>
<message>
- <location filename="finddialog.cpp" line="57"/>
+ <location filename="finddialog.cpp" line="85"/>
<source>Enter the text you want to find.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="finddialog.cpp" line="107"/>
+ <location filename="finddialog.cpp" line="135"/>
<source>Search reached end of the document</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="finddialog.cpp" line="109"/>
+ <location filename="finddialog.cpp" line="137"/>
<source>Search reached start of the document</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="finddialog.cpp" line="111"/>
+ <location filename="finddialog.cpp" line="139"/>
<source>Text not found</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="finddialog.cpp" line="122"/>
+ <location filename="finddialog.cpp" line="150"/>
<source>Should be obsolete</source>
<translation type="unfinished">SHOULD BE OBSOLETE</translation>
</message>
diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/finddialog.cpp b/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/finddialog.cpp
index 756c9a3..4abbda9 100644
--- a/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/finddialog.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/finddialog.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
#include "finddialog.h"
#include "mainwindow.h"
#include "tabbedbrowser.h"
@@ -10,17 +51,86 @@
#include <QDateTime>
#include <QGridLayout>
+CaseSensitiveModel::CaseSensitiveModel(int rows, int columns, QObject *parent)
+ : QStandardItemModel(rows, columns, parent)
+{}
+QModelIndexList CaseSensitiveModel::match(const QModelIndex &start, int role, const QVariant &value,
+ int hits, Qt::MatchFlags flags) const
+{
+ if (flags == Qt::MatchFlags(Qt::MatchStartsWith|Qt::MatchWrap))
+ flags |= Qt::MatchCaseSensitive;
+
+ return QStandardItemModel::match(start, role, value, hits, flags);
+}
+
FindDialog::FindDialog(MainWindow *parent)
: QDialog(parent)
{
+ contentsWidget = new QWidget(this);
+ ui.setupUi(contentsWidget);
+ ui.comboFind->setModel(new CaseSensitiveModel(0, 1, ui.comboFind));
+
+ QVBoxLayout *l = new QVBoxLayout(this);
+ l->setMargin(0);
+ l->setSpacing(0);
+ l->addWidget(contentsWidget);
+
+ lastBrowser = 0;
+ onceFound = false;
+ findExpr.clear();
+
+ sb = new QStatusBar(this);
+ l->addWidget(sb);
+
+
// Move it to another line and change the text,
// then lupdate should add this one as a new one, and mark the old one as obsolete.
sb->showMessage(tr("Enter the text you want to find."));
+ connect(ui.findButton, SIGNAL(clicked()), this, SLOT(findButtonClicked()));
+ connect(ui.closeButton, SIGNAL(clicked()), this, SLOT(reject()));
+}
+
+FindDialog::~FindDialog()
+{
+}
+
+void FindDialog::findButtonClicked()
+{
+ doFind(ui.radioForward->isChecked());
}
void FindDialog::doFind(bool forward)
{
+ QTextBrowser *browser = static_cast<QTextBrowser*>(mainWindow()->browsers()->currentBrowser());
+ sb->clearMessage();
+
+ if (ui.comboFind->currentText() != findExpr || lastBrowser != browser)
+ onceFound = false;
+ findExpr = ui.comboFind->currentText();
+
+ QTextDocument::FindFlags flags = 0;
+
+ if (ui.checkCase->isChecked())
+ flags |= QTextDocument::FindCaseSensitively;
+
+ if (ui.checkWords->isChecked())
+ flags |= QTextDocument::FindWholeWords;
+
+ QTextCursor c = browser->textCursor();
+ if (!c.hasSelection()) {
+ if (forward)
+ c.movePosition(QTextCursor::Start);
+ else
+ c.movePosition(QTextCursor::End);
+
+ browser->setTextCursor(c);
+ }
+
+ QTextDocument::FindFlags options;
+ if (forward == false)
+ flags |= QTextDocument::FindBackward;
+
QTextCursor found = browser->document()->find(findExpr, c, flags);
if (found.isNull()) {
if (onceFound) {
@@ -34,4 +144,31 @@ void FindDialog::doFind(bool forward)
} else {
browser->setTextCursor(found);
}
+ onceFound |= !found.isNull();
+ lastBrowser = browser;
+}
+
+bool FindDialog::hasFindExpression() const
+{
+ return !findExpr.isEmpty();
+}
+
+void FindDialog::statusMessage(const QString &message)
+{
+ if (isVisible())
+ sb->showMessage(message);
+ else
+ static_cast<MainWindow*>(parent())->statusBar()->showMessage(message, 2000);
+}
+
+MainWindow *FindDialog::mainWindow() const
+{
+ return static_cast<MainWindow*>(parentWidget());
+}
+
+void FindDialog::reset()
+{
+ ui.comboFind->setFocus();
+ ui.comboFind->lineEdit()->setSelection(
+ 0, ui.comboFind->lineEdit()->text().length());
}
diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.before
index 271cc39..1fa0fd3 100644
--- a/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.before
+++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.before
@@ -3,22 +3,22 @@
<context>
<name>FindDialog</name>
<message>
- <location filename="finddialog.cpp" line="57"/>
+ <location filename="finddialog.cpp" line="85"/>
<source>Enter the text you are looking for.</source>
<translation type="unfinished">Skriv inn teksten du soker etter</translation>
</message>
<message>
- <location filename="finddialog.cpp" line="107"/>
+ <location filename="finddialog.cpp" line="135"/>
<source>Search reached end of the document</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="finddialog.cpp" line="109"/>
+ <location filename="finddialog.cpp" line="137"/>
<source>Search reached start of the document</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="finddialog.cpp" line="111"/>
+ <location filename="finddialog.cpp" line="139"/>
<source>Text not found</source>
<translation type="unfinished"></translation>
</message>
diff --git a/tests/auto/linguist/lupdate/testdata/good/multiple_locations/finddialog.cpp b/tests/auto/linguist/lupdate/testdata/good/multiple_locations/finddialog.cpp
index c3881d3..5a69326 100644
--- a/tests/auto/linguist/lupdate/testdata/good/multiple_locations/finddialog.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/multiple_locations/finddialog.cpp
@@ -1,3 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
QT_TRANSLATE_NOOP("context", "just a message")
diff --git a/tests/auto/linguist/lupdate/testdata/good/multiple_locations/main.cpp b/tests/auto/linguist/lupdate/testdata/good/multiple_locations/main.cpp
index 71d9085..e14b638 100644
--- a/tests/auto/linguist/lupdate/testdata/good/multiple_locations/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/multiple_locations/main.cpp
@@ -1,3 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
diff --git a/tests/auto/linguist/lupdate/testdata/good/multiple_locations/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/multiple_locations/project.ts.result
index dd013fa..ec1f02f 100644
--- a/tests/auto/linguist/lupdate/testdata/good/multiple_locations/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/multiple_locations/project.ts.result
@@ -4,9 +4,9 @@
<context>
<name>context</name>
<message>
- <location filename="finddialog.cpp" line="2"/>
- <location filename="finddialog.cpp" line="7"/>
- <location filename="main.cpp" line="6"/>
+ <location filename="finddialog.cpp" line="43"/>
+ <location filename="finddialog.cpp" line="48"/>
+ <location filename="main.cpp" line="47"/>
<source>just a message</source>
<extracomment>This is one comment
----------
diff --git a/tests/auto/linguist/lupdate/testdata/good/namespaces/main.cpp b/tests/auto/linguist/lupdate/testdata/good/namespaces/main.cpp
index 9f5a98c..62b306f 100644
--- a/tests/auto/linguist/lupdate/testdata/good/namespaces/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/namespaces/main.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
#include <QtCore>
class Class : public QObject
diff --git a/tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result
index d1193d3..bb5b739 100644
--- a/tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result
@@ -4,17 +4,17 @@
<context>
<name>Class</name>
<message>
- <location filename="main.cpp" line="11"/>
+ <location filename="main.cpp" line="52"/>
<source>nested class context</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.cpp" line="17"/>
+ <location filename="main.cpp" line="58"/>
<source>just class context</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.cpp" line="77"/>
+ <location filename="main.cpp" line="118"/>
<source>outestmost class</source>
<translation type="unfinished"></translation>
</message>
@@ -22,7 +22,7 @@
<context>
<name>Outer::Class</name>
<message>
- <location filename="main.cpp" line="78"/>
+ <location filename="main.cpp" line="119"/>
<source>outer class</source>
<translation type="unfinished"></translation>
</message>
@@ -30,7 +30,7 @@
<context>
<name>Outer::Middle1::Different</name>
<message>
- <location filename="main.cpp" line="65"/>
+ <location filename="main.cpp" line="106/>
<source>different namespaced class def</source>
<translation type="unfinished"></translation>
</message>
@@ -38,22 +38,22 @@
<context>
<name>Outer::Middle1::Inner1::Class</name>
<message>
- <location filename="main.cpp" line="79"/>
+ <location filename="main.cpp" line="120"/>
<source>innermost one</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.cpp" line="80"/>
+ <location filename="main.cpp" line="121"/>
<source>innermost two</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.cpp" line="81"/>
+ <location filename="main.cpp" line="122"/>
<source>innermost three</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.cpp" line="83"/>
+ <location filename="main.cpp" line="124"/>
<source>innermost four</source>
<translation type="unfinished"></translation>
</message>
@@ -61,12 +61,12 @@
<context>
<name>Outer::Middle1::Something</name>
<message>
- <location filename="main.cpp" line="90"/>
+ <location filename="main.cpp" line="131"/>
<source>namespaced class def</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.cpp" line="93"/>
+ <location filename="main.cpp" line="134"/>
<source>namespaced class def 2</source>
<translation type="unfinished"></translation>
</message>
@@ -74,7 +74,7 @@
<context>
<name>Outer::Middle2::Inner2::Class</name>
<message>
- <location filename="main.cpp" line="82"/>
+ <location filename="main.cpp" line="123"/>
<source>innermost three b</source>
<translation type="unfinished"></translation>
</message>
diff --git a/tests/auto/linguist/lupdate/testdata/good/parse_special_chars/main.cpp b/tests/auto/linguist/lupdate/testdata/good/parse_special_chars/main.cpp
index 72a1590..c64c111 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parse_special_chars/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/parse_special_chars/main.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
// IMPORTANT!!!! If you want to add testdata to this file,
// always add it to the end in order to not change the linenumbers of translations!!!
diff --git a/tests/auto/linguist/lupdate/testdata/good/parse_special_chars/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/parse_special_chars/project.ts.result
index a49b47a..0394bea 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parse_special_chars/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/parse_special_chars/project.ts.result
@@ -4,12 +4,12 @@
<context>
<name>Dialog2</name>
<message>
- <location filename="main.cpp" line="13"/>
+ <location filename="main.cpp" line="54"/>
<source>catégorie</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.cpp" line="15"/>
+ <location filename="main.cpp" line="56"/>
<source>Für Èlise</source>
<translation type="unfinished"></translation>
</message>
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecontexts/main.cpp b/tests/auto/linguist/lupdate/testdata/good/parsecontexts/main.cpp
index 65eeed5..c2eba71 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsecontexts/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecontexts/main.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
// IMPORTANT!!!! If you want to add testdata to this file,
// always add it to the end in order to not change the linenumbers of translations!!!
#include <QtCore>
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecontexts/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/parsecontexts/project.ts.result
index 04bb3ae..9b00d53 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsecontexts/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecontexts/project.ts.result
@@ -4,7 +4,7 @@
<context>
<name>A1::AB</name>
<message>
- <location filename="main.cpp" line="137"/>
+ <location filename="main.cpp" line="178"/>
<source>inlineFuncAfterFriendDeclaration</source>
<comment>A1::AB</comment>
<translation type="unfinished"></translation>
@@ -13,7 +13,7 @@
<context>
<name>A1::B</name>
<message>
- <location filename="main.cpp" line="143"/>
+ <location filename="main.cpp" line="184"/>
<source>foo</source>
<comment>A1::B</comment>
<translation type="unfinished"></translation>
@@ -22,19 +22,19 @@
<context>
<name>A1::B2</name>
<message>
- <location filename="main.cpp" line="188"/>
+ <location filename="main.cpp" line="229"/>
<source>test TRANSLATOR comment (2)</source>
<comment>A1::B2</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.cpp" line="194"/>
+ <location filename="main.cpp" line="235"/>
<source>test TRANSLATOR comment (4)</source>
<comment>A1::B2</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.cpp" line="203"/>
+ <location filename="main.cpp" line="244"/>
<source>test TRANSLATOR comment (5)</source>
<comment>A1::B2</comment>
<translation type="unfinished"></translation>
@@ -43,7 +43,7 @@
<context>
<name>A1::B3::C2</name>
<message>
- <location filename="main.cpp" line="220"/>
+ <location filename="main.cpp" line="261"/>
<source>test TRANSLATOR comment (6)</source>
<comment>A1::B3::C2</comment>
<translation type="unfinished"></translation>
@@ -52,7 +52,7 @@
<context>
<name>A1::V</name>
<message>
- <location filename="main.cpp" line="150"/>
+ <location filename="main.cpp" line="191"/>
<source>bar</source>
<comment>A1::V</comment>
<translation type="unfinished"></translation>
@@ -61,7 +61,7 @@
<context>
<name>A1::W</name>
<message>
- <location filename="main.cpp" line="156"/>
+ <location filename="main.cpp" line="197"/>
<source>baz</source>
<comment>A1::W</comment>
<translation type="unfinished"></translation>
@@ -70,14 +70,14 @@
<context>
<name>A::C</name>
<message>
- <location filename="main.cpp" line="28"/>
- <location filename="main.cpp" line="32"/>
+ <location filename="main.cpp" line="69"/>
+ <location filename="main.cpp" line="73"/>
<source>Bla</source>
<comment>A::C</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.cpp" line="37"/>
+ <location filename="main.cpp" line="78"/>
<source>Bla 2</source>
<comment>A::C</comment>
<translation type="unfinished"></translation>
@@ -86,7 +86,7 @@
<context>
<name>B1</name>
<message>
- <location filename="main.cpp" line="178"/>
+ <location filename="main.cpp" line="219"/>
<source>test TRANSLATOR comment (1)</source>
<comment>B1</comment>
<translation type="unfinished"></translation>
@@ -95,7 +95,7 @@
<context>
<name>B2</name>
<message>
- <location filename="main.cpp" line="197"/>
+ <location filename="main.cpp" line="238"/>
<source></source>
<comment>This is a comment to the translator.</comment>
<translation type="unfinished"></translation>
@@ -104,7 +104,7 @@
<context>
<name>C1</name>
<message>
- <location filename="main.cpp" line="189"/>
+ <location filename="main.cpp" line="230"/>
<source>test TRANSLATOR comment (3)</source>
<comment>C1</comment>
<translation type="unfinished"></translation>
@@ -113,7 +113,7 @@
<context>
<name>D</name>
<message>
- <location filename="main.cpp" line="14"/>
+ <location filename="main.cpp" line="55"/>
<source>test</source>
<comment>D</comment>
<translation type="unfinished"></translation>
@@ -122,7 +122,7 @@
<context>
<name>Gui::MainWindow</name>
<message>
- <location filename="main.cpp" line="122"/>
+ <location filename="main.cpp" line="163"/>
<source>More bla</source>
<comment>Gui::MainWindow</comment>
<translation type="unfinished"></translation>
@@ -131,7 +131,7 @@
<context>
<name>QObject</name>
<message>
- <location filename="main.cpp" line="100"/>
+ <location filename="main.cpp" line="141"/>
<source>task 161186</source>
<comment>QObject</comment>
<translation type="unfinished"></translation>
@@ -140,13 +140,13 @@
<context>
<name>X::D</name>
<message>
- <location filename="main.cpp" line="54"/>
+ <location filename="main.cpp" line="95"/>
<source>foo</source>
<comment>D</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.cpp" line="74"/>
+ <location filename="main.cpp" line="115"/>
<source>Bla</source>
<comment>X::D</comment>
<translation type="unfinished"></translation>
@@ -155,7 +155,7 @@
<context>
<name>X::F</name>
<message>
- <location filename="main.cpp" line="87"/>
+ <location filename="main.cpp" line="128"/>
<source>inline function</source>
<comment>X::F</comment>
<translation type="unfinished"></translation>
@@ -164,7 +164,7 @@
<context>
<name>X::Y::C</name>
<message>
- <location filename="main.cpp" line="70"/>
+ <location filename="main.cpp" line="111"/>
<source>Bla</source>
<comment>X::Y::C</comment>
<translation type="unfinished"></translation>
@@ -173,8 +173,8 @@
<context>
<name>X::Y::E</name>
<message>
- <location filename="main.cpp" line="78"/>
- <location filename="main.cpp" line="79"/>
+ <location filename="main.cpp" line="119"/>
+ <location filename="main.cpp" line="120"/>
<source>Bla</source>
<comment>X::Y::E</comment>
<translation type="unfinished"></translation>
@@ -183,7 +183,7 @@
<context>
<name>ico::foo::A</name>
<message>
- <location filename="main.cpp" line="99"/>
+ <location filename="main.cpp" line="140"/>
<source>myfoo</source>
<comment>ico::foo::A</comment>
<translation type="unfinished"></translation>
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp b/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp
index 735e4cd..50b835b 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
// IMPORTANT!!!! If you want to add testdata to this file,
// always add it to the end in order to not change the linenumbers of translations!!!
int main(char **argv, int argc)
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result
index 8c48245..9e4e319 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result
@@ -22,7 +22,7 @@ backslashed \ stuff.</source>
<context>
<name>Dialog2</name>
<message numerus="yes">
- <location filename="main.cpp" line="29"/>
+ <location filename="main.cpp" line="70"/>
<source>%n files</source>
<comment>plural form</comment>
<translation type="unfinished">
@@ -30,40 +30,40 @@ backslashed \ stuff.</source>
</translation>
</message>
<message numerus="yes">
- <location filename="main.cpp" line="30"/>
+ <location filename="main.cpp" line="71"/>
<source>%n cars</source>
<translation type="unfinished">
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
- <location filename="main.cpp" line="31"/>
+ <location filename="main.cpp" line="72"/>
<source>&amp;Find %n cars</source>
<translation type="unfinished">
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
- <location filename="main.cpp" line="32"/>
+ <location filename="main.cpp" line="73"/>
<source>Search in %n items?</source>
<translation type="unfinished">
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
- <location filename="main.cpp" line="33"/>
+ <location filename="main.cpp" line="74"/>
<source>%1. Search in %n items?</source>
<translation type="unfinished">
<numerusform></numerusform>
</translation>
</message>
<message>
- <location filename="main.cpp" line="34"/>
+ <location filename="main.cpp" line="75"/>
<source>Age: %1</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
- <location filename="main.cpp" line="35"/>
+ <location filename="main.cpp" line="76"/>
<source>There are %n house(s)</source>
<comment>Plurals and function call</comment>
<translation type="unfinished">
@@ -71,7 +71,7 @@ backslashed \ stuff.</source>
</translation>
</message>
<message>
- <location filename="main.cpp" line="102"/>
+ <location filename="main.cpp" line="143"/>
<source>func3</source>
<translation type="unfinished"></translation>
</message>
@@ -115,7 +115,7 @@ backslashed \ stuff.</source>
<context>
<name>Plurals, QCoreApplication</name>
<message numerus="yes">
- <location filename="main.cpp" line="40"/>
+ <location filename="main.cpp" line="81"/>
<source>%n house(s)</source>
<comment>Plurals and identifier</comment>
<translation type="unfinished">
@@ -123,7 +123,7 @@ backslashed \ stuff.</source>
</translation>
</message>
<message numerus="yes">
- <location filename="main.cpp" line="41"/>
+ <location filename="main.cpp" line="82"/>
<source>%n car(s)</source>
<comment>Plurals and literal number</comment>
<translation type="unfinished">
@@ -131,7 +131,7 @@ backslashed \ stuff.</source>
</translation>
</message>
<message numerus="yes">
- <location filename="main.cpp" line="42"/>
+ <location filename="main.cpp" line="83"/>
<source>%n horse(s)</source>
<comment>Plurals and function call</comment>
<translation type="unfinished">
@@ -142,7 +142,7 @@ backslashed \ stuff.</source>
<context>
<name>QApplication</name>
<message>
- <location filename="main.cpp" line="10"/>
+ <location filename="main.cpp" line="51"/>
<source>QT_LAYOUT_DIRECTION</source>
<comment>Translate this string to the string &apos;LTR&apos; in left-to-right languages or to &apos;RTL&apos; in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout.</comment>
<translation type="unfinished"></translation>
@@ -180,26 +180,26 @@ backslashed \ stuff.</source>
<context>
<name>QTranslator</name>
<message>
- <location filename="main.cpp" line="52"/>
- <location filename="main.cpp" line="53"/>
+ <location filename="main.cpp" line="93"/>
+ <location filename="main.cpp" line="94"/>
<source>Simple</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.cpp" line="54"/>
+ <location filename="main.cpp" line="95"/>
<source>Simple with comment</source>
<comment>with comment</comment>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
- <location filename="main.cpp" line="55"/>
+ <location filename="main.cpp" line="96"/>
<source>Plural without comment</source>
<translation type="unfinished">
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
- <location filename="main.cpp" line="56"/>
+ <location filename="main.cpp" line="97"/>
<source>Plural with comment</source>
<comment>comment 1</comment>
<translation type="unfinished">
@@ -207,7 +207,7 @@ backslashed \ stuff.</source>
</translation>
</message>
<message numerus="yes">
- <location filename="main.cpp" line="57"/>
+ <location filename="main.cpp" line="98"/>
<source>Plural with comment</source>
<comment>comment 2</comment>
<translation type="unfinished">
@@ -218,19 +218,19 @@ backslashed \ stuff.</source>
<context>
<name>TestClass</name>
<message>
- <location filename="main.cpp" line="116"/>
+ <location filename="main.cpp" line="157"/>
<source>inline function</source>
<comment>TestClass</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.cpp" line="120"/>
+ <location filename="main.cpp" line="161"/>
<source>inline function 2</source>
<comment>TestClass</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.cpp" line="124"/>
+ <location filename="main.cpp" line="165"/>
<source>static inline function</source>
<comment>TestClass</comment>
<translation type="unfinished"></translation>
@@ -239,18 +239,18 @@ backslashed \ stuff.</source>
<context>
<name>Testing</name>
<message>
- <location filename="main.cpp" line="141"/>
+ <location filename="main.cpp" line="182"/>
<source>extra-commented string</source>
<extracomment>this is an extra comment for the translator</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.cpp" line="142"/>
+ <location filename="main.cpp" line="183"/>
<source>not extra-commented string</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.cpp" line="144"/>
+ <location filename="main.cpp" line="185"/>
<source>another extra-commented string</source>
<extracomment>another extra-comment</extracomment>
<translation type="unfinished"></translation>
@@ -280,7 +280,7 @@ backslashed \ stuff.</source>
<context>
<name>scope</name>
<message numerus="yes">
- <location filename="main.cpp" line="146"/>
+ <location filename="main.cpp" line="187"/>
<source>works in translate, too</source>
<comment>blabb</comment>
<extracomment>blah!</extracomment>
@@ -289,20 +289,20 @@ backslashed \ stuff.</source>
</translation>
</message>
<message>
- <location filename="main.cpp" line="153"/>
+ <location filename="main.cpp" line="194"/>
<source>string</source>
<extracomment>extra comment for NOOP which spans multiple lines</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.cpp" line="155"/>
+ <location filename="main.cpp" line="196"/>
<source>string</source>
<comment>comment</comment>
<extracomment>extra comment for NOOP3</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.cpp" line="157"/>
+ <location filename="main.cpp" line="198"/>
<source>string continuation on next line</source>
<translation type="unfinished"></translation>
</message>
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsejava/main.java b/tests/auto/linguist/lupdate/testdata/good/parsejava/main.java
index 07681d2..1167e87 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsejava/main.java
+++ b/tests/auto/linguist/lupdate/testdata/good/parsejava/main.java
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
// IMPORTANT!!!! If you want to add testdata to this file,
// always add it to the end in order to not change the linenumbers of translations!!!
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsejava/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/parsejava/project.ts.result
index 69c0a00..0ce600c 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsejava/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/parsejava/project.ts.result
@@ -4,7 +4,7 @@
<context>
<name>Plurals, QCoreApplication</name>
<message numerus="yes">
- <location filename="main.java" line="47"/>
+ <location filename="main.java" line="88"/>
<source>%n house(s)</source>
<comment>Plurals and identifier</comment>
<extracomment>with extra comment!</extracomment>
@@ -16,26 +16,26 @@
<context>
<name>QTranslator</name>
<message>
- <location filename="main.java" line="39"/>
- <location filename="main.java" line="40"/>
+ <location filename="main.java" line="80"/>
+ <location filename="main.java" line="81"/>
<source>Simple</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.java" line="41"/>
+ <location filename="main.java" line="82"/>
<source>Simple with comment</source>
<comment>with comment</comment>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
- <location filename="main.java" line="42"/>
+ <location filename="main.java" line="83"/>
<source>Plural without comment</source>
<translation type="unfinished">
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
- <location filename="main.java" line="43"/>
+ <location filename="main.java" line="84"/>
<source>Plural with comment</source>
<comment>comment 1</comment>
<translation type="unfinished">
@@ -43,7 +43,7 @@
</translation>
</message>
<message numerus="yes">
- <location filename="main.java" line="44"/>
+ <location filename="main.java" line="85"/>
<source>Plural with comment</source>
<comment>comment 2</comment>
<translation type="unfinished">
@@ -54,18 +54,18 @@
<context>
<name>com.trolltech.examples.I18N</name>
<message>
- <location filename="main.java" line="26"/>
+ <location filename="main.java" line="67"/>
<source>pack class method</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.java" line="31"/>
+ <location filename="main.java" line="72"/>
<source>QT_LAYOUT_DIRECTION</source>
<comment>Translate this string to the string &apos;LTR&apos; in left-to-right languages or to &apos;RTL&apos; in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout.</comment>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
- <location filename="main.java" line="33"/>
+ <location filename="main.java" line="74"/>
<source>%n files</source>
<comment>plural form</comment>
<translation type="unfinished">
@@ -73,19 +73,19 @@
</translation>
</message>
<message numerus="yes">
- <location filename="main.java" line="34"/>
+ <location filename="main.java" line="75"/>
<source>%n cars</source>
<translation type="unfinished">
<numerusform></numerusform>
</translation>
</message>
<message>
- <location filename="main.java" line="35"/>
+ <location filename="main.java" line="76"/>
<source>Age: %1</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
- <location filename="main.java" line="36"/>
+ <location filename="main.java" line="77"/>
<source>There are %n house(s)</source>
<comment>Plurals and function call</comment>
<translation type="unfinished">
@@ -96,18 +96,18 @@
<context>
<name>com.trolltech.examples.I18N$MainWindow</name>
<message>
- <location filename="main.java" line="9"/>
+ <location filename="main.java" line="50"/>
<source>pack class class</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.java" line="12"/>
+ <location filename="main.java" line="53"/>
<source>pack class class extra</source>
<extracomment>extra comment for t-tor</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.java" line="18"/>
+ <location filename="main.java" line="59"/>
<source>pack class class method</source>
<translation type="unfinished"></translation>
</message>
diff --git a/tests/auto/linguist/lupdate/testdata/good/prefix/main.cpp b/tests/auto/linguist/lupdate/testdata/good/prefix/main.cpp
index d845853..7ad8407 100644
--- a/tests/auto/linguist/lupdate/testdata/good/prefix/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/prefix/main.cpp
@@ -1,4 +1,43 @@
-
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
QString foo()
diff --git a/tests/auto/linguist/lupdate/testdata/good/prefix/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/prefix/project.ts.result
index 5ced00d..c15b986 100644
--- a/tests/auto/linguist/lupdate/testdata/good/prefix/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/prefix/project.ts.result
@@ -4,18 +4,18 @@
<context>
<name>Foo</name>
<message>
- <location filename="main.cpp" line="6"/>
+ <location filename="main.cpp" line="46"/>
<source>XXX</source>
<comment>YYY</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.cpp" line="11"/>
+ <location filename="main.cpp" line="51"/>
<source>CTOR</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.cpp" line="16"/>
+ <location filename="main.cpp" line="56"/>
<source>BAR</source>
<translation type="unfinished"></translation>
</message>
diff --git a/tests/auto/linguist/lupdate/testdata/good/preprocess/main.cpp b/tests/auto/linguist/lupdate/testdata/good/preprocess/main.cpp
index 9abfa5e..c4f67a8 100644
--- a/tests/auto/linguist/lupdate/testdata/good/preprocess/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/preprocess/main.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
// IMPORTANT!!!! If you want to add testdata to this file,
// always add it to the end in order to not change the linenumbers of translations!!!
diff --git a/tests/auto/linguist/lupdate/testdata/good/preprocess/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/preprocess/project.ts.result
index 3aec045..4d695e8 100644
--- a/tests/auto/linguist/lupdate/testdata/good/preprocess/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/preprocess/project.ts.result
@@ -4,30 +4,30 @@
<context>
<name>QApplication</name>
<message>
- <location filename="main.cpp" line="6"/>
+ <location filename="main.cpp" line="47"/>
<source>Hello world</source>
<comment>Platform-independent file</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.cpp" line="14"/>
+ <location filename="main.cpp" line="55"/>
<source>Kind</source>
<comment>Windows only, see Type</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.cpp" line="16"/>
+ <location filename="main.cpp" line="57"/>
<source>Type</source>
<comment>Not used on windows, see Kind</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.cpp" line="25"/>
+ <location filename="main.cpp" line="66"/>
<source>One string, three lines</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main.cpp" line="29"/>
+ <location filename="main.cpp" line="70"/>
<source>a backslash followed by newline should be ignored and the next line should be syntactically considered to be on the same line</source>
<translation type="unfinished"></translation>
</message>
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/main.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/main.cpp
index 236bbe7..9064b56 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsing/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/main.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
// IMPORTANT!!!! If you want to add testdata to this file,
// always add it to the end in order to not change the linenumbers of translations!!!
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/main_mac.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/main_mac.cpp
index 845aaa6..4cfec14 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsing/main_mac.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/main_mac.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
// IMPORTANT!!!! If you want to add testdata to this file,
// always add it to the end in order to not change the linenumbers of translations!!!
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/main_unix.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/main_unix.cpp
index 229e154..c15c2f7 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsing/main_unix.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/main_unix.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
// IMPORTANT!!!! If you want to add testdata to this file,
// always add it to the end in order to not change the linenumbers of translations!!!
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/main_win.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/main_win.cpp
index 4eb39f7..b879aa7 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsing/main_win.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/main_win.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
// IMPORTANT!!!! If you want to add testdata to this file,
// always add it to the end in order to not change the linenumbers of translations!!!
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/proparsing/project.ts.result
index ef98596..556ca07 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsing/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/project.ts.result
@@ -4,49 +4,49 @@
<context>
<name>QApplication</name>
<message>
- <location filename="main.cpp" line="6"/>
+ <location filename="main.cpp" line="47"/>
<source>Hello world</source>
<comment>Platform-independent file</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main_mac.cpp" line="6"/>
+ <location filename="main_mac.cpp" line="47"/>
<source>Hello macworld</source>
<comment>mac-only file</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main_unix.cpp" line="6"/>
+ <location filename="main_unix.cpp" line="47"/>
<source>Hello unixworld</source>
<comment>unix-only file</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main_win.cpp" line="6"/>
+ <location filename="main_win.cpp" line="47"/>
<source>Hello windowsworld</source>
<comment>Windows-only file</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="wildcard/main1.cpp" line="6"/>
+ <location filename="wildcard/main1.cpp" line="47"/>
<source>Hello world</source>
<comment>wildcard/main1.cpp</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="wildcard/mainfile.cpp" line="6"/>
+ <location filename="wildcard/mainfile.cpp" line="47"/>
<source>Hello world</source>
<comment>wildcard/main2.cpp</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="wildcard1.cpp" line="6"/>
+ <location filename="wildcard1.cpp" line="47"/>
<source>Hello world</source>
<comment>wildcard1.cpp</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="wildcard99.cpp" line="6"/>
+ <location filename="wildcard99.cpp" line="47"/>
<source>Hello world</source>
<comment>wildcard99.cpp</comment>
<translation type="unfinished"></translation>
@@ -55,7 +55,7 @@
<context>
<name>QCoreApplication</name>
<message>
- <location filename="vpaths/dependpath/main_dependpath.cpp" line="7"/>
+ <location filename="vpaths/dependpath/main_dependpath.cpp" line="48"/>
<source>Hello from a DEPENDPATH</source>
<comment>See if the DEPENDPATH thing works</comment>
<translation type="unfinished"></translation>
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/vpaths/dependpath/main_dependpath.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/vpaths/dependpath/main_dependpath.cpp
index f019c79..f12ce98 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsing/vpaths/dependpath/main_dependpath.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/vpaths/dependpath/main_dependpath.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
// IMPORTANT!!!! If you want to add testdata to this file,
// always add it to the end in order to not change the linenumbers of translations!!!
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard/main1.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard/main1.cpp
index 506ae42..fdc5ca4 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard/main1.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard/main1.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
// IMPORTANT!!!! If you want to add testdata to this file,
// always add it to the end in order to not change the linenumbers of translations!!!
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard/mainfile.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard/mainfile.cpp
index f4cd00a..a5d5783 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard/mainfile.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard/mainfile.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
// IMPORTANT!!!! If you want to add testdata to this file,
// always add it to the end in order to not change the linenumbers of translations!!!
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard1.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard1.cpp
index c7790c5..bfe651c 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard1.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard1.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
// IMPORTANT!!!! If you want to add testdata to this file,
// always add it to the end in order to not change the linenumbers of translations!!!
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard99.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard99.cpp
index 93febda..9f7e3cd 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard99.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard99.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
// IMPORTANT!!!! If you want to add testdata to this file,
// always add it to the end in order to not change the linenumbers of translations!!!
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/a b/tests/auto/linguist/lupdate/testdata/good/proparsing2/a
index 5966392..d3abf47 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/a
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/a
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
QString func()
{
return QLineEdit::tr("a");
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/a.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing2/a.cpp
index 1d80ed3..5f0f7ef 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/a.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/a.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
QString func()
{
return QLineEdit::tr("a.cpp");
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/b b/tests/auto/linguist/lupdate/testdata/good/proparsing2/b
index d0fe066..40ab4f4 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/b
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/b
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
QString func()
{
return QLineEdit::tr("b");
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/b.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing2/b.cpp
index a5c386d..5feb1e7 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/b.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/b.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
QString func()
{
return QLineEdit::tr("b.cpp");
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/e b/tests/auto/linguist/lupdate/testdata/good/proparsing2/e
index 66e89a8..ffb7dd6 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/e
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/e
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
QString func()
{
return QLineEdit::tr("e");
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/f/g.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing2/f/g.cpp
index d86bee2..1eeac23 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/f/g.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/f/g.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
QString func()
{
return QLineEdit::tr("f/g.cpp");
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/proparsing2/project.ts.result
index 2e60696..3714d9b 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/project.ts.result
@@ -4,57 +4,57 @@
<context>
<name>QLineEdit</name>
<message>
- <location filename="a" line="3"/>
+ <location filename="a" line="44"/>
<source>a</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="a.cpp" line="3"/>
+ <location filename="a.cpp" line="44"/>
<source>a.cpp</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="b" line="3"/>
+ <location filename="b" line="44"/>
<source>b</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="b.cpp" line="3"/>
+ <location filename="b.cpp" line="44"/>
<source>b.cpp</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="e" line="3"/>
+ <location filename="e" line="44"/>
<source>e</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="f/g.cpp" line="3"/>
+ <location filename="f/g.cpp" line="44"/>
<source>f/g.cpp</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="spaces/z" line="3"/>
+ <location filename="spaces/z" line="44"/>
<source>spaces/z</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="variable_with_spaces" line="3"/>
+ <location filename="variable_with_spaces" line="44"/>
<source>variable with spaces</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="with" line="3"/>
+ <location filename="with" line="44"/>
<source>with</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="x/d" line="3"/>
+ <location filename="x/d" line="44"/>
<source>x/d</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="x/variable" line="3"/>
+ <location filename="x/variable" line="44"/>
<source>x/variable</source>
<translation type="unfinished"></translation>
</message>
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/spaces/z b/tests/auto/linguist/lupdate/testdata/good/proparsing2/spaces/z
index 34364d6..4b237dc 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/spaces/z
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/spaces/z
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
QString func()
{
return QLineEdit::tr("spaces/z");
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/variable_with_spaces b/tests/auto/linguist/lupdate/testdata/good/proparsing2/variable_with_spaces
index cf56fc4..6ce9ff0 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/variable_with_spaces
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/variable_with_spaces
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
QString func()
{
return QLineEdit::tr("variable with spaces");
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/with b/tests/auto/linguist/lupdate/testdata/good/proparsing2/with
index a156ca1..b2a1e57 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/with
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/with
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
QString func()
{
return QLineEdit::tr("with");
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/x/d b/tests/auto/linguist/lupdate/testdata/good/proparsing2/x/d
index e2effde..30ab25a 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/x/d
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/x/d
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
QString func()
{
return QLineEdit::tr("x/d");
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/x/variable b/tests/auto/linguist/lupdate/testdata/good/proparsing2/x/variable
index a86e387..a6093aa 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/x/variable
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/x/variable
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
QString func()
{
return QLineEdit::tr("x/variable");
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/file1.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/file1.cpp
index ad87e70..e1876c8 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/file1.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/file1.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
// IMPORTANT!!!! If you want to add testdata to this file,
// always add it to the end in order to not change the linenumbers of translations!!!
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/filter.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/filter.cpp
index 912963d..2e40b44 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/filter.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/filter.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
// IMPORTANT!!!! If you want to add testdata to this file,
// always add it to the end in order to not change the linenumbers of translations!!!
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/project.ts.result
index 470d6eb..edc2fcb 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/project.ts.result
@@ -4,25 +4,25 @@
<context>
<name>QApplication</name>
<message>
- <location filename="file1.cpp" line="6"/>
+ <location filename="file1.cpp" line="47"/>
<source>Hello world</source>
<comment>top-level wildcard</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="filter.cpp" line="6"/>
+ <location filename="filter.cpp" line="47"/>
<source>Hello world</source>
<comment>top-level direct</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="sub/subfile1.cpp" line="6"/>
+ <location filename="sub/subfile1.cpp" line="47"/>
<source>Hello world</source>
<comment>nested wildcard</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="sub/subfilter.cpp" line="6"/>
+ <location filename="sub/subfilter.cpp" line="47"/>
<source>Hello world</source>
<comment>nested direct</comment>
<translation type="unfinished"></translation>
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/subfile1.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/subfile1.cpp
index 807d296..91fe89e 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/subfile1.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/subfile1.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
// IMPORTANT!!!! If you want to add testdata to this file,
// always add it to the end in order to not change the linenumbers of translations!!!
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/subfilter.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/subfilter.cpp
index 6e5dd25..b72253f 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/subfilter.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/subfilter.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
// IMPORTANT!!!! If you want to add testdata to this file,
// always add it to the end in order to not change the linenumbers of translations!!!
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/common/main.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/common/main.cpp
index 236bbe7..9064b56 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/common/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/common/main.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
// IMPORTANT!!!! If you want to add testdata to this file,
// always add it to the end in order to not change the linenumbers of translations!!!
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/mac/main_mac.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/mac/main_mac.cpp
index 845aaa6..4cfec14 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/mac/main_mac.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/mac/main_mac.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
// IMPORTANT!!!! If you want to add testdata to this file,
// always add it to the end in order to not change the linenumbers of translations!!!
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/project.ts.result
index c64ba82..e01c533 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/project.ts.result
@@ -4,31 +4,31 @@
<context>
<name>QApplication</name>
<message>
- <location filename="common/main.cpp" line="6"/>
+ <location filename="common/main.cpp" line="47"/>
<source>Hello world</source>
<comment>Platform-independent file</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mac/main_mac.cpp" line="6"/>
+ <location filename="mac/main_mac.cpp" line="47"/>
<source>Hello macworld</source>
<comment>mac-only file</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="relativity/relativity.cpp" line="6"/>
+ <location filename="relativity/relativity.cpp" line="47"/>
<source>relativity.pri</source>
<comment>Platform-independent file</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="unix/main_unix.cpp" line="6"/>
+ <location filename="unix/main_unix.cpp" line="47"/>
<source>Hello unixworld</source>
<comment>unix-only file</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="win/main_win.cpp" line="6"/>
+ <location filename="win/main_win.cpp" line="47"/>
<source>Hello windowsworld</source>
<comment>Windows-only file</comment>
<translation type="unfinished"></translation>
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/relativity/relativity.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/relativity/relativity.cpp
index 83ae7d5..a23e65a 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/relativity/relativity.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/relativity/relativity.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
// IMPORTANT!!!! If you want to add testdata to this file,
// always add it to the end in order to not change the linenumbers of translations!!!
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/unix/main_unix.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/unix/main_unix.cpp
index 229e154..c15c2f7 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/unix/main_unix.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/unix/main_unix.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
// IMPORTANT!!!! If you want to add testdata to this file,
// always add it to the end in order to not change the linenumbers of translations!!!
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/win/main_win.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/win/main_win.cpp
index 4eb39f7..b879aa7 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/win/main_win.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/win/main_win.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
// IMPORTANT!!!! If you want to add testdata to this file,
// always add it to the end in order to not change the linenumbers of translations!!!
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingsubdirs/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/proparsingsubdirs/project.ts.result
index 5914d0b..a6972bd 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsingsubdirs/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsingsubdirs/project.ts.result
@@ -4,7 +4,7 @@
<context>
<name>QApplication</name>
<message>
- <location filename="sub1/main.cpp" line="6"/>
+ <location filename="sub1/main.cpp" line="47"/>
<source>Hello world</source>
<comment>Platform-independent file</comment>
<translation type="unfinished"></translation>
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingsubdirs/sub1/main.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingsubdirs/sub1/main.cpp
index 236bbe7..9064b56 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsingsubdirs/sub1/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsingsubdirs/sub1/main.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
// IMPORTANT!!!! If you want to add testdata to this file,
// always add it to the end in order to not change the linenumbers of translations!!!
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/common/main.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/common/main.cpp
index 236bbe7..9064b56 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/common/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/common/main.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
// IMPORTANT!!!! If you want to add testdata to this file,
// always add it to the end in order to not change the linenumbers of translations!!!
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/mac/main_mac.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/mac/main_mac.cpp
index 845aaa6..4cfec14 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/mac/main_mac.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/mac/main_mac.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
// IMPORTANT!!!! If you want to add testdata to this file,
// always add it to the end in order to not change the linenumbers of translations!!!
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/project.ts.result
index c0352fb..6621de9 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/project.ts.result
@@ -4,25 +4,25 @@
<context>
<name>QApplication</name>
<message>
- <location filename="win/main_win.cpp" line="6"/>
+ <location filename="win/main_win.cpp" line="47"/>
<source>Hello windowsworld</source>
<comment>Windows-only file</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mac/main_mac.cpp" line="6"/>
+ <location filename="mac/main_mac.cpp" line="47"/>
<source>Hello macworld</source>
<comment>mac-only file</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="unix/main_unix.cpp" line="6"/>
+ <location filename="unix/main_unix.cpp" line="47"/>
<source>Hello unixworld</source>
<comment>unix-only file</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="common/main.cpp" line="6"/>
+ <location filename="common/main.cpp" line="47"/>
<source>Hello world</source>
<comment>Platform-independent file</comment>
<translation type="unfinished"></translation>
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/unix/main_unix.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/unix/main_unix.cpp
index 229e154..c15c2f7 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/unix/main_unix.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/unix/main_unix.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
// IMPORTANT!!!! If you want to add testdata to this file,
// always add it to the end in order to not change the linenumbers of translations!!!
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/win/main_win.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/win/main_win.cpp
index 4eb39f7..b879aa7 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/win/main_win.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/win/main_win.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
// IMPORTANT!!!! If you want to add testdata to this file,
// always add it to the end in order to not change the linenumbers of translations!!!
diff --git a/tests/auto/mediaobject/dummy/audiooutput.h b/tests/auto/mediaobject/dummy/audiooutput.h
index 39efb55..47fb9f0 100644
--- a/tests/auto/mediaobject/dummy/audiooutput.h
+++ b/tests/auto/mediaobject/dummy/audiooutput.h
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
#ifndef PHONON_DUMMY_AUDIOOUTPUT_H
#define PHONON_DUMMY_AUDIOOUTPUT_H
diff --git a/tests/auto/mediaobject/dummy/backend.h b/tests/auto/mediaobject/dummy/backend.h
index 20af216..b7302dd 100644
--- a/tests/auto/mediaobject/dummy/backend.h
+++ b/tests/auto/mediaobject/dummy/backend.h
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
#ifndef PHONON_DUMMY_BACKEND_H
#define PHONON_DUMMY_BACKEND_H
diff --git a/tests/auto/mediaobject/dummy/mediaobject.h b/tests/auto/mediaobject/dummy/mediaobject.h
index a87b32f..e4c7978 100644
--- a/tests/auto/mediaobject/dummy/mediaobject.h
+++ b/tests/auto/mediaobject/dummy/mediaobject.h
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
#ifndef PHONON_DUMMY_MEDIAOBJECT_H
#define PHONON_DUMMY_MEDIAOBJECT_H
diff --git a/tests/auto/mediaobject/dummy/videowidget.h b/tests/auto/mediaobject/dummy/videowidget.h
index 2e5a2b8..a8416f9 100644
--- a/tests/auto/mediaobject/dummy/videowidget.h
+++ b/tests/auto/mediaobject/dummy/videowidget.h
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test sutie of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
#ifndef PHONON_DUMMY_VIDEOWIDGET_H
#define PHONON_DUMMY_VIDEOWIDGET_H
diff --git a/tests/auto/qabstractitemmodel/dynamictreemodel.cpp b/tests/auto/qabstractitemmodel/dynamictreemodel.cpp
new file mode 100644
index 0000000..6c3e0cb
--- /dev/null
+++ b/tests/auto/qabstractitemmodel/dynamictreemodel.cpp
@@ -0,0 +1,245 @@
+/*
+ Copyright (c) 2009 Stephen Kelly <steveire@gmail.com>
+
+ This library is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or (at your
+ option) any later version.
+
+ This library is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to the
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+*/
+
+#include "dynamictreemodel.h"
+
+#include <QHash>
+#include <QList>
+#include <QTimer>
+
+#include <QDebug>
+
+#include <kdebug.h>
+
+DynamicTreeModel::DynamicTreeModel(QObject *parent)
+ : QAbstractItemModel(parent),
+ nextId(1)
+{
+}
+
+QModelIndex DynamicTreeModel::index(int row, int column, const QModelIndex &parent) const
+{
+// if (column != 0)
+// return QModelIndex();
+
+
+ if ( column < 0 || row < 0 )
+ return QModelIndex();
+
+ QList<QList<qint64> > childIdColumns = m_childItems.value(parent.internalId());
+
+
+ if (childIdColumns.size() == 0)
+ return QModelIndex();
+
+ if (column >= childIdColumns.size())
+ return QModelIndex();
+
+ QList<qint64> rowIds = childIdColumns.at(column);
+
+ if ( row >= rowIds.size())
+ return QModelIndex();
+
+ qint64 id = rowIds.at(row);
+
+ return createIndex(row, column, reinterpret_cast<void *>(id));
+
+}
+
+qint64 DynamicTreeModel::findParentId(qint64 searchId) const
+{
+ if (searchId <= 0)
+ return -1;
+
+ QHashIterator<qint64, QList<QList<qint64> > > i(m_childItems);
+ while (i.hasNext())
+ {
+ i.next();
+ QListIterator<QList<qint64> > j(i.value());
+ while (j.hasNext())
+ {
+ QList<qint64> l = j.next();
+ if (l.contains(searchId))
+ {
+ return i.key();
+ }
+ }
+ }
+ return -1;
+}
+
+QModelIndex DynamicTreeModel::parent(const QModelIndex &index) const
+{
+ if (!index.isValid())
+ return QModelIndex();
+
+ qint64 searchId = index.internalId();
+ qint64 parentId = findParentId(searchId);
+ // Will never happen for valid index, but what the hey...
+ if (parentId <= 0)
+ return QModelIndex();
+
+ qint64 grandParentId = findParentId(parentId);
+ if (grandParentId < 0)
+ grandParentId = 0;
+
+ int column = 0;
+ QList<qint64> childList = m_childItems.value(grandParentId).at(column);
+
+ int row = childList.indexOf(parentId);
+
+ return createIndex(row, column, reinterpret_cast<void *>(parentId));
+
+}
+
+int DynamicTreeModel::rowCount(const QModelIndex &index ) const
+{
+ QList<QList<qint64> > cols = m_childItems.value(index.internalId());
+
+ if (cols.size() == 0 )
+ return 0;
+
+ if (index.column() > 0)
+ return 0;
+
+ return cols.at(0).size();
+}
+
+int DynamicTreeModel::columnCount(const QModelIndex &index ) const
+{
+// Q_UNUSED(index);
+ return m_childItems.value(index.internalId()).size();
+}
+
+QVariant DynamicTreeModel::data(const QModelIndex &index, int role) const
+{
+ if (!index.isValid())
+ return QVariant();
+
+ if (Qt::DisplayRole == role)
+ {
+ return m_items.value(index.internalId());
+ }
+ return QVariant();
+}
+
+void DynamicTreeModel::clear()
+{
+ m_items.clear();
+ m_childItems.clear();
+ nextId = 1;
+ reset();
+}
+
+
+ModelChangeCommand::ModelChangeCommand( DynamicTreeModel *model, QObject *parent )
+ : QObject(parent), m_model(model), m_numCols(1), m_startRow(-1), m_endRow(-1)
+{
+
+}
+
+QModelIndex ModelChangeCommand::findIndex(QList<int> rows)
+{
+ const int col = 0;
+ QModelIndex parent = QModelIndex();
+ QListIterator<int> i(rows);
+ while (i.hasNext())
+ {
+ parent = m_model->index(i.next(), col, parent);
+ Q_ASSERT(parent.isValid());
+ }
+ return parent;
+}
+
+ModelInsertCommand::ModelInsertCommand(DynamicTreeModel *model, QObject *parent )
+ : ModelChangeCommand(model, parent)
+{
+
+}
+
+void ModelInsertCommand::doCommand()
+{
+ QModelIndex parent = findIndex(m_rowNumbers);
+ m_model->beginInsertRows(parent, m_startRow, m_endRow);
+ qint64 parentId = parent.internalId();
+ for (int row = m_startRow; row <= m_endRow; row++)
+ {
+ for(int col = 0; col < m_numCols; col++ )
+ {
+ if (m_model->m_childItems[parentId].size() <= col)
+ {
+ m_model->m_childItems[parentId].append(QList<qint64>());
+ }
+// QString name = QUuid::createUuid().toString();
+ qint64 id = m_model->newId();
+ QString name = QString::number(id);
+
+ m_model->m_items.insert(id, name);
+ m_model->m_childItems[parentId][col].insert(row, id);
+
+ }
+ }
+ m_model->endInsertRows();
+}
+
+
+ModelMoveCommand::ModelMoveCommand(DynamicTreeModel *model, QObject *parent)
+ : ModelChangeCommand(model, parent)
+{
+
+}
+
+void ModelMoveCommand::doCommand()
+{
+ QModelIndex srcParent = findIndex(m_rowNumbers);
+ QModelIndex destParent = findIndex(m_destRowNumbers);
+
+ if (!m_model->beginMoveRows(srcParent, m_startRow, m_endRow, destParent, m_destRow))
+ {
+ return;
+ }
+
+ for (int column = 0; column < m_numCols; ++column)
+ {
+ QList<qint64> l = m_model->m_childItems.value(srcParent.internalId())[column].mid(m_startRow, m_endRow - m_startRow + 1 );
+
+ for (int i = m_startRow; i <= m_endRow ; i++)
+ {
+ m_model->m_childItems[srcParent.internalId()][column].removeAt(m_startRow);
+ }
+ int d;
+ if (m_destRow < m_startRow)
+ d = m_destRow;
+ else
+ {
+ if (srcParent == destParent)
+ d = m_destRow - (m_endRow - m_startRow + 1);
+ else
+ d = m_destRow - (m_endRow - m_startRow) + 1;
+ }
+
+ foreach(const qint64 id, l)
+ {
+ m_model->m_childItems[destParent.internalId()][column].insert(d++, id);
+ }
+ }
+
+ m_model->endMoveRows();
+}
+
diff --git a/tests/auto/qabstractitemmodel/dynamictreemodel.h b/tests/auto/qabstractitemmodel/dynamictreemodel.h
new file mode 100644
index 0000000..88e293c
--- /dev/null
+++ b/tests/auto/qabstractitemmodel/dynamictreemodel.h
@@ -0,0 +1,141 @@
+/*
+ Copyright (c) 2009 Stephen Kelly <steveire@gmail.com>
+
+ This library is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or (at your
+ option) any later version.
+
+ This library is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to the
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+*/
+
+#ifndef DYNAMICTREEMODEL_H
+#define DYNAMICTREEMODEL_H
+
+#include <QAbstractItemModel>
+
+#include <QHash>
+#include <QList>
+
+#include <QDebug>
+
+#include <kdebug.h>
+
+template<typename T> class QList;
+
+class DynamicTreeModel : public QAbstractItemModel
+{
+ Q_OBJECT
+
+public:
+ DynamicTreeModel(QObject *parent = 0);
+
+ QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
+ QModelIndex parent(const QModelIndex &index) const;
+ int rowCount(const QModelIndex &index = QModelIndex()) const;
+ int columnCount(const QModelIndex &index = QModelIndex()) const;
+
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
+
+ void clear();
+
+protected slots:
+
+ /**
+ Finds the parent id of the string with id @p searchId.
+
+ Returns -1 if not found.
+ */
+ qint64 findParentId(qint64 searchId) const;
+
+private:
+ QHash<qint64, QString> m_items;
+ QHash<qint64, QList<QList<qint64> > > m_childItems;
+ qint64 nextId;
+ qint64 newId() { return nextId++; };
+
+ QModelIndex m_nextParentIndex;
+ int m_nextRow;
+
+ int m_depth;
+ int maxDepth;
+
+ friend class ModelInsertCommand;
+ friend class ModelMoveCommand;
+
+};
+
+
+class ModelChangeCommand : public QObject
+{
+ Q_OBJECT
+public:
+
+ ModelChangeCommand( DynamicTreeModel *model, QObject *parent = 0 );
+
+ virtual ~ModelChangeCommand() {}
+
+ void setAncestorRowNumbers(QList<int> rowNumbers) { m_rowNumbers = rowNumbers; }
+
+ QModelIndex findIndex(QList<int> rows);
+
+ void setStartRow(int row) { m_startRow = row; }
+
+ void setEndRow(int row) { m_endRow = row; }
+
+ void setNumCols(int cols) { m_numCols = cols; }
+
+ virtual void doCommand() = 0;
+
+protected:
+ DynamicTreeModel* m_model;
+ QList<int> m_rowNumbers;
+ int m_numCols;
+ int m_startRow;
+ int m_endRow;
+
+};
+
+typedef QList<ModelChangeCommand*> ModelChangeCommandList;
+
+class ModelInsertCommand : public ModelChangeCommand
+{
+ Q_OBJECT
+
+public:
+
+ ModelInsertCommand(DynamicTreeModel *model, QObject *parent = 0 );
+ virtual ~ModelInsertCommand() {}
+
+ virtual void doCommand();
+};
+
+class ModelMoveCommand : public ModelChangeCommand
+{
+ Q_OBJECT
+public:
+ ModelMoveCommand(DynamicTreeModel *model, QObject *parent);
+
+ virtual ~ModelMoveCommand() {}
+
+ virtual void doCommand();
+
+ void setDestAncestors( QList<int> rows ) { m_destRowNumbers = rows; }
+
+ void setDestRow(int row) { m_destRow = row; }
+
+protected:
+ QList<int> m_destRowNumbers;
+ int m_destRow;
+};
+
+
+#endif
diff --git a/tests/auto/qabstractitemmodel/qabstractitemmodel.pro b/tests/auto/qabstractitemmodel/qabstractitemmodel.pro
index 5ad1020..84ed5a2 100644
--- a/tests/auto/qabstractitemmodel/qabstractitemmodel.pro
+++ b/tests/auto/qabstractitemmodel/qabstractitemmodel.pro
@@ -1,3 +1,6 @@
load(qttest_p4)
-SOURCES += tst_qabstractitemmodel.cpp
+SOURCES += tst_qabstractitemmodel.cpp dynamictreemodel.cpp
+HEADERS += dynamictreemodel.h
+
QT = core
+
diff --git a/tests/auto/qabstractitemmodel/tst_qabstractitemmodel.cpp b/tests/auto/qabstractitemmodel/tst_qabstractitemmodel.cpp
index e99ce06..9c83474 100644
--- a/tests/auto/qabstractitemmodel/tst_qabstractitemmodel.cpp
+++ b/tests/auto/qabstractitemmodel/tst_qabstractitemmodel.cpp
@@ -46,6 +46,10 @@
//TESTED_CLASS=QAbstractListModel QAbstractTableModel
//TESTED_FILES=
+#include "dynamictreemodel.h"
+
+Q_DECLARE_METATYPE(QModelIndex)
+
/*!
Note that this doesn't test models, but any functionality that QAbstractItemModel shoudl provide
*/
@@ -86,6 +90,30 @@ private slots:
void complexChangesWithPersistent();
+ void testMoveSameParentUp_data();
+ void testMoveSameParentUp();
+
+ void testMoveSameParentDown_data();
+ void testMoveSameParentDown();
+
+ void testMoveToGrandParent_data();
+ void testMoveToGrandParent();
+
+ void testMoveToSibling_data();
+ void testMoveToSibling();
+
+ void testMoveToUncle_data();
+ void testMoveToUncle();
+
+ void testMoveToDescendants();
+
+ void testMoveWithinOwnRange_data();
+ void testMoveWithinOwnRange();
+
+
+private:
+ DynamicTreeModel *m_model;
+
};
/*!
@@ -242,7 +270,20 @@ void tst_QAbstractItemModel::cleanupTestCase()
void tst_QAbstractItemModel::init()
{
-
+ m_model = new DynamicTreeModel(this);
+
+ ModelInsertCommand *insertCommand = new ModelInsertCommand(m_model, this);
+ insertCommand->setNumCols(4);
+ insertCommand->setStartRow(0);
+ insertCommand->setEndRow(9);
+ insertCommand->doCommand();
+
+ insertCommand = new ModelInsertCommand(m_model, this);
+ insertCommand->setAncestorRowNumbers(QList<int>() << 5);
+ insertCommand->setNumCols(4);
+ insertCommand->setStartRow(0);
+ insertCommand->setEndRow(9);
+ insertCommand->doCommand();
}
void tst_QAbstractItemModel::cleanup()
@@ -815,5 +856,803 @@ void tst_QAbstractItemModel::complexChangesWithPersistent()
}
+void tst_QAbstractItemModel::testMoveSameParentDown_data()
+{
+ QTest::addColumn<int>("startRow");
+ QTest::addColumn<int>("endRow");
+ QTest::addColumn<int>("destRow");
+
+ // Move from the start to the middle
+ QTest::newRow("move01") << 0 << 2 << 8;
+ // Move from the start to the end
+ QTest::newRow("move02") << 0 << 2 << 10;
+ // Move from the middle to the middle
+ QTest::newRow("move03") << 3 << 5 << 8;
+ // Move from the middle to the end
+ QTest::newRow("move04") << 3 << 5 << 10;
+}
+
+void tst_QAbstractItemModel::testMoveSameParentDown()
+{
+ QFETCH( int, startRow);
+ QFETCH( int, endRow);
+ QFETCH( int, destRow);
+
+ QList<QPersistentModelIndex> persistentList;
+ QModelIndexList indexList;
+
+ for (int column = 0; column < m_model->columnCount(); ++column)
+ {
+ for (int row= 0; row < m_model->rowCount(); ++row)
+ {
+ QModelIndex idx = m_model->index(row, column);
+ QVERIFY(idx.isValid());
+ indexList << idx;
+ persistentList << QPersistentModelIndex(idx);
+ }
+ }
+
+ QModelIndex parent = m_model->index(5, 0);
+ for (int column = 0; column < m_model->columnCount(); ++column)
+ {
+ for (int row= 0; row < m_model->rowCount(parent); ++row)
+ {
+ QModelIndex idx = m_model->index(row, column, parent);
+ QVERIFY(idx.isValid());
+ indexList << idx;
+ persistentList << QPersistentModelIndex(idx);
+ }
+ }
+
+ QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
+ QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
+
+ ModelMoveCommand *moveCommand = new ModelMoveCommand(m_model, this);
+ moveCommand->setNumCols(4);
+ moveCommand->setStartRow(startRow);
+ moveCommand->setEndRow(endRow);
+ moveCommand->setDestRow(destRow);
+ moveCommand->doCommand();
+
+ QVariantList beforeSignal = beforeSpy.takeAt(0);
+ QVariantList afterSignal = afterSpy.takeAt(0);
+
+ QCOMPARE(beforeSignal.size(), 5);
+ QCOMPARE(beforeSignal.at(0).value<QModelIndex>(), QModelIndex());
+ QCOMPARE(beforeSignal.at(1).toInt(), startRow);
+ QCOMPARE(beforeSignal.at(2).toInt(), endRow);
+ QCOMPARE(beforeSignal.at(3).value<QModelIndex>(), QModelIndex());
+ QCOMPARE(beforeSignal.at(4).toInt(), destRow);
+
+ QCOMPARE(afterSignal.size(), 5);
+ QCOMPARE(afterSignal.at(0).value<QModelIndex>(), QModelIndex());
+ QCOMPARE(afterSignal.at(1).toInt(), startRow);
+ QCOMPARE(afterSignal.at(2).toInt(), endRow);
+ QCOMPARE(afterSignal.at(3).value<QModelIndex>(), QModelIndex());
+ QCOMPARE(afterSignal.at(4).toInt(), destRow);
+
+ for (int i = 0; i < indexList.size(); i++)
+ {
+ QModelIndex idx = indexList.at(i);
+ QModelIndex persistentIndex = persistentList.at(i);
+ if (idx.parent() == QModelIndex())
+ {
+ int row = idx.row();
+ if ( row >= startRow)
+ {
+ if (row <= endRow)
+ {
+ QCOMPARE(row + destRow - endRow - 1, persistentIndex.row() );
+ QCOMPARE(idx.column(), persistentIndex.column());
+ QCOMPARE(idx.parent(), persistentIndex.parent());
+ QCOMPARE(idx.model(), persistentIndex.model());
+ } else if ( row < destRow)
+ {
+ QCOMPARE(row - (endRow - startRow + 1), persistentIndex.row() );
+ QCOMPARE(idx.column(), persistentIndex.column());
+ QCOMPARE(idx.parent(), persistentIndex.parent());
+ QCOMPARE(idx.model(), persistentIndex.model());
+ } else
+ {
+ QCOMPARE(idx, persistentIndex);
+ }
+ } else
+ {
+ QCOMPARE(idx, persistentIndex);
+ }
+ } else
+ {
+ QCOMPARE(idx, persistentIndex);
+ }
+ }
+}
+
+void tst_QAbstractItemModel::testMoveSameParentUp_data()
+{
+ QTest::addColumn<int>("startRow");
+ QTest::addColumn<int>("endRow");
+ QTest::addColumn<int>("destRow");
+
+ // Move from the middle to the start
+ QTest::newRow("move01") << 5 << 7 << 0;
+ // Move from the end to the start
+ QTest::newRow("move02") << 8 << 9 << 0;
+ // Move from the middle to the middle
+ QTest::newRow("move03") << 5 << 7 << 2;
+ // Move from the end to the middle
+ QTest::newRow("move04") << 8 << 9 << 5;
+}
+
+void tst_QAbstractItemModel::testMoveSameParentUp()
+{
+
+ QFETCH( int, startRow);
+ QFETCH( int, endRow);
+ QFETCH( int, destRow);
+
+ QList<QPersistentModelIndex> persistentList;
+ QModelIndexList indexList;
+
+ for (int column = 0; column < m_model->columnCount(); ++column)
+ {
+ for (int row= 0; row < m_model->rowCount(); ++row)
+ {
+ QModelIndex idx = m_model->index(row, column);
+ QVERIFY(idx.isValid());
+ indexList << idx;
+ persistentList << QPersistentModelIndex(idx);
+ }
+ }
+
+ QModelIndex parent = m_model->index(2, 0);
+ for (int column = 0; column < m_model->columnCount(); ++column)
+ {
+ for (int row= 0; row < m_model->rowCount(parent); ++row)
+ {
+ QModelIndex idx = m_model->index(row, column, parent);
+ QVERIFY(idx.isValid());
+ indexList << idx;
+ persistentList << QPersistentModelIndex(idx);
+ }
+ }
+
+ QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
+ QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
+
+
+ ModelMoveCommand *moveCommand = new ModelMoveCommand(m_model, this);
+ moveCommand->setNumCols(4);
+ moveCommand->setStartRow(startRow);
+ moveCommand->setEndRow(endRow);
+ moveCommand->setDestRow(destRow);
+ moveCommand->doCommand();
+
+ QVariantList beforeSignal = beforeSpy.takeAt(0);
+ QVariantList afterSignal = afterSpy.takeAt(0);
+
+ QCOMPARE(beforeSignal.size(), 5);
+ QCOMPARE(beforeSignal.at(0).value<QModelIndex>(), QModelIndex());
+ QCOMPARE(beforeSignal.at(1).toInt(), startRow);
+ QCOMPARE(beforeSignal.at(2).toInt(), endRow);
+ QCOMPARE(beforeSignal.at(3).value<QModelIndex>(), QModelIndex());
+ QCOMPARE(beforeSignal.at(4).toInt(), destRow);
+
+ QCOMPARE(afterSignal.size(), 5);
+ QCOMPARE(afterSignal.at(0).value<QModelIndex>(), QModelIndex());
+ QCOMPARE(afterSignal.at(1).toInt(), startRow);
+ QCOMPARE(afterSignal.at(2).toInt(), endRow);
+ QCOMPARE(afterSignal.at(3).value<QModelIndex>(), QModelIndex());
+ QCOMPARE(afterSignal.at(4).toInt(), destRow);
+
+
+ for (int i = 0; i < indexList.size(); i++)
+ {
+ QModelIndex idx = indexList.at(i);
+ QModelIndex persistentIndex = persistentList.at(i);
+ if (idx.parent() == QModelIndex())
+ {
+ int row = idx.row();
+ if ( row >= destRow)
+ {
+ if (row < startRow)
+ {
+ QCOMPARE(row + endRow - startRow + 1, persistentIndex.row() );
+ QCOMPARE(idx.column(), persistentIndex.column());
+ QCOMPARE(idx.parent(), persistentIndex.parent());
+ QCOMPARE(idx.model(), persistentIndex.model());
+ } else if ( row <= endRow)
+ {
+ QCOMPARE(row + destRow - startRow, persistentIndex.row() );
+ QCOMPARE(idx.column(), persistentIndex.column());
+ QCOMPARE(idx.parent(), persistentIndex.parent());
+ QCOMPARE(idx.model(), persistentIndex.model());
+ } else
+ {
+ QCOMPARE(idx, persistentIndex);
+ }
+ } else
+ {
+ QCOMPARE(idx, persistentIndex);
+ }
+ } else
+ {
+ QCOMPARE(idx, persistentIndex);
+ }
+ }
+}
+
+void tst_QAbstractItemModel::testMoveToGrandParent_data()
+{
+ QTest::addColumn<int>("startRow");
+ QTest::addColumn<int>("endRow");
+ QTest::addColumn<int>("destRow");
+
+ // Move from the start to the middle
+ QTest::newRow("move01") << 0 << 2 << 8;
+ // Move from the start to the end
+ QTest::newRow("move02") << 0 << 2 << 10;
+ // Move from the middle to the middle
+ QTest::newRow("move03") << 3 << 5 << 8;
+ // Move from the middle to the end
+ QTest::newRow("move04") << 3 << 5 << 10;
+
+ // Move from the middle to the start
+ QTest::newRow("move05") << 5 << 7 << 0;
+ // Move from the end to the start
+ QTest::newRow("move06") << 8 << 9 << 0;
+ // Move from the middle to the middle
+ QTest::newRow("move07") << 5 << 7 << 2;
+ // Move from the end to the middle
+ QTest::newRow("move08") << 8 << 9 << 5;
+
+ // Moving to the same row in a different parent doesn't confuse things.
+ QTest::newRow("move09") << 8 << 8 << 8;
+
+ // Moving to the row of my parent and its neighbours doesn't confuse things
+ QTest::newRow("move09") << 8 << 8 << 4;
+ QTest::newRow("move10") << 8 << 8 << 5;
+ QTest::newRow("move11") << 8 << 8 << 6;
+
+ // Moving everything from one parent to another
+ QTest::newRow("move12") << 0 << 9 << 10;
+}
+
+void tst_QAbstractItemModel::testMoveToGrandParent()
+{
+
+ QFETCH( int, startRow);
+ QFETCH( int, endRow);
+ QFETCH( int, destRow);
+
+ QList<QPersistentModelIndex> persistentList;
+ QModelIndexList indexList;
+ QModelIndexList parentsList;
+
+ for (int column = 0; column < m_model->columnCount(); ++column)
+ {
+ for (int row= 0; row < m_model->rowCount(); ++row)
+ {
+ QModelIndex idx = m_model->index(row, column);
+ QVERIFY(idx.isValid());
+ indexList << idx;
+ parentsList << idx.parent();
+ persistentList << QPersistentModelIndex(idx);
+ }
+ }
+
+ QModelIndex sourceIndex = m_model->index(5, 0);
+ for (int column = 0; column < m_model->columnCount(); ++column)
+ {
+ for (int row= 0; row < m_model->rowCount(sourceIndex); ++row)
+ {
+ QModelIndex idx = m_model->index(row, column, sourceIndex);
+ QVERIFY(idx.isValid());
+ indexList << idx;
+ parentsList << idx.parent();
+ persistentList << QPersistentModelIndex(idx);
+ }
+ }
+
+ QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
+ QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
+
+
+ ModelMoveCommand *moveCommand = new ModelMoveCommand(m_model, this);
+ moveCommand->setAncestorRowNumbers(QList<int>() << 5);
+ moveCommand->setNumCols(4);
+ moveCommand->setStartRow(startRow);
+ moveCommand->setEndRow(endRow);
+ moveCommand->setDestRow(destRow);
+ moveCommand->doCommand();
+
+ QVariantList beforeSignal = beforeSpy.takeAt(0);
+ QVariantList afterSignal = afterSpy.takeAt(0);
+
+ QCOMPARE(beforeSignal.size(), 5);
+ QCOMPARE(beforeSignal.at(0).value<QModelIndex>(), sourceIndex);
+ QCOMPARE(beforeSignal.at(1).toInt(), startRow);
+ QCOMPARE(beforeSignal.at(2).toInt(), endRow);
+ QCOMPARE(beforeSignal.at(3).value<QModelIndex>(), QModelIndex());
+ QCOMPARE(beforeSignal.at(4).toInt(), destRow);
+
+ QCOMPARE(afterSignal.size(), 5);
+ QCOMPARE(afterSignal.at(0).value<QModelIndex>(), sourceIndex);
+ QCOMPARE(afterSignal.at(1).toInt(), startRow);
+ QCOMPARE(afterSignal.at(2).toInt(), endRow);
+ QCOMPARE(afterSignal.at(3).value<QModelIndex>(), QModelIndex());
+ QCOMPARE(afterSignal.at(4).toInt(), destRow);
+
+ for (int i = 0; i < indexList.size(); i++)
+ {
+ QModelIndex idx = indexList.at(i);
+ QModelIndex idxParent = parentsList.at(i);
+ QModelIndex persistentIndex = persistentList.at(i);
+ int row = idx.row();
+ if (idxParent == QModelIndex())
+ {
+ if ( row >= destRow)
+ {
+ QCOMPARE(row + endRow - startRow + 1, persistentIndex.row() );
+ QCOMPARE(idx.column(), persistentIndex.column());
+ QCOMPARE(idxParent, persistentIndex.parent());
+ QCOMPARE(idx.model(), persistentIndex.model());
+ } else
+ {
+ QCOMPARE(idx, persistentIndex);
+ }
+ } else
+ {
+ if (row < startRow)
+ {
+ QCOMPARE(idx, persistentIndex);
+ } else if (row <= endRow)
+ {
+ QCOMPARE(row + destRow - startRow, persistentIndex.row() );
+ QCOMPARE(idx.column(), persistentIndex.column());
+ QCOMPARE(QModelIndex(), persistentIndex.parent());
+ QCOMPARE(idx.model(), persistentIndex.model());
+ } else {
+ QCOMPARE(row - (endRow - startRow + 1), persistentIndex.row() );
+ QCOMPARE(idx.column(), persistentIndex.column());
+
+ if (idxParent.row() >= destRow)
+ {
+ QModelIndex adjustedParent;
+ adjustedParent = idxParent.sibling( idxParent.row() + endRow - startRow + 1, idxParent.column());
+ QCOMPARE(adjustedParent, persistentIndex.parent());
+ } else
+ {
+ QCOMPARE(idxParent, persistentIndex.parent());
+ }
+ QCOMPARE(idx.model(), persistentIndex.model());
+ }
+ }
+ }
+}
+
+void tst_QAbstractItemModel::testMoveToSibling_data()
+{
+ QTest::addColumn<int>("startRow");
+ QTest::addColumn<int>("endRow");
+ QTest::addColumn<int>("destRow");
+
+ // Move from the start to the middle
+ QTest::newRow("move01") << 0 << 2 << 8;
+ // Move from the start to the end
+ QTest::newRow("move02") << 0 << 2 << 10;
+ // Move from the middle to the middle
+ QTest::newRow("move03") << 2 << 4 << 8;
+ // Move from the middle to the end
+ QTest::newRow("move04") << 2 << 4 << 10;
+
+ // Move from the middle to the start
+ QTest::newRow("move05") << 8 << 8 << 0;
+ // Move from the end to the start
+ QTest::newRow("move06") << 8 << 9 << 0;
+ // Move from the middle to the middle
+ QTest::newRow("move07") << 6 << 8 << 2;
+ // Move from the end to the middle
+ QTest::newRow("move08") << 8 << 9 << 5;
+
+ // Moving to the same row in a different parent doesn't confuse things.
+ QTest::newRow("move09") << 8 << 8 << 8;
+
+ // Moving to the row of my target and its neighbours doesn't confuse things
+ QTest::newRow("move09") << 8 << 8 << 4;
+ QTest::newRow("move10") << 8 << 8 << 5;
+ QTest::newRow("move11") << 8 << 8 << 6;
+}
+
+void tst_QAbstractItemModel::testMoveToSibling()
+{
+
+ QFETCH( int, startRow);
+ QFETCH( int, endRow);
+ QFETCH( int, destRow);
+
+ QList<QPersistentModelIndex> persistentList;
+ QModelIndexList indexList;
+ QModelIndexList parentsList;
+
+ const int column = 0;
+
+ for (int i= 0; i < m_model->rowCount(); ++i)
+ {
+ QModelIndex idx = m_model->index(i, column);
+ QVERIFY(idx.isValid());
+ indexList << idx;
+ parentsList << idx.parent();
+ persistentList << QPersistentModelIndex(idx);
+ }
+
+ QModelIndex destIndex = m_model->index(5, 0);
+ QModelIndex sourceIndex;
+ for (int i= 0; i < m_model->rowCount(destIndex); ++i)
+ {
+ QModelIndex idx = m_model->index(i, column, destIndex);
+ QVERIFY(idx.isValid());
+ indexList << idx;
+ parentsList << idx.parent();
+ persistentList << QPersistentModelIndex(idx);
+ }
+
+ QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
+ QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
+
+
+ ModelMoveCommand *moveCommand = new ModelMoveCommand(m_model, this);
+ moveCommand->setNumCols(4);
+ moveCommand->setStartRow(startRow);
+ moveCommand->setEndRow(endRow);
+ moveCommand->setDestAncestors(QList<int>() << 5);
+ moveCommand->setDestRow(destRow);
+ moveCommand->doCommand();
+
+ QVariantList beforeSignal = beforeSpy.takeAt(0);
+ QVariantList afterSignal = afterSpy.takeAt(0);
+
+ QCOMPARE(beforeSignal.size(), 5);
+ QCOMPARE(beforeSignal.at(0).value<QModelIndex>(), sourceIndex);
+ QCOMPARE(beforeSignal.at(1).toInt(), startRow);
+ QCOMPARE(beforeSignal.at(2).toInt(), endRow);
+ QCOMPARE(beforeSignal.at(3).value<QModelIndex>(), destIndex);
+ QCOMPARE(beforeSignal.at(4).toInt(), destRow);
+
+ QCOMPARE(afterSignal.size(), 5);
+ QCOMPARE(afterSignal.at(0).value<QModelIndex>(), sourceIndex);
+ QCOMPARE(afterSignal.at(1).toInt(), startRow);
+ QCOMPARE(afterSignal.at(2).toInt(), endRow);
+ QCOMPARE(afterSignal.at(3).value<QModelIndex>(), destIndex);
+ QCOMPARE(afterSignal.at(4).toInt(), destRow);
+
+ for (int i = 0; i < indexList.size(); i++)
+ {
+ QModelIndex idx = indexList.at(i);
+ QModelIndex idxParent = parentsList.at(i);
+ QModelIndex persistentIndex = persistentList.at(i);
+
+ QModelIndex adjustedDestination = destIndex.sibling(destIndex.row() - (endRow - startRow + 1), destIndex.column());
+ int row = idx.row();
+ if (idxParent == destIndex)
+ {
+ if ( row >= destRow)
+ {
+ QCOMPARE(row + endRow - startRow + 1, persistentIndex.row() );
+ QCOMPARE(idx.column(), persistentIndex.column());
+ if (idxParent.row() > startRow)
+ {
+ QCOMPARE(adjustedDestination, persistentIndex.parent());
+ } else {
+ QCOMPARE(destIndex, persistentIndex.parent());
+ }
+ QCOMPARE(idx.model(), persistentIndex.model());
+ } else
+ {
+ QCOMPARE(idx, persistentIndex);
+ }
+ } else
+ {
+ if (row < startRow)
+ {
+ QCOMPARE(idx, persistentIndex);
+ } else if (row <= endRow)
+ {
+ QCOMPARE(row + destRow - startRow, persistentIndex.row() );
+ QCOMPARE(idx.column(), persistentIndex.column());
+ if (destIndex.row() > startRow)
+ {
+ QCOMPARE(adjustedDestination, persistentIndex.parent());
+ } else {
+ QCOMPARE(destIndex, persistentIndex.parent());
+ }
+
+ QCOMPARE(idx.model(), persistentIndex.model());
+
+ } else {
+ QCOMPARE(row - (endRow - startRow + 1), persistentIndex.row() );
+ QCOMPARE(idx.column(), persistentIndex.column());
+ QCOMPARE(idxParent, persistentIndex.parent());
+ QCOMPARE(idx.model(), persistentIndex.model());
+ }
+ }
+ }
+}
+
+void tst_QAbstractItemModel::testMoveToUncle_data()
+{
+
+ QTest::addColumn<int>("startRow");
+ QTest::addColumn<int>("endRow");
+ QTest::addColumn<int>("destRow");
+
+ // Move from the start to the middle
+ QTest::newRow("move01") << 0 << 2 << 8;
+ // Move from the start to the end
+ QTest::newRow("move02") << 0 << 2 << 10;
+ // Move from the middle to the middle
+ QTest::newRow("move03") << 3 << 5 << 8;
+ // Move from the middle to the end
+ QTest::newRow("move04") << 3 << 5 << 10;
+
+ // Move from the middle to the start
+ QTest::newRow("move05") << 5 << 7 << 0;
+ // Move from the end to the start
+ QTest::newRow("move06") << 8 << 9 << 0;
+ // Move from the middle to the middle
+ QTest::newRow("move07") << 5 << 7 << 2;
+ // Move from the end to the middle
+ QTest::newRow("move08") << 8 << 9 << 5;
+
+ // Moving to the same row in a different parent doesn't confuse things.
+ QTest::newRow("move09") << 8 << 8 << 8;
+
+ // Moving to the row of my parent and its neighbours doesn't confuse things
+ QTest::newRow("move09") << 8 << 8 << 4;
+ QTest::newRow("move10") << 8 << 8 << 5;
+ QTest::newRow("move11") << 8 << 8 << 6;
+
+ // Moving everything from one parent to another
+ QTest::newRow("move12") << 0 << 9 << 10;
+}
+
+void tst_QAbstractItemModel::testMoveToUncle()
+{
+ // Need to have some extra rows available.
+ ModelInsertCommand *insertCommand = new ModelInsertCommand(m_model, this);
+ insertCommand->setAncestorRowNumbers(QList<int>() << 9);
+ insertCommand->setNumCols(4);
+ insertCommand->setStartRow(0);
+ insertCommand->setEndRow(9);
+ insertCommand->doCommand();
+
+ QFETCH( int, startRow);
+ QFETCH( int, endRow);
+ QFETCH( int, destRow);
+
+ QList<QPersistentModelIndex> persistentList;
+ QModelIndexList indexList;
+ QModelIndexList parentsList;
+
+ const int column = 0;
+
+ QModelIndex sourceIndex = m_model->index(9, 0);
+ for (int i= 0; i < m_model->rowCount(sourceIndex); ++i)
+ {
+ QModelIndex idx = m_model->index(i, column, sourceIndex);
+ QVERIFY(idx.isValid());
+ indexList << idx;
+ parentsList << idx.parent();
+ persistentList << QPersistentModelIndex(idx);
+ }
+
+ QModelIndex destIndex = m_model->index(5, 0);
+ for (int i= 0; i < m_model->rowCount(destIndex); ++i)
+ {
+ QModelIndex idx = m_model->index(i, column, destIndex);
+ QVERIFY(idx.isValid());
+ indexList << idx;
+ parentsList << idx.parent();
+ persistentList << QPersistentModelIndex(idx);
+ }
+
+ QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
+ QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
+
+ ModelMoveCommand *moveCommand = new ModelMoveCommand(m_model, this);
+ moveCommand->setAncestorRowNumbers(QList<int>() << 9);
+ moveCommand->setNumCols(4);
+ moveCommand->setStartRow(startRow);
+ moveCommand->setEndRow(endRow);
+ moveCommand->setDestAncestors(QList<int>() << 5);
+ moveCommand->setDestRow(destRow);
+ moveCommand->doCommand();
+
+ QVariantList beforeSignal = beforeSpy.takeAt(0);
+ QVariantList afterSignal = afterSpy.takeAt(0);
+
+ QCOMPARE(beforeSignal.size(), 5);
+ QCOMPARE(beforeSignal.at(0).value<QModelIndex>(), sourceIndex);
+ QCOMPARE(beforeSignal.at(1).toInt(), startRow);
+ QCOMPARE(beforeSignal.at(2).toInt(), endRow);
+ QCOMPARE(beforeSignal.at(3).value<QModelIndex>(), destIndex);
+ QCOMPARE(beforeSignal.at(4).toInt(), destRow);
+
+ QCOMPARE(afterSignal.size(), 5);
+ QCOMPARE(afterSignal.at(0).value<QModelIndex>(), sourceIndex);
+ QCOMPARE(afterSignal.at(1).toInt(), startRow);
+ QCOMPARE(afterSignal.at(2).toInt(), endRow);
+ QCOMPARE(afterSignal.at(3).value<QModelIndex>(), destIndex);
+ QCOMPARE(afterSignal.at(4).toInt(), destRow);
+
+ for (int i = 0; i < indexList.size(); i++)
+ {
+ QModelIndex idx = indexList.at(i);
+ QModelIndex idxParent = parentsList.at(i);
+ QModelIndex persistentIndex = persistentList.at(i);
+
+ int row = idx.row();
+ if (idxParent == destIndex)
+ {
+ if ( row >= destRow)
+ {
+ QCOMPARE(row + endRow - startRow + 1, persistentIndex.row() );
+ QCOMPARE(idx.column(), persistentIndex.column());
+ QCOMPARE(destIndex, persistentIndex.parent());
+ QCOMPARE(idx.model(), persistentIndex.model());
+ } else
+ {
+ QCOMPARE(idx, persistentIndex);
+ }
+ } else
+ {
+ if (row < startRow)
+ {
+ QCOMPARE(idx, persistentIndex);
+ } else if (row <= endRow)
+ {
+ QCOMPARE(row + destRow - startRow, persistentIndex.row() );
+ QCOMPARE(idx.column(), persistentIndex.column());
+ QCOMPARE(destIndex, persistentIndex.parent());
+ QCOMPARE(idx.model(), persistentIndex.model());
+
+ } else {
+ QCOMPARE(row - (endRow - startRow + 1), persistentIndex.row() );
+ QCOMPARE(idx.column(), persistentIndex.column());
+ QCOMPARE(idxParent, persistentIndex.parent());
+ QCOMPARE(idx.model(), persistentIndex.model());
+ }
+ }
+ }
+}
+
+void tst_QAbstractItemModel::testMoveToDescendants()
+{
+ // Attempt to move a row to its ancestors depth rows deep.
+ const int depth = 6;
+
+ // Need to have some extra rows available in a tree.
+ QList<int> rows;
+ ModelInsertCommand *insertCommand;
+ for (int i = 0; i < depth; i++)
+ {
+ insertCommand = new ModelInsertCommand(m_model, this);
+ insertCommand->setAncestorRowNumbers(rows);
+ insertCommand->setNumCols(4);
+ insertCommand->setStartRow(0);
+ insertCommand->setEndRow(9);
+ insertCommand->doCommand();
+ rows << 9;
+ }
+
+ QList<QPersistentModelIndex> persistentList;
+ QModelIndexList indexList;
+ QModelIndexList parentsList;
+
+ const int column = 0;
+
+ QModelIndex sourceIndex = m_model->index(9, 0);
+ for (int i= 0; i < m_model->rowCount(sourceIndex); ++i)
+ {
+ QModelIndex idx = m_model->index(i, column, sourceIndex);
+ QVERIFY(idx.isValid());
+ indexList << idx;
+ parentsList << idx.parent();
+ persistentList << QPersistentModelIndex(idx);
+ }
+
+ QModelIndex destIndex = m_model->index(5, 0);
+ for (int i= 0; i < m_model->rowCount(destIndex); ++i)
+ {
+ QModelIndex idx = m_model->index(i, column, destIndex);
+ QVERIFY(idx.isValid());
+ indexList << idx;
+ parentsList << idx.parent();
+ persistentList << QPersistentModelIndex(idx);
+ }
+
+ QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
+ QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
+
+ ModelMoveCommand *moveCommand;
+ QList<int> ancestors;
+ while (ancestors.size() < depth)
+ {
+ ancestors << 9;
+ for (int row = 0; row <= 9; row++)
+ {
+ moveCommand = new ModelMoveCommand(m_model, this);
+ moveCommand->setNumCols(4);
+ moveCommand->setStartRow(9);
+ moveCommand->setEndRow(9);
+ moveCommand->setDestAncestors(ancestors);
+ moveCommand->setDestRow(row);
+ moveCommand->doCommand();
+
+ QVERIFY(beforeSpy.size() == 0);
+ QVERIFY(afterSpy.size() == 0);
+ }
+ }
+}
+
+void tst_QAbstractItemModel::testMoveWithinOwnRange_data()
+{
+ QTest::addColumn<int>("startRow");
+ QTest::addColumn<int>("endRow");
+ QTest::addColumn<int>("destRow");
+
+ QTest::newRow("move01") << 0 << 0 << 0;
+ QTest::newRow("move02") << 0 << 0 << 1;
+ QTest::newRow("move03") << 0 << 5 << 0;
+ QTest::newRow("move04") << 0 << 5 << 1;
+ QTest::newRow("move05") << 0 << 5 << 2;
+ QTest::newRow("move06") << 0 << 5 << 3;
+ QTest::newRow("move07") << 0 << 5 << 4;
+ QTest::newRow("move08") << 0 << 5 << 5;
+ QTest::newRow("move09") << 0 << 5 << 6;
+ QTest::newRow("move08") << 3 << 5 << 5;
+ QTest::newRow("move08") << 3 << 5 << 6;
+ QTest::newRow("move09") << 4 << 5 << 5;
+ QTest::newRow("move10") << 4 << 5 << 6;
+ QTest::newRow("move11") << 5 << 5 << 5;
+ QTest::newRow("move12") << 5 << 5 << 6;
+ QTest::newRow("move13") << 5 << 9 << 9;
+ QTest::newRow("move14") << 5 << 9 << 10;
+ QTest::newRow("move15") << 6 << 9 << 9;
+ QTest::newRow("move16") << 6 << 9 << 10;
+ QTest::newRow("move17") << 7 << 9 << 9;
+ QTest::newRow("move18") << 7 << 9 << 10;
+ QTest::newRow("move19") << 8 << 9 << 9;
+ QTest::newRow("move20") << 8 << 9 << 10;
+ QTest::newRow("move21") << 9 << 9 << 9;
+ QTest::newRow("move22") << 0 << 9 << 10;
+
+}
+
+void tst_QAbstractItemModel::testMoveWithinOwnRange()
+{
+
+ QFETCH( int, startRow);
+ QFETCH( int, endRow);
+ QFETCH( int, destRow);
+
+
+ QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
+ QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
+
+ ModelMoveCommand *moveCommand = new ModelMoveCommand(m_model, this);
+ moveCommand->setNumCols(4);
+ moveCommand->setStartRow(startRow);
+ moveCommand->setEndRow(endRow);
+ moveCommand->setDestRow(destRow);
+ moveCommand->doCommand();
+
+ QVERIFY(beforeSpy.size() == 0);
+ QVERIFY(afterSpy.size() == 0);
+
+
+}
+
+
+
QTEST_MAIN(tst_QAbstractItemModel)
#include "tst_qabstractitemmodel.moc"
diff --git a/tests/auto/qbytearray/tst_qbytearray.cpp b/tests/auto/qbytearray/tst_qbytearray.cpp
index 4ec02bc..7951864 100644
--- a/tests/auto/qbytearray/tst_qbytearray.cpp
+++ b/tests/auto/qbytearray/tst_qbytearray.cpp
@@ -90,6 +90,8 @@ private slots:
void split();
void base64_data();
void base64();
+ void fromBase64_data();
+ void fromBase64();
void qvsnprintf();
void qstrlen();
void qstrnlen();
@@ -460,6 +462,10 @@ void tst_QByteArray::base64_data()
for (int i = 0; i < 256; ++i)
ba[i] = i;
QTest::newRow("f") << ba << QByteArray("AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/w==");
+
+ QTest::newRow("g") << QByteArray("foo\0bar", 7) << QByteArray("Zm9vAGJhcg==");
+ QTest::newRow("h") << QByteArray("f\xd1oo\x9cbar") << QByteArray("ZtFvb7py");
+ QTest::newRow("i") << QByteArray("\"\0\0\0\0\0\0\"", 8) << QByteArray("IgAAAAAAACI=");
}
@@ -475,6 +481,54 @@ void tst_QByteArray::base64()
QCOMPARE(arr64, base64);
}
+//different from the previous test as the input are invalid
+void tst_QByteArray::fromBase64_data()
+{
+ QTest::addColumn<QByteArray>("rawdata");
+ QTest::addColumn<QByteArray>("base64");
+
+ QTest::newRow("1") << QByteArray("") << QByteArray(" ");
+ QTest::newRow("2") << QByteArray("1") << QByteArray("MQ");
+ QTest::newRow("3") << QByteArray("12") << QByteArray("MTI ");
+ QTest::newRow("4") << QByteArray("123") << QByteArray("M=TIz");
+ QTest::newRow("5") << QByteArray("1234") << QByteArray("MTI zN A ");
+ QTest::newRow("6") << QByteArray("\n") << QByteArray("Cg");
+ QTest::newRow("7") << QByteArray("a\n") << QByteArray("======YQo=");
+ QTest::newRow("8") << QByteArray("ab\n") << QByteArray("Y\nWIK");
+ QTest::newRow("9") << QByteArray("abc\n") << QByteArray("YWJjCg==");
+ QTest::newRow("a") << QByteArray("abcd\n") << QByteArray("YWJ\1j\x9cZAo=");
+ QTest::newRow("b") << QByteArray("abcde\n") << QByteArray("YW JjZ\n G\tUK");
+ QTest::newRow("c") << QByteArray("abcdef\n") << QByteArray("YWJjZGVmCg=");
+ QTest::newRow("d") << QByteArray("abcdefg\n") << QByteArray("YWJ\rjZGVmZwo");
+ QTest::newRow("e") << QByteArray("abcdefgh\n") << QByteArray("YWJjZGVmZ2gK");
+
+ QByteArray ba;
+ ba.resize(256);
+ for (int i = 0; i < 256; ++i)
+ ba[i] = i;
+ QTest::newRow("f") << ba << QByteArray("AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Nj\n"
+ "c4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1u\n"
+ "b3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpa\n"
+ "anqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd\n"
+ "3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/w== ");
+
+
+ QTest::newRow("g") << QByteArray("foo\0bar", 7) << QByteArray("Zm9vAGJhcg");
+ QTest::newRow("h") << QByteArray("f\xd1oo\x9cbar") << QByteArray("ZtFv\0b7py", 9);
+ QTest::newRow("i") << QByteArray("\"\0\0\0\0\0\0\"", 8) << QByteArray("IgAAAAAAACI");
+
+}
+
+
+void tst_QByteArray::fromBase64()
+{
+ QFETCH(QByteArray, rawdata);
+ QFETCH(QByteArray, base64);
+
+ QByteArray arr = QByteArray::fromBase64(base64);
+ QCOMPARE(arr, rawdata);
+}
+
void tst_QByteArray::qvsnprintf()
{
char buf[20];
diff --git a/tests/auto/qcombobox/tst_qcombobox.cpp b/tests/auto/qcombobox/tst_qcombobox.cpp
index b568c60..dac32bb 100644
--- a/tests/auto/qcombobox/tst_qcombobox.cpp
+++ b/tests/auto/qcombobox/tst_qcombobox.cpp
@@ -145,6 +145,8 @@ private slots:
void noScrollbar();
void setItemDelegate();
void task253944_itemDelegateIsReset();
+ void subControlRectsWithOffset_data();
+ void subControlRectsWithOffset();
protected slots:
void onEditTextChanged( const QString &newString );
@@ -2289,5 +2291,53 @@ void tst_QComboBox::task253944_itemDelegateIsReset()
}
+void tst_QComboBox::subControlRectsWithOffset_data()
+{
+ QTest::addColumn<bool>("editable");
+
+ QTest::newRow("editable = true") << true;
+ QTest::newRow("editable = false") << false;
+}
+
+void tst_QComboBox::subControlRectsWithOffset()
+{
+ // The sub control rect relative position should not depends
+ // on the position of the combobox
+
+ class FriendlyCombo : public QComboBox {
+ public:
+ void styleOption(QStyleOptionComboBox *optCombo) {
+ initStyleOption(optCombo);
+ }
+ } combo;
+ QStyleOptionComboBox optCombo;
+ combo.styleOption(&optCombo);
+
+
+ const QRect rectAtOrigin(0, 0, 80, 30);
+ const QPoint offset(25, 50);
+ const QRect rectWithOffset = rectAtOrigin.translated(offset);
+
+ QStyle *style = combo.style();
+
+ QFETCH(bool, editable);
+ optCombo.editable = editable;
+
+ optCombo.rect = rectAtOrigin;
+ QRect editFieldRect = style->subControlRect(QStyle::CC_ComboBox, &optCombo, QStyle::SC_ComboBoxEditField, 0);
+ QRect arrowRect = style->subControlRect(QStyle::CC_ComboBox, &optCombo, QStyle::SC_ComboBoxArrow, 0);
+ QRect listboxRect = style->subControlRect(QStyle::CC_ComboBox, &optCombo, QStyle::SC_ComboBoxListBoxPopup, 0);
+
+ optCombo.rect = rectWithOffset;
+ QRect editFieldRectWithOffset = style->subControlRect(QStyle::CC_ComboBox, &optCombo, QStyle::SC_ComboBoxEditField, 0);
+ QRect arrowRectWithOffset = style->subControlRect(QStyle::CC_ComboBox, &optCombo, QStyle::SC_ComboBoxArrow, 0);
+ QRect listboxRectWithOffset = style->subControlRect(QStyle::CC_ComboBox, &optCombo, QStyle::SC_ComboBoxListBoxPopup, 0);
+
+ QCOMPARE(editFieldRect, editFieldRectWithOffset.translated(-offset));
+ QCOMPARE(arrowRect, arrowRectWithOffset.translated(-offset));
+ QCOMPARE(listboxRect, listboxRectWithOffset.translated(-offset));
+
+}
+
QTEST_MAIN(tst_QComboBox)
#include "tst_qcombobox.moc"
diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp
index f92670d..8958530 100644
--- a/tests/auto/qgl/tst_qgl.cpp
+++ b/tests/auto/qgl/tst_qgl.cpp
@@ -46,9 +46,11 @@
#include <qdebug.h>
#include <qgl.h>
#include <qglcolormap.h>
+#include <qpaintengine.h>
#include <QGraphicsView>
#include <QGraphicsProxyWidget>
+#include <QVBoxLayout>
//TESTED_CLASS=
//TESTED_FILES=
@@ -67,6 +69,8 @@ private slots:
void graphicsViewClipping();
void partialGLWidgetUpdates_data();
void partialGLWidgetUpdates();
+ void glWidgetRendering();
+ void glWidgetReparent();
void colormap();
};
@@ -625,6 +629,116 @@ void tst_QGL::partialGLWidgetUpdates()
QCOMPARE(widget.paintEventRegion, QRegion(widget.rect()));
}
+
+class GLWidget : public QGLWidget
+{
+public:
+ GLWidget(QWidget* p = 0)
+ : QGLWidget(p), beginOk(false), engineType(QPaintEngine::MaxUser) {}
+ bool beginOk;
+ QPaintEngine::Type engineType;
+ void paintGL()
+ {
+ QPainter p;
+ beginOk = p.begin(this);
+ QPaintEngine* pe = p.paintEngine();
+ engineType = pe->type();
+
+ // This test only ensures it's possible to paint onto a QGLWidget. Full
+ // paint engine feature testing is way out of scope!
+
+ p.fillRect(0, 0, width(), height(), Qt::red);
+ // No p.end() or swap buffers, should be done automatically
+ }
+
+};
+
+void tst_QGL::glWidgetRendering()
+{
+ GLWidget w;
+ w.show();
+
+#ifdef Q_WS_X11
+ qt_x11_wait_for_window_manager(&w);
+#endif
+ QTest::qWait(200);
+
+ QVERIFY(w.beginOk);
+ QVERIFY(w.engineType == QPaintEngine::OpenGL);
+
+ QImage fb = w.grabFrameBuffer(false).convertToFormat(QImage::Format_RGB32);
+ QImage reference(fb.size(), QImage::Format_RGB32);
+ reference.fill(0xffff0000);
+
+ QCOMPARE(fb, reference);
+}
+
+void tst_QGL::glWidgetReparent()
+{
+ // Try it as a top-level first:
+ GLWidget *widget = new GLWidget;
+ widget->setGeometry(0, 0, 200, 30);
+ widget->show();
+
+ QWidget grandParentWidget;
+ grandParentWidget.setPalette(Qt::blue);
+ QVBoxLayout grandParentLayout(&grandParentWidget);
+
+ QWidget parentWidget(&grandParentWidget);
+ grandParentLayout.addWidget(&parentWidget);
+ parentWidget.setPalette(Qt::green);
+ parentWidget.setAutoFillBackground(true);
+ QVBoxLayout parentLayout(&parentWidget);
+
+ grandParentWidget.setGeometry(0, 100, 200, 200);
+ grandParentWidget.show();
+
+#ifdef Q_WS_X11
+ qt_x11_wait_for_window_manager(widget);
+ qt_x11_wait_for_window_manager(&parentWidget);
+#endif
+ QTest::qWait(2000);
+
+ QVERIFY(parentWidget.children().count() == 1); // The layout
+
+ // Now both widgets should be created & shown, time to re-parent:
+ parentLayout.addWidget(widget);
+
+#ifdef Q_WS_X11
+ qt_x11_wait_for_window_manager(&parentWidget);
+#endif
+ QTest::qWait(2000);
+
+ QVERIFY(parentWidget.children().count() == 2); // Layout & glwidget
+ QVERIFY(parentWidget.children().contains(widget));
+ QVERIFY(widget->height() > 30);
+
+ delete widget;
+
+#ifdef Q_WS_X11
+ qt_x11_wait_for_window_manager(&parentWidget);
+#endif
+ QTest::qWait(2000);
+
+ QVERIFY(parentWidget.children().count() == 1); // The layout
+
+ // Now do pretty much the same thing, but don't show the
+ // widget first:
+ widget = new GLWidget;
+ parentLayout.addWidget(widget);
+
+#ifdef Q_WS_X11
+ qt_x11_wait_for_window_manager(&parentWidget);
+#endif
+ QTest::qWait(2000);
+
+ QVERIFY(parentWidget.children().count() == 2); // Layout & glwidget
+ QVERIFY(parentWidget.children().contains(widget));
+ QVERIFY(widget->height() > 30);
+
+ delete widget;
+}
+
class ColormapExtended : public QGLColormap
{
public:
diff --git a/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp b/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
index a579ba5..0d82182 100644
--- a/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
+++ b/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
#include <QtTest/QtTest>
#include <qgraphicsanchorlayout.h>
#include <qgraphicswidget.h>
diff --git a/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp b/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
index 1d81ac8..51c96b1 100644
--- a/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
+++ b/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
@@ -76,6 +76,7 @@ private slots:
void invalidate();
void itemAt_data();
void itemAt();
+ void itemAt_visualOrder();
void orientation_data();
void orientation();
void removeAt_data();
@@ -537,7 +538,7 @@ void tst_QGraphicsLinearLayout::insertItem()
QCOMPARE(layout.count(), itemCount + layoutCount + 1);
if (insertItemAt >= 0 && (itemCount + layoutCount >= 0)) {
- QCOMPARE(layout.itemAt(itemCount + layoutCount), item);
+ QCOMPARE(layout.itemAt(insertItemAt), item);
}
layout.activate();
@@ -686,6 +687,28 @@ void tst_QGraphicsLinearLayout::itemAt()
QVERIFY(layout.itemAt(index) != 0);
}
+void tst_QGraphicsLinearLayout::itemAt_visualOrder()
+{
+ QGraphicsLinearLayout *l = new QGraphicsLinearLayout;
+
+ QGraphicsWidget *w1 = new QGraphicsWidget;
+ l->addItem(w1);
+
+ QGraphicsWidget *w3 = new QGraphicsWidget;
+ l->addItem(w3);
+
+ QGraphicsWidget *w0 = new QGraphicsWidget;
+ l->insertItem(0, w0);
+
+ QGraphicsWidget *w2 = new QGraphicsWidget;
+ l->insertItem(2, w2);
+
+ QCOMPARE(l->itemAt(0), w0);
+ QCOMPARE(l->itemAt(1), w1);
+ QCOMPARE(l->itemAt(2), w2);
+ QCOMPARE(l->itemAt(3), w3);
+}
+
void tst_QGraphicsLinearLayout::orientation_data()
{
QTest::addColumn<Qt::Orientation>("orientation");
diff --git a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
index 524b756..afd8668 100644
--- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
@@ -217,6 +217,7 @@ private slots:
void task245469_itemsAtPointWithClip();
void task253415_reconnectUpdateSceneOnSceneChanged();
void task255529_transformationAnchorMouseAndViewportMargins();
+ void task259503_scrollingArtifacts();
};
void tst_QGraphicsView::initTestCase()
@@ -3663,6 +3664,65 @@ void tst_QGraphicsView::task255529_transformationAnchorMouseAndViewportMargins()
QVERIFY(qAbs(newMouseScenePos.y() - mouseScenePos.y()) < slack);
}
+void tst_QGraphicsView::task259503_scrollingArtifacts()
+{
+ QGraphicsScene scene(0, 0, 800, 600);
+
+ QGraphicsRectItem card;
+ card.setRect(0, 0, 50, 50);
+ card.setPen(QPen(Qt::darkRed));
+ card.setBrush(QBrush(Qt::cyan));
+ card.setZValue(2.0);
+ card.setPos(300, 300);
+ scene.addItem(&card);
+
+ class SAGraphicsView: public QGraphicsView
+ {
+ public:
+ SAGraphicsView(QGraphicsScene *scene)
+ : QGraphicsView(scene)
+ , itSTimeToTest(false)
+ {
+ setViewportUpdateMode( QGraphicsView::MinimalViewportUpdate );
+ resize(QSize(640, 480));
+ }
+
+ QRegion updateRegion;
+ bool itSTimeToTest;
+
+ void paintEvent(QPaintEvent *event)
+ {
+ QGraphicsView::paintEvent(event);
+
+ if (itSTimeToTest)
+ {
+ qDebug() << event->region();
+ qDebug() << updateRegion;
+ QCOMPARE(event->region(), updateRegion);
+ }
+ }
+ };
+
+ SAGraphicsView view(&scene);
+ view.show();
+#ifdef Q_WS_X11
+ qt_x11_wait_for_window_manager(&view);
+#endif
+
+ int hsbValue = view.horizontalScrollBar()->value();
+ view.horizontalScrollBar()->setValue(hsbValue / 2);
+ QTest::qWait(10);
+ view.horizontalScrollBar()->setValue(0);
+ QTest::qWait(10);
+
+ QRect itemDeviceBoundingRect = card.deviceTransform(view.viewportTransform()).mapRect(card.boundingRect()).toRect();
+ itemDeviceBoundingRect.adjust(-2, -2, 2, 2);
+ view.updateRegion = itemDeviceBoundingRect;
+ view.updateRegion += itemDeviceBoundingRect.translated(-100, 0);
+ view.itSTimeToTest = true;
+ card.setPos(200, 300);
+ QTest::qWait(10);
+}
QTEST_MAIN(tst_QGraphicsView)
#include "tst_qgraphicsview.moc"
diff --git a/tests/auto/qlineedit/tst_qlineedit.cpp b/tests/auto/qlineedit/tst_qlineedit.cpp
index 1616154..93aa64c 100644
--- a/tests/auto/qlineedit/tst_qlineedit.cpp
+++ b/tests/auto/qlineedit/tst_qlineedit.cpp
@@ -190,6 +190,7 @@ private slots:
void selectedText();
void hasSelectedText();
+ void deleteSelectedText();
void textChangedAndTextEdited();
void returnPressed();
@@ -2054,6 +2055,32 @@ void tst_QLineEdit::hasSelectedText()
DEPENDS_ON("selectedText");
}
+void tst_QLineEdit::deleteSelectedText()
+{
+ const QString text = QString::fromLatin1("bar");
+ QLineEdit edit( text );
+ QCOMPARE(edit.text(), text);
+
+ edit.selectAll();
+
+ QTest::keyClick(&edit, Qt::Key_Delete, 0);
+ QVERIFY(edit.text().isEmpty());
+
+ edit.setText(text);
+ edit.selectAll();
+
+ QMenu *menu = edit.createStandardContextMenu();
+ for (int i = 0; i < menu->actions().count(); ++i) {
+ QAction *current = menu->actions().at(i);
+ if (current->text() == QLineEdit::tr("Delete")) {
+ current->trigger(); //this will delete the whole text selected
+ QVERIFY(edit.text().isEmpty());
+ }
+ }
+
+}
+
+
void tst_QLineEdit::textChangedAndTextEdited()
{
changed_count = 0;
diff --git a/tests/auto/qmainwindow/tst_qmainwindow.cpp b/tests/auto/qmainwindow/tst_qmainwindow.cpp
index e118c65..9156e5e 100644
--- a/tests/auto/qmainwindow/tst_qmainwindow.cpp
+++ b/tests/auto/qmainwindow/tst_qmainwindow.cpp
@@ -106,6 +106,7 @@ private slots:
void isSeparator();
void setCursor();
void addToolbarAfterShow();
+ void centralWidgetSize();
};
// Testing get/set functions
@@ -1336,6 +1337,19 @@ public:
}
};
+class MyWidget : public QWidget
+{
+public:
+ MyWidget(QWidget *parent = 0) : QWidget(parent)
+ {
+ }
+
+ QSize sizeHint() const
+ {
+ return QSize(200, 200);
+ }
+};
+
void tst_QMainWindow::hideBeforeLayout()
{
QMainWindow win;
@@ -1650,6 +1664,18 @@ void tst_QMainWindow::addToolbarAfterShow()
QVERIFY(!toolBar.isHidden());
}
+void tst_QMainWindow::centralWidgetSize()
+{
+ QMainWindow mainWindow;
+ mainWindow.menuBar()->addMenu("menu");
+
+ MyWidget widget;
+ mainWindow.setCentralWidget(&widget);
+
+ mainWindow.show();
+ QTest::qWait(100);
+ QCOMPARE(widget.size(), widget.sizeHint());
+}
QTEST_MAIN(tst_QMainWindow)
diff --git a/tests/auto/qobject/tst_qobject.cpp b/tests/auto/qobject/tst_qobject.cpp
index a08f620..b20c0e0 100644
--- a/tests/auto/qobject/tst_qobject.cpp
+++ b/tests/auto/qobject/tst_qobject.cpp
@@ -120,6 +120,7 @@ private slots:
void uniqConnection();
void interfaceIid();
void deleteQObjectWhenDeletingEvent();
+ void overloads();
protected:
};
@@ -2903,11 +2904,11 @@ void tst_QObject::uniqConnection()
void tst_QObject::interfaceIid()
{
- QCOMPARE(QByteArray(qobject_interface_iid<Foo::Bleh *>()),
+ QCOMPARE(QByteArray(qobject_interface_iid<Foo::Bleh *>()),
QByteArray(Bleh_iid));
- QCOMPARE(QByteArray(qobject_interface_iid<Foo::Bar *>()),
+ QCOMPARE(QByteArray(qobject_interface_iid<Foo::Bar *>()),
QByteArray("com.qtest.foobar"));
- QCOMPARE(QByteArray(qobject_interface_iid<FooObject *>()),
+ QCOMPARE(QByteArray(qobject_interface_iid<FooObject *>()),
QByteArray());
}
@@ -2927,6 +2928,93 @@ void tst_QObject::deleteQObjectWhenDeletingEvent()
QCoreApplication::removePostedEvents(&o); // here you would get a deadlock
}
+class OverloadObject : public QObject
+{
+ friend class tst_QObject;
+ Q_OBJECT
+ signals:
+ void sig(int i, char c, qreal m = 12);
+ void sig(int i, int j = 12);
+ void sig(QObject *o, QObject *p, QObject *q = 0, QObject *r = 0) const;
+ void other(int a = 0);
+ void sig(QObject *o, OverloadObject *p = 0, QObject *q = 0, QObject *r = 0);
+ void sig(double r = 0.5);
+ public slots:
+ void slo(int i, int j = 43)
+ {
+ s_num += 1;
+ i1_num = i;
+ i2_num = j;
+ }
+ void slo(QObject *o, QObject *p = qApp, QObject *q = qApp, QObject *r = qApp)
+ {
+ s_num += 10;
+ o1_obj = o;
+ o2_obj = p;
+ o3_obj = q;
+ o4_obj = r;
+ }
+ void slo()
+ {
+ s_num += 100;
+ }
+
+ public:
+ int s_num;
+ int i1_num;
+ int i2_num;
+ QObject *o1_obj;
+ QObject *o2_obj;
+ QObject *o3_obj;
+ QObject *o4_obj;
+};
+
+void tst_QObject::overloads()
+{
+ OverloadObject obj1;
+ OverloadObject obj2;
+ QObject obj3;
+ obj1.s_num = 0;
+ obj2.s_num = 0;
+
+ connect (&obj1, SIGNAL(sig(int)) , &obj1, SLOT(slo(int)));
+ connect (&obj1, SIGNAL(sig(QObject *, QObject *, QObject *)) , &obj1, SLOT(slo(QObject * , QObject *, QObject *)));
+
+ connect (&obj1, SIGNAL(sig(QObject *, QObject *, QObject *, QObject *)) , &obj2, SLOT(slo(QObject * , QObject *, QObject *)));
+ connect (&obj1, SIGNAL(sig(QObject *)) , &obj2, SLOT(slo()));
+ connect (&obj1, SIGNAL(sig(int, int)) , &obj2, SLOT(slo(int, int)));
+
+ emit obj1.sig(0.5); //connected to nothing
+ emit obj1.sig(1, 'a'); //connected to nothing
+ QCOMPARE(obj1.s_num, 0);
+ QCOMPARE(obj2.s_num, 0);
+
+ emit obj1.sig(1); //this signal is connected
+ QCOMPARE(obj1.s_num, 1);
+ QCOMPARE(obj1.i1_num, 1);
+ QCOMPARE(obj1.i2_num, 43); //default argument of the slot
+
+ QCOMPARE(obj2.s_num, 1);
+ QCOMPARE(obj2.i1_num, 1);
+ QCOMPARE(obj2.i2_num, 12); //default argument of the signal
+
+
+ emit obj1.sig(&obj2); //this signal is conencted to obj2
+ QCOMPARE(obj1.s_num, 1);
+ QCOMPARE(obj2.s_num, 101);
+ emit obj1.sig(&obj2, &obj3); //this signal is connected
+ QCOMPARE(obj1.s_num, 11);
+ QCOMPARE(obj1.o1_obj, &obj2);
+ QCOMPARE(obj1.o2_obj, &obj3);
+ QCOMPARE(obj1.o3_obj, (QObject *)0); //default arg of the signal
+ QCOMPARE(obj1.o4_obj, qApp); //default arg of the slot
+
+ QCOMPARE(obj2.s_num, 111);
+ QCOMPARE(obj2.o1_obj, &obj2);
+ QCOMPARE(obj2.o2_obj, &obj3);
+ QCOMPARE(obj2.o3_obj, (QObject *)0); //default arg of the signal
+ QCOMPARE(obj2.o4_obj, qApp); //default arg of the slot
+}
QTEST_MAIN(tst_QObject)
#include "tst_qobject.moc"
diff --git a/tests/auto/qpixmapfilter/tst_qpixmapfilter.cpp b/tests/auto/qpixmapfilter/tst_qpixmapfilter.cpp
index 410d868..66c6693 100644
--- a/tests/auto/qpixmapfilter/tst_qpixmapfilter.cpp
+++ b/tests/auto/qpixmapfilter/tst_qpixmapfilter.cpp
@@ -342,39 +342,44 @@ void tst_QPixmapFilter::dropShadowBoundingRectFor()
QPixmapDropShadowFilter filter;
filter.setBlurRadius(0);
- QCOMPARE(filter.blurRadius(), 0.0);
+ QCOMPARE(filter.blurRadius(), 0);
+
+ const QRectF rect1(0, 0, 50, 50);
+ const QRectF rect2(30, 20, 10, 40);
+ const QRectF rect3(2.2, 6.3, 11.4, 47.5);
filter.setOffset(QPointF(0,0));
- QCOMPARE(filter.boundingRectFor(QRectF(0, 0, 50, 50)), QRectF(0, 0, 50, 50));
- QCOMPARE(filter.boundingRectFor(QRectF(30, 20, 10, 40)), QRectF(30, 20, 10, 40));
- QCOMPARE(filter.boundingRectFor(QRectF(2.2, 6.3, 11.4, 47.5)), QRectF(2.2, 6.3, 11.4, 47.5));
+ QCOMPARE(filter.boundingRectFor(rect1), rect1);
+ QCOMPARE(filter.boundingRectFor(rect2), rect2);
+ QCOMPARE(filter.boundingRectFor(rect3), rect3);
filter.setOffset(QPointF(1,1));
QCOMPARE(filter.offset(), QPointF(1, 1));
- QCOMPARE(filter.boundingRectFor(QRectF(0, 0, 50, 50)), QRectF(0, 0, 51, 51));
- QCOMPARE(filter.boundingRectFor(QRectF(30, 20, 10, 40)), QRectF(30, 20, 11, 41));
- QCOMPARE(filter.boundingRectFor(QRectF(2.2, 6.3, 11.4, 47.5)), QRectF(2.2, 6.3, 12.4, 48.5));
+ QCOMPARE(filter.boundingRectFor(rect1), rect1.adjusted(0, 0, 1, 1));
+ QCOMPARE(filter.boundingRectFor(rect2), rect2.adjusted(0, 0, 1, 1));
+ QCOMPARE(filter.boundingRectFor(rect3), rect3.adjusted(0, 0, 1, 1));
filter.setOffset(QPointF(-1,-1));
- QCOMPARE(filter.boundingRectFor(QRectF(0, 0, 50, 50)), QRectF(-1, -1, 51, 51));
- QCOMPARE(filter.boundingRectFor(QRectF(30, 20, 10, 40)), QRectF(29, 19, 11, 41));
- QCOMPARE(filter.boundingRectFor(QRectF(2.2, 6.3, 11.4, 47.5)), QRectF(1.2, 5.3, 12.4, 48.5));
+ QCOMPARE(filter.boundingRectFor(rect1), rect1.adjusted(-1, -1, 0, 0));
+ QCOMPARE(filter.boundingRectFor(rect2), rect2.adjusted(-1, -1, 0, 0));
+ QCOMPARE(filter.boundingRectFor(rect3), rect3.adjusted(-1, -1, 0, 0));
filter.setBlurRadius(2);
filter.setOffset(QPointF(0,0));
- QCOMPARE(filter.boundingRectFor(QRectF(0, 0, 50, 50)), QRectF(-2, -2, 54, 54));
- QCOMPARE(filter.boundingRectFor(QRectF(30, 20, 10, 40)), QRectF(28, 18, 14, 44));
- QCOMPARE(filter.boundingRectFor(QRectF(2.2, 6.3, 11.4, 47.5)), QRectF(0.2, 4.3, 15.4, 51.5));
+ int delta = 2 * 2;
+ QCOMPARE(filter.boundingRectFor(rect1), rect1.adjusted(-delta, -delta, delta, delta));
+ QCOMPARE(filter.boundingRectFor(rect2), rect2.adjusted(-delta, -delta, delta, delta));
+ QCOMPARE(filter.boundingRectFor(rect3), rect3.adjusted(-delta, -delta, delta, delta));
filter.setOffset(QPointF(1,1));
- QCOMPARE(filter.boundingRectFor(QRectF(0, 0, 50, 50)), QRectF(-1, -1, 54, 54));
- QCOMPARE(filter.boundingRectFor(QRectF(30, 20, 10, 40)), QRectF(29, 19, 14, 44));
- QCOMPARE(filter.boundingRectFor(QRectF(2.2, 6.3, 11.4, 47.5)), QRectF(1.2, 5.3, 15.4, 51.5));
+ QCOMPARE(filter.boundingRectFor(rect1), rect1.adjusted(-delta + 1, -delta + 1, delta + 1, delta + 1));
+ QCOMPARE(filter.boundingRectFor(rect2), rect2.adjusted(-delta + 1, -delta + 1, delta + 1, delta + 1));
+ QCOMPARE(filter.boundingRectFor(rect3), rect3.adjusted(-delta + 1, -delta + 1, delta + 1, delta + 1));
filter.setOffset(QPointF(-10,-10));
- QCOMPARE(filter.boundingRectFor(QRectF(0, 0, 50, 50)), QRectF(-12, -12, 62, 62));
- QCOMPARE(filter.boundingRectFor(QRectF(30, 20, 10, 40)), QRectF(18, 8, 22, 52));
- QCOMPARE(filter.boundingRectFor(QRectF(2.2, 6.3, 11.4, 47.5)), QRectF(-9.8, -5.7, 23.4, 59.5));
+ QCOMPARE(filter.boundingRectFor(rect1), rect1.adjusted(-delta - 10, -delta - 10, 0, 0));
+ QCOMPARE(filter.boundingRectFor(rect2), rect2.adjusted(-delta - 10, -delta - 10, 0, 0));
+ QCOMPARE(filter.boundingRectFor(rect3), rect3.adjusted(-delta - 10, -delta - 10, 0, 0));
}
diff --git a/tests/auto/qscriptclass/tst_qscriptclass.cpp b/tests/auto/qscriptclass/tst_qscriptclass.cpp
index 11c7f56..33c2c35 100644
--- a/tests/auto/qscriptclass/tst_qscriptclass.cpp
+++ b/tests/auto/qscriptclass/tst_qscriptclass.cpp
@@ -606,6 +606,7 @@ void tst_QScriptClass::newInstance()
QScriptValue arr = eng.newArray();
QVERIFY(arr.isArray());
QCOMPARE(arr.scriptClass(), (QScriptClass*)0);
+ QTest::ignoreMessage(QtWarningMsg, "QScriptValue::setScriptClass() failed: cannot change class of non-QScriptObject");
arr.setScriptClass(&cls);
QEXPECT_FAIL("", "Changing class of arbitrary script object is not allowed (it's OK)", Continue);
QCOMPARE(arr.scriptClass(), (QScriptClass*)&cls);
diff --git a/tests/auto/qscriptengine/tst_qscriptengine.cpp b/tests/auto/qscriptengine/tst_qscriptengine.cpp
index df74144..b0ba922 100644
--- a/tests/auto/qscriptengine/tst_qscriptengine.cpp
+++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp
@@ -1107,6 +1107,31 @@ void tst_QScriptEngine::globalObjectProperties()
}
}
QVERIFY(remainingNames.isEmpty());
+
+ // create property with no attributes
+ {
+ QString name = QString::fromLatin1("foo");
+ QVERIFY(!global.property(name).isValid());
+ QScriptValue val(123);
+ global.setProperty(name, val);
+ QVERIFY(global.property(name).equals(val));
+ QVERIFY(global.propertyFlags(name) == 0);
+ global.setProperty(name, QScriptValue());
+ QVERIFY(!global.property(name).isValid());
+ }
+ // create property with attributes
+ {
+ QString name = QString::fromLatin1("bar");
+ QVERIFY(!global.property(name).isValid());
+ QScriptValue val(QString::fromLatin1("ciao"));
+ QScriptValue::PropertyFlags flags = QScriptValue::ReadOnly | QScriptValue::SkipInEnumeration;
+ global.setProperty(name, val, flags);
+ QVERIFY(global.property(name).equals(val));
+ QEXPECT_FAIL("", "custom Global Object properties don't retain attributes", Continue);
+ QCOMPARE(global.propertyFlags(name), flags);
+ global.setProperty(name, QScriptValue());
+ QVERIFY(!global.property(name).isValid());
+ }
}
void tst_QScriptEngine::globalObjectGetterSetterProperty()
diff --git a/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp b/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp
index f77738f..56b7df8 100644
--- a/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp
+++ b/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp
@@ -400,7 +400,6 @@ tst_Suite::tst_Suite()
}
QString willFixInNextReleaseMessage = QString::fromLatin1("Will fix in next release");
- QString brokenOnSomePlatformsMessage = QString::fromLatin1("Doesn't behave the same on all platforms");
QString fromCharCodeMessage = QString::fromLatin1("Test is wrong?");
for (int i = 4256; i < 4294; ++i) {
addExpectedFailure("ecma/String/15.5.4.11-2.js", QString::fromLatin1("var s = new String( String.fromCharCode(%0) ); s.toLowerCase().charCodeAt(0)").arg(i), fromCharCodeMessage);
@@ -418,61 +417,15 @@ tst_Suite::tst_Suite()
addExpectedFailure("ecma/extensions/15.1.2.1-1.js", "var PROPS = ''; for ( p in eval ) { PROPS += p }; PROPS", willFixInNextReleaseMessage);
addExpectedFailure("ecma/GlobalObject/15.1.2.2-1.js", "var PROPS=''; for ( var p in parseInt ) { PROPS += p; }; PROPS", willFixInNextReleaseMessage);
- addSkip("ecma/GlobalObject/15.1.2.2-2.js", "parseInt(s,36)", brokenOnSomePlatformsMessage);
-
addExpectedFailure("ecma/GlobalObject/15.1.2.3-1.js", "var MYPROPS=''; for ( var p in parseFloat ) { MYPROPS += p }; MYPROPS", willFixInNextReleaseMessage);
addExpectedFailure("ecma/GlobalObject/15.1.2.4.js", "var MYPROPS=''; for ( var p in escape ) { MYPROPS+= p}; MYPROPS", willFixInNextReleaseMessage);
addExpectedFailure("ecma/GlobalObject/15.1.2.5-1.js", "var MYPROPS=''; for ( var p in unescape ) { MYPROPS+= p }; MYPROPS", willFixInNextReleaseMessage);
addExpectedFailure("ecma/GlobalObject/15.1.2.6.js", "var MYPROPS=''; for ( var p in isNaN ) { MYPROPS+= p }; MYPROPS", willFixInNextReleaseMessage);
addExpectedFailure("ecma/GlobalObject/15.1.2.7.js", "var MYPROPS=''; for ( p in isFinite ) { MYPROPS+= p }; MYPROPS", willFixInNextReleaseMessage);
- // qstrtod() has problems parsing reaaaaally big numbers -- they come out as NaN rather than Infinity or Number.MAX_VALUE
- addSkip("ecma/TypeConversion/9.3.1-3.js", "parseInt(s1,10) == 1.7976931348623157e+308 || parseInt(s1,10) == Infinity", brokenOnSomePlatformsMessage);
- addSkip("ecma/TypeConversion/9.3.1-3.js", "parseInt(s2,10) == Infinity || parseInt(s2,10) == 1.7976931348623157e+308", brokenOnSomePlatformsMessage);
- addSkip("ecma/TypeConversion/9.3.1-3.js", "parseInt(s1) == 1.7976931348623157e+308 || parseInt(s1) == Infinity", brokenOnSomePlatformsMessage);
- addSkip("ecma/TypeConversion/9.3.1-3.js", "parseInt(s2) == Infinity || parseInt(s2) == 1.7976931348623157e+308", brokenOnSomePlatformsMessage);
- addSkip("ecma/TypeConversion/9.3.1-3.js", "parseInt(s,36)", brokenOnSomePlatformsMessage);
-
-#if defined(Q_OS_SOLARIS)
- addExpectedFailure("ecma/Math/15.8.2.2.js", "Math.acos(11.00000001)", "Fails on Solaris");
- addExpectedFailure("ecma/Math/15.8.2.3.js", "Math.asin(-1.000001)", "Fails on Solaris");
-#endif
-
addExpectedFailure(QRegExp(), "NO TESTS EXIST", willFixInNextReleaseMessage);
- addExpectedFailure("ecma_2/RegExp/multiline-001.js", "/.*[y]$/m.exec(ivory-billed\ndowny\nhairy\nacorn\nyellow-bellied sapsucker\nnorthern flicker\npileated\n)", willFixInNextReleaseMessage);
- addExpectedFailure("ecma_2/RegExp/multiline-001.js", "/.*[d]$/m.exec(ivory-billed\ndowny\nhairy\nacorn\nyellow-bellied sapsucker\nnorthern flicker\npileated\n)", willFixInNextReleaseMessage);
- addExpectedFailure("ecma_2/String/match-002.js", "//.toString()", willFixInNextReleaseMessage);
-
-#if defined(Q_WS_WIN)
- addExpectedFailure(QRegExp(), "VAR1 = 0; VAR2= Infinity; VAR1 %= VAR2;VAR1", willFixInNextReleaseMessage);
- addExpectedFailure(QRegExp(), "VAR1 = -0; VAR2= Infinity; VAR1 %= VAR2;VAR1", willFixInNextReleaseMessage);
- addExpectedFailure(QRegExp(), "VAR1 = 0; VAR2= -Infinity; VAR1 %= VAR2;VAR1", willFixInNextReleaseMessage);
- addExpectedFailure(QRegExp(), "VAR1 = -0; VAR2= -Infinity; VAR1 %= VAR2;VAR1", willFixInNextReleaseMessage);
- addExpectedFailure(QRegExp(), "VAR1 = 1; VAR2= Infinity; VAR1 %= VAR2;VAR1", willFixInNextReleaseMessage);
- addExpectedFailure(QRegExp(), "VAR1 = -1; VAR2= Infinity; VAR1 %= VAR2;VAR1", willFixInNextReleaseMessage);
- addExpectedFailure(QRegExp(), "VAR1 = -1; VAR2= -Infinity; VAR1 %= VAR2;VAR1", willFixInNextReleaseMessage);
- addExpectedFailure(QRegExp(), "VAR1 = 1; VAR2= -Infinity; VAR1 %= VAR2;VAR1", willFixInNextReleaseMessage);
- addExpectedFailure(QRegExp(), "1 % Number.NEGATIVE_INFINITY", willFixInNextReleaseMessage);
- addExpectedFailure(QRegExp(), "1 % Number.POSITIVE_INFINITY", willFixInNextReleaseMessage);
- addExpectedFailure(QRegExp(), "-1 % Number.POSITIVE_INFINITY", willFixInNextReleaseMessage);
- addExpectedFailure(QRegExp(), "-1 % Number.NEGATIVE_INFINITY", willFixInNextReleaseMessage);
- addExpectedFailure(QRegExp(), "Number.MAX_VALUE % Number.NEGATIVE_INFINITY", willFixInNextReleaseMessage);
- addExpectedFailure(QRegExp(), "Number.MAX_VALUE % Number.POSITIVE_INFINITY", willFixInNextReleaseMessage);
- addExpectedFailure(QRegExp(), "-Number.MAX_VALUE % Number.POSITIVE_INFINITY", willFixInNextReleaseMessage);
- addExpectedFailure(QRegExp(), "-Number.MAX_VALUE % Number.NEGATIVE_INFINITY", willFixInNextReleaseMessage);
- addExpectedFailure(QRegExp(), "0 % Number.POSITIVE_INFINITY", willFixInNextReleaseMessage);
- addExpectedFailure(QRegExp(), "0 % Number.NEGATIVE_INFINITY", willFixInNextReleaseMessage);
- addExpectedFailure(QRegExp(), "-0 % Number.POSITIVE_INFINITY", willFixInNextReleaseMessage);
- addExpectedFailure(QRegExp(), "-0 % Number.NEGATIVE_INFINITY", willFixInNextReleaseMessage);
- addExpectedFailure(QRegExp(), "Math.atan2(Infinity, Infinity)", willFixInNextReleaseMessage);
- addExpectedFailure(QRegExp(), "Math.atan2(Infinity, -Infinity)", willFixInNextReleaseMessage);
- addExpectedFailure(QRegExp(), "Math.atan2(-Infinity, Infinity)", willFixInNextReleaseMessage);
- addExpectedFailure(QRegExp(), "Math.atan2(-Infinity, -Infinity)", willFixInNextReleaseMessage);
-#endif
-
addExpectedFailure("ecma_3/Array/15.4.5.1-01.js", "15.4.5.1 - array.length coverage", willFixInNextReleaseMessage);
- addExpectedFailure("ecma_3/ExecutionContexts/10.1.4-1.js", "Expected to be able to delete x", willFixInNextReleaseMessage);
addExpectedFailure("ecma_3/extensions/regress-228087-002.js",
"Section 1 of test - \nregexp = /{1.*}/g\n"
diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
index 3f231f2..1c09693 100644
--- a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
+++ b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
@@ -447,6 +447,8 @@ void tst_QScriptValue::toString()
variant = eng.newVariant(QVariant(QPoint(10, 20)));
QVERIFY(variant.isVariant());
QCOMPARE(variant.toString(), QString::fromLatin1("QVariant(QPoint)"));
+ variant = eng.newVariant(QUrl());
+ QVERIFY(variant.toString().isEmpty());
}
void tst_QScriptValue::toNumber()
@@ -2106,6 +2108,7 @@ void tst_QScriptValue::getSetProperty()
object.setProperty(foo, num);
QVERIFY(object.property(foo).strictlyEquals(num));
QVERIFY(object.property("foo").strictlyEquals(num));
+ QVERIFY(object.propertyFlags(foo) == 0);
}
void tst_QScriptValue::getSetPrototype()
@@ -2219,13 +2222,30 @@ void tst_QScriptValue::getSetScriptClass()
QCOMPARE(inv.scriptClass(), (QScriptClass*)0);
QScriptValue num(123);
QCOMPARE(num.scriptClass(), (QScriptClass*)0);
- QScriptValue obj = eng.newObject();
- QCOMPARE(obj.scriptClass(), (QScriptClass*)0);
+
TestScriptClass testClass(&eng);
- obj.setScriptClass(&testClass);
- QCOMPARE(obj.scriptClass(), (QScriptClass*)&testClass);
- obj.setScriptClass(0);
- QCOMPARE(obj.scriptClass(), (QScriptClass*)0);
+ // object created in C++ (newObject())
+ {
+ QScriptValue obj = eng.newObject();
+ QCOMPARE(obj.scriptClass(), (QScriptClass*)0);
+ obj.setScriptClass(&testClass);
+ QCOMPARE(obj.scriptClass(), (QScriptClass*)&testClass);
+ obj.setScriptClass(0);
+ QCOMPARE(obj.scriptClass(), (QScriptClass*)0);
+ }
+ // object created in JS
+ {
+ QScriptValue obj = eng.evaluate("new Object");
+ QVERIFY(!eng.hasUncaughtException());
+ QVERIFY(obj.isObject());
+ QCOMPARE(obj.scriptClass(), (QScriptClass*)0);
+ QTest::ignoreMessage(QtWarningMsg, "QScriptValue::setScriptClass() failed: cannot change class of non-QScriptObject");
+ obj.setScriptClass(&testClass);
+ QEXPECT_FAIL("", "With JSC back-end, the class of a plain object created in JS can't be changed", Continue);
+ QCOMPARE(obj.scriptClass(), (QScriptClass*)&testClass);
+ obj.setScriptClass(0);
+ QCOMPARE(obj.scriptClass(), (QScriptClass*)0);
+ }
}
static QScriptValue getArg(QScriptContext *ctx, QScriptEngine *)
@@ -3277,6 +3297,8 @@ void tst_QScriptValue::engineDeleted()
QVERIFY(v4.engine() == 0);
QVERIFY(v5.isValid());
QVERIFY(v5.engine() == 0);
+
+ QVERIFY(!v3.property("foo").isValid());
}
void tst_QScriptValue::valueOfWithClosure()
diff --git a/tests/auto/qsqldriver/tst_qsqldriver.cpp b/tests/auto/qsqldriver/tst_qsqldriver.cpp
index 5af56c7..4857295 100644
--- a/tests/auto/qsqldriver/tst_qsqldriver.cpp
+++ b/tests/auto/qsqldriver/tst_qsqldriver.cpp
@@ -144,9 +144,11 @@ void tst_QSqlDriver::record()
else if (db.driverName().startsWith("QPSQL"))
tablename = tablename.toLower();
- //check we can get records using a properly quoted table name
- rec = db.driver()->record(db.driver()->escapeIdentifier(tablename,QSqlDriver::TableName));
- QCOMPARE(rec.count(), 4);
+ if(!db.driverName().startsWith("QODBC") && !db.databaseName().contains("PostgreSql")) {
+ //check we can get records using a properly quoted table name
+ rec = db.driver()->record(db.driver()->escapeIdentifier(tablename,QSqlDriver::TableName));
+ QCOMPARE(rec.count(), 4);
+ }
for (int i = 0; i < fields.count(); ++i)
QCOMPARE(rec.fieldName(i), fields[i]);
@@ -188,8 +190,10 @@ void tst_QSqlDriver::primaryIndex()
else if (db.driverName().startsWith("QPSQL"))
tablename = tablename.toLower();
- index = db.driver()->primaryIndex(db.driver()->escapeIdentifier(tablename, QSqlDriver::TableName));
- QCOMPARE(index.count(), 1);
+ if(!db.driverName().startsWith("QODBC") && !db.databaseName().contains("PostgreSql")) {
+ index = db.driver()->primaryIndex(db.driver()->escapeIdentifier(tablename, QSqlDriver::TableName));
+ QCOMPARE(index.count(), 1);
+ }
if( db.driverName().startsWith("QIBASE") || db.driverName().startsWith("QOCI") || db.driverName().startsWith("QDB2"))
QCOMPARE(index.fieldName(0), QString::fromLatin1("ID"));
else
diff --git a/tests/auto/qtabbar/tst_qtabbar.cpp b/tests/auto/qtabbar/tst_qtabbar.cpp
index 041836c..3f77b7a 100644
--- a/tests/auto/qtabbar/tst_qtabbar.cpp
+++ b/tests/auto/qtabbar/tst_qtabbar.cpp
@@ -94,6 +94,7 @@ private slots:
void moveTab();
void task251184_removeTab();
+ void changeTitleWhileDoubleClickingTab();
};
// Testing get/set functions
@@ -535,5 +536,38 @@ void tst_QTabBar::task251184_removeTab()
}
+class TitleChangeTabBar : public QTabBar
+{
+ Q_OBJECT
+
+ QTimer timer;
+ int count;
+
+public:
+ TitleChangeTabBar(QWidget * parent = 0) : QTabBar(parent), count(0)
+ {
+ setMovable(true);
+ addTab("0");
+ connect(&timer, SIGNAL(timeout()), this, SLOT(updateTabText()));
+ timer.start(1);
+ }
+
+public slots:
+ void updateTabText()
+ {
+ count++;
+ setTabText(0, QString("%1").arg(count));
+ }
+};
+
+void tst_QTabBar::changeTitleWhileDoubleClickingTab()
+{
+ TitleChangeTabBar bar;
+ QPoint tabPos = bar.tabRect(0).center();
+
+ for(int i=0; i < 10; i++)
+ QTest::mouseDClick(&bar, Qt::LeftButton, 0, tabPos);
+}
+
QTEST_MAIN(tst_QTabBar)
#include "tst_qtabbar.moc"
diff --git a/tests/auto/qtreeview/tst_qtreeview.cpp b/tests/auto/qtreeview/tst_qtreeview.cpp
index d28c3c3..44185e7 100644
--- a/tests/auto/qtreeview/tst_qtreeview.cpp
+++ b/tests/auto/qtreeview/tst_qtreeview.cpp
@@ -232,6 +232,7 @@ private slots:
void task250683_wrongSectionSize();
void task239271_addRowsWithFirstColumnHidden();
void task254234_proxySort();
+ void task248022_changeSelection();
};
class QtTestModel: public QAbstractItemModel
@@ -3435,5 +3436,33 @@ void tst_QTreeView::task254234_proxySort()
QCOMPARE(view.model()->data(view.model()->index(1,1)).toString(), QString::fromLatin1("g"));
}
+class TreeView : public QTreeView
+{
+ Q_OBJECT
+public slots:
+ void handleSelectionChanged()
+ {
+ //let's select the last item
+ QModelIndex idx = model()->index(0, 0);
+ selectionModel()->select(QItemSelection(idx, idx), QItemSelectionModel::Select);
+ disconnect(selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)), this, SLOT(handleSelectionChanged()));
+ }
+};
+
+void tst_QTreeView::task248022_changeSelection()
+{
+ //we check that changing the selection between the mouse press and the mouse release
+ //works correctly
+ TreeView view;
+ QStringList list = QStringList() << "1" << "2";
+ QStringListModel model(list);
+ view.setSelectionMode(QAbstractItemView::ExtendedSelection);
+ view.setModel(&model);
+ view.connect(view.selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)), SLOT(handleSelectionChanged()));
+ QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.visualRect(model.index(1)).center());
+ QCOMPARE(view.selectionModel()->selectedIndexes().count(), list.count());
+}
+
+
QTEST_MAIN(tst_QTreeView)
#include "tst_qtreeview.moc"
diff --git a/tests/auto/symbian/qsymbiantests.pro b/tests/auto/symbian/qsymbiantests.pro
index 648335e..a752c86 100644
--- a/tests/auto/symbian/qsymbiantests.pro
+++ b/tests/auto/symbian/qsymbiantests.pro
@@ -1,2 +1,4 @@
TEMPLATE = subdirs
-SUBDIRS = qmainexceptions orientationchange \ No newline at end of file
+SUBDIRS = qmainexceptions orientationchange
+
+requires(symbian)
diff --git a/tests/auto/windowsmobile/test/ddhelper.h b/tests/auto/windowsmobile/test/ddhelper.h
index 3dfa9e6..36963d4 100644
--- a/tests/auto/windowsmobile/test/ddhelper.h
+++ b/tests/auto/windowsmobile/test/ddhelper.h
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
#ifndef __DDHELPER__
#define __DDHELPER__
diff --git a/tests/auto/xmlpatternsview/view/FunctionSignaturesView.h b/tests/auto/xmlpatternsview/view/FunctionSignaturesView.h
index ff02f21..8ccd346 100644
--- a/tests/auto/xmlpatternsview/view/FunctionSignaturesView.h
+++ b/tests/auto/xmlpatternsview/view/FunctionSignaturesView.h
@@ -38,47 +38,6 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Patternist project on Qt Labs.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
-** $QT_END_LICENSE$
-**
-***************************************************************************
-*/
#ifndef PatternistSDK_FunctionSignaturesView_H
#define PatternistSDK_FunctionSignaturesView_H
diff --git a/tests/auto/xmlpatternsview/view/MainWindow.h b/tests/auto/xmlpatternsview/view/MainWindow.h
index 71bfec2..9aa1d1a 100644
--- a/tests/auto/xmlpatternsview/view/MainWindow.h
+++ b/tests/auto/xmlpatternsview/view/MainWindow.h
@@ -38,47 +38,6 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Patternist project on Qt Labs.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
-** $QT_END_LICENSE$
-**
-***************************************************************************
-*/
#ifndef PatternistSDK_MainWindow_H
#define PatternistSDK_MainWindow_H
diff --git a/tests/auto/xmlpatternsview/view/TestCaseView.h b/tests/auto/xmlpatternsview/view/TestCaseView.h
index 601422d..9329242 100644
--- a/tests/auto/xmlpatternsview/view/TestCaseView.h
+++ b/tests/auto/xmlpatternsview/view/TestCaseView.h
@@ -38,47 +38,6 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Patternist project on Qt Labs.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
-** $QT_END_LICENSE$
-**
-***************************************************************************
-*/
#ifndef PatternistSDK_TestCaseView_H
#define PatternistSDK_TestCaseView_H
diff --git a/tests/auto/xmlpatternsview/view/TestResultView.h b/tests/auto/xmlpatternsview/view/TestResultView.h
index 6f5583f..006c690 100644
--- a/tests/auto/xmlpatternsview/view/TestResultView.h
+++ b/tests/auto/xmlpatternsview/view/TestResultView.h
@@ -38,47 +38,6 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Patternist project on Qt Labs.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
-** $QT_END_LICENSE$
-**
-***************************************************************************
-*/
#ifndef PatternistSDK_TestResultView_H
#define PatternistSDK_TestResultView_H
diff --git a/tests/auto/xmlpatternsview/view/TreeSortFilter.h b/tests/auto/xmlpatternsview/view/TreeSortFilter.h
index c6d9432..a083b0a 100644
--- a/tests/auto/xmlpatternsview/view/TreeSortFilter.h
+++ b/tests/auto/xmlpatternsview/view/TreeSortFilter.h
@@ -38,47 +38,6 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Patternist project on Qt Labs.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
-** $QT_END_LICENSE$
-**
-***************************************************************************
-*/
#ifndef PatternistSDK_TreeSortFilter_H
#define PatternistSDK_TreeSortFilter_H
diff --git a/tests/auto/xmlpatternsview/view/UserTestCase.h b/tests/auto/xmlpatternsview/view/UserTestCase.h
index 8da081a..39ef38e 100644
--- a/tests/auto/xmlpatternsview/view/UserTestCase.h
+++ b/tests/auto/xmlpatternsview/view/UserTestCase.h
@@ -38,47 +38,6 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Patternist project on Qt Labs.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
-** $QT_END_LICENSE$
-**
-***************************************************************************
-*/
#ifndef PatternistSDK_UserTestCase_H
#define PatternistSDK_UserTestCase_H
diff --git a/tests/auto/xmlpatternsview/view/XDTItemItem.h b/tests/auto/xmlpatternsview/view/XDTItemItem.h
index 0e0f06e..240d1bb 100644
--- a/tests/auto/xmlpatternsview/view/XDTItemItem.h
+++ b/tests/auto/xmlpatternsview/view/XDTItemItem.h
@@ -38,47 +38,6 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Patternist project on Qt Labs.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
-** $QT_END_LICENSE$
-**
-***************************************************************************
-*/
#ifndef PatternistSDK_XDTItemItem_H
#define PatternistSDK_XDTItemItem_H
diff --git a/tests/auto/xmlpatternsxqts/lib/ErrorHandler.h b/tests/auto/xmlpatternsxqts/lib/ErrorHandler.h
index c056ac4..81f4c73 100644
--- a/tests/auto/xmlpatternsxqts/lib/ErrorHandler.h
+++ b/tests/auto/xmlpatternsxqts/lib/ErrorHandler.h
@@ -38,47 +38,6 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Patternist project on Qt Labs.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
-** $QT_END_LICENSE$
-**
-***************************************************************************
-*/
#ifndef PatternistSDK_ErrorHandler_H
#define PatternistSDK_ErrorHandler_H
diff --git a/tests/auto/xmlpatternsxqts/lib/ErrorItem.h b/tests/auto/xmlpatternsxqts/lib/ErrorItem.h
index f8cfa63..be28892 100644
--- a/tests/auto/xmlpatternsxqts/lib/ErrorItem.h
+++ b/tests/auto/xmlpatternsxqts/lib/ErrorItem.h
@@ -38,47 +38,6 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Patternist project on Qt Labs.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
-** $QT_END_LICENSE$
-**
-***************************************************************************
-*/
#ifndef PatternistSDK_ErrorItem_H
#define PatternistSDK_ErrorItem_H
diff --git a/tests/auto/xmlpatternsxqts/lib/ExitCode.h b/tests/auto/xmlpatternsxqts/lib/ExitCode.h
index daed618..c23bd4b 100644
--- a/tests/auto/xmlpatternsxqts/lib/ExitCode.h
+++ b/tests/auto/xmlpatternsxqts/lib/ExitCode.h
@@ -38,47 +38,6 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Patternist project on Qt Labs.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
-** $QT_END_LICENSE$
-**
-***************************************************************************
-*/
#ifndef PatternistSDK_ExitCode_H
#define PatternistSDK_ExitCode_H
diff --git a/tests/auto/xmlpatternsxqts/lib/ExpressionInfo.h b/tests/auto/xmlpatternsxqts/lib/ExpressionInfo.h
index 3877674..973f347 100644
--- a/tests/auto/xmlpatternsxqts/lib/ExpressionInfo.h
+++ b/tests/auto/xmlpatternsxqts/lib/ExpressionInfo.h
@@ -38,47 +38,6 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Patternist project on Qt Labs.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
-** $QT_END_LICENSE$
-**
-***************************************************************************
-*/
#ifndef PatternistSDK_ExpressionInfo_H
#define PatternistSDK_ExpressionInfo_H
diff --git a/tests/auto/xmlpatternsxqts/lib/TestContainer.h b/tests/auto/xmlpatternsxqts/lib/TestContainer.h
index 91a8641..9ed87bf 100644
--- a/tests/auto/xmlpatternsxqts/lib/TestContainer.h
+++ b/tests/auto/xmlpatternsxqts/lib/TestContainer.h
@@ -38,47 +38,6 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Patternist project on Qt Labs.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
-** $QT_END_LICENSE$
-**
-***************************************************************************
-*/
#ifndef PatternistSDK_TestContainer_H
#define PatternistSDK_TestContainer_H
diff --git a/tests/auto/xmlpatternsxqts/lib/TestGroup.h b/tests/auto/xmlpatternsxqts/lib/TestGroup.h
index 6946fac..8c5cbf6 100644
--- a/tests/auto/xmlpatternsxqts/lib/TestGroup.h
+++ b/tests/auto/xmlpatternsxqts/lib/TestGroup.h
@@ -38,47 +38,6 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Patternist project on Qt Labs.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
-** $QT_END_LICENSE$
-**
-***************************************************************************
-*/
#ifndef PatternistSDK_TestGroup_H
#define PatternistSDK_TestGroup_H
diff --git a/tests/auto/xmlpatternsxqts/lib/TestItem.h b/tests/auto/xmlpatternsxqts/lib/TestItem.h
index 6d151b8..4266480 100644
--- a/tests/auto/xmlpatternsxqts/lib/TestItem.h
+++ b/tests/auto/xmlpatternsxqts/lib/TestItem.h
@@ -38,47 +38,6 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Patternist project on Qt Labs.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
-** $QT_END_LICENSE$
-**
-***************************************************************************
-*/
#ifndef PatternistSDK_TestItem_H
#define PatternistSDK_TestItem_H
diff --git a/tests/auto/xmlpatternsxqts/lib/TestSuite.h b/tests/auto/xmlpatternsxqts/lib/TestSuite.h
index 638caad..70aefc0 100644
--- a/tests/auto/xmlpatternsxqts/lib/TestSuite.h
+++ b/tests/auto/xmlpatternsxqts/lib/TestSuite.h
@@ -38,47 +38,6 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Patternist project on Qt Labs.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
-** $QT_END_LICENSE$
-**
-***************************************************************************
-*/
#ifndef PatternistSDK_TestSuite_H
#define PatternistSDK_TestSuite_H
diff --git a/tests/auto/xmlpatternsxqts/lib/TestSuiteResult.h b/tests/auto/xmlpatternsxqts/lib/TestSuiteResult.h
index 492f4ae..62d204e 100644
--- a/tests/auto/xmlpatternsxqts/lib/TestSuiteResult.h
+++ b/tests/auto/xmlpatternsxqts/lib/TestSuiteResult.h
@@ -38,47 +38,6 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Patternist project on Qt Labs.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
-** $QT_END_LICENSE$
-**
-***************************************************************************
-*/
#ifndef PatternistSDK_TestSuiteResult_H
#define PatternistSDK_TestSuiteResult_H
diff --git a/tests/auto/xmlpatternsxqts/lib/TreeItem.h b/tests/auto/xmlpatternsxqts/lib/TreeItem.h
index bebc7d3..9275828 100644
--- a/tests/auto/xmlpatternsxqts/lib/TreeItem.h
+++ b/tests/auto/xmlpatternsxqts/lib/TreeItem.h
@@ -38,47 +38,6 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Patternist project on Qt Labs.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
-** $QT_END_LICENSE$
-**
-***************************************************************************
-*/
#ifndef PatternistSDK_TreeItem_H
#define PatternistSDK_TreeItem_H
diff --git a/tests/auto/xmlpatternsxqts/lib/TreeModel.h b/tests/auto/xmlpatternsxqts/lib/TreeModel.h
index 39a3173..181f25e 100644
--- a/tests/auto/xmlpatternsxqts/lib/TreeModel.h
+++ b/tests/auto/xmlpatternsxqts/lib/TreeModel.h
@@ -38,47 +38,6 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Patternist project on Qt Labs.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
-** $QT_END_LICENSE$
-**
-***************************************************************************
-*/
#ifndef PatternistSDK_TreeModel_H
#define PatternistSDK_TreeModel_H
diff --git a/tests/auto/xmlpatternsxqts/lib/XSLTTestSuiteHandler.h b/tests/auto/xmlpatternsxqts/lib/XSLTTestSuiteHandler.h
index eb9d604..8447cff 100644
--- a/tests/auto/xmlpatternsxqts/lib/XSLTTestSuiteHandler.h
+++ b/tests/auto/xmlpatternsxqts/lib/XSLTTestSuiteHandler.h
@@ -38,47 +38,6 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Patternist project on Qt Labs.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
-** $QT_END_LICENSE$
-**
-***************************************************************************
-*/
#ifndef PatternistSDK_XSLTTestSuiteHandler_H
#define PatternistSDK_XSLTTestSuiteHandler_H
diff --git a/tests/auto/xmlpatternsxqts/lib/tests/XMLWriterTest.h b/tests/auto/xmlpatternsxqts/lib/tests/XMLWriterTest.h
index 5314a10..b8ff3ad 100644
--- a/tests/auto/xmlpatternsxqts/lib/tests/XMLWriterTest.h
+++ b/tests/auto/xmlpatternsxqts/lib/tests/XMLWriterTest.h
@@ -38,47 +38,6 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Patternist project on Qt Labs.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
-** $QT_END_LICENSE$
-**
-***************************************************************************
- */
#ifndef PatternistSDK_XMLWriterTest_H
#define PatternistSDK_XMLWriterTest_H
diff --git a/tests/benchmarks/qanimation/dummyanimation.h b/tests/benchmarks/qanimation/dummyanimation.h
index fe6592b..6318a32 100644
--- a/tests/benchmarks/qanimation/dummyanimation.h
+++ b/tests/benchmarks/qanimation/dummyanimation.h
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
#include <QtGui>
#ifndef _DUMMYANIMATION_H__
@@ -16,4 +57,4 @@ private:
DummyObject *m_dummy;
};
-#endif \ No newline at end of file
+#endif
diff --git a/tests/benchmarks/qanimation/dummyobject.h b/tests/benchmarks/qanimation/dummyobject.h
index c989662..bf5b60c6 100644
--- a/tests/benchmarks/qanimation/dummyobject.h
+++ b/tests/benchmarks/qanimation/dummyobject.h
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
#include <QtGui>
#ifndef _DUMMYOBJECT_H__
@@ -20,4 +61,4 @@ private:
};
-#endif \ No newline at end of file
+#endif
diff --git a/tests/benchmarks/qanimation/rectanimation.h b/tests/benchmarks/qanimation/rectanimation.h
index 99b82b4..5e088ea 100644
--- a/tests/benchmarks/qanimation/rectanimation.h
+++ b/tests/benchmarks/qanimation/rectanimation.h
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
#include <QtGui>
#ifndef _RECTANIMATION_H__
diff --git a/tests/benchmarks/qscriptvalue/tst_qscriptvalue.cpp b/tests/benchmarks/qscriptvalue/tst_qscriptvalue.cpp
index 904674e..b637591 100644
--- a/tests/benchmarks/qscriptvalue/tst_qscriptvalue.cpp
+++ b/tests/benchmarks/qscriptvalue/tst_qscriptvalue.cpp
@@ -68,6 +68,7 @@ private slots:
void toQObject();
void property();
void setProperty();
+ void propertyFlags();
};
tst_QScriptValue::tst_QScriptValue()
@@ -189,5 +190,16 @@ void tst_QScriptValue::setProperty()
}
}
+void tst_QScriptValue::propertyFlags()
+{
+ QScriptEngine engine;
+ QScriptValue obj = engine.newObject();
+ QString propertyName = QString::fromLatin1("foo");
+ obj.setProperty(propertyName, 123, QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
+ QBENCHMARK {
+ (void)obj.propertyFlags(propertyName);
+ }
+}
+
QTEST_MAIN(tst_QScriptValue)
#include "tst_qscriptvalue.moc"
diff --git a/tests/manual/qimagereader/Qt_logostrap_CMYK.jpg b/tests/manual/qimagereader/Qt_logostrap_CMYK.jpg
new file mode 100644
index 0000000..6a7bb1f
--- /dev/null
+++ b/tests/manual/qimagereader/Qt_logostrap_CMYK.jpg
Binary files differ
diff --git a/tests/manual/qimagereader/main.cpp b/tests/manual/qimagereader/main.cpp
new file mode 100644
index 0000000..a17c203
--- /dev/null
+++ b/tests/manual/qimagereader/main.cpp
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+class MyWidget : public QWidget
+{
+public:
+ MyWidget(QWidget * parent, const QString &imagefname, bool scaleImage)
+ : QWidget(parent), fileName(imagefname), scale(scaleImage)
+ {
+
+ }
+
+ virtual void paintEvent(QPaintEvent * /*event*/)
+ {
+ QPainter painter(this);
+ QImageReader reader(fileName);
+ if (!reader.canRead()) {
+ qWarning("Unable to read image file %s", fileName.toLocal8Bit().constData());
+ return;
+ }
+ if (!scale){
+ QImage image = reader.read();
+ painter.drawImage(rect(), image);
+ }else{
+ reader.setScaledSize( QSize(rect().width(), rect().height()) );
+ QImage image = reader.read();
+ painter.drawImage(rect(), image);
+ }
+ }
+
+private:
+ QString fileName;
+ bool scale;
+
+};
+
+
+
+// both the scaled and unscaled version of the CMYK encoded JPEG
+// should have the same colors and not look corrupted.
+
+int main(int argc, char** argv)
+{
+ QApplication app(argc, argv);
+
+ QWidget mainWidget;
+ mainWidget.setWindowTitle("Colors in images are identical?");
+ mainWidget.setMinimumSize(400,400);
+ QHBoxLayout *l = new QHBoxLayout;
+ MyWidget *w1 = new MyWidget(&mainWidget,"Qt_logostrap_CMYK.jpg", false);
+ MyWidget *w2 = new MyWidget(&mainWidget,"Qt_logostrap_CMYK.jpg", true);
+ l->addWidget(w1);
+ l->addWidget(w2);
+ mainWidget.setLayout(l);
+ mainWidget.show();
+
+ return app.exec();
+}
+
diff --git a/tests/manual/qimagereader/qimagereader.pro b/tests/manual/qimagereader/qimagereader.pro
new file mode 100644
index 0000000..b8293b9
--- /dev/null
+++ b/tests/manual/qimagereader/qimagereader.pro
@@ -0,0 +1,8 @@
+
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+SOURCES += main.cpp
diff --git a/tests/manual/qtabletevent/tabletwidget.h b/tests/manual/qtabletevent/tabletwidget.h
index b0efef2..b16e9ed 100644
--- a/tests/manual/qtabletevent/tabletwidget.h
+++ b/tests/manual/qtabletevent/tabletwidget.h
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
#ifndef TABLETWIDGET_H
#define TABLETWIDGET_H
diff --git a/tests/manual/qtouchevent/touchwidget.h b/tests/manual/qtouchevent/touchwidget.h
index 2726deb..7f7e0ff 100644
--- a/tests/manual/qtouchevent/touchwidget.h
+++ b/tests/manual/qtouchevent/touchwidget.h
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
#ifndef TOUCHWIDGET_H
#define TOUCHWIDGET_H
diff --git a/tools/linguist/tests/tst_linguist.h b/tools/linguist/tests/tst_linguist.h
index 27a53bb..60902ad 100644
--- a/tools/linguist/tests/tst_linguist.h
+++ b/tools/linguist/tests/tst_linguist.h
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
#ifndef TST_LINGUIST
#define TST_LINGUIST
diff --git a/tools/xmlpatterns/main.h b/tools/xmlpatterns/main.h
index cccf4a7..10ab6cb 100644
--- a/tools/xmlpatterns/main.h
+++ b/tools/xmlpatterns/main.h
@@ -1,9 +1,11 @@
/****************************************************************************
- * ** * ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Nokia Corporation (qt-info@nokia.com)
- * **
- * ** This file is part of the Patternist project on Qt Labs. * **
- * ** $QT_BEGIN_LICENSE:LGPL$
+**
+** This file is part of the XMLPatterns module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
@@ -34,11 +36,8 @@
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
- * **
- * ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- * **
- * ****************************************************************************/
+**
+****************************************************************************/
//
// W A R N I N G
diff --git a/tools/xmlpatterns/qcoloringmessagehandler_p.h b/tools/xmlpatterns/qcoloringmessagehandler_p.h
index d03a062..57553dc 100644
--- a/tools/xmlpatterns/qcoloringmessagehandler_p.h
+++ b/tools/xmlpatterns/qcoloringmessagehandler_p.h
@@ -1,9 +1,11 @@
/****************************************************************************
- * ** * ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Nokia Corporation (qt-info@nokia.com)
- * **
- * ** This file is part of the Patternist project on Qt Labs. * **
- * ** $QT_BEGIN_LICENSE:LGPL$
+**
+** This file is part of the XMLPatterns module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
@@ -34,11 +36,8 @@
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
- * **
- * ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- * **
- * ****************************************************************************/
+**
+****************************************************************************/
//
// W A R N I N G
diff --git a/tools/xmlpatterns/qcoloroutput_p.h b/tools/xmlpatterns/qcoloroutput_p.h
index 49a515e..0d7eb8b 100644
--- a/tools/xmlpatterns/qcoloroutput_p.h
+++ b/tools/xmlpatterns/qcoloroutput_p.h
@@ -1,9 +1,11 @@
/****************************************************************************
- * ** * ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Nokia Corporation (qt-info@nokia.com)
- * **
- * ** This file is part of the Patternist project on Qt Labs. * **
- * ** $QT_BEGIN_LICENSE:LGPL$
+**
+** This file is part of the XMLPatterns module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
@@ -34,11 +36,8 @@
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
- * **
- * ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- * **
- * ****************************************************************************/
+**
+****************************************************************************/
//
// W A R N I N G
diff --git a/util/qlalr/examples/qparser/qparser.h b/util/qlalr/examples/qparser/qparser.h
index e3ff61d..f630221 100644
--- a/util/qlalr/examples/qparser/qparser.h
+++ b/util/qlalr/examples/qparser/qparser.h
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QLALR module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
#ifndef QPARSER_H
#define QPARSER_H