merge in klp-release history after reset to klp-dev
diff --git a/libs/gui/SurfaceControl.cpp b/libs/gui/SurfaceControl.cpp
index 16e533c..f4e88f5 100644
--- a/libs/gui/SurfaceControl.cpp
+++ b/libs/gui/SurfaceControl.cpp
@@ -46,13 +46,13 @@
 // ============================================================================
 
 SurfaceControl::SurfaceControl(
-        const sp<SurfaceComposerClient>& client,
+        const sp<SurfaceComposerClient>& client, 
         const sp<IBinder>& handle,
         const sp<IGraphicBufferProducer>& gbp)
     : mClient(client), mHandle(handle), mGraphicBufferProducer(gbp)
 {
 }
-
+        
 SurfaceControl::~SurfaceControl()
 {
     destroy();
@@ -71,7 +71,7 @@
     IPCThreadState::self()->flushCommands();
 }
 
-void SurfaceControl::clear()
+void SurfaceControl::clear() 
 {
     // here, the window manager tells us explicitly that we should destroy
     // the surface's resource. Soon after this call, it will also release
@@ -83,7 +83,7 @@
 }
 
 bool SurfaceControl::isSameSurface(
-        const sp<SurfaceControl>& lhs, const sp<SurfaceControl>& rhs)
+        const sp<SurfaceControl>& lhs, const sp<SurfaceControl>& rhs) 
 {
     if (lhs == 0 || rhs == 0)
         return false;
@@ -181,9 +181,7 @@
 {
     Mutex::Autolock _l(mLock);
     if (mSurfaceData == 0) {
-        // This surface is always consumed by SurfaceFlinger, so the
-        // producerControlledByApp value doesn't matter; using false.
-        mSurfaceData = new Surface(mGraphicBufferProducer, false);
+        mSurfaceData = new Surface(mGraphicBufferProducer);
     }
     return mSurfaceData;
 }
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp
index 04d5f45..d3bc14a 100644
--- a/opengl/libs/EGL/eglApi.cpp
+++ b/opengl/libs/EGL/eglApi.cpp
@@ -49,10 +49,6 @@
 
 using namespace android;
 
-// This extension has not been ratified yet, so can't be shipped.
-// Implementation is incomplete and untested.
-#define ENABLE_EGL_KHR_GL_COLORSPACE 0
-
 // ----------------------------------------------------------------------------
 
 namespace android {
@@ -86,9 +82,7 @@
         "EGL_KHR_image_base "                   // mandatory
         "EGL_KHR_image_pixmap "
         "EGL_KHR_lock_surface "
-#if (ENABLE_EGL_KHR_GL_COLORSPACE != 0)
         "EGL_KHR_gl_colorspace "
-#endif
         "EGL_KHR_gl_texture_2D_image "
         "EGL_KHR_gl_texture_cubemap_image "
         "EGL_KHR_gl_renderbuffer_image "
@@ -372,7 +366,7 @@
 // surfaces
 // ----------------------------------------------------------------------------
 
-// The EGL_KHR_gl_colorspace spec hasn't been ratified yet, so these haven't
+// The EGL_KHR_gl_colorspace spec hasn't been published yet, so these haven't
 // been added to the Khronos egl.h.
 #define EGL_GL_COLORSPACE_KHR           EGL_VG_COLORSPACE
 #define EGL_GL_COLORSPACE_SRGB_KHR      EGL_VG_COLORSPACE_sRGB
@@ -433,17 +427,7 @@
                     attr += 2) {
                 if (*attr == EGL_GL_COLORSPACE_KHR &&
                         dp->haveExtension("EGL_KHR_gl_colorspace")) {
-                    if (ENABLE_EGL_KHR_GL_COLORSPACE) {
-                        format = modifyFormatColorspace(format, *(attr+1));
-                    } else {
-                        // Normally we'd pass through unhandled attributes to
-                        // the driver. But in case the driver implements this
-                        // extension but we're disabling it, we want to prevent
-                        // it getting through -- support will be broken without
-                        // our help.
-                        ALOGE("sRGB window surfaces not supported");
-                        return setError(EGL_BAD_ATTRIBUTE, EGL_NO_SURFACE);
-                    }
+                    format = modifyFormatColorspace(format, *(attr+1));
                 }
             }
         }
@@ -474,17 +458,7 @@
         if (attrib_list && dp->haveExtension("EGL_KHR_gl_colorspace")) {
             for (const EGLint* attr = attrib_list; *attr != EGL_NONE; attr += 2) {
                 if (*attr == EGL_GL_COLORSPACE_KHR) {
-                    if (ENABLE_EGL_KHR_GL_COLORSPACE) {
-                        format = modifyFormatColorspace(format, *(attr+1));
-                    } else {
-                        // Normally we'd pass through unhandled attributes to
-                        // the driver. But in case the driver implements this
-                        // extension but we're disabling it, we want to prevent
-                        // it getting through -- support will be broken without
-                        // our help.
-                        ALOGE("sRGB window surfaces not supported");
-                        return setError(EGL_BAD_ATTRIBUTE, EGL_NO_SURFACE);
-                    }
+                    format = modifyFormatColorspace(format, attr[1]);
                 }
             }
         }
diff --git a/services/surfaceflinger/DisplayDevice.cpp b/services/surfaceflinger/DisplayDevice.cpp
index 917d4cd..61a9361 100644
--- a/services/surfaceflinger/DisplayDevice.cpp
+++ b/services/surfaceflinger/DisplayDevice.cpp
@@ -73,7 +73,7 @@
       mLayerStack(NO_LAYER_STACK),
       mOrientation()
 {
-    mNativeWindow = new Surface(producer, false);
+    mNativeWindow = new Surface(producer);
     ANativeWindow* const window = mNativeWindow.get();
 
     int format;
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index def4618..fa1ea09 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -2782,7 +2782,7 @@
 
     // create a surface (because we're a producer, and we need to
     // dequeue/queue a buffer)
-    sp<Surface> sur = new Surface(producer, false);
+    sp<Surface> sur = new Surface(producer);
     ANativeWindow* window = sur.get();
 
     status_t result = NO_ERROR;