Reset clip in ~SkGpuDevice
authorrobertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 24 Oct 2012 13:24:11 +0000 (13:24 +0000)
committerrobertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 24 Oct 2012 13:24:11 +0000 (13:24 +0000)
https://codereview.appspot.com/6763044/

git-svn-id: http://skia.googlecode.com/svn/trunk@6070 2bbb7eff-a529-9590-31e7-b0007b416f81

src/gpu/SkGpuDevice.cpp

index dadb9a0..52d26bb 100644 (file)
@@ -256,6 +256,10 @@ SkGpuDevice::~SkGpuDevice() {
         fContext->setRenderTarget(NULL);
     }
 
+    if (fContext->getClip() == &fClipData) {
+        fContext->setClip(NULL);
+    }
+
     SkSafeUnref(fRenderTarget);
     fContext->unref();
 }