diff options
author | Mathias Agopian <mathias@google.com> | 2010-10-21 13:48:36 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-10-21 13:48:36 -0700 |
commit | ac6f0cc317c3ee469a9e5b9c4e7db56c027b02c0 (patch) | |
tree | 6797b048d15a49a10b952aa37e3c4c2a54e24a97 /services/surfaceflinger | |
parent | 6a6fbfb348c8f648a7615f5dae29de610c7c25f6 (diff) | |
parent | fb31036fd844444c395a2ae9c97439eec9f774e4 (diff) | |
download | frameworks_base-ac6f0cc317c3ee469a9e5b9c4e7db56c027b02c0.zip frameworks_base-ac6f0cc317c3ee469a9e5b9c4e7db56c027b02c0.tar.gz frameworks_base-ac6f0cc317c3ee469a9e5b9c4e7db56c027b02c0.tar.bz2 |
am fb31036f: am 583fefc8: Merge "Use the context_priority extension when present." into gingerbread
Merge commit 'fb31036fd844444c395a2ae9c97439eec9f774e4'
* commit 'fb31036fd844444c395a2ae9c97439eec9f774e4':
Use the context_priority extension when present.
Diffstat (limited to 'services/surfaceflinger')
-rw-r--r-- | services/surfaceflinger/Android.mk | 4 | ||||
-rw-r--r-- | services/surfaceflinger/DisplayHardware/DisplayHardware.cpp | 14 |
2 files changed, 16 insertions, 2 deletions
diff --git a/services/surfaceflinger/Android.mk b/services/surfaceflinger/Android.mk index e4825d0..1c2a2c8 100644 --- a/services/surfaceflinger/Android.mk +++ b/services/surfaceflinger/Android.mk @@ -24,6 +24,10 @@ LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES ifeq ($(TARGET_BOARD_PLATFORM), omap3) LOCAL_CFLAGS += -DNO_RGBX_8888 -DHAS_PUSH_BUFFERS 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 bd348bf..8926c03 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; |