Guard against most unintentionally ephemeral SkAutoFoo instantiations.
authorcommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 18 Nov 2013 16:03:59 +0000 (16:03 +0000)
committercommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 18 Nov 2013 16:03:59 +0000 (16:03 +0000)
commite61a86cfa00ea393ecc4a71fca94e1d476a37ecc
treef6ec6c793f279f8226ea40283e707cf3c716e12b
parent8bf4c0ab7b4acd25566459fc464027c5760d0e5e
Guard against most unintentionally ephemeral SkAutoFoo instantiations.

I think I applied the trick everywhere possible.  Limitations:
    - can't be used with templated classes
    - all constructors and destructors must be defined inline

A couple of the SkAutoFoo were unused in Skia, Chromium, and Android, so I
deleted them.  This change caught the same bugs Cary found in SkPath, plus one
more in SampleApp.

BUG=
R=reed@google.com, caryclark@google.com

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/72603005

git-svn-id: http://skia.googlecode.com/svn/trunk@12301 2bbb7eff-a529-9590-31e7-b0007b416f81
22 files changed:
include/core/SkBitmap.h
include/core/SkCanvas.h
include/core/SkMask.h
include/core/SkPicture.h
include/core/SkRefCnt.h
include/core/SkString.h
include/core/SkThread.h
include/core/SkTime.h
include/core/SkTypes.h
include/core/SkUtils.h
samplecode/SampleLayers.cpp
src/core/SkBlitter.cpp
src/core/SkCanvas.cpp
src/core/SkComposeShader.cpp
src/core/SkDescriptor.h
src/core/SkDraw.cpp
src/core/SkGlyphCache.h
src/core/SkPath.cpp
src/core/SkRasterClip.h
src/core/SkString.cpp
src/ports/SkFontHost_win.cpp
src/utils/mac/SkCreateCGImageRef.cpp