Merge change 9245

* changes:
  Remove android:multiprocess from ShutdownActivity to ensure it runs in the system process.
diff --git a/include/ui/Overlay.h b/include/ui/Overlay.h
index acc9bea..a9ae1c4 100644
--- a/include/ui/Overlay.h
+++ b/include/ui/Overlay.h
@@ -82,10 +82,16 @@
     /* release the overlay buffer and post it */
     status_t queueBuffer(overlay_buffer_t buffer);
 
+    /* change the width and height of the overlay */
+    status_t resizeInput(uint32_t width, uint32_t height);
+
     status_t setCrop(uint32_t x, uint32_t y, uint32_t w, uint32_t h) ;
 
     status_t getCrop(uint32_t* x, uint32_t* y, uint32_t* w, uint32_t* h) ;
 
+    /* set the buffer attributes */
+    status_t setParameter(int param, int value);
+
     /* returns the address of a given buffer if supported, NULL otherwise. */
     void* getBufferAddress(overlay_buffer_t buffer);
 
diff --git a/libs/surfaceflinger/LayerBase.cpp b/libs/surfaceflinger/LayerBase.cpp
index a841ab3..fbce73dd 100644
--- a/libs/surfaceflinger/LayerBase.cpp
+++ b/libs/surfaceflinger/LayerBase.cpp
@@ -461,7 +461,8 @@
                 glRotatef(-90, 0, 0, 1);
             }
 
-            if (!(mFlags & DisplayHardware::NPOT_EXTENSION)) {
+            if (!(mFlags & (DisplayHardware::NPOT_EXTENSION |
+                            DisplayHardware::DIRECT_TEXTURE))) {
                 // find the smallest power-of-two that will accommodate our surface
                 GLuint tw = 1 << (31 - clz(width));
                 GLuint th = 1 << (31 - clz(height));
diff --git a/libs/ui/BufferMapper.cpp b/libs/ui/BufferMapper.cpp
index 92a9a86..4add8f9 100644
--- a/libs/ui/BufferMapper.cpp
+++ b/libs/ui/BufferMapper.cpp
@@ -65,7 +65,7 @@
 {
     status_t err = mAllocMod->lock(mAllocMod, handle, usage,
             bounds.left, bounds.top, bounds.width(), bounds.height(), vaddr);
-    LOGW_IF(err, "unlock(...) failed %d (%s)", err, strerror(-err));
+    LOGW_IF(err, "lock(...) failed %d (%s)", err, strerror(-err));
     return err;
 }
 
diff --git a/libs/ui/Overlay.cpp b/libs/ui/Overlay.cpp
index 4854d6a..3aa8950 100644
--- a/libs/ui/Overlay.cpp
+++ b/libs/ui/Overlay.cpp
@@ -59,6 +59,18 @@
     return mOverlayData->queueBuffer(mOverlayData, buffer);
 }
 
+status_t Overlay::resizeInput(uint32_t width, uint32_t height)
+{
+    if (mStatus != NO_ERROR) return mStatus;
+    return mOverlayData->resizeInput(mOverlayData, width, height);
+}
+
+status_t Overlay::setParameter(int param, int value)
+{
+    if (mStatus != NO_ERROR) return mStatus;
+    return mOverlayData->setParameter(mOverlayData, param, value);
+}
+
 status_t Overlay::setCrop(uint32_t x, uint32_t y, uint32_t w, uint32_t h)
 {
     if (mStatus != NO_ERROR) return mStatus;