TextureColorbufferProxy must query the texture to get the latest width & height.

TRAC #12372

Signed-off-by: Daniel Koch

Author:    Andrew Lewycky

git-svn-id: https://angleproject.googlecode.com/svn/trunk@315 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/Texture.cpp b/src/libGLESv2/Texture.cpp
index cbdb9a7..cbebcbf 100644
--- a/src/libGLESv2/Texture.cpp
+++ b/src/libGLESv2/Texture.cpp
@@ -1468,13 +1468,10 @@
   : Colorbuffer(NULL), mTexture(texture), mTarget(target)
 {
     ASSERT(target == GL_TEXTURE_2D || IsCubemapTextureTarget(target));
-    latchTextureInfo();
 }
 
 IDirect3DSurface9 *Texture::TextureColorbufferProxy::getRenderTarget()
 {
-    latchTextureInfo();
-
     if (mRenderTarget) mRenderTarget->Release();
 
     mRenderTarget = mTexture->getRenderTarget(mTarget);
@@ -1482,10 +1479,14 @@
     return mRenderTarget;
 }
 
-void Texture::TextureColorbufferProxy::latchTextureInfo()
+int Texture::TextureColorbufferProxy::getWidth()
 {
-    mWidth = mTexture->getWidth();
-    mHeight = mTexture->getHeight();
+    return mTexture->getWidth();
+}
+
+int Texture::TextureColorbufferProxy::getHeight()
+{
+    return mTexture->getHeight();
 }
 
 }