aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/SkCanvas.cpp7
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)