From 1bac1681c60a68d88ee44db1ec95f93ffe5db1bf Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Tue, 5 Mar 2013 17:57:26 -0800 Subject: [PATCH 1/3] Return NO_MEMORY when glReadPixels() fails. Change-Id: Ic66134ef457e8442ae9135e9ec50e3d02932a253 --- services/surfaceflinger/SurfaceFlinger.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 8fa0800b6..a0d2827d7 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -2815,6 +2815,8 @@ status_t SurfaceFlinger::captureScreenImplLocked( *h = sh; *f = PIXEL_FORMAT_RGBA_8888; result = NO_ERROR; + } else { + result = NO_MEMORY; } } else { result = NO_MEMORY; From a25a959b7f170dcb59ba99f7b9fd36cb8179dbb2 Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Thu, 15 Aug 2013 10:05:01 -0700 Subject: [PATCH 2/3] Initialize mIndent Bug 10334731 Change-Id: Ia3aa118a1516cc480b0d85179b78c4447f982dd6 --- services/surfaceflinger/RenderEngine/ProgramCache.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/surfaceflinger/RenderEngine/ProgramCache.cpp b/services/surfaceflinger/RenderEngine/ProgramCache.cpp index 835ed8a51..f37871311 100644 --- a/services/surfaceflinger/RenderEngine/ProgramCache.cpp +++ b/services/surfaceflinger/RenderEngine/ProgramCache.cpp @@ -43,6 +43,8 @@ class Formatter { friend Formatter& indent(Formatter& f); friend Formatter& dedent(Formatter& f); public: + Formatter() : mIndent(0) {} + String8 getString() const { return mString; } From 79f0edfa8bd0329bd596ac43e7bd14cd4b9d9002 Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Thu, 15 Aug 2013 10:39:11 -0700 Subject: [PATCH 3/3] Disable GLES 2.x rendering Bug 10340705 Change-Id: I91f3baf0d79655d8d031c100d0b116f745c2fbef --- services/surfaceflinger/RenderEngine/RenderEngine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/surfaceflinger/RenderEngine/RenderEngine.cpp b/services/surfaceflinger/RenderEngine/RenderEngine.cpp index ee51bd9d1..dc9cf4c5c 100644 --- a/services/surfaceflinger/RenderEngine/RenderEngine.cpp +++ b/services/surfaceflinger/RenderEngine/RenderEngine.cpp @@ -42,7 +42,7 @@ RenderEngine* RenderEngine::create(EGLDisplay display, EGLConfig config) { EGL_NONE, EGL_NONE }; - EGLContext ctxt = eglCreateContext(display, config, NULL, contextAttributes); + EGLContext ctxt = EGL_NO_CONTEXT; // eglCreateContext(display, config, NULL, contextAttributes); if (ctxt == EGL_NO_CONTEXT) { // maybe ES 2.x is not supported ALOGW("can't create an ES 2.x context, trying 1.x");