Cleanup extraneous D3D9_REPLACE comments

Trac #22394
Signed-off-by: Nicolas Capens
Signed-off-by: Shannon Woods

Blit.cpp and Renderer9.h/.cpp will remain d3d9-specific.
Remove various unused includes and a typedef.

git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1714 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/renderer/Blit.cpp b/src/libGLESv2/renderer/Blit.cpp
index c7def67..ec23121 100644
--- a/src/libGLESv2/renderer/Blit.cpp
+++ b/src/libGLESv2/renderer/Blit.cpp
@@ -12,9 +12,9 @@
 
 #include "libGLESv2/main.h"
 #include "libGLESv2/utilities.h"
-#include "libGLESv2/renderer/renderer9_utils.h" // D3D9_REPLACE
-#include "libGLESv2/renderer/TextureStorage9.h" // D3D9_REPLACE
-#include "libGLESv2/renderer/RenderTarget9.h"   // D3D9_REPLACE
+#include "libGLESv2/renderer/renderer9_utils.h"
+#include "libGLESv2/renderer/TextureStorage9.h"
+#include "libGLESv2/renderer/RenderTarget9.h"
 #include "libGLESv2/Framebuffer.h"
 
 namespace
@@ -68,7 +68,6 @@
     }
 }
 
-// D3D9_REPLACE
 void Blit::initGeometry()
 {
     static const float quad[] =
@@ -121,7 +120,7 @@
                      D3DShaderType *(rx::Renderer9::*createShader)(const DWORD *, size_t length),
                      HRESULT (WINAPI IDirect3DDevice9::*setShader)(D3DShaderType*))
 {
-    IDirect3DDevice9 *device = mRenderer->getDevice(); // D3D9_REPLACE
+    IDirect3DDevice9 *device = mRenderer->getDevice();
 
     D3DShaderType *shader;
 
@@ -187,7 +186,6 @@
         return false;
     }
 
-    // D3D9_REPLACE
     IDirect3DDevice9 *device = mRenderer->getDevice();
 
     saveState();
@@ -215,7 +213,6 @@
 
 bool Blit::copy(gl::Framebuffer *framebuffer, const RECT &sourceRect, GLenum destFormat, GLint xoffset, GLint yoffset, TextureStorageInterface2D *storage, GLint level)
 {
-    // D3D9_REPLACE
     RenderTarget9 *renderTarget = NULL;
     IDirect3DSurface9 *source = NULL;
     gl::Renderbuffer *colorbuffer = framebuffer->getColorbuffer();
@@ -252,7 +249,6 @@
 
 bool Blit::copy(gl::Framebuffer *framebuffer, const RECT &sourceRect, GLenum destFormat, GLint xoffset, GLint yoffset, TextureStorageInterfaceCube *storage, GLenum target, GLint level)
 {
-    // D3D9_REPLACE
     RenderTarget9 *renderTarget = NULL;
     IDirect3DSurface9 *source = NULL;
     gl::Renderbuffer *colorbuffer = framebuffer->getColorbuffer();
@@ -328,7 +324,6 @@
         return false;
     }
 
-    // D3D9_REPLACE
     IDirect3DDevice9 *device = mRenderer->getDevice();
 
     saveState();
@@ -409,12 +404,11 @@
         break;
     }
 
-    mRenderer->getDevice()->SetPixelShaderConstantF(0, psConst0, 1); // D3D9_REPLACE
+    mRenderer->getDevice()->SetPixelShaderConstantF(0, psConst0, 1);
 
     return true;
 }
 
-// D3D9_REPLACE
 IDirect3DTexture9 *Blit::copySurfaceToTexture(IDirect3DSurface9 *surface, const RECT &sourceRect)
 {
     if (!surface)
@@ -422,7 +416,7 @@
         return NULL;
     }
 
-    IDirect3DDevice9 *device = mRenderer->getDevice(); // D3D9_REPLACE
+    IDirect3DDevice9 *device = mRenderer->getDevice();
 
     D3DSURFACE_DESC sourceDesc;
     surface->GetDesc(&sourceDesc);
@@ -464,7 +458,7 @@
 
 void Blit::setViewport(const RECT &sourceRect, GLint xoffset, GLint yoffset)
 {
-    IDirect3DDevice9 *device = mRenderer->getDevice(); // D3D9_REPLACE
+    IDirect3DDevice9 *device = mRenderer->getDevice();
 
     D3DVIEWPORT9 vp;
     vp.X      = xoffset;
@@ -479,7 +473,6 @@
     device->SetVertexShaderConstantF(0, halfPixelAdjust, 1);
 }
 
-// D3D9_REPLACE
 void Blit::setCommonBlitState()
 {
     IDirect3DDevice9 *device = mRenderer->getDevice();
@@ -510,7 +503,6 @@
     }
 }
 
-// D3D9_REPLACE
 void Blit::render()
 {
     IDirect3DDevice9 *device = mRenderer->getDevice();
@@ -522,7 +514,6 @@
     hr = device->DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2);
 }
 
-// D3D9_REPLACE
 void Blit::saveState()
 {
     IDirect3DDevice9 *device = mRenderer->getDevice();
@@ -575,7 +566,6 @@
     }
 }
 
