gfxstream: fix meson build

The C++ AEMU API changed.  We like to freeze AEMU apis.

BUG=317816825
TEST=compile

Change-Id: I7491d7a3e76a8510f484545d21b073a046ed165a
diff --git a/host/GfxStreamAgents.cpp b/host/GfxStreamAgents.cpp
index 2a51847..6e91300 100644
--- a/host/GfxStreamAgents.cpp
+++ b/host/GfxStreamAgents.cpp
@@ -466,6 +466,7 @@
 namespace android {
 namespace emulation {
 
+#ifndef GFXSTREAM_MESON_BUILD
 const QAndroidVmOperations*
 GfxStreamGraphicsAgentFactory::android_get_QAndroidVmOperations() const {
     return &sQAndroidVmOperations;
@@ -481,5 +482,7 @@
         const {
     return &sQAndroidEmulatorWindowAgent;
 }
+#endif
+
 }  // namespace emulation
 }  // namespace android
diff --git a/host/GfxStreamAgents.h b/host/GfxStreamAgents.h
index 47f26b0..ddeca5a 100644
--- a/host/GfxStreamAgents.h
+++ b/host/GfxStreamAgents.h
@@ -24,6 +24,7 @@
 //
 // Most of the agents are not defined, add your agents here if you need
 // access to additional agents.
+#ifndef GFXSTREAM_MESON_BUILD
 class GfxStreamGraphicsAgentFactory : public GraphicsAgentFactory {
 public:
     const QAndroidVmOperations* android_get_QAndroidVmOperations()
@@ -35,6 +36,7 @@
     const QAndroidEmulatorWindowAgent*
     android_get_QAndroidEmulatorWindowAgent() const override;
 };
+#endif
 
 }  // namespace emulation
 }  // namespace android
diff --git a/host/meson.build b/host/meson.build
index 0abe13b..dfe7a6b 100644
--- a/host/meson.build
+++ b/host/meson.build
@@ -100,6 +100,7 @@
   use_magma = host_machine.system() == 'linux'
 endif
 
+gfxstream_host_args += '-DGFXSTREAM_MESON_BUILD=1'
 gfxstream_host_args += '-DGFXSTREAM_ENABLE_HOST_GLES=@0@'.format(use_gles ? '1' : '0')
 
 if use_magma
diff --git a/host/virtio-gpu-gfxstream-renderer.cpp b/host/virtio-gpu-gfxstream-renderer.cpp
index 9f10549..5da5de9 100644
--- a/host/virtio-gpu-gfxstream-renderer.cpp
+++ b/host/virtio-gpu-gfxstream-renderer.cpp
@@ -584,9 +584,10 @@
     androidHw->hw_gltransport_drawFlushInterval = 10000;
 
     EmuglConfig config;
-
     // Make all the console agents available.
+#ifndef GFXSTREAM_MESON_BUILD
     android::emulation::injectGraphicsAgents(android::emulation::GfxStreamGraphicsAgentFactory());
+#endif
 
     emuglConfig_init(&config, true /* gpu enabled */, "auto",
                      enable_egl2egl ? "swiftshader_indirect" : "host", 64, /* bitness */