summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/android/src/opengl
Commit message (Collapse)AuthorAgeFilesLines
* Support multiple native surfaces on Android.BogDan Vatra2014-01-177-715/+0
| | | | | | | | | | | | | | | | Support for multiple native surfaces is needed by applications that need to mix raster windows with GL windows. Rework the raster and opengl implementation, get rid of eglfs and fbconvenience dependencies. Create a single android platform plugin. [ChangeLog][Android] Rework the raster and opengl implementation. [ChangeLog][Android] Create a single android platform plugin. Task-number: QTBUG-34650 Change-Id: I9b1ab51554823329dda8cfbf8fef27c38f917c7b Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Android: Fix menu on API-11+BogDan Vatra2013-11-061-0/+2
| | | | | | | | | | | On API-11+ if there is no hardware menu button show the action bar. Fix menu when using the opengl android plugin. Task-number: QTBUG-32002 Change-Id: I45bd49107621e4cab85eb6411897229e20bb8281 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Differ between ShowMaximized and ShowFullScreenEskil Abrahamsen Blomfeldt2013-11-014-0/+149
| | | | | | | | | | | | The default is now ShowMaximized which behaves as it did before, i.e. each window will fill the screen but the status bar will be visible. Calling showFullScreen() explicitly will now hide the status bar to maximize the amount of screen real estate occupied by the application. Task-number: QTBUG-33135 Change-Id: If0d0a2ab72f8026e76818290e2b953dbc0dec156 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Check for null pointer before calling ANativeWindow_release()Christian Strømme2013-11-011-1/+2
| | | | | | | | | | Calling ANativeWindow_release() with a null pointer will cause a SIGSEGV. Task-number: QTBUG-33955 Change-Id: If7d1afa3baea04360507eec5042b4e18a0272527 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Android: Fix repaint on rotationEskil Abrahamsen Blomfeldt2013-10-253-2/+7
| | | | | | | | | | | | | After f89f099c55576992b39a8021aace64ff32747624, we no longer post a geometry-change and expose event when calling setGeometry, which the Android plugin depended on. This caused the window to stay the same size when it was resized by orientation changes. We put back the events in the code that calls setGeometry() instead. Task-number: QTBUG-32878 Change-Id: I449515dda07c839e0991c5a7031a972ca9c74dff Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Fix android after Eglfs binary compatibility breakPaul Olav Tvete2013-09-201-2/+3
| | | | | Change-Id: I95d98b475188b43f1e0946c7ad6fd2388839d619 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Android: handle inverted orientationsPaul Olav Tvete2013-09-201-0/+11
| | | | | | | | | | Add logic to detect InvertedPortrait and InvertedLandscape orientations and implement QPlatformScreen::nativeOrientation() for Android. Task-number: QTBUG-32144 Change-Id: I294506714ea0faa9eacd7a15e1cfc45342659964 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Make font size compatible with Qt for iOSPaul Olav Tvete2013-09-121-1/+1
| | | | | | | | | | | | We recommend using pixel sizes for predictable results. For those who use point sizes in their UIs, we will now give them results that look similar to what we do on iOS. The default font is changed to give the same size as before this change. Task-number: QTBUG-32096 Change-Id: Ia25506ba721a39d31340f3df8bc14129e507af14 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Sergio Ahumada2013-09-102-3/+20
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/stable' into devSergio Ahumada2013-09-072-3/+20
| |\ | | | | | | | | | Change-Id: I9ee4176f0a0078908d49896508826154c9f71530
| | * Merge remote-tracking branch 'origin/release' into stableSergio Ahumada2013-08-282-3/+20
| | |\ | | | | | | | | | | | | Change-Id: I815757e33b6c0b1e702c8e386e8e30307f78e318
| | | * Android: Fix orientation change on Android 4.3Eskil Abrahamsen Blomfeldt2013-08-192-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Android 4.3, we will get a new native window pointer for the same surface (the old surface has not been destroyed), whereas before we would get the same pointer, thus hitting the "sameNativeWindow" branch. This revealed some bugs in the surfaceChanged code path when the old surface had not been destroyed. This path is now taken both when there's no old surface (the app has been suspended in the mean time) and when the orientation changes. To handle the second case, we need to make sure: 1. We update the static pointer 2. We update the pointers in the platform windows 3. We don't add a second reference to the static data for windows 4. We schedule an update of the window size Task-number: QTBUG-32878 Change-Id: I47257615f9ba820315fc98d7a804e52223f430bf Reviewed-by: Christian Stromme <christian.stromme@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | | | Android: Fix unused variable/argument warningsEskil Abrahamsen Blomfeldt2013-09-091-0/+1
|/ / / | | | | | | | | | | | | | | | | | | There were a bunch of these in Android specific code. Change-Id: Icf6cda40302171810c1b559f9d442fba6444a3a5 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Sergio Ahumada2013-09-021-1/+0
|\| | | | | | | | | | | refs/staging/dev
| * | Android: Remove EGL_BAD_SURFACE warning on suspensionEskil Abrahamsen Blomfeldt2013-08-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When suspending the app we would destroy the surface twice, causing libEGL to output a warning on the second attempt. We would also destroy the surface before all references were released which is not 100% nice. We don't need to call the super class implementation at all, since we are managing the EGL surface ourselves. Change-Id: Ie1ab2ea8561d0018b5f16ac8cdf3296313a0a92c Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* | | Android: added ApplicationState capability.Yoann Lopes2013-08-281-0/+6
|/ / | | | | | | | | | | | | | | | | | | | | | | The application state is tied to the QtActivity lifecycle. Mapping of states between Android and Qt is as follows: onResume --> ApplicationActive onPause --> ApplicationInactive onStop --> ApplicationSuspended Change-Id: Iefef08d6c7a7fde28fba1f4886882458cda6a0c0 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* / Add workaround for GL on Android emulatorEskil Abrahamsen Blomfeldt2013-07-292-0/+16
|/ | | | | | | | | | | | On the Android Emulator, the shaders will be compiled by a desktop GL driver, since the GL driver in the emulator is just a thin wrapper. The GL driver does not necessarily support the precision qualifiers, which can cause applications to break. We detect this at runtime in the platform plugin and set a workaround flag to Task-number: QTBUG-32557 Change-Id: Ied00cfe8e804d1f7862697dd379a14f3bed3d980 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Never show EGLFS mouse cursor in Qt for Android platform pluginEskil Abrahamsen Blomfeldt2013-05-201-0/+7
| | | | | | | | | | | | | The hack to use the environment variable for turning off the mouse cursor is broken when running against Ministro, because Ministro does not pass the environment on. A better solution is to make it possible to turn the cursor in the EGLFS plugin off in the hooks instead. Task-number: QTBUG-30553 Change-Id: Id09b48c350d2c95de9bb174f7480cf0cd2bf8145 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Android: Don't crash when displaying multiple top-levelsEskil Abrahamsen Blomfeldt2013-04-184-8/+78
| | | | | | | | | | | | | | | | | | | | | | While the raster platform plugin supports multiple top level windows, this is not supported on the GL plugin, so if you use GL or QtQuick2 in your app and use several top levels, the app would crash with an error message. A problem is that the top-level SurfaceView is a special overlay View and does not support being stacked in a layout. So instead, we let all windows share the same GL surface and draw on top of each other. This works fine for simple use cases. We implement a new platform capability to make sure no top level windows (even combobox popups and dialogs) get non-fullscreen geometries. That has never worked properly with the eglfs plugin. Task-number: QTBUG-30473 Change-Id: Ia1438019638fc739cc93ffe79b46b81631254df2 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Android: set logicalDpi based on DisplayMetrics.scaledDensityPaul Olav Tvete2013-04-051-0/+7
| | | | | | | | | | | | | | The mathematically correct way would be to set logicalDPi to 160*scaledDensity, but then a 12 pt font would be gigantic. On iOS, we use a factor of 72 to be compatible with the native APIs, but that means that a 12 pt font is very small. A factor of 100 means that desktop apps look reasonable by default. Task-number: QTBUG-29674 Change-Id: I607f110150fb95685a6980b92f6f92f2b489f959 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Introducing the Qt Android portPaul Olav Tvete2013-03-055-0/+423
Based on the Necessitas project by Bogdan Vatra. Contributors to the Qt5 project: BogDan Vatra <bogdan@kde.org> Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> hjk <hjk121@nokiamail.com> Oswald Buddenhagen <oswald.buddenhagen@digia.com> Paul Olav Tvete <paul.tvete@digia.com> Robin Burchell <robin+qt@viroteck.net> Samuel Rødal <samuel.rodal@digia.com> Yoann Lopes <yoann.lopes@digia.com> The full history of the Qt5 port can be found in refs/old-heads/android, SHA-1 249ca9ca2c7d876b91b31df9434dde47f9065d0d Change-Id: Iff1a7b2dbb707c986f2639e65e39ed8f22430120 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>