-// D3D9_REPLACE
 void Blit::restoreState()
 {
     IDirect3DDevice9 *device = mRenderer->getDevice();
diff --git a/src/libGLESv2/renderer/Image9.cpp b/src/libGLESv2/renderer/Image9.cpp
index e94b71f..f66f572 100644
--- a/src/libGLESv2/renderer/Image9.cpp
+++ b/src/libGLESv2/renderer/Image9.cpp
@@ -191,7 +191,7 @@
         GLsizei requestHeight = mHeight;
         gl::MakeValidSize(true, gl::IsCompressed(mInternalFormat), &requestWidth, &requestHeight, &levelToFetch);
 
-        IDirect3DDevice9 *device = mRenderer->getDevice(); // D3D9_REPLACE
+        IDirect3DDevice9 *device = mRenderer->getDevice();
 
         HRESULT result = device->CreateTexture(requestWidth, requestHeight, levelToFetch + 1, 0, d3dFormat,
                                                     poolToUse, &newTexture, NULL);
@@ -321,7 +321,7 @@
 
         POINT point = {rect.left, rect.top};
 
-        IDirect3DDevice9 *device = mRenderer->getDevice(); // D3D9_REPLACE
+        IDirect3DDevice9 *device = mRenderer->getDevice();
 
         if (mD3DPool == D3DPOOL_MANAGED)
         {
@@ -504,7 +504,7 @@
         return error(GL_OUT_OF_MEMORY);
     }
 
-    IDirect3DDevice9 *device = mRenderer->getDevice(); // D3D9_REPLACE
+    IDirect3DDevice9 *device = mRenderer->getDevice();
 
     IDirect3DSurface9 *renderTargetData = NULL;
     D3DSURFACE_DESC description;
diff --git a/src/libGLESv2/renderer/RenderTarget.h b/src/libGLESv2/renderer/RenderTarget.h
index a9e61ad..e7b3323 100644
--- a/src/libGLESv2/renderer/RenderTarget.h
+++ b/src/libGLESv2/renderer/RenderTarget.h
@@ -15,8 +15,6 @@
 
 #include "common/angleutils.h"
 
-struct IDirect3DSurface9;   // D3D9_REPLACE
-
 namespace rx
 {
 class RenderTarget
diff --git a/src/libGLESv2/renderer/Renderer9.cpp b/src/libGLESv2/renderer/Renderer9.cpp
index f60c992..555010f 100644
--- a/src/libGLESv2/renderer/Renderer9.cpp
+++ b/src/libGLESv2/renderer/Renderer9.cpp
@@ -596,7 +596,6 @@
     }
 }
 
-// D3D9_REPLACE
 void Renderer9::sync(bool block)
 {
     HRESULT result;
@@ -642,7 +641,6 @@
     return new rx::SwapChain9(this, window, shareHandle, backBufferFormat, depthBufferFormat);
 }
 
-// D3D9_REPLACE
 IDirect3DQuery9* Renderer9::allocateEventQuery()
 {
     IDirect3DQuery9 *query = NULL;
@@ -661,7 +659,6 @@
     return query;
 }
 
-// D3D9_REPLACE
 void Renderer9::freeEventQuery(IDirect3DQuery9* query)
 {
     if (mEventQueryPool.size() > 1000)
@@ -2252,7 +2249,6 @@
 bool Renderer9::getShareHandleSupport() const
 {
     // PIX doesn't seem to support using share handles, so disable them.
-    // D3D9_REPLACE
     return (mD3d9Ex != NULL) && !gl::perfActive();
 }
 
@@ -3029,7 +3025,6 @@
     if (source && dest)
     {
         HRESULT result = D3DERR_OUTOFVIDEOMEMORY;
-        IDirect3DDevice9 *device = getDevice(); // D3D9_REPLACE
 
         if (fromManaged)
         {
@@ -3037,19 +3032,19 @@
             source->GetDesc(&desc);
 
             IDirect3DSurface9 *surf = 0;
-            result = device->CreateOffscreenPlainSurface(desc.Width, desc.Height, desc.Format, D3DPOOL_SYSTEMMEM, &surf, NULL);
+            result = mDevice->CreateOffscreenPlainSurface(desc.Width, desc.Height, desc.Format, D3DPOOL_SYSTEMMEM, &surf, NULL);
 
             if (SUCCEEDED(result))
             {
                 Image9::copyLockableSurfaces(surf, source);
-                result = device->UpdateSurface(surf, NULL, dest, NULL);
+                result = mDevice->UpdateSurface(surf, NULL, dest, NULL);
                 surf->Release();
             }
         }
         else
         {
             endScene();
-            result = device->StretchRect(source, NULL, dest, NULL, D3DTEXF_NONE);
+            result = mDevice->StretchRect(source, NULL, dest, NULL, D3DTEXF_NONE);
         }
 
         if (FAILED(result))
diff --git a/src/libGLESv2/renderer/Renderer9.h b/src/libGLESv2/renderer/Renderer9.h
index f9116d9..aef07d2 100644
--- a/src/libGLESv2/renderer/Renderer9.h
+++ b/src/libGLESv2/renderer/Renderer9.h
@@ -137,7 +137,7 @@
     virtual int getMaxTextureWidth() const;
     virtual int getMaxTextureHeight() const;
     virtual bool get32BitIndexSupport() const;
-    DWORD getCapsDeclTypes() const; // D3D9_REPLACE
+    DWORD getCapsDeclTypes() const;
     virtual int getMinSwapInterval() const;
     virtual int getMaxSwapInterval() const;