Merge lp:~schwann/gallery-app/gallery-startup-shader-fix into lp:gallery-app

Proposed by Günter Schwann
Status: Merged
Approved by: Gustavo Pichorim Boiko
Approved revision: 666
Merged at revision: 663
Proposed branch: lp:~schwann/gallery-app/gallery-startup-shader-fix
Merge into: lp:gallery-app
Diff against target: 104 lines (+51/-3)
5 files modified
CMakeLists.txt (+5/-1)
cmake/FindGLESv2.cmake (+30/-0)
debian/changelog (+1/-0)
src/CMakeLists.txt (+7/-1)
tests/unittests/resource/CMakeLists.txt (+8/-1)
To merge this branch: bzr merge lp:~schwann/gallery-app/gallery-startup-shader-fix
Reviewer Review Type Date Requested Status
Gustavo Pichorim Boiko (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+162184@code.launchpad.net

Commit message

Use OpenGLESv2 instead of OpenGL

Description of the change

Use OpenGLESv2 instead of OpenGL, as OpenGL is not used on the the device

To post a comment you must log in.
662. By Günter Schwann

Merge trunk

663. By Günter Schwann

Set changelog entry

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
664. By Günter Schwann

Merge trunk

665. By Günter Schwann

Use OpenGL on the desktop, and OpenGL ESv2 on the device

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
666. By Günter Schwann

Merge trunk

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Gustavo Pichorim Boiko (boiko) wrote :

Looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2013-04-15 17:22:42 +0000
3+++ CMakeLists.txt 2013-05-03 22:24:24 +0000
4@@ -31,7 +31,11 @@
5 find_package(Qt5Qml)
6 find_package(Qt5Quick)
7 find_package(Qt5Sql)
8-find_package(OpenGL)
9+if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
10+ find_package(GLESv2)
11+else()
12+ find_package(OpenGL)
13+endif()
14
15 find_package(PkgConfig REQUIRED)
16 pkg_check_modules(EXIV2 REQUIRED exiv2)
17
18=== added file 'cmake/FindGLESv2.cmake'
19--- cmake/FindGLESv2.cmake 1970-01-01 00:00:00 +0000
20+++ cmake/FindGLESv2.cmake 2013-05-03 22:24:24 +0000
21@@ -0,0 +1,30 @@
22+# - Try to find GLESv2
23+# Once done this will define
24+# GLESv2_FOUND - System has GLESv2
25+# GLESv2_INCLUDE_DIRS - The GLESv2 include directories
26+# GLESv2_LIBRARIES - The libraries needed to use GLESv2
27+
28+find_package(PkgConfig)
29+pkg_check_modules(PC_GLESv2 QUIET glesv2)
30+
31+find_path(GLESv2_INCLUDE_DIR GLES2/gl2.h
32+ HINTS ${PC_GLESv2_INCLUDEDIR} ${PC_GLESv2_INCLUDE_DIRS})
33+
34+if (MIR_PLATFORM STREQUAL "android")
35+find_library(GLESv2_LIBRARY libGLESv2.so.2
36+ HINTS /usr/lib/arm-linux-gnueabihf/libhybris-egl/)
37+else()
38+find_library(GLESv2_LIBRARY GLESv2
39+ HINTS ${PC_GLESv2_LIBDIR} ${PC_GLESv2_LIBRARY_DIRS})
40+endif()
41+
42+set(GLESv2_LIBRARIES ${GLESv2_LIBRARY})
43+set(GLESv2_INCLUDE_DIRS ${GLESv2_INCLUDE_DIR})
44+
45+include(FindPackageHandleStandardArgs)
46+# handle the QUIETLY and REQUIRED arguments and set GLESv2_FOUND to TRUE
47+# if all listed variables are TRUE
48+find_package_handle_standard_args(GLESv2 DEFAULT_MSG
49+ GLESv2_LIBRARY GLESv2_INCLUDE_DIR)
50+
51+mark_as_advanced(GLESv2_INCLUDE_DIR GLESv2_LIBRARY)
52
53=== modified file 'debian/changelog'
54--- debian/changelog 2013-05-03 17:22:44 +0000
55+++ debian/changelog 2013-05-03 22:24:24 +0000
56@@ -12,6 +12,7 @@
57 * Fix cancel button in toolbar
58 * Fix autopilot reveal and autopilot toolbar buttons click
59 * Smaller default size on desktops
60+ * Fix gallery startup on device (LP: #1173286)
61
62 -- Didier Roche <didrocks@ubuntu.com> Thu, 18 Apr 2013 09:52:45 +0200
63
64
65=== modified file 'src/CMakeLists.txt'
66--- src/CMakeLists.txt 2013-04-15 12:05:00 +0000
67+++ src/CMakeLists.txt 2013-05-03 22:24:24 +0000
68@@ -112,9 +112,15 @@
69
70 qt5_use_modules(${GALLERY} Widgets Core Qml Quick OpenGL Sql)
71
72+if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
73+ set(GL_LIBRARIES ${GLESv2_LIBRARIES})
74+else()
75+ set(GL_LIBRARIES ${OPENGL_LIBRARIES})
76+endif()
77+
78 target_link_libraries( ${GALLERY}
79 ${EXIV2_LIBRARIES}
80- ${OPENGL_LIBRARIES}
81+ ${GL_LIBRARIES}
82 ${GSTLIB_LDFLAGS}
83 )
84
85
86=== modified file 'tests/unittests/resource/CMakeLists.txt'
87--- tests/unittests/resource/CMakeLists.txt 2013-04-15 12:05:00 +0000
88+++ tests/unittests/resource/CMakeLists.txt 2013-05-03 22:24:24 +0000
89@@ -26,7 +26,14 @@
90 TIMEOUT ${CTEST_TESTING_TIMEOUT}
91 ENVIRONMENT "QT_QPA_PLATFORM=minimal"
92 )
93+
94+if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
95+ set(GL_LIBRARIES ${GLESv2_LIBRARIES})
96+else()
97+ set(GL_LIBRARIES ${OPENGL_LIBRARIES})
98+endif()
99+
100 target_link_libraries(resource
101- ${OPENGL_LIBRARIES}
102+ ${GL_LIBRARIES}
103 ${GSTLIB_LDFLAGS}
104 )

Subscribers

People subscribed via source and target branches