Loading services/surfaceflinger/Android.mk +0 −7 Original line number Diff line number Diff line Loading @@ -65,13 +65,6 @@ else DisplayHardware/HWComposer_hwc1.cpp endif ifeq ($(TARGET_BOARD_PLATFORM),omap4) LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY endif ifeq ($(TARGET_BOARD_PLATFORM),s5pc110) LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY endif ifeq ($(TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS),true) LOCAL_CFLAGS += -DFORCE_HWC_COPY_FOR_VIRTUAL_DISPLAYS endif Loading services/surfaceflinger/RenderEngine/RenderEngine.cpp +16 −10 Original line number Diff line number Diff line Loading @@ -23,6 +23,9 @@ #include "GLExtensions.h" #include "Mesh.h" #include <vector> #include <SurfaceFlinger.h> EGLAPI const char* eglQueryStringImplementationANDROID(EGLDisplay dpy, EGLint name); // --------------------------------------------------------------------------- Loading Loading @@ -76,18 +79,21 @@ RenderEngine* RenderEngine::create(EGLDisplay display, int hwcFormat) { LOG_ALWAYS_FATAL("no supported EGL_RENDERABLE_TYPEs"); } // Also create our EGLContext EGLint contextAttributes[] = { EGL_CONTEXT_CLIENT_VERSION, contextClientVersion, // MUST be first std::vector<EGLint> contextAttributes; contextAttributes.reserve(6); contextAttributes.push_back(EGL_CONTEXT_CLIENT_VERSION); contextAttributes.push_back(contextClientVersion); #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 if (SurfaceFlinger::useContextPriority) { contextAttributes.push_back(EGL_CONTEXT_PRIORITY_LEVEL_IMG); contextAttributes.push_back(EGL_CONTEXT_PRIORITY_HIGH_IMG); } #endif EGL_NONE, EGL_NONE }; EGLContext ctxt = eglCreateContext(display, config, NULL, contextAttributes); contextAttributes.push_back(EGL_NONE); contextAttributes.push_back(EGL_NONE); EGLContext ctxt = eglCreateContext(display, config, NULL, contextAttributes.data()); // if can't create a GL context, we can only abort. LOG_ALWAYS_FATAL_IF(ctxt==EGL_NO_CONTEXT, "EGLContext creation failed"); Loading services/surfaceflinger/SurfaceFlinger.cpp +6 −3 Original line number Diff line number Diff line Loading @@ -112,6 +112,7 @@ const String16 sDump("android.permission.DUMP"); // --------------------------------------------------------------------------- int64_t SurfaceFlinger::vsyncPhaseOffsetNs; int64_t SurfaceFlinger::sfVsyncPhaseOffsetNs; bool SurfaceFlinger::useContextPriority; SurfaceFlinger::SurfaceFlinger() : BnSurfaceComposer(), Loading Loading @@ -164,6 +165,9 @@ SurfaceFlinger::SurfaceFlinger() ALOGI("SurfaceFlinger is starting"); useContextPriority = getBool< ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::useContextPriority>(false); // debugging stuff... char value[PROPERTY_VALUE_MAX]; Loading Loading @@ -3224,9 +3228,8 @@ void SurfaceFlinger::logFrameStats() { void SurfaceFlinger::appendSfConfigString(String8& result) const { result.append(" [sf"); #ifdef HAS_CONTEXT_PRIORITY result.append(" HAS_CONTEXT_PRIORITY"); #endif result.appendFormat(" HAS_CONTEXT_PRIORITY=%d", useContextPriority); #ifdef NEVER_DEFAULT_TO_ASYNC_MODE result.append(" NEVER_DEFAULT_TO_ASYNC_MODE"); #endif Loading services/surfaceflinger/SurfaceFlinger.h +3 −0 Original line number Diff line number Diff line Loading @@ -129,6 +129,9 @@ public: static int64_t vsyncPhaseOffsetNs; static int64_t sfVsyncPhaseOffsetNs; // Instruct the Render Engine to use EGL_IMG_context_priority is available. static bool useContextPriority; static char const* getServiceName() ANDROID_API { return "SurfaceFlinger"; } Loading services/surfaceflinger/SurfaceFlinger_hwc1.cpp +6 −3 Original line number Diff line number Diff line Loading @@ -111,6 +111,7 @@ const String16 sDump("android.permission.DUMP"); // --------------------------------------------------------------------------- int64_t SurfaceFlinger::vsyncPhaseOffsetNs; int64_t SurfaceFlinger::sfVsyncPhaseOffsetNs; bool SurfaceFlinger::useContextPriority; SurfaceFlinger::SurfaceFlinger() : BnSurfaceComposer(), Loading Loading @@ -155,6 +156,9 @@ SurfaceFlinger::SurfaceFlinger() ALOGI("SurfaceFlinger is starting"); useContextPriority = getBool< ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::useContextPriority>(false); char value[PROPERTY_VALUE_MAX]; property_get("ro.bq.gpu_to_cpu_unsupported", value, "0"); Loading Loading @@ -2996,9 +3000,8 @@ void SurfaceFlinger::logFrameStats() { void SurfaceFlinger::appendSfConfigString(String8& result) const { result.append(" [sf"); #ifdef HAS_CONTEXT_PRIORITY result.append(" HAS_CONTEXT_PRIORITY"); #endif result.appendFormat(" HAS_CONTEXT_PRIORITY=%d", useContextPriority); #ifdef NEVER_DEFAULT_TO_ASYNC_MODE result.append(" NEVER_DEFAULT_TO_ASYNC_MODE"); #endif Loading Loading
services/surfaceflinger/Android.mk +0 −7 Original line number Diff line number Diff line Loading @@ -65,13 +65,6 @@ else DisplayHardware/HWComposer_hwc1.cpp endif ifeq ($(TARGET_BOARD_PLATFORM),omap4) LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY endif ifeq ($(TARGET_BOARD_PLATFORM),s5pc110) LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY endif ifeq ($(TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS),true) LOCAL_CFLAGS += -DFORCE_HWC_COPY_FOR_VIRTUAL_DISPLAYS endif Loading
services/surfaceflinger/RenderEngine/RenderEngine.cpp +16 −10 Original line number Diff line number Diff line Loading @@ -23,6 +23,9 @@ #include "GLExtensions.h" #include "Mesh.h" #include <vector> #include <SurfaceFlinger.h> EGLAPI const char* eglQueryStringImplementationANDROID(EGLDisplay dpy, EGLint name); // --------------------------------------------------------------------------- Loading Loading @@ -76,18 +79,21 @@ RenderEngine* RenderEngine::create(EGLDisplay display, int hwcFormat) { LOG_ALWAYS_FATAL("no supported EGL_RENDERABLE_TYPEs"); } // Also create our EGLContext EGLint contextAttributes[] = { EGL_CONTEXT_CLIENT_VERSION, contextClientVersion, // MUST be first std::vector<EGLint> contextAttributes; contextAttributes.reserve(6); contextAttributes.push_back(EGL_CONTEXT_CLIENT_VERSION); contextAttributes.push_back(contextClientVersion); #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 if (SurfaceFlinger::useContextPriority) { contextAttributes.push_back(EGL_CONTEXT_PRIORITY_LEVEL_IMG); contextAttributes.push_back(EGL_CONTEXT_PRIORITY_HIGH_IMG); } #endif EGL_NONE, EGL_NONE }; EGLContext ctxt = eglCreateContext(display, config, NULL, contextAttributes); contextAttributes.push_back(EGL_NONE); contextAttributes.push_back(EGL_NONE); EGLContext ctxt = eglCreateContext(display, config, NULL, contextAttributes.data()); // if can't create a GL context, we can only abort. LOG_ALWAYS_FATAL_IF(ctxt==EGL_NO_CONTEXT, "EGLContext creation failed"); Loading
services/surfaceflinger/SurfaceFlinger.cpp +6 −3 Original line number Diff line number Diff line Loading @@ -112,6 +112,7 @@ const String16 sDump("android.permission.DUMP"); // --------------------------------------------------------------------------- int64_t SurfaceFlinger::vsyncPhaseOffsetNs; int64_t SurfaceFlinger::sfVsyncPhaseOffsetNs; bool SurfaceFlinger::useContextPriority; SurfaceFlinger::SurfaceFlinger() : BnSurfaceComposer(), Loading Loading @@ -164,6 +165,9 @@ SurfaceFlinger::SurfaceFlinger() ALOGI("SurfaceFlinger is starting"); useContextPriority = getBool< ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::useContextPriority>(false); // debugging stuff... char value[PROPERTY_VALUE_MAX]; Loading Loading @@ -3224,9 +3228,8 @@ void SurfaceFlinger::logFrameStats() { void SurfaceFlinger::appendSfConfigString(String8& result) const { result.append(" [sf"); #ifdef HAS_CONTEXT_PRIORITY result.append(" HAS_CONTEXT_PRIORITY"); #endif result.appendFormat(" HAS_CONTEXT_PRIORITY=%d", useContextPriority); #ifdef NEVER_DEFAULT_TO_ASYNC_MODE result.append(" NEVER_DEFAULT_TO_ASYNC_MODE"); #endif Loading
services/surfaceflinger/SurfaceFlinger.h +3 −0 Original line number Diff line number Diff line Loading @@ -129,6 +129,9 @@ public: static int64_t vsyncPhaseOffsetNs; static int64_t sfVsyncPhaseOffsetNs; // Instruct the Render Engine to use EGL_IMG_context_priority is available. static bool useContextPriority; static char const* getServiceName() ANDROID_API { return "SurfaceFlinger"; } Loading
services/surfaceflinger/SurfaceFlinger_hwc1.cpp +6 −3 Original line number Diff line number Diff line Loading @@ -111,6 +111,7 @@ const String16 sDump("android.permission.DUMP"); // --------------------------------------------------------------------------- int64_t SurfaceFlinger::vsyncPhaseOffsetNs; int64_t SurfaceFlinger::sfVsyncPhaseOffsetNs; bool SurfaceFlinger::useContextPriority; SurfaceFlinger::SurfaceFlinger() : BnSurfaceComposer(), Loading Loading @@ -155,6 +156,9 @@ SurfaceFlinger::SurfaceFlinger() ALOGI("SurfaceFlinger is starting"); useContextPriority = getBool< ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::useContextPriority>(false); char value[PROPERTY_VALUE_MAX]; property_get("ro.bq.gpu_to_cpu_unsupported", value, "0"); Loading Loading @@ -2996,9 +3000,8 @@ void SurfaceFlinger::logFrameStats() { void SurfaceFlinger::appendSfConfigString(String8& result) const { result.append(" [sf"); #ifdef HAS_CONTEXT_PRIORITY result.append(" HAS_CONTEXT_PRIORITY"); #endif result.appendFormat(" HAS_CONTEXT_PRIORITY=%d", useContextPriority); #ifdef NEVER_DEFAULT_TO_ASYNC_MODE result.append(" NEVER_DEFAULT_TO_ASYNC_MODE"); #endif Loading