From a6926b1f0352916c31cda66f2239a25d52f09315 Mon Sep 17 00:00:00 2001 From: "bsalomon@google.com" Date: Wed, 10 Oct 2012 15:25:50 +0000 Subject: Reland r5861 but leave setMatrixClip virtual on SkDevice (IOW this is a partial revert of r5871 which reverted r5861). Unreviewed Review URL: https://codereview.appspot.com/6631062 git-svn-id: http://skia.googlecode.com/svn/trunk@5881 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/core/SkCanvas.cpp | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'src/core') diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp index 5e476c6c9e..18cec44db7 100644 --- a/src/core/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp @@ -244,7 +244,6 @@ public: } // fCurrLayer may be NULL now - fCanvas->prepareForDeviceDraw(fDevice, *fMatrix, *fClip); return true; } return false; @@ -441,7 +440,6 @@ SkDevice* SkCanvas::init(SkDevice* device) { fBounder = NULL; fLocalBoundsCompareType.setEmpty(); fLocalBoundsCompareTypeDirty = true; - fLastDeviceToGainFocus = NULL; fDeviceCMDirty = false; fSaveLayerCount = 0; fMetaData = NULL; @@ -664,15 +662,6 @@ void SkCanvas::updateDeviceCMCache() { } } -void SkCanvas::prepareForDeviceDraw(SkDevice* device, const SkMatrix& matrix, - const SkRegion& clip) { - SkASSERT(device); - if (fLastDeviceToGainFocus != device) { - device->gainFocus(matrix, clip); - fLastDeviceToGainFocus = device; - } -} - /////////////////////////////////////////////////////////////////////////////// int SkCanvas::internalSave(SaveFlags flags) { @@ -859,13 +848,6 @@ 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) -- cgit v1.2.3