Checksum for GL pipe communication

This is the guest side implementation for cl go/oag/c/207292.

It initializes checksum whenever a renderControl is created. Each
HostConnection owns a checksum structure.

The list contains mostly auto-generated code by emugen.

Change-Id: I5f7bb9ec8a0cea82f3687f8a15839081651fd841
diff --git a/system/OpenglSystemCommon/HostConnection.h b/system/OpenglSystemCommon/HostConnection.h
index e7a5ac4..a52fbfa 100644
--- a/system/OpenglSystemCommon/HostConnection.h
+++ b/system/OpenglSystemCommon/HostConnection.h
@@ -18,6 +18,7 @@
 
 #include "IOStream.h"
 #include "renderControl_enc.h"
+#include "ChecksumCalculator.h"
 
 class GLEncoder;
 class gl_client_context_t;
@@ -33,6 +34,7 @@
     GLEncoder *glEncoder();
     GL2Encoder *gl2Encoder();
     renderControl_encoder_context_t *rcEncoder();
+    ChecksumCalculator *checksumHelper() { return &m_checksumHelper; }
 
     void flush() {
         if (m_stream) {
@@ -44,12 +46,16 @@
     HostConnection();
     static gl_client_context_t  *s_getGLContext();
     static gl2_client_context_t *s_getGL2Context();
+    // setProtocol initilizes GL communication protocol for checksums
+    // should be called when m_rcEnc is created
+    void setChecksumHelper(renderControl_encoder_context_t *rcEnc);
 
 private:
     IOStream *m_stream;
     GLEncoder   *m_glEnc;
     GL2Encoder  *m_gl2Enc;
     renderControl_encoder_context_t *m_rcEnc;
+    ChecksumCalculator m_checksumHelper;
 };
 
 #endif