Add Renderer class and move functionality from Display

Trac #21727

Conflicts:

	src/libGLESv2/Texture.cpp
	src/libGLESv2/libGLESv2.vcxproj

git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1329 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/Query.cpp b/src/libGLESv2/Query.cpp
index 10edda5..b6fa1de 100644
--- a/src/libGLESv2/Query.cpp
+++ b/src/libGLESv2/Query.cpp
@@ -34,6 +34,7 @@
 {
     if (mQuery == NULL)
     {
+        // D3D9_REPLACE
         if (FAILED(getDevice()->CreateQuery(D3DQUERYTYPE_OCCLUSION, &mQuery)))
         {
             return error(GL_OUT_OF_MEMORY);
@@ -68,7 +69,7 @@
             // explicitly check for device loss
             // some drivers seem to return S_FALSE even if the device is lost
             // instead of D3DERR_DEVICELOST like they should
-            if (gl::getDisplay()->testDeviceLost())
+            if (gl::getDisplay()->getRenderer()->testDeviceLost()) // D3D9_REPLACE
             {
                 gl::getDisplay()->notifyDeviceLost();
                 return error(GL_OUT_OF_MEMORY, 0);