update surfaceflinger, libui and libagl to the new gralloc api

- Currently the lock/unlock path is naive and is done for each drawing operation (glDrawElements and glDrawArrays). this should be improved eventually.
- factor all the lock/unlock code in SurfaceBuffer.
- fixed "showupdate" so it works even when we don't have preserving eglSwapBuffers().
- improved the situation with the dirty-region and fixed a problem that caused GL apps to not update.
- make use of LightRefBase() where needed, instead of duplicating its implementation
- add LightRefBase::getStrongCount()
- renamed EGLNativeWindowSurface.cpp to FramebufferNativeWindow.cpp

- disabled copybits test, since it clashes with the new gralloc api

- Camera/Video will be fixed later when we rework the overlay apis
diff --git a/libs/surfaceflinger/Android.mk b/libs/surfaceflinger/Android.mk
index 2b360d6..639a82e 100644
--- a/libs/surfaceflinger/Android.mk
+++ b/libs/surfaceflinger/Android.mk
@@ -14,10 +14,7 @@
     LayerBlur.cpp \
     LayerBitmap.cpp \
     LayerDim.cpp \
-    LayerOrientationAnim.cpp \
-    LayerOrientationAnimRotate.cpp \
     MessageQueue.cpp \
-    OrientationAnimation.cpp \
     SurfaceFlinger.cpp \
     Tokenizer.cpp \
     Transform.cpp
diff --git a/libs/surfaceflinger/BootAnimation.cpp b/libs/surfaceflinger/BootAnimation.cpp
index ee36b67..b45fe34 100644
--- a/libs/surfaceflinger/BootAnimation.cpp
+++ b/libs/surfaceflinger/BootAnimation.cpp
@@ -32,7 +32,7 @@
 #include <ui/DisplayInfo.h>
 #include <ui/ISurfaceComposer.h>
 #include <ui/ISurfaceFlingerClient.h>
-#include <ui/EGLNativeWindowSurface.h>
+#include <ui/FramebufferNativeWindow.h>
 
 #include <core/SkBitmap.h>
 #include <images/SkImageDecoder.h>
diff --git a/libs/surfaceflinger/BufferAllocator.cpp b/libs/surfaceflinger/BufferAllocator.cpp
index fec7c87..cee8b64 100644
--- a/libs/surfaceflinger/BufferAllocator.cpp
+++ b/libs/surfaceflinger/BufferAllocator.cpp
@@ -16,20 +16,14 @@
 */
 
 #include <sys/mman.h>
-#include <utils/CallStack.h>
 #include <cutils/ashmem.h>
 #include <cutils/log.h>
 
 #include <utils/Singleton.h>
 #include <utils/String8.h>
 
-#include <ui/BufferMapper.h>
-
 #include "BufferAllocator.h"
 
