Disable getting share handles when PIX is enabled.

PIX doesn't seem to work with share handles, so disable them when we detect that pix is enabled.

BUG=
TEST=

Review URL: https://codereview.appspot.com/5625048

git-svn-id: https://angleproject.googlecode.com/svn/trunk@982 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libEGL/Display.cpp b/src/libEGL/Display.cpp
index 87aa005..e3ed3d1 100644
--- a/src/libEGL/Display.cpp
+++ b/src/libEGL/Display.cpp
@@ -1131,7 +1131,6 @@
 void Display::initExtensionString()
 {
     HMODULE swiftShader = GetModuleHandle(TEXT("swiftshader_d3d9.dll"));
-    bool isd3d9ex = isD3d9ExDevice();
 
     mExtensionString = "";
 
@@ -1139,7 +1138,7 @@
     mExtensionString += "EGL_EXT_create_context_robustness ";
 
     // ANGLE-specific extensions
-    if (isd3d9ex)
+    if (shareHandleSupported())
     {
         mExtensionString += "EGL_ANGLE_d3d_share_handle_client_buffer ";
     }
@@ -1151,7 +1150,7 @@
         mExtensionString += "EGL_ANGLE_software_display ";
     }
 
-    if (isd3d9ex)
+    if (shareHandleSupported())
     {
         mExtensionString += "EGL_ANGLE_surface_d3d_texture_2d_share_handle ";
     }
@@ -1170,6 +1169,12 @@
     return mExtensionString.c_str();
 }
 
+bool Display::shareHandleSupported() const 
+{
+    // PIX doesn't seem to support using share handles, so disable them.
+    return isD3d9ExDevice() && !gl::perfActive();
+}
+
 // Only Direct3D 10 ready devices support all the necessary vertex texture formats.
 // We test this using D3D9 by checking support for the R16F format.
 bool Display::getVertexTextureSupport() const