summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2010-10-20 20:04:45 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-10-20 20:04:46 -0700
commit3c85e4ad5a14a49fffcd458886cf7519276daed5 (patch)
tree6abde4a3069161c1ed7351d6f2a0c974323efb10 /services/surfaceflinger
parent6d44a8718a9edce778aae87363b36e039c9dcfa7 (diff)
parent67226814e1b6d1c02079635608444e73ec658837 (diff)
downloadframeworks_native-3c85e4ad5a14a49fffcd458886cf7519276daed5.zip
frameworks_native-3c85e4ad5a14a49fffcd458886cf7519276daed5.tar.gz
frameworks_native-3c85e4ad5a14a49fffcd458886cf7519276daed5.tar.bz2
Merge "Use the context_priority extension when present." into gingerbread
Diffstat (limited to 'services/surfaceflinger')
-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 a14bfb5..e2f8a74 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 0515110..28a512e 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;