Apparently, the Linux Perf Counter is not supported on Android.
Change-Id: I38115d140a3ee783bfcd8a984d8832ffe5bbace4
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
The GLX_EXT_create_context_es2_profile extension allows us to create
OpenGL ES profiles even under a desktop OpenGL implementation.
Therefore, if a OpenGL ES renderable type is requested, and we have
that extension, we can fullfill the request.
We also strenghten the renderable types that the XCB plugin
supports (default, OpenGL, OpenGL ES).
Change-Id: I94ecbbaa910ab4c6d71185a69640e79594cb7bdc
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Move this code to QPlatformFontDatabase and get rid of all dups of it.
Change-Id: Idea6c84819039bf3b345b1305305951ade8d1ac4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Change-Id: If43c7b1cfdee504171a26b07db2ade9c20528299
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
QOpenGLTimerQuery encapsulates a single OpenGL timer query object.
QOpenGLTimeMonitor is a convenience wrapper around a sequence of
OpenGL timer query objects that can be used to profile OpenGL
rendering code or to allow real-time adaptation of rendering
methods based upon run-time performance.
Change-Id: I873e591927080dea2b079b0e2a1eb9fed15c0372
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: James Turner <james.turner@kdab.com>
If the widget is larger than the screen,
its title bar top left corner will be shown
inside the screen.
Task-number: QTBUG-30142
Change-Id: Id93773874be3616b3ef4b9bee6e1bb751c541d7b
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
This adds (amongst other things) the support for the
GL_KHR_debug extension, which is required by QOpenGLDebug
classes.
Change-Id: Id8b80968807e4f3db7eebd8cc9d9beae23b5d7e2
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
It turns out that we were setting the error handler to a dummy one in
qxcbconnection.cpp, but GTK then overrides it to an handler that calls
exit(1) on errors. This causes problems as we are relying on the
glXCreateContextAttribsARB call to fail when creating an OpenGL context,
so we need to reset the handler after GTK initialization.
Change-Id: I9bc3eb2480abfd3740884cb0000b9180d2cf37a5
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Consider the following situation:
- threads A and B have shallow copies of the same QRegularExpression
- threads A and B both call match() on a string
- thread A calls optimizePattern(), which doesn't optimize
- thread B calls optimizePattern(), which does optimize, and sets
studyData
- thread A uses studyData (set by B)
A needs to properly acquire the memory pointed by studyData
(which, in turn, needs to be released by B). This commit implements that.
(Before, we used to return a copy of the current studyData from
optimizePattern(), so A didn't see that B optimized the pattern
and set studyData).
Change-Id: I9e4741a3d3229905c247491a07099519815680bb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: Icd5fdfeea8e2642ee68ec1811c6a6ce9205b7e00
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
This adds support for specifying a paper name which will be set on
the printer if it is available for the driver.
Change-Id: Id7fd0c8cf68745db3d7a8de7e2ac98d3e2ba9b79
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
We do not currently have shared memory or system semaphore support
on Android.
Change-Id: I8e8f3fc6ff8d6de0333002c3e1b31cf070416dbd
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Android is not a proper Linux, and in particular it does not have
pthread_yield().
Change-Id: Ibf94cfacdc24d0c3baaef002c64f9f50c72c01d2
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
This broke the build on Android where fileno returns a short.
Change-Id: Ic8d32380078faeedcd22e785a912fede28251156
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Now that we do not support Android versions below API level 9, we
can use the modern multi-touch functions.
Change-Id: I5887b4c35f9e02089a334526cebecf0cf767bd6c
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
The touch events were collected but then thrown away because of
a missing port of he handleTouchEvent() function call.
Task-number: QTBUG-29126
Change-Id: I02f7380945be04a36da14a89f2f3ff9429b17cbc
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
It is unused in the source code and replaced by Q_OS_LINUX,
Q_OS_ANDROID and Q_OS_ANDROID_NO_SDK depending on usecase.
Change-Id: If8d561540e7583fbac83c0f3506f219c4433e847
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
First of all, we were missing an implementation of SLJIT_CACHE_FLUSH,
as ___clear_cache was not available and we would get missing symbols.
This was fixed in upstream PCRE 8.31, but even then the JIT would
only work on jailbroken devices, so we disable it.
http://bugs.exim.org/show_bug.cgi?id=1243
Change-Id: I678f9a31eb76d7d08882465befb9d799e46e7cf8
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Introduced Q_OS_ANDROID_NO_SDK which makes more sense than
Q_OS_LINUX_ANDROID when Q_OS_ANDROID also defines Q_OS_LINUX.
Change-Id: Id2aa228b66daffba82776a12c91a264a360afd86
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
QMetaObject::connectSlotsByName(QObject* o) creates a list of all
children to look for signals that match slots of o. This changeset
simply adds the object o itself to that list.
The motivation is to finally fix the long standing QtCreator bug
QTCREATORBUG-6494. Where executing 'Go to slot...' and choosing
'accepted()' for a simple QDialog named 'MyDialog' will add a
on_MyDialog_accepted() slot to MyDialog. That slot never gets
connected. More details may be found in the linked QTBUG-7595.
Task-number: QTBUG-7595
Task-number: QTCREATORBUG-6494
Change-Id: I35f52761791af697eabb569adb5faee6fae50638
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Since we currently implement only half of the XEMBED protocol (we lack
the container part), we use a simple XEMBED container built with Gtk+
and PyObject. Using an interpreted language as Python helps us avoiding
a build dependency on Gtk+.
Change-Id: Ibc6282371c6f767e481c8a8ba2b5ca9cdd0d8b82
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
In case somebody uses QVector as a stack, it is not fair to have
takeLast, removeLast and pop_back to do way too much work.
This is still very slow compared to std::vector::pop_back
(mostly due implicit sharing), however it is more than a
factor faster than before.
Change-Id: I636872675e80c8ca0c8ebc94b04f587a2dcd6d8d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This patch adds takeFirst and takeLast which are functions
that QList also has.
Change-Id: I761f90b529774edc8fa96e07c6fcf76226123b20
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This patch adds the functions removeFirst() and removeLast().
Functions that QList has.
Beside making these functions, pop_back and pop_front are
redirected to these rather than calling erase.
Change-Id: Ifc5f8a78e33f436f06f21095a920ec5d4311fd6f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Five attributes are supported, matching what the perf(1) tool
supports. The 'p' attribute (precise IP reporting) wasn't added
because we don't do assembly-level debugging with benchlib.
Change-Id: I726f735a5bcc0c97e62cde0fbe0843597068ad7c
Reviewed-by: Jason McDonald <macadder1@gmail.com>
This will allow us to modify more attributes from the command-line
Change-Id: I84d4933cbfa2b69c4e1009eaf3e005cfc3e7e01c
Reviewed-by: Jason McDonald <macadder1@gmail.com>
This adds support for checking cache accesses and misses, per
operation (read, write and prefetch) as well as per cache level (L1
for data, L1 for instructions, last level).
The branch prediction unit (BPU) is also accessed via the cache
monitor subsystem.
Change-Id: I8fa96b141cc777c9d231bd57fa36bca33ae7bdfd
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Added support for most hardware and software counters available on
Linux 3.3. The cache-based counters are missing because they need
special handling.
Also added an option that lists available counters. Note that the list
is of counters the library knows about, not the counters that the
hardware can measure.
Change-Id: I9f6fb09b5460bf4ac6082081611c1d6ff806a3fa
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Currently, we only support one event type: counting CPU cycles with
hardware counters. There are no fallbacks if this hardware counter is
not available, and there is currently no way to specify other
counters.
Benchlib only supports reporting one event per benchmark, even though
the event counter interface allows specifying more than one. Still,
the hardware usually has limitations on how many events it can monitor
at a time, and we'd prefer to have the counter running at 100% of the
time, so this will not change.
Change-Id: I79858a3ad1e696dc4b7b72c420e5a04b67cd55de
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Currently, it only prints "perf available" if you use the -perf option
and perf is available. The implementation comes in the next commits.
Change-Id: Ic6cdee70e21df25780799a4bc31ca2c2d923b9f8
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Imported from linux's own git, at v3.7:include/uapi/linux/perf_event.h
(blob SHA-1 is 4f63c05d27).
We cannot rely on the file being shipped by distributions. Older
versions did not have all fields in the perf_event_attr structure. If
those bits are enabled at runtime, the kernel will simply reject the
perf_open call (-EINVAL). Currently, this can only happen with the
non-default options exclude_guest and exclude_host.
Change-Id: Ib329e52c21d6969406da0cf33de823d721d94206
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
QKeySequence provides conversion to and from strings. But a similar
convenience was missing for QList<QKeySequence>. It would come in handy
when you want for instance to save/restore the shortcuts of a QAction.
Change-Id: I9e4f2001c58a595392a5019a57c564992c39bf88
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: David Faure (KDE) <faure@kde.org>
I changed the existing test-case code to make it more scalable
in terms of adding more connectSlotsByName related tests. The
old "manual list of ints"-method was really not developer friendly.
This is a preparation for a subsequent modification of
connectSlotsByName behavior.
Change-Id: Ib760e52631ce4b5ae2a3ebdb4854849ff6c93bfe
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Introduce function to retrieve HDC with transformation.
Paint Vista-style items at correct location when used
as a child widget (for example, in Qt Designer).
Disable special drawing that works only for top-levels.
Task-number: QTBUG-29904
Change-Id: Ic902fd30e8050317b24ab7f7e2757ef1e16407f9
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>