| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
There are tiny rounding errors in the matrix rotations which cause tiny
differences in drawText() and drawStaticText(). I've chosen to ignore
these. Instead of having a threshold on the comparison between the two
images, I've chosen to take the easy way out and avoid the problem by
not passing in any position for the text.
|
|
|
|
|
|
| |
Instead of translating each position manually afterwards, just have
the matrix do it when calculating the positions inside
getGlyphPositions().
|
|
|
|
|
|
| |
We need to transform the position of the text in accordance with the
painter's matrix. Also, use state->matrix directly instead of calling
a function to get it.
|
|
|
|
|
| |
Most of these tests currently fail revealing som offset bugs in the
painting code.
|
|
|
|
|
| |
Remove a private include which was unresolvable in autotests (because
it indirectly included a 3rdparty header) and add Q_AUTOTEST_EXPORT.
|
|
|
|
| |
Clarify the use of transformations combined with static texts.
|
|
|
|
|
|
|
|
|
|
| |
1. Support transformations on the painter in drawStaticText().
Transforming the painter will cause the text layout to be recalculated,
except for translations, which are handled by shifting the position of
the text items.
2. Make const length arrays of the internal data in QStaticTextItem in
order to minimize the memory consumption.
|
|
|
|
|
|
|
|
|
|
|
| |
By caching the results of getGlyphPositions() we can make a code path
in the critical paint engines which is optimal both in space and speed.
The engines where speed is of less importance (pdf engine etc.) which
may need more information, we choose the slower code path of drawText()
which lays out the text again. We should have optimal paths in raster,
vg and GL2 paint engines. The others are less important. Memory
consumption of static text is now 14 bytes per glyph, 8 bytes per item
and a static overhead of 40 bytes per QStaticText object.
|
|
|
|
|
|
|
| |
The const-specifier on the char format was unecessary, and made the
operator= implementation ugly, so it has been removed.
Reviewed-by: Simon Hausmann
|
|
|
|
|
|
|
| |
drawText() that renders into a QRect will clip the text (unless
otherwise set by the text flags passed to the function.) In
drawStaticText() we should do the same for identical behavior. We also
need to respect the font set on the QStaticText object.
|
|
|
|
|
| |
Tests that QStaticText rendering is identical to the same operations
done with regular QPainter::drawText()
|
|
|
|
|
|
|
| |
Put back maximumSize property in QStaticText to allow matching calls
to drawText with a target rectangle. Implementation is done by
having a dummy paint engine which records the calls to drawTextItem()
and storing these, then replaying them later.
|
|
|
|
|
|
|
| |
Don't use QVector to store the text items, but put them in a regular
array for quick access.
drawStaticText() is now about 2.7 times the speed of drawText().
|
|
|
|
| |
Also clone the offsets structure into the new QGlyphLayout.
|
|
|
|
|
|
|
| |
The engine.layoutData's glyph count is the number allocated, which may
be larger than the actual number of glyphs. To minimize the space needed
we base allocation on "used" which contains the number of glyphs
actually used to represent the text.
|
|
|
|
|
|
|
| |
QTextLayout takes a lot of memory. We can get a bigger speed-up and
a more reasonable memory consumption by only supporting the single
line static texts and caching the text items. We need to copy some
structs from the text engine, since this is on the stack.
|
| |
|
| |
|
|
|
|
| |
Q_DECLARE_PRIVATE requires d_ptr to be a QFooPointer<>-object.
|
|
|
|
|
| |
Adds copy constructor, operator==, operator= and operator!= to
QStaticText. Implemented using an implicitly shared private object.
|
|
|
|
|
| |
The QStaticText(QString) constructor has been replaced by a constructor
with defaults for the additional arguments
|
|
|
|
|
|
| |
People should be able to initialize the QStaticText lazily, or change
its data after instantiation. Each of the setters will recalculate the
layout to make sure it's always in sync.
|
| |
|
|
|
|
|
| |
Adds the integer based overloads as inline functions, same as for
QPainter::drawText().
|
|
|
|
|
| |
The rectangle should clip the text vertically and break lines
horizontally, to mirror behavior of QPainter::drawText().
|
|
|
|
|
| |
Support to mirror drawText(QRectF, QString). Instead of a rect you give
the text a static size and then paint it to an arbitrary point later on.
|
|
|
|
| |
Trailing spaces and an extra line of whitespace.
|
|
|
|
|
| |
To mirror the behavior of drawText() the y-position origin should be the
baseline of the text.
|
|
|
|
|
| |
Not much to gain by going directly to the QTextEngine, and the code
is a lot simpler if we just use the QTextLayout instead.
|
|
|
|
|
|
|
|
|
| |
Much of the time in drawText() is used on text layouting, which is
wasted time when the text is not updated every frame. QStaticText is
meant to cache the relevant parts of this work. It currently uses
a copy-paste of the layout code in QPainter::drawText() and 99% of the
time in QPainter::drawStaticText() is spent in drawTextItem(). We can
use QTextLayout here instead without losing much.
|
|
|
|
|
|
|
| |
Make sure we always use the absolute path to the pro file so it will
just work from either source or build dir.
This fixes the usecase where qmake generated a relative path starting
with '..'
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Using renderPixmap() with scenes that contained textures might not work
due to the wrong texture format being used under certain circumstances.
Task-number: QTBUG-7213
Reviewed-by: Gunnar
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
Fix rules for recreating the Makefile in a subdir
Disable some tests that require high floating point precision.
Replace the truncate function with fuzzierCompare().
Rework how Qt handles GL extensions.
More changelog additions for QtWebKit
Make compile on symbian/Linux
Removed pointless image comparison in raster colorize filter.
Improved performance of translating device coordinate graphics effects.
|
| | |\
| | | |
| | | |
| | | |
| | | | |
Conflicts:
dist/changes-4.6.1
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The code generated would always create the Makefile in the sourcedir, even
if you had src!=build
Reviewed-By: Thiago
|
| | | |
| | | |
| | | |
| | | | |
Disable them if sizeof(qreal)==4
|
| | |\ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Qt used to store the GL extensions a particular implementation supported
in a global cache, which was initialized once and never updated.
This could cause problems because different types of context might
support different kinds of extensions (e.g. the difference between
sw and hw contexts). With this patch, the GL extensions are cached
and updated within each QGLContext. It also makes the extension
initialization lazy, which saves application initialization costs for
embedded platforms.
The patch introduces a internal cross platform QGLTemporaryContext
class that is used to create a light-weight GL context without going
via QGLWidget and friends (QWS and WinCE still have QGLWidget fallbacks
for now).
Reviewed-by: Kim
Reviewed-by: Samuel
|
| | | | |
| | | | |
| | | | |
| | | | | |
Reviewed-by: Trust me
|
| | | | |
| | | | |
| | | | |
| | | | | |
symbian headers on Linux are lowercase and this should work on Windows too.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This test is meant to check whether the grayscale operation is done
in-place or not.
Task-number: QTBUG-6901
Reviewed-by: Bjørn Erik Nilsen
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Don't invalidate the cache if we're only translating and the effect rect
is fully contained within the device rect of the painter.
Task-number: QTBUG-6901
Reviewed-by: Bjørn Erik Nilsen
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
truncate did a qRound of the two numbers, which could cause two numbers
that were close to become far away (e.g. (0.000049 and 0.000051 would
become 0 and 1 respectively)
fuzzierCompare allows less precision than qFuzzyCompare. This is because
the anchor layout engine can sometimes do quite a lot of calculations,
and the error will be larger than what the qFuzzyCompare checks for.
Thus, the factor in fuzzierCompare is not chosen due to mathematical
proof but rather it is just chosen by what is acceptable.
(actually it can still be larger and still be acceptable)
|
| |\ \ \ \
| | |_|_|/
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/qt-multimedia-team:
Revert "Frequency to SampleRate and channels to channelCount." missed
Revert "Frequency to SampleRate and channels to channelCount."
Revert "Added setChannelCount() to QAudioFormat."
|
| | |\ \ \
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/qt-multimedia-team:
Revert "Frequency to SampleRate and channels to channelCount." missed
Revert "Frequency to SampleRate and channels to channelCount."
Revert "Added setChannelCount() to QAudioFormat."
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
unit test.
This reverts commit 80d4a4945d3273a4b2ce91e34597533f661af320.
unit test missed on last revert.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This reverts commit 80d4a4945d3273a4b2ce91e34597533f661af320.
Conflicts:
examples/multimedia/audioinput/audioinput.cpp
examples/multimedia/audiooutput/audiooutput.cpp
src/multimedia/audio/qaudio_mac.cpp
src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp
src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp
src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp
src/multimedia/audio/qaudioformat.h
src/multimedia/audio/qaudioinput.cpp
src/multimedia/audio/qaudiooutput.cpp
tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp
tests/auto/qaudioformat/tst_qaudioformat.cpp
tests/auto/qaudioinput/tst_qaudioinput.cpp
tests/auto/qaudiooutput/tst_qaudiooutput.cpp
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This reverts commit f124538ef4840c3d24b4c7e9e7221adb52bdee2c.
Conflicts:
examples/multimedia/audioinput/audioinput.cpp
examples/multimedia/audiooutput/audiooutput.cpp
src/multimedia/audio/qaudio_mac.cpp
src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp
src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp
src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp
src/multimedia/audio/qaudioformat.h
src/multimedia/audio/qaudioinput.cpp
src/multimedia/audio/qaudiooutput.cpp
tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp
tests/auto/qaudioformat/tst_qaudioformat.cpp
tests/auto/qaudioinput/tst_qaudioinput.cpp
tests/auto/qaudiooutput/tst_qaudiooutput.cpp
|
| |\ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public:
Use MMP keyword, not compiler flags, to update FPU option on Symbian
|