Refactoring: Rename SurfaceTextureClient to Surface

Change-Id: I41134fe88716917ce4327293335fa116f44fabe3
diff --git a/Source/WebCore/platform/graphics/android/layers/CanvasTexture.cpp b/Source/WebCore/platform/graphics/android/layers/CanvasTexture.cpp
index dca0dcd..66a4e1e 100644
--- a/Source/WebCore/platform/graphics/android/layers/CanvasTexture.cpp
+++ b/Source/WebCore/platform/graphics/android/layers/CanvasTexture.cpp
@@ -42,7 +42,7 @@
 
 #include <android/native_window.h>
 #include <gui/GLConsumer.h>
-#include <gui/SurfaceTextureClient.h>
+#include <gui/Surface.h>
 
 namespace WebCore {
 
@@ -98,7 +98,7 @@
     }
 }
 
-SurfaceTextureClient* CanvasTexture::nativeWindow()
+Surface* CanvasTexture::nativeWindow()
 {
     android::Mutex::Autolock lock(m_surfaceLock);
     if (m_ANW.get())
@@ -108,7 +108,7 @@
     if (!useSurfaceTexture())
         return 0;
     m_surfaceTexture = new android::GLConsumer(m_texture, false);
-    m_ANW = new android::SurfaceTextureClient(m_surfaceTexture->getBufferQueue());
+    m_ANW = new android::Surface(m_surfaceTexture->getBufferQueue());
     int result = native_window_set_buffers_format(m_ANW.get(), HAL_PIXEL_FORMAT_RGBA_8888);
     GLUtils::checkSurfaceTextureError("native_window_set_buffers_format", result);
     if (result == NO_ERROR) {
@@ -127,7 +127,7 @@
 bool CanvasTexture::uploadImageBuffer(ImageBuffer* imageBuffer)
 {
     m_hasValidTexture = false;
-    SurfaceTextureClient* anw = nativeWindow();
+    Surface* anw = nativeWindow();
     if (!anw)
         return false;
     // Size mismatch, early abort (will fall back to software)
diff --git a/Source/WebCore/platform/graphics/android/layers/CanvasTexture.h b/Source/WebCore/platform/graphics/android/layers/CanvasTexture.h
index f8c2f95..15f075e 100644
--- a/Source/WebCore/platform/graphics/android/layers/CanvasTexture.h
+++ b/Source/WebCore/platform/graphics/android/layers/CanvasTexture.h
@@ -35,7 +35,7 @@
 
 namespace android {
 class GLConsumer;
-class SurfaceTextureClient;
+class Surface;
 }
 
 namespace WebCore {
@@ -53,7 +53,7 @@
      * Called by WebKit thread
      ********************************************/
     void setSize(const IntSize& size);
-    SurfaceTextureClient* nativeWindow();
+    Surface* nativeWindow();
     bool uploadImageBuffer(ImageBuffer* imageBuffer);
     bool hasValidTexture() { return m_hasValidTexture; }
 
@@ -82,7 +82,7 @@
     GLuint m_texture;
     android::Mutex m_surfaceLock;
     sp<android::GLConsumer> m_surfaceTexture;
-    sp<android::SurfaceTextureClient> m_ANW;
+    sp<android::Surface> m_ANW;
     bool m_hasValidTexture;
     bool m_useHwAcceleration;
 
diff --git a/Source/WebCore/platform/graphics/android/layers/MediaLayer.h b/Source/WebCore/platform/graphics/android/layers/MediaLayer.h
index 188252b..fb24d1c 100644
--- a/Source/WebCore/platform/graphics/android/layers/MediaLayer.h
+++ b/Source/WebCore/platform/graphics/android/layers/MediaLayer.h
@@ -47,7 +47,7 @@
     void invertContents(bool invert) { m_mediaTexture->invertContents(invert); }
     void setOutlineSize(int size) { m_outlineSize = size; }
 
-    // function to setup the primary SurfaceTextureClient in the renderer's context
+    // function to setup the primary Surface in the renderer's context
     ANativeWindow* acquireNativeWindowForContent();
 
     // functions to manipulate secondary layers for video playback
@@ -60,7 +60,7 @@
     bool m_isCopy;
     int m_outlineSize;
 
-    // SurfaceTextureClient member variables
+    // Surface member variables
     MediaTexture* m_mediaTexture;
 };
 
diff --git a/Source/WebCore/platform/graphics/android/layers/MediaListener.h b/Source/WebCore/platform/graphics/android/layers/MediaListener.h
index f02ff7c..74eb59a 100644
--- a/Source/WebCore/platform/graphics/android/layers/MediaListener.h
+++ b/Source/WebCore/platform/graphics/android/layers/MediaListener.h
@@ -20,7 +20,7 @@
 #if USE(ACCELERATED_COMPOSITING)
 
 #include <gui/GLConsumer.h>
-#include <gui/SurfaceTextureClient.h>
+#include <gui/Surface.h>
 #include <jni.h>
 #include <JNIUtility.h>
 #include "MediaTexture.h"
diff --git a/Source/WebCore/platform/graphics/android/layers/MediaTexture.cpp b/Source/WebCore/platform/graphics/android/layers/MediaTexture.cpp
index 67324c7..b001c1a 100644
--- a/Source/WebCore/platform/graphics/android/layers/MediaTexture.cpp
+++ b/Source/WebCore/platform/graphics/android/layers/MediaTexture.cpp
@@ -30,7 +30,7 @@
 
 #include <android/native_window.h>
 #include <gui/GLConsumer.h>
-#include <gui/SurfaceTextureClient.h>
+#include <gui/Surface.h>
 #include <JNIUtility.h>
 #include "WebCoreJni.h"
 
@@ -281,7 +281,7 @@
     // populate the wrapper
     glGenTextures(1, &wrapper->textureId);
     wrapper->surfaceTexture = new android::GLConsumer(wrapper->textureId);
-    wrapper->nativeWindow = new android::SurfaceTextureClient(
+    wrapper->nativeWindow = new android::Surface(
             wrapper->surfaceTexture->getBufferQueue());
     wrapper->dimensions.setEmpty();
 
diff --git a/Source/WebCore/platform/graphics/android/rendering/GaneshRenderer.cpp b/Source/WebCore/platform/graphics/android/rendering/GaneshRenderer.cpp
index ed57613..4eace7c 100644
--- a/Source/WebCore/platform/graphics/android/rendering/GaneshRenderer.cpp
+++ b/Source/WebCore/platform/graphics/android/rendering/GaneshRenderer.cpp
@@ -91,7 +91,7 @@
     GaneshContext::instance()->flush();
 
     // In SurfaceTextureMode we must call swapBuffers to unlock and post the
-    // tile's ANativeWindow (i.e. SurfaceTextureClient) buffer
+    // tile's ANativeWindow (i.e. Surface) buffer
     TransferQueue* tileQueue = TilesManager::instance()->transferQueue();
     eglSwapBuffers(eglGetCurrentDisplay(), tileQueue->m_eglSurface);
     SkBitmap dummyBitmap;
diff --git a/Source/WebCore/platform/graphics/android/rendering/TextureInfo.cpp b/Source/WebCore/platform/graphics/android/rendering/TextureInfo.cpp
index 714410e..32237cd 100644
--- a/Source/WebCore/platform/graphics/android/rendering/TextureInfo.cpp
+++ b/Source/WebCore/platform/graphics/android/rendering/TextureInfo.cpp
@@ -31,7 +31,7 @@
 #include <JNIUtility.h>
 #include <android/native_window.h>
 #include <gui/GLConsumer.h>
-#include <gui/SurfaceTextureClient.h>
+#include <gui/Surface.h>
 
 namespace WebCore {
 
diff --git a/Source/WebCore/platform/graphics/android/rendering/TilesManager.cpp b/Source/WebCore/platform/graphics/android/rendering/TilesManager.cpp
index 0ab74aa..f44f79d 100644
--- a/Source/WebCore/platform/graphics/android/rendering/TilesManager.cpp
+++ b/Source/WebCore/platform/graphics/android/rendering/TilesManager.cpp
@@ -43,7 +43,7 @@
 #include <android/native_window.h>
 #include <cutils/atomic.h>
 #include <gui/GLConsumer.h>
-#include <gui/SurfaceTextureClient.h>
+#include <gui/Surface.h>
 #include <wtf/CurrentTime.h>
 
 // Important: We need at least twice as many textures as is needed to cover
diff --git a/Source/WebCore/platform/graphics/android/rendering/TransferQueue.cpp b/Source/WebCore/platform/graphics/android/rendering/TransferQueue.cpp
index 0db91bd..81b3ff4 100644
--- a/Source/WebCore/platform/graphics/android/rendering/TransferQueue.cpp
+++ b/Source/WebCore/platform/graphics/android/rendering/TransferQueue.cpp
@@ -40,7 +40,7 @@
 #include "TilesManager.h"
 #include <android/native_window.h>
 #include <gui/GLConsumer.h>
-#include <gui/SurfaceTextureClient.h>
+#include <gui/Surface.h>
 
 // For simple webView usage, MINIMAL_SIZE is recommended for memory saving.
 // In browser case, EFFICIENT_SIZE is preferred.
@@ -113,7 +113,7 @@
                                         GL_TEXTURE_EXTERNAL_OES, true,
                                         bufferQueue);
 #endif
-        m_ANW = new android::SurfaceTextureClient(bufferQueue);
+        m_ANW = new android::Surface(bufferQueue);
         m_sharedSurfaceTexture->setSynchronousMode(true);
 
         int extraBuffersNeeded = 0;