Explicitly retrieve a Renderer9 or Renderer interface from Display.

TRAC #21963
Signed-off-by: Daniel Koch
Author: Nicolas Capens

git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1377 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/renderer/Image.cpp b/src/libGLESv2/renderer/Image.cpp
index a7eb18a..629e887 100644
--- a/src/libGLESv2/renderer/Image.cpp
+++ b/src/libGLESv2/renderer/Image.cpp
@@ -310,7 +310,7 @@
         MakeValidSize(true, IsCompressed(mInternalFormat), &requestWidth, &requestHeight, &levelToFetch);
 
         // D3D9_REPLACE
-        IDirect3DDevice9 *device = getDisplay()->getRenderer()->getDevice();
+        IDirect3DDevice9 *device = getDisplay()->getRenderer9()->getDevice();
         HRESULT result = device->CreateTexture(requestWidth, requestHeight, levelToFetch + 1, NULL, d3dFormat,
                                                     poolToUse, &newTexture, NULL);
 
@@ -437,7 +437,7 @@
         rect.bottom = yoffset + height;
 
         POINT point = {rect.left, rect.top};
-        IDirect3DDevice9 *device = getDisplay()->getRenderer()->getDevice();  // D3D9_REPLACE
+        IDirect3DDevice9 *device = getDisplay()->getRenderer9()->getDevice();  // D3D9_REPLACE
 
         if (mD3DPool == D3DPOOL_MANAGED)
         {
@@ -986,7 +986,7 @@
         return error(GL_OUT_OF_MEMORY);
     }
 
-    IDirect3DDevice9 *device = getDisplay()->getRenderer()->getDevice(); // D3D9_REPLACE
+    IDirect3DDevice9 *device = getDisplay()->getRenderer9()->getDevice(); // D3D9_REPLACE
     IDirect3DSurface9 *renderTargetData = NULL;
     D3DSURFACE_DESC description;
     renderTarget->GetDesc(&description);
diff --git a/src/libGLESv2/renderer/TextureStorage.cpp b/src/libGLESv2/renderer/TextureStorage.cpp
index 5905615..7b53fb0 100644
--- a/src/libGLESv2/renderer/TextureStorage.cpp
+++ b/src/libGLESv2/renderer/TextureStorage.cpp
@@ -23,7 +23,7 @@
 
 TextureStorage::TextureStorage(DWORD usage)
     : mD3DUsage(usage),
-      mD3DPool(getDisplay()->getRenderer()->getTexturePool(usage)), // D3D9_REPLACE
+      mD3DPool(getDisplay()->getRenderer9()->getTexturePool(usage)), // D3D9_REPLACE
       mTextureSerial(issueTextureSerial()),
       mLodOffset(0)
 {
@@ -172,7 +172,7 @@
     if (source && dest)
     {
         HRESULT result = D3DERR_OUTOFVIDEOMEMORY;
-        renderer::Renderer9 *renderer = getDisplay()->getRenderer();
+        renderer::Renderer9 *renderer = getDisplay()->getRenderer9();
         IDirect3DDevice9 *device = renderer->getDevice(); // D3D9_REPLACE
 
         if (fromManaged)
@@ -221,7 +221,7 @@
     // we handle that here by skipping the d3d texture creation
     if (width > 0 && height > 0)
     {
-        IDirect3DDevice9 *device = getDisplay()->getRenderer()->getDevice(); // D3D9_REPLACE
+        IDirect3DDevice9 *device = getDisplay()->getRenderer9()->getDevice(); // D3D9_REPLACE
         MakeValidSize(false, gl::IsCompressed(internalformat), &width, &height, &mLodOffset);
         HRESULT result = device->CreateTexture(width, height, levels ? levels + mLodOffset : 0, getUsage(),
                                                ConvertTextureInternalFormat(internalformat), getPool(), &mTexture, NULL);
@@ -321,7 +321,7 @@
     // we handle that here by skipping the d3d texture creation
     if (size > 0)
     {
-        IDirect3DDevice9 *device = getDisplay()->getRenderer()->getDevice(); // D3D9_REPLACE
+        IDirect3DDevice9 *device = getDisplay()->getRenderer9()->getDevice(); // D3D9_REPLACE
         int height = size;
         MakeValidSize(false, gl::IsCompressed(internalformat), &size, &height, &mLodOffset);
         HRESULT result = device->CreateCubeTexture(size, levels ? levels + mLodOffset : 0, getUsage(),