Fixed assert in unlockStencilBuffer
http://codereview.appspot.com/6492088/ git-svn-id: http://skia.googlecode.com/svn/trunk@5413 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
0d50bc1490
commit
667c3a3b8b
@ -246,7 +246,6 @@ GrStencilBuffer* GrContext::findAndLockStencilBuffer(int width, int height,
|
||||
}
|
||||
|
||||
void GrContext::unlockStencilBuffer(GrStencilBuffer* sb) {
|
||||
ASSERT_OWNED_RESOURCE(sb);
|
||||
|
||||
if (NULL == sb->getCacheEntry()) {
|
||||
// This can happen when the GrResourceCache is being deleted. If
|
||||
@ -256,6 +255,10 @@ void GrContext::unlockStencilBuffer(GrStencilBuffer* sb) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If the texture cache still exists we know the GrGpu & GrContext still
|
||||
// exist so we can verify ownership.
|
||||
ASSERT_OWNED_RESOURCE(sb);
|
||||
|
||||
fTextureCache->unlock(sb->getCacheEntry());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user