summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
Diffstat (limited to 'services')
-rw-r--r--services/surfaceflinger/EventThread.cpp8
-rw-r--r--services/surfaceflinger/RenderEngine/RenderEngine.cpp10
2 files changed, 9 insertions, 9 deletions
diff --git a/services/surfaceflinger/EventThread.cpp b/services/surfaceflinger/EventThread.cpp
index 973a8bc..c8cf4bf 100644
--- a/services/surfaceflinger/EventThread.cpp
+++ b/services/surfaceflinger/EventThread.cpp
@@ -283,11 +283,11 @@ Vector< sp<EventThread::Connection> > EventThread::waitForEvent(
}
// Here we figure out if we need to enable or disable vsyncs
- if (timestamp && !waitForVSync) {
- // we received a VSYNC but we have no clients
- // don't report it, and disable VSYNC events
+ if (!waitForVSync) {
+ // we have no clients waiting on next VSYNC
+ // just disable VSYNC events.
disableVSyncLocked();
- } else if (!timestamp && waitForVSync) {
+ } else if (!timestamp) {
// we have at least one client, so we want vsync enabled
// (TODO: this function is called right after we finish
// notifying clients of a vsync, so this call will be made
diff --git a/services/surfaceflinger/RenderEngine/RenderEngine.cpp b/services/surfaceflinger/RenderEngine/RenderEngine.cpp
index cb1d14c..ba94030 100644
--- a/services/surfaceflinger/RenderEngine/RenderEngine.cpp
+++ b/services/surfaceflinger/RenderEngine/RenderEngine.cpp
@@ -378,11 +378,11 @@ static status_t selectEGLConfig(EGLDisplay display, EGLint format,
attribs[EGL_RECORDABLE_ANDROID] = EGL_TRUE;
attribs[EGL_SURFACE_TYPE] = EGL_WINDOW_BIT|EGL_PBUFFER_BIT;
attribs[EGL_FRAMEBUFFER_TARGET_ANDROID] = EGL_TRUE;
- attribs[EGL_RED_SIZE] = 8;
- attribs[EGL_GREEN_SIZE] = 8;
- attribs[EGL_BLUE_SIZE] = 8;
- wantedAttribute = EGL_NONE;
- wantedAttributeValue = EGL_NONE;
+ attribs[EGL_RED_SIZE] = 5;
+ attribs[EGL_GREEN_SIZE] = 6;
+ attribs[EGL_BLUE_SIZE] = 5;
+ wantedAttribute = EGL_NATIVE_VISUAL_ID;
+ wantedAttributeValue = format;
} else {
// if no renderable type specified, fallback to a simplified query
wantedAttribute = EGL_NATIVE_VISUAL_ID;