Require SK_DECLARE_STATIC_LAZY_PTR is used in global scope.
authormtklein <mtklein@chromium.org>
Mon, 13 Oct 2014 20:17:56 +0000 (13:17 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 13 Oct 2014 20:17:56 +0000 (13:17 -0700)
commit148ec59001ca7d7e54aec580a048c6dd2a085991
treeee310a6be5a0b53ac4ed05dd6907bd0d328dda6d
parent70242ace3b2ed06b33ee5ea5c9ac3aedea89b194
Require SK_DECLARE_STATIC_LAZY_PTR is used in global scope.

Function- or method- local scope isn't threadsafe; the pointer is generally
zero-initialized on first use in function scope (i.e. lazily... we have to go
deeper), but for globals we can be pretty sure the linker will do that for us.

BUG=skia:

No public API changes.
TBR=reed@google.com

Review URL: https://codereview.chromium.org/651723003
15 files changed:
include/core/SkData.h
include/core/SkPathRef.h
include/ports/SkFontMgr.h
include/ports/SkRemotableFontMgr.h
src/core/SkData.cpp
src/core/SkFontHost.cpp
src/core/SkGlyphCache.cpp
src/core/SkImageFilter.cpp
src/core/SkLazyPtr.h
src/core/SkMessageBus.h
src/core/SkPathRef.cpp
src/core/SkTypeface.cpp
src/core/SkXfermode.cpp
src/fonts/SkRemotableFontMgr.cpp
src/lazy/SkDiscardableMemoryPool.cpp