Fixed memory leak in Renderbuffer class. Offscreen objects backbuffer texture /shader resource view, depth stencil texture/shader resource views were leaking during swapchain resize operations.

Change-Id: Iee83a14d043eecc465e6ffb8e21a6449def38e9b
Reviewed-on: https://chromium-review.googlesource.com/211834
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
This commit is contained in:
Cooper Partin 2014-08-11 10:16:44 -07:00 коммит произвёл Geoff Lang
Родитель da5777cf9f
Коммит 75c42f45e5
4 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@ -20,6 +20,7 @@ Intel Corporation
Mozilla Corporation Mozilla Corporation
Turbulenz Turbulenz
Klarälvdalens Datakonsult AB Klarälvdalens Datakonsult AB
Microsoft Open Technologies, Inc.
Jacek Caban Jacek Caban
Mark Callow Mark Callow

Просмотреть файл

@ -78,3 +78,6 @@ Ulrik Persson (ddefrostt)
Mark Banner (standard8mbp) Mark Banner (standard8mbp)
David Kilzer David Kilzer
Microsoft Open Technologies, Inc.
Cooper Partin
Austin Kinross

Просмотреть файл

@ -29,6 +29,11 @@ Renderbuffer::Renderbuffer(GLuint id, RenderbufferStorage *newStorage)
ASSERT(mStorage); ASSERT(mStorage);
} }
Renderbuffer::~Renderbuffer()
{
SafeDelete(mStorage);
}
void Renderbuffer::setStorage(RenderbufferStorage *newStorage) void Renderbuffer::setStorage(RenderbufferStorage *newStorage)
{ {
ASSERT(newStorage); ASSERT(newStorage);

Просмотреть файл

@ -39,6 +39,7 @@ class Renderbuffer : public RefCountObject
{ {
public: public:
Renderbuffer(GLuint id, RenderbufferStorage *newStorage); Renderbuffer(GLuint id, RenderbufferStorage *newStorage);
virtual ~Renderbuffer();
void setStorage(RenderbufferStorage *newStorage); void setStorage(RenderbufferStorage *newStorage);
RenderbufferStorage *getStorage(); RenderbufferStorage *getStorage();