-// FIXME: ANDROID_GRALLOC_DEBUG must only be used with *our* gralloc
-#define ANDROID_GRALLOC_DEBUG 1
-
 
 namespace android {
 // ---------------------------------------------------------------------------
@@ -67,8 +61,8 @@
     const size_t c = list.size();
     for (size_t i=0 ; i<c ; i++) {
         const alloc_rec_t& rec(list.valueAt(i));
-        snprintf(buffer, SIZE, "%10p: %10p | %7.2f KB | %4u x %4u | %2d | 0x%08x\n",
-            list.keyAt(i), rec.vaddr, rec.size/1024.0f,
+        snprintf(buffer, SIZE, "%10p: %7.2f KiB | %4u x %4u | %2d | 0x%08x\n",
+            list.keyAt(i), rec.size/1024.0f, 
             rec.w, rec.h, rec.format, rec.usage);
         result.append(buffer);
         total += rec.size;
@@ -108,23 +102,9 @@
 {
     Mutex::Autolock _l(mLock);
 
-#if ANDROID_GRALLOC_DEBUG
-    void* base = (void*)(handle->data[2]);
-#endif
-
     status_t err = mAllocDev->free(mAllocDev, handle);
     LOGW_IF(err, "free(...) failed %d (%s)", err, strerror(-err));
     
-#if ANDROID_GRALLOC_DEBUG
-    if (base) {
-        LOGD("freeing mapped handle %p from:", handle);
-        CallStack s;
-        s.update();
-        s.dump("");
-        BufferMapper::get().dump(handle);
-    }
-#endif
-
     if (err == NO_ERROR) {
         Mutex::Autolock _l(sLock);
         KeyedVector<buffer_handle_t, alloc_rec_t>& list(sAllocList);
@@ -134,37 +114,5 @@
     return err;
 }
 
-status_t BufferAllocator::map(buffer_handle_t handle, void** addr)
-{
-    Mutex::Autolock _l(mLock);
-    status_t err = BufferMapper::get().map(handle, addr, this);
-    if (err == NO_ERROR) {
-        Mutex::Autolock _l(sLock);
-        KeyedVector<buffer_handle_t, alloc_rec_t>& list(sAllocList);
-        ssize_t idx = list.indexOfKey(handle);
-        if (idx >= 0)
-            list.editValueAt(idx).vaddr = addr;
-    }
-
-    return err;
-}
-
-status_t BufferAllocator::unmap(buffer_handle_t handle)
-{
-    Mutex::Autolock _l(mLock);
-    gralloc_module_t* mod = (gralloc_module_t*)mAllocDev->common.module;
-    status_t err = BufferMapper::get().unmap(handle, this);
-    if (err == NO_ERROR) {
-        Mutex::Autolock _l(sLock);
-        KeyedVector<buffer_handle_t, alloc_rec_t>& list(sAllocList);
-        ssize_t idx = list.indexOfKey(handle);
-        if (idx >= 0)
-            list.editValueAt(idx).vaddr = 0;
-    }
-
-    return err;
-}
-
-
 // ---------------------------------------------------------------------------
 }; // namespace android
diff --git a/libs/surfaceflinger/BufferAllocator.h b/libs/surfaceflinger/BufferAllocator.h
index 0b69b8e..a279ded 100644
--- a/libs/surfaceflinger/BufferAllocator.h
+++ b/libs/surfaceflinger/BufferAllocator.h
@@ -67,10 +67,6 @@
 
     status_t free(buffer_handle_t handle);
 
-    status_t map(buffer_handle_t handle, void** addr);
-    
-    status_t unmap(buffer_handle_t handle);
-    
     void dump(String8& res) const;
 
 private:
diff --git a/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp b/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp
index 1f7211c..83ebd7a 100644
--- a/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp
+++ b/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp
@@ -25,7 +25,7 @@
 #include <utils/Log.h>
 
 #include <ui/PixelFormat.h>
-#include <ui/EGLNativeWindowSurface.h>
+#include <ui/FramebufferNativeWindow.h>
 
 #include <GLES/gl.h>
 #include <EGL/egl.h>
@@ -313,8 +313,7 @@
     } 
 
     const Rect& b(newDirty.bounds());
-    mNativeWindow->android_native_window_t::setSwapRectangle(
-            mNativeWindow.get(), b.left, b.top, b.width(), b.height());
+    mNativeWindow->setSwapRectangle(b);
 
     mPageFlipCount++;
     eglSwapBuffers(dpy, surface);
diff --git a/libs/surfaceflinger/Layer.cpp b/libs/surfaceflinger/Layer.cpp
index 8a7d467..7625931 100644
--- a/libs/surfaceflinger/Layer.cpp
+++ b/libs/surfaceflinger/Layer.cpp
@@ -69,8 +69,6 @@
 {
     for (int i=0 ; i<NUM_BUFFERS ; i++) {
         if (mTextures[i].name != -1U) {
-            // FIXME: this was originally to work-around a bug in the
-            // adreno driver. this should be fixed now.
             glDeleteTextures(1, &mTextures[i].name);
             mTextures[i].name = -1U;
         }
@@ -142,8 +140,8 @@
 
 void Layer::reloadTexture(const Region& dirty)
 {
-    const sp<const Buffer>& buffer(frontBuffer().getBuffer());
-     if (LIKELY(mFlags & DisplayHardware::DIRECT_TEXTURE)) {
+    const sp<Buffer>& buffer(frontBuffer().getBuffer());
+    if (LIKELY(mFlags & DisplayHardware::DIRECT_TEXTURE)) {
         int index = mFrontBufferIndex;
         if (LIKELY(!mTextures[index].dirty)) {
             glBindTexture(GL_TEXTURE_2D, mTextures[index].name);
@@ -197,12 +195,16 @@
         }
     } else {
         GGLSurface t;
-        if (LIKELY(buffer->getBitmapSurface(&t) == NO_ERROR)) {
+        status_t res = buffer->lock(&t, GRALLOC_USAGE_SW_READ_RARELY);
+        LOGE_IF(res, "error %d (%s) locking buffer %p",
+                res, strerror(res), buffer.get());
+        if (res == NO_ERROR) {
             if (UNLIKELY(mTextures[0].name == -1U)) {
                 mTextures[0].name = createTexture();
             }
             loadTexture(dirty, mTextures[0].name, t, 
                     mTextures[0].width, mTextures[0].height);
+            buffer->unlock();
         }
     }
 }
@@ -225,8 +227,7 @@
 
     GGLSurface t;
     sp<const Buffer> buffer(frontBuffer().getBuffer());
-    buffer->getBitmapSurface(&t);
-    drawWithOpenGL(clip, textureName, t);
+    drawWithOpenGL(clip, textureName, buffer);
 }
 
 sp<SurfaceBuffer> Layer::peekBuffer()
diff --git a/libs/surfaceflinger/LayerBase.cpp b/libs/surfaceflinger/LayerBase.cpp
index ef5a959..cc9c586 100644
--- a/libs/surfaceflinger/LayerBase.cpp
+++ b/libs/surfaceflinger/LayerBase.cpp
@@ -377,12 +377,14 @@
 }
 
 void LayerBase::drawWithOpenGL(const Region& clip,
-        GLint textureName, const GGLSurface& t, int transform) const
+        GLint textureName, const sp<const Buffer>& buffer, int transform) const
 {
     const DisplayHardware& hw(graphicPlane(0).displayHardware());
     const uint32_t fbHeight = hw.getHeight();
     const State& s(drawingState());
-
+    const uint32_t width = buffer->width;
+    const uint32_t height = buffer->height;
+    
     // bind our texture
     validateTexture(textureName);
     glEnable(GL_TEXTURE_2D);
@@ -457,14 +459,14 @@
 
             if (!(mFlags & DisplayHardware::NPOT_EXTENSION)) {
                 // find the smallest power-of-two that will accommodate our surface
-                GLuint tw = 1 << (31 - clz(t.width));
-                GLuint th = 1 << (31 - clz(t.height));
-                if (tw < t.width)  tw <<= 1;
-                if (th < t.height) th <<= 1;
+                GLuint tw = 1 << (31 - clz(width));
+                GLuint th = 1 << (31 - clz(height));
+                if (tw < width)  tw <<= 1;
+                if (th < height) th <<= 1;
                 // this divide should be relatively fast because it's
                 // a power-of-two (optimized path in libgcc)
-                GLfloat ws = GLfloat(t.width) /tw;
-                GLfloat hs = GLfloat(t.height)/th;
+                GLfloat ws = GLfloat(width) /tw;
+                GLfloat hs = GLfloat(height)/th;
                 glScalef(ws, hs, 1.0f);
             }
 
@@ -489,15 +491,15 @@
         Region::iterator iterator(clip);
         if (iterator) {
             Rect r;
-            GLint crop[4] = { 0, t.height, t.width, -t.height };
+            GLint crop[4] = { 0, height, width, -height };
             glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop);
             int x = tx();
             int y = ty();
-            y = fbHeight - (y + t.height);
+            y = fbHeight - (y + height);
             while (iterator.iterate(&r)) {
                 const GLint sy = fbHeight - (r.top + r.height());
                 glScissor(r.left, sy, r.width(), r.height());
-                glDrawTexiOES(x, y, 0, t.width, t.height);
+                glDrawTexiOES(x, y, 0, width, height);
             }
         }
     }
diff --git a/libs/surfaceflinger/LayerBase.h b/libs/surfaceflinger/LayerBase.h
index c177c2a..509dedd 100644
--- a/libs/surfaceflinger/LayerBase.h
+++ b/libs/surfaceflinger/LayerBase.h
@@ -40,6 +40,7 @@
 class GraphicPlane;
 class Client;
 class SurfaceBuffer;
+class Buffer;
 
 // ---------------------------------------------------------------------------
 
@@ -239,7 +240,7 @@
     
           void drawWithOpenGL(const Region& clip,
                   GLint textureName,
-                  const GGLSurface& surface,
+                  const sp<const Buffer>& buffer,
                   int transform = 0) const;
 
           void clearWithOpenGL(const Region& clip) const;
diff --git a/libs/surfaceflinger/LayerBitmap.cpp b/libs/surfaceflinger/LayerBitmap.cpp
index d633a2d..38d4bcf 100644
--- a/libs/surfaceflinger/LayerBitmap.cpp
+++ b/libs/surfaceflinger/LayerBitmap.cpp
@@ -52,10 +52,7 @@
 Buffer::~Buffer()
 {
     if (handle) {
-        BufferAllocator& allocator = BufferAllocator::get();
-        if (usage & BufferAllocator::USAGE_SW_READ_MASK) {
-            allocator.unmap(handle);
-        }
+        BufferAllocator& allocator(BufferAllocator::get());
         allocator.free(handle);
     }
 }
@@ -107,9 +104,6 @@
     err = allocator.alloc(w, h, format, usage, &handle, &stride);
     
     if (err == NO_ERROR) {
-        if (usage & BufferAllocator::USAGE_SW_READ_MASK) {
-            err = allocator.map(handle, &bits);
-        }
         if (err == NO_ERROR) {
             width  = w;
             height = h;
@@ -120,31 +114,22 @@
     return err;
 }
 
-status_t Buffer::getBitmapSurface(copybit_image_t* img) const
+status_t Buffer::lock(GGLSurface* sur, uint32_t usage) 
 {
-    img->w = stride  ?: width;
-    img->h = mVStride ?: height;
-    img->format = format;
-    
-    // FIXME: this should use a native_handle
-    img->offset = 0;    
-    img->base = bits;
-    img->fd = getHandle()->data[0];
-    
-    return NO_ERROR;
+    status_t res = SurfaceBuffer::lock(usage);
+    if (res == NO_ERROR && sur) {
+        sur->version = sizeof(GGLSurface);
+        sur->width = width;
+        sur->height = height;
+        sur->stride = stride;
+        sur->format = format;
+        sur->vstride = mVStride;
+        sur->data = static_cast<GGLubyte*>(bits);
+    }
+    return res;
 }
 
-status_t Buffer::getBitmapSurface(GGLSurface* sur) const
-{
-    sur->version = sizeof(GGLSurface);
-    sur->width = width;
-    sur->height = height;
-    sur->stride = stride;
-    sur->format = format;
-    sur->vstride = mVStride;
-    sur->data = static_cast<GGLubyte*>(bits);
-    return NO_ERROR;
-}
+
 
 // ===========================================================================
 // LayerBitmap
diff --git a/libs/surfaceflinger/LayerBitmap.h b/libs/surfaceflinger/LayerBitmap.h
index e673755..6e136a2 100644
--- a/libs/surfaceflinger/LayerBitmap.h
+++ b/libs/surfaceflinger/LayerBitmap.h
@@ -73,9 +73,8 @@
     PixelFormat getPixelFormat() const  { return format; }
     Rect getBounds() const              { return Rect(width, height); }
     
-    status_t getBitmapSurface(copybit_image_t* img) const;
-    status_t getBitmapSurface(GGLSurface* surface) const;
-
+    status_t lock(GGLSurface* surface, uint32_t usage);
+    
     android_native_buffer_t* getNativeBuffer() const;
     
 private:
diff --git a/libs/surfaceflinger/LayerBuffer.cpp b/libs/surfaceflinger/LayerBuffer.cpp
index 9339b87..8be91c9 100644
--- a/libs/surfaceflinger/LayerBuffer.cpp
+++ b/libs/surfaceflinger/LayerBuffer.cpp
@@ -380,37 +380,37 @@
 
 void LayerBuffer::BufferSource::onDraw(const Region& clip) const 
 {
-    sp<Buffer> buffer(getBuffer());
+    // FIXME: we should get a native buffer here 
+    /*
+    sp<Buffer> ourBbuffer(getBuffer());
     if (UNLIKELY(buffer == 0))  {
         // nothing to do, we don't have a buffer
         mLayer.clearWithOpenGL(clip);
         return;
     }
 
-    status_t err = NO_ERROR;
-    NativeBuffer src(buffer->getBuffer());
-    const Rect& transformedBounds = mLayer.getTransformedBounds();
-
     // FIXME: We should model this after the overlay stuff
-    
     if (UNLIKELY(mTextureName == -1LU)) {
         mTextureName = mLayer.createTexture();
     }
-    GLuint w = 0;
-    GLuint h = 0;
-    GGLSurface t;
-    t.version = sizeof(GGLSurface);
-    t.width  = src.crop.r;
-    t.height = src.crop.b;
-    t.stride = src.img.w;
-    t.vstride= src.img.h;
-    t.format = src.img.format;
-    t.data = (GGLubyte*)(intptr_t(src.img.base) + src.img.offset);
-    const Region dirty(Rect(t.width, t.height));
 
     // FIXME: Use EGLImage extension for this
-    mLayer.loadTexture(dirty, mTextureName, t, w, h);
-    mLayer.drawWithOpenGL(clip, mTextureName, t, mBufferHeap.transform);
+    
+    
+    
+    GGLSurface t;
+    status_t res = buffer->lock(&t, GRALLOC_USAGE_SW_READ_RARELY);
+    if (res == NO_ERROR) {
+        GLuint w = 0;
+        GLuint h = 0;
+        const Region dirty(Rect(buffer->width, buffer->height));
+        mLayer.loadTexture(dirty, mTextureName, t, w, h);
+        buffer->unlock();
+    }
+    if (res == NO_ERROR) {
+        mLayer.drawWithOpenGL(clip, mTextureName, buffer, mBufferHeap.transform);
+    }
+    */
 }
 
 
diff --git a/libs/surfaceflinger/SurfaceFlinger.cpp b/libs/surfaceflinger/SurfaceFlinger.cpp
index 6b42158..5fd979e 100644
--- a/libs/surfaceflinger/SurfaceFlinger.cpp
+++ b/libs/surfaceflinger/SurfaceFlinger.cpp
@@ -50,8 +50,6 @@
 #include "LayerBuffer.h"
 #include "LayerDim.h"
 #include "LayerBitmap.h"
-#include "LayerOrientationAnim.h"
-#include "OrientationAnimation.h"
 #include "SurfaceFlinger.h"
 
 #include "DisplayHardware/DisplayHardware.h"
@@ -206,7 +204,6 @@
 SurfaceFlinger::~SurfaceFlinger()
 {
     glDeleteTextures(1, &mWormholeTexName);
-    delete mOrientationAnimation;
 }
 
 overlay_control_device_t* SurfaceFlinger::getOverlayEngine() const
@@ -399,8 +396,6 @@
      *  We're now ready to accept clients...
      */
 
-    mOrientationAnimation = new OrientationAnimation(this);
-    
     // the boot animation!
     if (mDebugNoBootAnimation == false)
         mBootAnimation = new BootAnimation(this);
@@ -513,16 +508,17 @@
 
 void SurfaceFlinger::postFramebuffer()
 {
-    const bool skip = mOrientationAnimation->run();
-    if (UNLIKELY(skip)) {
+    if (isFrozen()) {
+        // we are not allowed to draw, but pause a bit to make sure
+        // apps don't end up using the whole CPU, if they depend on
+        // surfaceflinger for synchronization.
+        usleep(8333); // 8.3ms ~ 120fps
         return;
     }
 
     if (!mInvalidRegion.isEmpty()) {
         const DisplayHardware& hw(graphicPlane(0).displayHardware());
-
         hw.flip(mInvalidRegion);
-
         mInvalidRegion.clear();
     }
 }
@@ -616,7 +612,6 @@
             mVisibleRegionsDirty = true;
             mDirtyRegion.set(hw.bounds());
             mFreezeDisplayTime = 0;
-            mOrientationAnimation->onOrientationChanged(type);
         }
 
         if (mCurrentState.freezeDisplay != mDrawingState.freezeDisplay) {
@@ -893,19 +888,26 @@
 
 void SurfaceFlinger::debugFlashRegions()
 {
-    if (UNLIKELY(!mDirtyRegion.isRect())) {
-        // TODO: do this only if we don't have preserving
-        // swapBuffer. If we don't have update-on-demand,
-        // redraw everything.
-        composeSurfaces(Region(mDirtyRegion.bounds()));
-    }
-
+     const DisplayHardware& hw(graphicPlane(0).displayHardware());
+     const uint32_t flags = hw.getFlags();
+     if (!(flags & DisplayHardware::BUFFER_PRESERVED)) {
+         const Region repaint((flags & DisplayHardware::UPDATE_ON_DEMAND) ?
+                 mDirtyRegion.bounds() : hw.bounds());
+         composeSurfaces(repaint);
+     }
+    
     glDisable(GL_TEXTURE_2D);
     glDisable(GL_BLEND);
     glDisable(GL_DITHER);
     glDisable(GL_SCISSOR_TEST);
 
-    glColor4x(0x10000, 0, 0x10000, 0x10000);
+    static int toggle = 0;
+    toggle = 1 - toggle;
+    if (toggle) {
+        glColor4x(0x10000, 0, 0x10000, 0x10000);
+    } else {
+        glColor4x(0x10000, 0x10000, 0, 0x10000);
+    }
 
     Rect r;
     Region::iterator iterator(mDirtyRegion);
@@ -919,8 +921,7 @@
         glVertexPointer(2, GL_FLOAT, 0, vertices);
         glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
     }
-
-    const DisplayHardware& hw(graphicPlane(0).displayHardware());
+    
     hw.flip(mDirtyRegion.merge(mInvalidRegion));
     mInvalidRegion.clear();
 
diff --git a/libs/surfaceflinger/SurfaceFlinger.h b/libs/surfaceflinger/SurfaceFlinger.h
index 319f80e..d5e5252 100644
--- a/libs/surfaceflinger/SurfaceFlinger.h
+++ b/libs/surfaceflinger/SurfaceFlinger.h
@@ -55,8 +55,6 @@
 class FreezeLock;
 class Layer;
 class LayerBuffer;
-class LayerOrientationAnim;
-class OrientationAnimation;
 
 typedef int32_t ClientID;
 
@@ -335,8 +333,6 @@
                 bool                        mFreezeDisplay;
                 int32_t                     mFreezeCount;
                 nsecs_t                     mFreezeDisplayTime;
-                friend class OrientationAnimation;
-                OrientationAnimation*       mOrientationAnimation;
 
                 // don't use a lock for these, we don't care
                 int                         mDebugRegion;
diff --git a/libs/surfaceflinger/LayerOrientationAnim.cpp b/libs/surfaceflinger/purgatory/LayerOrientationAnim.cpp
similarity index 100%
rename from libs/surfaceflinger/LayerOrientationAnim.cpp
rename to libs/surfaceflinger/purgatory/LayerOrientationAnim.cpp
diff --git a/libs/surfaceflinger/LayerOrientationAnim.h b/libs/surfaceflinger/purgatory/LayerOrientationAnim.h
similarity index 100%
rename from libs/surfaceflinger/LayerOrientationAnim.h
rename to libs/surfaceflinger/purgatory/LayerOrientationAnim.h
diff --git a/libs/surfaceflinger/LayerOrientationAnimRotate.cpp b/libs/surfaceflinger/purgatory/LayerOrientationAnimRotate.cpp
similarity index 100%
rename from libs/surfaceflinger/LayerOrientationAnimRotate.cpp
rename to libs/surfaceflinger/purgatory/LayerOrientationAnimRotate.cpp
diff --git a/libs/surfaceflinger/LayerOrientationAnimRotate.h b/libs/surfaceflinger/purgatory/LayerOrientationAnimRotate.h
similarity index 100%
rename from libs/surfaceflinger/LayerOrientationAnimRotate.h
rename to libs/surfaceflinger/purgatory/LayerOrientationAnimRotate.h
diff --git a/libs/surfaceflinger/OrientationAnimation.cpp b/libs/surfaceflinger/purgatory/OrientationAnimation.cpp
similarity index 100%
rename from libs/surfaceflinger/OrientationAnimation.cpp
rename to libs/surfaceflinger/purgatory/OrientationAnimation.cpp
diff --git a/libs/surfaceflinger/OrientationAnimation.h b/libs/surfaceflinger/purgatory/OrientationAnimation.h
similarity index 100%
rename from libs/surfaceflinger/OrientationAnimation.h
rename to libs/surfaceflinger/purgatory/OrientationAnimation.h