Revert "Force-use the pbuffer surface for destroy"

bug:18528859

This reverts commit b945f2313aee6e49a082ba5caaf95334d2570d52.

Change-Id: I6915624d356cb8570471eb3a5b8921f59b58db6d
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index 4f39ac9..39528be 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -60,8 +60,6 @@
 
 void CanvasContext::destroy() {
     stopDrawing();
-    setSurface(NULL);
-    mEglManager.usePBufferSurface();
     freePrefetechedLayers();
     destroyHardwareResources();
     mAnimationContext->destroy();
@@ -69,6 +67,7 @@
         delete mCanvas;
         mCanvas = 0;
     }
+    setSurface(NULL);
 }
 
 void CanvasContext::setSurface(ANativeWindow* window) {