Let TextureStorage track the texture pool explicitly

Trac #19259 Issue=268 Signed-off-by: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@920 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent f5cffc91
...@@ -1264,7 +1264,7 @@ void Image::copy(GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, ...@@ -1264,7 +1264,7 @@ void Image::copy(GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width,
TextureStorage::TextureStorage(bool renderable) TextureStorage::TextureStorage(bool renderable)
: mRenderable(renderable), : mRenderable(renderable),
mManaged(getDisplay()->getTexturePool(renderable) == D3DPOOL_MANAGED), mD3DPool(getDisplay()->getTexturePool(renderable)),
mTextureSerial(issueTextureSerial()) mTextureSerial(issueTextureSerial())
{ {
} }
...@@ -1280,7 +1280,7 @@ bool TextureStorage::isRenderable() const ...@@ -1280,7 +1280,7 @@ bool TextureStorage::isRenderable() const
bool TextureStorage::isManaged() const bool TextureStorage::isManaged() const
{ {
return mManaged; return (mD3DPool == D3DPOOL_MANAGED);
} }
unsigned int TextureStorage::getTextureSerial() const unsigned int TextureStorage::getTextureSerial() const
......
...@@ -157,7 +157,7 @@ class TextureStorage ...@@ -157,7 +157,7 @@ class TextureStorage
DISALLOW_COPY_AND_ASSIGN(TextureStorage); DISALLOW_COPY_AND_ASSIGN(TextureStorage);
const bool mRenderable; const bool mRenderable;
const bool mManaged; const D3DPOOL mD3DPool;
const unsigned int mTextureSerial; const unsigned int mTextureSerial;
static unsigned int issueTextureSerial(); static unsigned int issueTextureSerial();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment