Merge "propagate RS context priority to EGLContext when possible. DO NOT MERGE." into gingerbread
This commit is contained in:
committed by
Android (Google) Code Review
commit
73655bd2d3
@ -102,6 +102,9 @@ LOCAL_SRC_FILES:= \
|
|||||||
rsType.cpp \
|
rsType.cpp \
|
||||||
rsVertexArray.cpp
|
rsVertexArray.cpp
|
||||||
|
|
||||||
|
ifeq ($(TARGET_BOARD_PLATFORM), s5pc110)
|
||||||
|
LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY
|
||||||
|
endif
|
||||||
|
|
||||||
LOCAL_SHARED_LIBRARIES += libcutils libutils libEGL libGLESv1_CM libGLESv2 libui libacc
|
LOCAL_SHARED_LIBRARIES += libcutils libutils libEGL libGLESv1_CM libGLESv2 libui libacc
|
||||||
LOCAL_LDLIBS := -lpthread -ldl
|
LOCAL_LDLIBS := -lpthread -ldl
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
#include <cutils/properties.h>
|
#include <cutils/properties.h>
|
||||||
|
|
||||||
|
#include <EGL/eglext.h>
|
||||||
#include <GLES/gl.h>
|
#include <GLES/gl.h>
|
||||||
#include <GLES/glext.h>
|
#include <GLES/glext.h>
|
||||||
#include <GLES2/gl2.h>
|
#include <GLES2/gl2.h>
|
||||||
@ -58,7 +59,18 @@ void Context::initEGL(bool useGL2)
|
|||||||
mEGL.mNumConfigs = -1;
|
mEGL.mNumConfigs = -1;
|
||||||
EGLint configAttribs[128];
|
EGLint configAttribs[128];
|
||||||
EGLint *configAttribsPtr = configAttribs;
|
EGLint *configAttribsPtr = configAttribs;
|
||||||
EGLint context_attribs2[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE };
|
EGLint context_attribs2[] = { EGL_CONTEXT_CLIENT_VERSION, 2,
|
||||||
|
EGL_NONE, GL_NONE, EGL_NONE };
|
||||||
|
|
||||||
|
#ifdef HAS_CONTEXT_PRIORITY
|
||||||
|
#ifdef EGL_IMG_context_priority
|
||||||
|
#warning "using EGL_IMG_context_priority"
|
||||||
|
if (mThreadPriority > 0) {
|
||||||
|
context_attribs2[2] = EGL_CONTEXT_PRIORITY_LEVEL_IMG;
|
||||||
|
context_attribs2[3] = EGL_CONTEXT_PRIORITY_LOW_IMG;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
memset(configAttribs, 0, sizeof(configAttribs));
|
memset(configAttribs, 0, sizeof(configAttribs));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user