Merge lp:~mterry/phablet-extras/libhybris-no-gles into lp:phablet-extras/libhybris

Proposed by Michael Terry
Status: Merged
Approved by: Ricardo Salveti
Approved revision: 126
Merged at revision: 125
Proposed branch: lp:~mterry/phablet-extras/libhybris-no-gles
Merge into: lp:phablet-extras/libhybris
Diff against target: 76 lines (+5/-10)
5 files modified
compat/media/media_compatibility_layer.h (+1/-3)
compat/surface_flinger/glcommon.h (+0/-4)
compat/surface_flinger/surface_flinger_compatibility_layer.h (+0/-2)
hybris/media/media.cpp (+1/-1)
hybris/sf/test.cpp (+3/-0)
To merge this branch: bzr merge lp:~mterry/phablet-extras/libhybris-no-gles
Reviewer Review Type Date Requested Status
Ricardo Salveti (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+158160@code.launchpad.net

Commit message

Remove unnecessary GLES header includes.

Description of the change

glcommon.h and surface_flinger_compatibility_layer.h contain GLES includes for no apparent reason. GLES includes conflict with standard GL includes on non-armhf platforms. So dropping these unnecessary GLES includes helps compilation on non-armhf platforms.

media_compatibility_layer.h did actually include GLES2 for a reason, as it used GLfloat. But since GLfloat is always actually a float in Ubuntu, I took the liberty of making that change to avoid needing to depend on a particular GL implementation.

If we don't like that, we could bring the configure-time choice of GL implementation from https://code.launchpad.net/~mterry/platform-api/gles/+merge/158128 down a level into libhybris itself.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
125. By Michael Terry

add back GLES2 headers for test.cpp

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
126. By Michael Terry

remove more unnecessary GLES2 includes; switch one GLfloat to float directly

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

LGTM, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'compat/media/media_compatibility_layer.h'
2--- compat/media/media_compatibility_layer.h 2013-03-04 23:08:36 +0000
3+++ compat/media/media_compatibility_layer.h 2013-04-11 14:26:21 +0000
4@@ -19,8 +19,6 @@
5 #ifndef MEDIA_COMPATIBILITY_LAYER_H_
6 #define MEDIA_COMPATIBILITY_LAYER_H_
7
8-#include <GLES2/gl2.h>
9-
10 #include <stdint.h>
11 #include <unistd.h>
12
13@@ -51,7 +49,7 @@
14 int android_media_set_data_source(MediaPlayerWrapper *mp, const char* url);
15 int android_media_set_preview_texture(MediaPlayerWrapper *mp, int texture_id);
16 void android_media_update_surface_texture(MediaPlayerWrapper *mp);
17- void android_media_surface_texture_get_transformation_matrix(MediaPlayerWrapper *mp, GLfloat*matrix);
18+ void android_media_surface_texture_get_transformation_matrix(MediaPlayerWrapper *mp, float*matrix);
19 int android_media_play(MediaPlayerWrapper *mp);
20 int android_media_pause(MediaPlayerWrapper *mp);
21 int android_media_stop(MediaPlayerWrapper *mp);
22
23=== modified file 'compat/surface_flinger/glcommon.h'
24--- compat/surface_flinger/glcommon.h 2013-03-04 23:08:36 +0000
25+++ compat/surface_flinger/glcommon.h 2013-04-11 14:26:21 +0000
26@@ -15,10 +15,6 @@
27 *
28 * Authored by: Thomas Voß <thomas.voss@canonical.com>
29 */
30-#include <GLES2/gl2.h>
31-#include <GLES2/gl2ext.h>
32-#include <EGL/egl.h>
33-#include <EGL/eglext.h>
34
35 #include <utils/misc.h>
36
37
38=== modified file 'compat/surface_flinger/surface_flinger_compatibility_layer.h'
39--- compat/surface_flinger/surface_flinger_compatibility_layer.h 2013-03-04 23:08:36 +0000
40+++ compat/surface_flinger/surface_flinger_compatibility_layer.h 2013-04-11 14:26:21 +0000
41@@ -23,8 +23,6 @@
42 extern "C" {
43 #endif
44
45-#include <GLES2/gl2.h>
46-#include <GLES2/gl2ext.h>
47 #include <EGL/egl.h>
48 #include <EGL/eglext.h>
49
50
51=== modified file 'hybris/media/media.cpp'
52--- hybris/media/media.cpp 2013-03-04 23:08:36 +0000
53+++ hybris/media/media.cpp 2013-04-11 14:26:21 +0000
54@@ -139,7 +139,7 @@
55 IMPLEMENT_FUNCTION2(int, android_media_set_volume, MediaPlayerWrapper *, int);
56
57 // Getters
58-IMPLEMENT_VOID_FUNCTION2(android_media_surface_texture_get_transformation_matrix, MediaPlayerWrapper *, GLfloat*);
59+IMPLEMENT_VOID_FUNCTION2(android_media_surface_texture_get_transformation_matrix, MediaPlayerWrapper *, float*);
60 IMPLEMENT_FUNCTION2(int, android_media_get_current_position, MediaPlayerWrapper *, int*);
61 IMPLEMENT_FUNCTION2(int, android_media_get_duration, MediaPlayerWrapper *, int*);
62 IMPLEMENT_FUNCTION2(int, android_media_get_volume, MediaPlayerWrapper *, int*);
63
64=== modified file 'hybris/sf/test.cpp'
65--- hybris/sf/test.cpp 2013-03-04 23:08:36 +0000
66+++ hybris/sf/test.cpp 2013-04-11 14:26:21 +0000
67@@ -22,6 +22,9 @@
68
69 #include <unistd.h>
70
71+#include <GLES2/gl2.h>
72+#include <GLES2/gl2ext.h>
73+
74 #include "surface_flinger_compatibility_layer.h"
75
76 SfSurface* sf_surface_create(SfClient* client, SfSurfaceCreationParameters* params);

Subscribers

People subscribed via source and target branches