summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mathias Agopian <mathias@google.com> 2010-10-11 17:54:43 -0700
committer Mathias Agopian <mathias@google.com> 2010-10-11 18:01:00 -0700
commitcd54dc26f7ac23da6c920dd83b30242049470f00 (patch)
tree236243a87912613b6bdcc66fd3eee931dbdb5458
parentde846ac659e8c14d898a3fa14bd0504b24096057 (diff)
Use the context_priority extension when present.
Change-Id: I12eadf1e32d576de5d811fba44afa73263e13eef
-rw-r--r--services/surfaceflinger/Android.mk4
-rw-r--r--services/surfaceflinger/DisplayHardware/DisplayHardware.cpp14
2 files changed, 16 insertions, 2 deletions
diff --git a/services/surfaceflinger/Android.mk b/services/surfaceflinger/Android.mk
index a14bfb569b8b..e2f8a7468d87 100644
--- a/services/surfaceflinger/Android.mk
+++ b/services/surfaceflinger/Android.mk
@@ -23,6 +23,10 @@ LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
ifeq ($(TARGET_BOARD_PLATFORM), omap3)
LOCAL_CFLAGS += -DNO_RGBX_8888
endif
+ifeq ($(TARGET_BOARD_PLATFORM), s5pc110)
+ LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY
+endif
+
# need "-lrt" on Linux simulator to pick up clock_gettime
ifeq ($(TARGET_SIMULATOR),true)
diff --git a/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp b/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp
index 051511027b79..28a512e95b58 100644
--- a/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp
+++ b/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp
@@ -199,8 +199,18 @@ void DisplayHardware::init(uint32_t dpy)
* Create our OpenGL ES context
*/
- context = eglCreateContext(display, config, NULL, NULL);
-
+
+ EGLint contextAttributes[] = {
+#ifdef EGL_IMG_context_priority
+#ifdef HAS_CONTEXT_PRIORITY
+#warning "using EGL_IMG_context_priority"
+ EGL_CONTEXT_PRIORITY_LEVEL_IMG, EGL_CONTEXT_PRIORITY_HIGH_IMG,
+#endif
+#endif
+ EGL_NONE, EGL_NONE
+ };
+ context = eglCreateContext(display, config, NULL, contextAttributes);
+
mDisplay = display;
mConfig = config;
mSurface = surface;