emulator opengl: Added glFinishRoundTrip to GLESv2

Change-Id: Ia1c6cb7e75a1769040d13e81d0da7db5f5c28435
diff --git a/tools/emulator/opengl/system/GLESv2_enc/GL2Encoder.cpp b/tools/emulator/opengl/system/GLESv2_enc/GL2Encoder.cpp
index b0a2e72..bdb9a42 100644
--- a/tools/emulator/opengl/system/GLESv2_enc/GL2Encoder.cpp
+++ b/tools/emulator/opengl/system/GLESv2_enc/GL2Encoder.cpp
@@ -26,6 +26,7 @@
     m_glGetVertexAttribfv_enc = set_glGetVertexAttribfv(s_glGetVertexAttribfv);
     m_glGetVertexAttribPointerv = set_glGetVertexAttribPointerv(s_glGetVertexAttribPointerv);
     set_glShaderSource(s_glShaderSource);
+    set_glFinish(s_glFinish);
 }
 
 GL2Encoder::~GL2Encoder()
@@ -335,3 +336,10 @@
     ctx->glShaderString(ctx, shader, str, len + 1);
     delete str;
 }
+
+void GL2Encoder::s_glFinish(void *self)
+{
+    GL2Encoder *ctx = (GL2Encoder *)self;
+    ctx->glFinishRoundTrip(self);
+}
+
diff --git a/tools/emulator/opengl/system/GLESv2_enc/GL2Encoder.h b/tools/emulator/opengl/system/GLESv2_enc/GL2Encoder.h
index 47a9ab3..59a9100 100644
--- a/tools/emulator/opengl/system/GLESv2_enc/GL2Encoder.h
+++ b/tools/emulator/opengl/system/GLESv2_enc/GL2Encoder.h
@@ -92,5 +92,7 @@
     static void s_glGetVertexAttribPointerv(void *self, GLuint index, GLenum pname, GLvoid **pointer);
 
     static void s_glShaderSource(void *self, GLuint shader, GLsizei count, const GLstr *string, const GLint *length);
+
+    static void s_glFinish(void *self);
 };
 #endif
diff --git a/tools/emulator/opengl/system/GLESv2_enc/gl2.attrib b/tools/emulator/opengl/system/GLESv2_enc/gl2.attrib
index fca7d61..c724405 100644
--- a/tools/emulator/opengl/system/GLESv2_enc/gl2.attrib
+++ b/tools/emulator/opengl/system/GLESv2_enc/gl2.attrib
@@ -547,3 +547,8 @@
 glShaderString
 	len string len
 	flag custom_decoder
+	
+glFinishRoundTrip
+	flag custom_decoder
+	flag not_api
+
diff --git a/tools/emulator/opengl/system/GLESv2_enc/gl2.in b/tools/emulator/opengl/system/GLESv2_enc/gl2.in
index af18cf0..14b9d19 100644
--- a/tools/emulator/opengl/system/GLESv2_enc/gl2.in
+++ b/tools/emulator/opengl/system/GLESv2_enc/gl2.in
@@ -211,5 +211,4 @@
 GL_ENTRY(void, glDrawElementsData, GLenum mode, GLsizei count, GLenum type, void *data, GLuint datalen)
 GL_ENTRY(void, glGetCompressedTextureFormats, int count, GLint *formats)
 GL_ENTRY(void, glShaderString, GLuint shader, GLstr string, GLsizei len)
-
-
+GL_ENTRY(int, glFinishRoundTrip, void)