Defer image surface creation.

TRAC #18714 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@828 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 5cce3ff0
......@@ -44,19 +44,22 @@ Image::~Image()
void Image::redefine(GLenum format, GLsizei width, GLsizei height, GLenum type)
{
if (mWidth != width ||
mHeight != height ||
mFormat != format ||
mType != type)
{
if (mSurface)
{
mSurface->Release();
mSurface = NULL;
}
}
mWidth = width;
mHeight = height;
mFormat = format;
mType = type;
if (mSurface)
{
mSurface->Release();
mSurface = NULL;
mDirty = true;
}
createSurface();
}
void Image::createSurface()
......
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