summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/android/androidjnimain.cpp
diff options
context:
space:
mode:
authorBogDan Vatra <bogdan@kde.org>2014-02-18 15:31:38 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-22 14:35:33 +0100
commit26a5727f75c7666e257c930af4cc67081ef1f6d6 (patch)
treed568ab91ef25042d6291cd09d62d4d88aba89d23 /src/plugins/platforms/android/androidjnimain.cpp
parent0febd75d5242653be3202ea0e46ed6107e4333bd (diff)
Make full use of QT_ANDROID_RASTER_IMAGE_DEPTH env variable.
If raster only apps set QT_ANDROID_RASTER_IMAGE_DEPTH to 16 (RGB16), we should create also RGB16 native surface. Change-Id: I82692ff34b0e604e627d1d86a437272e3700daf8 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Diffstat (limited to 'src/plugins/platforms/android/androidjnimain.cpp')
-rw-r--r--src/plugins/platforms/android/androidjnimain.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/platforms/android/androidjnimain.cpp b/src/plugins/platforms/android/androidjnimain.cpp
index 28a5da4b5d..784cc2e38b 100644
--- a/src/plugins/platforms/android/androidjnimain.cpp
+++ b/src/plugins/platforms/android/androidjnimain.cpp
@@ -334,7 +334,7 @@ namespace QtAndroid
return manufacturer + QStringLiteral(" ") + model;
}
- int createSurface(AndroidSurfaceClient *client, const QRect &geometry, bool onTop)
+ int createSurface(AndroidSurfaceClient *client, const QRect &geometry, bool onTop, int imageDepth)
{
QJNIEnvironmentPrivate env;
if (!env)
@@ -356,7 +356,8 @@ namespace QtAndroid
m_createSurfaceMethodID,
surfaceId,
jboolean(onTop),
- x, y, w, h);
+ x, y, w, h,
+ imageDepth);
return surfaceId;
}
@@ -689,7 +690,7 @@ static int registerNatives(JNIEnv *env)
return JNI_FALSE;
}
- GET_AND_CHECK_STATIC_METHOD(m_createSurfaceMethodID, m_applicationClass, "createSurface", "(IZIIII)V");
+ GET_AND_CHECK_STATIC_METHOD(m_createSurfaceMethodID, m_applicationClass, "createSurface", "(IZIIIII)V");
GET_AND_CHECK_STATIC_METHOD(m_insertNativeViewMethodID, m_applicationClass, "insertNativeView", "(ILandroid/view/View;IIII)V");
GET_AND_CHECK_STATIC_METHOD(m_setSurfaceGeometryMethodID, m_applicationClass, "setSurfaceGeometry", "(IIIII)V");
GET_AND_CHECK_STATIC_METHOD(m_destroySurfaceMethodID, m_applicationClass, "destroySurface", "(I)V");