diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-29 19:40:59 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-29 19:40:59 +0000 |
commit | c2a2483bbee761db5afb12a1a512285d67da821e (patch) | |
tree | 2f6d8cef52ee629f7f4d2c49184cbdf5bb47a4ac /src/core | |
parent | d9e0181405c9853ffd20502555200205a5ab09b1 (diff) |
Clear SkCanvas::fLastDeviceToGainFocus when releasing a device
Review URL: https://codereview.appspot.com/6499051/
git-svn-id: http://skia.googlecode.com/svn/trunk@5338 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkCanvas.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp index f5c6bc2a65..dc6da11ea1 100644 --- a/src/core/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp @@ -875,6 +875,13 @@ void SkCanvas::internalRestore() { fDeviceCMDirty = true; fLocalBoundsCompareTypeDirty = true; + // Dirty this pointer to handle the case of a new device created at the same address as the + // device we are restoring from. E.g.: + // saveLayer (creates a device) + // drawSomething + // restore (deletes the device) + // saveLayer (oops new device at the same address) + fLastDeviceToGainFocus = NULL; fClipStack.restore(); // reserve our layer (if any) |