Removed old resource locking system
https://codereview.appspot.com/6488098/
git-svn-id: http://skia.googlecode.com/svn/trunk@5453 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrRenderTarget.cpp b/src/gpu/GrRenderTarget.cpp
index f8f9e3c..0d36fd0 100644
--- a/src/gpu/GrRenderTarget.cpp
+++ b/src/gpu/GrRenderTarget.cpp
@@ -96,11 +96,12 @@
void GrRenderTarget::setStencilBuffer(GrStencilBuffer* stencilBuffer) {
if (NULL != fStencilBuffer) {
+ fStencilBuffer->unref();
+
GrContext* context = this->getContext();
if (NULL != context) {
- context->unlockStencilBuffer(fStencilBuffer);
+ context->purgeCache();
}
- fStencilBuffer->unref();
if (NULL != context) {
context->purgeCache();