Bug 1237748 - Avoid deleting the stencil RB if it's the same as the depth RB. r=jgilbert

--HG--
extra : rebase_source : d0f4b46dd9c9bfbb49020c44959bb8d36912bb6c
This commit is contained in:
kvark 2017-01-09 10:25:00 -05:00
Родитель 8a1688e6aa
Коммит a496f20f3f
1 изменённых файлов: 3 добавлений и 2 удалений

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

@ -878,7 +878,7 @@ DrawBuffer::~DrawBuffer()
GLuint rbs[] = {
mColorMSRB,
mDepthRB,
mStencilRB
(mStencilRB != mDepthRB) ? mStencilRB : 0, // Don't double-delete DEPTH_STENCIL RBs.
};
mGL->fDeleteFramebuffers(1, &fb);
@ -966,11 +966,12 @@ ReadBuffer::~ReadBuffer()
GLuint fb = mFB;
GLuint rbs[] = {
mDepthRB,
mStencilRB
(mStencilRB != mDepthRB) ? mStencilRB : 0, // Don't double-delete DEPTH_STENCIL RBs.
};
mGL->fDeleteFramebuffers(1, &fb);
mGL->fDeleteRenderbuffers(2, rbs);
mGL->mFBOMapping.erase(mFB);
}